UNPKG

@rero/rero-ils-ui

Version:

User interface for RERO integrated library system (RERO ILS).

5 lines (4 loc) 2.07 MB
import{a as Tn,b as Jc,c as Nn}from"./chunk-GQ5FIRIY.js";import{a as yi,b as W2,c as G2,d as $1,e as is,j as j0,k as si}from"./chunk-4A4J5SA3.js";import{C as zi,a as Pi,b as Ys,c as Ea,d as Ma,e as un,f as W0,g as Q2,i as Ro,j as Zs,k as G0,l as Ji,m as K0,n as Q0,o as Zl,p as or,t as sd,u as Y0,v as Y2,x as An,y as No,z as Z0}from"./chunk-L5BLWZD6.js";import{a as Qs}from"./chunk-VB4AMLEP.js";import{Ha as cd,W as Xl,ba as H1,d as Ja,f as B2,i as H0,la as ld,m as A2,ma as os,n as es,na as X0}from"./chunk-4MYHQLZQ.js";import{a as Yl,c as Di,g as Vi,h as Xs}from"./chunk-AK7G7SIT.js";import{a as ad,b as Xu,c as ns,d as Ks}from"./chunk-MR6TFYJD.js";import{a as ro,b as U0,c as rs,d as Co,g as q1}from"./chunk-DUSRDOA3.js";import{a as ln,b as Ri,c as K2}from"./chunk-DPNURG4O.js";import{$ as Ws,A as Qu,Aa as j2,Ba as Tt,Ca as U2,D as R1,Ea as _t,Fa as $t,G as N1,Ga as Te,H as Us,Ha as Kt,I as ts,J as $r,K as ed,L as z2,M as vr,P as V2,R as br,S as jt,T as Et,U as Yu,V as Ao,W as aa,X as Ql,_ as Zu,aa as P1,ba as td,ca as $2,da as Lo,fa as z1,g as L2,ga as no,ha as H2,j as yo,k as q0,l as R2,la as q2,m as _n,ma as nd,n as Bn,na as sn,o as Li,p as N2,pa as V1,q as Xi,r as A1,s as P2,sa as Gs,t as qs,ta as id,u as js,ua as io,v as L1,va as rd,wa as od,x as xo,xa as nn,y as Ku,ya as rt,za as yn}from"./chunk-FRI676LD.js";import{Ca as O2,Fa as Jn,W as dn,X as M2,Z as ai,_ as qt,fa as Rn,ga as Lt,ha as oa,m as V0,na as F2,qa as B1,va as $0,wa as yt}from"./chunk-WKOKZ3JO.js";import{$ as B0,$b as hi,Aa as je,Ab as oi,Ac as na,B as m2,Bb as gr,Bc as bo,Ca as On,Cb as xt,Cc as vt,Da as L0,Db as Se,Dc as _i,Dd as ne,E as g2,Ea as vo,Eb as B,Ec as Xa,Ed as ut,F as Vs,Fa as be,Fb as y2,Fc as Vt,Gc as j,Gd as z0,H as hr,Ha as rr,Hb as R0,Hc as De,I as E1,Ic as it,J as wr,Ja as _2,Jc as kt,Kc as Zc,La as Gc,Mb as Hu,Mc as Sr,N as Ru,Nc as Tr,O as O0,Oc as Dr,Pc as w2,Q as Nu,Qc as k2,R as Wc,Rb as O1,Rc as S2,S as ta,Sb as ae,Tb as x2,Tc as Hs,U as Pu,Ub as N0,Uc as P0,Vb as Ce,Vc as tt,W as go,Wc as Vn,X as hn,Xb as we,Xc as ze,Y as Sa,Yb as qu,Yc as an,Z as Si,Zb as ju,Zc as Vr,_b as fi,_c as Uu,a as le,aa as zu,ac as g,b as at,bb as Ti,bc as A,c as M0,ca as mn,cb as Da,cc as L,d as F0,da as Ve,dc as de,dd as Ge,e as Jo,ea as Bt,ec as qn,ed as Xe,f as Ft,fb as F1,fc as Xn,fd as Xc,g as p2,ga as et,gb as _,gc as zt,gd as Wu,h as ka,ha as Ta,hc as Oe,i as f2,ia as $,ic as Be,j as Ps,ja as M1,jc as Me,jd as Ne,k as ea,kc as xe,l as Ht,lb as Vu,lc as to,m as Uc,ma as v2,mb as Kc,md as T2,n as h2,na as A0,nb as $u,o as I1,oa as H,ob as Qc,od as _o,p as Lu,pa as q,pb as $s,pd as _e,qa as Pe,qb as Dt,qd as Gu,r as dt,ra as Sn,rc as te,rd as D2,s as Oo,sa as kr,sb as Yc,sc as v,sd as I2,t as mo,ta as Zi,tb as mr,tc as en,uc as wt,ud as ia,v as on,va as he,vc as Xt,vd as Fe,w as zs,wa as ri,wc as Yt,wd as Bo,xa as b2,xc as Z,xd as E2,yb as me,yc as X,yd as ra,zb as At,zc as C2,zd as Ia}from"./chunk-3WD6XLXL.js";var lo=Ft((eb,tb)=>{(function(t,r){typeof eb=="object"&&typeof tb<"u"?tb.exports=r():typeof define=="function"&&define.amd?define(r):(t=t||self,t.CodeMirror=r())})(eb,function(){"use strict";var t=navigator.userAgent,r=navigator.platform,e=/gecko\/\d/i.test(t),n=/MSIE \d/.test(t),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),o=/Edge\/(\d+)/.exec(t),a=n||i||o,c=a&&(n?document.documentMode||6:+(o||i)[1]),p=!o&&/WebKit\//.test(t),h=p&&/Qt\/\d+\.\d+/.test(t),m=!o&&/Chrome\/(\d+)/.exec(t),y=m&&+m[1],x=/Opera\//.test(t),C=/Apple Computer/.test(navigator.vendor),S=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),F=/PhantomJS/.test(t),I=C&&(/Mobile\/\w+/.test(t)||navigator.maxTouchPoints>2),D=/Android/.test(t),O=I||D||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),V=I||/Mac/.test(r),z=/\bCrOS\b/.test(t),G=/win/i.test(r),Q=x&&t.match(/Version\/(\d*\.\d*)/);Q&&(Q=Number(Q[1])),Q&&Q>=15&&(x=!1,p=!0);var oe=V&&(h||x&&(Q==null||Q<12.11)),ge=e||a&&c>=9;function re(s){return new RegExp("(^|\\s)"+s+"(?:$|\\s)\\s*")}var Ie=function(s,l){var u=s.className,d=re(l).exec(u);if(d){var f=u.slice(d.index+d[0].length);s.className=u.slice(0,d.index)+(f?d[1]+f:"")}};function fe(s){for(var l=s.childNodes.length;l>0;--l)s.removeChild(s.firstChild);return s}function ke(s,l){return fe(s).appendChild(l)}function Y(s,l,u,d){var f=document.createElement(s);if(u&&(f.className=u),d&&(f.style.cssText=d),typeof l=="string")f.appendChild(document.createTextNode(l));else if(l)for(var b=0;b<l.length;++b)f.appendChild(l[b]);return f}function se(s,l,u,d){var f=Y(s,l,u,d);return f.setAttribute("role","presentation"),f}var ye;document.createRange?ye=function(s,l,u,d){var f=document.createRange();return f.setEnd(d||s,u),f.setStart(s,l),f}:ye=function(s,l,u){var d=document.body.createTextRange();try{d.moveToElementText(s.parentNode)}catch{return d}return d.collapse(!0),d.moveEnd("character",u),d.moveStart("character",l),d};function Ae(s,l){if(l.nodeType==3&&(l=l.parentNode),s.contains)return s.contains(l);do if(l.nodeType==11&&(l=l.host),l==s)return!0;while(l=l.parentNode)}function Je(s){var l=s.ownerDocument||s,u;try{u=s.activeElement}catch{u=l.body||null}for(;u&&u.shadowRoot&&u.shadowRoot.activeElement;)u=u.shadowRoot.activeElement;return u}function gt(s,l){var u=s.className;re(l).test(u)||(s.className+=(u?" ":"")+l)}function Le(s,l){for(var u=s.split(" "),d=0;d<u.length;d++)u[d]&&!re(u[d]).test(l)&&(l+=" "+u[d]);return l}var W=function(s){s.select()};I?W=function(s){s.selectionStart=0,s.selectionEnd=s.value.length}:a&&(W=function(s){try{s.select()}catch{}});function N(s){return s.display.wrapper.ownerDocument}function ve(s){return ft(s.display.wrapper)}function ft(s){return s.getRootNode?s.getRootNode():s.ownerDocument}function lt(s){return N(s).defaultView}function vn(s){var l=Array.prototype.slice.call(arguments,1);return function(){return s.apply(null,l)}}function Ot(s,l,u){l||(l={});for(var d in s)Object.prototype.hasOwnProperty.call(s,d)&&(u!==!1||!Object.prototype.hasOwnProperty.call(l,d))&&(l[d]=s[d]);return l}function bn(s,l,u,d,f){l==null&&(l=s.search(/[^\s\u00a0]/),l==-1&&(l=s.length));for(var b=d||0,w=f||0;;){var T=s.indexOf(" ",b);if(T<0||T>=l)return w+(l-b);w+=T-b,w+=u-w%u,b=T+1}}var Qn=function(){this.id=null,this.f=null,this.time=0,this.handler=vn(this.onTimeout,this)};Qn.prototype.onTimeout=function(s){s.id=0,s.time<=+new Date?s.f():setTimeout(s.handler,s.time-+new Date)},Qn.prototype.set=function(s,l){this.f=l;var u=+new Date+s;(!this.id||u<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,s),this.time=u)};function cn(s,l){for(var u=0;u<s.length;++u)if(s[u]==l)return u;return-1}var Cn=50,fn={toString:function(){return"CodeMirror.Pass"}},wn={scroll:!1},Or={origin:"*mouse"},Mi={origin:"+move"};function dr(s,l,u){for(var d=0,f=0;;){var b=s.indexOf(" ",d);b==-1&&(b=s.length);var w=b-d;if(b==s.length||f+w>=l)return d+Math.min(w,l-f);if(f+=b-d,f+=u-f%u,d=b+1,f>=l)return d}}var Ui=[""];function Yr(s){for(;Ui.length<=s;)Ui.push(Zt(Ui)+" ");return Ui[s]}function Zt(s){return s[s.length-1]}function Yn(s,l){for(var u=[],d=0;d<s.length;d++)u[d]=l(s[d],d);return u}function Zn(s,l,u){for(var d=0,f=u(l);d<s.length&&u(s[d])<=f;)d++;s.splice(d,0,l)}function Br(){}function ja(s,l){var u;return Object.create?u=Object.create(s):(Br.prototype=s,u=new Br),l&&Ot(l,u),u}var Ts=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function po(s){return/\w/.test(s)||s>"\x80"&&(s.toUpperCase()!=s.toLowerCase()||Ts.test(s))}function fo(s,l){return l?l.source.indexOf("\\w")>-1&&po(s)?!0:l.test(s):po(s)}function bc(s){for(var l in s)if(s.hasOwnProperty(l)&&s[l])return!1;return!0}var _c=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function Wo(s){return s.charCodeAt(0)>=768&&_c.test(s)}function Zr(s,l,u){for(;(u<0?l>0:l<s.length)&&Wo(s.charAt(l));)l+=u;return l}function Go(s,l,u){for(var d=l>u?-1:1;;){if(l==u)return l;var f=(l+u)/2,b=d<0?Math.ceil(f):Math.floor(f);if(b==l)return s(b)?l:u;s(b)?u=b:l=b+d}}function Cg(s,l,u,d){if(!s)return d(l,u,"ltr",0);for(var f=!1,b=0;b<s.length;++b){var w=s[b];(w.from<u&&w.to>l||l==u&&w.to==l)&&(d(Math.max(w.from,l),Math.min(w.to,u),w.level==1?"rtl":"ltr",b),f=!0)}f||d(l,u,"ltr")}var Ds=null;function Is(s,l,u){var d;Ds=null;for(var f=0;f<s.length;++f){var b=s[f];if(b.from<l&&b.to>l)return f;b.to==l&&(b.from!=b.to&&u=="before"?d=f:Ds=f),b.from==l&&(b.from!=b.to&&u!="before"?d=f:Ds=f)}return d??Ds}var wg=(function(){var s="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",l="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function u(R){return R<=247?s.charAt(R):1424<=R&&R<=1524?"R":1536<=R&&R<=1785?l.charAt(R-1536):1774<=R&&R<=2220?"r":8192<=R&&R<=8203?"w":R==8204?"b":"L"}var d=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,f=/[stwN]/,b=/[LRr]/,w=/[Lb1n]/,T=/[1n]/;function M(R,K,J){this.level=R,this.from=K,this.to=J}return function(R,K){var J=K=="ltr"?"L":"R";if(R.length==0||K=="ltr"&&!d.test(R))return!1;for(var pe=R.length,ce=[],Ee=0;Ee<pe;++Ee)ce.push(u(R.charCodeAt(Ee)));for(var Re=0,qe=J;Re<pe;++Re){var Ye=ce[Re];Ye=="m"?ce[Re]=qe:qe=Ye}for(var nt=0,Ze=J;nt<pe;++nt){var ct=ce[nt];ct=="1"&&Ze=="r"?ce[nt]="n":b.test(ct)&&(Ze=ct,ct=="r"&&(ce[nt]="R"))}for(var It=1,St=ce[0];It<pe-1;++It){var tn=ce[It];tn=="+"&&St=="1"&&ce[It+1]=="1"?ce[It]="1":tn==","&&St==ce[It+1]&&(St=="1"||St=="n")&&(ce[It]=St),St=tn}for(var zn=0;zn<pe;++zn){var Qi=ce[zn];if(Qi==",")ce[zn]="N";else if(Qi=="%"){var pi=void 0;for(pi=zn+1;pi<pe&&ce[pi]=="%";++pi);for(var eo=zn&&ce[zn-1]=="!"||pi<pe&&ce[pi]=="1"?"1":"N",Nr=zn;Nr<pi;++Nr)ce[Nr]=eo;zn=pi-1}}for(var Bi=0,Pr=J;Bi<pe;++Bi){var ir=ce[Bi];Pr=="L"&&ir=="1"?ce[Bi]="L":b.test(ir)&&(Pr=ir)}for(var Ni=0;Ni<pe;++Ni)if(f.test(ce[Ni])){var Ai=void 0;for(Ai=Ni+1;Ai<pe&&f.test(ce[Ai]);++Ai);for(var bi=(Ni?ce[Ni-1]:J)=="L",zr=(Ai<pe?ce[Ai]:J)=="L",qc=bi==zr?bi?"L":"R":J,Ns=Ni;Ns<Ai;++Ns)ce[Ns]=qc;Ni=Ai-1}for(var fr=[],wa,Yi=0;Yi<pe;)if(w.test(ce[Yi])){var T1=Yi;for(++Yi;Yi<pe&&w.test(ce[Yi]);++Yi);fr.push(new M(0,T1,Yi))}else{var Za=Yi,Gl=fr.length,Kl=K=="rtl"?1:0;for(++Yi;Yi<pe&&ce[Yi]!="L";++Yi);for(var Cr=Za;Cr<Yi;)if(T.test(ce[Cr])){Za<Cr&&(fr.splice(Gl,0,new M(1,Za,Cr)),Gl+=Kl);var jc=Cr;for(++Cr;Cr<Yi&&T.test(ce[Cr]);++Cr);fr.splice(Gl,0,new M(2,jc,Cr)),Gl+=Kl,Za=Cr}else++Cr;Za<Yi&&fr.splice(Gl,0,new M(1,Za,Yi))}return K=="ltr"&&(fr[0].level==1&&(wa=R.match(/^\s+/))&&(fr[0].from=wa[0].length,fr.unshift(new M(0,0,wa[0].length))),Zt(fr).level==1&&(wa=R.match(/\s+$/))&&(Zt(fr).to-=wa[0].length,fr.push(new M(0,pe-wa[0].length,pe)))),K=="rtl"?fr.reverse():fr}})();function Ko(s,l){var u=s.order;return u==null&&(u=s.order=wg(s.text,l)),u}var au=[],Mt=function(s,l,u){if(s.addEventListener)s.addEventListener(l,u,!1);else if(s.attachEvent)s.attachEvent("on"+l,u);else{var d=s._handlers||(s._handlers={});d[l]=(d[l]||au).concat(u)}};function yc(s,l){return s._handlers&&s._handlers[l]||au}function Ar(s,l,u){if(s.removeEventListener)s.removeEventListener(l,u,!1);else if(s.detachEvent)s.detachEvent("on"+l,u);else{var d=s._handlers,f=d&&d[l];if(f){var b=cn(f,u);b>-1&&(d[l]=f.slice(0,b).concat(f.slice(b+1)))}}}function ui(s,l){var u=yc(s,l);if(u.length)for(var d=Array.prototype.slice.call(arguments,2),f=0;f<u.length;++f)u[f].apply(null,d)}function Fi(s,l,u){return typeof l=="string"&&(l={type:l,preventDefault:function(){this.defaultPrevented=!0}}),ui(s,u||l.type,s,l),xc(l)||l.codemirrorIgnore}function Qp(s){var l=s._handlers&&s._handlers.cursorActivity;if(l)for(var u=s.curOp.cursorActivityHandlers||(s.curOp.cursorActivityHandlers=[]),d=0;d<l.length;++d)cn(u,l[d])==-1&&u.push(l[d])}function Xr(s,l){return yc(s,l).length>0}function Ua(s){s.prototype.on=function(l,u){Mt(this,l,u)},s.prototype.off=function(l,u){Ar(this,l,u)}}function ur(s){s.preventDefault?s.preventDefault():s.returnValue=!1}function Yp(s){s.stopPropagation?s.stopPropagation():s.cancelBubble=!0}function xc(s){return s.defaultPrevented!=null?s.defaultPrevented:s.returnValue==!1}function Ll(s){ur(s),Yp(s)}function Cc(s){return s.target||s.srcElement}function yr(s){var l=s.which;return l==null&&(s.button&1?l=1:s.button&2?l=3:s.button&4&&(l=2)),V&&s.ctrlKey&&l==1&&(l=3),l}var ba=(function(){if(a&&c<9)return!1;var s=Y("div");return"draggable"in s||"dragDrop"in s})(),wc;function kg(s){if(wc==null){var l=Y("span","\u200B");ke(s,Y("span",[l,document.createTextNode("x")])),s.firstChild.offsetHeight!=0&&(wc=l.offsetWidth<=1&&l.offsetHeight>2&&!(a&&c<8))}var u=wc?Y("span","\u200B"):Y("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return u.setAttribute("cm-text",""),u}var Sg;function aI(s){if(Sg!=null)return Sg;var l=ke(s,document.createTextNode("A\u062EA")),u=ye(l,0,1).getBoundingClientRect(),d=ye(l,1,2).getBoundingClientRect();return fe(s),!u||u.left==u.right?!1:Sg=d.right-u.right<3}var Tg=` b`.split(/\n/).length!=3?function(s){for(var l=0,u=[],d=s.length;l<=d;){var f=s.indexOf(` `,l);f==-1&&(f=s.length);var b=s.slice(l,s.charAt(f-1)=="\r"?f-1:f),w=b.indexOf("\r");w!=-1?(u.push(b.slice(0,w)),l+=w+1):(u.push(b),l=f+1)}return u}:function(s){return s.split(/\r\n?|\n/)},sI=window.getSelection?function(s){try{return s.selectionStart!=s.selectionEnd}catch{return!1}}:function(s){var l;try{l=s.ownerDocument.selection.createRange()}catch{}return!l||l.parentElement()!=s?!1:l.compareEndPoints("StartToEnd",l)!=0},lI=(function(){var s=Y("div");return"oncopy"in s?!0:(s.setAttribute("oncopy","return;"),typeof s.oncopy=="function")})(),Dg=null;function cI(s){if(Dg!=null)return Dg;var l=ke(s,Y("span","x")),u=l.getBoundingClientRect(),d=ye(l,0,1).getBoundingClientRect();return Dg=Math.abs(u.left-d.left)>1}var Ig={},kc={};function dI(s,l){arguments.length>2&&(l.dependencies=Array.prototype.slice.call(arguments,2)),Ig[s]=l}function uI(s,l){kc[s]=l}function Zp(s){if(typeof s=="string"&&kc.hasOwnProperty(s))s=kc[s];else if(s&&typeof s.name=="string"&&kc.hasOwnProperty(s.name)){var l=kc[s.name];typeof l=="string"&&(l={name:l}),s=ja(l,s),s.name=l.name}else{if(typeof s=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(s))return Zp("application/xml");if(typeof s=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(s))return Zp("application/json")}return typeof s=="string"?{name:s}:s||{name:"null"}}function Eg(s,l){l=Zp(l);var u=Ig[l.name];if(!u)return Eg(s,"text/plain");var d=u(s,l);if(Sc.hasOwnProperty(l.name)){var f=Sc[l.name];for(var b in f)f.hasOwnProperty(b)&&(d.hasOwnProperty(b)&&(d["_"+b]=d[b]),d[b]=f[b])}if(d.name=l.name,l.helperType&&(d.helperType=l.helperType),l.modeProps)for(var w in l.modeProps)d[w]=l.modeProps[w];return d}var Sc={};function pI(s,l){var u=Sc.hasOwnProperty(s)?Sc[s]:Sc[s]={};Ot(l,u)}function Rl(s,l){if(l===!0)return l;if(s.copyState)return s.copyState(l);var u={};for(var d in l){var f=l[d];f instanceof Array&&(f=f.concat([])),u[d]=f}return u}function Mg(s,l){for(var u;s.innerMode&&(u=s.innerMode(l),!(!u||u.mode==s));)l=u.state,s=u.mode;return u||{mode:s,state:l}}function py(s,l,u){return s.startState?s.startState(l,u):!0}var Oi=function(s,l,u){this.pos=this.start=0,this.string=s,this.tabSize=l||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=u};Oi.prototype.eol=function(){return this.pos>=this.string.length},Oi.prototype.sol=function(){return this.pos==this.lineStart},Oi.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Oi.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Oi.prototype.eat=function(s){var l=this.string.charAt(this.pos),u;if(typeof s=="string"?u=l==s:u=l&&(s.test?s.test(l):s(l)),u)return++this.pos,l},Oi.prototype.eatWhile=function(s){for(var l=this.pos;this.eat(s););return this.pos>l},Oi.prototype.eatSpace=function(){for(var s=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>s},Oi.prototype.skipToEnd=function(){this.pos=this.string.length},Oi.prototype.skipTo=function(s){var l=this.string.indexOf(s,this.pos);if(l>-1)return this.pos=l,!0},Oi.prototype.backUp=function(s){this.pos-=s},Oi.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=bn(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?bn(this.string,this.lineStart,this.tabSize):0)},Oi.prototype.indentation=function(){return bn(this.string,null,this.tabSize)-(this.lineStart?bn(this.string,this.lineStart,this.tabSize):0)},Oi.prototype.match=function(s,l,u){if(typeof s=="string"){var d=function(w){return u?w.toLowerCase():w},f=this.string.substr(this.pos,s.length);if(d(f)==d(s))return l!==!1&&(this.pos+=s.length),!0}else{var b=this.string.slice(this.pos).match(s);return b&&b.index>0?null:(b&&l!==!1&&(this.pos+=b[0].length),b)}},Oi.prototype.current=function(){return this.string.slice(this.start,this.pos)},Oi.prototype.hideFirstChars=function(s,l){this.lineStart+=s;try{return l()}finally{this.lineStart-=s}},Oi.prototype.lookAhead=function(s){var l=this.lineOracle;return l&&l.lookAhead(s)},Oi.prototype.baseToken=function(){var s=this.lineOracle;return s&&s.baseToken(this.pos)};function Ct(s,l){if(l-=s.first,l<0||l>=s.size)throw new Error("There is no line "+(l+s.first)+" in the document.");for(var u=s;!u.lines;)for(var d=0;;++d){var f=u.children[d],b=f.chunkSize();if(l<b){u=f;break}l-=b}return u.lines[l]}function Nl(s,l,u){var d=[],f=l.line;return s.iter(l.line,u.line+1,function(b){var w=b.text;f==u.line&&(w=w.slice(0,u.ch)),f==l.line&&(w=w.slice(l.ch)),d.push(w),++f}),d}function Fg(s,l,u){var d=[];return s.iter(l,u,function(f){d.push(f.text)}),d}function _a(s,l){var u=l-s.height;if(u)for(var d=s;d;d=d.parent)d.height+=u}function Mn(s){if(s.parent==null)return null;for(var l=s.parent,u=cn(l.lines,s),d=l.parent;d;l=d,d=d.parent)for(var f=0;d.children[f]!=l;++f)u+=d.children[f].chunkSize();return u+l.first}function Pl(s,l){var u=s.first;e:do{for(var d=0;d<s.children.length;++d){var f=s.children[d],b=f.height;if(l<b){s=f;continue e}l-=b,u+=f.chunkSize()}return u}while(!s.lines);for(var w=0;w<s.lines.length;++w){var T=s.lines[w],M=T.height;if(l<M)break;l-=M}return u+w}function su(s,l){return l>=s.first&&l<s.first+s.size}function Og(s,l){return String(s.lineNumberFormatter(l+s.firstLineNumber))}function He(s,l,u){if(u===void 0&&(u=null),!(this instanceof He))return new He(s,l,u);this.line=s,this.ch=l,this.sticky=u}function Wt(s,l){return s.line-l.line||s.ch-l.ch}function Bg(s,l){return s.sticky==l.sticky&&Wt(s,l)==0}function Ag(s){return He(s.line,s.ch)}function Xp(s,l){return Wt(s,l)<0?l:s}function Jp(s,l){return Wt(s,l)<0?s:l}function fy(s,l){return Math.max(s.first,Math.min(l,s.first+s.size-1))}function Gt(s,l){if(l.line<s.first)return He(s.first,0);var u=s.first+s.size-1;return l.line>u?He(u,Ct(s,u).text.length):fI(l,Ct(s,l.line).text.length)}function fI(s,l){var u=s.ch;return u==null||u>l?He(s.line,l):u<0?He(s.line,0):s}function hy(s,l){for(var u=[],d=0;d<l.length;d++)u[d]=Gt(s,l[d]);return u}var e0=function(s,l){this.state=s,this.lookAhead=l},ya=function(s,l,u,d){this.state=l,this.doc=s,this.line=u,this.maxLookAhead=d||0,this.baseTokens=null,this.baseTokenPos=1};ya.prototype.lookAhead=function(s){var l=this.doc.getLine(this.line+s);return l!=null&&s>this.maxLookAhead&&(this.maxLookAhead=s),l},ya.prototype.baseToken=function(s){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=s;)this.baseTokenPos+=2;var l=this.baseTokens[this.baseTokenPos+1];return{type:l&&l.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-s}},ya.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ya.fromSaved=function(s,l,u){return l instanceof e0?new ya(s,Rl(s.mode,l.state),u,l.lookAhead):new ya(s,Rl(s.mode,l),u)},ya.prototype.save=function(s){var l=s!==!1?Rl(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new e0(l,this.maxLookAhead):l};function my(s,l,u,d){var f=[s.state.modeGen],b={};xy(s,l.text,s.doc.mode,u,function(R,K){return f.push(R,K)},b,d);for(var w=u.state,T=function(R){u.baseTokens=f;var K=s.state.overlays[R],J=1,pe=0;u.state=!0,xy(s,l.text,K.mode,u,function(ce,Ee){for(var Re=J;pe<ce;){var qe=f[J];qe>ce&&f.splice(J,1,ce,f[J+1],qe),J+=2,pe=Math.min(ce,qe)}if(Ee)if(K.opaque)f.splice(Re,J-Re,ce,"overlay "+Ee),J=Re+2;else for(;Re<J;Re+=2){var Ye=f[Re+1];f[Re+1]=(Ye?Ye+" ":"")+"overlay "+Ee}},b),u.state=w,u.baseTokens=null,u.baseTokenPos=1},M=0;M<s.state.overlays.length;++M)T(M);return{styles:f,classes:b.bgClass||b.textClass?b:null}}function gy(s,l,u){if(!l.styles||l.styles[0]!=s.state.modeGen){var d=lu(s,Mn(l)),f=l.text.length>s.options.maxHighlightLength&&Rl(s.doc.mode,d.state),b=my(s,l,d);f&&(d.state=f),l.stateAfter=d.save(!f),l.styles=b.styles,b.classes?l.styleClasses=b.classes:l.styleClasses&&(l.styleClasses=null),u===s.doc.highlightFrontier&&(s.doc.modeFrontier=Math.max(s.doc.modeFrontier,++s.doc.highlightFrontier))}return l.styles}function lu(s,l,u){var d=s.doc,f=s.display;if(!d.mode.startState)return new ya(d,!0,l);var b=hI(s,l,u),w=b>d.first&&Ct(d,b-1).stateAfter,T=w?ya.fromSaved(d,w,b):new ya(d,py(d.mode),b);return d.iter(b,l,function(M){Lg(s,M.text,T);var R=T.line;M.stateAfter=R==l-1||R%5==0||R>=f.viewFrom&&R<f.viewTo?T.save():null,T.nextLine()}),u&&(d.modeFrontier=T.line),T}function Lg(s,l,u,d){var f=s.doc.mode,b=new Oi(l,s.options.tabSize,u);for(b.start=b.pos=d||0,l==""&&vy(f,u.state);!b.eol();)Rg(f,b,u.state),b.start=b.pos}function vy(s,l){if(s.blankLine)return s.blankLine(l);if(s.innerMode){var u=Mg(s,l);if(u.mode.blankLine)return u.mode.blankLine(u.state)}}function Rg(s,l,u,d){for(var f=0;f<10;f++){d&&(d[0]=Mg(s,u).mode);var b=s.token(l,u);if(l.pos>l.start)return b}throw new Error("Mode "+s.name+" failed to advance stream.")}var by=function(s,l,u){this.start=s.start,this.end=s.pos,this.string=s.current(),this.type=l||null,this.state=u};function _y(s,l,u,d){var f=s.doc,b=f.mode,w;l=Gt(f,l);var T=Ct(f,l.line),M=lu(s,l.line,u),R=new Oi(T.text,s.options.tabSize,M),K;for(d&&(K=[]);(d||R.pos<l.ch)&&!R.eol();)R.start=R.pos,w=Rg(b,R,M.state),d&&K.push(new by(R,w,Rl(f.mode,M.state)));return d?K:new by(R,w,M.state)}function yy(s,l){if(s)for(;;){var u=s.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!u)break;s=s.slice(0,u.index)+s.slice(u.index+u[0].length);var d=u[1]?"bgClass":"textClass";l[d]==null?l[d]=u[2]:new RegExp("(?:^|\\s)"+u[2]+"(?:$|\\s)").test(l[d])||(l[d]+=" "+u[2])}return s}function xy(s,l,u,d,f,b,w){var T=u.flattenSpans;T==null&&(T=s.options.flattenSpans);var M=0,R=null,K=new Oi(l,s.options.tabSize,d),J,pe=s.options.addModeClass&&[null];for(l==""&&yy(vy(u,d.state),b);!K.eol();){if(K.pos>s.options.maxHighlightLength?(T=!1,w&&Lg(s,l,d,K.pos),K.pos=l.length,J=null):J=yy(Rg(u,K,d.state,pe),b),pe){var ce=pe[0].name;ce&&(J="m-"+(J?ce+" "+J:ce))}if(!T||R!=J){for(;M<K.start;)M=Math.min(K.start,M+5e3),f(M,R);R=J}K.start=K.pos}for(;M<K.pos;){var Ee=Math.min(K.pos,M+5e3);f(Ee,R),M=Ee}}function hI(s,l,u){for(var d,f,b=s.doc,w=u?-1:l-(s.doc.mode.innerMode?1e3:100),T=l;T>w;--T){if(T<=b.first)return b.first;var M=Ct(b,T-1),R=M.stateAfter;if(R&&(!u||T+(R instanceof e0?R.lookAhead:0)<=b.modeFrontier))return T;var K=bn(M.text,null,s.options.tabSize);(f==null||d>K)&&(f=T-1,d=K)}return f}function mI(s,l){if(s.modeFrontier=Math.min(s.modeFrontier,l),!(s.highlightFrontier<l-10)){for(var u=s.first,d=l-1;d>u;d--){var f=Ct(s,d).stateAfter;if(f&&(!(f instanceof e0)||d+f.lookAhead<l)){u=d+1;break}}s.highlightFrontier=Math.min(s.highlightFrontier,u)}}var Cy=!1,Wa=!1;function gI(){Cy=!0}function vI(){Wa=!0}function t0(s,l,u){this.marker=s,this.from=l,this.to=u}function cu(s,l){if(s)for(var u=0;u<s.length;++u){var d=s[u];if(d.marker==l)return d}}function bI(s,l){for(var u,d=0;d<s.length;++d)s[d]!=l&&(u||(u=[])).push(s[d]);return u}function _I(s,l,u){var d=u&&window.WeakSet&&(u.markedSpans||(u.markedSpans=new WeakSet));d&&s.markedSpans&&d.has(s.markedSpans)?s.markedSpans.push(l):(s.markedSpans=s.markedSpans?s.markedSpans.concat([l]):[l],d&&d.add(s.markedSpans)),l.marker.attachLine(s)}function yI(s,l,u){var d;if(s)for(var f=0;f<s.length;++f){var b=s[f],w=b.marker,T=b.from==null||(w.inclusiveLeft?b.from<=l:b.from<l);if(T||b.from==l&&w.type=="bookmark"&&(!u||!b.marker.insertLeft)){var M=b.to==null||(w.inclusiveRight?b.to>=l:b.to>l);(d||(d=[])).push(new t0(w,b.from,M?null:b.to))}}return d}function xI(s,l,u){var d;if(s)for(var f=0;f<s.length;++f){var b=s[f],w=b.marker,T=b.to==null||(w.inclusiveRight?b.to>=l:b.to>l);if(T||b.from==l&&w.type=="bookmark"&&(!u||b.marker.insertLeft)){var M=b.from==null||(w.inclusiveLeft?b.from<=l:b.from<l);(d||(d=[])).push(new t0(w,M?null:b.from-l,b.to==null?null:b.to-l))}}return d}function Ng(s,l){if(l.full)return null;var u=su(s,l.from.line)&&Ct(s,l.from.line).markedSpans,d=su(s,l.to.line)&&Ct(s,l.to.line).markedSpans;if(!u&&!d)return null;var f=l.from.ch,b=l.to.ch,w=Wt(l.from,l.to)==0,T=yI(u,f,w),M=xI(d,b,w),R=l.text.length==1,K=Zt(l.text).length+(R?f:0);if(T)for(var J=0;J<T.length;++J){var pe=T[J];if(pe.to==null){var ce=cu(M,pe.marker);ce?R&&(pe.to=ce.to==null?null:ce.to+K):pe.to=f}}if(M)for(var Ee=0;Ee<M.length;++Ee){var Re=M[Ee];if(Re.to!=null&&(Re.to+=K),Re.from==null){var qe=cu(T,Re.marker);qe||(Re.from=K,R&&(T||(T=[])).push(Re))}else Re.from+=K,R&&(T||(T=[])).push(Re)}T&&(T=wy(T)),M&&M!=T&&(M=wy(M));var Ye=[T];if(!R){var nt=l.text.length-2,Ze;if(nt>0&&T)for(var ct=0;ct<T.length;++ct)T[ct].to==null&&(Ze||(Ze=[])).push(new t0(T[ct].marker,null,null));for(var It=0;It<nt;++It)Ye.push(Ze);Ye.push(M)}return Ye}function wy(s){for(var l=0;l<s.length;++l){var u=s[l];u.from!=null&&u.from==u.to&&u.marker.clearWhenEmpty!==!1&&s.splice(l--,1)}return s.length?s:null}function CI(s,l,u){var d=null;if(s.iter(l.line,u.line+1,function(ce){if(ce.markedSpans)for(var Ee=0;Ee<ce.markedSpans.length;++Ee){var Re=ce.markedSpans[Ee].marker;Re.readOnly&&(!d||cn(d,Re)==-1)&&(d||(d=[])).push(Re)}}),!d)return null;for(var f=[{from:l,to:u}],b=0;b<d.length;++b)for(var w=d[b],T=w.find(0),M=0;M<f.length;++M){var R=f[M];if(!(Wt(R.to,T.from)<0||Wt(R.from,T.to)>0)){var K=[M,1],J=Wt(R.from,T.from),pe=Wt(R.to,T.to);(J<0||!w.inclusiveLeft&&!J)&&K.push({from:R.from,to:T.from}),(pe>0||!w.inclusiveRight&&!pe)&&K.push({from:T.to,to:R.to}),f.splice.apply(f,K),M+=K.length-3}}return f}function ky(s){var l=s.markedSpans;if(l){for(var u=0;u<l.length;++u)l[u].marker.detachLine(s);s.markedSpans=null}}function Sy(s,l){if(l){for(var u=0;u<l.length;++u)l[u].marker.attachLine(s);s.markedSpans=l}}function n0(s){return s.inclusiveLeft?-1:0}function i0(s){return s.inclusiveRight?1:0}function Pg(s,l){var u=s.lines.length-l.lines.length;if(u!=0)return u;var d=s.find(),f=l.find(),b=Wt(d.from,f.from)||n0(s)-n0(l);if(b)return-b;var w=Wt(d.to,f.to)||i0(s)-i0(l);return w||l.id-s.id}function Ty(s,l){var u=Wa&&s.markedSpans,d;if(u)for(var f=void 0,b=0;b<u.length;++b)f=u[b],f.marker.collapsed&&(l?f.from:f.to)==null&&(!d||Pg(d,f.marker)<0)&&(d=f.marker);return d}function Dy(s){return Ty(s,!0)}function r0(s){return Ty(s,!1)}function wI(s,l){var u=Wa&&s.markedSpans,d;if(u)for(var f=0;f<u.length;++f){var b=u[f];b.marker.collapsed&&(b.from==null||b.from<l)&&(b.to==null||b.to>l)&&(!d||Pg(d,b.marker)<0)&&(d=b.marker)}return d}function Iy(s,l,u,d,f){var b=Ct(s,l),w=Wa&&b.markedSpans;if(w)for(var T=0;T<w.length;++T){var M=w[T];if(M.marker.collapsed){var R=M.marker.find(0),K=Wt(R.from,u)||n0(M.marker)-n0(f),J=Wt(R.to,d)||i0(M.marker)-i0(f);if(!(K>=0&&J<=0||K<=0&&J>=0)&&(K<=0&&(M.marker.inclusiveRight&&f.inclusiveLeft?Wt(R.to,u)>=0:Wt(R.to,u)>0)||K>=0&&(M.marker.inclusiveRight&&f.inclusiveLeft?Wt(R.from,d)<=0:Wt(R.from,d)<0)))return!0}}}function Qo(s){for(var l;l=Dy(s);)s=l.find(-1,!0).line;return s}function kI(s){for(var l;l=r0(s);)s=l.find(1,!0).line;return s}function SI(s){for(var l,u;l=r0(s);)s=l.find(1,!0).line,(u||(u=[])).push(s);return u}function zg(s,l){var u=Ct(s,l),d=Qo(u);return u==d?l:Mn(d)}function Ey(s,l){if(l>s.lastLine())return l;var u=Ct(s,l),d;if(!Es(s,u))return l;for(;d=r0(u);)u=d.find(1,!0).line;return Mn(u)+1}function Es(s,l){var u=Wa&&l.markedSpans;if(u){for(var d=void 0,f=0;f<u.length;++f)if(d=u[f],!!d.marker.collapsed){if(d.from==null)return!0;if(!d.marker.widgetNode&&d.from==0&&d.marker.inclusiveLeft&&Vg(s,l,d))return!0}}}function Vg(s,l,u){if(u.to==null){var d=u.marker.find(1,!0);return Vg(s,d.line,cu(d.line.markedSpans,u.marker))}if(u.marker.inclusiveRight&&u.to==l.text.length)return!0;for(var f=void 0,b=0;b<l.markedSpans.length;++b)if(f=l.markedSpans[b],f.marker.collapsed&&!f.marker.widgetNode&&f.from==u.to&&(f.to==null||f.to!=u.from)&&(f.marker.inclusiveLeft||u.marker.inclusiveRight)&&Vg(s,l,f))return!0}function Ga(s){s=Qo(s);for(var l=0,u=s.parent,d=0;d<u.lines.length;++d){var f=u.lines[d];if(f==s)break;l+=f.height}for(var b=u.parent;b;u=b,b=u.parent)for(var w=0;w<b.children.length;++w){var T=b.children[w];if(T==u)break;l+=T.height}return l}function o0(s){if(s.height==0)return 0;for(var l=s.text.length,u,d=s;u=Dy(d);){var f=u.find(0,!0);d=f.from.line,l+=f.from.ch-f.to.ch}for(d=s;u=r0(d);){var b=u.find(0,!0);l-=d.text.length-b.from.ch,d=b.to.line,l+=d.text.length-b.to.ch}return l}function $g(s){var l=s.display,u=s.doc;l.maxLine=Ct(u,u.first),l.maxLineLength=o0(l.maxLine),l.maxLineChanged=!0,u.iter(function(d){var f=o0(d);f>l.maxLineLength&&(l.maxLineLength=f,l.maxLine=d)})}var Tc=function(s,l,u){this.text=s,Sy(this,l),this.height=u?u(this):1};Tc.prototype.lineNo=function(){return Mn(this)},Ua(Tc);function TI(s,l,u,d){s.text=l,s.stateAfter&&(s.stateAfter=null),s.styles&&(s.styles=null),s.order!=null&&(s.order=null),ky(s),Sy(s,u);var f=d?d(s):1;f!=s.height&&_a(s,f)}function DI(s){s.parent=null,ky(s)}var II={},EI={};function My(s,l){if(!s||/^\s*$/.test(s))return null;var u=l.addModeClass?EI:II;return u[s]||(u[s]=s.replace(/\S+/g,"cm-$&"))}function Fy(s,l){var u=se("span",null,null,p?"padding-right: .1px":null),d={pre:se("pre",[u],"CodeMirror-line"),content:u,col:0,pos:0,cm:s,trailingSpace:!1,splitSpaces:s.getOption("lineWrapping")};l.measure={};for(var f=0;f<=(l.rest?l.rest.length:0);f++){var b=f?l.rest[f-1]:l.line,w=void 0;d.pos=0,d.addToken=FI,aI(s.display.measure)&&(w=Ko(b,s.doc.direction))&&(d.addToken=BI(d.addToken,w)),d.map=[];var T=l!=s.display.externalMeasured&&Mn(b);AI(b,d,gy(s,b,T)),b.styleClasses&&(b.styleClasses.bgClass&&(d.bgClass=Le(b.styleClasses.bgClass,d.bgClass||"")),b.styleClasses.textClass&&(d.textClass=Le(b.styleClasses.textClass,d.textClass||""))),d.map.length==0&&d.map.push(0,0,d.content.appendChild(kg(s.display.measure))),f==0?(l.measure.map=d.map,l.measure.cache={}):((l.measure.maps||(l.measure.maps=[])).push(d.map),(l.measure.caches||(l.measure.caches=[])).push({}))}if(p){var M=d.content.lastChild;(/\bcm-tab\b/.test(M.className)||M.querySelector&&M.querySelector(".cm-tab"))&&(d.content.className="cm-tab-wrap-hack")}return ui(s,"renderLine",s,l.line,d.pre),d.pre.className&&(d.textClass=Le(d.pre.className,d.textClass||"")),d}function MI(s){var l=Y("span","\u2022","cm-invalidchar");return l.title="\\u"+s.charCodeAt(0).toString(16),l.setAttribute("aria-label",l.title),l}function FI(s,l,u,d,f,b,w){if(l){var T=s.splitSpaces?OI(l,s.trailingSpace):l,M=s.cm.state.specialChars,R=!1,K;if(!M.test(l))s.col+=l.length,K=document.createTextNode(T),s.map.push(s.pos,s.pos+l.length,K),a&&c<9&&(R=!0),s.pos+=l.length;else{K=document.createDocumentFragment();for(var J=0;;){M.lastIndex=J;var pe=M.exec(l),ce=pe?pe.index-J:l.length-J;if(ce){var Ee=document.createTextNode(T.slice(J,J+ce));a&&c<9?K.appendChild(Y("span",[Ee])):K.appendChild(Ee),s.map.push(s.pos,s.pos+ce,Ee),s.col+=ce,s.pos+=ce}if(!pe)break;J+=ce+1;var Re=void 0;if(pe[0]==" "){var qe=s.cm.options.tabSize,Ye=qe-s.col%qe;Re=K.appendChild(Y("span",Yr(Ye),"cm-tab")),Re.setAttribute("role","presentation"),Re.setAttribute("cm-text"," "),s.col+=Ye}else pe[0]=="\r"||pe[0]==` `?(Re=K.appendChild(Y("span",pe[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Re.setAttribute("cm-text",pe[0]),s.col+=1):(Re=s.cm.options.specialCharPlaceholder(pe[0]),Re.setAttribute("cm-text",pe[0]),a&&c<9?K.appendChild(Y("span",[Re])):K.appendChild(Re),s.col+=1);s.map.push(s.pos,s.pos+1,Re),s.pos++}}if(s.trailingSpace=T.charCodeAt(l.length-1)==32,u||d||f||R||b||w){var nt=u||"";d&&(nt+=d),f&&(nt+=f);var Ze=Y("span",[K],nt,b);if(w)for(var ct in w)w.hasOwnProperty(ct)&&ct!="style"&&ct!="class"&&Ze.setAttribute(ct,w[ct]);return s.content.appendChild(Ze)}s.content.appendChild(K)}}function OI(s,l){if(s.length>1&&!/ /.test(s))return s;for(var u=l,d="",f=0;f<s.length;f++){var b=s.charAt(f);b==" "&&u&&(f==s.length-1||s.charCodeAt(f+1)==32)&&(b="\xA0"),d+=b,u=b==" "}return d}function BI(s,l){return function(u,d,f,b,w,T,M){f=f?f+" cm-force-border":"cm-force-border";for(var R=u.pos,K=R+d.length;;){for(var J=void 0,pe=0;pe<l.length&&(J=l[pe],!(J.to>R&&J.from<=R));pe++);if(J.to>=K)return s(u,d,f,b,w,T,M);s(u,d.slice(0,J.to-R),f,b,null,T,M),b=null,d=d.slice(J.to-R),R=J.to}}}function Oy(s,l,u,d){var f=!d&&u.widgetNode;f&&s.map.push(s.pos,s.pos+l,f),!d&&s.cm.display.input.needsContentAttribute&&(f||(f=s.content.appendChild(document.createElement("span"))),f.setAttribute("cm-marker",u.id)),f&&(s.cm.display.input.setUneditable(f),s.content.appendChild(f)),s.pos+=l,s.trailingSpace=!1}function AI(s,l,u){var d=s.markedSpans,f=s.text,b=0;if(!d){for(var w=1;w<u.length;w+=2)l.addToken(l,f.slice(b,b=u[w]),My(u[w+1],l.cm.options));return}for(var T=f.length,M=0,R=1,K="",J,pe,ce=0,Ee,Re,qe,Ye,nt;;){if(ce==M){Ee=Re=qe=pe="",nt=null,Ye=null,ce=1/0;for(var Ze=[],ct=void 0,It=0;It<d.length;++It){var St=d[It],tn=St.marker;if(tn.type=="bookmark"&&St.from==M&&tn.widgetNode)Ze.push(tn);else if(St.from<=M&&(St.to==null||St.to>M||tn.collapsed&&St.to==M&&St.from==M)){if(St.to!=null&&St.to!=M&&ce>St.to&&(ce=St.to,Re=""),tn.className&&(Ee+=" "+tn.className),tn.css&&(pe=(pe?pe+";":"")+tn.css),tn.startStyle&&St.from==M&&(qe+=" "+tn.startStyle),tn.endStyle&&St.to==ce&&(ct||(ct=[])).push(tn.endStyle,St.to),tn.title&&((nt||(nt={})).title=tn.title),tn.attributes)for(var zn in tn.attributes)(nt||(nt={}))[zn]=tn.attributes[zn];tn.collapsed&&(!Ye||Pg(Ye.marker,tn)<0)&&(Ye=St)}else St.from>M&&ce>St.from&&(ce=St.from)}if(ct)for(var Qi=0;Qi<ct.length;Qi+=2)ct[Qi+1]==ce&&(Re+=" "+ct[Qi]);if(!Ye||Ye.from==M)for(var pi=0;pi<Ze.length;++pi)Oy(l,0,Ze[pi]);if(Ye&&(Ye.from||0)==M){if(Oy(l,(Ye.to==null?T+1:Ye.to)-M,Ye.marker,Ye.from==null),Ye.to==null)return;Ye.to==M&&(Ye=!1)}}if(M>=T)break;for(var eo=Math.min(T,ce);;){if(K){var Nr=M+K.length;if(!Ye){var Bi=Nr>eo?K.slice(0,eo-M):K;l.addToken(l,Bi,J?J+Ee:Ee,qe,M+Bi.length==ce?Re:"",pe,nt)}if(Nr>=eo){K=K.slice(eo-M),M=eo;break}M=Nr,qe=""}K=f.slice(b,b=u[R++]),J=My(u[R++],l.cm.options)}}}function By(s,l,u){this.line=l,this.rest=SI(l),this.size=this.rest?Mn(Zt(this.rest))-u+1:1,this.node=this.text=null,this.hidden=Es(s,l)}function a0(s,l,u){for(var d=[],f,b=l;b<u;b=f){var w=new By(s.doc,Ct(s.doc,b),b);f=b+w.size,d.push(w)}return d}var Dc=null;function LI(s){Dc?Dc.ops.push(s):s.ownsGroup=Dc={ops:[s],delayedCallbacks:[]}}function RI(s){var l=s.delayedCallbacks,u=0;do{for(;u<l.length;u++)l[u].call(null);for(var d=0;d<s.ops.length;d++){var f=s.ops[d];if(f.cursorActivityHandlers)for(;f.cursorActivityCalled<f.cursorActivityHandlers.length;)f.cursorActivityHandlers[f.cursorActivityCalled++].call(null,f.cm)}}while(u<l.length)}function NI(s,l){var u=s.ownsGroup;if(u)try{RI(u)}finally{Dc=null,l(u)}}var du=null;function Wi(s,l){var u=yc(s,l);if(u.length){var d=Array.prototype.slice.call(arguments,2),f;Dc?f=Dc.delayedCallbacks:du?f=du:(f=du=[],setTimeout(PI,0));for(var b=function(T){f.push(function(){return u[T].apply(null,d)})},w=0;w<u.length;++w)b(w)}}function PI(){var s=du;du=null;for(var l=0;l<s.length;++l)s[l]()}function Ay(s,l,u,d){for(var f=0;f<l.changes.length;f++){var b=l.changes[f];b=="text"?VI(s,l):b=="gutter"?Ry(s,l,u,d):b=="class"?Hg(s,l):b=="widget"&&$I(s,l,d)}l.changes=null}function uu(s){return s.node==s.text&&(s.node=Y("div",null,null,"position: relative"),s.text.parentNode&&s.text.parentNode.replaceChild(s.node,s.text),s.node.appendChild(s.text),a&&c<8&&(s.node.style.zIndex=2)),s.node}function zI(s,l){var u=l.bgClass?l.bgClass+" "+(l.line.bgClass||""):l.line.bgClass;if(u&&(u+=" CodeMirror-linebackground"),l.background)u?l.background.className=u:(l.background.parentNode.removeChild(l.background),l.background=null);else if(u){var d=uu(l);l.background=d.insertBefore(Y("div",null,u),d.firstChild),s.display.input.setUneditable(l.background)}}function Ly(s,l){var u=s.display.externalMeasured;return u&&u.line==l.line?(s.display.externalMeasured=null,l.measure=u.measure,u.built):Fy(s,l)}function VI(s,l){var u=l.text.className,d=Ly(s,l);l.text==l.node&&(l.node=d.pre),l.text.parentNode.replaceChild(d.pre,l.text),l.text=d.pre,d.bgClass!=l.bgClass||d.textClass!=l.textClass?(l.bgClass=d.bgClass,l.textClass=d.textClass,Hg(s,l)):u&&(l.text.className=u)}function Hg(s,l){zI(s,l),l.line.wrapClass?uu(l).className=l.line.wrapClass:l.node!=l.text&&(l.node.className="");var u=l.textClass?l.textClass+" "+(l.line.textClass||""):l.line.textClass;l.text.className=u||""}function Ry(s,l,u,d){if(l.gutter&&(l.node.removeChild(l.gutter),l.gutter=null),l.gutterBackground&&(l.node.removeChild(l.gutterBackground),l.gutterBackground=null),l.line.gutterClass){var f=uu(l);l.gutterBackground=Y("div",null,"CodeMirror-gutter-background "+l.line.gutterClass,"left: "+(s.options.fixedGutter?d.fixedPos:-d.gutterTotalWidth)+"px; width: "+d.gutterTotalWidth+"px"),s.display.input.setUneditable(l.gutterBackground),f.insertBefore(l.gutterBackground,l.text)}var b=l.line.gutterMarkers;if(s.options.lineNumbers||b){var w=uu(l),T=l.gutter=Y("div",null,"CodeMirror-gutter-wrapper","left: "+(s.options.fixedGutter?d.fixedPos:-d.gutterTotalWidth)+"px");if(T.setAttribute("aria-hidden","true"),s.display.input.setUneditable(T),w.insertBefore(T,l.text),l.line.gutterClass&&(T.className+=" "+l.line.gutterClass),s.options.lineNumbers&&(!b||!b["CodeMirror-linenumbers"])&&(l.lineNumber=T.appendChild(Y("div",Og(s.options,u),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+d.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+s.display.lineNumInnerWidth+"px"))),b)for(var M=0;M<s.display.gutterSpecs.length;++M){var R=s.display.gutterSpecs[M].className,K=b.hasOwnProperty(R)&&b[R];K&&T.appendChild(Y("div",[K],"CodeMirror-gutter-elt","left: "+d.gutterLeft[R]+"px; width: "+d.gutterWidth[R]+"px"))}}}function $I(s,l,u){l.alignable&&(l.alignable=null);for(var d=re("CodeMirror-linewidget"),f=l.node.firstChild,b=void 0;f;f=b)b=f.nextSibling,d.test(f.className)&&l.node.removeChild(f);Ny(s,l,u)}function HI(s,l,u,d){var f=Ly(s,l);return l.text=l.node=f.pre,f.bgClass&&(l.bgClass=f.bgClass),f.textClass&&(l.textClass=f.textClass),Hg(s,l),Ry(s,l,u,d),Ny(s,l,d),l.node}function Ny(s,l,u){if(Py(s,l.line,l,u,!0),l.rest)for(var d=0;d<l.rest.length;d++)Py(s,l.rest[d],l,u,!1)}function Py(s,l,u,d,f){if(l.widgets)for(var b=uu(u),w=0,T=l.widgets;w<T.length;++w){var M=T[w],R=Y("div",[M.node],"CodeMirror-linewidget"+(M.className?" "+M.className:""));M.handleMouseEvents||R.setAttribute("cm-ignore-events","true"),qI(M,R,u,d),s.display.input.setUneditable(R),f&&M.above?b.insertBefore(R,u.gutter||u.text):b.appendChild(R),Wi(M,"redraw")}}function qI(s,l,u,d){if(s.noHScroll){(u.alignable||(u.alignable=[])).push(l);var f=d.wrapperWidth;l.style.left=d.fixedPos+"px",s.coverGutter||(f-=d.gutterTotalWidth,l.style.paddingLeft=d.gutterTotalWidth+"px"),l.style.width=f+"px"}s.coverGutter&&(l.style.zIndex=5,l.style.position="relative",s.noHScroll||(l.style.marginLeft=-d.gutterTotalWidth+"px"))}function pu(s){if(s.height!=null)return s.height;var l=s.doc.cm;if(!l)return 0;if(!Ae(document.body,s.node)){var u="position: relative;";s.coverGutter&&(u+="margin-left: -"+l.display.gutters.offsetWidth+"px;"),s.noHScroll&&(u+="width: "+l.display.wrapper.clientWidth+"px;"),ke(l.display.measure,Y("div",[s.node],null,u))}return s.height=s.node.parentNode.offsetHeight}function Ka(s,l){for(var u=Cc(l);u!=s.wrapper;u=u.parentNode)if(!u||u.nodeType==1&&u.getAttribute("cm-ignore-events")=="true"||u.parentNode==s.sizer&&u!=s.mover)return!0}function s0(s){return s.lineSpace.offsetTop}function qg(s){return s.mover.offsetHeight-s.lineSpace.offsetHeight}function zy(s){if(s.cachedPaddingH)return s.cachedPaddingH;var l=ke(s.measure,Y("pre","x","CodeMirror-line-like")),u=window.getComputedStyle?window.getComputedStyle(l):l.currentStyle,d={left:parseInt(u.paddingLeft),right:parseInt(u.paddingRight)};return!isNaN(d.left)&&!isNaN(d.right)&&(s.cachedPaddingH=d),d}function xa(s){return Cn-s.display.nativeBarWidth}function zl(s){return s.display.scroller.clientWidth-xa(s)-s.display.barWidth}function jg(s){return s.display.scroller.clientHeight-xa(s)-s.display.barHeight}function jI(s,l,u){var d=s.options.lineWrapping,f=d&&zl(s);if(!l.measure.heights||d&&l.measure.width!=f){var b=l.measure.heights=[];if(d){l.measure.width=f;for(var w=l.text.firstChild.getClientRects(),T=0;T<w.length-1;T++){var M=w[T],R=w[T+1];Math.abs(M.bottom-R.bottom)>2&&b.push((M.bottom+R.top)/2-u.top)}}b.push(u.bottom-u.top)}}function Vy(s,l,u){if(s.line==l)return{map:s.measure.map,cache:s.measure.cache};if(s.rest){for(var d=0;d<s.rest.length;d++)if(s.rest[d]==l)return{map:s.measure.maps[d],cache:s.measure.caches[d]};for(var f=0;f<s.rest.length;f++)if(Mn(s.rest[f])>u)return{map:s.measure.maps[f],cache:s.measure.caches[f],before:!0}}}function UI(s,l){l=Qo(l);var u=Mn(l),d=s.display.externalMeasured=new By(s.doc,l,u);d.lineN=u;var f=d.built=Fy(s,d);return d.text=f.pre,ke(s.display.lineMeasure,f.pre),d}function $y(s,l,u,d){return Ca(s,Ic(s,l),u,d)}function Ug(s,l){if(l>=s.display.viewFrom&&l<s.display.viewTo)return s.display.view[Hl(s,l)];var u=s.display.externalMeasured;if(u&&l>=u.lineN&&l<u.lineN+u.size)return u}function Ic(s,l){var u=Mn(l),d=Ug(s,u);d&&!d.text?d=null:d&&d.changes&&(Ay(s,d,u,Yg(s)),s.curOp.forceUpdate=!0),d||(d=UI(s,l));var f=Vy(d,l,u);return{line:l,view:d,rect:null,map:f.map,cache:f.cache,before:f.before,hasHeights:!1}}function Ca(s,l,u,d,f){l.before&&(u=-1);var b=u+(d||""),w;return l.cache.hasOwnProperty(b)?w=l.cache[b]:(l.rect||(l.rect=l.view.text.getBoundingClientRect()),l.hasHeights||(jI(s,l.view,l.rect),l.hasHeights=!0),w=GI(s,l,u,d),w.bogus||(l.cache[b]=w)),{left:w.left,right:w.right,top:f?w.rtop:w.top,bottom:f?w.rbottom:w.bottom}}var Hy={left:0,right:0,top:0,bottom:0};function qy(s,l,u){for(var d,f,b,w,T,M,R=0;R<s.length;R+=3)if(T=s[R],M=s[R+1],l<T?(f=0,b=1,w="left"):l<M?(f=l-T,b=f+1):(R==s.length-3||l==M&&s[R+3]>l)&&(b=M-T,f=b-1,l>=M&&(w="right")),f!=null){if(d=s[R+2],T==M&&u==(d.insertLeft?"left":"right")&&(w=u),u=="left"&&f==0)for(;R&&s[R-2]==s[R-3]&&s[R-1].insertLeft;)d=s[(R-=3)+2],w="left";if(u=="right"&&f==M-T)for(;R<s.length-3&&s[R+3]==s[R+4]&&!s[R+5].insertLeft;)d=s[(R+=3)+2],w="right";break}return{node:d,start:f,end:b,collapse:w,coverStart:T,coverEnd:M}}function WI(s,l){var u=Hy;if(l=="left")for(var d=0;d<s.length&&(u=s[d]).left==u.right;d++);else for(var f=s.length-1;f>=0&&(u=s[f]).left==u.right;f--);return u}function GI(s,l,u,d){var f=qy(l.map,u,d),b=f.node,w=f.start,T=f.end,M=f.collapse,R;if(b.nodeType==3){for(var K=0;K<4;K++){for(;w&&Wo(l.line.text.charAt(f.coverStart+w));)--w;for(;f.coverStart+T<f.coverEnd&&Wo(l.line.text.charAt(f.coverStart+T));)++T;if(a&&c<9&&w==0&&T==f.coverEnd-f.coverStart?R=b.parentNode.getBoundingClientRect():R=WI(ye(b,w,T).getClientRects(),d),R.left||R.right||w==0)break;T=w,w=w-1,M="right"}a&&c<11&&(R=KI(s.display.measure,R))}else{w>0&&(M=d="right");var J;s.options.lineWrapping&&(J=b.getClientRects()).length>1?R=J[d=="right"?J.length-1:0]:R=b.getBoundingClientRect()}if(a&&c<9&&!w&&(!R||!R.left&&!R.right)){var pe=b.parentNode.getClientRects()[0];pe?R={left:pe.left,right:pe.left+Mc(s.display),top:pe.top,bottom:pe.bottom}:R=Hy}for(var ce=R.top-l.rect.top,Ee=R.bottom-l.rect.top,Re=(ce+Ee)/2,qe=l.view.measure.heights,Ye=0;Ye<qe.length-1&&!(Re<qe[Ye]);Ye++);var nt=Ye?qe[Ye-1]:0,Ze=qe[Ye],ct={left:(M=="right"?R.right:R.left)-l.rect.left,right:(M=="left"?R.left:R.right)-l.rect.left,top:nt,bottom:Ze};return!R.left&&!R.right&&(ct.bogus=!0),s.options.singleCursorHeightPerLine||(ct.rtop=ce,ct.rbottom=Ee),ct}function KI(s,l){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!cI(s))return l;var u=screen.logicalXDPI/screen.deviceXDPI,d=screen.logicalYDPI/screen.deviceYDPI;return{left:l.left*u,right:l.right*u,top:l.top*d,bottom:l.bottom*d}}function jy(s){if(s.measure&&(s.measure.cache={},s.measure.heights=null,s.rest))for(var l=0;l<s.rest.length;l++)s.measure.caches[l]={}}function Uy(s){s.display.externalMeasure=null,fe(s.display.lineMeasure);for(var l=0;l<s.display.view.length;l++)jy(s.display.view[l])}function fu(s){Uy(s),s.display.cachedCharWidth=s.display.cachedTextHeight=s.display.cachedPaddingH=null,s.options.lineWrapping||(s.display.maxLineChanged=!0),s.display.lineNumChars=null}function Wy(s){return m&&D?-(s.body.getBoundingClientRect().left-parseInt(getComputedStyle(s.body).marginLeft)):s.defaultView.pageXOffset||(s.documentElement||s.body).scrollLeft}function Gy(s){return m&&D?-(s.body.getBoundingClientRect().top-parseInt(getComputedStyle(s.body).marginTop)):s.defaultView.pageYOffset||(s.documentElement||s.body).scrollTop}function Wg(s){var l=Qo(s),u=l.widgets,d=0;if(u)for(var f=0;f<u.length;++f)u[f].above&&(d+=pu(u[f]));return d}function l0(s,l,u,d,f){if(!f){var b=Wg(l);u.top+=b,u.bottom+=b}if(d=="line")return u;d||(d="local");var w=Ga(l);if(d=="local"?w+=s0(s.display):w-=s.display.viewOffset,d=="page"||d=="window"){var T=s.display.lineSpace.getBoundingClientRect();w+=T.top+(d=="window"?0:Gy(N(s)));var M=T.left+(d=="window"?0:Wy(N(s)));u.left+=M,u.right+=M}return u.top+=w,u.bottom+=w,u}function Ky(s,l,u){if(u=="div")return l;var d=l.left,f=l.top;if(u=="page")d-=Wy(N(s)),f-=Gy(N(s));else if(u=="local"||!u){var b=s.display.sizer.getBoundingClientRect();d+=b.left,f+=b.top}var w=s.display.lineSpace.getBoundingClientRect();return{left:d-w.left,top:f-w.top}}function c0(s,l,u,d,f){return d||(d=Ct(s.doc,l.line)),l0(s,d,$y(s,d,l.ch,f),u)}function Yo(s,l,u,d,f,b){d=d||Ct(s.doc,l.line),f||(f=Ic(s,d));function w(Ee,Re){var qe=Ca(s,f,Ee,Re?"right":"left",b);return Re?qe.left=qe.right:qe.right=qe.left,l0(s,d,qe,u)}var T=Ko(d,s.doc.direction),M=l.ch,R=l.sticky;if(M>=d.text.length?(M=d.text.length,R="before"):M<=0&&(M=0,R="after"),!T)return w(R=="before"?M-1:M,R=="before");function K(Ee,Re,qe){var Ye=T[Re],nt=Ye.level==1;return w(qe?Ee-1:Ee,nt!=qe)}var J=Is(T,M,R),pe=Ds,ce=K(M,J,R=="before");return pe!=null&&(ce.other=K(M,pe,R!="before")),ce}function Qy(s,l){var u=0;l=Gt(s.doc,l),s.options.lineWrapping||(u=Mc(s.display)*l.ch);var d=Ct(s.doc,l.line),f=Ga(d)+s0(s.display);return{left:u,right:u,top:f,bottom:f+d.height}}function Gg(s,l,u,d,f){var b=He(s,l,u);return b.xRel=f,d&&(b.outside=d),b}function Kg(s,l,u){var d=s.doc;if(u+=s.display.viewOffset,u<0)return Gg(d.first,0,null,-1,-1);var f=Pl(d,u),b=d.first+d.size-1;if(f>b)return Gg(d.first+d.size-1,Ct(d,b).text.length,null,1,1);l<0&&(l=0);for(var w=Ct(d,f);;){var T=QI(s,w,f,l,u),M=wI(w,T.ch+(T.xRel>0||T.outside>0?1:0));if(!M)return T;var R=M.find(1);if(R.line==f)return R;w=Ct(d,f=R.line)}}function Yy(s,l,u,d){d-=Wg(l);var f=l.text.length,b=Go(function(w){return Ca(s,u,w-1).bottom<=d},f,0);return f=Go(function(w){return Ca(s,u,w).top>d},b,f),{begin:b,end:f}}function Zy(s,l,u,d){u||(u=Ic(s,l));var f=l0(s,l,Ca(s,u,d),"line").top;return Yy(s,l,u,f)}function Qg(s,l,u,d){return s.bottom<=u?!1:s.top>u?!0:(d?s.left:s.right)>l}function QI(s,l,u,d,f){f-=Ga(l);var b=Ic(s,l),w=Wg(l),T=0,M=l.text.length,R=!0,K=Ko(l,s.doc.direction);if(K){var J=(s.options.lineWrapping?ZI:YI)(s,l,u,b,K,d,f);R=J.level!=1,T=R?J.from:J.to-1,M=R?J.to:J.from-1}var pe=null,ce=null,Ee=Go(function(It){var St=Ca(s,b,It);return St.top+=w,St.bottom+=w,Qg(St,d,f,!1)?(St.top<=f&&St.left<=d&&(pe=It,ce=St)