|
|
/*! For license information please see 2238.bb5d1b9f.js.LICENSE.txt */
|
|
|
(self.webpackChunk_coze_studio_app=self.webpackChunk_coze_studio_app||[]).push([["2238"],{203459:function(e,t,n){"use strict";function r(e,t={},n){n||(n=1);let{fontStyle:o=t.fontStyle,fontVariant:s=t.fontVariant,fontWeight:a=t.fontWeight,fontSize:l=t.fontSize,fontFamily:c=t.fontFamily}=e;return(o?o+" ":"")+(s?s+" ":"")+(a?a+" ":"")+l*n+"px "+(c||"sans-serif")}n.d(t,{U:function(){return r}})},373390:function(e,t,n){"use strict";n.d(t,{F:function(){return r}});let r=e=>{let t=e.charCodeAt(0),n=2===e.length?e.charCodeAt(1):0,r=t;return 55296<=t&&t<=56319&&56320<=n&&n<=57343&&(t&=1023,n&=1023,r=(t<<10|n)+65536),12288===r||65281<=r&&r<=65376||65504<=r&&r<=65510?"F":8361===r||65377<=r&&r<=65470||65474<=r&&r<=65479||65482<=r&&r<=65487||65490<=r&&r<=65495||65498<=r&&r<=65500||65512<=r&&r<=65518?"H":4352<=r&&r<=4447||4515<=r&&r<=4519||4602<=r&&r<=4607||9001<=r&&r<=9002||11904<=r&&r<=11929||11931<=r&&r<=12019||12032<=r&&r<=12245||12272<=r&&r<=12283||12289<=r&&r<=12350||12353<=r&&r<=12438||12441<=r&&r<=12543||12549<=r&&r<=12589||12593<=r&&r<=12686||12688<=r&&r<=12730||12736<=r&&r<=12771||12784<=r&&r<=12830||12832<=r&&r<=12871||12880<=r&&r<=13054||13056<=r&&r<=19903||19968<=r&&r<=42124||42128<=r&&r<=42182||43360<=r&&r<=43388||44032<=r&&r<=55203||55216<=r&&r<=55238||55243<=r&&r<=55291||63744<=r&&r<=64255||65040<=r&&r<=65049||65072<=r&&r<=65106||65108<=r&&r<=65126||65128<=r&&r<=65131||110592<=r&&r<=110593||127488<=r&&r<=127490||127504<=r&&r<=127546||127552<=r&&r<=127560||127568<=r&&r<=127569||131072<=r&&r<=194367||177984<=r&&r<=196605||196608<=r&&r<=262141?"W":32<=r&&r<=126||162<=r&&r<=163||165<=r&&r<=166||172===r||175===r||10214<=r&&r<=10221||10629<=r&&r<=10630?"Na":161===r||164===r||167<=r&&r<=168||170===r||173<=r&&r<=174||176<=r&&r<=180||182<=r&&r<=186||188<=r&&r<=191||198===r||208===r||215<=r&&r<=216||222<=r&&r<=225||230===r||232<=r&&r<=234||236<=r&&r<=237||240===r||242<=r&&r<=243||247<=r&&r<=250||252===r||254===r||257===r||273===r||275===r||283===r||294<=r&&r<=295||299===r||305<=r&&r<=307||312===r||319<=r&&r<=322||324===r||328<=r&&r<=331||333===r||338<=r&&r<=339||358<=r&&r<=359||363===r||462===r||464===r||466===r||468===r||470===r||472===r||474===r||476===r||593===r||609===r||708===r||711===r||713<=r&&r<=715||717===r||720===r||728<=r&&r<=731||733===r||735===r||768<=r&&r<=879||913<=r&&r<=929||931<=r&&r<=937||945<=r&&r<=961||963<=r&&r<=969||1025===r||1040<=r&&r<=1103||1105===r||8208===r||8211<=r&&r<=8214||8216<=r&&r<=8217||8220<=r&&r<=8221||8224<=r&&r<=8226||8228<=r&&r<=8231||8240===r||8242<=r&&r<=8243||8245===r||8251===r||8254===r||8308===r||8319===r||8321<=r&&r<=8324||8364===r||8451===r||8453===r||8457===r||8467===r||8470===r||8481<=r&&r<=8482||8486===r||8491===r||8531<=r&&r<=8532||8539<=r&&r<=8542||8544<=r&&r<=8555||8560<=r&&r<=8569||8585===r||8592<=r&&r<=8601||8632<=r&&r<=8633||8658===r||8660===r||8679===r||8704===r||8706<=r&&r<=8707||8711<=r&&r<=8712||8715===r||8719===r||8721===r||8725===r||8730===r||8733<=r&&r<=8736||8739===r||8741===r||8743<=r&&r<=8748||8750===r||8756<=r&&r<=8759||8764<=r&&r<=8765||8776===r||8780===r||8786===r||8800<=r&&r<=8801||8804<=r&&r<=8807||8810<=r&&r<=8811||8814<=r&&r<=8815||8834<=r&&r<=8835||8838<=r&&r<=8839||8853===r||8857===r||8869===r||8895===r||8978===r||9312<=r&&r<=9449||9451<=r&&r<=9547||9552<=r&&r<=9587||9600<=r&&r<=9615||9618<=r&&r<=9621||9632<=r&&r<=9633||9635<=r&&r<=9641||9650<=r&&r<=9651||9654<=r&&r<=9655||9660<=r&&r<=9661||9664<=r&&r<=9665||9670<=r&&r<=9672||9675===r||9678<=r&&r<=9681||9698<=r&&r<=9701||9711===r||9733<=r&&r<=9734||9737===r||9742<=r&&r<=9743||9748<=r&&r<=9749||9756===r||9758===r||9792===r||9794===r||9824<=r&&r<=9825||9827<=r&&r<=9829||9831<=r&&r<=9834||9836<=r&&r<=9837||9839===r||9886<=r&&r<=9887||9918<=r&&r<=9919||9924<=r&&r<=9933||9935<=r&&r<=9953||9955===r||9960<=r&&r<=9983||10045===r||10071===r||10102<=r&&r<=10111||11093<=r&&r<=11097||12872<=r&&r<=12879||57344<=r&&r<=63743||65024<=r&&r<=65039||65533===r||127232<=r&&r<=127242||127248<=r&&r<=127277||127280<=r&&r<=127337||127344<=r&&r<=127386||917760<=r&&r<=917999||983040<=r&&r<=1048573||1048576<=r&&r<=1114109?"A":"N"}},780114:function(e,t,n){"use strict";n.d(t,{Y:function(){return c}});var r,o,s=n(131045);let a="undefined"!=typeof console;function l(e,t,n){let r=[t].concat([].slice.call(n));a&&console[e].apply(console,r)}(r=o||(o={}))[r.None=0]="None",r[r.Error=1]="Error",r[r.Warn=2]="Warn",r[r.Info=3]="Info",r[r.Debug=4]="Debug";class c{static getInstance(e,t){return c._instance&&(0,s.Z)(e)?c._instance.level(e):c._instance||(c._instance=new c(e,t)),c._instance}static setInstance(e){return c._instance=e}static setInstanceLevel(e){c._instance?c._instance.level(e):c._instance=new c(e)}static clearInstance(){c._instance=null}constructor(e=o.None,t){this._onErrorHandler=[],this._level=e,this._method=t}addErrorHandler(e){this._onErrorHandler.find(t=>t===e)||this._onErrorHandler.push(e)}removeErrorHandler(e){let t=this._onErrorHandler.findIndex(t=>t===e);t<0||this._onErrorHandler.splice(t,1)}callErrorHandler(...e){this._onErrorHandler.forEach(t=>t(...e))}canLogInfo(){return this._level>=o.Info}canLogDebug(){return this._level>=o.Debug}canLogError(){return this._level>=o.Error}canLogWarn(){return this._level>=o.Warn}level(e){return arguments.length?(this._level=+e,this):this._level}error(...e){var t;return this._level>=o.Error&&(this._onErrorHandler.length?this.callErrorHandler(...e):l(null!==(t=this._method)&&void 0!==t?t:"error","ERROR",e)),this}warn(...e){return this._level>=o.Warn&&l(this._method||"warn","WARN",e),this}info(...e){return this._level>=o.Info&&l(this._method||"log","INFO",e),this}debug(...e){return this._level>=o.Debug&&l(this._method||"log","DEBUG",e),this}}c._instance=null},408345:function(e,t,n){"use strict";n.d(t,{L:function(){return r}});class r{constructor(){this.CLEAN_THRESHOLD=1e3,this.L_TIME=1e3,this.R_COUNT=1,this.R_TIMESTAMP_MAX_SIZE=20}clearCache(e,t){let{CLEAN_THRESHOLD:n=this.CLEAN_THRESHOLD,L_TIME:r=this.L_TIME,R_COUNT:o=this.R_COUNT}=t;if(e.size<n)return 0;let s=0,a=t=>{s++,e.delete(t)},l=Date.now();return e.forEach((e,t)=>{if(e.timestamp.length<o)return a(t);let n=0;for(;l-e.timestamp[e.timestamp.length-1-n]<r&&!(++n>=o););if(n<o)return a(t);for(;l-e.timestamp[0]>r;)e.timestamp.shift()}),s}addLimitedTimestamp(e,t,n){let{R_TIMESTAMP_MAX_SIZE:r=this.R_TIMESTAMP_MAX_SIZE}=n;e.timestamp.length>r&&e.timestamp.shift(),e.timestamp.push(t)}clearTimeStamp(e,t){let{L_TIME:n=this.L_TIME}=t,r=Date.now();e.forEach(e=>{for(;r-e.timestamp[0]>n;)e.timestamp.shift()})}clearItemTimestamp(e,t){let{L_TIME:n=this.L_TIME}=t,r=Date.now();for(;r-e.timestamp[0]>n;)e.timestamp.shift()}}},791228:function(e,t,n){"use strict";n.d(t,{BZ:function(){return a},Bw:function(){return w},Fp:function(){return p},Ho:function(){return r},KU:function(){return y},Kh:function(){return v},O$:function(){return f},VV:function(){return h},Wn:function(){return c},ZR:function(){return b},_b:function(){return m},f7:function(){return l},fv:function(){return u},i4:function(){return S},ir:function(){return x},mC:function(){return d},ou:function(){return s},pi:function(){return o},sQ:function(){return g}});let r=1e-12,o=Math.PI,s=o/2,a=2*o,l=2*Math.PI,c=Math.abs,u=Math.atan2,d=Math.cos,p=Math.max,h=Math.min,f=Math.sin,m=Math.sqrt,g=Math.pow;function v(e){return e>1?0:e<-1?o:Math.acos(e)}function b(e){return e>=1?s:e<=-1?-s:Math.asin(e)}function y(e,t,n,r,o){let s=n,a=r;return"number"==typeof e&&"number"==typeof n&&(s=(1-o)*e+o*n),"number"==typeof t&&"number"==typeof r&&(a=(1-o)*t+o*r),{x:s,y:a}}function x(e,t){return e[0]*t[1]-e[1]*t[0]}function w(e,t){return c(e[0]-t[0])+c(e[1]-t[1])<1e-12}function S(e){let t=e.toString().split(/[eE]/),n=(t[0].split(".")[1]||"").length-(+t[1]||0);return n>0?n:0}},510227:function(e,t,n){"use strict";n.d(t,{o:function(){return a}});var r=n(269658),o=n(464283),s=n(200007);function a(e){if((0,r.Z)(e))return[e,e,e,e];if((0,o.Z)(e)){let t=e.length;if(1===t){let t=e[0];return[t,t,t,t]}if(2===t){let[t,n]=e;return[t,n,t,n]}if(3===t){let[t,n,r]=e;return[t,n,r,n]}if(4===t)return e}if((0,s.Z)(e)){let{top:t=0,right:n=0,bottom:r=0,left:o=0}=e;return[t,n,r,o]}return[0,0,0,0]}},11959:function(e,t,n){"use strict";n.d(t,{En:function(){return m},Hr:function(){return g},bt:function(){return v},sx:function(){return s},vh:function(){return f},xL:function(){return h}});var r=n(906324),o=n(824100);function s(e){return e?"getUTCFullYear":"getFullYear"}function a(e){return e?"getUTCMonth":"getMonth"}function l(e){return e?"getUTCDate":"getDate"}function c(e){return e?"getUTCHours":"getHours"}function u(e){return e?"getUTCMinutes":"getMinutes"}function d(e){return e?"getUTCSeconds":"getSeconds"}function p(e){return e?"getUTCMilliseconds":"getMilliseconds"}function h(e){return e?"setUTCFullYear":"setFullYear"}function f(e){return e?"setUTCMonth":"setMonth"}function m(e){return e?"setUTCHours":"setHours"}function g(e,t){let n=(0,o.Z)(e),r=n[a(t)]()+1,s=n[l(t)](),h=n[c(t)](),f=n[u(t)](),m=n[d(t)](),g=0===n[p(t)](),v=g&&0===m,b=v&&0===f,y=b&&0===h,x=y&&1===s;return x&&1===r?"YYYY":x?"YYYY-MM":y?"YYYY-MM-DD":b?"HH":v?"HH:mm":g?"HH:mm:ss":"HH:mm:ss SSS"}function v(e,t){return n=>{let h=(0,o.Z)(n),f=h[s(t)](),m=h[a(t)]()+1,g=Math.floor((m-1)/3)+1,v=h[l(t)](),b=h["get"+(t?"UTC":"")+"Day"](),y=h[c(t)](),x=(y-1)%12+1,w=h[u(t)](),S=h[d(t)](),k=h[p(t)]();return(e||"").replace(/YYYY/g,(0,r.Z)(f+"",4,"0","left")).replace(/yyyy/g,f+"").replace(/yy/g,f%100+"").replace(/Q/g,g+"").replace(/MM/g,(0,r.Z)(m,2,"0","left")).replace(/M/g,m+"").replace(/dd/g,(0,r.Z)(v,2,"0","left")).replace(/d/g,v+"").replace(/e/g,b+"").replace(/HH/g,(0,r.Z)(y,2,"0","left")).replace(/H/g,y+"").replace(/hh/g,(0,r.Z)(x+"",2,"0","left")).replace(/h/g,x+"").replace(/mm/g,(0,r.Z)(w,2,"0","left")).replace(/m/g,w+"").replace(/ss/g,(0,r.Z)(S,2,"0","left")).replace(/s/g,S+"").replace(/SSS/g,(0,r.Z)(k,3,"0","left")).replace(/S/g,k+"")}}},156597:function(e,t,n){"use strict";n.d(t,{EB:function(){return o},OU:function(){return ei},Rd:function(){return ea},fQ:function(){return es},kr:function(){return s},oP:function(){return c},sh:function(){return r},vc:function(){return l},x4:function(){return a}});let r=1e3,o=6e4,s=36e5,a=864e5,l=26784e5,c=31536e6,u=e=>(e.setMonth(0,1),e.setHours(0,0,0,0),e),d=(e,t)=>(e.setFullYear(e.getFullYear()+t),e),p=(e,t)=>t.getFullYear()-e.getFullYear(),h=e=>e.getFullYear(),f=e=>(e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0),e),m=(e,t)=>(e.setUTCFullYear(e.getUTCFullYear()+t),e),g=(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),v=e=>e.getUTCFullYear(),b=e=>(e.setDate(1),e.setHours(0,0,0,0),e),y=(e,t)=>(e.setMonth(e.getMonth()+t),e),x=(e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear()),w=e=>e.getMonth(),S=e=>(e.setUTCDate(1),e.setUTCHours(0,0,0,0),e),k=(e,t)=>(e.setUTCMonth(e.getUTCMonth()+t),e),A=(e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear()),C=e=>e.getUTCMonth(),E=e=>(e.setHours(0,0,0,0),e),T=(e,t)=>(e.setDate(e.getDate()+t),e),_=(e,t)=>(+t-+e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/a,O=e=>e.getDate()-1,M=e=>(e.setUTCHours(0,0,0,0),e),I=(e,t)=>(e.setUTCDate(e.getUTCDate()+t),e),P=(e,t)=>(+t-+e)/a,D=e=>e.getUTCDate()-1,N=e=>(e.setTime(+e-e.getMilliseconds()-1e3*e.getSeconds()-6e4*e.getMinutes()),e),R=(e,t)=>(e.setHours(e.getHours()+t),e),L=(e,t)=>(+t-+e)/s,j=e=>e.getHours(),$=e=>(e.setTime(+e-e.getUTCMilliseconds()-1e3*e.getUTCSeconds()-6e4*e.getUTCMinutes()),e),F=(e,t)=>(e.setUTCHours(e.getUTCHours()+t),e),z=e=>e.getUTCHours(),B=e=>(e.setTime(+e-e.getMilliseconds()-1e3*e.getSeconds()),e),H=(e,t)=>(e.setMinutes(e.getMinutes()+t),e),U=(e,t)=>(+t-+e)/6e4,V=e=>e.getMinutes(),q=e=>(e.setTime(+e-e.getUTCMilliseconds()-1e3*e.getUTCSeconds()),e),W=(e,t)=>(e.setUTCMinutes(e.getUTCMinutes()+t),e),G=e=>e.getUTCMinutes(),K=e=>(e.setTime(+e-e.getMilliseconds()),e),Y=(e,t)=>(e.setSeconds(e.getSeconds()+t),e),Z=(e,t)=>(+t-+e)/1e3,J=e=>e.getSeconds(),X=e=>(e.setTime(+e-e.getUTCMilliseconds()),e),Q=(e,t)=>(e.setUTCSeconds(e.getUTCSeconds()+t),e),ee=e=>e.getUTCSeconds(),et=e=>e,en=(e,t)=>(e.setTime(+e+t),e),er=(e,t)=>+t-+e,ei=(e,t)=>n=>{let r=new Date(+n-1);return t(r,1),e(r),r},eo=(e,t)=>(n,r)=>{let o=new Date,s=new Date;return o.setTime(+n),s.setTime(+r),e(o),e(s),Math.floor(t(o,s))},es=(e,{floor:t,offset:n,field:r,count:o})=>{let s=Math.floor(e);if(!Number.isFinite(s)||s<=0)return null;if(s<=1)return{floor:t,offset:n,ceil:ei(t,n)};let a=eo(t,o),l=r?e=>r(e)%s==0:e=>a(0,e)%s==0,c=e=>{if(!Number.isNaN(+e))for(t(e);!l(e);)e.setTime(+e-1),t(e);return e},u=(e,t)=>{if(!Number.isNaN(+e)){if(s<0)for(;++t<=0;)for(n(e,-1);!l(e);)n(e,-1);else for(;--t>=0;)for(n(e,1);!l(e);)n(e,1)}return e};return{floor:c,offset:u,ceil:ei(c,u)}},ea=(e,t)=>"year"===e&&t?{floor:f,offset:m,count:g,field:v}:"month"===e&&t?{floor:S,offset:k,count:A,field:C}:"day"===e&&t?{floor:M,offset:I,count:P,field:D}:"hour"===e&&t?{floor:$,offset:F,count:L,field:z}:"minute"===e&&t?{floor:q,offset:W,count:U,field:G}:"second"===e&&t?{floor:X,offset:Q,count:Z,field:ee}:"year"===e?{floor:u,offset:d,count:p,field:h}:"month"===e?{floor:b,offset:y,count:x,field:w}:"day"===e?{floor:E,offset:T,count:_,field:O}:"hour"===e?{floor:N,offset:R,count:L,field:j}:"minute"===e?{floor:B,offset:H,count:U,field:V}:"second"===e?{floor:K,offset:Y,count:Z,field:J}:{floor:et,offset:en,count:er}},373132:function(e,t,n){"use strict";n.d(t,{t:function(){return function e(...t){let n,o,a;let l=t[0];if("string"==typeof l)n=l,o=l,t.splice(0,1),a=t&&"object"==typeof t[0]?t[0]:t;else if(l instanceof Array){let n=t.slice(1);if(l.length!==n.length+1)throw Error("expected a string as the first argument to l10n.t");let r=l[0];for(let e=1;e<l.length;e++)r+=`{${e-1}}`+l[e];return e(r,...n)}else n=o=l.message,l.comment&&l.comment.length>0&&(n+=`/${Array.isArray(l.comment)?l.comment.join(""):l.comment}`),a=l.args??{};let c=r?.[n];return c?"string"==typeof c?s(c,a):c.comment?s(c.message,a):s(o,a):s(o,a)}}});var r,o=/{([^}]+)}/g;function s(e,t){return 0===Object.keys(t).length?e:e.replace(o,(e,n)=>t[n]??e)}},989957:function(e,t,n){"use strict";var r=n(130001),o=n(455069),s=n(750274);t.Z=function(e,t){(0,o.useEffect)(function(){var t=e(),n=!1;return!function(){(0,r.mG)(this,void 0,void 0,function(){return(0,r.Jh)(this,function(e){switch(e.label){case 0:var r;if(r=t,!(0,s.mf)(r[Symbol.asyncIterator]))return[3,4];e.label=1;case 1:return[4,t.next()];case 2:if(e.sent().done||n)return[3,3];return[3,1];case 3:return[3,6];case 4:return[4,t];case 5:e.sent(),e.label=6;case 6:return[2]}})})}(),function(){n=!0}},t)}},570374:function(e,t,n){"use strict";var r=n(334131),o=n(364769),s=n(444479);t.Z=function(e,t,n){void 0===n&&(n={});var a=(0,s.Z)(e);(0,o.Z)(function(){var e=(0,r.n)(t);if(!!e){var o=new MutationObserver(a.current);return o.observe(e,n),function(){null==o||o.disconnect()}}},[n],t)}},251096:function(e,t,n){"use strict";var r=n(130001),o=n(43917),s=n(444479),a=n(334131),l=n(242681);t.Z=function(e,t){void 0===t&&(t=function(){return!0});var n=(0,r.CR)((0,o.Z)(),2),c=n[0],u=n[1],d=(0,s.Z)(t);return(0,l.Z)(function(){var t=(0,a.n)(e,document);if(!!t){var n=function(){var e;t===document?document.scrollingElement?e={left:document.scrollingElement.scrollLeft,top:document.scrollingElement.scrollTop}:e={left:Math.max(window.pageXOffset,document.documentElement.scrollLeft,document.body.scrollLeft),top:Math.max(window.pageYOffset,document.documentElement.scrollTop,document.body.scrollTop)}:e={left:t.scrollLeft,top:t.scrollTop},d.current(e)&&u(e)};return n(),t.addEventListener("scroll",n),function(){t.removeEventListener("scroll",n)}}},[],e),c}},617039:function(e,t,n){"use strict";var r=n(130001),o=n(455069),s=n(810981),a=n(136515);t.Z=function(e,t,n){var l=(0,r.CR)((0,o.useState)({}),2),c=l[0],u=l[1],d=(0,s.Z)(function(){u({})},n).run;(0,o.useEffect)(function(){return d()},t),(0,a.Z)(e,[c])}},687015:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;let r=n(658922),o=n(555660),s=n(165463),a=n(613917),l=["/properties"],c="http://json-schema.org/draft-07/schema";class u extends r.default{_addVocabularies(){super._addVocabularies(),o.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(a,l):a;this.addMetaSchema(e,c,!1),this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}e.exports=t=u,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var d=n(95721);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var p=n(786712);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return p._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return p.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return p.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return p.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return p.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return p.CodeGen}});var h=n(205767);Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return h.default}});var f=n(10333);Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return f.default}})},539762:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class n{}t._CodeOrName=n,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends n{constructor(e){if(super(),!t.IDENTIFIER.test(e))throw Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=r;class o extends n{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce((e,t)=>`${e}${t}`,"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce((e,t)=>(t instanceof r&&(e[t.str]=(e[t.str]||0)+1),e),{})}}function s(e,...t){let n=[e[0]],r=0;for(;r<t.length;)c(n,t[r]),n.push(e[++r]);return new o(n)}t._Code=o,t.nil=new o(""),t._=s;let a=new o("+");function l(e,...t){let n=[u(e[0])],s=0;for(;s<t.length;)n.push(a),c(n,t[s]),n.push(a,u(e[++s]));return function(e){let t=1;for(;t<e.length-1;){if(e[t]===a){let n=function(e,t){if('""'===t)return e;if('""'===e)return t;if("string"==typeof e)return t instanceof r||'"'!==e[e.length-1]?void 0:"string"!=typeof t?`${e.slice(0,-1)}${t}"`:'"'===t[0]?e.slice(0,-1)+t.slice(1):void 0;if("string"==typeof t&&'"'===t[0]&&!(e instanceof r))return`"${e}${t.slice(1)}`}(e[t-1],e[t+1]);if(void 0!==n){e.splice(t-1,3,n);continue}e[t++]="+"}t++}}(n),new o(n)}function c(e,t){t instanceof o?e.push(...t._items):t instanceof r?e.push(t):e.push(function(e){return"number"==typeof e||"boolean"==typeof e||null===e?e:u(Array.isArray(e)?e.join(","):e)}(t))}t.str=l,t.addCodeArg=c;t.strConcat=function(e,t){return t.emptyStr()?e:e.emptyStr()?t:l`${e}${t}`};function u(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.stringify=function(e){return new o(u(e))},t.safeStringify=u;t.getProperty=function(e){return"string"==typeof e&&t.IDENTIFIER.test(e)?new o(`.${e}`):s`[${e}]`};t.getEsmExportName=function(e){if("string"==typeof e&&t.IDENTIFIER.test(e))return new o(`${e}`);throw Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)};t.regexpCode=function(e){return new o(e.toString())}},786712:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;let r=n(539762),o=n(725566);var s=n(539762);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return s._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return s.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return s.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return s.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return s.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return s.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return s.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return s.Name}});var a=n(725566);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return a.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return a.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return a.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return a.varKinds}}),t.operators={GT:new r._Code(">"),GTE:new r._Code(">="),LT:new r._Code("<"),LTE:new r._Code("<="),EQ:new r._Code("==="),NEQ:new r._Code("!=="),NOT:new r._Code("!"),OR:new r._Code("||"),AND:new r._Code("&&"),ADD:new r._Code("+")};class l{optimizeNodes(){return this}optimizeNames(e,t){return this}}class c extends l{constructor(e,t,n){super(),this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){let n=e?o.varKinds.var:this.varKind,r=void 0===this.rhs?"":` = ${this.rhs}`;return`${n} ${this.name}${r};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=P(this.rhs,e,t)),this}get names(){return this.rhs instanceof r._CodeOrName?this.rhs.names:{}}}class u extends l{constructor(e,t,n){super(),this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof r.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=P(this.rhs,e,t),this}get names(){return I(this.lhs instanceof r.Name?{}:{...this.lhs.names},this.rhs)}}class d extends u{constructor(e,t,n,r){super(e,n,r),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class p extends l{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class h extends l{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){let t=this.label?` ${this.label}`:"";return`break${t};`+e}}class f extends l{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class m extends l{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=P(this.code,e,t),this}get names(){return this.code instanceof r._CodeOrName?this.code.names:{}}}class g extends l{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,n)=>t+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let n=e[t].optimizeNodes();Array.isArray(n)?e.splice(t,1,...n):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:n}=this,r=n.length;for(;r--;){let o=n[r];if(!o.optimizeNames(e,t))(function(e,t){for(let n in t)e[n]=(e[n]||0)-(t[n]||0)})(e,o.names),n.splice(r,1)}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>M(e,t.names),{})}}class v extends g{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class b extends g{}class y extends v{}y.kind="else";class x extends v{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){let e=t.optimizeNodes();t=this.else=Array.isArray(e)?new y(e):e}if(t)return!1===e?t instanceof x?t:t.nodes:this.nodes.length?this:new x(D(e),t instanceof x?[t]:t.nodes);if(!1!==e&&this.nodes.length)return this}optimizeNames(e,t){var n;if(this.else=null===(n=this.else)||void 0===n?void 0:n.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=P(this.condition,e,t),this}get names(){let e=super.names;return I(e,this.condition),this.else&&M(e,this.else.names),e}}x.kind="if";class w extends v{}w.kind="for";class S extends w{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=P(this.iteration,e,t),this}get names(){return M(super.names,this.iteration.names)}}class k extends w{constructor(e,t,n,r){super(),this.varKind=e,this.name=t,this.from=n,this.to=r}render(e){let t=e.es5?o.varKinds.var:this.varKind,{name:n,from:r,to:s}=this;return`for(${t} ${n}=${r}; ${n}<${s}; ${n}++)`+super.render(e)}get names(){let e=I(super.names,this.from);return I(e,this.to)}}class A extends w{constructor(e,t,n,r){super(),this.loop=e,this.varKind=t,this.name=n,this.iterable=r}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=P(this.iterable,e,t),this}get names(){return M(super.names,this.iterable.names)}}class C extends v{constructor(e,t,n){super(),this.name=e,this.args=t,this.async=n}render(e){let t=this.async?"async ":"";return`${t}function ${this.name}(${this.args})`+super.render(e)}}C.kind="func";class E extends g{render(e){return"return "+super.render(e)}}E.kind="return";class T extends v{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var n,r;return super.optimizeNames(e,t),null===(n=this.catch)||void 0===n||n.optimizeNames(e,t),null===(r=this.finally)||void 0===r||r.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&M(e,this.catch.names),this.finally&&M(e,this.finally.names),e}}class _ extends v{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}_.kind="catch";class O extends v{render(e){return"finally"+super.render(e)}}O.kind="finally";function M(e,t){for(let n in t)e[n]=(e[n]||0)+(t[n]||0);return e}function I(e,t){return t instanceof r._CodeOrName?M(e,t.names):e}function P(e,t,n){if(e instanceof r.Name)return o(e);if(!function(e){return e instanceof r._Code&&e._items.some(e=>e instanceof r.Name&&1===t[e.str]&&void 0!==n[e.str])}(e))return e;return new r._Code(e._items.reduce((e,t)=>(t instanceof r.Name&&(t=o(t)),t instanceof r._Code?e.push(...t._items):e.push(t),e),[]));function o(e){let r=n[e.str];return void 0===r||1!==t[e.str]?e:(delete t[e.str],r)}}t.CodeGen=class e{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new o.Scope({parent:e}),this._nodes=[new b]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,n,r){let o=this._scope.toName(t);return void 0!==n&&r&&(this._constants[o.str]=n),this._leafNode(new c(e,o,n)),o}const(e,t,n){return this._def(o.varKinds.const,e,t,n)}let(e,t,n){return this._def(o.varKinds.let,e,t,n)}var(e,t,n){return this._def(o.varKinds.var,e,t,n)}assign(e,t,n){return this._leafNode(new u(e,t,n))}add(e,n){return this._leafNode(new d(e,t.operators.ADD,n))}code(e){return"function"==typeof e?e():e!==r.nil&&this._leafNode(new m(e)),this}object(...e){let t=["{"];for(let[n,o]of e)t.length>1&&t.push(","),t.push(n),(n!==o||this.opts.es5)&&(t.push(":"),(0,r.addCodeArg)(t,o));return t.push("}"),new r._Code(t)}if(e,t,n){if(this._blockNode(new x(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new x(e))}else(){return this._elseNode(new y)}endIf(){return this._endBlockNode(x,y)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new S(e),t)}forRange(e,t,n,r,s=this.opts.es5?o.varKinds.var:o.varKinds.let){let a=this._scope.toName(e);return this._for(new k(s,a,t,n),()=>r(a))}forOf(e,t,n,s=o.varKinds.const){let a=this._scope.toName(e);if(this.opts.es5){let e=t instanceof r.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,r._)`${e}.length`,t=>{this.var(a,(0,r._)`${e}[${t}]`),n(a)})}return this._for(new A("of",s,a,t),()=>n(a))}forIn(e,t,n,s=this.opts.es5?o.varKinds.var:o.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,r._)`Object.keys(${t})`,n);let a=this._scope.toName(e);return this._for(new A("in",s,a,t),()=>n(a))}endFor(){return this._endBlockNode(w)}label(e){return this._leafNode(new p(e))}break(e){return this._leafNode(new h(e))}return(e){let t=new E;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(E)}try(e,t,n){if(!t&&!n)throw Error('CodeGen: "try" without "catch" and "finally"');let r=new T;if(this._blockNode(r),this.code(e),t){let e=this.name("e");this._currNode=r.catch=new _(e),t(e)}return n&&(this._currNode=r.finally=new O,this.code(n)),this._endBlockNode(_,O)}throw(e){return this._leafNode(new f(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){let t=this._blockStarts.pop();if(void 0===t)throw Error("CodeGen: not in self-balancing block");let n=this._nodes.length-t;if(n<0||void 0!==e&&n!==e)throw Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=r.nil,n,o){return this._blockNode(new C(e,t,n)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(C)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof x))throw Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}};function D(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:(0,r._)`!${j(e)}`}t.not=D;let N=L(t.operators.AND);t.and=function(...e){return e.reduce(N)};let R=L(t.operators.OR);function L(e){return(t,n)=>t===r.nil?n:n===r.nil?t:(0,r._)`${j(t)} ${e} ${j(n)}`}function j(e){return e instanceof r.Name?e:(0,r._)`(${e})`}t.or=function(...e){return e.reduce(R)}},725566:function(e,t,n){"use strict";var r,o;Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;let s=n(539762);class a extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}(o=r=t.UsedValueState||(t.UsedValueState={}))[o.Started=0]="Started",o[o.Completed=1]="Completed",t.varKinds={const:new s.Name("const"),let:new s.Name("let"),var:new s.Name("var")};class l{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof s.Name?e:this.name(e)}name(e){return new s.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,n;if((null===(n=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===n?void 0:n.has(e))||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}t.Scope=l;class c extends s.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:n}){this.value=e,this.scopePath=(0,s._)`.${new s.Name(t)}[${n}]`}}t.ValueScopeName=c;let u=(0,s._)`\n`;t.ValueScope=class e extends l{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?u:s.nil}}get(){return this._scope}name(e){return new c(e,this._newName(e))}value(e,t){var n;if(void 0===t.ref)throw Error("CodeGen: ref must be passed in value");let r=this.toName(e),{prefix:o}=r,s=null!==(n=t.key)&&void 0!==n?n:t.ref,a=this._values[o];if(a){let e=a.get(s);if(e)return e}else a=this._values[o]=new Map;a.set(s,r);let l=this._scope[o]||(this._scope[o]=[]),c=l.length;return l[c]=t.ref,r.setValue(t,{property:o,itemIndex:c}),r}getValue(e,t){let n=this._values[e];if(n)return n.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,t=>{if(void 0===t.scopePath)throw Error(`CodeGen: name "${t}" has no value`);return(0,s._)`${e}${t.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,e=>{if(void 0===e.value)throw Error(`CodeGen: name "${e}" has no value`);return e.value.code},t,n)}_reduceValues(e,n,o={},l){let c=s.nil;for(let u in e){let d=e[u];if(!d)continue;let p=o[u]=o[u]||new Map;d.forEach(e=>{if(p.has(e))return;p.set(e,r.Started);let o=n(e);if(o){let n=this.opts.es5?t.varKinds.var:t.varKinds.const;c=(0,s._)`${c}${n} ${e} = ${o};${this.opts._n}`}else if(o=null==l?void 0:l(e))c=(0,s._)`${c}${o}${this.opts._n}`;else throw new a(e);p.set(e,r.Completed)})}return c}}},248014:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;let r=n(786712),o=n(22281),s=n(834496);t.keywordError={message:({keyword:e})=>(0,r.str)`must pass "${e}" keyword validation`},t.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,r.str)`"${e}" keyword must be ${t} ($data)`:(0,r.str)`"${e}" keyword is invalid ($data)`};t.reportError=function(e,n=t.keywordError,o,s){let{it:c}=e,{gen:d,compositeRule:p,allErrors:h}=c,f=u(e,n,o);(null!=s?s:p||h)?a(d,f):l(c,(0,r._)`[${f}]`)};t.reportExtraError=function(e,n=t.keywordError,r){let{it:o}=e,{gen:c,compositeRule:d,allErrors:p}=o;a(c,u(e,n,r)),!(d||p)&&l(o,s.default.vErrors)};t.resetErrorsCount=function(e,t){e.assign(s.default.errors,t),e.if((0,r._)`${s.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,r._)`${s.default.vErrors}.length`,t),()=>e.assign(s.default.vErrors,null)))};function a(e,t){let n=e.const("err",t);e.if((0,r._)`${s.default.vErrors} === null`,()=>e.assign(s.default.vErrors,(0,r._)`[${n}]`),(0,r._)`${s.default.vErrors}.push(${n})`),e.code((0,r._)`${s.default.errors}++`)}function l(e,t){let{gen:n,validateName:o,schemaEnv:s}=e;s.$async?n.throw((0,r._)`new ${e.ValidationError}(${t})`):(n.assign((0,r._)`${o}.errors`,t),n.return(!1))}t.extendErrors=function({gen:e,keyword:t,schemaValue:n,data:o,errsCount:a,it:l}){if(void 0===a)throw Error("ajv implementation error");let c=e.name("err");e.forRange("i",a,s.default.errors,a=>{e.const(c,(0,r._)`${s.default.vErrors}[${a}]`),e.if((0,r._)`${c}.instancePath === undefined`,()=>e.assign((0,r._)`${c}.instancePath`,(0,r.strConcat)(s.default.instancePath,l.errorPath))),e.assign((0,r._)`${c}.schemaPath`,(0,r.str)`${l.errSchemaPath}/${t}`),l.opts.verbose&&(e.assign((0,r._)`${c}.schema`,n),e.assign((0,r._)`${c}.data`,o))})};let c={keyword:new r.Name("keyword"),schemaPath:new r.Name("schemaPath"),params:new r.Name("params"),propertyName:new r.Name("propertyName"),message:new r.Name("message"),schema:new r.Name("schema"),parentSchema:new r.Name("parentSchema")};function u(e,t,n){let{createErrors:a}=e.it;return!1===a?(0,r._)`{}`:function(e,t,n={}){let{gen:a,it:l}=e,u=[function({errorPath:e},{instancePath:t}){let n=t?(0,r.str)`${e}${(0,o.getErrorPath)(t,o.Type.Str)}`:e;return[s.default.instancePath,(0,r.strConcat)(s.default.instancePath,n)]}(l,n),function({keyword:e,it:{errSchemaPath:t}},{schemaPath:n,parentSchema:s}){let a=s?t:(0,r.str)`${t}/${e}`;return n&&(a=(0,r.str)`${a}${(0,o.getErrorPath)(n,o.Type.Str)}`),[c.schemaPath,a]}(e,n)];return function(e,{params:t,message:n},o){let{keyword:a,data:l,schemaValue:u,it:d}=e,{opts:p,propertyName:h,topSchemaRef:f,schemaPath:m}=d;o.push([c.keyword,a],[c.params,"function"==typeof t?t(e):t||(0,r._)`{}`]),p.messages&&o.push([c.message,"function"==typeof n?n(e):n]),p.verbose&&o.push([c.schema,u],[c.parentSchema,(0,r._)`${f}${m}`],[s.default.data,l]),h&&o.push([c.propertyName,h])}(e,t,u),a.object(...u)}(e,t,n)}},43261:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;let r=n(786712),o=n(205767),s=n(834496),a=n(96531),l=n(22281),c=n(95721);class u{constructor(e){var t;let n;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:(0,a.normalizeId)(null==n?void 0:n[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==n?void 0:n.$async,this.refs={}}}function d(e){let t,n;let l=h.call(this,e);if(l)return l;let u=(0,a.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:d,lines:p}=this.opts.code,{ownProperties:f}=this.opts,m=new r.CodeGen(this.scope,{es5:d,lines:p,ownProperties:f});e.$async&&(t=m.scopeValue("Error",{ref:o.default,code:(0,r._)`require("ajv/dist/runtime/validation_error").default`}));let g=m.scopeName("validate");e.validateName=g;let v={gen:m,allErrors:this.opts.allErrors,data:s.default.data,parentData:s.default.parentData,parentDataProperty:s.default.parentDataProperty,dataNames:[s.default.data],dataPathArr:[r.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:m.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,r.stringify)(e.schema)}:{ref:e.schema}),validateName:g,ValidationError:t,schema:e.schema,schemaEnv:e,rootId:u,baseId:e.baseId||u,schemaPath:r.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,r._)`""`,opts:this.opts,self:this};try{this._compilations.add(e),(0,c.validateFunctionCode)(v),m.optimize(this.opts.code.optimize);let t=m.toString();n=`${m.scopeRefs(s.default.scope)}return ${t}`,this.opts.code.process&&(n=this.opts.code.process(n,e));let o=Function(`${s.default.self}`,`${s.default.scope}`,n)(this,this.scope.get());if(this.scope.value(g,{ref:o}),o.errors=null,o.schema=e.schema,o.schemaEnv=e,e.$async&&(o.$async=!0),!0===this.opts.code.source&&(o.source={validateName:g,validateCode:t,scopeValues:m._values}),this.opts.unevaluated){let{props:e,items:t}=v;o.evaluated={props:e instanceof r.Name?void 0:e,items:t instanceof r.Name?void 0:t,dynamicProps:e instanceof r.Name,dynamicItems:t instanceof r.Name},o.source&&(o.source.evaluated=(0,r.stringify)(o.evaluated))}return e.validate=o,e}catch(t){throw delete e.validate,delete e.validateName,n&&this.logger.error("Error compiling schema, function code:",n),t}finally{this._compilations.delete(e)}}t.SchemaEnv=u,t.compileSchema=d;function p(e){return(0,a.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:d.call(this,e)}function h(e){for(let t of this._compilations)if(function(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}(t,e))return t}t.resolveRef=function(e,t,n){var r;n=(0,a.resolveUrl)(this.opts.uriResolver,t,n);let o=e.refs[n];if(o)return o;let s=f.call(this,e,n);if(void 0===s){let o=null===(r=e.localRefs)||void 0===r?void 0:r[n],{schemaId:a}=this.opts;o&&(s=new u({schema:o,schemaId:a,root:e,baseId:t}))}if(void 0!==s)return e.refs[n]=p.call(this,s)},t.getCompilingSchema=h;function f(e,t){let n;for(;"string"==typeof(n=this.refs[t]);)t=n;return n||this.schemas[t]||m.call(this,e,t)}function m(e,t){let n=this.opts.uriResolver.parse(t),r=(0,a._getFullPath)(this.opts.uriResolver,n),o=(0,a.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&r===o)return v.call(this,n,e);let s=(0,a.normalizeId)(r),l=this.refs[s]||this.schemas[s];if("string"==typeof l){let t=m.call(this,e,l);if("object"!=typeof(null==t?void 0:t.schema))return;return v.call(this,n,t)}if("object"==typeof(null==l?void 0:l.schema)){if(!l.validate&&d.call(this,l),s===(0,a.normalizeId)(t)){let{schema:t}=l,{schemaId:n}=this.opts,r=t[n];return r&&(o=(0,a.resolveUrl)(this.opts.uriResolver,o,r)),new u({schema:t,schemaId:n,root:e,baseId:o})}return v.call(this,n,l)}}t.resolveSchema=m;let g=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function v(e,{baseId:t,schema:n,root:r}){var o;let s;if((null===(o=e.fragment)||void 0===o?void 0:o[0])!=="/")return;for(let r of e.fragment.slice(1).split("/")){if("boolean"==typeof n)return;let e=n[(0,l.unescapeFragment)(r)];if(void 0===e)return;let o="object"==typeof(n=e)&&n[this.opts.schemaId];!g.has(r)&&o&&(t=(0,a.resolveUrl)(this.opts.uriResolver,t,o))}if("boolean"!=typeof n&&n.$ref&&!(0,l.schemaHasRulesButRef)(n,this.RULES)){let e=(0,a.resolveUrl)(this.opts.uriResolver,t,n.$ref);s=m.call(this,r,e)}let{schemaId:c}=this.opts;if((s=s||new u({schema:n,schemaId:c,root:r,baseId:t})).schema!==s.root.schema)return s}},834496:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=n(786712),o={data:new r.Name("data"),valCxt:new r.Name("valCxt"),instancePath:new r.Name("instancePath"),parentData:new r.Name("parentData"),parentDataProperty:new r.Name("parentDataProperty"),rootData:new r.Name("rootData"),dynamicAnchors:new r.Name("dynamicAnchors"),vErrors:new r.Name("vErrors"),errors:new r.Name("errors"),this:new r.Name("this"),self:new r.Name("self"),scope:new r.Name("scope"),json:new r.Name("json"),jsonPos:new r.Name("jsonPos"),jsonLen:new r.Name("jsonLen"),jsonPart:new r.Name("jsonPart")};t.default=o},10333:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=n(96531);t.default=class e extends Error{constructor(e,t,n,o){super(o||`can't resolve reference ${n} from id ${t}`),this.missingRef=(0,r.resolveUrl)(e,t,n),this.missingSchema=(0,r.normalizeId)((0,r.getFullPath)(e,this.missingRef))}}},96531:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;let r=n(22281),o=n(739561),s=n(601486),a=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);t.inlineRef=function(e,t=!0){return"boolean"==typeof e||(!0===t?!function e(t){for(let n in t){if(l.has(n))return!0;let r=t[n];if(Array.isArray(r)&&r.some(e)||"object"==typeof r&&e(r))return!0}return!1}(e):!!t&&function e(t){let n=0;for(let o in t){if("$ref"===o)return 1/0;if(n++,!a.has(o)&&("object"==typeof t[o]&&(0,r.eachItem)(t[o],t=>n+=e(t)),n===1/0))return 1/0}return n}(e)<=t)};let l=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function c(e,t="",n){!1!==n&&(t=p(t));let r=e.parse(t);return u(e,r)}function u(e,t){return e.serialize(t).split("#")[0]+"#"}t.getFullPath=c,t._getFullPath=u;let d=/#\/?$/;function p(e){return e?e.replace(d,""):""}t.normalizeId=p;t.resolveUrl=function(e,t,n){return n=p(n),e.resolve(t,n)};let h=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};let{schemaId:n,uriResolver:r}=this.opts,a=p(e[n]||t),l={"":a},u=c(r,a,!1),d={},f=new Set;return s(e,{allKeys:!0},(e,t,r,o)=>{if(void 0===o)return;let s=u+t,a=l[o];function c(t){let n=this.opts.uriResolver.resolve;if(t=p(a?n(a,t):t),f.has(t))throw g(t);f.add(t);let r=this.refs[t];return"string"==typeof r&&(r=this.refs[r]),"object"==typeof r?m(e,r.schema,t):t!==p(s)&&("#"===t[0]?(m(e,d[t],t),d[t]=e):this.refs[t]=s),t}function v(e){if("string"==typeof e){if(!h.test(e))throw Error(`invalid anchor "${e}"`);c.call(this,`#${e}`)}}"string"==typeof e[n]&&(a=c.call(this,e[n])),v.call(this,e.$anchor),v.call(this,e.$dynamicAnchor),l[t]=a}),d;function m(e,t,n){if(void 0!==t&&!o(e,t))throw g(n)}function g(e){return Error(`reference "${e}" resolves to more than one schema`)}}},27077:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;let n=new Set(["string","number","integer","boolean","null","object","array"]);t.isJSONType=function(e){return"string"==typeof e&&n.has(e)};t.getRules=function(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}},22281:function(e,t,n){"use strict";var r,o;Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;let s=n(786712),a=n(539762);t.toHash=function(e){let t={};for(let n of e)t[n]=!0;return t};function l(e,t=e.schema){let{opts:n,self:r}=e;if(!n.strictSchema||"boolean"==typeof t)return;let o=r.RULES.keywords;for(let n in t)!o[n]&&g(e,`unknown keyword: "${n}"`)}function c(e,t){if("boolean"==typeof e)return!e;for(let n in e)if(t[n])return!0;return!1}t.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(l(e,t),!c(t,e.self.RULES.all))},t.checkUnknownRules=l,t.schemaHasRules=c;t.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(let n in e)if("$ref"!==n&&t.all[n])return!0;return!1};t.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},n,r,o){if(!o){if("number"==typeof n||"boolean"==typeof n)return n;if("string"==typeof n)return(0,s._)`${n}`}return(0,s._)`${e}${t}${(0,s.getProperty)(r)}`};t.unescapeFragment=function(e){return d(decodeURIComponent(e))};function u(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function d(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}t.escapeFragment=function(e){return encodeURIComponent(u(e))},t.escapeJsonPointer=u,t.unescapeJsonPointer=d;function p({mergeNames:e,mergeToName:t,mergeValues:n,resultToName:r}){return(o,a,l,c)=>{let u=void 0===l?a:l instanceof s.Name?(a instanceof s.Name?e(o,a,l):t(o,a,l),l):a instanceof s.Name?(t(o,l,a),a):n(a,l);return c!==s.Name||u instanceof s.Name?u:r(o,u)}}function h(e,t){if(!0===t)return e.var("props",!0);let n=e.var("props",(0,s._)`{}`);return void 0!==t&&f(e,n,t),n}function f(e,t,n){Object.keys(n).forEach(n=>e.assign((0,s._)`${t}${(0,s.getProperty)(n)}`,!0))}t.eachItem=function(e,t){if(Array.isArray(e))for(let n of e)t(n);else t(e)},t.mergeEvaluated={props:p({mergeNames:(e,t,n)=>e.if((0,s._)`${n} !== true && ${t} !== undefined`,()=>{e.if((0,s._)`${t} === true`,()=>e.assign(n,!0),()=>e.assign(n,(0,s._)`${n} || {}`).code((0,s._)`Object.assign(${n}, ${t})`))}),mergeToName:(e,t,n)=>e.if((0,s._)`${n} !== true`,()=>{!0===t?e.assign(n,!0):(e.assign(n,(0,s._)`${n} || {}`),f(e,n,t))}),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:h}),items:p({mergeNames:(e,t,n)=>e.if((0,s._)`${n} !== true && ${t} !== undefined`,()=>e.assign(n,(0,s._)`${t} === true ? true : ${n} > ${t} ? ${n} : ${t}`)),mergeToName:(e,t,n)=>e.if((0,s._)`${n} !== true`,()=>e.assign(n,!0===t||(0,s._)`${n} > ${t} ? ${n} : ${t}`)),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},t.evaluatedPropsToName=h,t.setEvaluated=f;let m={};t.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:m[t.code]||(m[t.code]=new a._Code(t.code))})},(o=r=t.Type||(t.Type={}))[o.Num=0]="Num",o[o.Str=1]="Str";function g(e,t,n=e.opts.strictSchema){if(n){if(t=`strict mode: ${t}`,!0===n)throw Error(t);e.self.logger.warn(t)}}t.getErrorPath=function(e,t,n){if(e instanceof s.Name){let o=t===r.Num;return n?o?(0,s._)`"[" + ${e} + "]"`:(0,s._)`"['" + ${e} + "']"`:o?(0,s._)`"/" + ${e}`:(0,s._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,s.getProperty)(e).toString():"/"+u(e)},t.checkStrictMode=g},486540:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0;function n(e,t){return t.rules.some(t=>r(e,t))}function r(e,t){var n;return void 0!==e[t.keyword]||(null===(n=t.definition.implements)||void 0===n?void 0:n.some(t=>void 0!==e[t]))}t.schemaHasRulesForType=function({schema:e,self:t},r){let o=t.RULES.types[r];return o&&!0!==o&&n(e,o)},t.shouldUseGroup=n,t.shouldUseRule=r},752009:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;let r=n(248014),o=n(786712),s=n(834496),a={message:"boolean schema is false"};t.topBoolOrEmptySchema=function(e){let{gen:t,schema:n,validateName:r}=e;!1===n?l(e,!1):"object"==typeof n&&!0===n.$async?t.return(s.default.data):(t.assign((0,o._)`${r}.errors`,null),t.return(!0))};function l(e,t){let{gen:n,data:o}=e;(0,r.reportError)({gen:n,keyword:"false schema",data:o,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e},a,void 0,t)}t.boolOrEmptySchema=function(e,t){let{gen:n,schema:r}=e;!1===r?(n.var(t,!1),l(e)):n.var(t,!0)}},225038:function(e,t,n){"use strict";var r,o;Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;let s=n(27077),a=n(486540),l=n(248014),c=n(786712),u=n(22281);(o=r=t.DataType||(t.DataType={}))[o.Correct=0]="Correct",o[o.Wrong=1]="Wrong";function d(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(s.isJSONType))return t;throw Error("type must be JSONType or JSONType[]: "+t.join(","))}t.getSchemaTypes=function(e){let t=d(e.type);if(t.includes("null")){if(!1===e.nullable)throw Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},t.getJSONTypes=d;t.coerceAndCheckDataType=function(e,t){let{gen:n,data:o,opts:s}=e,l=function(e,t){return t?e.filter(e=>p.has(e)||"array"===t&&"array"===e):[]}(t,s.coerceTypes),u=t.length>0&&!(0===l.length&&1===t.length&&(0,a.schemaHasRulesForType)(e,t[0]));if(u){let a=f(t,o,s.strictNumbers,r.Wrong);n.if(a,()=>{l.length?function(e,t,n){let{gen:r,data:o,opts:s}=e,a=r.let("dataType",(0,c._)`typeof ${o}`),l=r.let("coerced",(0,c._)`undefined`);for(let e of("array"===s.coerceTypes&&r.if((0,c._)`${a} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>r.assign(o,(0,c._)`${o}[0]`).assign(a,(0,c._)`typeof ${o}`).if(f(t,o,s.strictNumbers),()=>r.assign(l,o))),r.if((0,c._)`${l} !== undefined`),n))(p.has(e)||"array"===e&&"array"===s.coerceTypes)&&function(e){switch(e){case"string":r.elseIf((0,c._)`${a} == "number" || ${a} == "boolean"`).assign(l,(0,c._)`"" + ${o}`).elseIf((0,c._)`${o} === null`).assign(l,(0,c._)`""`);return;case"number":r.elseIf((0,c._)`${a} == "boolean" || ${o} === null
|
|
|
|| (${a} == "string" && ${o} && ${o} == +${o})`).assign(l,(0,c._)`+${o}`);return;case"integer":r.elseIf((0,c._)`${a} === "boolean" || ${o} === null
|
|
|
|| (${a} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(l,(0,c._)`+${o}`);return;case"boolean":r.elseIf((0,c._)`${o} === "false" || ${o} === 0 || ${o} === null`).assign(l,!1).elseIf((0,c._)`${o} === "true" || ${o} === 1`).assign(l,!0);return;case"null":r.elseIf((0,c._)`${o} === "" || ${o} === 0 || ${o} === false`),r.assign(l,null);return;case"array":r.elseIf((0,c._)`${a} === "string" || ${a} === "number"
|
|
|
|| ${a} === "boolean" || ${o} === null`).assign(l,(0,c._)`[${o}]`)}}(e);r.else(),g(e),r.endIf(),r.if((0,c._)`${l} !== undefined`,()=>{r.assign(o,l),function({gen:e,parentData:t,parentDataProperty:n},r){e.if((0,c._)`${t} !== undefined`,()=>e.assign((0,c._)`${t}[${n}]`,r))}(e,l)})}(e,t,l):g(e)})}return u};let p=new Set(["string","number","integer","boolean","null"]);function h(e,t,n,o=r.Correct){let s;let a=o===r.Correct?c.operators.EQ:c.operators.NEQ;switch(e){case"null":return(0,c._)`${t} ${a} null`;case"array":s=(0,c._)`Array.isArray(${t})`;break;case"object":s=(0,c._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":s=l((0,c._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":s=l();break;default:return(0,c._)`typeof ${t} ${a} ${e}`}return o===r.Correct?s:(0,c.not)(s);function l(e=c.nil){return(0,c.and)((0,c._)`typeof ${t} == "number"`,e,n?(0,c._)`isFinite(${t})`:c.nil)}}function f(e,t,n,r){let o;if(1===e.length)return h(e[0],t,n,r);let s=(0,u.toHash)(e);if(s.array&&s.object){let e=(0,c._)`typeof ${t} != "object"`;o=s.null?e:(0,c._)`!${t} || ${e}`,delete s.null,delete s.array,delete s.object}else o=c.nil;for(let e in s.number&&delete s.integer,s)o=(0,c.and)(o,h(e,t,n,r));return o}t.checkDataType=h,t.checkDataTypes=f;let m={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?(0,c._)`{type: ${e}}`:(0,c._)`{type: ${t}}`};function g(e){let t=function(e){let{gen:t,data:n,schema:r}=e,o=(0,u.schemaRefOrVal)(e,r,"type");return{gen:t,keyword:"type",data:n,schema:r.type,schemaCode:o,schemaValue:o,parentSchema:r,params:{},it:e}}(e);(0,l.reportError)(t,m)}t.reportTypeError=g},794675:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;let r=n(786712),o=n(22281);function s(e,t,n){let{gen:s,compositeRule:a,data:l,opts:c}=e;if(void 0===n)return;let u=(0,r._)`${l}${(0,r.getProperty)(t)}`;if(a){(0,o.checkStrictMode)(e,`default is ignored for: ${u}`);return}let d=(0,r._)`${u} === undefined`;"empty"===c.useDefaults&&(d=(0,r._)`${d} || ${u} === null || ${u} === ""`),s.if(d,(0,r._)`${u} = ${(0,r.stringify)(n)}`)}t.assignDefaults=function(e,t){let{properties:n,items:r}=e.schema;if("object"===t&&n)for(let t in n)s(e,t,n[t].default);else"array"===t&&Array.isArray(r)&&r.forEach((t,n)=>s(e,n,t.default))}},95721:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;let r=n(752009),o=n(225038),s=n(486540),a=n(225038),l=n(794675),c=n(582167),u=n(314950),d=n(786712),p=n(834496),h=n(96531),f=n(22281),m=n(248014);function g({gen:e,validateName:t,schema:n,schemaEnv:r,opts:o},s){o.code.es5?e.func(t,(0,d._)`${p.default.data}, ${p.default.valCxt}`,r.$async,()=>{e.code((0,d._)`"use strict"; ${v(n,o)}`),function(e,t){e.if(p.default.valCxt,()=>{e.var(p.default.instancePath,(0,d._)`${p.default.valCxt}.${p.default.instancePath}`),e.var(p.default.parentData,(0,d._)`${p.default.valCxt}.${p.default.parentData}`),e.var(p.default.parentDataProperty,(0,d._)`${p.default.valCxt}.${p.default.parentDataProperty}`),e.var(p.default.rootData,(0,d._)`${p.default.valCxt}.${p.default.rootData}`),t.dynamicRef&&e.var(p.default.dynamicAnchors,(0,d._)`${p.default.valCxt}.${p.default.dynamicAnchors}`)},()=>{e.var(p.default.instancePath,(0,d._)`""`),e.var(p.default.parentData,(0,d._)`undefined`),e.var(p.default.parentDataProperty,(0,d._)`undefined`),e.var(p.default.rootData,p.default.data),t.dynamicRef&&e.var(p.default.dynamicAnchors,(0,d._)`{}`)})}(e,o),e.code(s)}):e.func(t,(0,d._)`${p.default.data}, ${function(e){return(0,d._)`{${p.default.instancePath}="", ${p.default.parentData}, ${p.default.parentDataProperty}, ${p.default.rootData}=${p.default.data}${e.dynamicRef?(0,d._)`, ${p.default.dynamicAnchors}={}`:d.nil}}={}`}(o)}`,r.$async,()=>e.code(v(n,o)).code(s))}t.validateFunctionCode=function(e){if(y(e)&&(x(e),b(e))){(function(e){let{schema:t,opts:n,gen:r}=e;g(e,()=>{n.$comment&&t.$comment&&S(e),function(e){let{schema:t,opts:n}=e;void 0!==t.default&&n.useDefaults&&n.strictSchema&&(0,f.checkStrictMode)(e,"default is ignored in the schema root")}(e),r.let(p.default.vErrors,null),r.let(p.default.errors,0),n.unevaluated&&function(e){let{gen:t,validateName:n}=e;e.evaluated=t.const("evaluated",(0,d._)`${n}.evaluated`),t.if((0,d._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,d._)`${e.evaluated}.props`,(0,d._)`undefined`)),t.if((0,d._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,d._)`${e.evaluated}.items`,(0,d._)`undefined`))}(e),w(e),function(e){let{gen:t,schemaEnv:n,validateName:r,ValidationError:o,opts:s}=e;n.$async?t.if((0,d._)`${p.default.errors} === 0`,()=>t.return(p.default.data),()=>t.throw((0,d._)`new ${o}(${p.default.vErrors})`)):(t.assign((0,d._)`${r}.errors`,p.default.vErrors),s.unevaluated&&function({gen:e,evaluated:t,props:n,items:r}){n instanceof d.Name&&e.assign((0,d._)`${t}.props`,n),r instanceof d.Name&&e.assign((0,d._)`${t}.items`,r)}(e),t.return((0,d._)`${p.default.errors} === 0`))}(e)})})(e);return}g(e,()=>(0,r.topBoolOrEmptySchema)(e))};function v(e,t){let n="object"==typeof e&&e[t.schemaId];return n&&(t.code.source||t.code.process)?(0,d._)`/*# sourceURL=${n} */`:d.nil}function b({schema:e,self:t}){if("boolean"==typeof e)return!e;for(let n in e)if(t.RULES.all[n])return!0;return!1}function y(e){return"boolean"!=typeof e.schema}function x(e){(0,f.checkUnknownRules)(e),function(e){let{schema:t,errSchemaPath:n,opts:r,self:o}=e;t.$ref&&r.ignoreKeywordsWithRef&&(0,f.schemaHasRulesButRef)(t,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}(e)}function w(e,t){if(e.opts.jtd)return k(e,[],!1,t);let n=(0,o.getSchemaTypes)(e.schema),r=(0,o.coerceAndCheckDataType)(e,n);k(e,n,!r,t)}function S({gen:e,schemaEnv:t,schema:n,errSchemaPath:r,opts:o}){let s=n.$comment;if(!0===o.$comment)e.code((0,d._)`${p.default.self}.logger.log(${s})`);else if("function"==typeof o.$comment){let n=(0,d.str)`${r}/$comment`,o=e.scopeValue("root",{ref:t.root});e.code((0,d._)`${p.default.self}.opts.$comment(${s}, ${n}, ${o}.schema)`)}}function k(e,t,n,r){let{gen:o,schema:l,data:c,allErrors:u,opts:h,self:m}=e,{RULES:g}=m;if(l.$ref&&(h.ignoreKeywordsWithRef||!(0,f.schemaHasRulesButRef)(l,g))){o.block(()=>_(e,"$ref",g.all.$ref.definition));return}function v(f){(0,s.shouldUseGroup)(l,f)&&(f.type?(o.if((0,a.checkDataType)(f.type,c,h.strictNumbers)),A(e,f),1===t.length&&t[0]===f.type&&n&&(o.else(),(0,a.reportTypeError)(e)),o.endIf()):A(e,f),!u&&o.if((0,d._)`${p.default.errors} === ${r||0}`))}!h.jtd&&function(e,t){!e.schemaEnv.meta&&e.opts.strictTypes&&(function(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(t=>{!C(e.dataTypes,t)&&E(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)}),function(e,t){let n=[];for(let r of e.dataTypes)C(t,r)?n.push(r):t.includes("integer")&&"number"===r&&n.push("integer");e.dataTypes=n}(e,t)}}(e,t),!e.opts.allowUnionTypes&&function(e,t){t.length>1&&!(2===t.length&&t.includes("null"))&&E(e,"use allowUnionTypes to allow union type keyword")}(e,t),function(e,t){let n=e.self.RULES.all;for(let r in n){let o=n[r];if("object"==typeof o&&(0,s.shouldUseRule)(e.schema,o)){let{type:n}=o.definition;n.length&&!n.some(e=>(function(e,t){return e.includes(t)||"number"===t&&e.includes("integer")})(t,e))&&E(e,`missing type "${n.join(",")}" for keyword "${r}"`)}}}(e,e.dataTypes))}(e,t),o.block(()=>{for(let e of g.rules)v(e);v(g.post)})}function A(e,t){let{gen:n,schema:r,opts:{useDefaults:o}}=e;o&&(0,l.assignDefaults)(e,t.type),n.block(()=>{for(let n of t.rules)(0,s.shouldUseRule)(r,n)&&_(e,n.keyword,n.definition,t.type)})}function C(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function E(e,t){let n=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${n}" (strictTypes)`,(0,f.checkStrictMode)(e,t,e.opts.strictTypes)}class T{constructor(e,t,n){if((0,c.validateKeywordUsage)(e,t,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,f.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",I(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,c.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw Error(`${n} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",p.default.errors))}result(e,t,n){this.failResult((0,d.not)(e),t,n)}failResult(e,t,n){this.gen.if(e),n?n():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,d.not)(e),void 0,t)}fail(e){if(void 0===e){this.error(),!this.allErrors&&this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail((0,d._)`${t} !== undefined && (${(0,d.or)(this.invalid$data(),e)})`)}error(e,t,n){if(t){this.setParams(t),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,t){(e?m.reportExtraError:m.reportError)(this,this.def.error,t)}$dataError(){(0,m.reportError)(this,this.def.$dataError||m.keyword$DataError)}reset(){if(void 0===this.errsCount)throw Error('add "trackErrors" to keyword definition');(0,m.resetErrorsCount)(this.gen,this.errsCount)}ok(e){!this.allErrors&&this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,n=d.nil){this.gen.block(()=>{this.check$data(e,n),t()})}check$data(e=d.nil,t=d.nil){if(!this.$data)return;let{gen:n,schemaCode:r,schemaType:o,def:s}=this;n.if((0,d.or)((0,d._)`${r} === undefined`,t)),e!==d.nil&&n.assign(e,!0),(o.length||s.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==d.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:n,def:r,it:o}=this;return(0,d.or)(function(){if(n.length){if(!(t instanceof d.Name))throw Error("ajv implementation error");let e=Array.isArray(n)?n:[n];return(0,d._)`${(0,a.checkDataTypes)(e,t,o.opts.strictNumbers,a.DataType.Wrong)}`}return d.nil}(),function(){if(r.validateSchema){let n=e.scopeValue("validate$data",{ref:r.validateSchema});return(0,d._)`!${n}(${t})`}return d.nil}())}subschema(e,t){let n=(0,u.getSubschema)(this.it,e);(0,u.extendSubschemaData)(n,this.it,e),(0,u.extendSubschemaMode)(n,e);let o={...this.it,...n,items:void 0,props:void 0};return!function(e,t){if(y(e)&&(x(e),b(e))){(function(e,t){let{schema:n,gen:r,opts:o}=e;o.$comment&&n.$comment&&S(e),function(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,h.resolveUrl)(e.opts.uriResolver,e.baseId,t))}(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw Error("async schema in sync schema")}(e);let s=r.const("_errs",p.default.errors);w(e,s),r.var(t,(0,d._)`${s} === ${p.default.errors}`)})(e,t);return}(0,r.boolOrEmptySchema)(e,t)}(o,t),o}mergeEvaluated(e,t){let{it:n,gen:r}=this;n.opts.unevaluated&&(!0!==n.props&&void 0!==e.props&&(n.props=f.mergeEvaluated.props(r,e.props,n.props,t)),!0!==n.items&&void 0!==e.items&&(n.items=f.mergeEvaluated.items(r,e.items,n.items,t)))}mergeValidEvaluated(e,t){let{it:n,gen:r}=this;if(n.opts.unevaluated&&(!0!==n.props||!0!==n.items))return r.if(t,()=>this.mergeEvaluated(e,d.Name)),!0}}function _(e,t,n,r){let o=new T(e,n,t);"code"in n?n.code(o,r):o.$data&&n.validate?(0,c.funcKeywordCode)(o,n):"macro"in n?(0,c.macroKeywordCode)(o,n):(n.compile||n.validate)&&(0,c.funcKeywordCode)(o,n)}t.KeywordCxt=T;let O=/^\/(?:[^~]|~0|~1)*$/,M=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function I(e,{dataLevel:t,dataNames:n,dataPathArr:r}){let o,s;if(""===e)return p.default.rootData;if("/"===e[0]){if(!O.test(e))throw Error(`Invalid JSON-pointer: ${e}`);o=e,s=p.default.rootData}else{let a=M.exec(e);if(!a)throw Error(`Invalid JSON-pointer: ${e}`);let c=+a[1];if("#"===(o=a[2])){if(c>=t)throw Error(l("property/index",c));return r[t-c]}if(c>t)throw Error(l("data",c));if(s=n[t-c],!o)return s}let a=s;for(let e of o.split("/"))e&&(s=(0,d._)`${s}${(0,d.getProperty)((0,f.unescapeJsonPointer)(e))}`,a=(0,d._)`${a} && ${s}`);return a;function l(e,n){return`Cannot access ${e} ${n} levels up, current level is ${t}`}}t.getData=I},582167:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;let r=n(786712),o=n(834496),s=n(279180),a=n(248014);t.macroKeywordCode=function(e,t){let{gen:n,keyword:o,schema:s,parentSchema:a,it:l}=e,u=t.macro.call(l.self,s,a,l),d=c(n,o,u);!1!==l.opts.validateSchema&&l.self.validateSchema(u,!0);let p=n.name("valid");e.subschema({schema:u,schemaPath:r.nil,errSchemaPath:`${l.errSchemaPath}/${o}`,topSchemaRef:d,compositeRule:!0},p),e.pass(p,()=>e.error(!0))};function l(e){let{gen:t,data:n,it:o}=e;t.if(o.parentData,()=>t.assign(n,(0,r._)`${o.parentData}[${o.parentDataProperty}]`))}t.funcKeywordCode=function(e,t){var n;let{gen:u,keyword:d,schema:p,parentSchema:h,$data:f,it:m}=e;(function({schemaEnv:e},t){if(t.async&&!e.$async)throw Error("async keyword in sync schema")})(m,t);let g=c(u,d,!f&&t.compile?t.compile.call(m.self,p,h,m):t.validate),v=u.let("valid");e.block$data(v,function(){if(!1===t.errors)b(),t.modifying&&l(e),y(()=>e.error());else{let n=t.async?function(){let e=u.let("ruleErrs",null);return u.try(()=>b((0,r._)`await `),t=>u.assign(v,!1).if((0,r._)`${t} instanceof ${m.ValidationError}`,()=>u.assign(e,(0,r._)`${t}.errors`),()=>u.throw(t))),e}():function(){let e=(0,r._)`${g}.errors`;return u.assign(e,null),b(r.nil),e}();t.modifying&&l(e),y(()=>(function(e,t){let{gen:n}=e;n.if((0,r._)`Array.isArray(${t})`,()=>{n.assign(o.default.vErrors,(0,r._)`${o.default.vErrors} === null ? ${t} : ${o.default.vErrors}.concat(${t})`).assign(o.default.errors,(0,r._)`${o.default.vErrors}.length`),(0,a.extendErrors)(e)},()=>e.error())})(e,n))}}),e.ok(null!==(n=t.valid)&&void 0!==n?n:v);function b(n=t.async?(0,r._)`await `:r.nil){let a=m.opts.passContext?o.default.this:o.default.self,l=!("compile"in t&&!f||!1===t.schema);u.assign(v,(0,r._)`${n}${(0,s.callValidateCode)(e,g,a,l)}`,t.modifying)}function y(e){var n;u.if((0,r.not)(null!==(n=t.valid)&&void 0!==n?n:v),e)}};function c(e,t,n){if(void 0===n)throw Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof n?{ref:n}:{ref:n,code:(0,r.stringify)(n)})}t.validSchemaType=function(e,t,n=!1){return!t.length||t.some(t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||n&&void 0===e)};t.validateKeywordUsage=function({schema:e,opts:t,self:n,errSchemaPath:r},o,s){if(Array.isArray(o.keyword)?!o.keyword.includes(s):o.keyword!==s)throw Error("ajv implementation error");let a=o.dependencies;if(null==a?void 0:a.some(t=>!Object.prototype.hasOwnProperty.call(e,t)))throw Error(`parent schema must have dependencies of ${s}: ${a.join(",")}`);if(o.validateSchema&&!o.validateSchema(e[s])){let e=`keyword "${s}" value is invalid at path "${r}": `+n.errorsText(o.validateSchema.errors);if("log"===t.validateSchema)n.logger.error(e);else throw Error(e)}}},314950:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;let r=n(786712),o=n(22281);t.getSubschema=function(e,{keyword:t,schemaProp:n,schema:s,schemaPath:a,errSchemaPath:l,topSchemaRef:c}){if(void 0!==t&&void 0!==s)throw Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){let s=e.schema[t];return void 0===n?{schema:s,schemaPath:(0,r._)`${e.schemaPath}${(0,r.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:s[n],schemaPath:(0,r._)`${e.schemaPath}${(0,r.getProperty)(t)}${(0,r.getProperty)(n)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,o.escapeFragment)(n)}`}}if(void 0!==s){if(void 0===a||void 0===l||void 0===c)throw Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:s,schemaPath:a,topSchemaRef:c,errSchemaPath:l}}throw Error('either "keyword" or "schema" must be passed')};t.extendSubschemaData=function(e,t,{dataProp:n,dataPropType:s,data:a,dataTypes:l,propertyName:c}){if(void 0!==a&&void 0!==n)throw Error('both "data" and "dataProp" passed, only one allowed');let{gen:u}=t;if(void 0!==n){let{errorPath:a,dataPathArr:l,opts:c}=t;d(u.let("data",(0,r._)`${t.data}${(0,r.getProperty)(n)}`,!0)),e.errorPath=(0,r.str)`${a}${(0,o.getErrorPath)(n,s,c.jsPropertySyntax)}`,e.parentDataProperty=(0,r._)`${n}`,e.dataPathArr=[...l,e.parentDataProperty]}function d(n){e.data=n,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,n]}void 0!==a&&(d(a instanceof r.Name?a:u.let("data",a,!0)),void 0!==c&&(e.propertyName=c)),l&&(e.dataTypes=l)};t.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:n,compositeRule:r,createErrors:o,allErrors:s}){void 0!==r&&(e.compositeRule=r),void 0!==o&&(e.createErrors=o),void 0!==s&&(e.allErrors=s),e.jtdDiscriminator=t,e.jtdMetadata=n}},658922:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var r=n(95721);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return r.KeywordCxt}});var o=n(786712);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return o._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return o.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return o.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return o.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return o.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return o.CodeGen}});let s=n(205767),a=n(10333),l=n(27077),c=n(43261),u=n(786712),d=n(96531),p=n(225038),h=n(22281),f=n(464168),m=n(845108),g=(e,t)=>new RegExp(e,t);g.code="new RegExp";let v=["removeAdditional","useDefaults","coerceTypes"],b=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),y={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},x={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};class w{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...function(e){var t,n,r,o,s,a,l,c,u,d,p,h,f,v,b,y,x,w,S,k,A,C,E,T,_;let O=e.strict,M=null===(t=e.code)||void 0===t?void 0:t.optimize,I=!0===M||void 0===M?1:M||0,P=null!==(r=null===(n=e.code)||void 0===n?void 0:n.regExp)&&void 0!==r?r:g,D=null!==(o=e.uriResolver)&&void 0!==o?o:m.default;return{strictSchema:null===(a=null!==(s=e.strictSchema)&&void 0!==s?s:O)||void 0===a||a,strictNumbers:null===(c=null!==(l=e.strictNumbers)&&void 0!==l?l:O)||void 0===c||c,strictTypes:null!==(d=null!==(u=e.strictTypes)&&void 0!==u?u:O)&&void 0!==d?d:"log",strictTuples:null!==(h=null!==(p=e.strictTuples)&&void 0!==p?p:O)&&void 0!==h?h:"log",strictRequired:null!==(v=null!==(f=e.strictRequired)&&void 0!==f?f:O)&&void 0!==v&&v,code:e.code?{...e.code,optimize:I,regExp:P}:{optimize:I,regExp:P},loopRequired:null!==(b=e.loopRequired)&&void 0!==b?b:200,loopEnum:null!==(y=e.loopEnum)&&void 0!==y?y:200,meta:null===(x=e.meta)||void 0===x||x,messages:null===(w=e.messages)||void 0===w||w,inlineRefs:null===(S=e.inlineRefs)||void 0===S||S,schemaId:null!==(k=e.schemaId)&&void 0!==k?k:"$id",addUsedSchema:null===(A=e.addUsedSchema)||void 0===A||A,validateSchema:null===(C=e.validateSchema)||void 0===C||C,validateFormats:null===(E=e.validateFormats)||void 0===E||E,unicodeRegExp:null===(T=e.unicodeRegExp)||void 0===T||T,int32range:null===(_=e.int32range)||void 0===_||_,uriResolver:D}}(e)};let{es5:t,lines:n}=this.opts.code;this.scope=new u.ValueScope({scope:{},prefixes:b,es5:t,lines:n}),this.logger=function(e){if(!1===e)return _;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw Error("logger must implement log, warn and error methods")}(e.logger);let r=e.validateFormats;e.validateFormats=!1,this.RULES=(0,l.getRules)(),S.call(this,y,e,"NOT SUPPORTED"),S.call(this,x,e,"DEPRECATED","warn"),this._metaOpts=T.call(this),e.formats&&C.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&E.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),A.call(this),e.validateFormats=r}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:n}=this.opts,r=f;"id"===n&&((r={...f}).id=r.$id,delete r.$id),t&&e&&this.addMetaSchema(r,r[n],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let n;if("string"==typeof e){if(!(n=this.getSchema(e)))throw Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let r=n(t);return!("$async"in n)&&(this.errors=n.errors),r}compile(e,t){let n=this._addSchema(e,t);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return r.call(this,e,t);async function r(e,t){await o.call(this,e.$schema);let n=this._addSchema(e,t);return n.validate||s.call(this,n)}async function o(e){e&&!this.getSchema(e)&&await r.call(this,{$ref:e},!0)}async function s(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof a.default))throw t;return l.call(this,t),await c.call(this,t.missingSchema),s.call(this,e)}}function l({missingSchema:e,missingRef:t}){if(this.refs[e])throw Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function c(e){let n=await u.call(this,e);!this.refs[e]&&await o.call(this,n.$schema),!this.refs[e]&&this.addSchema(n,e,t)}async function u(e){let t=this._loading[e];if(t)return t;try{return await (this._loading[e]=n(e))}finally{delete this._loading[e]}}}addSchema(e,t,n,r=this.opts.validateSchema){let o;if(Array.isArray(e)){for(let t of e)this.addSchema(t,void 0,n,r);return this}if("object"==typeof e){let{schemaId:t}=this.opts;if(void 0!==(o=e[t])&&"string"!=typeof o)throw Error(`schema ${t} must be string`)}return t=(0,d.normalizeId)(t||o),this._checkUnique(t),this.schemas[t]=this._addSchema(e,n,t,r,!0),this}addMetaSchema(e,t,n=this.opts.validateSchema){return this.addSchema(e,t,!0,n),this}validateSchema(e,t){let n;if("boolean"==typeof e)return!0;if(void 0!==(n=e.$schema)&&"string"!=typeof n)throw Error("$schema must be a string");if(!(n=n||this.opts.defaultMeta||this.defaultMeta()))return this.logger.warn("meta-schema not available"),this.errors=null,!0;let r=this.validate(n,e);if(!r&&t){let e="schema is invalid: "+this.errorsText();if("log"===this.opts.validateSchema)this.logger.error(e);else throw Error(e)}return r}getSchema(e){let t;for(;"string"==typeof(t=k.call(this,e));)e=t;if(void 0===t){let{schemaId:n}=this.opts,r=new c.SchemaEnv({schema:{},schemaId:n});if(!(t=c.resolveSchema.call(this,r,e)))return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let t=k.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{this._cache.delete(e);let t=e[this.opts.schemaId];return t&&(t=(0,d.normalizeId)(t),delete this.schemas[t],delete this.refs[t]),this}default:throw Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let n;if("string"==typeof e)n=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=n);else if("object"==typeof e&&void 0===t){if(Array.isArray(n=(t=e).keyword)&&!n.length)throw Error("addKeywords: keyword must be string or non-empty array")}else throw Error("invalid addKeywords parameters");if(M.call(this,n,t),!t)return(0,h.eachItem)(n,e=>I.call(this,e)),this;D.call(this,t);let r={...t,type:(0,p.getJSONTypes)(t.type),schemaType:(0,p.getJSONTypes)(t.schemaType)};return(0,h.eachItem)(n,0===r.type.length?e=>I.call(this,e,r):e=>r.type.forEach(t=>I.call(this,e,r,t))),this}getKeyword(e){let t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;for(let n of(delete t.keywords[e],delete t.all[e],t.rules)){let t=n.rules.findIndex(t=>t.keyword===e);t>=0&&n.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:n="data"}={}){return e&&0!==e.length?e.map(e=>`${n}${e.instancePath} ${e.message}`).reduce((e,n)=>e+t+n):"No errors"}$dataMetaSchema(e,t){let n=this.RULES.all;for(let r of(e=JSON.parse(JSON.stringify(e)),t)){let t=r.split("/").slice(1),o=e;for(let e of t)o=o[e];for(let e in n){let t=n[e];if("object"!=typeof t)continue;let{$data:r}=t.definition,s=o[e];r&&s&&(o[e]=R(s))}}return e}_removeAllSchemas(e,t){for(let n in e){let r=e[n];(!t||t.test(n))&&("string"==typeof r?delete e[n]:r&&!r.meta&&(this._cache.delete(r.schema),delete e[n]))}}_addSchema(e,t,n,r=this.opts.validateSchema,o=this.opts.addUsedSchema){let s;let{schemaId:a}=this.opts;if("object"==typeof e)s=e[a];else{if(this.opts.jtd)throw Error("schema must be object");if("boolean"!=typeof e)throw Error("schema must be object or boolean")}let l=this._cache.get(e);if(void 0!==l)return l;n=(0,d.normalizeId)(s||n);let u=d.getSchemaRefs.call(this,e,n);return l=new c.SchemaEnv({schema:e,schemaId:a,meta:t,baseId:n,localRefs:u}),this._cache.set(l.schema,l),o&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=l),r&&this.validateSchema(e,!0),l}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):c.compileSchema.call(this,e),!e.validate)throw Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{c.compileSchema.call(this,e)}finally{this.opts=t}}}function S(e,t,n,r="error"){for(let o in e)o in t&&this.logger[r](`${n}: option ${o}. ${e[o]}`)}function k(e){return e=(0,d.normalizeId)(e),this.schemas[e]||this.refs[e]}function A(){let e=this.opts.schemas;if(e){if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}}function C(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function E(e){if(Array.isArray(e)){this.addVocabulary(e);return}for(let t in this.logger.warn("keywords option as map is deprecated, pass array"),e){let n=e[t];!n.keyword&&(n.keyword=t),this.addKeyword(n)}}function T(){let e={...this.opts};for(let t of v)delete e[t];return e}t.default=w,w.ValidationError=s.default,w.MissingRefError=a.default;let _={log(){},warn(){},error(){}},O=/^[a-z_$][a-z0-9_$:-]*$/i;function M(e,t){let{RULES:n}=this;if((0,h.eachItem)(e,e=>{if(n.keywords[e])throw Error(`Keyword ${e} is already defined`);if(!O.test(e))throw Error(`Keyword ${e} has invalid name`)}),t&&t.$data&&!("code"in t||"validate"in t))throw Error('$data keyword must have "code" or "validate" function')}function I(e,t,n){var r;let o=null==t?void 0:t.post;if(n&&o)throw Error('keyword with "post" flag cannot have "type"');let{RULES:s}=this,a=o?s.post:s.rules.find(({type:e})=>e===n);if(!a&&(a={type:n,rules:[]},s.rules.push(a)),s.keywords[e]=!0,!t)return;let l={keyword:e,definition:{...t,type:(0,p.getJSONTypes)(t.type),schemaType:(0,p.getJSONTypes)(t.schemaType)}};t.before?P.call(this,a,l,t.before):a.rules.push(l),s.all[e]=l,null===(r=t.implements)||void 0===r||r.forEach(e=>this.addKeyword(e))}function P(e,t,n){let r=e.rules.findIndex(e=>e.keyword===n);r>=0?e.rules.splice(r,0,t):(e.rules.push(t),this.logger.warn(`rule ${n} is not defined`))}function D(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=R(t)),e.validateSchema=this.compile(t,!0))}let N={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function R(e){return{anyOf:[e,N]}}},813648:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=n(739561);r.code='require("ajv/dist/runtime/equal").default',t.default=r},519144:function(e,t){"use strict";function n(e){let t;let n=e.length,r=0,o=0;for(;o<n;)r++,(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<n&&(64512&(t=e.charCodeAt(o)))==56320&&o++;return r}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,n.code='require("ajv/dist/runtime/ucs2length").default'},845108:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=n(917855);r.code='require("ajv/dist/runtime/uri").default',t.default=r},205767:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class e extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}},641693:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;let r=n(786712),o=n(22281);function s(e,t){let{gen:n,schema:s,data:a,keyword:l,it:c}=e;c.items=!0;let u=n.const("len",(0,r._)`${a}.length`);if(!1===s)e.setParams({len:t.length}),e.pass((0,r._)`${u} <= ${t.length}`);else if("object"==typeof s&&!(0,o.alwaysValidSchema)(c,s)){let s=n.var("valid",(0,r._)`${u} <= ${t.length}`);n.if((0,r.not)(s),()=>(function(s){n.forRange("i",t.length,u,t=>{e.subschema({keyword:l,dataProp:t,dataPropType:o.Type.Num},s),!c.allErrors&&n.if((0,r.not)(s),()=>n.break())})})(s)),e.ok(s)}}t.validateAdditionalItems=s,t.default={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>(0,r.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,r._)`{limit: ${e}}`},code(e){let{parentSchema:t,it:n}=e,{items:r}=t;if(!Array.isArray(r)){(0,o.checkStrictMode)(n,'"additionalItems" is ignored when "items" is not an array of schemas');return}s(e,r)}}},811498:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=n(279180),o=n(786712),s=n(834496),a=n(22281);t.default={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>(0,o._)`{additionalProperty: ${e.additionalProperty}}`},code(e){let{gen:t,schema:n,parentSchema:l,data:c,errsCount:u,it:d}=e;if(!u)throw Error("ajv implementation error");let{allErrors:p,opts:h}=d;if(d.props=!0,"all"!==h.removeAdditional&&(0,a.alwaysValidSchema)(d,n))return;let f=(0,r.allSchemaProperties)(l.properties),m=(0,r.allSchemaProperties)(l.patternProperties);(function(){t.forIn("key",c,n=>{f.length||m.length?t.if(function(n){let s;if(f.length>8){let e=(0,a.schemaRefOrVal)(d,l.properties,"properties");s=(0,r.isOwnProperty)(t,e,n)}else s=f.length?(0,o.or)(...f.map(e=>(0,o._)`${n} === ${e}`)):o.nil;return m.length&&(s=(0,o.or)(s,...m.map(t=>(0,o._)`${(0,r.usePattern)(e,t)}.test(${n})`))),(0,o.not)(s)}(n),()=>v(n)):v(n)})})(),e.ok((0,o._)`${u} === ${s.default.errors}`);function g(e){t.code((0,o._)`delete ${c}[${e}]`)}function v(r){if("all"===h.removeAdditional||h.removeAdditional&&!1===n){g(r);return}if(!1===n){e.setParams({additionalProperty:r}),e.error(),!p&&t.break();return}if("object"==typeof n&&!(0,a.alwaysValidSchema)(d,n)){let n=t.name("valid");"failing"===h.removeAdditional?(b(r,n,!1),t.if((0,o.not)(n),()=>{e.reset(),g(r)})):(b(r,n),!p&&t.if((0,o.not)(n),()=>t.break()))}}function b(t,n,r){let o={keyword:"additionalProperties",dataProp:t,dataPropType:a.Type.Str};!1===r&&Object.assign(o,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(o,n)}}}},362338:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=n(22281);t.default={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:n,it:o}=e;if(!Array.isArray(n))throw Error("ajv implementation error");let s=t.name("valid");n.forEach((t,n)=>{if((0,r.alwaysValidSchema)(o,t))return;let a=e.subschema({keyword:"allOf",schemaProp:n},s);e.ok(s),e.mergeEvaluated(a)})}}},808433:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:n(279180).validateUnion,error:{message:"must match a schema in anyOf"}};t.default=r},13345:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=n(786712),o=n(22281);t.default={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?(0,r.str)`must contain at least ${e} valid item(s)`:(0,r.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?(0,r._)`{minContains: ${e}}`:(0,r._)`{minContains: ${e}, maxContains: ${t}}`},code(e){let t,n;let{gen:s,schema:a,parentSchema:l,data:c,it:u}=e,{minContains:d,maxContains:p}=l;u.opts.next?(t=void 0===d?1:d,n=p):t=1;let h=s.const("len",(0,r._)`${c}.length`);if(e.setParams({min:t,max:n}),void 0===n&&0===t){(0,o.checkStrictMode)(u,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(void 0!==n&&t>n){(0,o.checkStrictMode)(u,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,o.alwaysValidSchema)(u,a)){let o=(0,r._)`${h} >= ${t}`;void 0!==n&&(o=(0,r._)`${o} && ${h} <= ${n}`),e.pass(o);return}u.items=!0;let f=s.name("valid");function m(){let e=s.name("_valid"),o=s.let("count",0);g(e,()=>s.if(e,()=>(function(e){s.code((0,r._)`${e}++`),void 0===n?s.if((0,r._)`${e} >= ${t}`,()=>s.assign(f,!0).break()):(s.if((0,r._)`${e} > ${n}`,()=>s.assign(f,!1).break()),1===t?s.assign(f,!0):s.if((0,r._)`${e} >= ${t}`,()=>s.assign(f,!0)))})(o)))}function g(t,n){s.forRange("i",0,h,r=>{e.subschema({keyword:"contains",dataProp:r,dataPropType:o.Type.Num,compositeRule:!0},t),n()})}void 0===n&&1===t?g(f,()=>s.if(f,()=>s.break())):0===t?(s.let(f,!0),void 0!==n&&s.if((0,r._)`${c}.length > 0`,m)):(s.let(f,!1),m()),e.result(f,()=>e.reset())}}},320404:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;let r=n(786712),o=n(22281),s=n(279180);t.error={message:({params:{property:e,depsCount:t,deps:n}})=>(0,r.str)`must have ${1===t?"property":"properties"} ${n} when property ${e} is present`,params:({params:{property:e,depsCount:t,deps:n,missingProperty:o}})=>(0,r._)`{property: ${e},
|
|
|
missingProperty: ${o},
|
|
|
depsCount: ${t},
|
|
|
deps: ${n}}`};let a={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){let[t,n]=function({schema:e}){let t={},n={};for(let r in e){if("__proto__"!==r)(Array.isArray(e[r])?t:n)[r]=e[r]}return[t,n]}(e);l(e,t),c(e,n)}};function l(e,t=e.schema){let{gen:n,data:o,it:a}=e;if(0===Object.keys(t).length)return;let c=n.let("missing");for(let l in t){let u=t[l];if(0===u.length)continue;let d=(0,s.propertyInData)(n,o,l,a.opts.ownProperties);e.setParams({property:l,depsCount:u.length,deps:u.join(", ")}),a.allErrors?n.if(d,()=>{for(let t of u)(0,s.checkReportMissingProp)(e,t)}):(n.if((0,r._)`${d} && (${(0,s.checkMissingProp)(e,u,c)})`),(0,s.reportMissingProp)(e,c),n.else())}}function c(e,t=e.schema){let{gen:n,data:r,keyword:a,it:l}=e,u=n.name("valid");for(let c in t)!(0,o.alwaysValidSchema)(l,t[c])&&(n.if((0,s.propertyInData)(n,r,c,l.opts.ownProperties),()=>{let t=e.subschema({keyword:a,schemaProp:c},u);e.mergeValidEvaluated(t,u)},()=>n.var(u,!0)),e.ok(u))}t.validatePropertyDeps=l,t.validateSchemaDeps=c,t.default=a},827850:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=n(786712),o=n(22281);function s(e,t){let n=e.schema[t];return void 0!==n&&!(0,o.alwaysValidSchema)(e,n)}t.default={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>(0,r.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,r._)`{failingKeyword: ${e.ifClause}}`},code(e){let{gen:t,parentSchema:n,it:a}=e;void 0===n.then&&void 0===n.else&&(0,o.checkStrictMode)(a,'"if" without "then" and "else" is ignored');let l=s(a,"then"),c=s(a,"else");if(!l&&!c)return;let u=t.let("valid",!0),d=t.name("_valid");if(function(){let t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},d);e.mergeEvaluated(t)}(),e.reset(),l&&c){let n=t.let("ifClause");e.setParams({ifClause:n}),t.if(d,p("then",n),p("else",n))}else l?t.if(d,p("then")):t.if((0,r.not)(d),p("else"));e.pass(u,()=>e.error(!0));function p(n,o){return()=>{let s=e.subschema({keyword:n},d);t.assign(u,d),e.mergeValidEvaluated(s,u),o?t.assign(o,(0,r._)`${n}`):e.setParams({ifClause:n})}}}}},256999:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=n(641693),o=n(85766),s=n(168307),a=n(157247),l=n(13345),c=n(320404),u=n(391157),d=n(811498),p=n(461879),h=n(647041),f=n(595545),m=n(808433),g=n(253508),v=n(362338),b=n(827850),y=n(600692);t.default=function(e=!1){let t=[f.default,m.default,g.default,v.default,b.default,y.default,u.default,d.default,c.default,p.default,h.default];return e?t.push(o.default,a.default):t.push(r.default,s.default),t.push(l.default),t}},168307:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;let r=n(786712),o=n(22281),s=n(279180);function a(e,t,n=e.schema){let{gen:s,parentSchema:l,data:c,keyword:u,it:d}=e;(function(e){let{opts:r,errSchemaPath:s}=d,a=n.length,l=a===e.minItems&&(a===e.maxItems||!1===e[t]);if(r.strictTuples&&!l){let e=`"${u}" is ${a}-tuple, but minItems or maxItems/${t} are not specified or different at path "${s}"`;(0,o.checkStrictMode)(d,e,r.strictTuples)}})(l),d.opts.unevaluated&&n.length&&!0!==d.items&&(d.items=o.mergeEvaluated.items(s,n.length,d.items));let p=s.name("valid"),h=s.const("len",(0,r._)`${c}.length`);n.forEach((t,n)=>{!(0,o.alwaysValidSchema)(d,t)&&(s.if((0,r._)`${h} > ${n}`,()=>e.subschema({keyword:u,schemaProp:n,dataProp:n},p)),e.ok(p))})}t.validateTuple=a,t.default={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:n}=e;if(Array.isArray(t))return a(e,"additionalItems",t);n.items=!0,!(0,o.alwaysValidSchema)(n,t)&&e.ok((0,s.validateArray)(e))}}},157247:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=n(786712),o=n(22281),s=n(279180),a=n(641693);t.default={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>(0,r.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,r._)`{limit: ${e}}`},code(e){let{schema:t,parentSchema:n,it:r}=e,{prefixItems:l}=n;r.items=!0,!(0,o.alwaysValidSchema)(r,t)&&(l?(0,a.validateAdditionalItems)(e,l):e.ok((0,s.validateArray)(e)))}}},595545:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=n(22281);t.default={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:n,it:o}=e;if((0,r.alwaysValidSchema)(o,n)){e.fail();return}let s=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),e.failResult(s,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}}},253508:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=n(786712),o=n(22281);t.default={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>(0,r._)`{passingSchemas: ${e.passing}}`},code(e){let{gen:t,schema:n,parentSchema:s,it:a}=e;if(!Array.isArray(n))throw Error("ajv implementation error");if(a.opts.discriminator&&s.discriminator)return;let l=t.let("valid",!1),c=t.let("passing",null),u=t.name("_valid");e.setParams({passing:c}),t.block(function(){n.forEach((n,s)=>{let d;(0,o.alwaysValidSchema)(a,n)?t.var(u,!0):d=e.subschema({keyword:"oneOf",schemaProp:s,compositeRule:!0},u),s>0&&t.if((0,r._)`${u} && ${l}`).assign(l,!1).assign(c,(0,r._)`[${c}, ${s}]`).else(),t.if(u,()=>{t.assign(l,!0),t.assign(c,s),d&&e.mergeEvaluated(d,r.Name)})})}),e.result(l,()=>e.reset(),()=>e.error(!0))}}},647041:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=n(279180),o=n(786712),s=n(22281),a=n(22281);t.default={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:n,data:l,parentSchema:c,it:u}=e,{opts:d}=u,p=(0,r.allSchemaProperties)(n),h=p.filter(e=>(0,s.alwaysValidSchema)(u,n[e]));if(0===p.length||h.length===p.length&&(!u.opts.unevaluated||!0===u.props))return;let f=d.strictSchema&&!d.allowMatchingProperties&&c.properties,m=t.name("valid");!0!==u.props&&!(u.props instanceof o.Name)&&(u.props=(0,a.evaluatedPropsToName)(t,u.props));let{props:g}=u;(function(){for(let e of p)f&&function(e){for(let t in f)new RegExp(e).test(t)&&(0,s.checkStrictMode)(u,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}(e),u.allErrors?v(e):(t.var(m,!0),v(e),t.if(m))})();function v(n){t.forIn("key",l,s=>{t.if((0,o._)`${(0,r.usePattern)(e,n)}.test(${s})`,()=>{let r=h.includes(n);!r&&e.subschema({keyword:"patternProperties",schemaProp:n,dataProp:s,dataPropType:a.Type.Str},m),u.opts.unevaluated&&!0!==g?t.assign((0,o._)`${g}[${s}]`,!0):!r&&!u.allErrors&&t.if((0,o.not)(m),()=>t.break())})})}}}},85766:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=n(168307);t.default={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,r.validateTuple)(e,"items")}},461879:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=n(95721),o=n(279180),s=n(22281),a=n(811498);t.default={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:n,parentSchema:l,data:c,it:u}=e;"all"===u.opts.removeAdditional&&void 0===l.additionalProperties&&a.default.code(new r.KeywordCxt(u,a.default,"additionalProperties"));let d=(0,o.allSchemaProperties)(n);for(let e of d)u.definedProperties.add(e);u.opts.unevaluated&&d.length&&!0!==u.props&&(u.props=s.mergeEvaluated.props(t,(0,s.toHash)(d),u.props));let p=d.filter(e=>!(0,s.alwaysValidSchema)(u,n[e]));if(0===p.length)return;let h=t.name("valid");for(let r of p)(function(e){return u.opts.useDefaults&&!u.compositeRule&&void 0!==n[e].default})(r)?f(r):(t.if((0,o.propertyInData)(t,c,r,u.opts.ownProperties)),f(r),!u.allErrors&&t.else().var(h,!0),t.endIf()),e.it.definedProperties.add(r),e.ok(h);function f(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},h)}}}},391157:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=n(786712),o=n(22281);t.default={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>(0,r._)`{propertyName: ${e.propertyName}}`},code(e){let{gen:t,schema:n,data:s,it:a}=e;if((0,o.alwaysValidSchema)(a,n))return;let l=t.name("valid");t.forIn("key",s,n=>{e.setParams({propertyName:n}),e.subschema({keyword:"propertyNames",data:n,dataTypes:["string"],propertyName:n,compositeRule:!0},l),t.if((0,r.not)(l),()=>{e.error(!0),!a.allErrors&&t.break()})}),e.ok(l)}}},600692:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=n(22281);t.default={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:n}){void 0===t.if&&(0,r.checkStrictMode)(n,`"${e}" without "if" is ignored`)}}},279180:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;let r=n(786712),o=n(22281),s=n(834496),a=n(22281);t.checkReportMissingProp=function(e,t){let{gen:n,data:o,it:s}=e;n.if(u(n,o,t,s.opts.ownProperties),()=>{e.setParams({missingProperty:(0,r._)`${t}`},!0),e.error()})};t.checkMissingProp=function({gen:e,data:t,it:{opts:n}},o,s){return(0,r.or)(...o.map(o=>(0,r.and)(u(e,t,o,n.ownProperties),(0,r._)`${s} = ${o}`)))};function l(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,r._)`Object.prototype.hasOwnProperty`})}function c(e,t,n){return(0,r._)`${l(e)}.call(${t}, ${n})`}t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=l,t.isOwnProperty=c;function u(e,t,n,o){let s=(0,r._)`${t}${(0,r.getProperty)(n)} === undefined`;return o?(0,r.or)(s,(0,r.not)(c(e,t,n))):s}function d(e){return e?Object.keys(e).filter(e=>"__proto__"!==e):[]}t.propertyInData=function(e,t,n,o){let s=(0,r._)`${t}${(0,r.getProperty)(n)} !== undefined`;return o?(0,r._)`${s} && ${c(e,t,n)}`:s},t.noPropertyInData=u,t.allSchemaProperties=d;t.schemaProperties=function(e,t){return d(t).filter(n=>!(0,o.alwaysValidSchema)(e,t[n]))};t.callValidateCode=function({schemaCode:e,data:t,it:{gen:n,topSchemaRef:o,schemaPath:a,errorPath:l},it:c},u,d,p){let h=p?(0,r._)`${e}, ${t}, ${o}${a}`:t,f=[[s.default.instancePath,(0,r.strConcat)(s.default.instancePath,l)],[s.default.parentData,c.parentData],[s.default.parentDataProperty,c.parentDataProperty],[s.default.rootData,s.default.rootData]];c.opts.dynamicRef&&f.push([s.default.dynamicAnchors,s.default.dynamicAnchors]);let m=(0,r._)`${h}, ${n.object(...f)}`;return d!==r.nil?(0,r._)`${u}.call(${d}, ${m})`:(0,r._)`${u}(${m})`};let p=(0,r._)`new RegExp`;t.usePattern=function({gen:e,it:{opts:t}},n){let o=t.unicodeRegExp?"u":"",{regExp:s}=t.code,l=s(n,o);return e.scopeValue("pattern",{key:l.toString(),ref:l,code:(0,r._)`${"new RegExp"===s.code?p:(0,a.useFunc)(e,s)}(${n}, ${o})`})};t.validateArray=function(e){let{gen:t,data:n,keyword:s,it:a}=e,l=t.name("valid");if(a.allErrors){let e=t.let("valid",!0);return c(()=>t.assign(e,!1)),e}return t.var(l,!0),c(()=>t.break()),l;function c(a){let c=t.const("len",(0,r._)`${n}.length`);t.forRange("i",0,c,n=>{e.subschema({keyword:s,dataProp:n,dataPropType:o.Type.Num},l),t.if((0,r.not)(l),a)})}};t.validateUnion=function(e){let{gen:t,schema:n,keyword:s,it:a}=e;if(!Array.isArray(n))throw Error("ajv implementation error");if(n.some(e=>(0,o.alwaysValidSchema)(a,e))&&!a.opts.unevaluated)return;let l=t.let("valid",!1),c=t.name("_valid");t.block(()=>n.forEach((n,o)=>{let a=e.subschema({keyword:s,schemaProp:o,compositeRule:!0},c);t.assign(l,(0,r._)`${l} || ${c}`),!e.mergeValidEvaluated(a,c)&&t.if((0,r.not)(l))})),e.result(l,()=>e.reset(),()=>e.error(!0))}},854525:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={keyword:"id",code(){throw Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}}},796337:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=n(854525),o=n(748332),s=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",r.default,o.default];t.default=s},748332:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;let r=n(10333),o=n(279180),s=n(786712),a=n(834496),l=n(43261),c=n(22281);function u(e,t){let{gen:n}=e;return t.validate?n.scopeValue("validate",{ref:t.validate}):(0,s._)`${n.scopeValue("wrapper",{ref:t})}.validate`}function d(e,t,n,r){let{gen:l,it:u}=e,{allErrors:d,schemaEnv:p,opts:h}=u,f=h.passContext?a.default.this:s.nil;r?function(){if(!p.$async)throw Error("async schema referenced by sync schema");let n=l.let("valid");l.try(()=>{l.code((0,s._)`await ${(0,o.callValidateCode)(e,t,f)}`),g(t),!d&&l.assign(n,!0)},e=>{l.if((0,s._)`!(${e} instanceof ${u.ValidationError})`,()=>l.throw(e)),m(e),!d&&l.assign(n,!1)}),e.ok(n)}():function(){e.result((0,o.callValidateCode)(e,t,f),()=>g(t),()=>m(t))}();function m(e){let t=(0,s._)`${e}.errors`;l.assign(a.default.vErrors,(0,s._)`${a.default.vErrors} === null ? ${t} : ${a.default.vErrors}.concat(${t})`),l.assign(a.default.errors,(0,s._)`${a.default.vErrors}.length`)}function g(e){var t;if(!u.opts.unevaluated)return;let r=null===(t=null==n?void 0:n.validate)||void 0===t?void 0:t.evaluated;if(!0!==u.props){if(r&&!r.dynamicProps)void 0!==r.props&&(u.props=c.mergeEvaluated.props(l,r.props,u.props));else{let t=l.var("props",(0,s._)`${e}.evaluated.props`);u.props=c.mergeEvaluated.props(l,t,u.props,s.Name)}}if(!0!==u.items){if(r&&!r.dynamicItems)void 0!==r.items&&(u.items=c.mergeEvaluated.items(l,r.items,u.items));else{let t=l.var("items",(0,s._)`${e}.evaluated.items`);u.items=c.mergeEvaluated.items(l,t,u.items,s.Name)}}}}t.getValidate=u,t.callRef=d,t.default={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:n,it:o}=e,{baseId:a,schemaEnv:c,validateName:p,opts:h,self:f}=o,{root:m}=c;if(("#"===n||"#/"===n)&&a===m.baseId)return function(){if(c===m)return d(e,p,c,c.$async);let n=t.scopeValue("root",{ref:m});return d(e,(0,s._)`${n}.validate`,m,m.$async)}();let g=l.resolveRef.call(f,m,a,n);if(void 0===g)throw new r.default(o.opts.uriResolver,a,n);return g instanceof l.SchemaEnv?function(t){let n=u(e,t);d(e,n,t,t.$async)}(g):function(r){let o=t.scopeValue("schema",!0===h.code.source?{ref:r,code:(0,s.stringify)(r)}:{ref:r}),a=t.name("valid"),l=e.subschema({schema:r,dataTypes:[],schemaPath:s.nil,topSchemaRef:o,errSchemaPath:n},a);e.mergeEvaluated(l),e.ok(a)}(g)}}},165463:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=n(786712),o=n(320235),s=n(43261),a=n(22281);t.default={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===o.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:n}})=>(0,r._)`{error: ${e}, tag: ${n}, tagValue: ${t}}`},code(e){let{gen:t,data:n,schema:l,parentSchema:c,it:u}=e,{oneOf:d}=c;if(!u.opts.discriminator)throw Error("discriminator: requires discriminator option");let p=l.propertyName;if("string"!=typeof p)throw Error("discriminator: requires propertyName");if(l.mapping)throw Error("discriminator: mapping is not supported");if(!d)throw Error("discriminator: requires oneOf keyword");let h=t.let("valid",!1),f=t.const("tag",(0,r._)`${n}${(0,r.getProperty)(p)}`);t.if((0,r._)`typeof ${f} == "string"`,()=>(function(){let n=function(){var e;let t={},n=o(c),r=!0;for(let t=0;t<d.length;t++){let c=d[t];(null==c?void 0:c.$ref)&&!(0,a.schemaHasRulesButRef)(c,u.self.RULES)&&(c=s.resolveRef.call(u.self,u.schemaEnv.root,u.baseId,null==c?void 0:c.$ref))instanceof s.SchemaEnv&&(c=c.schema);let h=null===(e=null==c?void 0:c.properties)||void 0===e?void 0:e[p];if("object"!=typeof h)throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${p}"`);r=r&&(n||o(c)),function(e,t){if(e.const)l(e.const,t);else if(e.enum)for(let n of e.enum)l(n,t);else throw Error(`discriminator: "properties/${p}" must have "const" or "enum"`)}(h,t)}if(!r)throw Error(`discriminator: "${p}" must be required`);return t;function o({required:e}){return Array.isArray(e)&&e.includes(p)}function l(e,n){if("string"!=typeof e||e in t)throw Error(`discriminator: "${p}" values must be unique strings`);t[e]=n}}();for(let o in t.if(!1),n)t.elseIf((0,r._)`${f} === ${o}`),t.assign(h,function(n){let o=t.name("valid"),s=e.subschema({keyword:"oneOf",schemaProp:n},o);return e.mergeEvaluated(s,r.Name),o}(n[o]));t.else(),e.error(!1,{discrError:o.DiscrError.Mapping,tag:f,tagName:p}),t.endIf()})(),()=>e.error(!1,{discrError:o.DiscrError.Tag,tag:f,tagName:p})),e.ok(h)}}},320235:function(e,t){"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,(r=t.DiscrError||(t.DiscrError={})).Tag="tag",r.Mapping="mapping"},555660:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=n(796337),o=n(715489),s=n(256999),a=n(620832),l=n(845601),c=[r.default,o.default,(0,s.default)(),a.default,l.metadataVocabulary,l.contentVocabulary];t.default=c},905559:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=n(786712);t.default={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>(0,r.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,r._)`{format: ${e}}`},code(e,t){let{gen:n,data:o,$data:s,schema:a,schemaCode:l,it:c}=e,{opts:u,errSchemaPath:d,schemaEnv:p,self:h}=c;u.validateFormats&&(s?function(){let s=n.scopeValue("formats",{ref:h.formats,code:u.code.formats}),a=n.const("fDef",(0,r._)`${s}[${l}]`),c=n.let("fType"),d=n.let("format");n.if((0,r._)`typeof ${a} == "object" && !(${a} instanceof RegExp)`,()=>n.assign(c,(0,r._)`${a}.type || "string"`).assign(d,(0,r._)`${a}.validate`),()=>n.assign(c,(0,r._)`"string"`).assign(d,a)),e.fail$data((0,r.or)(function(){return!1===u.strictSchema?r.nil:(0,r._)`${l} && !${d}`}(),function(){let e=p.$async?(0,r._)`(${a}.async ? await ${d}(${o}) : ${d}(${o}))`:(0,r._)`${d}(${o})`,n=(0,r._)`(typeof ${d} == "function" ? ${e} : ${d}.test(${o}))`;return(0,r._)`${d} && ${d} !== true && ${c} === ${t} && !${n}`}()))}():function(){let s=h.formats[a];if(!s){(function(){if(!1===u.strictSchema){h.logger.warn(e());return}throw Error(e());function e(){return`unknown format "${a}" ignored in schema at path "${d}"`}})();return}if(!0===s)return;let[l,c,f]=function(e){let t=e instanceof RegExp?(0,r.regexpCode)(e):u.code.formats?(0,r._)`${u.code.formats}${(0,r.getProperty)(a)}`:void 0,o=n.scopeValue("formats",{key:a,ref:e,code:t});return"object"!=typeof e||e instanceof RegExp?["string",e,o]:[e.type||"string",e.validate,(0,r._)`${o}.validate`]}(s);l===t&&e.pass(function(){if("object"==typeof s&&!(s instanceof RegExp)&&s.async){if(!p.$async)throw Error("async format in sync schema");return(0,r._)`await ${f}(${o})`}return"function"==typeof c?(0,r._)`${f}(${o})`:(0,r._)`${f}.test(${o})`}())}())}}},620832:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=[n(905559).default];t.default=r},845601:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},379951:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=n(786712),o=n(22281),s=n(813648);t.default={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>(0,r._)`{allowedValue: ${e}}`},code(e){let{gen:t,data:n,$data:a,schemaCode:l,schema:c}=e;a||c&&"object"==typeof c?e.fail$data((0,r._)`!${(0,o.useFunc)(t,s.default)}(${n}, ${l})`):e.fail((0,r._)`${c} !== ${n}`)}}},397695:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=n(786712),o=n(22281),s=n(813648);t.default={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,r._)`{allowedValues: ${e}}`},code(e){let t,n;let{gen:a,data:l,$data:c,schema:u,schemaCode:d,it:p}=e;if(!c&&0===u.length)throw Error("enum must have non-empty array");let h=u.length>=p.opts.loopEnum,f=()=>null!=t?t:t=(0,o.useFunc)(a,s.default);if(h||c)n=a.let("valid"),e.block$data(n,function(){a.assign(n,!1),a.forOf("v",d,e=>a.if((0,r._)`${f()}(${l}, ${e})`,()=>a.assign(n,!0).break()))});else{if(!Array.isArray(u))throw Error("ajv implementation error");let e=a.const("vSchema",d);n=(0,r.or)(...u.map((t,n)=>(function(e,t){let n=u[t];return"object"==typeof n&&null!==n?(0,r._)`${f()}(${l}, ${e}[${t}])`:(0,r._)`${l} === ${n}`})(e,n)))}e.pass(n)}}},715489:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=n(742088),o=n(511673),s=n(871845),a=n(253004),l=n(962930),c=n(150497),u=n(843322),d=n(332710),p=n(379951),h=n(397695),f=[r.default,o.default,s.default,a.default,l.default,c.default,u.default,d.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},p.default,h.default];t.default=f},843322:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=n(786712);t.default={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:t})=>(0,r.str)`must NOT have ${"maxItems"===e?"more":"fewer"} than ${t} items`,params:({schemaCode:e})=>(0,r._)`{limit: ${e}}`},code(e){let{keyword:t,data:n,schemaCode:o}=e,s="maxItems"===t?r.operators.GT:r.operators.LT;e.fail$data((0,r._)`${n}.length ${s} ${o}`)}}},871845:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=n(786712),o=n(22281),s=n(519144);t.default={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:t})=>(0,r.str)`must NOT have ${"maxLength"===e?"more":"fewer"} than ${t} characters`,params:({schemaCode:e})=>(0,r._)`{limit: ${e}}`},code(e){let{keyword:t,data:n,schemaCode:a,it:l}=e,c="maxLength"===t?r.operators.GT:r.operators.LT,u=!1===l.opts.unicode?(0,r._)`${n}.length`:(0,r._)`${(0,o.useFunc)(e.gen,s.default)}(${n})`;e.fail$data((0,r._)`${u} ${c} ${a}`)}}},742088:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=n(786712),o=r.operators,s={maximum:{okStr:"<=",ok:o.LTE,fail:o.GT},minimum:{okStr:">=",ok:o.GTE,fail:o.LT},exclusiveMaximum:{okStr:"<",ok:o.LT,fail:o.GTE},exclusiveMinimum:{okStr:">",ok:o.GT,fail:o.LTE}},a={keyword:Object.keys(s),type:"number",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:t})=>(0,r.str)`must be ${s[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,r._)`{comparison: ${s[e].okStr}, limit: ${t}}`},code(e){let{keyword:t,data:n,schemaCode:o}=e;e.fail$data((0,r._)`${n} ${s[t].fail} ${o} || isNaN(${n})`)}};t.default=a},962930:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=n(786712);t.default={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:t})=>(0,r.str)`must NOT have ${"maxProperties"===e?"more":"fewer"} than ${t} properties`,params:({schemaCode:e})=>(0,r._)`{limit: ${e}}`},code(e){let{keyword:t,data:n,schemaCode:o}=e,s="maxProperties"===t?r.operators.GT:r.operators.LT;e.fail$data((0,r._)`Object.keys(${n}).length ${s} ${o}`)}}},511673:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=n(786712);t.default={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>(0,r.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,r._)`{multipleOf: ${e}}`},code(e){let{gen:t,data:n,schemaCode:o,it:s}=e,a=s.opts.multipleOfPrecision,l=t.let("res"),c=a?(0,r._)`Math.abs(Math.round(${l}) - ${l}) > 1e-${a}`:(0,r._)`${l} !== parseInt(${l})`;e.fail$data((0,r._)`(${o} === 0 || (${l} = ${n}/${o}, ${c}))`)}}},253004:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=n(279180),o=n(786712);t.default={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>(0,o.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,o._)`{pattern: ${e}}`},code(e){let{data:t,$data:n,schema:s,schemaCode:a,it:l}=e,c=l.opts.unicodeRegExp?"u":"",u=n?(0,o._)`(new RegExp(${a}, ${c}))`:(0,r.usePattern)(e,s);e.fail$data((0,o._)`!${u}.test(${t})`)}}},150497:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=n(279180),o=n(786712),s=n(22281);t.default={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>(0,o.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,o._)`{missingProperty: ${e}}`},code(e){let{gen:t,schema:n,schemaCode:a,data:l,$data:c,it:u}=e,{opts:d}=u;if(!c&&0===n.length)return;let p=n.length>=d.loopRequired;if(u.allErrors?function(){if(p||c)e.block$data(o.nil,h);else for(let t of n)(0,r.checkReportMissingProp)(e,t)}():function(){let s=t.let("missing");if(p||c){let n=t.let("valid",!0);e.block$data(n,()=>(function(n,s){e.setParams({missingProperty:n}),t.forOf(n,a,()=>{t.assign(s,(0,r.propertyInData)(t,l,n,d.ownProperties)),t.if((0,o.not)(s),()=>{e.error(),t.break()})},o.nil)})(s,n)),e.ok(n)}else t.if((0,r.checkMissingProp)(e,n,s)),(0,r.reportMissingProp)(e,s),t.else()}(),d.strictRequired){let t=e.parentSchema.properties,{definedProperties:r}=e.it;for(let e of n)if((null==t?void 0:t[e])===void 0&&!r.has(e)){let t=u.schemaEnv.baseId+u.errSchemaPath,n=`required property "${e}" is not defined at "${t}" (strictRequired)`;(0,s.checkStrictMode)(u,n,u.opts.strictRequired)}}function h(){t.forOf("prop",a,n=>{e.setParams({missingProperty:n}),t.if((0,r.noPropertyInData)(t,l,n,d.ownProperties),()=>e.error())})}}}},332710:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=n(225038),o=n(786712),s=n(22281),a=n(813648);t.default={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>(0,o.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,o._)`{i: ${e}, j: ${t}}`},code(e){let{gen:t,data:n,$data:l,schema:c,parentSchema:u,schemaCode:d,it:p}=e;if(!l&&!c)return;let h=t.let("valid"),f=u.items?(0,r.getSchemaTypes)(u.items):[];e.block$data(h,function(){let l=t.let("i",(0,o._)`${n}.length`),c=t.let("j");e.setParams({i:l,j:c}),t.assign(h,!0),t.if((0,o._)`${l} > 1`,()=>((function(){return f.length>0&&!f.some(e=>"object"===e||"array"===e)})()?function(s,a){let l=t.name("item"),c=(0,r.checkDataTypes)(f,l,p.opts.strictNumbers,r.DataType.Wrong),u=t.const("indices",(0,o._)`{}`);t.for((0,o._)`;${s}--;`,()=>{t.let(l,(0,o._)`${n}[${s}]`),t.if(c,(0,o._)`continue`),f.length>1&&t.if((0,o._)`typeof ${l} == "string"`,(0,o._)`${l} += "_"`),t.if((0,o._)`typeof ${u}[${l}] == "number"`,()=>{t.assign(a,(0,o._)`${u}[${l}]`),e.error(),t.assign(h,!1).break()}).code((0,o._)`${u}[${l}] = ${s}`)})}:function(r,l){let c=(0,s.useFunc)(t,a.default),u=t.name("outer");t.label(u).for((0,o._)`;${r}--;`,()=>t.for((0,o._)`${l} = ${r}; ${l}--;`,()=>t.if((0,o._)`${c}(${n}[${r}], ${n}[${l}])`,()=>{e.error(),t.assign(h,!1).break(u)})))})(l,c))},(0,o._)`${d} === false`),e.ok(h)}}},826581:function(e){var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join("")}}};e.exports=t},47273:function(e){e.exports=function(){return this.minute="*",this.minuteFreq=null,this.hour="*",this.hourFreq=null,this.daysOfMonth="*",this.dayFreq=null,this.month="*",this.monthFreq=null,this.daysOfWeek="*",this._currFrequency=null,this.every=e=>{if(isNaN(e)||!Number.isInteger(e)||e<0)throw Error("cronGenerator.every expects an integer argument");return this._currFrequency=e,this},this.betweenMinutes=e=>{if(!Array.isArray(e)||2!==e.length)throw Error("cronGenerator.betweenMinutes expects an array with two integer values");for(i=0;i<e.length;i++)if(!Number.isInteger(e[i])||e[i]<0||e[i]>59)throw Error("cronGenerator.betweenMinutes expects an array of integers between 0 and 59");if(e[0]>e[1]){var t,n=[];n[0]=e[0]+(59===e[0]?"":"-59"),n[1]="0-"+e[1],t=n.join(",")}else t=e.join("-");return this.minute=t,this},this.betweenHours=e=>{if(!Array.isArray(e)||2!==e.length)throw Error("cronGenerator.betweenHours expects an array with two integer values");for(i=0;i<e.length;i++)if(!Number.isInteger(e[i])||e[i]<0||e[i]>24)throw Error("cronGenerator.betweenMinutes expects an array of integers between 0 and 24");if(e[0]>e[1]){var t,n=[];n[0]=e[0]+(23===e[0]?"":"-23"),n[1]="0-"+e[1],t=n.join(",")}else t=e.join("-");return this.hour=t,this},this.betweenDays=e=>{if(!Array.isArray(e)||2!==e.length)throw Error("cronGenerator.betweenDays expects an array with two integer values");for(i=0;i<e.length;i++)if(!Number.isInteger(e[i])||e[i]<1||e[i]>31)throw Error("cronGenerator.betweenDays expects an array of integers between 1 and 31");if(e[0]>e[1]){var t,n=[];n[0]=e[0]+(31===e[0]?"":"-31"),n[1]="1-"+e[1],t=n.join(",")}else t=e.join("-");return this.daysOfMonth=t,this},this.betweenMonths=e=>{if(!Array.isArray(e)||2!==e.length)throw Error("cronGenerator.betweenMonths expects an array with two integer values");for(i=0;i<e.length;i++)if(!Number.isInteger(e[i])||e[i]<1||e[i]>12)throw Error("cronGenerator.betweenMonths expects an array of integers between 1 and 12");if(e[0]>e[1]){var t,n=[];n[0]=e[0]+(12===e[0]?"":"-12"),n[1]="1-"+e[1],t=n.join(",")}else t=e.join("-");return this.month=t,this},this.betweenDaysOfMonth=e=>{if(!Array.isArray(e)||2!==e.length)throw Error("cronGenerator.betweenDaysOfMonth expects an array with two integer values");for(i=0;i<e.length;i++)if(!Number.isInteger(e[i])||e[i]<1||e[i]>31)throw Error("cronGenerator.betweenDaysOfMonth expects an array of integers between 1 and 31");if(e[0]>e[1]){var t,n=[];n[0]=e[0]+(31===e[0]?"":"-31"),n[1]="1-"+e[1],t=n.join(",")}else t=e.join("-");return this.daysOfMonth=t,this},this.atMinute=e=>{for(!Array.isArray(e)&&(e=[e]),i=0;i<e.length;i++)if(isNaN(e[i])||!Number.isInteger(e[i])||e[i]<0||e[i]>59)throw Error("cronGenerator.atMinutes expects an integer argument between 0 and 59");return this.minute=e.join(","),this},this.atHour=e=>{for(!Array.isArray(e)&&(e=[e]),i=0;i<e.length;i++)if(isNaN(e[i])||!Number.isInteger(e[i])||e[i]<0||e[i]>24)throw Error("cronGenerator.atHour expects an integer argument between 0 and 24");return this.hour=e.join(","),this},this.atMonth=e=>{for(!Array.isArray(e)&&(e=[e]),i=0;i<e.length;i++)if(isNaN(e[i])||!Number.isInteger(e[i])||e[i]<1||e[i]>12)throw Error("cronGenerator.atMonth expects an integer argument between 1 and 12");return this.month=e.join(","),this},this.onDaysOfMonth=e=>{for(!Array.isArray(e)&&(e=[e]),i=0;i<e.length;i++)if(isNaN(e[i])||!Number.isInteger(e[i])||e[i]<1||e[i]>31)throw Error("cronGenerator.onDaysOfMonth expects an integer argument between 1 and 31");return this.daysOfMonth=e.join(","),this},this.onDaysOfWeek=e=>{for(!Array.isArray(e)&&(e=[e]),i=0;i<e.length;i++)if(isNaN(e[i])||!Number.isInteger(e[i])||e[i]<0||e[i]>6)throw Error("cronGenerator.onDaysOfWeek expects an integer argument between 0 and 6");return this.daysOfWeek=e.join(","),this},this.minutes=()=>{if(!this._currFrequency)throw Error("cronGenerator.minutes must be called after cronGenerator.every");if(this._currFrequency>59||this._currFrequency<0)throw Error("cronGenerator.every(x).minutes() expects x to be an integer between 0 and 59");return this.minuteFreq=this._currFrequency,this._currFrequency=null,this},this.hours=()=>{if(!this._currFrequency)throw Error("cronGenerator.hours() must be called after cronGenerator.every");if(this._currFrequency>24||this._currFrequency<0)throw Error("cronGenerator.every(x).hours() expects x to be an integer between 0 and 24");return this.hourFreq=this._currFrequency,this._currFrequency=null,this},this.months=()=>{if(!this._currFrequency)throw Error("cronGenerator.months() must be called after cronGenerator.every");if(this._currFrequency>12||this._currFrequency<1)throw Error("cronGenerator.every(x).months() expects x to be an integer between 1 and 12");return this.monthFreq=this._currFrequency,this._currFrequency=null,this},this.days=()=>{if(!this._currFrequency)throw Error("cronGenerator.days() must be called after cronGenerator.every");return this.dayFreq=this._currFrequency,this._currFrequency=null,this},this._calcMinutes=()=>this.minuteFreq&&1!==this.minuteFreq?`${this.minute}/${this.minuteFreq}`:this.minute,this._calcHours=()=>this.hourFreq&&1!==this.hourFreq?`${this.hour}/${this.hourFreq}`:this.hour,this._calcMonths=()=>this.monthFreq&&1!==this.monthFreq?`${this.month}/${this.monthFreq}`:this.month,this._calcDays=()=>this.dayFreq&&1!==this.dayFreq?`${this.daysOfMonth}/${this.dayFreq}`:this.daysOfMonth,this.toString=()=>{if(null!=this._currFrequency)throw Error("cronGenerator expects you to call one of 'minutes()', 'hours()', 'days()' or 'months()' after each call to 'every()'");return this._calcMinutes()+" "+this._calcHours()+" "+this._calcDays()+" "+this._calcMonths()+" "+this.daysOfWeek},this}},730752:function(e){var t,n;t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 0xff00ff&n.rotl(e,8)|0xff00ff00&n.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=n.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,r=0;n<e.length;n++,r+=8)t[r>>>5]|=e[n]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n<e.length;n++)t.push((e[n]>>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},bytesToBase64:function(e){for(var n=[],r=0;r<e.length;r+=3){for(var o=e[r]<<16|e[r+1]<<8|e[r+2],s=0;s<4;s++)8*r+6*s<=8*e.length?n.push(t.charAt(o>>>6*(3-s)&63)):n.push("=")}return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/ig,"");for(var n=[],r=0,o=0;r<e.length;o=++r%4)0!=o&&n.push((t.indexOf(e.charAt(r-1))&Math.pow(2,-2*o+8)-1)<<2*o|t.indexOf(e.charAt(r))>>>6-2*o);return n}},e.exports=n},315528:function(e,t,n){"use strict";n.d(t,{ue:function(){return o}});var r=(0,n(833693).Z)(","),o=r.parse;r.parseRows,r.format,r.formatBody,r.formatRows,r.formatRow,r.formatValue},833693:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r={},o={};function s(e){return Function("d","return {"+e.map(function(e,t){return JSON.stringify(e)+": d["+t+'] || ""'}).join(",")+"}")}function a(e){var t=Object.create(null),n=[];return e.forEach(function(e){for(var r in e)!(r in t)&&n.push(t[r]=r)}),n}function l(e,t){var n=e+"",r=n.length;return r<t?Array(t-r+1).join(0)+n:n}function c(e){var t=RegExp('["'+e+"\n\r]"),n=e.charCodeAt(0);function c(e,t){var s,a=[],l=e.length,c=0,u=0,d=l<=0,p=!1;function h(){if(d)return o;if(p)return p=!1,r;var t,s,a=c;if(34===e.charCodeAt(a)){for(;c++<l&&34!==e.charCodeAt(c)||34===e.charCodeAt(++c););return(t=c)>=l?d=!0:10===(s=e.charCodeAt(c++))?p=!0:13===s&&(p=!0,10===e.charCodeAt(c)&&++c),e.slice(a+1,t-1).replace(/""/g,'"')}for(;c<l;){if(10===(s=e.charCodeAt(t=c++)))p=!0;else if(13===s)p=!0,10===e.charCodeAt(c)&&++c;else if(s!==n)continue;return e.slice(a,t)}return d=!0,e.slice(a,l)}for(10===e.charCodeAt(l-1)&&--l,13===e.charCodeAt(l-1)&&--l;(s=h())!==o;){for(var f=[];s!==r&&s!==o;)f.push(s),s=h();if(!t||null!=(f=t(f,u++)))a.push(f)}return a}function u(t,n){return t.map(function(t){return n.map(function(e){return p(t[e])}).join(e)})}function d(t){return t.map(p).join(e)}function p(e){var n,r,o,s,a,c;return null==e?"":e instanceof Date?(r=(n=e).getUTCHours(),o=n.getUTCMinutes(),s=n.getUTCSeconds(),a=n.getUTCMilliseconds(),isNaN(n)?"Invalid Date":(c=n.getUTCFullYear(),(c<0?"-"+l(-c,6):c>9999?"+"+l(c,6):l(c,4))+"-"+l(n.getUTCMonth()+1,2)+"-"+l(n.getUTCDate(),2)+(a?"T"+l(r,2)+":"+l(o,2)+":"+l(s,2)+"."+l(a,3)+"Z":s?"T"+l(r,2)+":"+l(o,2)+":"+l(s,2)+"Z":o||r?"T"+l(r,2)+":"+l(o,2)+"Z":""))):t.test(e+="")?'"'+e.replace(/"/g,'""')+'"':e}return{parse:function(e,t){var n,r,o=c(e,function(e,o){var a,l,c;if(n)return n(e,o-1);r=e,n=t?(a=e,l=t,c=s(a),function(e,t){return l(c(e),t,a)}):s(e)});return o.columns=r||[],o},parseRows:c,format:function(t,n){return null==n&&(n=a(t)),[n.map(p).join(e)].concat(u(t,n)).join("\n")},formatBody:function(e,t){return null==t&&(t=a(e)),u(e,t).join("\n")},formatRows:function(e){return e.map(d).join("\n")},formatRow:d,formatValue:p}}},256706:function(e,t,n){"use strict";n.d(t,{tJ:function(){return o}});var r=(0,n(833693).Z)(" "),o=r.parse;r.parseRows,r.format,r.formatBody,r.formatRows,r.formatRow,r.formatValue},468329:function(e){var t,n;t=0,n=function(){return function(e,t,n){var r=function(e){return e.add(4-e.isoWeekday(),"day")},o=t.prototype;o.isoWeekYear=function(){return r(this).year()},o.isoWeek=function(e){if(!this.$utils().u(e))return this.add(7*(e-this.isoWeek()),"day");var t,o,s,a=r(this),l=(t=this.isoWeekYear(),s=4-(o=(this.$u?n.utc:n)().year(t).startOf("year")).isoWeekday(),o.isoWeekday()>4&&(s+=7),o.add(s,"day"));return a.diff(l,"week")+1},o.isoWeekday=function(e){return this.$utils().u(e)?this.day()||7:this.day(this.day()%7?e:e-7)};var s=o.startOf;o.startOf=function(e,t){var n=this.$utils(),r=!!n.u(t)||t;return"isoweek"===n.p(e)?r?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):s.bind(this)(e,t)}}},e.exports=n()},703999:function(e){var t,n;t=0,n=function(){"use strict";var e="month",t="quarter";return function(n,r){var o=r.prototype;o.quarter=function(e){return this.$utils().u(e)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(e-1))};var s=o.add;o.add=function(n,r){return n=Number(n),this.$utils().p(r)===t?this.add(3*n,e):s.bind(this)(n,r)};var a=o.startOf;o.startOf=function(n,r){var o=this.$utils(),s=!!o.u(r)||r;if(o.p(n)===t){var l=this.quarter()-1;return s?this.month(3*l).startOf(e).startOf("day"):this.month(3*l+2).endOf(e).endOf("day")}return a.bind(this)(n,r)}}},e.exports=n()},954446:function(e){"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function s(e,t,r,s,a){if("function"!=typeof r)throw TypeError("The listener must be a function");var l=new o(r,s||e,a),c=n?n+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],l]:e._events[c].push(l):(e._events[c]=l,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function l(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),!new r().__proto__&&(n=!1)),l.prototype.eventNames=function(){var e,r,o=[];if(0===this._eventsCount)return o;for(r in e=this._events)t.call(e,r)&&o.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},l.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var o=0,s=r.length,a=Array(s);o<s;o++)a[o]=r[o].fn;return a},l.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},l.prototype.emit=function(e,t,r,o,s,a){var l=n?n+e:e;if(!this._events[l])return!1;var c,u,d=this._events[l],p=arguments.length;if(d.fn){switch(d.once&&this.removeListener(e,d.fn,void 0,!0),p){case 1:return d.fn.call(d.context),!0;case 2:return d.fn.call(d.context,t),!0;case 3:return d.fn.call(d.context,t,r),!0;case 4:return d.fn.call(d.context,t,r,o),!0;case 5:return d.fn.call(d.context,t,r,o,s),!0;case 6:return d.fn.call(d.context,t,r,o,s,a),!0}for(u=1,c=Array(p-1);u<p;u++)c[u-1]=arguments[u];d.fn.apply(d.context,c)}else{var h,f=d.length;for(u=0;u<f;u++)switch(d[u].once&&this.removeListener(e,d[u].fn,void 0,!0),p){case 1:d[u].fn.call(d[u].context);break;case 2:d[u].fn.call(d[u].context,t);break;case 3:d[u].fn.call(d[u].context,t,r);break;case 4:d[u].fn.call(d[u].context,t,r,o);break;default:if(!c)for(h=1,c=Array(p-1);h<p;h++)c[h-1]=arguments[h];d[u].fn.apply(d[u].context,c)}}return!0},l.prototype.on=function(e,t,n){return s(this,e,t,n,!1)},l.prototype.once=function(e,t,n){return s(this,e,t,n,!0)},l.prototype.removeListener=function(e,t,r,o){var s=n?n+e:e;if(!this._events[s])return this;if(!t)return a(this,s),this;var l=this._events[s];if(l.fn)l.fn===t&&(!o||l.once)&&(!r||l.context===r)&&a(this,s);else{for(var c=0,u=[],d=l.length;c<d;c++)(l[c].fn!==t||o&&!l[c].once||r&&l[c].context!==r)&&u.push(l[c]);u.length?this._events[s]=1===u.length?u[0]:u:a(this,s)}return this},l.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&a(this,t)):(this._events=new r,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=n,l.EventEmitter=l;e.exports=l},405816:function(e,t){"use strict";function n(e){return"object"!=typeof e||"toString"in e?e:Object.prototype.toString.call(e).slice(8,-1)}Object.defineProperty(t,"__esModule",{value:!0});var r="object"==typeof process;function o(e,t){if(!e){if(r)throw Error("Invariant failed");throw Error(t())}}t.invariant=o;var s=Object.prototype.hasOwnProperty,a=Array.prototype.splice,l=Object.prototype.toString;function c(e){return l.call(e).slice(8,-1)}var u=Object.assign||function(e,t){return d(t).forEach(function(n){s.call(t,n)&&(e[n]=t[n])}),e},d="function"==typeof Object.getOwnPropertySymbols?function(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.keys(e)};function p(e){return Array.isArray(e)?u(e.constructor(e.length),e):"Map"===c(e)?new Map(e):"Set"===c(e)?new Set(e):e&&"object"==typeof e?u(Object.create(Object.getPrototypeOf(e)),e):e}var h=function(){function e(){this.commands=u({},f),this.update=this.update.bind(this),this.update.extend=this.extend=this.extend.bind(this),this.update.isEquals=function(e,t){return e===t},this.update.newContext=function(){return new e().update}}return Object.defineProperty(e.prototype,"isEquals",{get:function(){return this.update.isEquals},set:function(e){this.update.isEquals=e},enumerable:!0,configurable:!0}),e.prototype.extend=function(e,t){this.commands[e]=t},e.prototype.update=function(e,t){var n=this,r="function"==typeof t?{$apply:t}:t;!(Array.isArray(e)&&Array.isArray(r))&&o(!Array.isArray(r),function(){return"update(): You provided an invalid spec to update(). The spec may not contain an array except as the value of $set, $push, $unshift, $splice or any custom command allowing an array value."}),o("object"==typeof r&&null!==r,function(){return"update(): You provided an invalid spec to update(). The spec and every included key path must be plain objects containing one of the following commands: "+Object.keys(n.commands).join(", ")+"."});var a=e;return d(r).forEach(function(t){if(s.call(n.commands,t)){var o=e===a;a=n.commands[t](r[t],a,r,e),o&&n.isEquals(a,e)&&(a=e)}else{var l="Map"===c(e)?n.update(e.get(t),r[t]):n.update(e[t],r[t]),u="Map"===c(a)?a.get(t):a[t];(!n.isEquals(l,u)||void 0===l&&!s.call(e,t))&&(a===e&&(a=p(e)),"Map"===c(a)?a.set(t,l):a[t]=l)}}),a},e}();t.Context=h;var f={$push:function(e,t,n){return g(t,n,"$push"),e.length?t.concat(e):t},$unshift:function(e,t,n){return g(t,n,"$unshift"),e.length?e.concat(t):t},$splice:function(e,t,r,s){return function(e,t){o(Array.isArray(e),function(){return"Expected $splice target to be an array; got "+n(e)}),b(t.$splice)}(t,r),e.forEach(function(e){b(e),t===s&&e.length&&(t=p(s)),a.apply(t,e)}),t},$set:function(e,t,n){return function(e){o(1===Object.keys(e).length,function(){return"Cannot have more than one key in an object with $set"})}(n),e},$toggle:function(e,t){v(e,"$toggle");var n=e.length?p(t):t;return e.forEach(function(e){n[e]=!t[e]}),n},$unset:function(e,t,n,r){return v(e,"$unset"),e.forEach(function(e){Object.hasOwnProperty.call(t,e)&&(t===r&&(t=p(r)),delete t[e])}),t},$add:function(e,t,n,r){return y(t,"$add"),v(e,"$add"),"Map"===c(t)?e.forEach(function(e){var n=e[0],o=e[1];t===r&&t.get(n)!==o&&(t=p(r)),t.set(n,o)}):e.forEach(function(e){t===r&&!t.has(e)&&(t=p(r)),t.add(e)}),t},$remove:function(e,t,n,r){return y(t,"$remove"),v(e,"$remove"),e.forEach(function(e){t===r&&t.has(e)&&(t=p(r)),t.delete(e)}),t},$merge:function(e,t,r,s){return function(e,t){o(t&&"object"==typeof t,function(){return"update(): $merge expects a spec of type 'object'; got "+n(t)}),o(e&&"object"==typeof e,function(){return"update(): $merge expects a target of type 'object'; got "+n(e)})}(t,e),d(e).forEach(function(n){e[n]!==t[n]&&(t===s&&(t=p(s)),t[n]=e[n])}),t},$apply:function(e,t){return function(e){o("function"==typeof e,function(){return"update(): expected spec of $apply to be a function; got "+n(e)+"."})}(e),e(t)}},m=new h;function g(e,t,r){o(Array.isArray(e),function(){return"update(): expected target of "+n(r)+" to be an array; got "+n(e)+"."}),v(t[r],r)}function v(e,t){o(Array.isArray(e),function(){return"update(): expected spec of "+n(t)+" to be an array; got "+n(e)+". Did you forget to wrap your parameter in an array?"})}t.isEquals=m.update.isEquals,t.extend=m.extend,t.default=m.update,t.default.default=e.exports=u(t.default,t);function b(e){o(Array.isArray(e),function(){return"update(): expected spec of $splice to be an array of arrays; got "+n(e)+". Did you forget to wrap your parameters in an array?"})}function y(e,t){var r=c(e);o("Map"===r||"Set"===r,function(){return"update(): "+n(t)+" expects a target of type Set or Map; got "+n(r)})}},924966:function(e){function t(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(t(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&t(e.slice(0,0))}(e)||!!e._isBuffer)}},331870:function(e,t,n){var r=n(64908).stringify,o=n(399556);e.exports=function(e){return{parse:o(e),stringify:r}},e.exports.parse=o(),e.exports.stringify=r},399556:function(e,t,n){var r=null;let o=/(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/,s=/(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)/;e.exports=function(e){"use strict";var t={strict:!1,storeAsString:!1,alwaysParseAsBig:!1,useNativeBigInt:!1,protoAction:"error",constructorAction:"error"};if(null!=e){if(!0===e.strict&&(t.strict=!0),!0===e.storeAsString&&(t.storeAsString=!0),t.alwaysParseAsBig=!0===e.alwaysParseAsBig&&e.alwaysParseAsBig,t.useNativeBigInt=!0===e.useNativeBigInt&&e.useNativeBigInt,void 0!==e.constructorAction){if("error"===e.constructorAction||"ignore"===e.constructorAction||"preserve"===e.constructorAction)t.constructorAction=e.constructorAction;else throw Error(`Incorrect value for constructorAction option, must be "error", "ignore" or undefined but passed ${e.constructorAction}`)}if(void 0!==e.protoAction){if("error"===e.protoAction||"ignore"===e.protoAction||"preserve"===e.protoAction)t.protoAction=e.protoAction;else throw Error(`Incorrect value for protoAction option, must be "error", "ignore" or undefined but passed ${e.protoAction}`)}}var a,l,c,u,d={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:" "},p=function(e){throw{name:"SyntaxError",message:e,at:a,text:c}},h=function(e){return e&&e!==l&&p("Expected '"+e+"' instead of '"+l+"'"),l=c.charAt(a),a+=1,l},f=function(){var e,o="";for("-"===l&&(o="-",h("-"));l>="0"&&l<="9";)o+=l,h();if("."===l)for(o+=".";h()&&l>="0"&&l<="9";)o+=l;if("e"===l||"E"===l)for(o+=l,h(),("-"===l||"+"===l)&&(o+=l,h());l>="0"&&l<="9";)o+=l,h();if(isFinite(e=+o))return(null==r&&(r=n(227997)),o.length>15)?t.storeAsString?o:t.useNativeBigInt?BigInt(o):new r(o):t.alwaysParseAsBig?t.useNativeBigInt?BigInt(e):new r(e):e;p("Bad number")},m=function(){var e,t,n,r="";if('"'===l){for(var o=a;h();){if('"'===l)return a-1>o&&(r+=c.substring(o,a-1)),h(),r;if("\\"===l){if(a-1>o&&(r+=c.substring(o,a-1)),h(),"u"===l){for(t=0,n=0;t<4&&isFinite(e=parseInt(h(),16));t+=1){;n=16*n+e}r+=String.fromCharCode(n)}else if("string"==typeof d[l])r+=d[l];else break;o=a}}}p("Bad string")},g=function(){for(;l&&l<=" ";)h()},v=function(){switch(l){case"t":return h("t"),h("r"),h("u"),h("e"),!0;case"f":return h("f"),h("a"),h("l"),h("s"),h("e"),!1;case"n":return h("n"),h("u"),h("l"),h("l"),null}p("Unexpected '"+l+"'")},b=function(){var e=[];if("["===l){if(h("["),g(),"]"===l)return h("]"),e;for(;l;){if(e.push(u()),g(),"]"===l)return h("]"),e;h(","),g()}}p("Bad array")},y=function(){var e,n=Object.create(null);if("{"===l){if(h("{"),g(),"}"===l)return h("}"),n;for(;l;){if(e=m(),g(),h(":"),!0===t.strict&&Object.hasOwnProperty.call(n,e)&&p('Duplicate key "'+e+'"'),!0===o.test(e)?"error"===t.protoAction?p("Object contains forbidden prototype property"):"ignore"===t.protoAction?u():n[e]=u():!0===s.test(e)?"error"===t.constructorAction?p("Object contains forbidden constructor property"):"ignore"===t.constructorAction?u():n[e]=u():n[e]=u(),g(),"}"===l)return h("}"),n;h(","),g()}}p("Bad object")};return u=function(){switch(g(),l){case"{":return y();case"[":return b();case'"':return m();case"-":return f();default:return l>="0"&&l<="9"?f():v()}},function(e,t){var n;return c=e+"",a=0,l=" ",n=u(),g(),l&&p("Syntax error"),"function"==typeof t?function e(n,r){var o,s=n[r];return s&&"object"==typeof s&&Object.keys(s).forEach(function(t){void 0!==(o=e(s,t))?s[t]=o:delete s[t]}),t.call(n,r,s)}({"":n},""):n}}},64908:function(e,t,n){var r=n(227997),o=e.exports;!function(){"use strict";var e,t,n,s=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,a={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function l(e){return s.lastIndex=0,s.test(e)?'"'+e.replace(s,function(e){var t=a[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}"function"!=typeof o.stringify&&(o.stringify=function(o,s,a){var c;if(e="",t="","number"==typeof a)for(c=0;c<a;c+=1)t+=" ";else"string"==typeof a&&(t=a);if(n=s,s&&"function"!=typeof s&&("object"!=typeof s||"number"!=typeof s.length))throw Error("JSON.stringify");return function o(s,a){var c,u,d,p,h,f=e,m=a[s],g=null!=m&&(m instanceof r||r.isBigNumber(m));switch(m&&"object"==typeof m&&"function"==typeof m.toJSON&&(m=m.toJSON(s)),"function"==typeof n&&(m=n.call(a,s,m)),typeof m){case"string":if(g)return m;return l(m);case"number":return isFinite(m)?String(m):"null";case"boolean":case"null":case"bigint":return String(m);case"object":if(!m)return"null";if(e+=t,h=[],"[object Array]"===Object.prototype.toString.apply(m)){for(c=0,p=m.length;c<p;c+=1)h[c]=o(c,m)||"null";return d=0===h.length?"[]":e?"[\n"+e+h.join(",\n"+e)+"\n"+f+"]":"["+h.join(",")+"]",e=f,d}if(n&&"object"==typeof n)for(c=0,p=n.length;c<p;c+=1)"string"==typeof n[c]&&(d=o(u=n[c],m))&&h.push(l(u)+(e?": ":":")+d);else Object.keys(m).forEach(function(t){var n=o(t,m);n&&h.push(l(t)+(e?": ":":")+n)});return d=0===h.length?"{}":e?"{\n"+e+h.join(",\n"+e)+"\n"+f+"}":"{"+h.join(",")+"}",e=f,d}}("",{"":o})})}()},601486:function(e){"use strict";var t=e.exports=function(e,n,r){"function"==typeof n&&(r=n,n={});var o="function"==typeof(r=n.cb||r)?r:r.pre||function(){};(function e(n,r,o,s,a,l,c,u,d,p){if(s&&"object"==typeof s&&!Array.isArray(s)){for(var h in r(s,a,l,c,u,d,p),s){var f=s[h];if(Array.isArray(f)){if(h in t.arrayKeywords)for(var m=0;m<f.length;m++)e(n,r,o,f[m],a+"/"+h+"/"+m,l,a,h,s,m)}else if(h in t.propsKeywords){if(f&&"object"==typeof f)for(var g in f)e(n,r,o,f[g],a+"/"+h+"/"+function(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}(g),l,a,h,s,g)}else(h in t.keywords||n.allKeys&&!(h in t.skipKeywords))&&e(n,r,o,f,a+"/"+h,l,a,h,s)}o(s,a,l,c,u,d,p)}})(n,o,r.post||function(){},e,"",e)};t.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},t.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},t.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},t.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}},966534:function(e,t,n){var r,o,s,a,l;r=n(730752),o=n(826581).utf8,s=n(924966),a=n(826581).bin,(l=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?a.stringToBytes(e):o.stringToBytes(e):s(e)?e=Array.prototype.slice.call(e,0):!Array.isArray(e)&&e.constructor!==Uint8Array&&(e=e.toString());for(var n=r.bytesToWords(e),c=8*e.length,u=0x67452301,d=-0x10325477,p=-0x67452302,h=0x10325476,f=0;f<n.length;f++)n[f]=(n[f]<<8|n[f]>>>24)&0xff00ff|(n[f]<<24|n[f]>>>8)&0xff00ff00;n[c>>>5]|=128<<c%32,n[(c+64>>>9<<4)+14]=c;for(var m=l._ff,g=l._gg,v=l._hh,b=l._ii,f=0;f<n.length;f+=16){var y=u,x=d,w=p,S=h;u=m(u,d,p,h,n[f+0],7,-0x28955b88),h=m(h,u,d,p,n[f+1],12,-0x173848aa),p=m(p,h,u,d,n[f+2],17,0x242070db),d=m(d,p,h,u,n[f+3],22,-0x3e423112),u=m(u,d,p,h,n[f+4],7,-0xa83f051),h=m(h,u,d,p,n[f+5],12,0x4787c62a),p=m(p,h,u,d,n[f+6],17,-0x57cfb9ed),d=m(d,p,h,u,n[f+7],22,-0x2b96aff),u=m(u,d,p,h,n[f+8],7,0x698098d8),h=m(h,u,d,p,n[f+9],12,-0x74bb0851),p=m(p,h,u,d,n[f+10],17,-42063),d=m(d,p,h,u,n[f+11],22,-0x76a32842),u=m(u,d,p,h,n[f+12],7,0x6b901122),h=m(h,u,d,p,n[f+13],12,-0x2678e6d),p=m(p,h,u,d,n[f+14],17,-0x5986bc72),d=m(d,p,h,u,n[f+15],22,0x49b40821),u=g(u,d,p,h,n[f+1],5,-0x9e1da9e),h=g(h,u,d,p,n[f+6],9,-0x3fbf4cc0),p=g(p,h,u,d,n[f+11],14,0x265e5a51),d=g(d,p,h,u,n[f+0],20,-0x16493856),u=g(u,d,p,h,n[f+5],5,-0x29d0efa3),h=g(h,u,d,p,n[f+10],9,0x2441453),p=g(p,h,u,d,n[f+15],14,-0x275e197f),d=g(d,p,h,u,n[f+4],20,-0x182c0438),u=g(u,d,p,h,n[f+9],5,0x21e1cde6),h=g(h,u,d,p,n[f+14],9,-0x3cc8f82a),p=g(p,h,u,d,n[f+3],14,-0xb2af279),d=g(d,p,h,u,n[f+8],20,0x455a14ed),u=g(u,d,p,h,n[f+13],5,-0x561c16fb),h=g(h,u,d,p,n[f+2],9,-0x3105c08),p=g(p,h,u,d,n[f+7],14,0x676f02d9),d=g(d,p,h,u,n[f+12],20,-0x72d5b376),u=v(u,d,p,h,n[f+5],4,-378558),h=v(h,u,d,p,n[f+8],11,-0x788e097f),p=v(p,h,u,d,n[f+11],16,0x6d9d6122),d=v(d,p,h,u,n[f+14],23,-0x21ac7f4),u=v(u,d,p,h,n[f+1],4,-0x5b4115bc),h=v(h,u,d,p,n[f+4],11,0x4bdecfa9),p=v(p,h,u,d,n[f+7],16,-0x944b4a0),d=v(d,p,h,u,n[f+10],23,-0x41404390),u=v(u,d,p,h,n[f+13],4,0x289b7ec6),h=v(h,u,d,p,n[f+0],11,-0x155ed806),p=v(p,h,u,d,n[f+3],16,-0x2b10cf7b),d=v(d,p,h,u,n[f+6],23,0x4881d05),u=v(u,d,p,h,n[f+9],4,-0x262b2fc7),h=v(h,u,d,p,n[f+12],11,-0x1924661b),p=v(p,h,u,d,n[f+15],16,0x1fa27cf8),d=v(d,p,h,u,n[f+2],23,-0x3b53a99b),u=b(u,d,p,h,n[f+0],6,-0xbd6ddbc),h=b(h,u,d,p,n[f+7],10,0x432aff97),p=b(p,h,u,d,n[f+14],15,-0x546bdc59),d=b(d,p,h,u,n[f+5],21,-0x36c5fc7),u=b(u,d,p,h,n[f+12],6,0x655b59c3),h=b(h,u,d,p,n[f+3],10,-0x70f3336e),p=b(p,h,u,d,n[f+10],15,-1051523),d=b(d,p,h,u,n[f+1],21,-0x7a7ba22f),u=b(u,d,p,h,n[f+8],6,0x6fa87e4f),h=b(h,u,d,p,n[f+15],10,-0x1d31920),p=b(p,h,u,d,n[f+6],15,-0x5cfebcec),d=b(d,p,h,u,n[f+13],21,0x4e0811a1),u=b(u,d,p,h,n[f+4],6,-0x8ac817e),h=b(h,u,d,p,n[f+11],10,-0x42c50dcb),p=b(p,h,u,d,n[f+2],15,0x2ad7d2bb),d=b(d,p,h,u,n[f+9],21,-0x14792c6f),u=u+y>>>0,d=d+x>>>0,p=p+w>>>0,h=h+S>>>0}return r.endian([u,d,p,h])})._ff=function(e,t,n,r,o,s,a){var l=e+(t&n|~t&r)+(o>>>0)+a;return(l<<s|l>>>32-s)+t},l._gg=function(e,t,n,r,o,s,a){var l=e+(t&r|n&~r)+(o>>>0)+a;return(l<<s|l>>>32-s)+t},l._hh=function(e,t,n,r,o,s,a){var l=e+(t^n^r)+(o>>>0)+a;return(l<<s|l>>>32-s)+t},l._ii=function(e,t,n,r,o,s,a){var l=e+(n^(t|~r))+(o>>>0)+a;return(l<<s|l>>>32-s)+t},l._blocksize=16,l._digestsize=16,e.exports=function(e,t){if(null==e)throw Error("Illegal argument "+e);var n=r.wordsToBytes(l(e,t));return t&&t.asBytes?n:t&&t.asString?a.bytesToString(n):r.bytesToHex(n)}},968599:function(e,t,n){e.exports=n(392458)},175399:function(e,t,n){"use strict";var r=n(968599),o=n(569760).extname,s=/^\s*([^;\s]*)(?:;|\s|$)/,a=/^text\//i;function l(e){if(!e||"string"!=typeof e)return!1;var t=s.exec(e),n=t&&r[t[1].toLowerCase()];return n&&n.charset?n.charset:!!(t&&a.test(t[1]))&&"UTF-8"}t.charset=l,t.charsets={lookup:l},t.contentType=function(e){if(!e||"string"!=typeof e)return!1;var n=-1===e.indexOf("/")?t.lookup(e):e;if(!n)return!1;if(-1===n.indexOf("charset")){var r=t.charset(n);r&&(n+="; charset="+r.toLowerCase())}return n},t.extension=function(e){if(!e||"string"!=typeof e)return!1;var n=s.exec(e),r=n&&t.extensions[n[1].toLowerCase()];return!!r&&!!r.length&&r[0]},t.extensions=Object.create(null),t.lookup=function(e){if(!e||"string"!=typeof e)return!1;var n=o("x."+e).toLowerCase().substr(1);return!!n&&(t.types[n]||!1)},t.types=Object.create(null),function(e,t){var n=["nginx","apache",void 0,"iana"];Object.keys(r).forEach(function(o){var s=r[o],a=s.extensions;if(!!a&&!!a.length){e[o]=a;for(var l=0;l<a.length;l++){var c=a[l];if(t[c]){var u=n.indexOf(r[t[c]].source),d=n.indexOf(s.source);if("application/octet-stream"!==t[c]&&(u>d||u===d&&"application/"===t[c].substr(0,12)))continue}t[c]=o}}})}(t.extensions,t.types)},59074:function(e,t){t.Parse=function(e,t){var n="",r="",o="",s=0,a=[],l=[];for(i=0;i<e.length;i++){var c=e[i],u=i>0?e[i-1]:null,d=10==c&&13==u;if(!(10==c||13==c)&&(n+=String.fromCharCode(c)),0==s&&d)"--"+t==n&&(s=1),n="";else if(1==s&&d)r=n,s=2,n="";else if(2==s&&d)o=n,s=3,n="";else if(3==s&&d)s=4,a=[],n="";else if(4==s){if(n.length>t.length+4&&(n=""),"--"+t==n){var p=a.length-n.length,h={header:r,info:o,part:a.slice(0,p-1)};l.push(function(e){var t,n,r,o,s=(n=(t=e.header.split(";")[2].split("="))[0].trim(),r=JSON.parse(t[1].trim()),Object.defineProperty(o={},n,{value:r,writable:!0,enumerable:!0,configurable:!0}),o);return Object.defineProperty(s,"type",{value:e.info.split(":")[1].trim(),writable:!0,enumerable:!0,configurable:!0}),Object.defineProperty(s,"data",{value:new Buffer(e.part),writable:!0,enumerable:!0,configurable:!0}),s}(h)),a=[],n="",s=5,r="",o=""}else a.push(c);d&&(n="")}else 5==s&&d&&(s=1)}return l},t.getBoundary=function(e){var t=e.split(";");if(t)for(i=0;i<t.length;i++){var n=new String(t[i]).trim();if(n.indexOf("boundary")>=0)return new String(n.split("=")[1]).trim()}return""},t.DemoData=function(){return new Buffer(body='trash1\r\n------WebKitFormBoundaryvef1fLxmoUdYZWXp\r\nContent-Disposition: form-data; name="uploads[]"; filename="A.txt"\r\nContent-Type: text/plain\r\n\r\n\r\n@11X111Y\r\n111Z\rCCCC\nCCCC\r\nCCCCC@\r\n\r\n------WebKitFormBoundaryvef1fLxmoUdYZWXp\r\nContent-Disposition: form-data; name="uploads[]"; filename="B.txt"\r\nContent-Type: text/plain\r\n\r\n\r\n@22X222Y\r\n222Z\r222W\n2220\r\n666@\r\n------WebKitFormBoundaryvef1fLxmoUdYZWXp--\r\n',"utf-8")}},569760:function(e){"use strict";function t(e){if("string"!=typeof e)throw TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,r="",o=0,s=-1,a=0,l=0;l<=e.length;++l){if(l<e.length)n=e.charCodeAt(l);else if(47===n)break;else n=47;if(47===n){if(s===l-1||1===a);else if(s!==l-1&&2===a){if(r.length<2||2!==o||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2)){if(r.length>2){var c=r.lastIndexOf("/");if(c!==r.length-1){-1===c?(r="",o=0):o=(r=r.slice(0,c)).length-1-r.lastIndexOf("/"),s=l,a=0;continue}}else if(2===r.length||1===r.length){r="",o=0,s=l,a=0;continue}}t&&(r.length>0?r+="/..":r="..",o=2)}else r.length>0?r+="/"+e.slice(s+1,l):r=e.slice(s+1,l),o=l-s-1;s=l,a=0}else 46===n&&-1!==a?++a:a=-1}return r}var r={resolve:function(){for(var e,r,o="",s=!1,a=arguments.length-1;a>=-1&&!s;a--){if(a>=0?r=arguments[a]:(void 0===e&&(e=process.cwd()),r=e),t(r),0!==r.length)o=r+"/"+o,s=47===r.charCodeAt(0)}if(o=n(o,!s),s)return o.length>0?"/"+o:"/";if(o.length>0)return o;return"."},normalize:function(e){if(t(e),0===e.length)return".";var r=47===e.charCodeAt(0),o=47===e.charCodeAt(e.length-1);return(0===(e=n(e,!r)).length&&!r&&(e="."),e.length>0&&o&&(e+="/"),r)?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0==arguments.length)return".";for(var e,n=0;n<arguments.length;++n){var o=arguments[n];t(o),o.length>0&&(void 0===e?e=o:e+="/"+o)}return void 0===e?".":r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if(e=r.resolve(e),e===(n=r.resolve(n)))return"";for(var o=1;o<e.length&&47===e.charCodeAt(o);++o);for(var s=e.length,a=s-o,l=1;l<n.length&&47===n.charCodeAt(l);++l);for(var c=n.length-l,u=a<c?a:c,d=-1,p=0;p<=u;++p){if(p===u){if(c>u){if(47===n.charCodeAt(l+p))return n.slice(l+p+1);if(0===p)return n.slice(l+p)}else a>u&&(47===e.charCodeAt(o+p)?d=p:0===p&&(d=0));break}var h=e.charCodeAt(o+p);if(h!==n.charCodeAt(l+p))break;47===h&&(d=p)}var f="";for(p=o+d+1;p<=s;++p)(p===s||47===e.charCodeAt(p))&&(0===f.length?f+="..":f+="/..");return f.length>0?f+n.slice(l+d):(l+=d,47===n.charCodeAt(l)&&++l,n.slice(l))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),r=47===n,o=-1,s=!0,a=e.length-1;a>=1;--a)if(47===(n=e.charCodeAt(a))){if(!s){o=a;break}}else s=!1;return -1===o?r?"/":".":r&&1===o?"//":e.slice(0,o)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw TypeError('"ext" argument must be a string');t(e);var r,o=0,s=-1,a=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var l=n.length-1,c=-1;for(r=e.length-1;r>=0;--r){var u=e.charCodeAt(r);if(47===u){if(!a){o=r+1;break}}else -1===c&&(a=!1,c=r+1),l>=0&&(u===n.charCodeAt(l)?-1==--l&&(s=r):(l=-1,s=c))}return o===s?s=c:-1===s&&(s=e.length),e.slice(o,s)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!a){o=r+1;break}}else -1===s&&(a=!1,s=r+1);return -1===s?"":e.slice(o,s)},extname:function(e){t(e);for(var n=-1,r=0,o=-1,s=!0,a=0,l=e.length-1;l>=0;--l){var c=e.charCodeAt(l);if(47===c){if(!s){r=l+1;break}continue}-1===o&&(s=!1,o=l+1),46===c?-1===n?n=l:1!==a&&(a=1):-1!==n&&(a=-1)}return -1===n||-1===o||0===a||1===a&&n===o-1&&n===r+1?"":e.slice(n,o)},format:function(e){var t,n,r;if(null===e||"object"!=typeof e)throw TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return n=(t=e).dir||t.root,r=t.base||(t.name||"")+(t.ext||""),n?n===t.root?n+r:n+"/"+r:r},parse:function(e){t(e);var n,r={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return r;var o=e.charCodeAt(0),s=47===o;s?(r.root="/",n=1):n=0;for(var a=-1,l=0,c=-1,u=!0,d=e.length-1,p=0;d>=n;--d){if(47===(o=e.charCodeAt(d))){if(!u){l=d+1;break}continue}-1===c&&(u=!1,c=d+1),46===o?-1===a?a=d:1!==p&&(p=1):-1!==a&&(p=-1)}return -1===a||-1===c||0===p||1===p&&a===c-1&&a===l+1?-1!==c&&(0===l&&s?r.base=r.name=e.slice(1,c):r.base=r.name=e.slice(l,c)):(0===l&&s?(r.name=e.slice(1,a),r.base=e.slice(1,c)):(r.name=e.slice(l,a),r.base=e.slice(l,c)),r.ext=e.slice(a,c)),l>0?r.dir=e.slice(0,l-1):s&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,e.exports=r},58205:function(e,t,n){"use strict";n.d(t,{e:()=>T});var r,o,s=n("455069"),a=n("921463");var l=(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),c=function(){return(c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},u={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},d={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},p={width:"20px",height:"20px",position:"absolute"},h={top:c(c({},u),{top:"-5px"}),right:c(c({},d),{left:void 0,right:"-5px"}),bottom:c(c({},u),{top:void 0,bottom:"-5px"}),left:c(c({},d),{left:"-5px"}),topRight:c(c({},p),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:c(c({},p),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:c(c({},p),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:c(c({},p),{left:"-10px",top:"-10px",cursor:"nw-resize"})},f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseDown=function(e){t.props.onResizeStart(e,t.props.direction)},t.onTouchStart=function(e){t.props.onResizeStart(e,t.props.direction)},t}return l(t,e),t.prototype.render=function(){return s.createElement("div",{className:this.props.className||"",style:c(c({position:"absolute",userSelect:"none"},h[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},t}(s.PureComponent);var m=(o=function(e,t){return(o=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),g=function(){return(g=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},v={width:"auto",height:"auto"},b=function(e,t,n){return Math.max(Math.min(e,n),t)},y=function(e,t){return Math.round(e/t)*t},x=function(e,t){return RegExp(e,"i").test(t)},w=function(e){return!!(e.touches&&e.touches.length)},S=function(e,t,n){void 0===n&&(n=0);var r=t.reduce(function(n,r,o){return Math.abs(r-e)<Math.abs(t[n]-e)?o:n},0),o=Math.abs(t[r]-e);return 0===n||o<n?t[r]:e},k=function(e){return"auto"===(e=e.toString())||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:e+"px"},A=function(e,t,n,r){if(e&&"string"==typeof e){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%")){var o=Number(e.replace("%",""))/100;return t*o}if(e.endsWith("vw")){var o=Number(e.replace("vw",""))/100;return n*o}if(e.endsWith("vh")){var o=Number(e.replace("vh",""))/100;return r*o}}return e},C=["as","ref","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],E="__resizable_base__",T=function(e){function t(t){var n,r,o,s,a=e.call(this,t)||this;return a.ratio=1,a.resizable=null,a.parentLeft=0,a.parentTop=0,a.resizableLeft=0,a.resizableRight=0,a.resizableTop=0,a.resizableBottom=0,a.targetLeft=0,a.targetTop=0,a.appendBase=function(){if(!a.resizable||!a.window)return null;var e=a.parentNode;if(!e)return null;var t=a.window.document.createElement("div");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.transform="scale(0, 0)",t.style.left="0",t.style.flex="0 0 100%",t.classList?t.classList.add(E):t.className+=E,e.appendChild(t),t},a.removeBase=function(e){var t=a.parentNode;if(!!t)t.removeChild(e)},a.state={isResizing:!1,width:null!==(r=null===(n=a.propsSize)||void 0===n?void 0:n.width)&&void 0!==r?r:"auto",height:null!==(s=null===(o=a.propsSize)||void 0===o?void 0:o.height)&&void 0!==s?s:"auto",direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},a.onResizeStart=a.onResizeStart.bind(a),a.onMouseMove=a.onMouseMove.bind(a),a.onMouseUp=a.onMouseUp.bind(a),a}return m(t,e),Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||v},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var n=this.resizable.offsetWidth,r=this.resizable.offsetHeight,o=this.resizable.style.position;"relative"!==o&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:n,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:r,this.resizable.style.position=o}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,n=function(t){var n;if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&(null===(n=e.propsSize[t])||void 0===n?void 0:n.toString().endsWith("%"))){if(e.state[t].toString().endsWith("%"))return e.state[t].toString();var r=e.getParentSize();return Number(e.state[t].toString().replace("px",""))/r[t]*100+"%"}return k(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?k(t.width):n("width"),height:t&&void 0!==t.height&&!this.state.isResizing?k(t.height):n("height")}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,n=this.parentNode.style.flexWrap;"wrap"!==n&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%",e.style.minHeight="100%";var r={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=n),this.removeBase(e),r},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!!this.resizable&&!!this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(e,t){var n=this.propsSize&&this.propsSize[t];return"auto"===this.state[t]&&this.state.original[t]===e&&(void 0===n||"auto"===n)?"auto":e},t.prototype.calculateNewMaxFromBoundary=function(e,t){var n,r,o=this.props.boundsByDirection,s=this.state.direction,a=o&&x("left",s),l=o&&x("top",s);if("parent"===this.props.bounds){var c=this.parentNode;c&&(n=a?this.resizableRight-this.parentLeft:c.offsetWidth+(this.parentLeft-this.resizableLeft),r=l?this.resizableBottom-this.parentTop:c.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(n=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,r=l?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(n=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),r=l?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return n&&Number.isFinite(n)&&(e=e&&e<n?e:n),r&&Number.isFinite(r)&&(t=t&&t<r?t:r),{maxWidth:e,maxHeight:t}},t.prototype.calculateNewSizeFromDirection=function(e,t){var n,r=this.props.scale||1;var o=Array.isArray(n=this.props.resizeRatio||1)?n:[n,n],s=o[0],a=o[1],l=this.state,c=l.direction,u=l.original,d=this.props,p=d.lockAspectRatio,h=d.lockAspectRatioExtraHeight,f=d.lockAspectRatioExtraWidth,m=u.width,g=u.height,v=h||0,b=f||0;return x("right",c)&&(m=u.width+(e-u.x)*s/r,p&&(g=(m-b)/this.ratio+v)),x("left",c)&&(m=u.width-(e-u.x)*s/r,p&&(g=(m-b)/this.ratio+v)),x("bottom",c)&&(g=u.height+(t-u.y)*a/r,p&&(m=(g-v)*this.ratio+b)),x("top",c)&&(g=u.height-(t-u.y)*a/r,p&&(m=(g-v)*this.ratio+b)),{newWidth:m,newHeight:g}},t.prototype.calculateNewSizeFromAspectRatio=function(e,t,n,r){var o=this.props,s=o.lockAspectRatio,a=o.lockAspectRatioExtraHeight,l=o.lockAspectRatioExtraWidth,c=void 0===r.width?10:r.width,u=void 0===n.width||n.width<0?e:n.width,d=void 0===r.height?10:r.height,p=void 0===n.height||n.height<0?t:n.height,h=a||0,f=l||0;if(s){var m=(d-h)*this.ratio+f,g=(p-h)*this.ratio+f,v=(c-f)/this.ratio+h,y=(u-f)/this.ratio+h,x=Math.max(d,v),w=Math.min(p,y);e=b(e,Math.max(c,m),Math.min(u,g)),t=b(t,x,w)}else e=b(e,c,u),t=b(t,d,p);return{newWidth:e,newHeight:t}},t.prototype.setBoundingClientRect=function(){var e=1/(this.props.scale||1);if("parent"===this.props.bounds){var t=this.parentNode;if(t){var n=t.getBoundingClientRect();this.parentLeft=n.left*e,this.parentTop=n.top*e}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var r=this.props.bounds.getBoundingClientRect();this.targetLeft=r.left*e,this.targetTop=r.top*e}if(this.resizable){var o=this.resizable.getBoundingClientRect(),s=o.left,a=o.top,l=o.right,c=o.bottom;this.resizableLeft=s*e,this.resizableRight=l*e,this.resizableTop=a*e,this.resizableBottom=c*e}},t.prototype.onResizeStart=function(e,t){if(!this.resizable||!this.window)return;var n,r,o=0,s=0;if(e.nativeEvent&&((n=e.nativeEvent).clientX||0===n.clientX)&&(n.clientY||0===n.clientY))o=e.nativeEvent.clientX,s=e.nativeEvent.clientY;else e.nativeEvent&&w(e.nativeEvent)&&(o=e.nativeEvent.touches[0].clientX,s=e.nativeEvent.touches[0].clientY);if(!this.props.onResizeStart||!this.resizable||!1!==this.props.onResizeStart(e,t,this.resizable)){this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var a=this.window.getComputedStyle(this.resizable);if("auto"!==a.flexBasis){var l=this.parentNode;if(l){var c=this.window.getComputedStyle(l).flexDirection;this.flexDir=c.startsWith("row")?"row":"column",r=a.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var u={original:{x:o,y:s,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:g(g({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:r};this.setState(u)}},t.prototype.onMouseMove=function(e){var t,n,r,o,s,l,c,u=this;if(!!this.state.isResizing&&!!this.resizable&&!!this.window){if(this.window.TouchEvent&&w(e))try{e.preventDefault(),e.stopPropagation()}catch(e){}var d=this.props,p=d.maxWidth,h=d.maxHeight,f=d.minWidth,m=d.minHeight,g=w(e)?e.touches[0].clientX:e.clientX,v=w(e)?e.touches[0].clientY:e.clientY,b=this.state,x=b.direction,k=b.original,C=b.width,E=b.height,T=this.getParentSize();var _=(t=T,n=this.window.innerWidth,r=this.window.innerHeight,o=p,s=h,l=f,c=m,o=A(o,t.width,n,r),s=A(s,t.height,n,r),l=A(l,t.width,n,r),c=A(c,t.height,n,r),{maxWidth:void 0===o?void 0:Number(o),maxHeight:void 0===s?void 0:Number(s),minWidth:void 0===l?void 0:Number(l),minHeight:void 0===c?void 0:Number(c)});p=_.maxWidth,h=_.maxHeight,f=_.minWidth,m=_.minHeight;var O=this.calculateNewSizeFromDirection(g,v),M=O.newHeight,I=O.newWidth,P=this.calculateNewMaxFromBoundary(p,h);this.props.snap&&this.props.snap.x&&(I=S(I,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(M=S(M,this.props.snap.y,this.props.snapGap));var D=this.calculateNewSizeFromAspectRatio(I,M,{width:P.maxWidth,height:P.maxHeight},{width:f,height:m});if(I=D.newWidth,M=D.newHeight,this.props.grid){var N=y(I,this.props.grid[0]),R=y(M,this.props.grid[1]),L=this.props.snapGap||0,j=0===L||Math.abs(N-I)<=L?N:I,$=0===L||Math.abs(R-M)<=L?R:M;I=j,M=$}var F={width:I-k.width,height:M-k.height};if(C&&"string"==typeof C){if(C.endsWith("%")){var z=I/T.width*100;I=z+"%"}else if(C.endsWith("vw")){var B=I/this.window.innerWidth*100;I=B+"vw"}else if(C.endsWith("vh")){var H=I/this.window.innerHeight*100;I=H+"vh"}}if(E&&"string"==typeof E){if(E.endsWith("%")){var z=M/T.height*100;M=z+"%"}else if(E.endsWith("vw")){var B=M/this.window.innerWidth*100;M=B+"vw"}else if(E.endsWith("vh")){var H=M/this.window.innerHeight*100;M=H+"vh"}}var U={width:this.createSizeForCssProperty(I,"width"),height:this.createSizeForCssProperty(M,"height")};"row"===this.flexDir?U.flexBasis=U.width:"column"===this.flexDir&&(U.flexBasis=U.height);var V=this.state.width!==U.width,q=this.state.height!==U.height,W=this.state.flexBasis!==U.flexBasis,G=V||q||W;G&&(0,a.flushSync)(function(){u.setState(U)}),this.props.onResize&&G&&this.props.onResize(e,x,this.resizable,F)}},t.prototype.onMouseUp=function(e){var t,n,r=this.state,o=r.isResizing,s=r.direction,a=r.original;if(!!o&&!!this.resizable){var l={width:this.size.width-a.width,height:this.size.height-a.height};this.props.onResizeStop&&this.props.onResizeStop(e,s,this.resizable,l),this.props.size&&this.setState({width:null!==(t=this.props.size.width)&&void 0!==t?t:"auto",height:null!==(n=this.props.size.height)&&void 0!==n?n:"auto"}),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:g(g({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(e){var t,n;this.setState({width:null!==(t=e.width)&&void 0!==t?t:"auto",height:null!==(n=e.height)&&void 0!==n?n:"auto"})},t.prototype.renderResizer=function(){var e=this,t=this.props,n=t.enable,r=t.handleStyles,o=t.handleClasses,a=t.handleWrapperStyle,l=t.handleWrapperClass,c=t.handleComponent;if(!n)return null;var u=Object.keys(n).map(function(t){return!1!==n[t]?s.createElement(f,{key:t,direction:t,onResizeStart:e.onResizeStart,replaceStyles:r&&r[t],className:o&&o[t]},c&&c[t]?c[t]:null):null});return s.createElement("div",{className:l,style:a},u)},t.prototype.render=function(){var e=this,t=Object.keys(this.props).reduce(function(t,n){return -1!==C.indexOf(n)?t:(t[n]=e.props[n],t)},{}),n=g(g(g({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(n.flexBasis=this.state.flexBasis);var r=this.props.as||"div";return s.createElement(r,g({style:n,className:this.props.className},t,{ref:function(t){t&&(e.resizable=t)}}),this.state.isResizing&&s.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(s.PureComponent)},602042:function(e,t,n){"use strict";n.d(t,{m:()=>n0});var r,o,s,a,l={};n.r(l),n.d(l,{access:()=>I,bound:()=>y,dfs:()=>E,focusNextElement:()=>_,focusPrevElement:()=>O,getInsertIndex:()=>j,getInsertParentId:()=>$,identify:()=>D,identifyNull:()=>P,indexOf:()=>A,isClosed:()=>w,isDescendant:()=>k,isItem:()=>x,isOpenWithEmptyChildren:()=>S,mergeRefs:()=>N,noop:()=>C,safeRun:()=>R,waitFor:()=>L,walk:()=>T});var c={};n.r(c),n.d(c,{FILE:()=>tO,HTML:()=>tP,TEXT:()=>tI,URL:()=>tM});var u=n("151064"),d=n("455069"),p=n("532973");let h=(0,d.createContext)(null);function f(){let e=(0,d.useContext)(h);if(null===e)throw Error("No Tree Api Provided");return e}let m=(0,d.createContext)(null),g=(0,d.createContext)(null),v=(0,d.createContext)(0);function b(){(0,d.useContext)(v)}function y(e,t,n){return Math.max(Math.min(e,n),t)}function x(e){return e&&e.isLeaf}function w(e){return e&&e.isInternal&&!e.isOpen}function S(e){var t;return e&&e.isOpen&&!(null===(t=e.children)||void 0===t?void 0:t.length)}let k=(e,t)=>{let n=e;for(;n;){if(n.id===t.id)return!0;n=n.parent}return!1},A=e=>{if(!e.parent)throw Error("Node does not have a parent");return e.parent.children.findIndex(t=>t.id===e.id)};function C(){}function E(e,t){if(!e)return null;if(e.id===t)return e;if(e.children)for(let n of e.children){let e=E(n,t);if(e)return e}return null}function T(e,t){if(t(e),e.children)for(let n of e.children)T(n,t)}function _(e){let t;let n=M(e);for(let r=0;r<n.length;++r)if(n[r]===e){t=function(e,t){return t+1<e.length?e[t+1]:e[0]}(n,r);break}null==t||t.focus()}function O(e){let t;let n=M(e);for(let r=0;r<n.length;++r)if(n[r]===e){t=function(e,t){return t-1>=0?e[t-1]:e[e.length-1]}(n,r);break}null==t||t.focus()}function M(e){return Array.from(document.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]):not([disabled]), details:not([disabled]), summary:not(:disabled)')).filter(t=>t===e||!e.contains(t))}function I(e,t){return"boolean"==typeof t?t:"string"==typeof t?e[t]:t(e)}function P(e){return null===e?null:D(e)}function D(e){return"string"==typeof e?e:e.id}function N(...e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}function R(e,...t){if(e)return e(...t)}function L(e){return new Promise((t,n)=>{let r=0;!function o(){100===(r+=1)&&n(),e()?t():setTimeout(o,10)}()})}function j(e){var t,n;let r=e.focusedNode;return r?r.isOpen?0:r.parent?r.childIndex+1:0:null!==(n=null===(t=e.root.children)||void 0===t?void 0:t.length)&&void 0!==n?n:0}function $(e){let t=e.focusedNode;return t?t.isOpen?t.id:t.parent&&!t.parent.isRoot?t.parent.id:null:null}let F={display:"flex",alignItems:"center",zIndex:1},z={flex:1,height:"2px",background:"#4B91E2",borderRadius:"1px"},B={width:"4px",height:"4px",boxShadow:"0 0 0 3px #4B91E2",borderRadius:"50%"},H=d.memo(function({top:e,left:t,indent:n}){return(0,u.jsxs)("div",{style:Object.assign(Object.assign({},F),{position:"absolute",pointerEvents:"none",top:e-2+"px",left:t+"px",right:n+"px"}),children:[(0,u.jsx)("div",{style:Object.assign({},B)}),(0,u.jsx)("div",{style:Object.assign({},z)})]})});function U({node:e,attrs:t,innerRef:n,children:r}){return(0,u.jsx)("div",Object.assign({},t,{ref:n,onFocus:e=>e.stopPropagation(),onClick:e.handleClick,children:r}))}function V(e){return(0,u.jsxs)("div",{ref:e.dragHandle,style:e.style,children:[(0,u.jsx)("span",{onClick:t=>{t.stopPropagation(),e.node.toggle()},children:e.node.isLeaf?"\uD83C\uDF33":e.node.isOpen?"\uD83D\uDDC1":"\uD83D\uDDC0"})," ",e.node.isEditing?(0,u.jsx)(W,Object.assign({},e)):(0,u.jsx)(q,Object.assign({},e))]})}function q(e){return(0,u.jsx)(u.Fragment,{children:(0,u.jsx)("span",{children:e.node.data.name})})}function W({node:e}){let t=(0,d.useRef)();return(0,d.useEffect)(()=>{var e,n;null===(e=t.current)||void 0===e||e.focus(),null===(n=t.current)||void 0===n||n.select()},[]),(0,u.jsx)("input",{ref:t,defaultValue:e.data.name,onBlur:()=>e.reset(),onKeyDown:n=>{var r;"Escape"===n.key&&e.reset(),"Enter"===n.key&&e.submit((null===(r=t.current)||void 0===r?void 0:r.value)||"")}})}function G(e){return{type:"EDIT",id:e}}function K(e){return{type:"FOCUS",id:e}}class Y{constructor(e){this.handleClick=e=>{e.metaKey&&!this.tree.props.disableMultiSelection?this.isSelected?this.deselect():this.selectMulti():e.shiftKey&&!this.tree.props.disableMultiSelection?this.selectContiguous():(this.select(),this.activate())},this.tree=e.tree,this.id=e.id,this.data=e.data,this.level=e.level,this.children=e.children,this.parent=e.parent,this.isDraggable=e.isDraggable,this.rowIndex=e.rowIndex}get isRoot(){return this.id===Z}get isLeaf(){return!Array.isArray(this.children)}get isInternal(){return!this.isLeaf}get isOpen(){return!this.isLeaf&&this.tree.isOpen(this.id)}get isClosed(){return!this.isLeaf&&!this.tree.isOpen(this.id)}get isEditable(){return this.tree.isEditable(this.data)}get isEditing(){return this.tree.editingId===this.id}get isSelected(){return this.tree.isSelected(this.id)}get isOnlySelection(){return this.isSelected&&this.tree.hasOneSelection}get isSelectedStart(){var e;return this.isSelected&&!(null===(e=this.prev)||void 0===e?void 0:e.isSelected)}get isSelectedEnd(){var e;return this.isSelected&&!(null===(e=this.next)||void 0===e?void 0:e.isSelected)}get isFocused(){return this.tree.isFocused(this.id)}get isDragging(){return this.tree.isDragging(this.id)}get willReceiveDrop(){return this.tree.willReceiveDrop(this.id)}get state(){return{isClosed:this.isClosed,isDragging:this.isDragging,isEditing:this.isEditing,isFocused:this.isFocused,isInternal:this.isInternal,isLeaf:this.isLeaf,isOpen:this.isOpen,isSelected:this.isSelected,isSelectedEnd:this.isSelectedEnd,isSelectedStart:this.isSelectedStart,willReceiveDrop:this.willReceiveDrop}}get childIndex(){return this.parent&&this.parent.children?this.parent.children.findIndex(e=>e.id===this.id):-1}get next(){return null===this.rowIndex?null:this.tree.at(this.rowIndex+1)}get prev(){return null===this.rowIndex?null:this.tree.at(this.rowIndex-1)}get nextSibling(){var e,t;let n=this.childIndex;return null!==(t=null===(e=this.parent)||void 0===e?void 0:e.children[n+1])&&void 0!==t?t:null}isAncestorOf(e){if(!e)return!1;let t=e;for(;t;){if(t.id===this.id)return!0;t=t.parent}return!1}select(){this.tree.select(this)}deselect(){this.tree.deselect(this)}selectMulti(){this.tree.selectMulti(this)}selectContiguous(){this.tree.selectContiguous(this)}activate(){this.tree.activate(this)}focus(){this.tree.focus(this)}toggle(){this.tree.toggle(this)}open(){this.tree.open(this)}openParents(){this.tree.openParents(this)}close(){this.tree.close(this)}submit(e){this.tree.submit(this,e)}reset(){this.tree.reset()}clone(){return new Y(Object.assign({},this))}edit(){return this.tree.edit(this)}}let Z="__REACT_ARBORIST_INTERNAL_ROOT__";function J(e){var t;let n=new Y({tree:e,id:Z,data:{id:Z},level:-1,parent:null,children:null,isDraggable:!0,rowIndex:null}),r=null!==(t=e.props.data)&&void 0!==t?t:[];return n.children=r.map(t=>(function t(n,r,o){let s=e.accessId(n),a=new Y({tree:e,data:n,level:r,parent:o,id:s,children:null,isDraggable:e.isDraggable(n),rowIndex:null}),l=e.accessChildren(n);return l&&(a.children=l.map(e=>t(e,r+1,a))),a})(t,0,n)),n}let X={open:(e,t)=>({type:"VISIBILITY_OPEN",id:e,filtered:t}),close:(e,t)=>({type:"VISIBILITY_CLOSE",id:e,filtered:t}),clear:e=>({type:"VISIBILITY_CLEAR",filtered:e})};function Q(e={},t){if("VISIBILITY_OPEN"===t.type)return Object.assign(Object.assign({},e),{[t.id]:!0});if("VISIBILITY_CLOSE"===t.type)return Object.assign(Object.assign({},e),{[t.id]:!1});if("VISIBILITY_TOGGLE"===t.type){let n=e[t.id];return Object.assign(Object.assign({},e),{[t.id]:!n})}else if("VISIBILITY_CLEAR"===t.type)return{};else return e}let ee=e=>{var t;return{nodes:{open:{filtered:{},unfiltered:null!==(t=null==e?void 0:e.initialOpenState)&&void 0!==t?t:{}},focus:{id:null,treeFocused:!1},edit:{id:null},drag:{id:null,selectedIds:[],destinationParentId:null,destinationIndex:null},selection:{ids:new Set,anchor:null,mostRecent:null}},dnd:{cursor:{type:"none"},dragId:null,dragIds:[],parentId:null,index:-1}}},et={only:e=>({type:"SELECTION_ONLY",id:D(e)}),add:e=>({type:"SELECTION_ADD",ids:(Array.isArray(e)?e:[e]).map(D)}),remove:e=>({type:"SELECTION_REMOVE",ids:(Array.isArray(e)?e:[e]).map(D)}),set:e=>Object.assign({type:"SELECTION_SET"},e),mostRecent:e=>({type:"SELECTION_MOST_RECENT",id:null===e?null:D(e)}),anchor:e=>({type:"SELECTION_ANCHOR",id:null===e?null:D(e)})},en={cursor:e=>({type:"DND_CURSOR",cursor:e}),dragStart:(e,t)=>({type:"DND_DRAG_START",id:e,dragIds:t}),dragEnd:()=>({type:"DND_DRAG_END"}),hovering:(e,t)=>({type:"DND_HOVERING",parentId:e,index:t})},er={position:"fixed",pointerEvents:"none",zIndex:100,left:0,top:0,width:"100%",height:"100%"},ei=e=>{if(!e)return{display:"none"};let{x:t,y:n}=e;return{transform:`translate(${t}px, ${n}px)`}},eo=e=>{if(!e)return{display:"none"};let{x:t,y:n}=e;return{transform:`translate(${t+10}px, ${n+10}px)`}};function es({offset:e,mouse:t,id:n,dragIds:r,isDragging:o}){return(0,u.jsxs)(ea,{isDragging:o,children:[(0,u.jsx)(el,{offset:e,children:(0,u.jsx)(eu,{id:n,dragIds:r})}),(0,u.jsx)(ec,{mouse:t,count:r.length})]})}let ea=(0,d.memo)(function(e){return e.isDragging?(0,u.jsx)("div",{style:er,children:e.children}):null});function el(e){return(0,u.jsx)("div",{className:"row preview",style:ei(e.offset),children:e.children})}function ec(e){let{count:t,mouse:n}=e;return t>1?(0,u.jsx)("div",{className:"selected-count",style:eo(n),children:t}):null}let eu=(0,d.memo)(function(e){let t=f(),n=t.get(e.id);return n?(0,u.jsx)(t.renderNode,{preview:!0,node:n,style:{paddingLeft:n.level*t.indent,opacity:.2,background:"transparent"},tree:t}):null});var ed=n("517432");function ep(){var e,t;let n=f(),r=function(){let e=(0,d.useContext)(g);if(null===e)throw Error("Provide a DnDContext");return e}().cursor;if(!r||"line"!==r.type)return null;let o=n.indent,s=n.rowHeight*r.index+(null!==(t=null!==(e=n.props.padding)&&void 0!==e?e:n.props.paddingTop)&&void 0!==t?t:0),a=o*r.level,l=n.renderCursor;return(0,u.jsx)(l,{top:s,left:a,indent:o})}var eh=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let ef=(0,d.forwardRef)(function(e,t){let{children:n}=e,r=eh(e,["children"]),o=f();return(0,u.jsxs)("div",Object.assign({ref:t},r,{onClick:e=>{e.currentTarget===e.target&&o.deselectAll()},children:[(0,u.jsx)(em,{}),n]}))}),em=()=>{let e=f();return(0,u.jsx)("div",{style:{height:e.visibleNodes.length*e.rowHeight,width:"100%",position:"absolute",left:"0",right:"0"},children:(0,u.jsx)(ep,{})})};var eg=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let ev=(0,d.forwardRef)(function(e,t){var n,r,o,s,{style:a}=e,l=eg(e,["style"]);let c=f(),d=null!==(r=null!==(n=c.props.padding)&&void 0!==n?n:c.props.paddingTop)&&void 0!==r?r:0,p=null!==(s=null!==(o=c.props.padding)&&void 0!==o?o:c.props.paddingBottom)&&void 0!==s?s:0;return(0,u.jsx)("div",Object.assign({ref:t,style:Object.assign(Object.assign({},a),{height:`${parseFloat(a.height)+d+p}px`})},l))});var eb="undefined"!=typeof window?d.useLayoutEffect:d.useEffect;function ey(e){return(ey="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ex(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ew(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var eS=function(){var e,t,n;function r(e,t,n){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),ew(this,"spec",void 0),ew(this,"monitor",void 0),ew(this,"connector",void 0),this.spec=e,this.monitor=t,this.connector=n}return e=r,t=[{key:"beginDrag",value:function(){var e,t=this.spec,n=this.monitor,r=null;return null!==(e=r="object"===ey(t.item)?t.item:"function"==typeof t.item?t.item(n):{})&&void 0!==e?e:null}},{key:"canDrag",value:function(){var e=this.spec,t=this.monitor;return"boolean"==typeof e.canDrag?e.canDrag:"function"!=typeof e.canDrag||e.canDrag(t)}},{key:"isDragging",value:function(e,t){var n=this.spec,r=this.monitor,o=n.isDragging;return o?o(r):t===e.getSourceId()}},{key:"endDrag",value:function(){var e=this.spec,t=this.monitor,n=this.connector,r=e.end;r&&r(t.getItem(),t),n.reconnect()}}],ex(e.prototype,t),r}(),ek=n("789034"),eA=(0,d.createContext)({dragDropManager:void 0});function eC(){var e=(0,d.useContext)(eA).dragDropManager;return(0,ek.k)(null!=e,"Expected drag drop context"),e}function eE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function eT(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function e_(e,t){var n,r=function(e){if(Array.isArray(e))return eT(e)}(n=t||[])||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return eT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eT(e,t)}}(n)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();return null==t&&"function"!=typeof e&&r.push(e),(0,d.useMemo)(function(){return"function"==typeof e?e():e},r)}function eO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function eM(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var eI=!1,eP=!1,eD=function(){var e,t,n;function r(e){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),eM(this,"internalMonitor",void 0),eM(this,"sourceId",null),this.internalMonitor=e.getMonitor()}return e=r,t=[{key:"receiveHandlerId",value:function(e){this.sourceId=e}},{key:"getHandlerId",value:function(){return this.sourceId}},{key:"canDrag",value:function(){(0,ek.k)(!eI,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return eI=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{eI=!1}}},{key:"isDragging",value:function(){if(!this.sourceId)return!1;(0,ek.k)(!eP,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return eP=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{eP=!1}}},{key:"subscribeToStateChange",value:function(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}},{key:"isDraggingSource",value:function(e){return this.internalMonitor.isDraggingSource(e)}},{key:"isOverTarget",value:function(e,t){return this.internalMonitor.isOverTarget(e,t)}},{key:"getTargetIds",value:function(){return this.internalMonitor.getTargetIds()}},{key:"isSourcePublic",value:function(){return this.internalMonitor.isSourcePublic()}},{key:"getSourceId",value:function(){return this.internalMonitor.getSourceId()}},{key:"subscribeToOffsetChange",value:function(e){return this.internalMonitor.subscribeToOffsetChange(e)}},{key:"canDragSource",value:function(e){return this.internalMonitor.canDragSource(e)}},{key:"canDropOnTarget",value:function(e){return this.internalMonitor.canDropOnTarget(e)}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}],eO(e.prototype,t),r}();function eN(e){var t={};return Object.keys(e).forEach(function(n){var r=e[n];if(n.endsWith("Ref"))t[n]=e[n];else{var o,s=(o=r,function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return(0,d.isValidElement)(e)?(!function(e){if("string"!=typeof e.type){var t=e.type.displayName||e.type.name||"the component";throw Error("Only native element nodes can now be passed to React DnD connectors."+"You can either wrap ".concat(t," into a <div>, or turn it into a ")+"drag source or a drop target itself.")}}(e),function(e,t){var n=e.ref;return((0,ek.k)("string"!=typeof n,"Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n)?(0,d.cloneElement)(e,{ref:function(e){eR(n,e),eR(t,e)}}):(0,d.cloneElement)(e,{ref:t})}(e,t?function(e){return o(e,t)}:o)):(o(e,t),e)});t[n]=function(){return s}}}),t}function eR(e,t){"function"==typeof e?e(t):e.current=t}function eL(e){return(eL="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ej(e){return null!==e&&"object"===eL(e)&&Object.prototype.hasOwnProperty.call(e,"current")}var e$=n("712003");function eF(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ez(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var eB=function(){var e,t,n;function r(e){var t=this;!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),ez(this,"hooks",eN({dragSource:function(e,n){t.clearDragSource(),t.dragSourceOptions=n||null,ej(e)?t.dragSourceRef=e:t.dragSourceNode=e,t.reconnectDragSource()},dragPreview:function(e,n){t.clearDragPreview(),t.dragPreviewOptions=n||null,ej(e)?t.dragPreviewRef=e:t.dragPreviewNode=e,t.reconnectDragPreview()}})),ez(this,"handlerId",null),ez(this,"dragSourceRef",null),ez(this,"dragSourceNode",void 0),ez(this,"dragSourceOptionsInternal",null),ez(this,"dragSourceUnsubscribe",void 0),ez(this,"dragPreviewRef",null),ez(this,"dragPreviewNode",void 0),ez(this,"dragPreviewOptionsInternal",null),ez(this,"dragPreviewUnsubscribe",void 0),ez(this,"lastConnectedHandlerId",null),ez(this,"lastConnectedDragSource",null),ez(this,"lastConnectedDragSourceOptions",null),ez(this,"lastConnectedDragPreview",null),ez(this,"lastConnectedDragPreviewOptions",null),ez(this,"backend",void 0),this.backend=e}return e=r,t=[{key:"receiveHandlerId",value:function(e){if(this.handlerId!==e)this.handlerId=e,this.reconnect()}},{key:"connectTarget",get:function(){return this.dragSource}},{key:"dragSourceOptions",get:function(){return this.dragSourceOptionsInternal},set:function(e){this.dragSourceOptionsInternal=e}},{key:"dragPreviewOptions",get:function(){return this.dragPreviewOptionsInternal},set:function(e){this.dragPreviewOptionsInternal=e}},{key:"reconnect",value:function(){this.reconnectDragSource(),this.reconnectDragPreview()}},{key:"reconnectDragSource",value:function(){var e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();if(t&&this.disconnectDragSource(),!!this.handlerId){if(!e){this.lastConnectedDragSource=e;return}t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions))}}},{key:"reconnectDragPreview",value:function(){var e=this.dragPreview,t=this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(t&&this.disconnectDragPreview(),!!this.handlerId){if(!e){this.lastConnectedDragPreview=e;return}t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=e,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,e,this.dragPreviewOptions))}}},{key:"didHandlerIdChange",value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:"didConnectedDragSourceChange",value:function(){return this.lastConnectedDragSource!==this.dragSource}},{key:"didConnectedDragPreviewChange",value:function(){return this.lastConnectedDragPreview!==this.dragPreview}},{key:"didDragSourceOptionsChange",value:function(){return!(0,e$.w)(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}},{key:"didDragPreviewOptionsChange",value:function(){return!(0,e$.w)(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}},{key:"disconnectDragSource",value:function(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}},{key:"disconnectDragPreview",value:function(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}},{key:"dragSource",get:function(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}},{key:"dragPreview",get:function(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}},{key:"clearDragSource",value:function(){this.dragSourceNode=null,this.dragSourceRef=null}},{key:"clearDragPreview",value:function(){this.dragPreviewNode=null,this.dragPreviewRef=null}}],eF(e.prototype,t),r}(),eH=n("739561"),eU=n.n(eH);function eV(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function eq(e,t,n){var r,o,s=(o=2,function(e){if(Array.isArray(e))return e}(r=(0,d.useState)(function(){return t(e)}))||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var s=[],a=!0,l=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(s.push(n.value),!t||s.length!==t);a=!0);}catch(e){l=!0,r=e}finally{try{!a&&null!=o.return&&o.return()}finally{if(l)throw r}}return s}}(r,2)||function(e,t){if(e){if("string"==typeof e)return eV(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eV(e,t)}}(r,o)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=s[0],l=s[1],c=(0,d.useCallback)(function(){var r=t(e);!eU()(a,r)&&(l(r),n&&n())},[a,e,n]);return eb(c),[a,c]}function eW(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function eG(e,t,n){var r,o,s,a,l,c;return l=(a=(s=2,function(e){if(Array.isArray(e))return e}(o=eq(r=t,e||function(){return{}},function(){return n.reconnect()}))||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var s=[],a=!0,l=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(s.push(n.value),!t||s.length!==t);a=!0);}catch(e){l=!0,r=e}finally{try{!a&&null!=o.return&&o.return()}finally{if(l)throw r}}return s}}(o,2)||function(e,t){if(e){if("string"==typeof e)return eW(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eW(e,t)}}(o,s)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()))[0],eb(function(){var e=r.getHandlerId();if(null!=e)return r.subscribeToStateChange(c,{handlerIds:[e]})},[r,c=a[1]]),l}function eK(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function eY(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var eZ=function(){var e,t,n;function r(e,t){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),eY(this,"spec",void 0),eY(this,"monitor",void 0),this.spec=e,this.monitor=t}return e=r,t=[{key:"canDrop",value:function(){var e=this.spec,t=this.monitor;return!e.canDrop||e.canDrop(t.getItem(),t)}},{key:"hover",value:function(){var e=this.spec,t=this.monitor;e.hover&&e.hover(t.getItem(),t)}},{key:"drop",value:function(){var e=this.spec,t=this.monitor;if(e.drop)return e.drop(t.getItem(),t)}}],eK(e.prototype,t),r}();function eJ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function eX(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function eQ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var e0=!1,e1=function(){var e,t,n;function r(e){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),eQ(this,"internalMonitor",void 0),eQ(this,"targetId",null),this.internalMonitor=e.getMonitor()}return e=r,t=[{key:"receiveHandlerId",value:function(e){this.targetId=e}},{key:"getHandlerId",value:function(){return this.targetId}},{key:"subscribeToStateChange",value:function(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}},{key:"canDrop",value:function(){if(!this.targetId)return!1;(0,ek.k)(!e0,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return e0=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{e0=!1}}},{key:"isOver",value:function(e){return!!this.targetId&&this.internalMonitor.isOverTarget(this.targetId,e)}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}],eX(e.prototype,t),r}();function e2(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function e3(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var e5=function(){var e,t,n;function r(e){var t=this;!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),e3(this,"hooks",eN({dropTarget:function(e,n){t.clearDropTarget(),t.dropTargetOptions=n,ej(e)?t.dropTargetRef=e:t.dropTargetNode=e,t.reconnect()}})),e3(this,"handlerId",null),e3(this,"dropTargetRef",null),e3(this,"dropTargetNode",void 0),e3(this,"dropTargetOptionsInternal",null),e3(this,"unsubscribeDropTarget",void 0),e3(this,"lastConnectedHandlerId",null),e3(this,"lastConnectedDropTarget",null),e3(this,"lastConnectedDropTargetOptions",null),e3(this,"backend",void 0),this.backend=e}return e=r,t=[{key:"connectTarget",get:function(){return this.dropTarget}},{key:"reconnect",value:function(){var e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();var t=this.dropTarget;if(!!this.handlerId){if(!t){this.lastConnectedDropTarget=t;return}e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=t,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions))}}},{key:"receiveHandlerId",value:function(e){if(e!==this.handlerId)this.handlerId=e,this.reconnect()}},{key:"dropTargetOptions",get:function(){return this.dropTargetOptionsInternal},set:function(e){this.dropTargetOptionsInternal=e}},{key:"didHandlerIdChange",value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:"didDropTargetChange",value:function(){return this.lastConnectedDropTarget!==this.dropTarget}},{key:"didOptionsChange",value:function(){return!(0,e$.w)(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}},{key:"disconnectDropTarget",value:function(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}},{key:"dropTarget",get:function(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}},{key:"clearDropTarget",value:function(){this.dropTargetRef=null,this.dropTargetNode=null}}],e2(e.prototype,t),r}();function e4(e,t){var n,r,o,s,a,l,c,u,p,h,f,m,g,v,b,y,x=e_(e,t);var w=(n=eC(),(0,d.useMemo)(function(){return new e1(n)},[n]));var S=(r=x.options,o=eC(),s=(0,d.useMemo)(function(){return new e5(o.getBackend())},[o]),eb(function(){return s.dropTargetOptions=r||null,s.reconnect(),function(){return s.disconnectDropTarget()}},[r]),s);return a=x,l=w,c=S,u=eC(),m=(p=a,h=l,f=(0,d.useMemo)(function(){return new eZ(p,h)},[h]),(0,d.useEffect)(function(){f.spec=p},[p]),f),eb(function(){var e,t,n,r,o,s,a=(s=2,function(e){if(Array.isArray(e))return e}(o=(e=b,t=m,[r=(n=u.getRegistry()).addTarget(e,t),function(){return n.removeTarget(r)}]))||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var s=[],a=!0,l=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(s.push(n.value),!t||s.length!==t);a=!0);}catch(e){l=!0,r=e}finally{try{!a&&null!=o.return&&o.return()}finally{if(l)throw r}}return s}}(o,2)||function(e,t){if(e){if("string"==typeof e)return eJ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eJ(e,t)}}(o,s)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),d=a[0],p=a[1];return l.receiveHandlerId(d),c.receiveHandlerId(d),p},[u,l,m,c,(b=(v=(g=a).accept,(0,d.useMemo)(function(){return(0,ek.k)(null!=g.accept,"accept must be defined"),Array.isArray(v)?v:[v]},[v]))).map(function(e){return e.toString()}).join("|")]),[eG(x.collect,w,S),(y=S,(0,d.useMemo)(function(){return y.hooks.dropTarget()},[y]))]}function e6(e,t){return{parentId:e||null,index:t}}function e8(e,t){return{type:"line",index:e,level:t}}function e9(e,t){var n;let r=e;for(;r.parent&&r.level>t;)r=r.parent;let o=(null===(n=r.parent)||void 0===n?void 0:n.id)||null;return{parentId:o,index:A(r)+1}}function e7(e){var t;let n=function(e,t){let n=e.getBoundingClientRect(),r=t.x-Math.round(n.x),o=t.y-Math.round(n.y),s=n.height,a=o<s/2,l=!a,c=s/4,u=o>c&&o<s-c;return{x:r,inTopHalf:a,inBottomHalf:l,inMiddle:u,atTop:!u&&a,atBottom:!u&&l}}(e.element,e.offset),r=e.indent,o=Math.round(Math.max(0,n.x-r)/r),{node:s,nextNode:a,prevNode:l}=e,[c,u]=function(e,t,n,r){if(!e)return[t,null];if(e.isInternal)return r.atTop?[t,e]:r.inMiddle?[e,e]:[e,n];return r.inTopHalf?[t,e]:[e,n]}(s,l,a,n);if(s&&s.isInternal&&n.inMiddle)return{drop:e6(s.id,null),cursor:{type:"highlight",id:s.id}};if(!c)return{drop:e6(null===(t=null==u?void 0:u.parent)||void 0===t?void 0:t.id,0),cursor:e8(0,0)};if(x(c)||w(c)){let e=y(o,(null==u?void 0:u.level)||0,c.level);return{drop:e9(c,e),cursor:e8(c.rowIndex+1,e)}}if(S(c)){let e=y(o,0,c.level+1);return e>c.level?{drop:e6(c.id,0),cursor:e8(c.rowIndex+1,e)}:{drop:e9(c,e),cursor:e8(c.rowIndex+1,e)}}return{drop:e6(null==c?void 0:c.id,0),cursor:e8(c.rowIndex+1,c.level+1)}}let te=d.memo(function({index:e,style:t}){b(),!function(){let e=(0,d.useContext)(m);if(null===e)throw Error("Provide a NodesContext");}();let n=f(),r=function(e){let t=f(),n=t.at(e);if(!n)throw Error(`Could not find node for index: ${e}`);return(0,d.useMemo)(()=>{let r=n.clone();return t.visibleNodes[e]=r,r},[...Object.values(n.state),n])}(e),s=(0,d.useRef)(null),a=function(e){var t,n,r,s,a,l,c,u,p,h,m,g,v,b,y,x,w,S,k,A,C;let E=f(),T=E.selectedIds;let[_,O,M]=(t=e_(()=>({canDrag:()=>e.isDraggable,type:"NODE",item:()=>{let t=E.isSelected(e.id)?Array.from(T):[e.id];return E.dispatch(en.dragStart(e.id,t)),{id:e.id,dragIds:t}},end:()=>{E.hideCursor(),E.dispatch(en.dragEnd())}}),[T,e]),(0,ek.k)(!t.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)"),r=(n=eC(),(0,d.useMemo)(function(){return new eD(n)},[n])),u=(s=t.options,a=t.previewOptions,l=eC(),eb(function(){return c.dragSourceOptions=s||null,c.reconnect(),function(){return c.disconnectDragSource()}},[c=(0,d.useMemo)(function(){return new eB(l.getBackend())},[l]),s]),eb(function(){return c.dragPreviewOptions=a||null,c.reconnect(),function(){return c.disconnectDragPreview()}},[c,a]),c),p=t,h=r,m=u,g=eC(),w=(v=p,b=h,y=m,x=(0,d.useMemo)(function(){return new eS(v,b,y)},[b,y]),(0,d.useEffect)(function(){x.spec=v},[v]),x),eb(function(){if(null!=k){var e,t,n,r,o,s,a=(s=2,function(e){if(Array.isArray(e))return e}(o=(e=k,t=w,[r=(n=g.getRegistry()).addSource(e,t),function(){return n.removeSource(r)}]))||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var s=[],a=!0,l=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(s.push(n.value),!t||s.length!==t);a=!0);}catch(e){l=!0,r=e}finally{try{!a&&null!=o.return&&o.return()}finally{if(l)throw r}}return s}}(o,2)||function(e,t){if(e){if("string"==typeof e)return eE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eE(e,t)}}(o,s)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),l=a[0],c=a[1];return h.receiveHandlerId(l),m.receiveHandlerId(l),c}},[g,h,m,w,k=(S=p,(0,d.useMemo)(function(){var e=S.type;return(0,ek.k)(null!=e,"spec.type must be defined"),e},[S]))]),[eG(t.collect,r,u),(A=u,(0,d.useMemo)(function(){return A.hooks.dragSource()},[A])),(C=u,(0,d.useMemo)(function(){return C.hooks.dragPreview()},[C]))]);return(0,d.useEffect)(()=>{M((!o&&((o=new Image).src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),o))},[M]),O}(r),l=function(e,t){let n=f(),[r,o]=e4(()=>({accept:"NODE",canDrop:()=>n.canDrop(),hover:(r,o)=>{let s=o.getClientOffset();if(!e.current||!s)return;let{cursor:a,drop:l}=e7({element:e.current,offset:s,indent:n.indent,node:t,prevNode:t.prev,nextNode:t.next});l&&n.dispatch(en.hovering(l.parentId,l.index)),o.canDrop()?a&&n.showCursor(a):n.hideCursor()},drop:(e,t)=>{if(!t.canDrop())return null;let{parentId:r,index:o,dragIds:s}=n.state.dnd;R(n.props.onMove,{dragIds:s,parentId:r===Z?null:r,index:null===o?0:o,dragNodes:n.dragNodes,parentNode:n.get(r)}),n.open(r)}}),[t,e.current,n.props]);return o}(s,r),c=(0,d.useCallback)(e=>{s.current=e,l(e)},[l]),p=n.indent*r.level,h=(0,d.useMemo)(()=>({paddingLeft:p}),[p]),g=(0,d.useMemo)(()=>{var e,r;return Object.assign(Object.assign({},t),{top:parseFloat(t.top)+(null!==(r=null!==(e=n.props.padding)&&void 0!==e?e:n.props.paddingTop)&&void 0!==r?r:0)})},[t,n.props.padding,n.props.paddingTop]),v={role:"treeitem","aria-level":r.level+1,"aria-selected":r.isSelected,"aria-expanded":r.isOpen,style:g,tabIndex:-1,className:n.props.rowClassName};(0,d.useEffect)(()=>{var e;!r.isEditing&&r.isFocused&&(null===(e=s.current)||void 0===e||e.focus({preventScroll:!0}))},[r.isEditing,r.isFocused,s.current]);let y=n.renderNode,x=n.renderRow;return(0,u.jsx)(x,{node:r,innerRef:c,attrs:v,children:(0,u.jsx)(y,{node:r,tree:n,style:h,dragHandle:a})})}),tt="",tn=null;function tr(){b();let e=f();return(0,u.jsx)("div",{role:"tree",style:{height:e.height,width:e.width,minHeight:0,minWidth:0},onContextMenu:e.props.onContextMenu,onClick:e.props.onClick,tabIndex:0,onFocus:t=>{!t.currentTarget.contains(t.relatedTarget)&&e.onFocus()},onBlur:t=>{!t.currentTarget.contains(t.relatedTarget)&&e.onBlur()},onKeyDown:t=>{var n;if(e.isEditing)return;if("Backspace"===t.key){if(!e.props.onDelete)return;let t=Array.from(e.selectedIds);if(t.length>1){let n=e.mostRecentNode;for(;n&&n.isSelected;)n=n.nextSibling;!n&&(n=e.lastNode),e.focus(n,{scroll:!1}),e.delete(Array.from(t))}else{let t=e.focusedNode;if(t){let n=t.nextSibling,r=t.parent;e.focus(n||r,{scroll:!1}),e.delete(t)}}return}if("Tab"===t.key&&!t.shiftKey){t.preventDefault(),_(t.currentTarget);return}if("Tab"===t.key&&t.shiftKey){t.preventDefault(),O(t.currentTarget);return}if("ArrowDown"===t.key){t.preventDefault();let n=e.nextNode;if(t.metaKey){e.select(e.focusedNode),e.activate(e.focusedNode);return}if(!t.shiftKey||e.props.disableMultiSelection){e.focus(n);return}else{if(!n)return;let t=e.focusedNode;t?t.isSelected?e.selectContiguous(n):e.selectMulti(n):e.focus(e.firstNode);return}}if("ArrowUp"===t.key){t.preventDefault();let n=e.prevNode;if(!t.shiftKey||e.props.disableMultiSelection){e.focus(n);return}{if(!n)return;let t=e.focusedNode;t?t.isSelected?e.selectContiguous(n):e.selectMulti(n):e.focus(e.lastNode);return}}if("ArrowRight"===t.key){let t=e.focusedNode;if(!t)return;t.isInternal&&t.isOpen?e.focus(e.nextNode):t.isInternal&&e.open(t.id);return}if("ArrowLeft"===t.key){let t=e.focusedNode;if(!t||t.isRoot)return;t.isInternal&&t.isOpen?e.close(t.id):!(null===(n=t.parent)||void 0===n?void 0:n.isRoot)&&e.focus(t.parent);return}if("a"===t.key&&t.metaKey&&!e.props.disableMultiSelection){t.preventDefault(),e.selectAll();return}if("a"===t.key&&!t.metaKey&&e.props.onCreate){e.createLeaf();return}if("A"===t.key&&!t.metaKey){if(!e.props.onCreate)return;e.createInternal();return}if("Home"===t.key){t.preventDefault(),e.focus(e.firstNode);return}if("End"===t.key){t.preventDefault(),e.focus(e.lastNode);return}if("Enter"===t.key){let t=e.focusedNode;if(!t||!t.isEditable||!e.props.onRename)return;setTimeout(()=>{t&&e.edit(t)});return}if(" "===t.key){t.preventDefault();let n=e.focusedNode;if(!n)return;n.isLeaf?(n.select(),n.activate()):n.toggle();return}if("*"===t.key){let t=e.focusedNode;if(!t)return;e.openSiblings(t);return}if("PageUp"===t.key){t.preventDefault(),e.pageUp();return}"PageDown"===t.key&&(t.preventDefault(),e.pageDown()),clearTimeout(tn),tt+=t.key,tn=setTimeout(()=>{tt=""},600);let r=e.visibleNodes.find(e=>{let t=e.data.name;return"string"==typeof t&&t.toLowerCase().startsWith(tt)});r&&e.focus(r.id)},children:(0,u.jsx)(ed.t7,{className:e.props.className,outerRef:e.listEl,itemCount:e.visibleNodes.length,height:e.height,width:e.width,itemSize:e.rowHeight,overscanCount:e.overscanCount,itemKey:t=>{var n;return(null===(n=e.visibleNodes[t])||void 0===n?void 0:n.id)||t},outerElementType:ef,innerElementType:ev,onScroll:e.props.onScroll,onItemsRendered:e.onItemsRendered.bind(e),ref:e.list,children:te})})}function ti(e){return e.isFiltered?function(e,t){let n={},r=[];return!function e(r){if(!r.isRoot&&t(r)){n[r.id]=!0;let e=r.parent;for(;e;)n[e.id]=!0,e=e.parent}if(r.children)for(let t of r.children)e(t)}(e),!function e(t){var o;t.level>=0&&n[t.id]&&r.push(t),t.isOpen&&(null===(o=t.children)||void 0===o||o.forEach(e))}(e),r.forEach(to),r}(e.root,e.isMatch.bind(e)):function(e){let t=[];return!function e(n){var r;n.level>=0&&t.push(n),n.isOpen&&(null===(r=n.children)||void 0===r||r.forEach(e))}(e),t.forEach(to),t}(e.root)}function to(e,t){e.rowIndex=t}let ts=e=>e.reduce((e,t,n)=>(e[t.id]=n,e),{});var ta=function(e,t,n,r){return new(n||(n=Promise))(function(o,s){function a(e){try{c(r.next(e))}catch(e){s(e)}}function l(e){try{c(r.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,l)}c((r=r.apply(e,t||[])).next())})};let{safeRun:tl,identify:tc,identifyNull:tu}=l;class td{constructor(e,t,n,r){this.store=e,this.props=t,this.list=n,this.listEl=r,this.visibleStartIndex=0,this.visibleStopIndex=0,this.root=J(this),this.visibleNodes=ti(this),this.idToIndex=ts(this.visibleNodes)}update(e){this.props=e,this.root=J(this),this.visibleNodes=ti(this),this.idToIndex=ts(this.visibleNodes)}dispatch(e){return this.store.dispatch(e)}get state(){return this.store.getState()}get openState(){return this.state.nodes.open.unfiltered}get width(){var e;return null!==(e=this.props.width)&&void 0!==e?e:300}get height(){var e;return null!==(e=this.props.height)&&void 0!==e?e:500}get indent(){var e;return null!==(e=this.props.indent)&&void 0!==e?e:24}get rowHeight(){var e;return null!==(e=this.props.rowHeight)&&void 0!==e?e:24}get overscanCount(){var e;return null!==(e=this.props.overscanCount)&&void 0!==e?e:1}get searchTerm(){return(this.props.searchTerm||"").trim()}get matchFn(){var e;let t=null!==(e=this.props.searchMatch)&&void 0!==e?e:(e,t)=>JSON.stringify(Object.values(e.data)).toLocaleLowerCase().includes(t.toLocaleLowerCase());return e=>t(e,this.searchTerm)}accessChildren(e){var t;return null!==(t=I(e,this.props.childrenAccessor||"children"))&&void 0!==t?t:null}accessId(e){let t=I(e,this.props.idAccessor||"id");if(!t)throw Error("Data must contain an 'id' property or props.idAccessor must return a string");return t}get firstNode(){var e;return null!==(e=this.visibleNodes[0])&&void 0!==e?e:null}get lastNode(){var e;return null!==(e=this.visibleNodes[this.visibleNodes.length-1])&&void 0!==e?e:null}get focusedNode(){var e;return null!==(e=this.get(this.state.nodes.focus.id))&&void 0!==e?e:null}get mostRecentNode(){var e;return null!==(e=this.get(this.state.nodes.selection.mostRecent))&&void 0!==e?e:null}get nextNode(){let e=this.indexOf(this.focusedNode);return null===e?null:this.at(e+1)}get prevNode(){let e=this.indexOf(this.focusedNode);return null===e?null:this.at(e-1)}get(e){return e&&e in this.idToIndex&&this.visibleNodes[this.idToIndex[e]]||null}at(e){return this.visibleNodes[e]||null}nodesBetween(e,t){var n;if(null===e||null===t)return[];let r=null!==(n=this.indexOf(e))&&void 0!==n?n:0,o=this.indexOf(t);if(null===o)return[];let s=Math.min(r,o),a=Math.max(r,o);return this.visibleNodes.slice(s,a+1)}indexOf(e){let t=P(e);return t?this.idToIndex[t]:null}get editingId(){return this.state.nodes.edit.id}createInternal(){return this.create({type:"internal"})}createLeaf(){return this.create({type:"leaf"})}create(){return ta(this,arguments,void 0,function*(e={}){var t,n;let r=void 0===e.parentId?$(this):e.parentId,o=null!==(t=e.index)&&void 0!==t?t:j(this),s=null!==(n=e.type)&&void 0!==n?n:"leaf",a=yield tl(this.props.onCreate,{type:s,parentId:r,index:o,parentNode:this.get(r)});a&&(this.focus(a),setTimeout(()=>{this.edit(a).then(()=>{this.select(a),this.activate(a)})}))})}delete(e){return ta(this,void 0,void 0,function*(){if(!e)return;let t=(Array.isArray(e)?e:[e]).map(tc),n=t.map(e=>this.get(e)).filter(e=>!!e);yield tl(this.props.onDelete,{nodes:n,ids:t})})}edit(e){let t=tc(e);return this.resolveEdit({cancelled:!0}),this.scrollTo(t),this.dispatch(G(t)),new Promise(e=>{td.editPromise=e})}submit(e,t){return ta(this,void 0,void 0,function*(){if(!e)return;let n=tc(e);yield tl(this.props.onRename,{id:n,name:t,node:this.get(n)}),this.dispatch(G(null)),this.resolveEdit({cancelled:!1,value:t}),setTimeout(()=>this.onFocus())})}reset(){this.dispatch(G(null)),this.resolveEdit({cancelled:!0}),setTimeout(()=>this.onFocus())}activate(e){let t=this.get(tu(e));t&&tl(this.props.onActivate,t)}resolveEdit(e){let t=td.editPromise;t&&t(e),td.editPromise=null}get selectedIds(){return this.state.nodes.selection.ids}get selectedNodes(){let e=[];for(let t of Array.from(this.selectedIds)){let n=this.get(t);n&&e.push(n)}return e}focus(e,t={}){e&&(this.props.selectionFollowsFocus?this.select(e):(this.dispatch(K(tc(e))),!1!==t.scroll&&this.scrollTo(e),this.focusedNode&&tl(this.props.onFocus,this.focusedNode)))}pageUp(){var e,t;let n=this.visibleStartIndex,r=this.visibleStopIndex-n,o=null!==(t=null===(e=this.focusedNode)||void 0===e?void 0:e.rowIndex)&&void 0!==t?t:0;o=o>n?n:Math.max(n-r,0),this.focus(this.at(o))}pageDown(){var e,t;let n=this.visibleStartIndex,r=this.visibleStopIndex,o=r-n,s=null!==(t=null===(e=this.focusedNode)||void 0===e?void 0:e.rowIndex)&&void 0!==t?t:0;s=s<r?r:Math.min(s+o,this.visibleNodes.length-1),this.focus(this.at(s))}select(e,t={}){if(!e)return;let n=!1!==t.focus,r=tc(e);n&&this.dispatch(K(r)),this.dispatch(et.only(r)),this.dispatch(et.anchor(r)),this.dispatch(et.mostRecent(r)),this.scrollTo(r,t.align),this.focusedNode&&n&&tl(this.props.onFocus,this.focusedNode),tl(this.props.onSelect,this.selectedNodes)}deselect(e){if(!e)return;let t=tc(e);this.dispatch(et.remove(t)),tl(this.props.onSelect,this.selectedNodes)}selectMulti(e){let t=this.get(tu(e));t&&(this.dispatch(K(t.id)),this.dispatch(et.add(t.id)),this.dispatch(et.anchor(t.id)),this.dispatch(et.mostRecent(t.id)),this.scrollTo(t),this.focusedNode&&tl(this.props.onFocus,this.focusedNode),tl(this.props.onSelect,this.selectedNodes))}selectContiguous(e){if(!e)return;let t=tc(e),{anchor:n,mostRecent:r}=this.state.nodes.selection;this.dispatch(K(t)),this.dispatch(et.remove(this.nodesBetween(n,r))),this.dispatch(et.add(this.nodesBetween(n,tu(t)))),this.dispatch(et.mostRecent(t)),this.scrollTo(t),this.focusedNode&&tl(this.props.onFocus,this.focusedNode),tl(this.props.onSelect,this.selectedNodes)}deselectAll(){this.setSelection({ids:[],anchor:null,mostRecent:null}),tl(this.props.onSelect,this.selectedNodes)}selectAll(){var e;this.setSelection({ids:Object.keys(this.idToIndex),anchor:this.firstNode,mostRecent:this.lastNode}),this.dispatch(K(null===(e=this.lastNode)||void 0===e?void 0:e.id)),this.focusedNode&&tl(this.props.onFocus,this.focusedNode),tl(this.props.onSelect,this.selectedNodes)}setSelection(e){var t;let n=new Set(null===(t=e.ids)||void 0===t?void 0:t.map(tc)),r=tu(e.anchor),o=tu(e.mostRecent);this.dispatch(et.set({ids:n,anchor:r,mostRecent:o})),tl(this.props.onSelect,this.selectedNodes)}get cursorParentId(){let{cursor:e}=this.state.dnd;if("highlight"===e.type)return e.id;return null}get cursorOverFolder(){return"highlight"===this.state.dnd.cursor.type}get dragNodes(){return this.state.dnd.dragIds.map(e=>this.get(e)).filter(e=>!!e)}get dragNode(){return this.get(this.state.nodes.drag.id)}get dragDestinationParent(){return this.get(this.state.nodes.drag.destinationParentId)}get dragDestinationIndex(){return this.state.nodes.drag.destinationIndex}canDrop(){var e;if(this.isFiltered)return!1;let t=null!==(e=this.get(this.state.dnd.parentId))&&void 0!==e?e:this.root,n=this.dragNodes,r=this.props.disableDrop;for(let e of n)if(!e||!t||e.isInternal&&k(t,e))return!1;if("function"==typeof r)return!r({parentNode:t,dragNodes:this.dragNodes,index:this.state.dnd.index||0});if("string"==typeof r)return!t.data[r];if("boolean"==typeof r)return!r;else return!0}hideCursor(){this.dispatch(en.cursor({type:"none"}))}showCursor(e){this.dispatch(en.cursor(e))}open(e){let t=tu(e);if(!!t)!this.isOpen(t)&&(this.dispatch(X.open(t,this.isFiltered)),tl(this.props.onToggle,t))}close(e){let t=tu(e);if(!!t)this.isOpen(t)&&(this.dispatch(X.close(t,this.isFiltered)),tl(this.props.onToggle,t))}toggle(e){let t=tu(e);if(t)return this.isOpen(t)?this.close(t):this.open(t)}openParents(e){let t=tu(e);if(!t)return;let n=E(this.root,t),r=null==n?void 0:n.parent;for(;r;)this.open(r.id),r=r.parent}openSiblings(e){let t=e.parent;if(t){if(t.children){let n=e.isOpen;for(let e of t.children)e.isInternal&&(n?this.close(e.id):this.open(e.id));this.scrollTo(this.focusedNode)}}else this.toggle(e.id)}openAll(){T(this.root,e=>{e.isInternal&&e.open()})}closeAll(){T(this.root,e=>{e.isInternal&&e.close()})}scrollTo(e,t="smart"){if(!e)return;let n=tc(e);return this.openParents(n),L(()=>n in this.idToIndex).then(()=>{var e;let r=this.idToIndex[n];void 0!==r&&(null===(e=this.list.current)||void 0===e||e.scrollToItem(r,t))}).catch(()=>{})}get isEditing(){return null!==this.state.nodes.edit.id}get isFiltered(){var e;return!!(null===(e=this.props.searchTerm)||void 0===e?void 0:e.trim())}get hasFocus(){return this.state.nodes.focus.treeFocused}get hasNoSelection(){return 0===this.state.nodes.selection.ids.size}get hasOneSelection(){return 1===this.state.nodes.selection.ids.size}get hasMultipleSelections(){return this.state.nodes.selection.ids.size>1}isSelected(e){return!!e&&this.state.nodes.selection.ids.has(e)}isOpen(e){var t,n,r;if(!e)return!1;if(e===Z)return!0;let o=null===(t=this.props.openByDefault)||void 0===t||t;return this.isFiltered?null===(n=this.state.nodes.open.filtered[e])||void 0===n||n:null!==(r=this.state.nodes.open.unfiltered[e])&&void 0!==r?r:o}isEditable(e){return!I(e,this.props.disableEdit||(()=>!1))}isDraggable(e){return!I(e,this.props.disableDrag||(()=>!1))}isDragging(e){let t=tu(e);return!!t&&this.state.nodes.drag.id===t}isFocused(e){return this.hasFocus&&this.state.nodes.focus.id===e}isMatch(e){return this.matchFn(e)}willReceiveDrop(e){let t=tu(e);if(!t)return!1;let{destinationParentId:n,destinationIndex:r}=this.state.nodes.drag;return t===n&&null===r}onFocus(){let e=this.focusedNode||this.firstNode;e&&this.dispatch(K(e.id))}onBlur(){this.dispatch({type:"TREE_BLUR"})}onItemsRendered(e){this.visibleStartIndex=e.visibleStartIndex,this.visibleStopIndex=e.visibleStopIndex}get renderContainer(){return this.props.renderContainer||tr}get renderRow(){return this.props.renderRow||U}get renderNode(){return this.props.children||V}get renderDragPreview(){return this.props.renderDragPreview||es}get renderCursor(){return this.props.renderCursor||H}}function tp(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var th="function"==typeof Symbol&&Symbol.observable||"@@observable",tf=()=>Math.random().toString(36).substring(7).split("").join("."),tm={INIT:`@@redux/INIT${tf()}`,REPLACE:`@@redux/REPLACE${tf()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${tf()}`};function tg(e){let t;let n=Object.keys(e),r={};for(let t=0;t<n.length;t++){let o=n[t];"function"==typeof e[o]&&(r[o]=e[o])}let o=Object.keys(r);try{!function(e){Object.keys(e).forEach(t=>{let n=e[t];if(void 0===n(void 0,{type:tm.INIT}))throw Error(tp(12));if(void 0===n(void 0,{type:tm.PROBE_UNKNOWN_ACTION()}))throw Error(tp(13))})}(r)}catch(e){t=e}return function(e={},n){if(t)throw t;let s=!1,a={};for(let t=0;t<o.length;t++){let l=o[t],c=r[l],u=e[l],d=c(u,n);if(void 0===d)throw n&&n.type,Error(tp(14));a[l]=d,s=s||d!==u}return(s=s||o.length!==Object.keys(e).length)?a:e}}let tv=tg({nodes:tg({focus:function(e={id:null,treeFocused:!1},t){return"FOCUS"===t.type?Object.assign(Object.assign({},e),{id:t.id,treeFocused:!0}):"TREE_BLUR"===t.type?Object.assign(Object.assign({},e),{treeFocused:!1}):e},edit:function(e={id:null},t){return"EDIT"===t.type?Object.assign(Object.assign({},e),{id:t.id}):e},open:function(e={filtered:{},unfiltered:{}},t){return t.type.startsWith("VISIBILITY")?t.filtered?Object.assign(Object.assign({},e),{filtered:Q(e.filtered,t)}):Object.assign(Object.assign({},e),{unfiltered:Q(e.unfiltered,t)}):e},selection:function(e=ee().nodes.selection,t){let n=e.ids;switch(t.type){case"SELECTION_CLEAR":return Object.assign(Object.assign({},e),{ids:new Set});case"SELECTION_ONLY":return Object.assign(Object.assign({},e),{ids:new Set([t.id])});case"SELECTION_ADD":if(0===t.ids.length)return e;return t.ids.forEach(e=>n.add(e)),Object.assign(Object.assign({},e),{ids:new Set(n)});case"SELECTION_REMOVE":if(0===t.ids.length)return e;return t.ids.forEach(e=>n.delete(e)),Object.assign(Object.assign({},e),{ids:new Set(n)});case"SELECTION_SET":return Object.assign(Object.assign({},e),{ids:t.ids,mostRecent:t.mostRecent,anchor:t.anchor});case"SELECTION_MOST_RECENT":return Object.assign(Object.assign({},e),{mostRecent:t.id});case"SELECTION_ANCHOR":return Object.assign(Object.assign({},e),{anchor:t.id});default:return e}},drag:function(e=ee().nodes.drag,t){switch(t.type){case"DND_DRAG_START":return Object.assign(Object.assign({},e),{id:t.id,selectedIds:t.dragIds});case"DND_DRAG_END":return Object.assign(Object.assign({},e),{id:null,destinationParentId:null,destinationIndex:null,selectedIds:[]});case"DND_HOVERING":if(t.parentId!==e.destinationParentId||t.index!=e.destinationIndex)return Object.assign(Object.assign({},e),{destinationParentId:t.parentId,destinationIndex:t.index});return e;default:return e}}}),dnd:function(e=ee().dnd,t){switch(t.type){case"DND_CURSOR":return Object.assign(Object.assign({},e),{cursor:t.cursor});case"DND_DRAG_START":return Object.assign(Object.assign({},e),{dragId:t.id,dragIds:t.dragIds});case"DND_DRAG_END":return ee().dnd;case"DND_HOVERING":return Object.assign(Object.assign({},e),{parentId:t.parentId,index:t.index});default:return e}}});function tb(e){var t=null;return function(){return null==t&&(t=e()),t}}function ty(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function tx(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var tw=function(){var e,t,n;function r(e){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),tx(this,"entered",[]),tx(this,"isNodeInDocument",void 0),this.isNodeInDocument=e}return e=r,t=[{key:"enter",value:function(e){var t,n,r,o,s,a=this,l=this.entered.length;return this.entered=(t=this.entered.filter(function(t){return a.isNodeInDocument(t)&&(!t.contains||t.contains(e))}),n=[e],r=new Set,o=function(e){return r.add(e)},t.forEach(o),n.forEach(o),s=[],r.forEach(function(e){return s.push(e)}),s),0===l&&this.entered.length>0}},{key:"leave",value:function(e){var t,n,r=this.entered.length;return this.entered=(t=this.entered.filter(this.isNodeInDocument),n=e,t.filter(function(e){return e!==n})),r>0&&0===this.entered.length}},{key:"reset",value:function(){this.entered=[]}}],ty(e.prototype,t),r}(),tS=tb(function(){return/firefox/i.test(navigator.userAgent)}),tk=tb(function(){return!!window.safari});function tA(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function tC(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var tE=function(){var e,t,n;function r(e,t){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),tC(this,"xs",void 0),tC(this,"ys",void 0),tC(this,"c1s",void 0),tC(this,"c2s",void 0),tC(this,"c3s",void 0);for(var n,o,s,a=e.length,l=[],c=0;c<a;c++)l.push(c);l.sort(function(t,n){return e[t]<e[n]?-1:1});for(var u=[],d=[],p=[],h=0;h<a-1;h++)n=e[h+1]-e[h],o=t[h+1]-t[h],d.push(n),u.push(o),p.push(o/n);for(var f=[p[0]],m=0;m<d.length-1;m++){var g=p[m],v=p[m+1];if(g*v<=0)f.push(0);else{n=d[m];var b=d[m+1],y=n+b;f.push(3*y/((y+b)/g+(y+n)/v))}}f.push(p[p.length-1]);for(var x=[],w=[],S=0;S<f.length-1;S++){s=p[S];var k=f[S],A=1/d[S],C=k+f[S+1]-s-s;x.push((s-k-C)*A),w.push(C*A*A)}this.xs=e,this.ys=t,this.c1s=f,this.c2s=x,this.c3s=w}return e=r,t=[{key:"interpolate",value:function(e){var t,n=this.xs,r=this.ys,o=this.c1s,s=this.c2s,a=this.c3s,l=n.length-1;if(e===n[l])return r[l];for(var c=0,u=a.length-1;c<=u;){var d=n[t=Math.floor(.5*(c+u))];if(d<e)c=t+1;else{if(!(d>e))return r[t];u=t-1}}var p=e-n[l=Math.max(0,u)],h=p*p;return r[l]+o[l]*p+s[l]*h+a[l]*p*h}}],tA(e.prototype,t),r}();function tT(e){var t=1===e.nodeType?e:e.parentElement;if(!t)return null;var n=t.getBoundingClientRect(),r=n.top;return{x:n.left,y:r}}function t_(e){return{x:e.clientX,y:e.clientY}}var tO="__NATIVE_FILE__",tM="__NATIVE_URL__",tI="__NATIVE_TEXT__",tP="__NATIVE_HTML__";function tD(e,t,n){var r=t.reduce(function(t,n){return t||e.getData(n)},"");return null!=r?r:n}function tN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var tR=(tN(s={},tO,{exposeProperties:{files:function(e){return Array.prototype.slice.call(e.files)},items:function(e){return e.items},dataTransfer:function(e){return e}},matchesTypes:["Files"]}),tN(s,tP,{exposeProperties:{html:function(e,t){return tD(e,t,"")},dataTransfer:function(e){return e}},matchesTypes:["Html","text/html"]}),tN(s,tM,{exposeProperties:{urls:function(e,t){return tD(e,t,"").split("\n")},dataTransfer:function(e){return e}},matchesTypes:["Url","text/uri-list"]}),tN(s,tI,{exposeProperties:{text:function(e,t){return tD(e,t,"")},dataTransfer:function(e){return e}},matchesTypes:["Text","text/plain"]}),s);function tL(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function tj(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var t$=function(){var e,t,n;function r(e){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),tj(this,"item",void 0),tj(this,"config",void 0),this.config=e,this.item={},this.initializeExposedProperties()}return e=r,t=[{key:"initializeExposedProperties",value:function(){var e=this;Object.keys(this.config.exposeProperties).forEach(function(t){Object.defineProperty(e.item,t,{configurable:!0,enumerable:!0,get:function(){return console.warn("Browser doesn't allow reading \"".concat(t,'" until the drop event.')),null}})})}},{key:"loadDataTransfer",value:function(e){var t=this;if(e){var n={};Object.keys(this.config.exposeProperties).forEach(function(r){n[r]={value:t.config.exposeProperties[r](e,t.config.matchesTypes),configurable:!0,enumerable:!0}}),Object.defineProperties(this.item,n)}}},{key:"canDrag",value:function(){return!0}},{key:"beginDrag",value:function(){return this.item}},{key:"isDragging",value:function(e,t){return t===e.getSourceId()}},{key:"endDrag",value:function(){}}],tL(e.prototype,t),r}();function tF(e){if(!e)return null;var t=Array.prototype.slice.call(e.types||[]);return Object.keys(tR).filter(function(e){return tR[e].matchesTypes.some(function(e){return t.indexOf(e)>-1})})[0]||null}function tz(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function tB(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var tH=function(){var e,t,n;function r(e,t){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),tB(this,"ownerDocument",null),tB(this,"globalContext",void 0),tB(this,"optionsArgs",void 0),this.globalContext=e,this.optionsArgs=t}return e=r,t=[{key:"window",get:function(){return this.globalContext?this.globalContext:"undefined"!=typeof window?window:void 0}},{key:"document",get:function(){var e;return null!==(e=this.globalContext)&&void 0!==e&&e.document?this.globalContext.document:this.window?this.window.document:void 0}},{key:"rootElement",get:function(){var e;return(null===(e=this.optionsArgs)||void 0===e?void 0:e.rootElement)||this.window}}],tz(e.prototype,t),r}();function tU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function tV(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tU(Object(n),!0).forEach(function(t){tW(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tU(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function tq(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function tW(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var tG=function(){var e,t,n;function r(e,t,n){var o=this;!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),tW(this,"options",void 0),tW(this,"actions",void 0),tW(this,"monitor",void 0),tW(this,"registry",void 0),tW(this,"enterLeaveCounter",void 0),tW(this,"sourcePreviewNodes",new Map),tW(this,"sourcePreviewNodeOptions",new Map),tW(this,"sourceNodes",new Map),tW(this,"sourceNodeOptions",new Map),tW(this,"dragStartSourceIds",null),tW(this,"dropTargetIds",[]),tW(this,"dragEnterTargetIds",[]),tW(this,"currentNativeSource",null),tW(this,"currentNativeHandle",null),tW(this,"currentDragSourceNode",null),tW(this,"altKeyPressed",!1),tW(this,"mouseMoveTimeoutTimer",null),tW(this,"asyncEndDragFrameId",null),tW(this,"dragOverTargetIds",null),tW(this,"lastClientOffset",null),tW(this,"hoverRafId",null),tW(this,"getSourceClientOffset",function(e){var t=o.sourceNodes.get(e);return t&&tT(t)||null}),tW(this,"endDragNativeItem",function(){if(!!o.isDraggingNativeItem())o.actions.endDrag(),o.currentNativeHandle&&o.registry.removeSource(o.currentNativeHandle),o.currentNativeHandle=null,o.currentNativeSource=null}),tW(this,"isNodeInDocument",function(e){return!!(e&&o.document&&o.document.body&&o.document.body.contains(e))}),tW(this,"endDragIfSourceWasRemovedFromDOM",function(){var e=o.currentDragSourceNode;if(!(null==e||o.isNodeInDocument(e)))o.clearCurrentDragSourceNode()&&o.monitor.isDragging()&&o.actions.endDrag()}),tW(this,"handleTopDragStartCapture",function(){o.clearCurrentDragSourceNode(),o.dragStartSourceIds=[]}),tW(this,"handleTopDragStart",function(e){if(!e.defaultPrevented){var t=o.dragStartSourceIds;o.dragStartSourceIds=null;var n=t_(e);o.monitor.isDragging()&&o.actions.endDrag(),o.actions.beginDrag(t||[],{publishSource:!1,getSourceClientOffset:o.getSourceClientOffset,clientOffset:n});var r=e.dataTransfer,s=tF(r);if(o.monitor.isDragging()){if(r&&"function"==typeof r.setDragImage){var a=o.monitor.getSourceId(),l=o.sourceNodes.get(a),c=o.sourcePreviewNodes.get(a)||l;if(c){var u,d,p,h,f,m,g,v,b,y,x,w,S,k,A,C,E,T,_,O,M,I,P,D,N,R,L=o.getCurrentSourcePreviewNodeOptions(),j=L.anchorX,$=L.anchorY,F=L.offsetX,z=L.offsetY;var B=(u=l,d=c,p=n,h={anchorX:j,anchorY:$},f={offsetX:F,offsetY:z},b=tT((v="IMG"===(m=d).nodeName&&(tS()||!(null!==(g=document.documentElement)&&void 0!==g&&g.contains(m))))?u:d),y={x:p.x-b.x,y:p.y-b.y},x=u.offsetWidth,w=u.offsetHeight,S=h.anchorX,k=h.anchorY,I=(M=(A=v,C=d,E=x,T=w,_=A?C.width:E,O=A?C.height:T,tk()&&A&&(O/=window.devicePixelRatio,_/=window.devicePixelRatio),{dragPreviewWidth:_,dragPreviewHeight:O})).dragPreviewWidth,P=M.dragPreviewHeight,D=f.offsetX,N=f.offsetY,{x:0===D||D?D:new tE([0,.5,1],[y.x,y.x/x*I,y.x+I-x]).interpolate(S),y:0===N||N?N:(R=new tE([0,.5,1],[y.y,y.y/w*P,y.y+P-w]).interpolate(k),tk()&&v&&(R+=(window.devicePixelRatio-1)*P),R)});r.setDragImage(c,B.x,B.y)}}try{null==r||r.setData("application/json",{})}catch(e){}o.setCurrentDragSourceNode(e.target),o.getCurrentSourcePreviewNodeOptions().captureDraggingState?o.actions.publishDragSource():setTimeout(function(){return o.actions.publishDragSource()},0)}else if(s)o.beginDragNativeItem(s);else{if(r&&!r.types&&(e.target&&!e.target.hasAttribute||!e.target.hasAttribute("draggable")))return;e.preventDefault()}}}),tW(this,"handleTopDragEndCapture",function(){o.clearCurrentDragSourceNode()&&o.monitor.isDragging()&&o.actions.endDrag()}),tW(this,"handleTopDragEnterCapture",function(e){if(o.dragEnterTargetIds=[],!(!o.enterLeaveCounter.enter(e.target)||o.monitor.isDragging())){var t=e.dataTransfer,n=tF(t);n&&o.beginDragNativeItem(n,t)}}),tW(this,"handleTopDragEnter",function(e){var t=o.dragEnterTargetIds;if(o.dragEnterTargetIds=[],!!o.monitor.isDragging())o.altKeyPressed=e.altKey,t.length>0&&o.actions.hover(t,{clientOffset:t_(e)}),t.some(function(e){return o.monitor.canDropOnTarget(e)})&&(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=o.getCurrentDropEffect()))}),tW(this,"handleTopDragOverCapture",function(){o.dragOverTargetIds=[]}),tW(this,"handleTopDragOver",function(e){var t=o.dragOverTargetIds;if(o.dragOverTargetIds=[],!o.monitor.isDragging()){e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="none");return}o.altKeyPressed=e.altKey,o.lastClientOffset=t_(e),null===o.hoverRafId&&"undefined"!=typeof requestAnimationFrame&&(o.hoverRafId=requestAnimationFrame(function(){o.monitor.isDragging()&&o.actions.hover(t||[],{clientOffset:o.lastClientOffset}),o.hoverRafId=null})),(t||[]).some(function(e){return o.monitor.canDropOnTarget(e)})?(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=o.getCurrentDropEffect())):o.isDraggingNativeItem()?e.preventDefault():(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="none"))}),tW(this,"handleTopDragLeaveCapture",function(e){if(o.isDraggingNativeItem()&&e.preventDefault(),!!o.enterLeaveCounter.leave(e.target))o.isDraggingNativeItem()&&setTimeout(function(){return o.endDragNativeItem()},0)}),tW(this,"handleTopDropCapture",function(e){if(o.dropTargetIds=[],o.isDraggingNativeItem()){var t;e.preventDefault(),null===(t=o.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer)}else tF(e.dataTransfer)&&e.preventDefault();o.enterLeaveCounter.reset()}),tW(this,"handleTopDrop",function(e){var t=o.dropTargetIds;o.dropTargetIds=[],o.actions.hover(t,{clientOffset:t_(e)}),o.actions.drop({dropEffect:o.getCurrentDropEffect()}),o.isDraggingNativeItem()?o.endDragNativeItem():o.monitor.isDragging()&&o.actions.endDrag()}),tW(this,"handleSelectStart",function(e){var t=e.target;if("function"==typeof t.dragDrop&&"INPUT"!==t.tagName&&"SELECT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!t.isContentEditable)e.preventDefault(),t.dragDrop()}),this.options=new tH(t,n),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new tw(this.isNodeInDocument)}return e=r,t=[{key:"profile",value:function(){var e,t;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:(null===(e=this.dragStartSourceIds)||void 0===e?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:(null===(t=this.dragOverTargetIds)||void 0===t?void 0:t.length)||0}}},{key:"window",get:function(){return this.options.window}},{key:"document",get:function(){return this.options.document}},{key:"rootElement",get:function(){return this.options.rootElement}},{key:"setup",value:function(){var e=this.rootElement;if(void 0!==e){if(e.__isReactDndBackendSetUp)throw Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}},{key:"teardown",value:function(){var e,t=this.rootElement;if(void 0!==t)t.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId&&(null===(e=this.window)||void 0===e||e.cancelAnimationFrame(this.asyncEndDragFrameId))}},{key:"connectDragPreview",value:function(e,t,n){var r=this;return this.sourcePreviewNodeOptions.set(e,n),this.sourcePreviewNodes.set(e,t),function(){r.sourcePreviewNodes.delete(e),r.sourcePreviewNodeOptions.delete(e)}}},{key:"connectDragSource",value:function(e,t,n){var r=this;this.sourceNodes.set(e,t),this.sourceNodeOptions.set(e,n);var o=function(t){return r.handleDragStart(t,e)},s=function(e){return r.handleSelectStart(e)};return t.setAttribute("draggable","true"),t.addEventListener("dragstart",o),t.addEventListener("selectstart",s),function(){r.sourceNodes.delete(e),r.sourceNodeOptions.delete(e),t.removeEventListener("dragstart",o),t.removeEventListener("selectstart",s),t.setAttribute("draggable","false")}}},{key:"connectDropTarget",value:function(e,t){var n=this,r=function(t){return n.handleDragEnter(t,e)},o=function(t){return n.handleDragOver(t,e)},s=function(t){return n.handleDrop(t,e)};return t.addEventListener("dragenter",r),t.addEventListener("dragover",o),t.addEventListener("drop",s),function(){t.removeEventListener("dragenter",r),t.removeEventListener("dragover",o),t.removeEventListener("drop",s)}}},{key:"addEventListeners",value:function(e){if(!!e.addEventListener)e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0)}},{key:"removeEventListeners",value:function(e){if(!!e.removeEventListener)e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0)}},{key:"getCurrentSourceNodeOptions",value:function(){var e=this.monitor.getSourceId(),t=this.sourceNodeOptions.get(e);return tV({dropEffect:this.altKeyPressed?"copy":"move"},t||{})}},{key:"getCurrentDropEffect",value:function(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}},{key:"getCurrentSourcePreviewNodeOptions",value:function(){var e=this.monitor.getSourceId();return tV({anchorX:.5,anchorY:.5,captureDraggingState:!1},this.sourcePreviewNodeOptions.get(e)||{})}},{key:"isDraggingNativeItem",value:function(){var e=this.monitor.getItemType();return Object.keys(c).some(function(t){return c[t]===e})}},{key:"beginDragNativeItem",value:function(e,t){var n,r,o;this.clearCurrentDragSourceNode(),this.currentNativeSource=(n=e,r=t,(o=new t$(tR[n])).loadDataTransfer(r),o),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}},{key:"setCurrentDragSourceNode",value:function(e){var t=this;this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e;this.mouseMoveTimeoutTimer=setTimeout(function(){var e;return null===(e=t.rootElement)||void 0===e?void 0:e.addEventListener("mousemove",t.endDragIfSourceWasRemovedFromDOM,!0)},1e3)}},{key:"clearCurrentDragSourceNode",value:function(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var e;null===(e=this.window)||void 0===e||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}},{key:"handleDragStart",value:function(e,t){if(!e.defaultPrevented)!this.dragStartSourceIds&&(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(t)}},{key:"handleDragEnter",value:function(e,t){this.dragEnterTargetIds.unshift(t)}},{key:"handleDragOver",value:function(e,t){null===this.dragOverTargetIds&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(t)}},{key:"handleDrop",value:function(e,t){this.dropTargetIds.unshift(t)}}],tq(e.prototype,t),r}(),tK=function(e,t,n){return new tG(e,t,n)},tY="dnd-core/INIT_COORDS",tZ="dnd-core/BEGIN_DRAG",tJ="dnd-core/PUBLISH_DRAG_SOURCE",tX="dnd-core/HOVER",tQ="dnd-core/DROP",t0="dnd-core/END_DRAG";function t1(e,t){return{type:tY,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}function t2(e){return(t2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function t3(e){return"object"===t2(e)}var t5={type:tY,payload:{clientOffset:null,sourceClientOffset:null}};function t4(e,t){return null===t?null===e:Array.isArray(e)?e.some(function(e){return e===t}):e===t}function t6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function t8(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?t6(Object(n),!0).forEach(function(t){(function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t6(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function t9(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function t7(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ne=function(){var e,t,n;function r(e,t){var n=this;!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),t7(this,"store",void 0),t7(this,"monitor",void 0),t7(this,"backend",void 0),t7(this,"isSetUp",!1),t7(this,"handleRefCountChange",function(){var e=n.store.getState().refCount>0;n.backend&&(e&&!n.isSetUp?(n.backend.setup(),n.isSetUp=!0):!e&&n.isSetUp&&(n.backend.teardown(),n.isSetUp=!1))}),this.store=e,this.monitor=t,e.subscribe(this.handleRefCountChange)}return e=r,t=[{key:"receiveBackend",value:function(e){this.backend=e}},{key:"getMonitor",value:function(){return this.monitor}},{key:"getBackend",value:function(){return this.backend}},{key:"getRegistry",value:function(){return this.monitor.registry}},{key:"getActions",value:function(){var e,t,n,r,o,s,a=this,l=this.store.dispatch;var c=(e=this,{beginDrag:(t=e,function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{publishSource:!0},r=n.publishSource,o=n.clientOffset,s=n.getSourceClientOffset,a=t.getMonitor(),l=t.getRegistry();t.dispatch(t1(o)),function(e,t,n){(0,ek.k)(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(e){(0,ek.k)(n.getSource(e),"Expected sourceIds to be registered.")})}(e,a,l);var c=function(e,t){for(var n=null,r=e.length-1;r>=0;r--)if(t.canDragSource(e[r])){n=e[r];break}return n}(e,a);if(null===c){t.dispatch(t5);return}var u=null;if(o){if(!s)throw Error("getSourceClientOffset must be defined");(function(e){(0,ek.k)("function"==typeof e,"When clientOffset is provided, getSourceClientOffset must be a function.")})(s),u=s(c)}t.dispatch(t1(o,u));var d=l.getSource(c).beginDrag(a,c);if(null!=d)return function(e){(0,ek.k)(t3(e),"Item must be an object.")}(d),l.pinSource(c),{type:tZ,payload:{itemType:l.getSourceType(c),item:d,sourceId:c,clientOffset:o||null,sourceClientOffset:u||null,isSourcePublic:!!(void 0===r||r)}}}),publishDragSource:(n=e,function(){if(n.getMonitor().isDragging())return{type:tJ}}),hover:(r=e,function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.clientOffset;(function(e){(0,ek.k)(Array.isArray(e),"Expected targetIds to be an array.")})(e);var o=e.slice(0),s=r.getMonitor(),a=r.getRegistry();return function(e,t,n){(0,ek.k)(t.isDragging(),"Cannot call hover while not dragging."),(0,ek.k)(!t.didDrop(),"Cannot call hover after drop.");for(var r=0;r<e.length;r++){var o=e[r];(0,ek.k)(e.lastIndexOf(o)===r,"Expected targetIds to be unique in the passed array.");var s=n.getTarget(o);(0,ek.k)(s,"Expected targetIds to be registered.")}}(o,s,a),function(e,t,n){for(var r=e.length-1;r>=0;r--){var o=e[r];!t4(t.getTargetType(o),n)&&e.splice(r,1)}}(o,a,s.getItemType()),function(e,t,n){e.forEach(function(e){n.getTarget(e).hover(t,e)})}(o,s,a),{type:tX,payload:{targetIds:o,clientOffset:n||null}}}),drop:(o=e,function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=o.getMonitor(),n=o.getRegistry();(function(e){(0,ek.k)(e.isDragging(),"Cannot call drop while not dragging."),(0,ek.k)(!e.didDrop(),"Cannot call drop twice during one drag operation.")})(t),(function(e){var t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t})(t).forEach(function(r,s){var a=function(e,t,n,r){var o=n.getTarget(e),s=o?o.drop(r,e):void 0;return function(e){(0,ek.k)(void 0===e||t3(e),"Drop result must either be an object or undefined.")}(s),void 0===s&&(s=0===t?{}:r.getDropResult()),s}(r,s,n,t),l={type:tQ,payload:{dropResult:t8(t8({},e),a)}};o.dispatch(l)})}),endDrag:(s=e,function(){var e=s.getMonitor(),t=s.getRegistry();(function(e){(0,ek.k)(e.isDragging(),"Cannot call endDrag while not dragging.")})(e);var n=e.getSourceId();return null!=n&&(t.getSource(n,!0).endDrag(e,n),t.unpinSource()),{type:t0}})});return Object.keys(c).reduce(function(e,t){var n,r=c[t];return e[t]=(n=r,function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];var o=n.apply(a,t);void 0!==o&&l(o)}),e},{})}},{key:"dispatch",value:function(e){this.store.dispatch(e)}}],t9(e.prototype,t),r}(),nt=n("275211"),nn=function(e,t){return e===t};function nr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ni(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nr(Object(n),!0).forEach(function(t){(function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var no={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null},ns="dnd-core/ADD_SOURCE",na="dnd-core/ADD_TARGET",nl="dnd-core/REMOVE_SOURCE",nc="dnd-core/REMOVE_TARGET";function nu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function nd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nu(Object(n),!0).forEach(function(t){(function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nu(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var np={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null},nh=[],nf=[];nh.__IS_NONE__=!0,nf.__IS_ALL__=!0;function nm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ng(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nm(Object(n),!0).forEach(function(t){(function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nm(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function nv(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return{dirtyHandlerIds:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];var e,t,n,r,o,s=arguments.length>1?arguments[1]:void 0;switch(s.type){case tX:break;case ns:case na:case nc:case nl:return nh;default:return nf}var a=s.payload,l=a.targetIds,c=void 0===l?[]:l,u=a.prevTargetIds,d=void 0===u?[]:u;var p=(e=c,t=d,n=new Map,r=function(e){n.set(e,n.has(e)?n.get(e)+1:1)},e.forEach(r),t.forEach(r),o=[],n.forEach(function(e,t){1===e&&o.push(t)}),o);if(!(p.length>0||!function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:nn;if(e.length!==t.length)return!1;for(var r=0;r<e.length;++r)if(!n(e[r],t[r]))return!1;return!0}(c,d)))return nh;var h=d[d.length-1],f=c[c.length-1];return h!==f&&(h&&p.push(h),f&&p.push(f)),p}(n.dirtyHandlerIds,{type:r.type,payload:ng(ng({},r.payload),{},{prevTargetIds:(e=n,t=[],"dragOperation.targetIds".split(".").reduce(function(e,n){return e&&e[n]?e[n]:t||null},e))})}),dragOffset:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:no,r=arguments.length>1?arguments[1]:void 0,o=r.payload;switch(r.type){case tY:case tZ:return{initialSourceClientOffset:o.sourceClientOffset,initialClientOffset:o.clientOffset,clientOffset:o.clientOffset};case tX:;if(e=n.clientOffset,t=o.clientOffset,!e&&!t||e&&t&&e.x===t.x&&e.y===t.y)return n;return ni(ni({},n),{},{clientOffset:o.clientOffset});case t0:case tQ:return no;default:return n}}(n.dragOffset,r),refCount:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case ns:case na:return e+1;case nl:case nc:return e-1;default:return e}}(n.refCount,r),dragOperation:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:np,r=arguments.length>1?arguments[1]:void 0,o=r.payload;switch(r.type){case tZ:return nd(nd({},n),{},{itemType:o.itemType,item:o.item,sourceId:o.sourceId,isSourcePublic:o.isSourcePublic,dropResult:null,didDrop:!1});case tJ:return nd(nd({},n),{},{isSourcePublic:!0});case tX:return nd(nd({},n),{},{targetIds:o.targetIds});case nc:;if(-1===n.targetIds.indexOf(o.targetId))return n;return nd(nd({},n),{},{targetIds:(e=n.targetIds,t=o.targetId,e.filter(function(e){return e!==t}))});case tQ:return nd(nd({},n),{},{dropResult:o.dropResult,didDrop:!0,targetIds:[]});case t0:return nd(nd({},n),{},{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return n}}(n.dragOperation,r),stateId:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e+1}(n.stateId)}}function nb(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ny(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function nx(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var nw=function(){var e,t,n;function r(e,t){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),nx(this,"store",void 0),nx(this,"registry",void 0),this.store=e,this.registry=t}return e=r,t=[{key:"subscribeToStateChange",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{handlerIds:void 0},r=n.handlerIds;(0,ek.k)("function"==typeof e,"listener must be a function."),(0,ek.k)(void 0===r||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");var o=this.store.getState().stateId;return this.store.subscribe(function(){var n=t.store.getState(),s=n.stateId;try{!(s===o||s===o+1&&!function(e,t){var n,r;if(e===nh)return!1;if(e===nf||void 0===t)return!0;return(n=t,r=e,n.filter(function(e){return r.indexOf(e)>-1})).length>0}(n.dirtyHandlerIds,r))&&e()}finally{o=s}})}},{key:"subscribeToOffsetChange",value:function(e){var t=this;(0,ek.k)("function"==typeof e,"listener must be a function.");var n=this.store.getState().dragOffset;return this.store.subscribe(function(){var r=t.store.getState().dragOffset;if(r!==n)n=r,e()})}},{key:"canDragSource",value:function(e){if(!e)return!1;var t=this.registry.getSource(e);return(0,ek.k)(t,"Expected to find a valid source. sourceId=".concat(e)),!this.isDragging()&&t.canDrag(this,e)}},{key:"canDropOnTarget",value:function(e){if(!e)return!1;var t=this.registry.getTarget(e);return(0,ek.k)(t,"Expected to find a valid target. targetId=".concat(e)),!(!this.isDragging()||this.didDrop())&&t4(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}},{key:"isDragging",value:function(){return!!this.getItemType()}},{key:"isDraggingSource",value:function(e){if(!e)return!1;var t=this.registry.getSource(e,!0);return(0,ek.k)(t,"Expected to find a valid source. sourceId=".concat(e)),!!(this.isDragging()&&this.isSourcePublic())&&this.registry.getSourceType(e)===this.getItemType()&&t.isDragging(this,e)}},{key:"isOverTarget",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{shallow:!1};if(!e)return!1;var n=t.shallow;if(!this.isDragging())return!1;var r=this.registry.getTargetType(e),o=this.getItemType();if(o&&!t4(r,o))return!1;var s=this.getTargetIds();if(!s.length)return!1;var a=s.indexOf(e);return n?a===s.length-1:a>-1}},{key:"getItemType",value:function(){return this.store.getState().dragOperation.itemType}},{key:"getItem",value:function(){return this.store.getState().dragOperation.item}},{key:"getSourceId",value:function(){return this.store.getState().dragOperation.sourceId}},{key:"getTargetIds",value:function(){return this.store.getState().dragOperation.targetIds}},{key:"getDropResult",value:function(){return this.store.getState().dragOperation.dropResult}},{key:"didDrop",value:function(){return this.store.getState().dragOperation.didDrop}},{key:"isSourcePublic",value:function(){return!!this.store.getState().dragOperation.isSourcePublic}},{key:"getInitialClientOffset",value:function(){return this.store.getState().dragOffset.initialClientOffset}},{key:"getInitialSourceClientOffset",value:function(){return this.store.getState().dragOffset.initialSourceClientOffset}},{key:"getClientOffset",value:function(){return this.store.getState().dragOffset.clientOffset}},{key:"getSourceClientOffset",value:function(){return function(e){var t,n,r=e.clientOffset,o=e.initialClientOffset,s=e.initialSourceClientOffset;if(!r||!o||!s)return null;return nb((t=r,n=s,{x:t.x+n.x,y:t.y+n.y}),o)}(this.store.getState().dragOffset)}},{key:"getDifferenceFromInitialOffset",value:function(){var e,t,n;return t=(e=this.store.getState().dragOffset).clientOffset,n=e.initialClientOffset,t&&n?nb(t,n):null}}],ny(e.prototype,t),r}(),nS=0;function nk(e){return(nk="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}(r=a||(a={})).SOURCE="SOURCE",r.TARGET="TARGET";function nA(e,t){if(t&&Array.isArray(e)){e.forEach(function(e){return nA(e,!1)});return}(0,ek.k)("string"==typeof e||"symbol"===nk(e),t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}let nC="undefined"!=typeof global?global:self,nE=nC.MutationObserver||nC.WebKitMutationObserver;function nT(e){return function(){let t=setTimeout(r,0),n=setInterval(r,50);function r(){clearTimeout(t),clearInterval(n),e()}}}let n_="function"==typeof nE?function(e){let t=1,n=new nE(e),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}:nT;class nO{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}}let nM=new class e{enqueueTask(e){let{queue:t,requestFlush:n}=this;!t.length&&(n(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{let{queue:e}=this;for(;this.index<e.length;){let t=this.index;if(this.index++,e[t].call(),this.index>this.capacity){for(let t=0,n=e.length-this.index;t<n;t++)e[t]=e[t+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=n_(this.flush),this.requestErrorThrow=nT(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}},nI=new class e{create(e){let t=this.freeTasks,n=t.length?t.pop():new nO(this.onError,e=>t[t.length]=e);return n.task=e,n}constructor(e){this.onError=e,this.freeTasks=[]}}(nM.registerPendingError);function nP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function nD(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nN(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function nR(e){switch(e[0]){case"S":return a.SOURCE;case"T":return a.TARGET;default:(0,ek.k)(!1,"Cannot parse handler ID: ".concat(e))}}function nL(e,t){var n=e.entries(),r=!1;do{var o,s,a=n.next(),l=a.done;if((o=a.value,s=2,function(e){if(Array.isArray(e))return e}(o)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var s=[],a=!0,l=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(s.push(n.value),!t||s.length!==t);a=!0);}catch(e){l=!0,r=e}finally{try{!a&&null!=o.return&&o.return()}finally{if(l)throw r}}return s}}(o,2)||function(e,t){if(e){if("string"==typeof e)return nN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nN(e,t)}}(o,s)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[1]===t)return!0;r=!!l}while(!r);return!1}var nj=function(){var e,t,n;function r(e){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),nD(this,"types",new Map),nD(this,"dragSources",new Map),nD(this,"dropTargets",new Map),nD(this,"pinnedSourceId",null),nD(this,"pinnedSource",null),nD(this,"store",void 0),this.store=e}return e=r,t=[{key:"addSource",value:function(e,t){nA(e),n=t,(0,ek.k)("function"==typeof n.canDrag,"Expected canDrag to be a function."),(0,ek.k)("function"==typeof n.beginDrag,"Expected beginDrag to be a function."),(0,ek.k)("function"==typeof n.endDrag,"Expected endDrag to be a function.");var n,r=this.addHandler(a.SOURCE,e,t);return this.store.dispatch({type:ns,payload:{sourceId:r}}),r}},{key:"addTarget",value:function(e,t){nA(e,!0),n=t,(0,ek.k)("function"==typeof n.canDrop,"Expected canDrop to be a function."),(0,ek.k)("function"==typeof n.hover,"Expected hover to be a function."),(0,ek.k)("function"==typeof n.drop,"Expected beginDrag to be a function.");var n,r=this.addHandler(a.TARGET,e,t);return this.store.dispatch({type:na,payload:{targetId:r}}),r}},{key:"containsHandler",value:function(e){return nL(this.dragSources,e)||nL(this.dropTargets,e)}},{key:"getSource",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(0,ek.k)(this.isSourceId(e),"Expected a valid source ID."),t&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}},{key:"getTarget",value:function(e){return(0,ek.k)(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}},{key:"getSourceType",value:function(e){return(0,ek.k)(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}},{key:"getTargetType",value:function(e){return(0,ek.k)(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}},{key:"isSourceId",value:function(e){return nR(e)===a.SOURCE}},{key:"isTargetId",value:function(e){return nR(e)===a.TARGET}},{key:"removeSource",value:function(e){var t,n=this;(0,ek.k)(this.getSource(e),"Expected an existing source."),this.store.dispatch({type:nl,payload:{sourceId:e}}),t=function(){n.dragSources.delete(e),n.types.delete(e)},nM.enqueueTask(nI.create(t))}},{key:"removeTarget",value:function(e){(0,ek.k)(this.getTarget(e),"Expected an existing target."),this.store.dispatch({type:nc,payload:{targetId:e}}),this.dropTargets.delete(e),this.types.delete(e)}},{key:"pinSource",value:function(e){var t=this.getSource(e);(0,ek.k)(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}},{key:"unpinSource",value:function(){(0,ek.k)(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}},{key:"addHandler",value:function(e,t,n){var r=function(e){var t=(nS++).toString();switch(e){case a.SOURCE:return"S".concat(t);case a.TARGET:return"T".concat(t);default:throw Error("Unknown Handler Role: ".concat(e))}}(e);return this.types.set(r,t),e===a.SOURCE?this.dragSources.set(r,n):e===a.TARGET&&this.dropTargets.set(r,n),r}}],nP(e.prototype,t),r}(),n$=["children"];function nF(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var nz=0,nB=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__"),nH=(0,d.memo)(function(e){var t,n,r=e.children;var o=(n=2,function(e){if(Array.isArray(e))return e}(t=function(e){return"manager"in e?[{dragDropManager:e.manager},!1]:[function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:nU(),n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;return!t[nB]&&(t[nB]={dragDropManager:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=function(e){var t="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__;return(0,nt.MT)(nv,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}(r),s=new nw(o,new nj(o)),a=new ne(o,s),l=e(a,t,n);return a.receiveBackend(l),a}(e,t,n,r)}),t[nB]}(e.backend,e.context,e.options,e.debugMode),!e.context]}(function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},s=Object.keys(e);for(r=0;r<s.length;r++)n=s[r],!(t.indexOf(n)>=0)&&(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++){if(n=s[r],!(t.indexOf(n)>=0))Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}(e,n$)))||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var s=[],a=!0,l=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(s.push(n.value),!t||s.length!==t);a=!0);}catch(e){l=!0,r=e}finally{try{!a&&null!=o.return&&o.return()}finally{if(l)throw r}}return s}}(t,2)||function(e,t){if(e){if("string"==typeof e)return nF(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nF(e,t)}}(t,n)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=o[0],a=o[1];return(0,d.useEffect)(function(){if(a){var e=nU();return++nz,function(){0==--nz&&(e[nB]=null)}}},[]),(0,u.jsx)(eA.Provider,Object.assign({value:s},{children:r}),void 0)});function nU(){return void 0!==n.g?n.g:window}let nV=ee();function nq({treeProps:e,imperativeHandle:t,children:n}){let r=(0,d.useRef)(null),o=(0,d.useRef)(null),s=(0,d.useRef)(function e(t,n,r){if("function"!=typeof t)throw Error(tp(2));if("function"==typeof n&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])throw Error(tp(0));if("function"==typeof n&&void 0===r&&(r=n,n=void 0),void 0!==r){if("function"!=typeof r)throw Error(tp(1));return r(e)(t,n)}let o=t,s=n,a=new Map,l=a,c=0,u=!1;function d(){l===a&&(l=new Map,a.forEach((e,t)=>{l.set(t,e)}))}function p(){if(u)throw Error(tp(3));return s}function h(e){if("function"!=typeof e)throw Error(tp(4));if(u)throw Error(tp(5));let t=!0;d();let n=c++;return l.set(n,e),function(){if(!!t){if(u)throw Error(tp(6));t=!1,d(),l.delete(n),a=null}}}function f(e){if(!function(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}(e))throw Error(tp(7));if(void 0===e.type)throw Error(tp(8));if("string"!=typeof e.type)throw Error(tp(17));if(u)throw Error(tp(9));try{u=!0,s=o(s,e)}finally{u=!1}return(a=l).forEach(e=>{e()}),e}return f({type:tm.INIT}),{dispatch:f,subscribe:h,getState:p,replaceReducer:function(e){if("function"!=typeof e)throw Error(tp(10));o=e,f({type:tm.REPLACE})},[th]:function(){return{subscribe(e){if("object"!=typeof e||null===e)throw Error(tp(11));function t(){e.next&&e.next(p())}return t(),{unsubscribe:h(t)}},[th](){return this}}}}}(tv,ee(e))),a=(0,p.useSyncExternalStore)(s.current.subscribe,s.current.getState,()=>nV),l=(0,d.useMemo)(()=>new td(s.current,e,r,o),[]),c=(0,d.useRef)(0);return(0,d.useMemo)(()=>{c.current+=1,l.update(e)},[...Object.values(e),a.nodes.open]),(0,d.useImperativeHandle)(t,()=>l),(0,d.useEffect)(()=>{l.props.selection?l.select(l.props.selection,{focus:!1}):l.deselectAll()},[l.props.selection]),(0,d.useEffect)(()=>{!l.props.searchTerm&&s.current.dispatch(X.clear(!0))},[l.props.searchTerm]),(0,u.jsx)(h.Provider,{value:l,children:(0,u.jsx)(v.Provider,{value:c.current,children:(0,u.jsx)(m.Provider,{value:a.nodes,children:(0,u.jsx)(g.Provider,{value:a.dnd,children:(0,u.jsx)(nH,Object.assign({backend:tK,options:{rootElement:l.props.dndRootElement||void 0}},e.dndManager&&{manager:e.dndManager},{children:n}))})})})})}function nW(e){return!function(){let e=f(),[,t]=e4(()=>({accept:"NODE",canDrop:(t,n)=>!!n.isOver({shallow:!0})&&e.canDrop(),hover:(t,n)=>{if(!n.isOver({shallow:!0}))return;let r=n.getClientOffset();if(!e.listEl.current||!r)return;let{cursor:o,drop:s}=e7({element:e.listEl.current,offset:r,indent:e.indent,node:null,prevNode:e.visibleNodes[e.visibleNodes.length-1],nextNode:null});s&&e.dispatch(en.hovering(s.parentId,s.index)),n.canDrop()?o&&e.showCursor(o):e.hideCursor()}}),[e]);t(e.listEl)}(),e.children}function nG(){let e=f().props.renderContainer||tr;return(0,u.jsx)(u.Fragment,{children:(0,u.jsx)(e,{})})}function nK(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function nY(){var e,t,n,r,o,s,a;let l=f();let{offset:c,mouse:p,item:h,isDragging:m}=(e=e=>({offset:e.getSourceClientOffset(),mouse:e.getClientOffset(),item:e.getItem(),isDragging:e.isDragging()}),s=(o=(r=2,function(e){if(Array.isArray(e))return e}(n=eq(t=eC().getMonitor(),e))||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var s=[],a=!0,l=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(s.push(n.value),!t||s.length!==t);a=!0);}catch(e){l=!0,r=e}finally{try{!a&&null!=o.return&&o.return()}finally{if(l)throw r}}return s}}(n,2)||function(e,t){if(e){if("string"==typeof e)return nK(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nK(e,t)}}(n,r)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()))[0],a=o[1],(0,d.useEffect)(function(){return t.subscribeToOffsetChange(a)}),(0,d.useEffect)(function(){return t.subscribeToStateChange(a)}),s),g=l.props.renderDragPreview||es;return(0,u.jsx)(g,{offset:c,mouse:p,id:(null==h?void 0:h.id)||null,dragIds:(null==h?void 0:h.dragIds)||[],isDragging:m})}class nZ{constructor(e){this.root=function(e){let t=new nX({id:"ROOT"},null);return t.children=e.map(e=>nJ(e,t)),t}(e)}get data(){var e,t;return null!==(t=null===(e=this.root.children)||void 0===e?void 0:e.map(e=>e.data))&&void 0!==t?t:[]}create(e){let t=e.parentId?this.find(e.parentId):this.root;if(!t)return null;t.addChild(e.data,e.index)}move(e){let t=this.find(e.id),n=e.parentId?this.find(e.parentId):this.root;t&&n&&(n.addChild(t.data,e.index),t.drop())}update(e){let t=this.find(e.id);t&&t.update(e.changes)}drop(e){let t=this.find(e.id);t&&t.drop()}find(e,t=this.root){if(!t)return null;if(t.id===e)return t;if(t.children)for(let n of t.children){let t=this.find(e,n);if(t)return t}return null}}function nJ(e,t){let n=new nX(e,t);return e.children&&(n.children=e.children.map(e=>nJ(e,n))),n}class nX{constructor(e,t){this.data=e,this.parent=t,this.id=e.id}hasParent(){return!!this.parent}get childIndex(){return this.hasParent()?this.parent.children.indexOf(this):-1}addChild(e,t){var n,r;let o=nJ(e,this);this.children=null!==(n=this.children)&&void 0!==n?n:[],this.children.splice(t,0,o),this.data.children=null!==(r=this.data.children)&&void 0!==r?r:[],this.data.children.splice(t,0,e)}removeChild(e){var t,n;null===(t=this.children)||void 0===t||t.splice(e,1),null===(n=this.data.children)||void 0===n||n.splice(e,1)}update(e){if(this.hasParent()){let t=this.childIndex;this.parent.addChild(Object.assign(Object.assign({},this.data),e),t),this.drop()}}drop(){this.hasParent()&&this.parent.removeChild(this.childIndex)}}let nQ=0,n0=(0,d.forwardRef)(function(e,t){let n=function(e){if(e.initialData&&e.data)throw Error("React Arborist Tree => Provide either a data or initialData prop, but not both.");if(e.initialData&&(e.onCreate||e.onDelete||e.onMove||e.onRename))throw Error(`React Arborist Tree => You passed the initialData prop along with a data handler.
|
|
|
Use the data prop if you want to provide your own handlers.`);if(!e.initialData)return e;{let[t,n]=function(e){let[t,n]=(0,d.useState)(e),r=(0,d.useMemo)(()=>new nZ(t),[t]);return[t,{onMove:e=>{for(let t of e.dragIds)r.move({id:t,parentId:e.parentId,index:e.index});n(r.data)},onRename:({name:e,id:t})=>{r.update({id:t,changes:{name:e}}),n(r.data)},onCreate:({parentId:e,index:t,type:o})=>{let s={id:`simple-tree-id-${nQ++}`,name:""};return"internal"===o&&(s.children=[]),r.create({parentId:e,index:t,data:s}),n(r.data),s},onDelete:e=>{e.ids.forEach(e=>r.drop({id:e})),n(r.data)}}]}(e.initialData);return Object.assign(Object.assign(Object.assign({},e),n),{data:t})}}(e);return(0,u.jsxs)(nq,{treeProps:n,imperativeHandle:t,children:[(0,u.jsx)(nW,{children:(0,u.jsx)(nG,{})}),(0,u.jsx)(nY,{})]})})},670265:function(e,t,n){"use strict";n.d(t,{Z5:()=>iE,_l:()=>i9,bK:()=>ot});var r,o,s,a,l,c,u,d,p,h,f,m,g,v,b,y,x,w,S,k,A=n("455069"),C=n("425703"),E=n("515680"),T=n("275211"),_=A.createContext(null),O=function(e){e()},M={notify:function(){},get:function(){return[]}};function I(e,t){var n,r=M;function o(){a.onStateChange&&a.onStateChange()}function s(){if(!n){var s,a,l;n=t?t.addNestedSub(o):e.subscribe(o),s=O,a=null,l=null,r={clear:function(){a=null,l=null},notify:function(){s(function(){for(var e=a;e;)e.callback(),e=e.next})},get:function(){for(var e=[],t=a;t;)e.push(t),t=t.next;return e},subscribe:function(e){var t=!0,n=l={callback:e,next:null,prev:l};return n.prev?n.prev.next=n:a=n,function(){t&&null!==a&&(t=!1,n.next?n.next.prev=n.prev:l=n.prev,n.prev?n.prev.next=n.next:a=n.next)}}}}}var a={addNestedSub:function(e){return s(),r.subscribe(e)},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:o,isSubscribed:function(){return!!n},trySubscribe:s,tryUnsubscribe:function(){n&&(n(),n=void 0,r.clear(),r=M)},getListeners:function(){return r}};return a}var P="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?A.useLayoutEffect:A.useEffect,D=function(e){var t=e.store,n=e.context,r=e.children,o=(0,A.useMemo)(function(){var e=I(t);return{store:t,subscription:e}},[t]),s=(0,A.useMemo)(function(){return t.getState()},[t]);return P(function(){var e=o.subscription;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),s!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}},[o,s]),A.createElement((n||_).Provider,{value:o},r)},N=n("236476"),R=n("224333"),L=n.n(R),j=n("920588"),$=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],F=["reactReduxForwardedRef"],z=[],B=[null,null];function H(e,t){var n=e[1];return[t.payload,n+1]}function U(e,t,n){P(function(){return e.apply(void 0,t)},n)}function V(e,t,n,r,o,s,a){e.current=r,t.current=o,n.current=!1,s.current&&(s.current=null,a())}function q(e,t,n,r,o,s,a,l,c,u){if(e){var d=!1,p=null,h=function(){if(!d){var e,n,h=t.getState();try{e=r(h,o.current)}catch(e){n=e,p=e}!n&&(p=null),e===s.current?!a.current&&c():(s.current=e,l.current=e,a.current=!0,u({type:"STORE_UPDATED",payload:{error:n}}))}};return n.onStateChange=h,n.trySubscribe(),h(),function(){if(d=!0,n.tryUnsubscribe(),n.onStateChange=null,p)throw p}}}var W=function(){return[null,0]};function G(e,t){void 0===t&&(t={});var n=t,r=n.getDisplayName,o=void 0===r?function(e){return"ConnectAdvanced("+e+")"}:r,s=n.methodName,a=void 0===s?"connectAdvanced":s,l=n.renderCountProp,c=void 0===l?void 0:l,u=n.shouldHandleStateChanges,d=void 0===u||u,p=n.storeKey,h=void 0===p?"store":p,f=(n.withRef,n.forwardRef),m=void 0!==f&&f,g=n.context,v=(0,N.Z)(n,$),b=void 0===g?_:g;return function(t){var n=t.displayName||t.name||"Component",r=o(n),s=(0,E.Z)({},v,{getDisplayName:o,methodName:a,renderCountProp:c,shouldHandleStateChanges:d,storeKey:h,displayName:r,wrappedComponentName:n,WrappedComponent:t}),l=v.pure,u=l?A.useMemo:function(e){return e()};function p(n){var r=(0,A.useMemo)(function(){var e=n.reactReduxForwardedRef,t=(0,N.Z)(n,F);return[n.context,e,t]},[n]),o=r[0],a=r[1],l=r[2],c=(0,A.useMemo)(function(){return o&&o.Consumer&&(0,j.isContextConsumer)(A.createElement(o.Consumer,null))?o:b},[o,b]),p=(0,A.useContext)(c),h=!!n.store&&!!n.store.getState&&!!n.store.dispatch;p&&p.store;var f=h?n.store:p.store,m=(0,A.useMemo)(function(){return e(f.dispatch,s)},[f]),g=(0,A.useMemo)(function(){if(!d)return B;var e=I(f,h?null:p.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]},[f,h,p]),v=g[0],y=g[1],x=(0,A.useMemo)(function(){return h?p:(0,E.Z)({},p,{subscription:v})},[h,p,v]),w=(0,A.useReducer)(H,z,W),S=w[0][0],k=w[1];if(S&&S.error)throw S.error;var C=(0,A.useRef)(),T=(0,A.useRef)(l),_=(0,A.useRef)(),O=(0,A.useRef)(!1),M=u(function(){return _.current&&l===T.current?_.current:m(f.getState(),l)},[f,S,l]);U(V,[T,C,O,l,M,_,y]),U(q,[d,f,v,m,T,C,O,_,y,k],[f,v,m]);var P=(0,A.useMemo)(function(){return A.createElement(t,(0,E.Z)({},M,{ref:a}))},[a,t,M]);return(0,A.useMemo)(function(){return d?A.createElement(c.Provider,{value:x},P):P},[c,P,x])}var f=l?A.memo(p):p;if(f.WrappedComponent=t,f.displayName=p.displayName=r,m){var g=A.forwardRef(function(e,t){return A.createElement(f,(0,E.Z)({},e,{reactReduxForwardedRef:t}))});return g.displayName=r,g.WrappedComponent=t,L()(g,t)}return L()(f,t)}}function K(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function Y(e,t){if(K(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=0;o<n.length;o++)if(!Object.prototype.hasOwnProperty.call(t,n[o])||!K(e[n[o]],t[n[o]]))return!1;return!0}function Z(e){return function(t,n){var r=e(t,n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function J(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?!!e.dependsOnOwnProps:1!==e.length}function X(e,t){return function(t,n){n.displayName;var r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e)};return r.dependsOnOwnProps=!0,r.mapToProps=function(t,n){r.mapToProps=e,r.dependsOnOwnProps=J(e);var o=r(t,n);return"function"==typeof o&&(r.mapToProps=o,r.dependsOnOwnProps=J(o),o=r(t,n)),o},r}}var Q=[function(e){return"function"==typeof e?X(e,"mapDispatchToProps"):void 0},function(e){return e?void 0:Z(function(e){return{dispatch:e}})},function(e){return e&&"object"==typeof e?Z(function(t){return function(e,t){var n={};for(var r in e)!function(r){var o=e[r];"function"==typeof o&&(n[r]=function(){return t(o.apply(void 0,arguments))})}(r);return n}(e,t)}):void 0}],ee=[function(e){return"function"==typeof e?X(e,"mapStateToProps"):void 0},function(e){return e?void 0:Z(function(){return{}})}];function et(e,t,n){return(0,E.Z)({},n,e,t)}var en=[function(e){var t;return"function"==typeof e?(t=e,function(e,n){n.displayName;var r,o=n.pure,s=n.areMergedPropsEqual,a=!1;return function(e,n,l){var c=t(e,n,l);return a?(!o||!s(c,r))&&(r=c):(a=!0,r=c),r}}):void 0},function(e){return e?void 0:function(){return et}}],er=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function ei(e,t,n,r){return function(o,s){return n(e(o,s),t(r,s),s)}}function eo(e,t,n,r,o){var s,a,l,c,u,d=o.areStatesEqual,p=o.areOwnPropsEqual,h=o.areStatePropsEqual,f=!1;return function(o,m){var g,v;return f?function(o,f){var m,g,v=!p(f,a),b=!d(o,s,f,a);if(s=o,a=f,v&&b)return l=e(s,a),t.dependsOnOwnProps&&(c=t(r,a)),u=n(l,c,a);if(v)return e.dependsOnOwnProps&&(l=e(s,a)),t.dependsOnOwnProps&&(c=t(r,a)),u=n(l,c,a);if(b){;return g=!h(m=e(s,a),l),l=m,g&&(u=n(l,c,a)),u}return u}(o,m):(g=o,v=m,l=e(s=g,a=v),c=t(r,a),u=n(l,c,a),f=!0,u)}}function es(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,o=t.initMergeProps,s=(0,N.Z)(t,er),a=n(e,s),l=r(e,s),c=o(e,s);return(s.pure?eo:ei)(a,l,c,e,s)}var ea=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function el(e,t,n){for(var r=t.length-1;r>=0;r--){var o=t[r](e);if(o)return o}return function(t,r){throw Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function ec(e,t){return e===t}var eu=(a=void 0===(s=(o={}).connectHOC)?G:s,c=void 0===(l=o.mapStateToPropsFactories)?ee:l,d=void 0===(u=o.mapDispatchToPropsFactories)?Q:u,h=void 0===(p=o.mergePropsFactories)?en:p,m=void 0===(f=o.selectorFactory)?es:f,function(e,t,n,r){void 0===r&&(r={});var o=r,s=o.pure,l=o.areStatesEqual,u=o.areOwnPropsEqual,p=void 0===u?Y:u,f=o.areStatePropsEqual,g=void 0===f?Y:f,v=o.areMergedPropsEqual,b=void 0===v?Y:v,y=(0,N.Z)(o,ea),x=el(e,c,"mapStateToProps"),w=el(t,d,"mapDispatchToProps"),S=el(n,h,"mergeProps");return a(m,(0,E.Z)({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:!!e,initMapStateToProps:x,initMapDispatchToProps:w,initMergeProps:S,pure:void 0===s||s,areStatesEqual:void 0===l?ec:l,areOwnPropsEqual:p,areStatePropsEqual:g,areMergedPropsEqual:b},y))}),ed=function(e,t){return e===t},ep=n("921463");O=ep.unstable_batchedUpdates;function eh(e,t){var n=(0,A.useState)(function(){return{inputs:t,result:e()}})[0],r=(0,A.useRef)(!0),o=(0,A.useRef)(n),s=r.current||t&&o.current.inputs&&function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,o.current.inputs)?o.current:{inputs:t,result:e()};return(0,A.useEffect)(function(){r.current=!1,o.current=s},[s]),s.result}var ef=function(e,t){return eh(function(){return e},t)},em=n("642844"),eg=function(e){var t=e.top,n=e.right,r=e.bottom,o=e.left;return{top:t,right:n,bottom:r,left:o,width:n-o,height:r-t,x:o,y:t,center:{x:(n+o)/2,y:(r+t)/2}}},ev=function(e,t){return{top:e.top-t.top,left:e.left-t.left,bottom:e.bottom+t.bottom,right:e.right+t.right}},eb=function(e,t){return{top:e.top+t.top,left:e.left+t.left,bottom:e.bottom-t.bottom,right:e.right-t.right}},ey={top:0,right:0,bottom:0,left:0},ex=function(e){var t=e.borderBox,n=e.margin,r=void 0===n?ey:n,o=e.border,s=void 0===o?ey:o,a=e.padding,l=void 0===a?ey:a,c=eg(ev(t,r)),u=eg(eb(t,s)),d=eg(eb(u,l));return{marginBox:c,borderBox:eg(t),paddingBox:u,contentBox:d,margin:r,border:s,padding:l}},ew=function(e){var t=e.slice(0,-2);if("px"!==e.slice(-2))return 0;var n=Number(t);return isNaN(n)&&(0,em.Z)(!1),n},eS=function(e,t){var n,r,o=e.borderBox,s=e.border,a=e.margin,l=e.padding;return ex({borderBox:(n=o,r=t,{top:n.top+r.y,left:n.left+r.x,bottom:n.bottom+r.y,right:n.right+r.x}),border:s,margin:a,padding:l})},ek=function(e,t){return void 0===t&&(t={x:window.pageXOffset,y:window.pageYOffset}),eS(e,t)},eA=function(e,t){return ex({borderBox:e,margin:{top:ew(t.marginTop),right:ew(t.marginRight),bottom:ew(t.marginBottom),left:ew(t.marginLeft)},padding:{top:ew(t.paddingTop),right:ew(t.paddingRight),bottom:ew(t.paddingBottom),left:ew(t.paddingLeft)},border:{top:ew(t.borderTopWidth),right:ew(t.borderRightWidth),bottom:ew(t.borderBottomWidth),left:ew(t.borderLeftWidth)}})},eC=function(e){return eA(e.getBoundingClientRect(),window.getComputedStyle(e))},eE=n("765991"),eT=function(e){var t=[],n=null,r=function(){for(var r=arguments.length,o=Array(r),s=0;s<r;s++)o[s]=arguments[s];if(t=o,!n)n=requestAnimationFrame(function(){n=null,e.apply(void 0,t)})};return r.cancel=function(){if(!!n)cancelAnimationFrame(n),n=null},r},e_=/[ \t]{2,}/g,eO=/^[ \t]*/gm,eM=function(e){return e.replace(e_," ").replace(eO,"").trim()},eI=function(e){return[eM("\n %creact-beautiful-dnd\n\n %c"+eM(e)+"\n\n %c\uD83D\uDC77 This is a development only message. It will be removed in production builds.\n"),"color: #00C584; font-size: 1.2em; font-weight: bold;","line-height: 1.5","color: #723874;"]};function eP(e,t){var n}eP.bind(null,"warn");var eD=eP.bind(null,"error");function eN(){}function eR(e,t,n){var r=t.map(function(t){var r,o,s=(r=n,o=t.options,(0,E.Z)({},r,{},o));return e.addEventListener(t.eventName,t.fn,s),function(){e.removeEventListener(t.eventName,t.fn,s)}});return function(){r.forEach(function(e){e()})}}var eL="Invariant failed";function ej(e){this.message=e}function e$(e,t){if(!e)throw new ej(eL)}ej.prototype.toString=function(){return this.message};var eF=function(e){function t(){for(var t,n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).callbacks=null,t.unbind=eN,t.onWindowError=function(e){var n=t.getCallbacks();n.isDragging()&&n.tryAbort(),e.error instanceof ej&&e.preventDefault()},t.getCallbacks=function(){if(!t.callbacks)throw Error("Unable to find AppCallbacks in <ErrorBoundary/>");return t.callbacks},t.setCallbacks=function(e){t.callbacks=e},t}(0,C.Z)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.unbind=eR(window,[{eventName:"error",fn:this.onWindowError}])},n.componentDidCatch=function(e){if(e instanceof ej){this.setState({});return}throw e},n.componentWillUnmount=function(){this.unbind()},n.render=function(){return this.props.children(this.setCallbacks)},t}(A.Component),ez=function(e){return e+1},eB=function(e,t){var n=e.droppableId===t.droppableId,r=ez(e.index),o=ez(t.index);return n?"\n You have moved the item from position "+r+"\n to position "+o+"\n ":"\n You have moved the item from position "+r+"\n in list "+e.droppableId+"\n to list "+t.droppableId+"\n in position "+o+"\n "},eH=function(e,t,n){return t.droppableId===n.droppableId?"\n The item "+e+"\n has been combined with "+n.draggableId:"\n The item "+e+"\n in list "+t.droppableId+"\n has been combined with "+n.draggableId+"\n in list "+n.droppableId+"\n "},eU=function(e){return"\n The item has returned to its starting position\n of "+ez(e.index)+"\n"},eV={dragHandleUsageInstructions:"\n Press space bar to start a drag.\n When dragging you can use the arrow keys to move the item around and escape to cancel.\n Some screen readers may require you to be in focus mode or to use your pass through key\n",onDragStart:function(e){return"\n You have lifted an item in position "+ez(e.source.index)+"\n"},onDragUpdate:function(e){var t=e.destination;if(t)return eB(e.source,t);var n=e.combine;return n?eH(e.draggableId,e.source,n):"You are over an area that cannot be dropped on"},onDragEnd:function(e){if("CANCEL"===e.reason)return"\n Movement cancelled.\n "+eU(e.source)+"\n ";var t=e.destination,n=e.combine;return t?"\n You have dropped the item.\n "+eB(e.source,t)+"\n ":n?"\n You have dropped the item.\n "+eH(e.draggableId,e.source,n)+"\n ":"\n The item has been dropped while not over a drop area.\n "+eU(e.source)+"\n "}},eq={x:0,y:0},eW=function(e,t){return{x:e.x+t.x,y:e.y+t.y}},eG=function(e,t){return{x:e.x-t.x,y:e.y-t.y}},eK=function(e,t){return e.x===t.x&&e.y===t.y},eY=function(e){return{x:0!==e.x?-e.x:0,y:0!==e.y?-e.y:0}},eZ=function(e,t,n){var r;return void 0===n&&(n=0),(r={})[e]=t,r["x"===e?"y":"x"]=n,r},eJ=function(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},eX=function(e,t){return Math.min.apply(Math,t.map(function(t){return eJ(e,t)}))},eQ=function(e){return function(t){return{x:e(t.x),y:e(t.y)}}},e0=function(e,t){var n=eg({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n},e1=function(e,t){return{top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}},e2=function(e){return[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.left,y:e.bottom},{x:e.right,y:e.bottom}]},e3=function(e,t,n){if(n&&n.increasedBy){var r;return(0,E.Z)({},e,((r={})[t.end]=e[t.end]+n.increasedBy[t.line],r))}return e},e5=function(e){var t,n,r,o,s=e.page,a=e.withPlaceholder,l=e.axis,c=e.frame;var u=(r=e3((t=s.marginBox,(n=c)?e1(t,n.scroll.diff.displacement):t),l,a),(o=c)&&o.shouldClipSubject?e0(o.pageMarginBox,r):eg(r));return{page:s,withPlaceholder:a,active:u}},e4=function(e,t){e.frame||e$(!1);var n=e.frame,r=eG(t,n.scroll.initial),o=eY(r),s=(0,E.Z)({},n,{scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:o},max:n.scroll.max}}),a=e5({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:s});return(0,E.Z)({},e,{frame:s,subject:a})};function e6(e){return Object.values?Object.values(e):Object.keys(e).map(function(t){return e[t]})}function e8(e,t){if(e.findIndex)return e.findIndex(t);for(var n=0;n<e.length;n++)if(t(e[n]))return n;return -1}function e9(e,t){if(e.find)return e.find(t);var n=e8(e,t);if(-1!==n)return e[n]}function e7(e){return Array.prototype.slice.call(e)}var te=(0,eE.Z)(function(e){return e.reduce(function(e,t){return e[t.descriptor.id]=t,e},{})}),tt=(0,eE.Z)(function(e){return e.reduce(function(e,t){return e[t.descriptor.id]=t,e},{})}),tn=(0,eE.Z)(function(e){return e6(e)}),tr=(0,eE.Z)(function(e){return e6(e)}),ti=(0,eE.Z)(function(e,t){return tr(t).filter(function(t){return e===t.descriptor.droppableId}).sort(function(e,t){return e.descriptor.index-t.descriptor.index})});function to(e){return e.at&&"REORDER"===e.at.type?e.at.destination:null}function ts(e){return e.at&&"COMBINE"===e.at.type?e.at.combine:null}var ta=(0,eE.Z)(function(e,t){return t.filter(function(t){return t.descriptor.id!==e.descriptor.id})}),tl=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,o=e.insideDestination,s=e.previousImpact;if(!r.isCombineEnabled||!to(s))return null;function a(e){var t={type:"COMBINE",combine:{draggableId:e,droppableId:r.descriptor.id}};return(0,E.Z)({},s,{at:t})}var l=s.displaced.all,c=l.length?l[0]:null;if(t)return c?a(c):null;var u=ta(n,o);if(!c)return u.length?a(u[u.length-1].descriptor.id):null;var d=e8(u,function(e){return e.descriptor.id===c});-1!==d||e$(!1);var p=d-1;return p<0?null:a(u[p].descriptor.id)},tc=function(e,t){return e.descriptor.droppableId===t.descriptor.id},tu={point:eq,value:0},td={invisible:{},visible:{},all:[]},tp={displaced:td,displacedBy:tu,at:null},th=function(e,t){return function(n){return e<=n&&n<=t}},tf=function(e){var t=th(e.top,e.bottom),n=th(e.left,e.right);return function(r){if(t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right))return!0;var o=t(r.top)||t(r.bottom),s=n(r.left)||n(r.right);if(o&&s)return!0;var a=r.top<e.top&&r.bottom>e.bottom,l=r.left<e.left&&r.right>e.right;return!!a&&!!l||a&&s||l&&o}},tm=function(e){var t=th(e.top,e.bottom),n=th(e.left,e.right);return function(e){return t(e.top)&&t(e.bottom)&&n(e.left)&&n(e.right)}},tg={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},tv={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},tb=function(e){var t,n,r,o,s,a=e.target,l=e.destination,c=e.viewport,u=e.withDroppableDisplacement,d=e.isVisibleThroughFrameFn;var p=u?e1(a,(t=l).frame?t.frame.scroll.diff.displacement:eq):a;return n=p,r=l,o=d,!!r.subject.active&&o(r.subject.active)(n)&&(s=p,d(c)(s))},ty=function(e){return tb((0,E.Z)({},e,{isVisibleThroughFrameFn:tm}))},tx=function(e){var t;return tb((0,E.Z)({},e,{isVisibleThroughFrameFn:(t=e.destination.axis,function(e){var n=th(e.top,e.bottom),r=th(e.left,e.right);return function(e){return t===tg?n(e.top)&&n(e.bottom):r(e.left)&&r(e.right)}})}))},tw=function(e,t,n){if("boolean"==typeof n)return n;if(!t)return!0;var r=t.invisible,o=t.visible;if(r[e])return!1;var s=o[e];return!s||s.shouldAnimate};function tS(e){var t=e.afterDragging,n=e.destination,r=e.displacedBy,o=e.viewport,s=e.forceShouldAnimate,a=e.last;return t.reduce(function(e,t){var l,c,u,d=(l=t,c=r,eg(ev(l.page.marginBox,{top:c.point.y,right:0,bottom:0,left:c.point.x}))),p=t.descriptor.id;if(e.all.push(p),u={target:d,destination:n,viewport:o,withDroppableDisplacement:!0},!tb((0,E.Z)({},u,{isVisibleThroughFrameFn:tf})))return e.invisible[t.descriptor.id]=!0,e;var h=tw(p,a,s);return e.visible[p]={draggableId:p,shouldAnimate:h},e},{all:[],visible:{},invisible:{}})}function tk(e){var t=e.insideDestination,n=e.inHomeList,r=e.displacedBy,o=e.destination,s=function(e,t){if(!e.length)return 0;var n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}(t,{inHomeList:n});return{displaced:td,displacedBy:r,at:{type:"REORDER",destination:{droppableId:o.descriptor.id,index:s}}}}function tA(e){var t=e.draggable,n=e.insideDestination,r=e.destination,o=e.viewport,s=e.displacedBy,a=e.last,l=e.index,c=e.forceShouldAnimate,u=tc(t,r);if(null==l)return tk({insideDestination:n,inHomeList:u,displacedBy:s,destination:r});var d=e9(n,function(e){return e.descriptor.index===l});if(!d)return tk({insideDestination:n,inHomeList:u,displacedBy:s,destination:r});var p=ta(t,n),h=n.indexOf(d);return{displaced:tS({afterDragging:p.slice(h),destination:r,displacedBy:s,last:a,viewport:o.frame,forceShouldAnimate:c}),displacedBy:s,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:l}}}}function tC(e,t){return!!t.effected[e]}var tE=function(e){var t=e.isMovingForward,n=e.destination,r=e.draggables,o=e.combine,s=e.afterCritical;if(!n.isCombineEnabled)return null;var a=o.draggableId,l=r[a].descriptor.index;if(tC(a,s))return t?l:l-1;return t?l+1:l},tT=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.insideDestination,o=e.location;if(!r.length)return null;var s=o.index,a=t?s+1:s-1,l=r[0].descriptor.index,c=r[r.length-1].descriptor.index;return a<l||a>(n?c:c+1)?null:a},t_=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.draggable,o=e.draggables,s=e.destination,a=e.insideDestination,l=e.previousImpact,c=e.viewport,u=e.afterCritical,d=l.at;if(d||e$(!1),"REORDER"===d.type){var p=tT({isMovingForward:t,isInHomeList:n,location:d.destination,insideDestination:a});return null==p?null:tA({draggable:r,insideDestination:a,destination:s,viewport:c,last:l.displaced,displacedBy:l.displacedBy,index:p})}var h=tE({isMovingForward:t,destination:s,displaced:l.displaced,draggables:o,combine:d.combine,afterCritical:u});return null==h?null:tA({draggable:r,insideDestination:a,destination:s,viewport:c,last:l.displaced,displacedBy:l.displacedBy,index:h})},tO=function(e){var t=e.displaced,n=e.afterCritical,r=e.combineWith,o=e.displacedBy,s=!!(t.visible[r]||t.invisible[r]);return tC(r,n)?s?eq:eY(o.point):s?o.point:eq},tM=function(e){var t=e.afterCritical,n=e.impact,r=e.draggables,o=ts(n);o||e$(!1);var s=o.draggableId;return eW(r[s].page.borderBox.center,tO({displaced:n.displaced,afterCritical:t,combineWith:s,displacedBy:n.displacedBy}))},tI=function(e,t){return t.margin[e.start]+t.borderBox[e.size]/2},tP=function(e,t,n){return t[e.crossAxisStart]+n.margin[e.crossAxisStart]+n.borderBox[e.crossAxisSize]/2},tD=function(e){var t=e.axis,n=e.moveRelativeTo,r=e.isMoving;return eZ(t.line,n.marginBox[t.end]+tI(t,r),tP(t,n.marginBox,r))},tN=function(e){var t,n,r=e.axis,o=e.moveRelativeTo,s=e.isMoving;return eZ(r.line,o.marginBox[r.start]-(t=r,(n=s).margin[t.end]+n.borderBox[t.size]/2),tP(r,o.marginBox,s))},tR=function(e){var t=e.axis,n=e.moveInto,r=e.isMoving;return eZ(t.line,n.contentBox[t.start]+tI(t,r),tP(t,n.contentBox,r))},tL=function(e){var t=e.impact,n=e.draggable,r=e.draggables,o=e.droppable,s=e.afterCritical,a=ti(o.descriptor.id,r),l=n.page,c=o.axis;if(!a.length)return tR({axis:c,moveInto:o.page,isMoving:l});var u=t.displaced,d=t.displacedBy,p=u.all[0];if(p){var h=r[p];return tC(p,s)?tN({axis:c,moveRelativeTo:h.page,isMoving:l}):tN({axis:c,moveRelativeTo:eS(h.page,d.point),isMoving:l})}var f=a[a.length-1];return f.descriptor.id===n.descriptor.id?l.borderBox.center:tC(f.descriptor.id,s)?tD({axis:c,moveRelativeTo:eS(f.page,eY(s.displacedBy.point)),isMoving:l}):tD({axis:c,moveRelativeTo:f.page,isMoving:l})},tj=function(e,t){var n=e.frame;return n?eW(t,n.scroll.diff.displacement):t},t$=function(e){var t=e.impact,n=e.draggable,r=e.droppable,o=e.draggables,s=e.afterCritical,a=n.page.borderBox.center,l=t.at;return r&&l?"REORDER"===l.type?tL({impact:t,draggable:n,draggables:o,droppable:r,afterCritical:s}):tM({impact:t,draggables:o,afterCritical:s}):a},tF=function(e){var t=t$(e),n=e.droppable;return n?tj(n,t):t},tz=function(e,t){var n=eG(t,e.scroll.initial),r=eY(n);return{frame:eg({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}}};function tB(e,t){return e.map(function(e){return t[e]})}var tH=function(e){var t=e.impact,n=e.viewport,r=e.destination,o=e.draggables,s=e.maxScrollChange,a=tz(n,eW(n.scroll.current,s)),l=r.frame?e4(r,eW(r.frame.scroll.current,s)):r,c=t.displaced,u=tS({afterDragging:tB(c.all,o),destination:r,displacedBy:t.displacedBy,viewport:a.frame,last:c,forceShouldAnimate:!1}),d=tS({afterDragging:tB(c.all,o),destination:l,displacedBy:t.displacedBy,viewport:n.frame,last:c,forceShouldAnimate:!1}),p={},h={},f=[c,u,d];return c.all.forEach(function(e){var t=function(e,t){for(var n=0;n<t.length;n++){var r=t[n].visible[e];if(r)return r}return null}(e,f);if(t){h[e]=t;return}p[e]=!0}),(0,E.Z)({},t,{displaced:{all:c.all,invisible:p,visible:h}})},tU=function(e){var t,n,r=e.pageBorderBoxCenter,o=e.draggable;var s=eG((t=e.viewport,n=r,eW(t.scroll.diff.displacement,n)),o.page.borderBox.center);return eW(o.client.borderBox.center,s)},tV=function(e){var t=e.draggable,n=e.destination,r=e.newPageBorderBoxCenter,o=e.viewport,s=e.withDroppableDisplacement,a=e.onlyOnMainAxis,l=eG(r,t.page.borderBox.center),c={target:e1(t.page.borderBox,l),destination:n,withDroppableDisplacement:s,viewport:o};return void 0!==a&&a?tx(c):ty(c)},tq=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,o=e.draggables,s=e.previousImpact,a=e.viewport,l=e.previousPageBorderBoxCenter,c=e.previousClientSelection,u=e.afterCritical;if(!r.isEnabled)return null;var d=ti(r.descriptor.id,o),p=tc(n,r),h=tl({isMovingForward:t,draggable:n,destination:r,insideDestination:d,previousImpact:s})||t_({isMovingForward:t,isInHomeList:p,draggable:n,draggables:o,destination:r,insideDestination:d,previousImpact:s,viewport:a,afterCritical:u});if(!h)return null;var f=tF({impact:h,draggable:n,droppable:r,draggables:o,afterCritical:u});if(tV({draggable:n,destination:r,newPageBorderBoxCenter:f,viewport:a.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:tU({pageBorderBoxCenter:f,draggable:n,viewport:a}),impact:h,scrollJumpRequest:null};var m=eG(f,l);return{clientSelection:c,impact:tH({impact:h,viewport:a,destination:r,draggables:o,maxScrollChange:m}),scrollJumpRequest:m}},tW=function(e){var t=e.subject.active;return t||e$(!1),t},tG=function(e){var t=e.isMovingForward,n=e.pageBorderBoxCenter,r=e.source,o=e.droppables,s=e.viewport,a=r.subject.active;if(!a)return null;var l=r.axis,c=th(a[l.start],a[l.end]),u=tn(o).filter(function(e){return e!==r}).filter(function(e){return e.isEnabled}).filter(function(e){return!!e.subject.active}).filter(function(e){return tf(s.frame)(tW(e))}).filter(function(e){var n=tW(e);return t?a[l.crossAxisEnd]<n[l.crossAxisEnd]:n[l.crossAxisStart]<a[l.crossAxisStart]}).filter(function(e){var t=tW(e),n=th(t[l.start],t[l.end]);return c(t[l.start])||c(t[l.end])||n(a[l.start])||n(a[l.end])}).sort(function(e,n){var r=tW(e)[l.crossAxisStart],o=tW(n)[l.crossAxisStart];return t?r-o:o-r}).filter(function(e,t,n){return tW(e)[l.crossAxisStart]===tW(n[0])[l.crossAxisStart]});if(!u.length)return null;if(1===u.length)return u[0];var d=u.filter(function(e){return th(tW(e)[l.start],tW(e)[l.end])(n[l.line])});return 1===d.length?d[0]:d.length>1?d.sort(function(e,t){return tW(e)[l.start]-tW(t)[l.start]})[0]:u.sort(function(e,t){var r=eX(n,e2(tW(e))),o=eX(n,e2(tW(t)));return r!==o?r-o:tW(e)[l.start]-tW(t)[l.start]})[0]},tK=function(e,t){var n=e.page.borderBox.center;return tC(e.descriptor.id,t)?eG(n,t.displacedBy.point):n},tY=function(e,t){var n=e.page.borderBox;return tC(e.descriptor.id,t)?e1(n,eY(t.displacedBy.point)):n},tZ=function(e){var t=e.pageBorderBoxCenter,n=e.viewport,r=e.destination,o=e.insideDestination,s=e.afterCritical;return o.filter(function(e){return ty({target:tY(e,s),destination:r,viewport:n.frame,withDroppableDisplacement:!0})}).sort(function(e,n){var o=eJ(t,tj(r,tK(e,s))),a=eJ(t,tj(r,tK(n,s)));return o<a?-1:a<o?1:e.descriptor.index-n.descriptor.index})[0]||null},tJ=(0,eE.Z)(function(e,t){var n=t[e.line];return{value:n,point:eZ(e.line,n)}}),tX=function(e,t,n){var r=e.axis;if("virtual"===e.descriptor.mode)return eZ(r.line,t[r.line]);var o=e.subject.page.contentBox[r.size],s=ti(e.descriptor.id,n).reduce(function(e,t){return e+t.client.marginBox[r.size]},0)+t[r.line]-o;return s<=0?null:eZ(r.line,s)},tQ=function(e,t){return(0,E.Z)({},e,{scroll:(0,E.Z)({},e.scroll,{max:t})})},t0=function(e,t,n){var r=e.frame;tc(t,e)&&e$(!1),e.subject.withPlaceholder&&e$(!1);var o=tJ(e.axis,t.displaceBy).point,s=tX(e,o,n),a={placeholderSize:o,increasedBy:s,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!r){var l=e5({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:e.frame});return(0,E.Z)({},e,{subject:l})}var c=s?eW(r.scroll.max,s):r.scroll.max,u=tQ(r,c),d=e5({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:u});return(0,E.Z)({},e,{subject:d,frame:u})},t1=function(e){var t=e.subject.withPlaceholder;t||e$(!1);var n=e.frame;if(!n){var r=e5({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null});return(0,E.Z)({},e,{subject:r})}var o=t.oldFrameMaxScroll;o||e$(!1);var s=tQ(n,o),a=e5({page:e.subject.page,axis:e.axis,frame:s,withPlaceholder:null});return(0,E.Z)({},e,{subject:a,frame:s})},t2=function(e){var t,n=e.previousPageBorderBoxCenter,r=e.moveRelativeTo,o=e.insideDestination,s=e.draggable,a=e.draggables,l=e.destination,c=e.viewport,u=e.afterCritical;if(!r){if(o.length)return null;var d={displaced:td,displacedBy:tu,at:{type:"REORDER",destination:{droppableId:l.descriptor.id,index:0}}},p=tF({impact:d,draggable:s,droppable:l,draggables:a,afterCritical:u}),h=tc(s,l)?l:t0(l,s,a);return tV({draggable:s,destination:h,newPageBorderBoxCenter:p,viewport:c.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?d:null}var f=n[l.axis.line]<=r.page.borderBox.center[l.axis.line];var m=(t=r.descriptor.index,r.descriptor.id===s.descriptor.id||f?t:t+1),g=tJ(l.axis,s.displaceBy);return tA({draggable:s,insideDestination:o,destination:l,viewport:c,displacedBy:g,last:td,index:m})},t3=function(e){var t=e.isMovingForward,n=e.previousPageBorderBoxCenter,r=e.draggable,o=e.isOver,s=e.draggables,a=e.droppables,l=e.viewport,c=e.afterCritical,u=tG({isMovingForward:t,pageBorderBoxCenter:n,source:o,droppables:a,viewport:l});if(!u)return null;var d=ti(u.descriptor.id,s),p=tZ({pageBorderBoxCenter:n,viewport:l,destination:u,insideDestination:d,afterCritical:c}),h=t2({previousPageBorderBoxCenter:n,destination:u,draggable:r,draggables:s,moveRelativeTo:p,insideDestination:d,viewport:l,afterCritical:c});return h?{clientSelection:tU({pageBorderBoxCenter:tF({impact:h,draggable:r,droppable:u,draggables:s,afterCritical:c}),draggable:r,viewport:l}),impact:h,scrollJumpRequest:null}:null},t5=function(e){var t=e.at;return t?"REORDER"===t.type?t.destination.droppableId:t.combine.droppableId:null},t4=function(e,t){var n=t5(e);return n?t[n]:null},t6=function(e){var t=e.state,n=e.type,r=t4(t.impact,t.dimensions.droppables),o=!!r,s=t.dimensions.droppables[t.critical.droppable.id],a=r||s,l=a.axis.direction,c="vertical"===l&&("MOVE_UP"===n||"MOVE_DOWN"===n)||"horizontal"===l&&("MOVE_LEFT"===n||"MOVE_RIGHT"===n);if(c&&!o)return null;var u="MOVE_DOWN"===n||"MOVE_RIGHT"===n,d=t.dimensions.draggables[t.critical.draggable.id],p=t.current.page.borderBoxCenter,h=t.dimensions,f=h.draggables,m=h.droppables;return c?tq({isMovingForward:u,previousPageBorderBoxCenter:p,draggable:d,destination:a,draggables:f,viewport:t.viewport,previousClientSelection:t.current.client.selection,previousImpact:t.impact,afterCritical:t.afterCritical}):t3({isMovingForward:u,previousPageBorderBoxCenter:p,draggable:d,isOver:a,draggables:f,droppables:m,viewport:t.viewport,afterCritical:t.afterCritical})};function t8(e){return"DRAGGING"===e.phase||"COLLECTING"===e.phase}function t9(e){var t=th(e.top,e.bottom),n=th(e.left,e.right);return function(e){return t(e.y)&&n(e.x)}}var t7=function(e,t){return eg(e1(e,t))},ne=function(e,t){var n=e.frame;return n?t7(t,n.scroll.diff.value):t};function nt(e){var t=e.displaced,n=e.id;return!!(t.visible[n]||t.invisible[n])}var nn=function(e){var t,n,r,o,s=e.pageBorderBoxWithDroppableScroll,a=e.draggable,l=e.destination,c=e.insideDestination,u=e.last,d=e.viewport,p=e.afterCritical,h=l.axis,f=tJ(l.axis,a.displaceBy),m=f.value,g=s[h.start],v=s[h.end],b=e9(ta(a,c),function(e){var t=e.descriptor.id,n=e.page.borderBox.center[h.line],r=tC(t,p),o=nt({displaced:u,id:t});if(r)return o?v<=n:g<n-m;return o?v<=n+m:g<n});var y=(n=(t={draggable:a,closest:b,inHomeList:tc(a,l)}).draggable,r=t.closest,o=t.inHomeList,r?o?r.descriptor.index>n.descriptor.index?r.descriptor.index-1:r.descriptor.index:r.descriptor.index:null);return tA({draggable:a,insideDestination:c,destination:l,viewport:d,last:u,displacedBy:f,index:y})},nr=function(e){var t=e.draggable,n=e.pageBorderBoxWithDroppableScroll,r=e.previousImpact,o=e.destination,s=e.insideDestination,a=e.afterCritical;if(!o.isCombineEnabled)return null;var l=o.axis,c=tJ(o.axis,t.displaceBy),u=c.value,d=n[l.start],p=n[l.end],h=e9(ta(t,s),function(e){var t=e.descriptor.id,n=e.page.borderBox,o=n[l.size]/4,s=tC(t,a),c=nt({displaced:r.displaced,id:t});if(s)return c?p>n[l.start]+o&&p<n[l.end]-o:d>n[l.start]-u+o&&d<n[l.end]-u-o;return c?p>n[l.start]+u+o&&p<n[l.end]+u-o:d>n[l.start]+o&&d<n[l.end]-o});return h?{displacedBy:c,displaced:r.displaced,at:{type:"COMBINE",combine:{draggableId:h.descriptor.id,droppableId:o.descriptor.id}}}:null},ni=function(e){var t=e.pageOffset,n=e.draggable,r=e.draggables,o=e.droppables,s=e.previousImpact,a=e.viewport,l=e.afterCritical,c=t7(n.page.borderBox,t),u=function(e){var t,n,r,o,s,a,l=e.pageBorderBox,c=e.draggable,u=tn(e.droppables).filter(function(e){if(!e.isEnabled)return!1;var t,n,r=e.subject.active;if(!r)return!1;if(t=l,n=r,!(t.left<n.right)||!(t.right>n.left)||!(t.top<n.bottom)||!(t.bottom>n.top))return!1;if(t9(r)(l.center))return!0;var o=e.axis,s=r.center[o.crossAxisLine],a=l[o.crossAxisStart],c=l[o.crossAxisEnd],u=th(r[o.crossAxisStart],r[o.crossAxisEnd]),d=u(a),p=u(c);return!d&&!p||(d?a<s:c>s)});if(!u.length)return null;if(1===u.length)return u[0].descriptor.id;return n=(t={pageBorderBox:l,draggable:c,candidates:u}).pageBorderBox,r=t.draggable,o=t.candidates,s=r.page.borderBox.center,(a=o.map(function(e){var t=e.axis,r=eZ(e.axis.line,n.center[t.line],e.page.borderBox.center[t.crossAxisLine]);return{id:e.descriptor.id,distance:eJ(s,r)}}).sort(function(e,t){return t.distance-e.distance}))[0]?a[0].id:null}({pageBorderBox:c,draggable:n,droppables:o});if(!u)return tp;var d=o[u],p=ti(d.descriptor.id,r),h=ne(d,c);return nr({pageBorderBoxWithDroppableScroll:h,draggable:n,previousImpact:s,destination:d,insideDestination:p,afterCritical:l})||nn({pageBorderBoxWithDroppableScroll:h,draggable:n,destination:d,insideDestination:p,last:s.displaced,viewport:a,afterCritical:l})},no=function(e,t){var n;return(0,E.Z)({},e,((n={})[t.descriptor.id]=t,n))},ns=function(e){var t=e.previousImpact,n=e.impact,r=e.droppables,o=t5(t),s=t5(n);if(!o||o===s)return r;var a=r[o];return a.subject.withPlaceholder?no(r,t1(a)):r},na=function(e){var t=e.draggable,n=e.draggables,r=e.droppables,o=e.previousImpact,s=e.impact,a=ns({previousImpact:o,impact:s,droppables:r}),l=t5(s);if(!l)return a;var c=r[l];return tc(t,c)||c.subject.withPlaceholder?a:no(a,t0(c,t,n))},nl=function(e){var t=e.state,n=e.clientSelection,r=e.dimensions,o=e.viewport,s=e.impact,a=e.scrollJumpRequest,l=o||t.viewport,c=r||t.dimensions,u=n||t.current.client.selection,d=eG(u,t.initial.client.selection),p={offset:d,selection:u,borderBoxCenter:eW(t.initial.client.borderBoxCenter,d)},h={selection:eW(p.selection,l.scroll.current),borderBoxCenter:eW(p.borderBoxCenter,l.scroll.current),offset:eW(p.offset,l.scroll.diff.value)},f={client:p,page:h};if("COLLECTING"===t.phase)return(0,E.Z)({phase:"COLLECTING"},t,{dimensions:c,viewport:l,current:f});var m=c.draggables[t.critical.draggable.id],g=s||ni({pageOffset:h.offset,draggable:m,draggables:c.draggables,droppables:c.droppables,previousImpact:t.impact,viewport:l,afterCritical:t.afterCritical}),v=na({draggable:m,impact:g,previousImpact:t.impact,draggables:c.draggables,droppables:c.droppables});return(0,E.Z)({},t,{current:f,dimensions:{draggables:c.draggables,droppables:v},impact:g,viewport:l,scrollJumpRequest:a||null,forceShouldAnimate:!a&&null})},nc=function(e){var t,n,r=e.impact,o=e.viewport,s=e.draggables,a=e.destination,l=e.forceShouldAnimate,c=r.displaced;var u=tS({afterDragging:(t=c.all,n=s,t.map(function(e){return n[e]})),destination:a,displacedBy:r.displacedBy,viewport:o.frame,forceShouldAnimate:l,last:c});return(0,E.Z)({},r,{displaced:u})},nu=function(e){var t=e.impact,n=e.draggable,r=e.droppable,o=e.draggables,s=e.viewport;return tU({pageBorderBoxCenter:tF({impact:t,draggable:n,draggables:o,droppable:r,afterCritical:e.afterCritical}),draggable:n,viewport:s})},nd=function(e){var t=e.state,n=e.dimensions,r=e.viewport;"SNAP"!==t.movementMode&&e$(!1);var o=t.impact,s=r||t.viewport,a=n||t.dimensions,l=a.draggables,c=a.droppables,u=l[t.critical.draggable.id],d=t5(o);d||e$(!1);var p=c[d],h=nc({impact:o,viewport:s,destination:p,draggables:l}),f=nu({impact:h,draggable:u,droppable:p,draggables:l,viewport:s,afterCritical:t.afterCritical});return nl({impact:h,clientSelection:f,state:t,dimensions:a,viewport:s})},np=function(e){var t,n=e.draggable,r=e.home,o=e.draggables,s=e.viewport,a=tJ(r.axis,n.displaceBy),l=ti(r.descriptor.id,o),c=l.indexOf(n);-1!==c||e$(!1);var u=l.slice(c+1),d=u.reduce(function(e,t){return e[t.descriptor.id]=!0,e},{}),p={inVirtualList:"virtual"===r.descriptor.mode,displacedBy:a,effected:d};return{impact:{displaced:tS({afterDragging:u,destination:r,displacedBy:a,last:null,viewport:s.frame,forceShouldAnimate:!1}),displacedBy:a,at:{type:"REORDER",destination:{index:(t=n.descriptor).index,droppableId:t.droppableId}}},afterCritical:p}},nh=function(e){},nf=function(e){},nm=function(e){var t=e.draggable,n=e.offset,r=e.initialWindowScroll,o=eS(t.client,n),s=ek(o,r);return(0,E.Z)({},t,{placeholder:(0,E.Z)({},t.placeholder,{client:o}),client:o,page:s})},ng=function(e){var t=e.frame;return t||e$(!1),t},nv=function(e){var t=e.additions,n=e.updatedDroppables,r=e.viewport,o=r.scroll.diff.value;return t.map(function(e){var t=eW(o,ng(n[e.descriptor.droppableId]).scroll.diff.value);return nm({draggable:e,offset:t,initialWindowScroll:r.scroll.initial})})},nb=function(e){var t=e.state,n=e.published;nh();var r=n.modified.map(function(e){return e4(t.dimensions.droppables[e.droppableId],e.scroll)}),o=(0,E.Z)({},t.dimensions.droppables,{},te(r)),s=tt(nv({additions:n.additions,updatedDroppables:o,viewport:t.viewport})),a=(0,E.Z)({},t.dimensions.draggables,{},s);n.removals.forEach(function(e){delete a[e]});var l={droppables:o,draggables:a},c=t5(t.impact),u=c?l.droppables[c]:null,d=np({draggable:l.draggables[t.critical.draggable.id],home:l.droppables[t.critical.droppable.id],draggables:a,viewport:t.viewport}),p=d.impact,h=d.afterCritical,f=u&&u.isCombineEnabled?t.impact:p,m=ni({pageOffset:t.current.page.offset,draggable:l.draggables[t.critical.draggable.id],draggables:l.draggables,droppables:l.droppables,previousImpact:f,viewport:t.viewport,afterCritical:h});nf();var g=(0,E.Z)({phase:"DRAGGING"},t,{phase:"DRAGGING",impact:m,onLiftImpact:p,dimensions:l,afterCritical:h,forceShouldAnimate:!1});return"COLLECTING"===t.phase?g:(0,E.Z)({phase:"DROP_PENDING"},g,{phase:"DROP_PENDING",reason:t.reason,isWaiting:!1})},ny=function(e){return"SNAP"===e.movementMode},nx=function(e,t,n){var r,o,s=(r=e.dimensions,o=t,{draggables:r.draggables,droppables:no(r.droppables,o)});return!ny(e)||n?nl({state:e,dimensions:s}):nd({state:e,dimensions:s})};function nw(e){return e.isDragging&&"SNAP"===e.movementMode?(0,E.Z)({phase:"DRAGGING"},e,{scrollJumpRequest:null}):e}var nS={phase:"IDLE",completed:null,shouldFlush:!1},nk=function(e,t){if(void 0===e&&(e=nS),"FLUSH"===t.type)return(0,E.Z)({},nS,{shouldFlush:!0});if("INITIAL_PUBLISH"===t.type){"IDLE"!==e.phase&&e$(!1);var n=t.payload,r=n.critical,o=n.clientSelection,s=n.viewport,a=n.dimensions,l=n.movementMode,c=a.draggables[r.draggable.id],u=a.droppables[r.droppable.id],d={selection:o,borderBoxCenter:c.client.borderBox.center,offset:eq},p={client:d,page:{selection:eW(d.selection,s.scroll.initial),borderBoxCenter:eW(d.selection,s.scroll.initial),offset:eW(d.selection,s.scroll.diff.value)}},h=tn(a.droppables).every(function(e){return!e.isFixedOnPage}),f=np({draggable:c,home:u,draggables:a.draggables,viewport:s}),m=f.impact,g=f.afterCritical;return{phase:"DRAGGING",isDragging:!0,critical:r,movementMode:l,dimensions:a,initial:p,current:p,isWindowScrollAllowed:h,impact:m,afterCritical:g,onLiftImpact:m,viewport:s,scrollJumpRequest:null,forceShouldAnimate:null}}if("COLLECTION_STARTING"===t.type)return"COLLECTING"===e.phase||"DROP_PENDING"===e.phase?e:("DRAGGING"!==e.phase&&e$(!1),(0,E.Z)({phase:"COLLECTING"},e,{phase:"COLLECTING"}));if("PUBLISH_WHILE_DRAGGING"===t.type)return"COLLECTING"===e.phase||"DROP_PENDING"===e.phase||e$(!1),nb({state:e,published:t.payload});if("MOVE"===t.type){if("DROP_PENDING"===e.phase)return e;t8(e)||e$(!1);var v=t.payload.client;return eK(v,e.current.client.selection)?e:nl({state:e,clientSelection:v,impact:ny(e)?e.impact:null})}if("UPDATE_DROPPABLE_SCROLL"===t.type){if("DROP_PENDING"===e.phase||"COLLECTING"===e.phase)return nw(e);t8(e)||e$(!1);var b=t.payload,y=b.id,x=b.newScroll,w=e.dimensions.droppables[y];return w?nx(e,e4(w,x),!1):e}if("UPDATE_DROPPABLE_IS_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;t8(e)||e$(!1);var S=t.payload,k=S.id,A=S.isEnabled,C=e.dimensions.droppables[k];return C||e$(!1),C.isEnabled!==A||e$(!1),nx(e,(0,E.Z)({},C,{isEnabled:A}),!0)}if("UPDATE_DROPPABLE_IS_COMBINE_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;t8(e)||e$(!1);var T=t.payload,_=T.id,O=T.isCombineEnabled,M=e.dimensions.droppables[_];return M||e$(!1),M.isCombineEnabled!==O||e$(!1),nx(e,(0,E.Z)({},M,{isCombineEnabled:O}),!0)}if("MOVE_BY_WINDOW_SCROLL"===t.type){if("DROP_PENDING"===e.phase||"DROP_ANIMATING"===e.phase)return e;t8(e)||e$(!1),e.isWindowScrollAllowed||e$(!1);var I=t.payload.newScroll;if(eK(e.viewport.scroll.current,I))return nw(e);var P=tz(e.viewport,I);return ny(e)?nd({state:e,viewport:P}):nl({state:e,viewport:P})}if("UPDATE_VIEWPORT_MAX_SCROLL"===t.type){if(!t8(e))return e;var D=t.payload.maxScroll;if(eK(D,e.viewport.scroll.max))return e;var N=(0,E.Z)({},e.viewport,{scroll:(0,E.Z)({},e.viewport.scroll,{max:D})});return(0,E.Z)({phase:"DRAGGING"},e,{viewport:N})}if("MOVE_UP"===t.type||"MOVE_DOWN"===t.type||"MOVE_LEFT"===t.type||"MOVE_RIGHT"===t.type){if("COLLECTING"===e.phase||"DROP_PENDING"===e.phase)return e;"DRAGGING"!==e.phase&&e$(!1);var R=t6({state:e,type:t.type});return R?nl({state:e,impact:R.impact,clientSelection:R.clientSelection,scrollJumpRequest:R.scrollJumpRequest}):e}if("DROP_PENDING"===t.type){var L=t.payload.reason;return"COLLECTING"!==e.phase&&e$(!1),(0,E.Z)({phase:"DROP_PENDING"},e,{phase:"DROP_PENDING",isWaiting:!0,reason:L})}if("DROP_ANIMATE"===t.type){var j=t.payload,$=j.completed,F=j.dropDuration,z=j.newHomeClientOffset;return"DRAGGING"===e.phase||"DROP_PENDING"===e.phase||e$(!1),{phase:"DROP_ANIMATING",completed:$,dropDuration:F,newHomeClientOffset:z,dimensions:e.dimensions}}return"DROP_COMPLETE"===t.type?{phase:"IDLE",completed:t.payload.completed,shouldFlush:!1}:e},nA=function(e){return{type:"PUBLISH_WHILE_DRAGGING",payload:e}},nC=function(){return{type:"COLLECTION_STARTING",payload:null}},nE=function(e){return{type:"UPDATE_DROPPABLE_SCROLL",payload:e}},nT=function(e){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}},n_=function(e){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}},nO=function(e){return{type:"MOVE",payload:e}},nM=function(){return{type:"MOVE_UP",payload:null}},nI=function(){return{type:"MOVE_DOWN",payload:null}},nP=function(){return{type:"MOVE_RIGHT",payload:null}},nD=function(){return{type:"MOVE_LEFT",payload:null}},nN=function(){return{type:"FLUSH",payload:null}},nR=function(e){return{type:"DROP_COMPLETE",payload:e}},nL=function(e){return{type:"DROP",payload:e}},nj=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}},n$={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},nF={opacity:{drop:0,combining:.7},scale:{drop:.75}},nz=.2,nB=.33,nH=.55,nU=nz+"s "+n$.outOfTheWay,nV={fluid:"opacity "+nU,snap:"transform "+nU+", opacity "+nU,drop:function(e){var t=e+"s "+n$.drop;return"transform "+t+", opacity "+t},outOfTheWay:"transform "+nU,placeholder:"height "+nU+", width "+nU+", margin "+nU},nq=function(e){return eK(e,eq)?null:"translate("+e.x+"px, "+e.y+"px)"},nW={moveTo:nq,drop:function(e,t){var n=nq(e);return n?t?n+" scale("+nF.scale.drop+")":n:null}},nG=nB,nK=nH,nY=nK-nG,nZ=function(e){var t=e.current,n=e.destination,r=e.reason,o=eJ(t,n);if(o<=0)return nG;if(o>=1500)return nK;var s=nG+o/1500*nY;return Number(("CANCEL"===r?.6*s:s).toFixed(2))},nJ=function(e){var t=e.impact,n=e.draggable,r=e.dimensions,o=e.viewport,s=e.afterCritical,a=r.draggables,l=r.droppables,c=t5(t),u=c?l[c]:null,d=l[n.descriptor.droppableId];return eG(nu({impact:t,draggable:n,draggables:a,afterCritical:s,droppable:u||d,viewport:o}),n.client.borderBox.center)},nX=function(e){var t=e.draggables,n=e.reason,r=e.lastImpact,o=e.home,s=e.viewport,a=e.onLiftImpact;return r.at&&"DROP"===n?"REORDER"===r.at.type?{impact:r,didDropInsideDroppable:!0}:{impact:(0,E.Z)({},r,{displaced:td}),didDropInsideDroppable:!0}:{impact:nc({draggables:t,impact:a,destination:o,viewport:s,forceShouldAnimate:!0}),didDropInsideDroppable:!1}},nQ=function(e){var t=e.getState,n=e.dispatch;return function(e){return function(r){if("DROP"!==r.type){e(r);return}var o=t(),s=r.payload.reason;if("COLLECTING"===o.phase){n({type:"DROP_PENDING",payload:{reason:s}});return}if("IDLE"!==o.phase){"DROP_PENDING"===o.phase&&o.isWaiting&&e$(!1),"DRAGGING"===o.phase||"DROP_PENDING"===o.phase||e$(!1);var a=o.critical,l=o.dimensions,c=l.draggables[o.critical.draggable.id],u=nX({reason:s,lastImpact:o.impact,afterCritical:o.afterCritical,onLiftImpact:o.onLiftImpact,home:o.dimensions.droppables[o.critical.droppable.id],viewport:o.viewport,draggables:o.dimensions.draggables}),d=u.impact,p=u.didDropInsideDroppable,h=p?to(d):null,f=p?ts(d):null,m={index:a.draggable.index,droppableId:a.droppable.id},g={draggableId:c.descriptor.id,type:c.descriptor.type,source:m,reason:s,mode:o.movementMode,destination:h,combine:f},v=nJ({impact:d,draggable:c,dimensions:l,viewport:o.viewport,afterCritical:o.afterCritical}),b={critical:o.critical,afterCritical:o.afterCritical,result:g,impact:d};if(!(!eK(o.current.client.offset,v)||g.combine)){n(nR({completed:b}));return}var y=nZ({current:o.current.client.offset,destination:v,reason:s});n({type:"DROP_ANIMATE",payload:{newHomeClientOffset:v,dropDuration:y,completed:b}})}}}},n0=function(){return{x:window.pageXOffset,y:window.pageYOffset}},n1=function(e){var t=function(e){var t,n=e.onWindowScroll,r=eT(function(){n(n0())});var o=(t=r,{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(e){if(e.target===window||e.target===window.document)t()}}),s=eN;function a(){return s!==eN}return{start:function(){a()&&e$(!1),s=eR(window,[o])},stop:function(){a()||e$(!1),r.cancel(),s(),s=eN},isActive:a}}({onWindowScroll:function(t){e.dispatch({type:"MOVE_BY_WINDOW_SCROLL",payload:{newScroll:t}})}});return function(e){return function(n){var r;if(!t.isActive()&&"INITIAL_PUBLISH"===n.type&&t.start(),t.isActive()&&("DROP_COMPLETE"===(r=n).type||"DROP_ANIMATE"===r.type||"FLUSH"===r.type))t.stop();e(n)}}},n2=function(e){var t=!1,n=!1,r=setTimeout(function(){n=!0}),o=function(o){if(!t&&!n)t=!0,e(o),clearTimeout(r)};return o.wasCalled=function(){return t},o},n3=function(){var e=[],t=function(t){var n=e8(e,function(e){return e.timerId===t});-1!==n||e$(!1),e.splice(n,1)[0].callback()};return{add:function(n){var r=setTimeout(function(){return t(r)});e.push({timerId:r,callback:n})},flush:function(){if(!!e.length){var t=[].concat(e);e.length=0,t.forEach(function(e){clearTimeout(e.timerId),e.callback()})}}}},n5=function(e,t){if(e===t)return!0;var n=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,r=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return n&&r},n4=function(e,t){nh(),t(),nf()},n6=function(e,t){return{draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t}},n8=function(e,t,n,r){if(!e){n(r(t));return}var o=n2(n);e(t,{announce:o}),!o.wasCalled()&&n(r(t))},n9=function(e,t){var n=n3(),r=null,o=function(n){r||e$(!1),r=null,n4("onDragEnd",function(){return n8(e().onDragEnd,n,t,eV.onDragEnd)})};return{beforeCapture:function(t,n){r&&e$(!1),n4("onBeforeCapture",function(){var r=e().onBeforeCapture;r&&r({draggableId:t,mode:n})})},beforeStart:function(t,n){r&&e$(!1),n4("onBeforeDragStart",function(){var r=e().onBeforeDragStart;r&&r(n6(t,n))})},start:function(o,s){r&&e$(!1);var a=n6(o,s);r={mode:s,lastCritical:o,lastLocation:a.source,lastCombine:null},n.add(function(){n4("onDragStart",function(){return n8(e().onDragStart,a,t,eV.onDragStart)})})},update:function(o,s){var a,l,c,u,d=to(s),p=ts(s);r||e$(!1);var h=!n5(o,r.lastCritical);h&&(r.lastCritical=o);var f=(a=r.lastLocation,l=d,(null!=a||null!=l)&&(null==a||null==l||a.droppableId!==l.droppableId||a.index!==l.index));f&&(r.lastLocation=d);var m=(c=r.lastCombine,u=p,(null!=c||null!=u)&&(null==c||null==u||c.draggableId!==u.draggableId||c.droppableId!==u.droppableId));if(m&&(r.lastCombine=p),!!h||!!f||!!m){var g=(0,E.Z)({},n6(o,r.mode),{combine:p,destination:d});n.add(function(){n4("onDragUpdate",function(){return n8(e().onDragUpdate,g,t,eV.onDragUpdate)})})}},flush:function(){r||e$(!1),n.flush()},drop:o,abort:function(){if(!!r)o((0,E.Z)({},n6(r.lastCritical,r.mode),{combine:null,destination:null,reason:"CANCEL"}))}}},n7=function(e,t){var n=n9(e,t);return function(e){return function(t){return function(r){if("BEFORE_INITIAL_CAPTURE"===r.type){n.beforeCapture(r.payload.draggableId,r.payload.movementMode);return}if("INITIAL_PUBLISH"===r.type){var o=r.payload.critical;n.beforeStart(o,r.payload.movementMode),t(r),n.start(o,r.payload.movementMode);return}if("DROP_COMPLETE"===r.type){var s=r.payload.completed.result;n.flush(),t(r),n.drop(s);return}if(t(r),"FLUSH"===r.type){n.abort();return}var a=e.getState();"DRAGGING"===a.phase&&n.update(a.critical,a.impact)}}}},re=function(e){return function(t){return function(n){if("DROP_ANIMATION_FINISHED"!==n.type){t(n);return}var r=e.getState();"DROP_ANIMATING"!==r.phase&&e$(!1),e.dispatch(nR({completed:r.completed}))}}},rt=function(e){var t=null,n=null;return function(r){return function(o){if(("FLUSH"===o.type||"DROP_COMPLETE"===o.type||"DROP_ANIMATION_FINISHED"===o.type)&&(n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)),r(o),"DROP_ANIMATE"===o.type){var s={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){"DROP_ANIMATING"===e.getState().phase&&e.dispatch(nj())}};n=requestAnimationFrame(function(){n=null,t=eR(window,[s])})}}}},rn=function(e){var t=!1;return function(){return function(n){return function(r){if("INITIAL_PUBLISH"===r.type){t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),e.tryRestoreFocusRecorded();return}if(n(r),!!t){if("FLUSH"===r.type){t=!1,e.tryRestoreFocusRecorded();return}if("DROP_COMPLETE"===r.type){t=!1;var o=r.payload.completed.result;o.combine&&e.tryShiftRecord(o.draggableId,o.combine.draggableId),e.tryRestoreFocusRecorded()}}}}}},rr=function(e){return function(t){return function(n){if(t(n),"PUBLISH_WHILE_DRAGGING"!==n.type)return;var r=e.getState();if("DROP_PENDING"===r.phase&&!r.isWaiting)e.dispatch(nL({reason:r.reason}))}}},ri=T.qC,ro=function(e){var t,n,r,o,s=e.dimensionMarshal,a=e.focusMarshal,l=e.styleMarshal,c=e.getResponders,u=e.announce,d=e.autoScroller;return(0,T.MT)(nk,ri((0,T.md)((t=l,function(){return function(e){return function(n){"INITIAL_PUBLISH"===n.type&&t.dragging(),"DROP_ANIMATE"===n.type&&t.dropping(n.payload.completed.result.reason),("FLUSH"===n.type||"DROP_COMPLETE"===n.type)&&t.resting(),e(n)}}}),(n=s,function(){return function(e){return function(t){("DROP_COMPLETE"===t.type||"FLUSH"===t.type||"DROP_ANIMATE"===t.type)&&n.stopPublishing(),e(t)}}}),(r=s,function(e){var t=e.getState,n=e.dispatch;return function(e){return function(o){if("LIFT"!==o.type){e(o);return}var s,a,l=o.payload,c=l.id,u=l.clientSelection,d=l.movementMode,p=t();"DROP_ANIMATING"===p.phase&&n(nR({completed:p.completed})),"IDLE"!==t().phase&&e$(!1),n(nN()),n({type:"BEFORE_INITIAL_CAPTURE",payload:{draggableId:c,movementMode:d}});var h=r.startPublishing({draggableId:c,scrollOptions:{shouldPublishImmediately:"SNAP"===d}}),f=h.critical,m=h.dimensions,g=h.viewport;s=0,a=0,n({type:"INITIAL_PUBLISH",payload:{critical:f,dimensions:m,clientSelection:u,movementMode:d,viewport:g}})}}}),nQ,re,rt,rr,(o=d,function(e){return function(t){return function(n){var r;if("DROP_COMPLETE"===(r=n).type||"DROP_ANIMATE"===r.type||"FLUSH"===r.type){o.stop(),t(n);return}if("INITIAL_PUBLISH"===n.type){t(n);var s=e.getState();"DRAGGING"!==s.phase&&e$(!1),o.start(s);return}t(n),o.scroll(e.getState())}}}),n1,rn(a),n7(c,u))))},rs=function(){return{additions:{},removals:{},modified:{}}},ra=function(e){var t=e.scrollHeight,n=e.scrollWidth,r=e.height,o=eG({x:n,y:t},{x:e.width,y:r});return{x:Math.max(0,o.x),y:Math.max(0,o.y)}},rl=function(){var e=document.documentElement;return e||e$(!1),e},rc=function(){var e=rl();return ra({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})},ru=function(){var e=n0(),t=rc(),n=e.y,r=e.x,o=rl(),s=o.clientWidth,a=o.clientHeight,l=eg({top:n,left:r,right:r+s,bottom:n+a});return{frame:l,scroll:{initial:e,current:e,max:t,diff:{value:eq,displacement:eq}}}},rd=function(e){var t=e.critical,n=e.scrollOptions,r=e.registry;nh();var o=ru(),s=o.scroll.current,a=t.droppable,l=r.droppable.getAllByType(a.type).map(function(e){return e.callbacks.getDimensionAndWatchScroll(s,n)}),c={draggables:tt(r.draggable.getAllByType(t.draggable.type).map(function(e){return e.getDimension(s)})),droppables:te(l)};return nf(),{dimensions:c,critical:t,viewport:o}};function rp(e,t,n){return n.descriptor.id!==t.id&&n.descriptor.type===t.type&&"virtual"===e.droppable.getById(n.descriptor.droppableId).descriptor.mode&&!0}var rh=function(e,t){var n,r,o,s,a,l,c=null;var u=(r=(n={callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}).registry,o=n.callbacks,s=rs(),a=null,l=function(){if(!a)o.collectionStarting(),a=requestAnimationFrame(function(){a=null,nh();var e=s,t=e.additions,n=e.removals,l=e.modified,c=Object.keys(t).map(function(e){return r.draggable.getById(e).getDimension(eq)}).sort(function(e,t){return e.descriptor.index-t.descriptor.index}),u=Object.keys(l).map(function(e){var t=r.droppable.getById(e).callbacks.getScrollWhileDragging();return{droppableId:e,scroll:t}}),d={additions:c,removals:Object.keys(n),modified:u};s=rs(),nf(),o.publish(d)})},{add:function(e){var t=e.descriptor.id;s.additions[t]=e,s.modified[e.descriptor.droppableId]=!0,s.removals[t]&&delete s.removals[t],l()},remove:function(e){var t=e.descriptor;s.removals[t.id]=!0,s.modified[t.droppableId]=!0,s.additions[t.id]&&delete s.additions[t.id],l()},stop:function(){if(!!a)cancelAnimationFrame(a),a=null,s=rs()}}),d=function(t){c||e$(!1);var n=c.critical.draggable;"ADDITION"===t.type&&rp(e,n,t.value)&&u.add(t.value),"REMOVAL"===t.type&&rp(e,n,t.value)&&u.remove(t.value)};return{updateDroppableIsEnabled:function(n,r){if(e.droppable.exists(n)||e$(!1),!!c)t.updateDroppableIsEnabled({id:n,isEnabled:r})},updateDroppableIsCombineEnabled:function(n,r){if(!!c)e.droppable.exists(n)||e$(!1),t.updateDroppableIsCombineEnabled({id:n,isCombineEnabled:r})},scrollDroppable:function(t,n){if(!!c)e.droppable.getById(t).callbacks.scroll(n)},updateDroppableScroll:function(n,r){if(!!c)e.droppable.exists(n)||e$(!1),t.updateDroppableScroll({id:n,newScroll:r})},startPublishing:function(t){c&&e$(!1);var n=e.draggable.getById(t.draggableId),r=e.droppable.getById(n.descriptor.droppableId),o={draggable:n.descriptor,droppable:r.descriptor};return c={critical:o,unsubscribe:e.subscribe(d)},rd({critical:o,registry:e,scrollOptions:t.scrollOptions})},stopPublishing:function(){if(!!c){u.stop();var t=c.critical.droppable;e.droppable.getAllByType(t.type).forEach(function(e){return e.callbacks.dragStopped()}),c.unsubscribe(),c=null}}}},rf=function(e,t){return"IDLE"===e.phase||"DROP_ANIMATING"===e.phase&&e.completed.result.draggableId!==t&&"DROP"===e.completed.result.reason},rm=function(e){window.scrollBy(e.x,e.y)},rg=(0,eE.Z)(function(e){return tn(e).filter(function(e){return!!e.isEnabled&&!!e.frame||!1})}),rv=function(e){var t,n=e.center,r=e.destination,o=e.droppables;if(r){var s=o[r];return s.frame?s:null}return t=n,e9(rg(o),function(e){return e.frame||e$(!1),t9(e.frame.pageMarginBox)(t)})},rb={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(e){return Math.pow(e,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},ry=function(e,t){var n=e[t.size]*rb.startFromPercentage,r=e[t.size]*rb.maxScrollAtPercentage;return{startScrollingFrom:n,maxScrollValueAt:r}},rx=function(e){var t=e.startOfRange,n=e.endOfRange,r=e.current,o=n-t;return 0===o?0:(r-t)/o},rw=function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return rb.maxPixelScroll;if(e===t.startScrollingFrom)return 1;var n=rx({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e});return Math.ceil(rb.maxPixelScroll*rb.ease(1-n))},rS=rb.durationDampening.accelerateAt,rk=rb.durationDampening.stopDampeningAt,rA=function(e,t){var n=Date.now()-t;if(n>=rk)return e;if(n<rS)return 1;var r=rx({startOfRange:rS,endOfRange:rk,current:n});return Math.ceil(e*rb.ease(r))},rC=function(e){var t=e.distanceToEdge,n=e.thresholds,r=e.dragStartTime,o=e.shouldUseTimeDampening,s=rw(t,n);return 0===s?0:o?Math.max(rA(s,r),1):s},rE=function(e){var t=e.container,n=e.distanceToEdges,r=e.dragStartTime,o=e.axis,s=e.shouldUseTimeDampening,a=ry(t,o);return n[o.end]<n[o.start]?rC({distanceToEdge:n[o.end],thresholds:a,dragStartTime:r,shouldUseTimeDampening:s}):-1*rC({distanceToEdge:n[o.start],thresholds:a,dragStartTime:r,shouldUseTimeDampening:s})},rT=function(e){var t=e.container,n=e.subject,r=e.proposedScroll,o=n.height>t.height,s=n.width>t.width;return s||o?s&&o?null:{x:s?0:r.x,y:o?0:r.y}:r},r_=eQ(function(e){return 0===e?0:e}),rO=function(e){var t=e.dragStartTime,n=e.container,r=e.subject,o=e.center,s=e.shouldUseTimeDampening,a={top:o.y-n.top,right:n.right-o.x,bottom:n.bottom-o.y,left:o.x-n.left},l=rE({container:n,distanceToEdges:a,dragStartTime:t,axis:tg,shouldUseTimeDampening:s}),c=r_({x:rE({container:n,distanceToEdges:a,dragStartTime:t,axis:tv,shouldUseTimeDampening:s}),y:l});if(eK(c,eq))return null;var u=rT({container:n,subject:r,proposedScroll:c});return u?eK(u,eq)?null:u:null},rM=eQ(function(e){return 0===e?0:e>0?1:-1});var rI=(g=function(e,t){return e<0?e:e>t?e-t:0},function(e){var t=e.current,n=e.max,r=eW(t,e.change),o={x:g(r.x,n.x),y:g(r.y,n.y)};return eK(o,eq)?null:o}),rP=function(e){var t=e.max,n=e.current,r=e.change,o={x:Math.max(n.x,t.x),y:Math.max(n.y,t.y)},s=rM(r),a=rI({max:o,current:n,change:s});return(!a||0!==s.x&&0===a.x||0!==s.y&&0===a.y)&&!0},rD=function(e,t){return rP({current:e.scroll.current,max:e.scroll.max,change:t})},rN=function(e,t){if(!rD(e,t))return null;var n=e.scroll.max;return rI({current:e.scroll.current,max:n,change:t})},rR=function(e,t){var n=e.frame;return!!n&&rP({current:n.scroll.current,max:n.scroll.max,change:t})},rL=function(e,t){var n=e.frame;return n&&rR(e,t)?rI({current:n.scroll.current,max:n.scroll.max,change:t}):null},rj=function(e){var t=e.viewport,n=e.subject,r=e.center,o=e.dragStartTime,s=e.shouldUseTimeDampening,a=rO({dragStartTime:o,container:t.frame,subject:n,center:r,shouldUseTimeDampening:s});return a&&rD(t,a)?a:null},r$=function(e){var t=e.droppable,n=e.subject,r=e.center,o=e.dragStartTime,s=e.shouldUseTimeDampening,a=t.frame;if(!a)return null;var l=rO({dragStartTime:o,container:a.pageMarginBox,subject:n,center:r,shouldUseTimeDampening:s});return l&&rR(t,l)?l:null},rF=function(e){var t=e.state,n=e.dragStartTime,r=e.shouldUseTimeDampening,o=e.scrollWindow,s=e.scrollDroppable,a=t.current.page.borderBoxCenter,l=t.dimensions.draggables[t.critical.draggable.id].page.marginBox;if(t.isWindowScrollAllowed){var c=rj({dragStartTime:n,viewport:t.viewport,subject:l,center:a,shouldUseTimeDampening:r});if(c){o(c);return}}var u=rv({center:a,destination:t5(t.impact),droppables:t.dimensions.droppables});if(!!u){var d=r$({dragStartTime:n,droppable:u,subject:l,center:a,shouldUseTimeDampening:r});d&&s(u.descriptor.id,d)}},rz=function(e){var t=e.scrollWindow,n=e.scrollDroppable,r=eT(t),o=eT(n),s=null,a=function(e){s||e$(!1);var t=s,n=t.shouldUseTimeDampening;rF({state:e,scrollWindow:r,scrollDroppable:o,dragStartTime:t.dragStartTime,shouldUseTimeDampening:n})};return{start:function(e){nh(),s&&e$(!1);var t=Date.now(),n=!1,r=function(){n=!0};rF({state:e,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:r,scrollDroppable:r}),s={dragStartTime:t,shouldUseTimeDampening:n},nf(),n&&a(e)},stop:function(){if(!!s)r.cancel(),o.cancel(),s=null},scroll:a}},rB=function(e){var t=e.move,n=e.scrollDroppable,r=e.scrollWindow,o=function(e,n){t({client:eW(e.current.client.selection,n)})},s=function(e,t){if(!rR(e,t))return t;var r=rL(e,t);if(!r)return n(e.descriptor.id,t),null;var o=eG(t,r);return n(e.descriptor.id,o),eG(t,o)},a=function(e,t,n){if(!e||!rD(t,n))return n;var o=rN(t,n);if(!o)return r(n),null;var s=eG(n,o);return r(s),eG(n,s)};return function(e){var t=e.scrollJumpRequest;if(!t)return;var n=t5(e.impact);n||e$(!1);var r=s(e.dimensions.droppables[n],t);if(!r)return;var l=e.viewport,c=a(e.isWindowScrollAllowed,l,r);if(!!c)o(e,c)}},rH=function(e){var t=e.scrollDroppable,n=e.scrollWindow,r=e.move,o=rz({scrollWindow:n,scrollDroppable:t}),s=rB({move:r,scrollWindow:n,scrollDroppable:t});return{scroll:function(e){if("DRAGGING"!==e.phase)return;if("FLUID"===e.movementMode){o.scroll(e);return}if(!!e.scrollJumpRequest)s(e)},start:o.start,stop:o.stop}},rU="data-rbd";var rV={base:v=rU+"-drag-handle",draggableId:v+"-draggable-id",contextId:v+"-context-id"};var rq={base:b=rU+"-draggable",contextId:b+"-context-id",id:b+"-id"};var rW={base:y=rU+"-droppable",contextId:y+"-context-id",id:y+"-id"},rG={contextId:rU+"-scroll-container-context-id"},rK=function(e,t){return e.map(function(e){var n=e.styles[t];return n?e.selector+" { "+n+" }":""}).join(" ")},rY=function(e){var t,n,r,o=(t=e,function(e){return"["+e+'="'+t+'"]'});var s=(n="\n cursor: -webkit-grab;\n cursor: grab;\n ",{selector:o(rV.contextId),styles:{always:"\n -webkit-touch-callout: none;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n touch-action: manipulation;\n ",resting:n,dragging:"pointer-events: none;",dropAnimating:n}});var a=(r="\n transition: "+nV.outOfTheWay+";\n ",{selector:o(rq.contextId),styles:{dragging:r,dropAnimating:r,userCancel:r}}),l={selector:o(rW.contextId),styles:{always:"overflow-anchor: none;"}},c=[a,s,l,{selector:"body",styles:{dragging:"\n cursor: grabbing;\n cursor: -webkit-grabbing;\n user-select: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n overflow-anchor: none;\n "}}];return{always:rK(c,"always"),resting:rK(c,"resting"),dragging:rK(c,"dragging"),dropAnimating:rK(c,"dropAnimating"),userCancel:rK(c,"userCancel")}},rZ="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?A.useLayoutEffect:A.useEffect,rJ=function(){var e=document.querySelector("head");return e||e$(!1),e},rX=function(e){var t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t},rQ=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function r0(e){return e instanceof rQ(e).HTMLElement}function r1(e,t){var n="["+rV.contextId+'="'+e+'"]',r=e7(document.querySelectorAll(n));if(!r.length)return null;var o=e9(r,function(e){return e.getAttribute(rV.draggableId)===t});return o&&r0(o)?o:null}function r2(){var e={draggables:{},droppables:{}},t=[];function n(e){t.length&&t.forEach(function(t){return t(e)})}function r(t){return e.draggables[t]||null}function o(t){return e.droppables[t]||null}return{draggable:{register:function(t){e.draggables[t.descriptor.id]=t,n({type:"ADDITION",value:t})},update:function(t,n){var r=e.draggables[n.descriptor.id];if(!!r&&r.uniqueId===t.uniqueId)delete e.draggables[n.descriptor.id],e.draggables[t.descriptor.id]=t},unregister:function(t){var o=t.descriptor.id,s=r(o);if(!!s&&t.uniqueId===s.uniqueId)delete e.draggables[o],n({type:"REMOVAL",value:t})},getById:function(e){var t=r(e);return t||e$(!1),t},findById:r,exists:function(e){return!!r(e)},getAllByType:function(t){return e6(e.draggables).filter(function(e){return e.descriptor.type===t})}},droppable:{register:function(t){e.droppables[t.descriptor.id]=t},unregister:function(t){var n=o(t.descriptor.id);if(!!n&&t.uniqueId===n.uniqueId)delete e.droppables[t.descriptor.id]},getById:function(e){var t=o(e);return t||e$(!1),t},findById:o,exists:function(e){return!!o(e)},getAllByType:function(t){return e6(e.droppables).filter(function(e){return e.descriptor.type===t})}},subscribe:function(e){return t.push(e),function(){var n=t.indexOf(e);if(-1!==n)t.splice(n,1)}},clean:function(){e.draggables={},e.droppables={},t.length=0}}}var r3=A.createContext(null),r5=function(){var e=document.body;return e||e$(!1),e},r4={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},r6=0,r8={separator:"::"};function r9(e,t){return void 0===t&&(t=r8),eh(function(){return""+e+t.separator+r6++},[t.separator,e])}var r7=A.createContext(null),ie="^16.8.5 || ^17.0.0 || ^18.0.0",it=/(\d+)\.(\d+)\.(\d+)/,ir=function(e){var t=it.exec(e);return null!=t||e$(!1),{major:Number(t[1]),minor:Number(t[2]),patch:Number(t[3]),raw:e}},ii=function(e,t){var n,r,o=ir(e),s=ir(t);if(n=o,(r=s).major>n.major||!(r.major<n.major)&&(r.minor>n.minor||!(r.minor<n.minor)&&r.patch>=n.patch))return},io=function(e){var t=e.doctype;if(!!t)t.name.toLowerCase(),t.publicId};function is(e){}function ia(e,t){is(function(){(0,A.useEffect)(function(){try{e()}catch(e){eD("\n A setup problem was encountered.\n\n > "+e.message+"\n ")}},t)})}function il(e){var t=(0,A.useRef)(e);return(0,A.useEffect)(function(){t.current=e}),t}var ic=((S={})[13]=!0,S[9]=!0,S),iu=function(e){ic[e.keyCode]&&e.preventDefault()};var id=(x="visibilitychange","undefined"==typeof document?x:e9([x,"ms"+x,"webkit"+x,"moz"+x,"o"+x],function(e){return"on"+e in document})||x),ip={type:"IDLE"};function ih(){}var im=((k={})[34]=!0,k[33]=!0,k[36]=!0,k[35]=!0,k),ig={type:"IDLE"},iv={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};var ib=(w="matches","undefined"==typeof document?w:e9([w,"msMatchesSelector","webkitMatchesSelector"],function(e){return e in Element.prototype})||w);function iy(e){e.preventDefault()}function ix(e){var t=e.expected,n=e.phase,r=e.isLockActive,o=e.shouldWarn;return!!r()&&t===n||!1}function iw(e){var t=e.lockAPI,n=e.store,r=e.registry,o=e.draggableId;if(t.isClaimed())return!1;var s=r.draggable.findById(o);return!!(s&&s.options.isEnabled&&rf(n.getState(),o))||!1}var iS=[function(e){var t=(0,A.useRef)(ip),n=(0,A.useRef)(eN),r=eh(function(){return{eventName:"mousedown",fn:function(t){if(t.defaultPrevented||0!==t.button||t.ctrlKey||t.metaKey||t.shiftKey||t.altKey)return;var r=e.findClosestDraggableId(t);if(!r)return;var o=e.tryGetLock(r,a,{sourceEvent:t});if(!!o){t.preventDefault();var s={x:t.clientX,y:t.clientY};n.current(),u(o,s)}}}},[e]),o=eh(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(t){if(t.defaultPrevented)return;var n=e.findClosestDraggableId(t);if(!n)return;var r=e.findOptionsForDraggable(n);if(!!r&&!r.shouldRespectForcePress&&!!e.canGetLock(n))t.preventDefault()}}},[e]),s=ef(function(){n.current=eR(window,[o,r],{passive:!1,capture:!0})},[o,r]),a=ef(function(){if("IDLE"!==t.current.type)t.current=ip,n.current(),s()},[s]),l=ef(function(){var e=t.current;a(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()},[a]),c=ef(function(){var e,r,o,s,c,u=(r=(e={cancel:l,completed:a,getPhase:function(){return t.current},setPhase:function(e){t.current=e}}).cancel,o=e.completed,s=e.getPhase,c=e.setPhase,[{eventName:"mousemove",fn:function(e){var t,n,r=e.button,o=e.clientX,a=e.clientY;if(0!==r)return;var l={x:o,y:a},u=s();if("DRAGGING"===u.type){e.preventDefault(),u.actions.move(l);return}if("PENDING"!==u.type&&e$(!1),t=u.point,!!(Math.abs((n=l).x-t.x)>=5||Math.abs(n.y-t.y)>=5))e.preventDefault(),c({type:"DRAGGING",actions:u.actions.fluidLift(l)})}},{eventName:"mouseup",fn:function(e){var t=s();if("DRAGGING"!==t.type){r();return}e.preventDefault(),t.actions.drop({shouldBlockNextClick:!0}),o()}},{eventName:"mousedown",fn:function(e){"DRAGGING"===s().type&&e.preventDefault(),r()}},{eventName:"keydown",fn:function(e){if("PENDING"===s().type){r();return}if(27===e.keyCode){e.preventDefault(),r();return}iu(e)}},{eventName:"resize",fn:r},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){"PENDING"===s().type&&r()}},{eventName:"webkitmouseforcedown",fn:function(e){var t=s();if("IDLE"!==t.type||e$(!1),t.actions.shouldRespectForcePress()){r();return}e.preventDefault()}},{eventName:id,fn:r}]);n.current=eR(window,u,{capture:!0,passive:!1})},[l,a]),u=ef(function(e,n){"IDLE"!==t.current.type&&e$(!1),t.current={type:"PENDING",point:n,actions:e},c()},[c]);rZ(function(){return s(),function(){n.current()}},[s])},function(e){var t=(0,A.useRef)(ih),n=eh(function(){return{eventName:"keydown",fn:function(n){if(n.defaultPrevented||32!==n.keyCode)return;var o=e.findClosestDraggableId(n);if(!o)return;var s=e.tryGetLock(o,c,{sourceEvent:n});if(!!s){n.preventDefault();var a=!0,l=s.snapLift();t.current(),t.current=eR(window,function(e,t){function n(){t(),e.cancel()}return[{eventName:"keydown",fn:function(r){if(27===r.keyCode){r.preventDefault(),n();return}if(32===r.keyCode){r.preventDefault(),t(),e.drop();return}if(40===r.keyCode){r.preventDefault(),e.moveDown();return}if(38===r.keyCode){r.preventDefault(),e.moveUp();return}if(39===r.keyCode){r.preventDefault(),e.moveRight();return}if(37===r.keyCode){r.preventDefault(),e.moveLeft();return}if(im[r.keyCode]){r.preventDefault();return}iu(r)}},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:id,fn:n}]}(l,c),{capture:!0,passive:!1})}function c(){a||e$(!1),a=!1,t.current(),r()}}}},[e]),r=ef(function(){t.current=eR(window,[n],{passive:!1,capture:!0})},[n]);rZ(function(){return r(),function(){t.current()}},[r])},function(e){var t=(0,A.useRef)(ig),n=(0,A.useRef)(eN),r=ef(function(){return t.current},[]),o=ef(function(e){t.current=e},[]),s=eh(function(){return{eventName:"touchstart",fn:function(t){if(t.defaultPrevented)return;var r=e.findClosestDraggableId(t);if(!r)return;var o=e.tryGetLock(r,l,{sourceEvent:t});if(!!o){var s=t.touches[0],a=s.clientX,c=s.clientY;n.current(),p(o,{x:a,y:c})}}}},[e]),a=ef(function(){n.current=eR(window,[s],{capture:!0,passive:!1})},[s]),l=ef(function(){var e=t.current;if("IDLE"!==e.type)"PENDING"===e.type&&clearTimeout(e.longPressTimerId),o(ig),n.current(),a()},[a,o]),c=ef(function(){var e=t.current;l(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()},[l]),u=ef(function(){var e,t,o,s,a,u,d,p={capture:!0,passive:!1},h={cancel:c,completed:l,getPhase:r};var f=eR(window,(t=(e=h).cancel,o=e.completed,s=e.getPhase,[{eventName:"touchmove",options:{capture:!1},fn:function(e){var n=s();if("DRAGGING"!==n.type){t();return}n.hasMoved=!0;var r=e.touches[0],o=r.clientX,a=r.clientY;e.preventDefault(),n.actions.move({x:o,y:a})}},{eventName:"touchend",fn:function(e){var n=s();if("DRAGGING"!==n.type){t();return}e.preventDefault(),n.actions.drop({shouldBlockNextClick:!0}),o()}},{eventName:"touchcancel",fn:function(e){if("DRAGGING"!==s().type){t();return}e.preventDefault(),t()}},{eventName:"touchforcechange",fn:function(e){var n=s();"IDLE"!==n.type||e$(!1);var r=e.touches[0];if(!!r&&!!(r.force>=.15)){var o=n.actions.shouldRespectForcePress();if("PENDING"===n.type){o&&t();return}if(o){if(n.hasMoved){e.preventDefault();return}t();return}e.preventDefault()}}},{eventName:id,fn:t}]),p);var m=eR(window,(u=(a=h).cancel,d=a.getPhase,[{eventName:"orientationchange",fn:u},{eventName:"resize",fn:u},{eventName:"contextmenu",fn:function(e){e.preventDefault()}},{eventName:"keydown",fn:function(e){if("DRAGGING"!==d().type){u();return}27===e.keyCode&&e.preventDefault(),u()}},{eventName:id,fn:u}]),p);n.current=function(){f(),m()}},[c,r,l]),d=ef(function(){var e=r();"PENDING"!==e.type&&e$(!1),o({type:"DRAGGING",actions:e.actions.fluidLift(e.point),hasMoved:!1})},[r,o]),p=ef(function(e,t){"IDLE"!==r().type&&e$(!1),o({type:"PENDING",point:t,actions:e,longPressTimerId:setTimeout(d,120)}),u()},[u,r,o,d]);rZ(function(){return a(),function(){n.current();var e=r();"PENDING"===e.type&&(clearTimeout(e.longPressTimerId),o(ig))}},[r,a,o]),rZ(function(){return eR(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}])},[])}];function ik(e){return e.current||e$(!1),e.current}function iA(e){var t,n,r,o,s,a,l,c,u,d,p,h,f,m,g,v,b,y,x,w,S,k,C,_,O,M,I,P,N,R=e.contextId,L=e.setCallbacks,j=e.sensors,$=e.nonce,F=e.dragHandleUsageInstructions,z=(0,A.useRef)(null);ia(function(){ii(ie,A.version),io(document)},[]);var B=il(e),H=ef(function(){var e;return{onBeforeCapture:(e=B.current).onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}},[B]);var U=(n=eh(function(){return"rbd-announcement-"+t},[t=R]),r=(0,A.useRef)(null),(0,A.useEffect)(function(){var e=document.createElement("div");return r.current=e,e.id=n,e.setAttribute("aria-live","assertive"),e.setAttribute("aria-atomic","true"),(0,E.Z)(e.style,r4),r5().appendChild(e),function(){setTimeout(function(){var t=r5();t.contains(e)&&t.removeChild(e),e===r.current&&(r.current=null)})}},[n]),ef(function(e){var t=r.current;if(t){t.textContent=e;return}},[]));var V=(s=(o={contextId:R,text:F}).contextId,a=o.text,c=eh(function(){var e;return"rbd-hidden-text-"+(e={contextId:s,uniqueId:l}).contextId+"-"+e.uniqueId},[l=r9("hidden-text",{separator:"-"}),s]),(0,A.useEffect)(function(){var e=document.createElement("div");return e.id=c,e.textContent=a,e.style.display="none",r5().appendChild(e),function(){var t=r5();t.contains(e)&&t.removeChild(e)}},[c,a]),c);var q=(u=R,d=$,p=eh(function(){return rY(u)},[u]),h=(0,A.useRef)(null),f=(0,A.useRef)(null),m=ef((0,eE.Z)(function(e){var t=f.current;t||e$(!1),t.textContent=e}),[]),rZ(function(){!h.current&&!f.current||e$(!1);var e=rX(d),t=rX(d);return h.current=e,f.current=t,e.setAttribute(rU+"-always",u),t.setAttribute(rU+"-dynamic",u),rJ().appendChild(e),rJ().appendChild(t),g(p.always),m(p.resting),function(){var e=function(e){var t=e.current;t||e$(!1),rJ().removeChild(t),e.current=null};e(h),e(f)}},[d,g=ef(function(e){var t=h.current;t||e$(!1),t.textContent=e},[]),m,p.always,p.resting,u]),v=ef(function(){return m(p.dragging)},[m,p.dragging]),b=ef(function(e){if("DROP"===e){m(p.dropAnimating);return}m(p.userCancel)},[m,p.dropAnimating,p.userCancel]),eh(function(){return{dragging:v,dropping:b,resting:y}},[v,b,y=ef(function(){if(!!f.current)m(p.resting)},[m,p.resting])])),W=ef(function(e){ik(z).dispatch(e)},[]),G=eh(function(){return(0,T.DE)({publishWhileDragging:nA,updateDroppableScroll:nE,updateDroppableIsEnabled:nT,updateDroppableIsCombineEnabled:n_,collectionStarting:nC},W)},[W]);var K=(x=eh(r2,[]),(0,A.useEffect)(function(){return function(){requestAnimationFrame(x.clean)}},[x]),x),Y=eh(function(){return rh(K,G)},[K,G]),Z=eh(function(){return rH((0,E.Z)({scrollWindow:rm,scrollDroppable:Y.scrollDroppable},(0,T.DE)({move:nO},W)))},[Y.scrollDroppable,W]);var J=(w=R,S=(0,A.useRef)({}),k=(0,A.useRef)(null),C=(0,A.useRef)(null),_=(0,A.useRef)(!1),O=ef(function(e,t){var n={id:e,focus:t};return S.current[e]=n,function(){var t=S.current;t[e]!==n&&delete t[e]}},[]),M=ef(function(e){var t=r1(w,e);t&&t!==document.activeElement&&t.focus()},[w]),I=ef(function(e,t){k.current===e&&(k.current=t)},[]),P=ef(function(){if(!C.current&&!!_.current)C.current=requestAnimationFrame(function(){C.current=null;var e=k.current;e&&M(e)})},[M]),N=ef(function(e){k.current=null;var t=document.activeElement;if(!!t&&t.getAttribute(rV.draggableId)===e)k.current=e},[]),rZ(function(){return _.current=!0,function(){_.current=!1;var e=C.current;e&&cancelAnimationFrame(e)}},[]),eh(function(){return{register:O,tryRecordFocus:N,tryRestoreFocusRecorded:P,tryShiftRecord:I}},[O,N,P,I])),X=eh(function(){return ro({announce:U,autoScroller:Z,dimensionMarshal:Y,focusMarshal:J,getResponders:H,styleMarshal:q})},[U,Z,Y,J,H,q]);z.current=X;var Q=ef(function(){var e=ik(z);"IDLE"!==e.getState().phase&&e.dispatch(nN())},[]),ee=ef(function(){var e=ik(z).getState();return e.isDragging||"DROP_ANIMATING"===e.phase},[]);L(eh(function(){return{isDragging:ee,tryAbort:Q}},[ee,Q]));var et=ef(function(e){return rf(ik(z).getState(),e)},[]),en=ef(function(){return t8(ik(z).getState())},[]),er=eh(function(){return{marshal:Y,focus:J,contextId:R,canLift:et,isMovementAllowed:en,dragHandleUsageInstructionsId:V,registry:K}},[R,Y,V,J,et,en,K]);return!function(e){var t,n=e.contextId,r=e.store,o=e.registry,s=e.customSensors,a=[].concat(e.enableDefaultSensors?iS:[],s||[]),l=(0,A.useState)(function(){return function(){var e=null;function t(){e||e$(!1),e=null}return{isClaimed:function(){return!!e},isActive:function(t){return t===e},claim:function(t){e&&e$(!1);var n={abandon:t};return e=n,n},release:t,tryAbandon:function(){e&&(e.abandon(),t())}}}()})[0],c=ef(function(e,t){e.isDragging&&!t.isDragging&&l.tryAbandon()},[l]);rZ(function(){var e=r.getState();return r.subscribe(function(){var t=r.getState();c(e,t),e=t})},[l,r,c]),rZ(function(){return l.tryAbandon},[l.tryAbandon]);var u=ef(function(e){return iw({lockAPI:l,registry:o,store:r,draggableId:e})},[l,o,r]),d=ef(function(e,t,s){return function(e){var t,n,r,o,s,a,l=e.lockAPI,c=e.contextId,u=e.store,d=e.registry,p=e.draggableId,h=e.forceSensorStop,f=e.sourceEvent;if(!iw({lockAPI:l,store:u,registry:d,draggableId:p}))return null;var m=d.draggable.getById(p);var g=(t=c,n=m.descriptor.id,r="["+rq.contextId+'="'+t+'"]',(o=e9(e7(document.querySelectorAll(r)),function(e){return e.getAttribute(rq.id)===n}))&&r0(o)?o:null);if(!g)return null;if(f&&!m.options.canDragInteractiveElements&&(s=g,r0(a=f.target)&&function e(t,n){if(null==n)return!1;if(iv[n.tagName.toLowerCase()])return!0;var r=n.getAttribute("contenteditable");return"true"===r||""===r||n!==t&&e(t,n.parentElement)}(s,a)))return null;var v=l.claim(h||eN),b="PRE_DRAG";function y(){return m.options.shouldRespectForcePress}function x(){return l.isActive(v)}var w=(function(e,t){ix({expected:e,phase:b,isLockActive:x,shouldWarn:!0})&&u.dispatch(t())}).bind(null,"DRAGGING");function S(e){function t(){l.release(),b="COMPLETED"}function n(n,r){void 0===r&&(r={shouldBlockNextClick:!1}),e.cleanup(),r.shouldBlockNextClick&&setTimeout(eR(window,[{eventName:"click",fn:iy,options:{once:!0,passive:!1,capture:!0}}])),t(),u.dispatch(nL({reason:n}))}return"PRE_DRAG"!==b&&(t(),"PRE_DRAG"!==b&&e$(!1)),u.dispatch({type:"LIFT",payload:e.liftActionArgs}),b="DRAGGING",(0,E.Z)({isActive:function(){return ix({expected:"DRAGGING",phase:b,isLockActive:x,shouldWarn:!1})},shouldRespectForcePress:y,drop:function(e){return n("DROP",e)},cancel:function(e){return n("CANCEL",e)}},e.actions)}return{isActive:function(){return ix({expected:"PRE_DRAG",phase:b,isLockActive:x,shouldWarn:!1})},shouldRespectForcePress:y,fluidLift:function(e){var t=eT(function(e){w(function(){return nO({client:e})})}),n=S({liftActionArgs:{id:p,clientSelection:e,movementMode:"FLUID"},cleanup:function(){return t.cancel()},actions:{move:t}});return(0,E.Z)({},n,{move:t})},snapLift:function(){return S({liftActionArgs:{id:p,clientSelection:eg(g.getBoundingClientRect()).center,movementMode:"SNAP"},cleanup:eN,actions:{moveUp:function(){return w(nM)},moveRight:function(){return w(nP)},moveDown:function(){return w(nI)},moveLeft:function(){return w(nD)}}})},abort:function(){ix({expected:"PRE_DRAG",phase:b,isLockActive:x,shouldWarn:!0})&&l.release()}}}({lockAPI:l,registry:o,contextId:n,store:r,draggableId:e,forceSensorStop:t,sourceEvent:s&&s.sourceEvent?s.sourceEvent:null})},[n,l,o,r]),p=ef(function(e){var t;return(t=function(e,t){var n,r,o,s,a=t.target;if(!((n=a)instanceof rQ(n).Element))return null;var l=(r=e,"["+rV.contextId+'="'+r+'"]');var c=(o=a,s=l,o.closest?o.closest(s):function e(t,n){return null==t?null:t[ib](n)?t:e(t.parentElement,n)}(o,s));return c&&r0(c)?c:null}(n,e))?t.getAttribute(rV.draggableId):null},[n]),h=ef(function(e){var t=o.draggable.findById(e);return t?t.options:null},[o.draggable]),f=ef(function(){if(!!l.isClaimed())l.tryAbandon(),"IDLE"!==r.getState().phase&&r.dispatch(nN())},[l,r]),m=ef(l.isClaimed,[l]),g=eh(function(){return{canGetLock:u,tryGetLock:d,findClosestDraggableId:p,findOptionsForDraggable:h,tryReleaseLock:f,isLockClaimed:m}},[u,d,p,h,f,m]);t=a,is(function(){var e=il(t);ia(function(){e.current.length!==t.length&&e$(!1)})});for(var v=0;v<a.length;v++)a[v](g)}({contextId:R,store:X,registry:K,customSensors:j,enableDefaultSensors:!1!==e.enableDefaultSensors}),(0,A.useEffect)(function(){return Q},[Q]),A.createElement(r7.Provider,{value:er},A.createElement(D,{context:r3,store:X},e.children))}var iC=0;function iE(e){var t=eh(function(){return""+iC++},[]),n=e.dragHandleUsageInstructions||eV.dragHandleUsageInstructions;return A.createElement(eF,null,function(r){return A.createElement(iA,{nonce:e.nonce,contextId:t,setCallbacks:r,dragHandleUsageInstructions:n,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd},e.children)})}var iT=function(e){return function(t){return e===t}},i_=iT("scroll"),iO=iT("auto");iT("visible");var iM=function(e,t){return t(e.overflowX)||t(e.overflowY)},iI=function(e){var t=window.getComputedStyle(e),n={overflowX:t.overflowX,overflowY:t.overflowY};return iM(n,i_)||iM(n,iO)},iP=function(e){return{x:e.scrollLeft,y:e.scrollTop}},iD=function(e){var t=e.descriptor,n=e.isEnabled,r=e.isCombineEnabled,o=e.isFixedOnPage,s=e.direction,a=e.client,l=e.page,c=e.closest,u=function(){if(!c)return null;var e=c.scrollSize,t=c.client,n=ra({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,height:t.paddingBox.height,width:t.paddingBox.width});return{pageMarginBox:c.page.marginBox,frameClient:t,scrollSize:e,shouldClipSubject:c.shouldClipSubject,scroll:{initial:c.scroll,current:c.scroll,max:n,diff:{value:eq,displacement:eq}}}}(),d="vertical"===s?tg:tv,p=e5({page:l,withPlaceholder:null,axis:d,frame:u});return{descriptor:t,isCombineEnabled:r,isFixedOnPage:o,axis:d,isEnabled:n,client:a,page:l,frame:u,subject:p}},iN=function(e,t){var n=eC(e);if(!t||e!==t)return n;var r=n.paddingBox.top-t.scrollTop,o=n.paddingBox.left-t.scrollLeft,s=r+t.scrollHeight,a=o+t.scrollWidth;return ex({borderBox:ev({top:r,right:a,bottom:s,left:o},n.border),margin:n.margin,border:n.border,padding:n.padding})},iR=function(e){var t=e.ref,n=e.descriptor,r=e.env,o=e.windowScroll,s=e.direction,a=e.isDropDisabled,l=e.isCombineEnabled,c=e.shouldClipSubject,u=r.closestScrollable,d=iN(t,u),p=ek(d,o),h=function(){if(!u)return null;var e=eC(u),t={scrollHeight:u.scrollHeight,scrollWidth:u.scrollWidth};return{client:e,page:ek(e,o),scroll:iP(u),scrollSize:t,shouldClipSubject:c}}();return iD({descriptor:n,isEnabled:!a,isCombineEnabled:l,isFixedOnPage:r.isFixedOnPage,direction:s,client:d,page:p,closest:h})},iL={passive:!1},ij={passive:!0},i$=function(e){return e.shouldPublishImmediately?iL:ij};function iF(e){var t=(0,A.useContext)(e);return t||e$(!1),t}var iz=function(e){return e&&e.env.closestScrollable||null};function iB(){}var iH={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}},iU=function(e){var t=e.isAnimatingOpenOnMount,n=e.placeholder,r=e.animate;return t||"close"===r?iH:{height:n.client.borderBox.height,width:n.client.borderBox.width,margin:n.client.margin}},iV=function(e){var t=e.isAnimatingOpenOnMount,n=e.placeholder,r=e.animate,o=iU({isAnimatingOpenOnMount:t,placeholder:n,animate:r});return{display:n.display,boxSizing:"border-box",width:o.width,height:o.height,marginTop:o.margin.top,marginRight:o.margin.right,marginBottom:o.margin.bottom,marginLeft:o.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:"none"!==r?nV.placeholder:null}},iq=A.memo(function(e){var t=(0,A.useRef)(null),n=ef(function(){if(!!t.current)clearTimeout(t.current),t.current=null},[]),r=e.animate,o=e.onTransitionEnd,s=e.onClose,a=e.contextId,l=(0,A.useState)("open"===e.animate),c=l[0],u=l[1];(0,A.useEffect)(function(){return c?"open"!==r?(n(),u(!1),iB):t.current?iB:(t.current=setTimeout(function(){t.current=null,u(!1)}),n):iB},[r,c,n]);var d=ef(function(e){if("height"===e.propertyName)o(),"close"===r&&s()},[r,s,o]),p=iV({isAnimatingOpenOnMount:c,animate:e.animate,placeholder:e.placeholder});return A.createElement(e.placeholder.tagName,{style:p,"data-rbd-placeholder-context-id":a,onTransitionEnd:d,ref:e.innerRef})}),iW=A.createContext(null);function iG(e){e&&r0(e)||e$(!1)}function iK(e){return"boolean"==typeof e}function iY(e,t){t.forEach(function(t){return t(e)})}var iZ=[function(e){var t=e.props;t.droppableId||e$(!1),"string"!=typeof t.droppableId&&e$(!1)},function(e){var t=e.props;iK(t.isDropDisabled)||e$(!1),iK(t.isCombineEnabled)||e$(!1),iK(t.ignoreContainerClipping)||e$(!1)},function(e){iG((0,e.getDroppableRef)())}],iJ=[function(e){var t=e.props,n=e.getPlaceholderRef;if(!t.placeholder||n())return}],iX=[function(e){e.props.renderClone||e$(!1)},function(e){(0,e.getPlaceholderRef)()&&e$(!1)}],iQ=function(e){function t(){for(var t,n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={isVisible:!!t.props.on,data:t.props.on,animate:t.props.shouldAnimate&&t.props.on?"open":"none"},t.onClose=function(){if("close"===t.state.animate)t.setState({isVisible:!1})},t}return(0,C.Z)(t,e),t.getDerivedStateFromProps=function(e,t){return e.shouldAnimate?e.on?{isVisible:!0,data:e.on,animate:"open"}:t.isVisible?{isVisible:!0,data:t.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!e.on,data:e.on,animate:"none"}},t.prototype.render=function(){if(!this.state.isVisible)return null;var e={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(e)},t}(A.PureComponent),i0={dragging:5e3,dropAnimating:4500};function i1(e){e.preventDefault()}var i2=function(e,t){return e===t},i3=function(e){var t=e.combine,n=e.destination;return n?n.droppableId:t?t.droppableId:null};function i5(e){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}var i4={mapped:{type:"SECONDARY",offset:eq,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:i5(null)}},i6=eu(function(){var e,t,n,r,o,s,a,l,c=(e=(0,eE.Z)(function(e,t){return{x:e,y:t}}),t=(0,eE.Z)(function(e,t,n,r,o){return{isDragging:!0,isClone:t,isDropAnimating:!!o,dropAnimation:o,mode:e,draggingOver:n,combineWith:r,combineTargetFor:null}}),n=(0,eE.Z)(function(e,n,r,o,s,a,l){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:s,combineWith:a,mode:n,offset:e,dimension:r,forceShouldAnimate:l,snapshot:t(n,o,s,a,null)}}}),function(r,o){if(r.isDragging){if(r.critical.draggable.id!==o.draggableId)return null;var s,a=r.current.client.offset,l=r.dimensions.draggables[o.draggableId],c=t5(r.impact);var u=(s=r.impact).at&&"COMBINE"===s.at.type?s.at.combine.draggableId:null,d=r.forceShouldAnimate;return n(e(a.x,a.y),r.movementMode,l,o.isClone,c,u,d)}if("DROP_ANIMATING"===r.phase){var p,h=r.completed;if(h.result.draggableId!==o.draggableId)return null;var f=o.isClone,m=r.dimensions.draggables[o.draggableId],g=h.result,v=g.mode,b=i3(g);var y=(p=g).combine?p.combine.draggableId:null,x={duration:r.dropDuration,curve:n$.drop,moveTo:r.newHomeClientOffset,opacity:y?nF.opacity.drop:null,scale:y?nF.scale.drop:null};return{mapped:{type:"DRAGGING",offset:r.newHomeClientOffset,dimension:m,dropping:x,draggingOver:b,combineWith:y,mode:v,forceShouldAnimate:null,snapshot:t(v,f,b,y,x)}}}return null});var u=(r=(0,eE.Z)(function(e,t){return{x:e,y:t}}),o=(0,eE.Z)(i5),s=(0,eE.Z)(function(e,t,n){return void 0===t&&(t=null),{mapped:{type:"SECONDARY",offset:e,combineTargetFor:t,shouldAnimateDisplacement:n,snapshot:o(t)}}}),a=function(e){return e?s(eq,e,!0):null},l=function(e,t,n,o){var l=n.displaced.visible[e],c=!!(o.inVirtualList&&o.effected[e]),u=ts(n),d=u&&u.draggableId===e?t:null;if(!l){if(!c)return a(d);if(n.displaced.invisible[e])return null;var p=eY(o.displacedBy.point);return s(r(p.x,p.y),d,!0)}if(c)return a(d);var h=n.displacedBy.point;return s(r(h.x,h.y),d,l.shouldAnimate)},function(e,t){if(e.isDragging)return e.critical.draggable.id===t.draggableId?null:l(t.draggableId,e.critical.draggable.id,e.impact,e.afterCritical);if("DROP_ANIMATING"===e.phase){var n=e.completed;return n.result.draggableId===t.draggableId?null:l(t.draggableId,n.result.draggableId,n.impact,n.afterCritical)}return null});return function(e,t){return c(e,t)||u(e,t)||i4}},{dropAnimationFinished:nj},null,{context:r3,pure:!0,areStatePropsEqual:i2})(function(e){var t,n,r,o,s,a,l,c,u,d,p,h,f,m,g,v,b,y=(0,A.useRef)(null),x=ef(function(e){y.current=e},[]),w=ef(function(){return y.current},[]),S=iF(r7),k=S.contextId,C=S.dragHandleUsageInstructionsId,E=S.registry,T=iF(iW),_=T.type,O=T.droppableId,M=eh(function(){return{id:e.draggableId,index:e.index,type:_,droppableId:O}},[e.draggableId,e.index,_,O]),I=e.children,P=e.draggableId,D=e.isEnabled,N=e.shouldRespectForcePress,R=e.canDragInteractiveElements,L=e.isClone,j=e.mapped,$=e.dropAnimationFinished;if(t=e,n=k,r=w,ia(function(){var e,o=t.draggableId;if(o||e$(!1),"string"!=typeof o&&e$(!1),e=t.index,(Number.isInteger?Number.isInteger(e):"number"==typeof e&&isFinite(e)&&Math.floor(e)===e)||e$(!1),"DRAGGING"!==t.mapped.type)iG(r()),t.isEnabled&&(r1(n,o)||e$(!1))}),o=L,is(function(){var e=(0,A.useRef)(o);ia(function(){o!==e.current&&e$(!1)},[o])}),!L){;s=eh(function(){return{descriptor:M,registry:E,getDraggableRef:w,canDragInteractiveElements:R,shouldRespectForcePress:N,isEnabled:D}},[M,E,w,R,N,D]),a=r9("draggable"),l=s.descriptor,c=s.registry,u=s.getDraggableRef,d=s.canDragInteractiveElements,p=s.shouldRespectForcePress,f=eh(function(){return{canDragInteractiveElements:d,shouldRespectForcePress:p,isEnabled:h}},[d,h=s.isEnabled,p]),m=ef(function(e){var t,n,r,o,s,a,c,d=u();return d||e$(!1),t=l,n=d,void 0===(r=e)&&(r=eq),o=window.getComputedStyle(n),a=ek(s=eA(n.getBoundingClientRect(),o),r),c={client:s,tagName:n.tagName.toLowerCase(),display:o.display},{descriptor:t,placeholder:c,displaceBy:{x:s.marginBox.width,y:s.marginBox.height},client:s,page:a}},[l,u]),g=eh(function(){return{uniqueId:a,descriptor:l,options:f,getDimension:m}},[l,m,f,a]),v=(0,A.useRef)(g),b=(0,A.useRef)(!0),rZ(function(){return c.draggable.register(v.current),function(){return c.draggable.unregister(v.current)}},[c.draggable]),rZ(function(){if(b.current){b.current=!1;return}var e=v.current;v.current=g,c.draggable.update(g,e)},[g,c.draggable])}var F=eh(function(){return D?{tabIndex:0,role:"button","aria-describedby":C,"data-rbd-drag-handle-draggable-id":P,"data-rbd-drag-handle-context-id":k,draggable:!1,onDragStart:i1}:null},[k,C,P,D]),z=ef(function(e){if("DRAGGING"===j.type&&!!j.dropping&&"transform"===e.propertyName)$()},[$,j]),B=eh(function(){var e,t,n,r,o,s,a,l,c,u,d,p,h,f,m,g,v="DRAGGING"===(e=j).type?(n=(t=e).dimension.client,r=t.offset,o=t.combineWith,s=t.dropping,a=!!o,c=null!=(l=t).forceShouldAnimate?l.forceShouldAnimate:"SNAP"===l.mode,d=(u=!!s)?nW.drop(r,a):nW.moveTo(r),{position:"fixed",top:n.marginBox.top,left:n.marginBox.left,boxSizing:"border-box",width:n.borderBox.width,height:n.borderBox.height,transition:(p=c,(h=s)?nV.drop(h.duration):p?nV.snap:nV.fluid),transform:d,opacity:(f=a,m=u,f?m?nF.opacity.drop:nF.opacity.combining:null),zIndex:u?i0.dropAnimating:i0.dragging,pointerEvents:"none"}):(g=e,{transform:nW.moveTo(g.offset),transition:g.shouldAnimateDisplacement?null:"none"}),b="DRAGGING"===j.type&&j.dropping?z:null;return{innerRef:x,draggableProps:{"data-rbd-draggable-context-id":k,"data-rbd-draggable-id":P,style:v,onTransitionEnd:b},dragHandleProps:F}},[k,F,P,j,z,x]),H=eh(function(){return{draggableId:M.id,type:M.type,source:{index:M.index,droppableId:M.droppableId}}},[M.droppableId,M.id,M.index,M.type]);return I(B,j.snapshot,H)});function i8(e){return iF(iW).isUsingCloneFor!==e.draggableId||e.isClone?A.createElement(i6,e):null}function i9(e){var t="boolean"!=typeof e.isDragDisabled||!e.isDragDisabled,n=!!e.disableInteractiveElementBlocking,r=!!e.shouldRespectForcePress;return A.createElement(i8,(0,E.Z)({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}var i7=function(e,t){return e===t.droppable.type},oe=function(e,t){return t.draggables[e.draggable.id]},ot=eu(function(){var e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t=(0,E.Z)({},e,{shouldAnimatePlaceholder:!1}),n=(0,eE.Z)(function(e){return{draggableId:e.id,type:e.type,source:{index:e.index,droppableId:e.droppableId}}}),r=(0,eE.Z)(function(r,o,s,a,l,c){var u=l.descriptor.id;if(l.descriptor.droppableId===r){var d=c?{render:c,dragging:n(l.descriptor)}:null;return{placeholder:l.placeholder,shouldAnimatePlaceholder:!1,snapshot:{isDraggingOver:s,draggingOverWith:s?u:null,draggingFromThisWith:u,isUsingPlaceholder:!0},useClone:d}}return o?a?{placeholder:l.placeholder,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:s,draggingOverWith:u,draggingFromThisWith:null,isUsingPlaceholder:!0},useClone:null}:e:t});return function(n,o){var s=o.droppableId,a=o.type,l=!o.isDropDisabled,c=o.renderClone;if(n.isDragging){var u=n.critical;if(!i7(a,u))return t;var d=oe(u,n.dimensions),p=t5(n.impact)===s;return r(s,l,p,p,d,c)}if("DROP_ANIMATING"===n.phase){var h=n.completed;if(!i7(a,h.critical))return t;var f=oe(h.critical,n.dimensions);return r(s,l,i3(h.result)===s,t5(h.impact)===s,f,c)}if("IDLE"===n.phase&&n.completed&&!n.shouldFlush){var m=n.completed;if(!i7(a,m.critical))return t;var g=t5(m.impact)===s,v=!!(m.impact.at&&"COMBINE"===m.impact.at.type),b=m.critical.droppable.id===s;if(g)return v?e:t;if(b)return e}return t}},{updateViewportMaxScroll:function(e){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e}}},null,{context:r3,pure:!0,areStatePropsEqual:i2})(function(e){var t,n,r,o,s,a,l,c,u,d,p,h,f,m,g,v,b,y,x,w,S,k=(0,A.useContext)(r7);k||e$(!1);var C=k.contextId,E=k.isMovementAllowed,T=(0,A.useRef)(null),_=(0,A.useRef)(null),O=e.children,M=e.droppableId,I=e.type,P=e.mode,D=e.direction,N=e.ignoreContainerClipping,R=e.isDropDisabled,L=e.isCombineEnabled,j=e.snapshot,$=e.useClone,F=e.updateViewportMaxScroll,z=e.getContainerForClone,B=ef(function(){return T.current},[]),H=ef(function(e){T.current=e},[]),U=ef(function(){return _.current},[]),V=ef(function(e){_.current=e},[]);t={props:e,getDroppableRef:B,getPlaceholderRef:U},ia(function(){iY(t,iZ),"standard"===t.props.mode&&iY(t,iJ),"virtual"===t.props.mode&&iY(t,iX)});var q=ef(function(){E()&&F({maxScroll:rc()})},[E,F]);n={droppableId:M,type:I,mode:P,direction:D,isDropDisabled:R,isCombineEnabled:L,ignoreContainerClipping:N,getDroppableRef:B},r=(0,A.useRef)(null),o=iF(r7),s=r9("droppable"),a=o.registry,l=o.marshal,c=il(n),u=eh(function(){return{id:n.droppableId,type:n.type,mode:n.mode}},[n.droppableId,n.mode,n.type]),d=(0,A.useRef)(u),p=eh(function(){return(0,eE.Z)(function(e,t){r.current||e$(!1);l.updateDroppableScroll(u.id,{x:e,y:t})})},[u.id,l]),h=ef(function(){var e=r.current;return e&&e.env.closestScrollable?iP(e.env.closestScrollable):eq},[]),m=eh(function(){return eT(f)},[f=ef(function(){var e=h();p(e.x,e.y)},[h,p])]),g=ef(function(){var e=r.current,t=iz(e);if(e&&t||e$(!1),e.scrollOptions.shouldPublishImmediately){f();return}m()},[m,f]),v=ef(function(e,t){r.current&&e$(!1);var n,s=c.current,a=s.getDroppableRef();a||e$(!1);var l={closestScrollable:function e(t){return null==t?null:t===document.body?null:t===document.documentElement?null:iI(t)?t:e(t.parentElement)}(n=a),isFixedOnPage:function e(t){return!!t&&("fixed"===window.getComputedStyle(t).position||e(t.parentElement))}(n)},d={ref:a,descriptor:u,env:l,scrollOptions:t};r.current=d;var p=iR({ref:a,descriptor:u,env:l,windowScroll:e,direction:s.direction,isDropDisabled:s.isDropDisabled,isCombineEnabled:s.isCombineEnabled,shouldClipSubject:!s.ignoreContainerClipping}),h=l.closestScrollable;return h&&(h.setAttribute(rG.contextId,o.contextId),h.addEventListener("scroll",g,i$(d.scrollOptions))),p},[o.contextId,u,g,c]),b=ef(function(){var e=r.current,t=iz(e);return e&&t||e$(!1),iP(t)},[]),y=ef(function(){var e=r.current;e||e$(!1);var t=iz(e);if(r.current=null,!!t)m.cancel(),t.removeAttribute(rG.contextId),t.removeEventListener("scroll",g,i$(e.scrollOptions))},[g,m]),w=eh(function(){return{getDimensionAndWatchScroll:v,getScrollWhileDragging:b,dragStopped:y,scroll:x}},[y,v,b,x=ef(function(e){var t=r.current;t||e$(!1);var n=iz(t);n||e$(!1),n.scrollTop+=e.y,n.scrollLeft+=e.x},[])]),S=eh(function(){return{uniqueId:s,descriptor:u,callbacks:w}},[w,u,s]),rZ(function(){return d.current=S.descriptor,a.droppable.register(S),function(){r.current&&y(),a.droppable.unregister(S)}},[w,u,y,S,l,a.droppable]),rZ(function(){if(!!r.current)l.updateDroppableIsEnabled(d.current.id,!n.isDropDisabled)},[n.isDropDisabled,l]),rZ(function(){if(!!r.current)l.updateDroppableIsCombineEnabled(d.current.id,n.isCombineEnabled)},[n.isCombineEnabled,l]);var W=A.createElement(iQ,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},function(e){var t=e.onClose,n=e.data,r=e.animate;return A.createElement(iq,{placeholder:n,onClose:t,innerRef:V,animate:r,contextId:C,onTransitionEnd:q})}),G=eh(function(){return{innerRef:H,placeholder:W,droppableProps:{"data-rbd-droppable-id":M,"data-rbd-droppable-context-id":C}}},[C,M,W,H]),K=$?$.dragging.draggableId:null,Y=eh(function(){return{droppableId:M,type:I,isUsingCloneFor:K}},[M,K,I]);return A.createElement(iW.Provider,{value:Y},O(G,j),function(){if(!$)return null;var e=$.dragging,t=$.render,n=A.createElement(i8,{draggableId:e.draggableId,index:e.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},function(n,r){return t(n,r,e)});return ep.createPortal(n,z())}())});ot.defaultProps={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:function(){return document.body||e$(!1),document.body}}},538059:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(455069);function o(e,t,n){var r;return(t="symbol"==typeof(r=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"))?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}var a=["children","onClickAway","focusEvent","mouseEvent","touchEvent"],l={click:"onClick",focusin:"onFocus",focusout:"onBlur",mousedown:"onMouseDown",mouseup:"onMouseUp",touchstart:"onTouchStart",touchend:"onTouchEnd"},c=parseInt(r.version.split(".")[0],10),u=function(e){var t=e.children,n=e.onClickAway,u=e.focusEvent,d=void 0===u?"focusin":u,p=e.mouseEvent,h=void 0===p?"click":p,f=e.touchEvent,m=void 0===f?"touchend":f,g=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.includes(n)||({}).propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,a),v=(0,r.useRef)(null),b=(0,r.useRef)(null),y=(0,r.useRef)(!1);(0,r.useEffect)(function(){return setTimeout(function(){y.current=!0},0),function(){y.current=!1}},[]);var x,w=function(e){return function(n){b.current=n.target;var r=null==t?void 0:t.props[e];r&&r(n)}},S=null;c>=19?S=(null===(x=t.props)||void 0===x?void 0:x.ref)||null:"ref"in t&&(S=t.ref);var k,A=(k=[v,S],function(e){k.forEach(function(t){"function"==typeof t?t(e):null!=t&&(t.current=e)})});(0,r.useEffect)(function(){var e,t,r=null!==(e=null===(t=v.current)||void 0===t?void 0:t.ownerDocument)&&void 0!==e?e:document,o=function(e){y.current&&(v.current&&v.current.contains(e.target)||b.current===e.target||!r.contains(e.target)||n(e))};return r.addEventListener(h,o),r.addEventListener(m,o),r.addEventListener(d,o),function(){r.removeEventListener(h,o),r.removeEventListener(m,o),r.removeEventListener(d,o)}},[d,h,n,m]);var C=l[h],E=l[m],T=l[d];return r.Children.only((0,r.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach(function(t){o(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}(o(o(o({ref:A},T,w(T)),C,w(C)),E,w(E)),g)))};u.displayName="ClickAwayListener"},788981:function(e,t){"use strict";var n,r=60103,o=60106,s=60107,a=60108,l=60114,c=60109,u=60110,d=60112,p=60113,h=60120,f=60115,m=60116,g=60121,v=60122,b=60117,y=60129,x=60131;if("function"==typeof Symbol&&Symbol.for){var w=Symbol.for;r=w("react.element"),o=w("react.portal"),s=w("react.fragment"),a=w("react.strict_mode"),l=w("react.profiler"),c=w("react.provider"),u=w("react.context"),d=w("react.forward_ref"),p=w("react.suspense"),h=w("react.suspense_list"),f=w("react.memo"),m=w("react.lazy"),g=w("react.block"),v=w("react.server.block"),b=w("react.fundamental"),y=w("react.debug_trace_mode"),x=w("react.legacy_hidden")}function S(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case s:case l:case a:case p:case h:return e;default:switch(e=e&&e.$$typeof){case u:case d:case m:case f:case c:return e;default:return t}}case o:return t}}}var k=c,A=r,C=d,E=s,T=m,_=f,O=o,M=l,I=a,P=p;t.isContextConsumer=function(e){return S(e)===u}},920588:function(e,t,n){"use strict";e.exports=n(788981)},818301:function(e,t){"use strict";var n,r=Symbol.for("react.transitional.element"),o=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler");Symbol.for("react.provider");var c=Symbol.for("react.consumer"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.for("react.view_transition"),v=Symbol.for("react.client.reference");function b(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case s:case l:case a:case p:case h:case g:return e;default:switch(e=e&&e.$$typeof){case u:case d:case m:case f:case c:return e;default:return t}}case o:return t}}}t.ForwardRef=d;t.Memo=f},917855:function(e,t){var n;n=0,function(e){"use strict";function t(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!(t.length>1))return t[0];t[0]=t[0].slice(0,-1);for(var r=t.length-1,o=1;o<r;++o)t[o]=t[o].slice(1,-1);return t[r]=t[r].slice(1),t.join("")}function n(e){return"(?:"+e+")"}function r(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function s(e){var r="[A-Za-z]",o="[0-9]",s=t(o,"[A-Fa-f]"),a=n(n("%[EFef]"+s+"%"+s+s+"%"+s+s)+"|"+n("%[89A-Fa-f]"+s+"%"+s+s)+"|"+n("%"+s+s)),l="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",c=t("[\\:\\/\\?\\#\\[\\]\\@]",l),u=e?"[\\uE000-\\uF8FF]":"[]",d=t(r,o,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]"),p=n(r+t(r,o,"[\\+\\-\\.]")+"*"),h=n(n(a+"|"+t(d,l,"[\\:]"))+"*"),f=(n(n("25[0-5]")+"|"+n("2[0-4]"+o)+"|"+n("1"+o+o)+"|"+n("[1-9]"+o)+"|"+o),n(n("25[0-5]")+"|"+n("2[0-4]"+o)+"|"+n("1"+o+o)+"|"+n("0?[1-9]"+o)+"|0?0?"+o)),m=n(f+"\\."+f+"\\."+f+"\\."+f),g=n(s+"{1,4}"),v=n(n(g+"\\:"+g)+"|"+m),b=n(n(g+"\\:")+"{6}"+v),y=n("\\:\\:"+n(g+"\\:")+"{5}"+v),x=n(n(g)+"?\\:\\:"+n(g+"\\:")+"{4}"+v),w=n(n(n(g+"\\:")+"{0,1}"+g)+"?\\:\\:"+n(g+"\\:")+"{3}"+v),S=n(n(n(g+"\\:")+"{0,2}"+g)+"?\\:\\:"+n(g+"\\:")+"{2}"+v),k=n(n(n(g+"\\:")+"{0,3}"+g)+"?\\:\\:"+g+"\\:"+v),A=n(n(n(g+"\\:")+"{0,4}"+g)+"?\\:\\:"+v),C=n(n(n(g+"\\:")+"{0,5}"+g)+"?\\:\\:"+g),E=n(n(n(g+"\\:")+"{0,6}"+g)+"?\\:\\:"),T=n([b,y,x,w,S,k,A,C,E].join("|")),_=n(n(d+"|"+a)+"+"),O=(n(T+"\\%25"+_),n(T+n("\\%25|\\%(?!"+s+"{2})")+_)),M=n("[vV]"+s+"+\\."+t(d,l,"[\\:]")+"+"),I=n("\\["+n(O+"|"+T+"|"+M)+"\\]"),P=n(n(a+"|"+t(d,l))+"*"),D=n(I+"|"+m+"(?!"+P+")|"+P),N=n(o+"*"),R=n(n(h+"@")+"?"+D+n("\\:"+N)+"?"),L=n(a+"|"+t(d,l,"[\\:\\@]")),j=n(L+"*"),$=n(L+"+"),F=n(n(a+"|"+t(d,l,"[\\@]"))+"+"),z=n(n("\\/"+j)+"*"),B=n("\\/"+n($+z)+"?"),H=n(F+z),U=n($+z),V="(?!"+L+")",q=(n(z+"|"+B+"|"+H+"|"+U+"|"+V),n(n(L+"|"+t("[\\/\\?]",u))+"*")),W=n(n(L+"|[\\/\\?]")+"*"),G=n(n("\\/\\/"+R+z)+"|"+B+"|"+U+"|"+V),K=n(p+"\\:"+G+n("\\?"+q)+"?"+n("\\#"+W)+"?"),Y=n(n("\\/\\/"+R+z)+"|"+B+"|"+H+"|"+V),Z=n(Y+n("\\?"+q)+"?"+n("\\#"+W)+"?");return n(K+"|"+Z),n(p+"\\:"+G+n("\\?"+q)+"?"),n(n("\\/\\/("+n("("+h+")@")+"?("+D+")"+n("\\:("+N+")")+"?)")+"?("+z+"|"+B+"|"+U+"|"+V+")"),n("\\?("+q+")"),n("\\#("+W+")"),n(n("\\/\\/("+n("("+h+")@")+"?("+D+")"+n("\\:("+N+")")+"?)")+"?("+z+"|"+B+"|"+H+"|"+V+")"),n("\\?("+q+")"),n("\\#("+W+")"),n(n("\\/\\/("+n("("+h+")@")+"?("+D+")"+n("\\:("+N+")")+"?)")+"?("+z+"|"+B+"|"+U+"|"+V+")"),n("\\?("+q+")"),n("\\#("+W+")"),n("("+h+")@"),n("\\:("+N+")"),{NOT_SCHEME:RegExp(t("[^]",r,o,"[\\+\\-\\.]"),"g"),NOT_USERINFO:RegExp(t("[^\\%\\:]",d,l),"g"),NOT_HOST:RegExp(t("[^\\%\\[\\]\\:]",d,l),"g"),NOT_PATH:RegExp(t("[^\\%\\/\\:\\@]",d,l),"g"),NOT_PATH_NOSCHEME:RegExp(t("[^\\%\\/\\@]",d,l),"g"),NOT_QUERY:RegExp(t("[^\\%]",d,l,"[\\:\\@\\/\\?]",u),"g"),NOT_FRAGMENT:RegExp(t("[^\\%]",d,l,"[\\:\\@\\/\\?]"),"g"),ESCAPE:RegExp(t("[^]",d,l),"g"),UNRESERVED:RegExp(d,"g"),OTHER_CHARS:RegExp(t("[^\\%]",d,c),"g"),PCT_ENCODED:RegExp(a,"g"),IPV4ADDRESS:RegExp("^("+m+")$"),IPV6ADDRESS:RegExp("^\\[?("+T+")"+n(n("\\%25|\\%(?!"+s+"{2})")+"("+_+")")+"?\\]?$")}}var a=s(!1),l=s(!0),c=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,s=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,s=e}finally{try{!r&&l.return&&l.return()}finally{if(o)throw s}}return n}(e,t);throw TypeError("Invalid attempt to destructure non-iterable instance")},u=function(e){if(!Array.isArray(e))return Array.from(e);for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n},d=/^xn--/,p=/[^\0-\x7E]/,h=/[\x2E\u3002\uFF0E\uFF61]/g,f={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=35,g=Math.floor,v=String.fromCharCode;function b(e){throw RangeError(f[e])}function y(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+(function(e,t){for(var n=[],r=e.length;r--;)n[r]=t(e[r]);return n})((e=e.replace(h,".")).split("."),t).join(".")}function x(e){for(var t=[],n=0,r=e.length;n<r;){var o=e.charCodeAt(n++);if(o>=55296&&o<=56319&&n<r){var s=e.charCodeAt(n++);(64512&s)==56320?t.push(((1023&o)<<10)+(1023&s)+65536):(t.push(o),n--)}else t.push(o)}return t}var w=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},S=function(e,t,n){var r=0;for(e=n?g(e/700):e>>1,e+=g(e/t);e>26*m>>1;r+=36)e=g(e/m);return g(r+(m+1)*e/(e+38))},k=function(e){var t=[],n=e.length,r=0,o=128,s=72,a=e.lastIndexOf("-");a<0&&(a=0);for(var l=0;l<a;++l)e.charCodeAt(l)>=128&&b("not-basic"),t.push(e.charCodeAt(l));for(var c=a>0?a+1:0;c<n;){for(var u=r,d=1,p=36;;p+=36){c>=n&&b("invalid-input");var h,f=(h=e.charCodeAt(c++))-48<10?h-22:h-65<26?h-65:h-97<26?h-97:36;(f>=36||f>g((0x7fffffff-r)/d))&&b("overflow"),r+=f*d;var m=p<=s?1:p>=s+26?26:p-s;if(f<m)break;var v=36-m;d>g(0x7fffffff/v)&&b("overflow"),d*=v}var y=t.length+1;s=S(r-u,y,0==u),g(r/y)>0x7fffffff-o&&b("overflow"),o+=g(r/y),r%=y,t.splice(r++,0,o)}return String.fromCodePoint.apply(String,t)},A=function(e){var t=[],n=(e=x(e)).length,r=128,o=0,s=72,a=!0,l=!1,c=void 0;try{for(var u,d=e[Symbol.iterator]();!(a=(u=d.next()).done);a=!0){var p=u.value;p<128&&t.push(v(p))}}catch(e){l=!0,c=e}finally{try{!a&&d.return&&d.return()}finally{if(l)throw c}}var h=t.length,f=h;for(h&&t.push("-");f<n;){var m=0x7fffffff,y=!0,k=!1,A=void 0;try{for(var C,E=e[Symbol.iterator]();!(y=(C=E.next()).done);y=!0){var T=C.value;T>=r&&T<m&&(m=T)}}catch(e){k=!0,A=e}finally{try{!y&&E.return&&E.return()}finally{if(k)throw A}}var _=f+1;m-r>g((0x7fffffff-o)/_)&&b("overflow"),o+=(m-r)*_,r=m;var O=!0,M=!1,I=void 0;try{for(var P,D=e[Symbol.iterator]();!(O=(P=D.next()).done);O=!0){var N=P.value;if(N<r&&++o>0x7fffffff&&b("overflow"),N==r){for(var R=o,L=36;;L+=36){var j=L<=s?1:L>=s+26?26:L-s;if(R<j)break;var $=R-j,F=36-j;t.push(v(w(j+$%F,0))),R=g($/F)}t.push(v(w(R,0))),s=S(o,_,f==h),o=0,++f}}}catch(e){M=!0,I=e}finally{try{!O&&D.return&&D.return()}finally{if(M)throw I}}++o,++r}return t.join("")},C={toASCII:function(e){return y(e,function(e){return p.test(e)?"xn--"+A(e):e})},toUnicode:function(e){return y(e,function(e){return d.test(e)?k(e.slice(4).toLowerCase()):e})}},E={};function T(e){var t=e.charCodeAt(0),n=void 0;return n=t<16?"%0"+t.toString(16).toUpperCase():t<128?"%"+t.toString(16).toUpperCase():t<2048?"%"+(t>>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function _(e){for(var t="",n=0,r=e.length;n<r;){var o=parseInt(e.substr(n+1,2),16);o<128?(t+=String.fromCharCode(o),n+=3):o>=194&&o<224?(r-n>=6?t+=String.fromCharCode((31&o)<<6|63&parseInt(e.substr(n+4,2),16)):t+=e.substr(n,6),n+=6):o>=224?(r-n>=9?t+=String.fromCharCode((15&o)<<12|(63&parseInt(e.substr(n+4,2),16))<<6|63&parseInt(e.substr(n+7,2),16)):t+=e.substr(n,9),n+=9):(t+=e.substr(n,3),n+=3)}return t}function O(e,t){function n(e){var n=_(e);return n.match(t.UNRESERVED)?n:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,n).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,n).replace(t.NOT_USERINFO,T).replace(t.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,n).toLowerCase().replace(t.NOT_HOST,T).replace(t.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,n).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,T).replace(t.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,n).replace(t.NOT_QUERY,T).replace(t.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,n).replace(t.NOT_FRAGMENT,T).replace(t.PCT_ENCODED,o)),e}function M(e){return e.replace(/^0*(.*)/,"$1")||"0"}function I(e,t){var n=c(e.match(t.IPV4ADDRESS)||[],2)[1];return n?n.split(".").map(M).join("."):e}function P(e,t){var n=c(e.match(t.IPV6ADDRESS)||[],3),r=n[1],o=n[2];if(!r)return e;for(var s=c(r.toLowerCase().split("::").reverse(),2),a=s[0],l=s[1],u=l?l.split(":").map(M):[],d=a.split(":").map(M),p=t.IPV4ADDRESS.test(d[d.length-1]),h=p?7:8,f=d.length-h,m=Array(h),g=0;g<h;++g)m[g]=u[g]||d[f+g]||"";p&&(m[h-1]=I(m[h-1],t));var v=m.reduce(function(e,t,n){if(!t||"0"===t){var r=e[e.length-1];r&&r.index+r.length===n?r.length++:e.push({index:n,length:1})}return e},[]).sort(function(e,t){return t.length-e.length})[0],b=void 0;if(v&&v.length>1){var y=m.slice(0,v.index),x=m.slice(v.index+v.length);b=y.join(":")+"::"+x.join(":")}else b=m.join(":");return o&&(b+="%"+o),b}var D=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,N=void 0==="".match(/(){0}/)[1];function R(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={},r=!1!==t.iri?l:a;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var o=e.match(D);if(o){N?(n.scheme=o[1],n.userinfo=o[3],n.host=o[4],n.port=parseInt(o[5],10),n.path=o[6]||"",n.query=o[7],n.fragment=o[8],isNaN(n.port)&&(n.port=o[5])):(n.scheme=o[1]||void 0,n.userinfo=-1!==e.indexOf("@")?o[3]:void 0,n.host=-1!==e.indexOf("//")?o[4]:void 0,n.port=parseInt(o[5],10),n.path=o[6]||"",n.query=-1!==e.indexOf("?")?o[7]:void 0,n.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(n.port)&&(n.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),n.host&&(n.host=P(I(n.host,r),r)),void 0!==n.scheme||void 0!==n.userinfo||void 0!==n.host||void 0!==n.port||n.path||void 0!==n.query?void 0===n.scheme?n.reference="relative":void 0===n.fragment?n.reference="absolute":n.reference="uri":n.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==n.reference&&(n.error=n.error||"URI is not a "+t.reference+" reference.");var s=E[(t.scheme||n.scheme||"").toLowerCase()];if(t.unicodeSupport||s&&s.unicodeSupport)O(n,r);else{if(n.host&&(t.domainHost||s&&s.domainHost))try{n.host=C.toASCII(n.host.replace(r.PCT_ENCODED,_).toLowerCase())}catch(e){n.error=n.error||"Host's domain name can not be converted to ASCII via punycode: "+e}O(n,a)}s&&s.parse&&s.parse(n,t)}else n.error=n.error||"URI can not be parsed.";return n}var L=/^\.\.?\//,j=/^\/\.(\/|$)/,$=/^\/\.\.(\/|$)/,F=/^\/?(?:.|\n)*?(?=\/|$)/;function z(e){for(var t=[];e.length;)if(e.match(L))e=e.replace(L,"");else if(e.match(j))e=e.replace(j,"/");else if(e.match($))e=e.replace($,"/"),t.pop();else if("."===e||".."===e)e="";else{var n=e.match(F);if(n){var r=n[0];e=e.slice(r.length),t.push(r)}else throw Error("Unexpected dot segment condition")}return t.join("")}function B(e){var t,n,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=o.iri?l:a,c=[],u=E[(o.scheme||e.scheme||"").toLowerCase()];if(u&&u.serialize&&u.serialize(e,o),e.host){if(s.IPV6ADDRESS.test(e.host));else if(o.domainHost||u&&u.domainHost)try{e.host=o.iri?C.toUnicode(e.host):C.toASCII(e.host.replace(s.PCT_ENCODED,_).toLowerCase())}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(o.iri?"Unicode":"ASCII")+" via punycode: "+t}}O(e,s),"suffix"!==o.reference&&e.scheme&&(c.push(e.scheme),c.push(":"));var d=(t=e,n=!1!==o.iri?l:a,r=[],void 0!==t.userinfo&&(r.push(t.userinfo),r.push("@")),void 0!==t.host&&r.push(P(I(String(t.host),n),n).replace(n.IPV6ADDRESS,function(e,t,n){return"["+t+(n?"%25"+n:"")+"]"})),("number"==typeof t.port||"string"==typeof t.port)&&(r.push(":"),r.push(String(t.port))),r.length?r.join(""):void 0);if(void 0!==d&&("suffix"!==o.reference&&c.push("//"),c.push(d),e.path&&"/"!==e.path.charAt(0)&&c.push("/")),void 0!==e.path){var p=e.path;!o.absolutePath&&(!u||!u.absolutePath)&&(p=z(p)),void 0===d&&(p=p.replace(/^\/\//,"/%2F")),c.push(p)}return void 0!==e.query&&(c.push("?"),c.push(e.query)),void 0!==e.fragment&&(c.push("#"),c.push(e.fragment)),c.join("")}function H(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments[3],o={};return!r&&(e=R(B(e,n),n),t=R(B(t,n),n)),!(n=n||{}).tolerant&&t.scheme?(o.scheme=t.scheme,o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=z(t.path||""),o.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=z(t.path||""),o.query=t.query):(t.path?("/"===t.path.charAt(0)?o.path=z(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:o.path=t.path:o.path="/"+t.path,o.path=z(o.path)),o.query=t.query):(o.path=e.path,void 0!==t.query?o.query=t.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=t.fragment,o}function U(e,t){return e&&e.toString().replace(t&&t.iri?l.PCT_ENCODED:a.PCT_ENCODED,_)}var V={scheme:"http",domainHost:!0,parse:function(e,t){return!e.host&&(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){var n="https"===String(e.scheme).toLowerCase();return(e.port===(n?443:80)||""===e.port)&&(e.port=void 0),!e.path&&(e.path="/"),e}},q={scheme:"https",domainHost:V.domainHost,parse:V.parse,serialize:V.serialize};function W(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var G={scheme:"ws",domainHost:!0,parse:function(e,t){return e.secure=W(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e},serialize:function(e,t){if((e.port===(W(e)?443:80)||""===e.port)&&(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var n=c(e.resourceName.split("?"),2),r=n[0],o=n[1];e.path=r&&"/"!==r?r:void 0,e.query=o,e.resourceName=void 0}return e.fragment=void 0,e}},K={scheme:"wss",domainHost:G.domainHost,parse:G.parse,serialize:G.serialize},Y={},Z="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",J="[0-9A-Fa-f]",X=n(n("%[EFef]"+J+"%"+J+J+"%"+J+J)+"|"+n("%[89A-Fa-f]"+J+"%"+J+J)+"|"+n("%"+J+J)),Q=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),ee=RegExp(Z,"g"),et=RegExp(X,"g"),en=RegExp(t("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',Q),"g"),er=RegExp(t("[^]",Z,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g");function ei(e){var t=_(e);return t.match(ee)?t:e}var eo={scheme:"mailto",parse:function(e,t){var n=e.to=e.path?e.path.split(","):[];if(e.path=void 0,e.query){for(var r=!1,o={},s=e.query.split("&"),a=0,l=s.length;a<l;++a){var c=s[a].split("=");switch(c[0]){case"to":for(var u=c[1].split(","),d=0,p=u.length;d<p;++d)n.push(u[d]);break;case"subject":e.subject=U(c[1],t);break;case"body":e.body=U(c[1],t);break;default:r=!0,o[U(c[0],t)]=U(c[1],t)}}r&&(e.headers=o)}e.query=void 0;for(var h=0,f=n.length;h<f;++h){var m=n[h].split("@");if(m[0]=U(m[0]),t.unicodeSupport)m[1]=U(m[1],t).toLowerCase();else try{m[1]=C.toASCII(U(m[1],t).toLowerCase())}catch(t){e.error=e.error||"Email address's domain name can not be converted to ASCII via punycode: "+t}n[h]=m.join("@")}return e},serialize:function(e,t){var n,r=null!=(n=e.to)?n instanceof Array?n:"number"!=typeof n.length||n.split||n.setInterval||n.call?[n]:Array.prototype.slice.call(n):[];if(r){for(var s=0,a=r.length;s<a;++s){var l=String(r[s]),c=l.lastIndexOf("@"),u=l.slice(0,c).replace(et,ei).replace(et,o).replace(en,T),d=l.slice(c+1);try{d=t.iri?C.toUnicode(d):C.toASCII(U(d,t).toLowerCase())}catch(n){e.error=e.error||"Email address's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+n}r[s]=u+"@"+d}e.path=r.join(",")}var p=e.headers=e.headers||{};e.subject&&(p.subject=e.subject),e.body&&(p.body=e.body);var h=[];for(var f in p)p[f]!==Y[f]&&h.push(f.replace(et,ei).replace(et,o).replace(er,T)+"="+p[f].replace(et,ei).replace(et,o).replace(er,T));return h.length&&(e.query=h.join("&")),e}},es=/^([^\:]+)\:(.*)/,ea={scheme:"urn",parse:function(e,t){var n=e.path&&e.path.match(es),r=e;if(n){var o=t.scheme||r.scheme||"urn",s=n[1].toLowerCase(),a=n[2],l=E[o+":"+(t.nid||s)];r.nid=s,r.nss=a,r.path=void 0,l&&(r=l.parse(r,t))}else r.error=r.error||"URN can not be parsed.";return r},serialize:function(e,t){var n=t.scheme||e.scheme||"urn",r=e.nid,o=E[n+":"+(t.nid||r)];o&&(e=o.serialize(e,t));var s=e,a=e.nss;return s.path=(r||t.nid)+":"+a,s}},el=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,ec={scheme:"urn:uuid",parse:function(e,t){return e.uuid=e.nss,e.nss=void 0,!t.tolerant&&(!e.uuid||!e.uuid.match(el))&&(e.error=e.error||"UUID is not valid."),e},serialize:function(e,t){return e.nss=(e.uuid||"").toLowerCase(),e}};E[V.scheme]=V,E[q.scheme]=q,E[G.scheme]=G,E[K.scheme]=K,E[eo.scheme]=eo,E[ea.scheme]=ea,E[ec.scheme]=ec,e.SCHEMES=E,e.pctEncChar=T,e.pctDecChars=_,e.parse=R,e.removeDotSegments=z,e.serialize=B,e.resolveComponents=H,e.resolve=function(e,t,n){var r=function(e,t){if(t)for(var n in t)e[n]=t[n];return e}({scheme:"null"},n);return B(H(R(e,r),R(t,r),r,!0),r)},e.normalize=function(e,t){return"string"==typeof e?e=B(R(e,t),t):"object"===r(e)&&(e=R(B(e,t),t)),e},e.equal=function(e,t,n){return"string"==typeof e?e=B(R(e,n),n):"object"===r(e)&&(e=B(e,n)),"string"==typeof t?t=B(R(t,n),n):"object"===r(t)&&(t=B(t,n)),e===t},e.escapeComponent=function(e,t){return e&&e.toString().replace(t&&t.iri?l.ESCAPE:a.ESCAPE,T)},e.unescapeComponent=U,Object.defineProperty(e,"__esModule",{value:!0})}(t)},675210:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(455069);function o(e,t,n){if(!e[t])return"contentBoxSize"===t?e.contentRect["inlineSize"===n?"width":"height"]:void 0;return e[t][0]?e[t][0][n]:e[t][n]}function s(e){void 0===e&&(e={});var t,n,s,a,l,c,u=e.onResize,d=(0,r.useRef)(void 0);d.current=u;var p=e.round||Math.round,h=(0,r.useRef)(),f=(0,r.useState)({width:void 0,height:void 0}),m=f[0],g=f[1],v=(0,r.useRef)(!1);(0,r.useEffect)(function(){return v.current=!1,function(){v.current=!0}},[]);var b=(0,r.useRef)({width:void 0,height:void 0});var y=(t=(0,r.useCallback)(function(t){return(!h.current||h.current.box!==e.box||h.current.round!==p)&&(h.current={box:e.box,round:p,instance:new ResizeObserver(function(t){var n=t[0],r="border-box"===e.box?"borderBoxSize":"device-pixel-content-box"===e.box?"devicePixelContentBoxSize":"contentBoxSize",s=o(n,r,"inlineSize"),a=o(n,r,"blockSize"),l=s?p(s):void 0,c=a?p(a):void 0;if(b.current.width!==l||b.current.height!==c){var u={width:l,height:c};b.current.width=l,b.current.height=c,d.current?d.current(u):!v.current&&g(u)}})}),h.current.instance.observe(t,{box:e.box}),function(){h.current&&h.current.instance.unobserve(t)}},[e.box,p]),n=e.ref,s=(0,r.useRef)(null),(a=(0,r.useRef)(null)).current=n,l=(0,r.useRef)(null),(0,r.useEffect)(function(){c()}),c=(0,r.useCallback)(function(){var e=l.current,n=a.current,r=e||(n?n instanceof Element?n:n.current:null);if(!s.current||s.current.element!==r||s.current.subscriber!==t)s.current&&s.current.cleanup&&s.current.cleanup(),s.current={element:r,subscriber:t,cleanup:r?t(r):void 0}},[t]),(0,r.useEffect)(function(){return function(){s.current&&s.current.cleanup&&(s.current.cleanup(),s.current=null)}},[]),(0,r.useCallback)(function(e){l.current=e,c()},[c]));return(0,r.useMemo)(function(){return{ref:y,width:m.width,height:m.height}},[y,m.width,m.height])}},168326:function(e,t,n){"use strict";function r(e,t=!1){let n=e.length,l=0,c="",u=0,d=16,p=0,h=0,f=0,m=0,g=0;function v(){if(c="",g=0,u=l,h=p,m=f,l>=n)return u=n,d=17;let t=e.charCodeAt(l);if(o(t)){do l++,c+=String.fromCharCode(t),t=e.charCodeAt(l);while(o(t));return d=15}if(s(t))return l++,c+=String.fromCharCode(t),13===t&&10===e.charCodeAt(l)&&(l++,c+="\n"),p++,f=l,d=14;switch(t){case 123:return l++,d=1;case 125:return l++,d=2;case 91:return l++,d=3;case 93:return l++,d=4;case 58:return l++,d=6;case 44:return l++,d=5;case 34:return l++,c=function(){let t="",r=l;for(;;){if(l>=n){t+=e.substring(r,l),g=2;break}let o=e.charCodeAt(l);if(34===o){t+=e.substring(r,l),l++;break}if(92===o){if(t+=e.substring(r,l),++l>=n){g=2;break}switch(e.charCodeAt(l++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+=" ";break;case 117:let o=function(t,n){let r=0,o=0;for(;r<4||!n;){let t=e.charCodeAt(l);if(t>=48&&t<=57)o=16*o+t-48;else if(t>=65&&t<=70)o=16*o+t-65+10;else if(t>=97&&t<=102)o=16*o+t-97+10;else break;l++,r++}return r<t&&(o=-1),o}(4,!0);o>=0?t+=String.fromCharCode(o):g=4;break;default:g=5}r=l;continue}if(o>=0&&o<=31){if(s(o)){t+=e.substring(r,l),g=2;break}g=6}l++}return t}(),d=10;case 47:let r=l-1;if(47===e.charCodeAt(l+1)){for(l+=2;l<n&&!s(e.charCodeAt(l));){;l++}return c=e.substring(r,l),d=12}if(42===e.charCodeAt(l+1)){l+=2;let t=n-1,o=!1;for(;l<t;){let t=e.charCodeAt(l);if(42===t&&47===e.charCodeAt(l+1)){l+=2,o=!0;break}l++,s(t)&&(13===t&&10===e.charCodeAt(l)&&l++,p++,f=l)}return!o&&(l++,g=1),c=e.substring(r,l),d=13}return c+=String.fromCharCode(t),l++,d=16;case 45:if(c+=String.fromCharCode(t),++l===n||!a(e.charCodeAt(l)))return d=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return c+=function(){let t=l;if(48===e.charCodeAt(l))l++;else for(l++;l<e.length&&a(e.charCodeAt(l));)l++;if(l<e.length&&46===e.charCodeAt(l)){if(!(++l<e.length&&a(e.charCodeAt(l))))return g=3,e.substring(t,l);for(l++;l<e.length&&a(e.charCodeAt(l));)l++}let n=l;if(l<e.length&&(69===e.charCodeAt(l)||101===e.charCodeAt(l))){if((++l<e.length&&43===e.charCodeAt(l)||45===e.charCodeAt(l))&&l++,l<e.length&&a(e.charCodeAt(l))){for(l++;l<e.length&&a(e.charCodeAt(l));)l++;n=l}else g=3}return e.substring(t,n)}(),d=11;default:for(;l<n&&function(e){if(o(e)||s(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}(t);)l++,t=e.charCodeAt(l);if(u!==l){switch(c=e.substring(u,l)){case"true":return d=8;case"false":return d=9;case"null":return d=7}return d=16}return c+=String.fromCharCode(t),l++,d=16}}return{setPosition:function(e){l=e,c="",u=0,d=16,g=0},getPosition:()=>l,scan:t?function(){let e;do e=v();while(e>=12&&e<=15);return e}:v,getToken:()=>d,getTokenValue:()=>c,getTokenOffset:()=>u,getTokenLength:()=>l-u,getTokenStartLine:()=>h,getTokenStartCharacter:()=>u-m,getTokenError:()=>g}}function o(e){return 32===e||9===e}function s(e){return 10===e||13===e}function a(e){return e>=48&&e<=57}n.d(t,{nQ:()=>q.n,Oi:()=>eY}),(M=N||(N={}))[M.lineFeed=10]="lineFeed",M[M.carriageReturn=13]="carriageReturn",M[M.space=32]="space",M[M._0=48]="_0",M[M._1=49]="_1",M[M._2=50]="_2",M[M._3=51]="_3",M[M._4=52]="_4",M[M._5=53]="_5",M[M._6=54]="_6",M[M._7=55]="_7",M[M._8=56]="_8",M[M._9=57]="_9",M[M.a=97]="a",M[M.b=98]="b",M[M.c=99]="c",M[M.d=100]="d",M[M.e=101]="e",M[M.f=102]="f",M[M.g=103]="g",M[M.h=104]="h",M[M.i=105]="i",M[M.j=106]="j",M[M.k=107]="k",M[M.l=108]="l",M[M.m=109]="m",M[M.n=110]="n",M[M.o=111]="o",M[M.p=112]="p",M[M.q=113]="q",M[M.r=114]="r",M[M.s=115]="s",M[M.t=116]="t",M[M.u=117]="u",M[M.v=118]="v",M[M.w=119]="w",M[M.x=120]="x",M[M.y=121]="y",M[M.z=122]="z",M[M.A=65]="A",M[M.B=66]="B",M[M.C=67]="C",M[M.D=68]="D",M[M.E=69]="E",M[M.F=70]="F",M[M.G=71]="G",M[M.H=72]="H",M[M.I=73]="I",M[M.J=74]="J",M[M.K=75]="K",M[M.L=76]="L",M[M.M=77]="M",M[M.N=78]="N",M[M.O=79]="O",M[M.P=80]="P",M[M.Q=81]="Q",M[M.R=82]="R",M[M.S=83]="S",M[M.T=84]="T",M[M.U=85]="U",M[M.V=86]="V",M[M.W=87]="W",M[M.X=88]="X",M[M.Y=89]="Y",M[M.Z=90]="Z",M[M.asterisk=42]="asterisk",M[M.backslash=92]="backslash",M[M.closeBrace=125]="closeBrace",M[M.closeBracket=93]="closeBracket",M[M.colon=58]="colon",M[M.comma=44]="comma",M[M.dot=46]="dot",M[M.doubleQuote=34]="doubleQuote",M[M.minus=45]="minus",M[M.openBrace=123]="openBrace",M[M.openBracket=91]="openBracket",M[M.plus=43]="plus",M[M.slash=47]="slash",M[M.formFeed=12]="formFeed",M[M.tab=9]="tab";let l=Array(20).fill(0).map((e,t)=>" ".repeat(t)),c={" ":{"\n":Array(200).fill(0).map((e,t)=>"\n"+" ".repeat(t)),"\r":Array(200).fill(0).map((e,t)=>"\r"+" ".repeat(t)),"\r\n":Array(200).fill(0).map((e,t)=>"\r\n"+" ".repeat(t))}," ":{"\n":Array(200).fill(0).map((e,t)=>"\n"+" ".repeat(t)),"\r":Array(200).fill(0).map((e,t)=>"\r"+" ".repeat(t)),"\r\n":Array(200).fill(0).map((e,t)=>"\r\n"+" ".repeat(t))}},u=["\n","\r","\r\n"];function d(e,t){let n="";for(let r=0;r<t;r++)n+=e;return n}function p(e,t){return -1!=="\r\n".indexOf(e.charAt(t))}(R||(R={})).DEFAULT={allowTrailingComma:!1};(I=L||(L={}))[I.None=0]="None",I[I.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",I[I.UnexpectedEndOfString=2]="UnexpectedEndOfString",I[I.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",I[I.InvalidUnicode=4]="InvalidUnicode",I[I.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",I[I.InvalidCharacter=6]="InvalidCharacter",(P=j||(j={}))[P.OpenBraceToken=1]="OpenBraceToken",P[P.CloseBraceToken=2]="CloseBraceToken",P[P.OpenBracketToken=3]="OpenBracketToken",P[P.CloseBracketToken=4]="CloseBracketToken",P[P.CommaToken=5]="CommaToken",P[P.ColonToken=6]="ColonToken",P[P.NullKeyword=7]="NullKeyword",P[P.TrueKeyword=8]="TrueKeyword",P[P.FalseKeyword=9]="FalseKeyword",P[P.StringLiteral=10]="StringLiteral",P[P.NumericLiteral=11]="NumericLiteral",P[P.LineCommentTrivia=12]="LineCommentTrivia",P[P.BlockCommentTrivia=13]="BlockCommentTrivia",P[P.LineBreakTrivia=14]="LineBreakTrivia",P[P.Trivia=15]="Trivia",P[P.Unknown=16]="Unknown",P[P.EOF=17]="EOF";let h=function(e,t=[],n=R.DEFAULT){let o=null,s=[],a=[];function l(e){Array.isArray(s)?s.push(e):null!==o&&(s[o]=e)}return function(e,t,n=R.DEFAULT){var o;let s=r(e,!1),a=[],l=0;function c(e){return e?t=>0===l&&e(t,s.getTokenOffset(),s.getTokenLength(),s.getTokenStartLine(),s.getTokenStartCharacter()):()=>!0}function u(e){return e?t=>0===l&&e(t,s.getTokenOffset(),s.getTokenLength(),s.getTokenStartLine(),s.getTokenStartCharacter(),()=>a.slice()):()=>!0}function d(e){return e?()=>{l>0?l++:!1===e(s.getTokenOffset(),s.getTokenLength(),s.getTokenStartLine(),s.getTokenStartCharacter(),()=>a.slice())&&(l=1)}:()=>!0}function p(e){return e?()=>{l>0&&l--,0===l&&e(s.getTokenOffset(),s.getTokenLength(),s.getTokenStartLine(),s.getTokenStartCharacter())}:()=>!0}let h=d(t.onObjectBegin),f=u(t.onObjectProperty),m=p(t.onObjectEnd),g=d(t.onArrayBegin),v=p(t.onArrayEnd),b=u(t.onLiteralValue),y=c(t.onSeparator),x=(o=t.onComment)?()=>0===l&&o(s.getTokenOffset(),s.getTokenLength(),s.getTokenStartLine(),s.getTokenStartCharacter()):()=>!0,w=c(t.onError),S=n&&n.disallowComments,k=n&&n.allowTrailingComma;function A(){for(;;){let e=s.scan();switch(s.getTokenError()){case 4:C(14);break;case 5:C(15);break;case 3:C(13);break;case 1:!S&&C(11);break;case 2:C(12);break;case 6:C(16)}switch(e){case 12:case 13:S?C(10):x();break;case 16:C(1);break;case 15:case 14:break;default:return e}}}function C(e,t=[],n=[]){if(w(e),t.length+n.length>0){let e=s.getToken();for(;17!==e;){if(-1!==t.indexOf(e)){A();break}if(-1!==n.indexOf(e))break;e=A()}}}function E(e){let t=s.getTokenValue();return e?b(t):(f(t),a.push(t)),A(),!0}function T(){switch(s.getToken()){case 3:return function(){g(),A();let e=!0,t=!1;for(;4!==s.getToken()&&17!==s.getToken();){if(5===s.getToken()){if(!t&&C(4,[],[]),y(","),A(),4===s.getToken()&&k)break}else t&&C(6,[],[]);e?(a.push(0),e=!1):a[a.length-1]++,!T()&&C(4,[],[4,5]),t=!0}return v(),!e&&a.pop(),4!==s.getToken()?C(8,[4],[]):A(),!0}();case 1:return function(){h(),A();let e=!1;for(;2!==s.getToken()&&17!==s.getToken();){if(5===s.getToken()){if(!e&&C(4,[],[]),y(","),A(),2===s.getToken()&&k)break}else e&&C(6,[],[]);!(10!==s.getToken()?(C(3,[],[2,5]),!1):(E(!1),6===s.getToken()?(y(":"),A(),!T()&&C(4,[],[2,5])):C(5,[],[2,5]),a.pop(),!0))&&C(4,[],[2,5]),e=!0}return m(),2!==s.getToken()?C(7,[2],[]):A(),!0}();case 10:return E(!0);default:return function(){switch(s.getToken()){case 11:let e=Number(s.getTokenValue());isNaN(e)&&(C(2),e=0),b(e);break;case 7:b(null);break;case 8:b(!0);break;case 9:b(!1);break;default:return!1}return A(),!0}()}}if(A(),17===s.getToken())return n.allowEmptyContent||(C(4,[],[]),0);T()?(17!==s.getToken()&&C(9,[],[]),!0):(C(4,[],[]),!1)}(e,{onObjectBegin:()=>{let e={};l(e),a.push(s),s=e,o=null},onObjectProperty:e=>{o=e},onObjectEnd:()=>{s=a.pop()},onArrayBegin:()=>{let e=[];l(e),a.push(s),s=e,o=null},onArrayEnd:()=>{s=a.pop()},onLiteralValue:l,onError:(e,n,r)=>{t.push({error:e,offset:n,length:r})}},n),s[0]},f=function e(t,n,r=!1){if(function(e,t,n=!1){return t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}(t,n,r)){let o=t.children;if(Array.isArray(o))for(let t=0;t<o.length&&o[t].offset<=n;t++){let s=e(o[t],n,r);if(s)return s}return t}},m=function e(t){if(!t.parent||!t.parent.children)return[];let n=e(t.parent);if("property"===t.parent.type){let e=t.parent.children[0].value;n.push(e)}else if("array"===t.parent.type){let e=t.parent.children.indexOf(t);-1!==e&&n.push(e)}return n},g=function e(t){switch(t.type){case"array":return t.children.map(e);case"object":let n=Object.create(null);for(let r of t.children){let t=r.children[1];t&&(n[r.children[0].value]=e(t))}return n;case"null":case"string":case"number":case"boolean":return t.value;default:return}};(D=$||($={}))[D.InvalidSymbol=1]="InvalidSymbol",D[D.InvalidNumberFormat=2]="InvalidNumberFormat",D[D.PropertyNameExpected=3]="PropertyNameExpected",D[D.ValueExpected=4]="ValueExpected",D[D.ColonExpected=5]="ColonExpected",D[D.CommaExpected=6]="CommaExpected",D[D.CloseBraceExpected=7]="CloseBraceExpected",D[D.CloseBracketExpected=8]="CloseBracketExpected",D[D.EndOfFileExpected=9]="EndOfFileExpected",D[D.InvalidCommentToken=10]="InvalidCommentToken",D[D.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",D[D.UnexpectedEndOfString=12]="UnexpectedEndOfString",D[D.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",D[D.InvalidUnicode=14]="InvalidUnicode",D[D.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",D[D.InvalidCharacter=16]="InvalidCharacter";function v(e,t){let n,r;if(e===t)return!0;if(null==e||null==t||typeof e!=typeof t||"object"!=typeof e||Array.isArray(e)!==Array.isArray(t))return!1;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(!v(e[n],t[n]))return!1}else{let o=[];for(r in e)o.push(r);o.sort();let s=[];for(r in t)s.push(r);if(s.sort(),!v(o,s))return!1;for(n=0;n<o.length;n++)if(!v(e[o[n]],t[o[n]]))return!1}return!0}function b(e){return"number"==typeof e}function y(e){return void 0!==e}function x(e){return"boolean"==typeof e}function w(e){return"string"==typeof e}function S(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function k(e,t){let n=e.length-t.length;return n>0?e.lastIndexOf(t)===n:0===n&&e===t}function A(e){let t="";(function(e,t){if(e.length<t.length)return!1;for(let n=0;n<t.length;n++)if(e[n]!==t[n])return!1;return!0})(e,"(?i)")&&(e=e.substring(4),t="i");try{return RegExp(e,t+"u")}catch(n){try{return new RegExp(e,t)}catch(e){return}}}function C(e){let t=0;for(let n=0;n<e.length;n++){t++;let r=e.charCodeAt(n);55296<=r&&r<=56319&&n++}return t}var E,T,_,O,M,I,P,D,N,R,L,j,$,F,z,B,H,U,V=n("386388"),q=n("67940");(E=F||(F={}))[E.Undefined=0]="Undefined",E[E.EnumValueMismatch=1]="EnumValueMismatch",E[E.Deprecated=2]="Deprecated",E[E.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",E[E.UnexpectedEndOfString=258]="UnexpectedEndOfString",E[E.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",E[E.InvalidUnicode=260]="InvalidUnicode",E[E.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",E[E.InvalidCharacter=262]="InvalidCharacter",E[E.PropertyExpected=513]="PropertyExpected",E[E.CommaExpected=514]="CommaExpected",E[E.ColonExpected=515]="ColonExpected",E[E.ValueExpected=516]="ValueExpected",E[E.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",E[E.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",E[E.TrailingComma=519]="TrailingComma",E[E.DuplicateKey=520]="DuplicateKey",E[E.CommentNotPermitted=521]="CommentNotPermitted",E[E.PropertyKeysMustBeDoublequoted=528]="PropertyKeysMustBeDoublequoted",E[E.SchemaResolveError=768]="SchemaResolveError",E[E.SchemaUnsupportedFeature=769]="SchemaUnsupportedFeature",(T=z||(z={}))[T.v3=3]="v3",T[T.v4=4]="v4",T[T.v6=6]="v6",T[T.v7=7]="v7",T[T.v2019_09=19]="v2019_09",T[T.v2020_12=20]="v2020_12",(B||(B={})).LATEST={textDocument:{completion:{completionItem:{documentationFormat:[V.a4.Markdown,V.a4.PlainText],commitCharactersSupport:!0,labelDetailsSupport:!0}}}};var W=n("827047"),G=n("373132");let K={"color-hex":{errorMessage:G.t("Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA."),pattern:/^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/},"date-time":{errorMessage:G.t("String is not a RFC3339 date-time."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},date:{errorMessage:G.t("String is not a RFC3339 date."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i},time:{errorMessage:G.t("String is not a RFC3339 time."),pattern:/^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},email:{errorMessage:G.t("String is not an e-mail address."),pattern:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}))$/},hostname:{errorMessage:G.t("String is not a hostname."),pattern:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i},ipv4:{errorMessage:G.t("String is not an IPv4 address."),pattern:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/},ipv6:{errorMessage:G.t("String is not an IPv6 address."),pattern:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i}};class Y{constructor(e,t,n=0){this.offset=t,this.length=n,this.parent=e}get children(){return[]}toString(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")}}class Z extends Y{constructor(e,t){super(e,t),this.type="null",this.value=null}}class J extends Y{constructor(e,t,n){super(e,n),this.type="boolean",this.value=t}}class X extends Y{constructor(e,t){super(e,t),this.type="array",this.items=[]}get children(){return this.items}}class Q extends Y{constructor(e,t){super(e,t),this.type="number",this.isInteger=!0,this.value=Number.NaN}}class ee extends Y{constructor(e,t,n){super(e,t,n),this.type="string",this.value=""}}class et extends Y{constructor(e,t,n){super(e,t),this.type="property",this.colonOffset=-1,this.keyNode=n}get children(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]}}class en extends Y{constructor(e,t){super(e,t),this.type="object",this.properties=[]}get children(){return this.properties}}function er(e){return x(e)?e?{}:{not:{}}:e}(_=H||(H={}))[_.Key=0]="Key",_[_.Enum=1]="Enum";let ei="http://json-schema.org/";function eo(e){e.startsWith(ei)&&(e="https://json-schema.org/"+e.substring(ei.length));try{return W.o.parse(e).toString(!0)}catch(t){return e}}function es(e){return ea[eo(e)]??void 0}let ea={"https://json-schema.org/draft-03/schema":z.v3,"https://json-schema.org/draft-04/schema":z.v4,"https://json-schema.org/draft-06/schema":z.v6,"https://json-schema.org/draft-07/schema":z.v7,"https://json-schema.org/draft/2019-09/schema":z.v2019_09,"https://json-schema.org/draft/2020-12/schema":z.v2020_12};class el{constructor(e){this.schemaDraft=e}}class ec{constructor(e=-1,t){this.focusOffset=e,this.exclude=t,this.schemas=[]}add(e){this.schemas.push(e)}merge(e){Array.prototype.push.apply(this.schemas,e.schemas)}include(e){return(-1===this.focusOffset||ef(e,this.focusOffset))&&e!==this.exclude}newSub(){return new ec(-1,this.exclude)}}class eu{constructor(){}get schemas(){return[]}add(e){}merge(e){}include(e){return!0}newSub(){return this}}eu.instance=new eu;class ed{constructor(){this.problems=[],this.propertiesMatches=0,this.processedProperties=new Set,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=void 0}hasProblems(){return!!this.problems.length}merge(e){this.problems=this.problems.concat(e.problems),this.propertiesMatches+=e.propertiesMatches,this.propertiesValueMatches+=e.propertiesValueMatches,this.mergeProcessedProperties(e)}mergeEnumValues(e){!this.enumValueMatch&&!e.enumValueMatch&&this.enumValues&&e.enumValues&&(this.enumValues=this.enumValues.concat(e.enumValues))}updateEnumMismatchProblemMessages(){if(!this.enumValueMatch&&this.enumValues)for(let e of this.problems)e.code===F.EnumValueMismatch&&(e.message=G.t("Value is not accepted. Valid values: {0}.",this.enumValues.map(e=>JSON.stringify(e)).join(", ")))}mergePropertyMatch(e){this.problems=this.problems.concat(e.problems),this.propertiesMatches++,(e.enumValueMatch||!e.hasProblems()&&e.propertiesMatches)&&this.propertiesValueMatches++,e.enumValueMatch&&e.enumValues&&1===e.enumValues.length&&this.primaryValueMatches++}mergeProcessedProperties(e){e.processedProperties.forEach(e=>this.processedProperties.add(e))}compare(e){let t=this.hasProblems();return t!==e.hasProblems()?t?-1:1:this.enumValueMatch!==e.enumValueMatch?e.enumValueMatch?-1:1:this.primaryValueMatches!==e.primaryValueMatches?this.primaryValueMatches-e.primaryValueMatches:this.propertiesValueMatches!==e.propertiesValueMatches?this.propertiesValueMatches-e.propertiesValueMatches:this.propertiesMatches-e.propertiesMatches}}function ep(e){return g(e)}function eh(e){return m(e)}function ef(e,t,n=!1){return t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}class em{constructor(e,t=[],n=[]){this.root=e,this.syntaxErrors=t,this.comments=n}getNodeFromOffset(e,t=!1){if(this.root)return f(this.root,e,t)}visit(e){if(this.root){let t=n=>{let r=e(n),o=n.children;if(Array.isArray(o))for(let e=0;e<o.length&&r;e++)r=t(o[e]);return r};t(this.root)}}validate(e,t,n=V.H_.Warning,r){if(this.root&&t){let o=new ed;return ev(this.root,t,o,eu.instance,new el(r??eg(t))),o.problems.map(t=>{let r=V.e6.create(e.positionAt(t.location.offset),e.positionAt(t.location.offset+t.location.length));return V.R9.create(r,t.message,t.severity??n,t.code)})}}getMatchingSchemas(e,t=-1,n){if(this.root&&e){let r=new ec(t,n),o=new el(eg(e));return ev(this.root,e,new ed,r,o),r.schemas}return[]}}function eg(e,t=z.v2020_12){let n=e.$schema;return n?es(n)??t:t}function ev(e,t,n,r,o){if(!!e&&!!r.include(e)){if("property"===e.type)return ev(e.valueNode,t,n,r,o);switch(function(){function s(t){return e.type===t||"integer"===t&&"number"===e.type&&e.isInteger}if(Array.isArray(t.type)?!t.type.some(s)&&n.problems.push({location:{offset:e.offset,length:e.length},message:t.errorMessage||G.t("Incorrect type. Expected one of {0}.",t.type.join(", "))}):t.type&&!s(t.type)&&n.problems.push({location:{offset:e.offset,length:e.length},message:t.errorMessage||G.t('Incorrect type. Expected "{0}".',t.type)}),Array.isArray(t.allOf))for(let s of t.allOf){let t=new ed,a=r.newSub();ev(e,er(s),t,a,o),n.merge(t),r.merge(a)}let a=er(t.not);if(a){let s=new ed,l=r.newSub();for(let c of(ev(e,a,s,l,o),!s.hasProblems()&&n.problems.push({location:{offset:e.offset,length:e.length},message:t.errorMessage||G.t("Matches a schema that is not allowed.")}),l.schemas))c.inverted=!c.inverted,r.add(c)}let l=(t,s)=>{let a,l=[];for(let n of t){let t=er(n),c=new ed,u=r.newSub();if(ev(e,t,c,u,o),!c.hasProblems()&&l.push(t),a){if(s||c.hasProblems()||a.validationResult.hasProblems()){let e=c.compare(a.validationResult);e>0?a={schema:t,validationResult:c,matchingSchemas:u}:0===e&&(a.matchingSchemas.merge(u),a.validationResult.mergeEnumValues(c))}else a.matchingSchemas.merge(u),a.validationResult.propertiesMatches+=c.propertiesMatches,a.validationResult.propertiesValueMatches+=c.propertiesValueMatches,a.validationResult.mergeProcessedProperties(c)}else a={schema:t,validationResult:c,matchingSchemas:u}}return l.length>1&&s&&n.problems.push({location:{offset:e.offset,length:1},message:G.t("Matches multiple schemas when only one must validate.")}),a&&(a.validationResult.updateEnumMismatchProblemMessages(),n.merge(a.validationResult),r.merge(a.matchingSchemas)),l.length};Array.isArray(t.anyOf)&&l(t.anyOf,!1),Array.isArray(t.oneOf)&&l(t.oneOf,!0);let c=t=>{let s=new ed,a=r.newSub();ev(e,er(t),s,a,o),n.merge(s),r.merge(a)},u=er(t.if);if(u&&((t,s,a)=>{let l=er(t),u=new ed,d=r.newSub();ev(e,l,u,d,o),r.merge(d),n.mergeProcessedProperties(u),u.hasProblems()?a&&c(a):s&&c(s)})(u,er(t.then),er(t.else)),Array.isArray(t.enum)){let r=g(e),o=!1;for(let e of t.enum)if(v(r,e)){o=!0;break}n.enumValues=t.enum,n.enumValueMatch=o,!o&&n.problems.push({location:{offset:e.offset,length:e.length},code:F.EnumValueMismatch,message:t.errorMessage||G.t("Value is not accepted. Valid values: {0}.",t.enum.map(e=>JSON.stringify(e)).join(", "))})}if(y(t.const))v(g(e),t.const)?n.enumValueMatch=!0:(n.problems.push({location:{offset:e.offset,length:e.length},code:F.EnumValueMismatch,message:t.errorMessage||G.t("Value must be {0}.",JSON.stringify(t.const))}),n.enumValueMatch=!1),n.enumValues=[t.const];let d=t.deprecationMessage;if(d||t.deprecated){d=d||G.t("Value is deprecated");let t=e.parent?.type==="property"?e.parent:e;n.problems.push({location:{offset:t.offset,length:t.length},severity:V.H_.Warning,message:d,code:F.Deprecated})}}(),e.type){case"object":(function(e){let s=Object.create(null),a=new Set;for(let t of e.properties){let e=t.keyNode.value;s[e]=t.valueNode,a.add(e)}if(Array.isArray(t.required)){for(let r of t.required)if(!s[r]){let t=e.parent&&"property"===e.parent.type&&e.parent.keyNode,o=t?{offset:t.offset,length:t.length}:{offset:e.offset,length:1};n.problems.push({location:o,message:G.t('Missing property "{0}".',r)})}}let l=e=>{a.delete(e),n.processedProperties.add(e)};if(t.properties)for(let e of Object.keys(t.properties)){l(e);let a=t.properties[e],c=s[e];if(c){if(x(a)){if(a)n.propertiesMatches++,n.propertiesValueMatches++;else{let r=c.parent;n.problems.push({location:{offset:r.keyNode.offset,length:r.keyNode.length},message:t.errorMessage||G.t("Property {0} is not allowed.",e)})}}else{let e=new ed;ev(c,a,e,r,o),n.mergePropertyMatch(e)}}}if(t.patternProperties)for(let e of Object.keys(t.patternProperties)){let c=A(e);if(c){let u=[];for(let l of a)if(c.test(l)){u.push(l);let a=s[l];if(a){let s=t.patternProperties[e];if(x(s)){if(s)n.propertiesMatches++,n.propertiesValueMatches++;else{let e=a.parent;n.problems.push({location:{offset:e.keyNode.offset,length:e.keyNode.length},message:t.errorMessage||G.t("Property {0} is not allowed.",l)})}}else{let e=new ed;ev(a,s,e,r,o),n.mergePropertyMatch(e)}}}u.forEach(l)}}let c=t.additionalProperties;if(void 0!==c)for(let e of a){l(e);let a=s[e];if(a){if(!1===c){let r=a.parent;n.problems.push({location:{offset:r.keyNode.offset,length:r.keyNode.length},message:t.errorMessage||G.t("Property {0} is not allowed.",e)})}else if(!0!==c){let e=new ed;ev(a,c,e,r,o),n.mergePropertyMatch(e)}}}let u=t.unevaluatedProperties;if(void 0!==u){let e=[];for(let l of a)if(!n.processedProperties.has(l)){e.push(l);let a=s[l];if(a){if(!1===u){let e=a.parent;n.problems.push({location:{offset:e.keyNode.offset,length:e.keyNode.length},message:t.errorMessage||G.t("Property {0} is not allowed.",l)})}else if(!0!==u){let e=new ed;ev(a,u,e,r,o),n.mergePropertyMatch(e)}}}e.forEach(l)}if(b(t.maxProperties)&&e.properties.length>t.maxProperties&&n.problems.push({location:{offset:e.offset,length:e.length},message:G.t("Object has more properties than limit of {0}.",t.maxProperties)}),b(t.minProperties)&&e.properties.length<t.minProperties&&n.problems.push({location:{offset:e.offset,length:e.length},message:G.t("Object has fewer properties than the required number of {0}",t.minProperties)}),t.dependentRequired)for(let e in t.dependentRequired){let n=s[e],r=t.dependentRequired[e];n&&Array.isArray(r)&&p(e,r)}if(t.dependentSchemas)for(let e in t.dependentSchemas){let n=s[e],r=t.dependentSchemas[e];n&&S(r)&&p(e,r)}if(t.dependencies)for(let e in t.dependencies)s[e]&&p(e,t.dependencies[e]);let d=er(t.propertyNames);if(d)for(let t of e.properties){let e=t.keyNode;e&&ev(e,d,n,eu.instance,o)}function p(t,a){if(Array.isArray(a))for(let r of a)s[r]?n.propertiesValueMatches++:n.problems.push({location:{offset:e.offset,length:e.length},message:G.t("Object is missing property {0} required by property {1}.",r,t)});else{let t=er(a);if(t){let s=new ed;ev(e,t,s,r,o),n.mergePropertyMatch(s)}}}})(e);break;case"array":(function(e){let s,a;o.schemaDraft>=z.v2020_12?(s=t.prefixItems,a=Array.isArray(t.items)?void 0:t.items):(s=Array.isArray(t.items)?t.items:void 0,a=Array.isArray(t.items)?t.additionalItems:t.items);let l=0;if(void 0!==s){let t=Math.min(s.length,e.items.length);for(;l<t;l++){let t=er(s[l]),a=new ed,c=e.items[l];c&&(ev(c,t,a,r,o),n.mergePropertyMatch(a)),n.processedProperties.add(String(l))}}if(void 0!==a&&l<e.items.length){if("boolean"==typeof a)for(!1===a&&n.problems.push({location:{offset:e.offset,length:e.length},message:G.t("Array has too many items according to schema. Expected {0} or fewer.",l)});l<e.items.length;l++)n.processedProperties.add(String(l)),n.propertiesValueMatches++;else for(;l<e.items.length;l++){let t=new ed;ev(e.items[l],a,t,r,o),n.mergePropertyMatch(t),n.processedProperties.add(String(l))}}let c=er(t.contains);if(c){let r=0;for(let t=0;t<e.items.length;t++){let s=e.items[t],a=new ed;ev(s,c,a,eu.instance,o),!a.hasProblems()&&(r++,o.schemaDraft>=z.v2020_12&&n.processedProperties.add(String(t)))}0===r&&!b(t.minContains)&&n.problems.push({location:{offset:e.offset,length:e.length},message:t.errorMessage||G.t("Array does not contain required item.")}),b(t.minContains)&&r<t.minContains&&n.problems.push({location:{offset:e.offset,length:e.length},message:t.errorMessage||G.t("Array has too few items that match the contains contraint. Expected {0} or more.",t.minContains)}),b(t.maxContains)&&r>t.maxContains&&n.problems.push({location:{offset:e.offset,length:e.length},message:t.errorMessage||G.t("Array has too many items that match the contains contraint. Expected {0} or less.",t.maxContains)})}let u=t.unevaluatedItems;if(void 0!==u)for(let s=0;s<e.items.length;s++){if(!n.processedProperties.has(String(s))){if(!1===u)n.problems.push({location:{offset:e.offset,length:e.length},message:G.t("Item does not match any validation rule from the array.")});else{let a=new ed;ev(e.items[s],t.unevaluatedItems,a,r,o),n.mergePropertyMatch(a)}}n.processedProperties.add(String(s)),n.propertiesValueMatches++}if(b(t.minItems)&&e.items.length<t.minItems&&n.problems.push({location:{offset:e.offset,length:e.length},message:G.t("Array has too few items. Expected {0} or more.",t.minItems)}),b(t.maxItems)&&e.items.length>t.maxItems&&n.problems.push({location:{offset:e.offset,length:e.length},message:G.t("Array has too many items. Expected {0} or fewer.",t.maxItems)}),!0===t.uniqueItems){let t=g(e);(function(){for(let e=0;e<t.length-1;e++){let n=t[e];for(let r=e+1;r<t.length;r++)if(v(n,t[r]))return!0}return!1})()&&n.problems.push({location:{offset:e.offset,length:e.length},message:G.t("Array has duplicate items.")})}})(e);break;case"string":(function(e){if(b(t.minLength)&&C(e.value)<t.minLength&&n.problems.push({location:{offset:e.offset,length:e.length},message:G.t("String is shorter than the minimum length of {0}.",t.minLength)}),b(t.maxLength)&&C(e.value)>t.maxLength&&n.problems.push({location:{offset:e.offset,length:e.length},message:G.t("String is longer than the maximum length of {0}.",t.maxLength)}),w(t.pattern)){let r=A(t.pattern);!r?.test(e.value)&&n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||G.t('String does not match the pattern of "{0}".',t.pattern)})}if(t.format)switch(t.format){case"uri":case"uri-reference":{let r;if(e.value){let n=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(e.value);n?!n[2]&&"uri"===t.format&&(r=G.t("URI with a scheme is expected.")):r=G.t("URI is expected.")}else r=G.t("URI expected.");r&&n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||G.t("String is not a URI: {0}",r)})}break;case"color-hex":case"date-time":case"date":case"time":case"email":case"hostname":case"ipv4":case"ipv6":let r=K[t.format];(!e.value||!r.pattern.exec(e.value))&&n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||r.errorMessage})}})(e);break;case"number":(function(e){let r=e.value;function o(e){let t=/^(-?\d+)(?:\.(\d+))?(?:e([-+]\d+))?$/.exec(e.toString());return t&&{value:Number(t[1]+(t[2]||"")),multiplier:(t[2]?.length||0)-(parseInt(t[3])||0)}}if(b(t.multipleOf)){let s=-1;if(Number.isInteger(t.multipleOf))s=r%t.multipleOf;else{let e=o(t.multipleOf),n=o(r);if(e&&n){let t=10**Math.abs(n.multiplier-e.multiplier);n.multiplier<e.multiplier?n.value*=t:e.value*=t,s=n.value%e.value}}0!==s&&n.problems.push({location:{offset:e.offset,length:e.length},message:G.t("Value is not divisible by {0}.",t.multipleOf)})}function s(e,t){return b(t)?t:x(t)&&t?e:void 0}function a(e,t){if(!x(t)||!t)return e}let l=s(t.minimum,t.exclusiveMinimum);b(l)&&r<=l&&n.problems.push({location:{offset:e.offset,length:e.length},message:G.t("Value is below the exclusive minimum of {0}.",l)});let c=s(t.maximum,t.exclusiveMaximum);b(c)&&r>=c&&n.problems.push({location:{offset:e.offset,length:e.length},message:G.t("Value is above the exclusive maximum of {0}.",c)});let u=a(t.minimum,t.exclusiveMinimum);b(u)&&r<u&&n.problems.push({location:{offset:e.offset,length:e.length},message:G.t("Value is below the minimum of {0}.",u)});let d=a(t.maximum,t.exclusiveMaximum);b(d)&&r>d&&n.problems.push({location:{offset:e.offset,length:e.length},message:G.t("Value is above the maximum of {0}.",d)})})(e)}r.add({node:e,schema:t})}}let eb=[",","}","]"],ey=[":"];class ex{constructor(e,t=[],n=Promise,r={}){this.schemaService=e,this.contributions=t,this.promiseConstructor=n,this.clientCapabilities=r}doResolve(e){for(let t=this.contributions.length-1;t>=0;t--){let n=this.contributions[t].resolveCompletion;if(n){let t=n(e);if(t)return t}}return this.promiseConstructor.resolve(e)}doComplete(e,t,n){let r;let o={items:[],isIncomplete:!1},s=e.getText(),a=e.offsetAt(t),l=n.getNodeFromOffset(a,!0);if(this.isInComment(e,l?l.offset:0,a))return Promise.resolve(o);if(l&&a===l.offset+l.length&&a>0){let e=s[a-1];("object"===l.type&&"}"===e||"array"===l.type&&"]"===e)&&(l=l.parent)}let c=this.getCurrentWord(e,a);if(l&&("string"===l.type||"number"===l.type||"boolean"===l.type||"null"===l.type))r=V.e6.create(e.positionAt(l.offset),e.positionAt(l.offset+l.length));else{let n=a-c.length;n>0&&'"'===s[n-1]&&n--,r=V.e6.create(e.positionAt(n),t)}let u=new Map,d={add:e=>{let t=e.label,n=u.get(t);if(n)!n.documentation&&(n.documentation=e.documentation),!n.detail&&(n.detail=e.detail),!n.labelDetails&&(n.labelDetails=e.labelDetails);else{if((t=t.replace(/[\n]/g,"↵")).length>60){let e=t.substr(0,57).trim()+"...";!u.has(e)&&(t=e)}e.textEdit=V.PY.replace(r,e.insertText),e.label=t,u.set(t,e),o.items.push(e)}},setAsIncomplete:()=>{o.isIncomplete=!0},error:e=>{console.error(e)},getNumberOfProposals:()=>o.items.length};return this.schemaService.getSchemaForResource(e.uri,n).then(t=>{let p,h=[],f=!0,g="";if(l&&"string"===l.type){let e=l.parent;e&&"property"===e.type&&e.keyNode===l&&(f=!e.valueNode,p=e,g=s.substr(l.offset+1,l.length-2),e&&(l=e.parent))}if(l&&"object"===l.type){if(l.offset===a)return o;l.properties.forEach(e=>{(!p||p!==e)&&u.set(e.keyNode.value,V.FG.create("__"))});let v="";f&&(v=this.evaluateSeparatorAfter(e,e.offsetAt(r.end))),t?this.getPropertyCompletions(t,n,l,f,v,d):this.getSchemaLessPropertyCompletions(n,l,g,d);let b=m(l);this.contributions.forEach(t=>{let n=t.collectPropertyCompletions(e.uri,b,c,f,""===v,d);n&&h.push(n)}),!t&&c.length>0&&'"'!==s.charAt(a-c.length-1)&&(d.add({kind:V.cm.Property,label:this.getLabelForValue(c),insertText:this.getInsertTextForProperty(c,void 0,!1,v),insertTextFormat:V.lO.Snippet,documentation:""}),d.setAsIncomplete())}let v={};return t?this.getValueCompletions(t,n,l,a,e,d,v):this.getSchemaLessValueCompletions(n,l,a,e,d),this.contributions.length>0&&this.getContributedValueCompletions(n,l,a,e,d,h),this.promiseConstructor.all(h).then(()=>{if(0===d.getNumberOfProposals()){let t=a;l&&("string"===l.type||"number"===l.type||"boolean"===l.type||"null"===l.type)&&(t=l.offset+l.length);let n=this.evaluateSeparatorAfter(e,t);this.addFillerValueCompletions(v,n,d)}return o})})}getPropertyCompletions(e,t,n,r,o,s){t.getMatchingSchemas(e.schema,n.offset).forEach(e=>{if(e.node===n&&!e.inverted){let t=e.schema.properties;t&&Object.keys(t).forEach(e=>{let n=t[e];if("object"==typeof n&&!n.deprecationMessage&&!n.doNotSuggest){let t={kind:V.cm.Property,label:e,insertText:this.getInsertTextForProperty(e,n,r,o),insertTextFormat:V.lO.Snippet,filterText:this.getFilterTextForValue(e),documentation:this.fromMarkup(n.markdownDescription)||n.description||""};void 0!==n.completionDetail&&(t.detail=n.completionDetail),void 0!==n.suggestSortText&&(t.sortText=n.suggestSortText),t.insertText&&k(t.insertText,`$1${o}`)&&(t.command={title:"Suggest",command:"editor.action.triggerSuggest"}),s.add(t)}});let n=e.schema.propertyNames;if("object"==typeof n&&!n.deprecationMessage&&!n.doNotSuggest){let e=(e,t,a,l)=>{let c={kind:V.cm.Property,label:e,insertText:this.getInsertTextForProperty(e,void 0,r,o),insertTextFormat:V.lO.Snippet,filterText:this.getFilterTextForValue(e),documentation:t||this.fromMarkup(n.markdownDescription)||n.description||"",sortText:l,detail:a};c.insertText&&k(c.insertText,`$1${o}`)&&(c.command={title:"Suggest",command:"editor.action.triggerSuggest"}),s.add(c)};if(n.enum)for(let t=0;t<n.enum.length;t++){let r;n.markdownEnumDescriptions&&t<n.markdownEnumDescriptions.length?r=this.fromMarkup(n.markdownEnumDescriptions[t]):n.enumDescriptions&&t<n.enumDescriptions.length&&(r=n.enumDescriptions[t]);let o=n.enumSortTexts?.[t],s=n.enumDetails?.[t];e(n.enum[t],r,s,o)}n.const&&e(n.const,void 0,n.completionDetail,n.suggestSortText)}}})}getSchemaLessPropertyCompletions(e,t,n,r){let o=e=>{e.properties.forEach(e=>{let t=e.keyNode.value;r.add({kind:V.cm.Property,label:t,insertText:this.getInsertTextForValue(t,""),insertTextFormat:V.lO.Snippet,filterText:this.getFilterTextForValue(t),documentation:""})})};if(t.parent){if("property"===t.parent.type){let n=t.parent.keyNode.value;e.visit(e=>("property"===e.type&&e!==t.parent&&e.keyNode.value===n&&e.valueNode&&"object"===e.valueNode.type&&o(e.valueNode),!0))}else"array"===t.parent.type&&t.parent.items.forEach(e=>{"object"===e.type&&e!==t&&o(e)})}else"object"===t.type&&r.add({kind:V.cm.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",void 0,!0,""),insertTextFormat:V.lO.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})}getSchemaLessValueCompletions(e,t,n,r,o){let s=n;if(t&&("string"===t.type||"number"===t.type||"boolean"===t.type||"null"===t.type)&&(s=t.offset+t.length,t=t.parent),!t){o.add({kind:this.getSuggestionKind("object"),label:"Empty object",insertText:this.getInsertTextForValue({},""),insertTextFormat:V.lO.Snippet,documentation:""}),o.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:V.lO.Snippet,documentation:""});return}let a=this.evaluateSeparatorAfter(r,s),l=e=>{e.parent&&!ef(e.parent,n,!0)&&o.add({kind:this.getSuggestionKind(e.type),label:this.getLabelTextForMatchingNode(e,r),insertText:this.getInsertTextForMatchingNode(e,r,a),insertTextFormat:V.lO.Snippet,documentation:""}),"boolean"===e.type&&this.addBooleanValueCompletion(!e.value,a,o)};if("property"===t.type&&n>(t.colonOffset||0)){let r=t.valueNode;if(r&&(n>r.offset+r.length||"object"===r.type||"array"===r.type))return;let s=t.keyNode.value;e.visit(e=>("property"===e.type&&e.keyNode.value===s&&e.valueNode&&l(e.valueNode),!0)),"$schema"===s&&t.parent&&!t.parent.parent&&this.addDollarSchemaCompletions(a,o)}if("array"===t.type){if(t.parent&&"property"===t.parent.type){let n=t.parent.keyNode.value;e.visit(e=>("property"===e.type&&e.keyNode.value===n&&e.valueNode&&"array"===e.valueNode.type&&e.valueNode.items.forEach(l),!0))}else t.items.forEach(l)}}getValueCompletions(e,t,n,r,o,s,a){let l,c,u=r;if(n&&("string"===n.type||"number"===n.type||"boolean"===n.type||"null"===n.type)&&(u=n.offset+n.length,c=n,n=n.parent),!n){this.addSchemaValueCompletions(e.schema,"",s,a);return}if("property"===n.type&&r>(n.colonOffset||0)){let e=n.valueNode;if(e&&r>e.offset+e.length)return;l=n.keyNode.value,n=n.parent}if(n&&(void 0!==l||"array"===n.type)){let d=this.evaluateSeparatorAfter(o,u);for(let u of t.getMatchingSchemas(e.schema,n.offset,c))if(u.node===n&&!u.inverted&&u.schema){if("array"===n.type&&u.schema.items){let e=s;if(u.schema.uniqueItems){let t=new Set;n.children.forEach(e=>{if("array"!==e.type&&"object"!==e.type)t.add(this.getLabelForValue(g(e)))}),e={...s,add(e){!t.has(e.label)&&s.add(e)}}}if(Array.isArray(u.schema.items)){let t=this.findItemAtOffset(n,o,r);t<u.schema.items.length&&this.addSchemaValueCompletions(u.schema.items[t],d,e,a)}else this.addSchemaValueCompletions(u.schema.items,d,e,a)}if(void 0!==l){let e=!1;if(u.schema.properties){let t=u.schema.properties[l];t&&(e=!0,this.addSchemaValueCompletions(t,d,s,a))}if(u.schema.patternProperties&&!e)for(let t of Object.keys(u.schema.patternProperties)){let n=A(t);if(n?.test(l)){e=!0;let n=u.schema.patternProperties[t];this.addSchemaValueCompletions(n,d,s,a)}}if(u.schema.additionalProperties&&!e){let e=u.schema.additionalProperties;this.addSchemaValueCompletions(e,d,s,a)}}}"$schema"===l&&!n.parent&&this.addDollarSchemaCompletions(d,s),a.boolean&&(this.addBooleanValueCompletion(!0,d,s),this.addBooleanValueCompletion(!1,d,s)),a.null&&this.addNullValueCompletion(d,s)}}getContributedValueCompletions(e,t,n,r,o,s){if(t){if(("string"===t.type||"number"===t.type||"boolean"===t.type||"null"===t.type)&&(t=t.parent),t&&"property"===t.type&&n>(t.colonOffset||0)){let e=t.keyNode.value,a=t.valueNode;if((!a||n<=a.offset+a.length)&&t.parent){let n=m(t.parent);this.contributions.forEach(t=>{let a=t.collectValueCompletions(r.uri,n,e,o);a&&s.push(a)})}}}else this.contributions.forEach(e=>{let t=e.collectDefaultCompletions(r.uri,o);t&&s.push(t)})}addSchemaValueCompletions(e,t,n,r){"object"==typeof e&&(this.addEnumValueCompletions(e,t,n),this.addDefaultValueCompletions(e,t,n),this.collectTypes(e,r),Array.isArray(e.allOf)&&e.allOf.forEach(e=>this.addSchemaValueCompletions(e,t,n,r)),Array.isArray(e.anyOf)&&e.anyOf.forEach(e=>this.addSchemaValueCompletions(e,t,n,r)),Array.isArray(e.oneOf)&&e.oneOf.forEach(e=>this.addSchemaValueCompletions(e,t,n,r)))}addDefaultValueCompletions(e,t,n,r=0){let o=!1;if(y(e.default)){let s=e.type,a=e.default;for(let e=r;e>0;e--)a=[a],s="array";let l={kind:this.getSuggestionKind(s),label:this.getLabelForValue(a),insertText:this.getInsertTextForValue(a,t),insertTextFormat:V.lO.Snippet};this.doesSupportsLabelDetails()?l.labelDetails={description:G.t("Default value")}:l.detail=G.t("Default value"),n.add(l),o=!0}Array.isArray(e.examples)&&e.examples.forEach(s=>{let a=e.type,l=s;for(let e=r;e>0;e--)l=[l],a="array";n.add({kind:this.getSuggestionKind(a),label:this.getLabelForValue(l),insertText:this.getInsertTextForValue(l,t),insertTextFormat:V.lO.Snippet}),o=!0}),Array.isArray(e.defaultSnippets)&&e.defaultSnippets.forEach(s=>{let a,l,c=e.type,u=s.body,d=s.label;if(y(u)){e.type;for(let e=r;e>0;e--)u=[u];a=this.getInsertTextForSnippetValue(u,t),l=this.getFilterTextForSnippetValue(u),d=d||this.getLabelForSnippetValue(u)}else{if("string"!=typeof s.bodyText)return;let e="",n="",o="";for(let t=r;t>0;t--)e=e+o+"[\n",n=n+"\n"+o+"]",o+=" ",c="array";a=e+o+s.bodyText.split("\n").join("\n"+o)+n+t,d=d||a,l=a.replace(/[\n]/g,"")}n.add({kind:this.getSuggestionKind(c),label:d,documentation:this.fromMarkup(s.markdownDescription)||s.description,insertText:a,insertTextFormat:V.lO.Snippet,filterText:l}),o=!0}),!o&&"object"==typeof e.items&&!Array.isArray(e.items)&&r<5&&this.addDefaultValueCompletions(e.items,t,n,r+1)}addEnumValueCompletions(e,t,n){if(y(e.const)&&n.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(e.const),insertText:this.getInsertTextForValue(e.const,t),insertTextFormat:V.lO.Snippet,documentation:this.fromMarkup(e.markdownDescription)||e.description}),Array.isArray(e.enum))for(let r=0,o=e.enum.length;r<o;r++){let o=e.enum[r],s=this.fromMarkup(e.markdownDescription)||e.description;e.markdownEnumDescriptions&&r<e.markdownEnumDescriptions.length&&this.doesSupportMarkdown()?s=this.fromMarkup(e.markdownEnumDescriptions[r]):e.enumDescriptions&&r<e.enumDescriptions.length&&(s=e.enumDescriptions[r]),n.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(o),insertText:this.getInsertTextForValue(o,t),insertTextFormat:V.lO.Snippet,sortText:e.enumSortTexts?.[r],detail:e.enumDetails?.[r],documentation:s})}}collectTypes(e,t){if(Array.isArray(e.enum)||y(e.const))return;let n=e.type;Array.isArray(n)?n.forEach(e=>t[e]=!0):n&&(t[n]=!0)}addFillerValueCompletions(e,t,n){e.object&&n.add({kind:this.getSuggestionKind("object"),label:"{}",insertText:this.getInsertTextForGuessedValue({},t),insertTextFormat:V.lO.Snippet,detail:G.t("New object"),documentation:""}),e.array&&n.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],t),insertTextFormat:V.lO.Snippet,detail:G.t("New array"),documentation:""})}addBooleanValueCompletion(e,t,n){n.add({kind:this.getSuggestionKind("boolean"),label:e?"true":"false",insertText:this.getInsertTextForValue(e,t),insertTextFormat:V.lO.Snippet,documentation:""})}addNullValueCompletion(e,t){t.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+e,insertTextFormat:V.lO.Snippet,documentation:""})}addDollarSchemaCompletions(e,t){this.schemaService.getRegisteredSchemaIds(e=>"http"===e||"https"===e).forEach(n=>{n.startsWith("https://json-schema.org/draft-")&&(n+="#"),t.add({kind:V.cm.Module,label:this.getLabelForValue(n),filterText:this.getFilterTextForValue(n),insertText:this.getInsertTextForValue(n,e),insertTextFormat:V.lO.Snippet,documentation:""})})}getLabelForValue(e){return JSON.stringify(e)}getValueFromLabel(e){return JSON.parse(e)}getFilterTextForValue(e){return JSON.stringify(e)}getFilterTextForSnippetValue(e){return JSON.stringify(e).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getLabelForSnippetValue(e){return JSON.stringify(e).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getInsertTextForPlainText(e){return e.replace(/[\\\$\}]/g,"\\$&")}getInsertTextForValue(e,t){let n=JSON.stringify(e,null," ");return"{}"===n?"{$1}"+t:"[]"===n?"[$1]"+t:this.getInsertTextForPlainText(n+t)}getInsertTextForSnippetValue(e,t){return function e(t,n,r){if(null!==t&&"object"==typeof t){let o=n+" ";if(Array.isArray(t)){if(0===t.length)return"[]";let s="[\n";for(let n=0;n<t.length;n++)s+=o+e(t[n],o,r),n<t.length-1&&(s+=","),s+="\n";return s+=n+"]"}{let s=Object.keys(t);if(0===s.length)return"{}";let a="{\n";for(let n=0;n<s.length;n++){let l=s[n];a+=o+JSON.stringify(l)+": "+e(t[l],o,r),n<s.length-1&&(a+=","),a+="\n"}return a+=n+"}"}}return r(t)}(e,"",e=>"string"==typeof e&&"^"===e[0]?e.substr(1):JSON.stringify(e))+t}getInsertTextForGuessedValue(e,t){switch(typeof e){case"object":if(null===e)return"${1:null}"+t;break;case"string":let n=JSON.stringify(e);return n=n.substr(1,n.length-2),'"${1:'+(n=this.getInsertTextForPlainText(n))+'}"'+t;case"number":case"boolean":return"${1:"+JSON.stringify(e)+"}"+t}return this.getInsertTextForValue(e,t)}getSuggestionKind(e){if(Array.isArray(e)){let t=e;e=t.length>0?t[0]:void 0}if(!e)return V.cm.Value;switch(e){case"string":default:return V.cm.Value;case"object":return V.cm.Module;case"property":return V.cm.Property}}getLabelTextForMatchingNode(e,t){switch(e.type){case"array":return"[]";case"object":return"{}";default:return t.getText().substr(e.offset,e.length)}}getInsertTextForMatchingNode(e,t,n){switch(e.type){case"array":return this.getInsertTextForValue([],n);case"object":return this.getInsertTextForValue({},n);default:let r=t.getText().substr(e.offset,e.length)+n;return this.getInsertTextForPlainText(r)}}getInsertTextForProperty(e,t,n,r){let o;let s=this.getInsertTextForValue(e,"");if(!n)return s;let a=0;if(t){if(Array.isArray(t.defaultSnippets)){if(1===t.defaultSnippets.length){let e=t.defaultSnippets[0].body;y(e)&&(o=this.getInsertTextForSnippetValue(e,""))}a+=t.defaultSnippets.length}if(t.enum&&(!o&&1===t.enum.length&&(o=this.getInsertTextForGuessedValue(t.enum[0],"")),a+=t.enum.length),y(t.const)&&(!o&&(o=this.getInsertTextForGuessedValue(t.const,"")),a++),y(t.default)&&(!o&&(o=this.getInsertTextForGuessedValue(t.default,"")),a++),Array.isArray(t.examples)&&t.examples.length&&(!o&&(o=this.getInsertTextForGuessedValue(t.examples[0],"")),a+=t.examples.length),0===a){let e=Array.isArray(t.type)?t.type[0]:t.type;switch(!e&&(t.properties?e="object":t.items&&(e="array")),e){case"boolean":o="$1";break;case"string":o='"$1"';break;case"object":o="{$1}";break;case"array":o="[$1]";break;case"number":case"integer":o="${1:0}";break;case"null":o="${1:null}";break;default:return s}}}return(!o||a>1)&&(o="$1"),s+": "+o+r}getCurrentWord(e,t){let n=t-1,r=e.getText();for(;n>=0&&-1===' \n\r\v":{[,]}'.indexOf(r.charAt(n));)n--;return r.substring(n+1,t)}evaluateSeparatorAfter(e,t){let n=r(e.getText(),!0);switch(n.setPosition(t),n.scan()){case 5:case 2:case 4:case 17:return"";default:return","}}findItemAtOffset(e,t,n){let o=r(t.getText(),!0),s=e.items;for(let e=s.length-1;e>=0;e--){let t=s[e];if(n>t.offset+t.length){if(o.setPosition(t.offset+t.length),5===o.scan()&&n>=o.getTokenOffset()+o.getTokenLength())return e+1;return e}if(n>=t.offset)return e}return 0}isInComment(e,t,n){let o=r(e.getText(),!1);o.setPosition(t);let s=o.scan();for(;17!==s&&o.getTokenOffset()+o.getTokenLength()<n;)s=o.scan();return(12===s||13===s)&&o.getTokenOffset()<=n}fromMarkup(e){if(e&&this.doesSupportMarkdown())return{kind:V.a4.Markdown,value:e}}doesSupportMarkdown(){if(!y(this.supportsMarkdown)){let e=this.clientCapabilities.textDocument?.completion?.completionItem?.documentationFormat;this.supportsMarkdown=Array.isArray(e)&&-1!==e.indexOf(V.a4.Markdown)}return this.supportsMarkdown}doesSupportsCommitCharacters(){return!y(this.supportsCommitCharacters)&&(this.labelDetailsSupport=this.clientCapabilities.textDocument?.completion?.completionItem?.commitCharactersSupport),this.supportsCommitCharacters}doesSupportsLabelDetails(){return!y(this.labelDetailsSupport)&&(this.labelDetailsSupport=this.clientCapabilities.textDocument?.completion?.completionItem?.labelDetailsSupport),this.labelDetailsSupport}}class ew{constructor(e,t=[],n){this.schemaService=e,this.contributions=t,this.promise=n||Promise}doHover(e,t,n){let r=e.offsetAt(t),o=n.getNodeFromOffset(r);if(!o||("object"===o.type||"array"===o.type)&&r>o.offset+1&&r<o.offset+o.length-1)return this.promise.resolve(null);let s=o;if("string"===o.type){let e=o.parent;if(e&&"property"===e.type&&e.keyNode===o&&!(o=e.valueNode))return this.promise.resolve(null)}let a=V.e6.create(e.positionAt(s.offset),e.positionAt(s.offset+s.length)),l=e=>({contents:e,range:a}),c=m(o);for(let t=this.contributions.length-1;t>=0;t--){let n=this.contributions[t].getInfoContribution(e.uri,c);if(n)return n.then(e=>l(e))}return this.schemaService.getSchemaForResource(e.uri,n).then(e=>{if(e&&o){let t,r,s,a;n.getMatchingSchemas(e.schema,o.offset).every(e=>{if(e.node===o&&!e.inverted&&e.schema&&(t=t||e.schema.title,r=r||e.schema.markdownDescription||eS(e.schema.description),e.schema.enum)){let t=e.schema.enum.indexOf(g(o));e.schema.markdownEnumDescriptions?s=e.schema.markdownEnumDescriptions[t]:e.schema.enumDescriptions&&(s=eS(e.schema.enumDescriptions[t])),s&&"string"!=typeof(a=e.schema.enum[t])&&(a=JSON.stringify(a))}return!0});let c="";return t&&(c=eS(t)),r&&(c.length>0&&(c+="\n\n"),c+=r),s&&(c.length>0&&(c+="\n\n"),c+=`\`${function(e){return -1!==e.indexOf("`")?"`` "+e+" ``":e}(a)}\`: ${s}`),l([c])}return null})}}function eS(e){if(e)return e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,"$1\n\n$3").replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}class ek{constructor(e,t){this.jsonSchemaService=e,this.promise=t,this.validationEnabled=!0}configure(e){e&&(this.validationEnabled=!1!==e.validate,this.commentSeverity=e.allowComments?void 0:V.H_.Error)}doValidation(e,t,n,r){if(!this.validationEnabled)return this.promise.resolve([]);let o=[],s={},a=e=>{let t=e.range.start.line+" "+e.range.start.character+" "+e.message;!s[t]&&(s[t]=!0,o.push(e))},l=r=>{let s=n?.trailingCommas?eC(n.trailingCommas):V.H_.Error,l=n?.comments?eC(n.comments):this.commentSeverity,c=n?.schemaValidation?eC(n.schemaValidation):V.H_.Warning,u=n?.schemaRequest?eC(n.schemaRequest):V.H_.Warning;if(r){let o=(n,r)=>{if(t.root&&u){let o=t.root,s="object"===o.type?o.properties[0]:void 0;if(s&&"$schema"===s.keyNode.value){let t=s.valueNode||s,o=V.e6.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length));a(V.R9.create(o,n,u,r))}else{let t=V.e6.create(e.positionAt(o.offset),e.positionAt(o.offset+1));a(V.R9.create(t,n,u,r))}}};if(r.errors.length)o(r.errors[0],F.SchemaResolveError);else if(c){for(let e of r.warnings)o(e,F.SchemaUnsupportedFeature);let s=t.validate(e,r.schema,c,n?.schemaDraft);s&&s.forEach(a)}(function e(t){if(t&&"object"==typeof t){if(x(t.allowComments))return t.allowComments;if(t.allOf)for(let n of t.allOf){let t=e(n);if(x(t))return t}}})(r.schema)&&(l=void 0),function e(t){if(t&&"object"==typeof t){if(x(t.allowTrailingCommas))return t.allowTrailingCommas;if(x(t.allowsTrailingCommas))return t.allowsTrailingCommas;if(t.allOf)for(let n of t.allOf){let t=e(n);if(x(t))return t}}}(r.schema)&&(s=void 0)}for(let e of t.syntaxErrors){if(e.code===F.TrailingComma){if("number"!=typeof s)continue;e.severity=s}a(e)}if("number"==typeof l){let e=G.t("Comments are not permitted in JSON.");t.comments.forEach(t=>{a(V.R9.create(t,e,l,F.CommentNotPermitted))})}return o};if(r){let e=r.id||"schemaservice://untitled/"+eA++;return this.jsonSchemaService.registerExternalSchema({uri:e,schema:r}).getResolvedSchema().then(e=>l(e))}return this.jsonSchemaService.getSchemaForResource(e.uri,t).then(e=>l(e))}getLanguageStatus(e,t){return{schemas:this.jsonSchemaService.getSchemaURIsForResource(e.uri,t)}}}let eA=0;function eC(e){switch(e){case"error":return V.H_.Error;case"warning":return V.H_.Warning}}function eE(e){return e<48?0:e<=57?e-48:(e<97&&(e+=32),e>=97&&e<=102)?e-97+10:0}class eT{constructor(e){this.schemaService=e}findDocumentSymbols(e,t,n={resultLimit:Number.MAX_VALUE}){let r=t.root;if(!r)return[];let o=n.resultLimit||Number.MAX_VALUE,s=e.uri;if(("vscode://defaultsettings/keybindings.json"===s||k(s.toLowerCase(),"/user/keybindings.json"))&&"array"===r.type){let t=[];for(let a of r.items)if("object"===a.type){for(let r of a.properties)if("key"===r.keyNode.value&&r.valueNode){let l=V.Ye.create(e.uri,e_(e,a));if(t.push({name:eO(r.valueNode),kind:V.cR.Function,location:l}),--o<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(s),t}}return t}let a=[{node:r,containerName:""}],l=0,c=!1,u=[],d=(t,n)=>{"array"===t.type?t.items.forEach(e=>{e&&a.push({node:e,containerName:n})}):"object"===t.type&&t.properties.forEach(t=>{let r=t.valueNode;if(r){if(o>0){o--;let s=V.Ye.create(e.uri,e_(e,t)),l=n?n+"."+t.keyNode.value:t.keyNode.value;u.push({name:this.getKeyLabel(t),kind:this.getSymbolKind(r.type),location:s,containerName:n}),a.push({node:r,containerName:l})}else c=!0}})};for(;l<a.length;){let e=a[l++];d(e.node,e.containerName)}return c&&n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(s),u}findDocumentSymbols2(e,t,n={resultLimit:Number.MAX_VALUE}){let r=t.root;if(!r)return[];let o=n.resultLimit||Number.MAX_VALUE,s=e.uri;if(("vscode://defaultsettings/keybindings.json"===s||k(s.toLowerCase(),"/user/keybindings.json"))&&"array"===r.type){let t=[];for(let a of r.items)if("object"===a.type){for(let r of a.properties)if("key"===r.keyNode.value&&r.valueNode){let l=e_(e,a),c=e_(e,r.keyNode);if(t.push({name:eO(r.valueNode),kind:V.cR.Function,range:l,selectionRange:c}),--o<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(s),t}}return t}let a=[],l=[{node:r,result:a}],c=0,u=!1,d=(t,n)=>{"array"===t.type?t.items.forEach((t,r)=>{if(t){if(o>0){o--;let s=e_(e,t),a={name:String(r),kind:this.getSymbolKind(t.type),range:s,selectionRange:s,children:[]};n.push(a),l.push({result:a.children,node:t})}else u=!0}}):"object"===t.type&&t.properties.forEach(t=>{let r=t.valueNode;if(r){if(o>0){o--;let s=e_(e,t),a=e_(e,t.keyNode),c=[],u={name:this.getKeyLabel(t),kind:this.getSymbolKind(r.type),range:s,selectionRange:a,children:c,detail:this.getDetail(r)};n.push(u),l.push({result:c,node:r})}else u=!0}})};for(;c<l.length;){let e=l[c++];d(e.node,e.result)}return u&&n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(s),a}getSymbolKind(e){switch(e){case"object":return V.cR.Module;case"string":return V.cR.String;case"number":return V.cR.Number;case"array":return V.cR.Array;case"boolean":return V.cR.Boolean;default:return V.cR.Variable}}getKeyLabel(e){let t=e.keyNode.value;return(t&&(t=t.replace(/[\n]/g,"↵")),t&&t.trim())?t:`"${t}"`}getDetail(e){if(!!e){if("boolean"===e.type||"number"===e.type||"null"===e.type||"string"===e.type)return String(e.value);if("array"===e.type)return e.children.length?void 0:"[]";if("object"===e.type)return e.children.length?void 0:"{}"}}findDocumentColors(e,t,n){return this.schemaService.getSchemaForResource(e.uri,t).then(r=>{let o=[];if(r){let s=n&&"number"==typeof n.resultLimit?n.resultLimit:Number.MAX_VALUE,a=t.getMatchingSchemas(r.schema),l={};for(let t of a)if(!t.inverted&&t.schema&&("color"===t.schema.format||"color-hex"===t.schema.format)&&t.node&&"string"===t.node.type){let r=String(t.node.offset);if(!l[r]){let a=function(e){if("#"===e[0])switch(e.length){case 4:return{red:17*eE(e.charCodeAt(1))/255,green:17*eE(e.charCodeAt(2))/255,blue:17*eE(e.charCodeAt(3))/255,alpha:1};case 5:return{red:17*eE(e.charCodeAt(1))/255,green:17*eE(e.charCodeAt(2))/255,blue:17*eE(e.charCodeAt(3))/255,alpha:17*eE(e.charCodeAt(4))/255};case 7:return{red:(16*eE(e.charCodeAt(1))+eE(e.charCodeAt(2)))/255,green:(16*eE(e.charCodeAt(3))+eE(e.charCodeAt(4)))/255,blue:(16*eE(e.charCodeAt(5))+eE(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(16*eE(e.charCodeAt(1))+eE(e.charCodeAt(2)))/255,green:(16*eE(e.charCodeAt(3))+eE(e.charCodeAt(4)))/255,blue:(16*eE(e.charCodeAt(5))+eE(e.charCodeAt(6)))/255,alpha:(16*eE(e.charCodeAt(7))+eE(e.charCodeAt(8)))/255}}}(g(t.node));if(a){let n=e_(e,t.node);o.push({color:a,range:n})}if(l[r]=!0,--s<=0){n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(e.uri);break}}}}return o})}getColorPresentations(e,t,n,r){let o;let s=[],a=Math.round(255*n.red),l=Math.round(255*n.green),c=Math.round(255*n.blue);function u(e){let t=e.toString(16);return 2!==t.length?"0"+t:t}return s.push({label:o=1===n.alpha?`#${u(a)}${u(l)}${u(c)}`:`#${u(a)}${u(l)}${u(c)}${u(Math.round(255*n.alpha))}`,textEdit:V.PY.replace(r,JSON.stringify(o))}),s}}function e_(e,t){return V.e6.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}function eO(e){return g(e)||G.t("<empty>")}let eM={schemaAssociations:[],schemas:{"https://json-schema.org/draft-04/schema":{definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{type:"string",enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minLength:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minItems:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},uniqueItems:{type:"boolean",default:!1},maxProperties:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minProperties:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},required:{allOf:[{$ref:"#/definitions/stringArray"}]},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{anyOf:[{type:"string",enum:["date-time","uri","email","hostname","ipv4","ipv6","regex"]},{type:"string"}]},allOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},anyOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},oneOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},not:{allOf:[{$ref:"#"}]}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}},"https://json-schema.org/draft-07/schema":{definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}}},eI={id:G.t("A unique identifier for the schema."),$schema:G.t("The schema to verify this document against."),title:G.t("A descriptive title of the schema."),description:G.t("A long description of the schema. Used in hover menus and suggestions."),default:G.t("A default value. Used by suggestions."),multipleOf:G.t("A number that should cleanly divide the current value (i.e. have no remainder)."),maximum:G.t("The maximum numerical value, inclusive by default."),exclusiveMaximum:G.t("Makes the maximum property exclusive."),minimum:G.t("The minimum numerical value, inclusive by default."),exclusiveMinimum:G.t("Makes the minimum property exclusive."),maxLength:G.t("The maximum length of a string."),minLength:G.t("The minimum length of a string."),pattern:G.t("A regular expression to match the string against. It is not implicitly anchored."),additionalItems:G.t("For arrays, only when items is set as an array. If items are a schema, this schema validates items after the ones specified by the items schema. If false, additional items will cause validation to fail."),items:G.t("For arrays. Can either be a schema to validate every element against or an array of schemas to validate each item against in order (the first schema will validate the first element, the second schema will validate the second element, and so on."),maxItems:G.t("The maximum number of items that can be inside an array. Inclusive."),minItems:G.t("The minimum number of items that can be inside an array. Inclusive."),uniqueItems:G.t("If all of the items in the array must be unique. Defaults to false."),maxProperties:G.t("The maximum number of properties an object can have. Inclusive."),minProperties:G.t("The minimum number of properties an object can have. Inclusive."),required:G.t("An array of strings that lists the names of all properties required on this object."),additionalProperties:G.t("Either a schema or a boolean. If a schema, used to validate all properties not matched by 'properties', 'propertyNames', or 'patternProperties'. If false, any properties not defined by the adajacent keywords will cause this schema to fail."),definitions:G.t("Not used for validation. Place subschemas here that you wish to reference inline with $ref."),properties:G.t("A map of property names to schemas for each property."),patternProperties:G.t("A map of regular expressions on property names to schemas for matching properties."),dependencies:G.t("A map of property names to either an array of property names or a schema. An array of property names means the property named in the key depends on the properties in the array being present in the object in order to be valid. If the value is a schema, then the schema is only applied to the object if the property in the key exists on the object."),enum:G.t("The set of literal values that are valid."),type:G.t("Either a string of one of the basic schema types (number, integer, null, array, object, boolean, string) or an array of strings specifying a subset of those types."),format:G.t("Describes the format expected for the value. By default, not used for validation"),allOf:G.t("An array of schemas, all of which must match."),anyOf:G.t("An array of schemas, where at least one must match."),oneOf:G.t("An array of schemas, exactly one of which must match."),not:G.t("A schema which must not match."),$id:G.t("A unique identifier for the schema."),$ref:G.t("Reference a definition hosted on any location."),$comment:G.t("Comments from schema authors to readers or maintainers of the schema."),readOnly:G.t("Indicates that the value of the instance is managed exclusively by the owning authority."),examples:G.t("Sample JSON values associated with a particular schema, for the purpose of illustrating usage."),contains:G.t('An array instance is valid against "contains" if at least one of its elements is valid against the given schema.'),propertyNames:G.t("If the instance is an object, this keyword validates if every property name in the instance validates against the provided schema."),const:G.t("An instance validates successfully against this keyword if its value is equal to the value of the keyword."),contentMediaType:G.t("Describes the media type of a string property."),contentEncoding:G.t("Describes the content encoding of a string property."),if:G.t('The validation outcome of the "if" subschema controls which of the "then" or "else" keywords are evaluated.'),then:G.t('The "then" subschema is used for validation when the "if" subschema succeeds.'),else:G.t('The "else" subschema is used for validation when the "if" subschema fails.')};for(let e in eM.schemas){let t=eM.schemas[e];for(let e in t.properties){let n=t.properties[e];"boolean"==typeof n&&(n=t.properties[e]={});let r=eI[e];r&&(n.description=r)}}class eP{constructor(e,t,n){this.folderUri=t,this.uris=n,this.globWrappers=[];try{for(let t of e){let e="!"!==t[0];!e&&(t=t.substring(1)),t.length>0&&("/"===t[0]&&(t=t.substring(1)),this.globWrappers.push({regexp:function(e,t){let n;if("string"!=typeof e)throw TypeError("Expected a string");let r=String(e),o="",s=!!t&&!!t.extended,a=!!t&&!!t.globstar,l=!1,c=t&&"string"==typeof t.flags?t.flags:"";for(let e=0,t=r.length;e<t;e++)switch(n=r[e]){case"/":case"$":case"^":case"+":case".":case"(":case")":case"=":case"!":case"|":o+="\\"+n;break;case"?":if(s){o+=".";break}case"[":case"]":if(s){o+=n;break}case"{":if(s){l=!0,o+="(";break}case"}":if(s){l=!1,o+=")";break}case",":if(l){o+="|";break}o+="\\"+n;break;case"*":let t=r[e-1],c=1;for(;"*"===r[e+1];)c++,e++;let u=r[e+1];a?c>1&&("/"===t||void 0===t||"{"===t||","===t)&&("/"===u||void 0===u||","===u||"}"===u)?("/"===u?e++:"/"===t&&o.endsWith("\\/")&&(o=o.substr(0,o.length-2)),o+="((?:[^/]*(?:/|$))*)"):o+="([^/]*)":o+=".*";break;default:o+=n}return(!c||!~c.indexOf("g"))&&(o="^"+o+"$"),new RegExp(o,c)}("**/"+t,{extended:!0,globstar:!0}),include:e}))}t&&(!(t=e$(t)).endsWith("/")&&(t+="/"),this.folderUri=t)}catch(e){this.globWrappers.length=0,this.uris=[]}}matchesPattern(e){if(this.folderUri&&!e.startsWith(this.folderUri))return!1;let t=!1;for(let{regexp:n,include:r}of this.globWrappers)n.test(e)&&(t=r);return t}getURIs(){return this.uris}}class eD{constructor(e,t,n){this.service=e,this.uri=t,this.dependencies=new Set,this.anchors=void 0,n&&(this.unresolvedSchema=this.service.promise.resolve(new eN(n)))}getUnresolvedSchema(){return!this.unresolvedSchema&&(this.unresolvedSchema=this.service.loadSchema(this.uri)),this.unresolvedSchema}getResolvedSchema(){return!this.resolvedSchema&&(this.resolvedSchema=this.getUnresolvedSchema().then(e=>this.service.resolveSchemaContent(e,this))),this.resolvedSchema}clearSchema(){let e=!!this.unresolvedSchema;return this.resolvedSchema=void 0,this.unresolvedSchema=void 0,this.dependencies.clear(),this.anchors=void 0,e}}class eN{constructor(e,t=[]){this.schema=e,this.errors=t}}class eR{constructor(e,t=[],n=[],r){this.schema=e,this.errors=t,this.warnings=n,this.schemaDraft=r}getSection(e){let t=this.getSectionRecursive(e,this.schema);if(t)return er(t)}getSectionRecursive(e,t){if(!t||"boolean"==typeof t||0===e.length)return t;let n=e.shift();if(t.properties&&(t.properties[n],1))return this.getSectionRecursive(e,t.properties[n]);if(t.patternProperties)for(let r of Object.keys(t.patternProperties)){let o=A(r);if(o?.test(n))return this.getSectionRecursive(e,t.patternProperties[r])}else if("object"==typeof t.additionalProperties)return this.getSectionRecursive(e,t.additionalProperties);else if(n.match("[0-9]+")){if(Array.isArray(t.items)){let r=parseInt(n,10);if(!isNaN(r)&&t.items[r])return this.getSectionRecursive(e,t.items[r])}else if(t.items)return this.getSectionRecursive(e,t.items)}}}class eL{constructor(e,t,n){this.contextService=t,this.requestService=e,this.promiseConstructor=n||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations=[],this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={}}getRegisteredSchemaIds(e){return Object.keys(this.registeredSchemasIds).filter(t=>{let n=W.o.parse(t).scheme;return"schemaservice"!==n&&(!e||e(n))})}get promise(){return this.promiseConstructor}dispose(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()}onResourceChange(e){this.cachedSchemaForResource=void 0;let t=!1,n=[e=eo(e)],r=Object.keys(this.schemasById).map(e=>this.schemasById[e]);for(;n.length;){let e=n.pop();for(let o=0;o<r.length;o++){let s=r[o];s&&(s.uri===e||s.dependencies.has(e))&&(s.uri!==e&&n.push(s.uri),s.clearSchema()&&(t=!0),r[o]=void 0)}}return t}setSchemaContributions(e){if(e.schemas){let t=e.schemas;for(let e in t){let n=eo(e);this.contributionSchemas[n]=this.addSchemaHandle(n,t[e])}}if(Array.isArray(e.schemaAssociations))for(let t of e.schemaAssociations){let e=t.uris.map(eo),n=this.addFilePatternAssociation(t.pattern,t.folderUri,e);this.contributionAssociations.push(n)}}addSchemaHandle(e,t){let n=new eD(this,e,t);return this.schemasById[e]=n,n}getOrAddSchemaHandle(e,t){return this.schemasById[e]||this.addSchemaHandle(e,t)}addFilePatternAssociation(e,t,n){let r=new eP(e,t,n);return this.filePatternAssociations.push(r),r}registerExternalSchema(e){let t=eo(e.uri);return this.registeredSchemasIds[t]=!0,this.cachedSchemaForResource=void 0,e.fileMatch&&e.fileMatch.length&&this.addFilePatternAssociation(e.fileMatch,e.folderUri,[t]),e.schema?this.addSchemaHandle(t,e.schema):this.getOrAddSchemaHandle(t)}clearExternalSchemas(){for(let e in this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={},this.cachedSchemaForResource=void 0,this.contributionSchemas)this.schemasById[e]=this.contributionSchemas[e],this.registeredSchemasIds[e]=!0;for(let e of this.contributionAssociations)this.filePatternAssociations.push(e)}getResolvedSchema(e){let t=eo(e),n=this.schemasById[t];return n?n.getResolvedSchema():this.promise.resolve(void 0)}loadSchema(e){if(!this.requestService){let t=G.t("Unable to load schema from '{0}'. No schema request service available",eF(e));return this.promise.resolve(new eN({},[t]))}return this.requestService(e).then(t=>{if(!t)return new eN({},[G.t("Unable to load schema from '{0}': No content.",eF(e))]);let n=[];65279===t.charCodeAt(0)&&(n.push(G.t("Problem reading content from '{0}': UTF-8 with BOM detected, only UTF 8 is allowed.",eF(e))),t=t.trimStart());let r={},o=[];return r=h(t,o),o.length&&n.push(G.t("Unable to parse content from '{0}': Parse error at offset {1}.",eF(e),o[0].offset)),new eN(r,n)},t=>{let n=t.toString(),r=t.toString().split("Error: ");return r.length>1&&(n=r[1]),k(n,".")&&(n=n.substr(0,n.length-1)),new eN({},[G.t("Unable to load schema from '{0}': {1}.",eF(e),n)])})}resolveSchemaContent(e,t){let n=e.errors.slice(0),r=e.schema,o=r.$schema?es(r.$schema):void 0;if(o===z.v3)return this.promise.resolve(new eR({},[G.t("Draft-03 schemas are not supported.")],[],o));let s=new Set,a=this.contextService,l=(e,t)=>{t=decodeURIComponent(t);let n=e;return"/"===t[0]&&(t=t.substring(1)),t.split("/").some(e=>!(n=n[e=e.replace(/~1/g,"/").replace(/~0/g,"~")])),n},c=(e,t,n)=>(!t.anchors&&(t.anchors=f(e)),t.anchors.get(n)),u=(e,t)=>{for(let n in t)t.hasOwnProperty(n)&&"id"!==n&&"$id"!==n&&(e[n]=t[n])},d=(e,t,r,o)=>{let s;(s=void 0===o||0===o.length?t:"/"===o.charAt(0)?l(t,o):c(t,r,o))?u(e,s):n.push(G.t("$ref '{0}' in '{1}' can not be resolved.",o||"",r.uri))},p=(e,t,r,o)=>{a&&!/^[A-Za-z][A-Za-z0-9+\-.+]*:\/.*/.test(t)&&(t=a.resolveRelativePath(t,o.uri)),t=eo(t);let s=this.getOrAddSchemaHandle(t);return s.getUnresolvedSchema().then(a=>{if(o.dependencies.add(t),a.errors.length){let e=r?t+"#"+r:t;n.push(G.t("Problems loading reference '{0}': {1}",e,a.errors[0]))}return d(e,a.schema,s,r),h(e,a.schema,s)})},h=(e,t,n)=>{let r=[];return this.traverseNodes(e,e=>{let o=new Set;for(;e.$ref;){let s=e.$ref,a=s.split("#",2);if(delete e.$ref,a[0].length>0){r.push(p(e,a[0],a[1],n));return}!o.has(s)&&(d(e,t,n,a[1]),o.add(s))}e.$recursiveRef&&s.add("$recursiveRef"),e.$dynamicRef&&s.add("$dynamicRef")}),this.promise.all(r)},f=e=>{let t=new Map;return this.traverseNodes(e,e=>{let r=e.$id||e.id,o=w(r)&&"#"===r.charAt(0)?r.substring(1):e.$anchor;o&&(t.has(o)?n.push(G.t("Duplicate anchor declaration: '{0}'",o)):t.set(o,e)),e.$recursiveAnchor&&s.add("$recursiveAnchor"),e.$dynamicAnchor&&s.add("$dynamicAnchor")}),t};return h(r,r,t).then(e=>{let t=[];return s.size&&t.push(G.t("The schema uses meta-schema features ({0}) that are not yet supported by the validator.",Array.from(s.keys()).join(", "))),new eR(r,n,t,o)})}traverseNodes(e,t){if(!e||"object"!=typeof e)return Promise.resolve(null);let n=new Set,r=(...e)=>{for(let t of e)S(t)&&l.push(t)},o=(...e)=>{for(let t of e)if(S(t))for(let e in t){let n=t[e];S(n)&&l.push(n)}},s=(...e)=>{for(let t of e)if(Array.isArray(t))for(let e of t)S(e)&&l.push(e)},a=e=>{if(Array.isArray(e))for(let t of e)S(t)&&l.push(t);else S(e)&&l.push(e)},l=[e],c=l.pop();for(;c;)!n.has(c)&&(n.add(c),t(c),r(c.additionalItems,c.additionalProperties,c.not,c.contains,c.propertyNames,c.if,c.then,c.else,c.unevaluatedItems,c.unevaluatedProperties),o(c.definitions,c.$defs,c.properties,c.patternProperties,c.dependencies,c.dependentSchemas),s(c.anyOf,c.allOf,c.oneOf,c.prefixItems),a(c.items)),c=l.pop()}getSchemaFromProperty(e,t){if(t.root?.type==="object"){for(let n of t.root.properties)if("$schema"===n.keyNode.value&&n.valueNode?.type==="string"){let t=n.valueNode.value;return this.contextService&&!/^\w[\w\d+.-]*:/.test(t)&&(t=this.contextService.resolveRelativePath(t,e)),t}}}getAssociatedSchemas(e){let t=Object.create(null),n=[],r=e$(e);for(let e of this.filePatternAssociations)if(e.matchesPattern(r))for(let r of e.getURIs())!t[r]&&(n.push(r),t[r]=!0);return n}getSchemaURIsForResource(e,t){let n=t&&this.getSchemaFromProperty(e,t);return n?[n]:this.getAssociatedSchemas(e)}getSchemaForResource(e,t){if(t){let n=this.getSchemaFromProperty(e,t);if(n){let e=eo(n);return this.getOrAddSchemaHandle(e).getResolvedSchema()}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===e)return this.cachedSchemaForResource.resolvedSchema;let n=this.getAssociatedSchemas(e),r=n.length>0?this.createCombinedSchema(e,n).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:e,resolvedSchema:r},r}createCombinedSchema(e,t){if(1===t.length)return this.getOrAddSchemaHandle(t[0]);{let n="schemaservice://combinedSchema/"+encodeURIComponent(e),r={allOf:t.map(e=>({$ref:e}))};return this.addSchemaHandle(n,r)}}getMatchingSchemas(e,t,n){if(n){let e=n.id||"schemaservice://untitled/matchingSchemas/"+ej++;return this.addSchemaHandle(e,n).getResolvedSchema().then(e=>t.getMatchingSchemas(e.schema).filter(e=>!e.inverted))}return this.getSchemaForResource(e.uri,t).then(e=>e?t.getMatchingSchemas(e.schema).filter(e=>!e.inverted):[])}}let ej=0;function e$(e){try{return W.o.parse(e).with({fragment:null,query:null}).toString(!0)}catch(t){return e}}function eF(e){try{let t=W.o.parse(e);if("file"===t.scheme)return t.fsPath}catch(e){}return e}function ez(e,t){let n=[],o=[],s=[],a=-1,l=r(e.getText(),!1),c=l.scan();function u(e){n.push(e),o.push(s.length)}for(;17!==c;){switch(c){case 1:case 3:{let t=e.positionAt(l.getTokenOffset()).line,n={startLine:t,endLine:t,kind:1===c?"object":"array"};s.push(n);break}case 2:case 4:{let t=2===c?"object":"array";if(s.length>0&&s[s.length-1].kind===t){let t=s.pop(),n=e.positionAt(l.getTokenOffset()).line;t&&n>t.startLine+1&&a!==t.startLine&&(t.endLine=n-1,u(t),a=t.startLine)}break}case 13:{let t=e.positionAt(l.getTokenOffset()).line,n=e.positionAt(l.getTokenOffset()+l.getTokenLength()).line;1===l.getTokenError()&&t+1<e.lineCount?l.setPosition(e.offsetAt(V.Ly.create(t+1,0))):t<n&&(u({startLine:t,endLine:n,kind:V.AD.Comment}),a=t);break}case 12:{let t=e.getText().substr(l.getTokenOffset(),l.getTokenLength()).match(/^\/\/\s*#(region\b)|(endregion\b)/);if(t){let n=e.positionAt(l.getTokenOffset()).line;if(t[1]){let e={startLine:n,endLine:n,kind:V.AD.Region};s.push(e)}else{let e=s.length-1;for(;e>=0&&s[e].kind!==V.AD.Region;)e--;if(e>=0){let t=s[e];s.length=e,n>t.startLine&&a!==t.startLine&&(t.endLine=n,u(t),a=t.startLine)}}}}}c=l.scan()}let d=t&&t.rangeLimit;if("number"!=typeof d||n.length<=d)return n;t&&t.onRangeLimitExceeded&&t.onRangeLimitExceeded(e.uri);let p=[];for(let e of o)e<30&&(p[e]=(p[e]||0)+1);let h=0,f=0;for(let e=0;e<p.length;e++){let t=p[e];if(t){if(t+h>d){f=e;break}h+=t}}let m=[];for(let e=0;e<n.length;e++){let t=o[e];"number"==typeof t&&(t<f||t===f&&h++<d)&&m.push(n[e])}return m}function eB(e,t,n){function o(t,n){return V.e6.create(e.positionAt(t),e.positionAt(n))}let s=r(e.getText(),!0);return t.map(function(t){let r,a=e.offsetAt(t),l=n.getNodeFromOffset(a,!0),c=[];for(;l;){switch(l.type){case"string":case"object":case"array":let e=l.offset+1,t=l.offset+l.length-1;e<t&&a>=e&&a<=t&&c.push(o(e,t)),c.push(o(l.offset,l.offset+l.length));break;case"number":case"boolean":case"null":case"property":c.push(o(l.offset,l.offset+l.length))}if("property"===l.type||l.parent&&"array"===l.parent.type){let e=function(e,t){return(s.setPosition(e),s.scan()===t)?s.getTokenOffset()+s.getTokenLength():-1}(l.offset+l.length,5);-1!==e&&c.push(o(l.offset,e))}l=l.parent}for(let e=c.length-1;e>=0;e--)r=V.xm.create(c[e],r);return!r&&(r=V.xm.create(V.e6.create(t,t))),r})}function eH(e,t,n){var o;let s;if(n){let t=e.offsetAt(n.start),r=e.offsetAt(n.end)-t;s={offset:t,length:r}}let a={tabSize:t?t.tabSize:4,insertSpaces:t?.insertSpaces===!0,insertFinalNewline:t?.insertFinalNewline===!0,eol:"\n",keepLines:t?.keepLines===!0};return(o=e.getText(),function(e,t,n){let o,s,a,h,f,m;if(t){for(f=(h=t.offset)+t.length,a=h;a>0&&!p(e,a-1);)a--;let r=f;for(;r<e.length&&!p(e,r);)r++;o=function(e,t){let n=0,r=0,o=t.tabSize||4;for(;n<e.length;){let t=e.charAt(n);if(t===l["1"])r++;else if(" "===t)r+=o;else break;n++}return Math.floor(r/o)}(s=e.substring(a,r),n)}else s=e,o=0,a=0,h=0,f=e.length;let g=function(e,t){for(let e=0;e<t.length;e++){let n=t.charAt(e);if("\r"===n){if(e+1<t.length&&"\n"===t.charAt(e+1))return"\r\n";return"\r"}if("\n"===n)return"\n"}return e&&e.eol||"\n"}(n,e),v=u.includes(g),b=0,y=0,x=" "===(m=n.insertSpaces?l[n.tabSize||4]??d(l["1"],n.tabSize||4):" ")?" ":" ",w=r(s,!1),S=!1;function k(){if(b>1)return d(g,b)+d(m,o+y);let e=m.length*(o+y);return!v||e>c[x][g].length?g+d(m,o+y):e<=0?g:c[x][g][e]}function A(){let e=w.scan();for(b=0;15===e||14===e;)14===e&&n.keepLines?b+=1:14===e&&(b=1),e=w.scan();return S=16===e||0!==w.getTokenError(),e}let C=[];function E(n,r,o){!S&&(!t||r<f&&o>h)&&e.substring(r,o)!==n&&C.push({offset:r,length:o-r,content:n})}let T=A();if(n.keepLines&&b>0&&E(d(g,b),0,0),17!==T){let e=w.getTokenOffset()+a;E(m.length*o<20&&n.insertSpaces?l[m.length*o]:d(m,o),a,e)}for(;17!==T;){let e=w.getTokenOffset()+w.getTokenLength()+a,t=A(),r="",o=!1;for(;0===b&&(12===t||13===t);){let n=w.getTokenOffset()+a;E(l["1"],e,n),e=w.getTokenOffset()+w.getTokenLength()+a,r=(o=12===t)?k():"",t=A()}if(2===t)1!==T&&y--,n.keepLines&&b>0||!n.keepLines&&1!==T?r=k():n.keepLines&&(r=l["1"]);else if(4===t)3!==T&&y--,n.keepLines&&b>0||!n.keepLines&&3!==T?r=k():n.keepLines&&(r=l["1"]);else{switch(T){case 3:case 1:y++,r=n.keepLines&&b>0||!n.keepLines?k():l["1"];break;case 5:r=n.keepLines&&b>0||!n.keepLines?k():l["1"];break;case 12:r=k();break;case 13:b>0?r=k():!o&&(r=l["1"]);break;case 6:n.keepLines&&b>0?r=k():!o&&(r=l["1"]);break;case 10:n.keepLines&&b>0?r=k():6===t&&!o&&(r="");break;case 7:case 8:case 9:case 11:case 2:case 4:n.keepLines&&b>0?r=k():12!==t&&13!==t||o?5!==t&&17!==t&&(S=!0):r=l["1"];break;case 16:S=!0}b>0&&(12===t||13===t)&&(r=k())}17===t&&(r=n.keepLines&&b>0?k():n.insertFinalNewline?g:""),E(r,e,w.getTokenOffset()+a),T=t}return C}(o,s,a)).map(t=>V.PY.replace(V.e6.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length)),t.content))}(O=U||(U={}))[O.Object=0]="Object",O[O.Array=1]="Array";class eU{constructor(e,t){this.propertyName=e??"",this.beginningLineNumber=t,this.childrenProperties=[],this.lastProperty=!1,this.noKeyName=!1}addChildProperty(e){if(e.parent=this,this.childrenProperties.length>0){let t=0;(t=e.noKeyName?this.childrenProperties.length:function(e,t,n){let r=t.propertyName.toLowerCase(),o=e[0].propertyName.toLowerCase(),s=e[e.length-1].propertyName.toLowerCase();if(r<o)return 0;if(r>s)return e.length;let a=0,l=e.length-1;for(;a<=l;){let r=l+a>>1,o=n(t,e[r]);if(o>0)a=r+1;else{if(!(o<0))return r;l=r-1}}return-a-1}(this.childrenProperties,e,eV))<0&&(t=-1*t-1),this.childrenProperties.splice(t,0,e)}else this.childrenProperties.push(e);return e}}function eV(e,t){let n=e.propertyName.toLowerCase(),r=t.propertyName.toLowerCase();return n<r?-1:n>r?1:0}function eq(e,t,n){if(0!==t.childrenProperties.length)if(t.type===U.Object){let r=1/0;for(let e of t.childrenProperties)e.beginningLineNumber<r&&(r=e.beginningLineNumber);n+=r-t.beginningLineNumber,!function(e){e.sort((e,t)=>e.propertyName.localeCompare(t.propertyName))}(t.childrenProperties),e.push(new eW(n,t.childrenProperties))}else t.type===U.Array&&function e(t,n,r){for(let o of n.childrenProperties){if(o.type===U.Object){let e=1/0;for(let t of o.childrenProperties)t.beginningLineNumber<e&&(e=t.beginningLineNumber);let s=e-o.beginningLineNumber;t.push(new eW(r+o.beginningLineNumber-n.beginningLineNumber+s,o.childrenProperties))}o.type===U.Array&&e(t,o,r+o.beginningLineNumber-n.beginningLineNumber)}}(e,t,n)}class eW{constructor(e,t){this.beginningLineNumber=e,this.propertyTreeArray=t}}function eG(e,t){let n=[];return t.visit(r=>{if("property"===r.type&&"$ref"===r.keyNode.value&&r.valueNode?.type==="string"){let o=function(e,t){let n=function(e){return"#"===e?[]:"#"!==e[0]||"/"!==e[1]?null:e.substring(2).split(/\//).map(eK)}(t);return n?function e(t,n){if(!n)return null;if(0===t.length)return n;let r=t.shift();if(n&&"object"===n.type){let o=n.properties.find(e=>e.keyNode.value===r);return o?e(t,o.valueNode):null}if(n&&"array"===n.type&&r.match(/^(0|[1-9][0-9]*)$/)){let o=Number.parseInt(r),s=n.items[o];return s?e(t,s):null}return null}(n,e.root):null}(t,r.valueNode.value);if(o){let t=e.positionAt(o.offset);n.push({target:`${e.uri}#${t.line+1},${t.character+1}`,range:function(e,t){return V.e6.create(e.positionAt(t.offset+1),e.positionAt(t.offset+t.length-1))}(e,r.valueNode)})}}return!0}),Promise.resolve(n)}function eK(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function eY(e){let t=e.promiseConstructor||Promise,n=new eL(e.schemaRequestService,e.workspaceContext,t);n.setSchemaContributions(eM);let o=new ex(n,e.contributions,t,e.clientCapabilities),s=new ew(n,e.contributions,t),a=new eT(n),l=new ek(n,t);return{configure:e=>{n.clearExternalSchemas(),e.schemas?.forEach(n.registerExternalSchema.bind(n)),l.configure(e)},resetSchema:e=>n.onResourceChange(e),doValidation:l.doValidation.bind(l),getLanguageStatus:l.getLanguageStatus.bind(l),parseJSONDocument:e=>(function(e,t){let n,o=[],s=-1,a=e.getText(),l=r(a,!1),c=t&&t.collectComments?[]:void 0;function u(){for(;;){let t=l.scan();switch(function(){switch(l.getTokenError()){case 4:return p(G.t("Invalid unicode sequence in string."),F.InvalidUnicode);case 5:return p(G.t("Invalid escape character in string."),F.InvalidEscapeCharacter);case 3:return p(G.t("Unexpected end of number."),F.UnexpectedEndOfNumber);case 1:return p(G.t("Unexpected end of comment."),F.UnexpectedEndOfComment);case 2:return p(G.t("Unexpected end of string."),F.UnexpectedEndOfString);case 6:return p(G.t("Invalid characters in string. Control characters must be escaped."),F.InvalidCharacter)};}(),t){case 12:case 13:Array.isArray(c)&&c.push(V.e6.create(e.positionAt(l.getTokenOffset()),e.positionAt(l.getTokenOffset()+l.getTokenLength())));break;case 15:case 14:break;default:return t}}}function d(t,n,r,a,l=V.H_.Error){if(0===o.length||r!==s){let c=V.e6.create(e.positionAt(r),e.positionAt(a));o.push(V.R9.create(c,t,l,n,e.languageId)),s=r}}function p(e,t,n,r=[],o=[]){let s=l.getTokenOffset(),c=l.getTokenOffset()+l.getTokenLength();if(s===c&&s>0){for(s--;s>0&&/\s/.test(a.charAt(s));)s--;c=s+1}if(d(e,t,s,c),n&&h(n,!1),r.length+o.length>0){let e=l.getToken();for(;17!==e;){if(-1!==r.indexOf(e)){u();break}if(-1!==o.indexOf(e))break;e=u()}}return n}function h(e,t){return e.length=l.getTokenOffset()+l.getTokenLength()-e.offset,t&&u(),e}let f=new ee(void 0,0,0);function m(e){if(10!==l.getToken())return;let t=new ee(e,l.getTokenOffset());return t.value=l.getTokenValue(),h(t,!0)}function g(t){return function(e){if(3!==l.getToken())return;let t=new X(e,l.getTokenOffset());u();let n=!1;for(;4!==l.getToken()&&17!==l.getToken();){if(5===l.getToken()){!n&&p(G.t("Value expected"),F.ValueExpected);let e=l.getTokenOffset();if(u(),4===l.getToken()){n&&d(G.t("Trailing comma"),F.TrailingComma,e,e+1);continue}}else n&&p(G.t("Expected comma"),F.CommaExpected);let e=g(t);e?t.items.push(e):p(G.t("Value expected"),F.ValueExpected,void 0,[],[4,5]),n=!0}return 4!==l.getToken()?p(G.t("Expected comma or closing bracket"),F.CommaOrCloseBacketExpected,t):h(t,!0)}(t)||function(t){if(1!==l.getToken())return;let n=new en(t,l.getTokenOffset()),r=Object.create(null);u();let o=!1;for(;2!==l.getToken()&&17!==l.getToken();){if(5===l.getToken()){!o&&p(G.t("Property expected"),F.PropertyExpected);let e=l.getTokenOffset();if(u(),2===l.getToken()){o&&d(G.t("Trailing comma"),F.TrailingComma,e,e+1);continue}}else o&&p(G.t("Expected comma"),F.CommaExpected);let t=function(t,n){let r=new et(t,l.getTokenOffset(),f),o=m(r);if(!o){if(16!==l.getToken())return;{p(G.t("Property keys must be doublequoted"),F.PropertyKeysMustBeDoublequoted);let e=new ee(r,l.getTokenOffset(),l.getTokenLength());e.value=l.getTokenValue(),o=e,u()}}if(r.keyNode=o,"//"!==o.value){let e=n[o.value];e?(d(G.t("Duplicate object key"),F.DuplicateKey,r.keyNode.offset,r.keyNode.offset+r.keyNode.length,V.H_.Warning),S(e)&&d(G.t("Duplicate object key"),F.DuplicateKey,e.keyNode.offset,e.keyNode.offset+e.keyNode.length,V.H_.Warning),n[o.value]=!0):n[o.value]=r}if(6===l.getToken())r.colonOffset=l.getTokenOffset(),u();else if(p(G.t("Colon expected"),F.ColonExpected),10===l.getToken()&&e.positionAt(o.offset+o.length).line<e.positionAt(l.getTokenOffset()).line)return r.length=o.length,r;let s=g(r);return s?(r.valueNode=s,r.length=s.offset+s.length-r.offset,r):p(G.t("Value expected"),F.ValueExpected,r,[],[2,5])}(n,r);t?n.properties.push(t):p(G.t("Property expected"),F.PropertyExpected,void 0,[],[2,5]),o=!0}return 2!==l.getToken()?p(G.t("Expected comma or closing brace"),F.CommaOrCloseBraceExpected,n):h(n,!0)}(t)||m(t)||function(e){if(11!==l.getToken())return;let t=new Q(e,l.getTokenOffset());if(0===l.getTokenError()){let e=l.getTokenValue();try{let n=JSON.parse(e);if(!b(n))return p(G.t("Invalid number format."),F.Undefined,t);t.value=n}catch(e){return p(G.t("Invalid number format."),F.Undefined,t)}t.isInteger=-1===e.indexOf(".")}return h(t,!0)}(t)||function(e){switch(l.getToken()){case 7:return h(new Z(e,l.getTokenOffset()),!0);case 8:return h(new J(e,!0,l.getTokenOffset()),!0);case 9:return h(new J(e,!1,l.getTokenOffset()),!0);default:return}}(t)}return 17!==u()&&((n=g(n))?17!==l.getToken()&&p(G.t("End of file expected."),F.Undefined):p(G.t("Expected a JSON object, array or literal."),F.Undefined)),new em(n,o,c)})(e,{collectComments:!0}),newJSONDocument:(e,t,n)=>(function(e,t=[],n=[]){return new em(e,t,n)})(e,t,n),getMatchingSchemas:n.getMatchingSchemas.bind(n),doResolve:o.doResolve.bind(o),doComplete:o.doComplete.bind(o),findDocumentSymbols:a.findDocumentSymbols.bind(a),findDocumentSymbols2:a.findDocumentSymbols2.bind(a),findDocumentColors:a.findDocumentColors.bind(a),getColorPresentations:a.getColorPresentations.bind(a),doHover:s.doHover.bind(s),getFoldingRanges:ez,getSelectionRanges:eB,findDefinition:()=>Promise.resolve([]),findLinks:eG,format:(e,t,n)=>eH(e,n,t),sort:(e,t)=>(function(e,t){let n={...t,keepLines:!1},o=q.n.applyEdits(e,eH(e,n,void 0)),s=q.n.create("test://test.json","json",0,o),a=function(e){let t,n,o,s=r(e.getText(),!1),a=new eU,l=a,c=a,u=a;let d=0,p=0;let h=-1,f=-1,m=0,g=0,v=[],b=!1,y=!1;for(;17!==(t=s.scan());){if(!0===b&&14!==t&&15!==t&&12!==t&&13!==t&&void 0===c.endLineNumber){let e=s.getTokenStartLine();2===o||4===o?u.endLineNumber=e-1:c.endLineNumber=e-1,m=e,b=!1}if(!0===y&&14!==t&&15!==t&&12!==t&&13!==t&&(m=s.getTokenStartLine(),y=!1),s.getTokenStartLine()!==d){for(let t=d;t<s.getTokenStartLine();t++)p+=e.getText(V.e6.create(V.Ly.create(t,0),V.Ly.create(t+1,0))).length;d=s.getTokenStartLine()}switch(t){case 10:if(void 0===n||1===n||5===n&&v[v.length-1]===U.Object){let e=new eU(s.getTokenValue(),m);u=c,c=l.addChildProperty(e)}break;case 3:if(void 0===a.beginningLineNumber&&(a.beginningLineNumber=s.getTokenStartLine()),v[v.length-1]===U.Object)l=c;else if(v[v.length-1]===U.Array){let e=new eU(s.getTokenValue(),m);e.noKeyName=!0,u=c,l=c=l.addChildProperty(e)}v.push(U.Array),c.type=U.Array,m=s.getTokenStartLine(),m++;break;case 1:if(void 0===a.beginningLineNumber)a.beginningLineNumber=s.getTokenStartLine();else if(v[v.length-1]===U.Array){let e=new eU(s.getTokenValue(),m);e.noKeyName=!0,u=c,c=l.addChildProperty(e)}c.type=U.Object,v.push(U.Object),l=c,m=s.getTokenStartLine(),m++;break;case 4:g=s.getTokenStartLine(),v.pop(),void 0===c.endLineNumber&&(2===n||4===n)&&(c.endLineNumber=g-1,c.lastProperty=!0,c.lineWhereToAddComma=h,c.indexWhereToAddComa=f,u=c,l=c=c?c.parent:void 0),a.endLineNumber=g,m=g+1;break;case 2:g=s.getTokenStartLine(),v.pop(),1!==n&&(void 0===c.endLineNumber&&(c.endLineNumber=g-1,c.lastProperty=!0,c.lineWhereToAddComma=h,c.indexWhereToAddComa=f),u=c,l=c=c?c.parent:void 0),a.endLineNumber=s.getTokenStartLine(),m=g+1;break;case 5:g=s.getTokenStartLine(),void 0===c.endLineNumber&&(v[v.length-1]===U.Object||v[v.length-1]===U.Array&&(2===n||4===n))&&(c.endLineNumber=g,c.commaIndex=s.getTokenOffset()-p,c.commaLine=g),(2===n||4===n)&&(u=c,l=c=c?c.parent:void 0),m=g+1;break;case 13:5===n&&h===s.getTokenStartLine()&&(v[v.length-1]===U.Array&&(2===o||4===o)||v[v.length-1]===U.Object)&&(v[v.length-1]===U.Array&&(2===o||4===o)||v[v.length-1]===U.Object)&&(c.endLineNumber=void 0,b=!0),(1===n||3===n)&&h===s.getTokenStartLine()&&(y=!0)}14!==t&&13!==t&&12!==t&&15!==t&&(o=n,n=t,h=s.getTokenStartLine(),f=s.getTokenOffset()+s.getTokenLength()-p)}return a}(s),l=function(e,t){if(0===t.childrenProperties.length)return e;let n=q.n.create("test://test.json","json",0,e.getText()),r=[];for(eq(r,t,t.beginningLineNumber);r.length>0;){let t=r.shift(),o=t.propertyTreeArray,s=t.beginningLineNumber;for(let t=0;t<o.length;t++){let a=o[t],l=V.e6.create(V.Ly.create(a.beginningLineNumber,0),V.Ly.create(a.endLineNumber+1,0)),c=e.getText(l),u=q.n.create("test://test.json","json",0,c);if(!0===a.lastProperty&&t!==o.length-1){let e=a.lineWhereToAddComma-a.beginningLineNumber,t=a.indexWhereToAddComa,n={range:V.e6.create(V.Ly.create(e,t),V.Ly.create(e,t)),text:","};q.n.update(u,[n],1)}else if(!1===a.lastProperty&&t===o.length-1){let e=a.commaIndex,t=a.commaLine-a.beginningLineNumber,n={range:V.e6.create(V.Ly.create(t,e),V.Ly.create(t,e+1)),text:""};q.n.update(u,[n],1)}let d=a.endLineNumber-a.beginningLineNumber+1,p={range:V.e6.create(V.Ly.create(s,0),V.Ly.create(s+d,0)),text:u.getText()};q.n.update(n,[p],1),eq(r,a,s),s+=d}}return n}(s,a),c=eH(l,n,void 0),u=q.n.applyEdits(l,c);return[V.PY.replace(V.e6.create(V.Ly.create(0,0),e.positionAt(e.getText().length)),u)]})(e,t)}}},733216:function(e){"use strict";var t,n=function(){};e.exports=n},280990:function(e,t,n){"use strict";n.d(t,{D:()=>_});var r,o,s,a,l,c,u,d=n("808549"),p=n("120454"),h=n("455069"),f=n("893134"),m=n("642427"),g=n("562590"),v=n("655461"),b=n("808217"),y=n("461716"),x=n("607919"),w=n("609540"),S=n("244789"),k=(r=new WeakMap,o=new WeakMap,s=new WeakMap,a=new WeakMap,l=new WeakSet,c=new WeakSet,u=class extends w.l{bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var t,n=this.options;this.options=(0,f._)(this,r).defaultMutationOptions(e),!(0,S.VS)(n,this.options)&&(0,f._)(this,r).getMutationCache().notify({type:"observerOptionsUpdated",mutation:(0,f._)(this,s),observer:this}),null===(t=(0,f._)(this,s))||void 0===t||t.setOptions(this.options)}onUnsubscribe(){if(!this.hasListeners()){var e;null===(e=(0,f._)(this,s))||void 0===e||e.removeObserver(this)}}onMutationUpdate(e){(0,v._)(this,l,A).call(this),(0,v._)(this,c,C).call(this,e)}getCurrentResult(){return(0,f._)(this,o)}reset(){var e;null===(e=(0,f._)(this,s))||void 0===e||e.removeObserver(this),(0,g._)(this,s,void 0),(0,v._)(this,l,A).call(this),(0,v._)(this,c,C).call(this)}mutate(e,t){var n;return(0,g._)(this,a,t),null===(n=(0,f._)(this,s))||void 0===n||n.removeObserver(this),(0,g._)(this,s,(0,f._)(this,r).getMutationCache().build((0,f._)(this,r),this.options)),(0,f._)(this,s).addObserver(this),(0,f._)(this,s).execute(e)}constructor(e,t){super(),(0,b._)(this,l),(0,b._)(this,c),(0,m._)(this,r,{writable:!0,value:void 0}),(0,m._)(this,o,{writable:!0,value:void 0}),(0,m._)(this,s,{writable:!0,value:void 0}),(0,m._)(this,a,{writable:!0,value:void 0}),(0,g._)(this,o,void 0),(0,g._)(this,r,e),this.setOptions(t),this.bindMethods(),(0,v._)(this,l,A).call(this)}});function A(){var e,t,n=null!==(t=null===(e=(0,f._)(this,s))||void 0===e?void 0:e.state)&&void 0!==t?t:(0,y.R)();(0,g._)(this,o,(0,p._)((0,d._)({},n),{isPending:"pending"===n.status,isSuccess:"success"===n.status,isError:"error"===n.status,isIdle:"idle"===n.status,mutate:this.mutate,reset:this.reset}))}function C(e){x.V.batch(()=>{if((0,f._)(this,a)&&this.hasListeners()){var t,n,r,s,l,c,u,d;(null==e?void 0:e.type)==="success"?(null===(t=(n=(0,f._)(this,a)).onSuccess)||void 0===t||t.call(n,e.data,(0,f._)(this,o).variables,(0,f._)(this,o).context),null===(r=(s=(0,f._)(this,a)).onSettled)||void 0===r||r.call(s,e.data,null,(0,f._)(this,o).variables,(0,f._)(this,o).context)):(null==e?void 0:e.type)==="error"&&(null===(l=(c=(0,f._)(this,a)).onError)||void 0===l||l.call(c,e.error,(0,f._)(this,o).variables,(0,f._)(this,o).context),null===(u=(d=(0,f._)(this,a)).onSettled)||void 0===u||u.call(d,void 0,e.error,(0,f._)(this,o).variables,(0,f._)(this,o).context))}this.listeners.forEach(e=>{e((0,f._)(this,o))})})}var E=n("527116"),T=n("379298");function _(e,t){var n=(0,E.NL)(t),[r]=h.useState(()=>new k(n,e));h.useEffect(()=>{r.setOptions(e)},[r,e]);var o=h.useSyncExternalStore(h.useCallback(e=>r.subscribe(x.V.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=h.useCallback((e,t)=>{r.mutate(e,t).catch(O)},[r]);if(o.error&&(0,T.L)(r.options.throwOnError,[o.error]))throw o.error;return(0,p._)((0,d._)({},o),{mutate:s,mutateAsync:o.mutate})}function O(){}},255763:function(e,t,n){"use strict";n.d(t,{M2:function(){return ey}});var r,o=n(808549),s=n(120454);function a(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var l=a();function c(e){l=e}var u={exec:()=>null};function d(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n="string"==typeof e?e:e.source,r={replace:(e,t)=>{var o="string"==typeof t?t:t.source;return o=o.replace(p.caret,"$1"),n=n.replace(e,o),r},getRegex:()=>new RegExp(n,t)};return r}var p={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:RegExp("[\\p{L}\\p{N}]","u"),escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp("^( {0,3}".concat(e,")((?:[ ][^\\n]*)?(?:\\n|$))")),nextBulletRegex:e=>new RegExp("^ {0,".concat(Math.min(3,e-1),"}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))")),hrRegex:e=>new RegExp("^ {0,".concat(Math.min(3,e-1),"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)")),fencesBeginRegex:e=>new RegExp("^ {0,".concat(Math.min(3,e-1),"}(?:```|~~~)")),headingBeginRegex:e=>new RegExp("^ {0,".concat(Math.min(3,e-1),"}#")),htmlBeginRegex:e=>RegExp("^ {0,".concat(Math.min(3,e-1),"}<(?:[a-z].*>|!--)"),"i")},h=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,f=/(?:[*+-]|\d{1,9}[.)])/,m=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,g=d(m).replace(/bull/g,f).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),v=d(m).replace(/bull/g,f).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),b=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,y=/(?!\s*\])(?:\\.|[^\[\]\\])+/,x=d(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",y).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),w=d(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,f).getRegex(),S="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",k=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,A=d("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",k).replace("tag",S).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),C=d(b).replace("hr",h).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",S).getRegex(),E={blockquote:d(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",C).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:x,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:h,html:A,lheading:g,list:w,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:C,table:u,text:/^[^\n]+/},T=d("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",h).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",S).getRegex(),_=(0,s._)((0,o._)({},E),{lheading:v,table:T,paragraph:d(b).replace("hr",h).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",T).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",S).getRegex()}),O=(0,s._)((0,o._)({},E),{html:d("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",k).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:u,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:d(b).replace("hr",h).replace("heading"," *#{1,6} *[^\n]").replace("lheading",g).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),M=/^( {2,}|\\)\n(?!\s*$)/,I=RegExp("[\\p{P}\\p{S}]","u"),P=RegExp("[\\s\\p{P}\\p{S}]","u"),D=RegExp("[^\\s\\p{P}\\p{S}]","u"),N=d(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,P).getRegex(),R=RegExp("(?!~)[\\p{P}\\p{S}]","u"),L=RegExp("(?!~)[\\s\\p{P}\\p{S}]","u"),j=RegExp("(?:[^\\s\\p{P}\\p{S}]|~)","u"),$=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,F=d($,"u").replace(/punct/g,I).getRegex(),z=d($,"u").replace(/punct/g,R).getRegex(),B="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",H=d(B,"gu").replace(/notPunctSpace/g,D).replace(/punctSpace/g,P).replace(/punct/g,I).getRegex(),U=d(B,"gu").replace(/notPunctSpace/g,j).replace(/punctSpace/g,L).replace(/punct/g,R).getRegex(),V=d("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,D).replace(/punctSpace/g,P).replace(/punct/g,I).getRegex(),q=d(/\\(punct)/,"gu").replace(/punct/g,I).getRegex(),W=d(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),G=d(k).replace("(?:--\x3e|$)","--\x3e").getRegex(),K=d("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",G).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Y=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Z=d(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Y).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),J=d(/^!?\[(label)\]\[(ref)\]/).replace("label",Y).replace("ref",y).getRegex(),X=d(/^!?\[(ref)\](?:\[\])?/).replace("ref",y).getRegex(),Q=d("reflink|nolink(?!\\()","g").replace("reflink",J).replace("nolink",X).getRegex(),ee={_backpedal:u,anyPunctuation:q,autolink:W,blockSkip:/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,br:M,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:u,emStrongLDelim:F,emStrongRDelimAst:H,emStrongRDelimUnd:V,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:Z,nolink:X,punctuation:N,reflink:J,reflinkSearch:Q,tag:K,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:u},et=(0,s._)((0,o._)({},ee),{link:d(/^!?\[(label)\]\((.*?)\)/).replace("label",Y).getRegex(),reflink:d(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Y).getRegex()}),en=(0,s._)((0,o._)({},ee),{emStrongRDelimAst:U,emStrongLDelim:z,url:d(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),er=(0,s._)((0,o._)({},en),{br:d(M).replace("{2,}","*").getRegex(),text:d(en.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),ei={normal:E,gfm:_,pedantic:O},eo={normal:ee,gfm:en,breaks:er,pedantic:et},es={"&":"&","<":"<",">":">",'"':""","'":"'"},ea=e=>es[e];function el(e,t){if(t){if(p.escapeTest.test(e))return e.replace(p.escapeReplace,ea)}else if(p.escapeTestNoEncode.test(e))return e.replace(p.escapeReplaceNoEncode,ea);return e}function ec(e){try{e=encodeURI(e).replace(p.percentDecode,"%")}catch(e){return null}return e}function eu(e,t){var n,r=e.replace(p.findPipe,(e,t,n)=>{for(var r=!1,o=t;--o>=0&&"\\"===n[o];)r=!r;return r?"|":" |"}).split(p.splitPipe),o=0;if(!r[0].trim()&&r.shift(),r.length>0&&!(null===(n=r.at(-1))||void 0===n?void 0:n.trim())&&r.pop(),t){if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("")}for(;o<r.length;o++)r[o]=r[o].trim().replace(p.slashPipe,"|");return r}function ed(e,t,n){var r=e.length;if(0===r)return"";for(var o=0;o<r;){var s=e.charAt(r-o-1);if(s!==t||n){if(s!==t&&n)o++;else break}else o++}return e.slice(0,r-o)}function ep(e,t,n,r,o){var s=t.href,a=t.title||null,l=e[1].replace(o.other.outputLinkReplace,"$1");r.state.inLink=!0;var c={type:"!"===e[0].charAt(0)?"image":"link",raw:n,href:s,title:a,text:l,tokens:r.inlineTokens(l)};return r.state.inLink=!1,c}var eh=class{space(e){var t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){var t=this.rules.block.code.exec(e);if(t){var n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:ed(n,"\n")}}}fences(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=function(e,t,n){var r=e.match(n.other.indentCodeCompensation);if(null===r)return t;var o=r[1];return t.split("\n").map(e=>{var t=e.match(n.other.beginningSpace);if(null===t)return e;var[r]=t;return r.length>=o.length?e.slice(o.length):e}).join("\n")}(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){var t=this.rules.block.heading.exec(e);if(t){var n=t[2].trim();if(this.rules.other.endingHash.test(n)){var r=ed(n,"#");this.options.pedantic?n=r.trim():(!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){var t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:ed(t[0],"\n")}}blockquote(e){var t=this.rules.block.blockquote.exec(e);if(t){for(var n=ed(t[0],"\n").split("\n"),r="",o="",s=[];n.length>0;){var a=!1,l=[],c=void 0;for(c=0;c<n.length;c++)if(this.rules.other.blockquoteStart.test(n[c]))l.push(n[c]),a=!0;else if(a)break;else l.push(n[c]);n=n.slice(c);var u=l.join("\n"),d=u.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");r=r?"".concat(r,"\n").concat(u):u,o=o?"".concat(o,"\n").concat(d):d;var p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,s,!0),this.lexer.state.top=p,0===n.length)break;var h=s.at(-1);if((null==h?void 0:h.type)==="code")break;if((null==h?void 0:h.type)==="blockquote"){var f=h.raw+"\n"+n.join("\n"),m=this.blockquote(f);s[s.length-1]=m,r=r.substring(0,r.length-h.raw.length)+m.raw,o=o.substring(0,o.length-h.text.length)+m.text;break}else if((null==h?void 0:h.type)==="list"){var g=h.raw+"\n"+n.join("\n"),v=this.list(g);s[s.length-1]=v,r=r.substring(0,r.length-h.raw.length)+v.raw,o=o.substring(0,o.length-h.raw.length)+v.raw,n=g.substring(s.at(-1).raw.length).split("\n");continue}}return{type:"blockquote",raw:r,tokens:s,text:o}}}list(e){var t=this.rules.block.list.exec(e);if(t){var n=t[1].trim(),r=n.length>1,o={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?"\\d{1,9}\\".concat(n.slice(-1)):"\\".concat(n),this.options.pedantic&&(n=r?n:"[*+-]");for(var s=this.rules.other.listItemRegex(n),a=!1;e;){var l=!1,c="",u="";if(!(t=s.exec(e))||this.rules.block.hr.test(e))break;c=t[0],e=e.substring(c.length);var d=t[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,e=>" ".repeat(3*e.length)),p=e.split("\n",1)[0],h=!d.trim(),f=0;if(this.options.pedantic?(f=2,u=d.trimStart()):h?f=t[1].length+1:(f=(f=t[2].search(this.rules.other.nonSpaceChar))>4?1:f,u=d.slice(f),f+=t[1].length),h&&this.rules.other.blankLine.test(p)&&(c+=p+"\n",e=e.substring(p.length+1),l=!0),!l){for(var m=this.rules.other.nextBulletRegex(f),g=this.rules.other.hrRegex(f),v=this.rules.other.fencesBeginRegex(f),b=this.rules.other.headingBeginRegex(f),y=this.rules.other.htmlBeginRegex(f);e;){var x=e.split("\n",1)[0],w=void 0;if(p=x,w=this.options.pedantic?p=p.replace(this.rules.other.listReplaceNesting," "):p.replace(this.rules.other.tabCharGlobal," "),v.test(p)||b.test(p)||y.test(p)||m.test(p)||g.test(p))break;if(w.search(this.rules.other.nonSpaceChar)>=f||!p.trim())u+="\n"+w.slice(f);else{if(h||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||v.test(d)||b.test(d)||g.test(d))break;u+="\n"+p}!h&&!p.trim()&&(h=!0),c+=x+"\n",e=e.substring(x.length+1),d=w.slice(f)}}!o.loose&&(a?o.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(a=!0));var S=null,k=void 0;this.options.gfm&&(S=this.rules.other.listIsTask.exec(u))&&(k="[ ] "!==S[0],u=u.replace(this.rules.other.listReplaceTask,"")),o.items.push({type:"list_item",raw:c,task:!!S,checked:k,loose:!1,text:u,tokens:[]}),o.raw+=c}var A=o.items.at(-1);if(!A)return;A.raw=A.raw.trimEnd(),A.text=A.text.trimEnd();o.raw=o.raw.trimEnd();for(var C=0;C<o.items.length;C++)if(this.lexer.state.top=!1,o.items[C].tokens=this.lexer.blockTokens(o.items[C].text,[]),!o.loose){var E=o.items[C].tokens.filter(e=>"space"===e.type),T=E.length>0&&E.some(e=>this.rules.other.anyLine.test(e.raw));o.loose=T}if(o.loose)for(var _=0;_<o.items.length;_++)o.items[_].loose=!0;return o}}html(e){var t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}def(e){var t=this.rules.block.def.exec(e);if(t){var n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:r,title:o}}}table(e){var t,n=this.rules.block.table.exec(e);if(!n||!this.rules.other.tableDelimiter.test(n[2]))return;var r=eu(n[1]),o=n[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=(null===(t=n[3])||void 0===t?void 0:t.trim())?n[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],a={type:"table",raw:n[0],header:[],align:[],rows:[]};if(r.length===o.length){for(var l of o)this.rules.other.tableAlignRight.test(l)?a.align.push("right"):this.rules.other.tableAlignCenter.test(l)?a.align.push("center"):this.rules.other.tableAlignLeft.test(l)?a.align.push("left"):a.align.push(null);for(var c=0;c<r.length;c++)a.header.push({text:r[c],tokens:this.lexer.inline(r[c]),header:!0,align:a.align[c]});for(var u of s)a.rows.push(eu(u,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){var t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){var t=this.rules.block.paragraph.exec(e);if(t){var n="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){var t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){var t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){var t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){var t=this.rules.inline.link.exec(e);if(t){var n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;var r=ed(n.slice(0,-1),"\\");if((n.length-r.length)%2==0)return}else{var o=function(e,t){if(-1===e.indexOf(")"))return -1;for(var n=0,r=0;r<e.length;r++)if("\\"===e[r])r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&--n<0)return r;return n>0?-2:-1}(t[2],"()");if(-2===o)return;if(o>-1){var s=(0===t[0].indexOf("!")?5:4)+t[1].length+o;t[2]=t[2].substring(0,o),t[0]=t[0].substring(0,s).trim(),t[3]=""}}var a=t[2],l="";if(this.options.pedantic){var c=this.rules.other.pedanticHrefTitle.exec(a);c&&(a=c[1],l=c[3])}else l=t[3]?t[3].slice(1,-1):"";return a=a.trim(),this.rules.other.startAngleBracket.test(a)&&(a=this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?a.slice(1):a.slice(1,-1)),ep(t,{href:a?a.replace(this.rules.inline.anyPunctuation,"$1"):a,title:l?l.replace(this.rules.inline.anyPunctuation,"$1"):l},t[0],this.lexer,this.rules)}}reflink(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var r=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!r){var o=n[0].charAt(0);return{type:"text",raw:o,text:o}}return ep(n,r,n[0],this.lexer,this.rules)}}emStrong(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this.rules.inline.emStrongLDelim.exec(e);if(!!r){if(!(r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){var o,s,a=[...r[0]].length-1,l=a,c=0,u="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,t=t.slice(-1*e.length+a);null!=(r=u.exec(t));){if(!(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6]))continue;if(s=[...o].length,r[3]||r[4]){l+=s;continue}if((r[5]||r[6])&&a%3&&!((a+s)%3)){c+=s;continue}if(!((l-=s)>0)){s=Math.min(s,s+l+c);var d=[...r[0]][0].length,p=e.slice(0,a+r.index+d+s);if(Math.min(a,s)%2){var h=p.slice(1,-1);return{type:"em",raw:p,text:h,tokens:this.lexer.inlineTokens(h)}}var f=p.slice(2,-2);return{type:"strong",raw:p,text:f,tokens:this.lexer.inlineTokens(f)}}}}}}codespan(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),o=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&o&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){var t,n,r=this.rules.inline.autolink.exec(e);if(r)return n="@"===r[2]?"mailto:"+(t=r[1]):t=r[1],{type:"link",raw:r[0],text:t,href:n,tokens:[{type:"text",raw:t,text:t}]}}url(e){var t,n,r,o,s,a;if(t=this.rules.inline.url.exec(e)){if("@"===t[2])r="mailto:"+(n=t[0]);else{do o=t[0],t[0]=null!==(a=null===(s=this.rules.inline._backpedal.exec(t[0]))||void 0===s?void 0:s[0])&&void 0!==a?a:"";while(o!==t[0]);n=t[0],r="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){var t=this.rules.inline.text.exec(e);if(t){var n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}constructor(e){this.options=e||l}},ef=class e{static get rules(){return{block:ei,inline:eo}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(p.carriageReturn,"\n"),this.blockTokens(e,this.tokens);for(var t=0;t<this.inlineQueue.length;t++){var n=this.inlineQueue[t];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(this.options.pedantic&&(e=e.replace(p.tabCharGlobal," ").replace(p.spaceLine,""));e&&"break"!==(t=this,function(){var o,s,a,l=void 0;if(null===(s=t.options.extensions)||void 0===s?void 0:null===(o=s.block)||void 0===o?void 0:o.some(r=>!!(l=r.call({lexer:t},e,n))&&(e=e.substring(l.raw.length),n.push(l),!0)))return"continue";if(l=t.tokenizer.space(e)){e=e.substring(l.raw.length);var c=n.at(-1);return 1===l.raw.length&&void 0!==c?c.raw+="\n":n.push(l),"continue"}if(l=t.tokenizer.code(e)){e=e.substring(l.raw.length);var u=n.at(-1);return(null==u?void 0:u.type)==="paragraph"||(null==u?void 0:u.type)==="text"?(u.raw+="\n"+l.raw,u.text+="\n"+l.text,t.inlineQueue.at(-1).src=u.text):n.push(l),"continue"}if((l=t.tokenizer.fences(e))||(l=t.tokenizer.heading(e))||(l=t.tokenizer.hr(e))||(l=t.tokenizer.blockquote(e))||(l=t.tokenizer.list(e))||(l=t.tokenizer.html(e)))return e=e.substring(l.raw.length),n.push(l),"continue";if(l=t.tokenizer.def(e)){e=e.substring(l.raw.length);var d=n.at(-1);return(null==d?void 0:d.type)==="paragraph"||(null==d?void 0:d.type)==="text"?(d.raw+="\n"+l.raw,d.text+="\n"+l.raw,t.inlineQueue.at(-1).src=d.text):!t.tokens.links[l.tag]&&(t.tokens.links[l.tag]={href:l.href,title:l.title}),"continue"}if((l=t.tokenizer.table(e))||(l=t.tokenizer.lheading(e)))return e=e.substring(l.raw.length),n.push(l),"continue";var p=e;if(null===(a=t.options.extensions)||void 0===a?void 0:a.startBlock){var h=1/0,f=e.slice(1),m=void 0;t.options.extensions.startBlock.forEach(e=>{"number"==typeof(m=e.call({lexer:t},f))&&m>=0&&(h=Math.min(h,m))}),h<1/0&&h>=0&&(p=e.substring(0,h+1))}if(t.state.top&&(l=t.tokenizer.paragraph(p))){var g=n.at(-1);return r&&(null==g?void 0:g.type)==="paragraph"?(g.raw+="\n"+l.raw,g.text+="\n"+l.text,t.inlineQueue.pop(),t.inlineQueue.at(-1).src=g.text):n.push(l),r=p.length!==e.length,e=e.substring(l.raw.length),"continue"}if(l=t.tokenizer.text(e)){e=e.substring(l.raw.length);var v=n.at(-1);return(null==v?void 0:v.type)==="text"?(v.raw+="\n"+l.raw,v.text+="\n"+l.text,t.inlineQueue.pop(),t.inlineQueue.at(-1).src=v.text):n.push(l),"continue"}if(e){var b="Infinite loop on byte: "+e.charCodeAt(0);if(t.options.silent)return console.error(b),"break";throw Error(b)}}()););return this.state.top=!0,n}inline(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=e,o=null;if(this.tokens.links){var s=Object.keys(this.tokens.links);if(s.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(r));)s.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.anyPunctuation.exec(r));)r=r.slice(0,o.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(r));)r=r.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(var a=!1,l="";e&&"break"!==(t=this,function(){!a&&(l=""),a=!1;var o,s,c,u=void 0;if(null===(s=t.options.extensions)||void 0===s?void 0:null===(o=s.inline)||void 0===o?void 0:o.some(r=>!!(u=r.call({lexer:t},e,n))&&(e=e.substring(u.raw.length),n.push(u),!0)))return"continue";if((u=t.tokenizer.escape(e))||(u=t.tokenizer.tag(e))||(u=t.tokenizer.link(e)))return e=e.substring(u.raw.length),n.push(u),"continue";if(u=t.tokenizer.reflink(e,t.tokens.links)){e=e.substring(u.raw.length);var d=n.at(-1);return"text"===u.type&&(null==d?void 0:d.type)==="text"?(d.raw+=u.raw,d.text+=u.text):n.push(u),"continue"}if((u=t.tokenizer.emStrong(e,r,l))||(u=t.tokenizer.codespan(e))||(u=t.tokenizer.br(e))||(u=t.tokenizer.del(e))||(u=t.tokenizer.autolink(e))||!t.state.inLink&&(u=t.tokenizer.url(e)))return e=e.substring(u.raw.length),n.push(u),"continue";var p=e;if(null===(c=t.options.extensions)||void 0===c?void 0:c.startInline){var h=1/0,f=e.slice(1),m=void 0;t.options.extensions.startInline.forEach(e=>{"number"==typeof(m=e.call({lexer:t},f))&&m>=0&&(h=Math.min(h,m))}),h<1/0&&h>=0&&(p=e.substring(0,h+1))}if(u=t.tokenizer.inlineText(p)){e=e.substring(u.raw.length),"_"!==u.raw.slice(-1)&&(l=u.raw.slice(-1)),a=!0;var g=n.at(-1);return(null==g?void 0:g.type)==="text"?(g.raw+=u.raw,g.text+=u.text):n.push(u),"continue"}if(e){var v="Infinite loop on byte: "+e.charCodeAt(0);if(t.options.silent)return console.error(v),"break";throw Error(v)}}()););return n}constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||l,this.options.tokenizer=this.options.tokenizer||new eh,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};var t={other:p,block:ei.normal,inline:eo.normal};this.options.pedantic?(t.block=ei.pedantic,t.inline=eo.pedantic):this.options.gfm&&(t.block=ei.gfm,this.options.breaks?t.inline=eo.breaks:t.inline=eo.gfm),this.tokenizer.rules=t}},em=class{space(e){return""}code(e){var t,{text:n,lang:r,escaped:o}=e,s=null===(t=(r||"").match(p.notSpaceStart))||void 0===t?void 0:t[0],a=n.replace(p.endingNewline,"")+"\n";return s?'<pre><code class="language-'+el(s)+'">'+(o?a:el(a,!0))+"</code></pre>\n":"<pre><code>"+(o?a:el(a,!0))+"</code></pre>\n"}blockquote(e){var{tokens:t}=e,n=this.parser.parse(t);return"<blockquote>\n".concat(n,"</blockquote>\n")}html(e){var{text:t}=e;return t}heading(e){var{tokens:t,depth:n}=e;return"<h".concat(n,">").concat(this.parser.parseInline(t),"</h").concat(n,">\n")}hr(e){return"<hr>\n"}list(e){for(var t=e.ordered,n=e.start,r="",o=0;o<e.items.length;o++){var s=e.items[o];r+=this.listitem(s)}var a=t?"ol":"ul";return"<"+a+(t&&1!==n?' start="'+n+'"':"")+">\n"+r+"</"+a+">\n"}listitem(e){var t="";if(e.task){var n,r=this.checkbox({checked:!!e.checked});e.loose?(null===(n=e.tokens[0])||void 0===n?void 0:n.type)==="paragraph"?(e.tokens[0].text=r+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=r+" "+el(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):t+=r+" "}return t+=this.parser.parse(e.tokens,!!e.loose),"<li>".concat(t,"</li>\n")}checkbox(e){var{checked:t}=e;return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(e){var{tokens:t}=e;return"<p>".concat(this.parser.parseInline(t),"</p>\n")}table(e){for(var t="",n="",r=0;r<e.header.length;r++)n+=this.tablecell(e.header[r]);t+=this.tablerow({text:n});for(var o="",s=0;s<e.rows.length;s++){var a=e.rows[s];n="";for(var l=0;l<a.length;l++)n+=this.tablecell(a[l]);o+=this.tablerow({text:n})}return o&&(o="<tbody>".concat(o,"</tbody>")),"<table>\n<thead>\n"+t+"</thead>\n"+o+"</table>\n"}tablerow(e){var{text:t}=e;return"<tr>\n".concat(t,"</tr>\n")}tablecell(e){var t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?"<".concat(n,' align="').concat(e.align,'">'):"<".concat(n,">"))+t+"</".concat(n,">\n")}strong(e){var{tokens:t}=e;return"<strong>".concat(this.parser.parseInline(t),"</strong>")}em(e){var{tokens:t}=e;return"<em>".concat(this.parser.parseInline(t),"</em>")}codespan(e){var{text:t}=e;return"<code>".concat(el(t,!0),"</code>")}br(e){return"<br>"}del(e){var{tokens:t}=e;return"<del>".concat(this.parser.parseInline(t),"</del>")}link(e){var{href:t,title:n,tokens:r}=e,o=this.parser.parseInline(r),s=ec(t);if(null===s)return o;var a='<a href="'+(t=s)+'"';return n&&(a+=' title="'+el(n)+'"'),a+=">"+o+"</a>"}image(e){var{href:t,title:n,text:r,tokens:o}=e;o&&(r=this.parser.parseInline(o,this.parser.textRenderer));var s=ec(t);if(null===s)return el(r);t=s;var a='<img src="'.concat(t,'" alt="').concat(r,'"');return n&&(a+=' title="'.concat(el(n),'"')),a+=">"}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:el(e.text)}constructor(e){this.options=e||l}},eg=class{strong(e){var{text:t}=e;return t}em(e){var{text:t}=e;return t}codespan(e){var{text:t}=e;return t}del(e){var{text:t}=e;return t}html(e){var{text:t}=e;return t}text(e){var{text:t}=e;return t}link(e){var{text:t}=e;return""+t}image(e){var{text:t}=e;return""+t}br(){return""}},ev=class e{static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){for(var t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],n="",r=0;r<e.length;r++){var o,s,a=e[r];if(null===(s=this.options.extensions)||void 0===s?void 0:null===(o=s.renderers)||void 0===o?void 0:o[a.type]){var l=this.options.extensions.renderers[a.type].call({parser:this},a);if(!1!==l||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(a.type)){n+=l||"";continue}}switch(a.type){case"space":n+=this.renderer.space(a);continue;case"hr":n+=this.renderer.hr(a);continue;case"heading":n+=this.renderer.heading(a);continue;case"code":n+=this.renderer.code(a);continue;case"table":n+=this.renderer.table(a);continue;case"blockquote":n+=this.renderer.blockquote(a);continue;case"list":n+=this.renderer.list(a);continue;case"html":n+=this.renderer.html(a);continue;case"paragraph":n+=this.renderer.paragraph(a);continue;case"text":for(var c=a,u=this.renderer.text(c);r+1<e.length&&"text"===e[r+1].type;)c=e[++r],u+="\n"+this.renderer.text(c);t?n+=this.renderer.paragraph({type:"paragraph",raw:u,text:u,tokens:[{type:"text",raw:u,text:u,escaped:!0}]}):n+=u;continue;default:var d='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw Error(d)}}return n}parseInline(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.renderer,n="",r=0;r<e.length;r++){var o,s,a=e[r];if(null===(s=this.options.extensions)||void 0===s?void 0:null===(o=s.renderers)||void 0===o?void 0:o[a.type]){var l=this.options.extensions.renderers[a.type].call({parser:this},a);if(!1!==l||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){n+=l||"";continue}}switch(a.type){case"escape":case"text":n+=t.text(a);break;case"html":n+=t.html(a);break;case"link":n+=t.link(a);break;case"image":n+=t.image(a);break;case"strong":n+=t.strong(a);break;case"em":n+=t.em(a);break;case"codespan":n+=t.codespan(a);break;case"br":n+=t.br(a);break;case"del":n+=t.del(a);break;default:var c='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw Error(c)}}return n}constructor(e){this.options=e||l,this.options.renderer=this.options.renderer||new em,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new eg}},eb=((r=class{preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?ef.lex:ef.lexInline}provideParser(){return this.block?ev.parse:ev.parseInline}constructor(e){this.options=e||l}}).passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]),r),ey=class{walkTokens(e,t){var n,r=function(e){switch(o=o.concat(t.call(n,e)),e.type){case"table":for(var r of e.header)o=o.concat(n.walkTokens(r.tokens,t));for(var s of e.rows)for(var a of s)o=o.concat(n.walkTokens(a.tokens,t));break;case"list":o=o.concat(n.walkTokens(e.items,t));break;default:var l,c;(null===(c=n.defaults.extensions)||void 0===c?void 0:null===(l=c.childTokens)||void 0===l?void 0:l[e.type])?n.defaults.extensions.childTokens[e.type].forEach(r=>{var s=e[r].flat(1/0);o=o.concat(n.walkTokens(s,t))}):e.tokens&&(o=o.concat(n.walkTokens(e.tokens,t)))}},o=[];for(var s of e)n=this,r(s);return o}use(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(e=>{var t=(0,o._)({},e);if(t.async=this.defaults.async||t.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error("extension name required");if("renderer"in e){var t=r.renderers[e.name];t?r.renderers[e.name]=function(){for(var n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];var s=e.renderer.apply(this,r);return!1===s&&(s=t.apply(this,r)),s}:r.renderers[e.name]=e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw Error("extension level must be 'block' or 'inline'");var n=r[e.level];n?n.unshift(e.tokenizer):r[e.level]=[e.tokenizer],e.start&&("block"===e.level?r.startBlock?r.startBlock.push(e.start):r.startBlock=[e.start]:"inline"===e.level&&(r.startInline?r.startInline.push(e.start):r.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(r.childTokens[e.name]=e.childTokens)}),t.extensions=r),e.renderer){var n=this.defaults.renderer||new em(this.defaults);for(var s in e.renderer)!function(t){if(!(t in n))throw Error("renderer '".concat(t,"' does not exist"));if(["options","parser"].includes(t))return;var r=e.renderer[t],o=n[t];n[t]=function(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];var a=r.apply(n,t);return!1===a&&(a=o.apply(n,t)),a||""}}(s);t.renderer=n}if(e.tokenizer){var a=this.defaults.tokenizer||new eh(this.defaults);for(var l in e.tokenizer)!function(t){if(!(t in a))throw Error("tokenizer '".concat(t,"' does not exist"));if(["options","rules","lexer"].includes(t))return;var n=e.tokenizer[t],r=a[t];a[t]=function(){for(var e=arguments.length,t=Array(e),o=0;o<e;o++)t[o]=arguments[o];var s=n.apply(a,t);return!1===s&&(s=r.apply(a,t)),s}}(l);t.tokenizer=a}if(e.hooks){var c,u=this.defaults.hooks||new eb;for(var d in e.hooks)c=this,function(t){if(!(t in u))throw Error("hook '".concat(t,"' does not exist"));if(["options","block"].includes(t))return;var n=e.hooks[t],r=u[t];eb.passThroughHooks.has(t)?u[t]=e=>{if(c.defaults.async)return Promise.resolve(n.call(u,e)).then(e=>r.call(u,e));var t=n.call(u,e);return r.call(u,t)}:u[t]=function(){for(var e=arguments.length,t=Array(e),o=0;o<e;o++)t[o]=arguments[o];var s=n.apply(u,t);return!1===s&&(s=r.apply(u,t)),s}}(d);t.hooks=u}if(e.walkTokens){var p=this.defaults.walkTokens,h=e.walkTokens;t.walkTokens=function(e){var t=[];return t.push(h.call(this,e)),p&&(t=t.concat(p.call(this,e))),t}}this.defaults=(0,o._)({},this.defaults,t)}),this}setOptions(e){return this.defaults=(0,o._)({},this.defaults,e),this}lexer(e,t){return ef.lex(e,null!=t?t:this.defaults)}parser(e,t){return ev.parse(e,null!=t?t:this.defaults)}parseMarkdown(e){return(t,n)=>{var r=(0,o._)({},n),s=(0,o._)({},this.defaults,r),a=this.onError(!!s.silent,!!s.async);if(!0===this.defaults.async&&!1===r.async)return a(Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(null==t)return a(Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return a(Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));s.hooks&&(s.hooks.options=s,s.hooks.block=e);var l=s.hooks?s.hooks.provideLexer():e?ef.lex:ef.lexInline,c=s.hooks?s.hooks.provideParser():e?ev.parse:ev.parseInline;if(s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(t):t).then(e=>l(e,s)).then(e=>s.hooks?s.hooks.processAllTokens(e):e).then(e=>s.walkTokens?Promise.all(this.walkTokens(e,s.walkTokens)).then(()=>e):e).then(e=>c(e,s)).then(e=>s.hooks?s.hooks.postprocess(e):e).catch(a);try{s.hooks&&(t=s.hooks.preprocess(t));var u=l(t,s);s.hooks&&(u=s.hooks.processAllTokens(u)),s.walkTokens&&this.walkTokens(u,s.walkTokens);var d=c(u,s);return s.hooks&&(d=s.hooks.postprocess(d)),d}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){var r="<p>An error occurred:</p><pre>"+el(n.message+"",!0)+"</pre>";return t?Promise.resolve(r):r}if(t)return Promise.reject(n);throw n}}constructor(...e){this.defaults=a(),this.options=this.setOptions,this.parse=this.parseMarkdown(!0),this.parseInline=this.parseMarkdown(!1),this.Parser=ev,this.Renderer=em,this.TextRenderer=eg,this.Lexer=ef,this.Tokenizer=eh,this.Hooks=eb,this.use(...e)}},ex=new ey;function ew(e,t){return ex.parse(e,t)}ew.options=ew.setOptions=function(e){return ex.setOptions(e),ew.defaults=ex.defaults,l=ew.defaults,ew},ew.getDefaults=a,ew.defaults=l,ew.use=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return ex.use(...t),ew.defaults=ex.defaults,l=ew.defaults,ew},ew.walkTokens=function(e,t){return ex.walkTokens(e,t)},ew.parseInline=ex.parseInline,ew.Parser=ev,ew.parser=ev.parse,ew.Renderer=em,ew.TextRenderer=eg,ew.Lexer=ef,ew.lexer=ef.lex,ew.Tokenizer=eh,ew.Hooks=eb,ew.parse=ew,ew.options,ew.setOptions,ew.use,ew.walkTokens,ew.parseInline,ev.parse,ef.lex},551199:function(e,t,n){"use strict";var r=n(125161),o=n.n(r),s=n(404442),a=n.n(s),l=n(964824),c=n.n(l),u=new URL(n(767117),n.b),d=a()(o()),p=c()(u);d.push([e.id,`@font-face{font-family:codicon-cm;font-weight:400;font-style:normal;src:url(${p})format("woff")}`,""]),t.Z=d},17950:function(e,t,n){"use strict";var r=n(125161),o=n.n(r),s=n(404442),a=n.n(s)()(o());a.push([e.id,".os-theme-codemirror-dark{--os-handle-interactive-area-offset:0px;--os-handle-bg:rgba(255,255,255,.22);--os-handle-bg-hover:rgba(255,255,255,.39);--os-handle-bg-active:rgba(255,255,255,.79);--os-size:6px;--os-handle-border-radius:10px;--os-handle-perpendicular-size:4px;--os-handle-perpendicular-size-hover:6px;--os-handle-perpendicular-size-active:6px;--os-padding-perpendicular:2px;--os-padding-axis:2px;--os-track-border-radius:10px;z-index:300}.os-theme-codemirror-dark .os-scrollbar-track{background-color:transparent!important}.os-theme-codemirror{--os-handle-interactive-area-offset:0px;--os-handle-bg:rgba(0,13,56,.2);--os-handle-bg-hover:rgba(0,13,56,.3);--os-handle-bg-active:rgba(0,13,56,.4);--os-size:6px;--os-handle-border-radius:10px;--os-handle-perpendicular-size:4px;--os-handle-perpendicular-size-hover:6px;--os-handle-perpendicular-size-active:6px;--os-padding-perpendicular:2px;--os-padding-axis:2px;--os-track-border-radius:10px;z-index:300}.os-theme-codemirror .os-scrollbar-track{background-color:transparent!important}",""]),t.Z=a},121787:function(e,t,n){"use strict";var r=n(125161),o=n.n(r),s=n(404442),a=n.n(s)()(o());a.push([e.id,':root{--g-selection-background:#4d53e8;--g-editor-background:#f2f3f5;--g-playground-select:var(--g-selection-background);--g-playground-hover:var(--g-selection-background);--g-playground-line:var(--g-selection-background);--g-playground-blur:#999;--g-playground-selectBox-outline:var(--g-selection-background);--g-playground-selectBox-background:rgba(141,144,231,.1);--g-playground-select-hover-background:rgba(77,83,232,.1);--g-playground-select-control-size:12px}.gedit-playground{z-index:10;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:border-box;background-color:var(--g-editor-background);outline:none;width:100%;height:100%;position:absolute;top:0;left:0;overflow:hidden}.gedit-playground .flow-lines-container{overflow:visible}.gedit-transition-ease{transition:left,top .3s}.gedit-playground-scroll-right{z-index:10;width:7px;height:100vh;position:absolute;right:2px}.gedit-playground-scroll-bottom{z-index:10;width:100vw;height:7px;position:absolute;bottom:2px}.gedit-playground-scroll-right-block{opacity:.3;border-radius:3.5px;position:absolute}.gedit-playground-scroll-right-block:hover{opacity:.6}.gedit-playground-scroll-bottom-block{opacity:.3;border-radius:3.5px;position:absolute}.gedit-playground-scroll-bottom-block:hover{opacity:.6}.gedit-playground-scroll-hidden{opacity:0}.gedit-playground-loading{color:#fff;z-index:100;text-align:center;opacity:.8;flex-direction:column;justify-content:center;align-items:center;transition:opacity .8s;display:flex;position:absolute;top:50%;left:50%}.gedit-hidden{display:none}.gedit-playground-pipeline{width:100%;height:100%;position:absolute;top:0;left:0;overflow:visible}.gedit-playground-pipeline:before{content:"";width:1px;height:100%;position:absolute;top:0;left:0}.gedit-playground-layer{position:absolute;overflow:visible}.gedit-selector-box{z-index:33;outline:1px solid var(--g-playground-selectBox-outline);background-color:var(--g-playground-selectBox-background);width:0;height:0;position:absolute;top:0;left:0}.gedit-selector-box-block{z-index:9999;background-color:transparent;width:0;height:0;display:none;position:absolute;top:0;left:0}.gedit-selector-bounds-background{outline:1px solid var(--g-playground-selectBox-outline);background-color:#f0f4ff;width:0;height:0;position:absolute;top:0;left:0}.gedit-selector-bounds-foreground{z-index:33;background:rgba(255,255,255,0);width:0;height:0;position:absolute;top:0;left:0}.gedit-flow-activity-node{position:absolute}.gedit-grid-svg{width:0;height:0;display:block;position:absolute;top:20px;left:20px}',""]),t.Z=a},798521:function(e,t,n){"use strict";var r=n(125161),o=n.n(r),s=n(404442),a=n.n(s)()(o());a.push([e.id,'.os-size-observer,.os-size-observer-listener{direction:inherit;pointer-events:none;visibility:hidden;box-sizing:border-box;overflow:hidden;scroll-behavior:auto!important}.os-size-observer,.os-size-observer-listener,.os-size-observer-listener-item,.os-size-observer-listener-item-final{writing-mode:horizontal-tb;position:absolute;top:0;left:0}.os-size-observer{z-index:-1;contain:strict;padding:inherit;border:inherit;box-sizing:inherit;flex-flow:row;margin:-133px;display:flex;top:0;bottom:0;left:0;right:0;transform:scale(.1)}.os-size-observer:before{content:"";box-sizing:inherit;flex:none;width:10px;height:10px;padding:10px}.os-size-observer-appear{animation:1ms forwards os-size-observer-appear-animation}.os-size-observer-listener{box-sizing:border-box;padding:inherit;border:inherit;flex:auto;margin:-133px;position:relative;transform:scale(10)}.os-size-observer-listener.ltr{margin-left:0;margin-right:-266px}.os-size-observer-listener.rtl{margin-left:-266px;margin-right:0}.os-size-observer-listener:empty:before{content:"";width:100%;height:100%}.os-size-observer-listener:empty:before,.os-size-observer-listener>.os-size-observer-listener-item{padding:inherit;border:inherit;box-sizing:content-box;flex:auto;display:block;position:relative}.os-size-observer-listener-scroll{box-sizing:border-box;display:flex}.os-size-observer-listener-item{direction:ltr;flex:none;bottom:0;right:0;overflow:hidden}.os-size-observer-listener-item-final{transition:none}@keyframes os-size-observer-appear-animation{0%{cursor:auto}to{cursor:none}}.os-trinsic-observer{box-sizing:border-box;z-index:-1;contain:strict;border:none;flex:none;max-width:0;height:0;max-height:1px;margin:0;padding:0;position:relative;top:calc(100% + 1px);overflow:hidden}.os-trinsic-observer:not(:empty){height:calc(100% + 1px);top:-1px}.os-trinsic-observer:not(:empty)>.os-size-observer{width:1000%;min-width:1px;height:1000%;min-height:1px}[data-overlayscrollbars-initialize]:not([data-overlayscrollbars-viewport]),[data-overlayscrollbars-viewport~=scrollbarHidden]{scrollbar-width:none!important}[data-overlayscrollbars-initialize]:not([data-overlayscrollbars-viewport])::-webkit-scrollbar{-webkit-appearance:none!important;-moz-appearance:none!important;-ms-appearance:none!important;appearance:none!important;width:0!important;height:0!important;display:none!important}[data-overlayscrollbars-initialize]:not([data-overlayscrollbars-viewport])::-webkit-scrollbar-corner{-webkit-appearance:none!important;-moz-appearance:none!important;-ms-appearance:none!important;appearance:none!important;width:0!important;height:0!important;display:none!important}[data-overlayscrollbars-viewport~=scrollbarHidden]::-webkit-scrollbar{-webkit-appearance:none!important;-moz-appearance:none!important;-ms-appearance:none!important;appearance:none!important;width:0!important;height:0!important;display:none!important}[data-overlayscrollbars-viewport~=scrollbarHidden]::-webkit-scrollbar-corner{-webkit-appearance:none!important;-moz-appearance:none!important;-ms-appearance:none!important;appearance:none!important;width:0!important;height:0!important;display:none!important}[data-overlayscrollbars-initialize]:not([data-overlayscrollbars]):not(html):not(body){overflow:auto}html[data-overlayscrollbars-body]{overflow:hidden}html[data-overlayscrollbars-body],html[data-overlayscrollbars-body]>body{width:100%;height:100%;margin:0}html[data-overlayscrollbars-body]>body{margin:0;overflow:visible}[data-overlayscrollbars]{position:relative}[data-overlayscrollbars~=host],[data-overlayscrollbars-padding]{display:flex;scroll-behavior:auto!important;flex-flow:row!important;align-items:stretch!important}[data-overlayscrollbars-padding],[data-overlayscrollbars-viewport]:not([data-overlayscrollbars]){box-sizing:inherit;z-index:0;border:none;flex:auto;width:100%;min-width:0;height:auto;margin:0;padding:0;position:relative}[data-overlayscrollbars-viewport]:not([data-overlayscrollbars]){--os-vaw:0;--os-vah:0;outline:none}[data-overlayscrollbars-viewport]:not([data-overlayscrollbars]):focus{outline:none}[data-overlayscrollbars-viewport][data-overlayscrollbars-viewport~=arrange]:before{content:"";pointer-events:none;z-index:-1;min-width:1px;min-height:1px;width:var(--os-vaw);height:var(--os-vah);position:absolute}[data-overlayscrollbars~=host],[data-overlayscrollbars-padding]{overflow:hidden!important}[data-overlayscrollbars~=host][data-overlayscrollbars~=noClipping],[data-overlayscrollbars-padding~=noClipping]{overflow:visible!important}[data-overlayscrollbars-viewport]{--os-viewport-overflow-x:hidden;--os-viewport-overflow-y:hidden;overflow-x:var(--os-viewport-overflow-x);overflow-y:var(--os-viewport-overflow-y)}[data-overlayscrollbars-viewport~=overflowXVisible]{--os-viewport-overflow-x:visible}[data-overlayscrollbars-viewport~=overflowXHidden]{--os-viewport-overflow-x:hidden}[data-overlayscrollbars-viewport~=overflowXScroll]{--os-viewport-overflow-x:scroll}[data-overlayscrollbars-viewport~=overflowYVisible]{--os-viewport-overflow-y:visible}[data-overlayscrollbars-viewport~=overflowYHidden]{--os-viewport-overflow-y:hidden}[data-overlayscrollbars-viewport~=overflowYScroll]{--os-viewport-overflow-y:scroll}[data-overlayscrollbars-viewport~=overflowImportant]{overflow-x:var(--os-viewport-overflow-x)!important;overflow-y:var(--os-viewport-overflow-y)!important}[data-overlayscrollbars-viewport~=noContent]:not(#osFakeId){font-size:0!important;line-height:0!important}[data-overlayscrollbars-viewport~=noContent]:not(#osFakeId):before,[data-overlayscrollbars-viewport~=noContent]:not(#osFakeId):after,[data-overlayscrollbars-viewport~=noContent]:not(#osFakeId)>*{clip:rect(0,0,0,0)!important;white-space:nowrap!important;border-width:0!important;width:1px!important;height:1px!important;margin:-1px!important;padding:0!important;display:none!important;position:absolute!important;overflow:hidden!important}[data-overlayscrollbars-viewport~=measuring],[data-overlayscrollbars-viewport~=scrolling]{scroll-behavior:auto!important;scroll-snap-type:none!important}[data-overlayscrollbars-viewport~=measuring][data-overlayscrollbars-viewport~=overflowXVisible]{overflow-x:hidden!important}[data-overlayscrollbars-viewport~=measuring][data-overlayscrollbars-viewport~=overflowYVisible]{overflow-y:hidden!important}[data-overlayscrollbars-content]{box-sizing:inherit}[data-overlayscrollbars-contents]:not(#osFakeId):not([data-overlayscrollbars-padding]):not([data-overlayscrollbars-viewport]):not([data-overlayscrollbars-content]){display:contents}[data-overlayscrollbars-grid],[data-overlayscrollbars-grid] [data-overlayscrollbars-padding]{grid-template:1fr/1fr;display:grid}[data-overlayscrollbars-grid]>[data-overlayscrollbars-padding],[data-overlayscrollbars-grid]>[data-overlayscrollbars-viewport],[data-overlayscrollbars-grid]>[data-overlayscrollbars-padding]>[data-overlayscrollbars-viewport]{width:auto!important;height:auto!important}@property --os-scroll-percent{syntax:"<number>";inherits:true;initial-value:0}@property --os-viewport-percent{syntax:"<number>";inherits:true;initial-value:0}.os-scrollbar{--os-viewport-percent:0;--os-scroll-percent:0;--os-scroll-direction:0;--os-scroll-percent-directional:calc(var(--os-scroll-percent) - (var(--os-scroll-percent) + (1 - var(--os-scroll-percent))*-1)*var(--os-scroll-direction));contain:size layout;contain:size layout style;pointer-events:none;opacity:0;visibility:hidden;transition:opacity .15s,visibility .15s,top .15s,right .15s,bottom .15s,left .15s;position:absolute}body>.os-scrollbar{z-index:99999;position:fixed}.os-scrollbar-transitionless{transition:none!important}.os-scrollbar-track{position:relative;border:none!important;padding:0!important}.os-scrollbar-handle{position:absolute}.os-scrollbar-track,.os-scrollbar-handle{pointer-events:none;width:100%;height:100%}.os-scrollbar.os-scrollbar-track-interactive .os-scrollbar-track,.os-scrollbar.os-scrollbar-handle-interactive .os-scrollbar-handle{pointer-events:auto;touch-action:none}.os-scrollbar-horizontal{bottom:0;left:0}.os-scrollbar-vertical{top:0;right:0}.os-scrollbar-rtl.os-scrollbar-horizontal{right:0}.os-scrollbar-rtl.os-scrollbar-vertical{left:0;right:auto}.os-scrollbar-visible{opacity:1;visibility:visible}.os-scrollbar-auto-hide.os-scrollbar-auto-hide-hidden{opacity:0;visibility:hidden}.os-scrollbar-interaction.os-scrollbar-visible{opacity:1;visibility:visible}.os-scrollbar-unusable,.os-scrollbar-unusable *,.os-scrollbar-wheel,.os-scrollbar-wheel *{pointer-events:none!important}.os-scrollbar-unusable .os-scrollbar-handle{opacity:0!important;transition:none!important}.os-scrollbar-horizontal .os-scrollbar-handle{bottom:0;left:calc(var(--os-scroll-percent-directional)*100%);transform:translateX(calc(var(--os-scroll-percent-directional)*-100%));width:calc(var(--os-viewport-percent)*100%)}.os-scrollbar-vertical .os-scrollbar-handle{right:0;top:calc(var(--os-scroll-percent-directional)*100%);transform:translateY(calc(var(--os-scroll-percent-directional)*-100%));height:calc(var(--os-viewport-percent)*100%)}@supports (container-type:size){.os-scrollbar-track{container-type:size}.os-scrollbar-horizontal .os-scrollbar-handle{transform:translateX(calc(var(--os-scroll-percent-directional)*100cqw + var(--os-scroll-percent-directional)*-100%));left:auto}.os-scrollbar-vertical .os-scrollbar-handle{transform:translateY(calc(var(--os-scroll-percent-directional)*100cqh + var(--os-scroll-percent-directional)*-100%));top:auto}.os-scrollbar-rtl.os-scrollbar-horizontal .os-scrollbar-handle{left:0;right:auto}}.os-scrollbar-rtl.os-scrollbar-vertical .os-scrollbar-handle{left:0;right:auto}.os-scrollbar.os-scrollbar-horizontal.os-scrollbar-cornerless,.os-scrollbar.os-scrollbar-horizontal.os-scrollbar-cornerless.os-scrollbar-rtl{left:0;right:0}.os-scrollbar.os-scrollbar-vertical.os-scrollbar-cornerless,.os-scrollbar.os-scrollbar-vertical.os-scrollbar-cornerless.os-scrollbar-rtl{top:0;bottom:0}@media print{.os-scrollbar{display:none}}.os-scrollbar{--os-size:0;--os-padding-perpendicular:0;--os-padding-axis:0;--os-track-border-radius:0;--os-track-bg:none;--os-track-bg-hover:none;--os-track-bg-active:none;--os-track-border:none;--os-track-border-hover:none;--os-track-border-active:none;--os-handle-border-radius:0;--os-handle-bg:none;--os-handle-bg-hover:none;--os-handle-bg-active:none;--os-handle-border:none;--os-handle-border-hover:none;--os-handle-border-active:none;--os-handle-min-size:33px;--os-handle-max-size:none;--os-handle-perpendicular-size:100%;--os-handle-perpendicular-size-hover:100%;--os-handle-perpendicular-size-active:100%;--os-handle-interactive-area-offset:0}.os-scrollbar-track{border:var(--os-track-border);border-radius:var(--os-track-border-radius);background:var(--os-track-bg);transition:opacity .15s,background-color .15s,border-color .15s}.os-scrollbar-track:hover{border:var(--os-track-border-hover);background:var(--os-track-bg-hover)}.os-scrollbar-track:active{border:var(--os-track-border-active);background:var(--os-track-bg-active)}.os-scrollbar-handle{border:var(--os-handle-border);border-radius:var(--os-handle-border-radius);background:var(--os-handle-bg)}.os-scrollbar-handle:hover{border:var(--os-handle-border-hover);background:var(--os-handle-bg-hover)}.os-scrollbar-handle:active{border:var(--os-handle-border-active);background:var(--os-handle-bg-active)}.os-scrollbar-track:before,.os-scrollbar-handle:before{content:"";display:block;position:absolute;top:0;bottom:0;left:0;right:0}.os-scrollbar-horizontal{padding:var(--os-padding-perpendicular)var(--os-padding-axis);right:var(--os-size);height:var(--os-size)}.os-scrollbar-horizontal.os-scrollbar-rtl{left:var(--os-size);right:0}.os-scrollbar-horizontal .os-scrollbar-track:before{top:calc(var(--os-padding-perpendicular)*-1);bottom:calc(var(--os-padding-perpendicular)*-1)}.os-scrollbar-horizontal .os-scrollbar-handle{min-width:var(--os-handle-min-size);max-width:var(--os-handle-max-size);height:var(--os-handle-perpendicular-size);transition:opacity .15s,background-color .15s,border-color .15s,height .15s}.os-scrollbar-horizontal .os-scrollbar-handle:before{top:calc((var(--os-padding-perpendicular) + var(--os-handle-interactive-area-offset))*-1);bottom:calc(var(--os-padding-perpendicular)*-1)}.os-scrollbar-horizontal:hover .os-scrollbar-handle{height:var(--os-handle-perpendicular-size-hover)}.os-scrollbar-horizontal:active .os-scrollbar-handle{height:var(--os-handle-perpendicular-size-active)}.os-scrollbar-vertical{padding:var(--os-padding-axis)var(--os-padding-perpendicular);bottom:var(--os-size);width:var(--os-size)}.os-scrollbar-vertical .os-scrollbar-track:before{left:calc(var(--os-padding-perpendicular)*-1);right:calc(var(--os-padding-perpendicular)*-1)}.os-scrollbar-vertical .os-scrollbar-handle{min-height:var(--os-handle-min-size);max-height:var(--os-handle-max-size);width:var(--os-handle-perpendicular-size);transition:opacity .15s,background-color .15s,border-color .15s,width .15s}.os-scrollbar-vertical .os-scrollbar-handle:before{left:calc((var(--os-padding-perpendicular) + var(--os-handle-interactive-area-offset))*-1);right:calc(var(--os-padding-perpendicular)*-1)}.os-scrollbar-vertical.os-scrollbar-rtl .os-scrollbar-handle:before{right:calc((var(--os-padding-perpendicular) + var(--os-handle-interactive-area-offset))*-1);left:calc(var(--os-padding-perpendicular)*-1)}.os-scrollbar-vertical:hover .os-scrollbar-handle{width:var(--os-handle-perpendicular-size-hover)}.os-scrollbar-vertical:active .os-scrollbar-handle{width:var(--os-handle-perpendicular-size-active)}[data-overlayscrollbars-viewport~=measuring]>.os-scrollbar,.os-theme-none.os-scrollbar{display:none!important}.os-theme-dark,.os-theme-light{box-sizing:border-box;--os-size:10px;--os-padding-perpendicular:2px;--os-padding-axis:2px;--os-track-border-radius:10px;--os-handle-interactive-area-offset:4px;--os-handle-border-radius:10px}.os-theme-dark{--os-handle-bg:rgba(0,0,0,.44);--os-handle-bg-hover:rgba(0,0,0,.55);--os-handle-bg-active:rgba(0,0,0,.66)}.os-theme-light{--os-handle-bg:rgba(255,255,255,.44);--os-handle-bg-hover:rgba(255,255,255,.55);--os-handle-bg-active:rgba(255,255,255,.66)}',""]),t.Z=a},315631:function(e,t,n){"use strict";var r=n(125161),o=n.n(r),s=n(404442),a=n.n(s)()(o());a.push([e.id,":root{--react-pdf-annotation-layer:1;--annotation-unfocused-field-background:url(\"data:image/svg+xml;charset=UTF-8,<svg width='1px' height='1px' xmlns='http://www.w3.org/2000/svg'><rect width='100%' height='100%' style='fill:rgba(0, 54, 255, 0.13);'/></svg>\");--input-focus-border-color:Highlight;--input-focus-outline:1px solid Canvas;--input-unfocused-border-color:transparent;--input-disabled-border-color:transparent;--input-hover-border-color:black;--link-outline:none}@media screen and (forced-colors:active){:root{--input-focus-border-color:CanvasText;--input-unfocused-border-color:ActiveText;--input-disabled-border-color:GrayText;--input-hover-border-color:Highlight;--link-outline:1.5px solid LinkText}.annotationLayer .textWidgetAnnotation input:required{outline:1.5px solid selecteditem}.annotationLayer .textWidgetAnnotation textarea:required{outline:1.5px solid selecteditem}.annotationLayer .buttonWidgetAnnotation.checkBox input:required{outline:1.5px solid selecteditem}.annotationLayer .buttonWidgetAnnotation.radioButton input:required{outline:1.5px solid selecteditem}.annotationLayer .choiceWidgetAnnotation select:required{outline:1.5px solid selecteditem}.annotationLayer .linkAnnotation:hover{-webkit-backdrop-filter:invert();backdrop-filter:invert()}}.annotationLayer{pointer-events:none;transform-origin:0 0;z-index:3;position:absolute;top:0;left:0}.annotationLayer[data-main-rotation=\"90\"] .norotate{transform:rotate(270deg)translate(-100%)}.annotationLayer[data-main-rotation=\"180\"] .norotate{transform:rotate(180deg)translate(-100%,-100%)}.annotationLayer[data-main-rotation=\"270\"] .norotate{transform:rotate(90deg)translateY(-100%)}.annotationLayer canvas{width:100%;height:100%;position:absolute}.annotationLayer section{text-align:initial;pointer-events:auto;box-sizing:border-box;transform-origin:0 0;margin:0;position:absolute}.annotationLayer .linkAnnotation{outline:var(--link-outline)}.annotationLayer .linkAnnotation:not(.does-not-exist)>a,.annotationLayer .buttonWidgetAnnotation.pushButton>a{width:100%;height:100%;font-size:1em;position:absolute;top:0;left:0}.annotationLayer .linkAnnotation:not(.does-not-exist)>a:hover,.annotationLayer .buttonWidgetAnnotation.pushButton>a:hover{opacity:.2;background:#ff0;box-shadow:0 2px 10px #ff0}.annotationLayer .textAnnotation img{cursor:pointer;width:100%;height:100%;position:absolute;top:0;left:0}.annotationLayer .textWidgetAnnotation input,.annotationLayer .textWidgetAnnotation textarea,.annotationLayer .choiceWidgetAnnotation select,.annotationLayer .buttonWidgetAnnotation.checkBox input,.annotationLayer .buttonWidgetAnnotation.radioButton input{background-image:var(--annotation-unfocused-field-background);border:2px solid var(--input-unfocused-border-color);box-sizing:border-box;font:calc(9px*var(--scale-factor))sans-serif;vertical-align:top;width:100%;height:100%;margin:0}.annotationLayer .textWidgetAnnotation input:required{outline:1.5px solid red}.annotationLayer .textWidgetAnnotation textarea:required{outline:1.5px solid red}.annotationLayer .buttonWidgetAnnotation.checkBox input:required{outline:1.5px solid red}.annotationLayer .buttonWidgetAnnotation.radioButton input:required{outline:1.5px solid red}.annotationLayer .choiceWidgetAnnotation select:required{outline:1.5px solid red}.annotationLayer .choiceWidgetAnnotation select option{padding:0}.annotationLayer .buttonWidgetAnnotation.radioButton input{border-radius:50%}.annotationLayer .textWidgetAnnotation textarea{resize:none}.annotationLayer .textWidgetAnnotation input[disabled],.annotationLayer .textWidgetAnnotation textarea[disabled],.annotationLayer .choiceWidgetAnnotation select[disabled],.annotationLayer .buttonWidgetAnnotation.checkBox input[disabled],.annotationLayer .buttonWidgetAnnotation.radioButton input[disabled]{border:2px solid var(--input-disabled-border-color);cursor:not-allowed;background:0 0}.annotationLayer .textWidgetAnnotation input:hover,.annotationLayer .textWidgetAnnotation textarea:hover,.annotationLayer .choiceWidgetAnnotation select:hover,.annotationLayer .buttonWidgetAnnotation.checkBox input:hover,.annotationLayer .buttonWidgetAnnotation.radioButton input:hover{border:2px solid var(--input-hover-border-color)}.annotationLayer .textWidgetAnnotation input:hover,.annotationLayer .textWidgetAnnotation textarea:hover,.annotationLayer .choiceWidgetAnnotation select:hover,.annotationLayer .buttonWidgetAnnotation.checkBox input:hover{border-radius:2px}.annotationLayer .textWidgetAnnotation input:focus,.annotationLayer .textWidgetAnnotation textarea:focus,.annotationLayer .choiceWidgetAnnotation select:focus{border:2px solid var(--input-focus-border-color);outline:var(--input-focus-outline);background:0 0;border-radius:2px}.annotationLayer .buttonWidgetAnnotation.checkBox :focus,.annotationLayer .buttonWidgetAnnotation.radioButton :focus{background-color:transparent;background-image:none}.annotationLayer .buttonWidgetAnnotation.checkBox :focus{border:2px solid var(--input-focus-border-color);outline:var(--input-focus-outline);border-radius:2px}.annotationLayer .buttonWidgetAnnotation.radioButton :focus{border:2px solid var(--input-focus-border-color);outline:var(--input-focus-outline)}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before,.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after,.annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before{content:\"\";background-color:canvastext;display:block;position:absolute}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before,.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after{width:1px;height:80%;left:45%}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before{transform:rotate(45deg)}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after{transform:rotate(-45deg)}.annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before{border-radius:50%;width:50%;height:50%;top:20%;left:30%}.annotationLayer .textWidgetAnnotation input.comb{padding-left:2px;padding-right:0;font-family:monospace}.annotationLayer .textWidgetAnnotation input.comb:focus{width:103%}.annotationLayer .buttonWidgetAnnotation.checkBox input,.annotationLayer .buttonWidgetAnnotation.radioButton input{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none}.annotationLayer .popupTriggerArea{width:100%;height:100%}.annotationLayer .fileAttachmentAnnotation .popupTriggerArea{position:absolute}.annotationLayer .popupWrapper{font-size:calc(9px*var(--scale-factor));width:100%;min-width:calc(180px*var(--scale-factor));pointer-events:none;position:absolute}.annotationLayer .popup{max-width:calc(180px*var(--scale-factor));box-shadow:0 calc(2px*var(--scale-factor))calc(5px*var(--scale-factor))#888;border-radius:calc(2px*var(--scale-factor));padding:calc(6px*var(--scale-factor));margin-left:calc(5px*var(--scale-factor));cursor:pointer;font:message-box;white-space:normal;word-wrap:break-word;pointer-events:auto;background-color:#ff9;position:absolute}.annotationLayer .popup>*{font-size:calc(9px*var(--scale-factor))}.annotationLayer .popup h1{display:inline-block}.annotationLayer .popupDate{margin-left:calc(5px*var(--scale-factor));display:inline-block}.annotationLayer .popupContent{margin-top:calc(2px*var(--scale-factor));padding-top:calc(2px*var(--scale-factor));border-top:1px solid #333}.annotationLayer .richText>*{white-space:pre-wrap;font-size:calc(9px*var(--scale-factor))}.annotationLayer .highlightAnnotation,.annotationLayer .underlineAnnotation,.annotationLayer .squigglyAnnotation,.annotationLayer .strikeoutAnnotation,.annotationLayer .freeTextAnnotation,.annotationLayer .lineAnnotation svg line,.annotationLayer .squareAnnotation svg rect,.annotationLayer .circleAnnotation svg ellipse,.annotationLayer .polylineAnnotation svg polyline,.annotationLayer .polygonAnnotation svg polygon,.annotationLayer .caretAnnotation,.annotationLayer .inkAnnotation svg polyline,.annotationLayer .stampAnnotation,.annotationLayer .fileAttachmentAnnotation{cursor:pointer}.annotationLayer section svg{width:100%;height:100%;position:absolute;top:0;left:0}.annotationLayer .annotationTextContent{opacity:0;color:transparent;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;width:100%;height:100%;position:absolute}.annotationLayer .annotationTextContent span{width:100%;display:inline-block}",""]),t.Z=a},145518:function(e,t,n){"use strict";var r=n(125161),o=n.n(r),s=n(404442),a=n.n(s)()(o());a.push([e.id,':root{--react-pdf-text-layer:1;--highlight-bg-color:#b400aa;--highlight-selected-bg-color:#006400}@media screen and (forced-colors:active){:root{--highlight-bg-color:Highlight;--highlight-selected-bg-color:ButtonText}}[data-main-rotation="90"]{transform:rotate(90deg)translateY(-100%)}[data-main-rotation="180"]{transform:rotate(180deg)translate(-100%,-100%)}[data-main-rotation="270"]{transform:rotate(270deg)translate(-100%)}.textLayer{text-align:initial;-webkit-text-size-adjust:none;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;forced-color-adjust:none;transform-origin:0 0;z-index:2;line-height:1;position:absolute;top:0;bottom:0;left:0;right:0;overflow:hidden}.textLayer span,.textLayer br{color:transparent;white-space:pre;cursor:text;transform-origin:0 0;margin:0;position:absolute}.textLayer span.markedContent{height:0;top:0}.textLayer .highlight{background-color:var(--highlight-bg-color);border-radius:4px;margin:-1px;padding:1px}.textLayer .highlight.appended{position:initial}.textLayer .highlight.begin{border-radius:4px 0 0 4px}.textLayer .highlight.end{border-radius:0 4px 4px 0}.textLayer .highlight.middle{border-radius:0}.textLayer .highlight.selected{background-color:var(--highlight-selected-bg-color)}.textLayer br::-moz-selection{background:0 0}.textLayer br::selection{background:0 0}.textLayer .endOfContent{z-index:-1;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:block;position:absolute;top:100%;bottom:0;left:0;right:0}.textLayer .endOfContent.active{top:0}.hiddenCanvasElement{width:0;height:0;display:none;position:absolute;top:0;left:0}',""]),t.Z=a},587885:function(e,t,n){"use strict";var r=n(407821),o=n.n(r),s=n(472772),a=n.n(s),l=n(395245),c=n.n(l),u=n(297998),d=n.n(u),p=n(646576),h=n.n(p),f=n(606121),m=n.n(f),g=n(551199),v={};v.styleTagTransform=m(),v.setAttributes=d(),v.insert=c().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=h(),o()(g.Z,v),g.Z&&g.Z.locals&&g.Z.locals},490610:function(e,t,n){"use strict";var r=n(407821),o=n.n(r),s=n(472772),a=n.n(s),l=n(395245),c=n.n(l),u=n(297998),d=n.n(u),p=n(646576),h=n.n(p),f=n(606121),m=n.n(f),g=n(17950),v={};v.styleTagTransform=m(),v.setAttributes=d(),v.insert=c().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=h(),o()(g.Z,v),g.Z&&g.Z.locals&&g.Z.locals},913292:function(e,t,n){"use strict";var r=n(407821),o=n.n(r),s=n(472772),a=n.n(s),l=n(395245),c=n.n(l),u=n(297998),d=n.n(u),p=n(646576),h=n.n(p),f=n(606121),m=n.n(f),g=n(121787),v={};v.styleTagTransform=m(),v.setAttributes=d(),v.insert=c().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=h(),o()(g.Z,v),g.Z&&g.Z.locals&&g.Z.locals},168338:function(e,t,n){"use strict";var r=n(407821),o=n.n(r),s=n(472772),a=n.n(s),l=n(395245),c=n.n(l),u=n(297998),d=n.n(u),p=n(646576),h=n.n(p),f=n(606121),m=n.n(f),g=n(798521),v={};v.styleTagTransform=m(),v.setAttributes=d(),v.insert=c().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=h(),o()(g.Z,v),g.Z&&g.Z.locals&&g.Z.locals},887869:function(e,t,n){"use strict";var r=n(407821),o=n.n(r),s=n(472772),a=n.n(s),l=n(395245),c=n.n(l),u=n(297998),d=n.n(u),p=n(646576),h=n.n(p),f=n(606121),m=n.n(f),g=n(315631),v={};v.styleTagTransform=m(),v.setAttributes=d(),v.insert=c().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=h(),o()(g.Z,v),g.Z&&g.Z.locals&&g.Z.locals},107440:function(e,t,n){"use strict";var r=n(407821),o=n.n(r),s=n(472772),a=n.n(s),l=n(395245),c=n.n(l),u=n(297998),d=n.n(u),p=n(646576),h=n.n(p),f=n(606121),m=n.n(f),g=n(145518),v={};v.styleTagTransform=m(),v.setAttributes=d(),v.insert=c().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=h(),o()(g.Z,v),g.Z&&g.Z.locals&&g.Z.locals},950292:function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},344365:function(e){e.exports=function(e,t){if(null==e)return{};var n={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n},e.exports.__esModule=!0,e.exports.default=e.exports},333258:function(e,t,n){"use strict";n.d(t,{uP:function(){return O}});var r=n(249294),o=n(913693),s=n(903574);let a="function"==typeof String.prototype.normalize?e=>e.normalize("NFKD"):e=>e;class l{constructor(e,t,n=0,r=e.length,o,s){this.test=s,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(n,r),this.bufferStart=n,this.normalize=o?e=>o(a(e)):a,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return -1;this.bufferPos=0,this.buffer=this.iter.value}return(0,o.gm)(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=(0,o.bg)(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=(0,o.nZ)(e);let r=this.normalize(t);if(r.length)for(let e=0,o=n;;e++){let s=r.charCodeAt(e),a=this.match(s,o,this.bufferPos+this.bufferStart);if(e==r.length-1){if(a)return this.value=a,this;break}o==n&&e<t.length&&t.charCodeAt(e)==s&&o++}}}match(e,t,n){let r=null;for(let t=0;t<this.matches.length;t+=2){let o=this.matches[t],s=!1;this.query.charCodeAt(o)==e&&(o==this.query.length-1?r={from:this.matches[t+1],to:n}:(this.matches[t]++,s=!0)),!s&&(this.matches.splice(t,2),t-=2)}return this.query.charCodeAt(0)==e&&(1==this.query.length?r={from:t,to:n}:this.matches.push(1,t)),r&&this.test&&!this.test(r.from,r.to,this.buffer,this.bufferStart)&&(r=null),r}}"undefined"!=typeof Symbol&&(l.prototype[Symbol.iterator]=function(){return this});let c={from:-1,to:-1,match:/.*/.exec("")},u="gm"+(null==/x/.unicode?"":"u");class d{constructor(e,t,n,r=0,o=e.length){if(this.text=e,this.to=o,this.curLine="",this.done=!1,this.value=c,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new f(e,t,n,r,o);this.re=new RegExp(t,u+((null==n?void 0:n.ignoreCase)?"i":"")),this.test=null==n?void 0:n.test,this.iter=e.iter();let s=e.lineAt(r);this.curLineStart=s.from,this.matchPos=m(e,r),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let n=this.curLineStart+t.index,r=n+t[0].length;if(this.matchPos=m(this.text,r+(n==r?1:0)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(n<r||n>this.value.to)&&(!this.test||this.test(n,r,t)))return this.value={from:n,to:r,match:t},this;e=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length<this.to))return this.done=!0,this;this.nextLine(),e=0}}}}let p=new WeakMap;class h{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(e,t,n){let r=p.get(e);if(!r||r.from>=n||r.to<=t){let r=new h(t,e.sliceString(t,n));return p.set(e,r),r}if(r.from==t&&r.to==n)return r;let{text:o,from:s}=r;return s>t&&(o=e.sliceString(t,s)+o,s=t),r.to<n&&(o+=e.sliceString(r.to,n)),p.set(e,new h(s,o)),new h(t,o.slice(t-s,n-s))}}class f{constructor(e,t,n,r,o){this.text=e,this.to=o,this.done=!1,this.value=c,this.matchPos=m(e,r),this.re=new RegExp(t,u+((null==n?void 0:n.ignoreCase)?"i":"")),this.test=null==n?void 0:n.test,this.flat=h.get(e,r,this.chunkEnd(r+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let e=this.flat.from+t.index,n=e+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(e,n,t)))return this.value={from:e,to:n,match:t},this.matchPos=m(this.text,n+(e==n?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=h.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}"undefined"!=typeof Symbol&&(d.prototype[Symbol.iterator]=f.prototype[Symbol.iterator]=function(){return this});function m(e,t){if(t>=e.length)return t;let n=e.lineAt(t),r;for(;t<n.to&&(r=n.text.charCodeAt(t-n.from))>=56320&&r<57344;)t++;return t}let g=null,v=o.r$.define({combine:e=>(0,o.BO)(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new W(e),scrollToMatch:e=>r.tk.scrollIntoView(e)})});class b{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||function(e){try{return new RegExp(e,u),!0}catch(e){return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(e,t)=>"n"==t?"\n":"r"==t?"\r":"t"==t?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new C(this):new w(this)}getCursor(e,t=0,n){let r=e.doc?e:o.yy.create({doc:e});return null==n&&(n=r.doc.length),this.regexp?S(this,r,t,n):x(this,r,t,n)}}class y{constructor(e){this.spec=e}}function x(e,t,n,r){return new l(t.doc,e.unquoted,n,r,e.caseSensitive?void 0:e=>e.toLowerCase(),e.wholeWord?function(e,t){return(n,r,s,a)=>((a>n||a+s.length<r)&&(a=Math.max(0,n-2),s=e.sliceString(a,Math.min(e.length,r+2))),(t(k(s,n-a))!=o.D0.Word||t(A(s,n-a))!=o.D0.Word)&&(t(A(s,r-a))!=o.D0.Word||t(k(s,r-a))!=o.D0.Word))}(t.doc,t.charCategorizer(t.selection.main.head)):void 0)}class w extends y{constructor(e){super(e)}nextMatch(e,t,n){let r=x(this.spec,e,n,e.doc.length).nextOverlapping();if(r.done){let n=Math.min(e.doc.length,t+this.spec.unquoted.length);r=x(this.spec,e,0,n).nextOverlapping()}return r.done||r.value.from==t&&r.value.to==n?null:r.value}prevMatchInRange(e,t,n){for(let r=n;;){let n=Math.max(t,r-1e4-this.spec.unquoted.length),o=x(this.spec,e,n,r),s=null;for(;!o.nextOverlapping().done;)s=o.value;if(s)return s;if(n==t)return null;r-=1e4}}prevMatch(e,t,n){let r=this.prevMatchInRange(e,0,t);return!r&&(r=this.prevMatchInRange(e,Math.max(0,n-this.spec.unquoted.length),e.doc.length)),r&&(r.from!=t||r.to!=n)?r:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let n=x(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let o=x(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!o.next().done;)r(o.value.from,o.value.to)}}function S(e,t,n,r){return new d(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:e.wholeWord?function(e){return(t,n,r)=>!r[0].length||(e(k(r.input,r.index))!=o.D0.Word||e(A(r.input,r.index))!=o.D0.Word)&&(e(A(r.input,r.index+r[0].length))!=o.D0.Word||e(k(r.input,r.index+r[0].length))!=o.D0.Word)}(t.charCategorizer(t.selection.main.head)):void 0},n,r)}function k(e,t){return e.slice((0,o.cp)(e,t,!1),t)}function A(e,t){return e.slice(t,(0,o.cp)(e,t))}class C extends y{nextMatch(e,t,n){let r=S(this.spec,e,n,e.doc.length).next();return r.done&&(r=S(this.spec,e,0,t).next()),r.done?null:r.value}prevMatchInRange(e,t,n){for(let r=1;;r++){let o=Math.max(t,n-1e4*r),s=S(this.spec,e,o,n),a=null;for(;!s.next().done;)a=s.value;if(a&&(o==t||a.from>o+10))return a;if(o==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,n)=>{if("&"==n)return e.match[0];if("$"==n)return"$";for(let t=n.length;t>0;t--){let r=+n.slice(0,t);if(r>0&&r<e.match.length)return e.match[r]+n.slice(t)}return t})}matchAll(e,t){let n=S(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let o=S(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!o.next().done;)r(o.value.from,o.value.to)}}let E=o.Py.define(),T=o.Py.define(),_=o.QQ.define({create:e=>new M(B(e).create(),null),update(e,t){for(let n of t.effects)n.is(E)?e=new M(n.value.create(),e.panel):n.is(T)&&(e=new M(e.query,n.value?z:null));return e},provide:e=>r.mH.from(e,e=>e.panel)});function O(e){let t=e.field(_,!1);return t?t.query.spec:B(e)}class M{constructor(e,t){this.query=e,this.panel=t}}let I=r.p.mark({class:"cm-searchMatch"}),P=r.p.mark({class:"cm-searchMatch cm-searchMatch-selected"}),D=r.lg.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(_))}update(e){let t=e.state.field(_);(t!=e.startState.field(_)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return r.p.none;let{view:n}=this,s=new o.f_;for(let t=0,r=n.visibleRanges,o=r.length;t<o;t++){let{from:a,to:l}=r[t];for(;t<o-1&&l>r[t+1].from-500;)l=r[++t].to;e.highlight(n.state,a,l,(e,t)=>{let r=n.state.selection.ranges.some(n=>n.from==e&&n.to==t);s.add(e,t,r?P:I)})}return s.finish()}},{decorations:e=>e.decorations});function N(e){return t=>{let n=t.state.field(_,!1);return n&&n.query.spec.valid?e(t,n):V(t)}}let R=N((e,{query:t})=>{let{to:n}=e.state.selection.main,r=t.nextMatch(e.state,n,n);if(!r)return!1;let s=o.jT.single(r.from,r.to),a=e.state.facet(v);return e.dispatch({selection:s,effects:[Y(e,r),a.scrollToMatch(s.main,e)],userEvent:"select.search"}),U(e),!0}),L=N((e,{query:t})=>{let{state:n}=e,{from:r}=n.selection.main,s=t.prevMatch(n,r,r);if(!s)return!1;let a=o.jT.single(s.from,s.to),l=e.state.facet(v);return e.dispatch({selection:a,effects:[Y(e,s),l.scrollToMatch(a.main,e)],userEvent:"select.search"}),U(e),!0}),j=N((e,{query:t})=>{let n=t.matchAll(e.state,1e3);return!!n&&!!n.length&&(e.dispatch({selection:o.jT.create(n.map(e=>o.jT.range(e.from,e.to))),userEvent:"select.search.matches"}),!0)}),$=N((e,{query:t})=>{let{state:n}=e,{from:s,to:a}=n.selection.main;if(n.readOnly)return!1;let l=t.nextMatch(n,s,s);if(!l)return!1;let c=l,u=[],d,p,h=[];c.from==s&&c.to==a&&(p=n.toText(t.getReplacement(c)),u.push({from:c.from,to:c.to,insert:p}),c=t.nextMatch(n,c.from,c.to),h.push(r.tk.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(s).number)+".")));let f=e.state.changes(u);return c&&(d=o.jT.single(c.from,c.to).map(f),h.push(Y(e,c)),h.push(n.facet(v).scrollToMatch(d.main,e))),e.dispatch({changes:f,selection:d,effects:h,userEvent:"input.replace"}),!0}),F=N((e,{query:t})=>{if(e.state.readOnly)return!1;let n=t.matchAll(e.state,1e9).map(e=>{let{from:n,to:r}=e;return{from:n,to:r,insert:t.getReplacement(e)}});if(!n.length)return!1;let o=e.state.phrase("replaced $ matches",n.length)+".";return e.dispatch({changes:n,effects:r.tk.announce.of(o),userEvent:"input.replace.all"}),!0});function z(e){return e.state.facet(v).createPanel(e)}function B(e,t){var n,r,o,s,a;let l=e.selection.main,c=l.empty||l.to>l.from+100?"":e.sliceDoc(l.from,l.to);if(t&&!c)return t;let u=e.facet(v);return new b({search:(null!==(n=null==t?void 0:t.literal)&&void 0!==n?n:u.literal)?c:c.replace(/\n/g,"\\n"),caseSensitive:null!==(r=null==t?void 0:t.caseSensitive)&&void 0!==r?r:u.caseSensitive,literal:null!==(o=null==t?void 0:t.literal)&&void 0!==o?o:u.literal,regexp:null!==(s=null==t?void 0:t.regexp)&&void 0!==s?s:u.regexp,wholeWord:null!==(a=null==t?void 0:t.wholeWord)&&void 0!==a?a:u.wholeWord})}function H(e){let t=(0,r.Sd)(e,z);return t&&t.dom.querySelector("[main-field]")}function U(e){let t=H(e);t&&t==e.root.activeElement&&t.select()}let V=e=>{let t=e.state.field(_,!1);if(t&&t.panel){let n=H(e);if(n&&n!=e.root.activeElement){let r=B(e.state,t.query.spec);r.valid&&e.dispatch({effects:E.of(r)}),n.focus(),n.select()}}else e.dispatch({effects:[T.of(!0),t?E.of(B(e.state,t.query.spec)):o.Py.appendConfig.of(J)]});return!0},q=e=>{let t=e.state.field(_,!1);if(!t||!t.panel)return!1;let n=(0,r.Sd)(e,z);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:T.of(!1)}),!0};class W{constructor(e){this.view=e;let t=this.query=e.state.field(_).query.spec;function n(e,t,n){return(0,s.Z)("button",{class:"cm-button",name:e,onclick:t,type:"button"},n)}this.commit=this.commit.bind(this),this.searchField=(0,s.Z)("input",{value:t.search,placeholder:G(e,"Find"),"aria-label":G(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=(0,s.Z)("input",{value:t.replace,placeholder:G(e,"Replace"),"aria-label":G(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=(0,s.Z)("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=(0,s.Z)("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=(0,s.Z)("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit}),this.dom=(0,s.Z)("div",{onkeydown:e=>this.keydown(e),class:"cm-search"},[this.searchField,n("next",()=>R(e),[G(e,"next")]),n("prev",()=>L(e),[G(e,"previous")]),n("select",()=>j(e),[G(e,"all")]),(0,s.Z)("label",null,[this.caseField,G(e,"match case")]),(0,s.Z)("label",null,[this.reField,G(e,"regexp")]),(0,s.Z)("label",null,[this.wordField,G(e,"by word")]),...e.state.readOnly?[]:[(0,s.Z)("br"),this.replaceField,n("replace",()=>$(e),[G(e,"replace")]),n("replaceAll",()=>F(e),[G(e,"replace all")])],(0,s.Z)("button",{name:"close",onclick:()=>q(e),"aria-label":G(e,"close"),type:"button"},["\xd7"])])}commit(){let e=new b({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});!e.eq(this.query)&&(this.query=e,this.view.dispatch({effects:E.of(e)}))}keydown(e){(0,r.$1)(this.view,e,"search-panel")?e.preventDefault():13==e.keyCode&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?L:R)(this.view)):13==e.keyCode&&e.target==this.replaceField&&(e.preventDefault(),$(this.view))}update(e){for(let t of e.transactions)for(let e of t.effects)e.is(E)&&!e.value.eq(this.query)&&this.setQuery(e.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(v).top}}function G(e,t){return e.state.phrase(t)}let K=/[\s\.,:;?!]/;function Y(e,{from:t,to:n}){let o=e.state.doc.lineAt(t),s=e.state.doc.lineAt(n).to,a=Math.max(o.from,t-30),l=Math.min(s,n+30),c=e.state.sliceDoc(a,l);if(a!=o.from){for(let e=0;e<30;e++)if(!K.test(c[e+1])&&K.test(c[e])){c=c.slice(e);break}}if(l!=s){for(let e=c.length-1;e>c.length-30;e--)if(!K.test(c[e-1])&&K.test(c[e])){c=c.slice(0,e);break}}return r.tk.announce.of(`${e.state.phrase("current match")}. ${c} ${e.state.phrase("on line")} ${o.number}.`)}let Z=r.tk.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),J=[_,o.Wl.low(D),Z]},72173:function(e,t,n){"use strict";n.d(t,{q4:()=>$,fC:()=>X,lj:()=>B,gb:()=>T,ap:()=>C});var r=n("455069");function o(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function s(...e){return t=>{let n=!1,r=e.map(e=>{let r=o(e,t);return!n&&"function"==typeof r&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];"function"==typeof n?n():o(e[t],null)}}}}function a(...e){return r.useCallback(s(...e),e)}n("921463");var l=n("151064"),c=Symbol("radix.slottable");function u(e){return r.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===c}var d=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let n=function(e){let t=function(e){let t=r.forwardRef((e,t)=>{let{children:n,...o}=e;if(r.isValidElement(n)){let e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(n=(t=Object.getOwnPropertyDescriptor(e,"ref")?.get)&&"isReactWarning"in t&&t.isReactWarning)?e.props.ref:e.props.ref||e.ref}(n),a=function(e,t){let n={...t};for(let r in t){let o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...e)=>{let t=s(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...s}:"className"===r&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}(o,n.props);return n.type!==r.Fragment&&(a.ref=t?s(t,e):e),r.cloneElement(n,a)}return r.Children.count(n)>1?r.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}(e),n=r.forwardRef((e,n)=>{let{children:o,...s}=e,a=r.Children.toArray(o),c=a.find(u);if(c){let e=c.props.children,o=a.map(t=>t!==c?t:r.Children.count(e)>1?r.Children.only(null):r.isValidElement(e)?e.props.children:null);return(0,l.jsx)(t,{...s,ref:n,children:r.isValidElement(e)?r.cloneElement(e,void 0,o):null})}return(0,l.jsx)(t,{...s,ref:n,children:o})});return n.displayName=`${e}.Slot`,n}(`Primitive.${t}`),o=r.forwardRef((e,r)=>{let{asChild:o,...s}=e,a=o?n:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,l.jsx)(a,{...s,ref:r})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),p=globalThis?.document?r.useLayoutEffect:()=>{},h=e=>{let{present:t,children:n}=e,o=function(e){var t,n;let[o,s]=r.useState(),a=r.useRef(null),l=r.useRef(e),c=r.useRef("none");let[u,d]=(t=e?"mounted":"unmounted",n={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},r.useReducer((e,t)=>n[e][t]??e,t));return r.useEffect(()=>{let e=f(a.current);c.current="mounted"===u?e:"none"},[u]),p(()=>{let t=a.current,n=l.current;if(n!==e){let r=c.current,o=f(t);e?d("MOUNT"):"none"===o||t?.display==="none"?d("UNMOUNT"):n&&r!==o?d("ANIMATION_OUT"):d("UNMOUNT"),l.current=e}},[e,d]),p(()=>{if(o){let e;let t=o.ownerDocument.defaultView??window,n=n=>{let r=f(a.current).includes(n.animationName);if(n.target===o&&r&&(d("ANIMATION_END"),!l.current)){let n=o.style.animationFillMode;o.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===o.style.animationFillMode&&(o.style.animationFillMode=n)})}},r=e=>{e.target===o&&(c.current=f(a.current))};return o.addEventListener("animationstart",r),o.addEventListener("animationcancel",n),o.addEventListener("animationend",n),()=>{t.clearTimeout(e),o.removeEventListener("animationstart",r),o.removeEventListener("animationcancel",n),o.removeEventListener("animationend",n)}}d("ANIMATION_END")},[o,d]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:r.useCallback(e=>{a.current=e?getComputedStyle(e):null,s(e)},[])}}(t),s="function"==typeof n?n({present:o.isPresent}):r.Children.only(n),l=a(o.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(n=(t=Object.getOwnPropertyDescriptor(e,"ref")?.get)&&"isReactWarning"in t&&t.isReactWarning)?e.props.ref:e.props.ref||e.ref}(s));return"function"==typeof n||o.isPresent?r.cloneElement(s,{ref:l}):null};h.displayName="Presence";function f(e){return e?.animationName||"none"}function m(e){let t=r.useRef(e);return r.useEffect(()=>{t.current=e}),r.useMemo(()=>(...e)=>t.current?.(...e),[])}var g=r.createContext(void 0);function v(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}var b="ScrollArea",[y,x]=function(e,t=[]){let n=[],o=()=>{let t=n.map(e=>r.createContext(e));return function(n){let o=n?.[e]||t;return r.useMemo(()=>({[`__scope${e}`]:{...n,[e]:o}}),[n,o])}};return o.scopeName=e,[function(t,o){let s=r.createContext(o),a=n.length;n=[...n,o];let c=t=>{let{scope:n,children:o,...c}=t,u=n?.[e]?.[a]||s,d=r.useMemo(()=>c,Object.values(c));return(0,l.jsx)(u.Provider,{value:d,children:o})};return c.displayName=t+"Provider",[c,function(n,l){let c=l?.[e]?.[a]||s,u=r.useContext(c);if(u)return u;if(void 0!==o)return o;throw Error(`\`${n}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let o=n.reduce((t,{useScope:n,scopeName:r})=>{let o=n(e)[`__scope${r}`];return{...t,...o}},{});return r.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}(o,...t)]}(b),[w,S]=y(b),k=r.forwardRef((e,t)=>{let{__scopeScrollArea:n,type:o="hover",dir:s,scrollHideDelay:c=600,...u}=e,[p,h]=r.useState(null),[f,m]=r.useState(null),[v,b]=r.useState(null),[y,x]=r.useState(null),[S,k]=r.useState(null),[A,C]=r.useState(0),[E,T]=r.useState(0),[_,O]=r.useState(!1),[M,I]=r.useState(!1),P=a(t,e=>h(e)),D=function(e){let t=r.useContext(g);return e||t||"ltr"}(s);return(0,l.jsx)(w,{scope:n,type:o,dir:D,scrollHideDelay:c,scrollArea:p,viewport:f,onViewportChange:m,content:v,onContentChange:b,scrollbarX:y,onScrollbarXChange:x,scrollbarXEnabled:_,onScrollbarXEnabledChange:O,scrollbarY:S,onScrollbarYChange:k,scrollbarYEnabled:M,onScrollbarYEnabledChange:I,onCornerWidthChange:C,onCornerHeightChange:T,children:(0,l.jsx)(d.div,{dir:D,...u,ref:P,style:{position:"relative","--radix-scroll-area-corner-width":A+"px","--radix-scroll-area-corner-height":E+"px",...e.style}})})});k.displayName=b;var A="ScrollAreaViewport",C=r.forwardRef((e,t)=>{let{__scopeScrollArea:n,children:o,nonce:s,...c}=e,u=S(A,n),p=a(t,r.useRef(null),u.onViewportChange);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),(0,l.jsx)(d.div,{"data-radix-scroll-area-viewport":"",...c,ref:p,style:{overflowX:u.scrollbarXEnabled?"scroll":"hidden",overflowY:u.scrollbarYEnabled?"scroll":"hidden",...e.style},children:(0,l.jsx)("div",{ref:u.onContentChange,style:{minWidth:"100%",display:"table"},children:o})})]})});C.displayName=A;var E="ScrollAreaScrollbar",T=r.forwardRef((e,t)=>{let{forceMount:n,...o}=e,s=S(E,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:c}=s,u="horizontal"===e.orientation;return r.useEffect(()=>(u?a(!0):c(!0),()=>{u?a(!1):c(!1)}),[u,a,c]),"hover"===s.type?(0,l.jsx)(_,{...o,ref:t,forceMount:n}):"scroll"===s.type?(0,l.jsx)(O,{...o,ref:t,forceMount:n}):"auto"===s.type?(0,l.jsx)(M,{...o,ref:t,forceMount:n}):"always"===s.type?(0,l.jsx)(I,{...o,ref:t}):null});T.displayName=E;var _=r.forwardRef((e,t)=>{let{forceMount:n,...o}=e,s=S(E,e.__scopeScrollArea),[a,c]=r.useState(!1);return r.useEffect(()=>{let e=s.scrollArea,t=0;if(e){let n=()=>{window.clearTimeout(t),c(!0)},r=()=>{t=window.setTimeout(()=>c(!1),s.scrollHideDelay)};return e.addEventListener("pointerenter",n),e.addEventListener("pointerleave",r),()=>{window.clearTimeout(t),e.removeEventListener("pointerenter",n),e.removeEventListener("pointerleave",r)}}},[s.scrollArea,s.scrollHideDelay]),(0,l.jsx)(h,{present:n||a,children:(0,l.jsx)(M,{"data-state":a?"visible":"hidden",...o,ref:t})})}),O=r.forwardRef((e,t)=>{var n,o;let{forceMount:s,...a}=e,c=S(E,e.__scopeScrollArea),u="horizontal"===e.orientation,d=Z(()=>f("SCROLL_END"),100);let[p,f]=(n="hidden",o={hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}},r.useReducer((e,t)=>o[e][t]??e,n));return r.useEffect(()=>{if("idle"===p){let e=window.setTimeout(()=>f("HIDE"),c.scrollHideDelay);return()=>window.clearTimeout(e)}},[p,c.scrollHideDelay,f]),r.useEffect(()=>{let e=c.viewport,t=u?"scrollLeft":"scrollTop";if(e){let n=e[t],r=()=>{let r=e[t];n!==r&&(f("SCROLL"),d()),n=r};return e.addEventListener("scroll",r),()=>e.removeEventListener("scroll",r)}},[c.viewport,u,f,d]),(0,l.jsx)(h,{present:s||"hidden"!==p,children:(0,l.jsx)(I,{"data-state":"hidden"===p?"hidden":"visible",...a,ref:t,onPointerEnter:v(e.onPointerEnter,()=>f("POINTER_ENTER")),onPointerLeave:v(e.onPointerLeave,()=>f("POINTER_LEAVE"))})})}),M=r.forwardRef((e,t)=>{let n=S(E,e.__scopeScrollArea),{forceMount:o,...s}=e,[a,c]=r.useState(!1),u="horizontal"===e.orientation,d=Z(()=>{if(n.viewport){let e=n.viewport.offsetWidth<n.viewport.scrollWidth,t=n.viewport.offsetHeight<n.viewport.scrollHeight;c(u?e:t)}},10);return J(n.viewport,d),J(n.content,d),(0,l.jsx)(h,{present:o||a,children:(0,l.jsx)(I,{"data-state":a?"visible":"hidden",...s,ref:t})})}),I=r.forwardRef((e,t)=>{let{orientation:n="vertical",...o}=e,s=S(E,e.__scopeScrollArea),a=r.useRef(null),c=r.useRef(0),[u,d]=r.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),p=V(u.viewport,u.content),h={...o,sizes:u,onSizesChange:d,hasThumb:!!(p>0&&p<1),onThumbChange:e=>a.current=e,onThumbPointerUp:()=>c.current=0,onThumbPointerDown:e=>c.current=e};function f(e,t){return function(e,t,n,r="ltr"){let o=q(n),s=t||o/2,a=n.scrollbar.paddingStart+s,l=n.scrollbar.size-n.scrollbar.paddingEnd-(o-s),c=n.content-n.viewport;return G([a,l],"ltr"===r?[0,c]:[-1*c,0])(e)}(e,c.current,u,t)}return"horizontal"===n?(0,l.jsx)(P,{...h,ref:t,onThumbPositionChange:()=>{if(s.viewport&&a.current){let e=W(s.viewport.scrollLeft,u,s.dir);a.current.style.transform=`translate3d(${e}px, 0, 0)`}},onWheelScroll:e=>{s.viewport&&(s.viewport.scrollLeft=e)},onDragScroll:e=>{s.viewport&&(s.viewport.scrollLeft=f(e,s.dir))}}):"vertical"===n?(0,l.jsx)(D,{...h,ref:t,onThumbPositionChange:()=>{if(s.viewport&&a.current){let e=W(s.viewport.scrollTop,u);a.current.style.transform=`translate3d(0, ${e}px, 0)`}},onWheelScroll:e=>{s.viewport&&(s.viewport.scrollTop=e)},onDragScroll:e=>{s.viewport&&(s.viewport.scrollTop=f(e))}}):null}),P=r.forwardRef((e,t)=>{let{sizes:n,onSizesChange:o,...s}=e,c=S(E,e.__scopeScrollArea),[u,d]=r.useState(),p=r.useRef(null),h=a(t,p,c.onScrollbarXChange);return r.useEffect(()=>{p.current&&d(getComputedStyle(p.current))},[p]),(0,l.jsx)(L,{"data-orientation":"horizontal",...s,ref:h,sizes:n,style:{bottom:0,left:"rtl"===c.dir?"var(--radix-scroll-area-corner-width)":0,right:"ltr"===c.dir?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":q(n)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(c.viewport){let r=c.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),function(e,t){return e>0&&e<t}(r,n)&&t.preventDefault()}},onResize:()=>{p.current&&c.viewport&&u&&o({content:c.viewport.scrollWidth,viewport:c.viewport.offsetWidth,scrollbar:{size:p.current.clientWidth,paddingStart:U(u.paddingLeft),paddingEnd:U(u.paddingRight)}})}})}),D=r.forwardRef((e,t)=>{let{sizes:n,onSizesChange:o,...s}=e,c=S(E,e.__scopeScrollArea),[u,d]=r.useState(),p=r.useRef(null),h=a(t,p,c.onScrollbarYChange);return r.useEffect(()=>{p.current&&d(getComputedStyle(p.current))},[p]),(0,l.jsx)(L,{"data-orientation":"vertical",...s,ref:h,sizes:n,style:{top:0,right:"ltr"===c.dir?0:void 0,left:"rtl"===c.dir?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":q(n)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(c.viewport){let r=c.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),function(e,t){return e>0&&e<t}(r,n)&&t.preventDefault()}},onResize:()=>{p.current&&c.viewport&&u&&o({content:c.viewport.scrollHeight,viewport:c.viewport.offsetHeight,scrollbar:{size:p.current.clientHeight,paddingStart:U(u.paddingTop),paddingEnd:U(u.paddingBottom)}})}})}),[N,R]=y(E),L=r.forwardRef((e,t)=>{let{__scopeScrollArea:n,sizes:o,hasThumb:s,onThumbChange:c,onThumbPointerUp:u,onThumbPointerDown:p,onThumbPositionChange:h,onDragScroll:f,onWheelScroll:g,onResize:b,...y}=e,x=S(E,n),[w,k]=r.useState(null),A=a(t,e=>k(e)),C=r.useRef(null),T=r.useRef(""),_=x.viewport,O=o.content-o.viewport,M=m(g),I=m(h),P=Z(b,10);function D(e){if(C.current){let t=e.clientX-C.current.left;f({x:t,y:e.clientY-C.current.top})}}return r.useEffect(()=>{let e=e=>{let t=e.target;w?.contains(t)&&M(e,O)};return document.addEventListener("wheel",e,{passive:!1}),()=>document.removeEventListener("wheel",e,{passive:!1})},[_,w,O,M]),r.useEffect(I,[o,I]),J(w,P),J(x.content,P),(0,l.jsx)(N,{scope:n,scrollbar:w,hasThumb:s,onThumbChange:m(c),onThumbPointerUp:m(u),onThumbPositionChange:I,onThumbPointerDown:m(p),children:(0,l.jsx)(d.div,{...y,ref:A,style:{position:"absolute",...y.style},onPointerDown:v(e.onPointerDown,e=>{0===e.button&&(e.target.setPointerCapture(e.pointerId),C.current=w.getBoundingClientRect(),T.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",x.viewport&&(x.viewport.style.scrollBehavior="auto"),D(e))}),onPointerMove:v(e.onPointerMove,D),onPointerUp:v(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=T.current,x.viewport&&(x.viewport.style.scrollBehavior=""),C.current=null})})})}),j="ScrollAreaThumb",$=r.forwardRef((e,t)=>{let{forceMount:n,...r}=e,o=R(j,e.__scopeScrollArea);return(0,l.jsx)(h,{present:n||o.hasThumb,children:(0,l.jsx)(F,{ref:t,...r})})}),F=r.forwardRef((e,t)=>{let{__scopeScrollArea:n,style:o,...s}=e,c=S(j,n),u=R(j,n),{onThumbPositionChange:p}=u,h=a(t,e=>u.onThumbChange(e)),f=r.useRef(void 0),m=Z(()=>{f.current&&(f.current(),f.current=void 0)},100);return r.useEffect(()=>{let e=c.viewport;if(e){let t=()=>{if(m(),!f.current){let t=Y(e,p);f.current=t,p()}};return p(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}},[c.viewport,m,p]),(0,l.jsx)(d.div,{"data-state":u.hasThumb?"visible":"hidden",...s,ref:h,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...o},onPointerDownCapture:v(e.onPointerDownCapture,e=>{let t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;u.onThumbPointerDown({x:n,y:r})}),onPointerUp:v(e.onPointerUp,u.onThumbPointerUp)})});$.displayName=j;var z="ScrollAreaCorner",B=r.forwardRef((e,t)=>{let n=S(z,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return"scroll"!==n.type&&r?(0,l.jsx)(H,{...e,ref:t}):null});B.displayName=z;var H=r.forwardRef((e,t)=>{let{__scopeScrollArea:n,...o}=e,s=S(z,n),[a,c]=r.useState(0),[u,p]=r.useState(0),h=!!(a&&u);return J(s.scrollbarX,()=>{let e=s.scrollbarX?.offsetHeight||0;s.onCornerHeightChange(e),p(e)}),J(s.scrollbarY,()=>{let e=s.scrollbarY?.offsetWidth||0;s.onCornerWidthChange(e),c(e)}),h?(0,l.jsx)(d.div,{...o,ref:t,style:{width:a,height:u,position:"absolute",right:"ltr"===s.dir?0:void 0,left:"rtl"===s.dir?0:void 0,bottom:0,...e.style}}):null});function U(e){return e?parseInt(e,10):0}function V(e,t){let n=e/t;return isNaN(n)?0:n}function q(e){let t=V(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd;return Math.max((e.scrollbar.size-n)*t,18)}function W(e,t,n="ltr"){let r=q(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=t.scrollbar.size-o,a=t.content-t.viewport,l=function(e,[t,n]){return Math.min(n,Math.max(t,e))}(e,"ltr"===n?[0,a]:[-1*a,0]);return G([0,a],[0,s-r])(l)}function G(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function K(e,t){return e>0&&e<t}var Y=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return!function o(){let s={left:e.scrollLeft,top:e.scrollTop},a=n.left!==s.left,l=n.top!==s.top;(a||l)&&t(),n=s,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function Z(e,t){let n=m(e),o=r.useRef(0);return r.useEffect(()=>()=>window.clearTimeout(o.current),[]),r.useCallback(()=>{window.clearTimeout(o.current),o.current=window.setTimeout(n,t)},[n,t])}function J(e,t){let n=m(t);p(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}var X=k},824946:function(e,t,n){"use strict";function r(e){var t,n,r,s=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);s--;){if(n&&null!=(t=e[n]))return t.call(e);if(r&&null!=(t=e[r]))return new o(t.call(e));n="@@asyncIterator",r="@@iterator"}throw TypeError("Object is not async iterable")}function o(e){function t(e){if(Object(e)!==e)return Promise.reject(TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return(o=function(e){this.s=e,this.n=e.next}).prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return void 0===n?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return void 0===n?Promise.reject(e):t(n.apply(this.s,arguments))}},new o(e)}n.d(t,{_:function(){return r}})},465228:function(e,t,n){"use strict";n.d(t,{he:function(){return eh}});var r=n(151064),o=n(794810),s=n(240119),a=n(808054),l=n(283697),c=n(319894),u=n(332955),d=n(39138),p=n(455069),h=n(598208),f=n(760226),m=n(626389);let g={scheme:"Light Theme",author:"mac gainor (https://github.com/mac-s-g)",base00:"rgba(0, 0, 0, 0)",base01:"rgb(245, 245, 245)",base02:"rgb(235, 235, 235)",base03:"#93a1a1",base04:"rgba(0, 0, 0, 0.3)",base05:"#586e75",base06:"#073642",base07:"#002b36",base08:"#d33682",base09:"#cb4b16",base0A:"#ffd500",base0B:"#859900",base0C:"#6c71c4",base0D:"#586e75",base0E:"#2aa198",base0F:"#268bd2"},v={scheme:"Dark Theme",author:"Chris Kempson (http://chriskempson.com)",base00:"#181818",base01:"#282828",base02:"#383838",base03:"#585858",base04:"#b8b8b8",base05:"#d8d8d8",base06:"#e8e8e8",base07:"#f8f8f8",base08:"#ab4642",base09:"#dc9656",base0A:"#f7ca88",base0B:"#a1b56c",base0C:"#86c1b9",base0D:"#7cafc2",base0E:"#ba8baf",base0F:"#a16946"},b=()=>null;b.when=()=>!1;let y=e=>(0,h.Ue)()((t,n)=>{var r,o,s,a,l,c,u,d,p,h,f,m,v,y,x,w,S,k,A,C,E,T,_;return{rootName:null!==(r=e.rootName)&&void 0!==r?r:"root",indentWidth:null!==(o=e.indentWidth)&&void 0!==o?o:3,keyRenderer:null!==(s=e.keyRenderer)&&void 0!==s?s:b,enableAdd:null!==(a=e.enableAdd)&&void 0!==a&&a,enableDelete:null!==(l=e.enableDelete)&&void 0!==l&&l,enableClipboard:null===(c=e.enableClipboard)||void 0===c||c,editable:null!==(u=e.editable)&&void 0!==u&&u,onChange:null!==(d=e.onChange)&&void 0!==d?d:()=>{},onCopy:null!==(p=e.onCopy)&&void 0!==p?p:void 0,onSelect:null!==(h=e.onSelect)&&void 0!==h?h:void 0,onAdd:null!==(f=e.onAdd)&&void 0!==f?f:void 0,onDelete:null!==(m=e.onDelete)&&void 0!==m?m:void 0,defaultInspectDepth:null!==(v=e.defaultInspectDepth)&&void 0!==v?v:5,defaultInspectControl:null!==(y=e.defaultInspectControl)&&void 0!==y?y:void 0,maxDisplayLength:null!==(x=e.maxDisplayLength)&&void 0!==x?x:30,groupArraysAfterLength:null!==(w=e.groupArraysAfterLength)&&void 0!==w?w:100,collapseStringsAfterLength:!1===e.collapseStringsAfterLength?Number.MAX_VALUE:null!==(S=e.collapseStringsAfterLength)&&void 0!==S?S:50,objectSortKeys:null!==(k=e.objectSortKeys)&&void 0!==k&&k,quotesOnKeys:null===(A=e.quotesOnKeys)||void 0===A||A,displayDataTypes:null===(C=e.displayDataTypes)||void 0===C||C,displaySize:null===(E=e.displaySize)||void 0===E||E,displayComma:null!==(T=e.displayComma)&&void 0!==T&&T,highlightUpdates:null!==(_=e.highlightUpdates)&&void 0!==_&&_,inspectCache:{},hoverPath:null,colorspace:g,value:e.value,prevValue:void 0,getInspectCache:(e,t)=>{let r=void 0!==t?e.join(".")+"[".concat(t,"]nt"):e.join(".");return n().inspectCache[r]},setInspectCache:(e,n,r)=>{let o=void 0!==r?e.join(".")+"[".concat(r,"]nt"):e.join(".");t(e=>({inspectCache:{...e.inspectCache,[o]:"function"==typeof n?n(e.inspectCache[o]):n}}))},setHover:(e,n)=>{t({hoverPath:e?{path:e,nestedIndex:n}:null})}}}),x=(0,p.createContext)(void 0);x.Provider;let w=(e,t)=>{let n=(0,p.useContext)(x);return(0,h.oR)(n,e,t)},S=()=>w(e=>e.colorspace.base07),k=Object.prototype.constructor.toString(),A=(e,t,n)=>{if(null===e||null===n||"object"!=typeof e||"object"!=typeof n)return!1;if(Object.is(e,n)&&0!==t.length)return"";let r=[],o=[...t],s=e;for(;(s!==n||0!==o.length)&&"object"==typeof s&&null!==s;){;if(Object.is(s,n))return r.reduce((e,t,n)=>"number"==typeof t?e+"[".concat(t,"]"):e+"".concat(0===n?"":".").concat(t),"");let e=o.shift();r.push(e),s=s[e]}return!1};function C(e){if(null===e)return 0;if(Array.isArray(e))return e.length;if(e instanceof Map||e instanceof Set)return e.size;else if(e instanceof Date);else if("object"==typeof e)return Object.keys(e).length;else if("string"==typeof e)return e.length;return 1}function E(e,t){let n=[],r=0;for(;r<e.length;)n.push(e.slice(r,r+t)),r+=t;return n}async function T(e){if("clipboard"in navigator)try{await navigator.clipboard.writeText(e)}catch{}m(e)}function _(e,t){let n=w(e=>e.value);return(0,p.useMemo)(()=>A(n,e,t),[e,t,n])}let O=e=>(0,r.jsx)(o.Z,{component:"div",...e,sx:{display:"inline-block",...e.sx}}),M=e=>{let{dataType:t,enable:n=!0}=e;return n?(0,r.jsx)(O,{className:"data-type-label",sx:{mx:.5,fontSize:"0.7rem",opacity:.8,userSelect:"none"},children:t}):null};function I(e){let{is:t,serialize:n,deserialize:o,type:a,colorKey:l,displayTypeLabel:c=!0,Renderer:u}=e,d=(0,p.memo)(u),h=e=>{let t=w(e=>e.displayDataTypes),n=w(e=>e.colorspace[l]),o=w(e=>e.onSelect);return(0,r.jsxs)(O,{onClick:()=>null==o?void 0:o(e.path,e.value),sx:{color:n},children:[c&&t&&(0,r.jsx)(M,{dataType:a}),(0,r.jsx)(O,{className:"".concat(a,"-value"),children:(0,r.jsx)(d,{path:e.path,inspect:e.inspect,setInspect:e.setInspect,value:e.value,prevValue:e.prevValue})})]})};if(h.displayName="easy-".concat(a,"-type"),!n||!o)return{is:t,Component:h};let f=e=>{let{value:t,setValue:n,abortEditing:o,commitEditing:a}=e,c=w(e=>e.colorspace[l]),u=(0,p.useCallback)(e=>{"Enter"===e.key&&(e.preventDefault(),a(t)),"Escape"===e.key&&(e.preventDefault(),o())},[o,a,t]),d=(0,p.useCallback)(e=>{n(e.target.value)},[n]);return(0,r.jsx)(s.ZP,{autoFocus:!0,value:t,onChange:d,onKeyDown:u,size:"small",multiline:!0,sx:{color:c,padding:.5,borderStyle:"solid",borderColor:"black",borderWidth:1,fontSize:"0.8rem",fontFamily:"monospace",display:"inline-flex"}})};return f.displayName="easy-".concat(a,"-type-editor"),{is:t,serialize:n,deserialize:o,Component:h,Editor:f}}let P=I({is:e=>"boolean"==typeof e,type:"bool",colorKey:"base0E",serialize:e=>e.toString(),deserialize:e=>{if("true"===e)return!0;if("false"===e)return!1;throw Error("Invalid boolean value")},Renderer:e=>{let{value:t}=e;return(0,r.jsx)(r.Fragment,{children:t?"true":"false"})}}),D={weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"},N=I({is:e=>e instanceof Date,type:"date",colorKey:"base0D",Renderer:e=>{let{value:t}=e;return(0,r.jsx)(r.Fragment,{children:t.toLocaleTimeString("en-us",D)})}}),R=e=>{let t=e.toString(),n=!0,r=t.indexOf(")"),o=t.indexOf("=>");return(-1!==o&&o>r&&(n=!1),n)?t.substring(t.indexOf("{",r)+1,t.lastIndexOf("}")):t.substring(t.indexOf("=>")+2)},L=e=>{let t=e.toString();return -1!==t.indexOf("function")?t.substring(8,t.indexOf("{")).trim():t.substring(0,t.indexOf("=>")+2).trim()},j=I({is:e=>null===e,type:"null",colorKey:"base08",displayTypeLabel:!1,Renderer:()=>{let e=w(e=>e.colorspace.base02);return(0,r.jsx)(o.Z,{sx:{fontSize:"0.8rem",backgroundColor:e,fontWeight:"bold",borderRadius:"3px",padding:"0.5px 2px"},children:"NULL"})}}),$=e=>e%1==0,F=I({is:e=>"number"==typeof e&&isNaN(e),type:"NaN",colorKey:"base08",displayTypeLabel:!1,serialize:()=>"NaN",deserialize:e=>parseFloat(e),Renderer:()=>{let e=w(e=>e.colorspace.base02);return(0,r.jsx)(o.Z,{sx:{backgroundColor:e,fontSize:"0.8rem",fontWeight:"bold",borderRadius:"3px",padding:"0.5px 2px"},children:"NaN"})}}),z=I({is:e=>"number"==typeof e&&!$(e)&&!isNaN(e),type:"float",colorKey:"base0B",serialize:e=>e.toString(),deserialize:e=>parseFloat(e),Renderer:e=>{let{value:t}=e;return(0,r.jsx)(r.Fragment,{children:t})}}),B=I({is:e=>"number"==typeof e&&$(e),type:"int",colorKey:"base0F",serialize:e=>e.toString(),deserialize:e=>parseFloat(e),Renderer:e=>{let{value:t}=e;return(0,r.jsx)(r.Fragment,{children:t})}}),H=I({is:e=>"bigint"==typeof e,type:"bigint",colorKey:"base0F",serialize:e=>e.toString(),deserialize:e=>BigInt(e.replace(/\D/g,"")),Renderer:e=>{let{value:t}=e;return(0,r.jsx)(r.Fragment,{children:"".concat(t,"n")})}}),U=e=>{let{d:t,...n}=e;return(0,r.jsx)(l.Z,{...n,children:(0,r.jsx)("path",{d:t})})},V=e=>(0,r.jsx)(U,{d:"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 16H5V5h14zm-8-2h2v-4h4v-2h-4V7h-2v4H7v2h4z",...e}),q=e=>(0,r.jsx)(U,{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z",...e}),W=e=>(0,r.jsx)(U,{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",...e}),G=e=>(0,r.jsx)(U,{d:"M 12 2 C 10.615 1.998 9.214625 2.2867656 7.890625 2.8847656 L 8.9003906 4.6328125 C 9.9043906 4.2098125 10.957 3.998 12 4 C 15.080783 4 17.738521 5.7633175 19.074219 8.3222656 L 17.125 9 L 21.25 11 L 22.875 7 L 20.998047 7.6523438 C 19.377701 4.3110398 15.95585 2 12 2 z M 6.5097656 4.4882812 L 2.2324219 5.0820312 L 3.734375 6.3808594 C 1.6515335 9.4550558 1.3615962 13.574578 3.3398438 17 C 4.0308437 18.201 4.9801562 19.268234 6.1601562 20.115234 L 7.1699219 18.367188 C 6.3019219 17.710187 5.5922656 16.904 5.0722656 16 C 3.5320014 13.332354 3.729203 10.148679 5.2773438 7.7128906 L 6.8398438 9.0625 L 6.5097656 4.4882812 z M 19.929688 13 C 19.794687 14.08 19.450734 15.098 18.927734 16 C 17.386985 18.668487 14.531361 20.090637 11.646484 19.966797 L 12.035156 17.9375 L 8.2402344 20.511719 L 10.892578 23.917969 L 11.265625 21.966797 C 14.968963 22.233766 18.681899 20.426323 20.660156 17 C 21.355156 15.801 21.805219 14.445 21.949219 13 L 19.929688 13 z",...e}),K=e=>(0,r.jsx)(U,{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z",...e}),Y=e=>(0,r.jsx)(U,{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",...e}),Z=e=>(0,r.jsx)(U,{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z",...e}),J=e=>(0,r.jsx)(U,{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z",...e}),X=e=>(0,r.jsx)(U,{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5l-1-1h-5l-1 1H5v2h14V4z",...e});function Q(e){let t=C(e),n="";return(e instanceof Map||e instanceof Set)&&(n=e[Symbol.toStringTag]),Object.prototype.hasOwnProperty.call(e,Symbol.toStringTag)&&(n=e[Symbol.toStringTag]),"".concat(t," Items").concat(n?" (".concat(n,")"):"")}let ee={is:e=>"object"==typeof e,Component:e=>{let t=S(),n=w(e=>e.colorspace.base02),s=w(e=>e.groupArraysAfterLength),a=_(e.path,e.value),[l,c]=(0,p.useState)(w(e=>e.maxDisplayLength)),u=w(e=>e.objectSortKeys),d=(0,p.useMemo)(()=>{var n,o;if(!e.inspect)return null;let a=e.value;if("function"==typeof(null==(n=a)?void 0:n[Symbol.iterator])&&!Array.isArray(a)){let t=[];if(a instanceof Map){let n=a.size-1,o=0;a.forEach((s,a)=>{let l=a.toString(),c=[...e.path,l];t.push((0,r.jsx)(ec,{path:c,value:s,prevValue:e.prevValue instanceof Map?e.prevValue.get(a):void 0,editable:!1,last:o===n},l)),o++})}else{let n=a[Symbol.iterator](),s=n.next(),l=0;for(;;){;let a=n.next();if(t.push((0,r.jsx)(ec,{path:[...e.path,"iterator:".concat(l)],value:s.value,nestedIndex:l,editable:!1,last:null!==(o=a.done)&&void 0!==o&&o},l)),a.done)break;l++,s=a}}return t}if(Array.isArray(a)){let n=a.length-1;if(a.length<=s){let o=a.slice(0,l).map((t,o)=>{let a=e.nestedIndex?e.nestedIndex*s+o:o,l=[...e.path,a];return(0,r.jsx)(ec,{path:l,value:t,prevValue:Array.isArray(e.prevValue)?e.prevValue[a]:void 0,last:o===n},a)});if(a.length>l){let e=a.length-l;o.push((0,r.jsxs)(O,{sx:{cursor:"pointer",lineHeight:1.5,color:t,letterSpacing:.5,opacity:.8,userSelect:"none"},onClick:()=>c(e=>2*e),children:["hidden ",e," items…"]},"last"))}return o}let o=E(a,s),u=Array.isArray(e.prevValue)?E(e.prevValue,s):void 0,d=o.length-1;return o.map((t,n)=>(0,r.jsx)(ec,{path:e.path,value:t,nestedIndex:n,prevValue:null==u?void 0:u[n],last:n===d},n))}let d=Object.entries(a);u&&(d=!0===u?d.sort((e,t)=>{let[n]=e,[r]=t;return n.localeCompare(r)}):d.sort((e,t)=>{let[n]=e,[r]=t;return u(n,r)}));let p=d.length-1,h=d.slice(0,l).map((t,n)=>{var o;let[s,a]=t,l=[...e.path,s];return(0,r.jsx)(ec,{path:l,value:a,prevValue:null===(o=e.prevValue)||void 0===o?void 0:o[s],last:n===p},s)});if(d.length>l){let e=d.length-l;h.push((0,r.jsxs)(O,{sx:{cursor:"pointer",lineHeight:1.5,color:t,letterSpacing:.5,opacity:.8,userSelect:"none"},onClick:()=>c(e=>2*e),children:["hidden ",e," items…"]},"last"))}return h},[e.inspect,e.value,e.prevValue,e.path,e.nestedIndex,s,l,t,u]),h=e.inspect?.6:0,f=w(e=>e.indentWidth),m=e.inspect?f-h:f;return(0,p.useMemo)(()=>0===C(e.value),[e.value])?null:(0,r.jsx)(o.Z,{className:"data-object",sx:{display:e.inspect?"block":"inline-block",pl:e.inspect?m-.6:0,marginLeft:h,color:t,borderLeft:e.inspect?"1px solid ".concat(n):"none"},children:e.inspect?d:!a&&(0,r.jsx)(o.Z,{component:"span",className:"data-object-body",onClick:()=>e.setInspect(!0),sx:{"&:hover":{cursor:"pointer"},padding:.5,userSelect:"none"},children:"…"})})},PreComponent:e=>{let t=w(e=>e.colorspace.base04),n=S(),s=(0,p.useMemo)(()=>Array.isArray(e.value)||e.value instanceof Set,[e.value]),a=(0,p.useMemo)(()=>0===C(e.value),[e.value]),l=(0,p.useMemo)(()=>Q(e.value),[e.value]),c=w(e=>e.displaySize),u=(0,p.useMemo)(()=>"function"==typeof c?c(e.path,e.value):c,[c,e.path,e.value]),d=_(e.path,e.value);return(0,r.jsxs)(o.Z,{component:"span",className:"data-object-start",sx:{letterSpacing:.5},children:[s?"[":"{",u&&e.inspect&&!a&&(0,r.jsx)(o.Z,{component:"span",sx:{pl:.5,fontStyle:"italic",color:t,userSelect:"none"},children:l}),d&&!e.inspect&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(G,{sx:{fontSize:12,color:n,mx:.5}}),(0,r.jsx)(O,{sx:{cursor:"pointer",userSelect:"none"},children:d})]})]})},PostComponent:e=>{let t=w(e=>e.colorspace.base04),n=S(),s=(0,p.useMemo)(()=>Array.isArray(e.value)||e.value instanceof Set,[e.value]),a=(0,p.useMemo)(()=>0===C(e.value),[e.value]),l=(0,p.useMemo)(()=>Q(e.value),[e.value]),c=w(e=>e.displaySize),u=(0,p.useMemo)(()=>"function"==typeof c?c(e.path,e.value):c,[c,e.path,e.value]);return(0,r.jsxs)(o.Z,{component:"span",className:"data-object-end",sx:{lineHeight:1.5,color:n,letterSpacing:.5,opacity:.8},children:[s?"]":"}",u&&(a||!e.inspect)?(0,r.jsx)(o.Z,{component:"span",sx:{pl:.5,fontStyle:"italic",color:t,userSelect:"none"},children:l}):null]})}},et=I({is:e=>"string"==typeof e,type:"string",colorKey:"base09",serialize:e=>e,deserialize:e=>e,Renderer:e=>{let[t,n]=(0,p.useState)(!1),s=w(e=>e.collapseStringsAfterLength),a=t?e.value:e.value.slice(0,s),l=e.value.length>s;return(0,r.jsxs)(o.Z,{component:"span",sx:{overflowWrap:"anywhere",cursor:l?"pointer":"inherit"},onClick:()=>{var e;if((null===(e=window.getSelection())||void 0===e?void 0:e.type)!=="Range")l&&n(e=>!e)},children:['"',a,l&&!t&&(0,r.jsx)(o.Z,{component:"span",sx:{padding:.5},children:"…"}),'"']})}}),en=I({is:e=>void 0===e,type:"undefined",colorKey:"base05",displayTypeLabel:!1,Renderer:()=>{let e=w(e=>e.colorspace.base02);return(0,r.jsx)(o.Z,{sx:{fontSize:"0.7rem",backgroundColor:e,borderRadius:"3px",padding:"0.5px 2px"},children:"undefined"})}});function er(e){function t(e,t){var n,r;return Object.is(e.value,t.value)&&e.inspect&&t.inspect&&(null===(n=e.path)||void 0===n?void 0:n.join("."))===(null===(r=t.path)||void 0===r?void 0:r.join("."))}return e.Component=(0,p.memo)(e.Component,t),e.Editor&&(e.Editor=(0,p.memo)(e.Editor,function(e,t){return Object.is(e.value,t.value)})),e.PreComponent&&(e.PreComponent=(0,p.memo)(e.PreComponent,t)),e.PostComponent&&(e.PostComponent=(0,p.memo)(e.PostComponent,t)),e}let ei=[er(P),er(N),er(j),er(en),er(et),er({is:e=>"function"==typeof e,Component:e=>{let t=w(e=>e.colorspace.base05);return(0,r.jsx)(a.Z,{children:(0,r.jsx)(o.Z,{className:"data-function",sx:{display:e.inspect?"block":"inline-block",pl:e.inspect?2:0,color:t},children:e.inspect?R(e.value):(0,r.jsx)(o.Z,{component:"span",className:"data-function-body",onClick:()=>e.setInspect(!0),sx:{"&:hover":{cursor:"pointer"},padding:.5},children:"…"})})})},PreComponent:e=>(0,r.jsxs)(a.Z,{children:[(0,r.jsx)(M,{dataType:"function"}),(0,r.jsxs)(o.Z,{component:"span",className:"data-function-start",sx:{letterSpacing:.5},children:[L(e.value)," ","{"]})]}),PostComponent:()=>(0,r.jsx)(a.Z,{children:(0,r.jsx)(o.Z,{component:"span",className:"data-function-end",children:"}"})})}),er(F),er(B),er(z),er(H)],eo=()=>(0,f.M)()(e=>({registry:ei,registerTypes:t=>{e(e=>({registry:"function"==typeof t?t(e.registry):t}))}})),es=(0,p.createContext)(void 0);es.Provider;let ea=(e,t)=>{let n=(0,p.useContext)(es);return(0,h.oR)(n,e,t)},el=e=>(0,r.jsx)(o.Z,{component:"span",...e,sx:{cursor:"pointer",paddingLeft:"0.7rem",...e.sx}}),ec=e=>{var t;let{value:n,prevValue:s,path:a,nestedIndex:l,last:c}=e,{Component:u,PreComponent:d,PostComponent:h,Editor:f,serialize:m,deserialize:g}=function(e,t){let n=ea(e=>e.registry);return(0,p.useMemo)(()=>(function(e,t,n){let r;for(let o of n)o.is(e,t)&&(r=o);if(void 0===r){if("object"==typeof e)return ee;throw Error("No type matched for value: ".concat(e))}return r})(e,t,n),[e,t,n])}(n,a),v=null!==(t=e.editable)&&void 0!==t?t:void 0,b=w(e=>e.editable),y=(0,p.useMemo)(()=>!1!==b&&!1!==v&&("function"==typeof b?!!b(a,n):b),[a,v,b,n]),[x,A]=(0,p.useState)(""),E=a.length,M=a[E-1],I=w(e=>e.hoverPath),P=(0,p.useMemo)(()=>I&&a.every((e,t)=>e===I.path[t]&&l===I.nestedIndex),[I,a,l]),D=w(e=>e.setHover),N=w(e=>e.value),[R,L]=function(e,t,n){let r=e.length,o=_(e,t),s=w(e=>e.getInspectCache),a=w(e=>e.setInspectCache),l=w(e=>e.defaultInspectDepth),c=w(e=>e.defaultInspectControl);(0,p.useEffect)(()=>{if(void 0!==s(e,n))return;if(void 0!==n){a(e,!1,n);return}let u=!o&&("function"==typeof c?c(e,t):r<l);a(e,u)},[l,c,r,s,o,n,e,t,a]);let[u,d]=(0,p.useState)(()=>{let a=s(e,n);return void 0!==a?a:void 0===n&&!o&&("function"==typeof c?c(e,t):r<l)});return[u,(0,p.useCallback)(t=>{d(r=>{let o="boolean"==typeof t?t:t(r);return a(e,o,n),o})},[n,e,a])]}(a,n,l),[j,$]=(0,p.useState)(!1),F=w(e=>e.onChange),z=S(),B=w(e=>e.colorspace.base0C),H=w(e=>e.colorspace.base0A),U=w(e=>e.displayComma),G=w(e=>e.quotesOnKeys),Q=w(e=>e.rootName),et=N===n,en=Number.isInteger(Number(M)),er=w(e=>e.enableAdd),ei=w(e=>e.onAdd),eo=(0,p.useMemo)(()=>!!ei&&void 0===l&&!1!==er&&!1!==v&&("function"==typeof er?!!er(a,n):!!(Array.isArray(n)||function(e){if(!e||"object"!=typeof e)return!1;let t=Object.getPrototypeOf(e);if(null===t)return!0;let n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===k}(n))||!1),[ei,l,a,er,v,n]),es=w(e=>e.enableDelete),ec=w(e=>e.onDelete),eu=(0,p.useMemo)(()=>!!ec&&void 0===l&&!et&&!1!==es&&!1!==v&&("function"==typeof es?!!es(a,n):es),[ec,l,et,a,es,v,n]),ed=w(e=>e.enableClipboard),{copy:ep,copied:eh}=function(){let{timeout:e=2e3}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[t,n]=(0,p.useState)(!1),r=(0,p.useRef)(null),o=(0,p.useCallback)(t=>{let o=r.current;o&&window.clearTimeout(o),r.current=window.setTimeout(()=>n(!1),e),n(t)},[e]),s=w(e=>e.onCopy),a=(0,p.useCallback)(async(e,t)=>{if("function"==typeof s)try{await s(e,t,T),o(!0)}catch(t){console.error("error when copy ".concat(0===e.length?"src":"src[".concat(e.join(".")),"]"),t)}else try{let e=function(e,t){let n=[];return JSON.stringify(e,function(e,t){if("bigint"==typeof t)return t.toString();if(t instanceof Map){if("toJSON"in t&&"function"==typeof t.toJSON)return t.toJSON();if(0===t.size)return{};if(n.includes(t))return"[Circular]";n.push(t);let e=Array.from(t.entries());return e.every(e=>{let[t]=e;return"string"==typeof t||"number"==typeof t})?Object.fromEntries(e):{}}if(t instanceof Set)return"toJSON"in t&&"function"==typeof t.toJSON?t.toJSON():n.includes(t)?"[Circular]":(n.push(t),Array.from(t.values()));if("object"==typeof t&&null!==t&&Object.keys(t).length){let r=n.length;if(r){for(let o=r-1;o>=0&&n[o][e]!==t;--o)n.pop();if(n.includes(t))return"[Circular]"}n.push(t)}return t}," ")}("function"==typeof t?t.toString():t," ");await T(e),o(!0)}catch(t){console.error("error when copy ".concat(0===e.length?"src":"src[".concat(e.join(".")),"]"),t)}},[o,s]);return{copy:a,reset:(0,p.useCallback)(()=>{n(!1),r.current&&clearTimeout(r.current)},[]),copied:t}}(),ef=w(e=>e.highlightUpdates),em=(0,p.useMemo)(()=>{if(!ef||void 0===s)return!1;if(typeof n!=typeof s)return!0;if("number"==typeof n)return!(isNaN(n)&&isNaN(s))&&n!==s;return Array.isArray(n)!==Array.isArray(s)||"object"!=typeof n&&"function"!=typeof n&&(n!==s||!1)},[ef,s,n]),eg=(0,p.useRef)();(0,p.useEffect)(()=>{eg.current&&em&&"animate"in eg.current&&eg.current.animate([{backgroundColor:H},{backgroundColor:""}],{duration:1e3,easing:"ease-in"})},[H,em,s,n]);let ev=(0,p.useCallback)(e=>{e.preventDefault(),m&&A(m(n)),$(!0)},[m,n]),eb=(0,p.useCallback)(()=>{$(!1),A("")},[$,A]),ey=(0,p.useCallback)(e=>{if($(!1),g)try{F(a,n,g(e))}catch(e){}},[$,g,F,a,n]),ex=(0,p.useMemo)(()=>j?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(el,{children:(0,r.jsx)(K,{sx:{fontSize:".8rem"},onClick:eb})}),(0,r.jsx)(el,{children:(0,r.jsx)(q,{sx:{fontSize:".8rem"},onClick:()=>ey(x)})})]}):(0,r.jsxs)(r.Fragment,{children:[ed&&(0,r.jsx)(el,{onClick:e=>{e.preventDefault();try{ep(a,n,T)}catch(e){console.error(e)}},children:eh?(0,r.jsx)(q,{sx:{fontSize:".8rem"}}):(0,r.jsx)(Y,{sx:{fontSize:".8rem"}})}),f&&y&&m&&g&&(0,r.jsx)(el,{onClick:ev,children:(0,r.jsx)(Z,{sx:{fontSize:".8rem"}})}),eo&&(0,r.jsx)(el,{onClick:e=>{e.preventDefault(),null==ei||ei(a)},children:(0,r.jsx)(V,{sx:{fontSize:".8rem"}})}),eu&&(0,r.jsx)(el,{onClick:e=>{e.preventDefault(),null==ec||ec(a,n)},children:(0,r.jsx)(X,{sx:{fontSize:".9rem"}})})]}),[f,m,g,eh,ep,y,j,ed,eo,eu,x,a,n,ei,ec,ev,eb,ey]),ew=(0,p.useMemo)(()=>0===C(n),[n]),eS=!ew&&!!(d&&h),ek=w(e=>e.keyRenderer),eA=(0,p.useMemo)(()=>({path:a,inspect:R,setInspect:L,value:n,prevValue:s,nestedIndex:l}),[R,a,L,n,s,l]);return(0,r.jsxs)(o.Z,{className:"data-key-pair","data-testid":"data-key-pair"+a.join("."),sx:{userSelect:"text"},onMouseEnter:(0,p.useCallback)(()=>D(a,l),[D,a,l]),children:[(0,r.jsxs)(O,{component:"span",className:"data-key",sx:{lineHeight:1.5,color:z,letterSpacing:.5,opacity:.8},onClick:(0,p.useCallback)(e=>{if(!e.isDefaultPrevented())!ew&&L(e=>!e)},[ew,L]),children:[eS?R?(0,r.jsx)(J,{className:"data-key-toggle-expanded",sx:{fontSize:".8rem","&:hover":{cursor:"pointer"}}}):(0,r.jsx)(W,{className:"data-key-toggle-collapsed",sx:{fontSize:".8rem","&:hover":{cursor:"pointer"}}}):null,(0,r.jsx)(o.Z,{ref:eg,className:"data-key-key",component:"span",children:et&&0===E?!1!==Q?G?(0,r.jsxs)(r.Fragment,{children:['"',Q,'"']}):(0,r.jsx)(r.Fragment,{children:Q}):null:ek.when(eA)?(0,r.jsx)(ek,{...eA}):void 0===l&&(en?(0,r.jsx)(o.Z,{component:"span",style:{color:B,userSelect:en?"none":"auto"},children:M}):G?(0,r.jsxs)(r.Fragment,{children:['"',M,'"']}):(0,r.jsx)(r.Fragment,{children:M}))}),et?!1!==Q&&(0,r.jsx)(O,{className:"data-key-colon",sx:{mr:.5},children:":"}):void 0===l&&(0,r.jsx)(O,{className:"data-key-colon",sx:{mr:.5,".data-key-key:empty + &":{display:"none"},userSelect:en?"none":"auto"},children:":"}),d&&(0,r.jsx)(d,{...eA}),P&&eS&&R&&ex]}),j&&y?f&&(0,r.jsx)(f,{path:a,value:x,setValue:A,abortEditing:eb,commitEditing:ey}):u?(0,r.jsx)(u,{...eA}):(0,r.jsx)(o.Z,{component:"span",className:"data-value-fallback",children:"fallback: ".concat(n)}),h&&(0,r.jsx)(h,{...eA}),!c&&U&&(0,r.jsx)(O,{children:","}),P&&eS&&!R&&ex,P&&!eS&&ex,!P&&j&&ex]})},eu="(prefers-color-scheme: dark)";function ed(e,t){let{setState:n}=(0,p.useContext)(x);(0,p.useEffect)(()=>{void 0!==t&&n({[e]:t})},[e,t,n])}let ep=e=>{let{setState:t}=(0,p.useContext)(x);(0,p.useEffect)(()=>{t(t=>({prevValue:t.value,value:e.value}))},[e.value,t]),ed("rootName",e.rootName),ed("indentWidth",e.indentWidth),ed("keyRenderer",e.keyRenderer),ed("enableAdd",e.enableAdd),ed("enableDelete",e.enableDelete),ed("enableClipboard",e.enableClipboard),ed("editable",e.editable),ed("onChange",e.onChange),ed("onCopy",e.onCopy),ed("onSelect",e.onSelect),ed("onAdd",e.onAdd),ed("onDelete",e.onDelete),ed("maxDisplayLength",e.maxDisplayLength),ed("groupArraysAfterLength",e.groupArraysAfterLength),ed("quotesOnKeys",e.quotesOnKeys),ed("displayDataTypes",e.displayDataTypes),ed("displaySize",e.displaySize),ed("displayComma",e.displayComma),ed("highlightUpdates",e.highlightUpdates),(0,p.useEffect)(()=>{"light"===e.theme?t({colorspace:g}):"dark"===e.theme?t({colorspace:v}):"object"==typeof e.theme&&t({colorspace:e.theme})},[t,e.theme]);let n=(0,p.useMemo)(()=>"object"==typeof e.theme?"json-viewer-theme-custom":"dark"===e.theme?"json-viewer-theme-dark":"json-viewer-theme-light",[e.theme]),o=(0,p.useRef)(!0),s=ea(e=>e.registerTypes);o.current&&(s(e.valueTypes?[...ei,...e.valueTypes]:[...ei]),o.current=!1),(0,p.useEffect)(()=>{s(e.valueTypes?[...ei,...e.valueTypes]:[...ei])},[e.valueTypes,s]);let a=w(e=>e.value),l=w(e=>e.prevValue),u=(0,p.useMemo)(()=>[],[]),d=w(e=>e.setHover),h=(0,p.useCallback)(()=>d(null),[d]);return(0,r.jsx)(c.Z,{elevation:0,className:function(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=function e(t){var n,r,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t){if(Array.isArray(t)){var s=t.length;for(n=0;n<s;n++)t[n]&&(r=e(t[n]))&&(o&&(o+=" "),o+=r)}else for(r in t)t[r]&&(o&&(o+=" "),o+=r)}return o}(e))&&(r&&(r+=" "),r+=t);return r}(n,e.className),style:e.style,sx:{fontFamily:"monospace",userSelect:"none",contentVisibility:"auto",...e.sx},onMouseLeave:h,children:(0,r.jsx)(ec,{value:a,prevValue:l,path:u,last:!0})})},eh=function(e){let t=function(){let[e,t]=(0,p.useState)(!1);return(0,p.useEffect)(()=>{let e=e=>t(e.matches);t(window.matchMedia(eu).matches);let n=window.matchMedia(eu);return n.addEventListener("change",e),()=>n.removeEventListener("change",e)},[]),e}(),n=(0,p.useMemo)(()=>{var n;return"auto"===e.theme?t?"dark":"light":null!==(n=e.theme)&&void 0!==n?n:"light"},[t,e.theme]),o=(0,p.useMemo)(()=>{let e="object"==typeof n?n.base00:"dark"===n?v.base00:g.base00,t="object"==typeof n?n.base07:"dark"===n?v.base07:g.base07;return(0,u.Z)({components:{MuiPaper:{styleOverrides:{root:{backgroundColor:e,color:t}}}},palette:{mode:"dark"===n?"dark":"light",background:{default:e}}})},[n]),s={...e,theme:n},a=(0,p.useMemo)(()=>y(e),[]),l=(0,p.useMemo)(()=>eo(),[]);return(0,r.jsx)(d.Z,{theme:o,children:(0,r.jsx)(es.Provider,{value:l,children:(0,r.jsx)(x.Provider,{value:a,children:(0,r.jsx)(ep,{...s})})})})}},453203:function(e,t,n){"use strict";n.d(t,{ML:()=>e9,P1:()=>Y,hj:()=>ev,NB:()=>tr,x2:()=>te,zK:()=>tt,S0:()=>tn,qv:()=>ez,Cf:()=>e7,vc:()=>ed,Nl:()=>q,nU:()=>X,EG:()=>eG,K9:()=>ti});var r,o=n("871738"),s=n("661763"),a=n("132308"),l=n("153737"),c=n("240554");let u=(e,t)=>!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function d(e,t){let{$cursor:n}=e.selection;return n&&(t?t.endOfTextblock("backward",e):!(n.parentOffset>0))?n:null}let p=(e,t,n)=>{let r=d(e,n);if(!r)return!1;let s=b(r);if(!s){let n=r.blockRange(),o=n&&(0,c.k9)(n);return null!=o&&(t&&t(e.tr.lift(n,o).scrollIntoView()),!0)}let a=s.nodeBefore;if(P(e,s,t,-1))return!0;if(0==r.parent.content.size&&(g(a,"end")||o.qv.isSelectable(a)))for(let n=r.depth;;n--){let u=(0,c.dR)(e.doc,r.before(n),r.after(n),l.p2.empty);if(u&&u.slice.size<u.to-u.from){if(t){let n=e.tr.step(u);n.setSelection(g(a,"end")?o.Y1.findFrom(n.doc.resolve(n.mapping.map(s.pos,-1)),-1):o.qv.create(n.doc,s.pos-a.nodeSize)),t(n.scrollIntoView())}return!0}if(1==n||r.node(n-1).childCount>1)break}return!!a.isAtom&&s.depth==r.depth-1&&(t&&t(e.tr.delete(s.pos-a.nodeSize,s.pos).scrollIntoView()),!0)},h=(e,t,n)=>{let r=d(e,n);if(!r)return!1;let o=b(r);return!!o&&m(e,o,t)},f=(e,t,n)=>{let r=y(e,n);if(!r)return!1;let o=S(r);return!!o&&m(e,o,t)};function m(e,t,n){let r=t.nodeBefore,s=t.pos-1;for(;!r.isTextblock;s--){if(r.type.spec.isolating)return!1;let e=r.lastChild;if(!e)return!1;r=e}let a=t.nodeAfter,u=t.pos+1;for(;!a.isTextblock;u++){if(a.type.spec.isolating)return!1;let e=a.firstChild;if(!e)return!1;a=e}let d=(0,c.dR)(e.doc,s,u,l.p2.empty);if(!d||d.from!=s||d instanceof c.Pu&&d.slice.size>=u-s)return!1;if(n){let t=e.tr.step(d);t.setSelection(o.Bs.create(t.doc,s)),n(t.scrollIntoView())}return!0}function g(e,t,n=!1){for(let r=e;r;r="start"==t?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&1!=r.childCount)break}return!1}let v=(e,t,n)=>{let{$head:r,empty:s}=e.selection,a=r;if(!s)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;a=b(r)}let l=a&&a.nodeBefore;return!!(l&&o.qv.isSelectable(l))&&(t&&t(e.tr.setSelection(o.qv.create(e.doc,a.pos-l.nodeSize)).scrollIntoView()),!0)};function b(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function y(e,t){let{$cursor:n}=e.selection;return n&&(t?t.endOfTextblock("forward",e):!(n.parentOffset<n.parent.content.size))?n:null}let x=(e,t,n)=>{let r=y(e,n);if(!r)return!1;let s=S(r);if(!s)return!1;let a=s.nodeAfter;if(P(e,s,t,1))return!0;if(0==r.parent.content.size&&(g(a,"start")||o.qv.isSelectable(a))){let n=(0,c.dR)(e.doc,r.before(),r.after(),l.p2.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection(g(a,"start")?o.Y1.findFrom(r.doc.resolve(r.mapping.map(s.pos)),1):o.qv.create(r.doc,r.mapping.map(s.pos))),t(r.scrollIntoView())}return!0}}return!!a.isAtom&&s.depth==r.depth-1&&(t&&t(e.tr.delete(s.pos,s.pos+a.nodeSize).scrollIntoView()),!0)},w=(e,t,n)=>{let{$head:r,empty:s}=e.selection,a=r;if(!s)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;a=S(r)}let l=a&&a.nodeAfter;return!!(l&&o.qv.isSelectable(l))&&(t&&t(e.tr.setSelection(o.qv.create(e.doc,a.pos)).scrollIntoView()),!0)};function S(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}let k=(e,t)=>{let n=e.selection,r=n instanceof o.qv,s;if(r){if(n.node.isTextblock||!(0,c.Mn)(e.doc,n.from))return!1;s=n.from}else if(null==(s=(0,c.GJ)(e.doc,n.from,-1)))return!1;if(t){let n=e.tr.join(s);r&&n.setSelection(o.qv.create(n.doc,s-e.doc.resolve(s).nodeBefore.nodeSize)),t(n.scrollIntoView())}return!0},A=(e,t)=>{let n=e.selection,r;if(n instanceof o.qv){if(n.node.isTextblock||!(0,c.Mn)(e.doc,n.to))return!1;r=n.to}else if(null==(r=(0,c.GJ)(e.doc,n.to,1)))return!1;return t&&t(e.tr.join(r).scrollIntoView()),!0},C=(e,t)=>{let{$from:n,$to:r}=e.selection,o=n.blockRange(r),s=o&&(0,c.k9)(o);return null!=s&&(t&&t(e.tr.lift(o,s).scrollIntoView()),!0)},E=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!!(n.parent.type.spec.code&&n.sameParent(r))&&(t&&t(e.tr.insertText("\n").scrollIntoView()),!0)};function T(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}let _=(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let s=n.node(-1),a=n.indexAfter(-1),l=T(s.contentMatchAt(a));if(!l||!s.canReplaceWith(a,a,l))return!1;if(t){let r=n.after(),s=e.tr.replaceWith(r,r,l.createAndFill());s.setSelection(o.Y1.near(s.doc.resolve(r),1)),t(s.scrollIntoView())}return!0},O=(e,t)=>{let n=e.selection,{$from:r,$to:s}=n;if(n instanceof o.C1||r.parent.inlineContent||s.parent.inlineContent)return!1;let a=T(s.parent.contentMatchAt(s.indexAfter()));if(!a||!a.isTextblock)return!1;if(t){let n=(!r.parentOffset&&s.index()<s.parent.childCount?r:s).pos,l=e.tr.insert(n,a.createAndFill());l.setSelection(o.Bs.create(l.doc,n+1)),t(l.scrollIntoView())}return!0},M=(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let r=n.before();if((0,c.Ax)(e.doc,r))return t&&t(e.tr.split(r).scrollIntoView()),!0}let r=n.blockRange(),o=r&&(0,c.k9)(r);return null!=o&&(t&&t(e.tr.lift(r,o).scrollIntoView()),!0)};let I=(e,t)=>{let{$from:n,to:r}=e.selection,s,a=n.sharedDepth(r);return 0!=a&&(s=n.before(a),t&&t(e.tr.setSelection(o.qv.create(e.doc,s))),!0)};function P(e,t,n,r){var s,a,u;let d,p,h,f=t.nodeBefore,m=t.nodeAfter,v,b,y=f.type.spec.isolating||m.type.spec.isolating;if(!y&&(s=e,a=t,u=n,d=a.nodeBefore,p=a.nodeAfter,h=a.index(),d&&p&&d.type.compatibleContent(p.type)&&(!d.content.size&&a.parent.canReplace(h-1,h)?(u&&u(s.tr.delete(a.pos-d.nodeSize,a.pos).scrollIntoView()),!0):!!(a.parent.canReplace(h,h+1)&&(p.isTextblock||(0,c.Mn)(s.doc,a.pos)))&&(u&&u(s.tr.join(a.pos).scrollIntoView()),!0))))return!0;let x=!y&&t.parent.canReplace(t.index(),t.index()+1);if(x&&(v=(b=f.contentMatchAt(f.childCount)).findWrapping(m.type))&&b.matchType(v[0]||m.type).validEnd){if(n){let r=t.pos+m.nodeSize,o=l.HY.empty;for(let e=v.length-1;e>=0;e--)o=l.HY.from(v[e].create(null,o));o=l.HY.from(f.copy(o));let s=e.tr.step(new c.FC(t.pos-1,r,t.pos,r,new l.p2(o,1,0),v.length,!0)),a=s.doc.resolve(r+2*v.length);a.nodeAfter&&a.nodeAfter.type==f.type&&(0,c.Mn)(s.doc,a.pos)&&s.join(a.pos),n(s.scrollIntoView())}return!0}let w=m.type.spec.isolating||r>0&&y?null:o.Y1.findFrom(t,1),S=w&&w.$from.blockRange(w.$to),k=S&&(0,c.k9)(S);if(null!=k&&k>=t.depth)return n&&n(e.tr.lift(S,k).scrollIntoView()),!0;if(x&&g(m,"start",!0)&&g(f,"end")){let r=f,o=[];for(;o.push(r),!r.isTextblock;){;r=r.lastChild}let s=m,a=1;for(;!s.isTextblock;s=s.firstChild)a++;if(r.canReplace(r.childCount,r.childCount,s.content)){if(n){let r=l.HY.empty;for(let e=o.length-1;e>=0;e--)r=l.HY.from(o[e].copy(r));n(e.tr.step(new c.FC(t.pos-o.length,t.pos+m.nodeSize,t.pos+a,t.pos+m.nodeSize-a,new l.p2(r,o.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function D(e){return function(t,n){let r=t.selection,s=e<0?r.$from:r.$to,a=s.depth;for(;s.node(a).isInline;){if(!a)return!1;a--}return!!s.node(a).isTextblock&&(n&&n(t.tr.setSelection(o.Bs.create(t.doc,e<0?s.start(a):s.end(a)))),!0)}}let N=D(-1),R=D(1);function L(e,t=null){return function(n,r){let o=!1;for(let r=0;r<n.selection.ranges.length&&!o;r++){let{$from:{pos:s},$to:{pos:a}}=n.selection.ranges[r];n.doc.nodesBetween(s,a,(r,s)=>{if(o)return!1;if(!(!r.isTextblock||r.hasMarkup(e,t))){if(r.type==e)o=!0;else{let t=n.doc.resolve(s),r=t.index();o=t.parent.canReplaceWith(r,r+1,e)}}})}if(!o)return!1;if(r){let o=n.tr;for(let r=0;r<n.selection.ranges.length;r++){let{$from:{pos:s},$to:{pos:a}}=n.selection.ranges[r];o.setBlockType(s,a,e,t)}r(o.scrollIntoView())}return!0}}function j(...e){return function(t,n,r){for(let o=0;o<e.length;o++)if(e[o](t,n,r))return!0;return!1}}let $=j(u,p,v),F=j(u,x,w),z={Enter:j(E,O,M,(e,t)=>{let{$from:n,$to:r}=e.selection;if(e.selection instanceof o.qv&&e.selection.node.isBlock)return!!(n.parentOffset&&(0,c.Ax)(e.doc,n.pos))&&(t&&t(e.tr.split(n.pos).scrollIntoView()),!0);if(!n.depth)return!1;let s=[],a,l,u=!1,d=!1;for(let e=n.depth;;e--){if(n.node(e).isBlock){u=n.end(e)==n.pos+(n.depth-e),d=n.start(e)==n.pos-(n.depth-e),l=T(n.node(e-1).contentMatchAt(n.indexAfter(e-1)));let t=void 0;s.unshift(t||(u&&l?{type:l}:null)),a=e;break}if(1==e)return!1;s.unshift(null)}let p=e.tr;(e.selection instanceof o.Bs||e.selection instanceof o.C1)&&p.deleteSelection();let h=p.mapping.map(n.pos),f=(0,c.Ax)(p.doc,h,s.length,s);if(!f&&(s[0]=l?{type:l}:null,f=(0,c.Ax)(p.doc,h,s.length,s)),!f)return!1;if(p.split(h,s.length,s),!u&&d&&n.node(a).type!=l){let e=p.mapping.map(n.before(a)),t=p.doc.resolve(e);l&&n.node(a-1).canReplaceWith(t.index(),t.index()+1,l)&&p.setNodeMarkup(p.mapping.map(n.before(a)),l)}return t&&t(p.scrollIntoView()),!0}),"Mod-Enter":_,Backspace:$,"Mod-Backspace":$,"Shift-Backspace":$,Delete:F,"Mod-Delete":F,"Mod-a":(e,t)=>(t&&t(e.tr.setSelection(new o.C1(e.doc))),!0)},B={"Ctrl-h":z.Backspace,"Alt-Backspace":z["Mod-Backspace"],"Ctrl-d":z.Delete,"Ctrl-Alt-Backspace":z["Mod-Delete"],"Alt-Delete":z["Mod-Delete"],"Alt-d":z["Mod-Delete"],"Ctrl-a":N,"Ctrl-e":R};for(let e in z)B[e]=z[e];"undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"undefined"==typeof os||!os.platform||os.platform();function H(e){let{state:t,transaction:n}=e,{selection:r}=n,{doc:o}=n,{storedMarks:s}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return s},get selection(){return r},get doc(){return o},get tr(){return r=n.selection,o=n.doc,s=n.storedMarks,n}}}class U{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){let{rawCommands:e,editor:t,state:n}=this,{view:r}=t,{tr:o}=n,s=this.buildProps(o);return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,(...e)=>{let n=t(...e)(s);return!o.getMeta("preventDispatch")&&!this.hasCustomState&&r.dispatch(o),n}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){let{rawCommands:n,editor:r,state:o}=this,{view:s}=r,a=[],l=!!e,c=e||o.tr,u={...Object.fromEntries(Object.entries(n).map(([e,n])=>[e,(...e)=>{let r=this.buildProps(c,t),o=n(...e)(r);return a.push(o),u}])),run:()=>(!l&&t&&!c.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(c),a.every(e=>!0===e))};return u}createCan(e){let{rawCommands:t,state:n}=this,r=e||n.tr,o=this.buildProps(r,!1);return{...Object.fromEntries(Object.entries(t).map(([e,t])=>[e,(...e)=>t(...e)({...o,dispatch:void 0})])),chain:()=>this.createChain(r,!1)}}buildProps(e,t=!0){let{rawCommands:n,editor:r,state:o}=this,{view:s}=r,a={tr:e,editor:r,view:s,state:H({state:o,transaction:e}),dispatch:t?()=>void 0:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(n).map(([e,t])=>[e,(...e)=>t(...e)(a)]))}};return a}}class V{constructor(){this.callbacks={}}on(e,t){return!this.callbacks[e]&&(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){let n=this.callbacks[e];return n&&n.forEach(e=>e.apply(this,t)),this}off(e,t){let n=this.callbacks[e];return n&&(t?this.callbacks[e]=n.filter(e=>e!==t):delete this.callbacks[e]),this}once(e,t){let n=(...r)=>{this.off(e,n),t.apply(this,r)};return this.on(e,n)}removeAllListeners(){this.callbacks={}}}function q(e,t,n){return void 0===e.config[t]&&e.parent?q(e.parent,t,n):"function"==typeof e.config[t]?e.config[t].bind({...n,parent:e.parent?q(e.parent,t,n):null}):e.config[t]}function W(e){let t=e.filter(e=>"extension"===e.type),n=e.filter(e=>"node"===e.type);return{baseExtensions:t,nodeExtensions:n,markExtensions:e.filter(e=>"mark"===e.type)}}function G(e){let t=[],{nodeExtensions:n,markExtensions:r}=W(e),o=[...n,...r],s={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return e.forEach(e=>{let n={name:e.name,options:e.options,storage:e.storage,extensions:o},r=q(e,"addGlobalAttributes",n);if(!!r)r().forEach(e=>{e.types.forEach(n=>{Object.entries(e.attributes).forEach(([e,r])=>{t.push({type:n,name:e,attribute:{...s,...r}})})})})}),o.forEach(e=>{let n={name:e.name,options:e.options,storage:e.storage},r=q(e,"addAttributes",n);if(!!r)Object.entries(r()).forEach(([n,r])=>{let o={...s,...r};"function"==typeof(null==o?void 0:o.default)&&(o.default=o.default()),(null==o?void 0:o.isRequired)&&(null==o?void 0:o.default)===void 0&&delete o.default,t.push({type:e.name,name:n,attribute:o})})}),t}function K(e,t){if("string"==typeof e){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}function Y(...e){return e.filter(e=>!!e).reduce((e,t)=>{let n={...e};return Object.entries(t).forEach(([e,t])=>{if(!n[e]){n[e]=t;return}if("class"===e){let r=t?String(t).split(" "):[],o=n[e]?n[e].split(" "):[],s=r.filter(e=>!o.includes(e));n[e]=[...o,...s].join(" ")}else if("style"===e){let r=t?t.split(";").map(e=>e.trim()).filter(Boolean):[],o=n[e]?n[e].split(";").map(e=>e.trim()).filter(Boolean):[],s=new Map;o.forEach(e=>{let[t,n]=e.split(":").map(e=>e.trim());s.set(t,n)}),r.forEach(e=>{let[t,n]=e.split(":").map(e=>e.trim());s.set(t,n)}),n[e]=Array.from(s.entries()).map(([e,t])=>`${e}: ${t}`).join("; ")}else n[e]=t}),n},{})}function Z(e,t){return t.filter(t=>t.type===e.type.name).filter(e=>e.attribute.rendered).map(t=>t.attribute.renderHTML?t.attribute.renderHTML(e.attrs)||{}:{[t.name]:e.attrs[t.name]}).reduce((e,t)=>Y(e,t),{})}function J(e){return"function"==typeof e}function X(e,t,...n){if(J(e))return t?e.bind(t)(...n):e(...n);return e}function Q(e,t){return"style"in e?e:{...e,getAttrs:n=>{let r=e.getAttrs?e.getAttrs(n):e.attrs;if(!1===r)return!1;let o=t.reduce((e,t)=>{var r;let o=t.attribute.parseHTML?t.attribute.parseHTML(n):"string"!=typeof(r=n.getAttribute(t.name))?r:r.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(r):"true"===r||"false"!==r&&r;return null==o?e:{...e,[t.name]:o}},{});return{...r,...o}}}}function ee(e){return Object.fromEntries(Object.entries(e).filter(([e,t])=>!("attrs"===e&&function(e={}){return 0===Object.keys(e).length&&e.constructor===Object}(t))&&null!=t))}function et(e,t){return t.nodes[e]||t.marks[e]||null}function en(e,t){return Array.isArray(t)?t.some(t=>("string"==typeof t?t:t.name)===e.name):t}function er(e,t){let n=l.PW.fromSchema(t).serializeFragment(e),r=document.implementation.createHTMLDocument().createElement("div");return r.appendChild(n),r.innerHTML}let ei=(e,t=500)=>{let n="",r=e.parentOffset;return e.parent.nodesBetween(Math.max(0,r-t),r,(e,t,o,s)=>{var a,l;let c=(null===(l=(a=e.type.spec).toText)||void 0===l?void 0:l.call(a,{node:e,pos:t,parent:o,index:s}))||e.textContent||"%leaf%";n+=e.isAtom&&!e.isText?c:c.slice(0,Math.max(0,r-t))}),n};function eo(e){return"[object RegExp]"===Object.prototype.toString.call(e)}class es{constructor(e){this.find=e.find,this.handler=e.handler}}let ea=(e,t)=>{if(eo(t))return t.exec(e);let n=t(e);if(!n)return null;let r=[n.text];return r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(!n.text.includes(n.replaceWith)&&console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function el(e){var t;let{editor:n,from:r,to:o,text:s,rules:a,plugin:l}=e,{view:c}=n;if(c.composing)return!1;let u=c.state.doc.resolve(r);if(u.parent.type.spec.code||(null===(t=u.nodeBefore||u.nodeAfter)||void 0===t?void 0:t.marks.find(e=>e.type.spec.code)))return!1;let d=!1,p=ei(u)+s;return a.forEach(e=>{if(d)return;let t=ea(p,e.find);if(!t)return;let a=c.state.tr,u=H({state:c.state,transaction:a}),h={from:r-(t[0].length-s.length),to:o},{commands:f,chain:m,can:g}=new U({editor:n,state:u});if(null!==e.handler({state:u,range:h,match:t,commands:f,chain:m,can:g})&&!!a.steps.length)a.setMeta(l,{transform:a,from:r,to:o,text:s}),c.dispatch(a),d=!0}),d}function ec(e){var t;return"Object"===(t=e,Object.prototype.toString.call(t).slice(8,-1))&&e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function eu(e,t){let n={...e};return ec(e)&&ec(t)&&Object.keys(t).forEach(r=>{ec(t[r])&&ec(e[r])?n[r]=eu(e[r],t[r]):n[r]=t[r]}),n}class ed{constructor(e={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=X(q(this,"addOptions",{name:this.name}))),this.storage=X(q(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new ed(e)}configure(e={}){let t=this.extend({...this.config,addOptions:()=>eu(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){let t=new ed(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=X(q(t,"addOptions",{name:t.name})),t.storage=X(q(t,"addStorage",{name:t.name,options:t.options})),t}static handleExit({editor:e,mark:t}){let{tr:n}=e.state,r=e.state.selection.$from;if(r.pos===r.end()){let o=r.marks();if(!o.find(e=>(null==e?void 0:e.type.name)===t.name))return!1;let s=o.find(e=>(null==e?void 0:e.type.name)===t.name);return s&&n.removeStoredMark(s),n.insertText(" ",r.pos),e.view.dispatch(n),!0}return!1}}class ep{constructor(e){this.find=e.find,this.handler=e.handler}}let eh=(e,t,n)=>{if(eo(t))return[...e.matchAll(t)];let r=t(e,n);return r?r.map(t=>{let n=[t.text];return n.index=t.index,n.input=e,n.data=t.data,t.replaceWith&&(!t.text.includes(t.replaceWith)&&console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),n.push(t.replaceWith)),n}):[]},ef=null,em=e=>{var t;let n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return null===(t=n.clipboardData)||void 0===t||t.setData("text/html",e),n};class eg{constructor(e,t){this.splittableMarks=[],this.editor=t,this.extensions=eg.resolve(e),this.schema=function(e,t){var n;let r=G(e),{nodeExtensions:o,markExtensions:s}=W(e),a=null===(n=o.find(e=>q(e,"topNode")))||void 0===n?void 0:n.name,c=Object.fromEntries(o.map(n=>{let o=r.filter(e=>e.type===n.name),s={name:n.name,options:n.options,storage:n.storage,editor:t},a=ee({...e.reduce((e,t)=>{let r=q(t,"extendNodeSchema",s);return{...e,...r?r(n):{}}},{}),content:X(q(n,"content",s)),marks:X(q(n,"marks",s)),group:X(q(n,"group",s)),inline:X(q(n,"inline",s)),atom:X(q(n,"atom",s)),selectable:X(q(n,"selectable",s)),draggable:X(q(n,"draggable",s)),code:X(q(n,"code",s)),whitespace:X(q(n,"whitespace",s)),linebreakReplacement:X(q(n,"linebreakReplacement",s)),defining:X(q(n,"defining",s)),isolating:X(q(n,"isolating",s)),attrs:Object.fromEntries(o.map(e=>{var t;return[e.name,{default:null===(t=null==e?void 0:e.attribute)||void 0===t?void 0:t.default}]}))}),l=X(q(n,"parseHTML",s));l&&(a.parseDOM=l.map(e=>Q(e,o)));let c=q(n,"renderHTML",s);c&&(a.toDOM=e=>c({node:e,HTMLAttributes:Z(e,o)}));let u=q(n,"renderText",s);return u&&(a.toText=u),[n.name,a]})),u=Object.fromEntries(s.map(n=>{let o=r.filter(e=>e.type===n.name),s={name:n.name,options:n.options,storage:n.storage,editor:t},a=ee({...e.reduce((e,t)=>{let r=q(t,"extendMarkSchema",s);return{...e,...r?r(n):{}}},{}),inclusive:X(q(n,"inclusive",s)),excludes:X(q(n,"excludes",s)),group:X(q(n,"group",s)),spanning:X(q(n,"spanning",s)),code:X(q(n,"code",s)),attrs:Object.fromEntries(o.map(e=>{var t;return[e.name,{default:null===(t=null==e?void 0:e.attribute)||void 0===t?void 0:t.default}]}))}),l=X(q(n,"parseHTML",s));l&&(a.parseDOM=l.map(e=>Q(e,o)));let c=q(n,"renderHTML",s);return c&&(a.toDOM=e=>c({mark:e,HTMLAttributes:Z(e,o)})),[n.name,a]}));return new l.V_({topNode:a,nodes:c,marks:u})}(this.extensions,t),this.setupExtensions()}static resolve(e){var t;let n=eg.sort(eg.flatten(e));let r=Array.from(new Set((t=n.map(e=>e.name)).filter((e,n)=>t.indexOf(e)!==n)));return r.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map(e=>`'${e}'`).join(", ")}]. This can lead to issues.`),n}static flatten(e){return e.map(e=>{let t={name:e.name,options:e.options,storage:e.storage},n=q(e,"addExtensions",t);return n?[e,...this.flatten(n())]:e}).flat(10)}static sort(e){return e.sort((e,t)=>{let n=q(e,"priority")||100,r=q(t,"priority")||100;return n>r?-1:n<r?1:0})}get commands(){return this.extensions.reduce((e,t)=>{let n={name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:et(t.name,this.schema)},r=q(t,"addCommands",n);return r?{...e,...r()}:e},{})}get plugins(){let{editor:e}=this,t=eg.sort([...this.extensions].reverse()),n=[],r=[],s=t.map(t=>{let o={name:t.name,options:t.options,storage:t.storage,editor:e,type:et(t.name,this.schema)},s=[],l=q(t,"addKeyboardShortcuts",o),c={};if("mark"===t.type&&q(t,"exitable",o)&&(c.ArrowRight=()=>ed.handleExit({editor:e,mark:t})),l){let t=Object.fromEntries(Object.entries(l()).map(([t,n])=>[t,()=>n({editor:e})]));c={...c,...t}}let u=(0,a.h)(c);s.push(u);let d=q(t,"addInputRules",o);en(t,e.options.enableInputRules)&&d&&n.push(...d());let p=q(t,"addPasteRules",o);en(t,e.options.enablePasteRules)&&p&&r.push(...p());let h=q(t,"addProseMirrorPlugins",o);if(h){let e=h();s.push(...e)}return s}).flat();return[function(e){let{editor:t,rules:n}=e,r=new o.Sy({state:{init:()=>null,apply(e,o,s){let a=e.getMeta(r);if(a)return a;let c=e.getMeta("applyInputRules");return c&&setTimeout(()=>{let{text:e}=c;"string"==typeof e||(e=er(l.HY.from(e),s.schema));let{from:o}=c,a=o+e.length;el({editor:t,from:o,to:a,text:e,rules:n,plugin:r})}),e.selectionSet||e.docChanged?null:o}},props:{handleTextInput:(e,o,s,a)=>el({editor:t,from:o,to:s,text:a,rules:n,plugin:r}),handleDOMEvents:{compositionend:e=>(setTimeout(()=>{let{$cursor:o}=e.state.selection;o&&el({editor:t,from:o.pos,to:o.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(e,o){if("Enter"!==o.key)return!1;let{$cursor:s}=e.state.selection;return!!s&&el({editor:t,from:s.pos,to:s.pos,text:"\n",rules:n,plugin:r})}},isInputRules:!0});return r}({editor:e,rules:n}),...function(e){let t;let{editor:n,rules:r}=e,s=null,a=!1,c=!1,u="undefined"!=typeof ClipboardEvent?new ClipboardEvent("paste"):null;try{t="undefined"!=typeof DragEvent?new DragEvent("drop"):null}catch{t=null}let d=({state:e,from:r,to:o,rule:s,pasteEvt:a})=>{let l=e.tr;if(!!function(e){let{editor:t,state:n,from:r,to:o,rule:s,pasteEvent:a,dropEvent:l}=e,{commands:c,chain:u,can:d}=new U({editor:t,state:n}),p=[];return n.doc.nodesBetween(r,o,(e,t)=>{if(!e.isTextblock||e.type.spec.code)return;let h=Math.max(r,t),f=Math.min(o,t+e.content.size);eh(e.textBetween(h-t,f-t,void 0,""),s.find,a).forEach(e=>{if(void 0===e.index)return;let t=h+e.index+1,r=t+e[0].length,o={from:n.tr.mapping.map(t),to:n.tr.mapping.map(r)},f=s.handler({state:n,range:o,match:e,commands:c,chain:u,can:d,pasteEvent:a,dropEvent:l});p.push(f)})}),p.every(e=>null!==e)}({editor:n,state:H({state:e,transaction:l}),from:Math.max(r-1,0),to:o.b-1,rule:s,pasteEvent:a,dropEvent:t})&&!!l.steps.length){try{t="undefined"!=typeof DragEvent?new DragEvent("drop"):null}catch{t=null}return u="undefined"!=typeof ClipboardEvent?new ClipboardEvent("paste"):null,l}};return r.map(e=>new o.Sy({view(e){let t=t=>{var r;(s=(null===(r=e.dom.parentElement)||void 0===r?void 0:r.contains(t.target))?e.dom.parentElement:null)&&(ef=n)},r=()=>{ef&&(ef=null)};return window.addEventListener("dragstart",t),window.addEventListener("dragend",r),{destroy(){window.removeEventListener("dragstart",t),window.removeEventListener("dragend",r)}}},props:{handleDOMEvents:{drop:(e,n)=>{if(c=s===e.dom.parentElement,t=n,!c){let e=ef;e&&setTimeout(()=>{let t=e.state.selection;t&&e.commands.deleteRange({from:t.from,to:t.to})},10)}return!1},paste:(e,t)=>{var n;let r=null===(n=t.clipboardData)||void 0===n?void 0:n.getData("text/html");return u=t,a=!!(null==r?void 0:r.includes("data-pm-slice")),!1}}},appendTransaction:(t,n,r)=>{let o=t[0],s="paste"===o.getMeta("uiEvent")&&!a,p="drop"===o.getMeta("uiEvent")&&!c,h=o.getMeta("applyPasteRules"),f=!!h;if(!s&&!p&&!f)return;if(f){let{text:t}=h;"string"==typeof t||(t=er(l.HY.from(t),r.schema));let{from:n}=h,o=n+t.length;return d({rule:e,state:r,from:n,to:{b:o},pasteEvt:em(t)})}let m=n.doc.content.findDiffStart(r.doc.content),g=n.doc.content.findDiffEnd(r.doc.content);if("number"==typeof m&&!!g&&m!==g.b)return d({rule:e,state:r,from:m,to:g,pasteEvt:u})}}))}({editor:e,rules:r}),...s]}get attributes(){return G(this.extensions)}get nodeViews(){let{editor:e}=this,{nodeExtensions:t}=W(this.extensions);return Object.fromEntries(t.filter(e=>!!q(e,"addNodeView")).map(t=>{let n=this.attributes.filter(e=>e.type===t.name),r={name:t.name,options:t.options,storage:t.storage,editor:e,type:K(t.name,this.schema)},o=q(t,"addNodeView",r);return o?[t.name,(r,s,a,l,c)=>{let u=Z(r,n);return o()({node:r,view:s,getPos:a,decorations:l,innerDecorations:c,editor:e,extension:t,HTMLAttributes:u})}]:[]}))}setupExtensions(){this.extensions.forEach(e=>{var t;this.editor.extensionStorage[e.name]=e.storage;let n={name:e.name,options:e.options,storage:e.storage,editor:this.editor,type:et(e.name,this.schema)};"mark"===e.type&&(null===(t=X(q(e,"keepOnSplit",n)))||void 0===t||t)&&this.splittableMarks.push(e.name);let r=q(e,"onBeforeCreate",n),o=q(e,"onCreate",n),s=q(e,"onUpdate",n),a=q(e,"onSelectionUpdate",n),l=q(e,"onTransaction",n),c=q(e,"onFocus",n),u=q(e,"onBlur",n),d=q(e,"onDestroy",n);r&&this.editor.on("beforeCreate",r),o&&this.editor.on("create",o),s&&this.editor.on("update",s),a&&this.editor.on("selectionUpdate",a),l&&this.editor.on("transaction",l),c&&this.editor.on("focus",c),u&&this.editor.on("blur",u),d&&this.editor.on("destroy",d)})}}class ev{constructor(e={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=X(q(this,"addOptions",{name:this.name}))),this.storage=X(q(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new ev(e)}configure(e={}){let t=this.extend({...this.config,addOptions:()=>eu(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){let t=new ev({...this.config,...e});return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=X(q(t,"addOptions",{name:t.name})),t.storage=X(q(t,"addStorage",{name:t.name,options:t.options})),t}}function eb(e,t,n){let{from:r,to:o}=t,{blockSeparator:s="\n\n",textSerializers:a={}}=n||{},l="";return e.nodesBetween(r,o,(e,n,c,u)=>{var d;e.isBlock&&n>r&&(l+=s);let p=null==a?void 0:a[e.type.name];if(p)return c&&(l+=p({node:e,pos:n,parent:c,index:u,range:t})),!1;e.isText&&(l+=null===(d=null==e?void 0:e.text)||void 0===d?void 0:d.slice(Math.max(r,n)-n,o-n))}),l}function ey(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,e])=>e.spec.toText).map(([e,t])=>[e,t.spec.toText]))}let ex=ev.create({name:"clipboardTextSerializer",addOptions:()=>({blockSeparator:void 0}),addProseMirrorPlugins(){return[new o.Sy({key:new o.H$("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{let{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:o}=t,{ranges:s}=o,a=Math.min(...s.map(e=>e.$from.pos)),l=Math.max(...s.map(e=>e.$to.pos)),c=ey(n);return eb(r,{from:a,to:l},{...void 0!==this.options.blockSeparator?{blockSeparator:this.options.blockSeparator}:{},textSerializers:c})}}})]}});function ew(e,t,n={strict:!0}){let r=Object.keys(t);return!r.length||r.every(r=>n.strict?t[r]===e[r]:eo(t[r])?t[r].test(e[r]):t[r]===e[r])}function eS(e,t,n={}){return e.find(e=>e.type===t&&ew(Object.fromEntries(Object.keys(n).map(t=>[t,e.attrs[t]])),n))}function ek(e,t,n={}){return!!eS(e,t,n)}function eA(e,t,n){var r;if(!e||!t)return;let o=e.parent.childAfter(e.parentOffset);if((!o.node||!o.node.marks.some(e=>e.type===t))&&(o=e.parent.childBefore(e.parentOffset)),!o.node||!o.node.marks.some(e=>e.type===t))return;if(n=n||(null===(r=o.node.marks[0])||void 0===r?void 0:r.attrs),!eS([...o.node.marks],t,n))return;let s=o.index,a=e.start()+o.offset,l=s+1,c=a+o.node.nodeSize;for(;s>0&&ek([...e.parent.child(s-1).marks],t,n);)s-=1,a-=e.parent.child(s).nodeSize;for(;l<e.parent.childCount&&ek([...e.parent.child(l).marks],t,n);)c+=e.parent.child(l).nodeSize,l+=1;return{from:a,to:c}}function eC(e,t){if("string"==typeof e){if(!t.marks[e])throw Error(`There is no mark type named '${e}'. Maybe you forgot to add the extension?`);return t.marks[e]}return e}function eE(e){return e instanceof o.Bs}function eT(e=0,t=0,n=0){return Math.min(Math.max(e,t),n)}function e_(e,t=null){if(!t)return null;let n=o.Y1.atStart(e),r=o.Y1.atEnd(e);if("start"===t||!0===t)return n;if("end"===t)return r;let s=n.from,a=r.to;return"all"===t?o.Bs.create(e,eT(0,s,a),eT(e.content.size,s,a)):o.Bs.create(e,eT(t,s,a),eT(t,s,a))}function eO(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}let eM=e=>{let t=e.childNodes;for(let n=t.length-1;n>=0;n-=1){let r=t[n];3===r.nodeType&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?e.removeChild(r):1===r.nodeType&&eM(r)}return e};function eI(e){let t=`<body>${e}</body>`;return eM(new window.DOMParser().parseFromString(t,"text/html").body)}function eP(e,t,n){if(e instanceof l.NB||e instanceof l.HY)return e;n={slice:!0,parseOptions:{},...n};let r="object"==typeof e&&null!==e,o="string"==typeof e;if(r)try{if(Array.isArray(e)&&e.length>0)return l.HY.fromArray(e.map(e=>t.nodeFromJSON(e)));let r=t.nodeFromJSON(e);return n.errorOnInvalidContent&&r.check(),r}catch(r){if(n.errorOnInvalidContent)throw Error("[tiptap error]: Invalid JSON content",{cause:r});return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",r),eP("",t,n)}if(o){if(n.errorOnInvalidContent){let r=!1,o="",s=new l.V_({topNode:t.spec.topNode,marks:t.spec.marks,nodes:t.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:e=>(r=!0,o="string"==typeof e?e:e.outerHTML,null)}]}})});if(n.slice?l.aw.fromSchema(s).parseSlice(eI(e),n.parseOptions):l.aw.fromSchema(s).parse(eI(e),n.parseOptions),n.errorOnInvalidContent&&r)throw Error("[tiptap error]: Invalid HTML content",{cause:Error(`Invalid element found: ${o}`)})}let r=l.aw.fromSchema(t);return n.slice?r.parseSlice(eI(e),n.parseOptions).content:r.parse(eI(e),n.parseOptions)}return eP("",t,n)}let eD=e=>!("type"in e);function eN(){return"undefined"!=typeof navigator&&/Mac/.test(navigator.platform)}function eR(e,t,n={}){let{from:r,to:o,empty:s}=e.selection,a=t?K(t,e.schema):null,l=[];e.doc.nodesBetween(r,o,(e,t)=>{if(e.isText)return;let n=Math.max(r,t),s=Math.min(o,t+e.nodeSize);l.push({node:e,from:n,to:s})});let c=o-r,u=l.filter(e=>!a||a.name===e.node.type.name).filter(e=>ew(e.node.attrs,n,{strict:!1}));return s?!!u.length:u.reduce((e,t)=>e+t.to-t.from,0)>=c}function eL(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function ej(e,t){let n="string"==typeof t?[t]:t;return Object.keys(e).reduce((t,r)=>(!n.includes(r)&&(t[r]=e[r]),t),{})}function e$(e,t,n={},r={}){return eP(e,t,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}function eF(e,t){let n=eC(t,e.schema),{from:r,to:o,empty:s}=e.selection,a=[];s?(e.storedMarks&&a.push(...e.storedMarks),a.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,o,e=>{a.push(...e.marks)});let l=a.find(e=>e.type.name===n.name);return l?{...l.attrs}:{}}function ez(e,t){for(let n=e.depth;n>0;n-=1){let r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}function eB(e){return t=>ez(t.$from,e)}function eH(e,t,n){let r=[];return e===t?n.resolve(e).marks().forEach(t=>{let o=eA(n.resolve(e),t.type);if(!!o)r.push({mark:t,...o})}):n.nodesBetween(e,t,(e,t)=>{if(!!e&&(null==e?void 0:e.nodeSize)!==void 0)r.push(...e.marks.map(n=>({from:t,to:t+e.nodeSize,mark:n})))}),r}function eU(e,t,n){return Object.fromEntries(Object.entries(n).filter(([n])=>{let r=e.find(e=>e.type===t&&e.name===n);return!!r&&r.attribute.keepOnSplit}))}function eV(e,t,n={}){let{empty:r,ranges:o}=e.selection,s=t?eC(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter(e=>!s||s.name===e.type.name).find(e=>ew(e.attrs,n,{strict:!1}));let a=0,l=[];if(o.forEach(({$from:t,$to:n})=>{let r=t.pos,o=n.pos;e.doc.nodesBetween(r,o,(e,t)=>{if(!e.isText&&!e.marks.length)return;let n=Math.max(r,t),s=Math.min(o,t+e.nodeSize);a+=s-n,l.push(...e.marks.map(e=>({mark:e,from:n,to:s})))})}),0===a)return!1;let c=l.filter(e=>!s||s.name===e.mark.type.name).filter(e=>ew(e.mark.attrs,n,{strict:!1})).reduce((e,t)=>e+t.to-t.from,0),u=l.filter(e=>!s||e.mark.type!==s&&e.mark.type.excludes(s)).reduce((e,t)=>e+t.to-t.from,0);return(c>0?c+u:c)>=a}function eq(e,t){let{nodeExtensions:n}=W(t),r=n.find(t=>t.name===e);if(!r)return!1;let o={name:r.name,options:r.options,storage:r.storage},s=X(q(r,"group",o));return"string"==typeof s&&s.split(" ").includes("list")}function eW(e,{checkChildren:t=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if("hardBreak"===e.type.name)return!0;if(e.isText)return/^\s*$/m.test(null!==(r=e.text)&&void 0!==r?r:"")}if(e.isText)return!e.text;if(e.isAtom||e.isLeaf)return!1;if(0===e.content.childCount)return!0;if(t){let r=!0;return e.content.forEach(e=>{if(!1!==r)!eW(e,{ignoreWhitespace:n,checkChildren:t})&&(r=!1)}),r}return!1}function eG(e){return e instanceof o.qv}function eK(e,t){let n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){let r=n.filter(e=>null==t?void 0:t.includes(e.type.name));e.tr.ensureMarks(r)}}let eY=(e,t)=>{let n=eB(e=>e.type===t)(e.selection);if(!n)return!0;let r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(void 0===r)return!0;let o=e.doc.nodeAt(r);return!(n.node.type===(null==o?void 0:o.type)&&(0,c.Mn)(e.doc,n.pos))||(e.join(n.pos),!0)},eZ=(e,t)=>{let n=eB(e=>e.type===t)(e.selection);if(!n)return!0;let r=e.doc.resolve(n.start).after(n.depth);if(void 0===r)return!0;let o=e.doc.nodeAt(r);return!(n.node.type===(null==o?void 0:o.type)&&(0,c.Mn)(e.doc,r))||(e.join(r),!0)};var eJ=Object.freeze({__proto__:null,blur:()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var n;!e.isDestroyed&&(t.dom.blur(),null===(n=null==window?void 0:window.getSelection())||void 0===n||n.removeAllRanges())}),!0),clearContent:(e=!1)=>({commands:t})=>t.setContent("",e),clearNodes:()=>({state:e,tr:t,dispatch:n})=>{let{selection:r}=t,{ranges:o}=r;return!n||(o.forEach(({$from:n,$to:r})=>{e.doc.nodesBetween(n.pos,r.pos,(e,n)=>{if(e.type.isText)return;let{doc:r,mapping:o}=t,s=r.resolve(o.map(n)),a=r.resolve(o.map(n+e.nodeSize)),l=s.blockRange(a);if(!l)return;let u=(0,c.k9)(l);if(e.type.isTextblock){let{defaultType:e}=s.parent.contentMatchAt(s.index());t.setNodeMarkup(l.start,e)}(u||0===u)&&t.lift(l,u)})}),!0)},command:e=>t=>e(t),createParagraphNear:()=>({state:e,dispatch:t})=>O(e,t),cut:(e,t)=>({editor:n,tr:r})=>{let{state:s}=n,a=s.doc.slice(e.from,e.to);r.deleteRange(e.from,e.to);let l=r.mapping.map(t);return r.insert(l,a.content),r.setSelection(new o.Bs(r.doc.resolve(l-1))),!0},deleteCurrentNode:()=>({tr:e,dispatch:t})=>{let{selection:n}=e,r=n.$anchor.node();if(r.content.size>0)return!1;let o=e.selection.$anchor;for(let n=o.depth;n>0;n-=1)if(o.node(n).type===r.type){if(t){let t=o.before(n),r=o.after(n);e.delete(t,r).scrollIntoView()}return!0}return!1},deleteNode:e=>({tr:t,state:n,dispatch:r})=>{let o=K(e,n.schema),s=t.selection.$anchor;for(let e=s.depth;e>0;e-=1)if(s.node(e).type===o){if(r){let n=s.before(e),r=s.after(e);t.delete(n,r).scrollIntoView()}return!0}return!1},deleteRange:e=>({tr:t,dispatch:n})=>{let{from:r,to:o}=e;return n&&t.delete(r,o),!0},deleteSelection:()=>({state:e,dispatch:t})=>u(e,t),enter:()=>({commands:e})=>e.keyboardShortcut("Enter"),exitCode:()=>({state:e,dispatch:t})=>_(e,t),extendMarkRange:(e,t={})=>({tr:n,state:r,dispatch:s})=>{let a=eC(e,r.schema),{doc:l,selection:c}=n,{$from:u,from:d,to:p}=c;if(s){let e=eA(u,a,t);if(e&&e.from<=d&&e.to>=p){let t=o.Bs.create(l,e.from,e.to);n.setSelection(t)}}return!0},first:e=>t=>{let n="function"==typeof e?e(t):e;for(let e=0;e<n.length;e+=1)if(n[e](t))return!0;return!1},focus:(e=null,t={})=>({editor:n,view:r,tr:o,dispatch:s})=>{t={scrollIntoView:!0,...t};let a=()=>{(eO()||"Android"===navigator.platform||/android/i.test(navigator.userAgent))&&r.dom.focus(),requestAnimationFrame(()=>{!n.isDestroyed&&(r.focus(),(null==t?void 0:t.scrollIntoView)&&n.commands.scrollIntoView())})};if(r.hasFocus()&&null===e||!1===e)return!0;if(s&&null===e&&!eE(n.state.selection))return a(),!0;let l=e_(o.doc,e)||n.state.selection,c=n.state.selection.eq(l);return s&&(!c&&o.setSelection(l),c&&o.storedMarks&&o.setStoredMarks(o.storedMarks),a()),!0},forEach:(e,t)=>n=>e.every((e,r)=>t(e,{...n,index:r})),insertContent:(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),insertContentAt:(e,t,n)=>({tr:r,dispatch:s,editor:a})=>{var u;if(s){let s,d;n={parseOptions:a.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let p=e=>{a.emit("contentError",{editor:a,error:e,disableCollaboration:()=>{a.storage.collaboration&&(a.storage.collaboration.isDisabled=!0)}})},h={preserveWhitespace:"full",...n.parseOptions};if(!n.errorOnInvalidContent&&!a.options.enableContentCheck&&a.options.emitContentError)try{eP(t,a.schema,{parseOptions:h,errorOnInvalidContent:!0})}catch(e){p(e)}try{s=eP(t,a.schema,{parseOptions:h,errorOnInvalidContent:null!==(u=n.errorOnInvalidContent)&&void 0!==u?u:a.options.enableContentCheck})}catch(e){return p(e),!1}let{from:f,to:m}="number"==typeof e?{from:e,to:e}:{from:e.from,to:e.to},g=!0,v=!0;if((eD(s)?s:[s]).forEach(e=>{e.check(),g=!!g&&e.isText&&0===e.marks.length,v=!!v&&e.isBlock}),f===m&&v){let{parent:e}=r.doc.resolve(f);e.isTextblock&&!e.type.spec.code&&!e.childCount&&(f-=1,m+=1)}if(g){if(Array.isArray(t))d=t.map(e=>e.text||"").join("");else if(t instanceof l.HY){let e="";t.forEach(t=>{t.text&&(e+=t.text)}),d=e}else d="object"==typeof t&&t&&t.text?t.text:t;r.insertText(d,f,m)}else d=s,r.replaceWith(f,m,d);n.updateSelection&&!function(e,t,n){let r=e.steps.length-1;if(r<t)return;let s=e.steps[r];if(!(s instanceof c.Pu||s instanceof c.FC))return;let a=e.mapping.maps[r],l=0;a.forEach((e,t,n,r)=>{0===l&&(l=r)}),e.setSelection(o.Y1.near(e.doc.resolve(l),-1))}(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:f,text:d}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:f,text:d})}return!0},joinBackward:()=>({state:e,dispatch:t})=>p(e,t),joinDown:()=>({state:e,dispatch:t})=>A(e,t),joinForward:()=>({state:e,dispatch:t})=>x(e,t),joinItemBackward:()=>({state:e,dispatch:t,tr:n})=>{try{let r=(0,c.GJ)(e.doc,e.selection.$from.pos,-1);if(null==r)return!1;return n.join(r,2),t&&t(n),!0}catch{return!1}},joinItemForward:()=>({state:e,dispatch:t,tr:n})=>{try{let r=(0,c.GJ)(e.doc,e.selection.$from.pos,1);if(null==r)return!1;return n.join(r,2),t&&t(n),!0}catch{return!1}},joinTextblockBackward:()=>({state:e,dispatch:t})=>h(e,t),joinTextblockForward:()=>({state:e,dispatch:t})=>f(e,t),joinUp:()=>({state:e,dispatch:t})=>k(e,t),keyboardShortcut:e=>({editor:t,view:n,tr:r,dispatch:o})=>{let s=(function(e){let t,n,r,o;let s=e.split(/-(?!$)/),a=s[s.length-1];"Space"===a&&(a=" ");for(let e=0;e<s.length-1;e+=1){let a=s[e];if(/^(cmd|meta|m)$/i.test(a))o=!0;else if(/^a(lt)?$/i.test(a))t=!0;else if(/^(c|ctrl|control)$/i.test(a))n=!0;else if(/^s(hift)?$/i.test(a))r=!0;else if(/^mod$/i.test(a))eO()||eN()?o=!0:n=!0;else throw Error(`Unrecognized modifier name: ${a}`)}return t&&(a=`Alt-${a}`),n&&(a=`Ctrl-${a}`),o&&(a=`Meta-${a}`),r&&(a=`Shift-${a}`),a})(e).split(/-(?!$)/),a=s.find(e=>!["Alt","Ctrl","Meta","Shift"].includes(e)),l=new KeyboardEvent("keydown",{key:"Space"===a?" ":a,altKey:s.includes("Alt"),ctrlKey:s.includes("Ctrl"),metaKey:s.includes("Meta"),shiftKey:s.includes("Shift"),bubbles:!0,cancelable:!0}),c=t.captureTransaction(()=>{n.someProp("handleKeyDown",e=>e(n,l))});return null==c||c.steps.forEach(e=>{let t=e.map(r.mapping);t&&o&&r.maybeStep(t)}),!0},lift:(e,t={})=>({state:n,dispatch:r})=>{let o=K(e,n.schema);return!!eR(n,o,t)&&C(n,r)},liftEmptyBlock:()=>({state:e,dispatch:t})=>M(e,t),liftListItem:e=>({state:t,dispatch:n})=>{var r;return(r=K(e,t.schema),function(e,t){let{$from:n,$to:o}=e.selection,s=n.blockRange(o,e=>e.childCount>0&&e.firstChild.type==r);return!!s&&(!t||(n.node(s.depth-1).type==r?function(e,t,n,r){let o=e.tr,s=r.end,a=r.$to.end(r.depth);s<a&&(o.step(new c.FC(s-1,a,s,a,new l.p2(l.HY.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new l.Ts(o.doc.resolve(r.$from.pos),o.doc.resolve(a),r.depth));let u=(0,c.k9)(r);if(null==u)return!1;o.lift(r,u);let d=o.doc.resolve(o.mapping.map(s,-1)-1);return(0,c.Mn)(o.doc,d.pos)&&d.nodeBefore.type==d.nodeAfter.type&&o.join(d.pos),t(o.scrollIntoView()),!0}(e,t,r,s):function(e,t,n){let r=e.tr,o=n.parent;for(let e=n.end,t=n.endIndex-1,s=n.startIndex;t>s;t--)e-=o.child(t).nodeSize,r.delete(e-1,e+1);let s=r.doc.resolve(n.start),a=s.nodeAfter;if(r.mapping.map(n.end)!=n.start+s.nodeAfter.nodeSize)return!1;let u=0==n.startIndex,d=n.endIndex==o.childCount,p=s.node(-1),h=s.index(-1);if(!p.canReplace(h+(u?0:1),h+1,a.content.append(d?l.HY.empty:l.HY.from(o))))return!1;let f=s.pos,m=f+a.nodeSize;return r.step(new c.FC(f-(u?1:0),m+(d?1:0),f+1,m-1,new l.p2((u?l.HY.empty:l.HY.from(o.copy(l.HY.empty))).append(d?l.HY.empty:l.HY.from(o.copy(l.HY.empty))),u?0:1,d?0:1),u?0:1)),t(r.scrollIntoView()),!0}(e,t,s)))})(t,n)},newlineInCode:()=>({state:e,dispatch:t})=>E(e,t),resetAttributes:(e,t)=>({tr:n,state:r,dispatch:o})=>{let s=null,a=null,l=eL("string"==typeof e?e:e.name,r.schema);return!!l&&("node"===l&&(s=K(e,r.schema)),"mark"===l&&(a=eC(e,r.schema)),o&&n.selection.ranges.forEach(e=>{r.doc.nodesBetween(e.$from.pos,e.$to.pos,(e,r)=>{s&&s===e.type&&n.setNodeMarkup(r,void 0,ej(e.attrs,t)),a&&e.marks.length&&e.marks.forEach(o=>{a===o.type&&n.addMark(r,r+e.nodeSize,a.create(ej(o.attrs,t)))})})}),!0)},scrollIntoView:()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),selectAll:()=>({tr:e,dispatch:t})=>{if(t){let t=new o.C1(e.doc);e.setSelection(t)}return!0},selectNodeBackward:()=>({state:e,dispatch:t})=>v(e,t),selectNodeForward:()=>({state:e,dispatch:t})=>w(e,t),selectParentNode:()=>({state:e,dispatch:t})=>I(e,t),selectTextblockEnd:()=>({state:e,dispatch:t})=>R(e,t),selectTextblockStart:()=>({state:e,dispatch:t})=>N(e,t),setContent:(e,t=!1,n={},r={})=>({editor:o,tr:s,dispatch:a,commands:l})=>{var c,u;let{doc:d}=s;if("full"!==n.preserveWhitespace){let l=e$(e,o.schema,n,{errorOnInvalidContent:null!==(c=r.errorOnInvalidContent)&&void 0!==c?c:o.options.enableContentCheck});return a&&s.replaceWith(0,d.content.size,l).setMeta("preventUpdate",!t),!0}return a&&s.setMeta("preventUpdate",!t),l.insertContentAt({from:0,to:d.content.size},e,{parseOptions:n,errorOnInvalidContent:null!==(u=r.errorOnInvalidContent)&&void 0!==u?u:o.options.enableContentCheck})},setMark:(e,t={})=>({tr:n,state:r,dispatch:o})=>{let{selection:s}=n,{empty:a,ranges:l}=s,c=eC(e,r.schema);if(o){if(a){let e=eF(r,c);n.addStoredMark(c.create({...e,...t}))}else l.forEach(e=>{let o=e.$from.pos,s=e.$to.pos;r.doc.nodesBetween(o,s,(e,r)=>{let a=Math.max(r,o),l=Math.min(r+e.nodeSize,s);e.marks.find(e=>e.type===c)?e.marks.forEach(e=>{c===e.type&&n.addMark(a,l,c.create({...e.attrs,...t}))}):n.addMark(a,l,c.create(t))})})}return function(e,t,n){var r;let{selection:o}=t,s=null;if(eE(o)&&(s=o.$cursor),s){let t=null!==(r=e.storedMarks)&&void 0!==r?r:s.marks();return!!n.isInSet(t)||!t.some(e=>e.type.excludes(n))}let{ranges:a}=o;return a.some(({$from:t,$to:r})=>{let o=0===t.depth&&e.doc.inlineContent&&e.doc.type.allowsMarkType(n);return e.doc.nodesBetween(t.pos,r.pos,(e,t,r)=>{if(o)return!1;if(e.isInline){let t=!r||r.type.allowsMarkType(n),s=!!n.isInSet(e.marks)||!e.marks.some(e=>e.type.excludes(n));o=t&&s}return!o}),o})}(r,n,c)},setMeta:(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),setNode:(e,t={})=>({state:n,dispatch:r,chain:o})=>{let s;let a=K(e,n.schema);return(n.selection.$anchor.sameParent(n.selection.$head)&&(s=n.selection.$anchor.parent.attrs),a.isTextblock)?o().command(({commands:e})=>!!L(a,{...s,...t})(n)||e.clearNodes()).command(({state:e})=>L(a,{...s,...t})(e,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},setNodeSelection:e=>({tr:t,dispatch:n})=>{if(n){let{doc:n}=t,r=eT(e,0,n.content.size),s=o.qv.create(n,r);t.setSelection(s)}return!0},setTextSelection:e=>({tr:t,dispatch:n})=>{if(n){let{doc:n}=t,{from:r,to:s}="number"==typeof e?{from:e,to:e}:e,a=o.Bs.atStart(n).from,l=o.Bs.atEnd(n).to,c=eT(r,a,l),u=eT(s,a,l),d=o.Bs.create(n,c,u);t.setSelection(d)}return!0},sinkListItem:e=>({state:t,dispatch:n})=>{var r;return(r=K(e,t.schema),function(e,t){let{$from:n,$to:o}=e.selection,s=n.blockRange(o,e=>e.childCount>0&&e.firstChild.type==r);if(!s)return!1;let a=s.startIndex;if(0==a)return!1;let u=s.parent,d=u.child(a-1);if(d.type!=r)return!1;if(t){let n=d.lastChild&&d.lastChild.type==u.type,o=l.HY.from(n?r.create():null),a=new l.p2(l.HY.from(r.create(null,l.HY.from(u.type.create(null,o)))),n?3:1,0),p=s.start,h=s.end;t(e.tr.step(new c.FC(p-(n?3:1),h,p,h,a,1,!0)).scrollIntoView())}return!0})(t,n)},splitBlock:({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:r,editor:s})=>{let{selection:a,doc:l}=t,{$from:u,$to:d}=a,p=eU(s.extensionManager.attributes,u.node().type.name,u.node().attrs);if(a instanceof o.qv&&a.node.isBlock)return!!(u.parentOffset&&(0,c.Ax)(l,u.pos))&&(r&&(e&&eK(n,s.extensionManager.splittableMarks),t.split(u.pos).scrollIntoView()),!0);if(!u.parent.isBlock)return!1;let h=d.parentOffset===d.parent.content.size,f=0===u.depth?void 0:function(e){for(let t=0;t<e.edgeCount;t+=1){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}(u.node(-1).contentMatchAt(u.indexAfter(-1))),m=h&&f?[{type:f,attrs:p}]:void 0,g=(0,c.Ax)(t.doc,t.mapping.map(u.pos),1,m);if(!m&&!g&&(0,c.Ax)(t.doc,t.mapping.map(u.pos),1,f?[{type:f}]:void 0)&&(g=!0,m=f?[{type:f,attrs:p}]:void 0),r){if(g&&(a instanceof o.Bs&&t.deleteSelection(),t.split(t.mapping.map(u.pos),1,m),f&&!h&&!u.parentOffset&&u.parent.type!==f)){let e=t.mapping.map(u.before()),n=t.doc.resolve(e);u.node(-1).canReplaceWith(n.index(),n.index()+1,f)&&t.setNodeMarkup(t.mapping.map(u.before()),f)}e&&eK(n,s.extensionManager.splittableMarks),t.scrollIntoView()}return g},splitListItem:(e,t={})=>({tr:n,state:r,dispatch:s,editor:a})=>{var u;let d=K(e,r.schema),{$from:p,$to:h}=r.selection,f=r.selection.node;if(f&&f.isBlock||p.depth<2||!p.sameParent(h))return!1;let m=p.node(-1);if(m.type!==d)return!1;let g=a.extensionManager.attributes;if(0===p.parent.content.size&&p.node(-1).childCount===p.indexAfter(-1)){if(2===p.depth||p.node(-3).type!==d||p.index(-2)!==p.node(-2).childCount-1)return!1;if(s){let e=l.HY.empty,r=p.index(-1)?1:p.index(-2)?2:3;for(let t=p.depth-r;t>=p.depth-3;t-=1)e=l.HY.from(p.node(t).copy(e));let s=p.indexAfter(-1)<p.node(-2).childCount?1:p.indexAfter(-2)<p.node(-3).childCount?2:3,a={...eU(g,p.node().type.name,p.node().attrs),...t},c=(null===(u=d.contentMatch.defaultType)||void 0===u?void 0:u.createAndFill(a))||void 0;e=e.append(l.HY.from(d.createAndFill(null,c)||void 0));let h=p.before(p.depth-(r-1));n.replace(h,p.after(-s),new l.p2(e,4-r,0));let f=-1;n.doc.nodesBetween(h,n.doc.content.size,(e,t)=>{if(f>-1)return!1;e.isTextblock&&0===e.content.size&&(f=t+1)}),f>-1&&n.setSelection(o.Bs.near(n.doc.resolve(f))),n.scrollIntoView()}return!0}let v=h.pos===p.end()?m.contentMatchAt(0).defaultType:null,b={...eU(g,m.type.name,m.attrs),...t},y={...eU(g,p.node().type.name,p.node().attrs),...t};n.delete(p.pos,h.pos);let x=v?[{type:d,attrs:b},{type:v,attrs:y}]:[{type:d,attrs:b}];if(!(0,c.Ax)(n.doc,p.pos,2))return!1;if(s){let{selection:e,storedMarks:t}=r,{splittableMarks:o}=a.extensionManager,l=t||e.$to.parentOffset&&e.$from.marks();if(n.split(p.pos,2,x).scrollIntoView(),!l||!s)return!0;let c=l.filter(e=>o.includes(e.type.name));n.ensureMarks(c)}return!0},toggleList:(e,t,n,r={})=>({editor:o,tr:s,state:a,dispatch:l,chain:c,commands:u,can:d})=>{let{extensions:p,splittableMarks:h}=o.extensionManager,f=K(e,a.schema),m=K(t,a.schema),{selection:g,storedMarks:v}=a,{$from:b,$to:y}=g,x=b.blockRange(y),w=v||g.$to.parentOffset&&g.$from.marks();if(!x)return!1;let S=eB(e=>eq(e.type.name,p))(g);if(x.depth>=1&&S&&x.depth-S.depth<=1){if(S.node.type===f)return u.liftListItem(m);if(eq(S.node.type.name,p)&&f.validContent(S.node.content)&&l)return c().command(()=>(s.setNodeMarkup(S.pos,f),!0)).command(()=>eY(s,f)).command(()=>eZ(s,f)).run()}return n&&w&&l?c().command(()=>{let e=d().wrapInList(f,r),t=w.filter(e=>h.includes(e.type.name));return s.ensureMarks(t),!!e||u.clearNodes()}).wrapInList(f,r).command(()=>eY(s,f)).command(()=>eZ(s,f)).run():c().command(()=>!!d().wrapInList(f,r)||u.clearNodes()).wrapInList(f,r).command(()=>eY(s,f)).command(()=>eZ(s,f)).run()},toggleMark:(e,t={},n={})=>({state:r,commands:o})=>{let{extendEmptyMarkRange:s=!1}=n,a=eC(e,r.schema);return eV(r,a,t)?o.unsetMark(a,{extendEmptyMarkRange:s}):o.setMark(a,t)},toggleNode:(e,t,n={})=>({state:r,commands:o})=>{let s;let a=K(e,r.schema),l=K(t,r.schema),c=eR(r,a,n);return(r.selection.$anchor.sameParent(r.selection.$head)&&(s=r.selection.$anchor.parent.attrs),c)?o.setNode(l,s):o.setNode(a,{...s,...n})},toggleWrap:(e,t={})=>({state:n,commands:r})=>{let o=K(e,n.schema);return eR(n,o,t)?r.lift(o):r.wrapIn(o,t)},undoInputRule:()=>({state:e,dispatch:t})=>{let n=e.plugins;for(let r=0;r<n.length;r+=1){let o;let s=n[r];if(s.spec.isInputRules&&(o=s.getState(e))){if(t){let t=e.tr,n=o.transform;for(let e=n.steps.length-1;e>=0;e-=1)t.step(n.steps[e].invert(n.docs[e]));if(o.text){let n=t.doc.resolve(o.from).marks();t.replaceWith(o.from,o.to,e.schema.text(o.text,n))}else t.delete(o.from,o.to)}return!0}}return!1},unsetAllMarks:()=>({tr:e,dispatch:t})=>{let{selection:n}=e,{empty:r,ranges:o}=n;return!!r||(t&&o.forEach(t=>{e.removeMark(t.$from.pos,t.$to.pos)}),!0)},unsetMark:(e,t={})=>({tr:n,state:r,dispatch:o})=>{var s;let{extendEmptyMarkRange:a=!1}=t,{selection:l}=n,c=eC(e,r.schema),{$from:u,empty:d,ranges:p}=l;if(!o)return!0;if(d&&a){let{from:e,to:t}=l,r=null===(s=u.marks().find(e=>e.type===c))||void 0===s?void 0:s.attrs,o=eA(u,c,r);o&&(e=o.from,t=o.to),n.removeMark(e,t,c)}else p.forEach(e=>{n.removeMark(e.$from.pos,e.$to.pos,c)});return n.removeStoredMark(c),!0},updateAttributes:(e,t={})=>({tr:n,state:r,dispatch:o})=>{let s=null,a=null,l=eL("string"==typeof e?e:e.name,r.schema);return!!l&&("node"===l&&(s=K(e,r.schema)),"mark"===l&&(a=eC(e,r.schema)),o&&n.selection.ranges.forEach(e=>{let o,l,c,u;let d=e.$from.pos,p=e.$to.pos;n.selection.empty?r.doc.nodesBetween(d,p,(e,t)=>{s&&s===e.type&&(c=Math.max(t,d),u=Math.min(t+e.nodeSize,p),o=t,l=e)}):r.doc.nodesBetween(d,p,(e,r)=>{r<d&&s&&s===e.type&&(c=Math.max(r,d),u=Math.min(r+e.nodeSize,p),o=r,l=e),r>=d&&r<=p&&(s&&s===e.type&&n.setNodeMarkup(r,void 0,{...e.attrs,...t}),a&&e.marks.length&&e.marks.forEach(o=>{if(a===o.type){let s=Math.max(r,d),l=Math.min(r+e.nodeSize,p);n.addMark(s,l,a.create({...o.attrs,...t}))}}))}),l&&(void 0!==o&&n.setNodeMarkup(o,void 0,{...l.attrs,...t}),a&&l.marks.length&&l.marks.forEach(e=>{a===e.type&&n.addMark(c,u,a.create({...e.attrs,...t}))}))}),!0)},wrapIn:(e,t={})=>({state:n,dispatch:r})=>(function(e,t=null){return function(n,r){let{$from:o,$to:s}=n.selection,a=o.blockRange(s),l=a&&(0,c.nd)(a,e,t);return!!l&&(r&&r(n.tr.wrap(a,l).scrollIntoView()),!0)}})(K(e,n.schema),t)(n,r),wrapInList:(e,t={})=>({state:n,dispatch:r})=>(function(e,t=null){return function(n,r){let{$from:o,$to:s}=n.selection,a=o.blockRange(s);if(!a)return!1;let u=r?n.tr:null;return!!function(e,t,n,r=null){let o=!1,s=t,a=t.$from.doc;if(t.depth>=2&&t.$from.node(t.depth-1).type.compatibleContent(n)&&0==t.startIndex){if(0==t.$from.index(t.depth-1))return!1;let e=a.resolve(t.start-2);s=new l.Ts(e,e,t.depth),t.endIndex<t.parent.childCount&&(t=new l.Ts(t.$from,a.resolve(t.$to.end(t.depth)),t.depth)),o=!0}let u=(0,c.nd)(s,n,r,t);return!!u&&(e&&function(e,t,n,r,o){let s=l.HY.empty;for(let e=n.length-1;e>=0;e--)s=l.HY.from(n[e].type.create(n[e].attrs,s));e.step(new c.FC(t.start-(r?2:0),t.end,t.start,t.end,new l.p2(s,0,0),n.length,!0));let a=0;for(let e=0;e<n.length;e++)n[e].type==o&&(a=e+1);let u=n.length-a,d=t.start+n.length-(r?2:0),p=t.parent;for(let n=t.startIndex,r=t.endIndex,o=!0;n<r;n++,o=!1)!o&&(0,c.Ax)(e.doc,d,u)&&(e.split(d,u),d+=2*u),d+=p.child(n).nodeSize;}(e,t,u,o,n),!0)}(u,a,e,t)&&(r&&r(u.scrollIntoView()),!0)}})(K(e,n.schema),t)(n,r)});let eX=ev.create({name:"commands",addCommands:()=>({...eJ})}),eQ=ev.create({name:"drop",addProseMirrorPlugins(){return[new o.Sy({key:new o.H$("tiptapDrop"),props:{handleDrop:(e,t,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:t,slice:n,moved:r})}}})]}}),e0=ev.create({name:"editable",addProseMirrorPlugins(){return[new o.Sy({key:new o.H$("editable"),props:{editable:()=>this.editor.options.editable}})]}}),e1=new o.H$("focusEvents"),e2=ev.create({name:"focusEvents",addProseMirrorPlugins(){let{editor:e}=this;return[new o.Sy({key:e1,props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;let r=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur:(t,n)=>{e.isFocused=!1;let r=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}}),e3=ev.create({name:"keymap",addKeyboardShortcuts(){let e=()=>this.editor.commands.first(({commands:e})=>[()=>e.undoInputRule(),()=>e.command(({tr:t})=>{let{selection:n,doc:r}=t,{empty:s,$anchor:a}=n,{pos:l,parent:c}=a,u=a.parent.isTextblock&&l>0?t.doc.resolve(l-1):a,d=u.parent.type.spec.isolating,p=a.pos-a.parentOffset,h=d&&1===u.parent.childCount?p===a.pos:o.Y1.atStart(r).from===l;return!!s&&!!c.type.isTextblock&&!c.textContent.length&&!!h&&(!h||"paragraph"!==a.parent.type.name)&&e.clearNodes()}),()=>e.deleteSelection(),()=>e.joinBackward(),()=>e.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:e})=>[()=>e.deleteSelection(),()=>e.deleteCurrentNode(),()=>e.joinForward(),()=>e.selectNodeForward()]),n={Enter:()=>this.editor.commands.first(({commands:e})=>[()=>e.newlineInCode(),()=>e.createParagraphNear(),()=>e.liftEmptyBlock(),()=>e.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},r={...n},s={...n,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return eO()||eN()?s:r},addProseMirrorPlugins(){return[new o.Sy({key:new o.H$("clearDocument"),appendTransaction:(e,t,n)=>{if(e.some(e=>e.getMeta("composition")))return;let r=e.some(e=>e.docChanged)&&!t.doc.eq(n.doc),s=e.some(e=>e.getMeta("preventClearDocument"));if(!r||s)return;let{empty:a,from:l,to:c}=t.selection,u=o.Y1.atStart(t.doc).from,d=o.Y1.atEnd(t.doc).to;if(a||!(l===u&&c===d)||!eW(n.doc))return;let p=n.tr,h=H({state:n,transaction:p}),{commands:f}=new U({editor:this.editor,state:h});if(f.clearNodes(),!!p.steps.length)return p}})]}}),e5=ev.create({name:"paste",addProseMirrorPlugins(){return[new o.Sy({key:new o.H$("tiptapPaste"),props:{handlePaste:(e,t,n)=>{this.editor.emit("paste",{editor:this.editor,event:t,slice:n})}}})]}}),e4=ev.create({name:"tabindex",addProseMirrorPlugins(){return[new o.Sy({key:new o.H$("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}});class e6{get name(){return this.node.type.name}constructor(e,t,n=!1,r=null){this.currentNode=null,this.actualDepth=null,this.isBlock=n,this.resolvedPos=e,this.editor=t,this.currentNode=r}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var e;return null!==(e=this.actualDepth)&&void 0!==e?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let t=this.from,n=this.to;if(this.isBlock){if(0===this.content.size){console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}t=this.from+1,n=this.to-1}this.editor.commands.insertContentAt({from:t,to:n},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(0===this.depth)return null;let e=this.resolvedPos.start(this.resolvedPos.depth-1);return new e6(this.resolvedPos.doc.resolve(e),this.editor)}get before(){let e=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.from-3)),new e6(e,this.editor)}get after(){let e=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.to+3)),new e6(e,this.editor)}get children(){let e=[];return this.node.content.forEach((t,n)=>{let r=t.isBlock&&!t.isTextblock,o=t.isAtom&&!t.isText,s=this.pos+n+(o?0:1),a=this.resolvedPos.doc.resolve(s);if(!r&&a.depth<=this.depth)return;let l=new e6(a,this.editor,r,r?t:null);r&&(l.actualDepth=this.depth+1),e.push(new e6(a,this.editor,r,r?t:null))}),e}get firstChild(){return this.children[0]||null}get lastChild(){let e=this.children;return e[e.length-1]||null}closest(e,t={}){let n=null,r=this.parent;for(;r&&!n;){if(r.node.type.name===e){if(Object.keys(t).length>0){let e=r.node.attrs,n=Object.keys(t);for(let r=0;r<n.length;r+=1){let o=n[r];if(e[o]!==t[o])break}}else n=r}r=r.parent}return n}querySelector(e,t={}){return this.querySelectorAll(e,t,!0)[0]||null}querySelectorAll(e,t={},n=!1){let r=[];if(!this.children||0===this.children.length)return r;let o=Object.keys(t);return this.children.forEach(s=>{if(n&&r.length>0)return;if(s.node.type.name===e&&o.every(e=>t[e]===s.node.attrs[e])&&r.push(s),!n||!(r.length>0))r=r.concat(s.querySelectorAll(e,t,n))}),r}setAttribute(e){let{tr:t}=this.editor.state;t.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(t)}}let e8=`.ProseMirror {
|
|
|
position: relative;
|
|
|
}
|
|
|
|
|
|
.ProseMirror {
|
|
|
word-wrap: break-word;
|
|
|
white-space: pre-wrap;
|
|
|
white-space: break-spaces;
|
|
|
-webkit-font-variant-ligatures: none;
|
|
|
font-variant-ligatures: none;
|
|
|
font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
|
|
|
}
|
|
|
|
|
|
.ProseMirror [contenteditable="false"] {
|
|
|
white-space: normal;
|
|
|
}
|
|
|
|
|
|
.ProseMirror [contenteditable="false"] [contenteditable="true"] {
|
|
|
white-space: pre-wrap;
|
|
|
}
|
|
|
|
|
|
.ProseMirror pre {
|
|
|
white-space: pre-wrap;
|
|
|
}
|
|
|
|
|
|
img.ProseMirror-separator {
|
|
|
display: inline !important;
|
|
|
border: none !important;
|
|
|
margin: 0 !important;
|
|
|
width: 0 !important;
|
|
|
height: 0 !important;
|
|
|
}
|
|
|
|
|
|
.ProseMirror-gapcursor {
|
|
|
display: none;
|
|
|
pointer-events: none;
|
|
|
position: absolute;
|
|
|
margin: 0;
|
|
|
}
|
|
|
|
|
|
.ProseMirror-gapcursor:after {
|
|
|
content: "";
|
|
|
display: block;
|
|
|
position: absolute;
|
|
|
top: -2px;
|
|
|
width: 20px;
|
|
|
border-top: 1px solid black;
|
|
|
animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
|
|
|
}
|
|
|
|
|
|
@keyframes ProseMirror-cursor-blink {
|
|
|
to {
|
|
|
visibility: hidden;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
.ProseMirror-hideselection *::selection {
|
|
|
background: transparent;
|
|
|
}
|
|
|
|
|
|
.ProseMirror-hideselection *::-moz-selection {
|
|
|
background: transparent;
|
|
|
}
|
|
|
|
|
|
.ProseMirror-hideselection * {
|
|
|
caret-color: transparent;
|
|
|
}
|
|
|
|
|
|
.ProseMirror-focused .ProseMirror-gapcursor {
|
|
|
display: block;
|
|
|
}
|
|
|
|
|
|
.tippy-box[data-animation=fade][data-state=hidden] {
|
|
|
opacity: 0
|
|
|
}`;class e9 extends V{constructor(e={}){super(),this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:e})=>{throw e},onPaste:()=>null,onDrop:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("contentError",this.options.onContentError),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:e,slice:t,moved:n})=>this.options.onDrop(e,t,n)),this.on("paste",({event:e,slice:t})=>this.options.onPaste(e,t)),window.setTimeout(()=>{if(!this.isDestroyed)this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=function(e,t,n){let r=document.querySelector("style[data-tiptap-style]");if(null!==r)return r;let o=document.createElement("style");return t&&o.setAttribute("nonce",t),o.setAttribute(`data-tiptap-style${n?`-${n}`:""}`,""),o.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(o),o}(e8,this.options.injectNonce))}setOptions(e={}){if(this.options={...this.options,...e},!!this.view&&!!this.state&&!this.isDestroyed)this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state)}setEditable(e,t=!0){this.setOptions({editable:e}),t&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(e,t){let n=J(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}unregisterPlugin(e){if(this.isDestroyed)return;let t=this.state.plugins,n=t;if([].concat(e).forEach(e=>{let t="string"==typeof e?`${e}$`:e.key;n=n.filter(e=>!e.key.startsWith(t))}),t.length===n.length)return;let r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}createExtensionManager(){var e,t;let n=[...this.options.enableCoreExtensions?[e0,ex.configure({blockSeparator:null===(t=null===(e=this.options.coreExtensionOptions)||void 0===e?void 0:e.clipboardTextSerializer)||void 0===t?void 0:t.blockSeparator}),eX,e2,e3,e4,eQ,e5].filter(e=>"object"!=typeof this.options.enableCoreExtensions||!1!==this.options.enableCoreExtensions[e.name]):[],...this.options.extensions].filter(e=>["extension","node","mark"].includes(null==e?void 0:e.type));this.extensionManager=new eg(n,this)}createCommandManager(){this.commandManager=new U({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){var e;let t;try{t=e$(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(e){if(!(e instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(e.message))throw e;this.emit("contentError",{editor:this,error:e,disableCollaboration:()=>{this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(e=>"collaboration"!==e.name),this.createExtensionManager()}}),t=e$(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}let n=e_(t,this.options.autofocus);this.view=new s.tk(this.options.element,{...this.options.editorProps,attributes:{role:"textbox",...null===(e=this.options.editorProps)||void 0===e?void 0:e.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:o.yy.create({doc:t,selection:n||void 0})});let r=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(r),this.createNodeViews(),this.prependClass(),this.view.dom.editor=this}createNodeViews(){if(!this.view.isDestroyed)this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;let t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(e=>{var t;return null===(t=this.capturedTransaction)||void 0===t?void 0:t.step(e)});return}let t=this.state.apply(e),n=!this.state.selection.eq(t.selection);this.emit("beforeTransaction",{editor:this,transaction:e,nextState:t}),this.view.updateState(t),this.emit("transaction",{editor:this,transaction:e}),n&&this.emit("selectionUpdate",{editor:this,transaction:e});let r=e.getMeta("focus"),o=e.getMeta("blur");if(r&&this.emit("focus",{editor:this,event:r.event,transaction:e}),o&&this.emit("blur",{editor:this,event:o.event,transaction:e}),!(!e.docChanged||e.getMeta("preventUpdate")))this.emit("update",{editor:this,transaction:e})}getAttributes(e){return function(e,t){let n=eL("string"==typeof t?t:t.name,e.schema);return"node"===n?function(e,t){let n=K(t,e.schema),{from:r,to:o}=e.selection,s=[];e.doc.nodesBetween(r,o,e=>{s.push(e)});let a=s.reverse().find(e=>e.type.name===n.name);return a?{...a.attrs}:{}}(e,t):"mark"===n?eF(e,t):{}}(this.state,e)}isActive(e,t){let n="string"==typeof e?e:null,r="string"==typeof e?t:e;return function(e,t,n={}){if(!t)return eR(e,null,n)||eV(e,null,n);let r=eL(t,e.schema);return"node"===r?eR(e,t,n):"mark"===r&&eV(e,t,n)}(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return er(this.state.doc.content,this.schema)}getText(e){let{blockSeparator:t="\n\n",textSerializers:n={}}=e||{};return function(e,t){let n={from:0,to:e.content.size};return eb(e,n,t)}(this.state.doc,{blockSeparator:t,textSerializers:{...ey(this.schema),...n}})}get isEmpty(){return eW(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){if(this.emit("destroy"),this.view){let e=this.view.dom;e&&e.editor&&delete e.editor,this.view.destroy()}this.removeAllListeners()}get isDestroyed(){var e;return!(null===(e=this.view)||void 0===e?void 0:e.docView)}$node(e,t){var n;return(null===(n=this.$doc)||void 0===n?void 0:n.querySelector(e,t))||null}$nodes(e,t){var n;return(null===(n=this.$doc)||void 0===n?void 0:n.querySelectorAll(e,t))||null}$pos(e){return new e6(this.state.doc.resolve(e),this)}get $doc(){return this.$pos(0)}}function e7(e){return new es({find:e.find,handler:({state:t,range:n,match:r})=>{let o=X(e.getAttributes,void 0,r);if(!1===o||null===o)return null;let{tr:s}=t,a=r[r.length-1],l=r[0];if(a){let r=l.search(/\S/),c=n.from+l.indexOf(a),u=c+a.length;if(eH(n.from,n.to,t.doc).filter(t=>t.mark.type.excluded.find(n=>n===e.type&&n!==t.mark.type)).filter(e=>e.to>c).length)return null;u<n.to&&s.delete(u,n.to),c>n.from&&s.delete(n.from+r,c);let d=n.from+r+a.length;s.addMark(n.from+r,d,e.type.create(o||{})),s.removeStoredMark(e.type)}}})}function te(e){return new es({find:e.find,handler:({state:t,range:n,match:r})=>{let o=X(e.getAttributes,void 0,r)||{},{tr:s}=t,a=n.from,l=n.to,c=e.type.create(o);if(r[1]){let e=a+r[0].lastIndexOf(r[1]);e>l?e=l:l=e+r[1].length;let t=r[0][r[0].length-1];s.insertText(t,a+r[0].length-1),s.replaceWith(e,l,c)}else if(r[0]){let t=e.type.isInline?a:a-1;s.insert(t,e.type.create(o)).delete(s.mapping.map(a),s.mapping.map(l))}s.scrollIntoView()}})}function tt(e){return new es({find:e.find,handler:({state:t,range:n,match:r})=>{let o=t.doc.resolve(n.from),s=X(e.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,s)}})}function tn(e){return new es({find:e.find,handler:({state:t,range:n,match:r,chain:o})=>{let s=X(e.getAttributes,void 0,r)||{},a=t.tr.delete(n.from,n.to),l=a.doc.resolve(n.from).blockRange(),u=l&&(0,c.nd)(l,e.type,s);if(!u)return null;if(a.wrap(l,u),e.keepMarks&&e.editor){let{selection:n,storedMarks:r}=t,{splittableMarks:o}=e.editor.extensionManager,s=r||n.$to.parentOffset&&n.$from.marks();if(s){let e=s.filter(e=>o.includes(e.type.name));a.ensureMarks(e)}}if(e.keepAttributes){let t="bulletList"===e.type.name||"orderedList"===e.type.name?"listItem":"taskList";o().updateAttributes(t,s).run()}let d=a.doc.resolve(n.from-1).nodeBefore;d&&d.type===e.type&&(0,c.Mn)(a.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,d))&&a.join(n.from-1)}})}class tr{constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=X(q(this,"addOptions",{name:this.name}))),this.storage=X(q(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new tr(e)}configure(e={}){let t=this.extend({...this.config,addOptions:()=>eu(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){let t=new tr(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=X(q(t,"addOptions",{name:t.name})),t.storage=X(q(t,"addStorage",{name:t.name,options:t.options})),t}}function ti(e){return new ep({find:e.find,handler:({state:t,range:n,match:r,pasteEvent:o})=>{let s=X(e.getAttributes,void 0,r,o);if(!1===s||null===s)return null;let{tr:a}=t,l=r[r.length-1],c=r[0],u=n.to;if(l){let r=c.search(/\S/),o=n.from+c.indexOf(l),d=o+l.length;if(eH(n.from,n.to,t.doc).filter(t=>t.mark.type.excluded.find(n=>n===e.type&&n!==t.mark.type)).filter(e=>e.to>o).length)return null;d<n.to&&a.delete(d,n.to),o>n.from&&a.delete(n.from+r,o),u=n.from+r+l.length,a.addMark(n.from+r,u,e.type.create(s||{})),a.removeStoredMark(e.type)}}})}},550745:function(e,t,n){"use strict";n.d(t,{ZP:function(){return s}});var r=n(453203);let o=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,s=r.NB.create({name:"image",addOptions:()=>({inline:!1,allowBase64:!1,HTMLAttributes:{}}),inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes:()=>({src:{default:null},alt:{default:null},title:{default:null}}),parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:e}){return["img",(0,r.P1)(this.options.HTMLAttributes,e)]},addCommands(){return{setImage:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addInputRules(){return[(0,r.x2)({find:o,type:this.type,getAttributes:e=>{let[,,t,n,r]=e;return{src:n,alt:t,title:r}}})]}})},778681:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(453203);let o=r.NB.create({name:"tableCell",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{let t=e.getAttribute("colwidth");return t?t.split(",").map(e=>parseInt(e,10)):null}}}),tableRole:"cell",isolating:!0,parseHTML:()=>[{tag:"td"}],renderHTML({HTMLAttributes:e}){return["td",(0,r.P1)(this.options.HTMLAttributes,e),0]}})},357962:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(453203);let o=r.NB.create({name:"tableHeader",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{let t=e.getAttribute("colwidth");return t?t.split(",").map(e=>parseInt(e,10)):null}}}),tableRole:"header_cell",isolating:!0,parseHTML:()=>[{tag:"th"}],renderHTML({HTMLAttributes:e}){return["th",(0,r.P1)(this.options.HTMLAttributes,e),0]}})},76049:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(453203);let o=r.NB.create({name:"tableRow",addOptions:()=>({HTMLAttributes:{}}),content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML:()=>[{tag:"tr"}],renderHTML({HTMLAttributes:e}){return["tr",(0,r.P1)(this.options.HTMLAttributes,e),0]}})},481265:function(e,t,n){"use strict";n.d(t,{ZP:()=>ep});var r,o,s=n("453203"),a=n("871738"),l=n("153737"),c=n("661763"),u=n("132308"),d=n("240554");if("undefined"!=typeof WeakMap){let e=new WeakMap;r=t=>e.get(t),o=(t,n)=>(e.set(t,n),n)}else{let e=[],t=0;r=t=>{for(let n=0;n<e.length;n+=2)if(e[n]==t)return e[n+1]},o=(n,r)=>(10==t&&(t=0),e[t++]=n,e[t++]=r)}var p=class{constructor(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r}findCell(e){for(let t=0;t<this.map.length;t++){let n=this.map[t];if(n!=e)continue;let r=t%this.width,o=t/this.width|0,s=r+1,a=o+1;for(let e=1;s<this.width&&this.map[t+e]==n;e++)s++;for(let e=1;a<this.height&&this.map[t+this.width*e]==n;e++)a++;return{left:r,top:o,right:s,bottom:a}}throw RangeError(`No cell with offset ${e} found`)}colCount(e){for(let t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw RangeError(`No cell with offset ${e} found`)}nextCell(e,t,n){let{left:r,right:o,top:s,bottom:a}=this.findCell(e);if("horiz"==t)return(n<0?0==r:o==this.width)?null:this.map[s*this.width+(n<0?r-1:o)];return(n<0?0==s:a==this.height)?null:this.map[r+this.width*(n<0?s-1:a)]}rectBetween(e,t){let{left:n,right:r,top:o,bottom:s}=this.findCell(e),{left:a,right:l,top:c,bottom:u}=this.findCell(t);return{left:Math.min(n,a),top:Math.min(o,c),right:Math.max(r,l),bottom:Math.max(s,u)}}cellsInRect(e){let t=[],n={};for(let r=e.top;r<e.bottom;r++)for(let o=e.left;o<e.right;o++){let s=r*this.width+o,a=this.map[s];if(!n[a]){if(n[a]=!0,o==e.left&&o&&this.map[s-1]==a||r==e.top&&r&&this.map[s-this.width]==a)continue;t.push(a)}}return t}positionAt(e,t,n){for(let r=0,o=0;;r++){let s=o+n.child(r).nodeSize;if(r==e){let n=t+e*this.width,r=(e+1)*this.width;for(;n<r&&this.map[n]<o;)n++;return n==r?s-1:this.map[n]}o=s}}static get(e){return r(e)||o(e,function(e){if("table"!=e.type.spec.tableRole)throw RangeError("Not a table node: "+e.type.name);let t=function(e){let t=-1,n=!1;for(let r=0;r<e.childCount;r++){let o=e.child(r),s=0;if(n)for(let t=0;t<r;t++){let n=e.child(t);for(let e=0;e<n.childCount;e++){let o=n.child(e);t+o.attrs.rowspan>r&&(s+=o.attrs.colspan)}}for(let e=0;e<o.childCount;e++){let t=o.child(e);s+=t.attrs.colspan,t.attrs.rowspan>1&&(n=!0)}-1==t?t=s:t!=s&&(t=Math.max(t,s))}return t}(e),n=e.childCount,r=[],o=0,s=null,a=[];for(let e=0,o=t*n;e<o;e++)r[e]=0;for(let l=0,c=0;l<n;l++){let u=e.child(l);c++;for(let e=0;;e++){for(;o<r.length&&0!=r[o];)o++;if(e==u.childCount)break;let d=u.child(e),{colspan:p,rowspan:h,colwidth:f}=d.attrs;for(let e=0;e<h;e++){if(e+l>=n){(s||(s=[])).push({type:"overlong_rowspan",pos:c,n:h-e});break}let u=o+e*t;for(let e=0;e<p;e++){0==r[u+e]?r[u+e]=c:(s||(s=[])).push({type:"collision",row:l,pos:c,n:p-e});let n=f&&f[e];if(n){let r=(u+e)%t*2,o=a[r];null==o||o!=n&&1==a[r+1]?(a[r]=n,a[r+1]=1):o==n&&a[r+1]++}}}o+=p,c+=d.nodeSize}let d=(l+1)*t,p=0;for(;o<d;)0==r[o++]&&p++;p&&(s||(s=[])).push({type:"missing",row:l,n:p}),c++}(0===t||0===n)&&(s||(s=[])).push({type:"zero_sized"});let l=new p(t,n,r,s),c=!1;for(let e=0;!c&&e<a.length;e+=2)null!=a[e]&&a[e+1]<n&&(c=!0);return c&&function(e,t,n){!e.problems&&(e.problems=[]);let r={};for(let o=0;o<e.map.length;o++){let s=e.map[o];if(r[s])continue;r[s]=!0;let a=n.nodeAt(s);if(!a)throw RangeError(`No cell with offset ${s} found`);let l=null,c=a.attrs;for(let n=0;n<c.colspan;n++){let r=t[2*((o+n)%e.width)];null!=r&&(!c.colwidth||c.colwidth[n]!=r)&&((l||(l=function(e){if(e.colwidth)return e.colwidth.slice();let t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}(c)))[n]=r)}l&&e.problems.unshift({type:"colwidth mismatch",pos:s,colwidth:l})}}(l,a,e),l}(e))}};function h(e){let t=e.cached.tableNodeTypes;if(!t)for(let n in t=e.cached.tableNodeTypes={},e.nodes){let r=e.nodes[n],o=r.spec.tableRole;o&&(t[o]=r)}return t}var f=new a.H$("selectingCells");function m(e){for(let t=e.depth-1;t>0;t--)if("row"==e.node(t).type.spec.tableRole)return e.node(0).resolve(e.before(t+1));return null}function g(e){let t=e.selection.$head;for(let e=t.depth;e>0;e--)if("row"==t.node(e).type.spec.tableRole)return!0;return!1}function v(e){let t=e.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if("node"in t&&t.node&&"cell"==t.node.type.spec.tableRole)return t.$anchor;let n=m(t.$head)||function(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){let r=t.type.spec.tableRole;if("cell"==r||"header_cell"==r)return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){let r=t.type.spec.tableRole;if("cell"==r||"header_cell"==r)return e.doc.resolve(n-t.nodeSize)}}(t.$head);if(n)return n;throw RangeError(`No cell found around position ${t.head}`)}function b(e){return"row"==e.parent.type.spec.tableRole&&!!e.nodeAfter}function y(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function x(e,t,n){let r=e.node(-1),o=p.get(r),s=e.start(-1),a=o.nextCell(e.pos-s,t,n);return null==a?null:e.node(0).resolve(s+a)}function w(e,t,n=1){let r={...e,colspan:e.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),!r.colwidth.some(e=>e>0)&&(r.colwidth=null)),r}function S(e,t,n=1){let r={...e,colspan:e.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let e=0;e<n;e++)r.colwidth.splice(t,0,0)}return r}var k=class e extends a.Y1{constructor(e,t=e){let n=e.node(-1),r=p.get(n),o=e.start(-1),s=r.rectBetween(e.pos-o,t.pos-o),l=e.node(0),c=r.cellsInRect(s).filter(e=>e!=t.pos-o);c.unshift(t.pos-o);let u=c.map(e=>{let t=n.nodeAt(e);if(!t)throw RangeError(`No cell with offset ${e} found`);let r=o+e+1;return new a.xm(l.resolve(r),l.resolve(r+t.content.size))});super(u[0].$from,u[0].$to,u),this.$anchorCell=e,this.$headCell=t}map(t,n){let r=t.resolve(n.map(this.$anchorCell.pos)),o=t.resolve(n.map(this.$headCell.pos));if(b(r)&&b(o)&&y(r,o)){let t=this.$anchorCell.node(-1)!=r.node(-1);return t&&this.isRowSelection()?e.rowSelection(r,o):t&&this.isColSelection()?e.colSelection(r,o):new e(r,o)}return a.Bs.between(r,o)}content(){let e=this.$anchorCell.node(-1),t=p.get(e),n=this.$anchorCell.start(-1),r=t.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),o={},s=[];for(let n=r.top;n<r.bottom;n++){let a=[];for(let s=n*t.width+r.left,l=r.left;l<r.right;l++,s++){let n=t.map[s];if(o[n])continue;o[n]=!0;let l=t.findCell(n),c=e.nodeAt(n);if(!c)throw RangeError(`No cell with offset ${n} found`);let u=r.left-l.left,d=l.right-r.right;if(u>0||d>0){let e=c.attrs;if(u>0&&(e=w(e,0,u)),d>0&&(e=w(e,e.colspan-d,d)),l.left<r.left){if(!(c=c.type.createAndFill(e)))throw RangeError(`Could not create cell with attrs ${JSON.stringify(e)}`)}else c=c.type.create(e,c.content)}if(l.top<r.top||l.bottom>r.bottom){let e={...c.attrs,rowspan:Math.min(l.bottom,r.bottom)-Math.max(l.top,r.top)};c=l.top<r.top?c.type.createAndFill(e):c.type.create(e,c.content)}a.push(c)}s.push(e.child(n).copy(l.HY.from(a)))}let a=this.isColSelection()&&this.isRowSelection()?e:s;return new l.p2(l.HY.from(a),1,1)}replace(e,t=l.p2.empty){let n=e.steps.length,r=this.ranges;for(let o=0;o<r.length;o++){let{$from:s,$to:a}=r[o],c=e.mapping.slice(n);e.replace(c.map(s.pos),c.map(a.pos),o?l.p2.empty:t)}let o=a.Y1.findFrom(e.doc.resolve(e.mapping.slice(n).map(this.to)),-1);o&&e.setSelection(o)}replaceWith(e,t){this.replace(e,new l.p2(l.HY.from(t),0,0))}forEachCell(e){let t=this.$anchorCell.node(-1),n=p.get(t),r=this.$anchorCell.start(-1),o=n.cellsInRect(n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r));for(let n=0;n<o.length;n++)e(t.nodeAt(o[n]),r+o[n])}isColSelection(){let e=this.$anchorCell.index(-1),t=this.$headCell.index(-1);if(Math.min(e,t)>0)return!1;let n=e+this.$anchorCell.nodeAfter.attrs.rowspan;return Math.max(n,t+this.$headCell.nodeAfter.attrs.rowspan)==this.$headCell.node(-1).childCount}static colSelection(t,n=t){let r=t.node(-1),o=p.get(r),s=t.start(-1),a=o.findCell(t.pos-s),l=o.findCell(n.pos-s),c=t.node(0);return a.top<=l.top?(a.top>0&&(t=c.resolve(s+o.map[a.left])),l.bottom<o.height&&(n=c.resolve(s+o.map[o.width*(o.height-1)+l.right-1]))):(l.top>0&&(n=c.resolve(s+o.map[l.left])),a.bottom<o.height&&(t=c.resolve(s+o.map[o.width*(o.height-1)+a.right-1]))),new e(t,n)}isRowSelection(){let e=this.$anchorCell.node(-1),t=p.get(e),n=this.$anchorCell.start(-1),r=t.colCount(this.$anchorCell.pos-n),o=t.colCount(this.$headCell.pos-n);if(Math.min(r,o)>0)return!1;let s=r+this.$anchorCell.nodeAfter.attrs.colspan;return Math.max(s,o+this.$headCell.nodeAfter.attrs.colspan)==t.width}eq(t){return t instanceof e&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){let r=t.node(-1),o=p.get(r),s=t.start(-1),a=o.findCell(t.pos-s),l=o.findCell(n.pos-s),c=t.node(0);return a.left<=l.left?(a.left>0&&(t=c.resolve(s+o.map[a.top*o.width])),l.right<o.width&&(n=c.resolve(s+o.map[o.width*(l.top+1)-1]))):(l.left>0&&(n=c.resolve(s+o.map[l.top*o.width])),a.right<o.width&&(t=c.resolve(s+o.map[o.width*(a.top+1)-1]))),new e(t,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,n){return new e(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){return new e(t.resolve(n),t.resolve(r))}getBookmark(){return new A(this.$anchorCell.pos,this.$headCell.pos)}};k.prototype.visible=!1,a.Y1.jsonID("cell",k);var A=class e{constructor(e,t){this.anchor=e,this.head=t}map(t){return new e(t.map(this.anchor),t.map(this.head))}resolve(e){let t=e.resolve(this.anchor),n=e.resolve(this.head);return"row"==t.parent.type.spec.tableRole&&"row"==n.parent.type.spec.tableRole&&t.index()<t.parent.childCount&&n.index()<n.parent.childCount&&y(t,n)?new k(t,n):a.Y1.near(n,1)}};function C(e){if(!(e.selection instanceof k))return null;let t=[];return e.selection.forEachCell((e,n)=>{t.push(c.p.node(n,n+e.nodeSize,{class:"selectedCell"}))}),c.EH.create(e.doc,t)}var E=new a.H$("fix-tables");function T(e,t){let n;let r=(t,r)=>{"table"==t.type.spec.tableRole&&(n=function(e,t,n,r){let o,s;let a=p.get(t);if(!a.problems)return r;!r&&(r=e.tr);let l=[];for(let e=0;e<a.height;e++)l.push(0);for(let e=0;e<a.problems.length;e++){let o=a.problems[e];if("collision"==o.type){let e=t.nodeAt(o.pos);if(!e)continue;let s=e.attrs;for(let e=0;e<s.rowspan;e++)l[o.row+e]+=o.n;r.setNodeMarkup(r.mapping.map(n+1+o.pos),null,w(s,s.colspan-o.n,o.n))}else if("missing"==o.type)l[o.row]+=o.n;else if("overlong_rowspan"==o.type){let e=t.nodeAt(o.pos);if(!e)continue;r.setNodeMarkup(r.mapping.map(n+1+o.pos),null,{...e.attrs,rowspan:e.attrs.rowspan-o.n})}else if("colwidth mismatch"==o.type){let e=t.nodeAt(o.pos);if(!e)continue;r.setNodeMarkup(r.mapping.map(n+1+o.pos),null,{...e.attrs,colwidth:o.colwidth})}else if("zero_sized"==o.type){let e=r.mapping.map(n);r.delete(e,e+t.nodeSize)}}for(let e=0;e<l.length;e++)l[e]&&(null==o&&(o=e),s=e);for(let c=0,u=n+1;c<a.height;c++){let n=t.child(c),a=u+n.nodeSize,d=l[c];if(d>0){let t="cell";n.firstChild&&(t=n.firstChild.type.spec.tableRole);let l=[];for(let n=0;n<d;n++){let n=h(e.schema)[t].createAndFill();n&&l.push(n)}let p=(0==c||o==c-1)&&s==c?u+1:a-1;r.insert(r.mapping.map(p),l)}u=a}return r.setMeta(E,{fixTables:!0})}(e,t,r,n))};return t?t.doc!=e.doc&&!function e(t,n,r,o){let s=t.childCount,a=n.childCount;e:for(let l=0,c=0;l<a;l++){let a=n.child(l);for(let e=c,n=Math.min(s,l+3);e<n;e++)if(t.child(e)==a){c=e+1,r+=a.nodeSize;continue e}o(a,r),c<s&&t.child(c).sameMarkup(a)?e(t.child(c),a,r+1,o):a.nodesBetween(0,a.content.size,o,r+1),r+=a.nodeSize}}(t.doc,e.doc,0,r):e.doc.descendants(r),n}function _(e){let t=e.selection,n=v(e),r=n.node(-1),o=n.start(-1),s=p.get(r);return{...t instanceof k?s.rectBetween(t.$anchorCell.pos-o,t.$headCell.pos-o):s.findCell(n.pos-o),tableStart:o,map:s,table:r}}function O(e,{map:t,tableStart:n,table:r},o){let s=o>0?-1:0;(function(e,t,n){let r=h(t.type.schema).header_cell;for(let o=0;o<e.height;o++)if(t.nodeAt(e.map[n+o*e.width]).type!=r)return!1;return!0})(t,r,o+s)&&(s=0==o||o==t.width?null:0);for(let a=0;a<t.height;a++){let l=a*t.width+o;if(o>0&&o<t.width&&t.map[l-1]==t.map[l]){let s=t.map[l],c=r.nodeAt(s);e.setNodeMarkup(e.mapping.map(n+s),null,S(c.attrs,o-t.colCount(s))),a+=c.attrs.rowspan-1}else{let c=null==s?h(r.type.schema).cell:r.nodeAt(t.map[l+s]).type,u=t.positionAt(a,o,r);e.insert(e.mapping.map(n+u),c.createAndFill())}}return e}function M(e,{map:t,tableStart:n,table:r},o){var s;let a=n;for(let e=0;e<o;e++)a+=r.child(e).nodeSize;let l=[],c=o>0?-1:0;(function(e,t,n){var r;let o=h(t.type.schema).header_cell;for(let s=0;s<e.width;s++)if((null==(r=t.nodeAt(e.map[s+n*e.width]))?void 0:r.type)!=o)return!1;return!0})(t,r,o+c)&&(c=0==o||o==t.height?null:0);for(let a=0,u=t.width*o;a<t.width;a++,u++)if(o>0&&o<t.height&&t.map[u]==t.map[u-t.width]){let o=t.map[u],s=r.nodeAt(o).attrs;e.setNodeMarkup(n+o,null,{...s,rowspan:s.rowspan+1}),a+=s.colspan-1}else{let e=null==c?h(r.type.schema).cell:null==(s=r.nodeAt(t.map[u+c*t.width]))?void 0:s.type,n=null==e?void 0:e.createAndFill();n&&l.push(n)}return e.insert(a,h(r.type.schema).row.create(null,l)),e}function I(e){let t=e.content;return 1==t.childCount&&t.child(0).isTextblock&&0==t.child(0).childCount}function P(e,t){let n=e.selection;if(!(n instanceof k)||n.$anchorCell.pos==n.$headCell.pos)return!1;let r=_(e),{map:o}=r;if(function({width:e,height:t,map:n},r){let o=r.top*e+r.left,s=o,a=(r.bottom-1)*e+r.left,l=o+(r.right-r.left-1);for(let t=r.top;t<r.bottom;t++){if(r.left>0&&n[s]==n[s-1]||r.right<e&&n[l]==n[l+1])return!0;s+=e,l+=e}for(let s=r.left;s<r.right;s++){if(r.top>0&&n[o]==n[o-e]||r.bottom<t&&n[a]==n[a+e])return!0;o++,a++}return!1}(o,r))return!1;if(t){let n,s;let a=e.tr,c={},u=l.HY.empty;for(let e=r.top;e<r.bottom;e++)for(let t=r.left;t<r.right;t++){let l=o.map[e*o.width+t],d=r.table.nodeAt(l);if(!c[l]&&d){if(c[l]=!0,null==n)n=l,s=d;else{!I(d)&&(u=u.append(d.content));let e=a.mapping.map(l+r.tableStart);a.delete(e,e+d.nodeSize)}}}if(null==n||null==s)return!0;if(a.setNodeMarkup(n+r.tableStart,null,{...S(s.attrs,s.attrs.colspan,r.right-r.left-s.attrs.colspan),rowspan:r.bottom-r.top}),u.size){let e=n+1+s.content.size,t=I(s)?n+1:e;a.replaceWith(t+r.tableStart,e+r.tableStart,u)}a.setSelection(new k(a.doc.resolve(n+r.tableStart))),t(a)}return!0}function D(e,t){let n=h(e.schema);return(function(e){return(t,n)=>{var r;let o,s;let a=t.selection;if(a instanceof k){if(a.$anchorCell.pos!=a.$headCell.pos)return!1;o=a.$anchorCell.nodeAfter,s=a.$anchorCell.pos}else{if(!(o=function(e){for(let t=e.depth;t>0;t--){let n=e.node(t).type.spec.tableRole;if("cell"===n||"header_cell"===n)return e.node(t)}return null}(a.$from)))return!1;s=null==(r=m(a.$from))?void 0:r.pos}if(null==o||null==s||1==o.attrs.colspan&&1==o.attrs.rowspan)return!1;if(n){let r,l=o.attrs,c=[],u=l.colwidth;l.rowspan>1&&(l={...l,rowspan:1}),l.colspan>1&&(l={...l,colspan:1});let d=_(t),p=t.tr;for(let e=0;e<d.right-d.left;e++)c.push(u?{...l,colwidth:u&&u[e]?[u[e]]:null}:l);for(let t=d.top;t<d.bottom;t++){let n=d.map.positionAt(t,d.left,d.table);t==d.top&&(n+=o.nodeSize);for(let s=d.left,a=0;s<d.right;s++,a++)(s!=d.left||t!=d.top)&&p.insert(r=p.mapping.map(n+d.tableStart,1),e({node:o,row:t,col:s}).createAndFill(c[a]))}p.setNodeMarkup(s,e({node:o,row:d.top,col:d.left}),c[0]),a instanceof k&&p.setSelection(new k(p.doc.resolve(a.$anchorCell.pos),r?p.doc.resolve(r):void 0)),n(p)}return!0}})(({node:e})=>n[e.type.spec.tableRole])(e,t)}function N(e,t,n){let r=t.map.cellsInRect({left:0,top:0,right:"row"==e?t.map.width:1,bottom:"column"==e?t.map.height:1});for(let e=0;e<r.length;e++){let o=t.table.nodeAt(r[e]);if(o&&o.type!==n.header_cell)return!1}return!0}function R(e,t){if((t=t||{useDeprecatedLogic:!1}).useDeprecatedLogic){var n;return n=e,function(e,t){if(!g(e))return!1;if(t){let r=h(e.schema),o=_(e),s=e.tr,a=o.map.cellsInRect("column"==n?{left:o.left,top:0,right:o.right,bottom:o.map.height}:"row"==n?{left:0,top:o.top,right:o.map.width,bottom:o.bottom}:o),l=a.map(e=>o.table.nodeAt(e));for(let e=0;e<a.length;e++)l[e].type==r.header_cell&&s.setNodeMarkup(o.tableStart+a[e],r.cell,l[e].attrs);if(0==s.steps.length)for(let e=0;e<a.length;e++)s.setNodeMarkup(o.tableStart+a[e],r.header_cell,l[e].attrs);t(s)}return!0}}return function(t,n){if(!g(t))return!1;if(n){let r=h(t.schema),o=_(t),s=t.tr,a=N("row",o,r),l=N("column",o,r),c=("column"===e?a:"row"===e&&l)?1:0,u="column"==e?{left:0,top:c,right:1,bottom:o.map.height}:"row"==e?{left:c,top:0,right:o.map.width,bottom:1}:o,d="column"==e?l?r.cell:r.header_cell:"row"==e?a?r.cell:r.header_cell:r.cell;o.map.cellsInRect(u).forEach(e=>{let t=e+o.tableStart,n=s.doc.nodeAt(t);n&&s.setNodeMarkup(t,d,n.attrs)}),n(s)}return!0}}R("row",{useDeprecatedLogic:!0}),R("column",{useDeprecatedLogic:!0});var L=R("cell",{useDeprecatedLogic:!0});function j(e){return function(t,n){if(!g(t))return!1;let r=function(e,t){if(t<0){let t=e.nodeBefore;if(t)return e.pos-t.nodeSize;for(let t=e.index(-1)-1,n=e.before();t>=0;t--){let r=e.node(-1).child(t),o=r.lastChild;if(o)return n-1-o.nodeSize;n-=r.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;let t=e.node(-1);for(let n=e.indexAfter(-1),r=e.after();n<t.childCount;n++){let e=t.child(n);if(e.childCount)return r+1;r+=e.nodeSize}}return null}(v(t),e);if(null==r)return!1;if(n){var o;let e=t.doc.resolve(r);n(t.tr.setSelection(a.Bs.between(e,(o=e).node(0).resolve(o.pos+o.nodeAfter.nodeSize))).scrollIntoView())}return!0}}function $(e,t){let n=e.selection;if(!(n instanceof k))return!1;if(t){let r=e.tr,o=h(e.schema).cell.createAndFill().content;n.forEachCell((e,t)=>{!e.content.eq(o)&&r.replace(r.mapping.map(t+1),r.mapping.map(t+e.nodeSize-1),new l.p2(o,0,0))}),r.docChanged&&t(r)}return!0}function F(e,t){let n=e.createAndFill();return new d.wx(n).replace(0,n.content.size,t).doc}function z(e,t,n,r,o,s,a,l){if(0==a||a==t.height)return!1;let c=!1;for(let u=o;u<s;u++){let o=a*t.width+u,s=t.map[o];if(t.map[o-t.width]==s){c=!0;let o=n.nodeAt(s),{top:d,left:p}=t.findCell(s);e.setNodeMarkup(e.mapping.slice(l).map(s+r),null,{...o.attrs,rowspan:a-d}),e.insert(e.mapping.slice(l).map(t.positionAt(a,p,n)),o.type.createAndFill({...o.attrs,rowspan:d+o.attrs.rowspan-a})),u+=o.attrs.colspan-1}}return c}function B(e,t,n,r,o,s,a,l){if(0==a||a==t.width)return!1;let c=!1;for(let u=o;u<s;u++){let o=u*t.width+a,s=t.map[o];if(t.map[o-1]==s){c=!0;let o=n.nodeAt(s),d=t.colCount(s),p=e.mapping.slice(l).map(s+r);e.setNodeMarkup(p,null,w(o.attrs,a-d,o.attrs.colspan-(a-d))),e.insert(p+o.nodeSize,o.type.createAndFill(w(o.attrs,0,a-d))),u+=o.attrs.rowspan-1}}return c}function H(e,t,n,r,o){let s=n?e.doc.nodeAt(n-1):e.doc;if(!s)throw Error("No table found");let a=p.get(s),{top:c,left:u}=r,d=u+o.width,f=c+o.height,m=e.tr,g=0;function v(){if(!(s=n?m.doc.nodeAt(n-1):m.doc))throw Error("No table found");a=p.get(s),g=m.mapping.maps.length}(function(e,t,n,r,o,s,a){let c,u;let d=h(e.doc.type.schema);if(o>t.width)for(let s=0,l=0;s<t.height;s++){let p;let h=n.child(s);l+=h.nodeSize;let f=[];p=null==h.lastChild||h.lastChild.type==d.cell?c||(c=d.cell.createAndFill()):u||(u=d.header_cell.createAndFill());for(let e=t.width;e<o;e++)f.push(p);e.insert(e.mapping.slice(a).map(l-1+r),f)}if(s>t.height){let p=[];for(let e=0,r=(t.height-1)*t.width;e<Math.max(t.width,o);e++){let o=!(e>=t.width)&&n.nodeAt(t.map[r+e]).type==d.header_cell;p.push(o?u||(u=d.header_cell.createAndFill()):c||(c=d.cell.createAndFill()))}let h=d.row.create(null,l.HY.from(p)),f=[];for(let e=t.height;e<s;e++)f.push(h);e.insert(e.mapping.slice(a).map(r+n.nodeSize-2),f)}return!!(c||u)})(m,a,s,n,d,f,0)&&v(),z(m,a,s,n,u,d,c,g)&&v(),z(m,a,s,n,u,d,f,g)&&v(),B(m,a,s,n,c,f,u,g)&&v(),B(m,a,s,n,c,f,d,g)&&v();for(let e=c;e<f;e++){let t=a.positionAt(e,u,s),r=a.positionAt(e,d,s);m.replace(m.mapping.slice(g).map(t+n),m.mapping.slice(g).map(r+n),new l.p2(o.rows[e-c],0,0))}v(),m.setSelection(new k(m.doc.resolve(n+a.positionAt(c,u,s)),m.doc.resolve(n+a.positionAt(f-1,d-1,s)))),t(m)}var U=(0,u.$)({ArrowLeft:q("horiz",-1),ArrowRight:q("horiz",1),ArrowUp:q("vert",-1),ArrowDown:q("vert",1),"Shift-ArrowLeft":W("horiz",-1),"Shift-ArrowRight":W("horiz",1),"Shift-ArrowUp":W("vert",-1),"Shift-ArrowDown":W("vert",1),Backspace:$,"Mod-Backspace":$,Delete:$,"Mod-Delete":$});function V(e,t,n){return!n.eq(e.selection)&&(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function q(e,t){return(n,r,o)=>{if(!o)return!1;let s=n.selection;if(s instanceof k)return V(n,r,a.Y1.near(s.$headCell,t));if("horiz"!=e&&!s.empty)return!1;let l=Z(o,e,t);if(null==l)return!1;if("horiz"==e)return V(n,r,a.Y1.near(n.doc.resolve(s.head+t),t));{let o;let s=n.doc.resolve(l),c=x(s,e,t);return o=c?a.Y1.near(c,1):t<0?a.Y1.near(n.doc.resolve(s.before(-1)),-1):a.Y1.near(n.doc.resolve(s.after(-1)),1),V(n,r,o)}}}function W(e,t){return(n,r,o)=>{let s;if(!o)return!1;let a=n.selection;if(a instanceof k)s=a;else{let r=Z(o,e,t);if(null==r)return!1;s=new k(n.doc.resolve(r))}let l=x(s.$headCell,e,t);return!!l&&V(n,r,new k(s.$anchorCell,l))}}function G(e,t){let n=m(e.state.doc.resolve(t));return!!n&&(e.dispatch(e.state.tr.setSelection(new k(n))),!0)}function K(e,t,n){if(!g(e.state))return!1;let r=function(e){if(!e.size)return null;let{content:t,openStart:n,openEnd:r}=e;for(;1==t.childCount&&(n>0&&r>0||"table"==t.child(0).type.spec.tableRole);)n--,r--,t=t.child(0).content;let o=t.child(0),s=o.type.spec.tableRole,a=o.type.schema,c=[];if("row"==s)for(let e=0;e<t.childCount;e++){let o=t.child(e).content,s=e?0:Math.max(0,n-1),u=e<t.childCount-1?0:Math.max(0,r-1);(s||u)&&(o=F(h(a).row,new l.p2(o,s,u)).content),c.push(o)}else{if("cell"!=s&&"header_cell"!=s)return null;c.push(n||r?F(h(a).row,new l.p2(t,n,r)).content:t)}return function(e,t){let n=[];for(let e=0;e<t.length;e++){let r=t[e];for(let t=r.childCount-1;t>=0;t--){let{rowspan:o,colspan:s}=r.child(t).attrs;for(let t=e;t<e+o;t++)n[t]=(n[t]||0)+s}}let r=0;for(let e=0;e<n.length;e++)r=Math.max(r,n[e]);for(let o=0;o<n.length;o++)if(o>=t.length&&t.push(l.HY.empty),n[o]<r){let s=h(e).cell.createAndFill(),a=[];for(let e=n[o];e<r;e++)a.push(s);t[o]=t[o].append(l.HY.from(a))}return{height:t.length,width:r,rows:t}}(a,c)}(n),o=e.state.selection;if(o instanceof k){!r&&(r={width:1,height:1,rows:[l.HY.from(F(h(e.state.schema).cell,n))]});let t=o.$anchorCell.node(-1),s=o.$anchorCell.start(-1),a=p.get(t).rectBetween(o.$anchorCell.pos-s,o.$headCell.pos-s);return r=function({width:e,height:t,rows:n},r,o){if(e!=r){let t=[],o=[];for(let e=0;e<n.length;e++){let s=n[e],a=[];for(let n=t[e]||0,o=0;n<r;o++){let l=s.child(o%s.childCount);n+l.attrs.colspan>r&&(l=l.type.createChecked(w(l.attrs,l.attrs.colspan,n+l.attrs.colspan-r),l.content)),a.push(l),n+=l.attrs.colspan;for(let n=1;n<l.attrs.rowspan;n++)t[e+n]=(t[e+n]||0)+l.attrs.colspan}o.push(l.HY.from(a))}n=o,e=r}if(t!=o){let e=[];for(let r=0,s=0;r<o;r++,s++){let a=[],c=n[s%t];for(let e=0;e<c.childCount;e++){let t=c.child(e);r+t.attrs.rowspan>o&&(t=t.type.create({...t.attrs,rowspan:Math.max(1,o-t.attrs.rowspan)},t.content)),a.push(t)}e.push(l.HY.from(a))}n=e,t=o}return{width:e,height:t,rows:n}}(r,a.right-a.left,a.bottom-a.top),H(e.state,e.dispatch,s,a,r),!0}if(!r)return!1;{let t=v(e.state),n=t.start(-1);return H(e.state,e.dispatch,n,p.get(t.node(-1)).findCell(t.pos-n),r),!0}}function Y(e,t){var n;let r;if(t.ctrlKey||t.metaKey)return;let o=J(e,t.target);if(t.shiftKey&&e.state.selection instanceof k)s(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&o&&null!=(r=m(e.state.selection.$anchor))&&(null==(n=X(e,t))?void 0:n.pos)!=r.pos)s(r,t),t.preventDefault();else if(!o)return;function s(t,n){let r=X(e,n),o=null==f.getState(e.state);if(!r||!y(t,r)){if(!o)return;r=t}let s=new k(t,r);if(o||!e.state.selection.eq(s)){let n=e.state.tr.setSelection(s);o&&n.setMeta(f,t.pos),e.dispatch(n)}}function a(){e.root.removeEventListener("mouseup",a),e.root.removeEventListener("dragstart",a),e.root.removeEventListener("mousemove",l),null!=f.getState(e.state)&&e.dispatch(e.state.tr.setMeta(f,-1))}function l(n){let r;let l=f.getState(e.state);if(null!=l)r=e.state.doc.resolve(l);else if(J(e,n.target)!=o&&!(r=X(e,t)))return a();r&&s(r,n)}e.root.addEventListener("mouseup",a),e.root.addEventListener("dragstart",a),e.root.addEventListener("mousemove",l)}function Z(e,t,n){if(!(e.state.selection instanceof a.Bs))return null;let{$head:r}=e.state.selection;for(let o=r.depth-1;o>=0;o--){let s=r.node(o);if((n<0?r.index(o):r.indexAfter(o))!=(n<0?0:s.childCount))break;if("cell"==s.type.spec.tableRole||"header_cell"==s.type.spec.tableRole){let s=r.before(o),a="vert"==t?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(a)?s:null}}return null}function J(e,t){for(;t&&t!=e.dom;t=t.parentNode)if("TD"==t.nodeName||"TH"==t.nodeName)return t;return null}function X(e,t){let n=e.posAtCoords({left:t.clientX,top:t.clientY});return n?n?m(e.state.doc.resolve(n.pos)):null:null}var Q=class{constructor(e,t){this.node=e,this.defaultCellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${t}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),ee(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type==this.node.type&&(this.node=e,ee(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return"attributes"==e.type&&(e.target==this.table||this.colgroup.contains(e.target))}};function ee(e,t,n,r,o,s){var a;let l=0,c=!0,u=t.firstChild,d=e.firstChild;if(d){for(let e=0,n=0;e<d.childCount;e++){let{colspan:a,colwidth:p}=d.child(e).attrs;for(let e=0;e<a;e++,n++){let a=o==n?s:p&&p[e],d=a?a+"px":"";if(l+=a||r,!a&&(c=!1),u)u.style.width!=d&&(u.style.width=d),u=u.nextSibling;else{let e=document.createElement("col");e.style.width=d,t.appendChild(e)}}}for(;u;){let e=u.nextSibling;null==(a=u.parentNode)||a.removeChild(u),u=e}c?(n.style.width=l+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=l+"px")}}var et=new a.H$("tableColumnResizing"),en=class e{constructor(e,t){this.activeHandle=e,this.dragging=t}apply(t){let n=t.getMeta(et);if(n&&null!=n.setHandle)return new e(n.setHandle,!1);if(n&&void 0!==n.setDragging)return new e(this.activeHandle,n.setDragging);if(this.activeHandle>-1&&t.docChanged){let n=t.mapping.map(this.activeHandle,-1);return!b(t.doc.resolve(n))&&(n=-1),new e(n,this.dragging)}return this}};function er(e,t,n,r){let o=e.posAtCoords({left:t.clientX+("right"==n?-r:r),top:t.clientY});if(!o)return -1;let{pos:s}=o,a=m(e.state.doc.resolve(s));if(!a)return -1;if("right"==n)return a.pos;let l=p.get(a.node(-1)),c=a.start(-1),u=l.map.indexOf(a.pos-c);return u%l.width==0?-1:c+l.map[u-1]}function ei(e,t,n){let r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function eo(e,t){e.dispatch(e.state.tr.setMeta(et,{setHandle:t}))}function es(e,t,n,r){let o=e.state.doc.resolve(t),s=o.node(-1),a=o.start(-1),l=p.get(s).colCount(o.pos-a)+o.nodeAfter.attrs.colspan-1,c=e.domAtPos(o.start(-1)).node;for(;c&&"TABLE"!=c.nodeName;)c=c.parentNode;c&&ee(s,c.firstChild,c,r,l,n)}function ea(e,t){return t?["width",`${Math.max(t,e)}px`]:["min-width",`${e}px`]}function el(e,t,n,r,o,s){var a;let l=0,c=!0,u=t.firstChild,d=e.firstChild;if(null!==d)for(let e=0,n=0;e<d.childCount;e+=1){let{colspan:a,colwidth:p}=d.child(e).attrs;for(let e=0;e<a;e+=1,n+=1){let a=o===n?s:p&&p[e],d=a?`${a}px`:"";if(l+=a||r,!a&&(c=!1),u){if(u.style.width!==d){let[e,t]=ea(r,a);u.style.setProperty(e,t)}u=u.nextSibling}else{let e=document.createElement("col"),[n,o]=ea(r,a);e.style.setProperty(n,o),t.appendChild(e)}}}for(;u;){let e=u.nextSibling;null===(a=u.parentNode)||void 0===a||a.removeChild(u),u=e}c?(n.style.width=`${l}px`,n.style.minWidth=""):(n.style.width="",n.style.minWidth=`${l}px`)}class ec{constructor(e,t){this.node=e,this.cellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),el(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type===this.node.type&&(this.node=e,el(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return"attributes"===e.type&&(e.target===this.table||this.colgroup.contains(e.target))}}function eu(e,t){return t?e.createChecked(null,t):e.createAndFill()}let ed=({editor:e})=>{let{selection:t}=e.state;if(!(t instanceof k))return!1;let n=0,r=(0,s.qv)(t.ranges[0].$from,e=>"table"===e.type.name);return null==r||r.node.descendants(e=>{if("table"===e.type.name)return!1;["tableCell","tableHeader"].includes(e.type.name)&&(n+=1)}),n===t.ranges.length&&(e.commands.deleteTable(),!0)},ep=s.NB.create({name:"table",addOptions:()=>({HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:ec,lastColumnResizable:!0,allowTableNodeSelection:!1}),content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML:()=>[{tag:"table"}],renderHTML({node:e,HTMLAttributes:t}){let{colgroup:n,tableWidth:r,tableMinWidth:o}=function(e,t,n,r){let o=0,s=!0,a=[],l=e.firstChild;if(!l)return{};for(let e=0,n=0;e<l.childCount;e+=1){let{colspan:r,colwidth:c}=l.child(e).attrs;for(let e=0;e<r;e+=1,n+=1){let r=void 0===n?void 0:c&&c[e];o+=r||t,!r&&(s=!1);let[l,u]=ea(t,r);a.push(["col",{style:`${l}: ${u}`}])}}let c=s?`${o}px`:"";return{colgroup:["colgroup",{},...a],tableWidth:c,tableMinWidth:s?"":`${o}px`}}(e,this.options.cellMinWidth);return["table",(0,s.P1)(this.options.HTMLAttributes,t,{style:r?`width: ${r}`:`min-width: ${o}`}),n,["tbody",0]]},addCommands:()=>({insertTable:({rows:e=3,cols:t=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:o,editor:s})=>{let l=function(e,t,n,r,o){let s=function(e){if(e.cached.tableNodeTypes)return e.cached.tableNodeTypes;let t={};return Object.keys(e.nodes).forEach(n=>{let r=e.nodes[n];r.spec.tableRole&&(t[r.spec.tableRole]=r)}),e.cached.tableNodeTypes=t,t}(e),a=[],l=[];for(let e=0;e<n;e+=1){let e=eu(s.cell,void 0);if(e&&l.push(e),r){let e=eu(s.header_cell,o);e&&a.push(e)}}let c=[];for(let e=0;e<t;e+=1)c.push(s.row.createChecked(null,r&&0===e?a:l));return s.table.createChecked(null,c)}(s.schema,e,t,n);if(o){let e=r.selection.from+1;r.replaceSelectionWith(l).scrollIntoView().setSelection(a.Bs.near(r.doc.resolve(e)))}return!0},addColumnBefore:()=>({state:e,dispatch:t})=>(function(e,t){if(!g(e))return!1;if(t){let n=_(e);t(O(e.tr,n,n.left))}return!0})(e,t),addColumnAfter:()=>({state:e,dispatch:t})=>(function(e,t){if(!g(e))return!1;if(t){let n=_(e);t(O(e.tr,n,n.right))}return!0})(e,t),deleteColumn:()=>({state:e,dispatch:t})=>(function(e,t){if(!g(e))return!1;if(t){let n=_(e),r=e.tr;if(0==n.left&&n.right==n.map.width)return!1;for(let e=n.right-1;!function(e,{map:t,table:n,tableStart:r},o){let s=e.mapping.maps.length;for(let a=0;a<t.height;){let l=a*t.width+o,c=t.map[l],u=n.nodeAt(c),d=u.attrs;if(o>0&&t.map[l-1]==c||o<t.width-1&&t.map[l+1]==c)e.setNodeMarkup(e.mapping.slice(s).map(r+c),null,w(d,o-t.colCount(c)));else{let t=e.mapping.slice(s).map(r+c);e.delete(t,t+u.nodeSize)}a+=d.rowspan}}(r,n,e),e!=n.left;e--){;let e=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!e)throw RangeError("No table found");n.table=e,n.map=p.get(e)}t(r)}return!0})(e,t),addRowBefore:()=>({state:e,dispatch:t})=>(function(e,t){if(!g(e))return!1;if(t){let n=_(e);t(M(e.tr,n,n.top))}return!0})(e,t),addRowAfter:()=>({state:e,dispatch:t})=>(function(e,t){if(!g(e))return!1;if(t){let n=_(e);t(M(e.tr,n,n.bottom))}return!0})(e,t),deleteRow:()=>({state:e,dispatch:t})=>(function(e,t){if(!g(e))return!1;if(t){let n=_(e),r=e.tr;if(0==n.top&&n.bottom==n.map.height)return!1;for(let e=n.bottom-1;!function(e,{map:t,table:n,tableStart:r},o){let s=0;for(let e=0;e<o;e++)s+=n.child(e).nodeSize;let a=s+n.child(o).nodeSize,l=e.mapping.maps.length;e.delete(s+r,a+r);let c=new Set;for(let s=0,a=o*t.width;s<t.width;s++,a++){let u=t.map[a];if(!c.has(u)){if(c.add(u),o>0&&u==t.map[a-t.width]){let t=n.nodeAt(u).attrs;e.setNodeMarkup(e.mapping.slice(l).map(u+r),null,{...t,rowspan:t.rowspan-1}),s+=t.colspan-1}else if(o<t.height&&u==t.map[a+t.width]){let a=n.nodeAt(u),c=a.attrs,d=a.type.create({...c,rowspan:a.attrs.rowspan-1},a.content),p=t.positionAt(o+1,s,n);e.insert(e.mapping.slice(l).map(r+p),d),s+=c.colspan-1}}}}(r,n,e),e!=n.top;e--){;let e=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!e)throw RangeError("No table found");n.table=e,n.map=p.get(n.table)}t(r)}return!0})(e,t),deleteTable:()=>({state:e,dispatch:t})=>(function(e,t){let n=e.selection.$anchor;for(let r=n.depth;r>0;r--)if("table"==n.node(r).type.spec.tableRole)return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1})(e,t),mergeCells:()=>({state:e,dispatch:t})=>P(e,t),splitCell:()=>({state:e,dispatch:t})=>D(e,t),toggleHeaderColumn:()=>({state:e,dispatch:t})=>R("column")(e,t),toggleHeaderRow:()=>({state:e,dispatch:t})=>R("row")(e,t),toggleHeaderCell:()=>({state:e,dispatch:t})=>L(e,t),mergeOrSplit:()=>({state:e,dispatch:t})=>!!P(e,t)||D(e,t),setCellAttribute:(e,t)=>({state:n,dispatch:r})=>{var o,s;return(o=e,s=t,function(e,t){if(!g(e))return!1;let n=v(e);if(n.nodeAfter.attrs[o]===s)return!1;if(t){let r=e.tr;e.selection instanceof k?e.selection.forEachCell((e,t)=>{e.attrs[o]!==s&&r.setNodeMarkup(t,null,{...e.attrs,[o]:s})}):r.setNodeMarkup(n.pos,null,{...n.nodeAfter.attrs,[o]:s}),t(r)}return!0})(n,r)},goToNextCell:()=>({state:e,dispatch:t})=>j(1)(e,t),goToPreviousCell:()=>({state:e,dispatch:t})=>j(-1)(e,t),fixTables:()=>({state:e,dispatch:t})=>(t&&T(e),!0),setCellSelection:e=>({tr:t,dispatch:n})=>{if(n){let n=k.create(t.doc,e.anchorCell,e.headCell);t.setSelection(n)}return!0}}),addKeyboardShortcuts(){return{Tab:()=>!!this.editor.commands.goToNextCell()||!!this.editor.can().addRowAfter()&&this.editor.chain().addRowAfter().goToNextCell().run(),"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:ed,"Mod-Backspace":ed,Delete:ed,"Mod-Delete":ed}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[function({handleWidth:e=5,cellMinWidth:t=25,defaultCellMinWidth:n=100,View:r=Q,lastColumnResizable:o=!0}={}){let s=new a.Sy({key:et,state:{init(e,t){var o,a;let l=null==(a=null==(o=s.spec)?void 0:o.props)?void 0:a.nodeViews,c=h(t.schema).table.name;return r&&l&&(l[c]=(e,t)=>new r(e,n,t)),new en(-1,!1)},apply:(e,t)=>t.apply(e)},props:{attributes:e=>{let t=et.getState(e);return t&&t.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(t,n)=>{(function(e,t,n,r){if(!e.editable)return;let o=et.getState(e.state);if(o&&!o.dragging){let s=function(e){for(;e&&"TD"!=e.nodeName&&"TH"!=e.nodeName;)e=e.classList&&e.classList.contains("ProseMirror")?null:e.parentNode;return e}(t.target),a=-1;if(s){let{left:r,right:o}=s.getBoundingClientRect();t.clientX-r<=n?a=er(e,t,"left",n):o-t.clientX<=n&&(a=er(e,t,"right",n))}if(a!=o.activeHandle){if(!r&&-1!==a){let t=e.state.doc.resolve(a),n=t.node(-1),r=p.get(n),o=t.start(-1);if(r.colCount(t.pos-o)+t.nodeAfter.attrs.colspan-1==r.width-1)return}eo(e,a)}}})(t,n,e,o)},mouseleave:e=>{(function(e){if(!e.editable)return;let t=et.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&eo(e,-1)})(e)},mousedown:(e,r)=>{(function(e,t,n,r){var o;if(!e.editable)return;let s=null!=(o=e.dom.ownerDocument.defaultView)?o:window,a=et.getState(e.state);if(!a||-1==a.activeHandle||a.dragging)return;let l=e.state.doc.nodeAt(a.activeHandle),c=function(e,t,{colspan:n,colwidth:r}){let o=r&&r[r.length-1];if(o)return o;let s=e.domAtPos(t),a=s.node.childNodes[s.offset].offsetWidth,l=n;if(r)for(let e=0;e<n;e++)r[e]&&(a-=r[e],l--);return a/l}(e,a.activeHandle,l.attrs);function u(t){s.removeEventListener("mouseup",u),s.removeEventListener("mousemove",d);let r=et.getState(e.state);(null==r?void 0:r.dragging)&&(function(e,t,n){let r=e.state.doc.resolve(t),o=r.node(-1),s=p.get(o),a=r.start(-1),l=s.colCount(r.pos-a)+r.nodeAfter.attrs.colspan-1,c=e.state.tr;for(let e=0;e<s.height;e++){let t=e*s.width+l;if(e&&s.map[t]==s.map[t-s.width])continue;let r=s.map[t],u=o.nodeAt(r).attrs,d=1==u.colspan?0:l-s.colCount(r);if(u.colwidth&&u.colwidth[d]==n)continue;let p=u.colwidth?u.colwidth.slice():function(e){return Array(e).fill(0)}(u.colspan);p[d]=n,c.setNodeMarkup(a+r,null,{...u,colwidth:p})}c.docChanged&&e.dispatch(c)}(e,r.activeHandle,ei(r.dragging,t,n)),e.dispatch(e.state.tr.setMeta(et,{setDragging:null})))}function d(t){if(!t.which)return u(t);let o=et.getState(e.state);if(o&&o.dragging){let s=ei(o.dragging,t,n);es(e,o.activeHandle,s,r)}}e.dispatch(e.state.tr.setMeta(et,{setDragging:{startX:t.clientX,startWidth:c}})),es(e,a.activeHandle,c,r),s.addEventListener("mouseup",u),s.addEventListener("mousemove",d),t.preventDefault()})(e,r,t,n)}},decorations:e=>{let t=et.getState(e);if(t&&t.activeHandle>-1)return function(e,t){var n;let r=[],o=e.doc.resolve(t),s=o.node(-1);if(!s)return c.EH.empty;let a=p.get(s),l=o.start(-1),u=a.colCount(o.pos-l)+o.nodeAfter.attrs.colspan-1;for(let t=0;t<a.height;t++){let o=u+t*a.width;if((u==a.width-1||a.map[o]!=a.map[o+1])&&(0==t||a.map[o]!=a.map[o-a.width])){let t=a.map[o],u=l+t+s.nodeAt(t).nodeSize-1,d=document.createElement("div");d.className="column-resize-handle",(null==(n=et.getState(e))?void 0:n.dragging)&&r.push(c.p.node(l+t,l+t+s.nodeAt(t).nodeSize,{class:"column-resize-dragging"})),r.push(c.p.widget(u,d))}}return c.EH.create(e.doc,r)}(e,t.activeHandle)},nodeViews:{}}});return s}({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],function({allowTableNodeSelection:e=!1}={}){return new a.Sy({key:f,state:{init:()=>null,apply(e,t){let n=e.getMeta(f);if(null!=n)return -1==n?null:n;if(null==t||!e.docChanged)return t;let{deleted:r,pos:o}=e.mapping.mapResult(t);return r?null:o}},props:{decorations:C,handleDOMEvents:{mousedown:Y},createSelectionBetween:e=>null!=f.getState(e.state)?e.state.selection:null,handleTripleClick:G,handleKeyDown:U,handlePaste:K},appendTransaction:(t,n,r)=>(function(e,t,n){let r,o;let s=(t||e).selection,l=(t||e).doc;if(s instanceof a.qv&&(o=s.node.type.spec.tableRole)){if("cell"==o||"header_cell"==o)r=k.create(l,s.from);else if("row"==o){let e=l.resolve(s.from+1);r=k.rowSelection(e,e)}else if(!n){let e=p.get(s.node),t=s.from+1,n=t+e.map[e.width*e.height-1];r=k.create(l,t+1,n)}}else s instanceof a.Bs&&function({$from:e,$to:t}){if(e.pos==t.pos||e.pos<t.pos-6)return!1;let n=e.pos,r=t.pos,o=e.depth;for(;o>=0&&!(e.after(o+1)<e.end(o));o--,n++);for(let e=t.depth;e>=0&&!(t.before(e+1)>t.start(e));e--,r--);return n==r&&/row|table/.test(e.node(o).type.spec.tableRole)}(s)?r=a.Bs.create(l,s.from):s instanceof a.Bs&&function({$from:e,$to:t}){let n,r;for(let t=e.depth;t>0;t--){let r=e.node(t);if("cell"===r.type.spec.tableRole||"header_cell"===r.type.spec.tableRole){n=r;break}}for(let e=t.depth;e>0;e--){let n=t.node(e);if("cell"===n.type.spec.tableRole||"header_cell"===n.type.spec.tableRole){r=n;break}}return n!==r&&0===t.parentOffset}(s)&&(r=a.Bs.create(l,s.$from.start(),s.$from.end()));return r&&(t||(t=e.tr)).setSelection(r),t})(r,T(r,n),e)})}({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(e){let t={name:e.name,options:e.options,storage:e.storage};return{tableRole:(0,s.nU)((0,s.Nl)(e,"tableRole",t))}}})},707291:function(e,t,n){"use strict";n.d(t,{jE:function(){return T},kg:function(){return v}});var r,o,s,a=n(455069),l=n(921463),c=n(453203),u={exports:{}},d={};u.exports=function(){if(o)return d;o=1;var e="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},t=a.useState,n=a.useEffect,r=a.useLayoutEffect,s=a.useDebugValue;function l(t){var n=t.getSnapshot;t=t.value;try{var r=n();return!e(t,r)}catch(e){return!0}}var c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,o){var a=o(),c=t({inst:{value:a,getSnapshot:o}}),u=c[0].inst,d=c[1];return r(function(){u.value=a,u.getSnapshot=o,l(u)&&d({inst:u})},[e,a,o]),n(function(){return l(u)&&d({inst:u}),e(function(){l(u)&&d({inst:u})})},[e]),s(a),a};return d.useSyncExternalStore=void 0!==a.useSyncExternalStore?a.useSyncExternalStore:c,d}();var p=u.exports;let h=(...e)=>t=>{e.forEach(e=>{"function"==typeof e?e(t):e&&(e.current=t)})},f=({contentComponent:e})=>{let t=p.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getServerSnapshot);return a.createElement(a.Fragment,null,Object.values(t))};class m extends a.Component{constructor(e){var t;super(e),this.editorContentRef=a.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!(null===(t=e.editor)||void 0===t?void 0:t.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){let e=this.props.editor;if(e&&!e.isDestroyed&&e.options.element){if(e.contentComponent)return;let t=this.editorContentRef.current;t.append(...e.options.element.childNodes),e.setOptions({element:t}),e.contentComponent=function(){let e=new Set,t={};return{subscribe:t=>(e.add(t),()=>{e.delete(t)}),getSnapshot:()=>t,getServerSnapshot:()=>t,setRenderer(n,r){t={...t,[n]:l.createPortal(r.reactElement,r.element,n)},e.forEach(e=>e())},removeRenderer(n){let r={...t};delete r[n],t=r,e.forEach(e=>e())}}}(),!this.state.hasContentComponentInitialized&&(this.unsubscribeToContentComponent=e.contentComponent.subscribe(()=>{this.setState(e=>e.hasContentComponentInitialized?e:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),e.createNodeViews(),this.initialized=!0}}componentWillUnmount(){let e=this.props.editor;if(!e)return;if(this.initialized=!1,!e.isDestroyed&&e.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),e.contentComponent=null,!e.options.element.firstChild)return;let t=document.createElement("div");t.append(...e.options.element.childNodes),e.setOptions({element:t})}render(){let{editor:e,innerRef:t,...n}=this.props;return a.createElement(a.Fragment,null,a.createElement("div",{ref:h(t,this.editorContentRef),...n}),(null==e?void 0:e.contentComponent)&&a.createElement(f,{contentComponent:e.contentComponent}))}}let g=(0,a.forwardRef)((e,t)=>{let n=a.useMemo(()=>Math.floor(0xffffffff*Math.random()).toString(),[e.editor]);return a.createElement(m,{key:n,innerRef:t,...e})}),v=a.memo(g);var b=(r=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(o=r;0!=o--;)if(!e(t[o],n[o]))return!1;return!0}if(t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(o of t.entries())if(!n.has(o[0]))return!1;for(o of t.entries())if(!e(o[1],n.get(o[0])))return!1;return!0}if(t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;for(o of t.entries())if(!n.has(o[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(n)){if((r=t.length)!=n.length)return!1;for(o=r;0!=o--;)if(t[o]!==n[o])return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(s=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(o=r;0!=o--;)if(!Object.prototype.hasOwnProperty.call(n,s[o]))return!1;for(o=r;0!=o--;){var r,o,s,a=s[o];if("_owner"!==a||!t.$$typeof){if(!e(t[a],n[a]))return!1}}return!0}return t!=t&&n!=n},r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default"))?r.default:r,y={exports:{}},x={};y.exports=function(){if(s)return x;s=1;var e="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},t=p.useSyncExternalStore,n=a.useRef,r=a.useEffect,o=a.useMemo,l=a.useDebugValue;return x.useSyncExternalStoreWithSelector=function(s,a,c,u,d){var p=n(null);if(null===p.current){var h={hasValue:!1,value:null};p.current=h}else h=p.current;var f=t(s,(p=o(function(){function t(t){if(!o){if(o=!0,n=t,t=u(t),void 0!==d&&h.hasValue){var s=h.value;if(d(s,t))return r=s}return r=t}if(s=r,e(n,t))return s;var a=u(t);return void 0!==d&&d(s,a)?s:(n=t,r=a)}var n,r,o=!1,s=void 0===c?null:c;return[function(){return t(a())},null===s?void 0:function(){return t(s())}]},[a,c,u,d]))[0],p[1]);return r(function(){h.hasValue=!0,h.value=f},[f]),l(f),f},x}();var w=y.exports;let S="undefined"!=typeof window?a.useLayoutEffect:a.useEffect;class k{constructor(e){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=e,this.lastSnapshot={editor:e,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}watch(e){if(this.editor=e,this.editor){let e=()=>{this.transactionNumber+=1,this.subscribers.forEach(e=>e())},t=this.editor;return t.on("transaction",e),()=>{t.off("transaction",e)}}}}let A="undefined"==typeof window,C=A||!!("undefined"!=typeof window&&window.next);class E{constructor(e){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=e,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(e=>e())}getInitialEditor(){if(void 0===this.options.current.immediatelyRender)return A||C?null:this.createEditor();this.options.current.immediatelyRender;return this.options.current.immediatelyRender?this.createEditor():null}createEditor(){let e={...this.options.current,onBeforeCreate:(...e)=>{var t,n;return null===(n=(t=this.options.current).onBeforeCreate)||void 0===n?void 0:n.call(t,...e)},onBlur:(...e)=>{var t,n;return null===(n=(t=this.options.current).onBlur)||void 0===n?void 0:n.call(t,...e)},onCreate:(...e)=>{var t,n;return null===(n=(t=this.options.current).onCreate)||void 0===n?void 0:n.call(t,...e)},onDestroy:(...e)=>{var t,n;return null===(n=(t=this.options.current).onDestroy)||void 0===n?void 0:n.call(t,...e)},onFocus:(...e)=>{var t,n;return null===(n=(t=this.options.current).onFocus)||void 0===n?void 0:n.call(t,...e)},onSelectionUpdate:(...e)=>{var t,n;return null===(n=(t=this.options.current).onSelectionUpdate)||void 0===n?void 0:n.call(t,...e)},onTransaction:(...e)=>{var t,n;return null===(n=(t=this.options.current).onTransaction)||void 0===n?void 0:n.call(t,...e)},onUpdate:(...e)=>{var t,n;return null===(n=(t=this.options.current).onUpdate)||void 0===n?void 0:n.call(t,...e)},onContentError:(...e)=>{var t,n;return null===(n=(t=this.options.current).onContentError)||void 0===n?void 0:n.call(t,...e)},onDrop:(...e)=>{var t,n;return null===(n=(t=this.options.current).onDrop)||void 0===n?void 0:n.call(t,...e)},onPaste:(...e)=>{var t,n;return null===(n=(t=this.options.current).onPaste)||void 0===n?void 0:n.call(t,...e)}};return new c.ML(e)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(e){return this.subscriptions.add(e),()=>{this.subscriptions.delete(e)}}static compareOptions(e,t){return Object.keys(e).every(n=>{if(["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(n))return!0;if("extensions"===n&&e.extensions&&t.extensions)return e.extensions.length===t.extensions.length&&e.extensions.every((e,n)=>{var r;return e===(null===(r=t.extensions)||void 0===r?void 0:r[n])&&!0});return e[n]===t[n]&&!0})}onRender(e){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&0===e.length?!E.compareOptions(this.options.current,this.editor.options)&&this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(e),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){if(null===this.previousDeps){this.previousDeps=e;return}if(this.previousDeps.length===e.length&&this.previousDeps.every((t,n)=>t===e[n]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=e}scheduleDestroy(){let e=this.instanceId,t=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===e){t&&t.setOptions(this.options.current);return}t&&!t.isDestroyed&&(t.destroy(),this.instanceId===e&&this.setEditor(null))},1)}}function T(e={},t=[]){let n=(0,a.useRef)(e);n.current=e;let[r]=(0,a.useState)(()=>new E(n)),o=p.useSyncExternalStore(r.subscribe,r.getEditor,r.getServerSnapshot);return(0,a.useDebugValue)(o),(0,a.useEffect)(r.onRender(t)),!function(e){var t;let[n]=(0,a.useState)(()=>new k(e.editor)),r=w.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getServerSnapshot,e.selector,null!==(t=e.equalityFn)&&void 0!==t?t:b);S(()=>n.watch(e.editor),[e.editor,n]),(0,a.useDebugValue)(r)}({editor:o,selector:({transactionNumber:t})=>!1===e.shouldRerenderOnTransaction?null:e.immediatelyRender&&0===t?0:t+1}),o}(0,a.createContext)({editor:null}).Consumer;let _=(0,a.createContext)({onDragStart:void 0}),O=()=>(0,a.useContext)(_);a.forwardRef((e,t)=>{let{onDragStart:n}=O(),r=e.as||"div";return a.createElement(r,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...e.style}})})},724830:function(e,t,n){"use strict";n.d(t,{Z:()=>eb});var r=n("453203");let o=/^\s*>\s$/,s=r.NB.create({name:"blockquote",addOptions:()=>({HTMLAttributes:{}}),content:"block+",group:"block",defining:!0,parseHTML:()=>[{tag:"blockquote"}],renderHTML({HTMLAttributes:e}){return["blockquote",(0,r.P1)(this.options.HTMLAttributes,e),0]},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[(0,r.S0)({find:o,type:this.type})]}}),a=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,l=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,c=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,u=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,d=r.vc.create({name:"bold",addOptions:()=>({HTMLAttributes:{}}),parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:e=>"normal"!==e.style.fontWeight&&null},{style:"font-weight=400",clearMark:e=>e.type.name===this.name},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return["strong",(0,r.P1)(this.options.HTMLAttributes,e),0]},addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[(0,r.Cf)({find:a,type:this.type}),(0,r.Cf)({find:c,type:this.type})]},addPasteRules(){return[(0,r.K9)({find:l,type:this.type}),(0,r.K9)({find:u,type:this.type})]}}),p="textStyle",h=/^\s*([-+*])\s$/,f=r.NB.create({name:"bulletList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML:()=>[{tag:"ul"}],renderHTML({HTMLAttributes:e}){return["ul",(0,r.P1)(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes("listItem",this.editor.getAttributes(p)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=(0,r.S0)({find:h,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=(0,r.S0)({find:h,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(p),editor:this.editor})),[e]}}),m=/(^|[^`])`([^`]+)`(?!`)/,g=/(^|[^`])`([^`]+)`(?!`)/g,v=r.vc.create({name:"code",addOptions:()=>({HTMLAttributes:{}}),excludes:"_",code:!0,exitable:!0,parseHTML:()=>[{tag:"code"}],renderHTML({HTMLAttributes:e}){return["code",(0,r.P1)(this.options.HTMLAttributes,e),0]},addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[(0,r.Cf)({find:m,type:this.type})]},addPasteRules(){return[(0,r.K9)({find:g,type:this.type})]}});var b=n("871738");let y=/^```([a-z]+)?[\s\n]$/,x=/^~~~([a-z]+)?[\s\n]$/,w=r.NB.create({name:"codeBlock",addOptions:()=>({languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,HTMLAttributes:{}}),content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:e=>{var t;let{languageClassPrefix:n}=this.options,r=[...(null===(t=e.firstElementChild)||void 0===t?void 0:t.classList)||[]].filter(e=>e.startsWith(n)).map(e=>e.replace(n,""))[0];return r?r:null},rendered:!1}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML({node:e,HTMLAttributes:t}){return["pre",(0,r.P1)(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{let{empty:e,$anchor:t}=this.editor.state.selection,n=1===t.pos;return!!e&&t.parent.type.name===this.name&&(!!n||!t.parent.textContent.length)&&this.editor.commands.clearNodes()},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;let{state:t}=e,{selection:n}=t,{$from:r,empty:o}=n;if(!o||r.parent.type!==this.type)return!1;let s=r.parentOffset===r.parent.nodeSize-2,a=r.parent.textContent.endsWith("\n\n");return!!s&&!!a&&e.chain().command(({tr:e})=>(e.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;let{state:t}=e,{selection:n,doc:r}=t,{$from:o,empty:s}=n;if(!s||o.parent.type!==this.type||o.parentOffset!==o.parent.nodeSize-2)return!1;let a=o.after();return void 0!==a&&(r.nodeAt(a)?e.commands.command(({tr:e})=>(e.setSelection(b.Y1.near(r.resolve(a))),!0)):e.commands.exitCode())}}},addInputRules(){return[(0,r.zK)({find:y,type:this.type,getAttributes:e=>({language:e[1]})}),(0,r.zK)({find:x,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new b.Sy({key:new b.H$("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;let n=t.clipboardData.getData("text/plain"),r=t.clipboardData.getData("vscode-editor-data"),o=r?JSON.parse(r):void 0,s=null==o?void 0:o.mode;if(!n||!s)return!1;let{tr:a,schema:l}=e.state,c=l.text(n.replace(/\r\n?/g,"\n"));return a.replaceSelectionWith(this.type.create({language:s},c)),a.selection.$from.parent.type!==this.type&&a.setSelection(b.Bs.near(a.doc.resolve(Math.max(0,a.selection.from-2)))),a.setMeta("paste",!0),e.dispatch(a),!0}}})]}}),S=r.NB.create({name:"doc",topNode:!0,content:"block+"});var k=n("240554");class A{constructor(e,t){var n;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=null!==(n=t.width)&&void 0!==n?n:1,this.color=!1===t.color?void 0:t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map(t=>{let n=e=>{this[t](e)};return e.dom.addEventListener(t,n),{name:t,handler:n}})}destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){null!=this.cursorPos&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,null==e?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e,t,n=this.editorView.state.doc.resolve(this.cursorPos),r=!n.parent.inlineContent,o,s=this.editorView.dom,a=s.getBoundingClientRect(),l=a.width/s.offsetWidth,c=a.height/s.offsetHeight;if(r){let e=n.nodeBefore,t=n.nodeAfter;if(e||t){let n=this.editorView.nodeDOM(this.cursorPos-(e?e.nodeSize:0));if(n){let r=n.getBoundingClientRect(),s=e?r.bottom:r.top;e&&t&&(s=(s+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let a=this.width/2*c;o={left:r.left,right:r.right,top:s-a,bottom:s+a}}}}if(!o){let e=this.editorView.coordsAtPos(this.cursorPos),t=this.width/2*l;o={left:e.left-t,right:e.left+t,top:e.top,bottom:e.bottom}}let u=this.editorView.dom.offsetParent;if(!this.element&&(this.element=u.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",r),this.element.classList.toggle("prosemirror-dropcursor-inline",!r),u&&(u!=document.body||"static"!=getComputedStyle(u).position)){let n=u.getBoundingClientRect(),r=n.width/u.offsetWidth,o=n.height/u.offsetHeight;e=n.left-u.scrollLeft*r,t=n.top-u.scrollTop*o}else e=-pageXOffset,t=-pageYOffset;this.element.style.left=(o.left-e)/l+"px",this.element.style.top=(o.top-t)/c+"px",this.element.style.width=(o.right-o.left)/l+"px",this.element.style.height=(o.bottom-o.top)/c+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),r=n&&n.type.spec.disableDropCursor,o="function"==typeof r?r(this.editorView,t,e):r;if(t&&!o){let e=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let t=(0,k.nj)(this.editorView.state.doc,e,this.editorView.dragging.slice);null!=t&&(e=t)}this.setCursor(e),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){!this.editorView.dom.contains(e.relatedTarget)&&this.setCursor(null)}}let C=r.hj.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[function(e={}){return new b.Sy({view:t=>new A(t,e)})}(this.options)]}});var E=n("132308"),T=n("153737"),_=n("661763");class O extends b.Y1{constructor(e){super(e,e)}map(e,t){let n=e.resolve(t.map(this.head));return O.valid(n)?new O(n):b.Y1.near(n)}content(){return T.p2.empty}eq(e){return e instanceof O&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if("number"!=typeof t.pos)throw RangeError("Invalid input for GapCursor.fromJSON");return new O(e.resolve(t.pos))}getBookmark(){return new M(this.anchor)}static valid(e){let t=e.parent;if(t.isTextblock||!function(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(0==n){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n-1);;e=e.lastChild){if(0==e.childCount&&!e.inlineContent||e.isAtom||e.type.spec.isolating)return!0;if(e.inlineContent)return!1}}return!0}(e)||!function(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n);;e=e.firstChild){if(0==e.childCount&&!e.inlineContent||e.isAtom||e.type.spec.isolating)return!0;if(e.inlineContent)return!1}}return!0}(e))return!1;let n=t.type.spec.allowGapCursor;if(null!=n)return n;let r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(e,t,n=!1){t:for(;;){if(!n&&O.valid(e))return e;let r=e.pos,o=null;for(let n=e.depth;;n--){let s=e.node(n);if(t>0?e.indexAfter(n)<s.childCount:e.index(n)>0){o=s.child(t>0?e.indexAfter(n):e.index(n)-1);break}if(0==n)return null;r+=t;let a=e.doc.resolve(r);if(O.valid(a))return a}for(;;){let s=t>0?o.firstChild:o.lastChild;if(!s){if(o.isAtom&&!o.isText&&!b.qv.isSelectable(o)){e=e.doc.resolve(r+o.nodeSize*t),n=!1;continue t}break}o=s,r+=t;let a=e.doc.resolve(r);if(O.valid(a))return a}return null}}}O.prototype.visible=!1,O.findFrom=O.findGapCursorFrom,b.Y1.jsonID("gapcursor",O);class M{constructor(e){this.pos=e}map(e){return new M(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return O.valid(t)?new O(t):b.Y1.near(t)}}let I=(0,E.$)({ArrowLeft:P("horiz",-1),ArrowRight:P("horiz",1),ArrowUp:P("vert",-1),ArrowDown:P("vert",1)});function P(e,t){let n="vert"==e?t>0?"down":"up":t>0?"right":"left";return function(e,r,o){let s=e.selection,a=t>0?s.$to:s.$from,l=s.empty;if(s instanceof b.Bs){if(!o.endOfTextblock(n)||0==a.depth)return!1;l=!1,a=e.doc.resolve(t>0?a.after():a.before())}let c=O.findGapCursorFrom(a,t,l);return!!c&&(r&&r(e.tr.setSelection(new O(c))),!0)}}function D(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!O.valid(r))return!1;let o=e.posAtCoords({left:n.clientX,top:n.clientY});return!(o&&o.inside>-1&&b.qv.isSelectable(e.state.doc.nodeAt(o.inside)))&&(e.dispatch(e.state.tr.setSelection(new O(r))),!0)}function N(e,t){if("insertCompositionText"!=t.inputType||!(e.state.selection instanceof O))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let o=T.HY.empty;for(let e=r.length-1;e>=0;e--)o=T.HY.from(r[e].createAndFill(null,o));let s=e.state.tr.replace(n.pos,n.pos,new T.p2(o,0,0));return s.setSelection(b.Bs.near(s.doc.resolve(n.pos+1))),e.dispatch(s),!1}function R(e){if(!(e.selection instanceof O))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",_.EH.create(e.doc,[_.p.widget(e.selection.head,t,{key:"gapcursor"})])}let L=r.hj.create({name:"gapCursor",addProseMirrorPlugins:()=>[new b.Sy({props:{decorations:R,createSelectionBetween:(e,t,n)=>t.pos==n.pos&&O.valid(n)?new O(n):null,handleClick:D,handleKeyDown:I,handleDOMEvents:{beforeinput:N}}})],extendNodeSchema(e){var t;let n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:null!==(t=(0,r.nU)((0,r.Nl)(e,"allowGapCursor",n)))&&void 0!==t?t:null}}}),j=r.NB.create({name:"hardBreak",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML:()=>[{tag:"br"}],renderHTML({HTMLAttributes:e}){return["br",(0,r.P1)(this.options.HTMLAttributes,e)]},renderText:()=>"\n",addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{let{selection:e,storedMarks:o}=n;if(e.$from.parent.type.spec.isolating)return!1;let{keepMarks:s}=this.options,{splittableMarks:a}=r.extensionManager,l=o||e.$to.parentOffset&&e.$from.marks();return t().insertContent({type:this.name}).command(({tr:e,dispatch:t})=>{if(t&&l&&s){let t=l.filter(e=>a.includes(e.type.name));e.ensureMarks(t)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),$=r.NB.create({name:"heading",addOptions:()=>({levels:[1,2,3,4,5,6],HTMLAttributes:{}}),content:"inline*",group:"block",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML(){return this.options.levels.map(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){let n=this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0];return[`h${n}`,(0,r.P1)(this.options.HTMLAttributes,t),0]},addCommands(){return{setHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.setNode(this.name,e),toggleHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(e=>(0,r.zK)({find:RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}});var F=function(){};F.prototype.append=function(e){return e.length?(e=F.from(e),!this.length&&e||e.length<200&&this.leafAppend(e)||this.length<200&&e.leafPrepend(this)||this.appendInner(e)):this},F.prototype.prepend=function(e){return e.length?F.from(e).append(this):this},F.prototype.appendInner=function(e){return new B(this,e)},F.prototype.slice=function(e,t){return(void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t)?F.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},F.prototype.get=function(e){if(!(e<0)&&!(e>=this.length))return this.getInner(e)},F.prototype.forEach=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},F.prototype.map=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length);var r=[];return this.forEach(function(t,n){return r.push(e(t,n))},t,n),r},F.from=function(e){return e instanceof F?e:e&&e.length?new z(e):F.empty};var z=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return 0==e&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var o=t;o<n;o++)if(!1===e(this.values[o],r+o))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var o=t-1;o>=n;o--)if(!1===e(this.values[o],r+o))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=200)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=200)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(F);F.empty=new z([]);var B=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var o=this.left.length;if(t<o&&!1===this.left.forEachInner(e,t,Math.min(n,o),r)||n>o&&!1===this.right.forEachInner(e,Math.max(t-o,0),Math.min(this.length,n)-o,r+o))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){var o=this.left.length;if(t>o&&!1===this.right.forEachInvertedInner(e,t-o,Math.max(n,o)-o,r+o)||n<o&&!1===this.left.forEachInvertedInner(e,Math.min(t,o),n,r))return!1},t.prototype.sliceInner=function(e,t){if(0==e&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(F);class H{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){let n,r,o,s;if(0==this.eventCount)return null;let a=this.items.length;for(;;a--)if(this.items.get(a-1).selection){--a;break}t&&(r=(n=this.remapping(a,this.items.length)).maps.length);let l=e.tr,c=[],u=[];return this.items.forEach((e,t)=>{if(!e.step){!n&&(r=(n=this.remapping(a,t+1)).maps.length),r--,u.push(e);return}if(n){u.push(new U(e.map));let t=e.step.map(n.slice(r)),o;t&&l.maybeStep(t).doc&&(o=l.mapping.maps[l.mapping.maps.length-1],c.push(new U(o,void 0,void 0,c.length+u.length))),r--,o&&n.appendMap(o,r)}else l.maybeStep(e.step);if(e.selection)return o=n?e.selection.map(n.slice(r)):e.selection,s=new H(this.items.slice(0,a).append(u.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:s,transform:l,selection:o}}addTransform(e,t,n,r){let o=[],s=this.eventCount,a=this.items,l=!r&&a.length?a.get(a.length-1):null;for(let n=0;n<e.steps.length;n++){let c=e.steps[n].invert(e.docs[n]),u=new U(e.mapping.maps[n],c,t),d;(d=l&&l.merge(u))&&(u=d,n?o.pop():a=a.slice(0,a.length-1)),o.push(u),t&&(s++,t=void 0),!r&&(l=u)}let c=s-n.depth;return c>q&&(a=function(e,t){let n;return e.forEach((e,r)=>{if(e.selection&&0==t--)return n=r,!1}),e.slice(n)}(a,c),s-=c),new H(a.append(o),s)}remapping(e,t){let n=new k.vs;return this.items.forEach((t,r)=>{let o=null!=t.mirrorOffset&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,o)},e,t),n}addMaps(e){return 0==this.eventCount?this:new H(this.items.append(e.map(e=>new U(e))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],r=Math.max(0,this.items.length-t),o=e.mapping,s=e.steps.length,a=this.eventCount;this.items.forEach(e=>{e.selection&&a--},r);let l=t;this.items.forEach(t=>{let r=o.getMirror(--l);if(null==r)return;s=Math.min(s,r);let c=o.maps[r];if(t.step){let s=e.steps[r].invert(e.docs[r]),u=t.selection&&t.selection.map(o.slice(l+1,r));u&&a++,n.push(new U(c,s,u))}else n.push(new U(c))},r);let c=[];for(let e=t;e<s;e++)c.push(new U(o.maps[e]));let u=new H(this.items.slice(0,r).append(c).append(n),a);return u.emptyItemCount()>500&&(u=u.compress(this.items.length-n.length)),u}emptyItemCount(){let e=0;return this.items.forEach(t=>{!t.step&&e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),n=t.maps.length,r=[],o=0;return this.items.forEach((s,a)=>{if(a>=e)r.push(s),s.selection&&o++;else if(s.step){let e=s.step.map(t.slice(n)),a=e&&e.getMap();if(n--,a&&t.appendMap(a,n),e){let l=s.selection&&s.selection.map(t.slice(n));l&&o++;let c=new U(a.invert(),e,l),u,d=r.length-1;(u=r.length&&r[d].merge(c))?r[d]=u:r.push(c)}}else s.map&&n--},this.items.length,0),new H(F.from(r.reverse()),o)}}H.empty=new H(F.empty,0);class U{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new U(t.getMap().invert(),t,this.selection)}}}class V{constructor(e,t,n,r,o){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r,this.prevComposition=o}}let q=20;function W(e){let t=[];for(let n=e.length-1;n>=0&&0==t.length;n--)e[n].forEach((e,n,r,o)=>t.push(r,o));return t}function G(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let o=t.map(e[r],1),s=t.map(e[r+1],-1);o<=s&&n.push(o,s)}return n}let K=!1,Y=null;function Z(e){let t=e.plugins;if(Y!=t){K=!1,Y=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){K=!0;break}}return K}let J=new b.H$("history"),X=new b.H$("closeHistory");function Q(e,t){return(n,r)=>{let o=J.getState(n);if(!o||0==(e?o.undone:o.done).eventCount)return!1;if(r){let s=function(e,t,n){let r=Z(t),o=J.get(t).spec.config,s=(n?e.undone:e.done).popEvent(t,r);if(!s)return null;let a=s.selection.resolve(s.transform.doc),l=(n?e.done:e.undone).addTransform(s.transform,t.selection.getBookmark(),o,r),c=new V(n?l:s.remaining,n?s.remaining:l,null,0,-1);return s.transform.setSelection(a).setMeta(J,{redo:n,historyState:c})}(o,n,e);s&&r(t?s.scrollIntoView():s)}return!0}}let ee=Q(!1,!0),et=Q(!0,!0);Q(!1,!1),Q(!0,!1);let en=r.hj.create({name:"history",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:e,dispatch:t})=>ee(e,t),redo:()=>({state:e,dispatch:t})=>et(e,t)}),addProseMirrorPlugins(){return[function(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new b.Sy({key:J,state:{init:()=>new V(H.empty,H.empty,null,0,-1),apply:(t,n,r)=>(function(e,t,n,r){let o=n.getMeta(J),s;if(o)return o.historyState;n.getMeta(X)&&(e=new V(e.done,e.undone,null,0,-1));let a=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(a&&a.getMeta(J))return a.getMeta(J).redo?new V(e.done.addTransform(n,void 0,r,Z(t)),e.undone,W(n.mapping.maps),e.prevTime,e.prevComposition):new V(e.done,e.undone.addTransform(n,void 0,r,Z(t)),null,e.prevTime,e.prevComposition);if(!1===n.getMeta("addToHistory")||a&&!1===a.getMeta("addToHistory")){if(s=n.getMeta("rebased"))return new V(e.done.rebased(n,s),e.undone.rebased(n,s),G(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);else return new V(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),G(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}else{let o=n.getMeta("composition"),s=0==e.prevTime||!a&&e.prevComposition!=o&&(e.prevTime<(n.time||0)-r.newGroupDelay||!function(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((e,r)=>{for(let o=0;o<t.length;o+=2)e<=t[o+1]&&r>=t[o]&&(n=!0)}),n}(n,e.prevRanges)),l=a?G(e.prevRanges,n.mapping):W(n.mapping.maps);return new V(e.done.addTransform(n,s?t.selection.getBookmark():void 0,r,Z(t)),H.empty,l,n.time,null==o?e.prevComposition:o)}})(n,r,t,e)},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r="historyUndo"==n?ee:"historyRedo"==n?et:null;return!!r&&(t.preventDefault(),r(e.state,e.dispatch))}}}})}(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),er=r.NB.create({name:"horizontalRule",addOptions:()=>({HTMLAttributes:{}}),group:"block",parseHTML:()=>[{tag:"hr"}],renderHTML({HTMLAttributes:e}){return["hr",(0,r.P1)(this.options.HTMLAttributes,e)]},addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{let{selection:n}=t,{$from:o,$to:s}=n,a=e();return 0===o.parentOffset?a.insertContentAt({from:Math.max(o.pos-1,0),to:s.pos},{type:this.name}):(0,r.EG)(n)?a.insertContentAt(s.pos,{type:this.name}):a.insertContent({type:this.name}),a.command(({tr:e,dispatch:t})=>{var n;if(t){let{$to:t}=e.selection,r=t.end();if(t.nodeAfter)t.nodeAfter.isTextblock?e.setSelection(b.Bs.create(e.doc,t.pos+1)):t.nodeAfter.isBlock?e.setSelection(b.qv.create(e.doc,t.pos)):e.setSelection(b.Bs.create(e.doc,t.pos));else{let o=null===(n=t.parent.type.contentMatch.defaultType)||void 0===n?void 0:n.create();o&&(e.insert(r,o),e.setSelection(b.Bs.create(e.doc,r+1)))}e.scrollIntoView()}return!0}).run()}}},addInputRules(){return[(0,r.x2)({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),ei=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,eo=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,es=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,ea=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,el=r.vc.create({name:"italic",addOptions:()=>({HTMLAttributes:{}}),parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:e=>"normal"!==e.style.fontStyle&&null},{style:"font-style=normal",clearMark:e=>e.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",(0,r.P1)(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[(0,r.Cf)({find:ei,type:this.type}),(0,r.Cf)({find:es,type:this.type})]},addPasteRules(){return[(0,r.K9)({find:eo,type:this.type}),(0,r.K9)({find:ea,type:this.type})]}}),ec=r.NB.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:e}){return["li",(0,r.P1)(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),eu="textStyle",ed=/^(\d+)\.\s$/,ep=r.NB.create({name:"orderedList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes:()=>({start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1},type:{default:null,parseHTML:e=>e.getAttribute("type")}}),parseHTML:()=>[{tag:"ol"}],renderHTML({HTMLAttributes:e}){let{start:t,...n}=e;return 1===t?["ol",(0,r.P1)(this.options.HTMLAttributes,n),0]:["ol",(0,r.P1)(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes("listItem",this.editor.getAttributes(eu)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=(0,r.S0)({find:ed,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=(0,r.S0)({find:ed,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(eu)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[e]}}),eh=r.NB.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:e}){return["p",(0,r.P1)(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),ef=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,em=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,eg=r.vc.create({name:"strike",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>!!e.includes("line-through")&&{}}],renderHTML({HTMLAttributes:e}){return["s",(0,r.P1)(this.options.HTMLAttributes,e),0]},addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[(0,r.Cf)({find:ef,type:this.type})]},addPasteRules(){return[(0,r.K9)({find:em,type:this.type})]}}),ev=r.NB.create({name:"text",group:"inline"}),eb=r.hj.create({name:"starterKit",addExtensions(){let e=[];return!1!==this.options.bold&&e.push(d.configure(this.options.bold)),!1!==this.options.blockquote&&e.push(s.configure(this.options.blockquote)),!1!==this.options.bulletList&&e.push(f.configure(this.options.bulletList)),!1!==this.options.code&&e.push(v.configure(this.options.code)),!1!==this.options.codeBlock&&e.push(w.configure(this.options.codeBlock)),!1!==this.options.document&&e.push(S.configure(this.options.document)),!1!==this.options.dropcursor&&e.push(C.configure(this.options.dropcursor)),!1!==this.options.gapcursor&&e.push(L.configure(this.options.gapcursor)),!1!==this.options.hardBreak&&e.push(j.configure(this.options.hardBreak)),!1!==this.options.heading&&e.push($.configure(this.options.heading)),!1!==this.options.history&&e.push(en.configure(this.options.history)),!1!==this.options.horizontalRule&&e.push(er.configure(this.options.horizontalRule)),!1!==this.options.italic&&e.push(el.configure(this.options.italic)),!1!==this.options.listItem&&e.push(ec.configure(this.options.listItem)),!1!==this.options.orderedList&&e.push(ep.configure(this.options.orderedList)),!1!==this.options.paragraph&&e.push(eh.configure(this.options.paragraph)),!1!==this.options.strike&&e.push(eg.configure(this.options.strike)),!1!==this.options.text&&e.push(ev.configure(this.options.text)),e}})},794748:function(e,t,n){"use strict";n.d(t,{Z:function(){return E}});var r,o,s,a,l,c,u,d,p=n(913693),h=n(249294),f=e=>{throw TypeError(e)},m=(e,t,n)=>t.has(e)||f("Cannot "+n),g=(e,t,n)=>(m(e,t,"read from private field"),n?n.call(e):t.get(e)),v=(e,t,n)=>t.has(e)?f("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),b=(e,t,n,r)=>(m(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),y=(e,t,n)=>(m(e,t,"access private method"),n),x=class e{constructor(e=[]){this.contents=[],this.contents=e}has(e){return this.contents.some(t=>t.from===e.from&&t.to===e.to)}add(e){this.contents.push(e),this.contents.sort((e,t)=>e.from-t.from)}between(e,t,n){for(let r of this.contents)r.to>=e&&r.from<=t&&n(r)}applyChanges(t){if(t.empty)return this;let n=[];for(let e of this.contents)!1===t.touchesRange(0,e.to)&&n.push({from:t.mapPos(e.from,1),to:t.mapPos(e.to,-1),tokens:e.tokens});return new e(n)}},w={},S=p.r$.define({combine:function(e){return e[e.length-1]}}),k=p.Py.define(),A=p.Py.define(),C=h.lg.fromClass((d=class{constructor(e){v(this,c),this.decorations=h.p.none,v(this,r,""),v(this,o,""),v(this,s,null),v(this,a,null),v(this,l,new x);let t=e.state.facet(S);if(!t)return;b(this,r,t.language),b(this,o,t.theme),t.highlighter instanceof Promise?t.highlighter.then(t=>{b(this,s,t),e.dispatch({effects:k.of(null)})}):(b(this,s,t.highlighter),e.dispatch({effects:k.of(null)}))}update(e){if(!g(this,s))return;let t=e.view.state.facet(S);if(!t)return;let{language:n,theme:d}=t,f=n!==g(this,r)||d!==g(this,o),m=e.transactions.some(e=>e.effects.some(e=>e.is(k))),v=e.transactions.some(e=>e.effects.some(e=>e.is(A)));if(e.docChanged&&(this.decorations=this.decorations.map(e.changes)),(m||f||e.viewportChanged||e.viewportMoved||e.docChanged)&&(b(this,r,n),b(this,o,d),b(this,l,g(this,l).applyChanges(e.changes)),g(this,a)&&g(this,a).abort(),b(this,a,new AbortController),y(this,c,u).call(this,{update:e,highlighter:g(this,s),language:n,theme:d,signal:g(this,a).signal})),v){let t=e.view.viewport;this.decorations=function(e,t,n){let r=new p.f_;for(let o of e.contents){if(!(o.to<t)&&!(o.from>n))o.tokens.forEach(e=>{if(!!e.color)try{var t;r.add(o.from+e.offset,o.from+e.offset+e.content.length,(!w[t=e.color]&&(w[t]=h.p.mark({attributes:{style:`color: ${t};`}})),w[t]))}catch(e){}})}return r.finish()}(g(this,l),t.from,t.to)}}},r=new WeakMap,o=new WeakMap,s=new WeakMap,a=new WeakMap,l=new WeakMap,c=new WeakSet,u=async function({update:e,highlighter:t,language:n,theme:r,signal:o}){var s;let a;let{to:c}=e.view.viewport,u=e.state.doc.lineAt(c);for(let c=1;c<=u.number;c++){let u=e.state.doc.line(c);if(0===u.length)continue;(null==(s=globalThis.scheduler)?void 0:s.yield)&&await globalThis.scheduler.yield();let{tokens:d,grammarState:p}=function(e,t,n,r,o){var s;let a=t.codeToTokens(e,{lang:n,theme:r,grammarState:o});return{tokens:null!=(s=a.tokens[0])?s:[],grammarState:a.grammarState}}(u.text,t,n,r,a);if(a=p,o.aborted)return;let h={from:u.from,to:u.to,tokens:d};!g(this,l).has(h)&&g(this,l).add(h)}e.view.dispatch({effects:A.of(null)})},d),{decorations:e=>e.decorations}),E=function(e){return[S.of(e),C]}},903574:function(e,t,n){"use strict";function r(){var e=arguments[0];"string"==typeof e&&(e=document.createElement(e));var t=1,n=arguments[1];if(n&&"object"==typeof n&&null==n.nodeType&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var o=n[r];"string"==typeof o?e.setAttribute(r,o):null!=o&&(e[r]=o)}t++}for(;t<arguments.length;t++)(function e(t,n){if("string"==typeof n)t.appendChild(document.createTextNode(n));else if(null==n);else if(null!=n.nodeType)t.appendChild(n);else if(Array.isArray(n))for(var r=0;r<n.length;r++)e(t,n[r]);else throw RangeError("Unsupported child node: "+n)})(e,arguments[t]);return e}n.d(t,{Z:function(){return r}})},796099:function(e,t,n){"use strict";n.d(t,{Z:()=>R});var r=function(e,t,n,r){var o=-1,s=null==e?0:e.length;for(r&&s&&(n=e[++o]);++o<s;)n=t(n,e[o],o,e);return n},o=n("66069"),s=(0,o.Z)({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),a=n("192180"),l=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,c=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),u=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,d=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,p="\ud800-\udfff",h="\\u2700-\\u27bf",f="a-z\\xdf-\\xf6\\xf8-\\xff",m="A-Z\\xc0-\\xd6\\xd8-\\xde",g="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",v="['’]",b="["+g+"]",y="["+f+"]",x="[^"+p+g+"\\d+"+h+f+m+"]",w="(?:\ud83c[\udde6-\uddff]){2}",S="[\ud800-\udbff][\udc00-\udfff]",k="["+m+"]",A="(?:"+y+"|"+x+")",C="(?:"+k+"|"+x+")",E="(?:"+v+"(?:d|ll|m|re|s|t|ve))?",T="(?:"+v+"(?:D|LL|M|RE|S|T|VE))?",_="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\ud83c[\udffb-\udfff])?",O="[\\ufe0e\\ufe0f]?",M="(?:\\u200d(?:"+["[^"+p+"]",w,S].join("|")+")"+O+_+")*",I="(?:"+["["+h+"]",w,S].join("|")+")"+(O+_+M),P=RegExp([k+"?"+y+"+"+E+"(?="+[b,k,"$"].join("|")+")",C+"+"+T+"(?="+[b,k+A,"$"].join("|")+")",k+"?"+A+"+"+E,k+"+"+T,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])","\\d+",I].join("|"),"g"),D=function(e,t,n){if(e=(0,a.Z)(e),void 0===(t=n?void 0:t)){var r;return(r=e,d.test(r))?e.match(P)||[]:e.match(u)||[]}return e.match(t)||[]},N=RegExp("['’]","g"),R=function(e){return function(t){var n;return r(D((n=t,(n=(0,a.Z)(n))&&n.replace(l,s).replace(c,"")).replace(N,"")),e,"")}}},941847:function(e,t,n){"use strict";var r=n(392771),o=(0,n(796099).Z)(function(e,t,n){return t=t.toLowerCase(),e+(n?(0,r.Z)(t):t)});t.Z=o},392771:function(e,t,n){"use strict";n.d(t,{Z:()=>c});var r=n("192180"),o=n("924907"),s=n("59110"),a=n("590709"),l=function(e){e=(0,r.Z)(e);var t=(0,s.Z)(e)?(0,a.Z)(e):void 0,n=t?t[0]:e.charAt(0),l=t?(0,o.Z)(t,1).join(""):e.slice(1);return n.toUpperCase()+l},c=function(e){return l((0,r.Z)(e).toLowerCase())}},808914:function(e,t,n){"use strict";n.d(t,{Z:()=>c});var r=n("457437"),o=n("250737"),s=n("213148"),a=n("333991"),l=Math.max,c=(0,r.Z)(function(e,t,n){var r=null==e?0:e.length;if(!r)return -1;var c=null==n?0:(0,a.Z)(n);return c<0&&(c=l(r+c,0)),(0,o.Z)(e,(0,s.Z)(t,3),c)})},192458:function(e,t,n){"use strict";var r=n(273960),o=n(746718),s=n(61910),a=n(156290),l=(0,s.Z)(function(e){var t=(0,r.Z)(e,a.Z);return t.length&&t[0]===e[0]?(0,o.Z)(t):[]});t.Z=l},921207:function(e,t,n){"use strict";var r=n(273960),o=n(746718),s=n(61910),a=n(156290),l=n(318293),c=(0,s.Z)(function(e){var t=(0,l.Z)(e),n=(0,r.Z)(e,a.Z);return(t="function"==typeof t?t:void 0)&&n.pop(),n.length&&n[0]===e[0]?(0,o.Z)(n,void 0,t):[]});t.Z=c},376604:function(e,t,n){"use strict";n.d(t,{Z:()=>u});var r,o,s=n("810314"),a=n("373595"),l=n("700744"),c=Object.prototype.toString;var u=(r=function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=c.call(t)),e[t]=n},o=(0,s.Z)(l.Z),function(e,t){var n,s,l,c;return n=e,s=r,l=o(t),c={},(0,a.Z)(n,function(e,t,n){s(c,l(e),t,n)}),c})},953687:function(e,t,n){"use strict";var r=n(577573),o=(0,n(245664).Z)(function(e,t,n){(0,r.Z)(e,n,t)});t.Z=o},591806:function(e,t,n){"use strict";n.d(t,{Z:()=>s});var r=n("333991"),o=function(e,t){var n;if("function"!=typeof t)throw TypeError("Expected a function");return e=(0,r.Z)(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}},s=function(e){return o(2,e)}},520862:function(e,t,n){"use strict";var r=n(754272),o=n(222363);t.Z=function(e,t,n,s){return null==e?[]:(!(0,o.Z)(t)&&(t=null==t?[]:[t]),n=s?void 0:n,!(0,o.Z)(n)&&(n=null==n?[]:[n]),(0,r.Z)(e,t,n))}},100015:function(e,t,n){"use strict";var r=(0,n(796099).Z)(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()});t.Z=r},431421:function(e,t,n){"use strict";n.d(t,{Z:()=>c});var r,o=n("273960"),s=n("792790"),a=n("559891"),l=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=[e,e]}),n};var c=(r=n("465759").Z,function(e){var t,n,c=(0,s.Z)(e);if("[object Map]"==c)return(0,a.Z)(e);if("[object Set]"==c)return l(e);return t=e,n=r(e),(0,o.Z)(n,function(e){return[e,t[e]]})})},59160:function(e,t,n){"use strict";function r(e){var t=!1;return{promise:new Promise(function(n,r){e.then(function(e){return!t&&n(e)}).catch(function(e){return!t&&r(e)})}),cancel:function(){t=!0}}}n.d(t,{Z:function(){return r}})},213898:function(e,t,n){"use strict";n.d(t,{ZP:function(){return s}});var r=function(e,t,n){if(n||2==arguments.length)for(var r,o=0,s=t.length;o<s;o++)(r||!(o in t))&&(!r&&(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},o=r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r([],["onCopy","onCut","onPaste"],!0),["onCompositionEnd","onCompositionStart","onCompositionUpdate"],!0),["onFocus","onBlur"],!0),["onInput","onInvalid","onReset","onSubmit"],!0),["onLoad","onError"],!0),["onKeyDown","onKeyPress","onKeyUp"],!0),["onAbort","onCanPlay","onCanPlayThrough","onDurationChange","onEmptied","onEncrypted","onEnded","onError","onLoadedData","onLoadedMetadata","onLoadStart","onPause","onPlay","onPlaying","onProgress","onRateChange","onSeeked","onSeeking","onStalled","onSuspend","onTimeUpdate","onVolumeChange","onWaiting"],!0),["onClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp"],!0),["onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop"],!0),["onSelect"],!0),["onTouchCancel","onTouchEnd","onTouchMove","onTouchStart"],!0),["onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onGotPointerCapture","onLostPointerCapture","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut"],!0),["onScroll"],!0),["onWheel"],!0),["onAnimationStart","onAnimationEnd","onAnimationIteration"],!0),["onTransitionEnd"],!0),["onChange"],!0),["onToggle"],!0);function s(e,t){var n={};return o.forEach(function(r){var o=e[r];if(!!o)t?n[r]=function(e){return o(e,t(r))}:n[r]=o}),n}},26177:function(e,t,n){"use strict";function r(e={}){let{highlight:t,container:n}=e;return{async:!0,async walkTokens(e){if("code"!==e.type||"function"!=typeof t)return;let[r="text",...o]=e.lang.split(" "),{text:s}=e,a=await t(s,r,o),l=n?n.replace("%l",String(r).toUpperCase()).replace("%s",a).replace("%t",s):a;Object.assign(e,{type:"html",block:!0,text:`${l}
|
|
|
`})}}}n.d(t,{Z:function(){return r}})},954847:function(e,t,n){"use strict";let r,o,s;n.d(t,{UN:function(){return nL},ZA:function(){return ni},ij:function(){return nn},t_:function(){return t4}});let a=(e,t)=>{let n;let{o:r,i:o,u:s}=e,a=r,l=(e,t)=>{let r=a,l=t||(o?!o(r,e):r!==e);return(l||s)&&(a=e,n=r),[a,l,n]};return[t?e=>l(t(a,n),e):l,e=>[a,!!e,n]]},l="undefined"!=typeof window&&"undefined"!=typeof HTMLElement&&window.document?window:{},c=Math.max,u=Math.min,d=Math.round,p=Math.abs,h=Math.sign,f=l.cancelAnimationFrame,m=l.requestAnimationFrame,g=l.setTimeout,v=l.clearTimeout,b=e=>void 0!==l[e]?l[e]:void 0,y=b("MutationObserver"),x=b("IntersectionObserver"),w=b("ResizeObserver"),S=b("ScrollTimeline"),k=e=>void 0===e,A=e=>null===e,C=e=>"number"==typeof e,E=e=>"string"==typeof e,T=e=>"boolean"==typeof e,_=e=>"function"==typeof e,O=e=>Array.isArray(e),M=e=>"object"==typeof e&&!O(e)&&!A(e),I=e=>{let t=!!e&&e.length,n=C(t)&&t>-1&&t%1==0;return(!!O(e)||!_(e)&&!!n)&&(!(t>0&&M(e))||t-1 in e)},P=e=>!!e&&e.constructor===Object,D=e=>e instanceof HTMLElement,N=e=>e instanceof Element,R=()=>performance.now(),L=(e,t,n,r,o)=>{let s=0,a=R(),l=c(0,n),u=n=>{let d=R(),p=d-a>=l,h=n?1:1-(c(0,a+l-d)/l||0),f=(t-e)*(_(o)?o(h,h*l,0,1,l):h)+e,g=p||1===h;r&&r(f,h,g),s=g?0:m(()=>u())};return u(),e=>{f(s),e&&u(e)}};function j(e,t){if(I(e))for(let n=0;n<e.length&&!1!==t(e[n],n,e);n++);else e&&j(Object.keys(e),n=>t(e[n],n,e));return e}let $=(e,t)=>e.indexOf(t)>=0,F=(e,t)=>e.concat(t),z=(e,t,n)=>(!E(t)&&I(t)?Array.prototype.push.apply(e,t):e.push(t),e),B=e=>Array.from(e||[]),H=e=>O(e)?e:!E(e)&&I(e)?B(e):[e],U=e=>!!e&&!e.length,V=e=>B(new Set(e)),q=(e,t,n)=>{j(e,e=>!e||e.apply(void 0,t||[])),!n&&(e.length=0)},W="paddingTop",G="paddingRight",K="paddingLeft",Y="paddingBottom",Z="marginLeft",J="marginRight",X="marginBottom",Q="overflowX",ee="overflowY",et="width",en="height",er="visible",ei="hidden",eo="scroll",es=e=>{let t=String(e||"");return t?t[0].toUpperCase()+t.slice(1):""},ea=(e,t,n,r)=>{if(e&&t){let r=!0;return j(n,n=>{let o=e[n];o!==t[n]&&(r=!1)}),r}return!1},el=(e,t)=>ea(e,t,["w","h"]),ec=(e,t)=>ea(e,t,["x","y"]),eu=(e,t)=>ea(e,t,["t","r","b","l"]),ed=(e,...t)=>e.bind(0,...t),ep=e=>{let t;let n=e?g:m,r=e?v:f;return[o=>{r(t),t=n(()=>o(),_(e)?e():e)},()=>r(t)]},eh=e=>{let t=_(e)?e():e;if(C(t)){let e=t?g:m,n=t?v:f;return r=>{let o=e(()=>r(),t);return()=>{n(o)}}}return t&&t._},ef=(e,t)=>{let n,r,o,s,a;let{p:l,v:c,S:u,m:d}=t||{},p=function(t){r&&r(),n&&n(),a=r=n=o=void 0,e.apply(this,t)},h=e=>d&&o?d(o,e):e,f=()=>{r&&p(h(s)||s)},m=function(){let e=B(arguments),t=eh(l);if(t){let l=eh(c),d=h(e)||e,m=p.bind(0,d);r&&r(),u&&!a?(m(),a=!0,r=t(()=>a=void 0)):(r=t(m),l&&!n&&(n=l(f))),o=s=d}else p(e)};return m.O=f,m},em=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),eg=e=>e?Object.keys(e):[],ev=(e,t,n,r,o,s,a)=>(("object"!=typeof e||A(e))&&!_(e)&&(e={}),j([t,n,r,o,s,a],t=>{j(t,(n,r)=>{let o=t[r];if(e===o)return!0;let s=O(o);if(o&&P(o)){let t=e[r],n=t;s&&!O(t)?n=[]:!s&&!P(t)&&(n={}),e[r]=ev(n,o)}else e[r]=s?o.slice():o})}),e),eb=(e,t)=>j(ev({},e),(e,t,n)=>{void 0===e?delete n[t]:e&&P(e)&&(n[t]=eb(e))}),ey=e=>!eg(e).length,ex=()=>{},ew=(e,t,n)=>c(e,u(t,n)),eS=e=>V((O(e)?e:(e||"").split(" ")).filter(e=>e)),ek=(e,t)=>e&&e.getAttribute(t),eA=(e,t)=>e&&e.hasAttribute(t),eC=(e,t,n)=>{j(eS(t),t=>{e&&e.setAttribute(t,String(n||""))})},eE=(e,t)=>{j(eS(t),t=>e&&e.removeAttribute(t))},eT=(e,t)=>{let n=eS(ek(e,t)),r=ed(eC,e,t),o=(e,t)=>{let r=new Set(n);return j(eS(e),e=>{r[t](e)}),B(r).join(" ")};return{$:e=>r(o(e,"delete")),C:e=>r(o(e,"add")),H:e=>{let t=eS(e);return t.reduce((e,t)=>e&&n.includes(t),t.length>0)}}},e_=(e,t,n)=>(eT(e,t).$(n),ed(eO,e,t,n)),eO=(e,t,n)=>(eT(e,t).C(n),ed(e_,e,t,n)),eM=(e,t,n,r)=>(r?eO:e_)(e,t,n),eI=(e,t,n)=>eT(e,t).H(n),eP=e=>eT(e,"class"),eD=(e,t)=>{eP(e).$(t)},eN=(e,t)=>(eP(e).C(t),ed(eD,e,t)),eR=(e,t)=>{let n=t?N(t)&&t:document;return n?B(n.querySelectorAll(e)):[]},eL=(e,t)=>{let n=t?N(t)&&t:document;return n&&n.querySelector(e)},ej=(e,t)=>N(e)&&e.matches(t),e$=e=>ej(e,"body"),eF=e=>e?B(e.childNodes):[],ez=e=>e&&e.parentElement,eB=(e,t)=>N(e)&&e.closest(t),eH=e=>document.activeElement,eU=(e,t,n)=>{let r=eB(e,t),o=e&&eL(n,r),s=eB(o,t)===r;return!!r&&!!o&&(r===e||o===e||s&&eB(eB(e,n),t)!==r)},eV=e=>{j(H(e),e=>{let t=ez(e);e&&t&&t.removeChild(e)})},eq=(e,t)=>ed(eV,e&&t&&j(H(t),t=>{t&&e.appendChild(t)})),eW=()=>r,eG=e=>{let t=document.createElement("div");return eC(t,"class",e),t},eK=e=>{let t=eG(),n=eW(),r=e.trim();return t.innerHTML=n?n.createHTML(r):r,j(eF(t),e=>eV(e))},eY=(e,t)=>e.getPropertyValue(t)||e[t]||"",eZ=e=>{let t=e||0;return isFinite(t)?t:0},eJ=e=>eZ(parseFloat(e||"")),eX=e=>Math.round(1e4*e)/1e4,eQ=e=>`${eX(eZ(e))}px`;function e0(e,t){e&&t&&j(t,(t,n)=>{try{let r=e.style,o=A(t)||T(t)?"":C(t)?eQ(t):t;0===n.indexOf("--")?r.setProperty(n,o):r[n]=o}catch(e){}})}function e1(e,t,n){let r=E(t),o=r?"":{};if(e){let s=l.getComputedStyle(e,n)||e.style;o=r?eY(s,t):B(t).reduce((e,t)=>(e[t]=eY(s,t),e),o)}return o}let e2=(e,t,n)=>{let r=t?`${t}-`:"",o=n?`-${n}`:"",s=`${r}top${o}`,a=`${r}right${o}`,l=`${r}bottom${o}`,c=`${r}left${o}`,u=e1(e,[s,a,l,c]);return{t:eJ(u[s]),r:eJ(u[a]),b:eJ(u[l]),l:eJ(u[c])}},e3=(e,t)=>`translate${M(e)?`(${e.x},${e.y})`:`${t?"X":"Y"}(${e})`}`,e5=e=>!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length),e4={w:0,h:0},e6=(e,t)=>t?{w:t[`${e}Width`],h:t[`${e}Height`]}:e4,e8=e=>e6("inner",e||l),e9=ed(e6,"offset"),e7=ed(e6,"client"),te=ed(e6,"scroll"),tt=e=>{let t=parseFloat(e1(e,et))||0,n=parseFloat(e1(e,en))||0;return{w:t-d(t),h:n-d(n)}},tn=e=>e.getBoundingClientRect(),tr=e=>!!e&&e5(e),ti=e=>!!(e&&(e[en]||e[et])),to=(e,t)=>{let n=ti(e);return!ti(t)&&n},ts=(e,t,n,r)=>{j(eS(t),t=>{e&&e.removeEventListener(t,n,r)})},ta=(e,t,n,r)=>{var o;let s=null==(o=r&&r.T)||o,a=r&&r.I||!1,l=r&&r.A||!1,c={passive:s,capture:a};return ed(q,eS(t).map(t=>{let r=l?o=>{ts(e,t,r,a),n&&n(o)}:n;return e&&e.addEventListener(t,r,c),ed(ts,e,t,r,a)}))},tl=e=>e.stopPropagation(),tc=e=>e.preventDefault(),tu=e=>tl(e)||tc(e),td=(e,t)=>{let{x:n,y:r}=C(t)?{x:t,y:t}:t||{};C(n)&&(e.scrollLeft=n),C(r)&&(e.scrollTop=r)},tp=e=>({x:e.scrollLeft,y:e.scrollTop}),th=()=>({D:{x:0,y:0},M:{x:0,y:0}}),tf=(e,t)=>{let{D:n,M:r}=e,{w:o,h:s}=t,a=(e,t,n)=>{let r=h(e)*n,o=h(t)*n;if(r===o){let n=p(e),s=p(t);o=n>s?0:o,r=n<s?0:r}return[(r=r===o?0:r)+0,o+0]},[l,c]=a(n.x,r.x,o),[u,d]=a(n.y,r.y,s);return{D:{x:l,y:u},M:{x:c,y:d}}},tm=({D:e,M:t})=>{let n,r,o,s;return{x:(n=e.x,r=t.x,0===n&&n<=r),y:(o=e.y,s=t.y,0===o&&o<=s)}},tg=({D:e,M:t},n)=>{let r=(e,t,n)=>ew(0,1,(e-n)/(e-t)||0);return{x:r(e.x,t.x,n.x),y:r(e.y,t.y,n.y)}},tv=e=>{e&&e.focus&&e.focus({preventScroll:!0})},tb=(e,t)=>{j(H(t),e)},ty=e=>{let t=new Map,n=(e,n)=>{if(e){let r=t.get(e);tb(e=>{r&&r[e?"delete":"clear"](e)},n)}else t.forEach(e=>{e.clear()}),t.clear()},r=(e,o)=>{if(E(e)){let r=t.get(e)||new Set;return t.set(e,r),tb(e=>{_(e)&&r.add(e)},o),ed(n,e,o)}T(o)&&o&&n();let s=eg(e),a=[];return j(s,t=>{let n=e[t];n&&z(a,r(t,n))}),ed(q,a)};return r(e||{}),[r,n,(e,n)=>{j(B(t.get(e)),e=>{n&&!U(n)?e.apply(0,n):e()})}]},tx={},tw={},tS=e=>{j(e,e=>j(e,(t,n)=>{tx[n]=e[n]}))},tk=(e,t,n)=>eg(e).map(r=>{let{static:o,instance:s}=e[r],[a,l,c]=n||[],u=n?s:o;if(u){let e=n?u(a,l,t):u(t);return(c||tw)[r]=e}}),tA=e=>tw[e],tC="data-overlayscrollbars",tE="os-environment",tT=`${tE}-scrollbar-hidden`,t_=`${tC}-initialize`,tO="noClipping",tM=`${tC}-body`,tI=`${tC}-viewport`,tP="arrange",tD="measuring",tN="scrollbarHidden",tR=`${tC}-padding`,tL=`${tC}-content`,tj="os-size-observer",t$=`${tj}-appear`,tF=`${tj}-listener`,tz=`${tF}-scroll`,tB=`${tF}-item`,tH=`${tB}-final`,tU="os-scrollbar",tV=`${tU}-rtl`,tq=`${tU}-horizontal`,tW=`${tU}-vertical`,tG=`${tU}-track`,tK=`${tU}-handle`,tY=`${tU}-visible`,tZ=`${tU}-cornerless`,tJ=`${tU}-interaction`,tX=`${tU}-unusable`,tQ=`${tU}-auto-hide`,t0=`${tQ}-hidden`,t1=`${tU}-wheel`,t2=`${tG}-interactive`,t3=`${tK}-interactive`,t5="__osSizeObserverPlugin",t4={[t5]:{static:()=>(e,t,n)=>{let r;let o="scroll",s=eK(`<div class="${tB}" dir="ltr"><div class="${tB}"><div class="${tH}"></div></div><div class="${tB}"><div class="${tH}" style="width: 200%; height: 200%"></div></div></div>`),a=s[0],l=a.lastChild,c=a.firstChild,u=null==c?void 0:c.firstChild,d=e9(a),p=d,h=!1,g=()=>{td(c,3333333),td(l,3333333)},v=e=>{r=0,h&&(d=p,t(!0===e))},b=e=>{p=e9(a),h=!e||!el(p,d),e?(tl(e),h&&!r&&(f(r),r=m(v))):v(!1===e),g()},y=[eq(e,s),ta(c,o,b),ta(l,o,b)];return eN(e,tz),e0(u,{[et]:3333333,[en]:3333333}),m(g),[n?ed(b,!1):g,y]}}},t6=(e,t)=>{let{k:n}=t,[r,o]=e("showNativeOverlaidScrollbars");return[r&&n.x&&n.y,o]},t8=e=>0===e.indexOf(er),t9=e=>e.replace(`${er}-`,""),t7=(e,t)=>{if("auto"===e)return t?eo:ei;let n=e||ei;return[ei,eo,er].includes(n)?n:ei},ne=(e,t)=>{let{overflowX:n,overflowY:r}=e1(e,[Q,ee]);return{x:t7(n,t.x),y:t7(r,t.y)}},nt="__osScrollbarsHidingPlugin",nn={[nt]:{static:()=>({R:(e,t,n,r,o)=>{let{V:s,L:a}=e,{U:l,k:c,P:u}=r,d=!s&&!l&&(c.x||c.y),[p]=t6(o,r),h=e=>{let t=l||p?0:42,n=(e,n,r)=>[n&&!l?e?t:r:0,e&&!!t],[r,o]=n(c.x,e.x===eo,u.x),[s,a]=n(c.y,e.y===eo,u.y);return{N:{x:r,y:s},q:{x:o,y:a}}},f=e=>{if(!s){let{B:r}=n,o=ev({},{[J]:0,[X]:0,[Z]:0}),{N:s,q:a}=h(e),{x:l,y:c}=a,{x:u,y:p}=s,{F:f}=t,m=r?Z:J,g=r?K:G,v=f[m],b=f[X],y=f[g],x=f[Y];return o[et]=`calc(100% + ${p+-1*v}px)`,o[m]=-p+v,o[X]=-u+b,d&&(o[g]=y+(c?p:0),o[Y]=x+(l?u:0)),o}};return{X:(e,r,o)=>{if(d){let{F:s}=t,{N:l,q:c}=h(e),{x:u,y:d}=c,{x:p,y:f}=l,{B:m}=n,g=s[m?G:K],v=s.paddingTop,b=r.w+o.w,y=r.h+o.h,x={w:f&&d?`${f+b-g}px`:"",h:p&&u?`${p+y-v}px`:""};e0(a,{"--os-vaw":x.w,"--os-vah":x.h})}return d},Y:()=>{if(d){let{j:e,F:n}=t,r=ne(a,e),{q:o}=h(r),{x:s,y:l}=o,c={},u=e=>j(e,e=>{c[e]=n[e]});s&&u([X,W,Y]),l&&u([Z,J,K,G]);let d=e1(a,eg(c)),p=e_(a,tI,tP);return e0(a,c),()=>{e0(a,ev({},d,f(r))),p()}}return ex},W:f}}})}},nr="__osClickScrollPlugin",ni={[nr]:{static:()=>(e,t,n,r)=>{let o=!1,s=ex,[a,l]=ep(133),c=Math.sign(t),u=n*c,d=u/2,p=e=>1-(1-e)*(1-e),h=(t,n)=>L(t,n,222,e,p),f=(n,r)=>L(n,t-u,133*r,(n,r,o)=>{e(n),o&&(s=h(n,t))}),m=L(0,u,222,(l,p,m)=>{if(e(l),m&&(r(o),!o)){let e=t-l;Math.sign(e-d)===c&&a(()=>{let r=e-u;s=Math.sign(r)===c?f(l,Math.abs(r)/n):h(l,t)})}},p);return e=>{o=!0,e&&m(),l(),s()}}}},no=e=>JSON.stringify(e,(e,t)=>{if(_(t))throw 0;return t}),ns=(e,t)=>e?`${t}`.split(".").reduce((e,t)=>e&&em(e,t)?e[t]:void 0,e):void 0,na={paddingAbsolute:!1,showNativeOverlaidScrollbars:!1,update:{elementEvents:[["img","load"]],debounce:[0,33],attributes:null,ignoreMutation:null},overflow:{x:"scroll",y:"scroll"},scrollbars:{theme:"os-theme-dark",visibility:"auto",autoHide:"never",autoHideDelay:1300,autoHideSuspend:!1,dragScroll:!0,clickScroll:!1,pointers:["mouse","touch","pen"]}},nl=(e,t)=>{let n={};return j(F(eg(t),eg(e)),r=>{let o=e[r],s=t[r];if(M(o)&&M(s))ev(n[r]={},nl(o,s)),ey(n[r])&&delete n[r];else if(em(t,r)&&s!==o){let e=!0;if(O(o)||O(s))try{no(o)===no(s)&&(e=!1)}catch(e){}e&&(n[r]=s)}}),n},nc=(e,t,n)=>r=>[ns(e,r),n||void 0!==ns(t,r)],nu=()=>o,nd=()=>{let e=(e,t,n)=>{eq(document.body,e),eq(document.body,e);let r=e7(e),o=e9(e),s=tt(t);return n&&eV(e),{x:o.h-r.h+s.h,y:o.w-r.w+s.w}},t=`.${tE}{scroll-behavior:auto!important;position:fixed;opacity:0;visibility:hidden;overflow:scroll;height:200px;width:200px;z-index:-1}.${tE} div{width:200%;height:200%;margin:10px 0}.${tT}{scrollbar-width:none!important}.${tT}::-webkit-scrollbar,.${tT}::-webkit-scrollbar-corner{appearance:none!important;display:none!important;width:0!important;height:0!important}`,n=eK(`<div class="${tE}"><div></div><style>${t}</style></div>`)[0],r=n.firstChild,o=n.lastChild,s=nu();s&&(o.nonce=s);let[c,,u]=ty(),[d,p]=a({o:e(n,r),i:ec},ed(e,n,r,!0)),[h]=p(),f=(e=>{let t=!1,n=eN(e,tT);try{t="none"===e1(e,"scrollbar-width")||"none"===e1(e,"display","::-webkit-scrollbar")}catch(e){}return n(),t})(n),m={x:0===h.x,y:0===h.y},g={elements:{host:null,padding:!f,viewport:e=>f&&e$(e)&&e,content:!1},scrollbars:{slot:!0},cancel:{nativeScrollbarsOverlaid:!1,body:null}},v=ev({},na),b=ed(ev,{},v),y=ed(ev,{},g),x={P:h,k:m,U:f,J:!!S,G:ed(c,"r"),K:y,Z:e=>ev(g,e)&&y(),tt:b,nt:e=>ev(v,e)&&b(),ot:ev({},g),st:ev({},v)};if(eE(n,"style"),eV(n),ta(l,"resize",()=>{u("r",[])}),_(l.matchMedia)&&!f&&(!m.x||!m.y)){let e=t=>{ta(l.matchMedia(`(resolution: ${l.devicePixelRatio}dppx)`),"change",()=>{t(),e(t)},{A:!0})};e(()=>{let[e,t]=d();ev(x.P,e),u("r",[t])})}return x},np=()=>(!s&&(s=nd()),s),nh=(e,t,n)=>{let r=!1,o=!!n&&new WeakMap,s=s=>{o&&n&&j(n.map(t=>{let[n,r]=t||[];return[r&&n?(s||eR)(n,e):[],r]}),n=>j(n[0],s=>{let a=n[1],l=o.get(s)||[];if(e.contains(s)&&a){let e=ta(s,a,n=>{r?(e(),o.delete(s)):t(n)});o.set(s,z(l,e))}else q(l),o.delete(s)}))};return s(),[()=>{r=!0},s]},nf=(e,t,n,r)=>{let o=!1,{et:s,ct:a,rt:l,it:c,lt:u,ut:d}=r||{},p=ef(()=>o&&n(!0),{p:33,v:99}),[h,f]=nh(e,p,l),m=a||[],g=F(s||[],m),v=(o,s)=>{if(!U(s)){let a=u||ex,l=d||ex,p=[],h=[],g=!1,v=!1;if(j(s,n=>{let{attributeName:o,target:s,type:u,oldValue:d,addedNodes:f,removedNodes:b}=n,y="attributes"===u,x=e===s,w=y&&o,S=w&&ek(s,o||""),k=E(S)?S:null,A=w&&d!==k,C=$(m,o)&&A;if(t&&("childList"===u||!x)){let t=y&&A,u=t&&c&&ej(s,c),h=(u?!a(s,o,d,k):!y||t)&&!l(n,!!u,e,r);j(f,e=>z(p,e)),j(b,e=>z(p,e)),v=v||h}!t&&x&&A&&!a(s,o,d,k)&&(z(h,o),g=g||C)}),f(e=>V(p).reduce((t,n)=>(z(t,eR(e,n)),ej(n,e)?z(t,n):t),[])),t)return!o&&v&&n(!1),[!1];if(!U(h)||g){let e=[V(h),g];return!o&&n.apply(0,e),e}}},b=new y(ed(v,!1));return[()=>(b.observe(e,{attributes:!0,attributeOldValue:!0,attributeFilter:g,subtree:t,childList:t,characterData:t}),o=!0,()=>{o&&(h(),b.disconnect(),o=!1)}),()=>{if(o)return p.O(),v(!0,b.takeRecords())}]},nm=null,ng=(e,t,n)=>{let{ft:r}=n||{},o=tA(t5),[s]=a({o:!1,u:!0});return()=>{let n=[],a=eK(`<div class="${tj}"><div class="${tF}"></div></div>`)[0],l=a.firstChild,c=e=>{let n=O(e)&&!U(e),r=!1,o=!1;if(n){let[t,,n]=s(e[0].contentRect),a=ti(t);r=!(o=to(t,n))&&!a}else o=!0===e;!r&&t({_t:!0,ft:o})};if(w){if(!T(nm)){let t=new w(ex);t.observe(e,{get box(){nm=!0}}),nm=nm||!1,t.disconnect()}let t=ef(c,{p:0,v:0}),r=e=>t(e),o=new w(r);if(o.observe(nm?e:l),z(n,[()=>{o.disconnect()},!nm&&eq(e,a)]),nm){let t=new w(r);t.observe(e,{box:"border-box"}),z(n,()=>t.disconnect())}}else{if(!o)return ex;let[t,s]=o(l,c,r);z(n,F([eN(a,t$),ta(a,"animationstart",t),eq(e,a)],s))}return ed(q,n)}},nv=(e,t)=>{let n;let r=e=>0===e.h||e.isIntersecting||e.intersectionRatio>0,o=eG("os-trinsic-observer"),[s]=a({o:!1}),l=(e,n)=>{if(e){let o=s(r(e)),[,a]=o;return a&&!n&&t(o)&&[o]}},c=(e,t)=>l(t.pop(),e);return[()=>{let t=[];if(x)(n=new x(ed(c,!1),{root:e})).observe(o),z(t,()=>{n.disconnect()});else{let e=()=>{l(e9(o))};z(t,ng(o,e)()),e()}return ed(q,z(t,eq(e,o)))},()=>n&&c(!0,n.takeRecords())]},nb=(e,t,n,r)=>{let o,s,l,c,u,d;let p=`[${tC}]`,h=`[${tI}]`,f=["id","class","style","open","wrap","cols","rows"],{dt:m,vt:g,L:v,gt:b,ht:y,V:x,bt:S,wt:k,yt:A,St:E}=e,T=e=>"rtl"===e1(e,"direction"),M={Ot:!1,B:T(m)},I=np(),P=tA(nt),[D]=a({i:el,o:{w:0,h:0}},()=>{let r=P&&P.R(e,t,M,I,n).Y,o=!(S&&x)&&eI(g,tC,tO),s=!x&&k(tP),a=s&&tp(b),l=a&&E(),c=A(tD,o),u=s&&r&&r(),d=te(v),p=tt(v);return u&&u(),td(b,a),l&&l(),o&&c(),{w:d.w+p.w,h:d.h+p.h}}),N=ef(r,{p:()=>o,v:()=>s,m(e,t){let[n]=e,[r]=t;return[F(eg(n),eg(r)).reduce((e,t)=>(e[t]=n[t]||r[t],e),{})]}}),R=e=>{let t=T(m);ev(e,{$t:d!==t}),ev(M,{B:t}),d=t},L=(e,t)=>{let[n,o]=e,s={Ct:o};return ev(M,{Ot:n}),!t&&r(s),s},j=({_t:e,ft:t})=>{let n=!(e&&!t)&&I.U?N:r,o={_t:e||t,ft:t};R(o),n(o)},$=(e,t)=>{let[,n]=D(),o={xt:n};R(o);let s=e?r:N;return n&&!t&&s(o),o},z=(e,t,n)=>{let r={Ht:t};return R(r),t&&!n&&N(r),r},[B,H]=y?nv(g,L):[],U=!x&&ng(g,j,{ft:!0}),[V,q]=nf(g,!1,z,{ct:f,et:f}),W=x&&w&&new w(e=>{let t=e[e.length-1].contentRect;j({_t:!0,ft:to(t,u)}),u=t}),G=ef(()=>{let[,e]=D();r({xt:e})},{p:222,S:!0});return[()=>{W&&W.observe(g);let e=U&&U(),t=B&&B(),n=V(),r=I.G(e=>{e?N({Et:e}):G()});return()=>{W&&W.disconnect(),e&&e(),t&&t(),c&&c(),n(),r()}},({zt:e,Tt:t,It:n})=>{let r={},[a]=e("update.ignoreMutation"),[u,d]=e("update.attributes"),[m,g]=e("update.elementEvents"),[b,w]=e("update.debounce"),S=t||n,k=e=>_(a)&&a(e);if(g||d){l&&l(),c&&c();let[e,t]=nf(y||v,!0,$,{et:F(f,u||[]),rt:m,it:p,ut:(e,t)=>{let{target:n,attributeName:r}=e;return!t&&!!r&&!x&&eU(n,p,h)||!!eB(n,`.${tU}`)||!!k(e)}});c=e(),l=t}if(w){if(N.O(),O(b)){let e=b[0],t=b[1];o=C(e)&&e,s=C(t)&&t}else C(b)?o=b:o=!1,s=!1}if(S){let e=q(),t=H&&H(),n=l&&l();e&&ev(r,z(e[0],e[1],S)),t&&ev(r,L(t[0],S)),n&&ev(r,$(n[0],S))}return R(r),r},M]},ny=(e,t)=>_(t)?t.apply(0,e):t,nx=(e,t,n,r)=>ny(e,k(r)?n:r)||t.apply(0,e),nw=(e,t,n,r)=>{let o=ny(e,k(r)?n:r);return!!o&&(D(o)?o:t.apply(0,e))},nS=(e,t)=>{let{nativeScrollbarsOverlaid:n,body:r}=t||{},{k:o,U:s,K:a}=np(),{nativeScrollbarsOverlaid:l,body:c}=a().cancel,u=k(r)?c:r,d=(o.x||o.y)&&(null!=n?n:l),p=e&&(A(u)?!s:u);return!!d||!!p},nk=(e,t,n,r)=>{let{K:o}=np(),{scrollbars:s}=o(),{slot:a}=s,{dt:l,vt:c,L:u,At:d,gt:p,bt:h,V:f}=t,{scrollbars:m}=d?{}:e,{slot:g}=m||{},v=[],b=[],y=[],x=nw([l,c,u],()=>f&&h?l:c,a,g),w=e=>{if(S){let t=null,r=[],o=new S({source:p,axis:e}),s=()=>{t&&t.cancel(),t=null};return{kt:a=>{let{Dt:l}=n,c=tm(l)[e],u="x"===e,d=[e3(0,u),e3(`calc(100cq${u?"w":"h"} + -100%)`,u)],p=c?d:d.reverse();return r[0]===p[0]&&r[1]===p[1]?s:(s(),r=p,t=a.Mt.animate({clear:["left"],transform:p},{timeline:o}),s)}}}},k={x:w("x"),y:w("y")},A=()=>{let{Rt:e,Vt:t}=n,r=(e,t)=>ew(0,1,e/(e+t)||0);return{x:r(t.x,e.x),y:r(t.y,e.y)}},C=(e,t,n)=>{let r=n?eN:eD;j(e,e=>{r(e.Lt,t)})},E=(e,t)=>{j(e,e=>{let[n,r]=t(e);e0(n,r)})},_=(e,t,n)=>{let r=T(n),o=!r||n,s=!r||!n;o&&C(b,e,t),s&&C(y,e,t)},O=e=>{let t=e?"x":"y",n=eG(`${tU} ${e?tq:tW}`),o=eG(tG),s=eG(tK),a={Lt:n,Ut:o,Mt:s},l=k[t];return z(e?b:y,a),z(v,[eq(n,o),eq(o,s),ed(eV,n),l&&l.kt(a),r(a,_,e)]),a},M=ed(O,!0),I=ed(O,!1);return M(),I(),[{Pt:()=>{let e=A(),t=e=>t=>[t.Lt,{"--os-viewport-percent":eX(e)+""}];E(b,t(e.x)),E(y,t(e.y))},Nt:()=>{if(!S){let{Dt:e}=n,t=tg(e,tp(p)),r=e=>t=>[t.Lt,{"--os-scroll-percent":eX(e)+""}];E(b,r(t.x)),E(y,r(t.y))}},qt:()=>{let{Dt:e}=n,t=tm(e),r=e=>t=>[t.Lt,{"--os-scroll-direction":e?"0":"1"}];E(b,r(t.x)),E(y,r(t.y)),S&&(b.forEach(k.x.kt),y.forEach(k.y.kt))},Bt:()=>{if(f&&!h){let{Rt:e,Dt:t}=n,r=tm(t),o=tg(t,tp(p)),s=t=>{let{Lt:n}=t,s=ez(n)===u&&n,a=(e,t,n)=>{let r=t*e;return eQ(n?r:-r)};return[s,s&&{transform:e3({x:a(o.x,e.x,r.x),y:a(o.y,e.y,r.y)})}]};E(b,s),E(y,s)}},Ft:_,jt:{Xt:b,Yt:M,Wt:ed(E,b)},Jt:{Xt:y,Yt:I,Wt:ed(E,y)}},()=>(eq(x,b[0].Lt),eq(x,y[0].Lt),ed(q,v))]},nA=(e,t,n,r)=>(o,s,a)=>{let{vt:l,L:c,V:u,gt:h,Gt:f,St:m}=t,{Lt:v,Ut:b,Mt:y}=o,[x,w]=ep(333),[S,k]=ep(444),A=e=>{_(h.scrollBy)&&h.scrollBy({behavior:"smooth",left:e.x,top:e.y})},C=!0;return ed(q,[ta(y,"pointermove pointerleave",r),ta(v,"pointerenter",()=>{s(tJ,!0)}),ta(v,"pointerleave pointercancel",()=>{s(tJ,!1)}),!u&&ta(v,"mousedown",()=>{let e=eH();(eA(e,tI)||eA(e,tC)||e===document.body)&&g(ed(tv,c),25)}),ta(v,"wheel",e=>{let{deltaX:t,deltaY:n,deltaMode:r}=e;C&&0===r&&ez(v)===l&&A({x:t,y:n}),C=!1,s(t1,!0),x(()=>{C=!0,s(t1)}),tc(e)},{T:!1,I:!0}),ta(v,"pointerdown",()=>{let e=ta(f,"click",e=>{t(),tu(e)},{A:!0,I:!0,T:!1}),t=ta(f,"pointerup pointercancel",()=>{t(),setTimeout(e,150)},{I:!0,T:!0})},{I:!0,T:!0}),(()=>{let t="pointerup pointercancel lostpointercapture",r=`client${a?"X":"Y"}`,o=a?et:en,s=a?"left":"top",l=a?"w":"h",c=a?"x":"y",u=(e,t)=>r=>{let{Rt:o}=n,s=e9(b)[l]-e9(y)[l],a=t*r/s*o[c];td(h,{[c]:e+a})},g=[];return ta(b,"pointerdown",n=>{let a=eB(n.target,`.${tK}`)===y,v=a?y:b,x=e.scrollbars,w=x[a?"dragScroll":"clickScroll"],{button:C,isPrimary:E,pointerType:T}=n,{pointers:_}=x;if(0===C&&E&&w&&(_||[]).includes(T)){let e,x;q(g),k();let C=!a&&(n.shiftKey||"instant"===w),E=ed(tn,y),T=ed(tn,b),_=d(tn(h)[o])/e9(h)[l]||1,O=u(tp(h)[c],1/_),M=n[r],I=E(),P=T(),D=I[o];let N=(e=I,x=P,(e||E())[s]-(x||T())[s]+D/2),R=M-P[s],L=a?0:R-N,j=e=>{q(B),v.releasePointerCapture(e.pointerId)},$=a||C,F=m(),B=[ta(f,t,j),ta(f,"selectstart",e=>tc(e),{T:!1}),ta(b,t,j),$&&ta(b,"pointermove",e=>O(L+(e[r]-M))),$&&(()=>{let e=tp(h);F();let t=tp(h),n={x:t.x-e.x,y:t.y-e.y};(p(n.x)>3||p(n.y)>3)&&(m(),td(h,e),A(n),S(F))})];if(v.setPointerCapture(n.pointerId),C)O(L);else if(!a){let e=tA(nr);if(e){let t=e(O,L,D,e=>{e?F():z(B,F)});z(B,t),z(g,ed(t,!0))}}}})})(),w,k])},nC=(e,t,n,r,o,s)=>{let a,l,c,u,d;let p=ex,h=0,f=["mouse","pen"],m=e=>f.includes(e.pointerType),[g,v]=ep(),[b,y]=ep(100),[x,w]=ep(100),[S,k]=ep(()=>h),[A,C]=nk(e,o,r,nA(t,o,r,e=>m(e)&&R())),{vt:E,Kt:T,bt:_}=o,{Ft:O,Pt:M,Nt:I,qt:P,Bt:D}=A,N=(e,t)=>{if(k(),e)O(t0);else{let e=ed(O,t0,!0);h>0&&!t?S(e):e()}},R=()=>{(c?!a:!u)&&(N(!0),b(()=>{N(!1)}))},L=e=>{O(tQ,e,!0),O(tQ,e,!1)},j=e=>{m(e)&&(a=c,c&&N(!0))},$=[k,y,w,v,()=>p(),ta(E,"pointerover",j,{A:!0}),ta(E,"pointerenter",j),ta(E,"pointerleave",e=>{m(e)&&(a=!1,c&&N(!1))}),ta(E,"pointermove",e=>{m(e)&&l&&R()}),ta(T,"scroll",e=>{g(()=>{I(),R()}),s(e),D()})];return[()=>ed(q,z($,C())),({zt:e,It:t,Qt:o,Zt:s})=>{let{tn:a,nn:f,sn:m,en:g}=s||{},{$t:v,ft:b}=o||{},{B:y}=n,{k:w}=np(),{cn:S,j:k}=r,[A,C]=e("showNativeOverlaidScrollbars"),[E,R]=e("scrollbars.theme"),[j,$]=e("scrollbars.visibility"),[F,z]=e("scrollbars.autoHide"),[B,H]=e("scrollbars.autoHideSuspend"),[U]=e("scrollbars.autoHideDelay"),[V,q]=e("scrollbars.dragScroll"),[W,G]=e("scrollbars.clickScroll"),[K,Y]=e("overflow"),Z=k.x||k.y,J=A&&w.x&&w.y,X=(e,t,n)=>{let r=e.includes(eo)&&(j===er||"auto"===j&&t===eo);return O(tY,r,n),r};if(h=U,b&&!t&&(B&&Z?(L(!1),p(),x(()=>{p=ta(T,"scroll",ed(L,!0),{A:!0})})):L(!0)),C&&O("os-theme-none",J),R&&(O(d),O(E,!0),d=E),H&&!B&&L(!0),z&&(l="move"===F,c="leave"===F,N(u="never"===F,!0)),q&&O(t3,V),G&&O(t2,!!W),m||$||Y){let e=X(K.x,S.x,!0),t=X(K.y,S.y,!1);O(tZ,!(e&&t))}(a||f||g||v||t)&&(I(),M(),D(),g&&P(),O(tX,!k.x,!0),O(tX,!k.y,!1),O(tV,y&&!_))},{},A]},nE=e=>{let{K:t,U:n}=np(),{elements:r}=t(),{padding:o,viewport:s,content:a}=r,c=D(e),u=c?{}:e,{elements:d}=u,{padding:p,viewport:h,content:f}=d||{},m=c?e:u.target,g=e$(m),v=m.ownerDocument,b=v.documentElement,y=()=>v.defaultView||l,x=ed(nx,[m]),w=ed(nw,[m]),S=ed(eG,""),k=ed(x,S,s),A=ed(w,S,a),C=k(h),E=C===m,T=E&&g,_=!E&&A(f),O=!E&&C===_,M=T?b:C,I=T?M:m,P=!E&&w(S,o,p),N=!O&&_,R=[N,M,P,I].map(e=>D(e)&&!ez(e)&&e),L=e=>e&&$(R,e),j=!L(M)&&(e=>{let t=e9(e),n=te(e),r=e1(e,Q),o=e1(e,ee);return n.w-t.w>0&&!t8(r)||n.h-t.h>0&&!t8(o)})(M)?M:m,F=T?b:M,B=T?v:M,H={dt:m,vt:I,L:M,rn:P,ht:N,gt:F,Kt:B,ln:g?b:j,Gt:v,bt:g,At:c,V:E,an:y,wt:e=>eI(M,tI,e),yt:(e,t)=>eM(M,tI,e,t),St:()=>eM(F,tI,"scrolling",!0)},{dt:U,vt:V,rn:W,L:G,ht:K}=H,Y=[()=>{eE(V,[tC,t_]),eE(U,t_),g&&eE(b,[t_,tC])}],Z=eF([K,G,W,V,U].find(e=>e&&!L(e))),J=T?U:K||G,X=ed(q,Y);return[H,()=>{let e=y(),t=eH(),r=e=>{eq(ez(e),eF(e)),eV(e)},o=e=>ta(e,"focusin focusout focus blur",tu,{I:!0,T:!1}),s="tabindex",a=ek(G,s),l=o(t);return eC(V,tC,E?"":"host"),eC(W,tR,""),eC(G,tI,""),eC(K,tL,""),!E&&(eC(G,s,a||"-1"),g&&eC(b,tM,"")),eq(J,Z),eq(V,W),eq(W||V,!E&&G),eq(G,K),z(Y,[l,()=>{let e=eH(),t=L(G),n=t&&e===G?U:e,l=o(n);eE(W,tR),eE(K,tL),eE(G,tI),g&&eE(b,tM),a?eC(G,s,a):eE(G,s),L(K)&&r(K),t&&r(G),L(W)&&r(W),tv(n),l()}]),n&&!E&&(eO(G,tI,tN),z(Y,ed(eE,G,tI))),tv(!E&&g&&t===U&&e.top===e?G:t),l(),Z=0,X},X]},nT=({ht:e})=>({Qt:t,un:n,It:r})=>{let{Ct:o}=t||{},{Ot:s}=n;e&&(o||r)&&e0(e,{[en]:s&&"100%"})},n_=({vt:e,rn:t,L:n,V:r},o)=>{let[s,l]=a({i:eu,o:e2()},ed(e2,e,"padding",""));return({zt:e,Qt:a,un:c,It:u})=>{let[d,p]=l(u),{U:h}=np(),{_t:f,xt:m,$t:g}=a||{},{B:v}=c,[b,y]=e("paddingAbsolute"),x=u||m;(f||p||x)&&([d,p]=s(u));let w=!r&&(y||g||p);if(w){let e=!b||!t&&!h,r=d.r+d.l,s=d.t+d.b,a={[J]:e&&!v?-r:0,[X]:e?-s:0,[Z]:e&&v?-r:0,top:e?-d.t:0,right:e?v?-d.r:"auto":0,left:e?v?"auto":-d.l:0,[et]:e&&`calc(100% + ${r}px)`},l={[W]:e?d.t:0,[G]:e?d.r:0,[Y]:e?d.b:0,[K]:e?d.l:0};e0(t||n,a),e0(n,l),ev(o,{rn:d,fn:!e,F:t?l:ev({},a,l)})}return{_n:w}}},nO=(e,t)=>{let n=np(),{vt:r,rn:o,L:s,V:u,Kt:d,gt:p,bt:h,yt:f,an:g}=e,{U:v}=n,b=h&&u,y=ed(c,0),x={display:()=>!1,direction:e=>"ltr"!==e,flexDirection:e=>e.endsWith("-reverse"),writingMode:e=>"horizontal-tb"!==e},w=eg(x),S={i:el,o:{w:0,h:0}},k={i:ec,o:{}},A=e=>{f(tD,!b&&e)},C=e=>{if(!w.some(t=>{let n=e[t];return n&&x[t](n)}))return{D:{x:0,y:0},M:{x:1,y:1}};A(!0);let t=tp(p),n=f("noContent",!0),r=ta(d,eo,e=>{let n=tp(p);e.isTrusted&&n.x===t.x&&n.y===t.y&&tl(e)},{I:!0,A:!0});td(p,{x:0,y:0}),n();let o=tp(p),s=te(p);td(p,{x:s.w,y:s.h});let a=tp(p);td(p,{x:a.x-o.x<1&&-s.w,y:a.y-o.y<1&&-s.h});let l=tp(p);return td(p,t),m(()=>r()),{D:o,M:l}},E=(e,t)=>{let n=l.devicePixelRatio%1!=0?1:0,r={w:y(e.w-t.w),h:y(e.h-t.h)};return{w:r.w>n?r.w:0,h:r.h>n?r.h:0}},T=(e,t)=>{let n=(e,t,n,r)=>{let o=e===er?ei:t9(e),s=t8(e),a=t8(n);if(!t&&!r)return ei;if(s&&a)return er;if(s){let e=t?er:ei;return t&&r?o:e}let l=a&&r?er:ei;return t?o:l};return{x:n(t.x,e.x,t.y,e.y),y:n(t.y,e.y,t.x,e.x)}},_=e=>{let t=e=>[er,ei,eo].map(t=>U(t7(t),e));f(t(!0).concat(t()).join(" ")),f(eg(e).map(t=>U(e[t],"x"===t)).join(" "),!0)},[O,M]=a(S,ed(tt,s)),[I,P]=a(S,ed(te,s)),[D,N]=a(S),[R]=a(k),[L,j]=a(S),[$]=a(k),[F]=a({i:(e,t)=>ea(e,t,w),o:{}},()=>tr(s)?e1(s,w):{}),[z,B]=a({i:(e,t)=>ec(e.D,t.D)&&ec(e.M,t.M),o:th()}),H=tA(nt),U=(e,t)=>{let n=t?Q:ee;return`${n}${es(e)}`};return({zt:a,Qt:l,un:c,It:u},{_n:d})=>{let{_t:p,Ht:h,xt:m,$t:x,ft:w,Et:S}=l||{},{X:k,Y:U,W:V}=H&&H.R(e,t,c,n,a)||{},[q,W]=t6(a,n),[G,K]=a("overflow"),Y=t8(G.x),Z=t8(G.y),J=p||d||m||x||S||W,X=M(u),Q=P(u),ee=N(u),et=j(u);if(W&&v&&f(tN,!q),J){eI(r,tC,tO)&&A(!0);let e=U&&U(),[t]=X=O(u),[n]=Q=I(u),o=e7(s),a=b&&e8(g()),l={w:y(n.w+t.w),h:y(n.h+t.h)},c={w:y((a?a.w:o.w+y(o.w-n.w))+t.w),h:y((a?a.h:o.h+y(o.h-n.h))+t.h)};e&&e(),et=L(c),ee=D(E(l,c),u)}let[en,er]=et,[ei,eo]=ee,[es,ea]=Q,[el,ec]=X,[eu,ed]=R({x:ei.w>0,y:ei.h>0}),ep=Y&&Z&&(eu.x||eu.y)||Y&&eu.x&&!eu.y||Z&&eu.y&&!eu.x,[eh,ef]=F(u),em=x||w||ef||ed||u,[eg,eb]=em?z(C(eh),u):B(),ey=T(eu,G);A(!1),(d||x||S||ec||ea||er||eo||K||W||J||h&&b)&&(_(ey),ey=ne(s,eu),V&&k&&(k(ey,es,el),e0(s,V(ey))));let[ex,ew]=$(ey);return eM(r,tC,tO,ep),eM(o,tR,tO,ep),ev(t,{cn:ex,Vt:{x:en.w,y:en.h},Rt:{x:ei.w,y:ei.h},j:eu,Dt:tf(eg,ei)}),{sn:ew,tn:er,nn:eo,en:eb||eo,dn:em}}},nM=e=>{let[t,n,r]=nE(e),o={rn:{t:0,r:0,b:0,l:0},fn:!1,F:{[J]:0,[X]:0,[Z]:0,[W]:0,[G]:0,[Y]:0,[K]:0},Vt:{x:0,y:0},Rt:{x:0,y:0},cn:{x:ei,y:ei},j:{x:!1,y:!1},Dt:th()},{dt:s,gt:a,V:l,St:c}=t,{U:u,k:d}=np(),p=!u&&(d.x||d.y),h=[nT(t),n_(t,o),nO(t,o)];return[n,e=>{let t={},n=p&&tp(a),r=n&&c();return j(h,n=>{ev(t,n(e,t)||{})}),td(a,n),r&&r(),!l&&td(s,0),t},o,t,r]},nI=(e,t,n,r,o)=>{let s=!1,a=nc(t,{}),[l,c,u,d,p]=nM(e),[h,f,m]=nb(d,u,a,e=>{x({},e)}),[g,v,,b]=nC(e,t,m,u,d,o),y=e=>eg(e).some(t=>!!e[t]),x=(e,o)=>{if(n())return!1;let{pn:a,It:l,Tt:u,vn:d}=e,p=a||{},h=!!l||!s,g={zt:nc(t,p,h),pn:p,It:h};if(d)return v(g),!1;let b=o||f(ev({},g,{Tt:u})),x=c(ev({},g,{un:m,Qt:b}));v(ev({},g,{Qt:b,Zt:x}));let w=y(b),S=y(x),k=w||S||!ey(p)||h;return s=!0,k&&r(e,{Qt:b,Zt:x}),k};return[()=>{let{ln:e,gt:t,St:n}=d,r=tp(e),o=[h(),l(),g()],s=n();return td(t,r),s(),ed(q,o)},x,()=>({gn:m,hn:u}),{bn:d,wn:b},p]},nP=new WeakMap,nD=(e,t)=>{nP.set(e,t)},nN=e=>{nP.delete(e)},nR=e=>nP.get(e),nL=(e,t,n)=>{let{tt:r}=np(),o=D(e),s=o?e:e.target,a=nR(s);if(t&&!a){let a=!1,l=[],c={},u=e=>{let t=eb(e),n=tA("__osOptionsValidationPlugin");return n?n(t,!0):t},d=ev({},r(),u(t)),[p,h,f]=ty(),[m,g,v]=ty(n),b=(e,t)=>{v(e,t),f(e,t)},[y,x,w,S,k]=nI(e,d,()=>a,({pn:e,It:t},{Qt:n,Zt:r})=>{let{_t:o,$t:s,Ct:a,xt:l,Ht:c,ft:u}=n,{tn:d,nn:p,sn:h,en:f}=r;b("updated",[C,{updateHints:{sizeChanged:!!o,directionChanged:!!s,heightIntrinsicChanged:!!a,overflowEdgeChanged:!!d,overflowAmountChanged:!!p,overflowStyleChanged:!!h,scrollCoordinatesChanged:!!f,contentMutation:!!l,hostMutation:!!c,appear:!!u},changedOptions:e||{},force:!!t}])},e=>b("scroll",[C,e])),A=e=>{nN(s),q(l),a=!0,b("destroyed",[C,e]),h(),g()},C={options(e,t){if(e){let n=nl(d,ev(t?r():{},u(e)));!ey(n)&&(ev(d,n),x({pn:n}))}return ev({},d)},on:m,off:(e,t)=>{e&&t&&g(e,t)},state(){let{gn:e,hn:t}=w(),{B:n}=e,{Vt:r,Rt:o,cn:s,j:l,rn:c,fn:u,Dt:d}=t;return ev({},{overflowEdge:r,overflowAmount:o,overflowStyle:s,hasOverflow:l,scrollCoordinates:{start:d.D,end:d.M},padding:c,paddingAbsolute:u,directionRTL:n,destroyed:a})},elements(){let{dt:e,vt:t,rn:n,L:r,ht:o,gt:s,Kt:a}=S.bn,{jt:l,Jt:c}=S.wn,u=e=>{let{Mt:t,Ut:n,Lt:r}=e;return{scrollbar:r,track:n,handle:t}},d=e=>{let{Xt:t,Yt:n}=e;return ev({},u(t[0]),{clone:()=>{let e=u(n());return x({vn:!0}),e}})};return ev({},{target:e,host:t,padding:n||r,viewport:r,content:o||r,scrollOffsetElement:s,scrollEventElement:a,scrollbarHorizontal:d(l),scrollbarVertical:d(c)})},update:e=>x({It:e,Tt:!0}),destroy:ed(A,!1),plugin:e=>c[eg(e)[0]]};return(z(l,[k]),nD(s,C),tk(tx,nL,[C,p,c]),nS(S.bn.bt,!o&&e.cancel))?(A(!0),C):(z(l,y()),b("initialized",[C]),C.update(),C)}return a};nL.plugin=e=>{let t=O(e),n=t?e:[e],r=n.map(e=>tk(e,nL)[0]);return tS(n),t?r:r[0]},nL.valid=e=>{let t=e&&e.elements,n=_(t)&&t();return P(n)&&!!nR(n.target)},nL.env=()=>{let{P:e,k:t,U:n,J:r,ot:o,st:s,K:a,Z:l,tt:c,nt:u}=np();return ev({},{scrollbarsSize:e,scrollbarsOverlaid:t,scrollbarsHiding:n,scrollTimeline:r,staticDefaultInitialization:o,staticDefaultOptions:s,getDefaultInitialization:a,setDefaultInitialization:l,getDefaultOptions:c,setDefaultOptions:u})},nL.nonce=e=>{o=e},nL.trustedTypePolicy=e=>{r=e}},262941:function(e,t,n){"use strict";let r;n.r(t),n.d(t,{AbortException:function(){return nV},AnnotationEditorLayer:function(){return nq},AnnotationEditorParamsType:function(){return nW},AnnotationEditorType:function(){return nG},AnnotationEditorUIManager:function(){return nK},AnnotationLayer:function(){return nY},AnnotationMode:function(){return nZ},CMapCompressionType:function(){return nJ},ColorPicker:function(){return nX},DOMSVGFactory:function(){return nQ},DrawLayer:function(){return n0},FeatureTest:function(){return n1},GlobalWorkerOptions:function(){return n2},ImageKind:function(){return n3},InvalidPDFException:function(){return n5},MissingPDFException:function(){return n4},OPS:function(){return n6},Outliner:function(){return n8},PDFDataRangeTransport:function(){return n9},PDFDateString:function(){return n7},PDFWorker:function(){return re},PasswordResponses:function(){return rt},PermissionFlag:function(){return rn},PixelsPerInch:function(){return rr},RenderingCancelledException:function(){return ri},TextLayer:function(){return ro},UnexpectedResponseException:function(){return rs},Util:function(){return ra},VerbosityLevel:function(){return rl},XfaLayer:function(){return rc},build:function(){return ru},createValidAbsoluteUrl:function(){return rd},fetchData:function(){return rp},getDocument:function(){return rh},getFilenameFromUrl:function(){return rf},getPdfFilenameFromUrl:function(){return rm},getXfaPageViewport:function(){return rg},isDataScheme:function(){return rv},isPdfFile:function(){return rb},noContextMenu:function(){return ry},normalizeUnicode:function(){return rx},renderTextLayer:function(){return rw},setLayerDimensions:function(){return rS},shadow:function(){return rk},updateTextLayer:function(){return rA},version:function(){return rC}});var o={};o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var s=globalThis.pdfjsLib={};o.d(s,{AbortException:()=>j,AnnotationEditorLayer:()=>nH,AnnotationEditorParamsType:()=>h,AnnotationEditorType:()=>p,AnnotationEditorUIManager:()=>eM,AnnotationLayer:()=>nM,AnnotationMode:()=>d,CMapCompressionType:()=>x,ColorPicker:()=>n$,DOMSVGFactory:()=>eo,DrawLayer:()=>nU,FeatureTest:()=>B,GlobalWorkerOptions:()=>tn,ImageKind:()=>g,InvalidPDFException:()=>D,MissingPDFException:()=>N,OPS:()=>w,Outliner:()=>nD,PDFDataRangeTransport:()=>tK,PDFDateString:()=>eg,PDFWorker:()=>tQ,PasswordResponses:()=>S,PermissionFlag:()=>f,PixelsPerInch:()=>et,RenderingCancelledException:()=>ea,TextLayer:()=>tj,UnexpectedResponseException:()=>R,Util:()=>U,VerbosityLevel:()=>y,XfaLayer:()=>ne,build:()=>t6,createValidAbsoluteUrl:()=>_,fetchData:()=>en,getDocument:()=>tq,getFilenameFromUrl:()=>eu,getPdfFilenameFromUrl:()=>ed,getXfaPageViewport:()=>ev,isDataScheme:()=>el,isPdfFile:()=>ec,noContextMenu:()=>ef,normalizeUnicode:()=>W,renderTextLayer:()=>t$,setLayerDimensions:()=>ew,shadow:()=>O,updateTextLayer:()=>tF,version:()=>t4});let a="object"==typeof process&&process+""=="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&"browser"!==process.type),l=[1,0,0,1,0,0],c=[.001,0,0,.001,0,0],u={ANY:1,DISPLAY:2,PRINT:4,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,OPLIST:256},d={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},p={DISABLE:-1,NONE:0,FREETEXT:3,HIGHLIGHT:9,STAMP:13,INK:15},h={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23,HIGHLIGHT_COLOR:31,HIGHLIGHT_DEFAULT_COLOR:32,HIGHLIGHT_THICKNESS:33,HIGHLIGHT_FREE:34,HIGHLIGHT_SHOW_ALL:35},f={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},m={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},g={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},v={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,WIDGET:20},b={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},y={ERRORS:0,WARNINGS:1,INFOS:5},x={NONE:0,BINARY:1},w={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91},S={NEED_PASSWORD:1,INCORRECT_PASSWORD:2},k=y.WARNINGS;function A(e){k>=y.INFOS&&console.log(`Info: ${e}`)}function C(e){k>=y.WARNINGS&&console.log(`Warning: ${e}`)}function E(e){throw Error(e)}function T(e,t){!e&&E(t)}function _(e,t=null,n=null){if(!e)return null;try{if(n&&"string"==typeof e){if(n.addDefaultProtocol&&e.startsWith("www.")){let t=e.match(/\./g);t?.length>=2&&(e=`http://${e}`)}if(n.tryConvertEncoding)try{e=function(e){return decodeURIComponent(escape(e))}(e)}catch{}}let r=t?new URL(e,t):new URL(e);if(function(e){switch(e?.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(r))return r}catch{}return null}function O(e,t,n,r=!1){return Object.defineProperty(e,t,{value:n,enumerable:!r,configurable:!0,writable:!1}),n}let M=function(){function e(t,n){this.constructor===e&&E("Cannot initialize BaseException."),this.message=t,this.name=n}return e.prototype=Error(),e.constructor=e,e}();class I extends M{constructor(e,t){super(e,"PasswordException"),this.code=t}}class P extends M{constructor(e,t){super(e,"UnknownErrorException"),this.details=t}}class D extends M{constructor(e){super(e,"InvalidPDFException")}}class N extends M{constructor(e){super(e,"MissingPDFException")}}class R extends M{constructor(e,t){super(e,"UnexpectedResponseException"),this.status=t}}class L extends M{constructor(e){super(e,"FormatError")}}class j extends M{constructor(e){super(e,"AbortException")}}function $(e){("object"!=typeof e||e?.length===void 0)&&E("Invalid argument for bytesToString");let t=e.length;if(t<8192)return String.fromCharCode.apply(null,e);let n=[];for(let r=0;r<t;r+=8192){let o=Math.min(r+8192,t),s=e.subarray(r,o);n.push(String.fromCharCode.apply(null,s))}return n.join("")}function F(e){"string"!=typeof e&&E("Invalid argument for stringToBytes");let t=e.length,n=new Uint8Array(t);for(let r=0;r<t;++r)n[r]=255&e.charCodeAt(r);return n}function z(e){let t=Object.create(null);for(let[n,r]of e)t[n]=r;return t}class B{static get isLittleEndian(){return O(this,"isLittleEndian",function(){let e=new Uint8Array(4);return e[0]=1,1===new Uint32Array(e.buffer,0,1)[0]}())}static get isEvalSupported(){return O(this,"isEvalSupported",function(){try{return Function(""),!0}catch{return!1}}())}static get isOffscreenCanvasSupported(){return O(this,"isOffscreenCanvasSupported","undefined"!=typeof OffscreenCanvas)}static get platform(){return"undefined"!=typeof navigator&&"string"==typeof navigator?.platform?O(this,"platform",{isMac:navigator.platform.includes("Mac")}):O(this,"platform",{isMac:!1})}static get isCSSRoundSupported(){return O(this,"isCSSRoundSupported",globalThis.CSS?.supports?.("width: round(1.5px, 1px)"))}}let H=Array.from(Array(256).keys(),e=>e.toString(16).padStart(2,"0"));class U{static makeHexColor(e,t,n){return`#${H[e]}${H[t]}${H[n]}`}static scaleMinMax(e,t){let n;e[0]?(e[0]<0&&(n=t[0],t[0]=t[2],t[2]=n),t[0]*=e[0],t[2]*=e[0],e[3]<0&&(n=t[1],t[1]=t[3],t[3]=n),t[1]*=e[3],t[3]*=e[3]):(n=t[0],t[0]=t[1],t[1]=n,n=t[2],t[2]=t[3],t[3]=n,e[1]<0&&(n=t[1],t[1]=t[3],t[3]=n),t[1]*=e[1],t[3]*=e[1],e[2]<0&&(n=t[0],t[0]=t[2],t[2]=n),t[0]*=e[2],t[2]*=e[2]),t[0]+=e[4],t[1]+=e[5],t[2]+=e[4],t[3]+=e[5]}static transform(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}static applyTransform(e,t){let n=e[0]*t[0]+e[1]*t[2]+t[4];return[n,e[0]*t[1]+e[1]*t[3]+t[5]]}static applyInverseTransform(e,t){let n=t[0]*t[3]-t[1]*t[2],r=(e[0]*t[3]-e[1]*t[2]+t[2]*t[5]-t[4]*t[3])/n;return[r,(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/n]}static getAxialAlignedBoundingBox(e,t){let n=this.applyTransform(e,t),r=this.applyTransform(e.slice(2,4),t),o=this.applyTransform([e[0],e[3]],t),s=this.applyTransform([e[2],e[1]],t);return[Math.min(n[0],r[0],o[0],s[0]),Math.min(n[1],r[1],o[1],s[1]),Math.max(n[0],r[0],o[0],s[0]),Math.max(n[1],r[1],o[1],s[1])]}static inverseTransform(e){let t=e[0]*e[3]-e[1]*e[2];return[e[3]/t,-e[1]/t,-e[2]/t,e[0]/t,(e[2]*e[5]-e[4]*e[3])/t,(e[4]*e[1]-e[5]*e[0])/t]}static singularValueDecompose2dScale(e){let t=[e[0],e[2],e[1],e[3]],n=e[0]*t[0]+e[1]*t[2],r=e[0]*t[1]+e[1]*t[3],o=e[2]*t[0]+e[3]*t[2],s=e[2]*t[1]+e[3]*t[3],a=(n+s)/2,l=Math.sqrt((n+s)**2-4*(n*s-o*r))/2;return[Math.sqrt(a+l||1),Math.sqrt(a-l||1)]}static normalizeRect(e){let t=e.slice(0);return e[0]>e[2]&&(t[0]=e[2],t[2]=e[0]),e[1]>e[3]&&(t[1]=e[3],t[3]=e[1]),t}static intersect(e,t){let n=Math.max(Math.min(e[0],e[2]),Math.min(t[0],t[2])),r=Math.min(Math.max(e[0],e[2]),Math.max(t[0],t[2]));if(n>r)return null;let o=Math.max(Math.min(e[1],e[3]),Math.min(t[1],t[3])),s=Math.min(Math.max(e[1],e[3]),Math.max(t[1],t[3]));return o>s?null:[n,o,r,s]}static #e(e,t,n,r,o,s,a,l,c,u){if(c<=0||c>=1)return;let d=1-c,p=c*c,h=p*c,f=d*(d*(d*e+3*c*t)+3*p*n)+h*r,m=d*(d*(d*o+3*c*s)+3*p*a)+h*l;u[0]=Math.min(u[0],f),u[1]=Math.min(u[1],m),u[2]=Math.max(u[2],f),u[3]=Math.max(u[3],m)}static #t(e,t,n,r,o,s,a,l,c,u,d,p){if(1e-12>Math.abs(c)){Math.abs(u)>=1e-12&&this.#e(e,t,n,r,o,s,a,l,-d/u,p);return}let h=u**2-4*d*c;if(h<0)return;let f=Math.sqrt(h),m=2*c;this.#e(e,t,n,r,o,s,a,l,(-u+f)/m,p),this.#e(e,t,n,r,o,s,a,l,(-u-f)/m,p)}static bezierBoundingBox(e,t,n,r,o,s,a,l,c){return c?(c[0]=Math.min(c[0],e,a),c[1]=Math.min(c[1],t,l),c[2]=Math.max(c[2],e,a),c[3]=Math.max(c[3],t,l)):c=[Math.min(e,a),Math.min(t,l),Math.max(e,a),Math.max(t,l)],this.#t(e,n,o,a,t,r,s,l,3*(-e+3*(n-o)+a),6*(e-2*n+o),3*(n-e),c),this.#t(e,n,o,a,t,r,s,l,3*(-t+3*(r-s)+l),6*(t-2*r+s),3*(r-t),c),c}}let V=null,q=null;function W(e){return!V&&(V=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu,q=new Map([["ſt","ſt"]])),e.replaceAll(V,(e,t,n)=>t?t.normalize("NFKC"):q.get(n))}let G="pdfjs_internal_id_",K={BEZIER_CURVE_TO:0,MOVE_TO:1,LINE_TO:2,QUADRATIC_CURVE_TO:3,RESTORE:4,SAVE:5,SCALE:6,TRANSFORM:7,TRANSLATE:8};class Y{constructor(){this.constructor===Y&&E("Cannot initialize BaseFilterFactory.")}addFilter(e){return"none"}addHCMFilter(e,t){return"none"}addAlphaFilter(e){return"none"}addLuminosityFilter(e){return"none"}addHighlightHCMFilter(e,t,n,r,o){return"none"}destroy(e=!1){}}class Z{#n=!1;constructor({enableHWA:e=!1}={}){this.constructor===Z&&E("Cannot initialize BaseCanvasFactory."),this.#n=e}create(e,t){if(e<=0||t<=0)throw Error("Invalid canvas size");let n=this._createCanvas(e,t);return{canvas:n,context:n.getContext("2d",{willReadFrequently:!this.#n})}}reset(e,t,n){if(!e.canvas)throw Error("Canvas is not specified");if(t<=0||n<=0)throw Error("Invalid canvas size");e.canvas.width=t,e.canvas.height=n}destroy(e){if(!e.canvas)throw Error("Canvas is not specified");e.canvas.width=0,e.canvas.height=0,e.canvas=null,e.context=null}_createCanvas(e,t){E("Abstract method `_createCanvas` called.")}}class J{constructor({baseUrl:e=null,isCompressed:t=!0}){this.constructor===J&&E("Cannot initialize BaseCMapReaderFactory."),this.baseUrl=e,this.isCompressed=t}async fetch({name:e}){if(!this.baseUrl)throw Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');if(!e)throw Error("CMap name must be specified.");let t=this.baseUrl+e+(this.isCompressed?".bcmap":""),n=this.isCompressed?x.BINARY:x.NONE;return this._fetchData(t,n).catch(e=>{throw Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${t}`)})}_fetchData(e,t){E("Abstract method `_fetchData` called.")}}class X{constructor({baseUrl:e=null}){this.constructor===X&&E("Cannot initialize BaseStandardFontDataFactory."),this.baseUrl=e}async fetch({filename:e}){if(!this.baseUrl)throw Error('The standard font "baseUrl" parameter must be specified, ensure that the "standardFontDataUrl" API parameter is provided.');if(!e)throw Error("Font filename must be specified.");let t=`${this.baseUrl}${e}`;return this._fetchData(t).catch(e=>{throw Error(`Unable to load font data at: ${t}`)})}_fetchData(e){E("Abstract method `_fetchData` called.")}}class Q{constructor(){this.constructor===Q&&E("Cannot initialize BaseSVGFactory.")}create(e,t,n=!1){if(e<=0||t<=0)throw Error("Invalid SVG dimensions");let r=this._createSVG("svg:svg");return r.setAttribute("version","1.1"),!n&&(r.setAttribute("width",`${e}px`),r.setAttribute("height",`${t}px`)),r.setAttribute("preserveAspectRatio","none"),r.setAttribute("viewBox",`0 0 ${e} ${t}`),r}createElement(e){if("string"!=typeof e)throw Error("Invalid SVG element type");return this._createSVG(e)}_createSVG(e){E("Abstract method `_createSVG` called.")}}let ee="http://www.w3.org/2000/svg";class et{static CSS=96;static PDF=72;static PDF_TO_CSS_UNITS=this.CSS/this.PDF}async function en(e,t="text"){if(eh(e,document.baseURI)){let n=await fetch(e);if(!n.ok)throw Error(n.statusText);switch(t){case"arraybuffer":return n.arrayBuffer();case"blob":return n.blob();case"json":return n.json()}return n.text()}return new Promise((n,r)=>{let o=new XMLHttpRequest;o.open("GET",e,!0),o.responseType=t,o.onreadystatechange=()=>{if(o.readyState===XMLHttpRequest.DONE){if(200===o.status||0===o.status){switch(t){case"arraybuffer":case"blob":case"json":n(o.response);return}n(o.responseText);return}r(Error(o.statusText))}},o.send(null)})}class er extends J{_fetchData(e,t){return en(e,this.isCompressed?"arraybuffer":"text").then(e=>({cMapData:e instanceof ArrayBuffer?new Uint8Array(e):F(e),compressionType:t}))}}class ei extends X{_fetchData(e){return en(e,"arraybuffer").then(e=>new Uint8Array(e))}}class eo extends Q{_createSVG(e){return document.createElementNS(ee,e)}}class es{constructor({viewBox:e,scale:t,rotation:n,offsetX:r=0,offsetY:o=0,dontFlip:s=!1}){let a,l,c,u,d,p,h,f;this.viewBox=e,this.scale=t,this.rotation=n,this.offsetX=r,this.offsetY=o;let m=(e[2]+e[0])/2,g=(e[3]+e[1])/2;switch((n%=360)<0&&(n+=360),n){case 180:a=-1,l=0,c=0,u=1;break;case 90:a=0,l=1,c=1,u=0;break;case 270:a=0,l=-1,c=-1,u=0;break;case 0:a=1,l=0,c=0,u=-1;break;default:throw Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}s&&(c=-c,u=-u),0===a?(d=Math.abs(g-e[1])*t+r,p=Math.abs(m-e[0])*t+o,h=(e[3]-e[1])*t,f=(e[2]-e[0])*t):(d=Math.abs(m-e[0])*t+r,p=Math.abs(g-e[1])*t+o,h=(e[2]-e[0])*t,f=(e[3]-e[1])*t),this.transform=[a*t,l*t,c*t,u*t,d-a*t*m-c*t*g,p-l*t*m-u*t*g],this.width=h,this.height=f}get rawDims(){let{viewBox:e}=this;return O(this,"rawDims",{pageWidth:e[2]-e[0],pageHeight:e[3]-e[1],pageX:e[0],pageY:e[1]})}clone({scale:e=this.scale,rotation:t=this.rotation,offsetX:n=this.offsetX,offsetY:r=this.offsetY,dontFlip:o=!1}={}){return new es({viewBox:this.viewBox.slice(),scale:e,rotation:t,offsetX:n,offsetY:r,dontFlip:o})}convertToViewportPoint(e,t){return U.applyTransform([e,t],this.transform)}convertToViewportRectangle(e){let t=U.applyTransform([e[0],e[1]],this.transform),n=U.applyTransform([e[2],e[3]],this.transform);return[t[0],t[1],n[0],n[1]]}convertToPdfPoint(e,t){return U.applyInverseTransform([e,t],this.transform)}}class ea extends M{constructor(e,t=0){super(e,"RenderingCancelledException"),this.extraDelay=t}}function el(e){let t=e.length,n=0;for(;n<t&&""===e[n].trim();)n++;return"data:"===e.substring(n,n+5).toLowerCase()}function ec(e){return"string"==typeof e&&/\.pdf$/i.test(e)}function eu(e){return[e]=e.split(/[#?]/,1),e.substring(e.lastIndexOf("/")+1)}function ed(e,t="document.pdf"){if("string"!=typeof e)return t;if(el(e))return C('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),t;let n=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,r=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/.exec(e),o=n.exec(r[1])||n.exec(r[2])||n.exec(r[3]);if(o&&(o=o[0]).includes("%"))try{o=n.exec(decodeURIComponent(o))[0]}catch{}return o||t}class ep{started=Object.create(null);times=[];time(e){e in this.started&&C(`Timer is already running for ${e}`),this.started[e]=Date.now()}timeEnd(e){!(e in this.started)&&C(`Timer has not been started for ${e}`),this.times.push({name:e,start:this.started[e],end:Date.now()}),delete this.started[e]}toString(){let e=[],t=0;for(let{name:e}of this.times)t=Math.max(e.length,t);for(let{name:n,start:r,end:o}of this.times)e.push(`${n.padEnd(t)} ${o-r}ms
|
|
|
`);return e.join("")}}function eh(e,t){try{let{protocol:n}=t?new URL(e,t):new URL(e);return"http:"===n||"https:"===n}catch{return!1}}function ef(e){e.preventDefault()}function em(e){console.log("Deprecated API usage: "+e)}class eg{static toDateObject(e){if(!e||"string"!=typeof e)return null;let t=(r||=RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?")).exec(e);if(!t)return null;let n=parseInt(t[1],10),o=parseInt(t[2],10);o=o>=1&&o<=12?o-1:0;let s=parseInt(t[3],10);s=s>=1&&s<=31?s:1;let a=parseInt(t[4],10);a=a>=0&&a<=23?a:0;let l=parseInt(t[5],10);l=l>=0&&l<=59?l:0;let c=parseInt(t[6],10);c=c>=0&&c<=59?c:0;let u=t[7]||"Z",d=parseInt(t[8],10);d=d>=0&&d<=23?d:0;let p=parseInt(t[9],10)||0;return p=p>=0&&p<=59?p:0,"-"===u?(a+=d,l+=p):"+"===u&&(a-=d,l-=p),new Date(Date.UTC(n,o,s,a,l,c))}}function ev(e,{scale:t=1,rotation:n=0}){let{width:r,height:o}=e.attributes.style;return new es({viewBox:[0,0,parseInt(r),parseInt(o)],scale:t,rotation:n})}function eb(e){if(e.startsWith("#")){let t=parseInt(e.slice(1),16);return[(0xff0000&t)>>16,(65280&t)>>8,255&t]}return e.startsWith("rgb(")?e.slice(4,-1).split(",").map(e=>parseInt(e)):e.startsWith("rgba(")?e.slice(5,-1).split(",").map(e=>parseInt(e)).slice(0,3):(C(`Not a valid color format: "${e}"`),[0,0,0])}function ey(e){let{a:t,b:n,c:r,d:o,e:s,f:a}=e.getTransform();return[t,n,r,o,s,a]}function ex(e){let{a:t,b:n,c:r,d:o,e:s,f:a}=e.getTransform().invertSelf();return[t,n,r,o,s,a]}function ew(e,t,n=!1,r=!0){if(t instanceof es){let{pageWidth:r,pageHeight:o}=t.rawDims,{style:s}=e,a=B.isCSSRoundSupported,l=`var(--scale-factor) * ${r}px`,c=`var(--scale-factor) * ${o}px`,u=a?`round(${l}, 1px)`:`calc(${l})`,d=a?`round(${c}, 1px)`:`calc(${c})`;n&&t.rotation%180!=0?(s.width=d,s.height=u):(s.width=u,s.height=d)}r&&e.setAttribute("data-main-rotation",t.rotation)}class eS{#r=null;#i=null;#o;#s=null;constructor(e){this.#o=e}render(){let e=this.#r=document.createElement("div");e.className="editToolbar",e.setAttribute("role","toolbar");let t=this.#o._uiManager._signal;e.addEventListener("contextmenu",ef,{signal:t}),e.addEventListener("pointerdown",eS.#a,{signal:t});let n=this.#s=document.createElement("div");n.className="buttons",e.append(n);let r=this.#o.toolbarPosition;if(r){let{style:t}=e,n="ltr"===this.#o._uiManager.direction?1-r[0]:r[0];t.insetInlineEnd=`${100*n}%`,t.top=`calc(${100*r[1]}% + var(--editor-toolbar-vert-offset))`}return this.#l(),e}static #a(e){e.stopPropagation()}#c(e){this.#o._focusEventsAllowed=!1,e.preventDefault(),e.stopPropagation()}#u(e){this.#o._focusEventsAllowed=!0,e.preventDefault(),e.stopPropagation()}#d(e){let t=this.#o._uiManager._signal;e.addEventListener("focusin",this.#c.bind(this),{capture:!0,signal:t}),e.addEventListener("focusout",this.#u.bind(this),{capture:!0,signal:t}),e.addEventListener("contextmenu",ef,{signal:t})}hide(){this.#r.classList.add("hidden"),this.#i?.hideDropdown()}show(){this.#r.classList.remove("hidden")}#l(){let e=document.createElement("button");e.className="delete",e.tabIndex=0,e.setAttribute("data-l10n-id",`pdfjs-editor-remove-${this.#o.editorType}-button`),this.#d(e),e.addEventListener("click",e=>{this.#o._uiManager.delete()},{signal:this.#o._uiManager._signal}),this.#s.append(e)}get #p(){let e=document.createElement("div");return e.className="divider",e}addAltTextButton(e){this.#d(e),this.#s.prepend(e,this.#p)}addColorPicker(e){this.#i=e;let t=e.renderButton();this.#d(t),this.#s.prepend(t,this.#p)}remove(){this.#r.remove(),this.#i?.destroy(),this.#i=null}}class ek{#s=null;#r=null;#h;constructor(e){this.#h=e}#f(){let e=this.#r=document.createElement("div");e.className="editToolbar",e.setAttribute("role","toolbar"),e.addEventListener("contextmenu",ef,{signal:this.#h._signal});let t=this.#s=document.createElement("div");return t.className="buttons",e.append(t),this.#m(),e}#g(e,t){let n=0,r=0;for(let o of e){let e=o.y+o.height;if(e<n)continue;let s=o.x+(t?o.width:0);if(e>n){r=s,n=e;continue}t?s>r&&(r=s):s<r&&(r=s)}return[t?1-r:r,n]}show(e,t,n){let[r,o]=this.#g(t,n),{style:s}=this.#r||=this.#f();e.append(this.#r),s.insetInlineEnd=`${100*r}%`,s.top=`calc(${100*o}% + var(--editor-toolbar-vert-offset))`}hide(){this.#r.remove()}#m(){let e=document.createElement("button");e.className="highlightButton",e.tabIndex=0,e.setAttribute("data-l10n-id","pdfjs-highlight-floating-button1");let t=document.createElement("span");e.append(t),t.className="visuallyHidden",t.setAttribute("data-l10n-id","pdfjs-highlight-floating-button-label");let n=this.#h._signal;e.addEventListener("contextmenu",ef,{signal:n}),e.addEventListener("click",()=>{this.#h.highlightSelection("floating_button")},{signal:n}),this.#s.append(e)}}function eA(e,t,n){for(let r of n)t.addEventListener(r,e[r].bind(e))}class eC{#v=0;get id(){return`pdfjs_internal_editor_${this.#v++}`}}class eE{#b=(function(){if("undefined"!=typeof crypto&&"function"==typeof crypto?.randomUUID)return crypto.randomUUID();let e=new Uint8Array(32);if("undefined"!=typeof crypto&&"function"==typeof crypto?.getRandomValues)crypto.getRandomValues(e);else for(let t=0;t<32;t++)e[t]=Math.floor(255*Math.random());return $(e)})();#v=0;#y=null;static get _isSVGFittingCanvas(){let e=new OffscreenCanvas(1,3).getContext("2d",{willReadFrequently:!0}),t=new Image;return t.src='data:image/svg+xml;charset=UTF-8,<svg viewBox="0 0 1 1" width="1" height="1" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" style="fill:red;"/></svg>',O(this,"_isSVGFittingCanvas",t.decode().then(()=>(e.drawImage(t,0,0,1,1,0,0,1,3),0===new Uint32Array(e.getImageData(0,0,1,1).data.buffer)[0])))}async #x(e,t){this.#y||=new Map;let n=this.#y.get(e);if(null===n)return null;if(n?.bitmap)return n.refCounter+=1,n;try{let e;if(n||={bitmap:null,id:`image_${this.#b}_${this.#v++}`,refCounter:0,isSvg:!1},"string"==typeof t?(n.url=t,e=await en(t,"blob")):e=n.file=t,"image/svg+xml"===e.type){let t=eE._isSVGFittingCanvas,r=new FileReader,o=new Image,s=new Promise((e,s)=>{o.onload=()=>{n.bitmap=o,n.isSvg=!0,e()},r.onload=async()=>{let e=n.svgUrl=r.result;o.src=await t?`${e}#svgView(preserveAspectRatio(none))`:e},o.onerror=r.onerror=s});r.readAsDataURL(e),await s}else n.bitmap=await createImageBitmap(e);n.refCounter=1}catch(e){console.error(e),n=null}return this.#y.set(e,n),n&&this.#y.set(n.id,n),n}async getFromFile(e){let{lastModified:t,name:n,size:r,type:o}=e;return this.#x(`${t}_${n}_${r}_${o}`,e)}async getFromUrl(e){return this.#x(e,e)}async getFromId(e){this.#y||=new Map;let t=this.#y.get(e);return t?t.bitmap?(t.refCounter+=1,t):t.file?this.getFromFile(t.file):this.getFromUrl(t.url):null}getSvgUrl(e){let t=this.#y.get(e);return t?.isSvg?t.svgUrl:null}deleteId(e){this.#y||=new Map;let t=this.#y.get(e);if(!t)return;if(t.refCounter-=1,0===t.refCounter)t.bitmap=null}isValidId(e){return e.startsWith(`image_${this.#b}_`)}}class eT{#w=[];#S=!1;#k;#A=-1;constructor(e=128){this.#k=e}add({cmd:e,undo:t,post:n,mustExec:r,type:o=NaN,overwriteIfSameType:s=!1,keepUndo:a=!1}){if(r&&e(),this.#S)return;let l={cmd:e,undo:t,post:n,type:o};if(-1===this.#A){this.#w.length>0&&(this.#w.length=0),this.#A=0,this.#w.push(l);return}if(s&&this.#w[this.#A].type===o){a&&(l.undo=this.#w[this.#A].undo),this.#w[this.#A]=l;return}let c=this.#A+1;c===this.#k?this.#w.splice(0,1):(this.#A=c,c<this.#w.length&&this.#w.splice(c)),this.#w.push(l)}undo(){if(-1===this.#A)return;this.#S=!0;let{undo:e,post:t}=this.#w[this.#A];e(),t?.(),this.#S=!1,this.#A-=1}redo(){if(this.#A<this.#w.length-1){this.#A+=1,this.#S=!0;let{cmd:e,post:t}=this.#w[this.#A];e(),t?.(),this.#S=!1}}hasSomethingToUndo(){return -1!==this.#A}hasSomethingToRedo(){return this.#A<this.#w.length-1}destroy(){this.#w=null}}class e_{constructor(e){this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;let{isMac:t}=B.platform;for(let[n,r,o={}]of e)for(let e of n){let n=e.startsWith("mac+");t&&n?(this.callbacks.set(e.slice(4),{callback:r,options:o}),this.allKeys.add(e.split("+").at(-1))):!t&&!n&&(this.callbacks.set(e,{callback:r,options:o}),this.allKeys.add(e.split("+").at(-1)))}}#C(e){e.altKey&&this.buffer.push("alt"),e.ctrlKey&&this.buffer.push("ctrl"),e.metaKey&&this.buffer.push("meta"),e.shiftKey&&this.buffer.push("shift"),this.buffer.push(e.key);let t=this.buffer.join("+");return this.buffer.length=0,t}exec(e,t){if(!this.allKeys.has(t.key))return;let n=this.callbacks.get(this.#C(t));if(!n)return;let{callback:r,options:{bubbles:o=!1,args:s=[],checker:a=null}}=n;if(!a||!!a(e,t))r.bind(e,...s,t)(),!o&&(t.stopPropagation(),t.preventDefault())}}class eO{static _colorsMapping=new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]);get _colors(){let e=new Map([["CanvasText",null],["Canvas",null]]);return!function(e){let t=document.createElement("span");for(let n of(t.style.visibility="hidden",document.body.append(t),e.keys())){t.style.color=n;let r=window.getComputedStyle(t).color;e.set(n,eb(r))}t.remove()}(e),O(this,"_colors",e)}convert(e){let t=eb(e);if(!window.matchMedia("(forced-colors: active)").matches)return t;for(let[e,n]of this._colors)if(n.every((e,n)=>e===t[n]))return eO._colorsMapping.get(e);return t}getHexCode(e){let t=this._colors.get(e);return t?U.makeHexColor(...t):e}}class eM{#E=new AbortController;#T=null;#_=new Map;#O=new Map;#M=null;#I=null;#P=null;#D=new eT;#N=0;#R=new Set;#L=null;#j=null;#$=new Set;#F=!1;#z=null;#B=null;#H=null;#U=!1;#V=null;#q=new eC;#W=!1;#G=!1;#K=null;#Y=null;#Z=null;#J=p.NONE;#X=new Set;#Q=null;#ee=null;#et=null;#en=this.blur.bind(this);#er=this.focus.bind(this);#ei=this.copy.bind(this);#eo=this.cut.bind(this);#es=this.paste.bind(this);#ea=this.keydown.bind(this);#el=this.keyup.bind(this);#ec=this.onEditingAction.bind(this);#eu=this.onPageChanging.bind(this);#ed=this.onScaleChanging.bind(this);#ep=this.onRotationChanging.bind(this);#eh={isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1,hasSelectedText:!1};#ef=[0,0];#em=null;#eg=null;#ev=null;static TRANSLATE_SMALL=1;static TRANSLATE_BIG=10;static get _keyboardManager(){let e=eM.prototype,t=e=>e.#eg.contains(document.activeElement)&&"BUTTON"!==document.activeElement.tagName&&e.hasSomethingToControl(),n=(e,{target:t})=>{if(t instanceof HTMLInputElement){let{type:e}=t;return"text"!==e&&"number"!==e}return!0},r=this.TRANSLATE_SMALL,o=this.TRANSLATE_BIG;return O(this,"_keyboardManager",new e_([[["ctrl+a","mac+meta+a"],e.selectAll,{checker:n}],[["ctrl+z","mac+meta+z"],e.undo,{checker:n}],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],e.redo,{checker:n}],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],e.delete,{checker:n}],[["Enter","mac+Enter"],e.addNewEditorFromKeyboard,{checker:(e,{target:t})=>!(t instanceof HTMLButtonElement)&&e.#eg.contains(t)&&!e.isEnterHandled}],[[" ","mac+ "],e.addNewEditorFromKeyboard,{checker:(e,{target:t})=>!(t instanceof HTMLButtonElement)&&e.#eg.contains(document.activeElement)}],[["Escape","mac+Escape"],e.unselectAll],[["ArrowLeft","mac+ArrowLeft"],e.translateSelectedEditors,{args:[-r,0],checker:t}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],e.translateSelectedEditors,{args:[-o,0],checker:t}],[["ArrowRight","mac+ArrowRight"],e.translateSelectedEditors,{args:[r,0],checker:t}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],e.translateSelectedEditors,{args:[o,0],checker:t}],[["ArrowUp","mac+ArrowUp"],e.translateSelectedEditors,{args:[0,-r],checker:t}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],e.translateSelectedEditors,{args:[0,-o],checker:t}],[["ArrowDown","mac+ArrowDown"],e.translateSelectedEditors,{args:[0,r],checker:t}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],e.translateSelectedEditors,{args:[0,o],checker:t}]]))}constructor(e,t,n,r,o,s,a,l,c){this._signal=this.#E.signal,this.#eg=e,this.#ev=t,this.#M=n,this._eventBus=r,this._eventBus._on("editingaction",this.#ec),this._eventBus._on("pagechanging",this.#eu),this._eventBus._on("scalechanging",this.#ed),this._eventBus._on("rotationchanging",this.#ep),this.#eb(),this.#ey(),this.#ex(),this.#I=o.annotationStorage,this.#z=o.filterFactory,this.#ee=s,this.#H=a||null,this.#F=l,this.#Z=c||null,this.viewParameters={realScale:et.PDF_TO_CSS_UNITS,rotation:0},this.isShiftKeyDown=!1}destroy(){for(let e of(this.#E?.abort(),this.#E=null,this._signal=null,this._eventBus._off("editingaction",this.#ec),this._eventBus._off("pagechanging",this.#eu),this._eventBus._off("scalechanging",this.#ed),this._eventBus._off("rotationchanging",this.#ep),this.#O.values()))e.destroy();this.#O.clear(),this.#_.clear(),this.#$.clear(),this.#T=null,this.#X.clear(),this.#D.destroy(),this.#M?.destroy(),this.#V?.hide(),this.#V=null,this.#B&&(clearTimeout(this.#B),this.#B=null),this.#em&&(clearTimeout(this.#em),this.#em=null)}async mlGuess(e){return this.#Z?.guess(e)||null}get hasMLManager(){return!!this.#Z}get hcmFilter(){return O(this,"hcmFilter",this.#ee?this.#z.addHCMFilter(this.#ee.foreground,this.#ee.background):"none")}get direction(){return O(this,"direction",getComputedStyle(this.#eg).direction)}get highlightColors(){return O(this,"highlightColors",this.#H?new Map(this.#H.split(",").map(e=>e.split("=").map(e=>e.trim()))):null)}get highlightColorNames(){return O(this,"highlightColorNames",this.highlightColors?new Map(Array.from(this.highlightColors,e=>e.reverse())):null)}setMainHighlightColorPicker(e){this.#Y=e}editAltText(e){this.#M?.editAltText(this,e)}onPageChanging({pageNumber:e}){this.#N=e-1}focusMainContainer(){this.#eg.focus()}findParent(e,t){for(let n of this.#O.values()){let{x:r,y:o,width:s,height:a}=n.div.getBoundingClientRect();if(e>=r&&e<=r+s&&t>=o&&t<=o+a)return n}return null}disableUserSelect(e=!1){this.#ev.classList.toggle("noUserSelect",e)}addShouldRescale(e){this.#$.add(e)}removeShouldRescale(e){this.#$.delete(e)}onScaleChanging({scale:e}){for(let t of(this.commitOrRemove(),this.viewParameters.realScale=e*et.PDF_TO_CSS_UNITS,this.#$))t.onScaleChanging()}onRotationChanging({pagesRotation:e}){this.commitOrRemove(),this.viewParameters.rotation=e}#ew({anchorNode:e}){return e.nodeType===Node.TEXT_NODE?e.parentElement:e}highlightSelection(e=""){let t=document.getSelection();if(!t||t.isCollapsed)return;let{anchorNode:n,anchorOffset:r,focusNode:o,focusOffset:s}=t,a=t.toString(),l=this.#ew(t).closest(".textLayer"),c=this.getSelectionBoxes(l);if(!!c){for(let u of(t.empty(),this.#J===p.NONE&&(this._eventBus.dispatch("showannotationeditorui",{source:this,mode:p.HIGHLIGHT}),this.showAllEditors("highlight",!0,!0)),this.#O.values()))if(u.hasTextLayer(l)){u.createAndAddNewEditor({x:0,y:0},!1,{methodOfCreation:e,boxes:c,anchorNode:n,anchorOffset:r,focusNode:o,focusOffset:s,text:a});break}}}#eS(){let e=document.getSelection();if(!e||e.isCollapsed)return;let t=this.#ew(e).closest(".textLayer"),n=this.getSelectionBoxes(t);if(!!n)this.#V||=new ek(this),this.#V.show(t,n,"ltr"===this.direction)}addToAnnotationStorage(e){!e.isEmpty()&&this.#I&&!this.#I.has(e.id)&&this.#I.setValue(e.id,e)}#ek(){let e=document.getSelection();if(!e||e.isCollapsed){this.#Q&&(this.#V?.hide(),this.#Q=null,this.#eA({hasSelectedText:!1}));return}let{anchorNode:t}=e;if(t===this.#Q)return;if(!this.#ew(e).closest(".textLayer")){this.#Q&&(this.#V?.hide(),this.#Q=null,this.#eA({hasSelectedText:!1}));return}if(this.#V?.hide(),this.#Q=t,this.#eA({hasSelectedText:!0}),this.#J===p.HIGHLIGHT||this.#J===p.NONE){if(this.#J===p.HIGHLIGHT&&this.showAllEditors("highlight",!0,!0),this.#U=this.isShiftKeyDown,!this.isShiftKeyDown){let e=this._signal,t=e=>{if("pointerup"!==e.type||0===e.button)window.removeEventListener("pointerup",t),window.removeEventListener("blur",t),"pointerup"===e.type&&this.#eC("main_toolbar")};window.addEventListener("pointerup",t,{signal:e}),window.addEventListener("blur",t,{signal:e})}}}#eC(e=""){this.#J===p.HIGHLIGHT?this.highlightSelection(e):this.#F&&this.#eS()}#eb(){document.addEventListener("selectionchange",this.#ek.bind(this),{signal:this._signal})}#eE(){let e=this._signal;window.addEventListener("focus",this.#er,{signal:e}),window.addEventListener("blur",this.#en,{signal:e})}#eT(){window.removeEventListener("focus",this.#er),window.removeEventListener("blur",this.#en)}blur(){if(this.isShiftKeyDown=!1,this.#U&&(this.#U=!1,this.#eC("main_toolbar")),!this.hasSelection)return;let{activeElement:e}=document;for(let t of this.#X)if(t.div.contains(e)){this.#K=[t,e],t._focusEventsAllowed=!1;break}}focus(){if(!this.#K)return;let[e,t]=this.#K;this.#K=null,t.addEventListener("focusin",()=>{e._focusEventsAllowed=!0},{once:!0,signal:this._signal}),t.focus()}#ex(){let e=this._signal;window.addEventListener("keydown",this.#ea,{signal:e}),window.addEventListener("keyup",this.#el,{signal:e})}#e_(){window.removeEventListener("keydown",this.#ea),window.removeEventListener("keyup",this.#el)}#eO(){let e=this._signal;document.addEventListener("copy",this.#ei,{signal:e}),document.addEventListener("cut",this.#eo,{signal:e}),document.addEventListener("paste",this.#es,{signal:e})}#eM(){document.removeEventListener("copy",this.#ei),document.removeEventListener("cut",this.#eo),document.removeEventListener("paste",this.#es)}#ey(){let e=this._signal;document.addEventListener("dragover",this.dragOver.bind(this),{signal:e}),document.addEventListener("drop",this.drop.bind(this),{signal:e})}addEditListeners(){this.#ex(),this.#eO()}removeEditListeners(){this.#e_(),this.#eM()}dragOver(e){for(let{type:t}of e.dataTransfer.items)for(let n of this.#j)if(n.isHandlingMimeForPasting(t)){e.dataTransfer.dropEffect="copy",e.preventDefault();return}}drop(e){for(let t of e.dataTransfer.items)for(let n of this.#j)if(n.isHandlingMimeForPasting(t.type)){n.paste(t,this.currentLayer),e.preventDefault();return}}copy(e){if(e.preventDefault(),this.#T?.commitOrRemove(),!this.hasSelection)return;let t=[];for(let e of this.#X){let n=e.serialize(!0);n&&t.push(n)}if(0!==t.length)e.clipboardData.setData("application/pdfjs",JSON.stringify(t))}cut(e){this.copy(e),this.delete()}paste(e){e.preventDefault();let{clipboardData:t}=e;for(let e of t.items)for(let t of this.#j)if(t.isHandlingMimeForPasting(e.type)){t.paste(e,this.currentLayer);return}let n=t.getData("application/pdfjs");if(!n)return;try{n=JSON.parse(n)}catch(e){C(`paste: "${e.message}".`);return}if(!Array.isArray(n))return;this.unselectAll();let r=this.currentLayer;try{let e=[];for(let t of n){let n=r.deserialize(t);if(!n)return;e.push(n)}this.addCommands({cmd:()=>{for(let t of e)this.#eI(t);this.#eP(e)},undo:()=>{for(let t of e)t.remove()},mustExec:!0})}catch(e){C(`paste: "${e.message}".`)}}keydown(e){!this.isShiftKeyDown&&"Shift"===e.key&&(this.isShiftKeyDown=!0),this.#J!==p.NONE&&!this.isEditorHandlingKeyboard&&eM._keyboardManager.exec(this,e)}keyup(e){this.isShiftKeyDown&&"Shift"===e.key&&(this.isShiftKeyDown=!1,this.#U&&(this.#U=!1,this.#eC("main_toolbar")))}onEditingAction({name:e}){switch(e){case"undo":case"redo":case"delete":case"selectAll":this[e]();break;case"highlightSelection":this.highlightSelection("context_menu")}}#eA(e){Object.entries(e).some(([e,t])=>this.#eh[e]!==t)&&(this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(this.#eh,e)}),this.#J===p.HIGHLIGHT&&!1===e.hasSelectedEditor&&this.#eD([[h.HIGHLIGHT_FREE,!0]]))}#eD(e){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:e})}setEditingState(e){e?(this.#eE(),this.#eO(),this.#eA({isEditing:this.#J!==p.NONE,isEmpty:this.#eN(),hasSomethingToUndo:this.#D.hasSomethingToUndo(),hasSomethingToRedo:this.#D.hasSomethingToRedo(),hasSelectedEditor:!1})):(this.#eT(),this.#eM(),this.#eA({isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(e){if(!this.#j)for(let t of(this.#j=e,this.#j))this.#eD(t.defaultPropertiesToUpdate)}getId(){return this.#q.id}get currentLayer(){return this.#O.get(this.#N)}getLayer(e){return this.#O.get(e)}get currentPageIndex(){return this.#N}addLayer(e){this.#O.set(e.pageIndex,e),this.#W?e.enable():e.disable()}removeLayer(e){this.#O.delete(e.pageIndex)}updateMode(e,t=null,n=!1){if(this.#J===e)return;if(this.#J=e,e===p.NONE){this.setEditingState(!1),this.#eR();return}for(let t of(this.setEditingState(!0),this.#eL(),this.unselectAll(),this.#O.values()))t.updateMode(e);if(!t&&n){this.addNewEditorFromKeyboard();return}if(!!t){for(let e of this.#_.values())if(e.annotationElementId===t){this.setSelected(e),e.enterInEditMode();break}}}addNewEditorFromKeyboard(){this.currentLayer.canCreateNewEmptyEditor()&&this.currentLayer.addNewEditor()}updateToolbar(e){if(e!==this.#J)this._eventBus.dispatch("switchannotationeditormode",{source:this,mode:e})}updateParams(e,t){if(!!this.#j){switch(e){case h.CREATE:this.currentLayer.addNewEditor();return;case h.HIGHLIGHT_DEFAULT_COLOR:this.#Y?.updateColor(t);break;case h.HIGHLIGHT_SHOW_ALL:this._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:{type:"highlight",action:"toggle_visibility"}}}),(this.#et||=new Map).set(e,t),this.showAllEditors("highlight",t)}for(let n of this.#X)n.updateParams(e,t);for(let n of this.#j)n.updateDefaultParams(e,t)}}showAllEditors(e,t,n=!1){for(let n of this.#_.values())n.editorType===e&&n.show(t);(this.#et?.get(h.HIGHLIGHT_SHOW_ALL)??!0)!==t&&this.#eD([[h.HIGHLIGHT_SHOW_ALL,t]])}enableWaiting(e=!1){if(this.#G!==e)for(let t of(this.#G=e,this.#O.values()))e?t.disableClick():t.enableClick(),t.div.classList.toggle("waiting",e)}#eL(){if(!this.#W){for(let e of(this.#W=!0,this.#O.values()))e.enable();for(let e of this.#_.values())e.enable()}}#eR(){if(this.unselectAll(),this.#W){for(let e of(this.#W=!1,this.#O.values()))e.disable();for(let e of this.#_.values())e.disable()}}getEditors(e){let t=[];for(let n of this.#_.values())n.pageIndex===e&&t.push(n);return t}getEditor(e){return this.#_.get(e)}addEditor(e){this.#_.set(e.id,e)}removeEditor(e){e.div.contains(document.activeElement)&&(this.#B&&clearTimeout(this.#B),this.#B=setTimeout(()=>{this.focusMainContainer(),this.#B=null},0)),this.#_.delete(e.id),this.unselect(e),(!e.annotationElementId||!this.#R.has(e.annotationElementId))&&this.#I?.remove(e.id)}addDeletedAnnotationElement(e){this.#R.add(e.annotationElementId),this.addChangedExistingAnnotation(e),e.deleted=!0}isDeletedAnnotationElement(e){return this.#R.has(e)}removeDeletedAnnotationElement(e){this.#R.delete(e.annotationElementId),this.removeChangedExistingAnnotation(e),e.deleted=!1}#eI(e){let t=this.#O.get(e.pageIndex);t?t.addOrRebuild(e):(this.addEditor(e),this.addToAnnotationStorage(e))}setActiveEditor(e){if(this.#T!==e)this.#T=e,e&&this.#eD(e.propertiesToUpdate)}get #ej(){let e=null;for(e of this.#X);return e}updateUI(e){this.#ej===e&&this.#eD(e.propertiesToUpdate)}toggleSelected(e){if(this.#X.has(e)){this.#X.delete(e),e.unselect(),this.#eA({hasSelectedEditor:this.hasSelection});return}this.#X.add(e),e.select(),this.#eD(e.propertiesToUpdate),this.#eA({hasSelectedEditor:!0})}setSelected(e){for(let t of this.#X)t!==e&&t.unselect();this.#X.clear(),this.#X.add(e),e.select(),this.#eD(e.propertiesToUpdate),this.#eA({hasSelectedEditor:!0})}isSelected(e){return this.#X.has(e)}get firstSelectedEditor(){return this.#X.values().next().value}unselect(e){e.unselect(),this.#X.delete(e),this.#eA({hasSelectedEditor:this.hasSelection})}get hasSelection(){return 0!==this.#X.size}get isEnterHandled(){return 1===this.#X.size&&this.firstSelectedEditor.isEnterHandled}undo(){this.#D.undo(),this.#eA({hasSomethingToUndo:this.#D.hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:this.#eN()})}redo(){this.#D.redo(),this.#eA({hasSomethingToUndo:!0,hasSomethingToRedo:this.#D.hasSomethingToRedo(),isEmpty:this.#eN()})}addCommands(e){this.#D.add(e),this.#eA({hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:this.#eN()})}#eN(){if(0===this.#_.size)return!0;if(1===this.#_.size)for(let e of this.#_.values())return e.isEmpty();return!1}delete(){if(this.commitOrRemove(),!this.hasSelection)return;let e=[...this.#X];this.addCommands({cmd:()=>{for(let t of e)t.remove()},undo:()=>{for(let t of e)this.#eI(t)},mustExec:!0})}commitOrRemove(){this.#T?.commitOrRemove()}hasSomethingToControl(){return this.#T||this.hasSelection}#eP(e){for(let e of this.#X)e.unselect();for(let t of(this.#X.clear(),e)){if(!t.isEmpty())this.#X.add(t),t.select()}this.#eA({hasSelectedEditor:this.hasSelection})}selectAll(){for(let e of this.#X)e.commit();this.#eP(this.#_.values())}unselectAll(){if((!this.#T||(this.#T.commitOrRemove(),this.#J===p.NONE))&&!!this.hasSelection){for(let e of this.#X)e.unselect();this.#X.clear(),this.#eA({hasSelectedEditor:!1})}}translateSelectedEditors(e,t,n=!1){if(!n&&this.commitOrRemove(),!this.hasSelection)return;this.#ef[0]+=e,this.#ef[1]+=t;let[r,o]=this.#ef,s=[...this.#X];for(let n of(this.#em&&clearTimeout(this.#em),this.#em=setTimeout(()=>{this.#em=null,this.#ef[0]=this.#ef[1]=0,this.addCommands({cmd:()=>{for(let e of s)this.#_.has(e.id)&&e.translateInPage(r,o)},undo:()=>{for(let e of s)this.#_.has(e.id)&&e.translateInPage(-r,-o)},mustExec:!1})},1e3),s))n.translateInPage(e,t)}setUpDragSession(){if(!!this.hasSelection)for(let e of(this.disableUserSelect(!0),this.#L=new Map,this.#X))this.#L.set(e,{savedX:e.x,savedY:e.y,savedPageIndex:e.pageIndex,newX:0,newY:0,newPageIndex:-1})}endDragSession(){if(!this.#L)return!1;this.disableUserSelect(!1);let e=this.#L;this.#L=null;let t=!1;for(let[{x:n,y:r,pageIndex:o},s]of e)s.newX=n,s.newY=r,s.newPageIndex=o,t||=n!==s.savedX||r!==s.savedY||o!==s.savedPageIndex;if(!t)return!1;let n=(e,t,n,r)=>{if(this.#_.has(e.id)){let o=this.#O.get(r);o?e._setParentAndPosition(o,t,n):(e.pageIndex=r,e.x=t,e.y=n)}};return this.addCommands({cmd:()=>{for(let[t,{newX:r,newY:o,newPageIndex:s}]of e)n(t,r,o,s)},undo:()=>{for(let[t,{savedX:r,savedY:o,savedPageIndex:s}]of e)n(t,r,o,s)},mustExec:!0}),!0}dragSelectedEditors(e,t){if(!!this.#L)for(let n of this.#L.keys())n.drag(e,t)}rebuild(e){if(null===e.parent){let t=this.getLayer(e.pageIndex);t?(t.changeParent(e),t.addOrRebuild(e)):(this.addEditor(e),this.addToAnnotationStorage(e),e.rebuild())}else e.parent.addOrRebuild(e)}get isEditorHandlingKeyboard(){return this.getActive()?.shouldGetKeyboardEvents()||1===this.#X.size&&this.firstSelectedEditor.shouldGetKeyboardEvents()}isActive(e){return this.#T===e}getActive(){return this.#T}getMode(){return this.#J}get imageManager(){return O(this,"imageManager",new eE)}getSelectionBoxes(e){let t;if(!e)return null;let n=document.getSelection();for(let t=0,r=n.rangeCount;t<r;t++)if(!e.contains(n.getRangeAt(t).commonAncestorContainer))return null;let{x:r,y:o,width:s,height:a}=e.getBoundingClientRect();switch(e.getAttribute("data-main-rotation")){case"90":t=(e,t,n,l)=>({x:(t-o)/a,y:1-(e+n-r)/s,width:l/a,height:n/s});break;case"180":t=(e,t,n,l)=>({x:1-(e+n-r)/s,y:1-(t+l-o)/a,width:n/s,height:l/a});break;case"270":t=(e,t,n,l)=>({x:1-(t+l-o)/a,y:(e-r)/s,width:l/a,height:n/s});break;default:t=(e,t,n,l)=>({x:(e-r)/s,y:(t-o)/a,width:n/s,height:l/a})}let l=[];for(let e=0,r=n.rangeCount;e<r;e++){let r=n.getRangeAt(e);if(!r.collapsed)for(let{x:e,y:n,width:o,height:s}of r.getClientRects()){if(0!==o&&0!==s)l.push(t(e,n,o,s))}}return 0===l.length?null:l}addChangedExistingAnnotation({annotationElementId:e,id:t}){(this.#P||=new Map).set(e,t)}removeChangedExistingAnnotation({annotationElementId:e}){this.#P?.delete(e)}renderAnnotationElement(e){let t=this.#P?.get(e.data.id);if(!t)return;let n=this.#I.getRawValue(t);if(!!n&&(this.#J!==p.NONE||!!n.hasBeenModified))n.renderAnnotationElement(e)}}class eI{#e$="";#eF=!1;#ez=null;#eB=null;#eH=null;#eU=!1;#o=null;static _l10nPromise=null;constructor(e){this.#o=e}static initialize(e){eI._l10nPromise||=e}async render(){let e=this.#ez=document.createElement("button");e.className="altText";let t=await eI._l10nPromise.get("pdfjs-editor-alt-text-button-label");e.textContent=t,e.setAttribute("aria-label",t),e.tabIndex="0";let n=this.#o._uiManager._signal;e.addEventListener("contextmenu",ef,{signal:n}),e.addEventListener("pointerdown",e=>e.stopPropagation(),{signal:n});let r=e=>{e.preventDefault(),this.#o._uiManager.editAltText(this.#o)};return e.addEventListener("click",r,{capture:!0,signal:n}),e.addEventListener("keydown",t=>{t.target===e&&"Enter"===t.key&&(this.#eU=!0,r(t))},{signal:n}),await this.#eV(),e}finish(){if(!!this.#ez)this.#ez.focus({focusVisible:this.#eU}),this.#eU=!1}isEmpty(){return!this.#e$&&!this.#eF}get data(){return{altText:this.#e$,decorative:this.#eF}}set data({altText:e,decorative:t}){if(this.#e$!==e||this.#eF!==t)this.#e$=e,this.#eF=t,this.#eV()}toggle(e=!1){if(!!this.#ez)!e&&this.#eH&&(clearTimeout(this.#eH),this.#eH=null),this.#ez.disabled=!e}destroy(){this.#ez?.remove(),this.#ez=null,this.#eB=null}async #eV(){let e=this.#ez;if(!e)return;if(!this.#e$&&!this.#eF){e.classList.remove("done"),this.#eB?.remove();return}e.classList.add("done"),eI._l10nPromise.get("pdfjs-editor-alt-text-edit-button-label").then(t=>{e.setAttribute("aria-label",t)});let t=this.#eB;if(!t){this.#eB=t=document.createElement("span"),t.className="tooltip",t.setAttribute("role","tooltip");let n=t.id=`alt-text-tooltip-${this.#o.id}`;e.setAttribute("aria-describedby",n);let r=this.#o._uiManager._signal;r.addEventListener("abort",()=>{clearTimeout(this.#eH),this.#eH=null},{once:!0}),e.addEventListener("mouseenter",()=>{this.#eH=setTimeout(()=>{this.#eH=null,this.#eB.classList.add("show"),this.#o._reportTelemetry({action:"alt_text_tooltip"})},100)},{signal:r}),e.addEventListener("mouseleave",()=>{this.#eH&&(clearTimeout(this.#eH),this.#eH=null),this.#eB?.classList.remove("show")},{signal:r})}t.innerText=this.#eF?await eI._l10nPromise.get("pdfjs-editor-alt-text-decorative-tooltip"):this.#e$,!t.parentNode&&e.append(t);let n=this.#o.getImageForAltText();n?.setAttribute("aria-describedby",t.id)}}class eP{#eq=null;#eW=null;#e$=null;#eG=!1;#eK=!1;#eY=null;#eZ=null;#eJ=this.focusin.bind(this);#eX=this.focusout.bind(this);#eQ=null;#e0="";#e1=!1;#e2=null;#e3=!1;#e5=!1;#e4=!1;#e6=null;#e8=0;#e9=0;#e7=null;_initialOptions=Object.create(null);_isVisible=!0;_uiManager=null;_focusEventsAllowed=!0;_l10nPromise=null;#te=!1;#tt=eP._zIndex++;static _borderLineWidth=-1;static _colorManager=new eO;static _zIndex=1;static _telemetryTimeout=1e3;static get _resizerKeyboardManager(){let e=eP.prototype._resizeWithKeyboard,t=eM.TRANSLATE_SMALL,n=eM.TRANSLATE_BIG;return O(this,"_resizerKeyboardManager",new e_([[["ArrowLeft","mac+ArrowLeft"],e,{args:[-t,0]}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],e,{args:[-n,0]}],[["ArrowRight","mac+ArrowRight"],e,{args:[t,0]}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],e,{args:[n,0]}],[["ArrowUp","mac+ArrowUp"],e,{args:[0,-t]}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],e,{args:[0,-n]}],[["ArrowDown","mac+ArrowDown"],e,{args:[0,t]}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],e,{args:[0,n]}],[["Escape","mac+Escape"],eP.prototype._stopResizingWithKeyboard]]))}constructor(e){this.constructor===eP&&E("Cannot initialize AnnotationEditor."),this.parent=e.parent,this.id=e.id,this.width=this.height=null,this.pageIndex=e.parent.pageIndex,this.name=e.name,this.div=null,this._uiManager=e.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=e.isCentered,this._structTreeParentId=null;let{rotation:t,rawDims:{pageWidth:n,pageHeight:r,pageX:o,pageY:s}}=this.parent.viewport;this.rotation=t,this.pageRotation=(360+t-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[n,r],this.pageTranslation=[o,s];let[a,l]=this.parentDimensions;this.x=e.x/a,this.y=e.y/l,this.isAttachedToDOM=!1,this.deleted=!1}get editorType(){return Object.getPrototypeOf(this).constructor._type}static get _defaultLineColor(){return O(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(e){let t=new eD({id:e.parent.getNextId(),parent:e.parent,uiManager:e._uiManager});t.annotationElementId=e.annotationElementId,t.deleted=!0,t._uiManager.addToAnnotationStorage(t)}static initialize(e,t,n){if(eP._l10nPromise||=new Map(["pdfjs-editor-alt-text-button-label","pdfjs-editor-alt-text-edit-button-label","pdfjs-editor-alt-text-decorative-tooltip","pdfjs-editor-resizer-label-topLeft","pdfjs-editor-resizer-label-topMiddle","pdfjs-editor-resizer-label-topRight","pdfjs-editor-resizer-label-middleRight","pdfjs-editor-resizer-label-bottomRight","pdfjs-editor-resizer-label-bottomMiddle","pdfjs-editor-resizer-label-bottomLeft","pdfjs-editor-resizer-label-middleLeft"].map(t=>[t,e.get(t.replaceAll(/([A-Z])/g,e=>`-${e.toLowerCase()}`))])),n?.strings)for(let t of n.strings)eP._l10nPromise.set(t,e.get(t));if(-1!==eP._borderLineWidth)return;let r=getComputedStyle(document.documentElement);eP._borderLineWidth=parseFloat(r.getPropertyValue("--outline-width"))||0}static updateDefaultParams(e,t){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(e){return!1}static paste(e,t){E("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return this.#te}set _isDraggable(e){this.#te=e,this.div?.classList.toggle("draggable",e)}get isEnterHandled(){return!0}center(){let[e,t]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*t/(2*e),this.y+=this.width*e/(2*t);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*t/(2*e),this.y-=this.width*e/(2*t);break;default:this.x-=this.width/2,this.y-=this.height/2}this.fixAndSetPosition()}addCommands(e){this._uiManager.addCommands(e)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=this.#tt}setParent(e){null!==e?(this.pageIndex=e.pageIndex,this.pageDimensions=e.pageDimensions):this.#tn(),this.parent=e}focusin(e){if(!!this._focusEventsAllowed)this.#e1?this.#e1=!1:this.parent.setSelected(this)}focusout(e){if(!this._focusEventsAllowed||!this.isAttachedToDOM)return;let t=e.relatedTarget;if(!t?.closest(`#${this.id}`))e.preventDefault(),!this.parent?.isMultipleSelection&&this.commitOrRemove()}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(e,t,n,r){let[o,s]=this.parentDimensions;[n,r]=this.screenToPageTranslation(n,r),this.x=(e+n)/o,this.y=(t+r)/s,this.fixAndSetPosition()}#tr([e,t],n,r){[n,r]=this.screenToPageTranslation(n,r),this.x+=n/e,this.y+=r/t,this.fixAndSetPosition()}translate(e,t){this.#tr(this.parentDimensions,e,t)}translateInPage(e,t){this.#e2||=[this.x,this.y],this.#tr(this.pageDimensions,e,t),this.div.scrollIntoView({block:"nearest"})}drag(e,t){this.#e2||=[this.x,this.y];let[n,r]=this.parentDimensions;if(this.x+=e/n,this.y+=t/r,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){let{x:e,y:t}=this.div.getBoundingClientRect();this.parent.findNewParent(this,e,t)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x:o,y:s}=this,[a,l]=this.getBaseTranslation();o+=a,s+=l,this.div.style.left=`${(100*o).toFixed(2)}%`,this.div.style.top=`${(100*s).toFixed(2)}%`,this.div.scrollIntoView({block:"nearest"})}get _hasBeenMoved(){return!!this.#e2&&(this.#e2[0]!==this.x||this.#e2[1]!==this.y)}getBaseTranslation(){let[e,t]=this.parentDimensions,{_borderLineWidth:n}=eP,r=n/e,o=n/t;switch(this.rotation){case 90:return[-r,o];case 180:return[r,o];case 270:return[r,-o];default:return[-r,-o]}}get _mustFixPosition(){return!0}fixAndSetPosition(e=this.rotation){let[t,n]=this.pageDimensions,{x:r,y:o,width:s,height:a}=this;if(s*=t,a*=n,r*=t,o*=n,this._mustFixPosition)switch(e){case 0:r=Math.max(0,Math.min(t-s,r)),o=Math.max(0,Math.min(n-a,o));break;case 90:r=Math.max(0,Math.min(t-a,r)),o=Math.min(n,Math.max(s,o));break;case 180:r=Math.min(t,Math.max(s,r)),o=Math.min(n,Math.max(a,o));break;case 270:r=Math.min(t,Math.max(a,r)),o=Math.max(0,Math.min(n-s,o))}this.x=r/=t,this.y=o/=n;let[l,c]=this.getBaseTranslation();r+=l,o+=c;let{style:u}=this.div;u.left=`${(100*r).toFixed(2)}%`,u.top=`${(100*o).toFixed(2)}%`,this.moveInDOM()}static #ti(e,t,n){switch(n){case 90:return[t,-e];case 180:return[-e,-t];case 270:return[-t,e];default:return[e,t]}}screenToPageTranslation(e,t){return eP.#ti(e,t,this.parentRotation)}pageTranslationToScreen(e,t){return eP.#ti(e,t,360-this.parentRotation)}#to(e){switch(e){case 90:{let[e,t]=this.pageDimensions;return[0,-e/t,t/e,0]}case 180:return[-1,0,0,-1];case 270:{let[e,t]=this.pageDimensions;return[0,e/t,-t/e,0]}default:return[1,0,0,1]}}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){let{parentScale:e,pageDimensions:[t,n]}=this,r=t*e,o=n*e;return B.isCSSRoundSupported?[Math.round(r),Math.round(o)]:[r,o]}setDims(e,t){let[n,r]=this.parentDimensions;this.div.style.width=`${(100*e/n).toFixed(2)}%`,!this.#eK&&(this.div.style.height=`${(100*t/r).toFixed(2)}%`)}fixDims(){let{style:e}=this.div,{height:t,width:n}=e,r=n.endsWith("%"),o=!this.#eK&&t.endsWith("%");if(r&&o)return;let[s,a]=this.parentDimensions;!r&&(e.width=`${(100*parseFloat(n)/s).toFixed(2)}%`),!this.#eK&&!o&&(e.height=`${(100*parseFloat(t)/a).toFixed(2)}%`)}getInitialTranslation(){return[0,0]}#ts(){if(this.#eY)return;this.#eY=document.createElement("div"),this.#eY.classList.add("resizers");let e=this._willKeepAspectRatio?["topLeft","topRight","bottomRight","bottomLeft"]:["topLeft","topMiddle","topRight","middleRight","bottomRight","bottomMiddle","bottomLeft","middleLeft"],t=this._uiManager._signal;for(let n of e){let e=document.createElement("div");this.#eY.append(e),e.classList.add("resizer",n),e.setAttribute("data-resizer-name",n),e.addEventListener("pointerdown",this.#ta.bind(this,n),{signal:t}),e.addEventListener("contextmenu",ef,{signal:t}),e.tabIndex=-1}this.div.prepend(this.#eY)}#ta(e,t){t.preventDefault();let{isMac:n}=B.platform;if(0!==t.button||t.ctrlKey&&n)return;this.#e$?.toggle(!1);let r=this.#tl.bind(this,e),o=this._isDraggable;this._isDraggable=!1;let s=this._uiManager._signal,a={passive:!0,capture:!0,signal:s};this.parent.togglePointerEvents(!1),window.addEventListener("pointermove",r,a),window.addEventListener("contextmenu",ef,{signal:s});let l=this.x,c=this.y,u=this.width,d=this.height,p=this.parent.div.style.cursor,h=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(t.target).cursor;let f=()=>{this.parent.togglePointerEvents(!0),this.#e$?.toggle(!0),this._isDraggable=o,window.removeEventListener("pointerup",f),window.removeEventListener("blur",f),window.removeEventListener("pointermove",r,a),window.removeEventListener("contextmenu",ef),this.parent.div.style.cursor=p,this.div.style.cursor=h,this.#tc(l,c,u,d)};window.addEventListener("pointerup",f,{signal:s}),window.addEventListener("blur",f,{signal:s})}#tc(e,t,n,r){let o=this.x,s=this.y,a=this.width,l=this.height;if(o!==e||s!==t||a!==n||l!==r)this.addCommands({cmd:()=>{this.width=a,this.height=l,this.x=o,this.y=s;let[e,t]=this.parentDimensions;this.setDims(e*a,t*l),this.fixAndSetPosition()},undo:()=>{this.width=n,this.height=r,this.x=e,this.y=t;let[o,s]=this.parentDimensions;this.setDims(o*n,s*r),this.fixAndSetPosition()},mustExec:!0})}#tl(e,t){let n,r,o,s;let[a,l]=this.parentDimensions,c=this.x,u=this.y,d=this.width,p=this.height,h=eP.MIN_SIZE/a,f=eP.MIN_SIZE/l,m=e=>Math.round(1e4*e)/1e4,g=this.#to(this.rotation),v=(e,t)=>[g[0]*e+g[2]*t,g[1]*e+g[3]*t],b=this.#to(360-this.rotation),y=!1,x=!1;switch(e){case"topLeft":y=!0,n=(e,t)=>[0,0],r=(e,t)=>[e,t];break;case"topMiddle":n=(e,t)=>[e/2,0],r=(e,t)=>[e/2,t];break;case"topRight":y=!0,n=(e,t)=>[e,0],r=(e,t)=>[0,t];break;case"middleRight":x=!0,n=(e,t)=>[e,t/2],r=(e,t)=>[0,t/2];break;case"bottomRight":y=!0,n=(e,t)=>[e,t],r=(e,t)=>[0,0];break;case"bottomMiddle":n=(e,t)=>[e/2,t],r=(e,t)=>[e/2,0];break;case"bottomLeft":y=!0,n=(e,t)=>[0,t],r=(e,t)=>[e,0];break;case"middleLeft":x=!0,n=(e,t)=>[0,t/2],r=(e,t)=>[e,t/2]}let w=n(d,p),S=r(d,p),k=v(...S),A=m(c+k[0]),C=m(u+k[1]),E=1,T=1,[_,O]=this.screenToPageTranslation(t.movementX,t.movementY);if([_,O]=(o=_/a,s=O/l,[b[0]*o+b[2]*s,b[1]*o+b[3]*s]),y){let e=Math.hypot(d,p);E=T=Math.max(Math.min(Math.hypot(S[0]-w[0]-_,S[1]-w[1]-O)/e,1/d,1/p),h/d,f/p)}else x?E=Math.max(h,Math.min(1,Math.abs(S[0]-w[0]-_)))/d:T=Math.max(f,Math.min(1,Math.abs(S[1]-w[1]-O)))/p;let M=m(d*E),I=m(p*T),P=A-(k=v(...r(M,I)))[0],D=C-k[1];this.width=M,this.height=I,this.x=P,this.y=D,this.setDims(a*M,l*I),this.fixAndSetPosition()}altTextFinish(){this.#e$?.finish()}async addEditToolbar(){return this.#eQ||this.#e5?this.#eQ:(this.#eQ=new eS(this),this.div.append(this.#eQ.render()),this.#e$&&this.#eQ.addAltTextButton(await this.#e$.render()),this.#eQ)}removeEditToolbar(){if(!!this.#eQ)this.#eQ.remove(),this.#eQ=null,this.#e$?.destroy()}getClientDimensions(){return this.div.getBoundingClientRect()}async addAltTextButton(){if(!this.#e$)eI.initialize(eP._l10nPromise),this.#e$=new eI(this),this.#eq&&(this.#e$.data=this.#eq,this.#eq=null),await this.addEditToolbar()}get altTextData(){return this.#e$?.data}set altTextData(e){if(!!this.#e$)this.#e$.data=e}hasAltText(){return!this.#e$?.isEmpty()}render(){this.div=document.createElement("div"),this.div.setAttribute("data-editor-rotation",(360-this.rotation)%360),this.div.className=this.name,this.div.setAttribute("id",this.id),this.div.tabIndex=this.#eG?-1:0,!this._isVisible&&this.div.classList.add("hidden"),this.setInForeground();let e=this._uiManager._signal;this.div.addEventListener("focusin",this.#eJ,{signal:e}),this.div.addEventListener("focusout",this.#eX,{signal:e});let[t,n]=this.parentDimensions;this.parentRotation%180!=0&&(this.div.style.maxWidth=`${(100*n/t).toFixed(2)}%`,this.div.style.maxHeight=`${(100*t/n).toFixed(2)}%`);let[r,o]=this.getInitialTranslation();return this.translate(r,o),eA(this,this.div,["pointerdown"]),this.div}pointerdown(e){let{isMac:t}=B.platform;if(0!==e.button||e.ctrlKey&&t){e.preventDefault();return}if(this.#e1=!0,this._isDraggable){this.#tu(e);return}this.#td(e)}#td(e){let{isMac:t}=B.platform;e.ctrlKey&&!t||e.shiftKey||e.metaKey&&t?this.parent.toggleSelected(this):this.parent.setSelected(this)}#tu(e){let t,n;let r=this._uiManager.isSelected(this);this._uiManager.setUpDragSession();let o=this._uiManager._signal;r&&(this.div.classList.add("moving"),t={passive:!0,capture:!0,signal:o},this.#e8=e.clientX,this.#e9=e.clientY,n=e=>{let{clientX:t,clientY:n}=e,[r,o]=this.screenToPageTranslation(t-this.#e8,n-this.#e9);this.#e8=t,this.#e9=n,this._uiManager.dragSelectedEditors(r,o)},window.addEventListener("pointermove",n,t));let s=()=>{window.removeEventListener("pointerup",s),window.removeEventListener("blur",s),r&&(this.div.classList.remove("moving"),window.removeEventListener("pointermove",n,t)),this.#e1=!1,!this._uiManager.endDragSession()&&this.#td(e)};window.addEventListener("pointerup",s,{signal:o}),window.addEventListener("blur",s,{signal:o})}moveInDOM(){this.#e6&&clearTimeout(this.#e6),this.#e6=setTimeout(()=>{this.#e6=null,this.parent?.moveEditorInDOM(this)},0)}_setParentAndPosition(e,t,n){e.changeParent(this),this.x=t,this.y=n,this.fixAndSetPosition()}getRect(e,t,n=this.rotation){let r=this.parentScale,[o,s]=this.pageDimensions,[a,l]=this.pageTranslation,c=e/r,u=t/r,d=this.x*o,p=this.y*s,h=this.width*o,f=this.height*s;switch(n){case 0:return[d+c+a,s-p-u-f+l,d+c+h+a,s-p-u+l];case 90:return[d+u+a,s-p+c+l,d+u+f+a,s-p+c+h+l];case 180:return[d-c-h+a,s-p+u+l,d-c+a,s-p+u+f+l];case 270:return[d-u-f+a,s-p-c-h+l,d-u+a,s-p-c+l];default:throw Error("Invalid rotation")}}getRectInCurrentCoords(e,t){let[n,r,o,s]=e,a=o-n,l=s-r;switch(this.rotation){case 0:return[n,t-s,a,l];case 90:return[n,t-r,l,a];case 180:return[o,t-r,a,l];case 270:return[o,t-s,l,a];default:throw Error("Invalid rotation")}}onceAdded(){}isEmpty(){return!1}enableEditMode(){this.#e5=!0}disableEditMode(){this.#e5=!1}isInEditMode(){return this.#e5}shouldGetKeyboardEvents(){return this.#e4}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}rebuild(){let e=this._uiManager._signal;this.div?.addEventListener("focusin",this.#eJ,{signal:e}),this.div?.addEventListener("focusout",this.#eX,{signal:e})}rotate(e){}serialize(e=!1,t=null){E("An editor must be serializable")}static deserialize(e,t,n){let r=new this.prototype.constructor({parent:t,id:t.getNextId(),uiManager:n});r.rotation=e.rotation,r.#eq=e.accessibilityData;let[o,s]=r.pageDimensions,[a,l,c,u]=r.getRectInCurrentCoords(e.rect,s);return r.x=a/o,r.y=l/s,r.width=c/o,r.height=u/s,r}get hasBeenModified(){return!!this.annotationElementId&&(this.deleted||null!==this.serialize())}remove(){if(this.div.removeEventListener("focusin",this.#eJ),this.div.removeEventListener("focusout",this.#eX),!this.isEmpty()&&this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),this.#e6&&(clearTimeout(this.#e6),this.#e6=null),this.#tn(),this.removeEditToolbar(),this.#e7){for(let e of this.#e7.values())clearTimeout(e);this.#e7=null}this.parent=null}get isResizable(){return!1}makeResizable(){this.isResizable&&(this.#ts(),this.#eY.classList.remove("hidden"),eA(this,this.div,["keydown"]))}get toolbarPosition(){return null}keydown(e){if(!this.isResizable||e.target!==this.div||"Enter"!==e.key)return;this._uiManager.setSelected(this),this.#eZ={savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height};let t=this.#eY.children;if(!this.#eW){this.#eW=Array.from(t);let e=this.#tp.bind(this),n=this.#th.bind(this),r=this._uiManager._signal;for(let t of this.#eW){let o=t.getAttribute("data-resizer-name");t.setAttribute("role","spinbutton"),t.addEventListener("keydown",e,{signal:r}),t.addEventListener("blur",n,{signal:r}),t.addEventListener("focus",this.#tf.bind(this,o),{signal:r}),eP._l10nPromise.get(`pdfjs-editor-resizer-label-${o}`).then(e=>t.setAttribute("aria-label",e))}}let n=this.#eW[0],r=0;for(let e of t){if(e===n)break;r++}let o=(360-this.rotation+this.parentRotation)%360/90*(this.#eW.length/4);if(o!==r){if(o<r)for(let e=0;e<r-o;e++)this.#eY.append(this.#eY.firstChild);else if(o>r)for(let e=0;e<o-r;e++)this.#eY.firstChild.before(this.#eY.lastChild);let e=0;for(let n of t){let t=this.#eW[e++].getAttribute("data-resizer-name");eP._l10nPromise.get(`pdfjs-editor-resizer-label-${t}`).then(e=>n.setAttribute("aria-label",e))}}this.#tm(0),this.#e4=!0,this.#eY.firstChild.focus({focusVisible:!0}),e.preventDefault(),e.stopImmediatePropagation()}#tp(e){eP._resizerKeyboardManager.exec(this,e)}#th(e){this.#e4&&e.relatedTarget?.parentNode!==this.#eY&&this.#tn()}#tf(e){this.#e0=this.#e4?e:""}#tm(e){if(!!this.#eW)for(let t of this.#eW)t.tabIndex=e}_resizeWithKeyboard(e,t){if(!!this.#e4)this.#tl(this.#e0,{movementX:e,movementY:t})}#tn(){if(this.#e4=!1,this.#tm(-1),this.#eZ){let{savedX:e,savedY:t,savedWidth:n,savedHeight:r}=this.#eZ;this.#tc(e,t,n,r),this.#eZ=null}}_stopResizingWithKeyboard(){this.#tn(),this.div.focus()}select(){if(this.makeResizable(),this.div?.classList.add("selectedEditor"),!this.#eQ){this.addEditToolbar().then(()=>{this.div?.classList.contains("selectedEditor")&&this.#eQ?.show()});return}this.#eQ?.show()}unselect(){this.#eY?.classList.add("hidden"),this.div?.classList.remove("selectedEditor"),this.div?.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus({preventScroll:!0}),this.#eQ?.hide()}updateParams(e,t){}disableEditing(){}enableEditing(){}enterInEditMode(){}getImageForAltText(){return null}get contentDiv(){return this.div}get isEditing(){return this.#e3}set isEditing(e){if(this.#e3=e,!!this.parent)e?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null)}setAspectRatio(e,t){this.#eK=!0;let{style:n}=this.div;n.aspectRatio=e/t,n.height="auto"}static get MIN_SIZE(){return 16}static canCreateNewEmptyEditor(){return!0}get telemetryInitialData(){return{action:"added"}}get telemetryFinalData(){return null}_reportTelemetry(e,t=!1){if(t){this.#e7||=new Map;let{action:t}=e,n=this.#e7.get(t);n&&clearTimeout(n),n=setTimeout(()=>{this._reportTelemetry(e),this.#e7.delete(t),0===this.#e7.size&&(this.#e7=null)},eP._telemetryTimeout),this.#e7.set(t,n);return}e.type||=this.editorType,this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:e}})}show(e=this._isVisible){this.div.classList.toggle("hidden",!e),this._isVisible=e}enable(){this.div&&(this.div.tabIndex=0),this.#eG=!1}disable(){this.div&&(this.div.tabIndex=-1),this.#eG=!0}renderAnnotationElement(e){let t=e.container.querySelector(".annotationContent");if(t){if("CANVAS"===t.nodeName){let e=t;(t=document.createElement("div")).classList.add("annotationContent",this.editorType),e.before(t)}}else(t=document.createElement("div")).classList.add("annotationContent",this.editorType),e.container.prepend(t);return t}resetAnnotationElement(e){let{firstChild:t}=e.container;"DIV"===t.nodeName&&t.classList.contains("annotationContent")&&t.remove()}}class eD extends eP{constructor(e){super(e),this.annotationElementId=e.annotationElementId,this.deleted=!0}serialize(){return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex}}}class eN{constructor(e){this.h1=e?0xffffffff&e:0xc3d2e1f0,this.h2=e?0xffffffff&e:0xc3d2e1f0}update(e){let t,n;if("string"==typeof e){t=new Uint8Array(2*e.length),n=0;for(let r=0,o=e.length;r<o;r++){let o=e.charCodeAt(r);o<=255?t[n++]=o:(t[n++]=o>>>8,t[n++]=255&o)}}else if(ArrayBuffer.isView(e))n=(t=e.slice()).byteLength;else throw Error("Invalid data format, must be a string or TypedArray.");let r=n>>2,o=n-4*r,s=new Uint32Array(t.buffer,0,r),a=0,l=0,c=this.h1,u=this.h2,d=11601,p=13715;for(let e=0;e<r;e++)1&e?(c^=a=0x1b873593*(a=(a=0xcc9e2d51*(a=s[e])&0xffff0000|a*d&65535)<<15|a>>>17)&0xffff0000|a*p&65535,c=5*(c=c<<13|c>>>19)+0xe6546b64):(u^=l=0x1b873593*(l=(l=0xcc9e2d51*(l=s[e])&0xffff0000|l*d&65535)<<15|l>>>17)&0xffff0000|l*p&65535,u=5*(u=u<<13|u>>>19)+0xe6546b64);switch(a=0,o){case 3:a^=t[4*r+2]<<16;case 2:a^=t[4*r+1]<<8;case 1:a^=t[4*r],a=0x1b873593*(a=(a=0xcc9e2d51*a&0xffff0000|a*d&65535)<<15|a>>>17)&0xffff0000|a*p&65535,1&r?c^=a:u^=a}this.h1=c,this.h2=u}hexdigest(){let e=this.h1,t=this.h2;return e^=t>>>1,t=0xff51afd7*t&0xffff0000|((t<<16|(e=0xed558ccd*e&0xffff0000|36045*e&65535)>>>16)*0xafd7ed55&0xffff0000)>>>16,e^=t>>>1,t=0xc4ceb9fe*t&0xffff0000|((t<<16|(e=0x1a85ec53*e&0xffff0000|60499*e&65535)>>>16)*0xb9fe1a85&0xffff0000)>>>16,((e^=t>>>1)>>>0).toString(16).padStart(8,"0")+(t>>>0).toString(16).padStart(8,"0")}}let eR=Object.freeze({map:null,hash:"",transfer:void 0});class eL{#tg=!1;#tv=new Map;constructor(){this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(e,t){let n=this.#tv.get(e);return void 0===n?t:Object.assign(t,n)}getRawValue(e){return this.#tv.get(e)}remove(e){if(this.#tv.delete(e),0===this.#tv.size&&this.resetModified(),"function"==typeof this.onAnnotationEditor){for(let e of this.#tv.values())if(e instanceof eP)return;this.onAnnotationEditor(null)}}setValue(e,t){let n=this.#tv.get(e),r=!1;if(void 0!==n)for(let[e,o]of Object.entries(t))n[e]!==o&&(r=!0,n[e]=o);else r=!0,this.#tv.set(e,t);r&&this.#tb(),t instanceof eP&&"function"==typeof this.onAnnotationEditor&&this.onAnnotationEditor(t.constructor._type)}has(e){return this.#tv.has(e)}getAll(){return this.#tv.size>0?z(this.#tv):null}setAll(e){for(let[t,n]of Object.entries(e))this.setValue(t,n)}get size(){return this.#tv.size}#tb(){!this.#tg&&(this.#tg=!0,"function"==typeof this.onSetModified&&this.onSetModified())}resetModified(){this.#tg&&(this.#tg=!1,"function"==typeof this.onResetModified&&this.onResetModified())}get print(){return new ej(this)}get serializable(){if(0===this.#tv.size)return eR;let e=new Map,t=new eN,n=[],r=Object.create(null),o=!1;for(let[n,s]of this.#tv){let a=s instanceof eP?s.serialize(!1,r):s;a&&(e.set(n,a),t.update(`${n}:${JSON.stringify(a)}`),o||=!!a.bitmap)}if(o)for(let t of e.values())t.bitmap&&n.push(t.bitmap);return e.size>0?{map:e,hash:t.hexdigest(),transfer:n}:eR}get editorStats(){let e=null,t=new Map;for(let n of this.#tv.values()){if(!(n instanceof eP))continue;let r=n.telemetryFinalData;if(!r)continue;let{type:o}=r;!t.has(o)&&t.set(o,Object.getPrototypeOf(n).constructor),e||=Object.create(null);let s=e[o]||=new Map;for(let[e,t]of Object.entries(r)){if("type"===e)continue;let n=s.get(e);!n&&(n=new Map,s.set(e,n));let r=n.get(t)??0;n.set(t,r+1)}}for(let[n,r]of t)e[n]=r.computeTelemetryFinalData(e[n]);return e}}class ej extends eL{#ty;constructor(e){super();let{map:t,hash:n,transfer:r}=e.serializable,o=structuredClone(t,r?{transfer:r}:null);this.#ty={map:o,hash:n,transfer:r}}get print(){E("Should not call PrintAnnotationStorage.print")}get serializable(){return this.#ty}}class e${#tx=new Set;constructor({ownerDocument:e=globalThis.document,styleElement:t=null}){this._document=e,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(e){this.nativeFontFaces.add(e),this._document.fonts.add(e)}removeNativeFontFace(e){this.nativeFontFaces.delete(e),this._document.fonts.delete(e)}insertRule(e){!this.styleElement&&(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));let t=this.styleElement.sheet;t.insertRule(e,t.cssRules.length)}clear(){for(let e of this.nativeFontFaces)this._document.fonts.delete(e);this.nativeFontFaces.clear(),this.#tx.clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async loadSystemFont({systemFontInfo:e,_inspectFont:t}){if(!(!e||this.#tx.has(e.loadedName))){if(T(!this.disableFontFace,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){let{loadedName:n,src:r,style:o}=e,s=new FontFace(n,r,o);this.addNativeFontFace(s);try{await s.load(),this.#tx.add(n),t?.(e)}catch{C(`Cannot load system font: ${e.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(s)}return}E("Not implemented: loadSystemFont without the Font Loading API.")}}async bind(e){if(e.attached||e.missingFile&&!e.systemFontInfo)return;if(e.attached=!0,e.systemFontInfo){await this.loadSystemFont(e);return}if(this.isFontLoadingAPISupported){let t=e.createNativeFontFace();if(t){this.addNativeFontFace(t);try{await t.loaded}catch(n){throw C(`Failed to load font '${t.family}': '${n}'.`),e.disableFontFace=!0,n}}return}let t=e.createFontFaceRule();if(t){if(this.insertRule(t),this.isSyncFontLoadingSupported)return;await new Promise(t=>{let n=this._queueLoadingCallback(t);this._prepareFontLoadEvent(e,n)})}}get isFontLoadingAPISupported(){return O(this,"isFontLoadingAPISupported",!!this._document?.fonts)}get isSyncFontLoadingSupported(){let e=!1;return a?e=!0:"undefined"!=typeof navigator&&"string"==typeof navigator?.userAgent&&/Mozilla\/5.0.*?rv:\d+.*? Gecko/.test(navigator.userAgent)&&(e=!0),O(this,"isSyncFontLoadingSupported",e)}_queueLoadingCallback(e){let{loadingRequests:t}=this,n={done:!1,complete:function(){for(T(!n.done,"completeRequest() cannot be called twice."),n.done=!0;t.length>0&&t[0].done;)setTimeout(t.shift().callback,0)},callback:e};return t.push(n),n}get _loadTestFont(){return O(this,"_loadTestFont",atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA=="))}_prepareFontLoadEvent(e,t){var n;let r,o;function s(e,t){return e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|255&e.charCodeAt(t+3)}function a(e,t,n,r){let o=e.substring(0,t);return o+r+e.substring(t+n)}let l=this._document.createElement("canvas");l.width=1,l.height=1;let c=l.getContext("2d"),u=0,d=`lt${Date.now()}${this.loadTestFontId++}`,p=this._loadTestFont;p=a(p,976,d.length,d);let h=s(p,16);for(r=0,o=d.length-3;r<o;r+=4)h=h-0x58585858+s(d,r)|0;r<d.length&&(h=h-0x58585858+s(d+"XXX",r)|0),p=a(p,16,4,String.fromCharCode((n=h)>>24&255,n>>16&255,n>>8&255,255&n));let f=`url(data:font/opentype;base64,${btoa(p)});`,m=`@font-face {font-family:"${d}";src:${f}}`;this.insertRule(m);let g=this._document.createElement("div");for(let t of(g.style.visibility="hidden",g.style.width=g.style.height="10px",g.style.position="absolute",g.style.top=g.style.left="0px",[e.loadedName,d])){let e=this._document.createElement("span");e.textContent="Hi",e.style.fontFamily=t,g.append(e)}this._document.body.append(g),!function e(t,n){if(++u>30){C("Load test font never loaded."),n();return}if(c.font="30px "+t,c.fillText(".",0,20),c.getImageData(0,0,1,1).data[3]>0){n();return}setTimeout(e.bind(null,t,n))}(d,()=>{g.remove(),t.complete()})}}class eF{constructor(e,{disableFontFace:t=!1,inspectFont:n=null}){for(let t in this.compiledGlyphs=Object.create(null),e)this[t]=e[t];this.disableFontFace=!0===t,this._inspectFont=n}createNativeFontFace(){let e;if(!this.data||this.disableFontFace)return null;if(this.cssFontInfo){let t={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(t.style=`oblique ${this.cssFontInfo.italicAngle}deg`),e=new FontFace(this.cssFontInfo.fontFamily,this.data,t)}else e=new FontFace(this.loadedName,this.data,{});return this._inspectFont?.(this),e}createFontFaceRule(){let e;if(!this.data||this.disableFontFace)return null;let t=$(this.data),n=`url(data:${this.mimetype};base64,${btoa(t)});`;if(this.cssFontInfo){let t=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(t+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),e=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${t}src:${n}}`}else e=`@font-face {font-family:"${this.loadedName}";src:${n}}`;return this._inspectFont?.(this,n),e}getPathGenerator(e,t){let n;if(void 0!==this.compiledGlyphs[t])return this.compiledGlyphs[t];try{n=e.get(this.loadedName+"_path_"+t)}catch(e){C(`getPathGenerator - ignoring character: "${e}".`)}if(!Array.isArray(n)||0===n.length)return this.compiledGlyphs[t]=function(e,t){};let r=[];for(let e=0,t=n.length;e<t;)switch(n[e++]){case K.BEZIER_CURVE_TO:{let[t,o,s,a,l,c]=n.slice(e,e+6);r.push(e=>e.bezierCurveTo(t,o,s,a,l,c)),e+=6}break;case K.MOVE_TO:{let[t,o]=n.slice(e,e+2);r.push(e=>e.moveTo(t,o)),e+=2}break;case K.LINE_TO:{let[t,o]=n.slice(e,e+2);r.push(e=>e.lineTo(t,o)),e+=2}break;case K.QUADRATIC_CURVE_TO:{let[t,o,s,a]=n.slice(e,e+4);r.push(e=>e.quadraticCurveTo(t,o,s,a)),e+=4}break;case K.RESTORE:r.push(e=>e.restore());break;case K.SAVE:r.push(e=>e.save());break;case K.SCALE:T(2===r.length,"Scale command is only valid at the third position.");break;case K.TRANSFORM:{let[t,o,s,a,l,c]=n.slice(e,e+6);r.push(e=>e.transform(t,o,s,a,l,c)),e+=6}break;case K.TRANSLATE:{let[t,o]=n.slice(e,e+2);r.push(e=>e.translate(t,o)),e+=2}}return this.compiledGlyphs[t]=function(e,t){r[0](e),r[1](e),e.scale(t,-t);for(let t=2,n=r.length;t<n;t++)r[t](e)}}}if(a){var ez=Promise.withResolvers(),eB=null;(async()=>{let e,t;let n=await import("fs"),r=await import("http"),o=await import("https");return new Map(Object.entries({fs:n,http:r,https:o,url:await import("url"),canvas:e,path2d:t}))})().then(e=>{eB=e,ez.resolve()},e=>{C(`loadPackages: ${e}`),eB=new Map,ez.resolve()})}class eH{static get promise(){return ez.promise}static get(e){return eB?.get(e)}}let eU=function(e){return eH.get("fs").promises.readFile(e).then(e=>new Uint8Array(e))},eV={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};function eq(e,t){if(!t)return;let n=t[2]-t[0],r=t[3]-t[1],o=new Path2D;o.rect(t[0],t[1],n,r),e.clip(o)}class eW{constructor(){this.constructor===eW&&E("Cannot initialize BaseShadingPattern.")}getPattern(){E("Abstract method `getPattern` called.")}}class eG extends eW{constructor(e){super(),this._type=e[1],this._bbox=e[2],this._colorStops=e[3],this._p0=e[4],this._p1=e[5],this._r0=e[6],this._r1=e[7],this.matrix=null}_createGradient(e){let t;for(let n of("axial"===this._type?t=e.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):"radial"===this._type&&(t=e.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1)),this._colorStops))t.addColorStop(n[0],n[1]);return t}getPattern(e,t,n,r){let o;if(r===eV.STROKE||r===eV.FILL){let s=t.current.getClippedPathBoundingBox(r,ey(e))||[0,0,0,0],a=Math.ceil(s[2]-s[0])||1,l=Math.ceil(s[3]-s[1])||1,c=t.cachedCanvases.getCanvas("pattern",a,l,!0),u=c.context;u.clearRect(0,0,u.canvas.width,u.canvas.height),u.beginPath(),u.rect(0,0,u.canvas.width,u.canvas.height),u.translate(-s[0],-s[1]),n=U.transform(n,[1,0,0,1,s[0],s[1]]),u.transform(...t.baseTransform),this.matrix&&u.transform(...this.matrix),eq(u,this._bbox),u.fillStyle=this._createGradient(u),u.fill(),o=e.createPattern(c.canvas,"no-repeat");let d=new DOMMatrix(n);o.setTransform(d)}else eq(e,this._bbox),o=this._createGradient(e);return o}}function eK(e,t,n,r,o,s,a,l){let c,u,d,p,h,f,m,g,v;let b=t.coords,y=t.colors,x=e.data,w=4*e.width;b[n+1]>b[r+1]&&(c=n,n=r,r=c,c=s,s=a,a=c),b[r+1]>b[o+1]&&(c=r,r=o,o=c,c=a,a=l,l=c),b[n+1]>b[r+1]&&(c=n,n=r,r=c,c=s,s=a,a=c);let S=(b[n]+t.offsetX)*t.scaleX,k=(b[n+1]+t.offsetY)*t.scaleY,A=(b[r]+t.offsetX)*t.scaleX,C=(b[r+1]+t.offsetY)*t.scaleY,E=(b[o]+t.offsetX)*t.scaleX,T=(b[o+1]+t.offsetY)*t.scaleY;if(k>=T)return;let _=y[s],O=y[s+1],M=y[s+2],I=y[a],P=y[a+1],D=y[a+2],N=y[l],R=y[l+1],L=y[l+2],j=Math.round(k),$=Math.round(T);for(let e=j;e<=$;e++){let t;if(e<C){let t=e<k?0:(k-e)/(k-C);u=S-(S-A)*t,d=_-(_-I)*t,p=O-(O-P)*t,h=M-(M-D)*t}else{let t;u=A-(A-E)*(t=e>T?1:C===T?0:(C-e)/(C-T)),d=I-(I-N)*t,p=P-(P-R)*t,h=D-(D-L)*t}f=S-(S-E)*(t=e<k?0:e>T?1:(k-e)/(k-T)),m=_-(_-N)*t,g=O-(O-R)*t,v=M-(M-L)*t;let n=Math.round(Math.min(u,f)),r=Math.round(Math.max(u,f)),o=w*e+4*n;for(let e=n;e<=r;e++)(t=(u-e)/(u-f))<0?t=0:t>1&&(t=1),x[o++]=d-(d-m)*t|0,x[o++]=p-(p-g)*t|0,x[o++]=h-(h-v)*t|0,x[o++]=255}}class eY extends eW{constructor(e){super(),this._coords=e[2],this._colors=e[3],this._figures=e[4],this._bounds=e[5],this._bbox=e[7],this._background=e[8],this.matrix=null}_createMeshCanvas(e,t,n){let r=Math.floor(this._bounds[0]),o=Math.floor(this._bounds[1]),s=Math.ceil(this._bounds[2])-r,a=Math.ceil(this._bounds[3])-o,l=Math.min(Math.ceil(Math.abs(s*e[0]*1.1)),3e3),c=Math.min(Math.ceil(Math.abs(a*e[1]*1.1)),3e3),u=s/l,d=a/c,p={coords:this._coords,colors:this._colors,offsetX:-r,offsetY:-o,scaleX:1/u,scaleY:1/d},h=l+4,f=c+4,m=n.getCanvas("mesh",h,f,!1),g=m.context,v=g.createImageData(l,c);if(t){let e=v.data;for(let n=0,r=e.length;n<r;n+=4)e[n]=t[0],e[n+1]=t[1],e[n+2]=t[2],e[n+3]=255}for(let e of this._figures)!function(e,t,n){let r,o;let s=t.coords,a=t.colors;switch(t.type){case"lattice":let l=t.verticesPerRow,c=Math.floor(s.length/l)-1,u=l-1;for(r=0;r<c;r++){let t=r*l;for(let r=0;r<u;r++,t++)eK(e,n,s[t],s[t+1],s[t+l],a[t],a[t+1],a[t+l]),eK(e,n,s[t+l+1],s[t+1],s[t+l],a[t+l+1],a[t+1],a[t+l])}break;case"triangles":for(r=0,o=s.length;r<o;r+=3)eK(e,n,s[r],s[r+1],s[r+2],a[r],a[r+1],a[r+2]);break;default:throw Error("illegal figure")}}(v,e,p);return g.putImageData(v,2,2),{canvas:m.canvas,offsetX:r-2*u,offsetY:o-2*d,scaleX:u,scaleY:d}}getPattern(e,t,n,r){let o;if(eq(e,this._bbox),r===eV.SHADING)o=U.singularValueDecompose2dScale(ey(e));else if(o=U.singularValueDecompose2dScale(t.baseTransform),this.matrix){let e=U.singularValueDecompose2dScale(this.matrix);o=[o[0]*e[0],o[1]*e[1]]}let s=this._createMeshCanvas(o,r===eV.SHADING?null:this._background,t.cachedCanvases);return r!==eV.SHADING&&(e.setTransform(...t.baseTransform),this.matrix&&e.transform(...this.matrix)),e.translate(s.offsetX,s.offsetY),e.scale(s.scaleX,s.scaleY),e.createPattern(s.canvas,"no-repeat")}}class eZ extends eW{getPattern(){return"hotpink"}}let eJ={COLORED:1,UNCOLORED:2};class eX{static MAX_PATTERN_SIZE=3e3;constructor(e,t,n,r,o){this.operatorList=e[2],this.matrix=e[3],this.bbox=e[4],this.xstep=e[5],this.ystep=e[6],this.paintType=e[7],this.tilingType=e[8],this.color=t,this.ctx=n,this.canvasGraphicsFactory=r,this.baseTransform=o}createPatternCanvas(e){let t=this.operatorList,n=this.bbox,r=this.xstep,o=this.ystep,s=this.paintType,a=this.tilingType,l=this.color,c=this.canvasGraphicsFactory;A("TilingType: "+a);let u=n[0],d=n[1],p=n[2],h=n[3],f=U.singularValueDecompose2dScale(this.matrix),m=U.singularValueDecompose2dScale(this.baseTransform),g=[f[0]*m[0],f[1]*m[1]],v=this.getSizeAndScale(r,this.ctx.canvas.width,g[0]),b=this.getSizeAndScale(o,this.ctx.canvas.height,g[1]),y=e.cachedCanvases.getCanvas("pattern",v.size,b.size,!0),x=y.context,w=c.createCanvasGraphics(x);w.groupLevel=e.groupLevel,this.setFillAndStrokeStyleToContext(w,s,l);let S=u,k=d,C=p,E=h;return u<0&&(S=0,C+=Math.abs(u)),d<0&&(k=0,E+=Math.abs(d)),x.translate(-(v.scale*S),-(b.scale*k)),w.transform(v.scale,0,0,b.scale,0,0),x.save(),this.clipBbox(w,S,k,C,E),w.baseTransform=ey(w.ctx),w.executeOperatorList(t),w.endDrawing(),{canvas:y.canvas,scaleX:v.scale,scaleY:b.scale,offsetX:S,offsetY:k}}getSizeAndScale(e,t,n){e=Math.abs(e);let r=Math.max(eX.MAX_PATTERN_SIZE,t),o=Math.ceil(e*n);return o>=r?o=r:n=o/e,{scale:n,size:o}}clipBbox(e,t,n,r,o){let s=r-t,a=o-n;e.ctx.rect(t,n,s,a),e.current.updateRectMinMax(ey(e.ctx),[t,n,r,o]),e.clip(),e.endPath()}setFillAndStrokeStyleToContext(e,t,n){let r=e.ctx,o=e.current;switch(t){case eJ.COLORED:let s=this.ctx;r.fillStyle=s.fillStyle,r.strokeStyle=s.strokeStyle,o.fillColor=s.fillStyle,o.strokeColor=s.strokeStyle;break;case eJ.UNCOLORED:let a=U.makeHexColor(n[0],n[1],n[2]);r.fillStyle=a,r.strokeStyle=a,o.fillColor=a,o.strokeColor=a;break;default:throw new L(`Unsupported paint type: ${t}`)}}getPattern(e,t,n,r){let o=n;r!==eV.SHADING&&(o=U.transform(o,t.baseTransform),this.matrix&&(o=U.transform(o,this.matrix)));let s=this.createPatternCanvas(t),a=new DOMMatrix(o);a=(a=a.translate(s.offsetX,s.offsetY)).scale(1/s.scaleX,1/s.scaleY);let l=e.createPattern(s.canvas,"repeat");return l.setTransform(a),l}}class eQ{constructor(e){this.canvasFactory=e,this.cache=Object.create(null)}getCanvas(e,t,n){let r;return void 0!==this.cache[e]?(r=this.cache[e],this.canvasFactory.reset(r,t,n)):(r=this.canvasFactory.create(t,n),this.cache[e]=r),r}delete(e){delete this.cache[e]}clear(){for(let e in this.cache){let t=this.cache[e];this.canvasFactory.destroy(t),delete this.cache[e]}}}function e0(e,t,n,r,o,s,a,l,c,u){let[d,p,h,f,m,g]=ey(e);if(0===p&&0===h){let v=Math.round(a*d+m),b=Math.round(l*f+g),y=Math.abs(Math.round((a+c)*d+m)-v)||1,x=Math.abs(Math.round((l+u)*f+g)-b)||1;return e.setTransform(Math.sign(d),0,0,Math.sign(f),v,b),e.drawImage(t,n,r,o,s,0,0,y,x),e.setTransform(d,p,h,f,m,g),[y,x]}if(0===d&&0===f){let v=Math.round(l*h+m),b=Math.round(a*p+g),y=Math.abs(Math.round((l+u)*h+m)-v)||1,x=Math.abs(Math.round((a+c)*p+g)-b)||1;return e.setTransform(0,Math.sign(p),Math.sign(h),0,v,b),e.drawImage(t,n,r,o,s,0,0,x,y),e.setTransform(d,p,h,f,m,g),[x,y]}return e.drawImage(t,n,r,o,s,a,l,c,u),[Math.hypot(d,p)*c,Math.hypot(h,f)*u]}class e1{constructor(e,t){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=l,this.textMatrixScale=1,this.fontMatrix=c,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRenderingMode=m.FILL,this.textRise=0,this.fillColor="#000000",this.strokeColor="#000000",this.patternFill=!1,this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.activeSMask=null,this.transferMaps="none",this.startNewPathAndClipBox([0,0,e,t])}clone(){let e=Object.create(this);return e.clipBox=this.clipBox.slice(),e}setCurrentPoint(e,t){this.x=e,this.y=t}updatePathMinMax(e,t,n){[t,n]=U.applyTransform([t,n],e),this.minX=Math.min(this.minX,t),this.minY=Math.min(this.minY,n),this.maxX=Math.max(this.maxX,t),this.maxY=Math.max(this.maxY,n)}updateRectMinMax(e,t){let n=U.applyTransform(t,e),r=U.applyTransform(t.slice(2),e),o=U.applyTransform([t[0],t[3]],e),s=U.applyTransform([t[2],t[1]],e);this.minX=Math.min(this.minX,n[0],r[0],o[0],s[0]),this.minY=Math.min(this.minY,n[1],r[1],o[1],s[1]),this.maxX=Math.max(this.maxX,n[0],r[0],o[0],s[0]),this.maxY=Math.max(this.maxY,n[1],r[1],o[1],s[1])}updateScalingPathMinMax(e,t){U.scaleMinMax(e,t),this.minX=Math.min(this.minX,t[0]),this.minY=Math.min(this.minY,t[1]),this.maxX=Math.max(this.maxX,t[2]),this.maxY=Math.max(this.maxY,t[3])}updateCurvePathMinMax(e,t,n,r,o,s,a,l,c,u){let d=U.bezierBoundingBox(t,n,r,o,s,a,l,c,u);if(!u)this.updateRectMinMax(e,d)}getPathBoundingBox(e=eV.FILL,t=null){let n=[this.minX,this.minY,this.maxX,this.maxY];if(e===eV.STROKE){!t&&E("Stroke bounding box must include transform.");let e=U.singularValueDecompose2dScale(t),r=e[0]*this.lineWidth/2,o=e[1]*this.lineWidth/2;n[0]-=r,n[1]-=o,n[2]+=r,n[3]+=o}return n}updateClipFromPath(){let e=U.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(e||[0,0,0,0])}isEmptyClip(){return this.minX===1/0}startNewPathAndClipBox(e){this.clipBox=e,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}getClippedPathBoundingBox(e=eV.FILL,t=null){return U.intersect(this.clipBox,this.getPathBoundingBox(e,t))}}function e2(e,t){let n,r,o,s;if("undefined"!=typeof ImageData&&t instanceof ImageData){e.putImageData(t,0,0);return}let a=t.height,l=t.width,c=a%16,u=(a-c)/16,d=0===c?u:u+1,p=e.createImageData(l,16),h=0,f,m=t.data,v=p.data;if(t.kind===g.GRAYSCALE_1BPP){let t=m.byteLength,s=new Uint32Array(v.buffer,0,v.byteLength>>2),a=s.length,g=l+7>>3,b=B.isLittleEndian?0xff000000:255;for(n=0;n<d;n++){for(r=0,o=n<u?16:c,f=0;r<o;r++){let e=t-h,n=0,r=e>g?l:8*e-7,o=-8&r,a=0,c=0;for(;n<o;n+=8)c=m[h++],s[f++]=128&c?0xffffffff:b,s[f++]=64&c?0xffffffff:b,s[f++]=32&c?0xffffffff:b,s[f++]=16&c?0xffffffff:b,s[f++]=8&c?0xffffffff:b,s[f++]=4&c?0xffffffff:b,s[f++]=2&c?0xffffffff:b,s[f++]=1&c?0xffffffff:b;for(;n<r;n++)0===a&&(c=m[h++],a=128),s[f++]=c&a?0xffffffff:b,a>>=1}for(;f<a;)s[f++]=0;e.putImageData(p,0,16*n)}}else if(t.kind===g.RGBA_32BPP){for(n=0,r=0,s=64*l;n<u;n++)v.set(m.subarray(h,h+s)),h+=s,e.putImageData(p,0,r),r+=16;n<d&&(s=l*c*4,v.set(m.subarray(h,h+s)),e.putImageData(p,0,r))}else if(t.kind===g.RGB_24BPP)for(n=0,s=l*(o=16);n<d;n++){for(n>=u&&(s=l*(o=c)),f=0,r=s;r--;)v[f++]=m[h++],v[f++]=m[h++],v[f++]=m[h++],v[f++]=255;e.putImageData(p,0,16*n)}else throw Error(`bad image kind: ${t.kind}`)}function e3(e,t){if(t.bitmap){e.drawImage(t.bitmap,0,0);return}let n=t.height,r=t.width,o=n%16,s=(n-o)/16,a=0===o?s:s+1,l=e.createImageData(r,16),c=0,u=t.data,d=l.data;for(let t=0;t<a;t++){let n=t<s?16:o;({srcPos:c}=function({src:e,srcPos:t=0,dest:n,width:r,height:o,nonBlackColor:s=0xffffffff,inverseDecode:a=!1}){let l=B.isLittleEndian?0xff000000:255,[c,u]=a?[s,l]:[l,s],d=r>>3,p=7&r,h=e.length;n=new Uint32Array(n.buffer);let f=0;for(let r=0;r<o;r++){for(let r=t+d;t<r;t++){let r=t<h?e[t]:255;n[f++]=128&r?u:c,n[f++]=64&r?u:c,n[f++]=32&r?u:c,n[f++]=16&r?u:c,n[f++]=8&r?u:c,n[f++]=4&r?u:c,n[f++]=2&r?u:c,n[f++]=1&r?u:c}if(0===p)continue;let r=t<h?e[t++]:255;for(let e=0;e<p;e++)n[f++]=r&1<<7-e?u:c}return{srcPos:t,destPos:f}}({src:u,srcPos:c,dest:d,width:r,height:n,nonBlackColor:0})),e.putImageData(l,0,16*t)}}function e5(e,t){for(let n of["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font","filter"])void 0!==e[n]&&(t[n]=e[n]);void 0!==e.setLineDash&&(t.setLineDash(e.getLineDash()),t.lineDashOffset=e.lineDashOffset)}function e4(e){if(e.strokeStyle=e.fillStyle="#000000",e.fillRule="nonzero",e.globalAlpha=1,e.lineWidth=1,e.lineCap="butt",e.lineJoin="miter",e.miterLimit=10,e.globalCompositeOperation="source-over",e.font="10px sans-serif",void 0!==e.setLineDash&&(e.setLineDash([]),e.lineDashOffset=0),!a){let{filter:t}=e;"none"!==t&&""!==t&&(e.filter="none")}}function e6(e,t){if(t)return!0;let n=U.singularValueDecompose2dScale(e);n[0]=Math.fround(n[0]),n[1]=Math.fround(n[1]);let r=Math.fround((globalThis.devicePixelRatio||1)*et.PDF_TO_CSS_UNITS);return n[0]<=r&&n[1]<=r}let e8=["butt","round","square"],e9=["miter","round","bevel"],e7={},te={};class tt{constructor(e,t,n,r,o,{optionalContentConfig:s,markedContentStack:a=null},l,c){this.ctx=e,this.current=new e1(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=t,this.objs=n,this.canvasFactory=r,this.filterFactory=o,this.groupStack=[],this.processingType3=null,this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.suspendedCtx=null,this.contentVisible=!0,this.markedContentStack=a||[],this.optionalContentConfig=s,this.cachedCanvases=new eQ(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=l,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.pageColors=c,this._cachedScaleForStroking=[-1,0],this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map}getObject(e,t=null){return"string"==typeof e?e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e):t}beginDrawing({transform:e,viewport:t,transparency:n=!1,background:r=null}){let o=this.ctx.canvas.width,s=this.ctx.canvas.height,a=this.ctx.fillStyle;if(this.ctx.fillStyle=r||"#ffffff",this.ctx.fillRect(0,0,o,s),this.ctx.fillStyle=a,n){let e=this.cachedCanvases.getCanvas("transparent",o,s);this.compositeCtx=this.ctx,this.transparentCanvas=e.canvas,this.ctx=e.context,this.ctx.save(),this.ctx.transform(...ey(this.compositeCtx))}this.ctx.save(),e4(this.ctx),e&&(this.ctx.transform(...e),this.outputScaleX=e[0],this.outputScaleY=e[0]),this.ctx.transform(...t.transform),this.viewportScale=t.scale,this.baseTransform=ey(this.ctx)}executeOperatorList(e,t,n,r){let o;let s=e.argsArray,a=e.fnArray,l=t||0,c=s.length;if(c===l)return l;let u=c-l>10&&"function"==typeof n,d=u?Date.now()+15:0,p=0,h=this.commonObjs,f=this.objs;for(;;){if(void 0!==r&&l===r.nextBreakPoint)return r.breakIt(l,n),l;if((o=a[l])!==w.dependency)this[o].apply(this,s[l]);else for(let e of s[l]){let t=e.startsWith("g_")?h:f;if(!t.has(e))return t.get(e,n),l}if(++l===c)return l;if(u&&++p>10){if(Date.now()>d)return n(),l;p=0}}}#tw(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null)}endDrawing(){for(let e of(this.#tw(),this.cachedCanvases.clear(),this.cachedPatterns.clear(),this._cachedBitmapsMap.values())){for(let t of e.values())"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement&&(t.width=t.height=0);e.clear()}this._cachedBitmapsMap.clear(),this.#tS()}#tS(){if(this.pageColors){let e=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if("none"!==e){let t=this.ctx.filter;this.ctx.filter=e,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=t}}}_scaleImage(e,t){let n,r;let o=e.width,s=e.height,a=Math.max(Math.hypot(t[0],t[1]),1),l=Math.max(Math.hypot(t[2],t[3]),1),c=o,u=s,d="prescale1";for(;a>2&&c>1||l>2&&u>1;){let t=c,o=u;a>2&&c>1&&(t=c>=16384?Math.floor(c/2)-1||1:Math.ceil(c/2),a/=c/t),l>2&&u>1&&(o=u>=16384?Math.floor(u/2)-1||1:Math.ceil(u)/2,l/=u/o),(r=(n=this.cachedCanvases.getCanvas(d,t,o)).context).clearRect(0,0,t,o),r.drawImage(e,0,0,c,u,0,0,t,o),e=n.canvas,c=t,u=o,d="prescale1"===d?"prescale2":"prescale1"}return{img:e,paintWidth:c,paintHeight:u}}_createMaskCanvas(e){let t,n,r,o;let s=this.ctx,{width:a,height:l}=e,c=this.current.fillColor,u=this.current.patternFill,d=ey(s);if((e.bitmap||e.data)&&e.count>1){let o=e.bitmap||e.data.buffer;n=JSON.stringify(u?d:[d.slice(0,4),c]),!(t=this._cachedBitmapsMap.get(o))&&(t=new Map,this._cachedBitmapsMap.set(o,t));let s=t.get(n);if(s&&!u){let e=Math.round(Math.min(d[0],d[2])+d[4]);return{canvas:s,offsetX:e,offsetY:Math.round(Math.min(d[1],d[3])+d[5])}}r=s}!r&&e3((o=this.cachedCanvases.getCanvas("maskCanvas",a,l)).context,e);let p=U.transform(d,[1/a,0,0,-1/l,0,0]);p=U.transform(p,[1,0,0,1,0,-l]);let[h,f,m,g]=U.getAxialAlignedBoundingBox([0,0,a,l],p),v=Math.round(m-h)||1,b=Math.round(g-f)||1,y=this.cachedCanvases.getCanvas("fillCanvas",v,b),x=y.context;x.translate(-h,-f),x.transform(...p),!r&&(r=(r=this._scaleImage(o.canvas,ex(x))).img,t&&u&&t.set(n,r)),x.imageSmoothingEnabled=e6(ey(x),e.interpolate),e0(x,r,0,0,r.width,r.height,0,0,a,l),x.globalCompositeOperation="source-in";let w=U.transform(ex(x),[1,0,0,1,-h,-f]);return x.fillStyle=u?c.getPattern(s,this,w,eV.FILL):c,x.fillRect(0,0,a,l),t&&!u&&(this.cachedCanvases.delete("fillCanvas"),t.set(n,y.canvas)),{canvas:y.canvas,offsetX:Math.round(h),offsetY:Math.round(f)}}setLineWidth(e){e!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=e,this.ctx.lineWidth=e}setLineCap(e){this.ctx.lineCap=e8[e]}setLineJoin(e){this.ctx.lineJoin=e9[e]}setMiterLimit(e){this.ctx.miterLimit=e}setDash(e,t){let n=this.ctx;void 0!==n.setLineDash&&(n.setLineDash(e),n.lineDashOffset=t)}setRenderingIntent(e){}setFlatness(e){}setGState(e){for(let[t,n]of e)switch(t){case"LW":this.setLineWidth(n);break;case"LC":this.setLineCap(n);break;case"LJ":this.setLineJoin(n);break;case"ML":this.setMiterLimit(n);break;case"D":this.setDash(n[0],n[1]);break;case"RI":this.setRenderingIntent(n);break;case"FL":this.setFlatness(n);break;case"Font":this.setFont(n[0],n[1]);break;case"CA":this.current.strokeAlpha=n;break;case"ca":this.current.fillAlpha=n,this.ctx.globalAlpha=n;break;case"BM":this.ctx.globalCompositeOperation=n;break;case"SMask":this.current.activeSMask=n?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(n)}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){let e=this.inSMaskMode;this.current.activeSMask&&!e?this.beginSMaskMode():!this.current.activeSMask&&e&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw Error("beginSMaskMode called while already in smask mode");let e=this.ctx.canvas.width,t=this.ctx.canvas.height,n="smaskGroupAt"+this.groupLevel,r=this.cachedCanvases.getCanvas(n,e,t);this.suspendedCtx=this.ctx,this.ctx=r.context;let o=this.ctx;o.setTransform(...ey(this.suspendedCtx)),e5(this.suspendedCtx,o),!function(e,t){if(e._removeMirroring)throw Error("Context is already forwarding operations.");e.__originalSave=e.save,e.__originalRestore=e.restore,e.__originalRotate=e.rotate,e.__originalScale=e.scale,e.__originalTranslate=e.translate,e.__originalTransform=e.transform,e.__originalSetTransform=e.setTransform,e.__originalResetTransform=e.resetTransform,e.__originalClip=e.clip,e.__originalMoveTo=e.moveTo,e.__originalLineTo=e.lineTo,e.__originalBezierCurveTo=e.bezierCurveTo,e.__originalRect=e.rect,e.__originalClosePath=e.closePath,e.__originalBeginPath=e.beginPath,e._removeMirroring=()=>{e.save=e.__originalSave,e.restore=e.__originalRestore,e.rotate=e.__originalRotate,e.scale=e.__originalScale,e.translate=e.__originalTranslate,e.transform=e.__originalTransform,e.setTransform=e.__originalSetTransform,e.resetTransform=e.__originalResetTransform,e.clip=e.__originalClip,e.moveTo=e.__originalMoveTo,e.lineTo=e.__originalLineTo,e.bezierCurveTo=e.__originalBezierCurveTo,e.rect=e.__originalRect,e.closePath=e.__originalClosePath,e.beginPath=e.__originalBeginPath,delete e._removeMirroring},e.save=function(){t.save(),this.__originalSave()},e.restore=function(){t.restore(),this.__originalRestore()},e.translate=function(e,n){t.translate(e,n),this.__originalTranslate(e,n)},e.scale=function(e,n){t.scale(e,n),this.__originalScale(e,n)},e.transform=function(e,n,r,o,s,a){t.transform(e,n,r,o,s,a),this.__originalTransform(e,n,r,o,s,a)},e.setTransform=function(e,n,r,o,s,a){t.setTransform(e,n,r,o,s,a),this.__originalSetTransform(e,n,r,o,s,a)},e.resetTransform=function(){t.resetTransform(),this.__originalResetTransform()},e.rotate=function(e){t.rotate(e),this.__originalRotate(e)},e.clip=function(e){t.clip(e),this.__originalClip(e)},e.moveTo=function(e,n){t.moveTo(e,n),this.__originalMoveTo(e,n)},e.lineTo=function(e,n){t.lineTo(e,n),this.__originalLineTo(e,n)},e.bezierCurveTo=function(e,n,r,o,s,a){t.bezierCurveTo(e,n,r,o,s,a),this.__originalBezierCurveTo(e,n,r,o,s,a)},e.rect=function(e,n,r,o){t.rect(e,n,r,o),this.__originalRect(e,n,r,o)},e.closePath=function(){t.closePath(),this.__originalClosePath()},e.beginPath=function(){t.beginPath(),this.__originalBeginPath()}}(o,this.suspendedCtx),this.setGState([["BM","source-over"],["ca",1],["CA",1]])}endSMaskMode(){if(!this.inSMaskMode)throw Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),e5(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(e){if(!this.current.activeSMask)return;e?(e[0]=Math.floor(e[0]),e[1]=Math.floor(e[1]),e[2]=Math.ceil(e[2]),e[3]=Math.ceil(e[3])):e=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];let t=this.current.activeSMask,n=this.suspendedCtx;this.composeSMask(n,t,this.ctx,e),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore()}composeSMask(e,t,n,r){let o=r[0],s=r[1],a=r[2]-o,l=r[3]-s;if(0!==a&&0!==l)this.genericComposeSMask(t.context,n,a,l,t.subtype,t.backdrop,t.transferMap,o,s,t.offsetX,t.offsetY),e.save(),e.globalAlpha=1,e.globalCompositeOperation="source-over",e.setTransform(1,0,0,1,0,0),e.drawImage(n.canvas,0,0),e.restore()}genericComposeSMask(e,t,n,r,o,s,a,l,c,u,d){let p=e.canvas,h=l-u,f=c-d;if(s){if(h<0||f<0||h+n>p.width||f+r>p.height){let e=this.cachedCanvases.getCanvas("maskExtension",n,r),t=e.context;t.drawImage(p,-h,-f),s.some(e=>0!==e)&&(t.globalCompositeOperation="destination-atop",t.fillStyle=U.makeHexColor(...s),t.fillRect(0,0,n,r),t.globalCompositeOperation="source-over"),p=e.canvas,h=f=0}else if(s.some(e=>0!==e)){e.save(),e.globalAlpha=1,e.setTransform(1,0,0,1,0,0);let t=new Path2D;t.rect(h,f,n,r),e.clip(t),e.globalCompositeOperation="destination-atop",e.fillStyle=U.makeHexColor(...s),e.fillRect(h,f,n,r),e.restore()}}t.save(),t.globalAlpha=1,t.setTransform(1,0,0,1,0,0),"Alpha"===o&&a?t.filter=this.filterFactory.addAlphaFilter(a):"Luminosity"===o&&(t.filter=this.filterFactory.addLuminosityFilter(a));let m=new Path2D;m.rect(l,c,n,r),t.clip(m),t.globalCompositeOperation="destination-in",t.drawImage(p,h,f,n,r,l,c,n,r),t.restore()}save(){this.inSMaskMode?(e5(this.ctx,this.suspendedCtx),this.suspendedCtx.save()):this.ctx.save();let e=this.current;this.stateStack.push(e),this.current=e.clone()}restore(){0===this.stateStack.length&&this.inSMaskMode&&this.endSMaskMode(),0!==this.stateStack.length&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),e5(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null)}transform(e,t,n,r,o,s){this.ctx.transform(e,t,n,r,o,s),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(e,t,n){let r,o;let s=this.ctx,a=this.current,l=a.x,c=a.y,u=ey(s),d=0===u[0]&&0===u[3]||0===u[1]&&0===u[2],p=d?n.slice(0):null;for(let n=0,h=0,f=e.length;n<f;n++)switch(0|e[n]){case w.rectangle:l=t[h++],c=t[h++];let f=t[h++],m=t[h++],g=l+f,v=c+m;s.moveTo(l,c),0===f||0===m?s.lineTo(g,v):(s.lineTo(g,c),s.lineTo(g,v),s.lineTo(l,v)),!d&&a.updateRectMinMax(u,[l,c,g,v]),s.closePath();break;case w.moveTo:l=t[h++],c=t[h++],s.moveTo(l,c),!d&&a.updatePathMinMax(u,l,c);break;case w.lineTo:l=t[h++],c=t[h++],s.lineTo(l,c),!d&&a.updatePathMinMax(u,l,c);break;case w.curveTo:r=l,o=c,l=t[h+4],c=t[h+5],s.bezierCurveTo(t[h],t[h+1],t[h+2],t[h+3],l,c),a.updateCurvePathMinMax(u,r,o,t[h],t[h+1],t[h+2],t[h+3],l,c,p),h+=6;break;case w.curveTo2:r=l,o=c,s.bezierCurveTo(l,c,t[h],t[h+1],t[h+2],t[h+3]),a.updateCurvePathMinMax(u,r,o,l,c,t[h],t[h+1],t[h+2],t[h+3],p),l=t[h+2],c=t[h+3],h+=4;break;case w.curveTo3:r=l,o=c,l=t[h+2],c=t[h+3],s.bezierCurveTo(t[h],t[h+1],l,c,l,c),a.updateCurvePathMinMax(u,r,o,t[h],t[h+1],l,c,l,c,p),h+=4;break;case w.closePath:s.closePath()}d&&a.updateScalingPathMinMax(u,p),a.setCurrentPoint(l,c)}closePath(){this.ctx.closePath()}stroke(e=!0){let t=this.ctx,n=this.current.strokeColor;t.globalAlpha=this.current.strokeAlpha,this.contentVisible&&("object"==typeof n&&n?.getPattern?(t.save(),t.strokeStyle=n.getPattern(t,this,ex(t),eV.STROKE),this.rescaleAndStroke(!1),t.restore()):this.rescaleAndStroke(!0)),e&&this.consumePath(this.current.getClippedPathBoundingBox()),t.globalAlpha=this.current.fillAlpha}closeStroke(){this.closePath(),this.stroke()}fill(e=!0){let t=this.ctx,n=this.current.fillColor,r=this.current.patternFill,o=!1;r&&(t.save(),t.fillStyle=n.getPattern(t,this,ex(t),eV.FILL),o=!0);let s=this.current.getClippedPathBoundingBox();this.contentVisible&&null!==s&&(this.pendingEOFill?(t.fill("evenodd"),this.pendingEOFill=!1):t.fill()),o&&t.restore(),e&&this.consumePath(s)}eoFill(){this.pendingEOFill=!0,this.fill()}fillStroke(){this.fill(!1),this.stroke(!1),this.consumePath()}eoFillStroke(){this.pendingEOFill=!0,this.fillStroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()}endPath(){this.consumePath()}clip(){this.pendingClip=e7}eoClip(){this.pendingClip=te}beginText(){this.current.textMatrix=l,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}endText(){let e=this.pendingTextPaths,t=this.ctx;if(void 0===e){t.beginPath();return}for(let n of(t.save(),t.beginPath(),e))t.setTransform(...n.transform),t.translate(n.x,n.y),n.addToPath(t,n.fontSize);t.restore(),t.clip(),t.beginPath(),delete this.pendingTextPaths}setCharSpacing(e){this.current.charSpacing=e}setWordSpacing(e){this.current.wordSpacing=e}setHScale(e){this.current.textHScale=e/100}setLeading(e){this.current.leading=-e}setFont(e,t){let n=this.commonObjs.get(e),r=this.current;if(!n)throw Error(`Can't find font for ${e}`);if(r.fontMatrix=n.fontMatrix||c,(0===r.fontMatrix[0]||0===r.fontMatrix[3])&&C("Invalid font matrix for font "+e),t<0?(t=-t,r.fontDirection=-1):r.fontDirection=1,this.current.font=n,this.current.fontSize=t,n.isType3Font)return;let o=n.loadedName||"sans-serif",s=n.systemFontInfo?.css||`"${o}", ${n.fallbackName}`,a="normal";n.black?a="900":n.bold&&(a="bold");let l=n.italic?"italic":"normal",u=t;t<16?u=16:t>100&&(u=100),this.current.fontSizeScale=t/u,this.ctx.font=`${l} ${a} ${u}px ${s}`}setTextRenderingMode(e){this.current.textRenderingMode=e}setTextRise(e){this.current.textRise=e}moveText(e,t){this.current.x=this.current.lineX+=e,this.current.y=this.current.lineY+=t}setLeadingMoveText(e,t){this.setLeading(-t),this.moveText(e,t)}setTextMatrix(e,t,n,r,o,s){this.current.textMatrix=[e,t,n,r,o,s],this.current.textMatrixScale=Math.hypot(e,t),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}nextLine(){this.moveText(0,this.current.leading)}paintChar(e,t,n,r){let o;let s=this.ctx,a=this.current,l=a.font,c=a.textRenderingMode,u=a.fontSize/a.fontSizeScale,d=c&m.FILL_STROKE_MASK,p=!!(c&m.ADD_TO_PATH_FLAG),h=a.patternFill&&!l.missingFile;(l.disableFontFace||p||h)&&(o=l.getPathGenerator(this.commonObjs,e)),l.disableFontFace||h?(s.save(),s.translate(t,n),s.beginPath(),o(s,u),r&&s.setTransform(...r),(d===m.FILL||d===m.FILL_STROKE)&&s.fill(),(d===m.STROKE||d===m.FILL_STROKE)&&s.stroke(),s.restore()):((d===m.FILL||d===m.FILL_STROKE)&&s.fillText(e,t,n),(d===m.STROKE||d===m.FILL_STROKE)&&s.strokeText(e,t,n)),p&&(this.pendingTextPaths||=[]).push({transform:ey(s),x:t,y:n,fontSize:u,addToPath:o})}get isFontSubpixelAAEnabled(){let{context:e}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);e.scale(1.5,1),e.fillText("I",0,10);let t=e.getImageData(0,0,10,10).data,n=!1;for(let e=3;e<t.length;e+=4)if(t[e]>0&&t[e]<255){n=!0;break}return O(this,"isFontSubpixelAAEnabled",n)}showText(e){let t;let n=this.current,r=n.font;if(r.isType3Font)return this.showType3Text(e);let o=n.fontSize;if(0===o)return;let s=this.ctx,a=n.fontSizeScale,l=n.charSpacing,c=n.wordSpacing,u=n.fontDirection,d=n.textHScale*u,p=e.length,h=r.vertical,f=h?1:-1,g=r.defaultVMetrics,v=o*n.fontMatrix[0],b=n.textRenderingMode===m.FILL&&!r.disableFontFace&&!n.patternFill;if(s.save(),s.transform(...n.textMatrix),s.translate(n.x,n.y+n.textRise),u>0?s.scale(d,-1):s.scale(d,1),n.patternFill){s.save();let e=n.fillColor.getPattern(s,this,ex(s),eV.FILL);t=ey(s),s.restore(),s.fillStyle=e}let y=n.lineWidth,x=n.textMatrixScale;if(0===x||0===y){let e=n.textRenderingMode&m.FILL_STROKE_MASK;(e===m.STROKE||e===m.FILL_STROKE)&&(y=this.getSinglePixelWidth())}else y/=x;if(1!==a&&(s.scale(a,a),y/=a),s.lineWidth=y,r.isInvalidPDFjsFont){let t=[],r=0;for(let n of e)t.push(n.unicode),r+=n.width;s.fillText(t.join(""),0,0),n.x+=r*v*d,s.restore(),this.compose();return}let w=0,S;for(S=0;S<p;++S){let n,d;let p=e[S];if("number"==typeof p){w+=f*p*o/1e3;continue}let m=!1,y=(p.isSpace?c:0)+l,x=p.fontChar,k=p.accent,A=p.width;if(h){let e=p.vmetric||g,t=-(p.vmetric?e[1]:.5*A)*v,r=e[2]*v;A=e?-e[0]:A,n=t/a,d=(w+r)/a}else n=w/a,d=0;if(r.remeasure&&A>0){let e=1e3*s.measureText(x).width/o*a;if(A<e&&this.isFontSubpixelAAEnabled){let t=A/e;m=!0,s.save(),s.scale(t,1),n/=t}else A!==e&&(n+=(A-e)/2e3*o/a)}if(this.contentVisible&&(p.isInFont||r.missingFile)){if(b&&!k)s.fillText(x,n,d);else if(this.paintChar(x,n,d,t),k){let e=n+o*k.offset.x/a,r=d-o*k.offset.y/a;this.paintChar(k.fontChar,e,r,t)}}w+=h?A*v-y*u:A*v+y*u,m&&s.restore()}h?n.y-=w:n.x+=w*d,s.restore(),this.compose()}showType3Text(e){let t,n,r,o;let s=this.ctx,a=this.current,l=a.font,u=a.fontSize,d=a.fontDirection,p=l.vertical?1:-1,h=a.charSpacing,f=a.wordSpacing,g=a.textHScale*d,v=a.fontMatrix||c,b=e.length;if(a.textRenderingMode!==m.INVISIBLE&&0!==u){for(this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null,s.save(),s.transform(...a.textMatrix),s.translate(a.x,a.y),s.scale(g,d),t=0;t<b;++t){if("number"==typeof(n=e[t])){o=p*n*u/1e3,this.ctx.translate(o,0),a.x+=o*g;continue}let c=(n.isSpace?f:0)+h,d=l.charProcOperatorList[n.operatorListId];if(!d){C(`Type3 character "${n.operatorListId}" is not available.`);continue}this.contentVisible&&(this.processingType3=n,this.save(),s.scale(u,u),s.transform(...v),this.executeOperatorList(d),this.restore()),r=U.applyTransform([n.width,0],v)[0]*u+c,s.translate(r,0),a.x+=r*g}s.restore(),this.processingType3=null}}setCharWidth(e,t){}setCharWidthAndBounds(e,t,n,r,o,s){this.ctx.rect(n,r,o-n,s-r),this.ctx.clip(),this.endPath()}getColorN_Pattern(e){let t;if("TilingPattern"===e[0]){let n=e[1],r=this.baseTransform||ey(this.ctx);t=new eX(e,n,this.ctx,{createCanvasGraphics:e=>new tt(e,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack})},r)}else t=this._getPattern(e[1],e[2]);return t}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments)}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(e,t,n){let r=U.makeHexColor(e,t,n);this.ctx.strokeStyle=r,this.current.strokeColor=r}setFillRGBColor(e,t,n){let r=U.makeHexColor(e,t,n);this.ctx.fillStyle=r,this.current.fillColor=r,this.current.patternFill=!1}_getPattern(e,t=null){let n;return this.cachedPatterns.has(e)?n=this.cachedPatterns.get(e):(n=function(e){switch(e[0]){case"RadialAxial":return new eG(e);case"Mesh":return new eY(e);case"Dummy":return new eZ}throw Error(`Unknown IR type: ${e[0]}`)}(this.getObject(e)),this.cachedPatterns.set(e,n)),t&&(n.matrix=t),n}shadingFill(e){if(!this.contentVisible)return;let t=this.ctx;this.save();let n=this._getPattern(e);t.fillStyle=n.getPattern(t,this,ex(t),eV.SHADING);let r=ex(t);if(r){let{width:e,height:n}=t.canvas,[o,s,a,l]=U.getAxialAlignedBoundingBox([0,0,e,n],r);this.ctx.fillRect(o,s,a-o,l-s)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}beginInlineImage(){E("Should not call beginInlineImage")}beginImageData(){E("Should not call beginImageData")}paintFormXObjectBegin(e,t){if(!!this.contentVisible){if(this.save(),this.baseTransformStack.push(this.baseTransform),e&&this.transform(...e),this.baseTransform=ey(this.ctx),t){let e=t[2]-t[0],n=t[3]-t[1];this.ctx.rect(t[0],t[1],e,n),this.current.updateRectMinMax(ey(this.ctx),t),this.clip(),this.endPath()}}}paintFormXObjectEnd(){if(!!this.contentVisible)this.restore(),this.baseTransform=this.baseTransformStack.pop()}beginGroup(e){if(!this.contentVisible)return;this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);let t=this.ctx;!e.isolated&&A("TODO: Support non-isolated groups."),e.knockout&&C("Knockout groups not supported.");let n=ey(t);if(e.matrix&&t.transform(...e.matrix),!e.bbox)throw Error("Bounding box is required.");let r=U.getAxialAlignedBoundingBox(e.bbox,ey(t)),o=[0,0,t.canvas.width,t.canvas.height],s=Math.floor((r=U.intersect(r,o)||[0,0,0,0])[0]),a=Math.floor(r[1]),l=Math.max(Math.ceil(r[2])-s,1),c=Math.max(Math.ceil(r[3])-a,1);this.current.startNewPathAndClipBox([0,0,l,c]);let u="groupAt"+this.groupLevel;e.smask&&(u+="_smask_"+this.smaskCounter++%2);let d=this.cachedCanvases.getCanvas(u,l,c),p=d.context;p.translate(-s,-a),p.transform(...n),e.smask?this.smaskStack.push({canvas:d.canvas,context:p,offsetX:s,offsetY:a,subtype:e.smask.subtype,backdrop:e.smask.backdrop,transferMap:e.smask.transferMap||null,startTransformInverse:null}):(t.setTransform(1,0,0,1,0,0),t.translate(s,a),t.save()),e5(t,p),this.ctx=p,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(t),this.groupLevel++}endGroup(e){if(!this.contentVisible)return;this.groupLevel--;let t=this.ctx,n=this.groupStack.pop();if(this.ctx=n,this.ctx.imageSmoothingEnabled=!1,e.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();let e=ey(this.ctx);this.restore(),this.ctx.save(),this.ctx.setTransform(...e);let n=U.getAxialAlignedBoundingBox([0,0,t.canvas.width,t.canvas.height],e);this.ctx.drawImage(t.canvas,0,0),this.ctx.restore(),this.compose(n)}}beginAnnotation(e,t,n,r,o){if(this.#tw(),e4(this.ctx),this.ctx.save(),this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),t){let r=t[2]-t[0],s=t[3]-t[1];if(o&&this.annotationCanvasMap){n=n.slice(),n[4]-=t[0],n[5]-=t[1],(t=t.slice())[0]=t[1]=0,t[2]=r,t[3]=s;let[o,a]=U.singularValueDecompose2dScale(ey(this.ctx)),{viewportScale:l}=this,c=Math.ceil(r*this.outputScaleX*l),u=Math.ceil(s*this.outputScaleY*l);this.annotationCanvas=this.canvasFactory.create(c,u);let{canvas:d,context:p}=this.annotationCanvas;this.annotationCanvasMap.set(e,d),this.annotationCanvas.savedCtx=this.ctx,this.ctx=p,this.ctx.save(),this.ctx.setTransform(o,0,0,-a,0,s*a),e4(this.ctx)}else e4(this.ctx),this.ctx.rect(t[0],t[1],r,s),this.ctx.clip(),this.endPath()}this.current=new e1(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...n),this.transform(...r)}endAnnotation(){this.annotationCanvas&&(this.ctx.restore(),this.#tS(),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(e){if(!this.contentVisible)return;let t=e.count;(e=this.getObject(e.data,e)).count=t;let n=this.ctx,r=this.processingType3;if(r&&(void 0===r.compiled&&(r.compiled=function(e){let t,n,r;let{width:o,height:s}=e;if(o>1e3||s>1e3)return null;let a=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),l=o+1,c=new Uint8Array(l*(s+1)),u=o+7&-8,d=new Uint8Array(u*s),p=0;for(let t of e.data){let e=128;for(;e>0;)d[p++]=t&e?0:255,e>>=1}let h=0;for(0!==d[p=0]&&(c[0]=1,++h),n=1;n<o;n++)d[p]!==d[p+1]&&(c[n]=d[p]?2:1,++h),p++;for(0!==d[p]&&(c[n]=2,++h),t=1;t<s;t++){p=t*u,r=t*l,d[p-u]!==d[p]&&(c[r]=d[p]?1:8,++h);let e=(d[p]?4:0)+(d[p-u]?8:0);for(n=1;n<o;n++)a[e=(e>>2)+(d[p+1]?4:0)+(d[p-u+1]?8:0)]&&(c[r+n]=a[e],++h),p++;if(d[p-u]!==d[p]&&(c[r+n]=d[p]?2:4,++h),h>1e3)return null}for(p=u*(s-1),r=t*l,0!==d[p]&&(c[r]=8,++h),n=1;n<o;n++)d[p]!==d[p+1]&&(c[r+n]=d[p]?4:8,++h),p++;if(0!==d[p]&&(c[r+n]=4,++h),h>1e3)return null;let f=new Int32Array([0,l,-1,0,-l,0,0,0,1]),m=new Path2D;for(t=0;h&&t<=s;t++){let e=t*l,n=e+o;for(;e<n&&!c[e];)e++;if(e===n)continue;m.moveTo(e%l,t);let r=e,s=c[e];do{let t=f[s];do e+=t;while(!c[e]);let n=c[e];5!==n&&10!==n?(s=n,c[e]=0):(s=n&51*s>>4,c[e]&=s>>2|s<<2),m.lineTo(e%l,e/l|0),!c[e]&&--h}while(r!==e);--t}return d=null,c=null,function(e){e.save(),e.scale(1/o,-1/s),e.translate(0,-s),e.fill(m),e.beginPath(),e.restore()}}(e)),r.compiled)){r.compiled(n);return}let o=this._createMaskCanvas(e),s=o.canvas;n.save(),n.setTransform(1,0,0,1,0,0),n.drawImage(s,o.offsetX,o.offsetY),n.restore(),this.compose()}paintImageMaskXObjectRepeat(e,t,n=0,r=0,o,s){if(!this.contentVisible)return;e=this.getObject(e.data,e);let a=this.ctx;a.save();let l=ey(a);a.transform(t,n,r,o,0,0);let c=this._createMaskCanvas(e);a.setTransform(1,0,0,1,c.offsetX-l[4],c.offsetY-l[5]);for(let e=0,u=s.length;e<u;e+=2){let u=U.transform(l,[t,n,r,o,s[e],s[e+1]]),[d,p]=U.applyTransform([0,0],u);a.drawImage(c.canvas,d,p)}a.restore(),this.compose()}paintImageMaskXObjectGroup(e){if(!this.contentVisible)return;let t=this.ctx,n=this.current.fillColor,r=this.current.patternFill;for(let o of e){let{data:e,width:s,height:a,transform:l}=o,c=this.cachedCanvases.getCanvas("maskCanvas",s,a),u=c.context;u.save(),e3(u,this.getObject(e,o)),u.globalCompositeOperation="source-in",u.fillStyle=r?n.getPattern(u,this,ex(t),eV.FILL):n,u.fillRect(0,0,s,a),u.restore(),t.save(),t.transform(...l),t.scale(1,-1),e0(t,c.canvas,0,0,s,a,0,-1,1,1),t.restore()}this.compose()}paintImageXObject(e){if(!this.contentVisible)return;let t=this.getObject(e);if(!t){C("Dependent image isn't ready yet");return}this.paintInlineImageXObject(t)}paintImageXObjectRepeat(e,t,n,r){if(!this.contentVisible)return;let o=this.getObject(e);if(!o){C("Dependent image isn't ready yet");return}let s=o.width,a=o.height,l=[];for(let e=0,o=r.length;e<o;e+=2)l.push({transform:[t,0,0,n,r[e],r[e+1]],x:0,y:0,w:s,h:a});this.paintInlineImageXObjectGroup(o,l)}applyTransferMapsToCanvas(e){return"none"!==this.current.transferMaps&&(e.filter=this.current.transferMaps,e.drawImage(e.canvas,0,0),e.filter="none"),e.canvas}applyTransferMapsToBitmap(e){if("none"===this.current.transferMaps)return e.bitmap;let{bitmap:t,width:n,height:r}=e,o=this.cachedCanvases.getCanvas("inlineImage",n,r),s=o.context;return s.filter=this.current.transferMaps,s.drawImage(t,0,0),s.filter="none",o.canvas}paintInlineImageXObject(e){let t;if(!this.contentVisible)return;let n=e.width,r=e.height,o=this.ctx;if(this.save(),!a){let{filter:e}=o;"none"!==e&&""!==e&&(o.filter="none")}if(o.scale(1/n,-1/r),e.bitmap)t=this.applyTransferMapsToBitmap(e);else if("function"==typeof HTMLElement&&e instanceof HTMLElement||!e.data)t=e;else{let o=this.cachedCanvases.getCanvas("inlineImage",n,r).context;e2(o,e),t=this.applyTransferMapsToCanvas(o)}let s=this._scaleImage(t,ex(o));o.imageSmoothingEnabled=e6(ey(o),e.interpolate),e0(o,s.img,0,0,s.paintWidth,s.paintHeight,0,-r,n,r),this.compose(),this.restore()}paintInlineImageXObjectGroup(e,t){let n;if(!this.contentVisible)return;let r=this.ctx;if(e.bitmap)n=e.bitmap;else{let t=e.width,r=e.height,o=this.cachedCanvases.getCanvas("inlineImage",t,r).context;e2(o,e),n=this.applyTransferMapsToCanvas(o)}for(let e of t)r.save(),r.transform(...e.transform),r.scale(1,-1),e0(r,n,e.x,e.y,e.w,e.h,0,-1,1,1),r.restore();this.compose()}paintSolidColorImageMask(){if(!!this.contentVisible)this.ctx.fillRect(0,0,1,1),this.compose()}markPoint(e){}markPointProps(e,t){}beginMarkedContent(e){this.markedContentStack.push({visible:!0})}beginMarkedContentProps(e,t){"OC"===e?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(t)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}endMarkedContent(){this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}beginCompat(){}endCompat(){}consumePath(e){let t=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath(),!this.pendingClip&&this.compose(e);let n=this.ctx;this.pendingClip&&(!t&&(this.pendingClip===te?n.clip("evenodd"):n.clip()),this.pendingClip=null),this.current.startNewPathAndClipBox(this.current.clipBox),n.beginPath()}getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){let e=ey(this.ctx);if(0===e[1]&&0===e[2])this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(e[0]),Math.abs(e[3]));else{let t=Math.abs(e[0]*e[3]-e[2]*e[1]),n=Math.hypot(e[0],e[2]),r=Math.hypot(e[1],e[3]);this._cachedGetSinglePixelWidth=Math.max(n,r)/t}}return this._cachedGetSinglePixelWidth}getScaleForStroking(){if(-1===this._cachedScaleForStroking[0]){let e,t;let{lineWidth:n}=this.current,{a:r,b:o,c:s,d:a}=this.ctx.getTransform();if(0===o&&0===s){let o=Math.abs(r),s=Math.abs(a);if(o===s){if(0===n)e=t=1/o;else{let r=o*n;e=t=r<1?1/r:1}}else if(0===n)e=1/o,t=1/s;else{let r=o*n,a=s*n;e=r<1?1/r:1,t=a<1?1/a:1}}else{let l=Math.abs(r*a-o*s),c=Math.hypot(r,o),u=Math.hypot(s,a);if(0===n)e=u/l,t=c/l;else{let r=n*l;e=u>r?u/r:1,t=c>r?c/r:1}}this._cachedScaleForStroking[0]=e,this._cachedScaleForStroking[1]=t}return this._cachedScaleForStroking}rescaleAndStroke(e){let{ctx:t}=this,{lineWidth:n}=this.current,[r,o]=this.getScaleForStroking();if(t.lineWidth=n||1,1===r&&1===o){t.stroke();return}let s=t.getLineDash();if(e&&t.save(),t.scale(r,o),s.length>0){let e=Math.max(r,o);t.setLineDash(s.map(t=>t/e)),t.lineDashOffset/=e}t.stroke(),e&&t.restore()}isContentVisible(){for(let e=this.markedContentStack.length-1;e>=0;e--)if(!this.markedContentStack[e].visible)return!1;return!0}}for(let e in w)void 0!==tt.prototype[e]&&(tt.prototype[w[e]]=tt.prototype[e]);class tn{static #tk=null;static #tA="";static get workerPort(){return this.#tk}static set workerPort(e){if(!("undefined"!=typeof Worker&&e instanceof Worker)&&null!==e)throw Error("Invalid `workerPort` type.");this.#tk=e}static get workerSrc(){return this.#tA}static set workerSrc(e){if("string"!=typeof e)throw Error("Invalid `workerSrc` type.");this.#tA=e}}let tr={DATA:1,ERROR:2},ti={CANCEL:1,CANCEL_COMPLETE:2,CLOSE:3,ENQUEUE:4,ERROR:5,PULL:6,PULL_COMPLETE:7,START_COMPLETE:8};function to(e){switch(!(e instanceof Error||"object"==typeof e&&null!==e)&&E('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),e.name){case"AbortException":return new j(e.message);case"MissingPDFException":return new N(e.message);case"PasswordException":return new I(e.message,e.code);case"UnexpectedResponseException":return new R(e.message,e.status);case"UnknownErrorException":return new P(e.message,e.details);default:return new P(e.message,e.toString())}}class ts{constructor(e,t,n){this.sourceName=e,this.targetName=t,this.comObj=n,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),this._onComObjOnMessage=e=>{let t=e.data;if(t.targetName!==this.sourceName)return;if(t.stream){this.#tC(t);return}if(t.callback){let e=t.callbackId,n=this.callbackCapabilities[e];if(!n)throw Error(`Cannot resolve callback ${e}`);if(delete this.callbackCapabilities[e],t.callback===tr.DATA)n.resolve(t.data);else if(t.callback===tr.ERROR)n.reject(to(t.reason));else throw Error("Unexpected callback case");return}let r=this.actionHandler[t.action];if(!r)throw Error(`Unknown action from worker: ${t.action}`);if(t.callbackId){let e=this.sourceName,o=t.sourceName;new Promise(function(e){e(r(t.data))}).then(function(r){n.postMessage({sourceName:e,targetName:o,callback:tr.DATA,callbackId:t.callbackId,data:r})},function(r){n.postMessage({sourceName:e,targetName:o,callback:tr.ERROR,callbackId:t.callbackId,reason:to(r)})});return}if(t.streamId){this.#tE(t);return}r(t.data)},n.addEventListener("message",this._onComObjOnMessage)}on(e,t){let n=this.actionHandler;if(n[e])throw Error(`There is already an actionName called "${e}"`);n[e]=t}send(e,t,n){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,data:t},n)}sendWithPromise(e,t,n){let r=this.callbackId++,o=Promise.withResolvers();this.callbackCapabilities[r]=o;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,callbackId:r,data:t},n)}catch(e){o.reject(e)}return o.promise}sendWithStream(e,t,n,r){let o=this.streamId++,s=this.sourceName,a=this.targetName,l=this.comObj;return new ReadableStream({start:n=>{let c=Promise.withResolvers();return this.streamControllers[o]={controller:n,startCall:c,pullCall:null,cancelCall:null,isClosed:!1},l.postMessage({sourceName:s,targetName:a,action:e,streamId:o,data:t,desiredSize:n.desiredSize},r),c.promise},pull:e=>{let t=Promise.withResolvers();return this.streamControllers[o].pullCall=t,l.postMessage({sourceName:s,targetName:a,stream:ti.PULL,streamId:o,desiredSize:e.desiredSize}),t.promise},cancel:e=>{T(e instanceof Error,"cancel must have a valid reason");let t=Promise.withResolvers();return this.streamControllers[o].cancelCall=t,this.streamControllers[o].isClosed=!0,l.postMessage({sourceName:s,targetName:a,stream:ti.CANCEL,streamId:o,reason:to(e)}),t.promise}},n)}#tE(e){let t=e.streamId,n=this.sourceName,r=e.sourceName,o=this.comObj,s=this,a=this.actionHandler[e.action],l={enqueue(e,s=1,a){if(this.isCancelled)return;let l=this.desiredSize;this.desiredSize-=s,l>0&&this.desiredSize<=0&&(this.sinkCapability=Promise.withResolvers(),this.ready=this.sinkCapability.promise),o.postMessage({sourceName:n,targetName:r,stream:ti.ENQUEUE,streamId:t,chunk:e},a)},close(){if(!this.isCancelled)this.isCancelled=!0,o.postMessage({sourceName:n,targetName:r,stream:ti.CLOSE,streamId:t}),delete s.streamSinks[t]},error(e){if(T(e instanceof Error,"error must have a valid reason"),!this.isCancelled)this.isCancelled=!0,o.postMessage({sourceName:n,targetName:r,stream:ti.ERROR,streamId:t,reason:to(e)})},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};l.sinkCapability.resolve(),l.ready=l.sinkCapability.promise,this.streamSinks[t]=l,new Promise(function(t){t(a(e.data,l))}).then(function(){o.postMessage({sourceName:n,targetName:r,stream:ti.START_COMPLETE,streamId:t,success:!0})},function(e){o.postMessage({sourceName:n,targetName:r,stream:ti.START_COMPLETE,streamId:t,reason:to(e)})})}#tC(e){let t=e.streamId,n=this.sourceName,r=e.sourceName,o=this.comObj,s=this.streamControllers[t],a=this.streamSinks[t];switch(e.stream){case ti.START_COMPLETE:e.success?s.startCall.resolve():s.startCall.reject(to(e.reason));break;case ti.PULL_COMPLETE:e.success?s.pullCall.resolve():s.pullCall.reject(to(e.reason));break;case ti.PULL:if(!a){o.postMessage({sourceName:n,targetName:r,stream:ti.PULL_COMPLETE,streamId:t,success:!0});break}a.desiredSize<=0&&e.desiredSize>0&&a.sinkCapability.resolve(),a.desiredSize=e.desiredSize,new Promise(function(e){e(a.onPull?.())}).then(function(){o.postMessage({sourceName:n,targetName:r,stream:ti.PULL_COMPLETE,streamId:t,success:!0})},function(e){o.postMessage({sourceName:n,targetName:r,stream:ti.PULL_COMPLETE,streamId:t,reason:to(e)})});break;case ti.ENQUEUE:if(T(s,"enqueue should have stream controller"),s.isClosed)break;s.controller.enqueue(e.chunk);break;case ti.CLOSE:if(T(s,"close should have stream controller"),s.isClosed)break;s.isClosed=!0,s.controller.close(),this.#tT(s,t);break;case ti.ERROR:T(s,"error should have stream controller"),s.controller.error(to(e.reason)),this.#tT(s,t);break;case ti.CANCEL_COMPLETE:e.success?s.cancelCall.resolve():s.cancelCall.reject(to(e.reason)),this.#tT(s,t);break;case ti.CANCEL:if(!a)break;new Promise(function(t){t(a.onCancel?.(to(e.reason)))}).then(function(){o.postMessage({sourceName:n,targetName:r,stream:ti.CANCEL_COMPLETE,streamId:t,success:!0})},function(e){o.postMessage({sourceName:n,targetName:r,stream:ti.CANCEL_COMPLETE,streamId:t,reason:to(e)})}),a.sinkCapability.reject(to(e.reason)),a.isCancelled=!0,delete this.streamSinks[t];break;default:throw Error("Unexpected stream case")}}async #tT(e,t){await Promise.allSettled([e.startCall?.promise,e.pullCall?.promise,e.cancelCall?.promise]),delete this.streamControllers[t]}destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}class ta{#t_;#tO;constructor({parsedData:e,rawData:t}){this.#t_=e,this.#tO=t}getRaw(){return this.#tO}get(e){return this.#t_.get(e)??null}getAll(){return z(this.#t_)}has(e){return this.#t_.has(e)}}let tl=Symbol("INTERNAL");class tc{#tM=!1;#tI=!1;#tP=!1;#tD=!0;constructor(e,{name:t,intent:n,usage:r}){this.#tM=!!(e&u.DISPLAY),this.#tI=!!(e&u.PRINT),this.name=t,this.intent=n,this.usage=r}get visible(){if(this.#tP)return this.#tD;if(!this.#tD)return!1;let{print:e,view:t}=this.usage;return this.#tM?t?.viewState!=="OFF":!this.#tI||e?.printState!=="OFF"}_setVisible(e,t,n=!1){e!==tl&&E("Internal method `_setVisible` called."),this.#tP=n,this.#tD=t}}class tu{#tN=null;#tR=new Map;#tL=null;#tj=null;constructor(e,t=u.DISPLAY){if(this.renderingIntent=t,this.name=null,this.creator=null,null===e)return;for(let n of(this.name=e.name,this.creator=e.creator,this.#tj=e.order,e.groups))this.#tR.set(n.id,new tc(t,n));if("OFF"===e.baseState)for(let e of this.#tR.values())e._setVisible(tl,!1);for(let t of e.on)this.#tR.get(t)._setVisible(tl,!0);for(let t of e.off)this.#tR.get(t)._setVisible(tl,!1);this.#tL=this.getHash()}#t$(e){let t=e.length;if(t<2)return!0;let n=e[0];for(let r=1;r<t;r++){let t;let o=e[r];if(Array.isArray(o))t=this.#t$(o);else{if(!this.#tR.has(o))return C(`Optional content group not found: ${o}`),!0;t=this.#tR.get(o).visible}switch(n){case"And":if(!t)return!1;break;case"Or":if(t)return!0;break;case"Not":return!t;default:return!0}}return"And"===n}isVisible(e){if(0===this.#tR.size)return!0;if(!e)return A("Optional content group not defined."),!0;if("OCG"===e.type)return this.#tR.has(e.id)?this.#tR.get(e.id).visible:(C(`Optional content group not found: ${e.id}`),!0);if("OCMD"===e.type){if(e.expression)return this.#t$(e.expression);if(e.policy&&"AnyOn"!==e.policy){if("AllOn"===e.policy){for(let t of e.ids){if(!this.#tR.has(t)){C(`Optional content group not found: ${t}`);break}if(!this.#tR.get(t).visible)return!1}return!0}else if("AnyOff"===e.policy){for(let t of e.ids){if(!this.#tR.has(t))return C(`Optional content group not found: ${t}`),!0;if(!this.#tR.get(t).visible)return!0}return!1}else if("AllOff"===e.policy){for(let t of e.ids){if(!this.#tR.has(t)){C(`Optional content group not found: ${t}`);break}if(this.#tR.get(t).visible)return!1}return!0}}else{for(let t of e.ids){if(!this.#tR.has(t))return C(`Optional content group not found: ${t}`),!0;if(this.#tR.get(t).visible)return!0}return!1}return C(`Unknown optional content policy ${e.policy}.`),!0}return C(`Unknown group type ${e.type}.`),!0}setVisibility(e,t=!0){let n=this.#tR.get(e);if(!n){C(`Optional content group not found: ${e}`);return}n._setVisible(tl,!!t,!0),this.#tN=null}setOCGState({state:e,preserveRB:t}){let n;for(let t of e){switch(t){case"ON":case"OFF":case"Toggle":n=t;continue}let e=this.#tR.get(t);if(!!e)switch(n){case"ON":e._setVisible(tl,!0);break;case"OFF":e._setVisible(tl,!1);break;case"Toggle":e._setVisible(tl,!e.visible)}}this.#tN=null}get hasInitialVisibility(){return null===this.#tL||this.getHash()===this.#tL}getOrder(){return this.#tR.size?this.#tj?this.#tj.slice():[...this.#tR.keys()]:null}getGroups(){return this.#tR.size>0?z(this.#tR):null}getGroup(e){return this.#tR.get(e)||null}getHash(){if(null!==this.#tN)return this.#tN;let e=new eN;for(let[t,n]of this.#tR)e.update(`${t}:${n.visible}`);return this.#tN=e.hexdigest()}}class td{constructor(e,{disableRange:t=!1,disableStream:n=!1}){T(e,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.');let{length:r,initialData:o,progressiveDone:s,contentDispositionFilename:a}=e;if(this._queuedChunks=[],this._progressiveDone=s,this._contentDispositionFilename=a,o?.length>0){let e=o instanceof Uint8Array&&o.byteLength===o.buffer.byteLength?o.buffer:new Uint8Array(o).buffer;this._queuedChunks.push(e)}this._pdfDataRangeTransport=e,this._isStreamingSupported=!n,this._isRangeSupported=!t,this._contentLength=r,this._fullRequestReader=null,this._rangeReaders=[],e.addRangeListener((e,t)=>{this._onReceiveData({begin:e,chunk:t})}),e.addProgressListener((e,t)=>{this._onProgress({loaded:e,total:t})}),e.addProgressiveReadListener(e=>{this._onReceiveData({chunk:e})}),e.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),e.transportReady()}_onReceiveData({begin:e,chunk:t}){let n=t instanceof Uint8Array&&t.byteLength===t.buffer.byteLength?t.buffer:new Uint8Array(t).buffer;void 0===e?this._fullRequestReader?this._fullRequestReader._enqueue(n):this._queuedChunks.push(n):T(this._rangeReaders.some(function(t){return t._begin===e&&(t._enqueue(n),!0)}),"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}_onProgress(e){void 0===e.total?this._rangeReaders[0]?.onProgress?.({loaded:e.loaded}):this._fullRequestReader?.onProgress?.({loaded:e.loaded,total:e.total})}_onProgressiveDone(){this._fullRequestReader?.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(e){let t=this._rangeReaders.indexOf(e);t>=0&&this._rangeReaders.splice(t,1)}getFullReader(){T(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");let e=this._queuedChunks;return this._queuedChunks=null,new tp(this,e,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;let n=new th(this,e,t);return this._pdfDataRangeTransport.requestDataRange(e,t),this._rangeReaders.push(n),n}cancelAllRequests(e){for(let t of(this._fullRequestReader?.cancel(e),this._rangeReaders.slice(0)))t.cancel(e);this._pdfDataRangeTransport.abort()}}class tp{constructor(e,t,n=!1,r=null){for(let o of(this._stream=e,this._done=n||!1,this._filename=ec(r)?r:null,this._queuedChunks=t||[],this._loaded=0,this._queuedChunks))this._loaded+=o.byteLength;this._requests=[],this._headersReady=Promise.resolve(),e._fullRequestReader=this,this.onProgress=null}_enqueue(e){if(!this._done)this._requests.length>0?this._requests.shift().resolve({value:e,done:!1}):this._queuedChunks.push(e),this._loaded+=e.byteLength}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}async read(){if(this._queuedChunks.length>0)return{value:this._queuedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};let e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){for(let e of(this._done=!0,this._requests))e.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){if(!this._done)this._done=!0}}class th{constructor(e,t,n){this._stream=e,this._begin=t,this._end=n,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(e){if(!this._done){if(0===this._requests.length)this._queuedChunk=e;else{for(let t of(this._requests.shift().resolve({value:e,done:!1}),this._requests))t.resolve({value:void 0,done:!0});this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}async read(){if(this._queuedChunk){let e=this._queuedChunk;return this._queuedChunk=null,{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};let e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){for(let e of(this._done=!0,this._requests))e.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}function tf({getResponseHeader:e,isHttp:t,rangeChunkSize:n,disableRange:r}){let o={allowRangeRequests:!1,suggestedLength:void 0},s=parseInt(e("Content-Length"),10);return Number.isInteger(s)?(o.suggestedLength=s,s<=2*n||r||!t||"bytes"!==e("Accept-Ranges")||"identity"!==(e("Content-Encoding")||"identity"))?o:(o.allowRangeRequests=!0,o):o}function tm(e){let t=e("Content-Disposition");if(t){let e=function(e){let t=!0,n=r("filename\\*","i").exec(e);if(n){let e=a(n=n[1]);return s(e=c(e=l(e=unescape(e))))}if(n=function(e){let t;let n=[],o=r("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;null!==(t=o.exec(e));){let[,e,r,o]=t;if((e=parseInt(e,10))in n){if(0===e)break;continue}n[e]=[r,o]}let s=[];for(let e=0;e<n.length&&e in n;++e){;let[t,r]=n[e];r=a(r),t&&(r=unescape(r),0===e&&(r=l(r))),s.push(r)}return s.join("")}(e))return s(c(n));if(n=r("filename","i").exec(e)){let e=a(n=n[1]);return s(e=c(e))}function r(e,t){return RegExp("(?:^|;)\\s*"+e+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',t)}function o(e,n){if(e){if(!/^[\x00-\xFF]+$/.test(n))return n;try{let r=new TextDecoder(e,{fatal:!0}),o=F(n);n=r.decode(o),t=!1}catch{}}return n}function s(e){return t&&/[\x80-\xff]/.test(e)&&(e=o("utf-8",e),t&&(e=o("iso-8859-1",e))),e}function a(e){if(e.startsWith('"')){let t=e.slice(1).split('\\"');for(let e=0;e<t.length;++e){let n=t[e].indexOf('"');-1!==n&&(t[e]=t[e].slice(0,n),t.length=e+1),t[e]=t[e].replaceAll(/\\(.)/g,"$1")}e=t.join('"')}return e}function l(e){let t=e.indexOf("'");if(-1===t)return e;let n=e.slice(0,t);return o(n,e.slice(t+1).replace(/^[^']*'/,""))}function c(e){return!e.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(e)?e:e.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,function(e,t,n,r){if("q"===n||"Q"===n)return o(t,r=(r=r.replaceAll("_"," ")).replaceAll(/=([0-9a-fA-F]{2})/g,function(e,t){return String.fromCharCode(parseInt(t,16))}));try{r=atob(r)}catch{}return o(t,r)})}return""}(t);if(e.includes("%"))try{e=decodeURIComponent(e)}catch{}if(ec(e))return e}return null}function tg(e,t){return 404===e||0===e&&t.startsWith("file:")?new N('Missing PDF "'+t+'".'):new R(`Unexpected server response (${e}) while retrieving PDF "${t}".`,e)}function tv(e){return 200===e||206===e}function tb(e,t,n){return{method:"GET",headers:e,signal:n.signal,mode:"cors",credentials:t?"include":"same-origin",redirect:"follow"}}function ty(e){let t=new Headers;for(let n in e){let r=e[n];if(void 0!==r)t.append(n,r)}return t}function tx(e){return e instanceof Uint8Array?e.buffer:e instanceof ArrayBuffer?e:(C(`getArrayBuffer - unexpected data format: ${e}`),new Uint8Array(e).buffer)}class tw{constructor(e){this.source=e,this.isHttp=/^https?:/i.test(e.url),this.httpHeaders=this.isHttp&&e.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return T(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new tS(this),this._fullRequestReader}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;let n=new tk(this,e,t);return this._rangeRequestReaders.push(n),n}cancelAllRequests(e){for(let t of(this._fullRequestReader?.cancel(e),this._rangeRequestReaders.slice(0)))t.cancel(e)}}class tS{constructor(e){this._stream=e,this._reader=null,this._loaded=0,this._filename=null;let t=e.source;this._withCredentials=t.withCredentials||!1,this._contentLength=t.length,this._headersCapability=Promise.withResolvers(),this._disableRange=t.disableRange||!1,this._rangeChunkSize=t.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._headers=ty(this._stream.httpHeaders);let n=t.url;fetch(n,tb(this._headers,this._withCredentials,this._abortController)).then(e=>{if(!tv(e.status))throw tg(e.status,n);this._reader=e.body.getReader(),this._headersCapability.resolve();let t=t=>e.headers.get(t),{allowRangeRequests:r,suggestedLength:o}=tf({getResponseHeader:t,isHttp:this._stream.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=r,this._contentLength=o||this._contentLength,this._filename=tm(t),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new j("Streaming is disabled."))}).catch(this._headersCapability.reject),this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._headersCapability.promise;let{value:e,done:t}=await this._reader.read();return t?{value:e,done:t}:(this._loaded+=e.byteLength,this.onProgress?.({loaded:this._loaded,total:this._contentLength}),{value:tx(e),done:!1})}cancel(e){this._reader?.cancel(e),this._abortController.abort()}}class tk{constructor(e,t,n){this._stream=e,this._reader=null,this._loaded=0;let r=e.source;this._withCredentials=r.withCredentials||!1,this._readCapability=Promise.withResolvers(),this._isStreamingSupported=!r.disableStream,this._abortController=new AbortController,this._headers=ty(this._stream.httpHeaders),this._headers.append("Range",`bytes=${t}-${n-1}`);let o=r.url;fetch(o,tb(this._headers,this._withCredentials,this._abortController)).then(e=>{if(!tv(e.status))throw tg(e.status,o);this._readCapability.resolve(),this._reader=e.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._readCapability.promise;let{value:e,done:t}=await this._reader.read();return t?{value:e,done:t}:(this._loaded+=e.byteLength,this.onProgress?.({loaded:this._loaded}),{value:tx(e),done:!1})}cancel(e){this._reader?.cancel(e),this._abortController.abort()}}class tA{constructor(e,t={}){this.url=e,this.isHttp=/^https?:/i.test(e),this.httpHeaders=this.isHttp&&t.httpHeaders||Object.create(null),this.withCredentials=t.withCredentials||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}requestRange(e,t,n){let r={begin:e,end:t};for(let e in n)r[e]=n[e];return this.request(r)}requestFull(e){return this.request(e)}request(e){let t=new XMLHttpRequest,n=this.currXhrId++,r=this.pendingRequests[n]={xhr:t};for(let e in t.open("GET",this.url),t.withCredentials=this.withCredentials,this.httpHeaders){let n=this.httpHeaders[e];if(void 0!==n)t.setRequestHeader(e,n)}return this.isHttp&&"begin"in e&&"end"in e?(t.setRequestHeader("Range",`bytes=${e.begin}-${e.end-1}`),r.expectedStatus=206):r.expectedStatus=200,t.responseType="arraybuffer",e.onError&&(t.onerror=function(n){e.onError(t.status)}),t.onreadystatechange=this.onStateChange.bind(this,n),t.onprogress=this.onProgress.bind(this,n),r.onHeadersReceived=e.onHeadersReceived,r.onDone=e.onDone,r.onError=e.onError,r.onProgress=e.onProgress,t.send(null),n}onProgress(e,t){let n=this.pendingRequests[e];if(!!n)n.onProgress?.(t)}onStateChange(e,t){let n=this.pendingRequests[e];if(!n)return;let r=n.xhr;if(r.readyState>=2&&n.onHeadersReceived&&(n.onHeadersReceived(),delete n.onHeadersReceived),4!==r.readyState||!(e in this.pendingRequests))return;if(delete this.pendingRequests[e],0===r.status&&this.isHttp){n.onError?.(r.status);return}let o=r.status||200;if(!(200===o&&206===n.expectedStatus)&&o!==n.expectedStatus){n.onError?.(r.status);return}let s=function(e){let t=e.response;return"string"!=typeof t?t:F(t).buffer}(r);if(206===o){let e=r.getResponseHeader("Content-Range"),t=/bytes (\d+)-(\d+)\/(\d+)/.exec(e);n.onDone({begin:parseInt(t[1],10),chunk:s})}else s?n.onDone({begin:0,chunk:s}):n.onError?.(r.status)}getRequestXhr(e){return this.pendingRequests[e].xhr}isPendingRequest(e){return e in this.pendingRequests}abortRequest(e){let t=this.pendingRequests[e].xhr;delete this.pendingRequests[e],t.abort()}}class tC{constructor(e){this._source=e,this._manager=new tA(e.url,{httpHeaders:e.httpHeaders,withCredentials:e.withCredentials}),this._rangeChunkSize=e.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(e){let t=this._rangeRequestReaders.indexOf(e);t>=0&&this._rangeRequestReaders.splice(t,1)}getFullReader(){return T(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new tE(this._manager,this._source),this._fullRequestReader}getRangeReader(e,t){let n=new tT(this._manager,e,t);return n.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(n),n}cancelAllRequests(e){for(let t of(this._fullRequestReader?.cancel(e),this._rangeRequestReaders.slice(0)))t.cancel(e)}}class tE{constructor(e,t){this._manager=e;let n={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=t.url,this._fullRequestId=e.requestFull(n),this._headersReceivedCapability=Promise.withResolvers(),this._disableRange=t.disableRange||!1,this._contentLength=t.length,this._rangeChunkSize=t.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}_onHeadersReceived(){let e=this._fullRequestId,t=this._manager.getRequestXhr(e),n=e=>t.getResponseHeader(e),{allowRangeRequests:r,suggestedLength:o}=tf({getResponseHeader:n,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});r&&(this._isRangeSupported=!0),this._contentLength=o||this._contentLength,this._filename=tm(n),this._isRangeSupported&&this._manager.abortRequest(e),this._headersReceivedCapability.resolve()}_onDone(e){if(e&&(this._requests.length>0?this._requests.shift().resolve({value:e.chunk,done:!1}):this._cachedChunks.push(e.chunk)),this._done=!0,!(this._cachedChunks.length>0)){for(let e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(e){for(let t of(this._storedError=tg(e,this._url),this._headersReceivedCapability.reject(this._storedError),this._requests))t.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(e){this.onProgress?.({loaded:e.loaded,total:e.lengthComputable?e.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersReceivedCapability.promise}async read(){if(this._storedError)throw this._storedError;if(this._cachedChunks.length>0)return{value:this._cachedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};let e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){for(let t of(this._done=!0,this._headersReceivedCapability.reject(e),this._requests))t.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class tT{constructor(e,t,n){this._manager=e;let r={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=e.url,this._requestId=e.requestRange(t,n,r),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_close(){this.onClosed?.(this)}_onDone(e){let t=e.chunk;for(let e of(this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunk=t,this._done=!0,this._requests))e.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(e){for(let t of(this._storedError=tg(e,this._url),this._requests))t.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(e){!this.isStreamingSupported&&this.onProgress?.({loaded:e.loaded})}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(null!==this._queuedChunk){let e=this._queuedChunk;return this._queuedChunk=null,{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};let e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){for(let e of(this._done=!0,this._requests))e.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}let t_=/^file:\/\/\/[a-zA-Z]:\//;class tO{constructor(e){this.source=e,this.url=function(e){let t=eH.get("url"),n=t.parse(e);return"file:"===n.protocol||n.host?n:/^[a-z]:[/\\]/i.test(e)?t.parse(`file:///${e}`):(!n.host&&(n.protocol="file:"),n)}(e.url),this.isHttp="http:"===this.url.protocol||"https:"===this.url.protocol,this.isFsUrl="file:"===this.url.protocol,this.httpHeaders=this.isHttp&&e.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return T(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new tR(this):new tD(this),this._fullRequestReader}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;let n=this.isFsUrl?new tL(this,e,t):new tN(this,e,t);return this._rangeRequestReaders.push(n),n}cancelAllRequests(e){for(let t of(this._fullRequestReader?.cancel(e),this._rangeRequestReaders.slice(0)))t.cancel(e)}}class tM{constructor(e){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null;let t=e.source;this._contentLength=t.length,this._loaded=0,this._filename=null,this._disableRange=t.disableRange||!1,this._rangeChunkSize=t.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._readableStream=null,this._readCapability=Promise.withResolvers(),this._headersCapability=Promise.withResolvers()}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;let e=this._readableStream.read();return null===e?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=e.length,this.onProgress?.({loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(e).buffer,done:!1})}cancel(e){if(!this._readableStream){this._error(e);return}this._readableStream.destroy(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e,e.on("readable",()=>{this._readCapability.resolve()}),e.on("end",()=>{e.destroy(),this._done=!0,this._readCapability.resolve()}),e.on("error",e=>{this._error(e)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new j("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class tI{constructor(e){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=Promise.withResolvers();let t=e.source;this._isStreamingSupported=!t.disableStream}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;let e=this._readableStream.read();return null===e?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=e.length,this.onProgress?.({loaded:this._loaded}),{value:new Uint8Array(e).buffer,done:!1})}cancel(e){if(!this._readableStream){this._error(e);return}this._readableStream.destroy(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e,e.on("readable",()=>{this._readCapability.resolve()}),e.on("end",()=>{e.destroy(),this._done=!0,this._readCapability.resolve()}),e.on("error",e=>{this._error(e)}),this._storedError&&this._readableStream.destroy(this._storedError)}}function tP(e,t){return{protocol:e.protocol,auth:e.auth,host:e.hostname,port:e.port,path:e.path,method:"GET",headers:t}}class tD extends tM{constructor(e){super(e);let t=t=>{if(404===t.statusCode){let e=new N(`Missing PDF "${this._url}".`);this._storedError=e,this._headersCapability.reject(e);return}this._headersCapability.resolve(),this._setReadableStream(t);let n=e=>this._readableStream.headers[e.toLowerCase()],{allowRangeRequests:r,suggestedLength:o}=tf({getResponseHeader:n,isHttp:e.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=r,this._contentLength=o||this._contentLength,this._filename=tm(n)};if(this._request=null,"http:"===this._url.protocol){let n=eH.get("http");this._request=n.request(tP(this._url,e.httpHeaders),t)}else{let n=eH.get("https");this._request=n.request(tP(this._url,e.httpHeaders),t)}this._request.on("error",e=>{this._storedError=e,this._headersCapability.reject(e)}),this._request.end()}}class tN extends tI{constructor(e,t,n){for(let t in super(e),this._httpHeaders={},e.httpHeaders){let n=e.httpHeaders[t];if(void 0!==n)this._httpHeaders[t]=n}this._httpHeaders.Range=`bytes=${t}-${n-1}`;let r=e=>{if(404===e.statusCode){let e=new N(`Missing PDF "${this._url}".`);this._storedError=e;return}this._setReadableStream(e)};if(this._request=null,"http:"===this._url.protocol){let e=eH.get("http");this._request=e.request(tP(this._url,this._httpHeaders),r)}else{let e=eH.get("https");this._request=e.request(tP(this._url,this._httpHeaders),r)}this._request.on("error",e=>{this._storedError=e}),this._request.end()}}class tR extends tM{constructor(e){super(e);let t=decodeURIComponent(this._url.path);t_.test(this._url.href)&&(t=t.replace(/^\//,""));let n=eH.get("fs");n.promises.lstat(t).then(e=>{this._contentLength=e.size,this._setReadableStream(n.createReadStream(t)),this._headersCapability.resolve()},e=>{"ENOENT"===e.code&&(e=new N(`Missing PDF "${t}".`)),this._storedError=e,this._headersCapability.reject(e)})}}class tL extends tI{constructor(e,t,n){super(e);let r=decodeURIComponent(this._url.path);t_.test(this._url.href)&&(r=r.replace(/^\//,""));let o=eH.get("fs");this._setReadableStream(o.createReadStream(r,{start:t,end:n-1}))}}class tj{#tF=Promise.withResolvers();#eg=null;#tz=!1;#tB=!!globalThis.FontInspector?.enabled;#tH=null;#tU=null;#tV=0;#tq=0;#tW=null;#tG=null;#tK=0;#tY=0;#tZ=Object.create(null);#tJ=[];#tX=null;#tQ=[];#t0=new WeakMap;#t1=null;static #t2=new Map;static #t3=new Map;static #t5=null;static #t4=new Set;constructor({textContentSource:e,container:t,viewport:n}){if(e instanceof ReadableStream)this.#tX=e;else if("object"==typeof e)this.#tX=new ReadableStream({start(t){t.enqueue(e),t.close()}});else throw Error('No "textContentSource" parameter specified.');this.#eg=this.#tG=t,this.#tY=n.scale*(globalThis.devicePixelRatio||1),this.#tK=n.rotation,this.#tU={prevFontSize:null,prevFontFamily:null,div:null,properties:null,ctx:null};let{pageWidth:r,pageHeight:o,pageX:s,pageY:a}=n.rawDims;this.#t1=[1,0,0,-1,-s,a+o],this.#tq=r,this.#tV=o,tj.#t6(),ew(t,n),this.#tF.promise.catch(()=>{}).then(()=>{tj.#t4.delete(this),this.#tU=null,this.#tZ=null})}render(){let e=()=>{this.#tW.read().then(({value:t,done:n})=>{if(n){this.#tF.resolve();return}this.#tH??=t.lang,Object.assign(this.#tZ,t.styles),this.#t8(t.items),e()},this.#tF.reject)};return this.#tW=this.#tX.getReader(),tj.#t4.add(this),e(),this.#tF.promise}update({viewport:e,onBefore:t=null}){let n=e.scale*(globalThis.devicePixelRatio||1),r=e.rotation;if(r!==this.#tK&&(t?.(),this.#tK=r,ew(this.#tG,{rotation:r})),n!==this.#tY){t?.(),this.#tY=n;let e={prevFontSize:null,prevFontFamily:null,div:null,properties:null,ctx:tj.#t9(this.#tH)};for(let t of this.#tQ)e.properties=this.#t0.get(t),e.div=t,this.#t7(e)}}cancel(){let e=new j("TextLayer task cancelled.");this.#tW?.cancel(e).catch(()=>{}),this.#tW=null,this.#tF.reject(e)}get textDivs(){return this.#tQ}get textContentItemsStr(){return this.#tJ}#t8(e){if(this.#tz)return;this.#tU.ctx??=tj.#t9(this.#tH);let t=this.#tQ,n=this.#tJ;for(let r of e){if(t.length>1e5){C("Ignoring additional textDivs for performance reasons."),this.#tz=!0;return}if(void 0===r.str){if("beginMarkedContentProps"===r.type||"beginMarkedContent"===r.type){let e=this.#eg;this.#eg=document.createElement("span"),this.#eg.classList.add("markedContent"),null!==r.id&&this.#eg.setAttribute("id",`${r.id}`),e.append(this.#eg)}else"endMarkedContent"===r.type&&(this.#eg=this.#eg.parentNode);continue}n.push(r.str),this.#ne(r)}}#ne(e){let t,n;let r=document.createElement("span"),o={angle:0,canvasWidth:0,hasText:""!==e.str,hasEOL:e.hasEOL,fontSize:0};this.#tQ.push(r);let s=U.transform(this.#t1,e.transform),a=Math.atan2(s[1],s[0]),l=this.#tZ[e.fontName];l.vertical&&(a+=Math.PI/2);let c=this.#tB&&l.fontSubstitution||l.fontFamily,u=Math.hypot(s[2],s[3]),d=u*tj.#nt(c,this.#tH);0===a?(t=s[4],n=s[5]-d):(t=s[4]+d*Math.sin(a),n=s[5]-d*Math.cos(a));let p="calc(var(--scale-factor)*",h=r.style;this.#eg===this.#tG?(h.left=`${(100*t/this.#tq).toFixed(2)}%`,h.top=`${(100*n/this.#tV).toFixed(2)}%`):(h.left=`${p}${t.toFixed(2)}px)`,h.top=`${p}${n.toFixed(2)}px)`),h.fontSize=`${p}${(tj.#t5*u).toFixed(2)}px)`,h.fontFamily=c,o.fontSize=u,r.setAttribute("role","presentation"),r.textContent=e.str,r.dir=e.dir,this.#tB&&(r.dataset.fontName=l.fontSubstitutionLoadedName||e.fontName),0!==a&&(o.angle=180/Math.PI*a);let f=!1;if(e.str.length>1)f=!0;else if(" "!==e.str&&e.transform[0]!==e.transform[3]){let t=Math.abs(e.transform[0]),n=Math.abs(e.transform[3]);t!==n&&Math.max(t,n)/Math.min(t,n)>1.5&&(f=!0)}if(f&&(o.canvasWidth=l.vertical?e.height:e.width),this.#t0.set(r,o),this.#tU.div=r,this.#tU.properties=o,this.#t7(this.#tU),o.hasText&&this.#eg.append(r),o.hasEOL){let e=document.createElement("br");e.setAttribute("role","presentation"),this.#eg.append(e)}}#t7(e){let{div:t,properties:n,ctx:r,prevFontSize:o,prevFontFamily:s}=e,{style:a}=t,l="";if(tj.#t5>1&&(l=`scale(${1/tj.#t5})`),0!==n.canvasWidth&&n.hasText){let{fontFamily:c}=a,{canvasWidth:u,fontSize:d}=n;(o!==d||s!==c)&&(r.font=`${d*this.#tY}px ${c}`,e.prevFontSize=d,e.prevFontFamily=c);let{width:p}=r.measureText(t.textContent);p>0&&(l=`scaleX(${u*this.#tY/p}) ${l}`)}0!==n.angle&&(l=`rotate(${n.angle}deg) ${l}`),l.length>0&&(a.transform=l)}static cleanup(){if(!(this.#t4.size>0)){for(let{canvas:e}of(this.#t2.clear(),this.#t3.values()))e.remove();this.#t3.clear()}}static #t9(e=null){let t=this.#t3.get(e||="");if(!t){let n=document.createElement("canvas");n.className="hiddenCanvasElement",n.lang=e,document.body.append(n),t=n.getContext("2d",{alpha:!1,willReadFrequently:!0}),this.#t3.set(e,t)}return t}static #t6(){if(null!==this.#t5)return;let e=document.createElement("div");e.style.opacity=0,e.style.lineHeight=1,e.style.fontSize="1px",e.textContent="X",document.body.append(e),this.#t5=e.getBoundingClientRect().height,e.remove()}static #nt(e,t){let n=this.#t2.get(e);if(n)return n;let r=this.#t9(t),o=r.font;r.canvas.width=r.canvas.height=30,r.font=`30px ${e}`;let s=r.measureText(""),a=s.fontBoundingBoxAscent,l=Math.abs(s.fontBoundingBoxDescent);if(a){let t=a/(a+l);return this.#t2.set(e,t),r.canvas.width=r.canvas.height=0,r.font=o,t}r.strokeStyle="red",r.clearRect(0,0,30,30),r.strokeText("g",0,0);let c=r.getImageData(0,0,30,30).data;l=0;for(let e=c.length-1-3;e>=0;e-=4)if(c[e]>0){l=Math.ceil(e/4/30);break}r.clearRect(0,0,30,30),r.strokeText("A",0,30),c=r.getImageData(0,0,30,30).data,a=0;for(let e=0,t=c.length;e<t;e+=4)if(c[e]>0){a=30-Math.floor(e/4/30);break}r.canvas.width=r.canvas.height=0,r.font=o;let u=a?a/(a+l):.8;return this.#t2.set(e,u),u}}function t$(){em("`renderTextLayer`, please use `TextLayer` instead.");let{textContentSource:e,container:t,viewport:n,...r}=arguments[0],o=Object.keys(r);o.length>0&&C("Ignoring `renderTextLayer` parameters: "+o.join(", "));let s=new tj({textContentSource:e,container:t,viewport:n}),{textDivs:a,textContentItemsStr:l}=s;return{promise:s.render(),textDivs:a,textContentItemsStr:l}}function tF(){em("`updateTextLayer`, please use `TextLayer` instead.")}class tz{static textContent(e){let t=[],n={items:t,styles:Object.create(null)};return!function e(n){if(!n)return;let r=null,o=n.name;if("#text"===o)r=n.value;else{if(!tz.shouldBuildText(o))return;n?.attributes?.textContent?r=n.attributes.textContent:n.value&&(r=n.value)}if(null!==r&&t.push({str:r}),!!n.children)for(let t of n.children)e(t)}(e),n}static shouldBuildText(e){return!("textarea"===e||"input"===e||"option"===e||"select"===e)}}let tB=a?class e extends Z{_createCanvas(e,t){return eH.get("canvas").createCanvas(e,t)}}:class e extends Z{constructor({ownerDocument:e=globalThis.document,enableHWA:t=!1}={}){super({enableHWA:t}),this._document=e}_createCanvas(e,t){let n=this._document.createElement("canvas");return n.width=e,n.height=t,n}},tH=a?class e extends J{_fetchData(e,t){return eU(e).then(e=>({cMapData:e,compressionType:t}))}}:er,tU=a?class e extends Y{}:class e extends Y{#nn;#nr;#ni;#no;#ns;#v=0;constructor({docId:e,ownerDocument:t=globalThis.document}={}){super(),this.#ni=e,this.#no=t}get #y(){return this.#nn||=new Map}get #na(){return this.#ns||=new Map}get #nl(){if(!this.#nr){let e=this.#no.createElement("div"),{style:t}=e;t.visibility="hidden",t.contain="strict",t.width=t.height=0,t.position="absolute",t.top=t.left=0,t.zIndex=-1;let n=this.#no.createElementNS(ee,"svg");n.setAttribute("width",0),n.setAttribute("height",0),this.#nr=this.#no.createElementNS(ee,"defs"),e.append(n),n.append(this.#nr),this.#no.body.append(e)}return this.#nr}#nc(e){if(1===e.length){let t=e[0],n=Array(256);for(let e=0;e<256;e++)n[e]=t[e]/255;let r=n.join(",");return[r,r,r]}let[t,n,r]=e,o=Array(256),s=Array(256),a=Array(256);for(let e=0;e<256;e++)o[e]=t[e]/255,s[e]=n[e]/255,a[e]=r[e]/255;return[o.join(","),s.join(","),a.join(",")]}addFilter(e){if(!e)return"none";let t=this.#y.get(e);if(t)return t;let[n,r,o]=this.#nc(e),s=1===e.length?n:`${n}${r}${o}`;if(t=this.#y.get(s))return this.#y.set(e,t),t;let a=`g_${this.#ni}_transfer_map_${this.#v++}`,l=`url(#${a})`;this.#y.set(e,l),this.#y.set(s,l);let c=this.#nu(a);return this.#nd(n,r,o,c),l}addHCMFilter(e,t){let n=`${e}-${t}`,r="base",o=this.#na.get(r);if(o?.key===n)return o.url;if(o?(o.filter?.remove(),o.key=n,o.url="none",o.filter=null):(o={key:n,url:"none",filter:null},this.#na.set(r,o)),!e||!t)return o.url;let s=this.#np(e);e=U.makeHexColor(...s);let a=this.#np(t);if(t=U.makeHexColor(...a),this.#nl.style.color="","#000000"===e&&"#ffffff"===t||e===t)return o.url;let l=Array(256);for(let e=0;e<=255;e++){let t=e/255;l[e]=t<=.03928?t/12.92:((t+.055)/1.055)**2.4}let c=l.join(","),u=`g_${this.#ni}_hcm_filter`,d=o.filter=this.#nu(u);this.#nd(c,c,c,d),this.#nh(d);let p=(e,t)=>{let n=s[e]/255,r=a[e]/255,o=Array(t+1);for(let e=0;e<=t;e++)o[e]=n+e/t*(r-n);return o.join(",")};return this.#nd(p(0,5),p(1,5),p(2,5),d),o.url=`url(#${u})`,o.url}addAlphaFilter(e){let t=this.#y.get(e);if(t)return t;let[n]=this.#nc([e]),r=`alpha_${n}`;if(t=this.#y.get(r))return this.#y.set(e,t),t;let o=`g_${this.#ni}_alpha_map_${this.#v++}`,s=`url(#${o})`;this.#y.set(e,s),this.#y.set(r,s);let a=this.#nu(o);return this.#nf(n,a),s}addLuminosityFilter(e){let t,n,r=this.#y.get(e||"luminosity");if(r)return r;if(e?([t]=this.#nc([e]),n=`luminosity_${t}`):n="luminosity",r=this.#y.get(n))return this.#y.set(e,r),r;let o=`g_${this.#ni}_luminosity_map_${this.#v++}`,s=`url(#${o})`;this.#y.set(e,s),this.#y.set(n,s);let a=this.#nu(o);return this.#nm(a),e&&this.#nf(t,a),s}addHighlightHCMFilter(e,t,n,r,o){let s=`${t}-${n}-${r}-${o}`,a=this.#na.get(e);if(a?.key===s)return a.url;if(a?(a.filter?.remove(),a.key=s,a.url="none",a.filter=null):(a={key:s,url:"none",filter:null},this.#na.set(e,a)),!t||!n)return a.url;let[l,c]=[t,n].map(this.#np.bind(this)),u=Math.round(.2126*l[0]+.7152*l[1]+.0722*l[2]),d=Math.round(.2126*c[0]+.7152*c[1]+.0722*c[2]),[p,h]=[r,o].map(this.#np.bind(this));d<u&&([u,d,p,h]=[d,u,h,p]),this.#nl.style.color="";let f=(e,t,n)=>{let r=Array(256),o=(d-u)/n,s=e/255,a=(t-e)/(255*n),l=0;for(let e=0;e<=n;e++){let t=Math.round(u+e*o),n=s+e*a;for(let e=l;e<=t;e++)r[e]=n;l=t+1}for(let e=l;e<256;e++)r[e]=r[l-1];return r.join(",")},m=`g_${this.#ni}_hcm_${e}_filter`,g=a.filter=this.#nu(m);return this.#nh(g),this.#nd(f(p[0],h[0],5),f(p[1],h[1],5),f(p[2],h[2],5),g),a.url=`url(#${m})`,a.url}destroy(e=!1){if(!e||0===this.#na.size)this.#nr&&(this.#nr.parentNode.parentNode.remove(),this.#nr=null),this.#nn&&(this.#nn.clear(),this.#nn=null),this.#v=0}#nm(e){let t=this.#no.createElementNS(ee,"feColorMatrix");t.setAttribute("type","matrix"),t.setAttribute("values","0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0.59 0.11 0 0"),e.append(t)}#nh(e){let t=this.#no.createElementNS(ee,"feColorMatrix");t.setAttribute("type","matrix"),t.setAttribute("values","0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"),e.append(t)}#nu(e){let t=this.#no.createElementNS(ee,"filter");return t.setAttribute("color-interpolation-filters","sRGB"),t.setAttribute("id",e),this.#nl.append(t),t}#ng(e,t,n){let r=this.#no.createElementNS(ee,t);r.setAttribute("type","discrete"),r.setAttribute("tableValues",n),e.append(r)}#nd(e,t,n,r){let o=this.#no.createElementNS(ee,"feComponentTransfer");r.append(o),this.#ng(o,"feFuncR",e),this.#ng(o,"feFuncG",t),this.#ng(o,"feFuncB",n)}#nf(e,t){let n=this.#no.createElementNS(ee,"feComponentTransfer");t.append(n),this.#ng(n,"feFuncA",e)}#np(e){return this.#nl.style.color=e,eb(getComputedStyle(this.#nl).getPropertyValue("color"))}},tV=a?class e extends X{_fetchData(e){return eU(e)}}:ei;function tq(e={}){var t;"string"==typeof e||e instanceof URL?e={url:e}:(e instanceof ArrayBuffer||ArrayBuffer.isView(e))&&(e={data:e});let n=new tG,{docId:r}=n,o=e.url?function(e){if(e instanceof URL)return e.href;try{return new URL(e,window.location).href}catch{if(a&&"string"==typeof e)return e}throw Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}(e.url):null,s=e.data?function(e){if(a&&"undefined"!=typeof Buffer&&e instanceof Buffer)throw Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(e instanceof Uint8Array&&e.byteLength===e.buffer.byteLength)return e;if("string"==typeof e)return F(e);if(e instanceof ArrayBuffer||ArrayBuffer.isView(e)||"object"==typeof e&&!isNaN(e?.length))return new Uint8Array(e);throw Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}(e.data):null,l=e.httpHeaders||null,c=!0===e.withCredentials,u=e.password??null,d=e.range instanceof tK?e.range:null,p=Number.isInteger(e.rangeChunkSize)&&e.rangeChunkSize>0?e.rangeChunkSize:65536,h=e.worker instanceof tQ?e.worker:null,f=e.verbosity,m="string"!=typeof e.docBaseUrl||el(e.docBaseUrl)?null:e.docBaseUrl,g="string"==typeof e.cMapUrl?e.cMapUrl:null,v=!1!==e.cMapPacked,b=e.CMapReaderFactory||tH,y="string"==typeof e.standardFontDataUrl?e.standardFontDataUrl:null,x=e.StandardFontDataFactory||tV,w=!0!==e.stopAtErrors,S=Number.isInteger(e.maxImageSize)&&e.maxImageSize>-1?e.maxImageSize:-1,A=!1!==e.isEvalSupported,C="boolean"==typeof e.isOffscreenCanvasSupported?e.isOffscreenCanvasSupported:!a,E=Number.isInteger(e.canvasMaxAreaInBytes)?e.canvasMaxAreaInBytes:-1,T="boolean"==typeof e.disableFontFace?e.disableFontFace:a,_=!0===e.fontExtraProperties,O=!0===e.enableXfa,M=e.ownerDocument||globalThis.document,I=!0===e.disableRange,P=!0===e.disableStream,D=!0===e.disableAutoFetch,N=!0===e.pdfBug,R=!0===e.enableHWA,L=d?d.length:e.length??NaN,j="boolean"==typeof e.useSystemFonts?e.useSystemFonts:!a&&!T,$="boolean"==typeof e.useWorkerFetch?e.useWorkerFetch:b===er&&x===ei&&g&&y&&eh(g,document.baseURI)&&eh(y,document.baseURI),z=e.canvasFactory||new tB({ownerDocument:M,enableHWA:R}),B=e.filterFactory||new tU({docId:r,ownerDocument:M});Number.isInteger(t=f)&&(k=t);let H={canvasFactory:z,filterFactory:B};if(!$&&(H.cMapReaderFactory=new b({baseUrl:g,isCompressed:v}),H.standardFontDataFactory=new x({baseUrl:y})),!h){let e={verbosity:f,port:tn.workerPort};h=e.port?tQ.fromPort(e):new tQ(e),n._worker=h}let U={docId:r,apiVersion:"4.4.168",data:s,password:u,disableAutoFetch:D,rangeChunkSize:p,length:L,docBaseUrl:m,enableXfa:O,evaluatorOptions:{maxImageSize:S,disableFontFace:T,ignoreErrors:w,isEvalSupported:A,isOffscreenCanvasSupported:C,canvasMaxAreaInBytes:E,fontExtraProperties:_,useSystemFonts:j,cMapUrl:$?g:null,standardFontDataUrl:$?y:null}},V={disableFontFace:T,fontExtraProperties:_,ownerDocument:M,pdfBug:N,styleElement:null,loadingParams:{disableAutoFetch:D,enableXfa:O}};return h.promise.then(function(){let e;if(n.destroyed)throw Error("Loading aborted");if(h.destroyed)throw Error("Worker was destroyed");let t=h.messageHandler.sendWithPromise("GetDocRequest",U,s?[s.buffer]:null);if(d)e=new td(d,{disableRange:I,disableStream:P});else if(!s){var u;if(!o)throw Error("getDocument - no `url` parameter provided.");u={url:o,length:L,httpHeaders:l,withCredentials:c,rangeChunkSize:p,disableRange:I,disableStream:P},e=a?"undefined"!=typeof fetch&&"undefined"!=typeof Response&&"body"in Response.prototype&&eh(u.url)?new tw(u):new tO(u):eh(u.url)?new tw(u):new tC(u)}return t.then(t=>{if(n.destroyed)throw Error("Loading aborted");if(h.destroyed)throw Error("Worker was destroyed");let o=new ts(r,t,h.port),s=new t0(o,n,e,V,H);n._transport=s,o.send("Ready",null)})}).catch(n._capability.reject),n}function tW(e){return"object"==typeof e&&Number.isInteger(e?.num)&&e.num>=0&&Number.isInteger(e?.gen)&&e.gen>=0}class tG{static #ni=0;constructor(){this._capability=Promise.withResolvers(),this._transport=null,this._worker=null,this.docId=`d${tG.#ni++}`,this.destroyed=!1,this.onPassword=null,this.onProgress=null}get promise(){return this._capability.promise}async destroy(){this.destroyed=!0;try{this._worker?.port&&(this._worker._pendingDestroy=!0),await this._transport?.destroy()}catch(e){throw this._worker?.port&&delete this._worker._pendingDestroy,e}this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null)}}class tK{constructor(e,t,n=!1,r=null){this.length=e,this.initialData=t,this.progressiveDone=n,this.contentDispositionFilename=r,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=Promise.withResolvers()}addRangeListener(e){this._rangeListeners.push(e)}addProgressListener(e){this._progressListeners.push(e)}addProgressiveReadListener(e){this._progressiveReadListeners.push(e)}addProgressiveDoneListener(e){this._progressiveDoneListeners.push(e)}onDataRange(e,t){for(let n of this._rangeListeners)n(e,t)}onDataProgress(e,t){this._readyCapability.promise.then(()=>{for(let n of this._progressListeners)n(e,t)})}onDataProgressiveRead(e){this._readyCapability.promise.then(()=>{for(let t of this._progressiveReadListeners)t(e)})}onDataProgressiveDone(){this._readyCapability.promise.then(()=>{for(let e of this._progressiveDoneListeners)e()})}transportReady(){this._readyCapability.resolve()}requestDataRange(e,t){E("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}class tY{constructor(e,t){this._pdfInfo=e,this._transport=t}get annotationStorage(){return this._transport.annotationStorage}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return O(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(e){return this._transport.getPage(e)}getPageIndex(e){return this._transport.getPageIndex(e)}getDestinations(){return this._transport.getDestinations()}getDestination(e){return this._transport.getDestination(e)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig({intent:e="display"}={}){let{renderingIntent:t}=this._transport.getRenderingIntent(e);return this._transport.getOptionalContentConfig(t)}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}saveDocument(){return this._transport.saveDocument()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}cleanup(e=!1){return this._transport.startCleanup(e||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}cachedPageNumber(e){return this._transport.cachedPageNumber(e)}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}class tZ{#nv=null;#nb=!1;constructor(e,t,n,r=!1){this._pageIndex=e,this._pageInfo=t,this._transport=n,this._stats=r?new ep:null,this._pdfBug=r,this.commonObjs=n.commonObjs,this.objs=new t2,this._maybeCleanupAfterRender=!1,this._intentStates=new Map,this.destroyed=!1}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport({scale:e,rotation:t=this.rotate,offsetX:n=0,offsetY:r=0,dontFlip:o=!1}={}){return new es({viewBox:this.view,scale:e,rotation:t,offsetX:n,offsetY:r,dontFlip:o})}getAnnotations({intent:e="display"}={}){let{renderingIntent:t}=this._transport.getRenderingIntent(e);return this._transport.getAnnotations(this._pageIndex,t)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return O(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){return this._transport._htmlForXfa?.children[this._pageIndex]||null}render({canvasContext:e,viewport:t,intent:n="display",annotationMode:r=d.ENABLE,transform:o=null,background:s=null,optionalContentConfigPromise:a=null,annotationCanvasMap:l=null,pageColors:c=null,printAnnotationStorage:p=null}){this._stats?.time("Overall");let h=this._transport.getRenderingIntent(n,r,p),{renderingIntent:f,cacheKey:m}=h;this.#nb=!1,this.#ny(),a||=this._transport.getOptionalContentConfig(f);let g=this._intentStates.get(m);!g&&(g=Object.create(null),this._intentStates.set(m,g)),g.streamReaderCancelTimeout&&(clearTimeout(g.streamReaderCancelTimeout),g.streamReaderCancelTimeout=null);let v=!!(f&u.PRINT);!g.displayReadyCapability&&(g.displayReadyCapability=Promise.withResolvers(),g.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats?.time("Page Request"),this._pumpOperatorList(h));let b=e=>{g.renderTasks.delete(y),(this._maybeCleanupAfterRender||v)&&(this.#nb=!0),this.#nx(!v),e?(y.capability.reject(e),this._abortOperatorList({intentState:g,reason:e instanceof Error?e:Error(e)})):y.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"),globalThis.Stats?.enabled&&globalThis.Stats.add(this.pageNumber,this._stats))},y=new t5({callback:b,params:{canvasContext:e,viewport:t,transform:o,background:s},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:l,operatorList:g.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!v,pdfBug:this._pdfBug,pageColors:c});(g.renderTasks||=new Set).add(y);let x=y.task;return Promise.all([g.displayReadyCapability.promise,a]).then(([e,t])=>{if(this.destroyed){b();return}if(this._stats?.time("Rendering"),!(t.renderingIntent&f))throw Error("Must use the same `intent`-argument when calling the `PDFPageProxy.render` and `PDFDocumentProxy.getOptionalContentConfig` methods.");y.initializeGraphics({transparency:e,optionalContentConfig:t}),y.operatorListChanged()}).catch(b),x}getOperatorList({intent:e="display",annotationMode:t=d.ENABLE,printAnnotationStorage:n=null}={}){let r;let o=this._transport.getRenderingIntent(e,t,n,!0),s=this._intentStates.get(o.cacheKey);return!s&&(s=Object.create(null),this._intentStates.set(o.cacheKey,s)),!s.opListReadCapability&&((r=Object.create(null)).operatorListChanged=function(){s.operatorList.lastChunk&&(s.opListReadCapability.resolve(s.operatorList),s.renderTasks.delete(r))},s.opListReadCapability=Promise.withResolvers(),(s.renderTasks||=new Set).add(r),s.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats?.time("Page Request"),this._pumpOperatorList(o)),s.opListReadCapability.promise}streamTextContent({includeMarkedContent:e=!1,disableNormalization:t=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:!0===e,disableNormalization:!0===t},{highWaterMark:100,size:e=>e.items.length})}getTextContent(e={}){if(this._transport._htmlForXfa)return this.getXfa().then(e=>tz.textContent(e));let t=this.streamTextContent(e);return new Promise(function(e,n){let r=t.getReader(),o={items:[],styles:Object.create(null),lang:null};!function t(){r.read().then(function({value:n,done:r}){if(r){e(o);return}o.lang??=n.lang,Object.assign(o.styles,n.styles),o.items.push(...n.items),t()},n)}()})}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;let e=[];for(let t of this._intentStates.values()){if(this._abortOperatorList({intentState:t,reason:Error("Page was destroyed."),force:!0}),!t.opListReadCapability)for(let n of t.renderTasks)e.push(n.completed),n.cancel()}return this.objs.clear(),this.#nb=!1,this.#ny(),Promise.all(e)}cleanup(e=!1){this.#nb=!0;let t=this.#nx(!1);return e&&t&&(this._stats&&=new ep),t}#nx(e=!1){if(this.#ny(),!this.#nb||this.destroyed)return!1;if(e)return this.#nv=setTimeout(()=>{this.#nv=null,this.#nx(!1)},5e3),!1;for(let{renderTasks:e,operatorList:t}of this._intentStates.values())if(e.size>0||!t.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),this.#nb=!1,!0}#ny(){this.#nv&&(clearTimeout(this.#nv),this.#nv=null)}_startRenderPage(e,t){let n=this._intentStates.get(t);if(!!n)this._stats?.timeEnd("Page Request"),n.displayReadyCapability?.resolve(e)}_renderPageChunk(e,t){for(let n=0,r=e.length;n<r;n++)t.operatorList.fnArray.push(e.fnArray[n]),t.operatorList.argsArray.push(e.argsArray[n]);for(let n of(t.operatorList.lastChunk=e.lastChunk,t.operatorList.separateAnnots=e.separateAnnots,t.renderTasks))n.operatorListChanged();e.lastChunk&&this.#nx(!0)}_pumpOperatorList({renderingIntent:e,cacheKey:t,annotationStorageSerializable:n}){let{map:r,transfer:o}=n,s=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:e,cacheKey:t,annotationStorage:r},o).getReader(),a=this._intentStates.get(t);a.streamReader=s;let l=()=>{s.read().then(({value:e,done:t})=>{if(t){a.streamReader=null;return}if(!this._transport.destroyed)this._renderPageChunk(e,a),l()},e=>{if(a.streamReader=null,!this._transport.destroyed){if(a.operatorList){for(let e of(a.operatorList.lastChunk=!0,a.renderTasks))e.operatorListChanged();this.#nx(!0)}if(a.displayReadyCapability)a.displayReadyCapability.reject(e);else if(a.opListReadCapability)a.opListReadCapability.reject(e);else throw e}})};l()}_abortOperatorList({intentState:e,reason:t,force:n=!1}){if(!e.streamReader)return;if(e.streamReaderCancelTimeout&&(clearTimeout(e.streamReaderCancelTimeout),e.streamReaderCancelTimeout=null),!n){if(e.renderTasks.size>0)return;if(t instanceof ea){let n=100;t.extraDelay>0&&t.extraDelay<1e3&&(n+=t.extraDelay),e.streamReaderCancelTimeout=setTimeout(()=>{e.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:e,reason:t,force:!0})},n);return}}if(e.streamReader.cancel(new j(t.message)).catch(()=>{}),e.streamReader=null,!this._transport.destroyed){for(let[t,n]of this._intentStates)if(n===e){this._intentStates.delete(t);break}this.cleanup()}}get stats(){return this._stats}}class tJ{#nw=new Set;#nS=Promise.resolve();postMessage(e,t){let n={data:structuredClone(e,t?{transfer:t}:null)};this.#nS.then(()=>{for(let e of this.#nw)e.call(this,n)})}addEventListener(e,t){this.#nw.add(t)}removeEventListener(e,t){this.#nw.delete(t)}terminate(){this.#nw.clear()}}let tX={isWorkerDisabled:!1,fakeWorkerId:0};a&&(tX.isWorkerDisabled=!0,tn.workerSrc||="./pdf.worker.mjs"),tX.isSameOrigin=function(e,t){let n;try{if(!(n=new URL(e)).origin||"null"===n.origin)return!1}catch{return!1}let r=new URL(t,n);return n.origin===r.origin},tX.createCDNWrapper=function(e){let t=`await import("${e}");`;return URL.createObjectURL(new Blob([t],{type:"text/javascript"}))};class tQ{static #nk;constructor({name:e=null,port:t=null,verbosity:n=k}={}){if(this.name=e,this.destroyed=!1,this.verbosity=n,this._readyCapability=Promise.withResolvers(),this._port=null,this._webWorker=null,this._messageHandler=null,t){if(tQ.#nk?.has(t))throw Error("Cannot use more than one PDFWorker per port.");(tQ.#nk||=new WeakMap).set(t,this),this._initializeFromPort(t);return}this._initialize()}get promise(){return a?Promise.all([eH.promise,this._readyCapability.promise]):this._readyCapability.promise}#nA(){this._readyCapability.resolve(),this._messageHandler.send("configure",{verbosity:this.verbosity})}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(e){this._port=e,this._messageHandler=new ts("main","worker",e),this._messageHandler.on("ready",function(){}),this.#nA()}_initialize(){if(tX.isWorkerDisabled||tQ.#nC){this._setupFakeWorker();return}let{workerSrc:e}=tQ;try{!tX.isSameOrigin(window.location.href,e)&&(e=tX.createCDNWrapper(new URL(e,window.location).href));let t=new Worker(e,{type:"module"}),n=new ts("main","worker",t),r=()=>{o.abort(),n.destroy(),t.terminate(),this.destroyed?this._readyCapability.reject(Error("Worker was destroyed")):this._setupFakeWorker()},o=new AbortController;t.addEventListener("error",()=>{!this._webWorker&&r()},{signal:o.signal}),n.on("test",e=>{if(o.abort(),this.destroyed||!e){r();return}this._messageHandler=n,this._port=t,this._webWorker=t,this.#nA()}),n.on("ready",e=>{if(o.abort(),this.destroyed){r();return}try{s()}catch{this._setupFakeWorker()}});let s=()=>{let e=new Uint8Array;n.send("test",e,[e.buffer])};s();return}catch{A("The worker has been disabled.")}this._setupFakeWorker()}_setupFakeWorker(){!tX.isWorkerDisabled&&(C("Setting up fake worker."),tX.isWorkerDisabled=!0),tQ._setupFakeWorkerGlobal.then(e=>{if(this.destroyed){this._readyCapability.reject(Error("Worker was destroyed"));return}let t=new tJ;this._port=t;let n=`fake${tX.fakeWorkerId++}`,r=new ts(n+"_worker",n,t);e.setup(r,t),this._messageHandler=new ts(n,n+"_worker",t),this.#nA()}).catch(e=>{this._readyCapability.reject(Error(`Setting up fake worker failed: "${e.message}".`))})}destroy(){this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),tQ.#nk?.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}static fromPort(e){if(!e?.port)throw Error("PDFWorker.fromPort - invalid method signature.");let t=this.#nk?.get(e.port);if(t){if(t._pendingDestroy)throw Error("PDFWorker.fromPort - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return t}return new tQ(e)}static get workerSrc(){if(tn.workerSrc)return tn.workerSrc;throw Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get #nC(){try{return globalThis.pdfjsWorker?.WorkerMessageHandler||null}catch{return null}}static get _setupFakeWorkerGlobal(){return O(this,"_setupFakeWorkerGlobal",(async()=>this.#nC?this.#nC:(await import(this.workerSrc)).WorkerMessageHandler)())}}class t0{#nE=new Map;#nT=new Map;#n_=new Map;#nO=new Map;#nM=null;constructor(e,t,n,r,o){this.messageHandler=e,this.loadingTask=t,this.commonObjs=new t2,this.fontLoader=new e$({ownerDocument:r.ownerDocument,styleElement:r.styleElement}),this.loadingParams=r.loadingParams,this._params=r,this.canvasFactory=o.canvasFactory,this.filterFactory=o.filterFactory,this.cMapReaderFactory=o.cMapReaderFactory,this.standardFontDataFactory=o.standardFontDataFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=n,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=Promise.withResolvers(),this.setupMessageHandler()}#nI(e,t=null){let n=this.#nE.get(e);if(n)return n;let r=this.messageHandler.sendWithPromise(e,t);return this.#nE.set(e,r),r}get annotationStorage(){return O(this,"annotationStorage",new eL)}getRenderingIntent(e,t=d.ENABLE,n=null,r=!1){let o=u.DISPLAY,s=eR;switch(e){case"any":o=u.ANY;break;case"display":break;case"print":o=u.PRINT;break;default:C(`getRenderingIntent - invalid intent: ${e}`)}switch(t){case d.DISABLE:o+=u.ANNOTATIONS_DISABLE;break;case d.ENABLE:break;case d.ENABLE_FORMS:o+=u.ANNOTATIONS_FORMS;break;case d.ENABLE_STORAGE:s=((o+=u.ANNOTATIONS_STORAGE)&u.PRINT&&n instanceof ej?n:this.annotationStorage).serializable;break;default:C(`getRenderingIntent - invalid annotationMode: ${t}`)}return r&&(o+=u.OPLIST),{renderingIntent:o,cacheKey:`${o}_${s.hash}`,annotationStorageSerializable:s}}destroy(){if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=Promise.withResolvers(),this.#nM?.reject(Error("Worker was destroyed during onPassword callback"));let e=[];for(let t of this.#nT.values())e.push(t._destroy());this.#nT.clear(),this.#n_.clear(),this.#nO.clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();let t=this.messageHandler.sendWithPromise("Terminate",null);return e.push(t),Promise.all(e).then(()=>{this.commonObjs.clear(),this.fontLoader.clear(),this.#nE.clear(),this.filterFactory.destroy(),tj.cleanup(),this._networkStream?.cancelAllRequests(new j("Worker was terminated.")),this.messageHandler&&(this.messageHandler.destroy(),this.messageHandler=null),this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){let{messageHandler:e,loadingTask:t}=this;e.on("GetReader",(e,t)=>{T(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=e=>{this._lastProgress={loaded:e.loaded,total:e.total}},t.onPull=()=>{this._fullReader.read().then(function({value:e,done:n}){if(n){t.close();return}T(e instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),t.enqueue(new Uint8Array(e),1,[e])}).catch(e=>{t.error(e)})},t.onCancel=e=>{this._fullReader.cancel(e),t.ready.catch(e=>{if(!this.destroyed)throw e})}}),e.on("ReaderHeadersReady",e=>{let n=Promise.withResolvers(),r=this._fullReader;return r.headersReady.then(()=>{(!r.isStreamingSupported||!r.isRangeSupported)&&(this._lastProgress&&t.onProgress?.(this._lastProgress),r.onProgress=e=>{t.onProgress?.({loaded:e.loaded,total:e.total})}),n.resolve({isStreamingSupported:r.isStreamingSupported,isRangeSupported:r.isRangeSupported,contentLength:r.contentLength})},n.reject),n.promise}),e.on("GetRangeReader",(e,t)=>{T(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");let n=this._networkStream.getRangeReader(e.begin,e.end);if(!n){t.close();return}t.onPull=()=>{n.read().then(function({value:e,done:n}){if(n){t.close();return}T(e instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),t.enqueue(new Uint8Array(e),1,[e])}).catch(e=>{t.error(e)})},t.onCancel=e=>{n.cancel(e),t.ready.catch(e=>{if(!this.destroyed)throw e})}}),e.on("GetDoc",({pdfInfo:e})=>{this._numPages=e.numPages,this._htmlForXfa=e.htmlForXfa,delete e.htmlForXfa,t._capability.resolve(new tY(e,this))}),e.on("DocException",function(e){let n;switch(e.name){case"PasswordException":n=new I(e.message,e.code);break;case"InvalidPDFException":n=new D(e.message);break;case"MissingPDFException":n=new N(e.message);break;case"UnexpectedResponseException":n=new R(e.message,e.status);break;case"UnknownErrorException":n=new P(e.message,e.details);break;default:E("DocException - expected a valid Error.")}t._capability.reject(n)}),e.on("PasswordRequest",e=>{if(this.#nM=Promise.withResolvers(),t.onPassword)try{t.onPassword(e=>{e instanceof Error?this.#nM.reject(e):this.#nM.resolve({password:e})},e.code)}catch(e){this.#nM.reject(e)}else this.#nM.reject(new I(e.message,e.code));return this.#nM.promise}),e.on("DataLoaded",e=>{t.onProgress?.({loaded:e.length,total:e.length}),this.downloadInfoCapability.resolve(e)}),e.on("StartRenderPage",e=>{if(!this.destroyed)this.#nT.get(e.pageIndex)._startRenderPage(e.transparency,e.cacheKey)}),e.on("commonobj",([t,n,r])=>{if(this.destroyed||this.commonObjs.has(t))return null;switch(n){case"Font":let{disableFontFace:o,fontExtraProperties:s,pdfBug:a}=this._params;if("error"in r){let e=r.error;C(`Error during font loading: ${e}`),this.commonObjs.resolve(t,e);break}let l=new eF(r,{disableFontFace:o,inspectFont:a&&globalThis.FontInspector?.enabled?(e,t)=>globalThis.FontInspector.fontAdded(e,t):null});this.fontLoader.bind(l).catch(()=>e.sendWithPromise("FontFallback",{id:t})).finally(()=>{!s&&l.data&&(l.data=null),this.commonObjs.resolve(t,l)});break;case"CopyLocalImage":let{imageRef:c}=r;for(let e of(T(c,"The imageRef must be defined."),this.#nT.values()))for(let[,n]of e.objs){if(n?.ref===c){if(!n.dataLen)return null;return this.commonObjs.resolve(t,structuredClone(n)),n.dataLen}}break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(t,r);break;default:throw Error(`Got unknown common object type ${n}`)}return null}),e.on("obj",([e,t,n,r])=>{if(this.destroyed)return;let o=this.#nT.get(t);if(!o.objs.has(e)){if(0===o._intentStates.size){r?.bitmap?.close();return}switch(n){case"Image":o.objs.resolve(e,r),r?.dataLen>1e7&&(o._maybeCleanupAfterRender=!0);break;case"Pattern":o.objs.resolve(e,r);break;default:throw Error(`Got unknown object type ${n}`)}}}),e.on("DocProgress",e=>{if(!this.destroyed)t.onProgress?.({loaded:e.loaded,total:e.total})}),e.on("FetchBuiltInCMap",e=>this.destroyed?Promise.reject(Error("Worker was destroyed.")):this.cMapReaderFactory?this.cMapReaderFactory.fetch(e):Promise.reject(Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter."))),e.on("FetchStandardFontData",e=>this.destroyed?Promise.reject(Error("Worker was destroyed.")):this.standardFontDataFactory?this.standardFontDataFactory.fetch(e):Promise.reject(Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter.")))}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){this.annotationStorage.size<=0&&C("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");let{map:e,transfer:t}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:e,filename:this._fullReader?.filename??null},t).finally(()=>{this.annotationStorage.resetModified()})}getPage(e){if(!Number.isInteger(e)||e<=0||e>this._numPages)return Promise.reject(Error("Invalid page request."));let t=e-1,n=this.#n_.get(t);if(n)return n;let r=this.messageHandler.sendWithPromise("GetPage",{pageIndex:t}).then(n=>{if(this.destroyed)throw Error("Transport destroyed");n.refStr&&this.#nO.set(n.refStr,e);let r=new tZ(t,n,this,this._params.pdfBug);return this.#nT.set(t,r),r});return this.#n_.set(t,r),r}getPageIndex(e){return tW(e)?this.messageHandler.sendWithPromise("GetPageIndex",{num:e.num,gen:e.gen}):Promise.reject(Error("Invalid pageIndex request."))}getAnnotations(e,t){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:e,intent:t})}getFieldObjects(){return this.#nI("GetFieldObjects")}hasJSActions(){return this.#nI("HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(e){return"string"!=typeof e?Promise.reject(Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:e})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getDocJSActions(){return this.#nI("GetDocJSActions")}getPageJSActions(e){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:e})}getStructTree(e){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:e})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(e){return this.#nI("GetOptionalContentConfig").then(t=>new tu(t,e))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){let e="GetMetadata",t=this.#nE.get(e);if(t)return t;let n=this.messageHandler.sendWithPromise(e,null).then(e=>({info:e[0],metadata:e[1]?new ta(e[1]):null,contentDispositionFilename:this._fullReader?.filename??null,contentLength:this._fullReader?.contentLength??null}));return this.#nE.set(e,n),n}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(e=!1){if(!this.destroyed){for(let e of(await this.messageHandler.sendWithPromise("Cleanup",null),this.#nT.values()))if(!e.cleanup())throw Error(`startCleanup: Page ${e.pageNumber} is currently rendering.`);this.commonObjs.clear(),!e&&this.fontLoader.clear(),this.#nE.clear(),this.filterFactory.destroy(!0),tj.cleanup()}}cachedPageNumber(e){if(!tW(e))return null;let t=0===e.gen?`${e.num}R`:`${e.num}R${e.gen}`;return this.#nO.get(t)??null}}let t1=Symbol("INITIAL_DATA");class t2{#nP=Object.create(null);#nD(e){return this.#nP[e]||={...Promise.withResolvers(),data:t1}}get(e,t=null){if(t){let n=this.#nD(e);return n.promise.then(()=>t(n.data)),null}let n=this.#nP[e];if(!n||n.data===t1)throw Error(`Requesting object that isn't resolved yet ${e}.`);return n.data}has(e){let t=this.#nP[e];return!!t&&t.data!==t1}resolve(e,t=null){let n=this.#nD(e);n.data=t,n.resolve()}clear(){for(let e in this.#nP){let{data:t}=this.#nP[e];t?.bitmap?.close()}this.#nP=Object.create(null)}*[Symbol.iterator](){for(let e in this.#nP){let{data:t}=this.#nP[e];if(t!==t1)yield[e,t]}}}class t3{#nN=null;constructor(e){this.#nN=e,this.onContinue=null}get promise(){return this.#nN.capability.promise}cancel(e=0){this.#nN.cancel(null,e)}get separateAnnots(){let{separateAnnots:e}=this.#nN.operatorList;if(!e)return!1;let{annotationCanvasMap:t}=this.#nN;return e.form||e.canvas&&t?.size>0}}class t5{#nR=null;static #nL=new WeakSet;constructor({callback:e,params:t,objs:n,commonObjs:r,annotationCanvasMap:o,operatorList:s,pageIndex:a,canvasFactory:l,filterFactory:c,useRequestAnimationFrame:u=!1,pdfBug:d=!1,pageColors:p=null}){this.callback=e,this.params=t,this.objs=n,this.commonObjs=r,this.annotationCanvasMap=o,this.operatorListIdx=null,this.operatorList=s,this._pageIndex=a,this.canvasFactory=l,this.filterFactory=c,this._pdfBug=d,this.pageColors=p,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=!0===u&&"undefined"!=typeof window,this.cancelled=!1,this.capability=Promise.withResolvers(),this.task=new t3(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=t.canvasContext.canvas}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics({transparency:e=!1,optionalContentConfig:t}){if(this.cancelled)return;if(this._canvas){if(t5.#nL.has(this._canvas))throw Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");t5.#nL.add(this._canvas)}this._pdfBug&&globalThis.StepperManager?.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());let{canvasContext:n,viewport:r,transform:o,background:s}=this.params;this.gfx=new tt(n,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:t},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:o,viewport:r,transparency:e,background:s}),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback?.()}cancel(e=null,t=0){this.running=!1,this.cancelled=!0,this.gfx?.endDrawing(),this.#nR&&(window.cancelAnimationFrame(this.#nR),this.#nR=null),t5.#nL.delete(this._canvas),this.callback(e||new ea(`Rendering cancelled, page ${this._pageIndex+1}`,t))}operatorListChanged(){if(!this.graphicsReady){this.graphicsReadyCallback||=this._continueBound;return}if(this.stepper?.updateOperatorList(this.operatorList),!this.running)this._continue()}_continue(){if(this.running=!0,!this.cancelled)this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext()}_scheduleNext(){this._useRequestAnimationFrame?this.#nR=window.requestAnimationFrame(()=>{this.#nR=null,this._nextBound().catch(this._cancelBound)}):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}async _next(){if(!this.cancelled)this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),t5.#nL.delete(this._canvas),this.callback()))}}let t4="4.4.168",t6="19fbc8998";function t8(e){return Math.floor(255*Math.max(0,Math.min(1,e))).toString(16).padStart(2,"0")}function t9(e){return Math.max(0,Math.min(255,255*e))}class t7{static CMYK_G([e,t,n,r]){return["G",1-Math.min(1,.3*e+.59*n+.11*t+r)]}static G_CMYK([e]){return["CMYK",0,0,0,1-e]}static G_RGB([e]){return["RGB",e,e,e]}static G_rgb([e]){return[e=t9(e),e,e]}static G_HTML([e]){let t=t8(e);return`#${t}${t}${t}`}static RGB_G([e,t,n]){return["G",.3*e+.59*t+.11*n]}static RGB_rgb(e){return e.map(t9)}static RGB_HTML(e){return`#${e.map(t8).join("")}`}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB([e,t,n,r]){return["RGB",1-Math.min(1,e+r),1-Math.min(1,n+r),1-Math.min(1,t+r)]}static CMYK_rgb([e,t,n,r]){return[t9(1-Math.min(1,e+r)),t9(1-Math.min(1,n+r)),t9(1-Math.min(1,t+r))]}static CMYK_HTML(e){let t=this.CMYK_RGB(e).slice(1);return this.RGB_HTML(t)}static RGB_CMYK([e,t,n]){let r=1-e,o=1-t,s=1-n,a=Math.min(r,o,s);return["CMYK",r,o,s,a]}}class ne{static setupStorage(e,t,n,r,o){let s=r.getValue(t,{value:null});switch(n.name){case"textarea":if(null!==s.value&&(e.textContent=s.value),"print"===o)break;e.addEventListener("input",e=>{r.setValue(t,{value:e.target.value})});break;case"input":if("radio"===n.attributes.type||"checkbox"===n.attributes.type){if(s.value===n.attributes.xfaOn?e.setAttribute("checked",!0):s.value===n.attributes.xfaOff&&e.removeAttribute("checked"),"print"===o)break;e.addEventListener("change",e=>{r.setValue(t,{value:e.target.checked?e.target.getAttribute("xfaOn"):e.target.getAttribute("xfaOff")})})}else{if(null!==s.value&&e.setAttribute("value",s.value),"print"===o)break;e.addEventListener("input",e=>{r.setValue(t,{value:e.target.value})})}break;case"select":if(null!==s.value)for(let t of(e.setAttribute("value",s.value),n.children))t.attributes.value===s.value?t.attributes.selected=!0:t.attributes.hasOwnProperty("selected")&&delete t.attributes.selected;e.addEventListener("input",e=>{let n=e.target.options,o=-1===n.selectedIndex?"":n[n.selectedIndex].value;r.setValue(t,{value:o})})}}static setAttributes({html:e,element:t,storage:n=null,intent:r,linkService:o}){let{attributes:s}=t,a=e instanceof HTMLAnchorElement;for(let[t,n]of("radio"===s.type&&(s.name=`${s.name}-${r}`),Object.entries(s))){if(null!=n)switch(t){case"class":n.length&&e.setAttribute(t,n.join(" "));break;case"dataId":break;case"id":e.setAttribute("data-element-id",n);break;case"style":Object.assign(e.style,n);break;case"textContent":e.textContent=n;break;default:(!a||"href"!==t&&"newWindow"!==t)&&e.setAttribute(t,n)}}a&&o.addLinkAttributes(e,s.href,s.newWindow),n&&s.dataId&&this.setupStorage(e,s.dataId,t,n)}static render(e){let t=e.annotationStorage,n=e.linkService,r=e.xfaHtml,o=e.intent||"display",s=document.createElement(r.name);r.attributes&&this.setAttributes({html:s,element:r,intent:o,linkService:n});let a="richText"!==o,l=e.div;if(l.append(s),e.viewport){let t=`matrix(${e.viewport.transform.join(",")})`;l.style.transform=t}a&&l.setAttribute("class","xfaLayer xfaFont");let c=[];if(0===r.children.length){if(r.value){let e=document.createTextNode(r.value);s.append(e),a&&tz.shouldBuildText(r.name)&&c.push(e)}return{textDivs:c}}let u=[[r,-1,s]];for(;u.length>0;){let[e,r,s]=u.at(-1);if(r+1===e.children.length){u.pop();continue}let l=e.children[++u.at(-1)[1]];if(null===l)continue;let{name:d}=l;if("#text"===d){let e=document.createTextNode(l.value);c.push(e),s.append(e);continue}let p=l?.attributes?.xmlns?document.createElementNS(l.attributes.xmlns,d):document.createElement(d);if(s.append(p),l.attributes&&this.setAttributes({html:p,element:l,storage:t,intent:o,linkService:n}),l.children?.length>0)u.push([l,-1,p]);else if(l.value){let e=document.createTextNode(l.value);a&&tz.shouldBuildText(d)&&c.push(e),p.append(e)}}for(let e of l.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))e.setAttribute("readOnly",!0);return{textDivs:c}}static update(e){let t=`matrix(${e.viewport.transform.join(",")})`;e.div.style.transform=t,e.div.hidden=!1}}let nt=new WeakSet;function nn(e){return{width:e[2]-e[0],height:e[3]-e[1]}}class nr{static create(e){switch(e.data.annotationType){case v.LINK:return new no(e);case v.TEXT:return new ns(e);case v.WIDGET:switch(e.data.fieldType){case"Tx":return new nl(e);case"Btn":if(e.data.radioButton)return new nd(e);if(e.data.checkBox)return new nu(e);return new np(e);case"Ch":return new nh(e);case"Sig":return new nc(e)}return new na(e);case v.POPUP:return new nf(e);case v.FREETEXT:return new ng(e);case v.LINE:return new nv(e);case v.SQUARE:return new nb(e);case v.CIRCLE:return new ny(e);case v.POLYLINE:return new nx(e);case v.CARET:return new nS(e);case v.INK:return new nk(e);case v.POLYGON:return new nw(e);case v.HIGHLIGHT:return new nA(e);case v.UNDERLINE:return new nC(e);case v.SQUIGGLY:return new nE(e);case v.STRIKEOUT:return new nT(e);case v.STAMP:return new n_(e);case v.FILEATTACHMENT:return new nO(e);default:return new ni(e)}}}class ni{#nj=null;#n$=!1;#nF=null;constructor(e,{isRenderable:t=!1,ignoreBorder:n=!1,createQuadrilaterals:r=!1}={}){this.isRenderable=t,this.data=e.data,this.layer=e.layer,this.linkService=e.linkService,this.downloadManager=e.downloadManager,this.imageResourcesPath=e.imageResourcesPath,this.renderForms=e.renderForms,this.svgFactory=e.svgFactory,this.annotationStorage=e.annotationStorage,this.enableScripting=e.enableScripting,this.hasJSActions=e.hasJSActions,this._fieldObjects=e.fieldObjects,this.parent=e.parent,t&&(this.container=this._createContainer(n)),r&&this._createQuadrilaterals()}static _hasPopupData({titleObj:e,contentsObj:t,richText:n}){return!!(e?.str||t?.str||n?.str)}get hasPopupData(){return ni._hasPopupData(this.data)}updateEdited(e){if(!this.container)return;this.#nj||={rect:this.data.rect.slice(0)};let{rect:t}=e;t&&this.#nz(t),this.#nF?.popup.updateEdited(e)}resetEdited(){if(!!this.#nj)this.#nz(this.#nj.rect),this.#nF?.popup.resetEdited(),this.#nj=null}#nz(e){let{container:{style:t},data:{rect:n,rotation:r},parent:{viewport:{rawDims:{pageWidth:o,pageHeight:s,pageX:a,pageY:l}}}}=this;n?.splice(0,4,...e);let{width:c,height:u}=nn(e);t.left=`${100*(e[0]-a)/o}%`,t.top=`${100*(s-e[3]+l)/s}%`,0===r?(t.width=`${100*c/o}%`,t.height=`${100*u/s}%`):this.setRotation(r)}_createContainer(e){let{data:t,parent:{page:n,viewport:r}}=this,o=document.createElement("section");o.setAttribute("data-annotation-id",t.id),!(this instanceof na)&&(o.tabIndex=1e3);let{style:s}=o;if(s.zIndex=this.parent.zIndex++,t.popupRef&&o.setAttribute("aria-haspopup","dialog"),t.alternativeText&&(o.title=t.alternativeText),t.noRotate&&o.classList.add("norotate"),!t.rect||this instanceof nf){let{rotation:e}=t;return!t.hasOwnCanvas&&0!==e&&this.setRotation(e,o),o}let{width:a,height:l}=nn(t.rect);if(!e&&t.borderStyle.width>0){s.borderWidth=`${t.borderStyle.width}px`;let e=t.borderStyle.horizontalCornerRadius,n=t.borderStyle.verticalCornerRadius;if(e>0||n>0){let t=`calc(${e}px * var(--scale-factor)) / calc(${n}px * var(--scale-factor))`;s.borderRadius=t}else if(this instanceof nd){let e=`calc(${a}px * var(--scale-factor)) / calc(${l}px * var(--scale-factor))`;s.borderRadius=e}switch(t.borderStyle.style){case b.SOLID:s.borderStyle="solid";break;case b.DASHED:s.borderStyle="dashed";break;case b.BEVELED:C("Unimplemented border style: beveled");break;case b.INSET:C("Unimplemented border style: inset");break;case b.UNDERLINE:s.borderBottomStyle="solid"}let r=t.borderColor||null;r?(this.#n$=!0,s.borderColor=U.makeHexColor(0|r[0],0|r[1],0|r[2])):s.borderWidth=0}let c=U.normalizeRect([t.rect[0],n.view[3]-t.rect[1]+n.view[1],t.rect[2],n.view[3]-t.rect[3]+n.view[1]]),{pageWidth:u,pageHeight:d,pageX:p,pageY:h}=r.rawDims;s.left=`${100*(c[0]-p)/u}%`,s.top=`${100*(c[1]-h)/d}%`;let{rotation:f}=t;return t.hasOwnCanvas||0===f?(s.width=`${100*a/u}%`,s.height=`${100*l/d}%`):this.setRotation(f,o),o}setRotation(e,t=this.container){let n,r;if(!this.data.rect)return;let{pageWidth:o,pageHeight:s}=this.parent.viewport.rawDims,{width:a,height:l}=nn(this.data.rect);e%180==0?(n=100*a/o,r=100*l/s):(n=100*l/o,r=100*a/s),t.style.width=`${n}%`,t.style.height=`${r}%`,t.setAttribute("data-main-rotation",(360-e)%360)}get _commonActions(){let e=(e,t,n)=>{let r=n.detail[e],o=r[0],s=r.slice(1);n.target.style[t]=t7[`${o}_HTML`](s),this.annotationStorage.setValue(this.data.id,{[t]:t7[`${o}_rgb`](s)})};return O(this,"_commonActions",{display:e=>{let{display:t}=e.detail,n=t%2==1;this.container.style.visibility=n?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:n,noPrint:1===t||2===t})},print:e=>{this.annotationStorage.setValue(this.data.id,{noPrint:!e.detail.print})},hidden:e=>{let{hidden:t}=e.detail;this.container.style.visibility=t?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:t,noView:t})},focus:e=>{setTimeout(()=>e.target.focus({preventScroll:!1}),0)},userName:e=>{e.target.title=e.detail.userName},readonly:e=>{e.target.disabled=e.detail.readonly},required:e=>{this._setRequired(e.target,e.detail.required)},bgColor:t=>{e("bgColor","backgroundColor",t)},fillColor:t=>{e("fillColor","backgroundColor",t)},fgColor:t=>{e("fgColor","color",t)},textColor:t=>{e("textColor","color",t)},borderColor:t=>{e("borderColor","borderColor",t)},strokeColor:t=>{e("strokeColor","borderColor",t)},rotation:e=>{let t=e.detail.rotation;this.setRotation(t),this.annotationStorage.setValue(this.data.id,{rotation:t})}})}_dispatchEventFromSandbox(e,t){let n=this._commonActions;for(let r of Object.keys(t.detail)){let o=e[r]||n[r];o?.(t)}}_setDefaultPropertiesFromJS(e){if(!this.enableScripting)return;let t=this.annotationStorage.getRawValue(this.data.id);if(!t)return;let n=this._commonActions;for(let[r,o]of Object.entries(t)){let s=n[r];s&&(s({detail:{[r]:o},target:e}),delete t[r])}}_createQuadrilaterals(){let e;if(!this.container)return;let{quadPoints:t}=this.data;if(!t)return;let[n,r,o,s]=this.data.rect.map(e=>Math.fround(e));if(8===t.length){let[e,a,l,c]=t.subarray(2,6);if(o===e&&s===a&&n===l&&r===c)return}let{style:a}=this.container;if(this.#n$){let{borderColor:t,borderWidth:n}=a;a.borderWidth=0,e=["url('data:image/svg+xml;utf8,",'<svg xmlns="http://www.w3.org/2000/svg"',' preserveAspectRatio="none" viewBox="0 0 1 1">',`<g fill="transparent" stroke="${t}" stroke-width="${n}">`],this.container.classList.add("hasBorder")}let l=o-n,c=s-r,{svgFactory:u}=this,d=u.createElement("svg");d.classList.add("quadrilateralsContainer"),d.setAttribute("width",0),d.setAttribute("height",0);let p=u.createElement("defs");d.append(p);let h=u.createElement("clipPath"),f=`clippath_${this.data.id}`;h.setAttribute("id",f),h.setAttribute("clipPathUnits","objectBoundingBox"),p.append(h);for(let r=2,o=t.length;r<o;r+=8){let o=t[r],a=t[r+1],d=t[r+2],p=t[r+3],f=u.createElement("rect"),m=(d-n)/l,g=(s-a)/c,v=(o-d)/l,b=(a-p)/c;f.setAttribute("x",m),f.setAttribute("y",g),f.setAttribute("width",v),f.setAttribute("height",b),h.append(f),e?.push(`<rect vector-effect="non-scaling-stroke" x="${m}" y="${g}" width="${v}" height="${b}"/>`)}this.#n$&&(e.push("</g></svg>')"),a.backgroundImage=e.join("")),this.container.append(d),this.container.style.clipPath=`url(#${f})`}_createPopup(){let{container:e,data:t}=this;e.setAttribute("aria-haspopup","dialog");let n=this.#nF=new nf({data:{color:t.color,titleObj:t.titleObj,modificationDate:t.modificationDate,contentsObj:t.contentsObj,richText:t.richText,parentRect:t.rect,borderStyle:0,id:`popup_${t.id}`,rotation:t.rotation},parent:this.parent,elements:[this]});this.parent.div.append(n.render())}render(){E("Abstract method `AnnotationElement.render` called")}_getElementsByName(e,t=null){let n=[];if(this._fieldObjects){let r=this._fieldObjects[e];if(r)for(let{page:e,id:o,exportValues:s}of r){if(-1===e||o===t)continue;let r="string"==typeof s?s:null,a=document.querySelector(`[data-element-id="${o}"]`);if(a&&!nt.has(a)){C(`_getElementsByName - element not allowed: ${o}`);continue}n.push({id:o,exportValue:r,domElement:a})}return n}for(let r of document.getElementsByName(e)){let{exportValue:e}=r,o=r.getAttribute("data-element-id");if(o!==t&&!!nt.has(r))n.push({id:o,exportValue:e,domElement:r})}return n}show(){this.container&&(this.container.hidden=!1),this.popup?.maybeShow()}hide(){this.container&&(this.container.hidden=!0),this.popup?.forceHide()}getElementsToTriggerPopup(){return this.container}addHighlightArea(){let e=this.getElementsToTriggerPopup();if(Array.isArray(e))for(let t of e)t.classList.add("highlightArea");else e.classList.add("highlightArea")}get _isEditable(){return!1}_editOnDoubleClick(){if(!this._isEditable)return;let{annotationEditorType:e,data:{id:t}}=this;this.container.addEventListener("dblclick",()=>{this.linkService.eventBus?.dispatch("switchannotationeditormode",{source:this,mode:e,editId:t})})}}class no extends ni{constructor(e,t=null){super(e,{isRenderable:!0,ignoreBorder:!!t?.ignoreBorder,createQuadrilaterals:!0}),this.isTooltipOnly=e.data.isTooltipOnly}render(){let{data:e,linkService:t}=this,n=document.createElement("a");n.setAttribute("data-element-id",e.id);let r=!1;return e.url?(t.addLinkAttributes(n,e.url,e.newWindow),r=!0):e.action?(this._bindNamedAction(n,e.action),r=!0):e.attachment?(this.#nB(n,e.attachment,e.attachmentDest),r=!0):e.setOCGState?(this.#nH(n,e.setOCGState),r=!0):e.dest?(this._bindLink(n,e.dest),r=!0):(e.actions&&(e.actions.Action||e.actions["Mouse Up"]||e.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(n,e),r=!0),e.resetForm?(this._bindResetFormAction(n,e.resetForm),r=!0):this.isTooltipOnly&&!r&&(this._bindLink(n,""),r=!0)),this.container.classList.add("linkAnnotation"),r&&this.container.append(n),this.container}#nU(){this.container.setAttribute("data-internal-link","")}_bindLink(e,t){e.href=this.linkService.getDestinationHash(t),e.onclick=()=>(t&&this.linkService.goToDestination(t),!1),(t||""===t)&&this.#nU()}_bindNamedAction(e,t){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeNamedAction(t),!1),this.#nU()}#nB(e,t,n=null){e.href=this.linkService.getAnchorUrl(""),t.description&&(e.title=t.description),e.onclick=()=>(this.downloadManager?.openOrDownloadData(t.content,t.filename,n),!1),this.#nU()}#nH(e,t){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeSetOCGState(t),!1),this.#nU()}_bindJSAction(e,t){e.href=this.linkService.getAnchorUrl("");let n=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(let r of Object.keys(t.actions)){let o=n.get(r);if(!!o)e[o]=()=>(this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t.id,name:r}}),!1)}!e.onclick&&(e.onclick=()=>!1),this.#nU()}_bindResetFormAction(e,t){let n=e.onclick;if(!n&&(e.href=this.linkService.getAnchorUrl("")),this.#nU(),!this._fieldObjects){C('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),!n&&(e.onclick=()=>!1);return}e.onclick=()=>{n?.();let{fields:e,refs:r,include:o}=t,s=[];if(0!==e.length||0!==r.length){let t=new Set(r);for(let n of e)for(let{id:e}of this._fieldObjects[n]||[])t.add(e);for(let e of Object.values(this._fieldObjects))for(let n of e)t.has(n.id)===o&&s.push(n)}else for(let e of Object.values(this._fieldObjects))s.push(...e);let a=this.annotationStorage,l=[];for(let e of s){let{id:t}=e;switch(l.push(t),e.type){case"text":{let n=e.defaultValue||"";a.setValue(t,{value:n});break}case"checkbox":case"radiobutton":{let n=e.defaultValue===e.exportValues;a.setValue(t,{value:n});break}case"combobox":case"listbox":{let n=e.defaultValue||"";a.setValue(t,{value:n});break}default:continue}let n=document.querySelector(`[data-element-id="${t}"]`);if(!!n){if(!nt.has(n)){C(`_bindResetFormAction - element not allowed: ${t}`);continue}n.dispatchEvent(new Event("resetform"))}}return this.enableScripting&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:l,name:"ResetForm"}}),!1}}}class ns extends ni{constructor(e){super(e,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");let e=document.createElement("img");return e.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",e.setAttribute("data-l10n-id","pdfjs-text-annotation-type"),e.setAttribute("data-l10n-args",JSON.stringify({type:this.data.name})),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(e),this.container}}class na extends ni{render(){return this.container}showElementAndHideCanvas(e){this.data.hasOwnCanvas&&(e.previousSibling?.nodeName==="CANVAS"&&(e.previousSibling.hidden=!0),e.hidden=!1)}_getKeyModifier(e){return B.platform.isMac?e.metaKey:e.ctrlKey}_setEventListener(e,t,n,r,o){n.includes("mouse")?e.addEventListener(n,e=>{this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:r,value:o(e),shift:e.shiftKey,modifier:this._getKeyModifier(e)}})}):e.addEventListener(n,e=>{if("blur"===n){if(!t.focused||!e.relatedTarget)return;t.focused=!1}else if("focus"===n){if(t.focused)return;t.focused=!0}if(!!o)this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:r,value:o(e)}})})}_setEventListeners(e,t,n,r){for(let[o,s]of n)("Action"===s||this.data.actions?.[s])&&(("Focus"===s||"Blur"===s)&&(t||={focused:!1}),this._setEventListener(e,t,o,s,r),"Focus"!==s||this.data.actions?.Blur?"Blur"===s&&!this.data.actions?.Focus&&this._setEventListener(e,t,"focus","Focus",null):this._setEventListener(e,t,"blur","Blur",null))}_setBackgroundColor(e){let t=this.data.backgroundColor||null;e.style.backgroundColor=null===t?"transparent":U.makeHexColor(t[0],t[1],t[2])}_setTextStyle(e){let t;let{fontColor:n}=this.data.defaultAppearanceData,r=this.data.defaultAppearanceData.fontSize||9,o=e.style,s=e=>Math.round(10*e)/10;if(this.data.multiLine){let e=Math.abs(this.data.rect[3]-this.data.rect[1]-2),n=Math.round(e/(1.35*r))||1;t=Math.min(r,s(e/n/1.35))}else t=Math.min(r,s(Math.abs(this.data.rect[3]-this.data.rect[1]-2)/1.35));o.fontSize=`calc(${t}px * var(--scale-factor))`,o.color=U.makeHexColor(n[0],n[1],n[2]),null!==this.data.textAlignment&&(o.textAlign=["left","center","right"][this.data.textAlignment])}_setRequired(e,t){t?e.setAttribute("required",!0):e.removeAttribute("required"),e.setAttribute("aria-required",t)}}class nl extends na{constructor(e){super(e,{isRenderable:e.renderForms||e.data.hasOwnCanvas||!e.data.hasAppearance&&!!e.data.fieldValue})}setPropertyOnSiblings(e,t,n,r){let o=this.annotationStorage;for(let s of this._getElementsByName(e.name,e.id))s.domElement&&(s.domElement[t]=n),o.setValue(s.id,{[r]:n})}render(){let e=this.annotationStorage,t=this.data.id;this.container.classList.add("textWidgetAnnotation");let n=null;if(this.renderForms){let r=e.getValue(t,{value:this.data.fieldValue}),o=r.value||"",s=e.getValue(t,{charLimit:this.data.maxLen}).charLimit;s&&o.length>s&&(o=o.slice(0,s));let a=r.formattedValue||this.data.textContent?.join("\n")||null;a&&this.data.comb&&(a=a.replaceAll(/\s+/g,""));let l={userValue:o,formattedValue:a,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?((n=document.createElement("textarea")).textContent=a??o,this.data.doNotScroll&&(n.style.overflowY="hidden")):((n=document.createElement("input")).type="text",n.setAttribute("value",a??o),this.data.doNotScroll&&(n.style.overflowX="hidden")),this.data.hasOwnCanvas&&(n.hidden=!0),nt.add(n),n.setAttribute("data-element-id",t),n.disabled=this.data.readOnly,n.name=this.data.fieldName,n.tabIndex=1e3,this._setRequired(n,this.data.required),s&&(n.maxLength=s),n.addEventListener("input",r=>{e.setValue(t,{value:r.target.value}),this.setPropertyOnSiblings(n,"value",r.target.value,"value"),l.formattedValue=null}),n.addEventListener("resetform",e=>{let t=this.data.defaultFieldValue??"";n.value=l.userValue=t,l.formattedValue=null});let c=e=>{let{formattedValue:t}=l;null!=t&&(e.target.value=t),e.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){n.addEventListener("focus",e=>{if(l.focused)return;let{target:t}=e;l.userValue&&(t.value=l.userValue),l.lastCommittedValue=t.value,l.commitKey=1,!this.data.actions?.Focus&&(l.focused=!0)}),n.addEventListener("updatefromsandbox",n=>{this.showElementAndHideCanvas(n.target);this._dispatchEventFromSandbox({value(n){l.userValue=n.detail.value??"",e.setValue(t,{value:l.userValue.toString()}),n.target.value=l.userValue},formattedValue(n){let{formattedValue:r}=n.detail;l.formattedValue=r,null!=r&&n.target!==document.activeElement&&(n.target.value=r),e.setValue(t,{formattedValue:r})},selRange(e){e.target.setSelectionRange(...e.detail.selRange)},charLimit:n=>{let{charLimit:r}=n.detail,{target:o}=n;if(0===r){o.removeAttribute("maxLength");return}o.setAttribute("maxLength",r);let s=l.userValue;if(!!s&&!(s.length<=r))s=s.slice(0,r),o.value=l.userValue=s,e.setValue(t,{value:s}),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:s,willCommit:!0,commitKey:1,selStart:o.selectionStart,selEnd:o.selectionEnd}})}},n)}),n.addEventListener("keydown",e=>{l.commitKey=1;let n=-1;if("Escape"===e.key?n=0:"Enter"!==e.key||this.data.multiLine?"Tab"===e.key&&(l.commitKey=3):n=2,-1===n)return;let{value:r}=e.target;if(l.lastCommittedValue!==r)l.lastCommittedValue=r,l.userValue=r,this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:r,willCommit:!0,commitKey:n,selStart:e.target.selectionStart,selEnd:e.target.selectionEnd}})});let r=c;c=null,n.addEventListener("blur",e=>{if(!l.focused||!e.relatedTarget)return;!this.data.actions?.Blur&&(l.focused=!1);let{value:n}=e.target;l.userValue=n,l.lastCommittedValue!==n&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:n,willCommit:!0,commitKey:l.commitKey,selStart:e.target.selectionStart,selEnd:e.target.selectionEnd}}),r(e)}),this.data.actions?.Keystroke&&n.addEventListener("beforeinput",e=>{l.lastCommittedValue=null;let{data:n,target:r}=e,{value:o,selectionStart:s,selectionEnd:a}=r,c=s,u=a;switch(e.inputType){case"deleteWordBackward":{let e=o.substring(0,s).match(/\w*[^\w]*$/);e&&(c-=e[0].length);break}case"deleteWordForward":{let e=o.substring(s).match(/^[^\w]*\w*/);e&&(u+=e[0].length);break}case"deleteContentBackward":s===a&&(c-=1);break;case"deleteContentForward":s===a&&(u+=1)}e.preventDefault(),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:o,change:n||"",willCommit:!1,selStart:c,selEnd:u}})}),this._setEventListeners(n,l,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],e=>e.target.value)}if(c&&n.addEventListener("blur",c),this.data.comb){let e=(this.data.rect[2]-this.data.rect[0])/s;n.classList.add("comb"),n.style.letterSpacing=`calc(${e}px * var(--scale-factor) - 1ch)`}}else(n=document.createElement("div")).textContent=this.data.fieldValue,n.style.verticalAlign="middle",n.style.display="table-cell",this.data.hasOwnCanvas&&(n.hidden=!0);return this._setTextStyle(n),this._setBackgroundColor(n),this._setDefaultPropertiesFromJS(n),this.container.append(n),this.container}}class nc extends na{constructor(e){super(e,{isRenderable:!!e.data.hasOwnCanvas})}}class nu extends na{constructor(e){super(e,{isRenderable:e.renderForms})}render(){let e=this.annotationStorage,t=this.data,n=t.id,r=e.getValue(n,{value:t.exportValue===t.fieldValue}).value;"string"==typeof r&&(r="Off"!==r,e.setValue(n,{value:r})),this.container.classList.add("buttonWidgetAnnotation","checkBox");let o=document.createElement("input");return nt.add(o),o.setAttribute("data-element-id",n),o.disabled=t.readOnly,this._setRequired(o,this.data.required),o.type="checkbox",o.name=t.fieldName,r&&o.setAttribute("checked",!0),o.setAttribute("exportValue",t.exportValue),o.tabIndex=1e3,o.addEventListener("change",r=>{let{name:o,checked:s}=r.target;for(let r of this._getElementsByName(o,n)){let n=s&&r.exportValue===t.exportValue;r.domElement&&(r.domElement.checked=n),e.setValue(r.id,{value:n})}e.setValue(n,{value:s})}),o.addEventListener("resetform",e=>{let n=t.defaultFieldValue||"Off";e.target.checked=n===t.exportValue}),this.enableScripting&&this.hasJSActions&&(o.addEventListener("updatefromsandbox",t=>{this._dispatchEventFromSandbox({value(t){t.target.checked="Off"!==t.detail.value,e.setValue(n,{value:t.target.checked})}},t)}),this._setEventListeners(o,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],e=>e.target.checked)),this._setBackgroundColor(o),this._setDefaultPropertiesFromJS(o),this.container.append(o),this.container}}class nd extends na{constructor(e){super(e,{isRenderable:e.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");let e=this.annotationStorage,t=this.data,n=t.id,r=e.getValue(n,{value:t.fieldValue===t.buttonValue}).value;if("string"==typeof r&&(r=r!==t.buttonValue,e.setValue(n,{value:r})),r)for(let r of this._getElementsByName(t.fieldName,n))e.setValue(r.id,{value:!1});let o=document.createElement("input");if(nt.add(o),o.setAttribute("data-element-id",n),o.disabled=t.readOnly,this._setRequired(o,this.data.required),o.type="radio",o.name=t.fieldName,r&&o.setAttribute("checked",!0),o.tabIndex=1e3,o.addEventListener("change",t=>{let{name:r,checked:o}=t.target;for(let t of this._getElementsByName(r,n))e.setValue(t.id,{value:!1});e.setValue(n,{value:o})}),o.addEventListener("resetform",e=>{let n=t.defaultFieldValue;e.target.checked=null!=n&&n===t.buttonValue}),this.enableScripting&&this.hasJSActions){let r=t.buttonValue;o.addEventListener("updatefromsandbox",t=>{this._dispatchEventFromSandbox({value:t=>{let o=r===t.detail.value;for(let r of this._getElementsByName(t.target.name)){let t=o&&r.id===n;r.domElement&&(r.domElement.checked=t),e.setValue(r.id,{value:t})}}},t)}),this._setEventListeners(o,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],e=>e.target.checked)}return this._setBackgroundColor(o),this._setDefaultPropertiesFromJS(o),this.container.append(o),this.container}}class np extends no{constructor(e){super(e,{ignoreBorder:e.data.hasAppearance})}render(){let e=super.render();e.classList.add("buttonWidgetAnnotation","pushButton");let t=e.lastChild;return this.enableScripting&&this.hasJSActions&&t&&(this._setDefaultPropertiesFromJS(t),t.addEventListener("updatefromsandbox",e=>{this._dispatchEventFromSandbox({},e)})),e}}class nh extends na{constructor(e){super(e,{isRenderable:e.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");let e=this.annotationStorage,t=this.data.id,n=e.getValue(t,{value:this.data.fieldValue}),r=document.createElement("select");nt.add(r),r.setAttribute("data-element-id",t),r.disabled=this.data.readOnly,this._setRequired(r,this.data.required),r.name=this.data.fieldName,r.tabIndex=1e3;let o=this.data.combo&&this.data.options.length>0;for(let e of(!this.data.combo&&(r.size=this.data.options.length,this.data.multiSelect&&(r.multiple=!0)),r.addEventListener("resetform",e=>{let t=this.data.defaultFieldValue;for(let e of r.options)e.selected=e.value===t}),this.data.options)){let t=document.createElement("option");t.textContent=e.displayValue,t.value=e.exportValue,n.value.includes(e.exportValue)&&(t.setAttribute("selected",!0),o=!1),r.append(t)}let s=null;if(o){let e=document.createElement("option");e.value=" ",e.setAttribute("hidden",!0),e.setAttribute("selected",!0),r.prepend(e),s=()=>{e.remove(),r.removeEventListener("input",s),s=null},r.addEventListener("input",s)}let a=e=>{let t=e?"value":"textContent",{options:n,multiple:o}=r;return o?Array.prototype.filter.call(n,e=>e.selected).map(e=>e[t]):-1===n.selectedIndex?null:n[n.selectedIndex][t]},l=a(!1),c=e=>{let t=e.target.options;return Array.prototype.map.call(t,e=>({displayValue:e.textContent,exportValue:e.value}))};return this.enableScripting&&this.hasJSActions?(r.addEventListener("updatefromsandbox",n=>{this._dispatchEventFromSandbox({value(n){s?.();let o=n.detail.value,c=new Set(Array.isArray(o)?o:[o]);for(let e of r.options)e.selected=c.has(e.value);e.setValue(t,{value:a(!0)}),l=a(!1)},multipleSelection(e){r.multiple=!0},remove(n){let o=r.options,s=n.detail.remove;o[s].selected=!1,r.remove(s),o.length>0&&-1===Array.prototype.findIndex.call(o,e=>e.selected)&&(o[0].selected=!0),e.setValue(t,{value:a(!0),items:c(n)}),l=a(!1)},clear(n){for(;0!==r.length;)r.remove(0);e.setValue(t,{value:null,items:[]}),l=a(!1)},insert(n){let{index:o,displayValue:s,exportValue:u}=n.detail.insert,d=r.children[o],p=document.createElement("option");p.textContent=s,p.value=u,d?d.before(p):r.append(p),e.setValue(t,{value:a(!0),items:c(n)}),l=a(!1)},items(n){let{items:o}=n.detail;for(;0!==r.length;)r.remove(0);for(let e of o){let{displayValue:t,exportValue:n}=e,o=document.createElement("option");o.textContent=t,o.value=n,r.append(o)}r.options.length>0&&(r.options[0].selected=!0),e.setValue(t,{value:a(!0),items:c(n)}),l=a(!1)},indices(n){let r=new Set(n.detail.indices);for(let e of n.target.options)e.selected=r.has(e.index);e.setValue(t,{value:a(!0)}),l=a(!1)},editable(e){e.target.disabled=!e.detail.editable}},n)}),r.addEventListener("input",n=>{let r=a(!0),o=a(!1);e.setValue(t,{value:r}),n.preventDefault(),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:l,change:o,changeEx:r,willCommit:!1,commitKey:1,keyDown:!1}})}),this._setEventListeners(r,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],e=>e.target.value)):r.addEventListener("input",function(n){e.setValue(t,{value:a(!0)})}),this.data.combo&&this._setTextStyle(r),this._setBackgroundColor(r),this._setDefaultPropertiesFromJS(r),this.container.append(r),this.container}}class nf extends ni{constructor(e){let{data:t,elements:n}=e;super(e,{isRenderable:ni._hasPopupData(t)}),this.elements=n,this.popup=null}render(){this.container.classList.add("popupAnnotation");let e=this.popup=new nm({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open}),t=[];for(let n of this.elements)n.popup=e,t.push(n.data.id),n.addHighlightArea();return this.container.setAttribute("aria-controls",t.map(e=>`${G}${e}`).join(",")),this.container}}class nm{#nV=this.#nq.bind(this);#nW=this.#nG.bind(this);#nK=this.#nY.bind(this);#nZ=this.#nJ.bind(this);#nX=null;#eg=null;#nQ=null;#n0=null;#n1=null;#n2=null;#n3=null;#n5=!1;#n4=null;#A=null;#n6=null;#n8=null;#n9=null;#nj=null;#n7=!1;constructor({container:e,color:t,elements:n,titleObj:r,modificationDate:o,contentsObj:s,richText:a,parent:l,rect:c,parentRect:u,open:d}){for(let d of(this.#eg=e,this.#n9=r,this.#nQ=s,this.#n8=a,this.#n2=l,this.#nX=t,this.#n6=c,this.#n3=u,this.#n1=n,this.#n0=eg.toDateObject(o),this.trigger=n.flatMap(e=>e.getElementsToTriggerPopup()),this.trigger))d.addEventListener("click",this.#nZ),d.addEventListener("mouseenter",this.#nK),d.addEventListener("mouseleave",this.#nW),d.classList.add("popupTriggerArea");for(let e of n)e.container?.addEventListener("keydown",this.#nV);this.#eg.hidden=!0,d&&this.#nJ()}render(){if(this.#n4)return;let e=this.#n4=document.createElement("div");if(e.className="popup",this.#nX){let t=e.style.outlineColor=U.makeHexColor(...this.#nX);CSS.supports("background-color","color-mix(in srgb, red 30%, white)")?e.style.backgroundColor=`color-mix(in srgb, ${t} 30%, white)`:e.style.backgroundColor=U.makeHexColor(...this.#nX.map(e=>Math.floor(.7*(255-e)+e)))}let t=document.createElement("span");t.className="header";let n=document.createElement("h1");if(t.append(n),{dir:n.dir,str:n.textContent}=this.#n9,e.append(t),this.#n0){let e=document.createElement("span");e.classList.add("popupDate"),e.setAttribute("data-l10n-id","pdfjs-annotation-date-string"),e.setAttribute("data-l10n-args",JSON.stringify({date:this.#n0.toLocaleDateString(),time:this.#n0.toLocaleTimeString()})),t.append(e)}let r=this.#re;if(r)ne.render({xfaHtml:r,intent:"richText",div:e}),e.lastChild.classList.add("richText","popupContent");else{let t=this._formatContents(this.#nQ);e.append(t)}this.#eg.append(e)}get #re(){let e=this.#n8,t=this.#nQ;return e?.str&&(!t?.str||t.str===e.str)&&this.#n8.html||null}get #rt(){return this.#re?.attributes?.style?.fontSize||0}get #rn(){return this.#re?.attributes?.style?.color||null}#rr(e){let t=[],n={style:{color:this.#rn,fontSize:this.#rt?`calc(${this.#rt}px * var(--scale-factor))`:""}};for(let r of e.split("\n"))t.push({name:"span",value:r,attributes:n});return{str:e,html:{name:"div",attributes:{dir:"auto"},children:[{name:"p",children:t}]}}}_formatContents({str:e,dir:t}){let n=document.createElement("p");n.classList.add("popupContent"),n.dir=t;let r=e.split(/(?:\r\n?|\n)/);for(let e=0,t=r.length;e<t;++e){let o=r[e];n.append(document.createTextNode(o)),e<t-1&&n.append(document.createElement("br"))}return n}#nq(e){if(!e.altKey&&!e.shiftKey&&!e.ctrlKey&&!e.metaKey)("Enter"===e.key||"Escape"===e.key&&this.#n5)&&this.#nJ()}updateEdited({rect:e,popupContent:t}){this.#nj||={contentsObj:this.#nQ,richText:this.#n8},e&&(this.#A=null),t&&(this.#n8=this.#rr(t),this.#nQ=null),this.#n4?.remove(),this.#n4=null}resetEdited(){if(!!this.#nj)({contentsObj:this.#nQ,richText:this.#n8}=this.#nj),this.#nj=null,this.#n4?.remove(),this.#n4=null,this.#A=null}#ri(){if(null!==this.#A)return;let{page:{view:e},viewport:{rawDims:{pageWidth:t,pageHeight:n,pageX:r,pageY:o}}}=this.#n2,s=!!this.#n3,a=s?this.#n3:this.#n6;for(let e of this.#n1)if(!a||null!==U.intersect(e.data.rect,a)){a=e.data.rect,s=!0;break}let l=U.normalizeRect([a[0],e[3]-a[1]+e[1],a[2],e[3]-a[3]+e[1]]),c=s?a[2]-a[0]+5:0,u=l[0]+c,d=l[1];this.#A=[100*(u-r)/t,100*(d-o)/n];let{style:p}=this.#eg;p.left=`${this.#A[0]}%`,p.top=`${this.#A[1]}%`}#nJ(){this.#n5=!this.#n5,this.#n5?(this.#nY(),this.#eg.addEventListener("click",this.#nZ),this.#eg.addEventListener("keydown",this.#nV)):(this.#nG(),this.#eg.removeEventListener("click",this.#nZ),this.#eg.removeEventListener("keydown",this.#nV))}#nY(){!this.#n4&&this.render(),this.isVisible?this.#n5&&this.#eg.classList.add("focused"):(this.#ri(),this.#eg.hidden=!1,this.#eg.style.zIndex=parseInt(this.#eg.style.zIndex)+1e3)}#nG(){if(this.#eg.classList.remove("focused"),!this.#n5&&!!this.isVisible)this.#eg.hidden=!0,this.#eg.style.zIndex=parseInt(this.#eg.style.zIndex)-1e3}forceHide(){if(this.#n7=this.isVisible,!!this.#n7)this.#eg.hidden=!0}maybeShow(){if(!!this.#n7)!this.#n4&&this.#nY(),this.#n7=!1,this.#eg.hidden=!1}get isVisible(){return!1===this.#eg.hidden}}class ng extends ni{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),this.textContent=e.data.textContent,this.textPosition=e.data.textPosition,this.annotationEditorType=p.FREETEXT}render(){if(this.container.classList.add("freeTextAnnotation"),this.textContent){let e=document.createElement("div");for(let t of(e.classList.add("annotationTextContent"),e.setAttribute("role","comment"),this.textContent)){let n=document.createElement("span");n.textContent=t,e.append(n)}this.container.append(e)}return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}get _isEditable(){return this.data.hasOwnCanvas}}class nv extends ni{#ro=null;constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("lineAnnotation");let e=this.data,{width:t,height:n}=nn(e.rect),r=this.svgFactory.create(t,n,!0),o=this.#ro=this.svgFactory.createElement("svg:line");return o.setAttribute("x1",e.rect[2]-e.lineCoordinates[0]),o.setAttribute("y1",e.rect[3]-e.lineCoordinates[1]),o.setAttribute("x2",e.rect[2]-e.lineCoordinates[2]),o.setAttribute("y2",e.rect[3]-e.lineCoordinates[3]),o.setAttribute("stroke-width",e.borderStyle.width||1),o.setAttribute("stroke","transparent"),o.setAttribute("fill","transparent"),r.append(o),this.container.append(r),!e.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#ro}addHighlightArea(){this.container.classList.add("highlightArea")}}class nb extends ni{#rs=null;constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("squareAnnotation");let e=this.data,{width:t,height:n}=nn(e.rect),r=this.svgFactory.create(t,n,!0),o=e.borderStyle.width,s=this.#rs=this.svgFactory.createElement("svg:rect");return s.setAttribute("x",o/2),s.setAttribute("y",o/2),s.setAttribute("width",t-o),s.setAttribute("height",n-o),s.setAttribute("stroke-width",o||1),s.setAttribute("stroke","transparent"),s.setAttribute("fill","transparent"),r.append(s),this.container.append(r),!e.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#rs}addHighlightArea(){this.container.classList.add("highlightArea")}}class ny extends ni{#ra=null;constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("circleAnnotation");let e=this.data,{width:t,height:n}=nn(e.rect),r=this.svgFactory.create(t,n,!0),o=e.borderStyle.width,s=this.#ra=this.svgFactory.createElement("svg:ellipse");return s.setAttribute("cx",t/2),s.setAttribute("cy",n/2),s.setAttribute("rx",t/2-o/2),s.setAttribute("ry",n/2-o/2),s.setAttribute("stroke-width",o||1),s.setAttribute("stroke","transparent"),s.setAttribute("fill","transparent"),r.append(s),this.container.append(r),!e.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#ra}addHighlightArea(){this.container.classList.add("highlightArea")}}class nx extends ni{#rl=null;constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName);let{data:{rect:e,vertices:t,borderStyle:n,popupRef:r}}=this;if(!t)return this.container;let{width:o,height:s}=nn(e),a=this.svgFactory.create(o,s,!0),l=[];for(let n=0,r=t.length;n<r;n+=2){let r=t[n]-e[0],o=e[3]-t[n+1];l.push(`${r},${o}`)}l=l.join(" ");let c=this.#rl=this.svgFactory.createElement(this.svgElementName);return c.setAttribute("points",l),c.setAttribute("stroke-width",n.width||1),c.setAttribute("stroke","transparent"),c.setAttribute("fill","transparent"),a.append(c),this.container.append(a),!r&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#rl}addHighlightArea(){this.container.classList.add("highlightArea")}}class nw extends nx{constructor(e){super(e),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class nS extends ni{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("caretAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}}class nk extends ni{#rc=[];constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline",this.annotationEditorType=p.INK}render(){this.container.classList.add(this.containerClassName);let{data:{rect:e,inkLists:t,borderStyle:n,popupRef:r}}=this,{width:o,height:s}=nn(e),a=this.svgFactory.create(o,s,!0);for(let o of t){let t=[];for(let n=0,r=o.length;n<r;n+=2){let r=o[n]-e[0],s=e[3]-o[n+1];t.push(`${r},${s}`)}t=t.join(" ");let s=this.svgFactory.createElement(this.svgElementName);this.#rc.push(s),s.setAttribute("points",t),s.setAttribute("stroke-width",n.width||1),s.setAttribute("stroke","transparent"),s.setAttribute("fill","transparent"),!r&&this.hasPopupData&&this._createPopup(),a.append(s)}return this.container.append(a),this.container}getElementsToTriggerPopup(){return this.#rc}addHighlightArea(){this.container.classList.add("highlightArea")}}class nA extends ni{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("highlightAnnotation"),this.container}}class nC extends ni{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("underlineAnnotation"),this.container}}class nE extends ni{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("squigglyAnnotation"),this.container}}class nT extends ni{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("strikeoutAnnotation"),this.container}}class n_ extends ni{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("stampAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}}class nO extends ni{#ru=null;constructor(e){super(e,{isRenderable:!0});let{file:t}=this.data;this.filename=t.filename,this.content=t.content,this.linkService.eventBus?.dispatch("fileattachmentannotation",{source:this,...t})}render(){let e;this.container.classList.add("fileAttachmentAnnotation");let{container:t,data:n}=this;n.hasAppearance||0===n.fillAlpha?e=document.createElement("div"):((e=document.createElement("img")).src=`${this.imageResourcesPath}annotation-${/paperclip/i.test(n.name)?"paperclip":"pushpin"}.svg`,n.fillAlpha&&n.fillAlpha<1&&(e.style=`filter: opacity(${Math.round(100*n.fillAlpha)}%);`)),e.addEventListener("dblclick",this.#rd.bind(this)),this.#ru=e;let{isMac:r}=B.platform;return t.addEventListener("keydown",e=>{"Enter"===e.key&&(r?e.metaKey:e.ctrlKey)&&this.#rd()}),!n.popupRef&&this.hasPopupData?this._createPopup():e.classList.add("popupTriggerArea"),t.append(e),t}getElementsToTriggerPopup(){return this.#ru}addHighlightArea(){this.container.classList.add("highlightArea")}#rd(){this.downloadManager?.openOrDownloadData(this.content,this.filename)}}class nM{#rp=null;#rh=null;#rf=new Map;constructor({div:e,accessibilityManager:t,annotationCanvasMap:n,annotationEditorUIManager:r,page:o,viewport:s}){this.div=e,this.#rp=t,this.#rh=n,this.page=o,this.viewport=s,this.zIndex=0,this._annotationEditorUIManager=r}#rm(e,t){let n=e.firstChild||e;n.id=`${G}${t}`,this.div.append(e),this.#rp?.moveElementInDOM(this.div,e,n,!1)}async render(e){let{annotations:t}=e,n=this.div;ew(n,this.viewport);let r=new Map,o={data:null,layer:n,linkService:e.linkService,downloadManager:e.downloadManager,imageResourcesPath:e.imageResourcesPath||"",renderForms:!1!==e.renderForms,svgFactory:new eo,annotationStorage:e.annotationStorage||new eL,enableScripting:!0===e.enableScripting,hasJSActions:e.hasJSActions,fieldObjects:e.fieldObjects,parent:this,elements:null};for(let e of t){if(e.noHTML)continue;let t=e.annotationType===v.POPUP;if(t){let t=r.get(e.id);if(!t)continue;o.elements=t}else{let{width:t,height:n}=nn(e.rect);if(t<=0||n<=0)continue}o.data=e;let n=nr.create(o);if(!n.isRenderable)continue;if(!t&&e.popupRef){let t=r.get(e.popupRef);t?t.push(n):r.set(e.popupRef,[n])}let s=n.render();e.hidden&&(s.style.visibility="hidden"),this.#rm(s,e.id),n.annotationEditorType>0&&(this.#rf.set(n.data.id,n),this._annotationEditorUIManager?.renderAnnotationElement(n))}this.#rg()}update({viewport:e}){let t=this.div;this.viewport=e,ew(t,{rotation:e.rotation}),this.#rg(),t.hidden=!1}#rg(){if(!this.#rh)return;let e=this.div;for(let[t,n]of this.#rh){let r=e.querySelector(`[data-annotation-id="${t}"]`);if(!r)continue;n.className="annotationContent";let{firstChild:o}=r;o?"CANVAS"===o.nodeName?o.replaceWith(n):o.classList.contains("annotationContent")?o.after(n):o.before(n):r.append(n)}this.#rh.clear()}getEditableAnnotations(){return Array.from(this.#rf.values())}getEditableAnnotation(e){return this.#rf.get(e)}}let nI=/\r\n?|\n/g;class nP extends eP{#rv=this.editorDivBlur.bind(this);#rb=this.editorDivFocus.bind(this);#ry=this.editorDivInput.bind(this);#rx=this.editorDivKeydown.bind(this);#rw=this.editorDivPaste.bind(this);#nX;#rS="";#rk=`${this.id}-editor`;#rt;#rA=null;static _freeTextDefaultContent="";static _internalPadding=0;static _defaultColor=null;static _defaultFontSize=10;static get _keyboardManager(){let e=nP.prototype,t=e=>e.isEmpty(),n=eM.TRANSLATE_SMALL,r=eM.TRANSLATE_BIG;return O(this,"_keyboardManager",new e_([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],e.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],e.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],e._translateEmpty,{args:[-n,0],checker:t}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],e._translateEmpty,{args:[-r,0],checker:t}],[["ArrowRight","mac+ArrowRight"],e._translateEmpty,{args:[n,0],checker:t}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],e._translateEmpty,{args:[r,0],checker:t}],[["ArrowUp","mac+ArrowUp"],e._translateEmpty,{args:[0,-n],checker:t}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],e._translateEmpty,{args:[0,-r],checker:t}],[["ArrowDown","mac+ArrowDown"],e._translateEmpty,{args:[0,n],checker:t}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],e._translateEmpty,{args:[0,r],checker:t}]]))}static _type="freetext";static _editorType=p.FREETEXT;constructor(e){super({...e,name:"freeTextEditor"}),this.#nX=e.color||nP._defaultColor||eP._defaultLineColor,this.#rt=e.fontSize||nP._defaultFontSize}static initialize(e,t){eP.initialize(e,t,{strings:["pdfjs-free-text-default-content"]});let n=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(n.getPropertyValue("--freetext-padding"))}static updateDefaultParams(e,t){switch(e){case h.FREETEXT_SIZE:nP._defaultFontSize=t;break;case h.FREETEXT_COLOR:nP._defaultColor=t}}updateParams(e,t){switch(e){case h.FREETEXT_SIZE:this.#rC(t);break;case h.FREETEXT_COLOR:this.#rE(t)}}static get defaultPropertiesToUpdate(){return[[h.FREETEXT_SIZE,nP._defaultFontSize],[h.FREETEXT_COLOR,nP._defaultColor||eP._defaultLineColor]]}get propertiesToUpdate(){return[[h.FREETEXT_SIZE,this.#rt],[h.FREETEXT_COLOR,this.#nX]]}#rC(e){let t=e=>{this.editorDiv.style.fontSize=`calc(${e}px * var(--scale-factor))`,this.translate(0,-(e-this.#rt)*this.parentScale),this.#rt=e,this.#rT()},n=this.#rt;this.addCommands({cmd:t.bind(this,e),undo:t.bind(this,n),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:h.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})}#rE(e){let t=e=>{this.#nX=this.editorDiv.style.color=e},n=this.#nX;this.addCommands({cmd:t.bind(this,e),undo:t.bind(this,n),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:h.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})}_translateEmpty(e,t){this._uiManager.translateSelectedEditors(e,t,!0)}getInitialTranslation(){let e=this.parentScale;return[-nP._internalPadding*e,-(nP._internalPadding+this.#rt)*e]}rebuild(){if(!this.parent)return;if(super.rebuild(),null!==this.div)!this.isAttachedToDOM&&this.parent.add(this)}enableEditMode(){if(this.isInEditMode())return;this.parent.setEditingState(!1),this.parent.updateToolbar(p.FREETEXT),super.enableEditMode(),this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this._isDraggable=!1,this.div.removeAttribute("aria-activedescendant");let e=this._uiManager._signal;this.editorDiv.addEventListener("keydown",this.#rx,{signal:e}),this.editorDiv.addEventListener("focus",this.#rb,{signal:e}),this.editorDiv.addEventListener("blur",this.#rv,{signal:e}),this.editorDiv.addEventListener("input",this.#ry,{signal:e}),this.editorDiv.addEventListener("paste",this.#rw,{signal:e})}disableEditMode(){if(!!this.isInEditMode())this.parent.setEditingState(!0),super.disableEditMode(),this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",this.#rk),this._isDraggable=!0,this.editorDiv.removeEventListener("keydown",this.#rx),this.editorDiv.removeEventListener("focus",this.#rb),this.editorDiv.removeEventListener("blur",this.#rv),this.editorDiv.removeEventListener("input",this.#ry),this.editorDiv.removeEventListener("paste",this.#rw),this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freetextEditing")}focusin(e){if(!!this._focusEventsAllowed)super.focusin(e),e.target!==this.editorDiv&&this.editorDiv.focus()}onceAdded(){if(!this.width)this.enableEditMode(),this.editorDiv.focus(),this._initialOptions?.isCentered&&this.center(),this._initialOptions=null}isEmpty(){return!this.editorDiv||""===this.editorDiv.innerText.trim()}remove(){this.isEditing=!1,this.parent&&(this.parent.setEditingState(!0),this.parent.div.classList.add("freetextEditing")),super.remove()}#r_(){let e=[];for(let t of(this.editorDiv.normalize(),this.editorDiv.childNodes))e.push(nP.#rO(t));return e.join("\n")}#rT(){let e;let[t,n]=this.parentDimensions;if(this.isAttachedToDOM)e=this.div.getBoundingClientRect();else{let{currentLayer:t,div:n}=this,r=n.style.display,o=n.classList.contains("hidden");n.classList.remove("hidden"),n.style.display="hidden",t.div.append(this.div),e=n.getBoundingClientRect(),n.remove(),n.style.display=r,n.classList.toggle("hidden",o)}this.rotation%180==this.parentRotation%180?(this.width=e.width/t,this.height=e.height/n):(this.width=e.height/t,this.height=e.width/n),this.fixAndSetPosition()}commit(){if(!this.isInEditMode())return;super.commit(),this.disableEditMode();let e=this.#rS,t=this.#rS=this.#r_().trimEnd();if(e===t)return;let n=e=>{if(this.#rS=e,!e){this.remove();return}this.#rM(),this._uiManager.rebuild(this),this.#rT()};this.addCommands({cmd:()=>{n(t)},undo:()=>{n(e)},mustExec:!1}),this.#rT()}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}dblclick(e){this.enterInEditMode()}keydown(e){e.target===this.div&&"Enter"===e.key&&(this.enterInEditMode(),e.preventDefault())}editorDivKeydown(e){nP._keyboardManager.exec(this,e)}editorDivFocus(e){this.isEditing=!0}editorDivBlur(e){this.isEditing=!1}editorDivInput(e){this.parent.div.classList.toggle("freetextEditing",this.isEmpty())}disableEditing(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}enableEditing(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}render(){let e,t;if(this.div)return this.div;this.width&&(e=this.x,t=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",this.#rk),this.editorDiv.setAttribute("data-l10n-id","pdfjs-free-text"),this.enableEditing(),eP._l10nPromise.get("pdfjs-free-text-default-content").then(e=>this.editorDiv?.setAttribute("default-content",e)),this.editorDiv.contentEditable=!0;let{style:n}=this.editorDiv;if(n.fontSize=`calc(${this.#rt}px * var(--scale-factor))`,n.color=this.#nX,this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),eA(this,this.div,["dblclick","keydown"]),this.width){let[n,r]=this.parentDimensions;if(this.annotationElementId){let o,s;let{position:a}=this.#rA,[l,c]=this.getInitialTranslation();[l,c]=this.pageTranslationToScreen(l,c);let[u,d]=this.pageDimensions,[p,h]=this.pageTranslation;switch(this.rotation){case 0:o=e+(a[0]-p)/u,s=t+this.height-(a[1]-h)/d;break;case 90:o=e+(a[0]-p)/u,s=t-(a[1]-h)/d,[l,c]=[c,-l];break;case 180:o=e-this.width+(a[0]-p)/u,s=t-(a[1]-h)/d,[l,c]=[-l,-c];break;case 270:o=e+(a[0]-p-this.height*d)/u,s=t+(a[1]-h-this.width*u)/d,[l,c]=[-c,l]}this.setAt(o*n,s*r,l,c)}else this.setAt(e*n,t*r,this.width*n,this.height*r);this.#rM(),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0;return this.div}static #rO(e){return(e.nodeType===Node.TEXT_NODE?e.nodeValue:e.innerText).replaceAll(nI,"")}editorDivPaste(e){let t=e.clipboardData||window.clipboardData,{types:n}=t;if(1===n.length&&"text/plain"===n[0])return;e.preventDefault();let r=nP.#rI(t.getData("text")||"").replaceAll(nI,"\n");if(!r)return;let o=window.getSelection();if(!o.rangeCount)return;this.editorDiv.normalize(),o.deleteFromDocument();let s=o.getRangeAt(0);if(!r.includes("\n")){s.insertNode(document.createTextNode(r)),this.editorDiv.normalize(),o.collapseToStart();return}let{startContainer:a,startOffset:l}=s,c=[],u=[];if(a.nodeType===Node.TEXT_NODE){let e=a.parentElement;if(u.push(a.nodeValue.slice(l).replaceAll(nI,"")),e!==this.editorDiv){let t=c;for(let n of this.editorDiv.childNodes){if(n===e){t=u;continue}t.push(nP.#rO(n))}}c.push(a.nodeValue.slice(0,l).replaceAll(nI,""))}else if(a===this.editorDiv){let e=c,t=0;for(let n of this.editorDiv.childNodes)t++===l&&(e=u),e.push(nP.#rO(n))}this.#rS=`${c.join("\n")}${r}${u.join("\n")}`,this.#rM();let d=new Range,p=c.reduce((e,t)=>e+t.length,0);for(let{firstChild:e}of this.editorDiv.childNodes)if(e.nodeType===Node.TEXT_NODE){let t=e.nodeValue.length;if(p<=t){d.setStart(e,p),d.setEnd(e,p);break}p-=t}o.removeAllRanges(),o.addRange(d)}#rM(){if(this.editorDiv.replaceChildren(),!!this.#rS)for(let e of this.#rS.split("\n")){let t=document.createElement("div");t.append(e?document.createTextNode(e):document.createElement("br")),this.editorDiv.append(t)}}#rP(){return this.#rS.replaceAll("\xa0"," ")}static #rI(e){return e.replaceAll(" ","\xa0")}get contentDiv(){return this.editorDiv}static deserialize(e,t,n){let r=null;if(e instanceof ng){let{data:{defaultAppearanceData:{fontSize:t,fontColor:n},rect:o,rotation:s,id:a},textContent:l,textPosition:c,parent:{page:{pageNumber:u}}}=e;if(!l||0===l.length)return null;r=e={annotationType:p.FREETEXT,color:Array.from(n),fontSize:t,value:l.join("\n"),position:c,pageIndex:u-1,rect:o.slice(0),rotation:s,id:a,deleted:!1}}let o=super.deserialize(e,t,n);return o.#rt=e.fontSize,o.#nX=U.makeHexColor(...e.color),o.#rS=nP.#rI(e.value),o.annotationElementId=e.id||null,o.#rA=r,o}serialize(e=!1){if(this.isEmpty())return null;if(this.deleted)return{pageIndex:this.pageIndex,id:this.annotationElementId,deleted:!0};let t=nP._internalPadding*this.parentScale,n=this.getRect(t,t),r=eP._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:this.#nX),o={annotationType:p.FREETEXT,color:r,fontSize:this.#rt,value:this.#rP(),pageIndex:this.pageIndex,rect:n,rotation:this.rotation,structTreeParentId:this._structTreeParentId};return e?o:this.annotationElementId&&!this.#rD(o)?null:(o.id=this.annotationElementId,o)}#rD(e){let{value:t,fontSize:n,color:r,pageIndex:o}=this.#rA;return this._hasBeenMoved||e.value!==t||e.fontSize!==n||e.color.some((e,t)=>e!==r[t])||e.pageIndex!==o}renderAnnotationElement(e){let t=super.renderAnnotationElement(e);if(this.deleted)return t;let{style:n}=t;for(let e of(n.fontSize=`calc(${this.#rt}px * var(--scale-factor))`,n.color=this.#nX,t.replaceChildren(),this.#rS.split("\n"))){let n=document.createElement("div");n.append(e?document.createTextNode(e):document.createElement("br")),t.append(n)}let r=nP._internalPadding*this.parentScale;return e.updateEdited({rect:this.getRect(r,r),popupContent:this.#rS}),t}resetAnnotationElement(e){super.resetAnnotationElement(e),e.resetEdited()}}class nD{#rN;#rR=[];#rL=[];constructor(e,t=0,n=0,r=!0){let o=1/0,s=-1/0,a=1/0,l=-1/0;for(let{x:n,y:r,width:c,height:u}of e){let e=1e-4*Math.floor((n-t)/1e-4),d=1e-4*Math.ceil((n+c+t)/1e-4),p=1e-4*Math.floor((r-t)/1e-4),h=1e-4*Math.ceil((r+u+t)/1e-4),f=[e,p,h,!0],m=[d,p,h,!1];this.#rR.push(f,m),o=Math.min(o,e),s=Math.max(s,d),a=Math.min(a,p),l=Math.max(l,h)}let c=s-o+2*n,u=l-a+2*n,d=o-n,p=a-n,h=this.#rR.at(r?-1:-2),f=[h[0],h[2]];for(let e of this.#rR){let[t,n,r]=e;e[0]=(t-d)/c,e[1]=(n-p)/u,e[2]=(r-p)/u}this.#rN={x:d,y:p,width:c,height:u,lastPoint:f}}getOutlines(){this.#rR.sort((e,t)=>e[0]-t[0]||e[1]-t[1]||e[2]-t[2]);let e=[];for(let t of this.#rR)t[3]?(e.push(...this.#rj(t)),this.#r$(t)):(this.#rF(t),e.push(...this.#rj(t)));return this.#rz(e)}#rz(e){let t;let n=[],r=new Set;for(let t of e){let[e,r,o]=t;n.push([e,r,t],[e,o,t])}n.sort((e,t)=>e[1]-t[1]||e[0]-t[0]);for(let e=0,t=n.length;e<t;e+=2){let t=n[e][2],o=n[e+1][2];t.push(o),o.push(t),r.add(t),r.add(o)}let o=[];for(;r.size>0;){let e=r.values().next().value,[n,s,a,l,c]=e;r.delete(e);let u=n,d=s;for(t=[n,a],o.push(t);;){let e;if(r.has(l))e=l;else if(r.has(c))e=c;else break;r.delete(e),[n,s,a,l,c]=e,u!==n&&(t.push(u,d,n,d===s?s:a),u=n),d=d===s?a:s}t.push(u,d)}return new nR(o,this.#rN)}#rB(e){let t=this.#rL,n=0,r=t.length-1;for(;n<=r;){let o=n+r>>1,s=t[o][0];if(s===e)return o;s<e?n=o+1:r=o-1}return r+1}#r$([,e,t]){let n=this.#rB(e);this.#rL.splice(n,0,[e,t])}#rF([,e,t]){let n=this.#rB(e);for(let r=n;r<this.#rL.length;r++){let[n,o]=this.#rL[r];if(n!==e)break;if(n===e&&o===t){this.#rL.splice(r,1);return}}for(let r=n-1;r>=0;r--){let[n,o]=this.#rL[r];if(n!==e)break;if(n===e&&o===t){this.#rL.splice(r,1);return}}}#rj(e){let[t,n,r]=e,o=[[t,n,r]],s=this.#rB(r);for(let e=0;e<s;e++){let[n,r]=this.#rL[e];for(let e=0,s=o.length;e<s;e++){let[,a,l]=o[e];if(!(r<=a)&&!(l<=n)){if(a>=n){if(l>r)o[e][1]=r;else{if(1===s)return[];o.splice(e,1),e--,s--}continue}o[e][2]=n,l>r&&o.push([t,r,l])}}}return o}}class nN{toSVGPath(){throw Error("Abstract method `toSVGPath` must be implemented.")}get box(){throw Error("Abstract getter `box` must be implemented.")}serialize(e,t){throw Error("Abstract method `serialize` must be implemented.")}get free(){return this instanceof nj}}class nR extends nN{#rN;#rH;constructor(e,t){super(),this.#rH=e,this.#rN=t}toSVGPath(){let e=[];for(let t of this.#rH){let[n,r]=t;e.push(`M${n} ${r}`);for(let o=2;o<t.length;o+=2){let s=t[o],a=t[o+1];s===n?(e.push(`V${a}`),r=a):a===r&&(e.push(`H${s}`),n=s)}e.push("Z")}return e.join(" ")}serialize([e,t,n,r],o){let s=[],a=n-e,l=r-t;for(let t of this.#rH){let n=Array(t.length);for(let o=0;o<t.length;o+=2)n[o]=e+t[o]*a,n[o+1]=r-t[o+1]*l;s.push(n)}return s}get box(){return this.#rN}}class nL{#rN;#rU=[];#rV;#rq;#rW=[];#rG=new Float64Array(18);#rK;#rY;#rZ;#rJ;#rX;#rQ;#r0=[];static #r1=8;static #r2=2;static #r3=nL.#r1+nL.#r2;constructor({x:e,y:t},n,r,o,s,a=0){this.#rN=n,this.#rQ=o*r,this.#rq=s,this.#rG.set([NaN,NaN,NaN,NaN,e,t],6),this.#rV=a,this.#rJ=nL.#r1*r,this.#rZ=nL.#r3*r,this.#rX=r,this.#r0.push(e,t)}get free(){return!0}isEmpty(){return isNaN(this.#rG[8])}#r5(){let e=this.#rG.subarray(4,6),t=this.#rG.subarray(16,18),[n,r,o,s]=this.#rN;return[(this.#rK+(e[0]-t[0])/2-n)/o,(this.#rY+(e[1]-t[1])/2-r)/s,(this.#rK+(t[0]-e[0])/2-n)/o,(this.#rY+(t[1]-e[1])/2-r)/s]}add({x:e,y:t}){this.#rK=e,this.#rY=t;let[n,r,o,s]=this.#rN,[a,l,c,u]=this.#rG.subarray(8,12),d=e-c,p=t-u,h=Math.hypot(d,p);if(h<this.#rZ)return!1;let f=h-this.#rJ,m=f/h,g=m*d,v=m*p,b=a,y=l;a=c,l=u,c+=g,u+=v,this.#r0?.push(e,t);let x=-v/f*this.#rQ,w=g/f*this.#rQ;return(this.#rG.set(this.#rG.subarray(2,8),0),this.#rG.set([c+x,u+w],4),this.#rG.set(this.#rG.subarray(14,18),12),this.#rG.set([c-x,u-w],16),isNaN(this.#rG[6]))?(0===this.#rW.length&&(this.#rG.set([a+x,l+w],2),this.#rW.push(NaN,NaN,NaN,NaN,(a+x-n)/o,(l+w-r)/s),this.#rG.set([a-x,l-w],14),this.#rU.push(NaN,NaN,NaN,NaN,(a-x-n)/o,(l-w-r)/s)),this.#rG.set([b,y,a,l,c,u],6),!this.isEmpty()):(this.#rG.set([b,y,a,l,c,u],6),Math.abs(Math.atan2(y-l,b-a)-Math.atan2(v,g))<Math.PI/2)?([a,l,c,u]=this.#rG.subarray(2,6),this.#rW.push(NaN,NaN,NaN,NaN,((a+c)/2-n)/o,((l+u)/2-r)/s),[a,l,b,y]=this.#rG.subarray(14,18),this.#rU.push(NaN,NaN,NaN,NaN,((b+a)/2-n)/o,((y+l)/2-r)/s),!0):([b,y,a,l,c,u]=this.#rG.subarray(0,6),this.#rW.push(((b+5*a)/6-n)/o,((y+5*l)/6-r)/s,((5*a+c)/6-n)/o,((5*l+u)/6-r)/s,((a+c)/2-n)/o,((l+u)/2-r)/s),[c,u,a,l,b,y]=this.#rG.subarray(12,18),this.#rU.push(((b+5*a)/6-n)/o,((y+5*l)/6-r)/s,((5*a+c)/6-n)/o,((5*l+u)/6-r)/s,((a+c)/2-n)/o,((l+u)/2-r)/s),!0)}toSVGPath(){if(this.isEmpty())return"";let e=this.#rW,t=this.#rU,n=this.#rG.subarray(4,6),r=this.#rG.subarray(16,18),[o,s,a,l]=this.#rN,[c,u,d,p]=this.#r5();if(isNaN(this.#rG[6])&&!this.isEmpty())return`M${(this.#rG[2]-o)/a} ${(this.#rG[3]-s)/l} L${(this.#rG[4]-o)/a} ${(this.#rG[5]-s)/l} L${c} ${u} L${d} ${p} L${(this.#rG[16]-o)/a} ${(this.#rG[17]-s)/l} L${(this.#rG[14]-o)/a} ${(this.#rG[15]-s)/l} Z`;let h=[];h.push(`M${e[4]} ${e[5]}`);for(let t=6;t<e.length;t+=6)isNaN(e[t])?h.push(`L${e[t+4]} ${e[t+5]}`):h.push(`C${e[t]} ${e[t+1]} ${e[t+2]} ${e[t+3]} ${e[t+4]} ${e[t+5]}`);h.push(`L${(n[0]-o)/a} ${(n[1]-s)/l} L${c} ${u} L${d} ${p} L${(r[0]-o)/a} ${(r[1]-s)/l}`);for(let e=t.length-6;e>=6;e-=6)isNaN(t[e])?h.push(`L${t[e+4]} ${t[e+5]}`):h.push(`C${t[e]} ${t[e+1]} ${t[e+2]} ${t[e+3]} ${t[e+4]} ${t[e+5]}`);return h.push(`L${t[4]} ${t[5]} Z`),h.join(" ")}getOutlines(){let e=this.#rW,t=this.#rU,n=this.#rG,r=n.subarray(4,6),o=n.subarray(16,18),[s,a,l,c]=this.#rN,u=new Float64Array((this.#r0?.length??0)+2);for(let e=0,t=u.length-2;e<t;e+=2)u[e]=(this.#r0[e]-s)/l,u[e+1]=(this.#r0[e+1]-a)/c;u[u.length-2]=(this.#rK-s)/l,u[u.length-1]=(this.#rY-a)/c;let[d,p,h,f]=this.#r5();if(isNaN(n[6])&&!this.isEmpty()){let e=new Float64Array(36);return e.set([NaN,NaN,NaN,NaN,(n[2]-s)/l,(n[3]-a)/c,NaN,NaN,NaN,NaN,(n[4]-s)/l,(n[5]-a)/c,NaN,NaN,NaN,NaN,d,p,NaN,NaN,NaN,NaN,h,f,NaN,NaN,NaN,NaN,(n[16]-s)/l,(n[17]-a)/c,NaN,NaN,NaN,NaN,(n[14]-s)/l,(n[15]-a)/c],0),new nj(e,u,this.#rN,this.#rX,this.#rV,this.#rq)}let m=new Float64Array(this.#rW.length+24+this.#rU.length),g=e.length;for(let t=0;t<g;t+=2){if(isNaN(e[t])){m[t]=m[t+1]=NaN;continue}m[t]=e[t],m[t+1]=e[t+1]}m.set([NaN,NaN,NaN,NaN,(r[0]-s)/l,(r[1]-a)/c,NaN,NaN,NaN,NaN,d,p,NaN,NaN,NaN,NaN,h,f,NaN,NaN,NaN,NaN,(o[0]-s)/l,(o[1]-a)/c],g),g+=24;for(let e=t.length-6;e>=6;e-=6)for(let n=0;n<6;n+=2){if(isNaN(t[e+n])){m[g]=m[g+1]=NaN,g+=2;continue}m[g]=t[e+n],m[g+1]=t[e+n+1],g+=2}return m.set([NaN,NaN,NaN,NaN,t[4],t[5]],g),new nj(m,u,this.#rN,this.#rX,this.#rV,this.#rq)}}class nj extends nN{#rN;#r4=null;#rV;#rq;#r0;#rX;#r6;constructor(e,t,n,r,o,s){super(),this.#r6=e,this.#r0=t,this.#rN=n,this.#rX=r,this.#rV=o,this.#rq=s,this.#r8(s);let{x:a,y:l,width:c,height:u}=this.#r4;for(let t=0,n=e.length;t<n;t+=2)e[t]=(e[t]-a)/c,e[t+1]=(e[t+1]-l)/u;for(let e=0,n=t.length;e<n;e+=2)t[e]=(t[e]-a)/c,t[e+1]=(t[e+1]-l)/u}toSVGPath(){let e=[`M${this.#r6[4]} ${this.#r6[5]}`];for(let t=6,n=this.#r6.length;t<n;t+=6){if(isNaN(this.#r6[t])){e.push(`L${this.#r6[t+4]} ${this.#r6[t+5]}`);continue}e.push(`C${this.#r6[t]} ${this.#r6[t+1]} ${this.#r6[t+2]} ${this.#r6[t+3]} ${this.#r6[t+4]} ${this.#r6[t+5]}`)}return e.push("Z"),e.join(" ")}serialize([e,t,n,r],o){let s,a;let l=n-e,c=r-t;switch(o){case 0:s=this.#r9(this.#r6,e,r,l,-c),a=this.#r9(this.#r0,e,r,l,-c);break;case 90:s=this.#r7(this.#r6,e,t,l,c),a=this.#r7(this.#r0,e,t,l,c);break;case 180:s=this.#r9(this.#r6,n,t,-l,c),a=this.#r9(this.#r0,n,t,-l,c);break;case 270:s=this.#r7(this.#r6,n,r,-l,-c),a=this.#r7(this.#r0,n,r,-l,-c)}return{outline:Array.from(s),points:[Array.from(a)]}}#r9(e,t,n,r,o){let s=new Float64Array(e.length);for(let a=0,l=e.length;a<l;a+=2)s[a]=t+e[a]*r,s[a+1]=n+e[a+1]*o;return s}#r7(e,t,n,r,o){let s=new Float64Array(e.length);for(let a=0,l=e.length;a<l;a+=2)s[a]=t+e[a+1]*r,s[a+1]=n+e[a]*o;return s}#r8(e){let t=this.#r6,n=t[4],r=t[5],o=n,s=r,a=n,l=r,c=n,u=r,d=e?Math.max:Math.min;for(let e=6,p=t.length;e<p;e+=6){if(isNaN(t[e]))o=Math.min(o,t[e+4]),s=Math.min(s,t[e+5]),a=Math.max(a,t[e+4]),l=Math.max(l,t[e+5]),u<t[e+5]?(c=t[e+4],u=t[e+5]):u===t[e+5]&&(c=d(c,t[e+4]));else{let p=U.bezierBoundingBox(n,r,...t.slice(e,e+6));o=Math.min(o,p[0]),s=Math.min(s,p[1]),a=Math.max(a,p[2]),l=Math.max(l,p[3]),u<p[3]?(c=p[2],u=p[3]):u===p[3]&&(c=d(c,p[2]))}n=t[e+4],r=t[e+5]}let p=o-this.#rV,h=s-this.#rV,f=a-o+2*this.#rV,m=l-s+2*this.#rV;this.#r4={x:p,y:h,width:f,height:m,lastPoint:[c,u]}}get box(){return this.#r4}getNewOutline(e,t){let{x:n,y:r,width:o,height:s}=this.#r4,[a,l,c,u]=this.#rN,d=o*c,p=s*u,h=n*c+a,f=r*u+l,m=new nL({x:this.#r0[0]*d+h,y:this.#r0[1]*p+f},this.#rN,this.#rX,e,this.#rq,t??this.#rV);for(let e=2;e<this.#r0.length;e+=2)m.add({x:this.#r0[e]*d+h,y:this.#r0[e+1]*p+f});return m.getOutlines()}}class n${#nV=this.#nq.bind(this);#ie=this.#a.bind(this);#it=null;#ir=null;#ii;#io=null;#is=!1;#ia=!1;#o=null;#il;#h=null;#ic;static get _keyboardManager(){return O(this,"_keyboardManager",new e_([[["Escape","mac+Escape"],n$.prototype._hideDropdownFromKeyboard],[[" ","mac+ "],n$.prototype._colorSelectFromKeyboard],[["ArrowDown","ArrowRight","mac+ArrowDown","mac+ArrowRight"],n$.prototype._moveToNext],[["ArrowUp","ArrowLeft","mac+ArrowUp","mac+ArrowLeft"],n$.prototype._moveToPrevious],[["Home","mac+Home"],n$.prototype._moveToBeginning],[["End","mac+End"],n$.prototype._moveToEnd]]))}constructor({editor:e=null,uiManager:t=null}){e?(this.#ia=!1,this.#ic=h.HIGHLIGHT_COLOR,this.#o=e):(this.#ia=!0,this.#ic=h.HIGHLIGHT_DEFAULT_COLOR),this.#h=e?._uiManager||t,this.#il=this.#h._eventBus,this.#ii=e?.color||this.#h?.highlightColors.values().next().value||"#FFFF98"}renderButton(){let e=this.#it=document.createElement("button");e.className="colorPicker",e.tabIndex="0",e.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-button"),e.setAttribute("aria-haspopup",!0);let t=this.#h._signal;e.addEventListener("click",this.#iu.bind(this),{signal:t}),e.addEventListener("keydown",this.#nV,{signal:t});let n=this.#ir=document.createElement("span");return n.className="swatch",n.setAttribute("aria-hidden",!0),n.style.backgroundColor=this.#ii,e.append(n),e}renderMainDropdown(){let e=this.#io=this.#id();return e.setAttribute("aria-orientation","horizontal"),e.setAttribute("aria-labelledby","highlightColorPickerLabel"),e}#id(){let e=document.createElement("div"),t=this.#h._signal;for(let[n,r]of(e.addEventListener("contextmenu",ef,{signal:t}),e.className="dropdown",e.role="listbox",e.setAttribute("aria-multiselectable",!1),e.setAttribute("aria-orientation","vertical"),e.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-dropdown"),this.#h.highlightColors)){let o=document.createElement("button");o.tabIndex="0",o.role="option",o.setAttribute("data-color",r),o.title=n,o.setAttribute("data-l10n-id",`pdfjs-editor-colorpicker-${n}`);let s=document.createElement("span");o.append(s),s.className="swatch",s.style.backgroundColor=r,o.setAttribute("aria-selected",r===this.#ii),o.addEventListener("click",this.#ip.bind(this,r),{signal:t}),e.append(o)}return e.addEventListener("keydown",this.#nV,{signal:t}),e}#ip(e,t){t.stopPropagation(),this.#il.dispatch("switchannotationeditorparams",{source:this,type:this.#ic,value:e})}_colorSelectFromKeyboard(e){if(e.target===this.#it){this.#iu(e);return}let t=e.target.getAttribute("data-color");if(!!t)this.#ip(t,e)}_moveToNext(e){if(!this.#ih){this.#iu(e);return}if(e.target===this.#it){this.#io.firstChild?.focus();return}e.target.nextSibling?.focus()}_moveToPrevious(e){if(e.target===this.#io?.firstChild||e.target===this.#it){this.#ih&&this._hideDropdownFromKeyboard();return}!this.#ih&&this.#iu(e),e.target.previousSibling?.focus()}_moveToBeginning(e){if(!this.#ih){this.#iu(e);return}this.#io.firstChild?.focus()}_moveToEnd(e){if(!this.#ih){this.#iu(e);return}this.#io.lastChild?.focus()}#nq(e){n$._keyboardManager.exec(this,e)}#iu(e){if(this.#ih){this.hideDropdown();return}if(this.#is=0===e.detail,window.addEventListener("pointerdown",this.#ie,{signal:this.#h._signal}),this.#io){this.#io.classList.remove("hidden");return}let t=this.#io=this.#id();this.#it.append(t)}#a(e){if(!this.#io?.contains(e.target))this.hideDropdown()}hideDropdown(){this.#io?.classList.add("hidden"),window.removeEventListener("pointerdown",this.#ie)}get #ih(){return this.#io&&!this.#io.classList.contains("hidden")}_hideDropdownFromKeyboard(){if(!this.#ia){if(!this.#ih){this.#o?.unselect();return}this.hideDropdown(),this.#it.focus({preventScroll:!0,focusVisible:this.#is})}}updateColor(e){if(this.#ir&&(this.#ir.style.backgroundColor=e),!this.#io)return;let t=this.#h.highlightColors.values();for(let n of this.#io.children)n.setAttribute("aria-selected",t.next().value===e)}destroy(){this.#it?.remove(),this.#it=null,this.#ir=null,this.#io?.remove(),this.#io=null}}class nF extends eP{#im=null;#ig=0;#iv;#ib=null;#i=null;#iy=null;#ix=null;#iw=0;#iS=null;#ik=null;#v=null;#iA=!1;#ea=this.#iC.bind(this);#iE=null;#iT;#i_=null;#iO="";#rQ;#iM="";static _defaultColor=null;static _defaultOpacity=1;static _defaultThickness=12;static _l10nPromise;static _type="highlight";static _editorType=p.HIGHLIGHT;static _freeHighlightId=-1;static _freeHighlight=null;static _freeHighlightClipId="";static get _keyboardManager(){let e=nF.prototype;return O(this,"_keyboardManager",new e_([[["ArrowLeft","mac+ArrowLeft"],e._moveCaret,{args:[0]}],[["ArrowRight","mac+ArrowRight"],e._moveCaret,{args:[1]}],[["ArrowUp","mac+ArrowUp"],e._moveCaret,{args:[2]}],[["ArrowDown","mac+ArrowDown"],e._moveCaret,{args:[3]}]]))}constructor(e){super({...e,name:"highlightEditor"}),this.color=e.color||nF._defaultColor,this.#rQ=e.thickness||nF._defaultThickness,this.#iT=e.opacity||nF._defaultOpacity,this.#iv=e.boxes||null,this.#iM=e.methodOfCreation||"",this.#iO=e.text||"",this._isDraggable=!1,e.highlightId>-1?(this.#iA=!0,this.#iI(e),this.#iP()):(this.#im=e.anchorNode,this.#ig=e.anchorOffset,this.#ix=e.focusNode,this.#iw=e.focusOffset,this.#iD(),this.#iP(),this.rotate(this.rotation))}get telemetryInitialData(){return{action:"added",type:this.#iA?"free_highlight":"highlight",color:this._uiManager.highlightColorNames.get(this.color),thickness:this.#rQ,methodOfCreation:this.#iM}}get telemetryFinalData(){return{type:"highlight",color:this._uiManager.highlightColorNames.get(this.color)}}static computeTelemetryFinalData(e){return{numberOfColors:e.get("color").size}}#iD(){let e=new nD(this.#iv,.001);this.#ik=e.getOutlines(),{x:this.x,y:this.y,width:this.width,height:this.height}=this.#ik.box;let t=new nD(this.#iv,.0025,.001,"ltr"===this._uiManager.direction);this.#iy=t.getOutlines();let{lastPoint:n}=this.#iy.box;this.#iE=[(n[0]-this.x)/this.width,(n[1]-this.y)/this.height]}#iI({highlightOutlines:e,highlightId:t,clipPathId:n}){this.#ik=e;if(this.#iy=e.getNewOutline(this.#rQ/2+1.5,.0025),t>=0)this.#v=t,this.#ib=n,this.parent.drawLayer.finalizeLine(t,e),this.#i_=this.parent.drawLayer.highlightOutline(this.#iy);else if(this.parent){let t=this.parent.viewport.rotation;this.parent.drawLayer.updateLine(this.#v,e),this.parent.drawLayer.updateBox(this.#v,nF.#iN(this.#ik.box,(t-this.rotation+360)%360)),this.parent.drawLayer.updateLine(this.#i_,this.#iy),this.parent.drawLayer.updateBox(this.#i_,nF.#iN(this.#iy.box,t))}let{x:r,y:o,width:s,height:a}=e.box;switch(this.rotation){case 0:this.x=r,this.y=o,this.width=s,this.height=a;break;case 90:{let[e,t]=this.parentDimensions;this.x=o,this.y=1-r,this.width=s*t/e,this.height=a*e/t;break}case 180:this.x=1-r,this.y=1-o,this.width=s,this.height=a;break;case 270:{let[e,t]=this.parentDimensions;this.x=1-o,this.y=r,this.width=s*t/e,this.height=a*e/t}}let{lastPoint:l}=this.#iy.box;this.#iE=[(l[0]-r)/s,(l[1]-o)/a]}static initialize(e,t){eP.initialize(e,t),nF._defaultColor||=t.highlightColors?.values().next().value||"#fff066"}static updateDefaultParams(e,t){switch(e){case h.HIGHLIGHT_DEFAULT_COLOR:nF._defaultColor=t;break;case h.HIGHLIGHT_THICKNESS:nF._defaultThickness=t}}translateInPage(e,t){}get toolbarPosition(){return this.#iE}updateParams(e,t){switch(e){case h.HIGHLIGHT_COLOR:this.#rE(t);break;case h.HIGHLIGHT_THICKNESS:this.#iR(t)}}static get defaultPropertiesToUpdate(){return[[h.HIGHLIGHT_DEFAULT_COLOR,nF._defaultColor],[h.HIGHLIGHT_THICKNESS,nF._defaultThickness]]}get propertiesToUpdate(){return[[h.HIGHLIGHT_COLOR,this.color||nF._defaultColor],[h.HIGHLIGHT_THICKNESS,this.#rQ||nF._defaultThickness],[h.HIGHLIGHT_FREE,this.#iA]]}#rE(e){let t=e=>{this.color=e,this.parent?.drawLayer.changeColor(this.#v,e),this.#i?.updateColor(e)},n=this.color;this.addCommands({cmd:t.bind(this,e),undo:t.bind(this,n),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:h.HIGHLIGHT_COLOR,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"color_changed",color:this._uiManager.highlightColorNames.get(e)},!0)}#iR(e){let t=this.#rQ,n=e=>{this.#rQ=e,this.#iL(e)};this.addCommands({cmd:n.bind(this,e),undo:n.bind(this,t),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:h.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"thickness_changed",thickness:e},!0)}async addEditToolbar(){let e=await super.addEditToolbar();return e?(this._uiManager.highlightColors&&(this.#i=new n$({editor:this}),e.addColorPicker(this.#i)),e):null}disableEditing(){super.disableEditing(),this.div.classList.toggle("disabled",!0)}enableEditing(){super.enableEditing(),this.div.classList.toggle("disabled",!1)}fixAndSetPosition(){return super.fixAndSetPosition(this.#ij())}getBaseTranslation(){return[0,0]}getRect(e,t){return super.getRect(e,t,this.#ij())}onceAdded(){this.parent.addUndoableEditor(this),this.div.focus()}remove(){this.#i$(),this._reportTelemetry({action:"deleted"}),super.remove()}rebuild(){if(!this.parent)return;if(super.rebuild(),null!==this.div)this.#iP(),!this.isAttachedToDOM&&this.parent.add(this)}setParent(e){let t=!1;this.parent&&!e?this.#i$():e&&(this.#iP(e),t=!this.parent&&this.div?.classList.contains("selectedEditor")),super.setParent(e),this.show(this._isVisible),t&&this.select()}#iL(e){if(!this.#iA)return;this.#iI({highlightOutlines:this.#ik.getNewOutline(e/2)}),this.fixAndSetPosition();let[t,n]=this.parentDimensions;this.setDims(this.width*t,this.height*n)}#i$(){if(null!==this.#v&&!!this.parent)this.parent.drawLayer.remove(this.#v),this.#v=null,this.parent.drawLayer.remove(this.#i_),this.#i_=null}#iP(e=this.parent){if(null===this.#v)({id:this.#v,clipPathId:this.#ib}=e.drawLayer.highlight(this.#ik,this.color,this.#iT)),this.#i_=e.drawLayer.highlightOutline(this.#iy),this.#iS&&(this.#iS.style.clipPath=this.#ib)}static #iN({x:e,y:t,width:n,height:r},o){switch(o){case 90:return{x:1-t-r,y:e,width:r,height:n};case 180:return{x:1-e-n,y:1-t-r,width:n,height:r};case 270:return{x:t,y:1-e-n,width:r,height:n}}return{x:e,y:t,width:n,height:r}}rotate(e){let t;let{drawLayer:n}=this.parent;this.#iA?(e=(e-this.rotation+360)%360,t=nF.#iN(this.#ik.box,e)):t=nF.#iN(this,e),n.rotate(this.#v,e),n.rotate(this.#i_,e),n.updateBox(this.#v,t),n.updateBox(this.#i_,nF.#iN(this.#iy.box,e))}render(){if(this.div)return this.div;let e=super.render();this.#iO&&(e.setAttribute("aria-label",this.#iO),e.setAttribute("role","mark")),this.#iA?e.classList.add("free"):this.div.addEventListener("keydown",this.#ea,{signal:this._uiManager._signal});let t=this.#iS=document.createElement("div");e.append(t),t.setAttribute("aria-hidden","true"),t.className="internal",t.style.clipPath=this.#ib;let[n,r]=this.parentDimensions;return this.setDims(this.width*n,this.height*r),eA(this,this.#iS,["pointerover","pointerleave"]),this.enableEditing(),e}pointerover(){this.parent.drawLayer.addClass(this.#i_,"hovered")}pointerleave(){this.parent.drawLayer.removeClass(this.#i_,"hovered")}#iC(e){nF._keyboardManager.exec(this,e)}_moveCaret(e){switch(this.parent.unselect(this),e){case 0:case 2:this.#iF(!0);break;case 1:case 3:this.#iF(!1)}}#iF(e){if(!this.#im)return;let t=window.getSelection();e?t.setPosition(this.#im,this.#ig):t.setPosition(this.#ix,this.#iw)}select(){if(super.select(),!!this.#i_)this.parent?.drawLayer.removeClass(this.#i_,"hovered"),this.parent?.drawLayer.addClass(this.#i_,"selected")}unselect(){if(super.unselect(),!!this.#i_)this.parent?.drawLayer.removeClass(this.#i_,"selected"),!this.#iA&&this.#iF(!1)}get _mustFixPosition(){return!this.#iA}show(e=this._isVisible){super.show(e),this.parent&&(this.parent.drawLayer.show(this.#v,e),this.parent.drawLayer.show(this.#i_,e))}#ij(){return this.#iA?this.rotation:0}#iz(){if(this.#iA)return null;let[e,t]=this.pageDimensions,n=this.#iv,r=new Float32Array(8*n.length),o=0;for(let{x:s,y:a,width:l,height:c}of n){let n=s*e,u=(1-a-c)*t;r[o]=r[o+4]=n,r[o+1]=r[o+3]=u,r[o+2]=r[o+6]=n+l*e,r[o+5]=r[o+7]=u+c*t,o+=8}return r}#iB(e){return this.#ik.serialize(e,this.#ij())}static startHighlighting(e,t,{target:n,x:r,y:o}){let{x:s,y:a,width:l,height:c}=n.getBoundingClientRect(),u=t=>{this.#iH(e,t)},d=e._signal,p={capture:!0,passive:!1,signal:d},h=e=>{e.preventDefault(),e.stopPropagation()},f=t=>{n.removeEventListener("pointermove",u),window.removeEventListener("blur",f),window.removeEventListener("pointerup",f),window.removeEventListener("pointerdown",h,p),window.removeEventListener("contextmenu",ef),this.#iU(e,t)};window.addEventListener("blur",f,{signal:d}),window.addEventListener("pointerup",f,{signal:d}),window.addEventListener("pointerdown",h,p),window.addEventListener("contextmenu",ef,{signal:d}),n.addEventListener("pointermove",u,{signal:d}),this._freeHighlight=new nL({x:r,y:o},[s,a,l,c],e.scale,this._defaultThickness/2,t,.001),{id:this._freeHighlightId,clipPathId:this._freeHighlightClipId}=e.drawLayer.highlight(this._freeHighlight,this._defaultColor,this._defaultOpacity,!0)}static #iH(e,t){this._freeHighlight.add(t)&&e.drawLayer.updatePath(this._freeHighlightId,this._freeHighlight)}static #iU(e,t){this._freeHighlight.isEmpty()?e.drawLayer.removeFreeHighlight(this._freeHighlightId):e.createAndAddNewEditor(t,!1,{highlightId:this._freeHighlightId,highlightOutlines:this._freeHighlight.getOutlines(),clipPathId:this._freeHighlightClipId,methodOfCreation:"main_toolbar"}),this._freeHighlightId=-1,this._freeHighlight=null,this._freeHighlightClipId=""}static deserialize(e,t,n){let r=super.deserialize(e,t,n),{rect:[o,s,a,l],color:c,quadPoints:u}=e;r.color=U.makeHexColor(...c),r.#iT=e.opacity;let[d,p]=r.pageDimensions;r.width=(a-o)/d,r.height=(l-s)/p;let h=r.#iv=[];for(let e=0;e<u.length;e+=8)h.push({x:(u[4]-a)/d,y:(l-(1-u[e+5]))/p,width:(u[e+2]-u[e])/d,height:(u[e+5]-u[e+1])/p});return r.#iD(),r}serialize(e=!1){if(this.isEmpty()||e)return null;let t=this.getRect(0,0),n=eP._colorManager.convert(this.color);return{annotationType:p.HIGHLIGHT,color:n,opacity:this.#iT,thickness:this.#rQ,quadPoints:this.#iz(),outlines:this.#iB(t),pageIndex:this.pageIndex,rect:t,rotation:this.#ij(),structTreeParentId:this._structTreeParentId}}static canCreateNewEmptyEditor(){return!1}}class nz extends eP{#iV=0;#iq=0;#iW=this.canvasPointermove.bind(this);#iG=this.canvasPointerleave.bind(this);#iK=this.canvasPointerup.bind(this);#iY=this.canvasPointerdown.bind(this);#iZ=null;#iJ=new Path2D;#iX=!1;#iQ=!1;#i0=!1;#i1=null;#i2=0;#i3=0;#i5=null;static _defaultColor=null;static _defaultOpacity=1;static _defaultThickness=1;static _type="ink";static _editorType=p.INK;constructor(e){super({...e,name:"inkEditor"}),this.color=e.color||null,this.thickness=e.thickness||null,this.opacity=e.opacity||null,this.paths=[],this.bezierPath2D=[],this.allRawPaths=[],this.currentPath=[],this.scaleFactor=1,this.translationX=this.translationY=0,this.x=0,this.y=0,this._willKeepAspectRatio=!0}static initialize(e,t){eP.initialize(e,t)}static updateDefaultParams(e,t){switch(e){case h.INK_THICKNESS:nz._defaultThickness=t;break;case h.INK_COLOR:nz._defaultColor=t;break;case h.INK_OPACITY:nz._defaultOpacity=t/100}}updateParams(e,t){switch(e){case h.INK_THICKNESS:this.#iR(t);break;case h.INK_COLOR:this.#rE(t);break;case h.INK_OPACITY:this.#i4(t)}}static get defaultPropertiesToUpdate(){return[[h.INK_THICKNESS,nz._defaultThickness],[h.INK_COLOR,nz._defaultColor||eP._defaultLineColor],[h.INK_OPACITY,Math.round(100*nz._defaultOpacity)]]}get propertiesToUpdate(){return[[h.INK_THICKNESS,this.thickness||nz._defaultThickness],[h.INK_COLOR,this.color||nz._defaultColor||eP._defaultLineColor],[h.INK_OPACITY,Math.round(100*(this.opacity??nz._defaultOpacity))]]}#iR(e){let t=e=>{this.thickness=e,this.#i6()},n=this.thickness;this.addCommands({cmd:t.bind(this,e),undo:t.bind(this,n),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:h.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0})}#rE(e){let t=e=>{this.color=e,this.#i8()},n=this.color;this.addCommands({cmd:t.bind(this,e),undo:t.bind(this,n),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:h.INK_COLOR,overwriteIfSameType:!0,keepUndo:!0})}#i4(e){let t=e=>{this.opacity=e,this.#i8()};e/=100;let n=this.opacity;this.addCommands({cmd:t.bind(this,e),undo:t.bind(this,n),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:h.INK_OPACITY,overwriteIfSameType:!0,keepUndo:!0})}rebuild(){if(!this.parent)return;if(super.rebuild(),null!==this.div)!this.canvas&&(this.#i9(),this.#i7()),!this.isAttachedToDOM&&(this.parent.add(this),this.#oe()),this.#i6()}remove(){if(null!==this.canvas)!this.isEmpty()&&this.commit(),this.canvas.width=this.canvas.height=0,this.canvas.remove(),this.canvas=null,this.#iZ&&(clearTimeout(this.#iZ),this.#iZ=null),this.#i1?.disconnect(),this.#i1=null,super.remove()}setParent(e){!this.parent&&e?this._uiManager.removeShouldRescale(this):this.parent&&null===e&&this._uiManager.addShouldRescale(this),super.setParent(e)}onScaleChanging(){let[e,t]=this.parentDimensions,n=this.width*e,r=this.height*t;this.setDimensions(n,r)}enableEditMode(){if(!this.#iX&&null!==this.canvas)super.enableEditMode(),this._isDraggable=!1,this.canvas.addEventListener("pointerdown",this.#iY,{signal:this._uiManager._signal})}disableEditMode(){if(!!this.isInEditMode()&&null!==this.canvas)super.disableEditMode(),this._isDraggable=!this.isEmpty(),this.div.classList.remove("editing"),this.canvas.removeEventListener("pointerdown",this.#iY)}onceAdded(){this._isDraggable=!this.isEmpty()}isEmpty(){return 0===this.paths.length||1===this.paths.length&&0===this.paths[0].length}#ot(){let{parentRotation:e,parentDimensions:[t,n]}=this;switch(e){case 90:return[0,n,n,t];case 180:return[t,n,t,n];case 270:return[t,0,n,t];default:return[0,0,t,n]}}#on(){let{ctx:e,color:t,opacity:n,thickness:r,parentScale:o,scaleFactor:s}=this;e.lineWidth=r*o/s,e.lineCap="round",e.lineJoin="round",e.miterLimit=10,e.strokeStyle=`${t}${Math.round(Math.min(255,Math.max(1,255*n))).toString(16).padStart(2,"0")}`}#or(e,t){let n=this._uiManager._signal;this.canvas.addEventListener("contextmenu",ef,{signal:n}),this.canvas.addEventListener("pointerleave",this.#iG,{signal:n}),this.canvas.addEventListener("pointermove",this.#iW,{signal:n}),this.canvas.addEventListener("pointerup",this.#iK,{signal:n}),this.canvas.removeEventListener("pointerdown",this.#iY),this.isEditing=!0,!this.#i0&&(this.#i0=!0,this.#oe(),this.thickness||=nz._defaultThickness,this.color||=nz._defaultColor||eP._defaultLineColor,this.opacity??=nz._defaultOpacity),this.currentPath.push([e,t]),this.#iQ=!1,this.#on(),this.#i5=()=>{this.#oi(),this.#i5&&window.requestAnimationFrame(this.#i5)},window.requestAnimationFrame(this.#i5)}#oo(e,t){let[n,r]=this.currentPath.at(-1);if(this.currentPath.length>1&&e===n&&t===r)return;let o=this.currentPath,s=this.#iJ;if(o.push([e,t]),this.#iQ=!0,o.length<=2){s.moveTo(...o[0]),s.lineTo(e,t);return}3===o.length&&(this.#iJ=s=new Path2D,s.moveTo(...o[0])),this.#os(s,...o.at(-3),...o.at(-2),e,t)}#oa(){if(0===this.currentPath.length)return;let e=this.currentPath.at(-1);this.#iJ.lineTo(...e)}#ol(e,t){let n;if(this.#i5=null,e=Math.min(Math.max(e,0),this.canvas.width),t=Math.min(Math.max(t,0),this.canvas.height),this.#oo(e,t),this.#oa(),1!==this.currentPath.length)n=this.#oc();else{let r=[e,t];n=[[r,r.slice(),r.slice(),r]]}let r=this.#iJ,o=this.currentPath;this.currentPath=[],this.#iJ=new Path2D;this.addCommands({cmd:()=>{this.allRawPaths.push(o),this.paths.push(n),this.bezierPath2D.push(r),this._uiManager.rebuild(this)},undo:()=>{this.allRawPaths.pop(),this.paths.pop(),this.bezierPath2D.pop(),0===this.paths.length?this.remove():(!this.canvas&&(this.#i9(),this.#i7()),this.#i6())},mustExec:!0})}#oi(){if(!this.#iQ)return;this.#iQ=!1,this.thickness,this.parentScale;let e=this.currentPath.slice(-3);e.map(e=>e[0]),e.map(e=>e[1]);let{ctx:t}=this;for(let e of(t.save(),t.clearRect(0,0,this.canvas.width,this.canvas.height),this.bezierPath2D))t.stroke(e);t.stroke(this.#iJ),t.restore()}#os(e,t,n,r,o,s,a){let l=(t+r)/2,c=(n+o)/2,u=(r+s)/2,d=(o+a)/2;e.bezierCurveTo(l+2*(r-l)/3,c+2*(o-c)/3,u+2*(r-u)/3,d+2*(o-d)/3,u,d)}#oc(){let e;let t=this.currentPath;if(t.length<=2)return[[t[0],t[0],t.at(-1),t.at(-1)]];let n=[],[r,o]=t[0];for(e=1;e<t.length-2;e++){let[s,a]=t[e],[l,c]=t[e+1],u=(s+l)/2,d=(a+c)/2,p=[r+2*(s-r)/3,o+2*(a-o)/3],h=[u+2*(s-u)/3,d+2*(a-d)/3];n.push([[r,o],p,h,[u,d]]),[r,o]=[u,d]}let[s,a]=t[e],[l,c]=t[e+1],u=[r+2*(s-r)/3,o+2*(a-o)/3];return n.push([[r,o],u,[l+2*(s-l)/3,c+2*(a-c)/3],[l,c]]),n}#i8(){if(this.isEmpty()){this.#ou();return}this.#on();let{canvas:e,ctx:t}=this;for(let n of(t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,e.width,e.height),this.#ou(),this.bezierPath2D))t.stroke(n)}commit(){if(!this.#iX)super.commit(),this.isEditing=!1,this.disableEditMode(),this.setInForeground(),this.#iX=!0,this.div.classList.add("disabled"),this.#i6(!0),this.select(),this.parent.addInkEditorIfNeeded(!0),this.moveInDOM(),this.div.focus({preventScroll:!0})}focusin(e){if(!!this._focusEventsAllowed)super.focusin(e),this.enableEditMode()}canvasPointerdown(e){if(0===e.button&&!!this.isInEditMode()&&!this.#iX)this.setInForeground(),e.preventDefault(),!this.div.contains(document.activeElement)&&this.div.focus({preventScroll:!0}),this.#or(e.offsetX,e.offsetY)}canvasPointermove(e){e.preventDefault(),this.#oo(e.offsetX,e.offsetY)}canvasPointerup(e){e.preventDefault(),this.#od(e)}canvasPointerleave(e){this.#od(e)}#od(e){this.canvas.removeEventListener("pointerleave",this.#iG),this.canvas.removeEventListener("pointermove",this.#iW),this.canvas.removeEventListener("pointerup",this.#iK),this.canvas.addEventListener("pointerdown",this.#iY,{signal:this._uiManager._signal}),this.#iZ&&clearTimeout(this.#iZ),this.#iZ=setTimeout(()=>{this.#iZ=null,this.canvas.removeEventListener("contextmenu",ef)},10),this.#ol(e.offsetX,e.offsetY),this.addToAnnotationStorage(),this.setInBackground()}#i9(){this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=0,this.canvas.className="inkEditorCanvas",this.canvas.setAttribute("data-l10n-id","pdfjs-ink-canvas"),this.div.append(this.canvas),this.ctx=this.canvas.getContext("2d")}#i7(){this.#i1=new ResizeObserver(e=>{let t=e[0].contentRect;t.width&&t.height&&this.setDimensions(t.width,t.height)}),this.#i1.observe(this.div),this._uiManager._signal.addEventListener("abort",()=>{this.#i1?.disconnect(),this.#i1=null},{once:!0})}get isResizable(){return!this.isEmpty()&&this.#iX}render(){let e,t;if(this.div)return this.div;this.width&&(e=this.x,t=this.y),super.render(),this.div.setAttribute("data-l10n-id","pdfjs-ink");let[n,r,o,s]=this.#ot();if(this.setAt(n,r,0,0),this.setDims(o,s),this.#i9(),this.width){let[n,r]=this.parentDimensions;this.setAspectRatio(this.width*n,this.height*r),this.setAt(e*n,t*r,this.width*n,this.height*r),this.#i0=!0,this.#oe(),this.setDims(this.width*n,this.height*r),this.#i8(),this.div.classList.add("disabled")}else this.div.classList.add("editing"),this.enableEditMode();return this.#i7(),this.div}#oe(){if(!this.#i0)return;let[e,t]=this.parentDimensions;this.canvas.width=Math.ceil(this.width*e),this.canvas.height=Math.ceil(this.height*t),this.#ou()}setDimensions(e,t){let n=Math.round(e),r=Math.round(t);if(this.#i2===n&&this.#i3===r)return;this.#i2=n,this.#i3=r,this.canvas.style.visibility="hidden";let[o,s]=this.parentDimensions;this.width=e/o,this.height=t/s,this.fixAndSetPosition(),this.#iX&&this.#op(e,t),this.#oe(),this.#i8(),this.canvas.style.visibility="visible",this.fixDims()}#op(e,t){let n=this.#oh(),r=(e-n)/this.#iq,o=(t-n)/this.#iV;this.scaleFactor=Math.min(r,o)}#ou(){let e=this.#oh()/2;this.ctx.setTransform(this.scaleFactor,0,0,this.scaleFactor,this.translationX*this.scaleFactor+e,this.translationY*this.scaleFactor+e)}static #of(e){let t=new Path2D;for(let n=0,r=e.length;n<r;n++){let[r,o,s,a]=e[n];0===n&&t.moveTo(...r),t.bezierCurveTo(o[0],o[1],s[0],s[1],a[0],a[1])}return t}static #om(e,t,n){let[r,o,s,a]=t;switch(n){case 0:for(let t=0,n=e.length;t<n;t+=2)e[t]+=r,e[t+1]=a-e[t+1];break;case 90:for(let t=0,n=e.length;t<n;t+=2){let n=e[t];e[t]=e[t+1]+r,e[t+1]=n+o}break;case 180:for(let t=0,n=e.length;t<n;t+=2)e[t]=s-e[t],e[t+1]+=o;break;case 270:for(let t=0,n=e.length;t<n;t+=2){let n=e[t];e[t]=s-e[t+1],e[t+1]=a-n}break;default:throw Error("Invalid rotation")}return e}static #og(e,t,n){let[r,o,s,a]=t;switch(n){case 0:for(let t=0,n=e.length;t<n;t+=2)e[t]-=r,e[t+1]=a-e[t+1];break;case 90:for(let t=0,n=e.length;t<n;t+=2){let n=e[t];e[t]=e[t+1]-o,e[t+1]=n-r}break;case 180:for(let t=0,n=e.length;t<n;t+=2)e[t]=s-e[t],e[t+1]-=o;break;case 270:for(let t=0,n=e.length;t<n;t+=2){let n=e[t];e[t]=a-e[t+1],e[t+1]=s-n}break;default:throw Error("Invalid rotation")}return e}#ov(e,t,n,r){let o=[],s=this.thickness/2,a=e*t+s,l=e*n+s;for(let t of this.paths){let n=[],s=[];for(let r=0,o=t.length;r<o;r++){let[c,u,d,p]=t[r];if(c[0]===p[0]&&c[1]===p[1]&&1===o){let t=e*c[0]+a,r=e*c[1]+l;n.push(t,r),s.push(t,r);break}let h=e*c[0]+a,f=e*c[1]+l,m=e*u[0]+a,g=e*u[1]+l,v=e*d[0]+a,b=e*d[1]+l,y=e*p[0]+a,x=e*p[1]+l;0===r&&(n.push(h,f),s.push(h,f)),n.push(m,g,v,b,y,x),s.push(m,g),r===o-1&&s.push(y,x)}o.push({bezier:nz.#om(n,r,this.rotation),points:nz.#om(s,r,this.rotation)})}return o}#ob(){let e=1/0,t=-1/0,n=1/0,r=-1/0;for(let o of this.paths)for(let[s,a,l,c]of o){let o=U.bezierBoundingBox(...s,...a,...l,...c);e=Math.min(e,o[0]),n=Math.min(n,o[1]),t=Math.max(t,o[2]),r=Math.max(r,o[3])}return[e,n,t,r]}#oh(){return this.#iX?Math.ceil(this.thickness*this.parentScale):0}#i6(e=!1){if(this.isEmpty())return;if(!this.#iX){this.#i8();return}let t=this.#ob(),n=this.#oh();this.#iq=Math.max(eP.MIN_SIZE,t[2]-t[0]),this.#iV=Math.max(eP.MIN_SIZE,t[3]-t[1]);let r=Math.ceil(n+this.#iq*this.scaleFactor),o=Math.ceil(n+this.#iV*this.scaleFactor),[s,a]=this.parentDimensions;this.width=r/s,this.height=o/a,this.setAspectRatio(r,o);let l=this.translationX,c=this.translationY;this.translationX=-t[0],this.translationY=-t[1],this.#oe(),this.#i8(),this.#i2=r,this.#i3=o,this.setDims(r,o);let u=e?n/this.scaleFactor/2:0;this.translate(l-this.translationX-u,c-this.translationY-u)}static deserialize(e,t,n){if(e instanceof nk)return null;let r=super.deserialize(e,t,n);r.thickness=e.thickness,r.color=U.makeHexColor(...e.color),r.opacity=e.opacity;let[o,s]=r.pageDimensions,a=r.width*o,l=r.height*s,c=r.parentScale,u=e.thickness/2;r.#iX=!0,r.#i2=Math.round(a),r.#i3=Math.round(l);let{paths:d,rect:p,rotation:h}=e;for(let{bezier:e}of d){e=nz.#og(e,p,h);let t=[];r.paths.push(t);let n=c*(e[0]-u),o=c*(e[1]-u);for(let r=2,s=e.length;r<s;r+=6){let s=c*(e[r]-u),a=c*(e[r+1]-u),l=c*(e[r+2]-u),d=c*(e[r+3]-u),p=c*(e[r+4]-u),h=c*(e[r+5]-u);t.push([[n,o],[s,a],[l,d],[p,h]]),n=p,o=h}let s=this.#of(t);r.bezierPath2D.push(s)}let f=r.#ob();return r.#iq=Math.max(eP.MIN_SIZE,f[2]-f[0]),r.#iV=Math.max(eP.MIN_SIZE,f[3]-f[1]),r.#op(a,l),r}serialize(){if(this.isEmpty())return null;let e=this.getRect(0,0),t=eP._colorManager.convert(this.ctx.strokeStyle);return{annotationType:p.INK,color:t,thickness:this.thickness,opacity:this.opacity,paths:this.#ov(this.scaleFactor/this.parentScale,this.translationX,this.translationY,e),pageIndex:this.pageIndex,rect:e,rotation:this.rotation,structTreeParentId:this._structTreeParentId}}}class nB extends eP{#oy=null;#ox=null;#ow=null;#oS=null;#ok=null;#oA="";#oC=null;#i1=null;#oE=null;#oT=!1;#o_=!1;static _type="stamp";static _editorType=p.STAMP;constructor(e){super({...e,name:"stampEditor"}),this.#oS=e.bitmapUrl,this.#ok=e.bitmapFile}static initialize(e,t){eP.initialize(e,t)}static get supportedTypes(){return O(this,"supportedTypes",["apng","avif","bmp","gif","jpeg","png","svg+xml","webp","x-icon"].map(e=>`image/${e}`))}static get supportedTypesStr(){return O(this,"supportedTypesStr",this.supportedTypes.join(","))}static isHandlingMimeForPasting(e){return this.supportedTypes.includes(e)}static paste(e,t){t.pasteEditor(p.STAMP,{bitmapFile:e.getAsFile()})}#oO(e,t=!1){if(!e){this.remove();return}this.#oy=e.bitmap,!t&&(this.#ox=e.id,this.#oT=e.isSvg),e.file&&(this.#oA=e.file.name),this.#i9()}#oM(){this.#ow=null,this._uiManager.enableWaiting(!1),this.#oC&&this.div.focus()}#oI(){if(this.#ox){this._uiManager.enableWaiting(!0),this._uiManager.imageManager.getFromId(this.#ox).then(e=>this.#oO(e,!0)).finally(()=>this.#oM());return}if(this.#oS){let e=this.#oS;this.#oS=null,this._uiManager.enableWaiting(!0),this.#ow=this._uiManager.imageManager.getFromUrl(e).then(e=>this.#oO(e)).finally(()=>this.#oM());return}if(this.#ok){let e=this.#ok;this.#ok=null,this._uiManager.enableWaiting(!0),this.#ow=this._uiManager.imageManager.getFromFile(e).then(e=>this.#oO(e)).finally(()=>this.#oM());return}let e=document.createElement("input");e.type="file",e.accept=nB.supportedTypesStr;let t=this._uiManager._signal;this.#ow=new Promise(n=>{e.addEventListener("change",async()=>{if(e.files&&0!==e.files.length){this._uiManager.enableWaiting(!0);let t=await this._uiManager.imageManager.getFromFile(e.files[0]);this.#oO(t)}else this.remove();n()},{signal:t}),e.addEventListener("cancel",()=>{this.remove(),n()},{signal:t})}).finally(()=>this.#oM()),e.click()}remove(){this.#ox&&(this.#oy=null,this._uiManager.imageManager.deleteId(this.#ox),this.#oC?.remove(),this.#oC=null,this.#i1?.disconnect(),this.#i1=null,this.#oE&&(clearTimeout(this.#oE),this.#oE=null)),super.remove()}rebuild(){if(!this.parent){this.#ox&&this.#oI();return}if(super.rebuild(),null!==this.div)this.#ox&&null===this.#oC&&this.#oI(),!this.isAttachedToDOM&&this.parent.add(this)}onceAdded(){this._isDraggable=!0,this.div.focus()}isEmpty(){return!(this.#ow||this.#oy||this.#oS||this.#ok||this.#ox)}get isResizable(){return!0}render(){let e,t;if(this.div)return this.div;if(this.width&&(e=this.x,t=this.y),super.render(),this.div.hidden=!0,this.addAltTextButton(),this.#oy?this.#i9():this.#oI(),this.width){let[n,r]=this.parentDimensions;this.setAt(e*n,t*r,this.width*n,this.height*r)}return this.div}#i9(){let{div:e}=this,{width:t,height:n}=this.#oy,[r,o]=this.pageDimensions;if(this.width)t=this.width*r,n=this.height*o;else if(t>.75*r||n>.75*o){let e=Math.min(.75*r/t,.75*o/n);t*=e,n*=e}let[s,a]=this.parentDimensions;this.setDims(t*s/r,n*a/o),this._uiManager.enableWaiting(!1);let l=this.#oC=document.createElement("canvas");e.append(l),e.hidden=!1,this.#oP(t,n),this.#i7(),!this.#o_&&(this.parent.addUndoableEditor(this),this.#o_=!0),this._reportTelemetry({action:"inserted_image"}),this.#oA&&l.setAttribute("aria-label",this.#oA)}#oD(e,t){let[n,r]=this.parentDimensions;this.width=e/n,this.height=t/r,this.setDims(e,t),this._initialOptions?.isCentered?this.center():this.fixAndSetPosition(),this._initialOptions=null,null!==this.#oE&&clearTimeout(this.#oE);this.#oE=setTimeout(()=>{this.#oE=null,this.#oP(e,t)},200)}#oN(e,t){let{width:n,height:r}=this.#oy,o=n,s=r,a=this.#oy;for(;o>2*e||s>2*t;){let n=o,r=s;o>2*e&&(o=o>=16384?Math.floor(o/2)-1:Math.ceil(o/2)),s>2*t&&(s=s>=16384?Math.floor(s/2)-1:Math.ceil(s/2));let l=new OffscreenCanvas(o,s);l.getContext("2d").drawImage(a,0,0,n,r,0,0,o,s),a=l.transferToImageBitmap()}return a}#oP(e,t){e=Math.ceil(e),t=Math.ceil(t);let n=this.#oC;if(!n||n.width===e&&n.height===t)return;n.width=e,n.height=t;let r=this.#oT?this.#oy:this.#oN(e,t);if(this._uiManager.hasMLManager&&!this.hasAltText()){let n=new OffscreenCanvas(e,t).getContext("2d");n.drawImage(r,0,0,r.width,r.height,0,0,e,t),this._uiManager.mlGuess({service:"image-to-text",request:{data:n.getImageData(0,0,e,t).data,width:e,height:t,channels:4}}).then(e=>{let t=e?.output||"";this.parent&&t&&!this.hasAltText()&&(this.altTextData={altText:t,decorative:!1})})}let o=n.getContext("2d");o.filter=this._uiManager.hcmFilter,o.drawImage(r,0,0,r.width,r.height,0,0,e,t)}getImageForAltText(){return this.#oC}#oR(e){if(e){if(this.#oT){let e=this._uiManager.imageManager.getSvgUrl(this.#ox);if(e)return e}let e=document.createElement("canvas");return{width:e.width,height:e.height}=this.#oy,e.getContext("2d").drawImage(this.#oy,0,0),e.toDataURL()}if(this.#oT){let[e,t]=this.pageDimensions,n=Math.round(this.width*e*et.PDF_TO_CSS_UNITS),r=Math.round(this.height*t*et.PDF_TO_CSS_UNITS),o=new OffscreenCanvas(n,r);return o.getContext("2d").drawImage(this.#oy,0,0,this.#oy.width,this.#oy.height,0,0,n,r),o.transferToImageBitmap()}return structuredClone(this.#oy)}#i7(){if(!!this._uiManager._signal)this.#i1=new ResizeObserver(e=>{let t=e[0].contentRect;t.width&&t.height&&this.#oD(t.width,t.height)}),this.#i1.observe(this.div),this._uiManager._signal.addEventListener("abort",()=>{this.#i1?.disconnect(),this.#i1=null},{once:!0})}static deserialize(e,t,n){if(e instanceof n_)return null;let r=super.deserialize(e,t,n),{rect:o,bitmapUrl:s,bitmapId:a,isSvg:l,accessibilityData:c}=e;a&&n.imageManager.isValidId(a)?r.#ox=a:r.#oS=s,r.#oT=l;let[u,d]=r.pageDimensions;return r.width=(o[2]-o[0])/u,r.height=(o[3]-o[1])/d,c&&(r.altTextData=c),r}serialize(e=!1,t=null){if(this.isEmpty())return null;let n={annotationType:p.STAMP,bitmapId:this.#ox,pageIndex:this.pageIndex,rect:this.getRect(0,0),rotation:this.rotation,isSvg:this.#oT,structTreeParentId:this._structTreeParentId};if(e)return n.bitmapUrl=this.#oR(!0),n.accessibilityData=this.altTextData,n;let{decorative:r,altText:o}=this.altTextData;if(!r&&o&&(n.accessibilityData={type:"Figure",alt:o}),null===t)return n;t.stamps||=new Map;let s=this.#oT?(n.rect[2]-n.rect[0])*(n.rect[3]-n.rect[1]):null;if(t.stamps.has(this.#ox)){if(this.#oT){let e=t.stamps.get(this.#ox);s>e.area&&(e.area=s,e.serialized.bitmap.close(),e.serialized.bitmap=this.#oR(!1))}}else t.stamps.set(this.#ox,{area:s,serialized:n}),n.bitmap=this.#oR(!1);return n}}class nH{#rp;#oL=!1;#oj=null;#o$=null;#oF=null;#oz=null;#oB=null;#oH=new Map;#oU=!1;#oV=!1;#oq=!1;#oW=null;#h;static _initialized=!1;static #j=new Map([nP,nz,nB,nF].map(e=>[e._editorType,e]));constructor({uiManager:e,pageIndex:t,div:n,accessibilityManager:r,annotationLayer:o,drawLayer:s,textLayer:a,viewport:l,l10n:c}){let u=[...nH.#j.values()];if(!nH._initialized)for(let t of(nH._initialized=!0,u))t.initialize(c,e);e.registerEditorTypes(u),this.#h=e,this.pageIndex=t,this.div=n,this.#rp=r,this.#oj=o,this.viewport=l,this.#oW=a,this.drawLayer=s,this.#h.addLayer(this)}get isEmpty(){return 0===this.#oH.size}get isInvisible(){return this.isEmpty&&this.#h.getMode()===p.NONE}updateToolbar(e){this.#h.updateToolbar(e)}updateMode(e=this.#h.getMode()){switch(this.#oG(),e){case p.NONE:this.disableTextSelection(),this.togglePointerEvents(!1),this.toggleAnnotationLayerPointerEvents(!0),this.disableClick();return;case p.INK:this.addInkEditorIfNeeded(!1),this.disableTextSelection(),this.togglePointerEvents(!0),this.disableClick();break;case p.HIGHLIGHT:this.enableTextSelection(),this.togglePointerEvents(!1),this.disableClick();break;default:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick()}this.toggleAnnotationLayerPointerEvents(!1);let{classList:t}=this.div;for(let n of nH.#j.values())t.toggle(`${n._type}Editing`,e===n._editorType);this.div.hidden=!1}hasTextLayer(e){return e===this.#oW?.div}addInkEditorIfNeeded(e){if(this.#h.getMode()===p.INK){if(!e){for(let e of this.#oH.values())if(e.isEmpty()){e.setInBackground();return}}this.createAndAddNewEditor({offsetX:0,offsetY:0},!1).setInBackground()}}setEditingState(e){this.#h.setEditingState(e)}addCommands(e){this.#h.addCommands(e)}togglePointerEvents(e=!1){this.div.classList.toggle("disabled",!e)}toggleAnnotationLayerPointerEvents(e=!1){this.#oj?.div.classList.toggle("disabled",!e)}enable(){this.div.tabIndex=0,this.togglePointerEvents(!0);let e=new Set;for(let t of this.#oH.values())t.enableEditing(),t.show(!0),t.annotationElementId&&(this.#h.removeChangedExistingAnnotation(t),e.add(t.annotationElementId));if(!!this.#oj)for(let t of this.#oj.getEditableAnnotations()){if(t.hide(),this.#h.isDeletedAnnotationElement(t.data.id)||e.has(t.data.id))continue;let n=this.deserialize(t);if(!!n)this.addOrRebuild(n),n.enableEditing()}}disable(){this.#oq=!0,this.div.tabIndex=-1,this.togglePointerEvents(!1);let e=new Map,t=new Map;for(let n of this.#oH.values()){if(n.disableEditing(),!!n.annotationElementId){if(null!==n.serialize()){e.set(n.annotationElementId,n);continue}t.set(n.annotationElementId,n);this.getEditableAnnotation(n.annotationElementId)?.show(),n.remove()}}if(this.#oj)for(let n of this.#oj.getEditableAnnotations()){let{id:r}=n.data;if(this.#h.isDeletedAnnotationElement(r))continue;let o=t.get(r);if(o){o.resetAnnotationElement(n),o.show(!1),n.show();continue}(o=e.get(r))&&(this.#h.addChangedExistingAnnotation(o),o.renderAnnotationElement(n),o.show(!1)),n.show()}this.#oG(),this.isEmpty&&(this.div.hidden=!0);let{classList:n}=this.div;for(let e of nH.#j.values())n.remove(`${e._type}Editing`);this.disableTextSelection(),this.toggleAnnotationLayerPointerEvents(!0),this.#oq=!1}getEditableAnnotation(e){return this.#oj?.getEditableAnnotation(e)||null}setActiveEditor(e){if(this.#h.getActive()!==e)this.#h.setActiveEditor(e)}enableTextSelection(){this.div.tabIndex=-1,this.#oW?.div&&!this.#oz&&(this.#oz=this.#oK.bind(this),this.#oW.div.addEventListener("pointerdown",this.#oz,{signal:this.#h._signal}),this.#oW.div.classList.add("highlighting"))}disableTextSelection(){this.div.tabIndex=0,this.#oW?.div&&this.#oz&&(this.#oW.div.removeEventListener("pointerdown",this.#oz),this.#oz=null,this.#oW.div.classList.remove("highlighting"))}#oK(e){if(this.#h.unselectAll(),e.target===this.#oW.div){let{isMac:t}=B.platform;if(0===e.button&&(!e.ctrlKey||!t))this.#h.showAllEditors("highlight",!0,!0),this.#oW.div.classList.add("free"),nF.startHighlighting(this,"ltr"===this.#h.direction,e),this.#oW.div.addEventListener("pointerup",()=>{this.#oW.div.classList.remove("free")},{once:!0,signal:this.#h._signal}),e.preventDefault()}}enableClick(){if(this.#oF)return;let e=this.#h._signal;this.#oF=this.pointerdown.bind(this),this.#o$=this.pointerup.bind(this),this.div.addEventListener("pointerdown",this.#oF,{signal:e}),this.div.addEventListener("pointerup",this.#o$,{signal:e})}disableClick(){if(!!this.#oF)this.div.removeEventListener("pointerdown",this.#oF),this.div.removeEventListener("pointerup",this.#o$),this.#oF=null,this.#o$=null}attach(e){this.#oH.set(e.id,e);let{annotationElementId:t}=e;t&&this.#h.isDeletedAnnotationElement(t)&&this.#h.removeDeletedAnnotationElement(e)}detach(e){this.#oH.delete(e.id),this.#rp?.removePointerInTextLayer(e.contentDiv),!this.#oq&&e.annotationElementId&&this.#h.addDeletedAnnotationElement(e)}remove(e){this.detach(e),this.#h.removeEditor(e),e.div.remove(),e.isAttachedToDOM=!1,!this.#oV&&this.addInkEditorIfNeeded(!1)}changeParent(e){if(e.parent!==this)e.parent&&e.annotationElementId&&(this.#h.addDeletedAnnotationElement(e.annotationElementId),eP.deleteAnnotationElement(e),e.annotationElementId=null),this.attach(e),e.parent?.detach(e),e.setParent(this),e.div&&e.isAttachedToDOM&&(e.div.remove(),this.div.append(e.div))}add(e){if(e.parent!==this||!e.isAttachedToDOM){if(this.changeParent(e),this.#h.addEditor(e),this.attach(e),!e.isAttachedToDOM){let t=e.render();this.div.append(t),e.isAttachedToDOM=!0}e.fixAndSetPosition(),e.onceAdded(),this.#h.addToAnnotationStorage(e),e._reportTelemetry(e.telemetryInitialData)}}moveEditorInDOM(e){if(!e.isAttachedToDOM)return;let{activeElement:t}=document;e.div.contains(t)&&!this.#oB&&(e._focusEventsAllowed=!1,this.#oB=setTimeout(()=>{this.#oB=null,e.div.contains(document.activeElement)?e._focusEventsAllowed=!0:(e.div.addEventListener("focusin",()=>{e._focusEventsAllowed=!0},{once:!0,signal:this.#h._signal}),t.focus())},0)),e._structTreeParentId=this.#rp?.moveElementInDOM(this.div,e.div,e.contentDiv,!0)}addOrRebuild(e){e.needsToBeRebuilt()?(e.parent||=this,e.rebuild(),e.show()):this.add(e)}addUndoableEditor(e){this.addCommands({cmd:()=>e._uiManager.rebuild(e),undo:()=>{e.remove()},mustExec:!1})}getNextId(){return this.#h.getId()}get #oY(){return nH.#j.get(this.#h.getMode())}get _signal(){return this.#h._signal}#oZ(e){let t=this.#oY;return t?new t.prototype.constructor(e):null}canCreateNewEmptyEditor(){return this.#oY?.canCreateNewEmptyEditor()}pasteEditor(e,t){this.#h.updateToolbar(e),this.#h.updateMode(e);let{offsetX:n,offsetY:r}=this.#oJ(),o=this.getNextId(),s=this.#oZ({parent:this,id:o,x:n,y:r,uiManager:this.#h,isCentered:!0,...t});s&&this.add(s)}deserialize(e){return nH.#j.get(e.annotationType??e.annotationEditorType)?.deserialize(e,this,this.#h)||null}createAndAddNewEditor(e,t,n={}){let r=this.getNextId(),o=this.#oZ({parent:this,id:r,x:e.offsetX,y:e.offsetY,uiManager:this.#h,isCentered:t,...n});return o&&this.add(o),o}#oJ(){let{x:e,y:t,width:n,height:r}=this.div.getBoundingClientRect(),o=Math.max(0,e),s=Math.max(0,t),a=Math.min(window.innerWidth,e+n),l=Math.min(window.innerHeight,t+r),c=(o+a)/2-e,u=(s+l)/2-t,[d,p]=this.viewport.rotation%180==0?[c,u]:[u,c];return{offsetX:d,offsetY:p}}addNewEditor(){this.createAndAddNewEditor(this.#oJ(),!0)}setSelected(e){this.#h.setSelected(e)}toggleSelected(e){this.#h.toggleSelected(e)}isSelected(e){return this.#h.isSelected(e)}unselect(e){this.#h.unselect(e)}pointerup(e){let{isMac:t}=B.platform;if(0===e.button&&(!e.ctrlKey||!t)&&e.target===this.div&&!!this.#oU){if(this.#oU=!1,!this.#oL){this.#oL=!0;return}if(this.#h.getMode()===p.STAMP){this.#h.unselectAll();return}this.createAndAddNewEditor(e,!1)}}pointerdown(e){if(this.#h.getMode()===p.HIGHLIGHT&&this.enableTextSelection(),this.#oU){this.#oU=!1;return}let{isMac:t}=B.platform;if(0!==e.button||e.ctrlKey&&t||e.target!==this.div)return;this.#oU=!0;let n=this.#h.getActive();this.#oL=!n||n.isEmpty()}findNewParent(e,t,n){let r=this.#h.findParent(t,n);return null!==r&&r!==this&&(r.changeParent(e),!0)}destroy(){for(let e of(this.#h.getActive()?.parent===this&&(this.#h.commitOrRemove(),this.#h.setActiveEditor(null)),this.#oB&&(clearTimeout(this.#oB),this.#oB=null),this.#oH.values()))this.#rp?.removePointerInTextLayer(e.contentDiv),e.setParent(null),e.isAttachedToDOM=!1,e.div.remove();this.div=null,this.#oH.clear(),this.#h.removeLayer(this)}#oG(){for(let e of(this.#oV=!0,this.#oH.values()))e.isEmpty()&&e.remove();this.#oV=!1}render({viewport:e}){for(let t of(this.viewport=e,ew(this.div,e),this.#h.getEditors(this.pageIndex)))this.add(t),t.rebuild();this.updateMode()}update({viewport:e}){this.#h.commitOrRemove(),this.#oG();let t=this.viewport.rotation,n=e.rotation;if(this.viewport=e,ew(this.div,{rotation:n}),t!==n)for(let e of this.#oH.values())e.rotate(n);this.addInkEditorIfNeeded(!1)}get pageDimensions(){let{pageWidth:e,pageHeight:t}=this.viewport.rawDims;return[e,t]}get scale(){return this.#h.viewParameters.realScale}}class nU{#n2=null;#v=0;#oX=new Map;#oQ=new Map;constructor({pageIndex:e}){this.pageIndex=e}setParent(e){if(!this.#n2){this.#n2=e;return}if(this.#n2!==e){if(this.#oX.size>0)for(let t of this.#oX.values())t.remove(),e.append(t);this.#n2=e}}static get _svgFactory(){return O(this,"_svgFactory",new eo)}static #o0(e,{x:t=0,y:n=0,width:r=1,height:o=1}={}){let{style:s}=e;s.top=`${100*n}%`,s.left=`${100*t}%`,s.width=`${100*r}%`,s.height=`${100*o}%`}#o1(e){let t=nU._svgFactory.create(1,1,!0);return this.#n2.append(t),t.setAttribute("aria-hidden",!0),nU.#o0(t,e),t}#o2(e,t){let n=nU._svgFactory.createElement("clipPath");e.append(n);let r=`clip_${t}`;n.setAttribute("id",r),n.setAttribute("clipPathUnits","objectBoundingBox");let o=nU._svgFactory.createElement("use");return n.append(o),o.setAttribute("href",`#${t}`),o.classList.add("clip"),r}highlight(e,t,n,r=!1){let o=this.#v++,s=this.#o1(e.box);s.classList.add("highlight"),e.free&&s.classList.add("free");let a=nU._svgFactory.createElement("defs");s.append(a);let l=nU._svgFactory.createElement("path");a.append(l);let c=`path_p${this.pageIndex}_${o}`;l.setAttribute("id",c),l.setAttribute("d",e.toSVGPath()),r&&this.#oQ.set(o,l);let u=this.#o2(a,c),d=nU._svgFactory.createElement("use");return s.append(d),s.setAttribute("fill",t),s.setAttribute("fill-opacity",n),d.setAttribute("href",`#${c}`),this.#oX.set(o,s),{id:o,clipPathId:`url(#${u})`}}highlightOutline(e){let t;let n=this.#v++,r=this.#o1(e.box);r.classList.add("highlightOutline");let o=nU._svgFactory.createElement("defs");r.append(o);let s=nU._svgFactory.createElement("path");o.append(s);let a=`path_p${this.pageIndex}_${n}`;if(s.setAttribute("id",a),s.setAttribute("d",e.toSVGPath()),s.setAttribute("vector-effect","non-scaling-stroke"),e.free){r.classList.add("free");let e=nU._svgFactory.createElement("mask");o.append(e),t=`mask_p${this.pageIndex}_${n}`,e.setAttribute("id",t),e.setAttribute("maskUnits","objectBoundingBox");let s=nU._svgFactory.createElement("rect");e.append(s),s.setAttribute("width","1"),s.setAttribute("height","1"),s.setAttribute("fill","white");let l=nU._svgFactory.createElement("use");e.append(l),l.setAttribute("href",`#${a}`),l.setAttribute("stroke","none"),l.setAttribute("fill","black"),l.setAttribute("fill-rule","nonzero"),l.classList.add("mask")}let l=nU._svgFactory.createElement("use");r.append(l),l.setAttribute("href",`#${a}`),t&&l.setAttribute("mask",`url(#${t})`);let c=l.cloneNode();return r.append(c),l.classList.add("mainOutline"),c.classList.add("secondaryOutline"),this.#oX.set(n,r),n}finalizeLine(e,t){let n=this.#oQ.get(e);this.#oQ.delete(e),this.updateBox(e,t.box),n.setAttribute("d",t.toSVGPath())}updateLine(e,t){this.#oX.get(e).firstChild.firstChild.setAttribute("d",t.toSVGPath())}removeFreeHighlight(e){this.remove(e),this.#oQ.delete(e)}updatePath(e,t){this.#oQ.get(e).setAttribute("d",t.toSVGPath())}updateBox(e,t){nU.#o0(this.#oX.get(e),t)}show(e,t){this.#oX.get(e).classList.toggle("hidden",!t)}rotate(e,t){this.#oX.get(e).setAttribute("data-main-rotation",t)}changeColor(e,t){this.#oX.get(e).setAttribute("fill",t)}changeOpacity(e,t){this.#oX.get(e).setAttribute("fill-opacity",t)}addClass(e,t){this.#oX.get(e).classList.add(t)}removeClass(e,t){this.#oX.get(e).classList.remove(t)}remove(e){if(null!==this.#n2)this.#oX.get(e).remove(),this.#oX.delete(e)}destroy(){for(let e of(this.#n2=null,this.#oX.values()))e.remove();this.#oX.clear()}}var nV=s.AbortException,nq=s.AnnotationEditorLayer,nW=s.AnnotationEditorParamsType,nG=s.AnnotationEditorType,nK=s.AnnotationEditorUIManager,nY=s.AnnotationLayer,nZ=s.AnnotationMode,nJ=s.CMapCompressionType,nX=s.ColorPicker,nQ=s.DOMSVGFactory,n0=s.DrawLayer,n1=s.FeatureTest,n2=s.GlobalWorkerOptions,n3=s.ImageKind,n5=s.InvalidPDFException,n4=s.MissingPDFException,n6=s.OPS,n8=s.Outliner,n9=s.PDFDataRangeTransport,n7=s.PDFDateString,re=s.PDFWorker,rt=s.PasswordResponses,rn=s.PermissionFlag,rr=s.PixelsPerInch,ri=s.RenderingCancelledException,ro=s.TextLayer,rs=s.UnexpectedResponseException,ra=s.Util,rl=s.VerbosityLevel,rc=s.XfaLayer,ru=s.build,rd=s.createValidAbsoluteUrl,rp=s.fetchData,rh=s.getDocument,rf=s.getFilenameFromUrl,rm=s.getPdfFilenameFromUrl,rg=s.getXfaPageViewport,rv=s.isDataScheme,rb=s.isPdfFile,ry=s.noContextMenu,rx=s.normalizeUnicode,rw=s.renderTextLayer,rS=s.setLayerDimensions,rk=s.shadow,rA=s.updateTextLayer,rC=s.version},132308:function(e,t,n){"use strict";n.d(t,{$:function(){return u},h:function(){return c}});var r=n(896433),o=n(871738);let s="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),a="undefined"!=typeof navigator&&/Win/.test(navigator.platform);function l(e,t,n=!0){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),n&&t.shiftKey&&(e="Shift-"+e),e}function c(e){return new o.Sy({props:{handleKeyDown:u(e)}})}function u(e){let t=function(e){let t=Object.create(null);for(let n in e)t[function(e){let t,n,r,o,a=e.split(/-(?!$)/),l=a[a.length-1];"Space"==l&&(l=" ");for(let e=0;e<a.length-1;e++){let l=a[e];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))t=!0;else if(/^(c|ctrl|control)$/i.test(l))n=!0;else if(/^s(hift)?$/i.test(l))r=!0;else if(/^mod$/i.test(l))s?o=!0:n=!0;else throw Error("Unrecognized modifier name: "+l)}return t&&(l="Alt-"+l),n&&(l="Ctrl-"+l),o&&(l="Meta-"+l),r&&(l="Shift-"+l),l}(n)]=e[n];return t}(e);return function(e,n){let o=(0,r.YG)(n),s,c=t[l(o,n)];if(c&&c(e.state,e.dispatch,e))return!0;if(1==o.length&&" "!=o){if(n.shiftKey){let r=t[l(o,n,!1)];if(r&&r(e.state,e.dispatch,e))return!0}if((n.altKey||n.metaKey||n.ctrlKey)&&!(a&&n.ctrlKey&&n.altKey)&&(s=r.ue[n.keyCode])&&s!=o){let r=t[l(s,n)];if(r&&r(e.state,e.dispatch,e))return!0}}return!1}}},153737:function(e,t,n){"use strict";function r(e){this.content=e}n.d(t,{aw:()=>H,NB:()=>A,p2:()=>d,Ts:()=>S,ZU:()=>F,e4:()=>u,vc:()=>c,PW:()=>J,HY:()=>o,V_:()=>z}),r.prototype={constructor:r,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return -1},get:function(e){var t=this.find(e);return -1==t?void 0:this.content[t+1]},update:function(e,t,n){var o=n&&n!=e?this.remove(n):this,s=o.find(e),a=o.content.slice();return -1==s?a.push(n||e,t):(a[s+1]=t,n&&(a[s]=n)),new r(a)},remove:function(e){var t=this.find(e);if(-1==t)return this;var n=this.content.slice();return n.splice(t,2),new r(n)},addToStart:function(e,t){return new r([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new r(n)},addBefore:function(e,t,n){var o=this.remove(t),s=o.content.slice(),a=o.find(e);return s.splice(-1==a?s.length:a,0,t,n),new r(s)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return(e=r.from(e)).size?new r(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=r.from(e)).size?new r(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=r.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}},r.from=function(e){if(e instanceof r)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new r(t)};class o{constructor(e,t){if(this.content=e,this.size=t||0,null==t)for(let t=0;t<e.length;t++)this.size+=e[t].nodeSize}nodesBetween(e,t,n,r=0,o){for(let s=0,a=0;a<t;s++){let l=this.content[s],c=a+l.nodeSize;if(c>e&&!1!==n(l,r+a,o||null,s)&&l.content.size){let o=a+1;l.nodesBetween(Math.max(0,e-o),Math.min(l.content.size,t-o),n,r+o)}a=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let o="",s=!0;return this.nodesBetween(e,t,(a,l)=>{let c=a.isText?a.text.slice(Math.max(e,l)-l,t-l):a.isLeaf?r?"function"==typeof r?r(a):r:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&c||a.isTextblock)&&n&&(s?s=!1:o+=n),o+=c},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,n=e.firstChild,r=this.content.slice(),s=0;for(t.isText&&t.sameMarkup(n)&&(r[r.length-1]=t.withText(t.text+n.text),s=1);s<e.content.length;s++)r.push(e.content[s]);return new o(r,this.size+e.size)}cut(e,t=this.size){if(0==e&&t==this.size)return this;let n=[],r=0;if(t>e)for(let o=0,s=0;s<t;o++){let a=this.content[o],l=s+a.nodeSize;l>e&&((s<e||l>t)&&(a=a.isText?a.cut(Math.max(0,e-s),Math.min(a.text.length,t-s)):a.cut(Math.max(0,e-s-1),Math.min(a.content.size,t-s-1))),n.push(a),r+=a.nodeSize),s=l}return new o(n,r)}cutByIndex(e,t){return e==t?o.empty:0==e&&t==this.content.length?this:new o(this.content.slice(e,t))}replaceChild(e,t){let n=this.content[e];if(n==t)return this;let r=this.content.slice(),s=this.size+t.nodeSize-n.nodeSize;return r[e]=t,new o(r,s)}addToStart(e){return new o([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new o(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let r=this.content[t];e(r,n,t),n+=r.nodeSize}}findDiffStart(e,t=0){return function e(t,n,r){for(let o=0;;o++){if(o==t.childCount||o==n.childCount)return t.childCount==n.childCount?null:r;let s=t.child(o),a=n.child(o);if(s==a){r+=s.nodeSize;continue}if(!s.sameMarkup(a))return r;if(s.isText&&s.text!=a.text){for(let e=0;s.text[e]==a.text[e];e++)r++;return r}if(s.content.size||a.content.size){let t=e(s.content,a.content,r+1);if(null!=t)return t}r+=s.nodeSize}}(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return function e(t,n,r,o){for(let s=t.childCount,a=n.childCount;;){if(0==s||0==a)return s==a?null:{a:r,b:o};let l=t.child(--s),c=n.child(--a),u=l.nodeSize;if(l==c){r-=u,o-=u;continue}if(!l.sameMarkup(c))return{a:r,b:o};if(l.isText&&l.text!=c.text){let e=0,t=Math.min(l.text.length,c.text.length);for(;e<t&&l.text[l.text.length-e-1]==c.text[c.text.length-e-1];)e++,r--,o--;return{a:r,b:o}}if(l.content.size||c.content.size){let t=e(l.content,c.content,r-1,o-1);if(t)return t}r-=u,o-=u}}(this,e,t,n)}findIndex(e,t=-1){if(0==e)return a(0,e);if(e==this.size)return a(this.content.length,e);if(e>this.size||e<0)throw RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let o=r+this.child(n).nodeSize;if(o>=e){if(o==e||t>0)return a(n+1,o);return a(n,r)}r=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return o.empty;if(!Array.isArray(t))throw RangeError("Invalid input for Fragment.fromJSON");return new o(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return o.empty;let t,n=0;for(let r=0;r<e.length;r++){let o=e[r];n+=o.nodeSize,r&&o.isText&&e[r-1].sameMarkup(o)?(!t&&(t=e.slice(0,r)),t[t.length-1]=o.withText(t[t.length-1].text+o.text)):t&&t.push(o)}return new o(t||e,n)}static from(e){if(!e)return o.empty;if(e instanceof o)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new o([e],e.nodeSize);throw RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}o.empty=new o([],0);let s={index:0,offset:0};function a(e,t){return s.index=e,s.offset=t,s}function l(e,t){if(e===t)return!0;if(!(e&&"object"==typeof e)||!(t&&"object"==typeof t))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!l(e[n],t[n]))return!1}else{for(let n in e)if(!(n in t)||!l(e[n],t[n]))return!1;for(let n in t)if(!(n in e))return!1}return!0}class c{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let r=0;r<e.length;r++){let o=e[r];if(this.eq(o))return e;if(this.type.excludes(o.type))!t&&(t=e.slice(0,r));else{if(o.type.excludes(this.type))return e;!n&&o.type.rank>this.type.rank&&(!t&&(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(o)}}return!t&&(t=e.slice()),!n&&t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&l(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw RangeError("Invalid input for Mark.fromJSON");let n=e.marks[t.type];if(!n)throw RangeError(`There is no mark type ${t.type} in this schema`);let r=n.create(t.attrs);return n.checkAttrs(r.attrs),r}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&0==e.length)return c.none;if(e instanceof c)return[e];let t=e.slice();return t.sort((e,t)=>e.type.rank-t.type.rank),t}}c.none=[];class u extends Error{}class d{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let n=function e(t,n,r,o){let{index:s,offset:a}=t.findIndex(n),l=t.maybeChild(s);if(a==n||l.isText)return o&&!o.canReplace(s,s,r)?null:t.cut(0,n).append(r).append(t.cut(n));let c=e(l.content,n-a-1,r);return c&&t.replaceChild(s,l.copy(c))}(this.content,e+this.openStart,t);return n&&new d(n,this.openStart,this.openEnd)}removeBetween(e,t){return new d(function e(t,n,r){let{index:o,offset:s}=t.findIndex(n),a=t.maybeChild(o),{index:l,offset:c}=t.findIndex(r);if(s==n||a.isText){if(c!=r&&!t.child(l).isText)throw RangeError("Removing non-flat range");return t.cut(0,n).append(t.cut(r))}if(o!=l)throw RangeError("Removing non-flat range");return t.replaceChild(o,a.copy(e(a.content,n-s-1,r-s-1)))}(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return d.empty;let n=t.openStart||0,r=t.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw RangeError("Invalid input for Slice.fromJSON");return new d(o.fromJSON(e,t.content),n,r)}static maxOpen(e,t=!0){let n=0,r=0;for(let r=e.firstChild;r&&!r.isLeaf&&(t||!r.type.spec.isolating);r=r.firstChild)n++;for(let n=e.lastChild;n&&!n.isLeaf&&(t||!n.type.spec.isolating);n=n.lastChild)r++;return new d(e,n,r)}}d.empty=new d(o.empty,0,0);function p(e,t){if(!t.type.compatibleContent(e.type))throw new u("Cannot join "+t.type.name+" onto "+e.type.name)}function h(e,t,n){let r=e.node(n);return p(r,t.node(n)),r}function f(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function m(e,t,n,r){let o=(t||e).node(n),s=0,a=t?t.index(n):o.childCount;e&&(s=e.index(n),e.depth>n?s++:e.textOffset&&(f(e.nodeAfter,r),s++));for(let e=s;e<a;e++)f(o.child(e),r);t&&t.depth==n&&t.textOffset&&f(t.nodeBefore,r)}function g(e,t){return e.type.checkContent(t),e.copy(t)}function v(e,t,n){let r=[];return m(null,e,n,r),e.depth>n&&f(g(h(e,t,n+1),v(e,t,n+1)),r),m(t,null,n,r),new o(r)}class b{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return null==e?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[3*this.resolveDepth(e)]}index(e){return this.path[3*this.resolveDepth(e)+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)}start(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(!(e=this.resolveDepth(e)))throw RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]}after(e){if(!(e=this.resolveDepth(e)))throw RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[3*t],r=0==t?0:this.path[3*t-1]+1;for(let t=0;t<e;t++)r+=n.child(t).nodeSize;return r}marks(){let e=this.parent,t=this.index();if(0==e.content.size)return c.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){let e=n;n=r,r=e}let o=n.marks;for(var s=0;s<o.length;s++)!1===o[s].type.spec.inclusive&&(!r||!o[s].isInSet(r.marks))&&(o=o[s--].removeFromSet(o));return o}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,r=e.parent.maybeChild(e.index());for(var o=0;o<n.length;o++)!1===n[o].type.spec.inclusive&&(!r||!n[o].isInSet(r.marks))&&(n=n[o--].removeFromSet(n));return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new S(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw RangeError("Position "+t+" out of range");let n=[],r=0,o=t;for(let t=e;;){let{index:e,offset:s}=t.content.findIndex(o),a=o-s;if(n.push(t,e,r+s),!a||(t=t.child(e)).isText)break;o=a-1,r+=s+1}return new b(t,n,o)}static resolveCached(e,t){let n=w.get(e);if(n)for(let e=0;e<n.elts.length;e++){let r=n.elts[e];if(r.pos==t)return r}else w.set(e,n=new y);let r=n.elts[n.i]=b.resolve(e,t);return n.i=(n.i+1)%x,r}}class y{constructor(){this.elts=[],this.i=0}}let x=12,w=new WeakMap;class S{constructor(e,t,n){this.$from=e,this.$to=t,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}let k=Object.create(null);class A{constructor(e,t,n,r=c.none){this.type=e,this.attrs=t,this.marks=r,this.content=n||o.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,n,r=0){this.content.nodesBetween(e,t,n,r,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,n,r){return this.content.textBetween(e,t,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,n){return this.type==e&&l(this.attrs,t||e.defaultAttrs||k)&&c.sameSet(this.marks,n||c.none)}copy(e=null){return e==this.content?this:new A(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new A(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return 0==e&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return d.empty;let r=this.resolve(e),o=this.resolve(t),s=n?0:r.sharedDepth(t),a=r.start(s);return new d(r.node(s).content.cut(r.pos-a,o.pos-a),r.depth-s,o.depth-s)}replace(e,t,n){return function(e,t,n){if(n.openStart>e.depth)throw new u("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new u("Inconsistent open depths");return function e(t,n,r,s){let a=t.index(s),l=t.node(s);if(a==n.index(s)&&s<t.depth-r.openStart){let o=e(t,n,r,s+1);return l.copy(l.content.replaceChild(a,o))}if(!r.content.size)return g(l,v(t,n,s));if(r.openStart||r.openEnd||t.depth!=s||n.depth!=s){let{start:e,end:a}=function(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let e=n-1;e>=0;e--)r=t.node(e).copy(o.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(r,t);return g(l,function e(t,n,r,s,a){let l=t.depth>a&&h(t,n,a+1),c=s.depth>a&&h(r,s,a+1),u=[];return m(null,t,a,u),l&&c&&n.index(a)==r.index(a)?(p(l,c),f(g(l,e(t,n,r,s,a+1)),u)):(l&&f(g(l,v(t,n,a+1)),u),m(n,r,a,u),c&&f(g(c,v(r,s,a+1)),u)),m(s,null,a,u),new o(u)}(t,e,a,n,s))}else{let e=t.parent,o=e.content;return g(e,o.cut(0,t.parentOffset).append(r.content).append(o.cut(n.parentOffset)))}}(e,t,n,0)}(this.resolve(e),this.resolve(t),n)}nodeAt(e){for(let t=this;;){let{index:n,offset:r}=t.content.findIndex(e);if(!(t=t.maybeChild(n)))return null;if(r==e||t.isText)return t;e-=r+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(0==e)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let r=this.content.child(t-1);return{node:r,index:t-1,offset:n-r.nodeSize}}resolve(e){return b.resolveCached(this,e)}resolveNoCache(e){return b.resolve(this,e)}rangeHasMark(e,t,n){let r=!1;return t>e&&this.nodesBetween(e,t,e=>(n.isInSet(e.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),E(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,n=o.empty,r=0,s=n.childCount){let a=this.contentMatchAt(e).matchFragment(n,r,s),l=a&&a.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let e=r;e<s;e++)if(!this.type.allowsMarks(n.child(e).marks))return!1;return!0}canReplaceWith(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;let o=this.contentMatchAt(e).matchType(n),s=o&&o.matchFragment(this.content,t);return!!s&&s.validEnd}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=c.none;for(let t=0;t<this.marks.length;t++){let n=this.marks[t];n.type.checkAttrs(n.attrs),e=n.addToSet(e)}if(!c.sameSet(e,this.marks))throw RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(e=>e.type.name)}`);this.content.forEach(e=>e.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(e=>e.toJSON())),e}static fromJSON(e,t){let n;if(!t)throw RangeError("Invalid input for Node.fromJSON");if(t.marks){if(!Array.isArray(t.marks))throw RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw RangeError("Invalid text node in JSON");return e.text(t.text,n)}let r=o.fromJSON(e,t.content),s=e.nodeType(t.type).create(t.attrs,r,n);return s.type.checkAttrs(s.attrs),s}}A.prototype.text=void 0;class C extends A{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):E(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new C(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new C(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return 0==e&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function E(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class T{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let n=new _(e,t);if(null==n.next)return T.empty;let r=O(n);n.next&&n.err("Unexpected trailing text");let o=function(e){let t=Object.create(null);return function n(r){let o=[];r.forEach(t=>{e[t].forEach(({term:t,to:n})=>{let r;if(t){for(let e=0;e<o.length;e++)o[e][0]==t&&(r=o[e][1]);P(e,n).forEach(e=>{!r&&o.push([t,r=[]]),-1==r.indexOf(e)&&r.push(e)})}})});let s=t[r.join(",")]=new T(r.indexOf(e.length-1)>-1);for(let e=0;e<o.length;e++){let r=o[e][1].sort(I);s.next.push({type:o[e][0],next:t[r.join(",")]||n(r)})}return s}(P(e,0))}(function(e){let t=[[]];return o(function e(t,s){if("choice"==t.type)return t.exprs.reduce((t,n)=>t.concat(e(n,s)),[]);if("seq"==t.type)for(let r=0;;r++){let a=e(t.exprs[r],s);if(r==t.exprs.length-1)return a;o(a,s=n())}else if("star"==t.type){let a=n();return r(s,a),o(e(t.expr,a),a),[r(a)]}else if("plus"==t.type){let a=n();return o(e(t.expr,s),a),o(e(t.expr,a),a),[r(a)]}else if("opt"==t.type)return[r(s)].concat(e(t.expr,s));else if("range"==t.type){let a=s;for(let r=0;r<t.min;r++){let r=n();o(e(t.expr,a),r),a=r}if(-1==t.max)o(e(t.expr,a),a);else for(let s=t.min;s<t.max;s++){let s=n();r(a,s),o(e(t.expr,a),s),a=s}return[r(a)]}else if("name"==t.type)return[r(s,void 0,t.value)];else throw Error("Unknown expr type")}(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){let o={term:r,to:n};return t[e].push(o),o}function o(e,t){e.forEach(e=>e.to=t)}}(r));return function(e,t){for(let n=0,r=[e];n<r.length;n++){let e=r[n],o=!e.validEnd,s=[];for(let t=0;t<e.next.length;t++){let{type:n,next:a}=e.next[t];s.push(n.name),o&&!(n.isText||n.hasRequiredAttrs())&&(o=!1),-1==r.indexOf(a)&&r.push(a)}o&&t.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(o,n),o}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,n=e.childCount){let r=this;for(let o=t;r&&o<n;o++)r=r.matchType(e.child(o).type);return r}get inlineContent(){return 0!=this.next.length&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let r=[this];return function s(a,l){let c=a.matchFragment(e,n);if(c&&(!t||c.validEnd))return o.from(l.map(e=>e.createAndFill()));for(let e=0;e<a.next.length;e++){let{type:t,next:n}=a.next[e];if(!(t.isText||t.hasRequiredAttrs())&&-1==r.indexOf(n)){r.push(n);let e=s(n,l.concat(t));if(e)return e}}return null}(this,[])}findWrapping(e){for(let t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),o=r.match;if(o.matchType(e)){let e=[];for(let t=r;t.type;t=t.via)e.push(t.type);return e.reverse()}for(let e=0;e<o.next.length;e++){let{type:s,next:a}=o.next[e];!s.isLeaf&&!s.hasRequiredAttrs()&&!(s.name in t)&&(!r.type||a.validEnd)&&(n.push({match:s.contentMatch,type:s,via:r}),t[s.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];return!function t(n){e.push(n);for(let r=0;r<n.next.length;r++)-1==e.indexOf(n.next[r].next)&&t(n.next[r].next)}(this),e.map((t,n)=>{let r=n+(t.validEnd?"*":" ")+" ";for(let n=0;n<t.next.length;n++)r+=(n?", ":"")+t.next[n].type.name+"->"+e.indexOf(t.next[n].next);return r}).join("\n")}}T.empty=new T(!0);class _{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw SyntaxError(e+" (in content expression '"+this.string+"')")}}function O(e){let t=[];do t.push(function(e){let t=[];do t.push(function(e){let t=function(e){if(e.eat("(")){let t=O(e);return!e.eat(")")&&e.err("Missing closing paren"),t}if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=(function(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let o=[];for(let e in n){let r=n[e];r.isInGroup(t)&&o.push(r)}return 0==o.length&&e.err("No node type or group '"+t+"' found"),o})(e,e.next).map(t=>(null==e.inline?e.inline=t.isInline:e.inline!=t.isInline&&e.err("Mixing inline and block content"),{type:"name",value:t}));return e.pos++,1==t.length?t[0]:{type:"choice",exprs:t}}}(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=function(e,t){let n=M(e),r=n;return e.eat(",")&&(r="}"!=e.next?M(e):-1),!e.eat("}")&&e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}(e,t);else break;return t}(e));while(e.next&&")"!=e.next&&"|"!=e.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}(e));while(e.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function M(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function I(e,t){return t-e}function P(e,t){let n=[];return function t(r){let o=e[r];if(1==o.length&&!o[0].term)return t(o[0].to);n.push(r);for(let e=0;e<o.length;e++){let{term:r,to:s}=o[e];!r&&-1==n.indexOf(s)&&t(s)}}(t),n.sort(I)}function D(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function N(e,t){let n=Object.create(null);for(let r in e){let o=t&&t[r];if(void 0===o){let t=e[r];if(t.hasDefault)o=t.default;else throw RangeError("No value supplied for attribute "+r)}n[r]=o}return n}function R(e,t,n,r){for(let r in t)if(!(r in e))throw RangeError(`Unsupported attribute ${r} for ${n} of type ${r}`);for(let n in e){let r=e[n];r.validate&&r.validate(t[n])}}function L(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new $(e,r,t[r]);return n}class j{constructor(e,t,n){this.name=e,this.schema=t,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=L(e,n.attrs),this.defaultAttrs=D(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==e),this.isText="text"==e}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==T.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:N(this.attrs,e)}create(e=null,t,n){if(this.isText)throw Error("NodeType.create can't construct text nodes");return new A(this,this.computeAttrs(e),o.from(t),c.setFrom(n))}createChecked(e=null,t,n){return t=o.from(t),this.checkContent(t),new A(this,this.computeAttrs(e),t,c.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),(t=o.from(t)).size){let e=this.contentMatch.fillBefore(t);if(!e)return null;t=e.append(t)}let r=this.contentMatch.matchFragment(t),s=r&&r.fillBefore(o.empty,!0);return s?new A(this,e,t.append(s),c.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let t=0;t<e.childCount;t++)if(!this.allowsMarks(e.child(t).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){R(this.attrs,e,"node",this.name)}allowsMarkType(e){return null==this.markSet||this.markSet.indexOf(e)>-1}allowsMarks(e){if(null==this.markSet)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){let t;if(null==this.markSet)return e;for(let n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):!t&&(t=e.slice(0,n));return t?t.length?t:c.none:e}static compile(e,t){let n=Object.create(null);e.forEach((e,r)=>n[e]=new j(e,t,r));let r=t.spec.topNode||"doc";if(!n[r])throw RangeError("Schema is missing its top node type ('"+r+"')");if(!n.text)throw RangeError("Every schema needs a 'text' type");for(let e in n.text.attrs)throw RangeError("The text node type should not have attributes");return n}}class ${constructor(e,t,n){var r,o;let s;this.hasDefault=Object.prototype.hasOwnProperty.call(n,"default"),this.default=n.default;this.validate="string"==typeof n.validate?(r=e,o=t,s=n.validate.split("|"),e=>{let t=null===e?"null":typeof e;if(0>s.indexOf(t))throw RangeError(`Expected value of type ${s} for attribute ${o} on type ${r}, got ${t}`)}):n.validate}get isRequired(){return!this.hasDefault}}class F{constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=L(e,r.attrs),this.excluded=null;let o=D(this.attrs);this.instance=o?new c(this,o):null}create(e=null){return!e&&this.instance?this.instance:new c(this,N(this.attrs,e))}static compile(e,t){let n=Object.create(null),r=0;return e.forEach((e,o)=>n[e]=new F(e,r++,t,o)),n}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){R(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class z{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let n in e)t[n]=e[n];t.nodes=r.from(e.nodes),t.marks=r.from(e.marks||{}),this.nodes=j.compile(this.spec.nodes,this),this.marks=F.compile(this.spec.marks,this);let n=Object.create(null);for(let e in this.nodes){if(e in this.marks)throw RangeError(e+" can not be both a node and a mark");let t=this.nodes[e],r=t.spec.content||"",o=t.spec.marks;if(t.contentMatch=n[r]||(n[r]=T.parse(r,this.nodes)),t.inlineContent=t.contentMatch.inlineContent,t.spec.linebreakReplacement){if(this.linebreakReplacement)throw RangeError("Multiple linebreak nodes defined");if(!t.isInline||!t.isLeaf)throw RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=t}t.markSet="_"==o?null:o?B(this,o.split(" ")):""!=o&&t.inlineContent?null:[]}for(let e in this.marks){let t=this.marks[e],n=t.spec.excludes;t.excluded=null==n?[t]:""==n?[]:B(this,n.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,n,r){if("string"==typeof e)e=this.nodeType(e);else if(e instanceof j){if(e.schema!=this)throw RangeError("Node type from different schema used ("+e.name+")")}else throw RangeError("Invalid node type: "+e);return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new C(n,n.defaultAttrs,e,c.setFrom(t))}mark(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return A.fromJSON(this,e)}markFromJSON(e){return c.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw RangeError("Unknown node type: "+e);return t}}function B(e,t){let n=[];for(let r=0;r<t.length;r++){let o=t[r],s=e.marks[o],a=s;if(s)n.push(s);else for(let t in e.marks){let r=e.marks[t];("_"==o||r.spec.group&&r.spec.group.split(" ").indexOf(o)>-1)&&n.push(a=r)}if(!a)throw SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}class H{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let n=this.matchedStyles=[];t.forEach(e=>{if(null!=e.tag)this.tags.push(e);else if(null!=e.style){let t=/[^=]*/.exec(e.style)[0];0>n.indexOf(t)&&n.push(t),this.styles.push(e)}}),this.normalizeLists=!this.tags.some(t=>{if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;let n=e.nodes[t.node];return n.contentMatch.matchType(n)})}parse(e,t={}){let n=new K(this,t,!1);return n.addAll(e,c.none,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new K(this,t,!0);return n.addAll(e,c.none,t.from,t.to),d.maxOpen(n.finish())}matchTag(e,t,n){for(let r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){let n=this.tags[r];if(function(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}(e,n.tag)&&(void 0===n.namespace||e.namespaceURI==n.namespace)&&(!n.context||t.matchesContext(n.context))){if(n.getAttrs){let t=n.getAttrs(e);if(!1===t)continue;n.attrs=t||void 0}return n}}}matchStyle(e,t,n,r){for(let o=r?this.styles.indexOf(r)+1:0;o<this.styles.length;o++){let r=this.styles[o],s=r.style;if(0==s.indexOf(e)&&(!r.context||n.matchesContext(r.context))&&(!(s.length>e.length)||61==s.charCodeAt(e.length)&&s.slice(e.length+1)==t)){if(r.getAttrs){let e=r.getAttrs(t);if(!1===e)continue;r.attrs=e||void 0}return r}}}static schemaRules(e){let t=[];function n(e){let n=null==e.priority?50:e.priority,r=0;for(;r<t.length;r++){let e=t[r];if((null==e.priority?50:e.priority)<n)break}t.splice(r,0,e)}for(let t in e.marks){let r=e.marks[t].spec.parseDOM;r&&r.forEach(e=>{n(e=Y(e)),!(e.mark||e.ignore||e.clearMark)&&(e.mark=t)})}for(let t in e.nodes){let r=e.nodes[t].spec.parseDOM;r&&r.forEach(e=>{n(e=Y(e)),!(e.node||e.ignore||e.mark)&&(e.node=t)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new H(e,H.schemaRules(e)))}}let U={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},V={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},q={ol:!0,ul:!0};function W(e,t,n){return null!=t?(t?1:0)|("full"===t?2:0):e&&"pre"==e.whitespace?3:-5&n}class G{constructor(e,t,n,r,o,s){this.type=e,this.attrs=t,this.marks=n,this.solid=r,this.options=s,this.content=[],this.activeMarks=c.none,this.match=o||(4&s?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(o.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let t=this.type.contentMatch,n;return(n=t.findWrapping(e.type))?(this.match=t,n):null}}return this.match.findWrapping(e.type)}finish(e){if(!(1&this.options)){let e=this.content[this.content.length-1],t;e&&e.isText&&(t=/[ \t\r\n\u000c]+$/.exec(e.text))&&(e.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=e.withText(e.text.slice(0,e.text.length-t[0].length)))}let t=o.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(o.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!U.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class K{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let r=t.topNode,o,s=W(null,t.preserveWhitespace,0)|(n?4:0);o=r?new G(r.type,r.attrs,c.none,!0,t.topMatch||r.type.contentMatch,s):n?new G(null,null,c.none,!0,null,s):new G(e.schema.topNodeType,null,c.none,!0,null,s),this.nodes=[o],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){3==e.nodeType?this.addTextNode(e,t):1==e.nodeType&&this.addElement(e,t)}addTextNode(e,t){let n=e.nodeValue,r=this.top,o=2&r.options?"full":this.localPreserveWS||(1&r.options)>0;if("full"===o||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(o)n="full"!==o?n.replace(/\r?\n|\r/g," "):n.replace(/\r\n?/g,"\n");else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let t=r.content[r.content.length-1],o=e.previousSibling;(!t||o&&"BR"==o.nodeName||t.isText&&/[ \t\r\n\u000c]$/.test(t.text))&&(n=n.slice(1))}n&&this.insertNode(this.parser.schema.text(n),t,!/\S/.test(n)),this.findInText(e)}else this.findInside(e)}addElement(e,t,n){let r=this.localPreserveWS,o=this.top;("PRE"==e.tagName||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let s=e.nodeName.toLowerCase(),a;q.hasOwnProperty(s)&&this.parser.normalizeLists&&function(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let e=1==t.nodeType?t.nodeName.toLowerCase():null;e&&q.hasOwnProperty(e)&&n?(n.appendChild(t),t=n):"li"==e?n=t:e&&(n=null)}}(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(a=this.parser.matchTag(e,this,n));n:if(l?l.ignore:V.hasOwnProperty(s))this.findInside(e),this.ignoreFallback(e,t);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let n,r=this.needsBlock;if(U.hasOwnProperty(s))o.content.length&&o.content[0].isInline&&this.open&&(this.open--,o=this.top),n=!0,!o.type&&(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break n}let a=l&&l.skip?t:this.readStyles(e,t);a&&this.addAll(e,a),n&&this.sync(o),this.needsBlock=r}else{let n=this.readStyles(e,t);n&&this.addElementByRule(e,l,n,!1===l.consuming?a:void 0)}this.localPreserveWS=r}leafFallback(e,t){"BR"==e.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode("\n"),t)}ignoreFallback(e,t){"BR"==e.nodeName&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),t,!0)}readStyles(e,t){let n=e.style;if(n&&n.length)for(let e=0;e<this.parser.matchedStyles.length;e++){let r=this.parser.matchedStyles[e],o=n.getPropertyValue(r);if(o)for(let e;;){let n=this.parser.matchStyle(r,o,this,e);if(!n)break;if(n.ignore)return null;if(t=n.clearMark?t.filter(e=>!n.clearMark(e)):t.concat(this.parser.schema.marks[n.mark].create(n.attrs)),!1===n.consuming)e=n;else break}}return t}addElementByRule(e,t,n,r){let o,s;if(t.node){if((s=this.parser.schema.nodes[t.node]).isLeaf)!this.insertNode(s.create(t.attrs),n,"BR"==e.nodeName)&&this.leafFallback(e,n);else{let e=this.enter(s,t.attrs||null,n,t.preserveWhitespace);e&&(o=!0,n=e)}}else{let e=this.parser.schema.marks[t.mark];n=n.concat(e.create(t.attrs))}let a=this.top;if(s&&s.isLeaf)this.findInside(e);else if(r)this.addElement(e,n,r);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(e=>this.insertNode(e,n,!1));else{let r=e;"string"==typeof t.contentElement?r=e.querySelector(t.contentElement):"function"==typeof t.contentElement?r=t.contentElement(e):t.contentElement&&(r=t.contentElement),this.findAround(e,r,!0),this.addAll(r,n),this.findAround(e,r,!1)}o&&this.sync(a)&&this.open--}addAll(e,t,n,r){let o=n||0;for(let s=n?e.childNodes[n]:e.firstChild,a=null==r?null:e.childNodes[r];s!=a;s=s.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(s,t);this.findAtPoint(e,o)}findPlace(e,t,n){let r,o;for(let t=this.open,s=0;t>=0;t--){let a=this.nodes[t],l=a.findWrapping(e);if(l&&(!r||r.length>l.length+s)&&(r=l,o=a,!l.length))break;if(a.solid){if(n)break;s+=2}}if(!r)return null;this.sync(o);for(let e=0;e<r.length;e++)t=this.enterInner(r[e],null,t,!1);return t}insertNode(e,t,n){if(e.isInline&&this.needsBlock&&!this.top.type){let e=this.textblockFromContext();e&&(t=this.enterInner(e,null,t))}let r=this.findPlace(e,t,n);if(r){this.closeExtra();let t=this.top;t.match&&(t.match=t.match.matchType(e.type));let n=c.none;for(let o of r.concat(e.marks))(t.type?t.type.allowsMarkType(o.type):Z(o.type,e.type))&&(n=o.addToSet(n));return t.content.push(e.mark(n)),!0}return!1}enter(e,t,n,r){let o=this.findPlace(e.create(t),n,!1);return o&&(o=this.enterInner(e,t,n,!0,r)),o}enterInner(e,t,n,r=!1,o){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(e);let a=W(e,o,s.options);4&s.options&&0==s.content.length&&(a|=4);let l=c.none;return n=n.filter(t=>(s.type?!s.type.allowsMarkType(t.type):!Z(t.type,e))||(l=t.addToSet(l),!1)),this.nodes.push(new G(e,t,l,r,null,a)),this.open++,n}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--){if(this.nodes[t]==e)return this.open=t,!0;this.localPreserveWS&&(this.nodes[t].options|=1)}return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let n=this.nodes[t].content;for(let t=n.length-1;t>=0;t--)e+=n[t].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)null==this.find[t].pos&&1==e.nodeType&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,n){if(e!=t&&this.find)for(let r=0;r<this.find.length;r++)null==this.find[r].pos&&1==e.nodeType&&e.contains(this.find[r].node)&&t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),n=this.options.context,r=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),o=-(n?n.depth+1:0)+(r?0:1),s=(e,a)=>{for(;e>=0;e--){let l=t[e];if(""==l){if(e==t.length-1||0==e)continue;for(;a>=o;a--)if(s(e-1,a))return!0;return!1}{let e=a>0||0==a&&r?this.nodes[a].type:n&&a>=o?n.node(a-o).type:null;if(!e||e.name!=l&&!e.isInGroup(l))return!1;a--}}return!0};return s(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let e in this.parser.schema.nodes){let t=this.parser.schema.nodes[e];if(t.isTextblock&&t.defaultAttrs)return t}}}function Y(e){let t={};for(let n in e)t[n]=e[n];return t}function Z(e,t){let n=t.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(e))continue;let s=[],a=e=>{s.push(e);for(let n=0;n<e.edgeCount;n++){let{type:r,next:o}=e.edge(n);if(r==t||0>s.indexOf(o)&&a(o))return!0}};if(a(o.contentMatch))return!0}}class J{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){!n&&(n=Q(t).createDocumentFragment());let r=n,o=[];return e.forEach(e=>{if(o.length||e.marks.length){let n=0,s=0;for(;n<o.length&&s<e.marks.length;){let t=e.marks[s];if(!this.marks[t.type.name]){s++;continue}if(!t.eq(o[n][0])||!1===t.type.spec.spanning)break;n++,s++}for(;n<o.length;)r=o.pop()[1];for(;s<e.marks.length;){let n=e.marks[s++],a=this.serializeMark(n,e.isInline,t);a&&(o.push([n,r]),r.appendChild(a.dom),r=a.contentDOM||a.dom)}}r.appendChild(this.serializeNodeInner(e,t))}),n}serializeNodeInner(e,t){let{dom:n,contentDOM:r}=et(Q(t),this.nodes[e.type.name](e),null,e.attrs);if(r){if(e.isLeaf)throw RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,r)}return n}serializeNode(e,t={}){let n=this.serializeNodeInner(e,t);for(let r=e.marks.length-1;r>=0;r--){let o=this.serializeMark(e.marks[r],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(n),n=o.dom)}return n}serializeMark(e,t,n={}){let r=this.marks[e.type.name];return r&&et(Q(n),r(e,t),null,e.attrs)}static renderSpec(e,t,n=null,r){return et(e,t,n,r)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new J(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=X(e.nodes);return!t.text&&(t.text=e=>e.text),t}static marksFromSchema(e){return X(e.marks)}}function X(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function Q(e){return e.document||window.document}let ee=new WeakMap;function et(e,t,n,r){var o;let s,a;if("string"==typeof t)return{dom:e.createTextNode(t)};if(null!=t.nodeType)return{dom:t};if(t.dom&&null!=t.dom.nodeType)return t;let l=t[0],c;if("string"!=typeof l)throw RangeError("Invalid array passed to renderSpec");if(r&&(o=r,void 0===(a=ee.get(o))&&ee.set(o,a=function(e){let t=null;return!function e(n){if(n&&"object"==typeof n){if(Array.isArray(n)){if("string"==typeof n[0])!t&&(t=[]),t.push(n);else for(let t=0;t<n.length;t++)e(n[t])}else for(let t in n)e(n[t])}}(e),t}(o)),c=a)&&c.indexOf(t)>-1)throw RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let u=l.indexOf(" ");u>0&&(n=l.slice(0,u),l=l.slice(u+1));let d=n?e.createElementNS(n,l):e.createElement(l),p=t[1],h=1;if(p&&"object"==typeof p&&null==p.nodeType&&!Array.isArray(p)){for(let e in h=2,p)if(null!=p[e]){let t=e.indexOf(" ");t>0?d.setAttributeNS(e.slice(0,t),e.slice(t+1),p[e]):d.setAttribute(e,p[e])}}for(let o=h;o<t.length;o++){let a=t[o];if(0===a){if(o<t.length-1||o>h)throw RangeError("Content hole must be the only child of its parent node");return{dom:d,contentDOM:d}}{let{dom:t,contentDOM:o}=et(e,a,n,r);if(d.appendChild(t),o){if(s)throw RangeError("Multiple content holes");s=o}}}return{dom:d,contentDOM:s}}},871738:function(e,t,n){"use strict";n.d(t,{Bs:function(){return d},C1:function(){return m},H$:function(){return _},Sy:function(){return C},Y1:function(){return a},qv:function(){return h},xm:function(){return l},yy:function(){return A}});var r=n(153737),o=n(240554);let s=Object.create(null);class a{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new l(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=r.p2.empty){let n=t.content.lastChild,o=null;for(let e=0;e<t.openEnd;e++)o=n,n=n.lastChild;let s=e.steps.length,a=this.ranges;for(let l=0;l<a.length;l++){let{$from:c,$to:u}=a[l],d=e.mapping.slice(s);e.replaceRange(d.map(c.pos),d.map(u.pos),l?r.p2.empty:t),0==l&&b(e,s,(n?n.isInline:o&&o.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,r=this.ranges;for(let o=0;o<r.length;o++){let{$from:s,$to:a}=r[o],l=e.mapping.slice(n),c=l.map(s.pos),u=l.map(a.pos);o?e.deleteRange(c,u):(e.replaceRangeWith(c,u,t),b(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let r=e.parent.inlineContent?new d(e):v(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(let r=e.depth-1;r>=0;r--){let o=t<0?v(e.node(0),e.node(r),e.before(r+1),e.index(r),t,n):v(e.node(0),e.node(r),e.after(r+1),e.index(r)+1,t,n);if(o)return o}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new m(e.node(0))}static atStart(e){return v(e,e,0,0,1)||new m(e)}static atEnd(e){return v(e,e,e.content.size,e.childCount,-1)||new m(e)}static fromJSON(e,t){if(!t||!t.type)throw RangeError("Invalid input for Selection.fromJSON");let n=s[t.type];if(!n)throw RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in s)throw RangeError("Duplicate use of selection JSON ID "+e);return s[e]=t,t.prototype.jsonID=e,t}getBookmark(){return d.between(this.$anchor,this.$head).getBookmark()}}a.prototype.visible=!0;class l{constructor(e,t){this.$from=e,this.$to=t}}let c=!1;function u(e){!c&&!e.parent.inlineContent&&(c=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class d extends a{constructor(e,t=e){u(e),u(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let n=e.resolve(t.map(this.head));if(!n.parent.inlineContent)return a.near(n);let r=e.resolve(t.map(this.anchor));return new d(r.parent.inlineContent?r:n,n)}replace(e,t=r.p2.empty){if(super.replace(e,t),t==r.p2.empty){let t=this.$from.marksAcross(this.$to);t&&e.ensureMarks(t)}}eq(e){return e instanceof d&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new p(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if("number"!=typeof t.anchor||"number"!=typeof t.head)throw RangeError("Invalid input for TextSelection.fromJSON");return new d(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){let r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}static between(e,t,n){let r=e.pos-t.pos;if((!n||r)&&(n=r>=0?1:-1),!t.parent.inlineContent){let e=a.findFrom(t,n,!0)||a.findFrom(t,-n,!0);if(!e)return a.near(t,n);t=e.$head}return!e.parent.inlineContent&&(0==r?e=t:(e=(a.findFrom(e,-n,!0)||a.findFrom(e,n,!0)).$anchor).pos<t.pos!=r<0&&(e=t)),new d(e,t)}}a.jsonID("text",d);class p{constructor(e,t){this.anchor=e,this.head=t}map(e){return new p(e.map(this.anchor),e.map(this.head))}resolve(e){return d.between(e.resolve(this.anchor),e.resolve(this.head))}}class h extends a{constructor(e){let t=e.nodeAfter;super(e,e.node(0).resolve(e.pos+t.nodeSize)),this.node=t}map(e,t){let{deleted:n,pos:r}=t.mapResult(this.anchor),o=e.resolve(r);return n?a.near(o):new h(o)}content(){return new r.p2(r.HY.from(this.node),0,0)}eq(e){return e instanceof h&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new f(this.anchor)}static fromJSON(e,t){if("number"!=typeof t.anchor)throw RangeError("Invalid input for NodeSelection.fromJSON");return new h(e.resolve(t.anchor))}static create(e,t){return new h(e.resolve(t))}static isSelectable(e){return!e.isText&&!1!==e.type.spec.selectable}}h.prototype.visible=!1,a.jsonID("node",h);class f{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:n}=e.mapResult(this.anchor);return t?new p(n,n):new f(n)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&h.isSelectable(n)?new h(t):a.near(t)}}class m extends a{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=r.p2.empty){if(t==r.p2.empty){e.delete(0,e.doc.content.size);let t=a.atStart(e.doc);!t.eq(e.selection)&&e.setSelection(t)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new m(e)}map(e){return new m(e)}eq(e){return e instanceof m}getBookmark(){return g}}a.jsonID("all",m);let g={map(){return this},resolve:e=>new m(e)};function v(e,t,n,r,o,s=!1){if(t.inlineContent)return d.create(e,n);for(let a=r-(o>0?0:1);o>0?a<t.childCount:a>=0;a+=o){let r=t.child(a);if(r.isAtom){if(!s&&h.isSelectable(r))return h.create(e,n-(o<0?r.nodeSize:0))}else{let t=v(e,r,n+o,o<0?r.childCount:0,o,s);if(t)return t}n+=r.nodeSize*o}return null}function b(e,t,n){let r,s=e.steps.length-1;if(s<t)return;let l=e.steps[s];if(!!(l instanceof o.Pu||l instanceof o.FC))e.mapping.maps[s].forEach((e,t,n,o)=>{null==r&&(r=o)}),e.setSelection(a.near(e.doc.resolve(r),n))}class y extends o.wx{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(1|this.updated)&-3,this.storedMarks=null,this}get selectionSet(){return(1&this.updated)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=2,this}ensureMarks(e){return!r.vc.sameSet(this.storedMarks||this.selection.$from.marks(),e)&&this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(e,t){super.addStep(e,t),this.updated=-3&this.updated,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let n=this.selection;return t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||r.vc.none))),n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,n){let r=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();{if(null==n&&(n=t),n=null==n?t:n,!e)return this.deleteRange(t,n);let o=this.storedMarks;if(!o){let e=this.doc.resolve(t);o=n==t?e.marks():e.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,o)),!this.selection.empty&&this.setSelection(a.near(this.selection.$to)),this}}setMeta(e,t){return this.meta["string"==typeof e?e:e.key]=t,this}getMeta(e){return this.meta["string"==typeof e?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=4,this}get scrolledIntoView(){return(4&this.updated)>0}}function x(e,t){return t&&e?e.bind(t):e}class w{constructor(e,t,n){this.name=e,this.init=x(t.init,n),this.apply=x(t.apply,n)}}let S=[new w("doc",{init:e=>e.doc||e.schema.topNodeType.createAndFill(),apply:e=>e.doc}),new w("selection",{init:(e,t)=>e.selection||a.atStart(t.doc),apply:e=>e.selection}),new w("storedMarks",{init:e=>e.storedMarks||null,apply:(e,t,n,r)=>r.selection.$cursor?e.storedMarks:null}),new w("scrollToSelection",{init:()=>0,apply:(e,t)=>e.scrolledIntoView?t+1:t})];class k{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=S.slice(),t&&t.forEach(e=>{if(this.pluginsByKey[e.key])throw RangeError("Adding different instances of a keyed plugin ("+e.key+")");this.plugins.push(e),this.pluginsByKey[e.key]=e,e.spec.state&&this.fields.push(new w(e.key,e.spec.state,e))})}}class A{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=t){let t=this.config.plugins[n];if(t.spec.filterTransaction&&!t.spec.filterTransaction.call(t,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],n=this.applyInner(e),r=null;for(;;){let o=!1;for(let s=0;s<this.config.plugins.length;s++){let a=this.config.plugins[s];if(a.spec.appendTransaction){let l=r?r[s].n:0,c=r?r[s].state:this,u=l<t.length&&a.spec.appendTransaction.call(a,l?t.slice(l):t,c,n);if(u&&n.filterTransaction(u,s)){if(u.setMeta("appendedTransaction",e),!r){r=[];for(let e=0;e<this.config.plugins.length;e++)r.push(e<s?{state:n,n:t.length}:{state:this,n:0})}t.push(u),n=n.applyInner(u),o=!0}r&&(r[s]={state:n,n:t.length})}}if(!o)return{state:n,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw RangeError("Applying a mismatched transaction");let t=new A(this.config),n=this.config.fields;for(let r=0;r<n.length;r++){let o=n[r];t[o.name]=o.apply(e,this[o.name],this,t)}return t}get tr(){return new y(this)}static create(e){let t=new k(e.doc?e.doc.type.schema:e.schema,e.plugins),n=new A(t);for(let r=0;r<t.fields.length;r++)n[t.fields[r].name]=t.fields[r].init(e,n);return n}reconfigure(e){let t=new k(this.schema,e.plugins),n=t.fields,r=new A(t);for(let t=0;t<n.length;t++){let o=n[t].name;r[o]=this.hasOwnProperty(o)?this[o]:n[t].init(e,r)}return r}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map(e=>e.toJSON())),e&&"object"==typeof e)for(let n in e){if("doc"==n||"selection"==n)throw RangeError("The JSON fields `doc` and `selection` are reserved");let r=e[n],o=r.spec.state;o&&o.toJSON&&(t[n]=o.toJSON.call(r,this[r.key]))}return t}static fromJSON(e,t,n){if(!t)throw RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw RangeError("Required config field 'schema' missing");let o=new k(e.schema,e.plugins),s=new A(o);return o.fields.forEach(o=>{if("doc"==o.name)s.doc=r.NB.fromJSON(e.schema,t.doc);else if("selection"==o.name)s.selection=a.fromJSON(s.doc,t.selection);else if("storedMarks"==o.name)t.storedMarks&&(s.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(n)for(let r in n){let a=n[r],l=a.spec.state;if(a.key==o.name&&l&&l.fromJSON&&Object.prototype.hasOwnProperty.call(t,r)){s[o.name]=l.fromJSON.call(a,e,t[r],s);return}}s[o.name]=o.init(e,s)}}),s}}class C{constructor(e){this.spec=e,this.props={},e.props&&!function e(t,n,r){for(let o in t){let s=t[o];s instanceof Function?s=s.bind(n):"handleDOMEvents"==o&&(s=e(s,n,{})),r[o]=s}return r}(e.props,this,this.props),this.key=e.key?e.key.key:T("plugin")}getState(e){return e[this.key]}}let E=Object.create(null);function T(e){return e in E?e+"$"+ ++E[e]:(E[e]=0,e+"$")}class _{constructor(e="key"){this.key=T(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}},240554:function(e,t,n){"use strict";n.d(t,{Ax:function(){return E},FC:function(){return b},GJ:function(){return O},Mn:function(){return T},Pu:function(){return v},dR:function(){return I},k9:function(){return w},nd:function(){return S},nj:function(){return M},vs:function(){return l},wx:function(){return H}});var r=n(153737);function o(e){return 65535&e}class s{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}}class a{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&a.empty)return a.empty}recover(e){var t;let n=0,r=65535&e;if(!this.inverted)for(let e=0;e<r;e++)n+=this.ranges[3*e+2]-this.ranges[3*e+1];return this.ranges[3*r]+n+((t=e)-(65535&t))/65536}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,n){let r=0,o=this.inverted?2:1,a=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let c=this.ranges[l]-(this.inverted?r:0);if(c>e)break;let u=this.ranges[l+o],d=this.ranges[l+a],p=c+u;if(e<=p){let o=u?e==c?-1:e==p?1:t:t,a=c+r+(o<0?0:d);if(n)return a;let h=e==(t<0?c:p)?null:l/3+(e-c)*65536,f=e==c?2:e==p?1:4;return(t<0?e!=c:e!=p)&&(f|=8),new s(a,f,h)}r+=d-u}return n?e+r:new s(e+r,0,null)}touches(e,t){let n=0,r=65535&t,o=this.inverted?2:1,s=this.inverted?1:2;for(let t=0;t<this.ranges.length;t+=3){let a=this.ranges[t]-(this.inverted?n:0);if(a>e)break;let l=this.ranges[t+o];if(e<=a+l&&t==3*r)return!0;n+=this.ranges[t+s]-l}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,o=0;r<this.ranges.length;r+=3){let s=this.ranges[r],a=s-(this.inverted?o:0),l=s+(this.inverted?0:o),c=this.ranges[r+t],u=this.ranges[r+n];e(a,a+c,l,l+u),o+=u-c}}invert(){return new a(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return 0==e?a.empty:new a(e<0?[0,-e,0]:[0,0,e])}}a.empty=new a([]);class l{constructor(e,t,n=0,r=e?e.length:0){this.mirror=t,this.from=n,this.to=r,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new l(this._maps,this.mirror,e,t)}appendMap(e,t){!this.ownData&&(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),null!=t&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,n=this._maps.length;t<e._maps.length;t++){let r=e.getMirror(t);this.appendMap(e._maps[t],null!=r&&r<t?n+r:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){!this.mirror&&(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,n=this._maps.length+e._maps.length;t>=0;t--){let r=e.getMirror(t);this.appendMap(e._maps[t].invert(),null!=r&&r>t?n-r-1:void 0)}}invert(){let e=new l;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let n=this.from;n<this.to;n++)e=this._maps[n].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,n){let r=0;for(let n=this.from;n<this.to;n++){let o=this._maps[n].mapResult(e,t);if(null!=o.recover){let t=this.getMirror(n);if(null!=t&&t>n&&t<this.to){n=t,e=this._maps[t].recover(o.recover);continue}}r|=o.delInfo,e=o.pos}return n?e:new s(e,r,null)}}let c=Object.create(null);class u{getMap(){return a.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw RangeError("Invalid input for Step.fromJSON");let n=c[t.stepType];if(!n)throw RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in c)throw RangeError("Duplicate use of step JSON ID "+e);return c[e]=t,t.prototype.jsonID=e,t}}class d{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new d(e,null)}static fail(e){return new d(null,e)}static fromReplace(e,t,n,o){try{return d.ok(e.replace(t,n,o))}catch(e){if(e instanceof r.e4)return d.fail(e.message);throw e}}}function p(e,t,n){let o=[];for(let r=0;r<e.childCount;r++){let s=e.child(r);s.content.size&&(s=s.copy(p(s.content,t,s))),s.isInline&&(s=t(s,n,r)),o.push(s)}return r.HY.fromArray(o)}class h extends u{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),o=n.node(n.sharedDepth(this.to)),s=new r.p2(p(t.content,(e,t)=>e.isAtom&&t.type.allowsMarkType(this.mark.type)?e.mark(this.mark.addToSet(e.marks)):e,o),t.openStart,t.openEnd);return d.fromReplace(e,this.from,this.to,s)}invert(){return new f(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new h(t.pos,n.pos,this.mark)}merge(e){return e instanceof h&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new h(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw RangeError("Invalid input for AddMarkStep.fromJSON");return new h(t.from,t.to,e.markFromJSON(t.mark))}}u.jsonID("addMark",h);class f extends u{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=new r.p2(p(t.content,e=>e.mark(this.mark.removeFromSet(e.marks)),e),t.openStart,t.openEnd);return d.fromReplace(e,this.from,this.to,n)}invert(){return new h(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new f(t.pos,n.pos,this.mark)}merge(e){return e instanceof f&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new f(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw RangeError("Invalid input for RemoveMarkStep.fromJSON");return new f(t.from,t.to,e.markFromJSON(t.mark))}}u.jsonID("removeMark",f);class m extends u{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return d.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return d.fromReplace(e,this.pos,this.pos+1,new r.p2(r.HY.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let e=this.mark.addToSet(t.marks);if(e.length==t.marks.length){for(let n=0;n<t.marks.length;n++)if(!t.marks[n].isInSet(e))return new m(this.pos,t.marks[n]);return new m(this.pos,this.mark)}}return new g(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new m(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if("number"!=typeof t.pos)throw RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new m(t.pos,e.markFromJSON(t.mark))}}u.jsonID("addNodeMark",m);class g extends u{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return d.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return d.fromReplace(e,this.pos,this.pos+1,new r.p2(r.HY.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return t&&this.mark.isInSet(t.marks)?new m(this.pos,this.mark):this}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new g(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if("number"!=typeof t.pos)throw RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new g(t.pos,e.markFromJSON(t.mark))}}u.jsonID("removeNodeMark",g);class v extends u{constructor(e,t,n,r=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=r}apply(e){return this.structure&&y(e,this.from,this.to)?d.fail("Structure replace would overwrite content"):d.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new a([this.from,this.to-this.from,this.slice.size])}invert(e){return new v(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deletedAcross&&n.deletedAcross?null:new v(t.pos,Math.max(t.pos,n.pos),this.slice,this.structure)}merge(e){if(!(e instanceof v)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart){if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;else{let t=this.slice.size+e.slice.size==0?r.p2.empty:new r.p2(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new v(e.from,this.to,t,this.structure)}}{let t=this.slice.size+e.slice.size==0?r.p2.empty:new r.p2(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new v(this.from,this.to+(e.to-e.from),t,this.structure)}}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw RangeError("Invalid input for ReplaceStep.fromJSON");return new v(t.from,t.to,r.p2.fromJSON(e,t.slice),!!t.structure)}}u.jsonID("replace",v);class b extends u{constructor(e,t,n,r,o,s,a=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=r,this.slice=o,this.insert=s,this.structure=a}apply(e){if(this.structure&&(y(e,this.from,this.gapFrom)||y(e,this.gapTo,this.to)))return d.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return d.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,t.content);return n?d.fromReplace(e,this.from,this.to,n):d.fail("Content does not fit in gap")}getMap(){return new a([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new b(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1),r=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),o=this.to==this.gapTo?n.pos:e.map(this.gapTo,1);return t.deletedAcross&&n.deletedAcross||r<t.pos||o>n.pos?null:new b(t.pos,n.pos,r,o,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to||"number"!=typeof t.gapFrom||"number"!=typeof t.gapTo||"number"!=typeof t.insert)throw RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new b(t.from,t.to,t.gapFrom,t.gapTo,r.p2.fromJSON(e,t.slice),t.insert,!!t.structure)}}function y(e,t,n){let r=e.resolve(t),o=n-t,s=r.depth;for(;o>0&&s>0&&r.indexAfter(s)==r.node(s).childCount;)s--,o--;if(o>0){let e=r.node(s).maybeChild(r.indexAfter(s));for(;o>0;){if(!e||e.isLeaf)return!0;e=e.firstChild,o--}}return!1}u.jsonID("replaceAround",b);function x(e,t,n,o=n.contentMatch,s=!0){let a=e.doc.nodeAt(t),l=[],c=t+1;for(let t=0;t<a.childCount;t++){let u=a.child(t),d=c+u.nodeSize,p=o.matchType(u.type);if(p){o=p;for(let t=0;t<u.marks.length;t++)!n.allowsMarkType(u.marks[t].type)&&e.step(new f(c,d,u.marks[t]));if(s&&u.isText&&"pre"!=n.whitespace){let e,t=/\r?\n|\r/g,o;for(;e=t.exec(u.text);)!o&&(o=new r.p2(r.HY.from(n.schema.text(" ",n.allowedMarks(u.marks))),0,0)),l.push(new v(c+e.index,c+e.index+e[0].length,o))}}else l.push(new v(c,d,r.p2.empty));c=d}if(!o.validEnd){let t=o.fillBefore(r.HY.empty,!0);e.replace(c,c,new r.p2(t,0,0))}for(let t=l.length-1;t>=0;t--)e.step(l[t])}function w(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let s=e.depth;;--s){var n,r,o;let a=e.$from.node(s),l=e.$from.index(s),c=e.$to.indexAfter(s);if(s<e.depth&&a.canReplace(l,c,t))return s;if(0==s||a.type.spec.isolating||(n=a,r=l,o=c,!((0==r||n.canReplace(r,n.childCount))&&(o==n.childCount||n.canReplace(0,o)))))break}return null}function S(e,t,n=null,r=e){let o=function(e,t){let{parent:n,startIndex:r,endIndex:o}=e,s=n.contentMatchAt(r).findWrapping(t);if(!s)return null;let a=s.length?s[0]:t;return n.canReplaceWith(r,o,a)?s:null}(e,t),s=o&&function(e,t){let{parent:n,startIndex:r,endIndex:o}=e,s=n.child(r),a=t.contentMatch.findWrapping(s.type);if(!a)return null;let l=(a.length?a[a.length-1]:t).contentMatch;for(let e=r;l&&e<o;e++)l=l.matchType(n.child(e).type);return l&&l.validEnd?a:null}(r,t);return s?o.map(k).concat({type:t,attrs:n}).concat(s.map(k)):null}function k(e){return{type:e,attrs:null}}function A(e,t,n,r){t.forEach((o,s)=>{if(o.isText){let a,l=/\r?\n|\r/g;for(;a=l.exec(o.text);){let o=e.mapping.slice(r).map(n+1+s+a.index);e.replaceWith(o,o+1,t.type.schema.linebreakReplacement.create())}}})}function C(e,t,n,r){t.forEach((o,s)=>{if(o.type==o.type.schema.linebreakReplacement){let o=e.mapping.slice(r).map(n+1+s);e.replaceWith(o,o+1,t.type.schema.text("\n"))}})}function E(e,t,n=1,r){let o=e.resolve(t),s=o.depth-n,a=r&&r[r.length-1]||o.parent;if(s<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!a.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let e=o.depth-1,t=n-2;e>s;e--,t--){let n=o.node(e),s=o.index(e);if(n.type.spec.isolating)return!1;let a=n.content.cutByIndex(s,n.childCount),l=r&&r[t+1];l&&(a=a.replaceChild(0,l.type.create(l.attrs)));let c=r&&r[t]||n;if(!n.canReplace(s+1,n.childCount)||!c.type.validContent(a))return!1}let l=o.indexAfter(s),c=r&&r[0];return o.node(s).canReplaceWith(l,l,c?c.type:o.node(s+1).type)}function T(e,t){let n=e.resolve(t),r=n.index();return _(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function _(e,t){return!!(e&&t&&!e.isLeaf&&function(e,t){!t.content.size&&e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:r}=e.type.schema;for(let o=0;o<t.childCount;o++){let s=t.child(o),a=s.type==r?e.type.schema.nodes.text:s.type;if(!(n=n.matchType(a))||!e.type.allowsMarks(s.marks))return!1}return n.validEnd}(e,t))}function O(e,t,n=-1){let r=e.resolve(t);for(let e=r.depth;;e--){let o,s,a=r.index(e);if(e==r.depth?(o=r.nodeBefore,s=r.nodeAfter):n>0?(o=r.node(e+1),a++,s=r.node(e).maybeChild(a)):(o=r.node(e).maybeChild(a-1),s=r.node(e+1)),o&&!o.isTextblock&&_(o,s)&&r.node(e).canReplace(a,a+1))return t;if(0==e)break;t=n<0?r.before(e):r.after(e)}}function M(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let o=n.content;for(let e=0;e<n.openStart;e++)o=o.firstChild.content;for(let e=1;e<=(0==n.openStart&&n.size?2:1);e++)for(let t=r.depth;t>=0;t--){let n=t==r.depth?0:r.pos<=(r.start(t+1)+r.end(t+1))/2?-1:1,s=r.index(t)+(n>0?1:0),a=r.node(t),l=!1;if(1==e)l=a.canReplace(s,s,o);else{let e=a.contentMatchAt(s).findWrapping(o.firstChild.type);l=e&&a.canReplaceWith(s,s,e[0])}if(l)return 0==n?r.pos:n<0?r.before(t+1):r.after(t+1)}return null}function I(e,t,n=t,o=r.p2.empty){if(t==n&&!o.size)return null;let s=e.resolve(t),a=e.resolve(n);return P(s,a,o)?new v(t,n,o):new D(s,a,o).fit()}function P(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}class D{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=r.HY.empty;for(let t=0;t<=e.depth;t++){let n=e.node(t);this.frontier.push({type:n.type,match:n.contentMatchAt(e.indexAfter(t))})}for(let t=e.depth;t>0;t--)this.placed=r.HY.from(e.node(t).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,n=this.$from,o=this.close(e<0?this.$to:n.doc.resolve(e));if(!o)return null;let s=this.placed,a=n.depth,l=o.depth;for(;a&&l&&1==s.childCount;)s=s.firstChild.content,a--,l--;let c=new r.p2(s,a,l);return e>-1?new b(n.pos,e,this.$to.pos,this.$to.end(),c,t):c.size||n.pos!=this.$to.pos?new v(n.pos,o.pos,c):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,n=0,r=this.unplaced.openEnd;n<e;n++){let o=t.firstChild;if(t.childCount>1&&(r=0),o.type.spec.isolating&&r<=n){e=n;break}t=o.content}for(let t=1;t<=2;t++)for(let n=1==t?e:this.unplaced.openStart;n>=0;n--){let e,o=null,s=(e=n?(o=L(this.unplaced.content,n-1).firstChild).content:this.unplaced.content).firstChild;for(let e=this.depth;e>=0;e--){let{type:a,match:l}=this.frontier[e],c,u=null;if(1==t&&(s?l.matchType(s.type)||(u=l.fillBefore(r.HY.from(s),!1)):o&&a.compatibleContent(o.type)))return{sliceDepth:n,frontierDepth:e,parent:o,inject:u};if(2==t&&s&&(c=l.findWrapping(s.type)))return{sliceDepth:n,frontierDepth:e,parent:o,wrap:c};if(o&&l.matchType(o.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced,o=L(e,t);return!!o.childCount&&!o.firstChild.isLeaf&&(this.unplaced=new r.p2(e,t+1,Math.max(n,o.size+t>=e.size-n?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,o=L(e,t);if(o.childCount<=1&&t>0){let s=e.size-t<=t+o.size;this.unplaced=new r.p2(N(e,t-1,1),t-1,s?t-1:n)}else this.unplaced=new r.p2(N(e,t,1),t,n)}placeNodes({sliceDepth:e,frontierDepth:t,parent:n,inject:o,wrap:s}){for(;this.depth>t;)this.closeFrontierNode();if(s)for(let e=0;e<s.length;e++)this.openFrontierNode(s[e]);let a=this.unplaced,l=n?n.content:a.content,c=a.openStart-e,u=0,d=[],{match:p,type:h}=this.frontier[t];if(o){for(let e=0;e<o.childCount;e++)d.push(o.child(e));p=p.matchFragment(o)}let f=l.size+e-(a.content.size-a.openEnd);for(;u<l.childCount;){let e=l.child(u),t=p.matchType(e.type);if(!t)break;(++u>1||0==c||e.content.size)&&(p=t,d.push(function e(t,n,o){if(n<=0)return t;let s=t.content;return n>1&&(s=s.replaceChild(0,e(s.firstChild,n-1,1==s.childCount?o-1:0))),n>0&&(s=t.type.contentMatch.fillBefore(s).append(s),o<=0&&(s=s.append(t.type.contentMatch.matchFragment(s).fillBefore(r.HY.empty,!0)))),t.copy(s)}(e.mark(h.allowedMarks(e.marks)),1==u?c:0,u==l.childCount?f:-1)))}let m=u==l.childCount;!m&&(f=-1),this.placed=R(this.placed,t,r.HY.from(d)),this.frontier[t].match=p,m&&f<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let e=0,t=l;e<f;e++){let e=t.lastChild;this.frontier.push({type:e.type,match:e.contentMatchAt(e.childCount)}),t=e.content}this.unplaced=m?0==e?r.p2.empty:new r.p2(N(a.content,e-1,1),e-1,f<0?a.openEnd:e-1):new r.p2(N(a.content,e,u),a.openStart,a.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return -1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!j(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return -1;let{depth:n}=this.$to,r=this.$to.after(n);for(;n>1&&r==this.$to.end(--n);)++r;return r}findCloseLevel(e){r:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:n,type:r}=this.frontier[t],o=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),s=j(e,t,r,n,o);if(s){for(let n=t-1;n>=0;n--){let{match:t,type:r}=this.frontier[n],o=j(e,n,r,t,!0);if(!o||o.childCount)continue r}return{depth:t,fit:s,move:o?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=R(this.placed,t.depth,t.fit)),e=t.move;for(let n=t.depth+1;n<=e.depth;n++){let t=e.node(n),r=t.type.contentMatch.fillBefore(t.content,!0,e.index(n));this.openFrontierNode(t.type,t.attrs,r)}return e}openFrontierNode(e,t=null,n){let o=this.frontier[this.depth];o.match=o.match.matchType(e),this.placed=R(this.placed,this.depth,r.HY.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(r.HY.empty,!0);e.childCount&&(this.placed=R(this.placed,this.frontier.length,e))}}function N(e,t,n){return 0==t?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(N(e.firstChild.content,t-1,n)))}function R(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(R(e.lastChild.content,t-1,n)))}function L(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function j(e,t,n,r,o){let s=e.node(t),a=o?e.indexAfter(t):e.index(t);if(a==s.childCount&&!n.compatibleContent(s.type))return null;let l=r.fillBefore(s.content,!0,a);return l&&!function(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}(n,s.content,a)?l:null}function $(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let o=r;o>=0;o--){let r=e.start(o);if(r<e.pos-(e.depth-o)||t.end(o)>t.pos+(t.depth-o)||e.node(o).type.spec.isolating||t.node(o).type.spec.isolating)break;(r==t.start(o)||o==e.depth&&o==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&o&&t.start(o-1)==r-1)&&n.push(o)}return n}class F extends u{constructor(e,t,n){super(),this.pos=e,this.attr=t,this.value=n}apply(e){let t=e.nodeAt(this.pos);if(!t)return d.fail("No node at attribute step's position");let n=Object.create(null);for(let e in t.attrs)n[e]=t.attrs[e];n[this.attr]=this.value;let o=t.type.create(n,null,t.marks);return d.fromReplace(e,this.pos,this.pos+1,new r.p2(r.HY.from(o),0,t.isLeaf?0:1))}getMap(){return a.empty}invert(e){return new F(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new F(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if("number"!=typeof t.pos||"string"!=typeof t.attr)throw RangeError("Invalid input for AttrStep.fromJSON");return new F(t.pos,t.attr,t.value)}}u.jsonID("attr",F);class z extends u{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let n in e.attrs)t[n]=e.attrs[n];t[this.attr]=this.value;let n=e.type.create(t,e.content,e.marks);return d.ok(n)}getMap(){return a.empty}invert(e){return new z(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if("string"!=typeof t.attr)throw RangeError("Invalid input for DocAttrStep.fromJSON");return new z(t.attr,t.value)}}u.jsonID("docAttr",z);let B=class extends Error{};(B=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n}).prototype=Object.create(Error.prototype),B.prototype.constructor=B,B.prototype.name="TransformError";class H{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new l}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new B(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return!t.failed&&this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,n=r.p2.empty){let o=I(this.doc,e,t,n);return o&&this.step(o),this}replaceWith(e,t,n){return this.replace(e,t,new r.p2(r.HY.from(n),0,0))}delete(e,t){return this.replace(e,t,r.p2.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,n){return!function(e,t,n,o){if(!o.size)return e.deleteRange(t,n);let s=e.doc.resolve(t),a=e.doc.resolve(n);if(P(s,a,o))return e.step(new v(t,n,o));let l=$(s,e.doc.resolve(n));0==l[l.length-1]&&l.pop();let c=-(s.depth+1);l.unshift(c);for(let e=s.depth,t=s.pos-1;e>0;e--,t--){let n=s.node(e).type.spec;if(n.defining||n.definingAsContext||n.isolating)break;l.indexOf(e)>-1?c=e:s.before(e)==t&&l.splice(1,0,-e)}let u=l.indexOf(c),d=[],p=o.openStart;for(let e=o.content,t=0;;t++){let n=e.firstChild;if(d.push(n),t==o.openStart)break;e=n.content}for(let e=p-1;e>=0;e--){var h;let t=d[e],n=(h=t.type).spec.defining||h.spec.definingForContent;if(n&&!t.sameMarkup(s.node(Math.abs(c)-1)))p=e;else if(n||!t.type.isTextblock)break}for(let t=o.openStart;t>=0;t--){let c=(t+p+1)%(o.openStart+1),h=d[c];if(h)for(let t=0;t<l.length;t++){let d=l[(t+u)%l.length],p=!0;d<0&&(p=!1,d=-d);let f=s.node(d-1),m=s.index(d-1);if(f.canReplaceWith(m,m,h.type,h.marks))return e.replace(s.before(d),p?a.after(d):n,new r.p2(function e(t,n,o,s,a){if(n<o){let r=t.firstChild;t=t.replaceChild(0,r.copy(e(r.content,n+1,o,s,r)))}if(n>s){let e=a.contentMatchAt(0),n=e.fillBefore(t).append(t);t=n.append(e.matchFragment(n).fillBefore(r.HY.empty,!0))}return t}(o.content,0,o.openStart,c),c,o.openEnd))}}let f=e.steps.length;for(let r=l.length-1;r>=0&&(e.replace(t,n,o),!(e.steps.length>f));r--){;let e=l[r];!(e<0)&&(t=s.before(e),n=a.after(e))}}(this,e,t,n),this}replaceRangeWith(e,t,n){return!function(e,t,n,o){if(!o.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let r=function(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(0==r.parentOffset)for(let e=r.depth-1;e>=0;e--){let t=r.index(e);if(r.node(e).canReplaceWith(t,t,n))return r.before(e+1);if(t>0)return null}if(r.parentOffset==r.parent.content.size)for(let e=r.depth-1;e>=0;e--){let t=r.indexAfter(e);if(r.node(e).canReplaceWith(t,t,n))return r.after(e+1);if(t<r.node(e).childCount)break}return null}(e.doc,t,o.type);null!=r&&(t=n=r)}e.replaceRange(t,n,new r.p2(r.HY.from(o),0,0))}(this,e,t,n),this}deleteRange(e,t){return!function(e,t,n){let r=e.doc.resolve(t),o=e.doc.resolve(n),s=$(r,o);for(let t=0;t<s.length;t++){let n=s[t],a=t==s.length-1;if(a&&0==n||r.node(n).type.contentMatch.validEnd)return e.delete(r.start(n),o.end(n));if(n>0&&(a||r.node(n-1).canReplace(r.index(n-1),o.indexAfter(n-1))))return e.delete(r.before(n),o.after(n))}for(let s=1;s<=r.depth&&s<=o.depth;s++)if(t-r.start(s)==r.depth-s&&n>r.end(s)&&o.end(s)-n!=o.depth-s&&r.start(s-1)==o.start(s-1)&&r.node(s-1).canReplace(r.index(s-1),o.index(s-1)))return e.delete(r.before(s),n);e.delete(t,n)}(this,e,t),this}lift(e,t){return!function(e,t,n){let{$from:o,$to:s,depth:a}=t,l=o.before(a+1),c=s.after(a+1),u=l,d=c,p=r.HY.empty,h=0;for(let e=a,t=!1;e>n;e--)t||o.index(e)>0?(t=!0,p=r.HY.from(o.node(e).copy(p)),h++):u--;let f=r.HY.empty,m=0;for(let e=a,t=!1;e>n;e--)t||s.after(e+1)<s.end(e)?(t=!0,f=r.HY.from(s.node(e).copy(f)),m++):d++;e.step(new b(u,d,l,c,new r.p2(p.append(f),h,m),p.size-h,!0))}(this,e,t),this}join(e,t=1){return!function(e,t,n){let o=null,{linebreakReplacement:s}=e.doc.type.schema,a=e.doc.resolve(t-n),l=a.node().type;if(s&&l.inlineContent){let e="pre"==l.whitespace,t=!!l.contentMatch.matchType(s);e&&!t?o=!1:!e&&t&&(o=!0)}let c=e.steps.length;if(!1===o){let r=e.doc.resolve(t+n);C(e,r.node(),r.before(),c)}l.inlineContent&&x(e,t+n-1,l,a.node().contentMatchAt(a.index()),null==o);let u=e.mapping.slice(c),d=u.map(t-n);if(e.step(new v(d,u.map(t+n,-1),r.p2.empty,!0)),!0===o){let t=e.doc.resolve(d);A(e,t.node(),t.before(),e.steps.length)};}(this,e,t),this}wrap(e,t){return!function(e,t,n){let o=r.HY.empty;for(let e=n.length-1;e>=0;e--){if(o.size){let t=n[e].type.contentMatch.matchFragment(o);if(!t||!t.validEnd)throw RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}o=r.HY.from(n[e].type.create(n[e].attrs,o))}let s=t.start,a=t.end;e.step(new b(s,a,s,a,new r.p2(o,0,0),n.length,!0))}(this,e,t),this}setBlockType(e,t=e,n,o=null){return!function(e,t,n,o,s){if(!o.isTextblock)throw RangeError("Type given to setBlockType should be a textblock");let a=e.steps.length;e.doc.nodesBetween(t,n,(t,n)=>{let l="function"==typeof s?s(t):s;if(t.isTextblock&&!t.hasMarkup(o,l)&&function(e,t,n){let r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}(e.doc,e.mapping.slice(a).map(n),o)){let s=null;if(o.schema.linebreakReplacement){let e="pre"==o.whitespace,t=!!o.contentMatch.matchType(o.schema.linebreakReplacement);e&&!t?s=!1:!e&&t&&(s=!0)}!1===s&&C(e,t,n,a),x(e,e.mapping.slice(a).map(n,1),o,void 0,null===s);let c=e.mapping.slice(a),u=c.map(n,1),d=c.map(n+t.nodeSize,1);return e.step(new b(u,d,u+1,d-1,new r.p2(r.HY.from(o.create(l,null,t.marks)),0,0),1,!0)),!0===s&&A(e,t,n,a),!1}})}(this,e,t,n,o),this}setNodeMarkup(e,t,n=null,o){return!function(e,t,n,o,s){let a=e.doc.nodeAt(t);if(!a)throw RangeError("No node at given position");!n&&(n=a.type);let l=n.create(o,null,s||a.marks);if(a.isLeaf)return e.replaceWith(t,t+a.nodeSize,l);if(!n.validContent(a.content))throw RangeError("Invalid content for node type "+n.name);e.step(new b(t,t+a.nodeSize,t+1,t+a.nodeSize-1,new r.p2(r.HY.from(l),0,0),1,!0))}(this,e,t,n,o),this}setNodeAttribute(e,t,n){return this.step(new F(e,t,n)),this}setDocAttribute(e,t){return this.step(new z(e,t)),this}addNodeMark(e,t){return this.step(new m(e,t)),this}removeNodeMark(e,t){let n=this.doc.nodeAt(e);if(!n)throw RangeError("No node at position "+e);if(t instanceof r.vc)t.isInSet(n.marks)&&this.step(new g(e,t));else{let r=n.marks,o,s=[];for(;o=t.isInSet(r);)s.push(new g(e,o)),r=o.removeFromSet(r);for(let e=s.length-1;e>=0;e--)this.step(s[e])}return this}split(e,t=1,n){return!function(e,t,n=1,o){let s=e.doc.resolve(t),a=r.HY.empty,l=r.HY.empty;for(let e=s.depth,t=s.depth-n,c=n-1;e>t;e--,c--){a=r.HY.from(s.node(e).copy(a));let t=o&&o[c];l=r.HY.from(t?t.type.create(t.attrs,l):s.node(e).copy(l))}e.step(new v(t,t,new r.p2(a.append(l),n,n),!0))}(this,e,t,n),this}addMark(e,t,n){var r,o,s,a;let l,c,u,d;return r=this,o=e,s=t,a=n,u=[],d=[],r.doc.nodesBetween(o,s,(e,t,n)=>{if(!e.isInline)return;let r=e.marks;if(!a.isInSet(r)&&n.type.allowsMarkType(a.type)){let n=Math.max(t,o),p=Math.min(t+e.nodeSize,s),m=a.addToSet(r);for(let e=0;e<r.length;e++)!r[e].isInSet(m)&&(l&&l.to==n&&l.mark.eq(r[e])?l.to=p:u.push(l=new f(n,p,r[e])));c&&c.to==n?c.to=p:d.push(c=new h(n,p,a))}}),u.forEach(e=>r.step(e)),d.forEach(e=>r.step(e)),this}removeMark(e,t,n){var o,s,a,l;let c,u;return o=this,s=e,a=t,l=n,c=[],u=0,o.doc.nodesBetween(s,a,(e,t)=>{if(!e.isInline)return;u++;let n=null;if(l instanceof r.ZU){let t=e.marks,r;for(;r=l.isInSet(t);)(n||(n=[])).push(r),t=r.removeFromSet(t)}else l?l.isInSet(e.marks)&&(n=[l]):n=e.marks;if(n&&n.length){let r=Math.min(t+e.nodeSize,a);for(let e=0;e<n.length;e++){let o=n[e],a;for(let e=0;e<c.length;e++){let t=c[e];t.step==u-1&&o.eq(c[e].style)&&(a=t)}a?(a.to=r,a.step=u):c.push({style:o,from:Math.max(t,s),to:r,step:u})}}}),c.forEach(e=>o.step(new f(e.from,e.to,e.style))),this}clearIncompatible(e,t,n){return x(this,e,t,n),this}}},661763:function(e,t,n){"use strict";n.d(t,{EH:function(){return tw},p:function(){return tb},tk:function(){return tV}});var r=n(871738),o=n(153737),s=n(240554);let a=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},l=function(e){let t=e.assignedSlot||e.parentNode;return t&&11==t.nodeType?t.host:t},c=null,u=function(e,t,n){let r=c||(c=document.createRange());return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,t||0),r},d=function(){c=null},p=function(e,t,n,r){return n&&(f(e,t,n,r,-1)||f(e,t,n,r,1))},h=/^(img|br|input|textarea|hr)$/i;function f(e,t,n,r,o){for(var s;;){if(e==n&&t==r)return!0;if(t==(o<0?0:m(e))){let n=e.parentNode;if(!n||1!=n.nodeType||g(e)||h.test(e.nodeName)||"false"==e.contentEditable)return!1;t=a(e)+(o<0?0:1),e=n}else{if(1!=e.nodeType)return!1;let n=e.childNodes[t+(o<0?-1:0)];if(1==n.nodeType&&"false"==n.contentEditable){if(null===(s=n.pmViewDesc)||void 0===s||!s.ignoreForSelection)return!1;t+=o}else e=n,t=o<0?m(e):0}}}function m(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function g(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}let v=function(e){return e.focusNode&&p(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function b(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}let y="undefined"!=typeof navigator?navigator:null,x="undefined"!=typeof document?document:null,w=y&&y.userAgent||"",S=/Edge\/(\d+)/.exec(w),k=/MSIE \d/.exec(w),A=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(w),C=!!(k||A||S),E=k?document.documentMode:A?+A[1]:S?+S[1]:0,T=!C&&/gecko\/(\d+)/i.test(w);T&&(/Firefox\/(\d+)/.exec(w)||[0,0])[1];let _=!C&&/Chrome\/(\d+)/.exec(w),O=!!_,M=_?+_[1]:0,I=!C&&!!y&&/Apple Computer/.test(y.vendor),P=I&&(/Mobile\/\w+/.test(w)||!!y&&y.maxTouchPoints>2),D=P||!!y&&/Mac/.test(y.platform),N=!!y&&/Win/.test(y.platform),R=/Android \d/.test(w),L=!!x&&"webkitFontSmoothing"in x.documentElement.style,j=L?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function $(e,t){return"number"==typeof e?e:e[t]}function F(e,t,n){let r=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,s=e.dom.ownerDocument;for(let a=n||e.dom;a;){if(1!=a.nodeType){a=l(a);continue}let e=a,n=e==s.body,c=n?function(e){let t=e.defaultView&&e.defaultView.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}(s):function(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}(e),u=0,d=0;if(t.top<c.top+$(r,"top")?d=-(c.top-t.top+$(o,"top")):t.bottom>c.bottom-$(r,"bottom")&&(d=t.bottom-t.top>c.bottom-c.top?t.top+$(o,"top")-c.top:t.bottom-c.bottom+$(o,"bottom")),t.left<c.left+$(r,"left")?u=-(c.left-t.left+$(o,"left")):t.right>c.right-$(r,"right")&&(u=t.right-c.right+$(o,"right")),u||d){if(n)s.defaultView.scrollBy(u,d);else{let n=e.scrollLeft,r=e.scrollTop;d&&(e.scrollTop+=d),u&&(e.scrollLeft+=u);let o=e.scrollLeft-n,s=e.scrollTop-r;t={left:t.left-o,top:t.top-s,right:t.right-o,bottom:t.bottom-s}}}let p=n?"fixed":getComputedStyle(a).position;if(/^(fixed|sticky)$/.test(p))break;a="absolute"==p?a.offsetParent:l(a)}}function z(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=l(r));return t}function B(e,t){for(let n=0;n<e.length;n++){let{dom:r,top:o,left:s}=e[n];r.scrollTop!=o+t&&(r.scrollTop=o+t),r.scrollLeft!=s&&(r.scrollLeft=s)}}let H=null;function U(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function V(e){return e.top<e.bottom||e.left<e.right}function q(e,t){let n=e.getClientRects();if(n.length){let e=n[t<0?0:n.length-1];if(V(e))return e}return Array.prototype.find.call(n,V)||e.getBoundingClientRect()}let W=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function G(e,t,n){let{node:r,offset:o,atom:s}=e.docView.domFromPos(t,n<0?-1:1),a=L||T;if(3==r.nodeType){if(a&&(W.test(r.nodeValue)||(n<0?!o:o==r.nodeValue.length))){let e=q(u(r,o,o),n);if(T&&o&&/\s/.test(r.nodeValue[o-1])&&o<r.nodeValue.length){let t=q(u(r,o-1,o-1),-1);if(t.top==e.top){let n=q(u(r,o,o+1),-1);if(n.top!=e.top)return K(n,n.left<t.left)}}return e}{let e=o,t=o,s=n<0?1:-1;return n<0&&!o?(t++,s=-1):n>=0&&o==r.nodeValue.length?(e--,s=1):n<0?e--:t++,K(q(u(r,e,t),s),s<0)}}if(!e.state.doc.resolve(t-(s||0)).parent.inlineContent){if(null==s&&o&&(n<0||o==m(r))){let e=r.childNodes[o-1];if(1==e.nodeType)return Y(e.getBoundingClientRect(),!1)}if(null==s&&o<m(r)){let e=r.childNodes[o];if(1==e.nodeType)return Y(e.getBoundingClientRect(),!0)}return Y(r.getBoundingClientRect(),n>=0)}if(null==s&&o&&(n<0||o==m(r))){let e=r.childNodes[o-1],t=3==e.nodeType?u(e,m(e)-(a?0:1)):1!=e.nodeType||"BR"==e.nodeName&&e.nextSibling?null:e;if(t)return K(q(t,1),!1)}if(null==s&&o<m(r)){let e=r.childNodes[o];for(;e.pmViewDesc&&e.pmViewDesc.ignoreForCoords;)e=e.nextSibling;let t=e?3==e.nodeType?u(e,0,a?0:1):1==e.nodeType?e:null:null;if(t)return K(q(t,-1),!0)}return K(q(3==r.nodeType?u(r):r,-n),n>=0)}function K(e,t){if(0==e.width)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function Y(e,t){if(0==e.height)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function Z(e,t,n){let r=e.state,o=e.root.activeElement;r!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),o!=e.dom&&o&&o.focus()}}let J=/[\u0590-\u08ac]/,X=null,Q=null,ee=!1;class et{constructor(e,t,n,r){this.parent=e,this.children=t,this.dom=n,this.contentDOM=r,this.dirty=0,n.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,n){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,n=this.posAtStart;;t++){let r=this.children[t];if(r==e)return n;n+=r.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,t,n){let r;if(this.contentDOM&&this.contentDOM.contains(1==e.nodeType?e:e.parentNode)){if(n<0){let n,r;if(e==this.contentDOM)n=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.previousSibling}for(;n&&!((r=n.pmViewDesc)&&r.parent==this);)n=n.previousSibling;return n?this.posBeforeChild(r)+r.size:this.posAtStart}{let n,r;if(e==this.contentDOM)n=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.nextSibling}for(;n&&!((r=n.pmViewDesc)&&r.parent==this);)n=n.nextSibling;return n?this.posBeforeChild(r):this.posAtEnd}}if(e==this.dom&&this.contentDOM)r=t>a(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==t)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!1;break}if(t.previousSibling)break}if(null==r&&t==e.childNodes.length)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!0;break}if(t.nextSibling)break}}return(null==r?n>0:r)?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let n=!0,r=e;r;r=r.parentNode){let o=this.getDesc(r),s;if(o&&(!t||o.node)){if(!n||!(s=o.nodeDOM)||(1==s.nodeType?s.contains(1==e.nodeType?e:e.parentNode):s==e))return o;n=!1}}}getDesc(e){let t=e.pmViewDesc;for(let e=t;e;e=e.parent)if(e==this)return t}posFromDOM(e,t,n){for(let r=e;r;r=r.parentNode){let o=this.getDesc(r);if(o)return o.localPosFromDOM(e,t,n)}return -1}descAt(e){for(let t=0,n=0;t<this.children.length;t++){let r=this.children[t],o=n+r.size;if(n==e&&o!=n){for(;!r.border&&r.children.length;)for(let e=0;e<r.children.length;e++){let t=r.children[e];if(t.size){r=t;break}}return r}if(e<o)return r.descAt(e-n-r.border);n=o}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let n=0,r=0;for(let t=0;n<this.children.length;n++){let o=this.children[n],s=t+o.size;if(s>e||o instanceof el){r=e-t;break}t=s}if(r)return this.children[n].domFromPos(r-this.children[n].border,t);for(let e;n&&!(e=this.children[n-1]).size&&e instanceof en&&e.side>=0;n--);if(t<=0){let e,r=!0;for(;(e=n?this.children[n-1]:null)&&e.dom.parentNode!=this.contentDOM;n--,r=!1);return e&&t&&r&&!e.border&&!e.domAtom?e.domFromPos(e.size,t):{node:this.contentDOM,offset:e?a(e.dom)+1:0}}{let e,r=!0;for(;(e=n<this.children.length?this.children[n]:null)&&e.dom.parentNode!=this.contentDOM;n++,r=!1);return e&&r&&!e.border&&!e.domAtom?e.domFromPos(0,t):{node:this.contentDOM,offset:e?a(e.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,n=0){if(0==this.children.length)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let r=-1,o=-1;for(let s=n,l=0;;l++){let n=this.children[l],c=s+n.size;if(-1==r&&e<=c){let o=s+n.border;if(e>=o&&t<=c-n.border&&n.node&&n.contentDOM&&this.contentDOM.contains(n.contentDOM))return n.parseRange(e,t,o);e=s;for(let t=l;t>0;t--){let n=this.children[t-1];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(1)){r=a(n.dom)+1;break}e-=n.size}-1==r&&(r=0)}if(r>-1&&(c>t||l==this.children.length-1)){t=c;for(let e=l+1;e<this.children.length;e++){let n=this.children[e];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(-1)){o=a(n.dom);break}t+=n.size}-1==o&&(o=this.contentDOM.childNodes.length);break}s=c}return{node:this.contentDOM,from:e,to:t,fromOffset:r,toOffset:o}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return 0==t.size||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:n}=this.domFromPos(e,0);if(1!=t.nodeType||n==t.childNodes.length)throw RangeError("No node after pos "+e);return t.childNodes[n]}setSelection(e,t,n,r=!1){let o=Math.min(e,t),s=Math.max(e,t);for(let a=0,l=0;a<this.children.length;a++){let c=this.children[a],u=l+c.size;if(o>l&&s<u)return c.setSelection(e-l-c.border,t-l-c.border,n,r);l=u}let l=this.domFromPos(e,e?-1:1),c=t==e?l:this.domFromPos(t,t?-1:1),u=n.root.getSelection(),d=n.domSelectionRange(),h=!1;if((T||I)&&e==t){let{node:e,offset:t}=l;if(3==e.nodeType){if((h=!!(t&&"\n"==e.nodeValue[t-1]))&&t==e.nodeValue.length)for(let t=e,n;t;t=t.parentNode){if(n=t.nextSibling){"BR"==n.nodeName&&(l=c={node:n.parentNode,offset:a(n)+1});break}let e=t.pmViewDesc;if(e&&e.node&&e.node.isBlock)break}}else{let n=e.childNodes[t-1];h=n&&("BR"==n.nodeName||"false"==n.contentEditable)}}if(T&&d.focusNode&&d.focusNode!=c.node&&1==d.focusNode.nodeType){let e=d.focusNode.childNodes[d.focusOffset];e&&"false"==e.contentEditable&&(r=!0)}if(!(r||h&&I)&&p(l.node,l.offset,d.anchorNode,d.anchorOffset)&&p(c.node,c.offset,d.focusNode,d.focusOffset))return;let f=!1;if((u.extend||e==t)&&!h){u.collapse(l.node,l.offset);try{e!=t&&u.extend(c.node,c.offset),f=!0}catch(e){}}if(!f){if(e>t){let e=l;l=c,c=e}let n=document.createRange();n.setEnd(c.node,c.offset),n.setStart(l.node,l.offset),u.removeAllRanges(),u.addRange(n)}}ignoreMutation(e){return!this.contentDOM&&"selection"!=e.type}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let n=0,r=0;r<this.children.length;r++){let o=this.children[r],s=n+o.size;if(n==s?e<=s&&t>=n:e<s&&t>n){let r=n+o.border,a=s-o.border;if(e>=r&&t<=a){this.dirty=e==n||t==s?2:1,e==r&&t==a&&(o.contentLost||o.dom.parentNode!=this.contentDOM)?o.dirty=3:o.markDirty(e-r,t-r);return}o.dirty=o.dom!=o.contentDOM||o.dom.parentNode!=this.contentDOM||o.children.length?3:2}n=s}this.dirty=2}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let n=1==e?2:1;t.dirty<n&&(t.dirty=n)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}}class en extends et{constructor(e,t,n,r){let o,s=t.type.toDOM;if("function"==typeof s&&(s=s(n,()=>o?o.parent?o.parent.posBeforeChild(o):void 0:r)),!t.type.spec.raw){if(1!=s.nodeType){let e=document.createElement("span");e.appendChild(s),s=e}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(e,[],s,null),this.widget=t,this.widget=t,o=this}matchesWidget(e){return 0==this.dirty&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return!!t&&t(e)}ignoreMutation(e){return"selection"!=e.type||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}}class er extends et{constructor(e,t,n,r){super(e,[],t,null),this.textDOM=n,this.text=r}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return"characterData"===e.type&&e.target.nodeValue==e.oldValue}}class ei extends et{constructor(e,t,n,r,o){super(e,[],n,r),this.mark=t,this.spec=o}static create(e,t,n,r){let s=r.nodeViews[t.type.name],a=s&&s(t,r,n);return(!a||!a.dom)&&(a=o.PW.renderSpec(document,t.type.spec.toDOM(t,n),null,t.attrs)),new ei(e,t,a.dom,a.contentDOM||a.dom,a)}parseRule(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return 3!=this.dirty&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),0!=this.dirty){let e=this.parent;for(;!e.node;)e=e.parent;e.dirty<this.dirty&&(e.dirty=this.dirty),this.dirty=0}}slice(e,t,n){let r=ei.create(this.parent,this.mark,!0,n),o=this.children,s=this.size;t<s&&(o=ey(o,t,s,n)),e>0&&(o=ey(o,0,e,n));for(let e=0;e<o.length;e++)o[e].parent=r;return r.children=o,r}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class eo extends et{constructor(e,t,n,r,o,s,a,l,c){super(e,[],o,s),this.node=t,this.outerDeco=n,this.innerDeco=r,this.nodeDOM=a}static create(e,t,n,r,s,a){let l=s.nodeViews[t.type.name],c,u=l&&l(t,s,()=>c?c.parent?c.parent.posBeforeChild(c):void 0:a,n,r),d=u&&u.dom,p=u&&u.contentDOM;if(t.isText){if(d){if(3!=d.nodeType)throw RangeError("Text must be rendered as a DOM text node")}else d=document.createTextNode(t.text)}else if(!d){let e=o.PW.renderSpec(document,t.type.spec.toDOM(t),null,t.attrs);({dom:d,contentDOM:p}=e)}!p&&!t.isText&&"BR"!=d.nodeName&&(!d.hasAttribute("contenteditable")&&(d.contentEditable="false"),t.type.spec.draggable&&(d.draggable=!0));let h=d;return(d=ef(d,n,t),u)?c=new ec(e,t,n,r,d,p||null,h,u,s,a+1):t.isText?new ea(e,t,n,r,d,h,s):new eo(e,t,n,r,d,p||null,h,s,a+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(e.preserveWhitespace="full"),this.contentDOM){if(this.contentLost){for(let t=this.children.length-1;t>=0;t--){let n=this.children[t];if(this.dom.contains(n.dom.parentNode)){e.contentElement=n.dom.parentNode;break}}!e.contentElement&&(e.getContent=()=>o.HY.empty)}else e.contentElement=this.contentDOM}else e.getContent=()=>this.node.content;return e}matchesNode(e,t,n){return 0==this.dirty&&e.eq(this.node)&&em(t,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let n=this.node.inlineContent,r=t,s=e.composing?this.localCompositionInfo(e,t):null,a=s&&s.pos>-1?s:null,l=s&&s.pos<0,c=new ev(this,a&&a.node,e);(function(e,t,n,r){let o=t.locals(e),s=0;if(0==o.length){for(let n=0;n<e.childCount;n++){let a=e.child(n);r(a,o,t.forChild(s,a),n),s+=a.nodeSize}return}let a=0,l=[],c=null;for(let u=0;;){let d,p,h,f;for(;a<o.length&&o[a].to==s;){let e=o[a++];e.widget&&(d?(p||(p=[d])).push(e):d=e)}if(d){if(p){p.sort(eb);for(let e=0;e<p.length;e++)n(p[e],u,!!c)}else n(d,u,!!c)}if(c)f=-1,h=c,c=null;else if(u<e.childCount)f=u,h=e.child(u++);else break;for(let e=0;e<l.length;e++)l[e].to<=s&&l.splice(e--,1);for(;a<o.length&&o[a].from<=s&&o[a].to>s;)l.push(o[a++]);let m=s+h.nodeSize;if(h.isText){let e=m;a<o.length&&o[a].from<e&&(e=o[a].from);for(let t=0;t<l.length;t++)l[t].to<e&&(e=l[t].to);e<m&&(c=h.cut(e-s),h=h.cut(0,e-s),m=e,f=-1)}else for(;a<o.length&&o[a].to<m;)a++;let g=h.isInline&&!h.isLeaf?l.filter(e=>!e.inline):l.slice();r(h,g,t.forChild(s,h),f),s=m}})(this.node,this.innerDeco,(t,s,a)=>{t.spec.marks?c.syncToMarks(t.spec.marks,n,e):t.type.side>=0&&!a&&c.syncToMarks(s==this.node.childCount?o.vc.none:this.node.child(s).marks,n,e),c.placeWidget(t,e,r)},(t,o,a,u)=>{let d;c.syncToMarks(t.marks,n,e),c.findNodeMatch(t,o,a,u)||l&&e.state.selection.from>r&&e.state.selection.to<r+t.nodeSize&&(d=c.findIndexWithChild(s.node))>-1&&c.updateNodeAt(t,o,a,d,e)||c.updateNextNode(t,o,a,e,u,r)||c.addNode(t,o,a,e,r),r+=t.nodeSize}),c.syncToMarks([],n,e),this.node.isTextblock&&c.addTextblockHacks(),c.destroyRest(),(c.changed||2==this.dirty)&&(a&&this.protectLocalComposition(e,a),function e(t,n,r){let o=t.firstChild,s=!1;for(let a=0;a<n.length;a++){let l=n[a],c=l.dom;if(c.parentNode==t){for(;c!=o;)o=eg(o),s=!0;o=o.nextSibling}else s=!0,t.insertBefore(c,o);if(l instanceof ei){let n=o?o.previousSibling:t.lastChild;e(l.contentDOM,l.children,r),o=n?n.nextSibling:t.firstChild}}for(;o;)o=eg(o),s=!0;s&&r.trackWrites==t&&(r.trackWrites=null)}(this.contentDOM,this.children,e),P&&function(e){if("UL"==e.nodeName||"OL"==e.nodeName){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}(this.dom))}localCompositionInfo(e,t){let{from:n,to:o}=e.state.selection;if(!(e.state.selection instanceof r.Bs)||n<t||o>t+this.node.content.size)return null;let s=e.input.compositionNode;if(!s||!this.dom.contains(s.parentNode))return null;if(!this.node.inlineContent)return{node:s,pos:-1,text:""};{let e=s.nodeValue,r=function(e,t,n,r){for(let o=0,s=0;o<e.childCount&&s<=r;){let a=e.child(o++),l=s;if(s+=a.nodeSize,!a.isText)continue;let c=a.text;for(;o<e.childCount;){let t=e.child(o++);if(s+=t.nodeSize,!t.isText)break;c+=t.text}if(s>=n){if(s>=r&&c.slice(r-t.length-l,r-l)==t)return r-t.length;let e=l<r?c.lastIndexOf(t,r-l-1):-1;if(e>=0&&e+t.length+l>=n)return l+e;if(n==r&&c.length>=r+t.length-l&&c.slice(r-l,r-l+t.length)==t)return r}}return -1}(this.node.content,e,n-t,o-t);return r<0?null:{node:s,pos:r,text:e}}}protectLocalComposition(e,{node:t,pos:n,text:r}){if(this.getDesc(t))return;let o=t;for(;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let s=new er(this,o,t,r);e.input.compositionNodes.push(s),this.children=ey(this.children,n,n+r.length,e,s)}update(e,t,n,r){return!!(3!=this.dirty&&e.sameMarkup(this.node))&&(this.updateInner(e,t,n,r),!0)}updateInner(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0}updateOuterDeco(e){if(em(e,this.outerDeco))return;let t=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=eh(this.dom,this.nodeDOM,ep(this.outerDeco,this.node,t),ep(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){1==this.nodeDOM.nodeType&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function es(e,t,n,r,o){ef(r,t,e);let s=new eo(void 0,e,t,n,r,r,r,o,0);return s.contentDOM&&s.updateChildren(o,0),s}class ea extends eo{constructor(e,t,n,r,o,s,a){super(e,t,n,r,o,null,s,a,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,n,r){return!!(3!=this.dirty&&(0==this.dirty||this.inParent())&&e.sameMarkup(this.node))&&(this.updateOuterDeco(t),(0!=this.dirty||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=e,this.dirty=0,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,n){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,n)}ignoreMutation(e){return"characterData"!=e.type&&"selection"!=e.type}slice(e,t,n){let r=this.node.cut(e,t),o=document.createTextNode(r.text);return new ea(this.parent,r,this.outerDeco,this.innerDeco,o,o,n)}markDirty(e,t){super.markDirty(e,t),this.dom!=this.nodeDOM&&(0==e||t==this.nodeDOM.nodeValue.length)&&(this.dirty=3)}get domAtom(){return!1}isText(e){return this.node.text==e}}class el extends et{parseRule(){return{ignore:!0}}matchesHack(e){return 0==this.dirty&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return"IMG"==this.dom.nodeName}}class ec extends eo{constructor(e,t,n,r,o,s,a,l,c,u){super(e,t,n,r,o,s,a,c,u),this.spec=l}update(e,t,n,r){if(3==this.dirty)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let o=this.spec.update(e,t,n);return o&&this.updateInner(e,t,n,r),o}if(!this.contentDOM&&!e.isLeaf)return!1;return super.update(e,t,n,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,n,r){this.spec.setSelection?this.spec.setSelection(e,t,n.root):super.setSelection(e,t,n,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}let eu=function(e){e&&(this.nodeName=e)};eu.prototype=Object.create(null);let ed=[new eu];function ep(e,t,n){if(0==e.length)return ed;let r=n?ed[0]:new eu,o=[r];for(let s=0;s<e.length;s++){let a=e[s].type.attrs;if(a)for(let e in a.nodeName&&o.push(r=new eu(a.nodeName)),a){let s=a[e];null!=s&&(n&&1==o.length&&o.push(r=new eu(t.isInline?"span":"div")),"class"==e?r.class=(r.class?r.class+" ":"")+s:"style"==e?r.style=(r.style?r.style+";":"")+s:"nodeName"!=e&&(r[e]=s))}}return o}function eh(e,t,n,r){if(n==ed&&r==ed)return t;let o=t;for(let t=0;t<r.length;t++){let s=r[t],a=n[t];if(t){let t;a&&a.nodeName==s.nodeName&&o!=e&&(t=o.parentNode)&&t.nodeName.toLowerCase()==s.nodeName||((t=document.createElement(s.nodeName)).pmIsDeco=!0,t.appendChild(o),a=ed[0]),o=t}(function(e,t,n){for(let r in t)"class"!=r&&"style"!=r&&"nodeName"!=r&&!(r in n)&&e.removeAttribute(r);for(let r in n)"class"!=r&&"style"!=r&&"nodeName"!=r&&n[r]!=t[r]&&e.setAttribute(r,n[r]);if(t.class!=n.class){let r=t.class?t.class.split(" ").filter(Boolean):[],o=n.class?n.class.split(" ").filter(Boolean):[];for(let t=0;t<r.length;t++)-1==o.indexOf(r[t])&&e.classList.remove(r[t]);for(let t=0;t<o.length;t++)-1==r.indexOf(o[t])&&e.classList.add(o[t]);0==e.classList.length&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style){let n=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,r;for(;r=n.exec(t.style);)e.style.removeProperty(r[1])}n.style&&(e.style.cssText+=n.style)}})(o,a||ed[0],s)}return o}function ef(e,t,n){return eh(e,e,ed,ep(t,n,1!=e.nodeType))}function em(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function eg(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class ev{constructor(e,t,n){this.lock=t,this.view=n,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=function(e,t){let n=t,r=n.children.length,o=e.childCount,s=new Map,a=[];e:for(;o>0;){let l;for(;;)if(r){let e=n.children[r-1];if(e instanceof ei)n=e,r=e.children.length;else{l=e,r--;break}}else if(n==t)break e;else r=n.parent.children.indexOf(n),n=n.parent;let c=l.node;if(!!c){if(c!=e.child(o-1))break;--o,s.set(l,o),a.push(l)}}return{index:o,matched:s,matches:a.reverse()}}(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,n){let r=0,o=this.stack.length>>1,s=Math.min(o,e.length);for(;r<s&&(r==o-1?this.top:this.stack[r+1<<1]).matchesMark(e[r])&&!1!==e[r].type.spec.spanning;)r++;for(;r<o;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<e.length;){this.stack.push(this.top,this.index+1);let r=-1;for(let t=this.index;t<Math.min(this.index+3,this.top.children.length);t++){let n=this.top.children[t];if(n.matchesMark(e[o])&&!this.isLocked(n.dom)){r=t;break}}if(r>-1)r>this.index&&(this.changed=!0,this.destroyBetween(this.index,r)),this.top=this.top.children[this.index];else{let r=ei.create(this.top,e[o],t,n);this.top.children.splice(this.index,0,r),this.top=r,this.changed=!0}this.index=0,o++}}findNodeMatch(e,t,n,r){let o=-1,s;if(r>=this.preMatch.index&&(s=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&s.matchesNode(e,t,n))o=this.top.children.indexOf(s,this.index);else for(let r=this.index,s=Math.min(this.top.children.length,r+5);r<s;r++){let s=this.top.children[r];if(s.matchesNode(e,t,n)&&!this.preMatch.matched.has(s)){o=r;break}}return!(o<0)&&(this.destroyBetween(this.index,o),this.index++,!0)}updateNodeAt(e,t,n,r,o){let s=this.top.children[r];return 3==s.dirty&&s.dom==s.contentDOM&&(s.dirty=2),!!s.update(e,t,n,o)&&(this.destroyBetween(this.index,r),this.index++,!0)}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return -1;if(t==this.top.contentDOM){let t=e.pmViewDesc;if(t){for(let e=this.index;e<this.top.children.length;e++)if(this.top.children[e]==t)return e}return -1}e=t}}updateNextNode(e,t,n,r,o,s){for(let a=this.index;a<this.top.children.length;a++){let l=this.top.children[a];if(l instanceof eo){let c=this.preMatch.matched.get(l);if(null!=c&&c!=o)return!1;let u=l.dom,d,p=this.isLocked(u)&&!(e.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==e.text&&3!=l.dirty&&em(t,l.outerDeco));if(!p&&l.update(e,t,n,r))return this.destroyBetween(this.index,a),l.dom!=u&&(this.changed=!0),this.index++,!0;if(!p&&(d=this.recreateWrapper(l,e,t,n,r,s)))return this.destroyBetween(this.index,a),this.top.children[this.index]=d,d.contentDOM&&(d.dirty=2,d.updateChildren(r,s+1),d.dirty=0),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,t,n,r,o,s){if(e.dirty||t.isAtom||!e.children.length||!e.node.content.eq(t.content)||!em(n,e.outerDeco)||!r.eq(e.innerDeco))return null;let a=eo.create(this.top,t,n,r,o,s);if(a.contentDOM)for(let t of(a.children=e.children,e.children=[],a.children))t.parent=a;return e.destroy(),a}addNode(e,t,n,r,o){let s=eo.create(this.top,e,t,n,r,o);s.contentDOM&&s.updateChildren(r,o+1),this.top.children.splice(this.index++,0,s),this.changed=!0}placeWidget(e,t,n){let r=this.index<this.top.children.length?this.top.children[this.index]:null;if(r&&r.matchesWidget(e)&&(e==r.widget||!r.widget.type.toDOM.parentNode))this.index++;else{let r=new en(this.top,e,t,n);this.top.children.splice(this.index++,0,r),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;for(;e instanceof ei;)e=(t=e).children[t.children.length-1];(!e||!(e instanceof ea)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((I||O)&&e&&"false"==e.dom.contentEditable&&this.addHackNode("IMG",t),this.addHackNode("BR",this.top))}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{let n=document.createElement(e);"IMG"==e&&(n.className="ProseMirror-separator",n.alt=""),"BR"==e&&(n.className="ProseMirror-trailingBreak");let r=new el(this.top,[],n,null);t!=this.top?t.children.push(r):t.children.splice(this.index++,0,r),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||1==e.nodeType&&e.contains(this.lock.parentNode))}}function eb(e,t){return e.type.side-t.type.side}function ey(e,t,n,r,o){let s=[];for(let a=0,l=0;a<e.length;a++){let c=e[a],u=l,d=l+=c.size;u>=n||d<=t?s.push(c):(u<t&&s.push(c.slice(0,t-u,r)),o&&(s.push(o),o=void 0),d>n&&s.push(c.slice(n-u,c.size,r)))}return s}function ex(e,t=null){let n=e.domSelectionRange(),o=e.state.doc;if(!n.focusNode)return null;let s=e.docView.nearestDesc(n.focusNode),l=s&&0==s.size,c=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(c<0)return null;let u=o.resolve(c),d,p;if(v(n)){for(d=c;s&&!s.node;)s=s.parent;let e=s.node;if(s&&e.isAtom&&r.qv.isSelectable(e)&&s.parent&&!(e.isInline&&function(e,t,n){for(let r=0==t,o=t==m(e);r||o;){if(e==n)return!0;let t=a(e);if(!(e=e.parentNode))return!1;r=r&&0==t,o=o&&t==m(e)}}(n.focusNode,n.focusOffset,s.dom))){let e=s.posBefore;p=new r.qv(c==e?u:o.resolve(e))}}else{if(n instanceof e.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let t=c,r=c;for(let o=0;o<n.rangeCount;o++){let s=n.getRangeAt(o);t=Math.min(t,e.docView.posFromDOM(s.startContainer,s.startOffset,1)),r=Math.max(r,e.docView.posFromDOM(s.endContainer,s.endOffset,-1))}if(t<0)return null;[d,c]=r==e.state.selection.anchor?[r,t]:[t,r],u=o.resolve(c)}else d=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(d<0)return null}let h=o.resolve(d);if(!p){let n="pointer"==t||e.state.selection.head<u.pos&&!l?1:-1;p=eO(e,h,u,n)}return p}function ew(e){return e.editable?e.hasFocus():eI(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function eS(e,t=!1){let n=e.state.selection;if(eT(e,n),ew(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&O){let t=e.domSelectionRange(),n=e.domObserver.currentSelection;if(t.anchorNode&&n.anchorNode&&p(t.anchorNode,t.anchorOffset,n.anchorNode,n.anchorOffset)){e.input.mouseDown.delayedSelectionSync=!0,e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)(function(e){let t=e.domSelection(),n=document.createRange();if(!t)return;let r=e.cursorWrapper.dom,o="IMG"==r.nodeName;o?n.setStart(r.parentNode,a(r)+1):n.setStart(r,0),n.collapse(!0),t.removeAllRanges(),t.addRange(n),!o&&!e.state.selection.visible&&C&&E<=11&&(r.disabled=!0,r.disabled=!1)})(e);else{let{anchor:o,head:s}=n,a,l;ek&&!(n instanceof r.Bs)&&(!n.$from.parent.inlineContent&&(a=eA(e,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(l=eA(e,n.to))),e.docView.setSelection(o,s,e,t),ek&&(a&&eE(a),l&&eE(l)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&function(e){let t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);let n=e.domSelectionRange(),r=n.anchorNode,o=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=o)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!ew(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}let ek=I||O&&M<63;function eA(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),o=r<n.childNodes.length?n.childNodes[r]:null,s=r?n.childNodes[r-1]:null;if(I&&o&&"false"==o.contentEditable)return eC(o);if((!o||"false"==o.contentEditable)&&(!s||"false"==s.contentEditable)){if(o)return eC(o);if(s)return eC(s)}}function eC(e){return e.contentEditable="true",I&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function eE(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function eT(e,t){if(t instanceof r.qv){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(e_(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else e_(e)}function e_(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function eO(e,t,n,o){return e.someProp("createSelectionBetween",r=>r(e,t,n))||r.Bs.between(t,n,o)}function eM(e){return(!e.editable||!!e.hasFocus())&&eI(e)}function eI(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch(e){return!1}}function eP(e,t){let{$anchor:n,$head:o}=e.selection,s=t>0?n.max(o):n.min(o),a=s.parent.inlineContent?s.depth?e.doc.resolve(t>0?s.after():s.before()):null:s;return a&&r.Y1.findFrom(a,t)}function eD(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function eN(e,t,n){let o=e.state.selection;if(o instanceof r.Bs){if(n.indexOf("s")>-1){let{$head:n}=o,s=n.textOffset?null:t<0?n.nodeBefore:n.nodeAfter;if(!s||s.isText||!s.isLeaf)return!1;let a=e.state.doc.resolve(n.pos+s.nodeSize*(t<0?-1:1));return eD(e,new r.Bs(o.$anchor,a))}if(!o.empty)return!1;else if(e.endOfTextblock(t>0?"forward":"backward")){let n=eP(e.state,t);return!!n&&n instanceof r.qv&&eD(e,n)}else if(!(D&&n.indexOf("m")>-1)){let n=o.$head,s=n.textOffset?null:t<0?n.nodeBefore:n.nodeAfter,a;if(!s||s.isText)return!1;let l=t<0?n.pos-s.nodeSize:n.pos;return!!(s.isAtom||(a=e.docView.descAt(l))&&!a.contentDOM)&&(r.qv.isSelectable(s)?eD(e,new r.qv(t<0?e.state.doc.resolve(n.pos-s.nodeSize):n)):!!L&&eD(e,new r.Bs(e.state.doc.resolve(t<0?l:l+s.nodeSize))))}}else{if(o instanceof r.qv&&o.node.isInline)return eD(e,new r.Bs(t>0?o.$to:o.$from));let n=eP(e.state,t);return!!n&&eD(e,n)}}function eR(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function eL(e,t){let n=e.pmViewDesc;return n&&0==n.size&&(t<0||e.nextSibling||"BR"!=e.nodeName)}function ej(e,t){return t<0?function(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o,s,l=!1;for(T&&1==n.nodeType&&r<eR(n)&&eL(n.childNodes[r],-1)&&(l=!0);;)if(r>0){if(1!=n.nodeType)break;{let e=n.childNodes[r-1];if(eL(e,-1))o=n,s=--r;else if(3==e.nodeType)r=(n=e).nodeValue.length;else break}}else if(e$(n))break;else{let t=n.previousSibling;for(;t&&eL(t,-1);)o=n.parentNode,s=a(t),t=t.previousSibling;if(t)r=eR(n=t);else{if((n=n.parentNode)==e.dom)break;r=0}}l?eF(e,n,r):o&&eF(e,o,s)}(e):function(e){let t,n,r=e.domSelectionRange(),o=r.focusNode,s=r.focusOffset;if(!o)return;let l=eR(o);for(;;)if(s<l){if(1!=o.nodeType)break;if(eL(o.childNodes[s],1))t=o,n=++s;else break}else if(e$(o))break;else{let r=o.nextSibling;for(;r&&eL(r,1);)t=r.parentNode,n=a(r)+1,r=r.nextSibling;if(r)s=0,l=eR(o=r);else{if((o=o.parentNode)==e.dom)break;s=l=0}}t&&eF(e,t,n)}(e)}function e$(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function eF(e,t,n){if(3!=t.nodeType){let e,r;(r=function(e,t){for(;e&&t==e.childNodes.length&&!g(e);)t=a(e)+1,e=e.parentNode;for(;e&&t<e.childNodes.length;){let n=e.childNodes[t];if(3==n.nodeType)return n;if(1==n.nodeType&&"false"==n.contentEditable)break;e=n,t=0}}(t,n))?(t=r,n=0):(e=function(e,t){for(;e&&!t&&!g(e);)t=a(e),e=e.parentNode;for(;e&&t;){let n=e.childNodes[t-1];if(3==n.nodeType)return n;if(1==n.nodeType&&"false"==n.contentEditable)break;t=(e=n).childNodes.length}}(t,n))&&(t=e,n=e.nodeValue.length)}let r=e.domSelection();if(!r)return;if(v(r)){let e=document.createRange();e.setEnd(t,n),e.setStart(t,n),r.removeAllRanges(),r.addRange(e)}else r.extend&&r.extend(t,n);e.domObserver.setCurSelection();let{state:o}=e;setTimeout(()=>{e.state==o&&eS(e)},50)}function ez(e,t){let n=e.state.doc.resolve(t);if(!(O||N)&&n.parent.inlineContent){let r=e.coordsAtPos(t);if(t>n.start()){let n=e.coordsAtPos(t-1),o=(n.top+n.bottom)/2;if(o>r.top&&o<r.bottom&&Math.abs(n.left-r.left)>1)return n.left<r.left?"ltr":"rtl"}if(t<n.end()){let n=e.coordsAtPos(t+1),o=(n.top+n.bottom)/2;if(o>r.top&&o<r.bottom&&Math.abs(n.left-r.left)>1)return n.left>r.left?"ltr":"rtl"}}return"rtl"==getComputedStyle(e.dom).direction?"rtl":"ltr"}function eB(e,t,n){let o=e.state.selection;if(o instanceof r.Bs&&!o.empty||n.indexOf("s")>-1||D&&n.indexOf("m")>-1)return!1;let{$from:s,$to:a}=o;if(!s.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let n=eP(e.state,t);if(n&&n instanceof r.qv)return eD(e,n)}if(!s.parent.inlineContent){let n=t<0?s:a,l=o instanceof r.C1?r.Y1.near(n,t):r.Y1.findFrom(n,t);return!!l&&eD(e,l)}return!1}function eH(e,t){if(!(e.state.selection instanceof r.Bs))return!0;let{$head:n,$anchor:o,empty:s}=e.state.selection;if(!n.sameParent(o))return!0;if(!s)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let a=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(a&&!a.isText){let r=e.state.tr;return t<0?r.delete(n.pos-a.nodeSize,n.pos):r.delete(n.pos,n.pos+a.nodeSize),e.dispatch(r),!0}return!1}function eU(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function eV(e,t){e.someProp("transformCopied",n=>{t=n(t,e)});let n=[],{content:r,openStart:s,openEnd:a}=t;for(;s>1&&a>1&&1==r.childCount&&1==r.firstChild.childCount;){s--,a--;let e=r.firstChild;n.push(e.type.name,e.attrs!=e.type.defaultAttrs?e.attrs:null),r=e.content}let l=e.someProp("clipboardSerializer")||o.PW.fromSchema(e.state.schema),c=eX(),u=c.createElement("div");u.appendChild(l.serializeFragment(r,{document:c}));let d=u.firstChild,p,h=0;for(;d&&1==d.nodeType&&(p=eZ[d.nodeName.toLowerCase()]);){for(let e=p.length-1;e>=0;e--){let t=c.createElement(p[e]);for(;u.firstChild;)t.appendChild(u.firstChild);u.appendChild(t),h++}d=u.firstChild}return d&&1==d.nodeType&&d.setAttribute("data-pm-slice",`${s} ${a}${h?` -${h}`:""} ${JSON.stringify(n)}`),{dom:u,text:e.someProp("clipboardTextSerializer",n=>n(t,e))||t.content.textBetween(0,t.content.size,"\n\n"),slice:t}}function eq(e,t,n,r,s){let a,l,c=s.parent.type.spec.code;if(!n&&!t)return null;let u=t&&(r||c||!n);if(u){if(e.someProp("transformPastedText",n=>{t=n(t,c||r,e)}),c)return t?new o.p2(o.HY.from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0):o.p2.empty;let n=e.someProp("clipboardTextParser",n=>n(t,s,r,e));if(n)l=n;else{let n=s.marks(),{schema:r}=e.state,l=o.PW.fromSchema(r);a=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(e=>{let t=a.appendChild(document.createElement("p"));e&&t.appendChild(l.serializeNode(r.text(e,n)))})}}else e.someProp("transformPastedHTML",t=>{n=t(n,e)}),a=function(e){var t;let n,r=/^(\s*<meta [^>]*>)*/.exec(e);r&&(e=e.slice(r[0].length));let o=eX().createElement("div"),s=/<([a-z][^>\s]+)/i.exec(e),a;(a=s&&eZ[s[1].toLowerCase()])&&(e=a.map(e=>"<"+e+">").join("")+e+a.map(e=>"</"+e+">").reverse().join(""));if(o.innerHTML=(t=e,(n=window.trustedTypes)?(!eQ&&(eQ=n.defaultPolicy||n.createPolicy("ProseMirrorClipboard",{createHTML:e=>e})),eQ.createHTML(t)):t),a)for(let e=0;e<a.length;e++)o=o.querySelector(a[e])||o;return o}(n),L&&function(e){let t=e.querySelectorAll(O?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let r=t[n];1==r.childNodes.length&&"\xa0"==r.textContent&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}(a);let d=a&&a.querySelector("[data-pm-slice]"),p=d&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(d.getAttribute("data-pm-slice")||"");if(p&&p[3])for(let e=+p[3];e>0;e--){let e=a.firstChild;for(;e&&1!=e.nodeType;)e=e.nextSibling;if(!e)break;a=e}if(!l&&(l=(e.someProp("clipboardParser")||e.someProp("domParser")||o.aw.fromSchema(e.state.schema)).parseSlice(a,{preserveWhitespace:!!(u||p),context:s,ruleFromNode:e=>"BR"!=e.nodeName||e.nextSibling||!e.parentNode||eW.test(e.parentNode.nodeName)?null:{ignore:!0}})),p)l=function(e,t){if(!e.size)return e;let n=e.content.firstChild.type.schema,r;try{r=JSON.parse(t)}catch(t){return e}let{content:s,openStart:a,openEnd:l}=e;for(let e=r.length-2;e>=0;e-=2){let t=n.nodes[r[e]];if(!t||t.hasRequiredAttrs())break;s=o.HY.from(t.create(r[e+1],s)),a++,l++}return new o.p2(s,a,l)}(eY(l,+p[1],+p[2]),p[4]);else if((l=o.p2.maxOpen(function(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.index(n)),s,a=[];if(e.forEach(e=>{if(!a)return;let t=r.findWrapping(e.type),n;if(!t)return a=null;if(n=a.length&&s.length&&function e(t,n,r,s,a){if(a<t.length&&a<n.length&&t[a]==n[a]){let l=e(t,n,r,s.lastChild,a+1);if(l)return s.copy(s.content.replaceChild(s.childCount-1,l));if(s.contentMatchAt(s.childCount).matchType(a==t.length-1?r.type:t[a+1]))return s.copy(s.content.append(o.HY.from(eG(r,t,a+1))))}}(t,s,e,a[a.length-1],0))a[a.length-1]=n;else{a.length&&(a[a.length-1]=function e(t,n){if(0==n)return t;let r=t.content.replaceChild(t.childCount-1,e(t.lastChild,n-1)),s=t.contentMatchAt(t.childCount).fillBefore(o.HY.empty,!0);return t.copy(r.append(s))}(a[a.length-1],s.length));let n=eG(e,t);a.push(n),r=r.matchType(n.type),s=t}}),a)return o.HY.from(a)}return e}(l.content,s),!0)).openStart||l.openEnd){let e=0,t=0;for(let t=l.content.firstChild;e<l.openStart&&!t.type.spec.isolating;e++,t=t.firstChild);for(let e=l.content.lastChild;t<l.openEnd&&!e.type.spec.isolating;t++,e=e.lastChild);l=eY(l,e,t)}return e.someProp("transformPasted",t=>{l=t(l,e)}),l}let eW=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function eG(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,o.HY.from(e));return e}function eK(e,t,n,r,s,a){let l=t<0?e.firstChild:e.lastChild,c=l.content;return e.childCount>1&&(a=0),s<r-1&&(c=eK(c,t,n,r,s+1,a)),s>=n&&(c=t<0?l.contentMatchAt(0).fillBefore(c,a<=s).append(c):c.append(l.contentMatchAt(l.childCount).fillBefore(o.HY.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,l.copy(c))}function eY(e,t,n){return t<e.openStart&&(e=new o.p2(eK(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new o.p2(eK(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}let eZ={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},eJ=null;function eX(){return eJ||(eJ=document.implementation.createHTMLDocument("title"))}let eQ=null,e0={},e1={},e2={touchstart:!0,touchmove:!0};class e3{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function e5(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function e4(e){e.someProp("handleDOMEvents",t=>{for(let n in t)!e.input.eventHandlers[n]&&e.dom.addEventListener(n,e.input.eventHandlers[n]=t=>e6(e,t))})}function e6(e,t){return e.someProp("handleDOMEvents",n=>{let r=n[t.type];return!!r&&(r(e,t)||t.defaultPrevented)})}function e8(e){return{left:e.clientX,top:e.clientY}}e1.keydown=(e,t)=>{if(e.input.shiftKey=16==t.keyCode||t.shiftKey,!tr(e,t)){if(e.input.lastKeyCode=t.keyCode,e.input.lastKeyCodeTime=Date.now(),!R||!O||13!=t.keyCode){if(229!=t.keyCode&&e.domObserver.forceFlush(),!P||13!=t.keyCode||t.ctrlKey||t.altKey||t.metaKey)e.someProp("handleKeyDown",n=>n(e,t))||function(e,t){var n;let r;let o=t.keyCode,s=(r="",(n=t).ctrlKey&&(r+="c"),n.metaKey&&(r+="m"),n.altKey&&(r+="a"),n.shiftKey&&(r+="s"),r);if(8==o||D&&72==o&&"c"==s)return eH(e,-1)||ej(e,-1);if(46==o&&!t.shiftKey||D&&68==o&&"c"==s)return eH(e,1)||ej(e,1);if(13==o||27==o)return!0;else if(37==o||D&&66==o&&"c"==s){let t=37==o?"ltr"==ez(e,e.state.selection.from)?-1:1:-1;return eN(e,t,s)||ej(e,t)}else if(39==o||D&&70==o&&"c"==s){let t=39==o?"ltr"==ez(e,e.state.selection.from)?1:-1:1;return eN(e,t,s)||ej(e,t)}else if(38==o||D&&80==o&&"c"==s)return eB(e,-1,s)||ej(e,-1);else if(40==o||D&&78==o&&"c"==s)return function(e){if(!I||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&1==t.nodeType&&0==n&&t.firstChild&&"false"==t.firstChild.contentEditable){let n=t.firstChild;eU(e,n,"true"),setTimeout(()=>eU(e,n,"false"),20)}return!1}(e)||eB(e,1,s)||ej(e,1);else if(s==(D?"m":"c")&&(66==o||73==o||89==o||90==o))return!0;return!1}(e,t)?t.preventDefault():e5(e,"key");else{let t=Date.now();e.input.lastIOSEnter=t,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==t&&(e.someProp("handleKeyDown",t=>t(e,b(13,"Enter"))),e.input.lastIOSEnter=0)},200)}}}},e1.keyup=(e,t)=>{16==t.keyCode&&(e.input.shiftKey=!1)},e1.keypress=(e,t)=>{if(tr(e,t)||!t.charCode||t.ctrlKey&&!t.altKey||D&&t.metaKey)return;if(e.someProp("handleKeyPress",n=>n(e,t))){t.preventDefault();return}let n=e.state.selection;if(!(n instanceof r.Bs)||!n.$from.sameParent(n.$to)){let r=String.fromCharCode(t.charCode),o=()=>e.state.tr.insertText(r).scrollIntoView();!/[\r\n]/.test(r)&&!e.someProp("handleTextInput",t=>t(e,n.$from.pos,n.$to.pos,r,o))&&e.dispatch(o()),t.preventDefault()}};function e9(e,t,n,r,o){if(-1==r)return!1;let s=e.state.doc.resolve(r);for(let r=s.depth+1;r>0;r--)if(e.someProp(t,t=>r>s.depth?t(e,n,s.nodeAfter,s.before(r),o,!0):t(e,n,s.node(r),s.before(r),o,!1)))return!0;return!1}function e7(e,t,n){if(!e.focused&&e.focus(),e.state.selection.eq(t))return;let r=e.state.tr.setSelection(t);"pointer"==n&&r.setMeta("pointer",!0),e.dispatch(r)}function te(e){return ta(e)}let tt=D?"metaKey":"ctrlKey";e0.mousedown=(e,t)=>{var n,o;let s,a;e.input.shiftKey=t.shiftKey;let l=ta(e),c=Date.now(),u="singleClick";if(c-e.input.lastClick.time<500&&(n=t,s=(o=e.input.lastClick).x-n.clientX,s*s+(a=o.y-n.clientY)*a<100)&&!t[tt]&&e.input.lastClick.button==t.button)"singleClick"==e.input.lastClick.type?u="doubleClick":"doubleClick"==e.input.lastClick.type&&(u="tripleClick");e.input.lastClick={time:c,x:t.clientX,y:t.clientY,type:u,button:t.button};let d=e.posAtCoords(e8(t));d&&("singleClick"==u?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new tn(e,d,t,!!l)):("doubleClick"==u?function(e,t,n,r){return e9(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",n=>n(e,t,r))}:function(e,t,n,o){return e9(e,"handleTripleClickOn",t,n,o)||e.someProp("handleTripleClick",n=>n(e,t,o))||function(e,t,n){if(0!=n.button)return!1;let o=e.state.doc;if(-1==t)return!!o.inlineContent&&(e7(e,r.Bs.create(o,0,o.content.size),"pointer"),!0);let s=o.resolve(t);for(let t=s.depth+1;t>0;t--){let n=t>s.depth?s.nodeAfter:s.node(t),a=s.before(t);if(n.inlineContent)e7(e,r.Bs.create(o,a+1,a+1+n.content.size),"pointer");else{if(!r.qv.isSelectable(n))continue;e7(e,r.qv.create(o,a),"pointer")}return!0}}(e,n,o)})(e,d.pos,d.inside,t)?t.preventDefault():e5(e,"pointer"))};class tn{constructor(e,t,n,o){let s,a;if(this.view=e,this.pos=t,this.event=n,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!n[tt],this.allowDefault=n.shiftKey,t.inside>-1)s=e.state.doc.nodeAt(t.inside),a=t.inside;else{let n=e.state.doc.resolve(t.pos);s=n.parent,a=n.depth?n.before():0}let l=o?null:n.target,c=l?e.docView.nearestDesc(l,!0):null;this.target=c&&1==c.dom.nodeType?c.dom:null;let{selection:u}=e.state;(0==n.button&&s.type.spec.draggable&&!1!==s.type.spec.selectable||u instanceof r.qv&&u.from<=a&&u.to>a)&&(this.mightDrag={node:s,pos:a,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&T&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),e5(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>eS(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;if(this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(e8(e))),this.updateAllowDefault(e),this.allowDefault||!t)e5(this.view,"pointer");else{var n,o,s,a,l;if(n=this.view,o=t.pos,s=t.inside,a=e,l=this.selectNode,e9(n,"handleClickOn",o,s,a)||n.someProp("handleClick",e=>e(n,o,a))||(l?function(e,t){if(-1==t)return!1;let n=e.state.selection,o,s;n instanceof r.qv&&(o=n.node);let a=e.state.doc.resolve(t);for(let e=a.depth+1;e>0;e--){let t=e>a.depth?a.nodeAfter:a.node(e);if(r.qv.isSelectable(t)){s=o&&n.$from.depth>0&&e>=n.$from.depth&&a.before(n.$from.depth+1)==n.$from.pos?a.before(n.$from.depth):a.before(e);break}}return null!=s&&(e7(e,r.qv.create(e.state.doc,s),"pointer"),!0)}(n,s):function(e,t){if(-1==t)return!1;let n=e.state.doc.resolve(t),o=n.nodeAfter;return!!(o&&o.isAtom&&r.qv.isSelectable(o))&&(e7(e,new r.qv(n),"pointer"),!0)}(n,s)))e.preventDefault();else 0==e.button&&(this.flushed||I&&this.mightDrag&&!this.mightDrag.node.isAtom||O&&!this.view.state.selection.visible&&2>=Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to)))?(e7(this.view,r.Y1.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):e5(this.view,"pointer")}}move(e){this.updateAllowDefault(e),e5(this.view,"pointer"),0==e.buttons&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}function tr(e,t){return!!e.composing||!!(I&&500>Math.abs(t.timeStamp-e.input.compositionEndedAt))&&(e.input.compositionEndedAt=-2e8,!0)}e0.touchstart=e=>{e.input.lastTouch=Date.now(),ta(e),e5(e,"pointer")},e0.touchmove=e=>{e.input.lastTouch=Date.now(),e5(e,"pointer")},e0.contextmenu=e=>ta(e);let ti=R?5e3:-1;function to(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>ta(e),t))}function ts(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=function(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}e1.compositionstart=e1.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof r.Bs&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(e=>!1===e.type.spec.inclusive)))e.markCursor=e.state.storedMarks||n.marks(),ta(e,!0),e.markCursor=null;else if(ta(e,!t.selection.empty),T&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let t=e.domSelectionRange();for(let n=t.focusNode,r=t.focusOffset;n&&1==n.nodeType&&0!=r;){let t=r<0?n.lastChild:n.childNodes[r-1];if(!t)break;if(3==t.nodeType){let n=e.domSelection();n&&n.collapse(t,t.nodeValue.length);break}n=t,r=-1}}e.input.composing=!0}to(e,ti)},e1.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,to(e,20))};function ta(e,t=!1){if(!R||!(e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),ts(e),t||e.docView&&e.docView.dirty){let n=ex(e),r=e.state.selection;return n&&!n.eq(r)?e.dispatch(e.state.tr.setSelection(n)):(e.markCursor||t)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?e.dispatch(e.state.tr.deleteSelection()):e.updateState(e.state),!0}return!1}}let tl=C&&E<15||P&&j<604;e0.copy=e1.cut=(e,t)=>{let n=e.state.selection,r="cut"==t.type;if(n.empty)return;let o=tl?null:t.clipboardData,{dom:s,text:a}=eV(e,n.content());o?(t.preventDefault(),o.clearData(),o.setData("text/html",s.innerHTML),o.setData("text/plain",a)):!function(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}(e,s),r&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function tc(e,t,n,r,s){var a;let l=eq(e,t,n,r,e.state.selection.$from);if(e.someProp("handlePaste",t=>t(e,s,l||o.p2.empty)))return!0;if(!l)return!1;let c=0==(a=l).openStart&&0==a.openEnd&&1==a.content.childCount?a.content.firstChild:null,u=c?e.state.tr.replaceSelectionWith(c,r):e.state.tr.replaceSelection(l);return e.dispatch(u.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function tu(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let n=e.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}e1.paste=(e,t)=>{if(e.composing&&!R)return;let n=tl?null:t.clipboardData,r=e.input.shiftKey&&45!=e.input.lastKeyCode;n&&tc(e,tu(n),n.getData("text/html"),r,t)?t.preventDefault():!function(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));!n&&(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let o=e.input.shiftKey&&45!=e.input.lastKeyCode;setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?tc(e,r.value,null,o,t):tc(e,r.textContent,r.innerHTML,o,t)},50)}(e,t)};class td{constructor(e,t,n){this.slice=e,this.move=t,this.node=n}}let tp=D?"altKey":"ctrlKey";function th(e,t){let n=e.someProp("dragCopies",e=>!e(t));return null!=n?n:!t[tp]}for(let e in e0.dragstart=(e,t)=>{let n;let o=e.input.mouseDown;if(o&&o.done(),!t.dataTransfer)return;let s=e.state.selection,a=s.empty?null:e.posAtCoords(e8(t));if(a&&a.pos>=s.from&&a.pos<=(s instanceof r.qv?s.to-1:s.to));else if(o&&o.mightDrag)n=r.qv.create(e.state.doc,o.mightDrag.pos);else if(t.target&&1==t.target.nodeType){let o=e.docView.nearestDesc(t.target,!0);o&&o.node.type.spec.draggable&&o!=e.docView&&(n=r.qv.create(e.state.doc,o.posBefore))}let l=(n||e.state.selection).content(),{dom:c,text:u,slice:d}=eV(e,l);(!t.dataTransfer.files.length||!O||M>120)&&t.dataTransfer.clearData(),t.dataTransfer.setData(tl?"Text":"text/html",c.innerHTML),t.dataTransfer.effectAllowed="copyMove",!tl&&t.dataTransfer.setData("text/plain",u),e.dragging=new td(d,th(e,t),n)},e0.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)},e1.dragover=e1.dragenter=(e,t)=>t.preventDefault(),e1.drop=(e,t)=>{let n=e.dragging;if(e.dragging=null,!t.dataTransfer)return;let a=e.posAtCoords(e8(t));if(!a)return;let l=e.state.doc.resolve(a.pos),c=n&&n.slice;c?e.someProp("transformPasted",t=>{c=t(c,e)}):c=eq(e,tu(t.dataTransfer),tl?null:t.dataTransfer.getData("text/html"),!1,l);let u=!!(n&&th(e,t));if(e.someProp("handleDrop",n=>n(e,t,c||o.p2.empty,u))){t.preventDefault();return}if(!c)return;t.preventDefault();let d=c?(0,s.nj)(e.state.doc,l.pos,c):l.pos;null==d&&(d=l.pos);let p=e.state.tr;if(u){let{node:e}=n;e?e.replace(p):p.deleteSelection()}let h=p.mapping.map(d),f=0==c.openStart&&0==c.openEnd&&1==c.content.childCount,m=p.doc;if(f?p.replaceRangeWith(h,h,c.content.firstChild):p.replaceRange(h,h,c),p.doc.eq(m))return;let g=p.doc.resolve(h);if(f&&r.qv.isSelectable(c.content.firstChild)&&g.nodeAfter&&g.nodeAfter.sameMarkup(c.content.firstChild))p.setSelection(new r.qv(g));else{let t=p.mapping.map(d);p.mapping.maps[p.mapping.maps.length-1].forEach((e,n,r,o)=>t=o),p.setSelection(eO(e,g,p.doc.resolve(t)))}e.focus(),e.dispatch(p.setMeta("uiEvent","drop"))},e0.focus=e=>{e.input.lastFocus=Date.now(),!e.focused&&(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&eS(e)},20))},e0.blur=(e,t)=>{e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),t.relatedTarget&&e.dom.contains(t.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)},e0.beforeinput=(e,t)=>{if(O&&R&&"deleteContentBackward"==t.inputType){e.domObserver.flushSoon();let{domChangeCount:t}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=t)return;if(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",t=>t(e,b(8,"Backspace"))))return;let{$cursor:n}=e.state.selection;n&&n.pos>0&&e.dispatch(e.state.tr.delete(n.pos-1,n.pos).scrollIntoView())},50)}},e1)e0[e]=e1[e];function tf(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class tm{constructor(e,t){this.toDOM=e,this.spec=t||tx,this.side=this.spec.side||0}map(e,t,n,r){let{pos:o,deleted:s}=e.mapResult(t.from+r,this.side<0?-1:1);return s?null:new tb(o-n,o-n,this)}valid(){return!0}eq(e){return this==e||e instanceof tm&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&tf(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class tg{constructor(e,t){this.attrs=e,this.spec=t||tx}map(e,t,n,r){let o=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,s=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return o>=s?null:new tb(o,s,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof tg&&tf(this.attrs,e.attrs)&&tf(this.spec,e.spec)}static is(e){return e.type instanceof tg}destroy(){}}class tv{constructor(e,t){this.attrs=e,this.spec=t||tx}map(e,t,n,r){let o=e.mapResult(t.from+r,1);if(o.deleted)return null;let s=e.mapResult(t.to+r,-1);return s.deleted||s.pos<=o.pos?null:new tb(o.pos-n,s.pos-n,this)}valid(e,t){let{index:n,offset:r}=e.content.findIndex(t.from),o;return r==t.from&&!(o=e.child(n)).isText&&r+o.nodeSize==t.to}eq(e){return this==e||e instanceof tv&&tf(this.attrs,e.attrs)&&tf(this.spec,e.spec)}destroy(){}}class tb{constructor(e,t,n){this.from=e,this.to=t,this.type=n}copy(e,t){return new tb(e,t,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,n){return this.type.map(e,this,t,n)}static widget(e,t,n){return new tb(e,e,new tm(t,n))}static inline(e,t,n,r){return new tb(e,t,new tg(n,r))}static node(e,t,n,r){return new tb(e,t,new tv(n,r))}get spec(){return this.type.spec}get inline(){return this.type instanceof tg}get widget(){return this.type instanceof tm}}let ty=[],tx={};class tw{constructor(e,t){this.local=e.length?e:ty,this.children=t.length?t:ty}static create(e,t){return t.length?tT(t,e,0,tx):tS}find(e,t,n){let r=[];return this.findInner(null==e?0:e,null==t?1e9:t,r,0,n),r}findInner(e,t,n,r,o){for(let s=0;s<this.local.length;s++){let a=this.local[s];a.from<=t&&a.to>=e&&(!o||o(a.spec))&&n.push(a.copy(a.from+r,a.to+r))}for(let s=0;s<this.children.length;s+=3)if(this.children[s]<t&&this.children[s+1]>e){let a=this.children[s]+1;this.children[s+2].findInner(e-a,t-a,n,r+a,o)}}map(e,t,n){return this==tS||0==e.maps.length?this:this.mapInner(e,t,0,0,n||tx)}mapInner(e,t,n,r,o){let s;for(let a=0;a<this.local.length;a++){let l=this.local[a].map(e,n,r);l&&l.type.valid(t,l)?(s||(s=[])).push(l):o.onRemove&&o.onRemove(this.local[a].spec)}return this.children.length?function(e,t,n,r,o,s,a){let l=e.slice();for(let e=0,t=s;e<n.maps.length;e++){let r=0;n.maps[e].forEach((e,n,o,s)=>{let a=s-o-(n-e);for(let o=0;o<l.length;o+=3){let s=l[o+1];if(s<0||e>s+t-r)continue;let c=l[o]+t-r;n>=c?l[o+1]=e<=c?-2:-1:e>=t&&a&&(l[o]+=a,l[o+1]+=a)}r+=a}),t=n.maps[e].map(t,-1)}let c=!1;for(let t=0;t<l.length;t+=3)if(l[t+1]<0){if(-2==l[t+1]){c=!0,l[t+1]=-1;continue}let u=n.map(e[t]+s),d=u-o;if(d<0||d>=r.content.size){c=!0;continue}let p=n.map(e[t+1]+s,-1)-o,{index:h,offset:f}=r.content.findIndex(d),m=r.maybeChild(h);if(m&&f==d&&f+m.nodeSize==p){let r=l[t+2].mapInner(n,m,u+1,e[t]+s+1,a);r!=tS?(l[t]=d,l[t+1]=p,l[t+2]=r):(l[t+1]=-2,c=!0)}else c=!0}if(c){let c=tT(function(e,t,n,r,o,s,a){for(let l=0;l<e.length;l+=3)-1==e[l+1]&&!function e(t,s){for(let e=0;e<t.local.length;e++){let l=t.local[e].map(r,o,s);l?n.push(l):a.onRemove&&a.onRemove(t.local[e].spec)}for(let n=0;n<t.children.length;n+=3)e(t.children[n+2],t.children[n]+s+1)}(e[l+2],t[l]+s+1);return n}(l,e,t,n,o,s,a),r,0,a);t=c.local;for(let e=0;e<l.length;e+=3)l[e+1]<0&&(l.splice(e,3),e-=3);for(let e=0,t=0;e<c.children.length;e+=3){let n=c.children[e];for(;t<l.length&&l[t]<n;)t+=3;l.splice(t,0,c.children[e],c.children[e+1],c.children[e+2])}}return new tw(t.sort(t_),l)}(this.children,s||[],e,t,n,r,o):s?new tw(s.sort(t_),ty):tS}add(e,t){return t.length?this==tS?tw.create(e,t):this.addInner(e,t,0):this}addInner(e,t,n){let r,o=0;e.forEach((e,s)=>{let a=s+n,l;if(l=tC(t,e,a)){for(!r&&(r=this.children.slice());o<r.length&&r[o]<s;)o+=3;r[o]==s?r[o+2]=r[o+2].addInner(e,l,a+1):r.splice(o,0,s,s+e.nodeSize,tT(l,e,a+1,tx)),o+=3}});let s=tA(o?tE(t):t,-n);for(let t=0;t<s.length;t++)!s[t].type.valid(e,s[t])&&s.splice(t--,1);return new tw(s.length?this.local.concat(s).sort(t_):this.local,r||this.children)}remove(e){return 0==e.length||this==tS?this:this.removeInner(e,0)}removeInner(e,t){let n=this.children,r=this.local;for(let r=0;r<n.length;r+=3){let o;let s=n[r]+t,a=n[r+1]+t;for(let t=0,n;t<e.length;t++)(n=e[t])&&n.from>s&&n.to<a&&(e[t]=null,(o||(o=[])).push(n));if(!o)continue;n==this.children&&(n=this.children.slice());let l=n[r+2].removeInner(o,s+1);l!=tS?n[r+2]=l:(n.splice(r,3),r-=3)}if(r.length){for(let n=0,o;n<e.length;n++)if(o=e[n])for(let e=0;e<r.length;e++)r[e].eq(o,t)&&(r==this.local&&(r=this.local.slice()),r.splice(e--,1))}return n==this.children&&r==this.local?this:r.length||n.length?new tw(r,n):tS}forChild(e,t){let n,r;if(this==tS)return this;if(t.isLeaf)return tw.empty;for(let t=0;t<this.children.length;t+=3)if(this.children[t]>=e){this.children[t]==e&&(n=this.children[t+2]);break}let o=e+1,s=o+t.content.size;for(let e=0;e<this.local.length;e++){let t=this.local[e];if(t.from<s&&t.to>o&&t.type instanceof tg){let e=Math.max(o,t.from)-o,n=Math.min(s,t.to)-o;e<n&&(r||(r=[])).push(t.copy(e,n))}}if(r){let e=new tw(r.sort(t_),ty);return n?new tk([e,n]):e}return n||tS}eq(e){if(this==e)return!0;if(!(e instanceof tw)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(let t=0;t<this.children.length;t+=3)if(this.children[t]!=e.children[t]||this.children[t+1]!=e.children[t+1]||!this.children[t+2].eq(e.children[t+2]))return!1;return!0}locals(e){return tO(this.localsInner(e))}localsInner(e){if(this==tS)return ty;if(e.inlineContent||!this.local.some(tg.is))return this.local;let t=[];for(let e=0;e<this.local.length;e++)!(this.local[e].type instanceof tg)&&t.push(this.local[e]);return t}forEachSet(e){e(this)}}tw.empty=new tw([],[]),tw.removeOverlap=tO;let tS=tw.empty;class tk{constructor(e){this.members=e}map(e,t){let n=this.members.map(n=>n.map(e,t,tx));return tk.from(n)}forChild(e,t){if(t.isLeaf)return tw.empty;let n=[];for(let r=0;r<this.members.length;r++){let o=this.members[r].forChild(e,t);o!=tS&&(o instanceof tk?n=n.concat(o.members):n.push(o))}return tk.from(n)}eq(e){if(!(e instanceof tk)||e.members.length!=this.members.length)return!1;for(let t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0}locals(e){let t,n=!0;for(let r=0;r<this.members.length;r++){let o=this.members[r].localsInner(e);if(o.length){if(t){n&&(t=t.slice(),n=!1);for(let e=0;e<o.length;e++)t.push(o[e])}else t=o}}return t?tO(n?t:t.sort(t_)):ty}static from(e){switch(e.length){case 0:return tS;case 1:return e[0];default:return new tk(e.every(e=>e instanceof tw)?e:e.reduce((e,t)=>e.concat(t instanceof tw?t:t.members),[]))}}forEachSet(e){for(let t=0;t<this.members.length;t++)this.members[t].forEachSet(e)}}function tA(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let o=e[r];n.push(new tb(o.from+t,o.to+t,o.type))}return n}function tC(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,o=null;for(let t=0,s;t<e.length;t++)(s=e[t])&&s.from>n&&s.to<r&&((o||(o=[])).push(s),e[t]=null);return o}function tE(e){let t=[];for(let n=0;n<e.length;n++)null!=e[n]&&t.push(e[n]);return t}function tT(e,t,n,r){let o=[],s=!1;t.forEach((t,a)=>{let l=tC(e,t,a+n);if(l){s=!0;let e=tT(l,t,n+a+1,r);e!=tS&&o.push(a,a+t.nodeSize,e)}});let a=tA(s?tE(e):e,-n).sort(t_);for(let e=0;e<a.length;e++)!a[e].type.valid(t,a[e])&&(r.onRemove&&r.onRemove(a[e].spec),a.splice(e--,1));return a.length||o.length?new tw(a,o):tS}function t_(e,t){return e.from-t.from||e.to-t.to}function tO(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let o=n+1;o<t.length;o++){let s=t[o];if(s.from==r.from){s.to!=r.to&&(t==e&&(t=e.slice()),t[o]=s.copy(s.from,r.to),tM(t,o+1,s.copy(r.to,s.to)));continue}s.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,s.from),tM(t,o,r.copy(s.from,r.to)));break}}return t}function tM(e,t,n){for(;t<e.length&&t_(n,e[t])>0;)t++;e.splice(t,0,n)}function tI(e){let t=[];return e.someProp("decorations",n=>{let r=n(e.state);r&&r!=tS&&t.push(r)}),e.cursorWrapper&&t.push(tw.create(e.state.doc,[e.cursorWrapper.deco])),tk.from(t)}let tP={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},tD=C&&E<=11;class tN{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class tR{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new tN,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(e=>{for(let t=0;t<e.length;t++)this.queue.push(e[t]);C&&E<=11&&e.some(e=>"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():this.flush()}),tD&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,tP)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;t<e.length;t++)this.queue.push(e[t]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(eM(this.view)){if(this.suppressingSelectionUpdates)return eS(this.view);if(C&&E<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&p(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t=new Set,n;for(let n=e.focusNode;n;n=l(n))t.add(n);for(let r=e.anchorNode;r;r=l(r))if(t.has(r)){n=r;break}let r=n&&this.view.docView.nearestDesc(n);if(r&&r.ignoreMutation({type:"selection",target:3==n.nodeType?n.parentNode:n}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let t=this.pendingRecords();t.length&&(this.queue=[]);let n=e.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&eM(e)&&!this.ignoreSelectionChange(n),s=-1,a=-1,l=!1,c=[];if(e.editable)for(let e=0;e<t.length;e++){let n=this.registerMutation(t[e],c);n&&(s=s<0?n.from:Math.min(n.from,s),a=a<0?n.to:Math.max(n.to,a),n.typeOver&&(l=!0))}if(T&&c.length){let t=c.filter(e=>"BR"==e.nodeName);if(2==t.length){let[e,n]=t;e.parentNode&&e.parentNode.parentNode==n.parentNode?n.remove():e.remove()}else{let{focusNode:n}=this.currentSelection;for(let r of t){let t=r.parentNode;t&&"LI"==t.nodeName&&(!n||function(e,t){for(let n=t.parentNode;n&&n!=e.dom;n=n.parentNode){let t=e.docView.nearestDesc(n,!0);if(t&&t.node.isBlock)return n}return null}(e,n)!=t)&&r.remove()}}}let u=null;s<0&&o&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&v(n)&&(u=ex(e))&&u.eq(r.Y1.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,eS(e),this.currentSelection.set(n),e.scrollToSelection()):(s>-1||o)&&(s>-1&&(e.docView.markDirty(s,a),function(e){if(!tL.has(e)&&(tL.set(e,null),-1!==["normal","nowrap","pre-line"].indexOf(getComputedStyle(e.dom).whiteSpace))){if(e.requiresGeckoHackNode=T,!tj)console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),tj=!0}}(e)),this.handleDOMChange(s,a,l,c),e.docView&&e.docView.dirty?e.updateState(e.state):!this.currentSelection.eq(n)&&eS(e),this.currentSelection.set(n))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let n=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(n==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style"))||!n||n.ignoreMutation(e))return null;if("childList"==e.type){for(let n=0;n<e.addedNodes.length;n++){let r=e.addedNodes[n];t.push(r),3==r.nodeType&&(this.lastChangedTextNode=r)}if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};let r=e.previousSibling,o=e.nextSibling;if(C&&E<=11&&e.addedNodes.length)for(let t=0;t<e.addedNodes.length;t++){let{previousSibling:n,nextSibling:s}=e.addedNodes[t];(!n||0>Array.prototype.indexOf.call(e.addedNodes,n))&&(r=n),(!s||0>Array.prototype.indexOf.call(e.addedNodes,s))&&(o=s)}let s=r&&r.parentNode==e.target?a(r)+1:0,l=n.localPosFromDOM(e.target,s,-1),c=o&&o.parentNode==e.target?a(o):e.target.childNodes.length;return{from:l,to:n.localPosFromDOM(e.target,c,1)}}if("attributes"==e.type)return{from:n.posAtStart-n.border,to:n.posAtEnd+n.border};return this.lastChangedTextNode=e.target,{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}}}let tL=new WeakMap,tj=!1;function t$(e,t){let n=t.startContainer,r=t.startOffset,o=t.endContainer,s=t.endOffset,a=e.domAtPos(e.state.selection.anchor);return p(a.node,a.offset,o,s)&&([n,r,o,s]=[o,s,n,r]),{anchorNode:n,anchorOffset:r,focusNode:o,focusOffset:s}}function tF(e){let t=e.pmViewDesc;if(t)return t.parseRule();if("BR"==e.nodeName&&e.parentNode){if(I&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let e=document.createElement("div");return e.appendChild(document.createElement("li")),{skip:e}}if(e.parentNode.lastChild==e||I&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if("IMG"==e.nodeName&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}let tz=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function tB(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:eO(e,t.resolve(n.anchor),t.resolve(n.head))}function tH(e,t,n){let r=e.depth,o=t?e.end():e.pos;for(;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,o++,t=!1;if(n){let t=e.node(r).maybeChild(e.indexAfter(r));for(;t&&!t.isLeaf;)t=t.firstChild,o++}return o}function tU(e){if(2!=e.length)return!1;let t=e.charCodeAt(0),n=e.charCodeAt(1);return t>=56320&&t<=57343&&n>=55296&&n<=56319}class tV{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new e3,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(tY),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):"function"==typeof e?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=tG(this),tW(this),this.nodeViews=tK(this),this.docView=es(this.state.doc,tq(this),tI(this),this.dom,this),this.domObserver=new tR(this,(e,t,n,s)=>(function(e,t,n,s,a){let l,c,u,d,p=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let t=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,n=ex(e,t);if(n&&!e.state.selection.eq(n)){if(O&&R&&13===e.input.lastKeyCode&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp("handleKeyDown",t=>t(e,b(13,"Enter"))))return;let r=e.state.tr.setSelection(n);"pointer"==t?r.setMeta("pointer",!0):"key"==t&&r.scrollIntoView(),p&&r.setMeta("composition",p),e.dispatch(r)}return}let h=e.state.doc.resolve(t),f=h.sharedDepth(n);t=h.before(f+1),n=e.state.doc.resolve(n).after(f+1);let m=e.state.selection,g=function(e,t,n){let r,{node:s,fromOffset:a,toOffset:l,from:c,to:u}=e.docView.parseRange(t,n),d=e.domSelectionRange(),p=d.anchorNode;if(p&&e.dom.contains(1==p.nodeType?p:p.parentNode)&&(r=[{node:p,offset:d.anchorOffset}],!v(d)&&r.push({node:d.focusNode,offset:d.focusOffset})),O&&8===e.input.lastKeyCode)for(let e=l;e>a;e--){let t=s.childNodes[e-1],n=t.pmViewDesc;if("BR"==t.nodeName&&!n){l=e;break}if(!n||n.size)break}let h=e.state.doc,f=e.someProp("domParser")||o.aw.fromSchema(e.state.schema),m=h.resolve(c),g=null,b=f.parse(s,{topNode:m.parent,topMatch:m.parent.contentMatchAt(m.index()),topOpen:!0,from:a,to:l,preserveWhitespace:"pre"!=m.parent.type.whitespace||"full",findPositions:r,ruleFromNode:tF,context:m});if(r&&null!=r[0].pos){let e=r[0].pos,t=r[1]&&r[1].pos;null==t&&(t=e),g={anchor:e+c,head:t+c}}return{doc:b,sel:g,from:c,to:u}}(e,t,n),y=e.state.doc,x=y.slice(g.from,g.to);8===e.input.lastKeyCode&&Date.now()-100<e.input.lastKeyCodeTime?(l=e.state.selection.to,c="end"):(l=e.state.selection.from,c="start"),e.input.lastKeyCode=null;let w=function(e,t,n,r,o){let s=e.findDiffStart(t,n);if(null==s)return null;let{a:a,b:l}=e.findDiffEnd(t,n+e.size,n+t.size);if("end"==o){let e=Math.max(0,s-Math.min(a,l));r-=a+e-s}if(a<s&&e.size<t.size){let e=r<=s&&r>=a?s-r:0;(s-=e)&&s<t.size&&tU(t.textBetween(s-1,s+1))&&(s+=e?1:-1),l=s+(l-a),a=s}else if(l<s){let t=r<=s&&r>=l?s-r:0;(s-=t)&&s<e.size&&tU(e.textBetween(s-1,s+1))&&(s+=t?1:-1),a=s+(a-l),l=s}return{start:s,endA:a,endB:l}}(x.content,g.doc.content,g.from,l,c);if(w&&e.input.domChangeCount++,(P&&e.input.lastIOSEnter>Date.now()-225||R)&&a.some(e=>1==e.nodeType&&!tz.test(e.nodeName))&&(!w||w.endA>=w.endB)&&e.someProp("handleKeyDown",t=>t(e,b(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!w){if(s&&m instanceof r.Bs&&!m.empty&&m.$head.sameParent(m.$anchor)&&!e.composing&&!(g.sel&&g.sel.anchor!=g.sel.head))w={start:m.from,endA:m.to,endB:m.to};else{if(g.sel){let t=tB(e,e.state.doc,g.sel);if(t&&!t.eq(e.state.selection)){let n=e.state.tr.setSelection(t);p&&n.setMeta("composition",p),e.dispatch(n)}}return}}e.state.selection.from<e.state.selection.to&&w.start==w.endB&&e.state.selection instanceof r.Bs&&(w.start>e.state.selection.from&&w.start<=e.state.selection.from+2&&e.state.selection.from>=g.from?w.start=e.state.selection.from:w.endA<e.state.selection.to&&w.endA>=e.state.selection.to-2&&e.state.selection.to<=g.to&&(w.endB+=e.state.selection.to-w.endA,w.endA=e.state.selection.to)),C&&E<=11&&w.endB==w.start+1&&w.endA==w.start&&w.start>g.from&&" \xa0"==g.doc.textBetween(w.start-g.from-1,w.start-g.from+1)&&(w.start--,w.endA--,w.endB--);let S=g.doc.resolveNoCache(w.start-g.from),k=g.doc.resolveNoCache(w.endB-g.from),A=y.resolve(w.start),T=S.sameParent(k)&&S.parent.inlineContent&&A.end()>=w.endA;if((P&&e.input.lastIOSEnter>Date.now()-225&&(!T||a.some(e=>"DIV"==e.nodeName||"P"==e.nodeName))||!T&&S.pos<g.doc.content.size&&(!S.sameParent(k)||!S.parent.inlineContent)&&!/\S/.test(g.doc.textBetween(S.pos,k.pos,"",""))&&(u=r.Y1.findFrom(g.doc.resolve(S.pos+1),1,!0))&&u.head>S.pos)&&e.someProp("handleKeyDown",t=>t(e,b(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>w.start&&function(e,t,n,r,o){if(n-t<=o.pos-r.pos||tH(r,!0,!1)<o.pos)return!1;let s=e.resolve(t);if(!r.parent.isTextblock){let e=s.nodeAfter;return null!=e&&n==t+e.nodeSize}if(s.parentOffset<s.parent.content.size||!s.parent.isTextblock)return!1;let a=e.resolve(tH(s,!0,!0));return!(!a.parent.isTextblock||a.pos>n||tH(a,!0,!1)<n)&&r.parent.content.cut(r.parentOffset).eq(a.parent.content)}(y,w.start,w.endA,S,k)&&e.someProp("handleKeyDown",t=>t(e,b(8,"Backspace")))){R&&O&&e.domObserver.suppressSelectionUpdates();return}O&&w.endB==w.start&&(e.input.lastChromeDelete=Date.now()),R&&!T&&S.start()!=k.start()&&0==k.parentOffset&&S.depth==k.depth&&g.sel&&g.sel.anchor==g.sel.head&&g.sel.head==w.endA&&(w.endB-=2,k=g.doc.resolveNoCache(w.endB-g.from),setTimeout(()=>{e.someProp("handleKeyDown",function(t){return t(e,b(13,"Enter"))})},20));let _=w.start,M=w.endA,I=t=>{let n=t||e.state.tr.replace(_,M,g.doc.slice(w.start-g.from,w.endB-g.from));if(g.sel){let t=tB(e,n.doc,g.sel);t&&!(O&&e.composing&&t.empty&&(w.start!=w.endB||e.input.lastChromeDelete<Date.now()-100)&&(t.head==_||t.head==n.mapping.map(M)-1)||C&&t.empty&&t.head==_)&&n.setSelection(t)}return p&&n.setMeta("composition",p),n.scrollIntoView()};if(T){if(S.pos==k.pos){C&&E<=11&&0==S.parentOffset&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>eS(e),20));let t=I(e.state.tr.delete(_,M)),n=y.resolve(w.start).marksAcross(y.resolve(w.endA));n&&t.ensureMarks(n),e.dispatch(t)}else if(w.endA==w.endB&&(d=function(e,t){let n=e.firstChild.marks,r=t.firstChild.marks,s=n,a=r,l,c,u;for(let e=0;e<r.length;e++)s=r[e].removeFromSet(s);for(let e=0;e<n.length;e++)a=n[e].removeFromSet(a);if(1==s.length&&0==a.length)c=s[0],l="add",u=e=>e.mark(c.addToSet(e.marks));else{if(0!=s.length||1!=a.length)return null;c=a[0],l="remove",u=e=>e.mark(c.removeFromSet(e.marks))}let d=[];for(let e=0;e<t.childCount;e++)d.push(u(t.child(e)));if(o.HY.from(d).eq(e))return{mark:c,type:l}}(S.parent.content.cut(S.parentOffset,k.parentOffset),A.parent.content.cut(A.parentOffset,w.endA-A.start())))){let t=I(e.state.tr);"add"==d.type?t.addMark(_,M,d.mark):t.removeMark(_,M,d.mark),e.dispatch(t)}else if(S.parent.child(S.index()).isText&&S.index()==k.index()-(k.textOffset?0:1)){let t=S.parent.textBetween(S.parentOffset,k.parentOffset),n=()=>I(e.state.tr.insertText(t,_,M));!e.someProp("handleTextInput",r=>r(e,_,M,t,n))&&e.dispatch(n())}}else e.dispatch(I())})(this,e,t,n,s)),this.domObserver.start(),!function(e){for(let t in e0){let n=e0[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=t=>{(function(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0})(e,t)&&!e6(e,t)&&(e.editable||!(t.type in e1))&&n(e,t)},e2[t]?{passive:!0}:void 0)}I&&e.dom.addEventListener("input",()=>null),e4(e)}(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;for(let t in this._props={},e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&e4(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(tY),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let e in this._props)t[e]=this._props[e];for(let n in t.state=this.state,e)t[n]=e[n];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){var n,r;let o=this.state,s=!1,l=!1;e.storedMarks&&this.composing&&(ts(this),l=!0),this.state=e;let c=o.plugins!=e.plugins||this._props.plugins!=t.plugins;if(c||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let e=tK(this);(function(e,t){let n=0,r=0;for(let r in e){if(e[r]!=t[r])return!0;n++}for(let e in t)r++;return n!=r})(e,this.nodeViews)&&(this.nodeViews=e,s=!0)}(c||t.handleDOMEvents!=this._props.handleDOMEvents)&&e4(this),this.editable=tG(this),tW(this);let u=tI(this),d=tq(this),h=o.plugins==e.plugins||o.doc.eq(e.doc)?e.scrollToSelection>o.scrollToSelection?"to selection":"preserve":"reset",f=s||!this.docView.matchesNode(e.doc,d,u);(f||!e.selection.eq(o.selection))&&(l=!0);let v="preserve"==h&&l&&null==this.dom.style.overflowAnchor&&function(e){let t,n,r=e.dom.getBoundingClientRect(),o=Math.max(0,r.top);for(let s=(r.left+r.right)/2,a=o+1;a<Math.min(innerHeight,r.bottom);a+=5){let r=e.root.elementFromPoint(s,a);if(!r||r==e.dom||!e.dom.contains(r))continue;let l=r.getBoundingClientRect();if(l.top>=o-20){t=r,n=l.top;break}}return{refDOM:t,refTop:n,stack:z(e.dom)}}(this);if(l){;let t,n;this.domObserver.stop();let l=f&&(C||O)&&!this.composing&&!o.selection.empty&&!e.selection.empty&&function(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}(o.selection,e.selection);if(f){let t=O?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=function(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=function(e,t){for(;;){if(3==e.nodeType&&t)return e;if(1==e.nodeType&&t>0){if("false"==e.contentEditable)return null;t=m(e=e.childNodes[t-1])}else{if(!e.parentNode||g(e))return null;t=a(e),e=e.parentNode}}}(t.focusNode,t.focusOffset),r=function(e,t){for(;;){if(3==e.nodeType&&t<e.nodeValue.length)return e;if(1==e.nodeType&&t<e.childNodes.length){if("false"==e.contentEditable)return null;e=e.childNodes[t],t=0}else{if(!e.parentNode||g(e))return null;t=a(e)+1,e=e.parentNode}}}(t.focusNode,t.focusOffset);if(n&&r&&n!=r){let t=r.pmViewDesc,o=e.domObserver.lastChangedTextNode;if(n==o||r==o)return o;if(!t||!t.isText(r.nodeValue))return r;if(e.input.compositionNode==r){let e=n.pmViewDesc;if(!(!e||!e.isText(n.nodeValue)))return r}}return n||r}(this)),(s||!this.docView.update(e.doc,d,u,this))&&(this.docView.updateOuterDeco(d),this.docView.destroy(),this.docView=es(e.doc,d,u,this.dom,this)),t&&!this.trackWrites&&(l=!0)}if(l||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&(r=this,t=r.docView.domFromPos(r.state.selection.anchor,0),n=r.domSelectionRange(),p(t.node,t.offset,n.anchorNode,n.anchorOffset))))eS(this,l);else eT(this,e.selection),this.domObserver.setCurSelection();this.domObserver.start()}this.updatePluginViews(o),(null===(n=this.dragging)||void 0===n?void 0:n.node)&&!o.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,o),"reset"==h?this.dom.scrollTop=0:"to selection"==h?this.scrollToSelection():v&&!function({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;B(n,0==r?0:r-t)}(v)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(e&&this.dom.contains(1==e.nodeType?e:e.parentNode)){if(this.someProp("handleScrollToSelection",e=>e(this)));else if(this.state.selection instanceof r.qv){let t=this.docView.domAfterPos(this.state.selection.from);1==t.nodeType&&F(this,t.getBoundingClientRect(),e)}else F(this,this.coordsAtPos(this.state.selection.head,1),e)}else;}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(e&&e.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(let t=0;t<this.pluginViews.length;t++){let n=this.pluginViews[t];n.update&&n.update(this,e)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let e=0;e<this.directPlugins.length;e++){let t=this.directPlugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}for(let e=0;e<this.state.plugins.length;e++){let t=this.state.plugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}}}updateDraggedNode(e,t){let n=e.node,o=-1;if(this.state.doc.nodeAt(n.from)==n.node)o=n.from;else{let e=n.from+(this.state.doc.content.size-t.doc.content.size);(e>0&&this.state.doc.nodeAt(e))==n.node&&(o=e)}this.dragging=new td(e.slice,e.move,o<0?void 0:r.qv.create(this.state.doc,o))}someProp(e,t){let n=this._props&&this._props[e],r;if(null!=n&&(r=t?t(n):n))return r;for(let n=0;n<this.directPlugins.length;n++){let o=this.directPlugins[n].props[e];if(null!=o&&(r=t?t(o):o))return r}let o=this.state.plugins;if(o)for(let n=0;n<o.length;n++){let s=o[n].props[e];if(null!=s&&(r=t?t(s):s))return r}}hasFocus(){if(C){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if("false"==e.contentEditable)return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&!function(e){if(e.setActive)return e.setActive();if(H)return e.focus(H);let t=z(e);e.focus(null==H?{get preventScroll(){return H={preventScroll:!0},!0}}:void 0),!H&&(H=!1,B(t,0))}(this.dom),eS(this),this.domObserver.start()}get root(){let e=this._root;if(null==e){for(let e=this.dom.parentNode;e;e=e.parentNode)if(9==e.nodeType||11==e.nodeType&&e.host)return!e.getSelection&&(Object.getPrototypeOf(e).getSelection=()=>e.ownerDocument.getSelection()),this._root=e}return e||document}updateRoot(){this._root=null}posAtCoords(e){return function(e,t){var n,r;let o,s,a=e.dom.ownerDocument,c,d=0,p=function(e,t,n){if(e.caretPositionFromPoint)try{let r=e.caretPositionFromPoint(t,n);if(r)return{node:r.offsetNode,offset:Math.min(m(r.offsetNode),r.offset)}}catch(e){}if(e.caretRangeFromPoint){let r=e.caretRangeFromPoint(t,n);if(r)return{node:r.startContainer,offset:Math.min(m(r.startContainer),r.startOffset)}}}(a,t.left,t.top);p&&({node:c,offset:d}=p);let h=(e.root.elementFromPoint?e.root:a).elementFromPoint(t.left,t.top);if(!h||!e.dom.contains(1!=h.nodeType?h.parentNode:h)){let n=e.dom.getBoundingClientRect();if(!U(t,n)||!(h=function e(t,n,r){let o=t.childNodes.length;if(o&&r.top<r.bottom)for(let s=Math.max(0,Math.min(o-1,Math.floor(o*(n.top-r.top)/(r.bottom-r.top))-2)),a=s;;){let r=t.childNodes[a];if(1==r.nodeType){let t=r.getClientRects();for(let o=0;o<t.length;o++){let s=t[o];if(U(n,s))return e(r,n,s)}}if((a=(a+1)%o)==s)break}return t}(e.dom,t,n)))return null}if(I)for(let e=h;c&&e;e=l(e))e.draggable&&(c=void 0);if(n=h,r=t,h=(o=n.parentNode)&&/^li$/i.test(o.nodeName)&&r.left<n.getBoundingClientRect().left?o:n,c){let n;if(T&&1==c.nodeType&&(d=Math.min(d,c.childNodes.length))<c.childNodes.length){let e=c.childNodes[d],n;"IMG"==e.nodeName&&(n=e.getBoundingClientRect()).right<=t.left&&n.bottom>t.top&&d++}L&&d&&1==c.nodeType&&1==(n=c.childNodes[d-1]).nodeType&&"false"==n.contentEditable&&n.getBoundingClientRect().top>=t.top&&d--,c==e.dom&&d==c.childNodes.length-1&&1==c.lastChild.nodeType&&t.top>c.lastChild.getBoundingClientRect().bottom?s=e.state.doc.content.size:(0==d||1!=c.nodeType||"BR"!=c.childNodes[d-1].nodeName)&&(s=function(e,t,n,r){let o=-1;for(let n=t,s=!1;n!=e.dom;){let t=e.docView.nearestDesc(n,!0),a;if(!t)return null;if(1==t.dom.nodeType&&(t.node.isBlock&&t.parent||!t.contentDOM)&&((a=t.dom.getBoundingClientRect()).width||a.height)&&(t.node.isBlock&&t.parent&&(!s&&a.left>r.left||a.top>r.top?o=t.posBefore:(!s&&a.right<r.left||a.bottom<r.top)&&(o=t.posAfter),s=!0),!t.contentDOM&&o<0&&!t.node.isText))return(t.node.isBlock?r.top<(a.top+a.bottom)/2:r.left<(a.left+a.right)/2)?t.posBefore:t.posAfter;n=t.dom.parentNode}return o>-1?o:e.docView.posFromDOM(t,n,-1)}(e,c,d,t))}null==s&&(s=function(e,t,n){let{node:r,offset:o}=function e(t,n){let r,o,s,a=2e8,l,c=0,d=n.top,p=n.top;for(let e=t.firstChild,h=0;e;e=e.nextSibling,h++){let t;if(1==e.nodeType)t=e.getClientRects();else{if(3!=e.nodeType)continue;t=u(e).getClientRects()}for(let u=0;u<t.length;u++){let f=t[u];if(f.top<=d&&f.bottom>=p){d=Math.max(f.bottom,d),p=Math.min(f.top,p);let t=f.left>n.left?f.left-n.left:f.right<n.left?n.left-f.right:0;if(t<a){s=e,a=t,l=t&&3==s.nodeType?{left:f.right<n.left?f.right:f.left,top:n.top}:n,1==e.nodeType&&t&&(c=h+(n.left>=(f.left+f.right)/2?1:0));continue}}else f.top>n.top&&!r&&f.left<=n.left&&f.right>=n.left&&(r=e,o={left:Math.max(f.left,Math.min(f.right,n.left)),top:f.top});!s&&(n.left>=f.right&&n.top>=f.top||n.left>=f.left&&n.top>=f.bottom)&&(c=h+1)}}return(!s&&r&&(s=r,l=o,a=0),s&&3==s.nodeType)?function(e,t){let n=e.nodeValue.length,r=document.createRange();for(let o=0;o<n;o++){r.setEnd(e,o+1),r.setStart(e,o);let n=q(r,1);if(n.top!=n.bottom&&U(t,n))return{node:e,offset:o+(t.left>=(n.left+n.right)/2?1:0)}}return{node:e,offset:0}}(s,l):!s||a&&1==s.nodeType?{node:t,offset:c}:e(s,l)}(t,n),s=-1;if(1==r.nodeType&&!r.firstChild){let e=r.getBoundingClientRect();s=e.left!=e.right&&n.left>(e.left+e.right)/2?1:-1}return e.docView.posFromDOM(r,o,s)}(e,h,t));let f=e.docView.nearestDesc(h,!0);return{pos:s,inside:f?f.posAtStart-f.border:-1}}(this,e)}coordsAtPos(e,t=1){return G(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,n=-1){let r=this.docView.posFromDOM(e,t,n);if(null==r)throw RangeError("DOM position not inside the editor");return r}endOfTextblock(e,t){return function(e,t,n){var r,o,s;let a,l;if(X==t&&Q==n)return ee;X=t,Q=n;return ee="up"==n||"down"==n?(r=e,o=t,s=n,a=o.selection,l="up"==s?a.$from:a.$to,Z(r,o,()=>{let{node:e}=r.docView.domFromPos(l.pos,"up"==s?-1:1);for(;;){let t=r.docView.nearestDesc(e,!0);if(!t)break;if(t.node.isBlock){e=t.contentDOM||t.dom;break}e=t.dom.parentNode}let t=G(r,l.pos,1);for(let n=e.firstChild;n;n=n.nextSibling){let e;if(1==n.nodeType)e=n.getClientRects();else{if(3!=n.nodeType)continue;e=u(n,0,n.nodeValue.length).getClientRects()}for(let n=0;n<e.length;n++){let r=e[n];if(r.bottom>r.top+1&&("up"==s?t.top-r.top>(r.bottom-t.top)*2:r.bottom-t.bottom>(t.bottom-r.top)*2))return!1}}return!0})):function(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,s=o==r.parent.content.size,a=e.domSelection();return a?J.test(r.parent.textContent)&&a.modify?Z(e,t,()=>{let{focusNode:t,focusOffset:o,anchorNode:s,anchorOffset:l}=e.domSelectionRange(),c=a.caretBidiLevel;a.modify("move",n,"character");let u=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:d,focusOffset:p}=e.domSelectionRange(),h=d&&!u.contains(1==d.nodeType?d:d.parentNode)||t==d&&o==p;try{a.collapse(s,l),t&&(t!=s||o!=l)&&a.extend&&a.extend(t,o)}catch(e){}return null!=c&&(a.caretBidiLevel=c),h}):"left"==n||"backward"==n?!o:s:r.pos==r.start()||r.pos==r.end()}(e,t,n)}(this,t||this.state,e)}pasteHTML(e,t){return tc(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return tc(this,e,null,!0,t||new ClipboardEvent("paste"))}serializeForClipboard(e){return eV(this,e)}destroy(){this.docView&&(!function(e){for(let t in e.domObserver.stop(),e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],tI(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,d())}get isDestroyed(){return null==this.docView}dispatchEvent(e){var t,n;return t=this,void(!e6(t,n=e)&&e0[n.type]&&(t.editable||!(n.type in e1))&&e0[n.type](t,n))}domSelectionRange(){let e=this.domSelection();return e?I&&11===this.root.nodeType&&function(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}(this.dom.ownerDocument)==this.dom&&function(e,t){let n;if(t.getComposedRanges){let n=t.getComposedRanges(e.root)[0];if(n)return t$(e,n)}function r(e){e.preventDefault(),e.stopImmediatePropagation(),n=e.getTargetRanges()[0]}return e.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),e.dom.removeEventListener("beforeinput",r,!0),n?t$(e,n):null}(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function tq(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",n=>{if("function"==typeof n&&(n=n(e.state)),n)for(let e in n)"class"==e?t.class+=" "+n[e]:"style"==e?t.style=(t.style?t.style+";":"")+n[e]:!t[e]&&"contenteditable"!=e&&"nodeName"!=e&&(t[e]=String(n[e]))}),!t.translate&&(t.translate="no"),[tb.node(0,e.state.doc.content.size,t)]}function tW(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:tb.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function tG(e){return!e.someProp("editable",t=>!1===t(e.state))}tV.prototype.dispatch=function(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))};function tK(e){let t=Object.create(null);function n(e){for(let n in e)!Object.prototype.hasOwnProperty.call(t,n)&&(t[n]=e[n])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function tY(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw RangeError("Plugins passed directly to the view must not have a state component")}},935954:function(e,t,n){"use strict";let r;function o(){return!r&&((r=new Image).src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),r}n.d(t,{r:function(){return o}})},191304:function(e,t,n){"use strict";n.d(t,{f:function(){return a}});var r=n(455069),o=n(313321),s=n(604022);function a(e){let t=(0,s.N)().getMonitor(),[n,a]=(0,o.r)(t,e);return(0,r.useEffect)(()=>t.subscribeToOffsetChange(a)),(0,r.useEffect)(()=>t.subscribeToStateChange(a)),n}},90265:function(e,t,n){"use strict";n.d(t,{Z:()=>k});var r=n("151064"),o=n("455069"),s=n("213898"),a=n("59160"),l=n("711281"),c=n("642844"),u=n("733216"),d=n("734083"),p=n("262941"),h=n("647405"),f=n("856667");class m{constructor(){this.externalLinkEnabled=!0,this.externalLinkRel=void 0,this.externalLinkTarget=void 0,this.isInPresentationMode=!1,this.pdfDocument=void 0,this.pdfViewer=void 0}setDocument(e){this.pdfDocument=e}setViewer(e){this.pdfViewer=e}setExternalLinkRel(e){this.externalLinkRel=e}setExternalLinkTarget(e){this.externalLinkTarget=e}setHistory(){}get pagesCount(){return this.pdfDocument?this.pdfDocument.numPages:0}get page(){return(0,c.Z)(this.pdfViewer,"PDF viewer is not initialized."),this.pdfViewer.currentPageNumber||0}set page(e){(0,c.Z)(this.pdfViewer,"PDF viewer is not initialized."),this.pdfViewer.currentPageNumber=e}get rotation(){return 0}set rotation(e){}goToDestination(e){return new Promise(t=>{(0,c.Z)(this.pdfDocument,"PDF document not loaded."),(0,c.Z)(e,"Destination is not specified."),"string"==typeof e?this.pdfDocument.getDestination(e).then(t):Array.isArray(e)?t(e):e.then(t)}).then(e=>{(0,c.Z)(Array.isArray(e),`"${e}" is not a valid destination array.`);let t=e[0];new Promise(e=>{(0,c.Z)(this.pdfDocument,"PDF document not loaded."),t instanceof Object?this.pdfDocument.getPageIndex(t).then(t=>{e(t)}).catch(()=>{(0,c.Z)(!1,`"${t}" is not a valid page reference.`)}):"number"==typeof t?e(t):(0,c.Z)(!1,`"${t}" is not a valid destination reference.`)}).then(t=>{let n=t+1;(0,c.Z)(this.pdfViewer,"PDF viewer is not initialized."),(0,c.Z)(n>=1&&n<=this.pagesCount,`"${n}" is not a valid page number.`),this.pdfViewer.scrollPageIntoView({dest:e,pageIndex:t,pageNumber:n})})})}navigateTo(e){this.goToDestination(e)}goToPage(e){(0,c.Z)(this.pdfViewer,"PDF viewer is not initialized."),(0,c.Z)(e>=1&&e<=this.pagesCount,`"${e}" is not a valid page number.`),this.pdfViewer.scrollPageIntoView({pageIndex:e-1,pageNumber:e})}addLinkAttributes(e,t,n){e.href=t,e.rel=this.externalLinkRel||"noopener noreferrer nofollow",e.target=n?"_blank":this.externalLinkTarget||""}getDestinationHash(){return"#"}getAnchorUrl(){return"#"}setHash(){}executeNamedAction(){}cachePageRef(){}isPageVisible(){return!0}isPageCached(){return!0}executeSetOCGState(){}}var g={NEED_PASSWORD:1,INCORRECT_PASSWORD:2},v=n("411757"),b=n("71331"),y=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let{PDFDataRangeTransport:x}=p,w=(e,t)=>{switch(t){case g.NEED_PASSWORD:e(prompt("Enter the password to open this PDF file."));break;case g.INCORRECT_PASSWORD:e(prompt("Invalid password. Please try again."))}};function S(e){return"object"==typeof e&&null!==e&&("data"in e||"range"in e||"url"in e)}var k=(0,o.forwardRef)(function(e,t){var{children:n,className:g,error:k="Failed to load PDF file.",externalLinkRel:A,externalLinkTarget:C,file:E,inputRef:T,imageResourcesPath:_,loading:O="Loading PDF…",noData:M="No PDF file specified.",onItemClick:I,onLoadError:P,onLoadProgress:D,onLoadSuccess:N,onPassword:R=w,onSourceError:L,onSourceSuccess:j,options:$,renderMode:F,rotate:z}=e,B=y(e,["children","className","error","externalLinkRel","externalLinkTarget","file","inputRef","imageResourcesPath","loading","noData","onItemClick","onLoadError","onLoadProgress","onLoadSuccess","onPassword","onSourceError","onSourceSuccess","options","renderMode","rotate"]);let[H,U]=(0,b.Z)(),{value:V,error:q}=H,[W,G]=(0,b.Z)(),{value:K,error:Y}=W,Z=(0,o.useRef)(new m),J=(0,o.useRef)([]),X=(0,o.useRef)(void 0),Q=(0,o.useRef)(void 0);E&&E!==X.current&&S(E)&&(u(!(0,d.J)(E,X.current),'File prop passed to <Document /> changed, but it\'s equal to previous one. This might result in unnecessary reloads. Consider memoizing the value passed to "file" prop.'),X.current=E),$&&$!==Q.current&&(u(!(0,d.J)($,Q.current),'Options prop passed to <Document /> changed, but it\'s equal to previous one. This might result in unnecessary reloads. Consider memoizing the value passed to "options" prop.'),Q.current=$);let ee=(0,o.useRef)({scrollPageIntoView:e=>{let{dest:t,pageNumber:n,pageIndex:r=n-1}=e;if(I){I({dest:t,pageIndex:r,pageNumber:n});return}let o=J.current[r];if(o){o.scrollIntoView();return}u(!1,`An internal link leading to page ${n} was clicked, but neither <Document> was provided with onItemClick nor it was able to find the page within itself. Either provide onItemClick to <Document> and handle navigating by yourself or ensure that all pages are rendered within <Document>.`)}});(0,o.useImperativeHandle)(t,()=>({linkService:Z,pages:J,viewer:ee}),[]);(0,o.useEffect)(function(){U({type:"RESET"})},[E,U]);let et=(0,o.useCallback)(()=>{var e,t,n,r;return e=this,t=void 0,n=void 0,r=function*(){if(!E)return null;if("string"==typeof E)return(0,v.gJ)(E)?{data:(0,v.us)(E)}:((0,v.tN)(),{url:E});if(E instanceof x)return{range:E};if((0,v.eP)(E))return{data:E};if(v.jU&&(0,v.Lj)(E))return{data:yield(0,v.eR)(E)};if((0,c.Z)("object"==typeof E,"Invalid parameter in file, need either Uint8Array, string or a parameter object"),(0,c.Z)(S(E),"Invalid parameter object: need either .data, .range or .url"),"url"in E&&"string"==typeof E.url){if((0,v.gJ)(E.url)){let{url:e}=E,t=y(E,["url"]);return Object.assign({data:(0,v.us)(e)},t)}(0,v.tN)()}return E},new(n||(n=Promise))(function(o,s){function a(e){try{c(r.next(e))}catch(e){s(e)}}function l(e){try{c(r.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,l)}c((r=r.apply(e,t||[])).next())})},[E]);(0,o.useEffect)(()=>{let e=(0,a.Z)(et());return e.promise.then(e=>{U({type:"RESOLVE",value:e})}).catch(e=>{U({type:"REJECT",error:e})}),()=>{(0,v.LJ)(e)}},[et,U]),(0,o.useEffect)(()=>{if(void 0!==V){if(!1===V){!function(){if(!!q)u(!1,q.toString()),L&&L(q)}();return}j&&j()}},[V]);(0,o.useEffect)(function(){G({type:"RESET"})},[G,V]),(0,o.useEffect)(function(){if(!V)return;let e=$?Object.assign(Object.assign({},V),$):V,t=p.getDocument(e);D&&(t.onProgress=D),R&&(t.onPassword=R);let n=t.promise.then(e=>{G({type:"RESOLVE",value:e})}).catch(e=>{if(!t.destroyed)G({type:"REJECT",error:e})});return()=>{n.finally(()=>t.destroy())}},[$,G,V]),(0,o.useEffect)(()=>{if(void 0!==K){if(!1===K){!function(){if(!!Y)u(!1,Y.toString()),P&&P(Y)}();return}!function(){if(!!K)N&&N(K),J.current=Array(K.numPages),Z.current.setDocument(K)}()}},[K]),(0,o.useEffect)(function(){Z.current.setViewer(ee.current),Z.current.setExternalLinkRel(A),Z.current.setExternalLinkTarget(C)},[A,C]);let en=(0,o.useCallback)((e,t)=>{J.current[e]=t},[]),er=(0,o.useCallback)(e=>{delete J.current[e]},[]),ei=(0,o.useMemo)(()=>({imageResourcesPath:_,linkService:Z.current,onItemClick:I,pdf:K,registerPage:en,renderMode:F,rotate:z,unregisterPage:er}),[_,I,K,en,F,z,er]),eo=(0,o.useMemo)(()=>(0,s.ZP)(B,()=>K),[B,K]);return(0,r.jsx)("div",Object.assign({className:(0,l.Z)("react-pdf__Document",g),ref:T,style:{"--scale-factor":"1"}},eo,{children:E?null==K?(0,r.jsx)(f.Z,{type:"loading",children:"function"==typeof O?O():O}):!1===K?(0,r.jsx)(f.Z,{type:"error",children:"function"==typeof k?k():k}):(0,r.jsx)(h.Z.Provider,{value:ei,children:n}):(0,r.jsx)(f.Z,{type:"no-data",children:"function"==typeof M?M():M})}))})},647405:function(e,t,n){"use strict";let r=(0,n(455069).createContext)(null);t.Z=r},856667:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(151064);function o({children:e,type:t}){return(0,r.jsx)("div",{className:`react-pdf__message react-pdf__message--${t}`,children:e})}},876945:function(e,t,n){"use strict";n.d(t,{Z:()=>I});var r=n("151064"),o=n("455069"),s=n("59160"),a=n("213898"),l=n("711281");function c(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e.filter(Boolean);return n.length<=1?n[0]||null:function(e){n.forEach(function(t){"function"==typeof t?t(e):t&&(t.current=e)})}}var u=n("642844"),d=n("733216");let p=(0,o.createContext)(null);var h=n("856667"),f=n("262941");let m={Document:null,DocumentFragment:null,Part:"group",Sect:"group",Div:"group",Aside:"note",NonStruct:"none",P:null,H:"heading",Title:null,FENote:"note",Sub:"group",Lbl:null,Span:null,Em:null,Strong:null,Link:"link",Annot:"note",Form:"form",Ruby:null,RB:null,RT:null,RP:null,Warichu:null,WT:null,WP:null,L:"list",LI:"listitem",LBody:null,Table:"table",TR:"row",TH:"columnheader",TD:"cell",THead:"columnheader",TBody:null,TFoot:null,Caption:null,Figure:"figure",Formula:null,Artifact:null},g=/^H(\d+)$/;function v(e){return"children"in e}function b(e){return!!v(e)&&1===e.children.length&&0 in e.children&&"id"in e.children[0]}function y({className:e,node:t}){let n=(0,o.useMemo)(()=>{var e;return(e=t)?Object.assign(Object.assign({},function(e){let t={};if(v(e)){let{role:n}=e,r=n.match(g);if(r)t.role="heading",t["aria-level"]=Number(r[1]);else if(n in m){let e=m[n];e&&(t.role=e)}}return t}(e)),function e(t){let n={};if(v(t)){if(void 0!==t.alt&&(n["aria-label"]=t.alt),void 0!==t.lang&&(n.lang=t.lang),b(t)){let[r]=t.children;if(r){let t=e(r);return Object.assign(Object.assign({},n),t)}}}else"id"in t&&(n["aria-owns"]=t.id);return n}(e)):null},[t]),s=(0,o.useMemo)(()=>!v(t)||b(t)?null:t.children.map((e,t)=>(0,r.jsx)(y,{node:e},t)),[t]);return(0,r.jsx)("span",Object.assign({className:e},n,{children:s}))}function x(){return(0,o.useContext)(p)}var w=n("71331"),S=n("411757");function k(){let e=x();(0,u.Z)(e,"Unable to find Page context.");let{onGetStructTreeError:t,onGetStructTreeSuccess:n}=e,[a,l]=(0,w.Z)(),{value:c,error:p}=a,{customTextRenderer:h,page:f}=e;return((0,o.useEffect)(function(){l({type:"RESET"})},[l,f]),(0,o.useEffect)(function(){if(h||!f)return;let e=(0,s.Z)(f.getStructTree());return e.promise.then(e=>{l({type:"RESOLVE",value:e})}).catch(e=>{l({type:"REJECT",error:e})}),()=>(0,S.LJ)(e)},[h,f,l]),(0,o.useEffect)(()=>{if(void 0!==c){if(!1===c){!function(){if(!!p)d(!1,p.toString()),t&&t(p)}();return}!function(){if(!!c)n&&n(c)}()}},[c]),c)?(0,r.jsx)(y,{className:"react-pdf__Page__structTree structTree",node:c}):null}let A=f.AnnotationMode;function C(e){let t=x();(0,u.Z)(t,"Unable to find Page context.");let{_className:n,canvasBackground:s,devicePixelRatio:a=(0,S.x_)(),onRenderError:l,onRenderSuccess:p,page:h,renderForms:f,renderTextLayer:m,rotate:g,scale:v}=Object.assign(Object.assign({},t),e),{canvasRef:b}=e;(0,u.Z)(h,"Attempted to render page canvas, but no page was specified.");let y=(0,o.useRef)(null);function w(e){if(!(0,S.DE)(e))d(!1,e.toString()),l&&l(e)}let C=(0,o.useMemo)(()=>h.getViewport({scale:v*a,rotation:g}),[a,h,g,v]),E=(0,o.useMemo)(()=>h.getViewport({scale:v,rotation:g}),[h,g,v]);(0,o.useEffect)(function(){if(!h)return;h.cleanup();let{current:e}=y;if(!e)return;e.width=C.width,e.height=C.height,e.style.width=`${Math.floor(E.width)}px`,e.style.height=`${Math.floor(E.height)}px`,e.style.visibility="hidden";let t={annotationMode:f?A.ENABLE_FORMS:A.ENABLE,canvasContext:e.getContext("2d",{alpha:!1}),viewport:C};s&&(t.background=s);let n=h.render(t);return n.promise.then(()=>{e.style.visibility="",!function(){if(!!h)p&&p((0,S.XZ)(h,v))}()}).catch(w),()=>(0,S.LJ)(n)},[s,h,f,C,E]);let T=(0,o.useCallback)(()=>{let{current:e}=y;e&&(e.width=0,e.height=0)},[]);return(0,o.useEffect)(()=>T,[T]),(0,r.jsx)("canvas",{className:`${n}__canvas`,dir:"ltr",ref:c(b,y),style:{display:"block",userSelect:"none"},children:m?(0,r.jsx)(k,{}):null})}function E(){let e=x();(0,u.Z)(e,"Unable to find Page context.");let{customTextRenderer:t,onGetTextError:n,onGetTextSuccess:a,onRenderTextLayerError:c,onRenderTextLayerSuccess:p,page:h,pageIndex:m,pageNumber:g,rotate:v,scale:b}=e;(0,u.Z)(h,"Attempted to load page text content, but no page was specified.");let[y,k]=(0,w.Z)(),{value:A,error:C}=y,E=(0,o.useRef)(null),T=(0,o.useRef)(void 0);d(1===Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--react-pdf-text-layer"),10),"TextLayer styles not found. Read more: https://github.com/wojtekmaj/react-pdf#support-for-text-layer");(0,o.useEffect)(function(){k({type:"RESET"})},[h,k]),(0,o.useEffect)(function(){if(!h)return;let e=(0,s.Z)(h.getTextContent());return e.promise.then(e=>{k({type:"RESOLVE",value:e})}).catch(e=>{k({type:"REJECT",error:e})}),()=>(0,S.LJ)(e)},[h,k]),(0,o.useEffect)(()=>{if(void 0!==A){if(!1===A){!function(){if(!!C)d(!1,C.toString()),n&&n(C)}();return}!function(){if(!!A)a&&a(A)}()}},[A]);let _=(0,o.useCallback)(()=>{p&&p()},[p]),O=(0,o.useCallback)(e=>{d(!1,e.toString()),c&&c(e)},[c]),M=(0,o.useMemo)(()=>h.getViewport({scale:b,rotation:v}),[h,v,b]);return(0,o.useLayoutEffect)(function(){if(!h||!A)return;let{current:e}=E;if(!e)return;e.innerHTML="";let n=h.streamTextContent({includeMarkedContent:!0}),r=new f.TextLayer({container:e,textContentSource:n,viewport:M});return r.render().then(()=>{let n=document.createElement("div");n.className="endOfContent",e.append(n),T.current=n;let r=e.querySelectorAll('[role="presentation"]');if(t){let e=0;A.items.forEach((n,o)=>{if(!("str"in n))return;let s=r[e];if(!s)return;let a=t(Object.assign({pageIndex:m,pageNumber:g,itemIndex:o},n));s.innerHTML=a,e+=n.str&&n.hasEOL?2:1})}_()}).catch(O),()=>(0,S.LJ)(r)},[t,O,_,h,m,g,A,M]),(0,r.jsx)("div",{className:(0,l.Z)("react-pdf__Page__textContent","textLayer"),onMouseUp:function(){let e=T.current;if(!!e)e.classList.remove("active")},onMouseDown:function(){let e=T.current;if(!!e)e.classList.add("active")},ref:E})}var T=n("647405");function _(){return(0,o.useContext)(T.Z)}function O(){let e=_(),t=x();(0,u.Z)(t,"Unable to find Page context.");let{imageResourcesPath:n,linkService:a,onGetAnnotationsError:c,onGetAnnotationsSuccess:p,onRenderAnnotationLayerError:h,onRenderAnnotationLayerSuccess:m,page:g,pdf:v,renderForms:b,rotate:y,scale:k=1}=Object.assign(Object.assign({},e),t);(0,u.Z)(v,"Attempted to load page annotations, but no document was specified. Wrap <Page /> in a <Document /> or pass explicit `pdf` prop."),(0,u.Z)(g,"Attempted to load page annotations, but no page was specified."),(0,u.Z)(a,"Attempted to load page annotations, but no linkService was specified.");let[A,C]=(0,w.Z)(),{value:E,error:T}=A,O=(0,o.useRef)(null);d(1===Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--react-pdf-annotation-layer"),10),"AnnotationLayer styles not found. Read more: https://github.com/wojtekmaj/react-pdf#support-for-annotations");(0,o.useEffect)(function(){C({type:"RESET"})},[C,g]),(0,o.useEffect)(function(){if(!g)return;let e=(0,s.Z)(g.getAnnotations());return e.promise.then(e=>{C({type:"RESOLVE",value:e})}).catch(e=>{C({type:"REJECT",error:e})}),()=>{(0,S.LJ)(e)}},[C,g]),(0,o.useEffect)(()=>{if(void 0!==E){if(!1===E){!function(){if(!!T)d(!1,T.toString()),c&&c(T)}();return}!function(){if(!!E)p&&p(E)}()}},[E]);let M=(0,o.useMemo)(()=>g.getViewport({scale:k,rotation:y}),[g,y,k]);return(0,o.useEffect)(function(){if(!v||!g||!a||!E)return;let{current:e}=O;if(!e)return;let t=M.clone({dontFlip:!0}),r={annotations:E,annotationStorage:v.annotationStorage,div:e,imageResourcesPath:n,linkService:a,page:g,renderForms:b,viewport:t};e.innerHTML="";try{new f.AnnotationLayer({accessibilityManager:null,annotationCanvasMap:null,annotationEditorUIManager:null,div:e,l10n:null,page:g,viewport:t}).render(r),m&&m()}catch(e){var o;o=e,d(!1,`${o}`),h&&h(o)}return()=>{}},[E,n,a,g,v,b,M]),(0,r.jsx)("div",{className:(0,l.Z)("react-pdf__Page__annotations","annotationLayer"),ref:O})}var M=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function I(e){let t=Object.assign(Object.assign({},_()),e),{_className:n="react-pdf__Page",_enableRegisterUnregisterPage:f=!0,canvasBackground:m,canvasRef:g,children:v,className:b,customRenderer:y,customTextRenderer:x,devicePixelRatio:k,error:A="Failed to load the page.",height:T,inputRef:I,loading:P="Loading page…",noData:D="No page specified.",onGetAnnotationsError:N,onGetAnnotationsSuccess:R,onGetStructTreeError:L,onGetStructTreeSuccess:j,onGetTextError:$,onGetTextSuccess:F,onLoadError:z,onLoadSuccess:B,onRenderAnnotationLayerError:H,onRenderAnnotationLayerSuccess:U,onRenderError:V,onRenderSuccess:q,onRenderTextLayerError:W,onRenderTextLayerSuccess:G,pageIndex:K,pageNumber:Y,pdf:Z,registerPage:J,renderAnnotationLayer:X=!0,renderForms:Q=!1,renderMode:ee="canvas",renderTextLayer:et=!0,rotate:en,scale:er=1,unregisterPage:ei,width:eo}=t,es=M(t,["_className","_enableRegisterUnregisterPage","canvasBackground","canvasRef","children","className","customRenderer","customTextRenderer","devicePixelRatio","error","height","inputRef","loading","noData","onGetAnnotationsError","onGetAnnotationsSuccess","onGetStructTreeError","onGetStructTreeSuccess","onGetTextError","onGetTextSuccess","onLoadError","onLoadSuccess","onRenderAnnotationLayerError","onRenderAnnotationLayerSuccess","onRenderError","onRenderSuccess","onRenderTextLayerError","onRenderTextLayerSuccess","pageIndex","pageNumber","pdf","registerPage","renderAnnotationLayer","renderForms","renderMode","renderTextLayer","rotate","scale","unregisterPage","width"]),[ea,el]=(0,w.Z)(),{value:ec,error:eu}=ea,ed=(0,o.useRef)(null);(0,u.Z)(Z,"Attempted to load a page, but no document was specified. Wrap <Page /> in a <Document /> or pass explicit `pdf` prop.");let ep=(0,S.T8)(Y)?Y-1:null!=K?K:null,eh=null!=Y?Y:(0,S.T8)(K)?K+1:null,ef=null!=en?en:ec?ec.rotate:null,em=(0,o.useMemo)(()=>{if(!ec)return null;let e=1,t=null!=er?er:1;if(eo||T){let t=ec.getViewport({scale:1,rotation:ef});eo?e=eo/t.width:T&&(e=T/t.height)}return t*e},[T,ec,ef,er,eo]);(0,o.useEffect)(function(){return()=>{if(!!(0,S.T8)(ep))f&&ei&&ei(ep)}},[f,Z,ep,ei]);(0,o.useEffect)(function(){el({type:"RESET"})},[el,Z,ep]),(0,o.useEffect)(function(){if(!Z||!eh)return;let e=(0,s.Z)(Z.getPage(eh));return e.promise.then(e=>{el({type:"RESOLVE",value:e})}).catch(e=>{el({type:"REJECT",error:e})}),()=>(0,S.LJ)(e)},[el,Z,eh]),(0,o.useEffect)(()=>{if(void 0!==ec){if(!1===ec){!function(){if(!!eu)d(!1,eu.toString()),z&&z(eu)}();return}!function(){if(B){if(!ec||!em)return;B((0,S.XZ)(ec,em))}if(f&&J){if(!(0,S.T8)(ep)||!ed.current)return;J(ep,ed.current)}}()}},[ec,em]);let eg=(0,o.useMemo)(()=>ec&&(0,S.T8)(ep)&&eh&&(0,S.T8)(ef)&&(0,S.T8)(em)?{_className:n,canvasBackground:m,customTextRenderer:x,devicePixelRatio:k,onGetAnnotationsError:N,onGetAnnotationsSuccess:R,onGetStructTreeError:L,onGetStructTreeSuccess:j,onGetTextError:$,onGetTextSuccess:F,onRenderAnnotationLayerError:H,onRenderAnnotationLayerSuccess:U,onRenderError:V,onRenderSuccess:q,onRenderTextLayerError:W,onRenderTextLayerSuccess:G,page:ec,pageIndex:ep,pageNumber:eh,renderForms:Q,renderTextLayer:et,rotate:ef,scale:em}:null,[n,m,x,k,N,R,L,j,$,F,H,U,V,q,W,G,ec,ep,eh,Q,et,ef,em]),ev=(0,o.useMemo)(()=>(0,a.ZP)(es,()=>ec?em?(0,S.XZ)(ec,em):void 0:ec),[es,ec,em]),eb=`${ep}@${em}/${ef}`;return(0,r.jsx)("div",Object.assign({className:(0,l.Z)(n,b),"data-page-number":eh,ref:c(I,ed),style:{"--scale-factor":`${em}`,backgroundColor:m||"white",position:"relative",minWidth:"min-content",minHeight:"min-content"}},ev,{children:eh?null===Z||null==ec?(0,r.jsx)(h.Z,{type:"loading",children:"function"==typeof P?P():P}):!1===Z||!1===ec?(0,r.jsx)(h.Z,{type:"error",children:"function"==typeof A?A():A}):(0,r.jsxs)(p.Provider,{value:eg,children:[function(){switch(ee){case"custom":return(0,u.Z)(y,'renderMode was set to "custom", but no customRenderer was passed.'),(0,r.jsx)(y,{},`${eb}_custom`);case"none":return null;default:return(0,r.jsx)(C,{canvasRef:g},`${eb}_canvas`)}}(),et?(0,r.jsx)(E,{},`${eb}_text`):null,X?(0,r.jsx)(O,{},`${eb}_annotations`):null,v]}):(0,r.jsx)(h.Z,{type:"no-data",children:"function"==typeof D?D():D})}))}},71331:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(455069);function o(e,t){switch(t.type){case"RESOLVE":return{value:t.value,error:void 0};case"REJECT":return{value:!1,error:t.error};case"RESET":return{value:void 0,error:void 0};default:return e}}function s(){return(0,r.useReducer)(o,{value:void 0,error:void 0})}},411757:function(e,t,n){"use strict";n.d(t,{DE:function(){return v},LJ:function(){return m},Lj:function(){return u},T8:function(){return l},XZ:function(){return g},eP:function(){return c},eR:function(){return b},gJ:function(){return d},jU:function(){return s},tN:function(){return f},us:function(){return p},x_:function(){return h}});var r=n(642844),o=n(733216);let s="undefined"!=typeof window,a=s&&"file:"===window.location.protocol;function l(e){return null!=e}function c(e){return e instanceof ArrayBuffer}function u(e){return(0,r.Z)(s,"isBlob can only be used in a browser environment"),e instanceof Blob}function d(e){return"string"==typeof e&&/^data:/.test(e)}function p(e){(0,r.Z)(d(e),"Invalid data URI.");let[t="",n=""]=e.split(",");return -1!==t.split(";").indexOf("base64")?atob(n):unescape(n)}function h(){return s&&window.devicePixelRatio||1}function f(){o(!a,"Loading PDF as base64 strings/URLs may not work on protocols other than HTTP/HTTPS. On Chromium based browsers, you can use --allow-file-access-from-files flag for debugging purposes.")}function m(e){(null==e?void 0:e.cancel)&&e.cancel()}function g(e,t){return Object.defineProperty(e,"width",{get(){return this.view[2]*t},configurable:!0}),Object.defineProperty(e,"height",{get(){return this.view[3]*t},configurable:!0}),Object.defineProperty(e,"originalWidth",{get(){return this.view[2]},configurable:!0}),Object.defineProperty(e,"originalHeight",{get(){return this.view[3]},configurable:!0}),e}function v(e){return"RenderingCancelledException"===e.name}function b(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>{if(!r.result)return n(Error("Error while reading a file."));t(r.result)},r.onerror=e=>{if(!e.target)return n(Error("Error while reading a file."));let{error:t}=e.target;if(!t)return n(Error("Error while reading a file."));switch(t.code){case t.NOT_FOUND_ERR:return n(Error("Error while reading a file: File not found."));case t.SECURITY_ERR:return n(Error("Error while reading a file: Security error."));case t.ABORT_ERR:return n(Error("Error while reading a file: Aborted."));default:return n(Error("Error while reading a file."))}},r.readAsArrayBuffer(e)})}},443356:function(e,t,n){"use strict";let r,o;n.d(t,{e$:()=>nN});var s,a={};n.r(a),n.d(a,{boolean:()=>eM,booleanish:()=>eI,commaOrSpaceSeparated:()=>eL,commaSeparated:()=>eR,number:()=>eD,overloadedBoolean:()=>eP,spaceSeparated:()=>eN});class l extends Error{constructor(e){super(e),this.name="ShikiError"}}function c(e){return Array.isArray(e)?function(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=c(e[n]);return t}(e):e instanceof RegExp?e:"object"==typeof e?function(e){let t={};for(let n in e)t[n]=c(e[n]);return t}(e):e}function u(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}var d=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,p=class{static hasCaptures(e){return null!==e&&(d.lastIndex=0,d.test(e))}static replaceCaptures(e,t,n){return e.replace(d,(e,r,o,s)=>{let a=n[parseInt(r||o,10)];if(!a)return e;{let e=t.substring(a.start,a.end);for(;"."===e[0];)e=e.substring(1);switch(s){case"downcase":return e.toLowerCase();case"upcase":return e.toUpperCase();default:return e}}})}};function h(e,t){return e<t?-1:e>t?1:0}function f(e,t){if(null===e&&null===t)return 0;if(!e)return -1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=h(e[r],t[r]);if(0!==n)return n}return 0}return n-r}function m(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))||!1}function g(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var v=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},b=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(function(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,o=t.length;e<o;e++){let o,s=t[e];if(!s.settings)continue;if("string"==typeof s.scope){let e=s.scope;o=(e=(e=e.replace(/^[,]+/,"")).replace(/[,]+$/,"")).split(",")}else o=Array.isArray(s.scope)?s.scope:[""];let a=-1;if("string"==typeof s.settings.fontStyle){a=0;let e=s.settings.fontStyle.split(" ");for(let t=0,n=e.length;t<n;t++)switch(e[t]){case"italic":a|=1;break;case"bold":a|=2;break;case"underline":a|=4;break;case"strikethrough":a|=8}}let l=null;"string"==typeof s.settings.foreground&&m(s.settings.foreground)&&(l=s.settings.foreground);let c=null;"string"==typeof s.settings.background&&m(s.settings.background)&&(c=s.settings.background);for(let t=0,s=o.length;t<s;t++){let s=o[t].trim().split(" "),u=s[s.length-1],d=null;s.length>1&&(d=s.slice(0,s.length-1)).reverse(),n[r++]=new w(u,d,e,a,l,c)}}return n}(e),t)}static createFromParsedTheme(e,t){return function(e,t){e.sort((e,t)=>{let n=h(e.scope,t.scope);return 0!==n||0!==(n=f(e.parentScopes,t.parentScopes))?n:e.index-t.index});let n=0,r="#000000",o="#ffffff";for(;e.length>=1&&""===e[0].scope;){let t=e.shift();-1!==t.fontStyle&&(n=t.fontStyle),null!==t.foreground&&(r=t.foreground),null!==t.background&&(o=t.background)}let s=new k(t),a=new x(n,s.getId(r),s.getId(o)),l=new E(new C(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];l.insert(0,n.scope,n.parentScopes,n.fontStyle,s.getId(n.foreground),s.getId(n.background))}return new b(s,a,l)}(e,t)}_cachedMatchRoot=new v(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(null===e)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>(function(e,t){if(0===t.length)return!0;for(let n=0;n<t.length;n++){let r=t[n],o=!1;if(">"===r){if(n===t.length-1)return!1;r=t[++n],o=!0}for(;e&&!function(e,t){return t===e||e.startsWith(t)&&"."===e[t.length]}(e.scopeName,r);){;if(o)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0})(e.parent,t.parentScopes));return n?new x(n.fontStyle,n.foreground,n.background):null}},y=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(" ")}extends(e){return this===e||null!==this.parent&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}},x=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}},w=class{constructor(e,t,n,r,o,s){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=o,this.background=s}};var S=((s=S||{})[s.NotSet=-1]="NotSet",s[s.None=0]="None",s[s.Italic=1]="Italic",s[s.Bold=2]="Bold",s[s.Underline=4]="Underline",s[s.Strikethrough=8]="Strikethrough",s),k=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(null===e)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},A=Object.freeze([]),C=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,o){this.scopeDepth=e,this.parentScopes=t||A,this.fontStyle=n,this.foreground=r,this.background=o}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,-1!==t&&(this.fontStyle=t),0!==n&&(this.foreground=n),0!==r&&(this.background=r)}},E=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;">"===e.parentScopes[n]&&n++,">"===t.parentScopes[r]&&r++,!(n>=e.parentScopes.length)&&!(r>=t.parentScopes.length);){;let o=t.parentScopes[r].length-e.parentScopes[n].length;if(0!==o)return o;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(""!==t){let e,n,r=t.indexOf(".");if(-1===r?(e=t,n=""):(e=t.substring(0,r),n=t.substring(r+1)),this._children.hasOwnProperty(e))return this._children[e].match(n)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,o,s,a){let l,c,u;if(""===n){this._doInsertHere(t,r,o,s,a);return}let d=n.indexOf(".");-1===d?(l=n,c=""):(l=n.substring(0,d),c=n.substring(d+1)),this._children.hasOwnProperty(l)?u=this._children[l]:(u=new e(this._mainRule.clone(),C.cloneArr(this._rulesWithParentScopes)),this._children[l]=u),u.insert(t+1,c,r,o,s,a)}_doInsertHere(e,t,n,r,o){if(null===t){this._mainRule.acceptOverwrite(e,n,r,o);return}for(let s=0,a=this._rulesWithParentScopes.length;s<a;s++){let a=this._rulesWithParentScopes[s];if(0===f(a.parentScopes,t)){a.acceptOverwrite(e,n,r,o);return}}-1===n&&(n=this._mainRule.fontStyle),0===r&&(r=this._mainRule.foreground),0===o&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new C(e,t,n,r,o))}},T=class e{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),o=e.getFontStyle(t),s=e.getForeground(t);console.log({languageId:n,tokenType:r,fontStyle:o,foreground:s,background:e.getBackground(t)})}static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static containsBalancedBrackets(e){return(1024&e)!=0}static getFontStyle(e){return(30720&e)>>>11}static getForeground(e){return(0xff8000&e)>>>15}static getBackground(e){return(0xff000000&e)>>>24}static set(t,n,r,o,s,a,l){let c=e.getLanguageId(t),u=e.getTokenType(t),d=e.containsBalancedBrackets(t)?1:0,p=e.getFontStyle(t),h=e.getForeground(t),f=e.getBackground(t);return 0!==n&&(c=n),8!==r&&(u=function(e){return e}(r)),null!==o&&(d=o?1:0),-1!==s&&(p=s),0!==a&&(h=a),0!==l&&(f=l),(c<<0|u<<8|d<<10|p<<11|h<<15|f<<24)>>>0}};function _(e,t){let n=[],r=function(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}(e),o=r.next();for(;null!==o;){let e=0;if(2===o.length&&":"===o.charAt(1)){switch(o.charAt(0)){case"R":e=1;break;case"L":e=-1;break;default:console.log(`Unknown priority ${o} in scope selector`)}o=r.next()}let t=a();if(n.push({matcher:t,priority:e}),","!==o)break;o=r.next()}return n;function s(){if("-"===o){o=r.next();let e=s();return t=>!!e&&!e(t)}if("("===o){o=r.next();let e=function(){let e=[],t=a();for(;t&&(e.push(t),"|"===o||","===o);){do o=r.next();while("|"===o||","===o);t=a()}return t=>e.some(e=>e(t))}();return")"===o&&(o=r.next()),e}if(O(o)){let e=[];do e.push(o),o=r.next();while(O(o));return n=>t(e,n)}return null}function a(){let e=[],t=s();for(;t;)e.push(t),t=s();return t=>e.every(e=>e(t))}}function O(e){return!!e&&!!e.match(/[\w\.:]+/)}function M(e){"function"==typeof e.dispose&&e.dispose()}var I=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},P=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},D=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();if(!this._seenReferenceKeys.has(t))this._seenReferenceKeys.add(t),this._references.push(e)}},N=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new I(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new D;for(let n of e)(function(e,t,n,r){let o=n.lookup(e.scopeName);if(!o){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let s=n.lookup(t);e instanceof I?L({baseGrammar:s,selfGrammar:o},r):R(e.ruleName,{baseGrammar:s,selfGrammar:o,repository:o.repository},r);let a=n.injections(e.scopeName);if(a)for(let e of a)r.add(new I(e))})(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof I){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function R(e,t,n){t.repository&&t.repository[e]&&j([t.repository[e]],t,n)}function L(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&j(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&j(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function j(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?u({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&j(r.patterns,{...t,repository:e},n);let o=r.include;if(!o)continue;let s=U(o);switch(s.kind){case 0:L({...t,selfGrammar:t.baseGrammar},n);break;case 1:L(t,n);break;case 2:R(s.ruleName,{...t,repository:e},n);break;case 3:case 4:let a=s.scopeName===t.selfGrammar.scopeName?t.selfGrammar:s.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(a){let r={baseGrammar:t.baseGrammar,selfGrammar:a,repository:e};4===s.kind?R(s.ruleName,r,n):L(r,n)}else 4===s.kind?n.add(new P(s.scopeName,s.ruleName)):n.add(new I(s.scopeName))}}}var $=class{kind=0},F=class{kind=1},z=class{constructor(e){this.ruleName=e}kind=2},B=class{constructor(e){this.scopeName=e}kind=3},H=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function U(e){if("$base"===e)return new $;if("$self"===e)return new F;let t=e.indexOf("#");if(-1===t)return new B(e);if(0===t)return new z(e.substring(1));{let n=e.substring(0,t);return new H(n,e.substring(t+1))}}var V=/\\(\d+)/,q=/\\(\d+)/g;Symbol("RuleId");function W(e){return e}function G(e){return e}var K=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=p.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=p.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${function e(t){let n=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return 0===n?t:~n==t.length-1?e(t.substring(0,t.length-1)):t.substr(~n+1)}(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return this._nameIsCapturing&&null!==this._name&&null!==e&&null!==t?p.replaceCaptures(this._name,e,t):this._name}getContentName(e,t){return this._contentNameIsCapturing&&null!==this._contentName?p.replaceCaptures(this._contentName,e,t):this._contentName}},Y=class extends K{retokenizeCapturedWithRuleId;constructor(e,t,n,r,o){super(e,t,n,r),this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(e,t){throw Error("Not supported!")}compile(e,t){throw Error("Not supported!")}compileAG(e,t,n,r){throw Error("Not supported!")}},Z=class extends K{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,o){super(e,t,n,null),this._match=new et(r,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return!this._cachedCompiledPatterns&&(this._cachedCompiledPatterns=new en,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},J=class extends K{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,o){super(e,t,n,r),this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return!this._cachedCompiledPatterns&&(this._cachedCompiledPatterns=new en,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},X=class extends K{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,o,s,a,l,c,u){super(e,t,n,r),this._begin=new et(o,this.id),this.beginCaptures=s,this._end=new et(a||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=l,this.applyEndPatternLast=c||!1,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){for(let t of(this._cachedCompiledPatterns=new en,this.patterns))e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},Q=class extends K{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,o,s,a,l,c){super(e,t,n,r),this._begin=new et(o,this.id),this.beginCaptures=s,this.whileCaptures=l,this._while=new et(a,-2),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns)for(let t of(this._cachedCompiledPatterns=new en,this.patterns))e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return!this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns=new en,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||""),this._cachedCompiledWhilePatterns}},ee=class e{static createCaptureRule(e,t,n,r,o){return e.registerRule(e=>new Y(t,e,n,r,o))}static getCompiledRuleId(t,n,r){return!t.id&&n.registerRule(o=>{if(t.id=o,t.match)return new Z(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(void 0===t.begin){t.repository&&(r=u({},r,t.repository));let o=t.patterns;return void 0===o&&t.include&&(o=[{include:t.include}]),new J(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(o,n,r))}return t.while?new Q(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new X(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let o=[];if(t){let s=0;for(let e in t){if("$vscodeTextmateLocation"===e)continue;let t=parseInt(e,10);t>s&&(s=t)}for(let e=0;e<=s;e++)o[e]=null;for(let s in t){if("$vscodeTextmateLocation"===s)continue;let a=parseInt(s,10),l=0;t[s].patterns&&(l=e.getCompiledRuleId(t[s],n,r)),o[a]=e.createCaptureRule(n,t[s].$vscodeTextmateLocation,t[s].name,t[s].contentName,l)}}return o}static _compilePatterns(t,n,r){let o=[];if(t)for(let s=0,a=t.length;s<a;s++){let a=t[s],l=-1;if(a.include){let t=U(a.include);switch(t.kind){case 0:case 1:l=e.getCompiledRuleId(r[a.include],n,r);break;case 2:let o=r[t.ruleName];o&&(l=e.getCompiledRuleId(o,n,r));break;case 3:case 4:let s=t.scopeName,c=4===t.kind?t.ruleName:null,u=n.getExternalGrammar(s,r);if(u){if(c){let t=u.repository[c];t&&(l=e.getCompiledRuleId(t,n,u.repository))}else l=e.getCompiledRuleId(u.repository.$self,n,u.repository)}}}else l=e.getCompiledRuleId(a,n,r);if(-1!==l){let e=n.getRule(l),t=!1;if((e instanceof J||e instanceof X||e instanceof Q)&&e.hasMissingPatterns&&0===e.patterns.length&&(t=!0),t)continue;o.push(l)}}return{patterns:o,hasMissingPatterns:(t?t.length:0)!==o.length}}},et=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&"string"==typeof e){let t=e.length,n=0,r=[],o=!1;for(let s=0;s<t;s++)if("\\"===e.charAt(s)&&s+1<t){let t=e.charAt(s+1);"z"===t?(r.push(e.substring(n,s)),r.push("$(?!\\n)(?<!\\n)"),n=s+2):("A"===t||"G"===t)&&(o=!0),s++}this.hasAnchor=o,0===n?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,"string"==typeof this.source?this.hasBackReferences=V.test(this.source):this.hasBackReferences=!1}clone(){return new e(this.source,this.ruleId)}setSource(e){if(this.source!==e)this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache())}resolveBackReferences(e,t){if("string"!=typeof this.source)throw Error("This method should only be called if the source is a string");let n=t.map(t=>e.substring(t.start,t.end));return q.lastIndex=0,this.source.replace(q,(e,t)=>g(n[parseInt(t,10)]||""))}_buildAnchorCache(){let e,t,n,r;if("string"!=typeof this.source)throw Error("This method should only be called if the source is a string");let o=[],s=[],a=[],l=[];for(e=0,t=this.source.length;e<t;e++)n=this.source.charAt(e),o[e]=n,s[e]=n,a[e]=n,l[e]=n,"\\"===n&&e+1<t&&("A"===(r=this.source.charAt(e+1))?(o[e+1]="",s[e+1]="",a[e+1]="A",l[e+1]="A"):"G"===r?(o[e+1]="",s[e+1]="G",a[e+1]="",l[e+1]="G"):(o[e+1]=r,s[e+1]=r,a[e+1]=r,l[e+1]=r),e++);return{A0_G0:o.join(""),A0_G1:s.join(""),A1_G0:a.join(""),A1_G1:l.join("")}}resolveAnchors(e,t){if(!this.hasAnchor||!this._anchorCache||"string"!=typeof this.source)return this.source;if(e)return t?this._anchorCache.A1_G1:this._anchorCache.A1_G0;return t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},en=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new er(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){if(!this._hasAnchors)return this.compile(e);if(t)return n?(!this._anchorCache.A1_G1&&(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(!this._anchorCache.A1_G0&&(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0);return n?(!this._anchorCache.A0_G1&&(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(!this._anchorCache.A0_G0&&(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0)}_resolveAnchors(e,t,n){return new er(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},er=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join("\n")}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},ei=class{constructor(e,t){this.languageId=e,this.tokenType=t}},eo=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new ei(e,8),this._embeddedLanguagesMatcher=new es(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return null===t?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new ei(0,0);_getBasicScopeAttributes=new v(e=>{let t=this._scopeToLanguage(e);return new ei(t,this._toStandardTokenType(e))});_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},es=class{values;scopesRegExp;constructor(e){if(0===e.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);let t=e.map(([e,t])=>g(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(!!t)return this.values.get(t[1])}};"undefined"!=typeof process&&process.env.VSCODE_TEXTMATE_DEBUG;var ea=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function el(e,t,n,r,o,s,a,l){let c=t.content.length,u=!1,d=-1;if(a){let a=function(e,t,n,r,o,s){let a=o.beginRuleCapturedEOL?0:-1,l=[];for(let t=o;t;t=t.pop()){let n=t.getRule(e);n instanceof Q&&l.push({rule:n,stack:t})}for(let c=l.pop();c;c=l.pop()){let{ruleScanner:l,findOptions:u}=function(e,t,n,r,o){return{ruleScanner:e.compileWhileAG(t,n,r,o),findOptions:0}}(c.rule,e,c.stack.endRule,n,r===a),d=l.findNextMatchSync(t,r,u);if(d){if(-2!==d.ruleId){o=c.stack.pop();break}d.captureIndices&&d.captureIndices.length&&(s.produce(c.stack,d.captureIndices[0].start),ed(e,t,n,c.stack,s,c.rule.whileCaptures,d.captureIndices),s.produce(c.stack,d.captureIndices[0].end),a=d.captureIndices[0].end,d.captureIndices[0].end>r&&(r=d.captureIndices[0].end,n=!1))}else{o=c.stack.pop();break}}return{stack:o,linePos:r,anchorPosition:a,isFirstLine:n}}(e,t,n,r,o,s);o=a.stack,r=a.linePos,n=a.isFirstLine,d=a.anchorPosition}let p=Date.now();for(;!u;){if(0!==l&&Date.now()-p>l)return new ea(o,!0);(function(){let a=function(e,t,n,r,o,s){let a=function(e,t,n,r,o,s){let{ruleScanner:a,findOptions:l}=ec(o.getRule(e),e,o.endRule,n,r===s),c=a.findNextMatchSync(t,r,l);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}(e,t,n,r,o,s),l=e.getInjections();if(0===l.length)return a;let c=function(e,t,n,r,o,s,a){let l,c=Number.MAX_VALUE,u=null,d=0,p=s.contentNameScopesList.getScopeNames();for(let s=0,h=e.length;s<h;s++){let h=e[s];if(!h.matcher(p))continue;let{ruleScanner:f,findOptions:m}=ec(t.getRule(h.ruleId),t,null,r,o===a),g=f.findNextMatchSync(n,o,m);if(!g)continue;let v=g.captureIndices[0].start;if(!(v>=c)){if(c=v,u=g.captureIndices,l=g.ruleId,d=h.priority,c===o)break}}return u?{priorityMatch:-1===d,captureIndices:u,matchedRuleId:l}:null}(l,e,t,n,r,o,s);if(!c)return a;if(!a)return c;let u=a.captureIndices[0].start,d=c.captureIndices[0].start;return d<u||c.priorityMatch&&d===u?c:a}(e,t,n,r,o,d);if(!a){s.produce(o,c),u=!0;return}let l=a.captureIndices,p=a.matchedRuleId,h=!!l&&l.length>0&&l[0].end>r;if(-1===p){let a=o.getRule(e);s.produce(o,l[0].start),o=o.withContentNameScopesList(o.nameScopesList),ed(e,t,n,o,s,a.endCaptures,l),s.produce(o,l[0].end);let p=o;if(o=o.parent,d=p.getAnchorPos(),!h&&p.getEnterPos()===r){o=p,s.produce(o,c),u=!0;return}}else{let a=e.getRule(p);s.produce(o,l[0].start);let f=o,m=a.getName(t.content,l),g=o.contentNameScopesList.pushAttributed(m,e);if(o=o.push(p,r,d,l[0].end===c,null,g,g),a instanceof X){ed(e,t,n,o,s,a.beginCaptures,l),s.produce(o,l[0].end),d=l[0].end;let r=a.getContentName(t.content,l),p=g.pushAttributed(r,e);if(o=o.withContentNameScopesList(p),a.endHasBackReferences&&(o=o.withEndRule(a.getEndWithResolvedBackReferences(t.content,l))),!h&&f.hasSameRuleAs(o)){o=o.pop(),s.produce(o,c),u=!0;return}}else if(a instanceof Q){ed(e,t,n,o,s,a.beginCaptures,l),s.produce(o,l[0].end),d=l[0].end;let r=a.getContentName(t.content,l),p=g.pushAttributed(r,e);if(o=o.withContentNameScopesList(p),a.whileHasBackReferences&&(o=o.withEndRule(a.getWhileWithResolvedBackReferences(t.content,l))),!h&&f.hasSameRuleAs(o)){o=o.pop(),s.produce(o,c),u=!0;return}}else if(ed(e,t,n,o,s,a.captures,l),s.produce(o,l[0].end),o=o.pop(),!h){o=o.safePop(),s.produce(o,c),u=!0;return}}l[0].end>r&&(r=l[0].end,n=!1)})()}return new ea(o,!1)}function ec(e,t,n,r,o){return{ruleScanner:e.compileAG(t,n,r,o),findOptions:0}}function eu(e,t){let n=0;return!e&&(n|=1),!t&&(n|=4),n}function ed(e,t,n,r,o,s,a){if(0===s.length)return;let l=t.content,c=Math.min(s.length,a.length),u=[],d=a[0].end;for(let t=0;t<c;t++){let c=s[t];if(null===c)continue;let p=a[t];if(0===p.length)continue;if(p.start>d)break;for(;u.length>0&&u[u.length-1].endPos<=p.start;)o.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop();if(u.length>0?o.produceFromScopes(u[u.length-1].scopes,p.start):o.produce(r,p.start),c.retokenizeCapturedWithRuleId){let t=c.getName(l,a),s=r.contentNameScopesList.pushAttributed(t,e),u=c.getContentName(l,a),d=s.pushAttributed(u,e),h=r.push(c.retokenizeCapturedWithRuleId,p.start,-1,!1,null,s,d),f=e.createOnigString(l.substring(0,p.end));el(e,f,n&&0===p.start,p.start,h,o,!1,0),M(f);continue}let h=c.getName(l,a);if(null!==h){let t=(u.length>0?u[u.length-1].scopes:r.contentNameScopesList).pushAttributed(h,e);u.push(new ep(t,p.end))}}for(;u.length>0;)o.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop()}var ep=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function eh(e,t,n,r,o){let s=_(t,ef),a=ee.getCompiledRuleId(n,r,o.repository);for(let n of s)e.push({debugSelector:t,matcher:n.matcher,ruleId:a,grammar:o,priority:n.priority})}function ef(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(function(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&"."===e[n]}(t[r],e))return n=r+1,!0;return!1})}var em=class{constructor(e,t,n,r,o,s,a,l){if(this._rootScopeName=e,this.balancedBracketSelectors=s,this._onigLib=l,this._basicScopeAttributesProvider=new eo(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=a,this._grammar=eg(t,null),this._injections=null,this._tokenTypeMatchers=[],o)for(let e of Object.keys(o))for(let t of _(e,ef))this._tokenTypeMatchers.push({matcher:t.matcher,type:o[e]})}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e=[],t=this._rootScopeName,n=({lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)}).lookup(t);if(n){let r=n.injections;if(r)for(let t in r)eh(e,t,r[t],this,n);let o=this._grammarRepository.injections(t);o&&o.forEach(t=>{let n=this.getExternalGrammar(t);if(n){let t=n.injectionSelector;t&&eh(e,t,n,this,n)}})}return e.sort((e,t)=>e.priority-t.priority),e}getInjections(){return null===this._injections&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=eg(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){let o;if(-1===this._rootId&&(this._rootId=ee.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),t&&t!==eb.NULL)o=!1,t.reset();else{let e;o=!0;let n=this._basicScopeAttributesProvider.getDefaultAttributes(),r=this.themeProvider.getDefaults(),s=T.set(0,n.languageId,n.tokenType,null,r.fontStyle,r.foregroundId,r.backgroundId),a=this.getRule(this._rootId).getName(null,null);e=a?ev.createRootAndLookUpScopeName(a,s,this):ev.createRoot("unknown",s),t=new eb(null,this._rootId,-1,-1,!1,null,e,e)}e+="\n";let s=this.createOnigString(e),a=s.content.length,l=new ex(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=el(this,s,o,0,t,l,!0,r);return M(s),{lineLength:a,lineTokens:l,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function eg(e,t){return(e=c(e)).repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var ev=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,o=t?.scopePath??null;for(let t of n)r=new e(r,o=y.push(o,t.scopeNames),t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new y(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let o=r.getMetadataForScope(t),s=new y(null,t),a=r.themeProvider.themeMatch(s),l=e.mergeAttributes(n,o,a);return new e(null,s,l)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return e.equals(this,t)}static equals(e,t){for(;;){if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}}static mergeAttributes(e,t,n){let r=-1,o=0,s=0;return null!==n&&(r=n.fontStyle,o=n.foregroundId,s=n.backgroundId),T.set(e,t.languageId,t.tokenType,null,r,o,s)}pushAttributed(t,n){if(null===t)return this;if(-1===t.indexOf(" "))return e._pushAttributed(this,t,n);let r=t.split(/ /g),o=this;for(let t of r)o=e._pushAttributed(o,t,n);return o}static _pushAttributed(t,n,r){let o=r.getMetadataForScope(n),s=t.scopePath.push(n),a=r.themeProvider.themeMatch(s),l=e.mergeAttributes(t.tokenAttributes,o,a);return new e(t,s,l)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},eb=class e{constructor(e,t,n,r,o,s,a,l){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=o,this.endRule=s,this.nameScopesList=a,this.contentNameScopesList=l,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return null!==t&&e._equals(this,t)}static _equals(e,t){return e===t||!!this._structuralEquals(e,t)&&ev.equals(e.contentNameScopesList,t.contentNameScopesList)}static _structuralEquals(e,t){for(;;){if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,o,s,a,l){return new e(this,t,n,r,o,s,a,l)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=ev.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,ev.fromExtension(r,n.contentNameScopesList))}},ey=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>"*"===e?(this.allowAny=!0,[]):_(e,ef).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>_(e,ef).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},ex=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n;this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)if(e.matcher(t))n=T.set(n,0,e.type,null,-1,0,0);this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=T.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),0===this._tokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},ew=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,o){if(!this._grammars.has(e)){var s,a,l,c,u,d,p;let h=this._rawGrammars.get(e);if(!h)return null;this._grammars.set(e,(s=e,a=h,l=t,c=n,u=r,d=o,p=this,new em(s,a,l,c,u,d,p,this._onigLib)))}return this._grammars.get(e)}},eS=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new ew(b.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(b.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new ey(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,o){let s=new N(this._syncRegistry,e);for(;s.Q.length>0;)s.Q.map(e=>this._loadSingleGrammar(e.scopeName)),s.processQueue();return this._grammarForScopeName(e,t,n,r,o)}_loadSingleGrammar(e){!this._ensureGrammarCache.has(e)&&(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n="function"==typeof this._options.getInjections?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,o=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,o)}},ek=eb.NULL;let eA=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class eC{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function eE(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new eC(n,r,t)}function eT(e){return e.toLowerCase()}eC.prototype.normal={},eC.prototype.property={},eC.prototype.space=void 0;class e_{constructor(e,t){this.attribute=t,this.property=e}}e_.prototype.attribute="",e_.prototype.booleanish=!1,e_.prototype.boolean=!1,e_.prototype.commaOrSpaceSeparated=!1,e_.prototype.commaSeparated=!1,e_.prototype.defined=!1,e_.prototype.mustUseProperty=!1,e_.prototype.number=!1,e_.prototype.overloadedBoolean=!1,e_.prototype.property="",e_.prototype.spaceSeparated=!1,e_.prototype.space=void 0;let eO=0,eM=ej(),eI=ej(),eP=ej(),eD=ej(),eN=ej(),eR=ej(),eL=ej();function ej(){return 2**++eO}let e$=Object.keys(a);class eF extends e_{constructor(e,t,n,r){let o=-1;if(super(e,t),function(e,t,n){n&&(e[t]=n)}(this,"space",r),"number"==typeof n)for(;++o<e$.length;){let e=e$[o];(function(e,t,n){n&&(e[t]=n)})(this,e$[o],(n&a[e])===a[e])}}}function ez(e,t,n){n&&(e[t]=n)}function eB(e){let t={},n={};for(let[r,o]of Object.entries(e.properties)){let s=new eF(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[eT(r)]=r,n[eT(s.attribute)]=r}return new eC(t,n,e.space)}eF.prototype.defined=!0;let eH=eB({properties:{ariaActiveDescendant:null,ariaAtomic:eI,ariaAutoComplete:null,ariaBusy:eI,ariaChecked:eI,ariaColCount:eD,ariaColIndex:eD,ariaColSpan:eD,ariaControls:eN,ariaCurrent:null,ariaDescribedBy:eN,ariaDetails:null,ariaDisabled:eI,ariaDropEffect:eN,ariaErrorMessage:null,ariaExpanded:eI,ariaFlowTo:eN,ariaGrabbed:eI,ariaHasPopup:null,ariaHidden:eI,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:eN,ariaLevel:eD,ariaLive:null,ariaModal:eI,ariaMultiLine:eI,ariaMultiSelectable:eI,ariaOrientation:null,ariaOwns:eN,ariaPlaceholder:null,ariaPosInSet:eD,ariaPressed:eI,ariaReadOnly:eI,ariaRelevant:null,ariaRequired:eI,ariaRoleDescription:eN,ariaRowCount:eD,ariaRowIndex:eD,ariaRowSpan:eD,ariaSelected:eI,ariaSetSize:eD,ariaSort:null,ariaValueMax:eD,ariaValueMin:eD,ariaValueNow:eD,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function eU(e,t){return t in e?e[t]:t}function eV(e,t){return eU(e,t.toLowerCase())}let eq=eB({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:eR,acceptCharset:eN,accessKey:eN,action:null,allow:null,allowFullScreen:eM,allowPaymentRequest:eM,allowUserMedia:eM,alt:null,as:null,async:eM,autoCapitalize:null,autoComplete:eN,autoFocus:eM,autoPlay:eM,blocking:eN,capture:null,charSet:null,checked:eM,cite:null,className:eN,cols:eD,colSpan:null,content:null,contentEditable:eI,controls:eM,controlsList:eN,coords:eD|eR,crossOrigin:null,data:null,dateTime:null,decoding:null,default:eM,defer:eM,dir:null,dirName:null,disabled:eM,download:eP,draggable:eI,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:eM,formTarget:null,headers:eN,height:eD,hidden:eP,high:eD,href:null,hrefLang:null,htmlFor:eN,httpEquiv:eN,id:null,imageSizes:null,imageSrcSet:null,inert:eM,inputMode:null,integrity:null,is:null,isMap:eM,itemId:null,itemProp:eN,itemRef:eN,itemScope:eM,itemType:eN,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:eM,low:eD,manifest:null,max:null,maxLength:eD,media:null,method:null,min:null,minLength:eD,multiple:eM,muted:eM,name:null,nonce:null,noModule:eM,noValidate:eM,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:eM,optimum:eD,pattern:null,ping:eN,placeholder:null,playsInline:eM,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:eM,referrerPolicy:null,rel:eN,required:eM,reversed:eM,rows:eD,rowSpan:eD,sandbox:eN,scope:null,scoped:eM,seamless:eM,selected:eM,shadowRootClonable:eM,shadowRootDelegatesFocus:eM,shadowRootMode:null,shape:null,size:eD,sizes:null,slot:null,span:eD,spellCheck:eI,src:null,srcDoc:null,srcLang:null,srcSet:null,start:eD,step:null,style:null,tabIndex:eD,target:null,title:null,translate:null,type:null,typeMustMatch:eM,useMap:null,value:eI,width:eD,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:eN,axis:null,background:null,bgColor:null,border:eD,borderColor:null,bottomMargin:eD,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:eM,declare:eM,event:null,face:null,frame:null,frameBorder:null,hSpace:eD,leftMargin:eD,link:null,longDesc:null,lowSrc:null,marginHeight:eD,marginWidth:eD,noResize:eM,noHref:eM,noShade:eM,noWrap:eM,object:null,profile:null,prompt:null,rev:null,rightMargin:eD,rules:null,scheme:null,scrolling:eI,standby:null,summary:null,text:null,topMargin:eD,valueType:null,version:null,vAlign:null,vLink:null,vSpace:eD,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:eM,disableRemotePlayback:eM,prefix:null,property:null,results:eD,security:null,unselectable:null},space:"html",transform:eV}),eW=eB({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:eL,accentHeight:eD,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:eD,amplitude:eD,arabicForm:null,ascent:eD,attributeName:null,attributeType:null,azimuth:eD,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:eD,by:null,calcMode:null,capHeight:eD,className:eN,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:eD,diffuseConstant:eD,direction:null,display:null,dur:null,divisor:eD,dominantBaseline:null,download:eM,dx:null,dy:null,edgeMode:null,editable:null,elevation:eD,enableBackground:null,end:null,event:null,exponent:eD,externalResourcesRequired:null,fill:null,fillOpacity:eD,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:eR,g2:eR,glyphName:eR,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:eD,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:eD,horizOriginX:eD,horizOriginY:eD,id:null,ideographic:eD,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:eD,k:eD,k1:eD,k2:eD,k3:eD,k4:eD,kernelMatrix:eL,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:eD,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:eD,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:eD,overlineThickness:eD,paintOrder:null,panose1:null,path:null,pathLength:eD,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:eN,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:eD,pointsAtY:eD,pointsAtZ:eD,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:eL,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:eL,rev:eL,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:eL,requiredFeatures:eL,requiredFonts:eL,requiredFormats:eL,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:eD,specularExponent:eD,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:eD,strikethroughThickness:eD,string:null,stroke:null,strokeDashArray:eL,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:eD,strokeOpacity:eD,strokeWidth:null,style:null,surfaceScale:eD,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:eL,tabIndex:eD,tableValues:null,target:null,targetX:eD,targetY:eD,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:eL,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:eD,underlineThickness:eD,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:eD,values:null,vAlphabetic:eD,vMathematical:eD,vectorEffect:null,vHanging:eD,vIdeographic:eD,version:null,vertAdvY:eD,vertOriginX:eD,vertOriginY:eD,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:eD,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:eU}),eG=eB({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),eK=eB({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:eV}),eY=eB({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),eZ=eE([eH,eq,eG,eK,eY],"html"),eJ=eE([eH,eW,eG,eK,eY],"svg");var eX=n("549812");let eQ=/["&'<>`]/g,e0=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,e1=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,e2=/[|\\{}()[\]^$+*?.]/g,e3=new WeakMap,e5=/[\dA-Fa-f]/,e4=/\d/,e6=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],e8={nbsp:"\xa0",iexcl:"\xa1",cent:"\xa2",pound:"\xa3",curren:"\xa4",yen:"\xa5",brvbar:"\xa6",sect:"\xa7",uml:"\xa8",copy:"\xa9",ordf:"\xaa",laquo:"\xab",not:"\xac",shy:"\xad",reg:"\xae",macr:"\xaf",deg:"\xb0",plusmn:"\xb1",sup2:"\xb2",sup3:"\xb3",acute:"\xb4",micro:"\xb5",para:"\xb6",middot:"\xb7",cedil:"\xb8",sup1:"\xb9",ordm:"\xba",raquo:"\xbb",frac14:"\xbc",frac12:"\xbd",frac34:"\xbe",iquest:"\xbf",Agrave:"\xc0",Aacute:"\xc1",Acirc:"\xc2",Atilde:"\xc3",Auml:"\xc4",Aring:"\xc5",AElig:"\xc6",Ccedil:"\xc7",Egrave:"\xc8",Eacute:"\xc9",Ecirc:"\xca",Euml:"\xcb",Igrave:"\xcc",Iacute:"\xcd",Icirc:"\xce",Iuml:"\xcf",ETH:"\xd0",Ntilde:"\xd1",Ograve:"\xd2",Oacute:"\xd3",Ocirc:"\xd4",Otilde:"\xd5",Ouml:"\xd6",times:"\xd7",Oslash:"\xd8",Ugrave:"\xd9",Uacute:"\xda",Ucirc:"\xdb",Uuml:"\xdc",Yacute:"\xdd",THORN:"\xde",szlig:"\xdf",agrave:"\xe0",aacute:"\xe1",acirc:"\xe2",atilde:"\xe3",auml:"\xe4",aring:"\xe5",aelig:"\xe6",ccedil:"\xe7",egrave:"\xe8",eacute:"\xe9",ecirc:"\xea",euml:"\xeb",igrave:"\xec",iacute:"\xed",icirc:"\xee",iuml:"\xef",eth:"\xf0",ntilde:"\xf1",ograve:"\xf2",oacute:"\xf3",ocirc:"\xf4",otilde:"\xf5",ouml:"\xf6",divide:"\xf7",oslash:"\xf8",ugrave:"\xf9",uacute:"\xfa",ucirc:"\xfb",uuml:"\xfc",yacute:"\xfd",thorn:"\xfe",yuml:"\xff",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},e9=["cent","copy","divide","gt","lt","not","para","times"],e7={}.hasOwnProperty,te={};for(r in e8)e7.call(e8,r)&&(te[e8[r]]=r);let tt=/[^\dA-Za-z]/;function tn(e,t,n){let r,o=function(e,t,n){let r="&#x"+e.toString(16).toUpperCase();return n&&t&&!e5.test(String.fromCharCode(t))?r:r+";"}(e,t,n.omitOptionalSemicolons);if((n.useNamedReferences||n.useShortestReferences)&&(r=function(e,t,n,r){let o=String.fromCharCode(e);if(e7.call(te,o)){let e=te[o],s="&"+e;return n&&e6.includes(e)&&!e9.includes(e)&&(!r||t&&61!==t&&tt.test(String.fromCharCode(t)))?s:s+";"}return""}(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!r)&&n.useShortestReferences){let r=function(e,t,n){let r="&#"+String(e);return n&&t&&!e4.test(String.fromCharCode(t))?r:r+";"}(e,t,n.omitOptionalSemicolons);r.length<o.length&&(o=r)}return r&&(!n.useShortestReferences||r.length<o.length)?r:o}function tr(e,t){return function(e,t){if(e=e.replace(t.subset?function(e){let t=e3.get(e);return!t&&(t=function(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(e2,"\\$&"));return RegExp("(?:"+t.join("|")+")","g")}(e),e3.set(e,t)),t}(t.subset):eQ,n),t.subset||t.escapeOnly)return e;return e.replace(e0,function(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}).replace(e1,n);function n(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}(e,Object.assign({format:tn},t))}let ti=/^>|^->|<!--|-->|--!>|<!-$/g,to=[">"],ts=["<",">"];function ta(e,t){let n=String(e);if("string"!=typeof t)throw TypeError("Expected character");let r=0,o=n.indexOf(t);for(;-1!==o;)r++,o=n.indexOf(t,o+t.length);return r}var tl=n("889514");let tc=/[A-Z]/g,tu=/-[a-z]/g,td=/^data[-\w.:]+$/i;function tp(e){return"-"+e.toLowerCase()}function th(e){return e.charAt(1).toUpperCase()}var tf=n("263055");let tm=/[ \t\n\f\r]/g;function tg(e){return"object"==typeof e?"text"===e.type&&tv(e.value):tv(e)}function tv(e){return""===e.replace(tm,"")}let tb=tw(1),ty=tw(-1),tx=[];function tw(e){return function(t,n,r){let o=t?t.children:tx,s=(n||0)+e,a=o[s];if(!r)for(;a&&tg(a);)s+=e,a=o[s];return a}}let tS={}.hasOwnProperty;function tk(e){return function(t,n,r){return tS.call(e,t.tagName)&&e[t.tagName](t,n,r)}}let tA=tk({body:function(e,t,n){let r=tb(n,t);return!r||"comment"!==r.type},caption:tC,colgroup:tC,dd:function(e,t,n){let r=tb(n,t);return!r||"element"===r.type&&("dt"===r.tagName||"dd"===r.tagName)},dt:function(e,t,n){let r=tb(n,t);return!!(r&&"element"===r.type&&("dt"===r.tagName||"dd"===r.tagName))},head:tC,html:function(e,t,n){let r=tb(n,t);return!r||"comment"!==r.type},li:function(e,t,n){let r=tb(n,t);return!r||"element"===r.type&&"li"===r.tagName},optgroup:function(e,t,n){let r=tb(n,t);return!r||"element"===r.type&&"optgroup"===r.tagName},option:function(e,t,n){let r=tb(n,t);return!r||"element"===r.type&&("option"===r.tagName||"optgroup"===r.tagName)},p:function(e,t,n){let r=tb(n,t);return r?"element"===r.type&&("address"===r.tagName||"article"===r.tagName||"aside"===r.tagName||"blockquote"===r.tagName||"details"===r.tagName||"div"===r.tagName||"dl"===r.tagName||"fieldset"===r.tagName||"figcaption"===r.tagName||"figure"===r.tagName||"footer"===r.tagName||"form"===r.tagName||"h1"===r.tagName||"h2"===r.tagName||"h3"===r.tagName||"h4"===r.tagName||"h5"===r.tagName||"h6"===r.tagName||"header"===r.tagName||"hgroup"===r.tagName||"hr"===r.tagName||"main"===r.tagName||"menu"===r.tagName||"nav"===r.tagName||"ol"===r.tagName||"p"===r.tagName||"pre"===r.tagName||"section"===r.tagName||"table"===r.tagName||"ul"===r.tagName):!n||!("element"===n.type&&("a"===n.tagName||"audio"===n.tagName||"del"===n.tagName||"ins"===n.tagName||"map"===n.tagName||"noscript"===n.tagName||"video"===n.tagName))},rp:tE,rt:tE,tbody:function(e,t,n){let r=tb(n,t);return!r||"element"===r.type&&("tbody"===r.tagName||"tfoot"===r.tagName)},td:tT,tfoot:function(e,t,n){return!tb(n,t)},th:tT,thead:function(e,t,n){let r=tb(n,t);return!!(r&&"element"===r.type&&("tbody"===r.tagName||"tfoot"===r.tagName))},tr:function(e,t,n){let r=tb(n,t);return!r||"element"===r.type&&"tr"===r.tagName}});function tC(e,t,n){let r=tb(n,t,!0);return!r||"comment"!==r.type&&!("text"===r.type&&tg(r.value.charAt(0)))}function tE(e,t,n){let r=tb(n,t);return!r||"element"===r.type&&("rp"===r.tagName||"rt"===r.tagName)}function tT(e,t,n){let r=tb(n,t);return!r||"element"===r.type&&("td"===r.tagName||"th"===r.tagName)}let t_=tk({body:function(e){let t=tb(e,-1,!0);return!t||"comment"!==t.type&&!("text"===t.type&&tg(t.value.charAt(0)))&&!("element"===t.type&&("meta"===t.tagName||"link"===t.tagName||"script"===t.tagName||"style"===t.tagName||"template"===t.tagName))},colgroup:function(e,t,n){let r=ty(n,t),o=tb(e,-1,!0);return!(n&&r&&"element"===r.type&&"colgroup"===r.tagName&&tA(r,n.children.indexOf(r),n))&&!!(o&&"element"===o.type&&"col"===o.tagName)},head:function(e){let t=new Set;for(let n of e.children)if("element"===n.type&&("base"===n.tagName||"title"===n.tagName)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||"element"===n.type},html:function(e){let t=tb(e,-1);return!t||"comment"!==t.type},tbody:function(e,t,n){let r=ty(n,t),o=tb(e,-1);return!(n&&r&&"element"===r.type&&("thead"===r.tagName||"tbody"===r.tagName)&&tA(r,n.children.indexOf(r),n))&&!!(o&&"element"===o.type&&"tr"===o.tagName)}}),tO={name:[[" \n\f\r &/=>".split("")," \n\f\r \"&'/=>`".split("")],["\0 \n\f\r \"&'/<=>".split(""),"\0 \n\f\r \"&'/<=>`".split("")]],unquoted:[[" \n\f\r &>".split(""),"\0 \n\f\r \"&'<=>`".split("")],["\0 \n\f\r \"&'<=>`".split(""),"\0 \n\f\r \"&'<=>`".split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]},tM=["<","&"];function tI(e,t,n,r){return n&&"element"===n.type&&("script"===n.tagName||"style"===n.tagName)?e.value:tr(e.value,Object.assign({},r.settings.characterReferences,{subset:tM}))}let tP=(0,eX.z)("type",{invalid:function(e){throw Error("Expected node, not `"+e+"`")},unknown:function(e){throw Error("Cannot compile unknown node `"+e.type+"`")},handlers:{comment:function(e,t,n,r){return r.settings.bogusComments?"<?"+tr(e.value,Object.assign({},r.settings.characterReferences,{subset:to}))+">":"\x3c!--"+e.value.replace(ti,function(e){return tr(e,Object.assign({},r.settings.characterReferences,{subset:ts}))})+"--\x3e"},doctype:function(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"},element:function(e,t,n,r){let o;let s=r.schema,a="svg"!==s.space&&r.settings.omitOptionalTags,l="svg"===s.space?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),c=[];"html"===s.space&&"svg"===e.tagName&&(r.schema=eJ);let u=function(e,t){let n;let r=[],o=-1;if(t){for(n in t)if(null!==t[n]&&void 0!==t[n]){let o=function(e,t,n){let r;let o=function(e,t){let n=eT(t),r=t,o=e_;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&td.test(t)){if("-"===t.charAt(4)){let e=t.slice(5).replace(tu,th);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!tu.test(e)){let n=e.replace(tc,tp);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}o=eF}return new o(r,t)}(e.schema,t),s=e.settings.allowParseErrors&&"html"===e.schema.space?0:1,a=e.settings.allowDangerousCharacters?0:1,l=e.quote;if(o.overloadedBoolean&&(n===o.attribute||""===n)?n=!0:(o.boolean||o.overloadedBoolean)&&("string"!=typeof n||n===o.attribute||""===n)&&(n=!!n),null==n||!1===n||"number"==typeof n&&Number.isNaN(n))return"";let c=tr(o.attribute,Object.assign({},e.settings.characterReferences,{subset:tO.name[s][a]}));return!0===n?c:(n=Array.isArray(n)?(o.commaSeparated?tl.P:tf.P)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(r=tr(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:tO.unquoted[s][a]}))),r!==n&&(e.settings.quoteSmart&&ta(n,l)>ta(n,e.alternative)&&(l=e.alternative),r=l+tr(n,Object.assign({},e.settings.characterReferences,{subset:("'"===l?tO.single:tO.double)[s][a],attribute:!0}))+l),c+(r?"="+r:r))}(e,n,t[n]);o&&r.push(o)}}for(;++o<r.length;){let t=e.settings.tightAttributes?r[o].charAt(r[o].length-1):void 0;o!==r.length-1&&'"'!==t&&"'"!==t&&(r[o]+=" ")}return r.join("")}(r,e.properties),d=r.all("html"===s.space&&"template"===e.tagName?e.content:e);return r.schema=s,d&&(l=!1),(u||!a||!t_(e,t,n))&&(c.push("<",e.tagName,u?" "+u:""),l&&("svg"===s.space||r.settings.closeSelfClosing)&&(o=u.charAt(u.length-1),(!r.settings.tightSelfClosing||"/"===o||o&&'"'!==o&&"'"!==o)&&c.push(" "),c.push("/")),c.push(">")),c.push(d),!l&&(!a||!tA(e,t,n))&&c.push("</"+e.tagName+">"),c.join("")},raw:function(e,t,n,r){return r.settings.allowDangerousHtml?e.value:tI(e,t,n,r)},root:function(e,t,n,r){return r.all(e)},text:tI}}),tD={},tN={},tR=[];function tL(e,t,n){return tP(e,t,n,this)}function tj(e){let t=[],n=e&&e.children||tR,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}function t$(e,t){let n="string"==typeof e?{}:{...e.colorReplacements},r="string"==typeof e?e:e.name;for(let[e,o]of Object.entries(t?.colorReplacements||{}))"string"==typeof o?n[e]=o:e===r&&Object.assign(n,o);return n}function tF(e,t){return e&&t?.[e?.toLowerCase()]||e}async function tz(e){return Promise.resolve("function"==typeof e?e():e).then(e=>e.default||e)}function tB(e){return!e||["plaintext","txt","text","plain"].includes(e)}function tH(e){return"ansi"===e||tB(e)}function tU(e){return"none"===e}function tV(e){return tU(e)}function tq(e,t){if(!t)return e;for(let n of(e.properties||={},e.properties.class||=[],"string"==typeof e.properties.class&&(e.properties.class=e.properties.class.split(/\s+/g)),!Array.isArray(e.properties.class)&&(e.properties.class=[]),Array.isArray(t)?t:t.split(/\s+/g)))n&&!e.properties.class.includes(n)&&e.properties.class.push(n);return e}function tW(e,t=!1){let n=e.split(/(\r?\n)/g),r=0,o=[];for(let e=0;e<n.length;e+=2){let s=t?n[e]+(n[e+1]||""):n[e];o.push([s,r]),r+=n[e].length,r+=n[e+1]?.length||0}return o}let tG="light-dark()";function tK(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&S.Italic&&(t["font-style"]="italic"),e.fontStyle&S.Bold&&(t["font-weight"]="bold");let n=[];e.fontStyle&S.Underline&&n.push("underline"),e.fontStyle&S.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function tY(e){return"string"==typeof e?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(";")}let tZ=new WeakMap;function tJ(e,t){tZ.set(e,t)}function tX(e){return tZ.get(e)}class tQ{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,t){var n;return new tQ(Object.fromEntries((Array.isArray(n=t)?n:[n]).map(e=>[e,ek])),e)}constructor(...e){if(2===e.length){let[t,n]=e;this.lang=n,this._stacks=t}else{let[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return function(e){let t=[],n=new Set;return!function e(r){if(n.has(r))return;n.add(r);let o=r?.nameScopesList?.scopeName;o&&t.push(o),r.parent&&e(r.parent)}(e),t}(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}let t0=[function(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let n=function(e){if("number"==typeof e){if(e<0||e>t.source.length)throw new l(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...r.indexToPos(e),offset:e}}{let t=r.lines[e.line];if(void 0===t)throw new l(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${r.lines.length}`);if(e.character<0||e.character>t.length)throw new l(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,offset:r.posToIndex(e.line,e.character)}}},r=function(e){let t=tW(e,!0).map(([e])=>e);return{lines:t,indexToPos:function(n){if(n===e.length)return{line:t.length-1,character:t[t.length-1].length};let r=n,o=0;for(let e of t){if(r<e.length)break;r-=e.length,o++}return{line:o,character:r}},posToIndex:function(e,n){let r=0;for(let n=0;n<e;n++)r+=t[n].length;return r+=n}}}(t.source),o=(t.options.decorations||[]).map(e=>({...e,start:n(e.start),end:n(e.end)}));(function(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new l(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){let t=e[r],o=n.start.offset<=t.start.offset&&t.start.offset<n.end.offset,s=n.start.offset<t.end.offset&&t.end.offset<=n.end.offset,a=t.start.offset<=n.start.offset&&n.start.offset<t.end.offset,c=t.start.offset<n.end.offset&&n.end.offset<=t.end.offset;if(o||s||a||c){if(o&&s||a&&c)continue;throw new l(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}})(o),e.set(t.meta,{decorations:o,converter:r,source:t.source})}return e.get(t.meta)}return{name:"shiki:decorations",tokens(e){if(!!this.options.decorations?.length)return function(e,t){let n=Array.from(t instanceof Set?t:new Set(t)).sort((e,t)=>e-t);return n.length?e.map(e=>e.flatMap(e=>{let t=n.filter(t=>e.offset<t&&t<e.offset+e.content.length).map(t=>t-e.offset).sort((e,t)=>e-t);return t.length?function(e,t){let n=0,r=[];for(let o of t)o>n&&r.push({...e,content:e.content.slice(n,o),offset:e.offset+n}),n=o;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}(e,t):e})):e}(e,t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]))},code(e){if(!this.options.decorations?.length)return;let n=t(this),r=Array.from(e.children).filter(e=>"element"===e.type&&"span"===e.tagName);if(r.length!==n.converter.lines.length)throw new l(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function o(e,t,n,o){let a=r[e],c="",u=-1,d=-1;if(0===t&&(u=0),0===n&&(d=0),n===Number.POSITIVE_INFINITY&&(d=a.children.length),-1===u||-1===d)for(let e=0;e<a.children.length;e++)c+=function e(t){return"text"===t.type?t.value:"element"===t.type?t.children.map(e).join(""):""}(a.children[e]),-1===u&&c.length===t&&(u=e+1),-1===d&&c.length===n&&(d=e+1);if(-1===u)throw new l(`Failed to find start index for decoration ${JSON.stringify(o.start)}`);if(-1===d)throw new l(`Failed to find end index for decoration ${JSON.stringify(o.end)}`);let p=a.children.slice(u,d);if(o.alwaysWrap||p.length!==a.children.length){if(o.alwaysWrap||1!==p.length||"element"!==p[0].type){let e={type:"element",tagName:"span",properties:{},children:p};s(e,o,"wrapper"),a.children.splice(u,p.length,e)}else s(p[0],o,"token")}else s(a,o,"line")}function s(e,t,n){let r=t.properties||{},o=t.transform||(e=>e);return e.tagName=t.tagName||"span",e.properties={...e.properties,...r,class:e.properties.class},t.properties?.class&&tq(e,t.properties.class),e=o(e,n)||e}let a=[];for(let e of n.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset)){let{start:t,end:n}=e;if(t.line===n.line)o(t.line,t.character,n.character,e);else if(t.line<n.line){o(t.line,t.character,Number.POSITIVE_INFINITY,e);for(let o=t.line+1;o<n.line;o++)a.unshift(()=>{var t,n;return t=o,n=e,void(r[t]=s(r[t],n,"line"))});o(n.line,0,n.character,e)}}a.forEach(e=>e())}}}()];function t1(e){return[...e.transformers||[],...t0]}var t2=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],t3={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function t5(e){let t=e.shift();if("2"===t){let t=e.splice(0,3).map(e=>Number.parseInt(e));if(3!==t.length||t.some(e=>Number.isNaN(e)))return;return{type:"rgb",rgb:t}}if("5"===t){let t=e.shift();if(t)return{type:"table",index:Number(t)}}}var t4={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function t6(e,t,n={}){let{lang:r="text",theme:o=e.getLoadedThemes()[0]}=n;if(tB(r)||tU(o))return tW(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:s,colorMap:a}=e.setTheme(o);if("ansi"===r)return function(e,t,n){let r,o,s,a=t$(e,n),l=tW(t),c=function(e=t4){let t;function n(t){return e[t]}function r(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,"0")).join("")}`}return{value:function(n){switch(n.type){case"named":return e[n.name];case"rgb":return r(n.rgb);case"table":var o;return o=n.index,function(){if(t)return t;t=[];for(let n=0;n<t2.length;n++)t.push(e[t2[n]]);let n=[0,95,135,175,215,255];for(let e=0;e<6;e++)for(let o=0;o<6;o++)for(let s=0;s<6;s++)t.push(r([n[e],n[o],n[s]]));let o=8;for(let e=0;e<24;e++,o+=10)t.push(r([o,o,o]));return t}()[o]}}}}(Object.fromEntries(t2.map(t=>[t,e.colors?.[`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`]])));let u=(r=null,o=null,s=new Set,{parse(e){let t=[],n=0;do{let a=function(e,t){let n=e.indexOf("\x1b",t);if(-1!==n&&"["===e[n+1]){let t=e.indexOf("m",n);if(-1!==t)return{sequence:e.substring(n+2,t).split(";"),startPosition:n,position:t+1}}return{position:e.length}}(e,n),l=a.sequence?e.substring(n,a.startPosition):e.substring(n);if(l.length>0&&t.push({value:l,foreground:r,background:o,decorations:new Set(s)}),a.sequence){let e=function(e){let t=[];for(;e.length>0;){let n=e.shift();if(!n)continue;let r=Number.parseInt(n);if(!Number.isNaN(r))if(0===r)t.push({type:"resetAll"});else if(r<=9)t3[r]&&t.push({type:"setDecoration",value:t3[r]});else if(r<=29){let e=t3[r-20];e&&(t.push({type:"resetDecoration",value:e}),"dim"===e&&t.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)t.push({type:"setForegroundColor",value:{type:"named",name:t2[r-30]}});else if(38===r){let n=t5(e);n&&t.push({type:"setForegroundColor",value:n})}else if(39===r)t.push({type:"resetForegroundColor"});else if(r<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:t2[r-40]}});else if(48===r){let n=t5(e);n&&t.push({type:"setBackgroundColor",value:n})}else 49===r?t.push({type:"resetBackgroundColor"}):53===r?t.push({type:"setDecoration",value:"overline"}):55===r?t.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?t.push({type:"setForegroundColor",value:{type:"named",name:t2[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:t2[r-100+8]}})}return t}(a.sequence);for(let t of e)"resetAll"===t.type?(r=null,o=null,s.clear()):"resetForegroundColor"===t.type?r=null:"resetBackgroundColor"===t.type?o=null:"resetDecoration"===t.type&&s.delete(t.value);for(let t of e)"setForegroundColor"===t.type?r=t.value:"setBackgroundColor"===t.type?o=t.value:"setDecoration"===t.type&&s.add(t.value)}n=a.position}while(n<e.length);return t}});return l.map(t=>u.parse(t[0]).map(n=>{let r,o;n.decorations.has("reverse")?(r=n.background?c.value(n.background):e.bg,o=n.foreground?c.value(n.foreground):e.fg):(r=n.foreground?c.value(n.foreground):e.fg,o=n.background?c.value(n.background):void 0),r=tF(r,a),o=tF(o,a),n.decorations.has("dim")&&(r=function(e){let t=e.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/);if(t){if(t[3]){let e=Math.round(Number.parseInt(t[3],16)/2).toString(16).padStart(2,"0");return`#${t[1]}${t[2]}${e}`}if(t[2])return`#${t[1]}${t[2]}80`;else return`#${Array.from(t[1]).map(e=>`${e}${e}`).join("")}80`}let n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}(r));let s=S.None;return n.decorations.has("bold")&&(s|=S.Bold),n.decorations.has("italic")&&(s|=S.Italic),n.decorations.has("underline")&&(s|=S.Underline),n.decorations.has("strikethrough")&&(s|=S.Strikethrough),{content:n.value,offset:t[1],color:r,bgColor:o,fontStyle:s}}))}(s,t,n);let c=e.getLanguage(r);if(n.grammarState){if(n.grammarState.lang!==c.name)throw new l(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${c.name}"`);if(!n.grammarState.themes.includes(s.name))throw new l(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return function(e,t,n,r,o){let s=t8(e,t,n,r,o),a=new tQ(t8(e,t,n,r,o).stateStack,t.name,n.name);return tJ(s.tokens,a),s.tokens}(t,c,s,a,n)}function t8(e,t,n,r,o){let s=t$(n,o),{tokenizeMaxLineLength:a=0,tokenizeTimeLimit:c=500}=o,u=tW(e),d=o.grammarState?function(e,t){if(!(e instanceof tQ))throw new l("Invalid grammar state");return e.getInternalStack(t)}(o.grammarState,n.name)??ek:null!=o.grammarContextCode?t8(o.grammarContextCode,t,n,r,{...o,grammarState:void 0,grammarContextCode:void 0}).stateStack:ek,p=[],h=[];for(let e=0,l=u.length;e<l;e++){let l,f;let[m,g]=u[e];if(""===m){p=[],h.push([]);continue}if(a>0&&m.length>=a){p=[],h.push([{content:m,offset:g,color:"",fontStyle:0}]);continue}o.includeExplanation&&(l=t.tokenizeLine(m,d,c).tokens,f=0);let v=t.tokenizeLine2(m,d,c),b=v.tokens.length/2;for(let e=0;e<b;e++){let t=v.tokens[2*e],a=e+1<b?v.tokens[2*e+2]:m.length;if(t===a)continue;let c=v.tokens[2*e+1],u=tF(r[T.getForeground(c)],s),d=T.getFontStyle(c),h={content:m.substring(t,a),offset:g+t,color:u,fontStyle:d};if(o.includeExplanation){let e=[];if("scopeName"!==o.includeExplanation)for(let t of n.settings){let n;switch(typeof t.scope){case"string":n=t.scope.split(/,/).map(e=>e.trim());break;case"object":n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(/ /))})}h.explanation=[];let r=0;for(;t+r<a;){let t=l[f],n=m.substring(t.startIndex,t.endIndex);r+=n.length,h.explanation.push({content:n,scopes:"scopeName"===o.includeExplanation?function(e){return e.map(e=>({scopeName:e}))}(t.scopes):function(e,t){let n=[];for(let r=0,o=t.length;r<o;r++){let o=t[r];n[r]={scopeName:o,themeMatches:function(e,t,n){let r=[];for(let{selectors:o,settings:s}of e)for(let e of o)if(function(e,t,n){if(!t9(e[e.length-1],t))return!1;let r=e.length-2,o=n.length-1;for(;r>=0&&o>=0;)t9(e[r],n[o])&&(r-=1),o-=1;return -1===r||!1}(e,t,n)){r.push(s);break}return r}(e,o,t.slice(0,r))}}return n}(e,t.scopes)}),f+=1}}p.push(h)}h.push(p),p=[],d=v.ruleStack}return{tokens:h,stateStack:d}}function t9(e,t){return e===t||t.substring(0,e.length)===e&&"."===t[e.length]}function t7(e,t,n){let r=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),o=r.map(r=>{let o=t6(e,t,{...n,theme:r.theme}),s=tX(o);return{tokens:o,state:s,theme:"string"==typeof r.theme?r.theme:r.theme.name}}),s=function(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let o=e.map(e=>e[r]),s=t.map(()=>[]);t.forEach((e,t)=>e.push(s[t]));let a=o.map(()=>0),l=o.map(e=>e[0]);for(;l.every(e=>e);){let e=Math.min(...l.map(e=>e.content.length));for(let t=0;t<n;t++){let n=l[t];n.content.length===e?(s[t].push(n),a[t]+=1,l[t]=o[t][a[t]]):(s[t].push({...n,content:n.content.slice(0,e)}),l[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}(...o.map(e=>e.tokens)),a=s[0].map((e,t)=>e.map((e,o)=>{let a={content:e.content,variants:{},offset:e.offset};return"includeExplanation"in n&&n.includeExplanation&&(a.explanation=e.explanation),s.forEach((e,n)=>{let{content:s,explanation:l,offset:c,...u}=e[t][o];a.variants[r[n].color]=u}),a})),l=o[0].state?new tQ(Object.fromEntries(o.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),o[0].state.lang):void 0;return l&&tJ(a,l),a}function ne(e,t,n){let r,o,s,a,c,u;if("themes"in n){let{defaultColor:d="light",cssVariablePrefix:p="--shiki-",colorsRendering:h="css-vars"}=n,f=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===d?-1:t.color===d?1:0);if(0===f.length)throw new l("`themes` option must not be empty");let m=t7(e,t,n);if(u=tX(m),d&&tG!==d&&!f.find(e=>e.color===d))throw new l(`\`themes\` option must contain the defaultColor key \`${d}\``);let g=f.map(t=>e.getTheme(t.theme)),v=f.map(e=>e.color);s=m.map(e=>e.map(e=>(function(e,t,n,r,o="css-vars"){let s={content:e.content,explanation:e.explanation,offset:e.offset},a=t.map(t=>tK(e.variants[t])),c=new Set(a.flatMap(e=>Object.keys(e))),u={},d=(e,r)=>{let o="color"===r?"":"background-color"===r?"-bg":`-${r}`;return n+t[e]+("color"===r?"":o)};return a.forEach((e,n)=>{for(let s of c){let c=e[s]||"inherit";if(0===n&&r){if(r===tG&&a.length>1){let e=t.findIndex(e=>"light"===e),r=t.findIndex(e=>"dark"===e);if(-1===e||-1===r)throw new l('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');let p=a[e][s]||"inherit",h=a[r][s]||"inherit";u[s]=`light-dark(${p}, ${h})`,"css-vars"===o&&(u[d(n,s)]=c)}else u[s]=c}else"css-vars"===o&&(u[d(n,s)]=c)}}),s.htmlStyle=u,s})(e,v,p,d,h))),u&&tJ(s,u);let b=f.map(e=>t$(e.theme,n));o=nt(f,g,b,p,d,"fg",h),r=nt(f,g,b,p,d,"bg",h),a=`shiki-themes ${g.map(e=>e.name).join(" ")}`,c=d?void 0:[o,r].join(";")}else if("theme"in n){let l=t$(n.theme,n);s=t6(e,t,n);let c=e.getTheme(n.theme);r=tF(c.bg,l),o=tF(c.fg,l),a=c.name,u=tX(s)}else throw new l("Invalid options, either `theme` or `themes` must be provided");return{tokens:s,fg:o,bg:r,themeName:a,rootStyle:c,grammarState:u}}function nt(e,t,n,r,o,s,a){return e.map((c,u)=>{let d=tF(t[u][s],n[u])||"inherit",p=`${r+c.color}${"bg"===s?"-bg":""}:${d}`;if(0===u&&o){if(o===tG&&e.length>1){let r=e.findIndex(e=>"light"===e.color),o=e.findIndex(e=>"dark"===e.color);if(-1===r||-1===o)throw new l('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');let a=tF(t[r][s],n[r])||"inherit",c=tF(t[o][s],n[o])||"inherit";return`light-dark(${a}, ${c});${p}`}return d}return"css-vars"===a?p:null}).filter(e=>!!e).join(";")}function nn(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>nn(e,t,n),codeToTokens:(t,n)=>ne(e,t,n)}){let o=t;for(let e of t1(n))o=e.preprocess?.call(r,o,n)||o;let{tokens:s,fg:a,bg:l,themeName:c,rootStyle:u,grammarState:d}=ne(e,o,n),{mergeWhitespaces:p=!0,mergeSameStyleTokens:h=!1}=n;!0===p?s=function(e){return e.map(e=>{let t=[],n="",r=0;return e.forEach((o,s)=>{let a=!(o.fontStyle&&(o.fontStyle&S.Underline||o.fontStyle&S.Strikethrough));a&&o.content.match(/^\s+$/)&&e[s+1]?(!r&&(r=o.offset),n+=o.content):n?(a?t.push({...o,offset:r,content:n+o.content}):t.push({content:n,offset:r},o),r=0,n=""):t.push(o)}),t})}(s):"never"===p&&(s=function(e){return e.map(e=>e.flatMap(e=>{if(e.content.match(/^\s+$/))return e;let t=e.content.match(/^(\s*)(.*?)(\s*)$/);if(!t)return e;let[,n,r,o]=t;if(!n&&!o)return e;let s=[{...e,offset:e.offset+n.length,content:r}];return n&&s.unshift({content:n,offset:e.offset}),o&&s.push({content:o,offset:e.offset+n.length+r.length}),s}))}(s)),h&&(s=function(e){return e.map(e=>{let t=[];for(let n of e){if(0===t.length){t.push({...n});continue}let e=t[t.length-1],r=tY(e.htmlStyle||tK(e)),o=tY(n.htmlStyle||tK(n)),s=e.fontStyle&&(e.fontStyle&S.Underline||e.fontStyle&S.Strikethrough),a=n.fontStyle&&(n.fontStyle&S.Underline||n.fontStyle&S.Strikethrough);s||a||r!==o?t.push({...n}):e.content+=n.content}return t})}(s));let f={...r,get source(){return o}};for(let e of t1(n))s=e.tokens?.call(f,s)||s;return function(e,t,n,r=tX(e)){let o=t1(t),s=[],a={type:"root",children:[]},{structure:l="classic",tabindex:c="0"}=t,u={type:"element",tagName:"pre",properties:{class:`shiki ${t.themeName||""}`,style:t.rootStyle||`background-color:${t.bg};color:${t.fg}`,...!1!==c&&null!=c?{tabindex:c.toString()}:{},...Object.fromEntries(Array.from(Object.entries(t.meta||{})).filter(([e])=>!e.startsWith("_")))},children:[]},d={type:"element",tagName:"code",properties:{},children:s},p=[],h={...n,structure:l,addClassToHast:tq,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return a},get pre(){return u},get code(){return d},get lines(){return p}};if(e.forEach((e,t)=>{t&&("inline"===l?a.children.push({type:"element",tagName:"br",properties:{},children:[]}):"classic"===l&&s.push({type:"text",value:"\n"}));let n={type:"element",tagName:"span",properties:{class:"line"},children:[]},r=0;for(let s of e){let e={type:"element",tagName:"span",properties:{...s.htmlAttrs},children:[{type:"text",value:s.content}]},c=tY(s.htmlStyle||tK(s));for(let a of(c&&(e.properties.style=c),o))e=a?.span?.call(h,e,t+1,r,n,s)||e;"inline"===l?a.children.push(e):"classic"===l&&n.children.push(e),r+=s.content.length}if("classic"===l){for(let e of o)n=e?.line?.call(h,n,t+1)||n;p.push(n),s.push(n)}}),"classic"===l){for(let e of o)d=e?.code?.call(h,d)||d;for(let e of(u.children.push(d),o))u=e?.pre?.call(h,u)||u;a.children.push(u)}let f=a;for(let e of o)f=e?.root?.call(h,f)||f;return r&&tJ(f,r),f}(s,{...n,fg:a,bg:l,themeName:c,rootStyle:u},f,d)}let nr=function(e,t){let n=t||tD,r=n.quote||'"';if('"'!==r&&"'"!==r)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return({one:tL,all:tj,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||eA,characterReferences:n.characterReferences||tN,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:"svg"===n.space?eJ:eZ,quote:r,alternative:'"'===r?"'":'"'}).one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)},ni={light:"#333333",dark:"#bbbbbb"},no={light:"#fffffe",dark:"#1e1e1e"},ns="__shiki_resolved";function na(e){if(e?.[ns])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.["editor.foreground"]&&(r=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),!r&&(r="light"===t.type?ni.light:ni.dark),!n&&(n="light"===t.type?no.light:no.dark),t.fg=r,t.bg=n}!(t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope)&&t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let o=0,s=new Map;function a(e){if(s.has(e))return s.get(e);o+=1;let n=`#${o.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?a(e):(s.set(e,n),n)}for(let e of(t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith("#"),r=e.settings?.background&&!e.settings.background.startsWith("#");if(!n&&!r)return e;let o={...e,settings:{...e.settings}};if(n){let n=a(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,o.settings.foreground=n}if(r){let n=a(e.settings.background);t.colorReplacements[n]=e.settings.background,o.settings.background=n}return o}),Object.keys(t.colors||{})))if(("editor.foreground"===e||"editor.background"===e||e.startsWith("terminal.ansi"))&&!t.colors[e]?.startsWith("#")){let n=a(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,ns,{enumerable:!1,writable:!1,value:!0}),t}async function nl(e){return Array.from(new Set((await Promise.all(e.filter(e=>!tH(e)).map(async e=>await tz(e).then(e=>Array.isArray(e)?e:[e])))).flat()))}async function nc(e){return(await Promise.all(e.map(async e=>tU(e)?null:na(await tz(e))))).filter(e=>!!e)}class nu extends Error{constructor(e){super(e),this.name="ShikiError"}}class nd extends eS{constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(e){return"string"==typeof e?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=na(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return!this._loadedThemesCache&&(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);!t&&(t=b.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){if(this._alias[e]){let t=new Set([e]);for(;this._alias[e];){if(e=this._alias[e],t.has(e))throw new nu(`Circular alias \`${Array.from(t).join(" -> ")} -> ${e}\``);t.add(e)}}return this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=Array.from(this._langGraph.entries()),n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>t&&t.embeddedLangs?.some(e=>n.map(([e])=>e).includes(e))).filter(e=>!n.includes(e));throw new nu(`Missing languages ${n.map(([e])=>`\`${e}\``).join(", ")}, required by ${e.map(([e])=>`\`${e}\``).join(", ")}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return!this._loadedLanguagesCache&&(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){if(this._langMap.set(e.name,e),this._langGraph.set(e.name,e),e.embeddedLangs)for(let t of e.embeddedLangs)this._langGraph.set(t,this._langMap.get(t))}}class np{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{!this._injections.get(t)&&this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split("."),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(".");n=[...n,...this._injections.get(r)||[]]}return n}}let nh=0;async function nf(e){!e.engine&&!function(e,t=3){if(!(t>3))console.trace(`[SHIKI DEPRECATE]: ${e}`)}("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([nc(e.themes||[]),nl(e.langs||[]),e.engine]);return function(e){let t;nh+=1,!1!==e.warnings&&nh>=10&&nh%10==0&&console.warn(`[Shiki] ${nh} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let n=!1;if(!e.engine)throw new nu("`engine` option is required for synchronous mode");let r=(e.langs||[]).flat(1),o=(e.themes||[]).flat(1).map(na),s=new nd(new np(e.engine,r),o,r,e.langAlias);function a(e){if("none"===e)return{bg:"",fg:"",name:"none",settings:[],type:"dark"};u();let t=s.getTheme(e);if(!t)throw new nu(`Theme \`${e}\` not found, you may need to load it first`);return t}function l(...e){u(),s.loadLanguages(e.flat(1))}function c(...e){for(let t of(u(),e.flat(1)))s.loadTheme(t)}function u(){if(n)throw new nu("Shiki instance has been disposed")}function d(){!n&&(n=!0,s.dispose(),nh-=1)}return{setTheme:function(e){u();let n=a(e);return t!==e&&(s.setTheme(n),t=e),{theme:n,colorMap:s.getColorMap()}},getTheme:a,getLanguage:function(e){u();let t=s.getGrammar("string"==typeof e?e:e.name);if(!t)throw new nu(`Language \`${e}\` not found, you may need to load it first`);return t},getLoadedThemes:function(){return u(),s.getLoadedThemes()},getLoadedLanguages:function(){return u(),s.getLoadedLanguages()},loadLanguage:async function e(...t){return l(await nl(t))},loadLanguageSync:l,loadTheme:async function e(...t){return u(),c(await nc(t))},loadThemeSync:c,dispose:d,[Symbol.dispose]:d}}({...e,themes:t,langs:n,engine:r})}async function nm(e){let t=await nf(e);return{getLastGrammarState:(...e)=>(function(...e){if(2===e.length)return tX(e[1]);let[t,n,r={}]=e,{lang:o="text",theme:s=t.getLoadedThemes()[0]}=r;if(tB(o)||tU(s))throw new l("Plain language does not have grammar state");if("ansi"===o)throw new l("ANSI language does not have grammar state");let{theme:a,colorMap:c}=t.setTheme(s),u=t.getLanguage(o);return new tQ(t8(n,u,a,c,r).stateStack,u.name,a.name)})(t,...e),codeToTokensBase:(e,n)=>t6(t,e,n),codeToTokensWithThemes:(e,n)=>t7(t,e,n),codeToTokens:(e,n)=>ne(t,e,n),codeToHast:(e,n)=>nn(t,e,n),codeToHtml:(e,n)=>(function(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>nn(e,t,n),codeToTokens:(t,n)=>ne(e,t,n)},o=nr(nn(e,t,n,r));for(let e of t1(n))o=e.postprocess?.call(r,o,n)||o;return o})(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}let ng=[{id:"abap",name:"ABAP",import:()=>n.e("3907").then(n.bind(n,91211))},{id:"actionscript-3",name:"ActionScript",import:()=>n.e("1605").then(n.bind(n,977332))},{id:"ada",name:"Ada",import:()=>n.e("3559").then(n.bind(n,222612))},{id:"angular-html",name:"Angular HTML",import:()=>n.e("2087").then(n.bind(n,329987))},{id:"angular-ts",name:"Angular TypeScript",import:()=>n.e("1456").then(n.bind(n,155817))},{id:"apache",name:"Apache Conf",import:()=>n.e("2277").then(n.bind(n,259058))},{id:"apex",name:"Apex",import:()=>n.e("7947").then(n.bind(n,313629))},{id:"apl",name:"APL",import:()=>n.e("8257").then(n.bind(n,36382))},{id:"applescript",name:"AppleScript",import:()=>n.e("1038").then(n.bind(n,320348))},{id:"ara",name:"Ara",import:()=>n.e("6263").then(n.bind(n,576906))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:()=>n.e("8183").then(n.bind(n,113084))},{id:"asm",name:"Assembly",import:()=>n.e("7748").then(n.bind(n,511973))},{id:"astro",name:"Astro",import:()=>n.e("4756").then(n.bind(n,317089))},{id:"awk",name:"AWK",import:()=>n.e("6410").then(n.bind(n,475401))},{id:"ballerina",name:"Ballerina",import:()=>n.e("820").then(n.bind(n,92598))},{id:"bat",name:"Batch File",aliases:["batch"],import:()=>n.e("5106").then(n.bind(n,799484))},{id:"beancount",name:"Beancount",import:()=>n.e("7618").then(n.bind(n,817734))},{id:"berry",name:"Berry",aliases:["be"],import:()=>n.e("2149").then(n.bind(n,985101))},{id:"bibtex",name:"BibTeX",import:()=>n.e("2708").then(n.bind(n,191171))},{id:"bicep",name:"Bicep",import:()=>n.e("3488").then(n.bind(n,54102))},{id:"blade",name:"Blade",import:()=>n.e("1386").then(n.bind(n,868949))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:()=>n.e("7470").then(n.bind(n,176384))},{id:"c",name:"C",import:()=>n.e("6329").then(n.bind(n,620933))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:()=>n.e("4903").then(n.bind(n,40204))},{id:"cairo",name:"Cairo",import:()=>n.e("3021").then(n.bind(n,285084))},{id:"clarity",name:"Clarity",import:()=>n.e("6303").then(n.bind(n,206437))},{id:"clojure",name:"Clojure",aliases:["clj"],import:()=>n.e("7339").then(n.bind(n,156029))},{id:"cmake",name:"CMake",import:()=>n.e("6852").then(n.bind(n,122338))},{id:"cobol",name:"COBOL",import:()=>n.e("8039").then(n.bind(n,439154))},{id:"codeowners",name:"CODEOWNERS",import:()=>n.e("9384").then(n.bind(n,715811))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:()=>n.e("8398").then(n.bind(n,599961))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:()=>n.e("9774").then(n.bind(n,856378))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:()=>n.e("6425").then(n.bind(n,135013))},{id:"coq",name:"Coq",import:()=>n.e("9145").then(n.bind(n,464917))},{id:"cpp",name:"C++",aliases:["c++"],import:()=>n.e("1017").then(n.bind(n,132441))},{id:"crystal",name:"Crystal",import:()=>n.e("4994").then(n.bind(n,915433))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:()=>n.e("8692").then(n.bind(n,596746))},{id:"css",name:"CSS",import:()=>n.e("9201").then(n.bind(n,407877))},{id:"csv",name:"CSV",import:()=>n.e("1598").then(n.bind(n,810290))},{id:"cue",name:"CUE",import:()=>n.e("1693").then(n.bind(n,278791))},{id:"cypher",name:"Cypher",aliases:["cql"],import:()=>n.e("403").then(n.bind(n,20119))},{id:"d",name:"D",import:()=>n.e("8602").then(n.bind(n,973206))},{id:"dart",name:"Dart",import:()=>n.e("2908").then(n.bind(n,391481))},{id:"dax",name:"DAX",import:()=>n.e("1552").then(n.bind(n,281473))},{id:"desktop",name:"Desktop",import:()=>n.e("9280").then(n.bind(n,137004))},{id:"diff",name:"Diff",import:()=>n.e("4252").then(n.bind(n,917915))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:()=>n.e("1998").then(n.bind(n,459914))},{id:"dotenv",name:"dotEnv",import:()=>n.e("5980").then(n.bind(n,702611))},{id:"dream-maker",name:"Dream Maker",import:()=>n.e("1283").then(n.bind(n,5057))},{id:"edge",name:"Edge",import:()=>n.e("7383").then(n.bind(n,760332))},{id:"elixir",name:"Elixir",import:()=>n.e("1868").then(n.bind(n,712659))},{id:"elm",name:"Elm",import:()=>n.e("6753").then(n.bind(n,471559))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:()=>n.e("9680").then(n.bind(n,930619))},{id:"erb",name:"ERB",import:()=>n.e("2891").then(n.bind(n,31720))},{id:"erlang",name:"Erlang",aliases:["erl"],import:()=>n.e("9958").then(n.bind(n,37484))},{id:"fennel",name:"Fennel",import:()=>n.e("1816").then(n.bind(n,180227))},{id:"fish",name:"Fish",import:()=>n.e("2774").then(n.bind(n,736241))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:()=>n.e("4568").then(n.bind(n,603565))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:()=>n.e("7056").then(n.bind(n,66736))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:()=>n.e("6909").then(n.bind(n,60565))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:()=>n.e("389").then(n.bind(n,948078))},{id:"gdresource",name:"GDResource",import:()=>n.e("2892").then(n.bind(n,667252))},{id:"gdscript",name:"GDScript",import:()=>n.e("9563").then(n.bind(n,168713))},{id:"gdshader",name:"GDShader",import:()=>n.e("4848").then(n.bind(n,202664))},{id:"genie",name:"Genie",import:()=>n.e("3575").then(n.bind(n,886237))},{id:"gherkin",name:"Gherkin",import:()=>n.e("6806").then(n.bind(n,913659))},{id:"git-commit",name:"Git Commit Message",import:()=>n.e("4149").then(n.bind(n,102514))},{id:"git-rebase",name:"Git Rebase Message",import:()=>n.e("426").then(n.bind(n,61331))},{id:"gleam",name:"Gleam",import:()=>n.e("4439").then(n.bind(n,551202))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:()=>n.e("7370").then(n.bind(n,496130))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:()=>n.e("4032").then(n.bind(n,967399))},{id:"glsl",name:"GLSL",import:()=>n.e("1810").then(n.bind(n,451053))},{id:"gnuplot",name:"Gnuplot",import:()=>n.e("7424").then(n.bind(n,101517))},{id:"go",name:"Go",import:()=>n.e("2002").then(n.bind(n,173078))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>n.e("7663").then(n.bind(n,805661))},{id:"groovy",name:"Groovy",import:()=>n.e("9335").then(n.bind(n,604313))},{id:"hack",name:"Hack",import:()=>n.e("7030").then(n.bind(n,833528))},{id:"haml",name:"Ruby Haml",import:()=>n.e("587").then(n.bind(n,927016))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:()=>n.e("4905").then(n.bind(n,243155))},{id:"haskell",name:"Haskell",aliases:["hs"],import:()=>n.e("8059").then(n.bind(n,801942))},{id:"haxe",name:"Haxe",import:()=>n.e("7177").then(n.bind(n,982114))},{id:"hcl",name:"HashiCorp HCL",import:()=>n.e("3369").then(n.bind(n,518871))},{id:"hjson",name:"Hjson",import:()=>n.e("3455").then(n.bind(n,904783))},{id:"hlsl",name:"HLSL",import:()=>n.e("2259").then(n.bind(n,114788))},{id:"html",name:"HTML",import:()=>n.e("4025").then(n.bind(n,710146))},{id:"html-derivative",name:"HTML (Derivative)",import:()=>n.e("129").then(n.bind(n,464872))},{id:"http",name:"HTTP",import:()=>n.e("2147").then(n.bind(n,148001))},{id:"hxml",name:"HXML",import:()=>n.e("9852").then(n.bind(n,515999))},{id:"hy",name:"Hy",import:()=>n.e("7240").then(n.bind(n,149972))},{id:"imba",name:"Imba",import:()=>n.e("9741").then(n.bind(n,728852))},{id:"ini",name:"INI",aliases:["properties"],import:()=>n.e("6354").then(n.bind(n,988183))},{id:"java",name:"Java",import:()=>n.e("2810").then(n.bind(n,641490))},{id:"javascript",name:"JavaScript",aliases:["js"],import:()=>n.e("1795").then(n.bind(n,448138))},{id:"jinja",name:"Jinja",import:()=>n.e("4092").then(n.bind(n,141815))},{id:"jison",name:"Jison",import:()=>n.e("3187").then(n.bind(n,802193))},{id:"json",name:"JSON",import:()=>n.e("1205").then(n.bind(n,497834))},{id:"json5",name:"JSON5",import:()=>n.e("1582").then(n.bind(n,812134))},{id:"jsonc",name:"JSON with Comments",import:()=>n.e("2163").then(n.bind(n,603530))},{id:"jsonl",name:"JSON Lines",import:()=>n.e("1412").then(n.bind(n,930429))},{id:"jsonnet",name:"Jsonnet",import:()=>n.e("2716").then(n.bind(n,6244))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:()=>n.e("7609").then(n.bind(n,534975))},{id:"jsx",name:"JSX",import:()=>n.e("9285").then(n.bind(n,646998))},{id:"julia",name:"Julia",aliases:["jl"],import:()=>n.e("6801").then(n.bind(n,556211))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:()=>n.e("3338").then(n.bind(n,190865))},{id:"kusto",name:"Kusto",aliases:["kql"],import:()=>n.e("639").then(n.bind(n,86025))},{id:"latex",name:"LaTeX",import:()=>n.e("1767").then(n.bind(n,517762))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:()=>n.e("2521").then(n.bind(n,348221))},{id:"less",name:"Less",import:()=>n.e("9443").then(n.bind(n,638905))},{id:"liquid",name:"Liquid",import:()=>n.e("9538").then(n.bind(n,375255))},{id:"llvm",name:"LLVM IR",import:()=>n.e("2605").then(n.bind(n,49105))},{id:"log",name:"Log file",import:()=>n.e("2529").then(n.bind(n,88635))},{id:"logo",name:"Logo",import:()=>n.e("3678").then(n.bind(n,816809))},{id:"lua",name:"Lua",import:()=>n.e("5762").then(n.bind(n,811400))},{id:"luau",name:"Luau",import:()=>n.e("45").then(n.bind(n,234526))},{id:"make",name:"Makefile",aliases:["makefile"],import:()=>n.e("2359").then(n.bind(n,891470))},{id:"markdown",name:"Markdown",aliases:["md"],import:()=>n.e("1618").then(n.bind(n,153228))},{id:"marko",name:"Marko",import:()=>n.e("1584").then(n.bind(n,97451))},{id:"matlab",name:"MATLAB",import:()=>n.e("5577").then(n.bind(n,288103))},{id:"mdc",name:"MDC",import:()=>n.e("4840").then(n.bind(n,194992))},{id:"mdx",name:"MDX",import:()=>n.e("6326").then(n.bind(n,657506))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:()=>n.e("4551").then(n.bind(n,902912))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:()=>n.e("8520").then(n.bind(n,924595))},{id:"mojo",name:"Mojo",import:()=>n.e("6183").then(n.bind(n,425802))},{id:"move",name:"Move",import:()=>n.e("4104").then(n.bind(n,893510))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:()=>n.e("9788").then(n.bind(n,650741))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:()=>n.e("3406").then(n.bind(n,36486))},{id:"nginx",name:"Nginx",import:()=>n.e("6286").then(n.bind(n,969024))},{id:"nim",name:"Nim",import:()=>n.e("9025").then(n.bind(n,257880))},{id:"nix",name:"Nix",import:()=>n.e("8633").then(n.bind(n,476774))},{id:"nushell",name:"nushell",aliases:["nu"],import:()=>n.e("3078").then(n.bind(n,340484))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:()=>n.e("54").then(n.bind(n,742334))},{id:"objective-cpp",name:"Objective-C++",import:()=>n.e("9053").then(n.bind(n,775093))},{id:"ocaml",name:"OCaml",import:()=>n.e("6296").then(n.bind(n,491081))},{id:"pascal",name:"Pascal",import:()=>n.e("160").then(n.bind(n,367043))},{id:"perl",name:"Perl",import:()=>n.e("7654").then(n.bind(n,207980))},{id:"php",name:"PHP",import:()=>n.e("5371").then(n.bind(n,229456))},{id:"plsql",name:"PL/SQL",import:()=>n.e("5828").then(n.bind(n,902346))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:()=>n.e("2232").then(n.bind(n,749150))},{id:"polar",name:"Polar",import:()=>n.e("5449").then(n.bind(n,108725))},{id:"postcss",name:"PostCSS",import:()=>n.e("2261").then(n.bind(n,658752))},{id:"powerquery",name:"PowerQuery",import:()=>n.e("3685").then(n.bind(n,518149))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:()=>n.e("4910").then(n.bind(n,865687))},{id:"prisma",name:"Prisma",import:()=>n.e("1143").then(n.bind(n,774260))},{id:"prolog",name:"Prolog",import:()=>n.e("8682").then(n.bind(n,539613))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:()=>n.e("8351").then(n.bind(n,247610))},{id:"pug",name:"Pug",aliases:["jade"],import:()=>n.e("415").then(n.bind(n,202902))},{id:"puppet",name:"Puppet",import:()=>n.e("9496").then(n.bind(n,101207))},{id:"purescript",name:"PureScript",import:()=>n.e("9580").then(n.bind(n,225177))},{id:"python",name:"Python",aliases:["py"],import:()=>n.e("5931").then(n.bind(n,682972))},{id:"qml",name:"QML",import:()=>n.e("2376").then(n.bind(n,187683))},{id:"qmldir",name:"QML Directory",import:()=>n.e("9112").then(n.bind(n,223538))},{id:"qss",name:"Qt Style Sheets",import:()=>n.e("5196").then(n.bind(n,125694))},{id:"r",name:"R",import:()=>n.e("5987").then(n.bind(n,811024))},{id:"racket",name:"Racket",import:()=>n.e("8921").then(n.bind(n,167620))},{id:"raku",name:"Raku",aliases:["perl6"],import:()=>n.e("2946").then(n.bind(n,355095))},{id:"razor",name:"ASP.NET Razor",import:()=>n.e("4197").then(n.bind(n,873371))},{id:"reg",name:"Windows Registry Script",import:()=>n.e("4843").then(n.bind(n,768406))},{id:"regexp",name:"RegExp",aliases:["regex"],import:()=>n.e("5336").then(n.bind(n,905948))},{id:"rel",name:"Rel",import:()=>n.e("6238").then(n.bind(n,316862))},{id:"riscv",name:"RISC-V",import:()=>n.e("3195").then(n.bind(n,884850))},{id:"rst",name:"reStructuredText",import:()=>n.e("7362").then(n.bind(n,346768))},{id:"ruby",name:"Ruby",aliases:["rb"],import:()=>n.e("8810").then(n.bind(n,701531))},{id:"rust",name:"Rust",aliases:["rs"],import:()=>n.e("9789").then(n.bind(n,188474))},{id:"sas",name:"SAS",import:()=>n.e("70").then(n.bind(n,348143))},{id:"sass",name:"Sass",import:()=>n.e("8740").then(n.bind(n,649161))},{id:"scala",name:"Scala",import:()=>n.e("3004").then(n.bind(n,967090))},{id:"scheme",name:"Scheme",import:()=>n.e("9714").then(n.bind(n,279992))},{id:"scss",name:"SCSS",import:()=>n.e("6674").then(n.bind(n,107165))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:()=>n.e("1331").then(n.bind(n,405846))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:()=>n.e("165").then(n.bind(n,487811))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>n.e("8771").then(n.bind(n,48954))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:()=>n.e("3555").then(n.bind(n,240958))},{id:"smalltalk",name:"Smalltalk",import:()=>n.e("8918").then(n.bind(n,821526))},{id:"solidity",name:"Solidity",import:()=>n.e("9895").then(n.bind(n,498587))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:()=>n.e("4661").then(n.bind(n,87253))},{id:"sparql",name:"SPARQL",import:()=>n.e("8225").then(n.bind(n,368370))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:()=>n.e("4155").then(n.bind(n,505359))},{id:"sql",name:"SQL",import:()=>n.e("1772").then(n.bind(n,191017))},{id:"ssh-config",name:"SSH Config",import:()=>n.e("9953").then(n.bind(n,150460))},{id:"stata",name:"Stata",import:()=>n.e("8356").then(n.bind(n,890655))},{id:"stylus",name:"Stylus",aliases:["styl"],import:()=>n.e("1670").then(n.bind(n,504058))},{id:"svelte",name:"Svelte",import:()=>n.e("3374").then(n.bind(n,708012))},{id:"swift",name:"Swift",import:()=>n.e("9058").then(n.bind(n,410983))},{id:"system-verilog",name:"SystemVerilog",import:()=>n.e("6688").then(n.bind(n,577267))},{id:"systemd",name:"Systemd Units",import:()=>n.e("9914").then(n.bind(n,743182))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:()=>n.e("354").then(n.bind(n,163360))},{id:"tasl",name:"Tasl",import:()=>n.e("6610").then(n.bind(n,291518))},{id:"tcl",name:"Tcl",import:()=>n.e("5120").then(n.bind(n,505297))},{id:"templ",name:"Templ",import:()=>n.e("6372").then(n.bind(n,605722))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:()=>n.e("2435").then(n.bind(n,785104))},{id:"tex",name:"TeX",import:()=>n.e("1020").then(n.bind(n,637425))},{id:"toml",name:"TOML",import:()=>n.e("8783").then(n.bind(n,990725))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:()=>n.e("5807").then(n.bind(n,424289))},{id:"tsv",name:"TSV",import:()=>n.e("2890").then(n.bind(n,533601))},{id:"tsx",name:"TSX",import:()=>n.e("9185").then(n.bind(n,591686))},{id:"turtle",name:"Turtle",import:()=>n.e("4859").then(n.bind(n,899741))},{id:"twig",name:"Twig",import:()=>n.e("3459").then(n.bind(n,198819))},{id:"typescript",name:"TypeScript",aliases:["ts"],import:()=>n.e("7813").then(n.bind(n,243381))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:()=>n.e("5397").then(n.bind(n,461277))},{id:"typst",name:"Typst",aliases:["typ"],import:()=>n.e("5218").then(n.bind(n,913708))},{id:"v",name:"V",import:()=>n.e("936").then(n.bind(n,616152))},{id:"vala",name:"Vala",import:()=>n.e("9674").then(n.bind(n,510558))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:()=>n.e("6522").then(n.bind(n,908618))},{id:"verilog",name:"Verilog",import:()=>n.e("4907").then(n.bind(n,352207))},{id:"vhdl",name:"VHDL",import:()=>n.e("459").then(n.bind(n,362018))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:()=>n.e("1410").then(n.bind(n,428583))},{id:"vue",name:"Vue",import:()=>n.e("9394").then(n.bind(n,133590))},{id:"vue-html",name:"Vue HTML",import:()=>n.e("2414").then(n.bind(n,443210))},{id:"vyper",name:"Vyper",aliases:["vy"],import:()=>n.e("7729").then(n.bind(n,703887))},{id:"wasm",name:"WebAssembly",import:()=>n.e("6921").then(n.bind(n,156037))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:()=>n.e("9139").then(n.bind(n,819009))},{id:"wgsl",name:"WGSL",import:()=>n.e("4934").then(n.bind(n,364998))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:()=>n.e("9222").then(n.bind(n,171889))},{id:"wit",name:"WebAssembly Interface Types",import:()=>n.e("6121").then(n.bind(n,215943))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:()=>n.e("2162").then(n.bind(n,126406))},{id:"xml",name:"XML",import:()=>n.e("3070").then(n.bind(n,389661))},{id:"xsl",name:"XSL",import:()=>n.e("9127").then(n.bind(n,69296))},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>n.e("3830").then(n.bind(n,817910))},{id:"zenscript",name:"ZenScript",import:()=>n.e("2230").then(n.bind(n,845074))},{id:"zig",name:"Zig",import:()=>n.e("2692").then(n.bind(n,64775))}],nv=Object.fromEntries(ng.map(e=>[e.id,e.import])),nb=Object.fromEntries(ng.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),ny={...nv,...nb},nx=Object.fromEntries([{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>n.e("9801").then(n.bind(n,851462))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>n.e("3013").then(n.bind(n,962742))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>n.e("7735").then(n.bind(n,288464))},{id:"catppuccin-frappe",displayName:"Catppuccin Frapp\xe9",type:"dark",import:()=>n.e("2562").then(n.bind(n,252683))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>n.e("1076").then(n.bind(n,143304))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>n.e("6166").then(n.bind(n,722712))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>n.e("6066").then(n.bind(n,93548))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>n.e("4423").then(n.bind(n,338036))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:()=>n.e("7885").then(n.bind(n,440712))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:()=>n.e("5509").then(n.bind(n,73637))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:()=>n.e("8100").then(n.bind(n,354651))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:()=>n.e("3971").then(n.bind(n,664062))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>n.e("1434").then(n.bind(n,715139))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>n.e("9159").then(n.bind(n,986882))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>n.e("8989").then(n.bind(n,10208))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:()=>n.e("3254").then(n.bind(n,289744))},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>n.e("2871").then(n.bind(n,755536))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>n.e("5751").then(n.bind(n,38357))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:()=>n.e("7149").then(n.bind(n,62071))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:()=>n.e("9455").then(n.bind(n,734745))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:()=>n.e("2160").then(n.bind(n,171707))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:()=>n.e("7199").then(n.bind(n,247673))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:()=>n.e("7433").then(n.bind(n,840269))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:()=>n.e("5360").then(n.bind(n,11725))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:()=>n.e("2613").then(n.bind(n,121186))},{id:"houston",displayName:"Houston",type:"dark",import:()=>n.e("4545").then(n.bind(n,486903))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:()=>n.e("4358").then(n.bind(n,398651))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:()=>n.e("7327").then(n.bind(n,588441))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:()=>n.e("3788").then(n.bind(n,136794))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:()=>n.e("6647").then(n.bind(n,711250))},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>n.e("9095").then(n.bind(n,721122))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>n.e("5353").then(n.bind(n,60079))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>n.e("5004").then(n.bind(n,469970))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>n.e("1068").then(n.bind(n,916099))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>n.e("1556").then(n.bind(n,458107))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>n.e("7646").then(n.bind(n,168884))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>n.e("9721").then(n.bind(n,619218))},{id:"min-light",displayName:"Min Light",type:"light",import:()=>n.e("5954").then(n.bind(n,138594))},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>n.e("4204").then(n.bind(n,375364))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>n.e("4986").then(n.bind(n,803001))},{id:"nord",displayName:"Nord",type:"dark",import:()=>n.e("5789").then(n.bind(n,540472))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>n.e("4000").then(n.bind(n,223816))},{id:"one-light",displayName:"One Light",type:"light",import:()=>n.e("8001").then(n.bind(n,163634))},{id:"plastic",displayName:"Plastic",type:"dark",import:()=>n.e("3560").then(n.bind(n,509821))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>n.e("1368").then(n.bind(n,410837))},{id:"red",displayName:"Red",type:"dark",import:()=>n.e("2974").then(n.bind(n,966560))},{id:"rose-pine",displayName:"Ros\xe9 Pine",type:"dark",import:()=>n.e("6363").then(n.bind(n,839600))},{id:"rose-pine-dawn",displayName:"Ros\xe9 Pine Dawn",type:"light",import:()=>n.e("8131").then(n.bind(n,215618))},{id:"rose-pine-moon",displayName:"Ros\xe9 Pine Moon",type:"dark",import:()=>n.e("8766").then(n.bind(n,848358))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>n.e("7410").then(n.bind(n,891617))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>n.e("4557").then(n.bind(n,810296))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>n.e("1992").then(n.bind(n,902124))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>n.e("344").then(n.bind(n,20359))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>n.e("6860").then(n.bind(n,147651))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>n.e("2993").then(n.bind(n,729307))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>n.e("4931").then(n.bind(n,587069))},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>n.e("4087").then(n.bind(n,555135))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>n.e("995").then(n.bind(n,868974))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>n.e("8625").then(n.bind(n,500203))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>n.e("4682").then(n.bind(n,61069))}].map(e=>[e.id,e.import]));class nw extends Error{constructor(e){super(e),this.name="ShikiError"}}function nS(){return"undefined"!=typeof performance?performance.now():Date.now()}let nk=(e,t)=>e+(t-e%t)%t;async function nA(e){let t,n;let r={};function o(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}let s="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function a(e,t){return e?function(e,t,n=1024){let r=t+n,o=t;for(;e[o]&&!(o>=r);)++o;if(o-t>16&&e.buffer&&s)return s.decode(e.subarray(t,o));let a="";for(;t<o;){let n=e[t++];if(!(128&n)){a+=String.fromCharCode(n);continue}let r=63&e[t++];if((224&n)==192){a+=String.fromCharCode((31&n)<<6|r);continue}let o=63&e[t++];if((n=(240&n)==224?(15&n)<<12|r<<6|o:(7&n)<<18|r<<12|o<<6|63&e[t++])<65536)a+=String.fromCharCode(n);else{let e=n-65536;a+=String.fromCharCode(55296|e>>10,56320|1023&e)}}return a}(r.HEAPU8,e,t):""}let l={emscripten_get_now:nS,emscripten_memcpy_big:function(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)},emscripten_resize_heap:function(e){let s=r.HEAPU8.length;e>>>=0;if(e>0x80000000)return!1;for(let r=1;r<=4;r*=2){let a=s*(1+.2/r);if(a=Math.min(a,e+0x6000000),function(e){try{return t.grow(e-n.byteLength+65535>>>16),o(t.buffer),1}catch{}}(Math.min(0x80000000,nk(Math.max(e,a),65536))))return!0}return!1},fd_write:()=>0};async function c(){let n=await e({env:l,wasi_snapshot_preview1:l});o((t=n.memory).buffer),Object.assign(r,n),r.UTF8ToString=a}return await c(),r}var nC=Object.defineProperty,nE=(e,t,n)=>t in e?nC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nT=(e,t,n)=>nE(e,"symbol"!=typeof t?t+"":t,n);let n_=null;class nO{constructor(e){nT(this,"utf16Length"),nT(this,"utf8Length"),nT(this,"utf16Value"),nT(this,"utf8Value"),nT(this,"utf16OffsetToUtf8"),nT(this,"utf8OffsetToUtf16");let t=e.length,n=nO._utf8ByteLength(e),r=n!==t,o=r?new Uint32Array(t+1):null;r&&(o[t]=n);let s=r?new Uint32Array(n+1):null;r&&(s[n]=t);let a=new Uint8Array(n),l=0;for(let n=0;n<t;n++){let c=e.charCodeAt(n),u=c,d=!1;if(c>=55296&&c<=56319&&n+1<t){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(u=(c-55296<<10)+65536|t-56320,d=!0)}r&&(o[n]=l,d&&(o[n+1]=l),u<=127?s[l+0]=n:u<=2047?(s[l+0]=n,s[l+1]=n):u<=65535?(s[l+0]=n,s[l+1]=n,s[l+2]=n):(s[l+0]=n,s[l+1]=n,s[l+2]=n,s[l+3]=n)),u<=127?a[l++]=u:(u<=2047?a[l++]=192|(1984&u)>>>6:(u<=65535?a[l++]=224|(61440&u)>>>12:(a[l++]=240|(1835008&u)>>>18,a[l++]=128|(258048&u)>>>12),a[l++]=128|(4032&u)>>>6),a[l++]=128|(63&u)>>>0),d&&n++}this.utf16Length=t,this.utf8Length=n,this.utf16Value=e,this.utf8Value=a,this.utf16OffsetToUtf8=o,this.utf8OffsetToUtf16=s}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let o=e.charCodeAt(n),s=o,a=!1;if(o>=55296&&o<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(s=(o-55296<<10)+65536|t-56320,a=!0)}s<=127?t+=1:s<=2047?t+=2:s<=65535?t+=3:t+=4,a&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}}let nM=class e{constructor(t){if(nT(this,"id",++e.LAST_ID),nT(this,"_onigBinding"),nT(this,"content"),nT(this,"utf16Length"),nT(this,"utf8Length"),nT(this,"utf16OffsetToUtf8"),nT(this,"utf8OffsetToUtf16"),nT(this,"ptr"),!n_)throw new nw("Must invoke loadWasm first.");this._onigBinding=n_,this.content=t;let n=new nO(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(!e._sharedPtr&&(e._sharedPtr=n_.omalloc(1e4)),e._sharedPtrInUse=!0,n_.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(n_)}convertUtf8OffsetToUtf16(e){if(this.utf8OffsetToUtf16)return e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e];return e}convertUtf16OffsetToUtf8(e){if(this.utf16OffsetToUtf8)return e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e];return e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};nT(nM,"LAST_ID",0),nT(nM,"_sharedPtr",0),nT(nM,"_sharedPtrInUse",!1);class nI{constructor(e){if(nT(this,"_onigBinding"),nT(this,"_ptr"),!n_)throw new nw("Must invoke loadWasm first.");let t=[],n=[];for(let r=0,o=e.length;r<o;r++){let o=new nO(e[r]);t[r]=o.createString(n_),n[r]=o.utf8Length}let r=n_.omalloc(4*e.length);n_.HEAPU32.set(t,r/4);let o=n_.omalloc(4*e.length);n_.HEAPU32.set(n,o/4);let s=n_.createOnigScanner(r,o,e.length);for(let n=0,r=e.length;n<r;n++)n_.ofree(t[n]);n_.ofree(o),n_.ofree(r),0===s&&!function(e){throw new nw(e.UTF8ToString(e.getLastOnigError()))}(n_),this._onigBinding=n_,this._ptr=s}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if("number"==typeof n&&(r=n),"string"==typeof e){e=new nM(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let o=this._onigBinding,s=o.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(0===s)return null;let a=o.HEAPU32,l=s/4,c=a[l++],u=a[l++],d=[];for(let t=0;t<u;t++){let n=e.convertUtf8OffsetToUtf16(a[l++]),r=e.convertUtf8OffsetToUtf16(a[l++]);d[t]={start:n,end:r,length:r-n}}return{index:c,captureIndices:d}}}function nP(e){return t=>WebAssembly.instantiate(e,t)}async function nD(e){if(e){var t;await (t=e,o?o:o=async function e(){n_=await nA(async e=>{let n=t;if("function"==typeof(n=await n)&&(n=await n(e)),"function"==typeof n&&(n=await n(e)),"function"==typeof n.instantiator)n=await n.instantiator(e);else if("function"==typeof n.default)n=await n.default(e);else{var r,o;if(void 0!==n.data)n=n.data;if(r=n,"undefined"!=typeof Response&&r instanceof Response)"function"==typeof WebAssembly.instantiateStreaming?n=await (function(e){return t=>WebAssembly.instantiateStreaming(e,t)})(n)(e):n=await (function(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}})(n)(e);else{;if(o=n,"undefined"!=typeof ArrayBuffer&&(o instanceof ArrayBuffer||ArrayBuffer.isView(o))||"undefined"!=typeof Buffer&&Buffer.isBuffer?.(o)||"undefined"!=typeof SharedArrayBuffer&&o instanceof SharedArrayBuffer||"undefined"!=typeof Uint32Array&&o instanceof Uint32Array)n=await nP(n)(e);else n instanceof WebAssembly.Module?n=await nP(n)(e):"default"in n&&n.default instanceof WebAssembly.Module&&(n=await nP(n.default)(e))}}return"instance"in n&&(n=n.instance),"exports"in n&&(n=n.exports),n})}())}return{createScanner:e=>new nI(e.map(e=>"string"==typeof e?e:e.source)),createString:e=>new nM(e)}}let nN=function(e){let t=e.langs,n=e.themes,r=e.engine;return async function e(e){function o(e){if("string"==typeof e){if(tH(e))return[];let n=t[e];if(!n)throw new l(`Language \`${e}\` is not included in this bundle. You may want to load it from external source.`);return n}return e}function s(e){if(tU(e))return"none";if("string"==typeof e){let t=n[e];if(!t)throw new l(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return t}return e}let a=(e.themes??[]).map(e=>s(e)),c=(e.langs??[]).map(e=>o(e)),u=await nm({engine:e.engine??r(),...e,themes:a,langs:c});return{...u,loadLanguage:(...e)=>u.loadLanguage(...e.map(o)),loadTheme:(...e)=>u.loadTheme(...e.map(s)),getBundledLanguages:()=>t,getBundledThemes:()=>n}}}({langs:ny,themes:nx,engine:()=>nD(n.e("7100").then(n.bind(n,9382)))})},547907:function(e,t,n){"use strict";n.d(t,{Ab:function(){return a},Fr:function(){return l},G$:function(){return s},JM:function(){return p},K$:function(){return u},MS:function(){return r},h5:function(){return c},lK:function(){return d},uj:function(){return o}});var r="-ms-",o="-moz-",s="-webkit-",a="comm",l="rule",c="decl",u="@import",d="@keyframes",p="@layer"},845459:function(e,t,n){"use strict";n.d(t,{cD:function(){return s},qR:function(){return o}});var r=n(323022);function o(e){var t=(0,r.Ei)(e);return function(n,r,o,s){for(var a="",l=0;l<t;l++)a+=e[l](n,r,o,s)||"";return a}}function s(e){return function(t){!t.root&&(t=t.return)&&e(t)}}},587030:function(e,t,n){"use strict";n.d(t,{MY:function(){return a}});var r=n(547907),o=n(323022),s=n(83464);function a(e){return(0,s.cE)(function e(t,n,a,u,d,p,h,f,m){for(var g=0,v=0,b=h,y=0,x=0,w=0,S=1,k=1,A=1,C=0,E="",T=d,_=p,O=u,M=E;k;)switch(w=C,C=(0,s.lp)()){case 40:if(108!=w&&58==(0,o.uO)(M,b-1)){-1!=(0,o.Cw)(M+=(0,o.gx)((0,s.iF)(C),"&","&\f"),"&\f")&&(A=-1);break}case 34:case 39:case 91:M+=(0,s.iF)(C);break;case 9:case 10:case 13:case 32:M+=(0,s.Qb)(w);break;case 92:M+=(0,s.kq)((0,s.Ud)()-1,7);continue;case 47:switch((0,s.fj)()){case 42:case 47:(0,o.R3)(function(e,t,n){return(0,s.dH)(e,t,n,r.Ab,(0,o.Dp)((0,s.Tb)()),(0,o.tb)(e,2,-2),0)}((0,s.q6)((0,s.lp)(),(0,s.Ud)()),n,a),m);break;default:M+="/"}break;case 123*S:f[g++]=(0,o.to)(M)*A;case 125*S:case 59:case 0:switch(C){case 0:case 125:k=0;case 59+v:-1==A&&(M=(0,o.gx)(M,/\f/g,"")),x>0&&(0,o.to)(M)-b&&(0,o.R3)(x>32?c(M+";",u,a,b-1):c((0,o.gx)(M," ","")+";",u,a,b-2),m);break;case 59:M+=";";default:if((0,o.R3)(O=l(M,n,a,g,v,d,f,E,T=[],_=[],b),p),123===C){if(0===v)e(M,n,O,O,T,p,b,f,_);else switch(99===y&&110===(0,o.uO)(M,3)?100:y){case 100:case 108:case 109:case 115:e(t,O,O,u&&(0,o.R3)(l(t,O,O,0,0,d,f,E,d,T=[],b),_),d,_,b,f,u?T:_);break;default:e(M,O,O,O,[""],_,0,f,_)}}}g=v=x=0,S=A=1,E=M="",b=h;break;case 58:b=1+(0,o.to)(M),x=w;default:if(S<1){if(123==C)--S;else if(125==C&&0==S++&&125==(0,s.mp)())continue}switch(M+=(0,o.Dp)(C),C*S){case 38:A=v>0?1:(M+="\f",-1);break;case 44:f[g++]=((0,o.to)(M)-1)*A,A=1;break;case 64:45===(0,s.fj)()&&(M+=(0,s.iF)((0,s.lp)())),y=(0,s.fj)(),v=b=(0,o.to)(E=M+=(0,s.QU)((0,s.Ud)())),C++;break;case 45:45===w&&2==(0,o.to)(M)&&(S=0)}}return p}("",null,null,null,[""],e=(0,s.un)(e),0,[0],e))}function l(e,t,n,a,l,c,u,d,p,h,f){for(var m=l-1,g=0===l?c:[""],v=(0,o.Ei)(g),b=0,y=0,x=0;b<a;++b)for(var w=0,S=(0,o.tb)(e,m+1,m=(0,o.Wn)(y=u[b])),k=e;w<v;++w)(k=(0,o.fy)(y>0?g[w]+" "+S:(0,o.gx)(S,/&\f/g,g[w])))&&(p[x++]=k);return(0,s.dH)(e,t,n,0===l?r.Fr:d,p,h,f)}function c(e,t,n,a){return(0,s.dH)(e,t,n,r.h5,(0,o.tb)(e,0,a),(0,o.tb)(e,a+1,-1),a)}},294709:function(e,t,n){"use strict";n.d(t,{P:function(){return a},q:function(){return s}});var r=n(547907),o=n(323022);function s(e,t){for(var n="",r=(0,o.Ei)(e),s=0;s<r;s++)n+=t(e[s],s,e,t)||"";return n}function a(e,t,n,a){switch(e.type){case r.JM:if(e.children.length)break;case r.K$:case r.h5:return e.return=e.return||e.value;case r.Ab:return"";case r.lK:return e.return=e.value+"{"+s(e.children,a)+"}";case r.Fr:e.value=e.props.join(",")}return(0,o.to)(n=s(e.children,a))?e.return=e.value+"{"+n+"}":""}},83464:function(e,t,n){"use strict";n.d(t,{FK:function(){return l},JG:function(){return p},QU:function(){return E},Qb:function(){return k},Tb:function(){return h},Ud:function(){return v},cE:function(){return w},dH:function(){return d},fj:function(){return g},iF:function(){return S},kq:function(){return A},lp:function(){return m},mp:function(){return f},q6:function(){return C},r:function(){return y},tP:function(){return b},un:function(){return x}});var r=n(323022),o=1,s=1,a=0,l=0,c=0,u="";function d(e,t,n,r,a,l,c){return{value:e,root:t,parent:n,type:r,props:a,children:l,line:o,column:s,length:c,return:""}}function p(e,t){return(0,r.f0)(d("",null,null,"",null,null,0),e,{length:-e.length},t)}function h(){return c}function f(){return c=l>0?(0,r.uO)(u,--l):0,s--,10===c&&(s=1,o--),c}function m(){return c=l<a?(0,r.uO)(u,l++):0,s++,10===c&&(s=1,o++),c}function g(){return(0,r.uO)(u,l)}function v(){return l}function b(e,t){return(0,r.tb)(u,e,t)}function y(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function x(e){return o=s=1,a=(0,r.to)(u=e),l=0,[]}function w(e){return u="",e}function S(e){return(0,r.fy)(b(l-1,function e(t){for(;m();)switch(c){case t:return l;case 34:case 39:34!==t&&39!==t&&e(c);break;case 40:41===t&&e(t);break;case 92:m()}return l}(91===e?e+2:40===e?e+1:e)))}function k(e){for(;c=g();)if(c<33)m();else break;return y(e)>2||y(c)>3?"":" "}function A(e,t){for(;--t&&m()&&!(c<48)&&!(c>102)&&(!(c>57)||!(c<65))&&(!(c>70)||!(c<97)););return b(e,l+(t<6&&32==g()&&32==m()))}function C(e,t){for(;m();)if(e+c===57)break;else if(e+c===84&&47===g())break;return"/*"+b(t,l-1)+"*"+(0,r.Dp)(47===e?e:m())}function E(e){for(;!y(g());)m();return b(e,l)}},323022:function(e,t,n){"use strict";n.d(t,{$e:function(){return v},Cw:function(){return d},Dp:function(){return o},EQ:function(){return c},Ei:function(){return m},R3:function(){return g},Wn:function(){return r},f0:function(){return s},fy:function(){return l},gx:function(){return u},tb:function(){return h},to:function(){return f},uO:function(){return p},vp:function(){return a}});var r=Math.abs,o=String.fromCharCode,s=Object.assign;function a(e,t){return 45^p(e,0)?(((t<<2^p(e,0))<<2^p(e,1))<<2^p(e,2))<<2^p(e,3):0}function l(e){return e.trim()}function c(e,t){return(e=t.exec(e))?e[0]:e}function u(e,t,n){return e.replace(t,n)}function d(e,t){return e.indexOf(t)}function p(e,t){return 0|e.charCodeAt(t)}function h(e,t,n){return e.slice(t,n)}function f(e){return e.length}function m(e){return e.length}function g(e,t){return t.push(e),e}function v(e,t){return e.map(t).join("")}},141501:function(e,t,n){"use strict";n.d(t,{x:function(){return h}});var r=class{constructor(e){this.mappings=e}originalOffsetFor(e){let t=o(this.mappings,e,"generatedRange"),n=this.mappings[t];return n?a(n,e,"generatedRange"):-1}generatedOffsetFor(e){let t=o(this.mappings,e,"sourceRange"),n=this.mappings[t];return n?a(n,e,"sourceRange"):-1}originalRangeFor(e){let t,n;let r="generatedRange",a=o(this.mappings,e.from,r),c=s(this.mappings,e.to,r,a),u=this.mappings[a],d=this.mappings[c];if(!!u||!!d)return t=u?l(u,e.from,r):l(d,e.from,r),{from:t,to:n=d?l(d,e.to,r):l(u,e.to,r)}}generatedRangeFor(e){let t,n;let r="sourceRange",a=o(this.mappings,e.from,r),c=s(this.mappings,e.to,r,a),u=this.mappings[a],d=this.mappings[c];if(!!u||!!d)return t=u?l(u,e.from,r):l(d,e.from,r),{from:t,to:n=d?l(d,e.to,r):l(u,e.to,r)}}};function o(e,t,n){for(let[r,o]of e.entries()){let[e,s]=o[n];if(t>=e&&t<s)return r}return -1}function s(e,t,n,r=-1){for(let[o,s]of e.entries()){if(o<r)continue;let[e,a]=s[n];if(t>=e&&t<=a)return o}return -1}function a(e,t,n){let r=c(n),[o]=e[n],[s,a]=e[r];return"retain"!==e.type?-1:s+Math.min(t-o,a-s)}function l(e,t,n){let r=c(n),[o,s]=e[n],[a,l]=e[r];return t===s?l:a+Math.min(Math.max(t-o,0),l-a)}function c(e){return"generatedRange"===e?"sourceRange":"generatedRange"}var u=/\r\n|\r|\n/g;function d(e,t=""){return e.replace(u,e=>e+t)}var p=class{constructor(){this._insertions={left:"",right:""},this._edit=null}overwrite(e,t){var n,r;if(e<=0)throw Error("Count should be positive");return e<(null!=(r=null==(n=this._edit)?void 0:n.count)?r:Number.POSITIVE_INFINITY)&&(this._edit={count:e,insert:t}),this}remove(e){return this.overwrite(e,"")}prependLeft(e){return this._insertions.left=e+this._insertions.left,this}appendLeft(e){return this._insertions.left=this._insertions.left+e,this}prependRight(e){return this._insertions.right=e+this._insertions.right,this}appendRight(e){return this._insertions.right=this._insertions.right+e,this}indent(e){var t;this._insertions.left=d(this._insertions.left,e),this._insertions.right=d(this._insertions.right,e),"string"==typeof(null==(t=this._edit)?void 0:t.insert)&&(this._edit.insert=d(this._edit.insert,e))}getEdit(){let{_edit:e}=this;return e?{...e}:null}getInsertText(){return this._insertions.left+this._insertions.right}},h=class{constructor(e){this.string=e,this.edits=new Map,this.version=0,this.consumerMap=new Map,this.mappingsCache=new Map}_getEditsAt(e){let t=this.edits.get(e);return!t&&(t=new p,this.edits.set(e,t)),t}_changed(){this.version++}prepend(e){return this._getEditsAt(0).prependLeft(e),this._changed(),this}append(e){let t=this.string.length;return this._getEditsAt(t).appendRight(e),this._changed(),this}prependLeft(e,t){return this._getEditsAt(e).prependLeft(t),this._changed(),this}appendLeft(e,t){return this._getEditsAt(e).appendLeft(t),this._changed(),this}prependRight(e,t){return this._getEditsAt(e).prependRight(t),this._changed(),this}appendRight(e,t){return this._getEditsAt(e).appendRight(t),this._changed(),this}remove(e,t){return this._getEditsAt(e).remove(t-e),this._changed(),this}replaceRange(e,t,n){return this._getEditsAt(e).overwrite(t-e,n),this._changed(),this}_indentInRange(e,t,n){let{string:r}=this,o=r.substring(e,t);u.lastIndex=0;let s=u.exec(o);for(;s;)this._getEditsAt(e+s.index+1).prependLeft(n),s=u.exec(o)}indent(e=" "){let{string:t,edits:n}=this,r=[...n.entries()].sort((e,t)=>e[0]-t[0]);this.prependLeft(0,e);let o=Number.NEGATIVE_INFINITY;for(let[t,n]of r){if(t<o)continue;t>o&&this._indentInRange(Math.max(0,o),t,e);let r=n.getEdit();n.indent(e),o=r?t+r.count:t}return this._indentInRange(Math.max(0,o),t.length,e),this._changed(),this}toString(){return this._getCachedSourceMappings().map(e=>e.generatedText).join("")}originalOffsetFor(e){return this._getSourceMapConsumer().originalOffsetFor(e)}generatedOffsetFor(e){return this._getSourceMapConsumer().generatedOffsetFor(e)}originalRangeFor(e){return this._getSourceMapConsumer().originalRangeFor(e)}generatedRangeFor(e){return this._getSourceMapConsumer().generatedRangeFor(e)}_getCachedSourceMappings(){let e=this.mappingsCache.get(this.version);return!e&&(e=this._getSourceMappings(),this.mappingsCache.set(this.version,e)),e}_getSourceMappings(){let{string:e,edits:t}=this,n=[...t.entries()].sort((e,t)=>e[0]-t[0]),r=[],o=0,s=0;for(let[t,a]of n){if(t<o)continue;let n=t-o;if(n>0){let a=s+n;r.push({sourceRange:[o,t],generatedRange:[s,a],type:"retain",generatedText:e.substring(o,t)}),s=a}o=t;let l=a.getInsertText(),c=a.getEdit();if(l){let e=s+l.length;r.push({sourceRange:[t,t],generatedRange:[s,e],type:"insert",generatedText:l}),s=e}if(c){let e=s+c.insert.length;r.push({sourceRange:[t,t+c.count],generatedRange:[s,e],type:c.insert.length>0?"update":"delete",generatedText:c.insert}),s=e,o=t+c.count}}if(o<e.length){let t=e.length-o;r.push({sourceRange:[o,e.length],generatedRange:[s,s+t],type:"retain",generatedText:e.substring(o,e.length)})}return r}_getSourceMapConsumer(){let e=this.consumerMap.get(this.version);return!e&&(e=new r(this._getCachedSourceMappings()),this.consumerMap.set(this.version,e)),e}dispose(){this.consumerMap.clear(),this.mappingsCache.clear()}}},642844:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r="Invariant failed";function o(e,t){var n;if(!e)throw Error(r)}},67940:function(e,t,n){"use strict";var r,o;n.d(t,{n:function(){return r}});class s{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){for(let t of e)if(s.isIncremental(t)){let e=c(t.range),n=this.offsetAt(e.start),r=this.offsetAt(e.end);this._content=this._content.substring(0,n)+t.text+this._content.substring(r,this._content.length);let o=Math.max(e.start.line,0),s=Math.max(e.end.line,0),l=this._lineOffsets,u=a(t.text,!1,n);if(s-o===u.length)for(let e=0,t=u.length;e<t;e++)l[e+o+1]=u[e];else u.length<1e4?l.splice(o+1,s-o,...u):this._lineOffsets=l=l.slice(0,o+1).concat(u,l.slice(s+1));let d=t.text.length-(r-n);if(0!==d)for(let e=o+1+u.length,t=l.length;e<t;e++)l[e]=l[e]+d}else if(s.isFull(t))this._content=t.text,this._lineOffsets=void 0;else throw Error("Unknown change event received");this._version=t}getLineOffsets(){return void 0===this._lineOffsets&&(this._lineOffsets=a(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(0===r)return{line:0,character:e};for(;n<r;){let o=Math.floor((n+r)/2);t[o]>e?r=o:n=o+1}let o=n-1;return e=this.ensureBeforeEOL(e,t[o]),{line:o,character:e-t[o]}}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line];if(e.character<=0)return n;let r=e.line+1<t.length?t[e.line+1]:this._content.length,o=Math.min(n+e.character,r);return this.ensureBeforeEOL(o,n)}ensureBeforeEOL(e,t){for(;e>t&&l(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){return null!=e&&"string"==typeof e.text&&void 0!==e.range&&(void 0===e.rangeLength||"number"==typeof e.rangeLength)}static isFull(e){return null!=e&&"string"==typeof e.text&&void 0===e.range&&void 0===e.rangeLength}}(o=r||(r={})).create=function(e,t,n,r){return new s(e,t,n,r)},o.update=function(e,t,n){if(e instanceof s)return e.update(t,n),e;throw Error("TextDocument.update: document must be created by TextDocument.create")},o.applyEdits=function(e,t){let n=e.getText(),r=function e(t,n){if(t.length<=1)return t;let r=t.length/2|0,o=t.slice(0,r),s=t.slice(r);e(o,n),e(s,n);let a=0,l=0,c=0;for(;a<o.length&&l<s.length;)0>=n(o[a],s[l])?t[c++]=o[a++]:t[c++]=s[l++];for(;a<o.length;)t[c++]=o[a++];for(;l<s.length;)t[c++]=s[l++];return t}(t.map(u),(e,t)=>{let n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n}),o=0,s=[];for(let t of r){let r=e.offsetAt(t.range.start);if(r<o)throw Error("Overlapping edit");r>o&&s.push(n.substring(o,r));t.newText.length&&s.push(t.newText),o=e.offsetAt(t.range.end)}return s.push(n.substr(o)),s.join("")};function a(e,t,n=0){let r=t?[n]:[];for(let t=0;t<e.length;t++){let o=e.charCodeAt(t);l(o)&&(13===o&&t+1<e.length&&10===e.charCodeAt(t+1)&&t++,r.push(n+t+1))}return r}function l(e){return 13===e||10===e}function c(e){let t=e.start,n=e.end;return t.line>n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function u(e){let t=c(e.range);return t!==e.range?{newText:e.newText,range:t}:e}},386388:function(e,t,n){"use strict";var r,o,s,a,l,c,u,d,p,h,f,m,g,v,b,y,x,w,S,k,A,C,E,T,_,O,M,I,P,D,N,R,L,j,$,F,z,B,H,U,V,q,W,G,K,Y,Z,J,X,Q,ee,et,en,er,ei,eo,es,ea,el,ec,eu,ed,ep,eh,ef,em,eg,ev,eb,ey,ex,ew,eS,ek,eA,eC,eE,eT,e_,eO,eM,eI,eP,eD,eN,eR,eL,ej,e$,eF,ez,eB,eH,eU,eV,eq,eW,eG,eK,eY,eZ,eJ,eX,eQ,e0,e1,e2,e3,e5,e4,e6,e8,e9,e7,te,tt,tn,tr,ti,to,ts,ta,tl,tc,tu,td,tp,th,tf,tm,tg,tv,tb,ty,tx;n.d(t,{AD:function(){return m},A_:function(){return j},FG:function(){return V},H_:function(){return b},Ly:function(){return l},PY:function(){return k},R9:function(){return w},Ye:function(){return u},a4:function(){return L},cR:function(){return X},cm:function(){return $},e6:function(){return c},lO:function(){return F},xm:function(){return eu}}),(r||(r={})).is=function(e){return"string"==typeof e},(o||(o={})).is=function(e){return"string"==typeof e},(eM=s||(s={})).MIN_VALUE=-0x80000000,eM.MAX_VALUE=0x7fffffff,eM.is=function(e){return"number"==typeof e&&eM.MIN_VALUE<=e&&e<=eM.MAX_VALUE},(eI=a||(a={})).MIN_VALUE=0,eI.MAX_VALUE=0x7fffffff,eI.is=function(e){return"number"==typeof e&&eI.MIN_VALUE<=e&&e<=eI.MAX_VALUE},(eP=l||(l={})).create=function(e,t){return e===Number.MAX_VALUE&&(e=a.MAX_VALUE),t===Number.MAX_VALUE&&(t=a.MAX_VALUE),{line:e,character:t}},eP.is=function(e){return eO.objectLiteral(e)&&eO.uinteger(e.line)&&eO.uinteger(e.character)},(eD=c||(c={})).create=function(e,t,n,r){if(eO.uinteger(e)&&eO.uinteger(t)&&eO.uinteger(n)&&eO.uinteger(r))return{start:l.create(e,t),end:l.create(n,r)};if(l.is(e)&&l.is(t))return{start:e,end:t};throw Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${r}]`)},eD.is=function(e){return eO.objectLiteral(e)&&l.is(e.start)&&l.is(e.end)},(eN=u||(u={})).create=function(e,t){return{uri:e,range:t}},eN.is=function(e){return eO.objectLiteral(e)&&c.is(e.range)&&(eO.string(e.uri)||eO.undefined(e.uri))},(eR=d||(d={})).create=function(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}},eR.is=function(e){return eO.objectLiteral(e)&&c.is(e.targetRange)&&eO.string(e.targetUri)&&c.is(e.targetSelectionRange)&&(c.is(e.originSelectionRange)||eO.undefined(e.originSelectionRange))},(eL=p||(p={})).create=function(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}},eL.is=function(e){return eO.objectLiteral(e)&&eO.numberRange(e.red,0,1)&&eO.numberRange(e.green,0,1)&&eO.numberRange(e.blue,0,1)&&eO.numberRange(e.alpha,0,1)},(ej=h||(h={})).create=function(e,t){return{range:e,color:t}},ej.is=function(e){return eO.objectLiteral(e)&&c.is(e.range)&&p.is(e.color)},(e$=f||(f={})).create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e$.is=function(e){return eO.objectLiteral(e)&&eO.string(e.label)&&(eO.undefined(e.textEdit)||k.is(e))&&(eO.undefined(e.additionalTextEdits)||eO.typedArray(e.additionalTextEdits,k.is))},(eF=m||(m={})).Comment="comment",eF.Imports="imports",eF.Region="region",(ez=g||(g={})).create=function(e,t,n,r,o,s){let a={startLine:e,endLine:t};return eO.defined(n)&&(a.startCharacter=n),eO.defined(r)&&(a.endCharacter=r),eO.defined(o)&&(a.kind=o),eO.defined(s)&&(a.collapsedText=s),a},ez.is=function(e){return eO.objectLiteral(e)&&eO.uinteger(e.startLine)&&eO.uinteger(e.startLine)&&(eO.undefined(e.startCharacter)||eO.uinteger(e.startCharacter))&&(eO.undefined(e.endCharacter)||eO.uinteger(e.endCharacter))&&(eO.undefined(e.kind)||eO.string(e.kind))},(eB=v||(v={})).create=function(e,t){return{location:e,message:t}},eB.is=function(e){return eO.defined(e)&&u.is(e.location)&&eO.string(e.message)},(eH=b||(b={})).Error=1,eH.Warning=2,eH.Information=3,eH.Hint=4,(eU=y||(y={})).Unnecessary=1,eU.Deprecated=2,(x||(x={})).is=function(e){return eO.objectLiteral(e)&&eO.string(e.href)},(eV=w||(w={})).create=function(e,t,n,r,o,s){let a={range:e,message:t};return eO.defined(n)&&(a.severity=n),eO.defined(r)&&(a.code=r),eO.defined(o)&&(a.source=o),eO.defined(s)&&(a.relatedInformation=s),a},eV.is=function(e){var t;return eO.defined(e)&&c.is(e.range)&&eO.string(e.message)&&(eO.number(e.severity)||eO.undefined(e.severity))&&(eO.integer(e.code)||eO.string(e.code)||eO.undefined(e.code))&&(eO.undefined(e.codeDescription)||eO.string(null===(t=e.codeDescription)||void 0===t?void 0:t.href))&&(eO.string(e.source)||eO.undefined(e.source))&&(eO.undefined(e.relatedInformation)||eO.typedArray(e.relatedInformation,v.is))},(eq=S||(S={})).create=function(e,t,...n){let r={title:e,command:t};return eO.defined(n)&&n.length>0&&(r.arguments=n),r},eq.is=function(e){return eO.defined(e)&&eO.string(e.title)&&eO.string(e.command)},(eW=k||(k={})).replace=function(e,t){return{range:e,newText:t}},eW.insert=function(e,t){return{range:{start:e,end:e},newText:t}},eW.del=function(e){return{range:e,newText:""}},eW.is=function(e){return eO.objectLiteral(e)&&eO.string(e.newText)&&c.is(e.range)},(eG=A||(A={})).create=function(e,t,n){let r={label:e};return void 0!==t&&(r.needsConfirmation=t),void 0!==n&&(r.description=n),r},eG.is=function(e){return eO.objectLiteral(e)&&eO.string(e.label)&&(eO.boolean(e.needsConfirmation)||void 0===e.needsConfirmation)&&(eO.string(e.description)||void 0===e.description)},(C||(C={})).is=function(e){return eO.string(e)},(eK=E||(E={})).replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},eK.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},eK.del=function(e,t){return{range:e,newText:"",annotationId:t}},eK.is=function(e){return k.is(e)&&(A.is(e.annotationId)||C.is(e.annotationId))},(eY=T||(T={})).create=function(e,t){return{textDocument:e,edits:t}},eY.is=function(e){return eO.defined(e)&&N.is(e.textDocument)&&Array.isArray(e.edits)},(eZ=_||(_={})).create=function(e,t,n){let r={kind:"create",uri:e};return void 0!==t&&(void 0!==t.overwrite||void 0!==t.ignoreIfExists)&&(r.options=t),void 0!==n&&(r.annotationId=n),r},eZ.is=function(e){return e&&"create"===e.kind&&eO.string(e.uri)&&(void 0===e.options||(void 0===e.options.overwrite||eO.boolean(e.options.overwrite))&&(void 0===e.options.ignoreIfExists||eO.boolean(e.options.ignoreIfExists)))&&(void 0===e.annotationId||C.is(e.annotationId))},(eJ=O||(O={})).create=function(e,t,n,r){let o={kind:"rename",oldUri:e,newUri:t};return void 0!==n&&(void 0!==n.overwrite||void 0!==n.ignoreIfExists)&&(o.options=n),void 0!==r&&(o.annotationId=r),o},eJ.is=function(e){return e&&"rename"===e.kind&&eO.string(e.oldUri)&&eO.string(e.newUri)&&(void 0===e.options||(void 0===e.options.overwrite||eO.boolean(e.options.overwrite))&&(void 0===e.options.ignoreIfExists||eO.boolean(e.options.ignoreIfExists)))&&(void 0===e.annotationId||C.is(e.annotationId))},(eX=M||(M={})).create=function(e,t,n){let r={kind:"delete",uri:e};return void 0!==t&&(void 0!==t.recursive||void 0!==t.ignoreIfNotExists)&&(r.options=t),void 0!==n&&(r.annotationId=n),r},eX.is=function(e){return e&&"delete"===e.kind&&eO.string(e.uri)&&(void 0===e.options||(void 0===e.options.recursive||eO.boolean(e.options.recursive))&&(void 0===e.options.ignoreIfNotExists||eO.boolean(e.options.ignoreIfNotExists)))&&(void 0===e.annotationId||C.is(e.annotationId))},(I||(I={})).is=function(e){return e&&(void 0!==e.changes||void 0!==e.documentChanges)&&(void 0===e.documentChanges||e.documentChanges.every(e=>eO.string(e.kind)?_.is(e)||O.is(e)||M.is(e):T.is(e)))},(eQ=P||(P={})).create=function(e){return{uri:e}},eQ.is=function(e){return eO.defined(e)&&eO.string(e.uri)},(e0=D||(D={})).create=function(e,t){return{uri:e,version:t}},e0.is=function(e){return eO.defined(e)&&eO.string(e.uri)&&eO.integer(e.version)},(e1=N||(N={})).create=function(e,t){return{uri:e,version:t}},e1.is=function(e){return eO.defined(e)&&eO.string(e.uri)&&(null===e.version||eO.integer(e.version))},(e2=R||(R={})).create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},e2.is=function(e){return eO.defined(e)&&eO.string(e.uri)&&eO.string(e.languageId)&&eO.integer(e.version)&&eO.string(e.text)},(e3=L||(L={})).PlainText="plaintext",e3.Markdown="markdown",e3.is=function(e){return e===e3.PlainText||e===e3.Markdown},(j||(j={})).is=function(e){return eO.objectLiteral(e)&&L.is(e.kind)&&eO.string(e.value)},(e5=$||($={})).Text=1,e5.Method=2,e5.Function=3,e5.Constructor=4,e5.Field=5,e5.Variable=6,e5.Class=7,e5.Interface=8,e5.Module=9,e5.Property=10,e5.Unit=11,e5.Value=12,e5.Enum=13,e5.Keyword=14,e5.Snippet=15,e5.Color=16,e5.File=17,e5.Reference=18,e5.Folder=19,e5.EnumMember=20,e5.Constant=21,e5.Struct=22,e5.Event=23,e5.Operator=24,e5.TypeParameter=25,(e4=F||(F={})).PlainText=1,e4.Snippet=2,(z||(z={})).Deprecated=1,(e6=B||(B={})).create=function(e,t,n){return{newText:e,insert:t,replace:n}},e6.is=function(e){return e&&eO.string(e.newText)&&c.is(e.insert)&&c.is(e.replace)},(e8=H||(H={})).asIs=1,e8.adjustIndentation=2,(U||(U={})).is=function(e){return e&&(eO.string(e.detail)||void 0===e.detail)&&(eO.string(e.description)||void 0===e.description)},(V||(V={})).create=function(e){return{label:e}},(q||(q={})).create=function(e,t){return{items:e||[],isIncomplete:!!t}},(e9=W||(W={})).fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e9.is=function(e){return eO.string(e)||eO.objectLiteral(e)&&eO.string(e.language)&&eO.string(e.value)},(G||(G={})).is=function(e){return!!e&&eO.objectLiteral(e)&&(j.is(e.contents)||W.is(e.contents)||eO.typedArray(e.contents,W.is))&&(void 0===e.range||c.is(e.range))},(K||(K={})).create=function(e,t){return t?{label:e,documentation:t}:{label:e}},(Y||(Y={})).create=function(e,t,...n){let r={label:e};return eO.defined(t)&&(r.documentation=t),eO.defined(n)?r.parameters=n:r.parameters=[],r},(e7=Z||(Z={})).Text=1,e7.Read=2,e7.Write=3,(J||(J={})).create=function(e,t){let n={range:e};return eO.number(t)&&(n.kind=t),n},(te=X||(X={})).File=1,te.Module=2,te.Namespace=3,te.Package=4,te.Class=5,te.Method=6,te.Property=7,te.Field=8,te.Constructor=9,te.Enum=10,te.Interface=11,te.Function=12,te.Variable=13,te.Constant=14,te.String=15,te.Number=16,te.Boolean=17,te.Array=18,te.Object=19,te.Key=20,te.Null=21,te.EnumMember=22,te.Struct=23,te.Event=24,te.Operator=25,te.TypeParameter=26,(Q||(Q={})).Deprecated=1,(ee||(ee={})).create=function(e,t,n,r,o){let s={name:e,kind:t,location:{uri:r,range:n}};return o&&(s.containerName=o),s},(et||(et={})).create=function(e,t,n,r){return void 0!==r?{name:e,kind:t,location:{uri:n,range:r}}:{name:e,kind:t,location:{uri:n}}},(tt=en||(en={})).create=function(e,t,n,r,o,s){let a={name:e,detail:t,kind:n,range:r,selectionRange:o};return void 0!==s&&(a.children=s),a},tt.is=function(e){return e&&eO.string(e.name)&&eO.number(e.kind)&&c.is(e.range)&&c.is(e.selectionRange)&&(void 0===e.detail||eO.string(e.detail))&&(void 0===e.deprecated||eO.boolean(e.deprecated))&&(void 0===e.children||Array.isArray(e.children))&&(void 0===e.tags||Array.isArray(e.tags))},(tn=er||(er={})).Empty="",tn.QuickFix="quickfix",tn.Refactor="refactor",tn.RefactorExtract="refactor.extract",tn.RefactorInline="refactor.inline",tn.RefactorRewrite="refactor.rewrite",tn.Source="source",tn.SourceOrganizeImports="source.organizeImports",tn.SourceFixAll="source.fixAll",(tr=ei||(ei={})).Invoked=1,tr.Automatic=2,(ti=eo||(eo={})).create=function(e,t,n){let r={diagnostics:e};return null!=t&&(r.only=t),null!=n&&(r.triggerKind=n),r},ti.is=function(e){return eO.defined(e)&&eO.typedArray(e.diagnostics,w.is)&&(void 0===e.only||eO.typedArray(e.only,eO.string))&&(void 0===e.triggerKind||e.triggerKind===ei.Invoked||e.triggerKind===ei.Automatic)},(to=es||(es={})).create=function(e,t,n){let r={title:e},o=!0;return"string"==typeof t?(o=!1,r.kind=t):S.is(t)?r.command=t:r.edit=t,o&&void 0!==n&&(r.kind=n),r},to.is=function(e){return e&&eO.string(e.title)&&(void 0===e.diagnostics||eO.typedArray(e.diagnostics,w.is))&&(void 0===e.kind||eO.string(e.kind))&&(void 0!==e.edit||void 0!==e.command)&&(void 0===e.command||S.is(e.command))&&(void 0===e.isPreferred||eO.boolean(e.isPreferred))&&(void 0===e.edit||I.is(e.edit))},(ts=ea||(ea={})).create=function(e,t){let n={range:e};return eO.defined(t)&&(n.data=t),n},ts.is=function(e){return eO.defined(e)&&c.is(e.range)&&(eO.undefined(e.command)||S.is(e.command))},(ta=el||(el={})).create=function(e,t){return{tabSize:e,insertSpaces:t}},ta.is=function(e){return eO.defined(e)&&eO.uinteger(e.tabSize)&&eO.boolean(e.insertSpaces)},(tl=ec||(ec={})).create=function(e,t,n){return{range:e,target:t,data:n}},tl.is=function(e){return eO.defined(e)&&c.is(e.range)&&(eO.undefined(e.target)||eO.string(e.target))},(tc=eu||(eu={})).create=function(e,t){return{range:e,parent:t}},tc.is=function(e){return eO.objectLiteral(e)&&c.is(e.range)&&(void 0===e.parent||tc.is(e.parent))},(tu=ed||(ed={})).namespace="namespace",tu.type="type",tu.class="class",tu.enum="enum",tu.interface="interface",tu.struct="struct",tu.typeParameter="typeParameter",tu.parameter="parameter",tu.variable="variable",tu.property="property",tu.enumMember="enumMember",tu.event="event",tu.function="function",tu.method="method",tu.macro="macro",tu.keyword="keyword",tu.modifier="modifier",tu.comment="comment",tu.string="string",tu.number="number",tu.regexp="regexp",tu.operator="operator",tu.decorator="decorator",(td=ep||(ep={})).declaration="declaration",td.definition="definition",td.readonly="readonly",td.static="static",td.deprecated="deprecated",td.abstract="abstract",td.async="async",td.modification="modification",td.documentation="documentation",td.defaultLibrary="defaultLibrary",(eh||(eh={})).is=function(e){return eO.objectLiteral(e)&&(void 0===e.resultId||"string"==typeof e.resultId)&&Array.isArray(e.data)&&(0===e.data.length||"number"==typeof e.data[0])},(tp=ef||(ef={})).create=function(e,t){return{range:e,text:t}},tp.is=function(e){return null!=e&&c.is(e.range)&&eO.string(e.text)},(th=em||(em={})).create=function(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}},th.is=function(e){return null!=e&&c.is(e.range)&&eO.boolean(e.caseSensitiveLookup)&&(eO.string(e.variableName)||void 0===e.variableName)},(tf=eg||(eg={})).create=function(e,t){return{range:e,expression:t}},tf.is=function(e){return null!=e&&c.is(e.range)&&(eO.string(e.expression)||void 0===e.expression)},(tm=ev||(ev={})).create=function(e,t){return{frameId:e,stoppedLocation:t}},tm.is=function(e){return eO.defined(e)&&c.is(e.stoppedLocation)},(tg=eb||(eb={})).Type=1,tg.Parameter=2,tg.is=function(e){return 1===e||2===e},(tv=ey||(ey={})).create=function(e){return{value:e}},tv.is=function(e){return eO.objectLiteral(e)&&(void 0===e.tooltip||eO.string(e.tooltip)||j.is(e.tooltip))&&(void 0===e.location||u.is(e.location))&&(void 0===e.command||S.is(e.command))},(tb=ex||(ex={})).create=function(e,t,n){let r={position:e,label:t};return void 0!==n&&(r.kind=n),r},tb.is=function(e){return eO.objectLiteral(e)&&l.is(e.position)&&(eO.string(e.label)||eO.typedArray(e.label,ey.is))&&(void 0===e.kind||eb.is(e.kind))&&void 0===e.textEdits||eO.typedArray(e.textEdits,k.is)&&(void 0===e.tooltip||eO.string(e.tooltip)||j.is(e.tooltip))&&(void 0===e.paddingLeft||eO.boolean(e.paddingLeft))&&(void 0===e.paddingRight||eO.boolean(e.paddingRight))},(ew||(ew={})).createSnippet=function(e){return{kind:"snippet",value:e}},(eS||(eS={})).create=function(e,t,n,r){return{insertText:e,filterText:t,range:n,command:r}},(ek||(ek={})).create=function(e){return{items:e}},(ty=eA||(eA={})).Invoked=0,ty.Automatic=1,(eC||(eC={})).create=function(e,t){return{range:e,text:t}},(eE||(eE={})).create=function(e,t){return{triggerKind:e,selectedCompletionInfo:t}},(eT||(eT={})).is=function(e){return eO.objectLiteral(e)&&o.is(e.uri)&&eO.string(e.name)},(tx=e_||(e_={})).create=function(e,t,n,r){return new tw(e,t,n,r)},tx.is=function(e){return!!(eO.defined(e)&&eO.string(e.uri)&&(eO.undefined(e.languageId)||eO.string(e.languageId))&&eO.uinteger(e.lineCount)&&eO.func(e.getText)&&eO.func(e.positionAt)&&eO.func(e.offsetAt))},tx.applyEdits=function(e,t){let n=e.getText(),r=function e(t,n){if(t.length<=1)return t;let r=t.length/2|0,o=t.slice(0,r),s=t.slice(r);e(o,n),e(s,n);let a=0,l=0,c=0;for(;a<o.length&&l<s.length;)0>=n(o[a],s[l])?t[c++]=o[a++]:t[c++]=s[l++];for(;a<o.length;)t[c++]=o[a++];for(;l<s.length;)t[c++]=s[l++];return t}(t,(e,t)=>{let n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n}),o=n.length;for(let t=r.length-1;t>=0;t--){let s=r[t],a=e.offsetAt(s.range.start),l=e.offsetAt(s.range.end);if(l<=o)n=n.substring(0,a)+s.newText+n.substring(l,n.length);else throw Error("Overlapping edit");o=a}return n};class tw{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(void 0===this._lineOffsets){let e=[],t=this._content,n=!0;for(let r=0;r<t.length;r++){n&&(e.push(r),n=!1);let o=t.charAt(r);n="\r"===o||"\n"===o,"\r"===o&&r+1<t.length&&"\n"===t.charAt(r+1)&&r++}n&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(0===r)return l.create(0,e);for(;n<r;){let o=Math.floor((n+r)/2);t[o]>e?r=o:n=o+1}let o=n-1;return l.create(o,e-t[o])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)}get lineCount(){return this.getLineOffsets().length}}!function(e){let t=Object.prototype.toString;e.defined=function(e){return void 0!==e};e.undefined=function(e){return void 0===e};e.boolean=function(e){return!0===e||!1===e};e.string=function(e){return"[object String]"===t.call(e)};e.number=function(e){return"[object Number]"===t.call(e)};e.numberRange=function(e,n,r){return"[object Number]"===t.call(e)&&n<=e&&e<=r};e.integer=function(e){return"[object Number]"===t.call(e)&&-0x80000000<=e&&e<=0x7fffffff};e.uinteger=function(e){return"[object Number]"===t.call(e)&&0<=e&&e<=0x7fffffff};e.func=function(e){return"[object Function]"===t.call(e)};e.objectLiteral=function(e){return null!==e&&"object"==typeof e};e.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)}}(eO||(eO={}))},827047:function(e,t,n){"use strict";var r;n.d(t,{o:function(){return o}}),(()=>{let e;var t,n,o={975:e=>{function t(e){if("string"!=typeof e)throw TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,r="",o=0,s=-1,a=0,l=0;l<=e.length;++l){if(l<e.length)n=e.charCodeAt(l);else{if(47===n)break;n=47}if(47===n){if(s===l-1||1===a);else if(s!==l-1&&2===a){if(r.length<2||2!==o||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2)){if(r.length>2){var c=r.lastIndexOf("/");if(c!==r.length-1){-1===c?(r="",o=0):o=(r=r.slice(0,c)).length-1-r.lastIndexOf("/"),s=l,a=0;continue}}else if(2===r.length||1===r.length){r="",o=0,s=l,a=0;continue}}t&&(r.length>0?r+="/..":r="..",o=2)}else r.length>0?r+="/"+e.slice(s+1,l):r=e.slice(s+1,l),o=l-s-1;s=l,a=0}else 46===n&&-1!==a?++a:a=-1}return r}var r={resolve:function(){for(var e,r,o="",s=!1,a=arguments.length-1;a>=-1&&!s;a--)a>=0?e=arguments[a]:(void 0===r&&(r=process.cwd()),e=r),t(e),0!==e.length&&(o=e+"/"+o,s=47===e.charCodeAt(0));return o=n(o,!s),s?o.length>0?"/"+o:"/":o.length>0?o:"."},normalize:function(e){if(t(e),0===e.length)return".";var r=47===e.charCodeAt(0),o=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!r)).length||r||(e="."),e.length>0&&o&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0==arguments.length)return".";for(var e,n=0;n<arguments.length;++n){var o=arguments[n];t(o),o.length>0&&(void 0===e?e=o:e+="/"+o)}return void 0===e?".":r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n||(e=r.resolve(e))===(n=r.resolve(n)))return"";for(var o=1;o<e.length&&47===e.charCodeAt(o);++o);for(var s=e.length,a=s-o,l=1;l<n.length&&47===n.charCodeAt(l);++l);for(var c=n.length-l,u=a<c?a:c,d=-1,p=0;p<=u;++p){if(p===u){if(c>u){if(47===n.charCodeAt(l+p))return n.slice(l+p+1);if(0===p)return n.slice(l+p)}else a>u&&(47===e.charCodeAt(o+p)?d=p:0===p&&(d=0));break}var h=e.charCodeAt(o+p);if(h!==n.charCodeAt(l+p))break;47===h&&(d=p)}var f="";for(p=o+d+1;p<=s;++p)p!==s&&47!==e.charCodeAt(p)||(0===f.length?f+="..":f+="/..");return f.length>0?f+n.slice(l+d):(l+=d,47===n.charCodeAt(l)&&++l,n.slice(l))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),r=47===n,o=-1,s=!0,a=e.length-1;a>=1;--a)if(47===(n=e.charCodeAt(a))){if(!s){o=a;break}}else s=!1;return -1===o?r?"/":".":r&&1===o?"//":e.slice(0,o)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw TypeError('"ext" argument must be a string');t(e);var r,o=0,s=-1,a=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var l=n.length-1,c=-1;for(r=e.length-1;r>=0;--r){var u=e.charCodeAt(r);if(47===u){if(!a){o=r+1;break}}else -1===c&&(a=!1,c=r+1),l>=0&&(u===n.charCodeAt(l)?-1==--l&&(s=r):(l=-1,s=c))}return o===s?s=c:-1===s&&(s=e.length),e.slice(o,s)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!a){o=r+1;break}}else -1===s&&(a=!1,s=r+1);return -1===s?"":e.slice(o,s)},extname:function(e){t(e);for(var n=-1,r=0,o=-1,s=!0,a=0,l=e.length-1;l>=0;--l){var c=e.charCodeAt(l);if(47!==c)-1===o&&(s=!1,o=l+1),46===c?-1===n?n=l:1!==a&&(a=1):-1!==n&&(a=-1);else if(!s){r=l+1;break}}return -1===n||-1===o||0===a||1===a&&n===o-1&&n===r+1?"":e.slice(n,o)},format:function(e){var t,n,r,o;if(null===e||"object"!=typeof e)throw TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return t=0,r=(n=e).dir||n.root,o=n.base||(n.name||"")+(n.ext||""),r?r===n.root?r+o:r+"/"+o:o},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var r,o=e.charCodeAt(0),s=47===o;s?(n.root="/",r=1):r=0;for(var a=-1,l=0,c=-1,u=!0,d=e.length-1,p=0;d>=r;--d)if(47!==(o=e.charCodeAt(d)))-1===c&&(u=!1,c=d+1),46===o?-1===a?a=d:1!==p&&(p=1):-1!==a&&(p=-1);else if(!u){l=d+1;break}return -1===a||-1===c||0===p||1===p&&a===c-1&&a===l+1?-1!==c&&(n.base=n.name=0===l&&s?e.slice(1,c):e.slice(l,c)):(0===l&&s?(n.name=e.slice(1,a),n.base=e.slice(1,c)):(n.name=e.slice(l,a),n.base=e.slice(l,c)),n.ext=e.slice(a,c)),l>0?n.dir=e.slice(0,l-1):s&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,e.exports=r}},s={};function a(e){var t=s[e];if(void 0!==t)return t.exports;var n=s[e]={exports:{}};return o[e](n,n.exports,a),n.exports}a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var l={};(a.r(l),a.d(l,{URI:()=>f,Utils:()=>n}),"object"==typeof process)?e="win32"===process.platform:"object"==typeof navigator&&(e=navigator.userAgent.indexOf("Windows")>=0);let c=/^\w[\w\d+.-]*$/,u=/^\//,d=/^\/\//;function p(e,t){if(!e.scheme&&t)throw Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!c.test(e.scheme))throw Error("[UriError]: Scheme contains illegal characters.");if(e.path){if(e.authority){if(!u.test(e.path))throw Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(d.test(e.path))throw Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}let h=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class f{static isUri(e){return e instanceof f||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}scheme;authority;path;query;fragment;constructor(e,t,n,r,o,s=!1){var a,l;"object"==typeof e?(this.scheme=e.scheme||"",this.authority=e.authority||"",this.path=e.path||"",this.query=e.query||"",this.fragment=e.fragment||""):(this.scheme=(a=e,l=s,a||l?a:"file"),this.authority=t||"",this.path=function(e,t){switch(e){case"https":case"http":case"file":t?"/"!==t[0]&&(t="/"+t):t="/"}return t}(this.scheme,n||""),this.query=r||"",this.fragment=o||"",p(this,s))}get fsPath(){return x(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:o,fragment:s}=e;return void 0===t?t=this.scheme:null===t&&(t=""),void 0===n?n=this.authority:null===n&&(n=""),void 0===r?r=this.path:null===r&&(r=""),void 0===o?o=this.query:null===o&&(o=""),void 0===s?s=this.fragment:null===s&&(s=""),t===this.scheme&&n===this.authority&&r===this.path&&o===this.query&&s===this.fragment?this:new g(t,n,r,o,s)}static parse(e,t=!1){let n=h.exec(e);return n?new g(n[2]||"",k(n[4]||""),k(n[5]||""),k(n[7]||""),k(n[9]||""),t):new g("","","","","")}static file(t){let n="";if(e&&(t=t.replace(/\\/g,"/")),"/"===t[0]&&"/"===t[1]){let e=t.indexOf("/",2);-1===e?(n=t.substring(2),t="/"):(n=t.substring(2,e),t=t.substring(e)||"/")}return new g("file",n,t,"","")}static from(e){let t=new g(e.scheme,e.authority,e.path,e.query,e.fragment);return p(t,!0),t}toString(e=!1){return w(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof f)return e;{let t=new g(e);return t._formatted=e.external,t._fsPath=e._sep===m?e.fsPath:null,t}}return e}}let m=e?1:void 0;class g extends f{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=x(this,!1)),this._fsPath}toString(e=!1){return e?w(this,!0):(this._formatted||(this._formatted=w(this,!1)),this._formatted)}toJSON(){let e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=m),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}let v={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function b(e,t,n){let r,o=-1;for(let s=0;s<e.length;s++){let a=e.charCodeAt(s);if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||45===a||46===a||95===a||126===a||t&&47===a||n&&91===a||n&&93===a||n&&58===a)-1!==o&&(r+=encodeURIComponent(e.substring(o,s)),o=-1),void 0!==r&&(r+=e.charAt(s));else{void 0===r&&(r=e.substr(0,s));let t=v[a];void 0!==t?(-1!==o&&(r+=encodeURIComponent(e.substring(o,s)),o=-1),r+=t):-1===o&&(o=s)}}return -1!==o&&(r+=encodeURIComponent(e.substring(o))),void 0!==r?r:e}function y(e){let t;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);35===r||63===r?(void 0===t&&(t=e.substr(0,n)),t+=v[r]):void 0!==t&&(t+=e[n])}return void 0!==t?t:e}function x(t,n){let r;return r=t.authority&&t.path.length>1&&"file"===t.scheme?`//${t.authority}${t.path}`:47===t.path.charCodeAt(0)&&(t.path.charCodeAt(1)>=65&&90>=t.path.charCodeAt(1)||t.path.charCodeAt(1)>=97&&122>=t.path.charCodeAt(1))&&58===t.path.charCodeAt(2)?n?t.path.substr(1):t.path[1].toLowerCase()+t.path.substr(2):t.path,e&&(r=r.replace(/\//g,"\\")),r}function w(e,t){let n=t?y:b,r="",{scheme:o,authority:s,path:a,query:l,fragment:c}=e;if(o&&(r+=o,r+=":"),(s||"file"===o)&&(r+="/",r+="/"),s){let e=s.indexOf("@");if(-1!==e){let t=s.substr(0,e);s=s.substr(e+1),-1===(e=t.lastIndexOf(":"))?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=":",r+=n(t.substr(e+1),!1,!0)),r+="@"}-1===(e=(s=s.toLowerCase()).lastIndexOf(":"))?r+=n(s,!1,!0):(r+=n(s.substr(0,e),!1,!0),r+=s.substr(e))}if(a){if(a.length>=3&&47===a.charCodeAt(0)&&58===a.charCodeAt(2)){let e=a.charCodeAt(1);e>=65&&e<=90&&(a=`/${String.fromCharCode(e+32)}:${a.substr(3)}`)}else if(a.length>=2&&58===a.charCodeAt(1)){let e=a.charCodeAt(0);e>=65&&e<=90&&(a=`${String.fromCharCode(e+32)}:${a.substr(2)}`)}r+=n(a,!0,!1)}return l&&(r+="?",r+=n(l,!1,!1)),c&&(r+="#",r+=t?c:b(c,!1,!1)),r}let S=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function k(e){return e.match(S)?e.replace(S,e=>(function e(t){try{return decodeURIComponent(t)}catch{return t.length>3?t.substr(0,3)+e(t.substr(3)):t}})(e)):e}var A=a(975);let C=A.posix||A;(t=n||(n={})).joinPath=function(e,...t){return e.with({path:C.join(e.path,...t)})},t.resolvePath=function(e,...t){let n=e.path,r=!1;"/"!==n[0]&&(n="/"+n,r=!0);let o=C.resolve(n,...t);return r&&"/"===o[0]&&!e.authority&&(o=o.substring(1)),e.with({path:o})},t.dirname=function(e){if(0===e.path.length||"/"===e.path)return e;let t=C.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},t.basename=function(e){return C.basename(e.path)},t.extname=function(e){return C.extname(e.path)},r=l})();let{URI:o,Utils:s}=r},831e3:function(e,t,n){"use strict";let r;function o(e){if(!(e!==e.toLowerCase()&&e!==e.toUpperCase())&&(e=e.toLowerCase()),-1===e.indexOf("-")&&-1===e.indexOf("_"))return e;{let t="",n=!1,r=e.match(/^-+/);for(let o=r?r[0].length:0;o<e.length;o++){let r=e.charAt(o);n&&(n=!1,r=r.toUpperCase()),0!==o&&("-"===r||"_"===r)?n=!0:"-"!==r&&"_"!==r&&(t+=r)}return t}}function s(e,t){let n=e.toLowerCase();t=t||"-";let r="";for(let o=0;o<e.length;o++){let s=n.charAt(o),a=e.charAt(o);s!==a&&o>0?r+=`${t}${n.charAt(o)}`:r+=a}return r}function a(e){return null!=e&&(!!("number"==typeof e||/^0x[0-9a-f]+$/i.test(e))||!/^0[^.]/.test(e)&&/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e))}n.d(t,{Z:()=>f});(p=h||(h={})).BOOLEAN="boolean",p.STRING="string",p.NUMBER="number",p.ARRAY="array";function l(e){return void 0!==e?e+1:1}function c(e){return"__proto__"===e?"___proto___":e}let u=new class e{constructor(e){r=e}parse(e,t){let n=Object.assign({alias:void 0,array:void 0,boolean:void 0,config:void 0,configObjects:void 0,configuration:void 0,coerce:void 0,count:void 0,default:void 0,envPrefix:void 0,narg:void 0,normalize:void 0,string:void 0,number:void 0,__:void 0,key:void 0},t),u=function(e){if(Array.isArray(e))return e.map(e=>"string"!=typeof e?e+"":e);e=e.trim();let t=0,n=null,r=null,o=null,s=[];for(let a=0;a<e.length;a++){if(n=r," "===(r=e.charAt(a))&&!o){" "!==n&&t++;continue}r===o?o=null:("'"===r||'"'===r)&&!o&&(o=r),!s[t]&&(s[t]=""),s[t]+=r}return s}(e),d="string"==typeof e,p=function(e){let t=[],n=Object.create(null),r=!0;for(Object.keys(e).forEach(function(n){t.push([].concat(e[n],n))});r;){r=!1;for(let e=0;e<t.length;e++)for(let n=e+1;n<t.length;n++)if(t[e].filter(function(e){return -1!==t[n].indexOf(e)}).length){t[e]=t[e].concat(t[n]),t.splice(n,1),r=!0;break}}return t.forEach(function(e){let t=(e=e.filter(function(e,t,n){return n.indexOf(e)===t})).pop();void 0!==t&&"string"==typeof t&&(n[t]=e)}),n}(Object.assign(Object.create(null),n.alias)),f=Object.assign({"boolean-negation":!0,"camel-case-expansion":!0,"combine-arrays":!1,"dot-notation":!0,"duplicate-arguments-array":!0,"flatten-duplicate-arrays":!0,"greedy-arrays":!0,"halt-at-non-option":!1,"nargs-eats-options":!1,"negation-prefix":"no-","parse-numbers":!0,"parse-positional-numbers":!0,"populate--":!1,"set-placeholder-key":!1,"short-option-groups":!0,"strip-aliased":!1,"strip-dashed":!1,"unknown-options-as-args":!1},n.configuration),m=Object.assign(Object.create(null),n.default),g=n.configObjects||[],v=n.envPrefix,b=f["populate--"],y=b?"--":"_",x=Object.create(null),w=Object.create(null),S=n.__||r.format,k={aliases:Object.create(null),arrays:Object.create(null),bools:Object.create(null),strings:Object.create(null),numbers:Object.create(null),counts:Object.create(null),normalize:Object.create(null),configs:Object.create(null),nargs:Object.create(null),coercions:Object.create(null),keys:[]},A=/^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/,C=RegExp("^--"+f["negation-prefix"]+"(.+)");[].concat(n.array||[]).filter(Boolean).forEach(function(e){let t="object"==typeof e?e.key:e,n=Object.keys(e).map(function(e){return({boolean:"bools",string:"strings",number:"numbers"})[e]}).filter(Boolean).pop();n&&(k[n][t]=!0),k.arrays[t]=!0,k.keys.push(t)}),[].concat(n.boolean||[]).filter(Boolean).forEach(function(e){k.bools[e]=!0,k.keys.push(e)}),[].concat(n.string||[]).filter(Boolean).forEach(function(e){k.strings[e]=!0,k.keys.push(e)}),[].concat(n.number||[]).filter(Boolean).forEach(function(e){k.numbers[e]=!0,k.keys.push(e)}),[].concat(n.count||[]).filter(Boolean).forEach(function(e){k.counts[e]=!0,k.keys.push(e)}),[].concat(n.normalize||[]).filter(Boolean).forEach(function(e){k.normalize[e]=!0,k.keys.push(e)}),"object"==typeof n.narg&&Object.entries(n.narg).forEach(([e,t])=>{"number"==typeof t&&(k.nargs[e]=t,k.keys.push(e))}),"object"==typeof n.coerce&&Object.entries(n.coerce).forEach(([e,t])=>{"function"==typeof t&&(k.coercions[e]=t,k.keys.push(e))}),void 0!==n.config&&(Array.isArray(n.config)||"string"==typeof n.config?[].concat(n.config).filter(Boolean).forEach(function(e){k.configs[e]=!0}):"object"==typeof n.config&&Object.entries(n.config).forEach(([e,t])=>{("boolean"==typeof t||"function"==typeof t)&&(k.configs[e]=t)})),function(...e){e.forEach(function(e){Object.keys(e||{}).forEach(function(e){!k.aliases[e]&&(k.aliases[e]=[].concat(p[e]||[]),k.aliases[e].concat(e).forEach(function(t){if(/-/.test(t)&&f["camel-case-expansion"]){let n=o(t);n!==e&&-1===k.aliases[e].indexOf(n)&&(k.aliases[e].push(n),x[n]=!0)}}),k.aliases[e].concat(e).forEach(function(t){if(t.length>1&&/[A-Z]/.test(t)&&f["camel-case-expansion"]){let n=s(t,"-");n!==e&&-1===k.aliases[e].indexOf(n)&&(k.aliases[e].push(n),x[n]=!0)}}),k.aliases[e].forEach(function(t){k.aliases[t]=[e].concat(k.aliases[e].filter(function(e){return t!==e}))}))})})}(n.key,p,n.default,k.arrays),Object.keys(m).forEach(function(e){(k.aliases[e]||[]).forEach(function(t){m[t]=m[e]})});let E=null;(function(){Object.keys(k.counts).find(e=>B(e,k.arrays)?(E=Error(S("Invalid configuration: %s, opts.count excludes opts.array.",e)),!0):!!B(e,k.nargs)&&(E=Error(S("Invalid configuration: %s, opts.count excludes opts.narg.",e)),!0))})();let T=[],_=Object.assign(Object.create(null),{_:[]}),O={};for(let e=0;e<u.length;e++){let t,n,r,o,s,a;let l=u[e],c=l.replace(/^-{3,}/,"---");if("--"!==l&&/^-/.test(l)&&U(l))M(l);else if(c.match(/^---+(=|$)/)){M(l);continue}else if(l.match(/^--.+=/)||!f["short-option-groups"]&&l.match(/^-.+=/))null!==(o=l.match(/^--?([^=]+)=([\s\S]*)$/))&&Array.isArray(o)&&o.length>=3&&(B(o[1],k.arrays)?e=P(e,o[1],u,o[2]):!1!==B(o[1],k.nargs)?e=I(e,o[1],u,o[2]):D(o[1],o[2],!0));else if(l.match(C)&&f["boolean-negation"])null!==(o=l.match(C))&&Array.isArray(o)&&o.length>=2&&D(n=o[1],!!B(n,k.arrays)&&[!1]);else if(l.match(/^--.+/)||!f["short-option-groups"]&&l.match(/^-[^-]+/))null!==(o=l.match(/^--?(.+)/))&&Array.isArray(o)&&o.length>=2&&(B(n=o[1],k.arrays)?e=P(e,n,u):!1!==B(n,k.nargs)?e=I(e,n,u):void 0!==(s=u[e+1])&&(!s.match(/^-/)||s.match(A))&&!B(n,k.bools)&&!B(n,k.counts)?(D(n,s),e++):/^(true|false)$/.test(s)?(D(n,s),e++):D(n,V(n)));else if(l.match(/^-.\..+=/))null!==(o=l.match(/^-([^=]+)=([\s\S]*)$/))&&Array.isArray(o)&&o.length>=3&&D(o[1],o[2]);else if(l.match(/^-.\..+/)&&!l.match(A))s=u[e+1],null!==(o=l.match(/^-(.\..+)/))&&Array.isArray(o)&&o.length>=2&&(n=o[1],void 0===s||s.match(/^-/)||B(n,k.bools)||B(n,k.counts)?D(n,V(n)):(D(n,s),e++));else if(l.match(/^-[^-]+/)&&!l.match(A)){r=l.slice(1,-1).split(""),t=!1;for(let o=0;o<r.length;o++){if(s=l.slice(o+2),r[o+1]&&"="===r[o+1]){a=l.slice(o+3),B(n=r[o],k.arrays)?e=P(e,n,u,a):!1!==B(n,k.nargs)?e=I(e,n,u,a):D(n,a),t=!0;break}if("-"===s){D(r[o],s);continue}if(/[A-Za-z]/.test(r[o])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(s)&&!1===B(s,k.bools)){D(r[o],s),t=!0;break}if(r[o+1]&&r[o+1].match(/\W/)){D(r[o],s),t=!0;break}D(r[o],V(r[o]))}n=l.slice(-1)[0],!t&&"-"!==n&&(B(n,k.arrays)?e=P(e,n,u):!1!==B(n,k.nargs)?e=I(e,n,u):void 0!==(s=u[e+1])&&(!/^(-|--)[^-]/.test(s)||s.match(A))&&!B(n,k.bools)&&!B(n,k.counts)?(D(n,s),e++):/^(true|false)$/.test(s)?(D(n,s),e++):D(n,V(n)))}else if(l.match(/^-[0-9]$/)&&l.match(A)&&B(l.slice(1),k.bools))D(n=l.slice(1),V(n));else if("--"===l){T=u.slice(e+1);break}else if(f["halt-at-non-option"]){T=u.slice(e);break}else M(l)}function M(e){let t=R("_",e);("string"==typeof t||"number"==typeof t)&&_._.push(t)}function I(e,t,n,r){let o;let s=B(t,k.nargs);if(0===(s="number"!=typeof s||isNaN(s)?1:s))return!q(r)&&(E=Error(S("Argument unexpected for: %s",t))),D(t,V(t)),e;let a=q(r)?0:1;if(f["nargs-eats-options"])n.length-(e+1)+a<s&&(E=Error(S("Not enough arguments following: %s",t))),a=s;else{for(o=e+1;o<n.length&&(!n[o].match(/^-[^0-9]/)||n[o].match(A)||U(n[o]));o++)a++;a<s&&(E=Error(S("Not enough arguments following: %s",t)))}let l=Math.min(a,s);for(!q(r)&&l>0&&(D(t,r),l--),o=e+1;o<l+e+1;o++)D(t,n[o]);return e+l}function P(e,t,n,r){let o=[],s=r||n[e+1],a=B(t,k.nargs);if(B(t,k.bools)&&!/^(true|false)$/.test(s))o.push(!0);else if(q(s)||q(r)&&/^-/.test(s)&&!A.test(s)&&!U(s)){if(void 0!==m[t]){let e=m[t];o=Array.isArray(e)?e:[e]}}else{!q(r)&&o.push(N(t,r,!0));for(let r=e+1;r<n.length&&(f["greedy-arrays"]||!(o.length>0))&&(!a||"number"!=typeof a||!(o.length>=a))&&(s=n[r],!/^-/.test(s)||A.test(s)||U(s));r++){;e=r,o.push(N(t,s,d))}}return"number"==typeof a&&(a&&o.length<a||isNaN(a)&&0===o.length)&&(E=Error(S("Not enough arguments following: %s",t))),D(t,o),e}function D(e,t,n=d){if(/-/.test(e)&&f["camel-case-expansion"]){let t=e.split(".").map(function(e){return o(e)}).join(".");(function e(t,n){!(k.aliases[t]&&k.aliases[t].length)&&(k.aliases[t]=[n],x[n]=!0),!(k.aliases[n]&&k.aliases[n].length)&&e(n,t)})(e,t)}let s=N(e,t,n),a=e.split(".");z(_,a,s),k.aliases[e]&&k.aliases[e].forEach(function(e){z(_,e.split("."),s)}),a.length>1&&f["dot-notation"]&&(k.aliases[a[0]]||[]).forEach(function(t){let n=t.split("."),r=[].concat(a);r.shift(),n=n.concat(r),!(k.aliases[e]||[]).includes(n.join("."))&&z(_,n,s)}),B(e,k.normalize)&&!B(e,k.arrays)&&[e].concat(k.aliases[e]||[]).forEach(function(e){Object.defineProperty(O,e,{enumerable:!0,get:()=>t,set(e){t="string"==typeof e?r.normalize(e):e}})})}j(_,!0),j(_,!1),function(e){let t=Object.create(null);$(t,k.aliases,m),Object.keys(k.configs).forEach(function(n){let o=e[n]||t[n];if(o)try{let e=null,t=r.resolve(r.cwd(),o),s=k.configs[n];if("function"==typeof s){try{e=s(t)}catch(t){e=t}if(e instanceof Error){E=e;return}}else e=r.require(t);L(e)}catch(t){"PermissionDenied"===t.name?E=t:e[n]&&(E=Error(S("Invalid JSON config file: %s",o)))}})}(_),function(){void 0!==g&&g.forEach(function(e){L(e)})}(),$(_,k.aliases,m,!0),function(e){let t;let n=new Set;Object.keys(e).forEach(function(r){if(!n.has(r)&&"function"==typeof(t=B(r,k.coercions)))try{let o=R(r,t(e[r]));[].concat(k.aliases[r]||[],r).forEach(t=>{n.add(t),e[t]=o})}catch(e){E=e}})}(_),f["set-placeholder-key"]&&function(e){k.keys.forEach(t=>{!~t.indexOf(".")&&void 0===e[t]&&(e[t]=void 0)})}(_),Object.keys(k.counts).forEach(function(e){!F(_,e.split("."))&&D(e,0)}),b&&T.length&&(_[y]=[]),T.forEach(function(e){_[y].push(e)}),f["camel-case-expansion"]&&f["strip-dashed"]&&Object.keys(_).filter(e=>"--"!==e&&e.includes("-")).forEach(e=>{delete _[e]}),f["strip-aliased"]&&[].concat(...Object.keys(p).map(e=>p[e])).forEach(e=>{f["camel-case-expansion"]&&e.includes("-")&&delete _[e.split(".").map(e=>o(e)).join(".")],delete _[e]});function N(e,t,n){n&&(t=function(e){return"string"==typeof e&&("'"===e[0]||'"'===e[0])&&e[e.length-1]===e[0]?e.substring(1,e.length-1):e}(t)),(B(e,k.bools)||B(e,k.counts))&&"string"==typeof t&&(t="true"===t);let o=Array.isArray(t)?t.map(function(t){return R(e,t)}):R(e,t);return B(e,k.counts)&&(q(o)||"boolean"==typeof o)&&(o=l()),B(e,k.normalize)&&B(e,k.arrays)&&(o=Array.isArray(t)?t.map(e=>r.normalize(e)):r.normalize(t)),o}function R(e,t){return f["parse-positional-numbers"]||"_"!==e?(!B(e,k.strings)&&!B(e,k.bools)&&!Array.isArray(t)&&(a(t)&&f["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${t}`)))||!q(t)&&B(e,k.numbers))&&(t=Number(t)),t):t}function L(e,t){Object.keys(e).forEach(function(n){let r=e[n],o=t?t+"."+n:n;"object"==typeof r&&null!==r&&!Array.isArray(r)&&f["dot-notation"]?L(r,o):(!F(_,o.split("."))||B(o,k.arrays)&&f["combine-arrays"])&&D(o,r)})}function j(e,t){if(void 0===v)return;let n="string"==typeof v?v:"",s=r.env();Object.keys(s).forEach(function(r){if(""===n||0===r.lastIndexOf(n,0)){let a=r.split("__").map(function(e,t){return 0===t&&(e=e.substring(n.length)),o(e)});(t&&k.configs[a.join(".")]||!t)&&!F(e,a)&&D(a.join("."),s[r])}})}function $(e,t,n,r=!1){Object.keys(n).forEach(function(o){!F(e,o.split("."))&&(z(e,o.split("."),n[o]),r&&(w[o]=!0),(t[o]||[]).forEach(function(t){!F(e,t.split("."))&&z(e,t.split("."),n[o])}))})}function F(e,t){let n=e;!f["dot-notation"]&&(t=[t.join(".")]),t.slice(0,-1).forEach(function(e){n=n[e]||{}});let r=t[t.length-1];return"object"==typeof n&&r in n}function z(e,t,n){let r=e;!f["dot-notation"]&&(t=[t.join(".")]),t.slice(0,-1).forEach(function(e){e=c(e),"object"==typeof r&&void 0===r[e]&&(r[e]={}),"object"!=typeof r[e]||Array.isArray(r[e])?(Array.isArray(r[e])?r[e].push({}):r[e]=[r[e],{}],r=r[e][r[e].length-1]):r=r[e]});let o=c(t[t.length-1]),s=B(t.join("."),k.arrays),a=Array.isArray(n),u=f["duplicate-arguments-array"];!u&&B(o,k.nargs)&&(u=!0,(!q(r[o])&&1===k.nargs[o]||Array.isArray(r[o])&&r[o].length===k.nargs[o])&&(r[o]=void 0)),n===l()?r[o]=l(r[o]):Array.isArray(r[o])?u&&s&&a?r[o]=f["flatten-duplicate-arrays"]?r[o].concat(n):(Array.isArray(r[o][0])?r[o]:[r[o]]).concat([n]):u||!!s!=!!a?r[o]=r[o].concat([n]):r[o]=n:void 0===r[o]&&s?r[o]=a?n:[n]:u&&!(void 0===r[o]||B(o,k.counts)||B(o,k.bools))?r[o]=[r[o],n]:r[o]=n}function B(e,t){let n=[].concat(k.aliases[e]||[],e),r=Object.keys(t),o=n.find(e=>r.includes(e));return!!o&&t[o]}function H(e){return[].concat(Object.keys(k).map(e=>k[e])).some(function(t){return Array.isArray(t)?t.includes(e):t[e]})}function U(e){return f["unknown-options-as-args"]&&function(e){return!((e=e.replace(/^-{3,}/,"--")).match(A)||function(e){let t;if(e.match(A)||!e.match(/^-[^-]+/))return!1;let n=!0,r=e.slice(1).split("");for(let o=0;o<r.length;o++){if(t=e.slice(o+2),!H(r[o])){n=!1;break}if(r[o+1]&&"="===r[o+1]||"-"===t||/[A-Za-z]/.test(r[o])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(t)||r[o+1]&&r[o+1].match(/\W/))break}return n}(e))&&!function(e,...t){return[].concat(...t).some(function(t){let n=e.match(t);return n&&H(n[1])})}(e,/^-+([^=]+?)=[\s\S]*$/,C,/^-+([^=]+?)$/,/^-+([^=]+?)-$/,/^-+([^=]+?\d+)$/,/^-+([^=]+?)\W+.*$/)}(e)}function V(e){return!B(e,k.bools)&&!B(e,k.counts)&&`${e}`in m?m[e]:function(e){return({[h.BOOLEAN]:!0,[h.STRING]:"",[h.NUMBER]:void 0,[h.ARRAY]:[]})[e]}(function(e){let t=h.BOOLEAN;return B(e,k.strings)?t=h.STRING:B(e,k.numbers)?t=h.NUMBER:B(e,k.bools)?t=h.BOOLEAN:B(e,k.arrays)&&(t=h.ARRAY),t}(e))}function q(e){return void 0===e}return{aliases:Object.assign({},k.aliases),argv:Object.assign(O,_),configuration:f,defaulted:Object.assign({},w),error:E,newAliases:Object.assign({},x)}}}({cwd:()=>"",format:(e,t)=>e.replace("%s",t),normalize:e=>e,resolve:e=>e,require:()=>{throw Error("loading config from files not currently supported in browser")},env:()=>{}}),d=function(e,t){return u.parse(e.slice(),t).argv};d.detailed=function(e,t){return u.parse(e.slice(),t)},d.camelCase=o,d.decamelize=s,d.looksLikeNumber=a;var p,h,f=d},464168:function(e){"use strict";e.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},613917:function(e){"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},392458:function(e){"use strict";e.exports=JSON.parse('{"application/1d-interleaved-parityfec":{"source":"iana"},"application/3gpdash-qoe-report+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/3gpp-ims+xml":{"source":"iana","compressible":true},"application/3gpphal+json":{"source":"iana","compressible":true},"application/3gpphalforms+json":{"source":"iana","compressible":true},"application/a2l":{"source":"iana"},"application/ace+cbor":{"source":"iana"},"application/activemessage":{"source":"iana"},"application/activity+json":{"source":"iana","compressible":true},"application/alto-costmap+json":{"source":"iana","compressible":true},"application/alto-costmapfilter+json":{"source":"iana","compressible":true},"application/alto-directory+json":{"source":"iana","compressible":true},"application/alto-endpointcost+json":{"source":"iana","compressible":true},"application/alto-endpointcostparams+json":{"source":"iana","compressible":true},"application/alto-endpointprop+json":{"source":"iana","compressible":true},"application/alto-endpointpropparams+json":{"source":"iana","compressible":true},"application/alto-error+json":{"source":"iana","compressible":true},"application/alto-networkmap+json":{"source":"iana","compressible":true},"application/alto-networkmapfilter+json":{"source":"iana","compressible":true},"application/alto-updatestreamcontrol+json":{"source":"iana","compressible":true},"application/alto-updatestreamparams+json":{"source":"iana","compressible":true},"application/aml":{"source":"iana"},"application/andrew-inset":{"source":"iana","extensions":["ez"]},"application/applefile":{"source":"iana"},"application/applixware":{"source":"apache","extensions":["aw"]},"application/at+jwt":{"source":"iana"},"application/atf":{"source":"iana"},"application/atfx":{"source":"iana"},"application/atom+xml":{"source":"iana","compressible":true,"extensions":["atom"]},"application/atomcat+xml":{"source":"iana","compressible":true,"extensions":["atomcat"]},"application/atomdeleted+xml":{"source":"iana","compressible":true,"extensions":["atomdeleted"]},"application/atomicmail":{"source":"iana"},"application/atomsvc+xml":{"source":"iana","compressible":true,"extensions":["atomsvc"]},"application/atsc-dwd+xml":{"source":"iana","compressible":true,"extensions":["dwd"]},"application/atsc-dynamic-event-message":{"source":"iana"},"application/atsc-held+xml":{"source":"iana","compressible":true,"extensions":["held"]},"application/atsc-rdt+json":{"source":"iana","compressible":true},"application/atsc-rsat+xml":{"source":"iana","compressible":true,"extensions":["rsat"]},"application/atxml":{"source":"iana"},"application/auth-policy+xml":{"source":"iana","compressible":true},"application/bacnet-xdd+zip":{"source":"iana","compressible":false},"application/batch-smtp":{"source":"iana"},"application/bdoc":{"compressible":false,"extensions":["bdoc"]},"application/beep+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/calendar+json":{"source":"iana","compressible":true},"application/calendar+xml":{"source":"iana","compressible":true,"extensions":["xcs"]},"application/call-completion":{"source":"iana"},"application/cals-1840":{"source":"iana"},"application/captive+json":{"source":"iana","compressible":true},"application/cbor":{"source":"iana"},"application/cbor-seq":{"source":"iana"},"application/cccex":{"source":"iana"},"application/ccmp+xml":{"source":"iana","compressible":true},"application/ccxml+xml":{"source":"iana","compressible":true,"extensions":["ccxml"]},"application/cdfx+xml":{"source":"iana","compressible":true,"extensions":["cdfx"]},"application/cdmi-capability":{"source":"iana","extensions":["cdmia"]},"application/cdmi-container":{"source":"iana","extensions":["cdmic"]},"application/cdmi-domain":{"source":"iana","extensions":["cdmid"]},"application/cdmi-object":{"source":"iana","extensions":["cdmio"]},"application/cdmi-queue":{"source":"iana","extensions":["cdmiq"]},"application/cdni":{"source":"iana"},"application/cea":{"source":"iana"},"application/cea-2018+xml":{"source":"iana","compressible":true},"application/cellml+xml":{"source":"iana","compressible":true},"application/cfw":{"source":"iana"},"application/city+json":{"source":"iana","compressible":true},"application/clr":{"source":"iana"},"application/clue+xml":{"source":"iana","compressible":true},"application/clue_info+xml":{"source":"iana","compressible":true},"application/cms":{"source":"iana"},"application/cnrp+xml":{"source":"iana","compressible":true},"application/coap-group+json":{"source":"iana","compressible":true},"application/coap-payload":{"source":"iana"},"application/commonground":{"source":"iana"},"application/conference-info+xml":{"source":"iana","compressible":true},"application/cose":{"source":"iana"},"application/cose-key":{"source":"iana"},"application/cose-key-set":{"source":"iana"},"application/cpl+xml":{"source":"iana","compressible":true,"extensions":["cpl"]},"application/csrattrs":{"source":"iana"},"application/csta+xml":{"source":"iana","compressible":true},"application/cstadata+xml":{"source":"iana","compressible":true},"application/csvm+json":{"source":"iana","compressible":true},"application/cu-seeme":{"source":"apache","extensions":["cu"]},"application/cwt":{"source":"iana"},"application/cybercash":{"source":"iana"},"application/dart":{"compressible":true},"application/dash+xml":{"source":"iana","compressible":true,"extensions":["mpd"]},"application/dash-patch+xml":{"source":"iana","compressible":true,"extensions":["mpp"]},"application/dashdelta":{"source":"iana"},"application/davmount+xml":{"source":"iana","compressible":true,"extensions":["davmount"]},"application/dca-rft":{"source":"iana"},"application/dcd":{"source":"iana"},"application/dec-dx":{"source":"iana"},"application/dialog-info+xml":{"source":"iana","compressible":true},"application/dicom":{"source":"iana"},"application/dicom+json":{"source":"iana","compressible":true},"application/dicom+xml":{"source":"iana","compressible":true},"application/dii":{"source":"iana"},"application/dit":{"source":"iana"},"application/dns":{"source":"iana"},"application/dns+json":{"source":"iana","compressible":true},"application/dns-message":{"source":"iana"},"application/docbook+xml":{"source":"apache","compressible":true,"extensions":["dbk"]},"application/dots+cbor":{"source":"iana"},"application/dskpp+xml":{"source":"iana","compressible":true},"application/dssc+der":{"source":"iana","extensions":["dssc"]},"application/dssc+xml":{"source":"iana","compressible":true,"extensions":["xdssc"]},"application/dvcs":{"source":"iana"},"application/ecmascript":{"source":"iana","compressible":true,"extensions":["es","ecma"]},"application/edi-consent":{"source":"iana"},"application/edi-x12":{"source":"iana","compressible":false},"application/edifact":{"source":"iana","compressible":false},"application/efi":{"source":"iana"},"application/elm+json":{"source":"iana","charset":"UTF-8","compressible":true},"application/elm+xml":{"source":"iana","compressible":true},"application/emergencycalldata.cap+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/emergencycalldata.comment+xml":{"source":"iana","compressible":true},"application/emergencycalldata.control+xml":{"source":"iana","compressible":true},"application/emergencycalldata.deviceinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.ecall.msd":{"source":"iana"},"application/emergencycalldata.providerinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.serviceinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.subscriberinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.veds+xml":{"source":"iana","compressible":true},"application/emma+xml":{"source":"iana","compressible":true,"extensions":["emma"]},"application/emotionml+xml":{"source":"iana","compressible":true,"extensions":["emotionml"]},"application/encaprtp":{"source":"iana"},"application/epp+xml":{"source":"iana","compressible":true},"application/epub+zip":{"source":"iana","compressible":false,"extensions":["epub"]},"application/eshop":{"source":"iana"},"application/exi":{"source":"iana","extensions":["exi"]},"application/expect-ct-report+json":{"source":"iana","compressible":true},"application/express":{"source":"iana","extensions":["exp"]},"application/fastinfoset":{"source":"iana"},"application/fastsoap":{"source":"iana"},"application/fdt+xml":{"source":"iana","compressible":true,"extensions":["fdt"]},"application/fhir+json":{"source":"iana","charset":"UTF-8","compressible":true},"application/fhir+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/fido.trusted-apps+json":{"compressible":true},"application/fits":{"source":"iana"},"application/flexfec":{"source":"iana"},"application/font-sfnt":{"source":"iana"},"application/font-tdpfr":{"source":"iana","extensions":["pfr"]},"application/font-woff":{"source":"iana","compressible":false},"application/framework-attributes+xml":{"source":"iana","compressible":true},"application/geo+json":{"source":"iana","compressible":true,"extensions":["geojson"]},"application/geo+json-seq":{"source":"iana"},"application/geopackage+sqlite3":{"source":"iana"},"application/geoxacml+xml":{"source":"iana","compressible":true},"application/gltf-buffer":{"source":"iana"},"application/gml+xml":{"source":"iana","compressible":true,"extensions":["gml"]},"application/gpx+xml":{"source":"apache","compressible":true,"extensions":["gpx"]},"application/gxf":{"source":"apache","extensions":["gxf"]},"application/gzip":{"source":"iana","compressible":false,"extensions":["gz"]},"application/h224":{"source":"iana"},"application/held+xml":{"source":"iana","compressible":true},"application/hjson":{"extensions":["hjson"]},"application/http":{"source":"iana"},"application/hyperstudio":{"source":"iana","extensions":["stk"]},"application/ibe-key-request+xml":{"source":"iana","compressible":true},"application/ibe-pkg-reply+xml":{"source":"iana","compressible":true},"application/ibe-pp-data":{"source":"iana"},"application/iges":{"source":"iana"},"application/im-iscomposing+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/index":{"source":"iana"},"application/index.cmd":{"source":"iana"},"application/index.obj":{"source":"iana"},"application/index.response":{"source":"iana"},"application/index.vnd":{"source":"iana"},"application/inkml+xml":{"source":"iana","compressible":true,"extensions":["ink","inkml"]},"application/iotp":{"source":"iana"},"application/ipfix":{"source":"iana","extensions":["ipfix"]},"application/ipp":{"source":"iana"},"application/isup":{"source":"iana"},"application/its+xml":{"source":"iana","compressible":true,"extensions":["its"]},"application/java-archive":{"source":"apache","compressible":false,"extensions":["jar","war","ear"]},"application/java-serialized-object":{"source":"apache","compressible":false,"extensions":["ser"]},"application/java-vm":{"source":"apache","compressible":false,"extensions":["class"]},"application/javascript":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["js","mjs"]},"application/jf2feed+json":{"source":"iana","compressible":true},"application/jose":{"source":"iana"},"application/jose+json":{"source":"iana","compressible":true},"application/jrd+json":{"source":"iana","compressible":true},"application/jscalendar+json":{"source":"iana","compressible":true},"application/json":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["json","map"]},"application/json-patch+json":{"source":"iana","compressible":true},"application/json-seq":{"source":"iana"},"application/json5":{"extensions":["json5"]},"application/jsonml+json":{"source":"apache","compressible":true,"extensions":["jsonml"]},"application/jwk+json":{"source":"iana","compressible":true},"application/jwk-set+json":{"source":"iana","compressible":true},"application/jwt":{"source":"iana"},"application/kpml-request+xml":{"source":"iana","compressible":true},"application/kpml-response+xml":{"source":"iana","compressible":true},"application/ld+json":{"source":"iana","compressible":true,"extensions":["jsonld"]},"application/lgr+xml":{"source":"iana","compressible":true,"extensions":["lgr"]},"application/link-format":{"source":"iana"},"application/load-control+xml":{"source":"iana","compressible":true},"application/lost+xml":{"source":"iana","compressible":true,"extensions":["lostxml"]},"application/lostsync+xml":{"source":"iana","compressible":true},"application/lpf+zip":{"source":"iana","compressible":false},"application/lxf":{"source":"iana"},"application/mac-binhex40":{"source":"iana","extensions":["hqx"]},"application/mac-compactpro":{"source":"apache","extensions":["cpt"]},"application/macwriteii":{"source":"iana"},"application/mads+xml":{"source":"iana","compressible":true,"extensions":["mads"]},"application/manifest+json":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["webmanifest"]},"application/marc":{"source":"iana","extensions":["mrc"]},"application/marcxml+xml":{"source":"iana","compressible":true,"extensions":["mrcx"]},"application/mathematica":{"source":"iana","extensions":["ma","nb","mb"]},"application/mathml+xml":{"source":"iana","compressible":true,"extensions":["mathml"]},"application/mathml-content+xml":{"source":"iana","compressible":true},"application/mathml-presentation+xml":{"source":"iana","compressible":true},"application/mbms-associated-procedure-description+xml":{"source":"iana","compressible":true},"application/mbms-deregister+xml":{"source":"iana","compressible":true},"application/mbms-envelope+xml":{"source":"iana","compressible":true},"application/mbms-msk+xml":{"source":"iana","compressible":true},"application/mbms-msk-response+xml":{"source":"iana","compressible":true},"application/mbms-protection-description+xml":{"source":"iana","compressible":true},"application/mbms-reception-report+xml":{"source":"iana","compressible":true},"application/mbms-register+xml":{"source":"iana","compressible":true},"application/mbms-register-response+xml":{"source":"iana","compressible":true},"application/mbms-schedule+xml":{"source":"iana","compressible":true},"application/mbms-user-service-description+xml":{"source":"iana","compressible":true},"application/mbox":{"source":"iana","extensions":["mbox"]},"application/media-policy-dataset+xml":{"source":"iana","compressible":true,"extensions":["mpf"]},"application/media_control+xml":{"source":"iana","compressible":true},"application/mediaservercontrol+xml":{"source":"iana","compressible":true,"extensions":["mscml"]},"application/merge-patch+json":{"source":"iana","compressible":true},"application/metalink+xml":{"source":"apache","compressible":true,"extensions":["metalink"]},"application/metalink4+xml":{"source":"iana","compressible":true,"extensions":["meta4"]},"application/mets+xml":{"source":"iana","compressible":true,"extensions":["mets"]},"application/mf4":{"source":"iana"},"application/mikey":{"source":"iana"},"application/mipc":{"source":"iana"},"application/missing-blocks+cbor-seq":{"source":"iana"},"application/mmt-aei+xml":{"source":"iana","compressible":true,"extensions":["maei"]},"application/mmt-usd+xml":{"source":"iana","compressible":true,"extensions":["musd"]},"application/mods+xml":{"source":"iana","compressible":true,"extensions":["mods"]},"application/moss-keys":{"source":"iana"},"application/moss-signature":{"source":"iana"},"application/mosskey-data":{"source":"iana"},"application/mosskey-request":{"source":"iana"},"application/mp21":{"source":"iana","extensions":["m21","mp21"]},"application/mp4":{"source":"iana","extensions":["mp4s","m4p"]},"application/mpeg4-generic":{"source":"iana"},"application/mpeg4-iod":{"source":"iana"},"application/mpeg4-iod-xmt":{"source":"iana"},"application/mrb-consumer+xml":{"source":"iana","compressible":true},"application/mrb-publish+xml":{"source":"iana","compressible":true},"application/msc-ivr+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/msc-mixer+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/msword":{"source":"iana","compressible":false,"extensions":["doc","dot"]},"application/mud+json":{"source":"iana","compressible":true},"application/multipart-core":{"source":"iana"},"application/mxf":{"source":"iana","extensions":["mxf"]},"application/n-quads":{"source":"iana","extensions":["nq"]},"application/n-triples":{"source":"iana","extensions":["nt"]},"application/nasdata":{"source":"iana"},"application/news-checkgroups":{"source":"iana","charset":"US-ASCII"},"application/news-groupinfo":{"source":"iana","charset":"US-ASCII"},"application/news-transmission":{"source":"iana"},"application/nlsml+xml":{"source":"iana","compressible":true},"application/node":{"source":"iana","extensions":["cjs"]},"application/nss":{"source":"iana"},"application/oauth-authz-req+jwt":{"source":"iana"},"application/oblivious-dns-message":{"source":"iana"},"application/ocsp-request":{"source":"iana"},"application/ocsp-response":{"source":"iana"},"application/octet-stream":{"source":"iana","compressible":false,"extensions":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{"source":"iana","extensions":["oda"]},"application/odm+xml":{"source":"iana","compressible":true},"application/odx":{"source":"iana"},"application/oebps-package+xml":{"source":"iana","compressible":true,"extensions":["opf"]},"application/ogg":{"source":"iana","compressible":false,"extensions":["ogx"]},"application/omdoc+xml":{"source":"apache","compressible":true,"extensions":["omdoc"]},"application/onenote":{"source":"apache","extensions":["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{"source":"iana","compressible":true},"application/oscore":{"source":"iana"},"application/oxps":{"source":"iana","extensions":["oxps"]},"application/p21":{"source":"iana"},"application/p21+zip":{"source":"iana","compressible":false},"application/p2p-overlay+xml":{"source":"iana","compressible":true,"extensions":["relo"]},"application/parityfec":{"source":"iana"},"application/passport":{"source":"iana"},"application/patch-ops-error+xml":{"source":"iana","compressible":true,"extensions":["xer"]},"application/pdf":{"source":"iana","compressible":false,"extensions":["pdf"]},"application/pdx":{"source":"iana"},"application/pem-certificate-chain":{"source":"iana"},"application/pgp-encrypted":{"source":"iana","compressible":false,"extensions":["pgp"]},"application/pgp-keys":{"source":"iana","extensions":["asc"]},"application/pgp-signature":{"source":"iana","extensions":["asc","sig"]},"application/pics-rules":{"source":"apache","extensions":["prf"]},"application/pidf+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/pidf-diff+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/pkcs10":{"source":"iana","extensions":["p10"]},"application/pkcs12":{"source":"iana"},"application/pkcs7-mime":{"source":"iana","extensions":["p7m","p7c"]},"application/pkcs7-signature":{"source":"iana","extensions":["p7s"]},"application/pkcs8":{"source":"iana","extensions":["p8"]},"application/pkcs8-encrypted":{"source":"iana"},"application/pkix-attr-cert":{"source":"iana","extensions":["ac"]},"application/pkix-cert":{"source":"iana","extensions":["cer"]},"application/pkix-crl":{"source":"iana","extensions":["crl"]},"application/pkix-pkipath":{"source":"iana","extensions":["pkipath"]},"application/pkixcmp":{"source":"iana","extensions":["pki"]},"application/pls+xml":{"source":"iana","compressible":true,"extensions":["pls"]},"application/poc-settings+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/postscript":{"source":"iana","compressible":true,"extensions":["ai","eps","ps"]},"application/ppsp-tracker+json":{"source":"iana","compressible":true},"application/problem+json":{"source":"iana","compressible":true},"application/problem+xml":{"source":"iana","compressible":true},"application/provenance+xml":{"source":"iana","compressible":true,"extensions":["provx"]},"application/prs.alvestrand.titrax-sheet":{"source":"iana"},"application/prs.cww":{"source":"iana","extensions":["cww"]},"application/prs.cyn":{"source":"iana","charset":"7-BIT"},"application/prs.hpub+zip":{"source":"iana","compressible":false},"application/prs.nprend":{"source":"iana"},"application/prs.plucker":{"source":"iana"},"application/prs.rdf-xml-crypt":{"source":"iana"},"application/prs.xsf+xml":{"source":"iana","compressible":true},"application/pskc+xml":{"source":"iana","compressible":true,"extensions":["pskcxml"]},"application/pvd+json":{"source":"iana","compressible":true},"application/qsig":{"source":"iana"},"application/raml+yaml":{"compressible":true,"extensions":["raml"]},"application/raptorfec":{"source":"iana"},"application/rdap+json":{"source":"iana","compressible":true},"application/rdf+xml":{"source":"iana","compressible":true,"extensions":["rdf","owl"]},"application/reginfo+xml":{"source":"iana","compressible":true,"extensions":["rif"]},"application/relax-ng-compact-syntax":{"source":"iana","extensions":["rnc"]},"application/remote-printing":{"source":"iana"},"application/reputon+json":{"source":"iana","compressible":true},"application/resource-lists+xml":{"source":"iana","compressible":true,"extensions":["rl"]},"application/resource-lists-diff+xml":{"source":"iana","compressible":true,"extensions":["rld"]},"application/rfc+xml":{"source":"iana","compressible":true},"application/riscos":{"source":"iana"},"application/rlmi+xml":{"source":"iana","compressible":true},"application/rls-services+xml":{"source":"iana","compressible":true,"extensions":["rs"]},"application/route-apd+xml":{"source":"iana","compressible":true,"extensions":["rapd"]},"application/route-s-tsid+xml":{"source":"iana","compressible":true,"extensions":["sls"]},"application/route-usd+xml":{"source":"iana","compressible":true,"extensions":["rusd"]},"application/rpki-ghostbusters":{"source":"iana","extensions":["gbr"]},"application/rpki-manifest":{"source":"iana","extensions":["mft"]},"application/rpki-publication":{"source":"iana"},"application/rpki-roa":{"source":"iana","extensions":["roa"]},"application/rpki-updown":{"source":"iana"},"application/rsd+xml":{"source":"apache","compressible":true,"extensions":["rsd"]},"application/rss+xml":{"source":"apache","compressible":true,"extensions":["rss"]},"application/rtf":{"source":"iana","compressible":true,"extensions":["rtf"]},"application/rtploopback":{"source":"iana"},"application/rtx":{"source":"iana"},"application/samlassertion+xml":{"source":"iana","compressible":true},"application/samlmetadata+xml":{"source":"iana","compressible":true},"application/sarif+json":{"source":"iana","compressible":true},"application/sarif-external-properties+json":{"source":"iana","compressible":true},"application/sbe":{"source":"iana"},"application/sbml+xml":{"source":"iana","compressible":true,"extensions":["sbml"]},"application/scaip+xml":{"source":"iana","compressible":true},"application/scim+json":{"source":"iana","compressible":true},"application/scvp-cv-request":{"source":"iana","extensions":["scq"]},"application/scvp-cv-response":{"source":"iana","extensions":["scs"]},"application/scvp-vp-request":{"source":"iana","extensions":["spq"]},"application/scvp-vp-response":{"source":"iana","extensions":["spp"]},"application/sdp":{"source":"iana","extensions":["sdp"]},"application/secevent+jwt":{"source":"iana"},"application/senml+cbor":{"source":"iana"},"application/senml+json":{"source":"iana","compressible":true},"application/senml+xml":{"source":"iana","compressible":true,"extensions":["senmlx"]},"application/senml-etch+cbor":{"source":"iana"},"application/senml-etch+json":{"source":"iana","compressible":true},"application/senml-exi":{"source":"iana"},"application/sensml+cbor":{"source":"iana"},"application/sensml+json":{"source":"iana","compressible":true},"application/sensml+xml":{"source":"iana","compressible":true,"extensions":["sensmlx"]},"application/sensml-exi":{"source":"iana"},"application/sep+xml":{"source":"iana","compressible":true},"application/sep-exi":{"source":"iana"},"application/session-info":{"source":"iana"},"application/set-payment":{"source":"iana"},"application/set-payment-initiation":{"source":"iana","extensions":["setpay"]},"application/set-registration":{"source":"iana"},"application/set-registration-initiation":{"source":"iana","extensions":["setreg"]},"application/sgml":{"source":"iana"},"application/sgml-open-catalog":{"source":"iana"},"application/shf+xml":{"source":"iana","compressible":true,"extensions":["shf"]},"application/sieve":{"source":"iana","extensions":["siv","sieve"]},"application/simple-filter+xml":{"source":"iana","compressible":true},"application/simple-message-summary":{"source":"iana"},"application/simplesymbolcontainer":{"source":"iana"},"application/sipc":{"source":"iana"},"application/slate":{"source":"iana"},"application/smil":{"source":"iana"},"application/smil+xml":{"source":"iana","compressible":true,"extensions":["smi","smil"]},"application/smpte336m":{"source":"iana"},"application/soap+fastinfoset":{"source":"iana"},"application/soap+xml":{"source":"iana","compressible":true},"application/sparql-query":{"source":"iana","extensions":["rq"]},"application/sparql-results+xml":{"source":"iana","compressible":true,"extensions":["srx"]},"application/spdx+json":{"source":"iana","compressible":true},"application/spirits-event+xml":{"source":"iana","compressible":true},"application/sql":{"source":"iana"},"application/srgs":{"source":"iana","extensions":["gram"]},"application/srgs+xml":{"source":"iana","compressible":true,"extensions":["grxml"]},"application/sru+xml":{"source":"iana","compressible":true,"extensions":["sru"]},"application/ssdl+xml":{"source":"apache","compressible":true,"extensions":["ssdl"]},"application/ssml+xml":{"source":"iana","compressible":true,"extensions":["ssml"]},"application/stix+json":{"source":"iana","compressible":true},"application/swid+xml":{"source":"iana","compressible":true,"extensions":["swidtag"]},"application/tamp-apex-update":{"source":"iana"},"application/tamp-apex-update-confirm":{"source":"iana"},"application/tamp-community-update":{"source":"iana"},"application/tamp-community-update-confirm":{"source":"iana"},"application/tamp-error":{"source":"iana"},"application/tamp-sequence-adjust":{"source":"iana"},"application/tamp-sequence-adjust-confirm":{"source":"iana"},"application/tamp-status-query":{"source":"iana"},"application/tamp-status-response":{"source":"iana"},"application/tamp-update":{"source":"iana"},"application/tamp-update-confirm":{"source":"iana"},"application/tar":{"compressible":true},"application/taxii+json":{"source":"iana","compressible":true},"application/td+json":{"source":"iana","compressible":true},"application/tei+xml":{"source":"iana","compressible":true,"extensions":["tei","teicorpus"]},"application/tetra_isi":{"source":"iana"},"application/thraud+xml":{"source":"iana","compressible":true,"extensions":["tfi"]},"application/timestamp-query":{"source":"iana"},"application/timestamp-reply":{"source":"iana"},"application/timestamped-data":{"source":"iana","extensions":["tsd"]},"application/tlsrpt+gzip":{"source":"iana"},"application/tlsrpt+json":{"source":"iana","compressible":true},"application/tnauthlist":{"source":"iana"},"application/token-introspection+jwt":{"source":"iana"},"application/toml":{"compressible":true,"extensions":["toml"]},"application/trickle-ice-sdpfrag":{"source":"iana"},"application/trig":{"source":"iana","extensions":["trig"]},"application/ttml+xml":{"source":"iana","compressible":true,"extensions":["ttml"]},"application/tve-trigger":{"source":"iana"},"application/tzif":{"source":"iana"},"application/tzif-leap":{"source":"iana"},"application/ubjson":{"compressible":false,"extensions":["ubj"]},"application/ulpfec":{"source":"iana"},"application/urc-grpsheet+xml":{"source":"iana","compressible":true},"application/urc-ressheet+xml":{"source":"iana","compressible":true,"extensions":["rsheet"]},"application/urc-targetdesc+xml":{"source":"iana","compressible":true,"extensions":["td"]},"application/urc-uisocketdesc+xml":{"source":"iana","compressible":true},"application/vcard+json":{"source":"iana","compressible":true},"application/vcard+xml":{"source":"iana","compressible":true},"application/vemmi":{"source":"iana"},"application/vividence.scriptfile":{"source":"apache"},"application/vnd.1000minds.decision-model+xml":{"source":"iana","compressible":true,"extensions":["1km"]},"application/vnd.3gpp-prose+xml":{"source":"iana","compressible":true},"application/vnd.3gpp-prose-pc3ch+xml":{"source":"iana","compressible":true},"application/vnd.3gpp-v2x-local-service-information":{"source":"iana"},"application/vnd.3gpp.5gnas":{"source":"iana"},"application/vnd.3gpp.access-transfer-events+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.bsf+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.gmop+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.gtpc":{"source":"iana"},"application/vnd.3gpp.interworking-data":{"source":"iana"},"application/vnd.3gpp.lpp":{"source":"iana"},"application/vnd.3gpp.mc-signalling-ear":{"source":"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-payload":{"source":"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-signalling":{"source":"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-floor-request+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-location-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-signed+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-ue-init-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-location-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-transmission-request+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mid-call+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.ngap":{"source":"iana"},"application/vnd.3gpp.pfcp":{"source":"iana"},"application/vnd.3gpp.pic-bw-large":{"source":"iana","extensions":["plb"]},"application/vnd.3gpp.pic-bw-small":{"source":"iana","extensions":["psb"]},"application/vnd.3gpp.pic-bw-var":{"source":"iana","extensions":["pvb"]},"application/vnd.3gpp.s1ap":{"source":"iana"},"application/vnd.3gpp.sms":{"source":"iana"},"application/vnd.3gpp.sms+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.srvcc-ext+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.srvcc-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.state-and-event-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.ussd+xml":{"source":"iana","compressible":true},"application/vnd.3gpp2.bcmcsinfo+xml":{"source":"iana","compressible":true},"application/vnd.3gpp2.sms":{"source":"iana"},"application/vnd.3gpp2.tcap":{"source":"iana","extensions":["tcap"]},"application/vnd.3lightssoftware.imagescal":{"source":"iana"},"application/vnd.3m.post-it-notes":{"source":"iana","extensions":["pwn"]},"application/vnd.accpac.simply.aso":{"source":"iana","extensions":["aso"]},"application/vnd.accpac.simply.imp":{"source":"iana","extensions":["imp"]},"application/vnd.acucobol":{"source":"iana","extensions":["acu"]},"application/vnd.acucorp":{"source":"iana","extensions":["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{"source":"apache","compressible":false,"extensions":["air"]},"application/vnd.adobe.flash.movie":{"source":"iana"},"application/vnd.adobe.formscentral.fcdt":{"source":"iana","extensions":["fcdt"]},"application/vnd.adobe.fxp":{"source":"iana","extensions":["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{"source":"iana"},"application/vnd.adobe.xdp+xml":{"source":"iana","compressible":true,"extensions":["xdp"]},"application/vnd.adobe.xfdf":{"source":"iana","extensions":["xfdf"]},"application/vnd.aether.imp":{"source":"iana"},"application/vnd.afpc.afplinedata":{"source":"iana"},"application/vnd.afpc.afplinedata-pagedef":{"source":"iana"},"application/vnd.afpc.cmoca-cmresource":{"source":"iana"},"application/vnd.afpc.foca-charset":{"source":"iana"},"application/vnd.afpc.foca-codedfont":{"source":"iana"},"application/vnd.afpc.foca-codepage":{"source":"iana"},"application/vnd.afpc.modca":{"source":"iana"},"application/vnd.afpc.modca-cmtable":{"source":"iana"},"application/vnd.afpc.modca-formdef":{"source":"iana"},"application/vnd.afpc.modca-mediummap":{"source":"iana"},"application/vnd.afpc.modca-objectcontainer":{"source":"iana"},"application/vnd.afpc.modca-overlay":{"source":"iana"},"application/vnd.afpc.modca-pagesegment":{"source":"iana"},"application/vnd.age":{"source":"iana","extensions":["age"]},"application/vnd.ah-barcode":{"source":"iana"},"application/vnd.ahead.space":{"source":"iana","extensions":["ahead"]},"application/vnd.airzip.filesecure.azf":{"source":"iana","extensions":["azf"]},"application/vnd.airzip.filesecure.azs":{"source":"iana","extensions":["azs"]},"application/vnd.amadeus+json":{"source":"iana","compressible":true},"application/vnd.amazon.ebook":{"source":"apache","extensions":["azw"]},"application/vnd.amazon.mobi8-ebook":{"source":"iana"},"application/vnd.americandynamics.acc":{"source":"iana","extensions":["acc"]},"application/vnd.amiga.ami":{"source":"iana","extensions":["ami"]},"application/vnd.amundsen.maze+xml":{"source":"iana","compressible":true},"application/vnd.android.ota":{"source":"iana"},"application/vnd.android.package-archive":{"source":"apache","compressible":false,"extensions":["apk"]},"application/vnd.anki":{"source":"iana"},"application/vnd.anser-web-certificate-issue-initiation":{"source":"iana","extensions":["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{"source":"apache","extensions":["fti"]},"application/vnd.antix.game-component":{"source":"iana","extensions":["atx"]},"application/vnd.apache.arrow.file":{"source":"iana"},"application/vnd.apache.arrow.stream":{"source":"iana"},"application/vnd.apache.thrift.binary":{"source":"iana"},"application/vnd.apache.thrift.compact":{"source":"iana"},"application/vnd.apache.thrift.json":{"source":"iana"},"application/vnd.api+json":{"source":"iana","compressible":true},"application/vnd.aplextor.warrp+json":{"source":"iana","compressible":true},"application/vnd.apothekende.reservation+json":{"source":"iana","compressible":true},"application/vnd.apple.installer+xml":{"source":"iana","compressible":true,"extensions":["mpkg"]},"application/vnd.apple.keynote":{"source":"iana","extensions":["key"]},"application/vnd.apple.mpegurl":{"source":"iana","extensions":["m3u8"]},"application/vnd.apple.numbers":{"source":"iana","extensions":["numbers"]},"application/vnd.apple.pages":{"source":"iana","extensions":["pages"]},"application/vnd.apple.pkpass":{"compressible":false,"extensions":["pkpass"]},"application/vnd.arastra.swi":{"source":"iana"},"application/vnd.aristanetworks.swi":{"source":"iana","extensions":["swi"]},"application/vnd.artisan+json":{"source":"iana","compressible":true},"application/vnd.artsquare":{"source":"iana"},"application/vnd.astraea-software.iota":{"source":"iana","extensions":["iota"]},"application/vnd.audiograph":{"source":"iana","extensions":["aep"]},"application/vnd.autopackage":{"source":"iana"},"application/vnd.avalon+json":{"source":"iana","compressible":true},"application/vnd.avistar+xml":{"source":"iana","compressible":true},"application/vnd.balsamiq.bmml+xml":{"source":"iana","compressible":true,"extensions":["bmml"]},"application/vnd.balsamiq.bmpr":{"source":"iana"},"application/vnd.banana-accounting":{"source":"iana"},"application/vnd.bbf.usp.error":{"source":"iana"},"application/vnd.bbf.usp.msg":{"source":"iana"},"application/vnd.bbf.usp.msg+json":{"source":"iana","compressible":true},"application/vnd.bekitzur-stech+json":{"source":"iana","compressible":true},"application/vnd.bint.med-content":{"source":"iana"},"application/vnd.biopax.rdf+xml":{"source":"iana","compressible":true},"application/vnd.blink-idb-value-wrapper":{"source":"iana"},"application/vnd.blueice.multipass":{"source":"iana","extensions":["mpm"]},"application/vnd.bluetooth.ep.oob":{"source":"iana"},"application/vnd.bluetooth.le.oob":{"source":"iana"},"application/vnd.bmi":{"source":"iana","extensions":["bmi"]},"application/vnd.bpf":{"source":"iana"},"application/vnd.bpf3":{"source":"iana"},"application/vnd.businessobjects":{"source":"iana","extensions":["rep"]},"application/vnd.byu.uapi+json":{"source":"iana","compressible":true},"application/vnd.cab-jscript":{"source":"iana"},"application/vnd.canon-cpdl":{"source":"iana"},"application/vnd.canon-lips":{"source":"iana"},"application/vnd.capasystems-pg+json":{"source":"iana","compressible":true},"application/vnd.cendio.thinlinc.clientconf":{"source":"iana"},"application/vnd.century-systems.tcp_stream":{"source":"iana"},"application/vnd.chemdraw+xml":{"source":"iana","compressible":true,"extensions":["cdxml"]},"application/vnd.chess-pgn":{"source":"iana"},"application/vnd.chipnuts.karaoke-mmd":{"source":"iana","extensions":["mmd"]},"application/vnd.ciedi":{"source":"iana"},"application/vnd.cinderella":{"source":"iana","extensions":["cdy"]},"application/vnd.cirpack.isdn-ext":{"source":"iana"},"application/vnd.citationstyles.style+xml":{"source":"iana","compressible":true,"extensions":["csl"]},"application/vnd.claymore":{"source":"iana","extensions":["cla"]},"application/vnd.cloanto.rp9":{"source":"iana","extensions":["rp9"]},"application/vnd.clonk.c4group":{"source":"iana","extensions":["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{"source":"iana","extensions":["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{"source":"iana","extensions":["c11amz"]},"application/vnd.coffeescript":{"source":"iana"},"application/vnd.collabio.xodocuments.document":{"source":"iana"},"application/vnd.collabio.xodocuments.document-template":{"source":"iana"},"application/vnd.collabio.xodocuments.presentation":{"source":"iana"},"application/vnd.collabio.xodocuments.presentation-template":{"source":"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{"source":"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{"source":"iana"},"application/vnd.collection+json":{"source":"iana","compressible":true},"application/vnd.collection.doc+json":{"source":"iana","compressible":true},"application/vnd.collection.next+json":{"source":"iana","compressible":true},"application/vnd.comicbook+zip":{"source":"iana","compressible":false},"application/vnd.comicbook-rar":{"source":"iana"},"application/vnd.commerce-battelle":{"source":"iana"},"application/vnd.commonspace":{"source":"iana","extensions":["csp"]},"application/vnd.contact.cmsg":{"source":"iana","extensions":["cdbcmsg"]},"application/vnd.coreos.ignition+json":{"source":"iana","compressible":true},"application/vnd.cosmocaller":{"source":"iana","extensions":["cmc"]},"application/vnd.crick.clicker":{"source":"iana","extensions":["clkx"]},"application/vnd.crick.clicker.keyboard":{"source":"iana","extensions":["clkk"]},"application/vnd.crick.clicker.palette":{"source":"iana","extensions":["clkp"]},"application/vnd.crick.clicker.template":{"source":"iana","extensions":["clkt"]},"application/vnd.crick.clicker.wordbank":{"source":"iana","extensions":["clkw"]},"application/vnd.criticaltools.wbs+xml":{"source":"iana","compressible":true,"extensions":["wbs"]},"application/vnd.cryptii.pipe+json":{"source":"iana","compressible":true},"application/vnd.crypto-shade-file":{"source":"iana"},"application/vnd.cryptomator.encrypted":{"source":"iana"},"application/vnd.cryptomator.vault":{"source":"iana"},"application/vnd.ctc-posml":{"source":"iana","extensions":["pml"]},"application/vnd.ctct.ws+xml":{"source":"iana","compressible":true},"application/vnd.cups-pdf":{"source":"iana"},"application/vnd.cups-postscript":{"source":"iana"},"application/vnd.cups-ppd":{"source":"iana","extensions":["ppd"]},"application/vnd.cups-raster":{"source":"iana"},"application/vnd.cups-raw":{"source":"iana"},"application/vnd.curl":{"source":"iana"},"application/vnd.curl.car":{"source":"apache","extensions":["car"]},"application/vnd.curl.pcurl":{"source":"apache","extensions":["pcurl"]},"application/vnd.cyan.dean.root+xml":{"source":"iana","compressible":true},"application/vnd.cybank":{"source":"iana"},"application/vnd.cyclonedx+json":{"source":"iana","compressible":true},"application/vnd.cyclonedx+xml":{"source":"iana","compressible":true},"application/vnd.d2l.coursepackage1p0+zip":{"source":"iana","compressible":false},"application/vnd.d3m-dataset":{"source":"iana"},"application/vnd.d3m-problem":{"source":"iana"},"application/vnd.dart":{"source":"iana","compressible":true,"extensions":["dart"]},"application/vnd.data-vision.rdz":{"source":"iana","extensions":["rdz"]},"application/vnd.datapackage+json":{"source":"iana","compressible":true},"application/vnd.dataresource+json":{"source":"iana","compressible":true},"application/vnd.dbf":{"source":"iana","extensions":["dbf"]},"application/vnd.debian.binary-package":{"source":"iana"},"application/vnd.dece.data":{"source":"iana","extensions":["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{"source":"iana","compressible":true,"extensions":["uvt","uvvt"]},"application/vnd.dece.unspecified":{"source":"iana","extensions":["uvx","uvvx"]},"application/vnd.dece.zip":{"source":"iana","extensions":["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{"source":"iana","extensions":["fe_launch"]},"application/vnd.desmume.movie":{"source":"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{"source":"iana"},"application/vnd.dm.delegation+xml":{"source":"iana","compressible":true},"application/vnd.dna":{"source":"iana","extensions":["dna"]},"application/vnd.document+json":{"source":"iana","compressible":true},"application/vnd.dolby.mlp":{"source":"apache","extensions":["mlp"]},"application/vnd.dolby.mobile.1":{"source":"iana"},"application/vnd.dolby.mobile.2":{"source":"iana"},"application/vnd.doremir.scorecloud-binary-document":{"source":"iana"},"application/vnd.dpgraph":{"source":"iana","extensions":["dpg"]},"application/vnd.dreamfactory":{"source":"iana","extensions":["dfac"]},"application/vnd.drive+json":{"source":"iana","compressible":true},"application/vnd.ds-keypoint":{"source":"apache","extensions":["kpxx"]},"application/vnd.dtg.local":{"source":"iana"},"application/vnd.dtg.local.flash":{"source":"iana"},"application/vnd.dtg.local.html":{"source":"iana"},"application/vnd.dvb.ait":{"source":"iana","extensions":["ait"]},"application/vnd.dvb.dvbisl+xml":{"source":"iana","compressible":true},"application/vnd.dvb.dvbj":{"source":"iana"},"application/vnd.dvb.esgcontainer":{"source":"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{"source":"iana"},"application/vnd.dvb.ipdcesgaccess":{"source":"iana"},"application/vnd.dvb.ipdcesgaccess2":{"source":"iana"},"application/vnd.dvb.ipdcesgpdd":{"source":"iana"},"application/vnd.dvb.ipdcroaming":{"source":"iana"},"application/vnd.dvb.iptv.alfec-base":{"source":"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{"source":"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-container+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-generic+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-msglist+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-registration-request+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-registration-response+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-init+xml":{"source":"iana","compressible":true},"application/vnd.dvb.pfr":{"source":"iana"},"application/vnd.dvb.service":{"source":"iana","extensions":["svc"]},"application/vnd.dxr":{"source":"iana"},"application/vnd.dynageo":{"source":"iana","extensions":["geo"]},"application/vnd.dzr":{"source":"iana"},"application/vnd.easykaraoke.cdgdownload":{"source":"iana"},"application/vnd.ecdis-update":{"source":"iana"},"application/vnd.ecip.rlp":{"source":"iana"},"application/vnd.eclipse.ditto+json":{"source":"iana","compressible":true},"application/vnd.ecowin.chart":{"source":"iana","extensions":["mag"]},"application/vnd.ecowin.filerequest":{"source":"iana"},"application/vnd.ecowin.fileupdate":{"source":"iana"},"application/vnd.ecowin.series":{"source":"iana"},"application/vnd.ecowin.seriesrequest":{"source":"iana"},"application/vnd.ecowin.seriesupdate":{"source":"iana"},"application/vnd.efi.img":{"source":"iana"},"application/vnd.efi.iso":{"source":"iana"},"application/vnd.emclient.accessrequest+xml":{"source":"iana","compressible":true},"application/vnd.enliven":{"source":"iana","extensions":["nml"]},"application/vnd.enphase.envoy":{"source":"iana"},"application/vnd.eprints.data+xml":{"source":"iana","compressible":true},"application/vnd.epson.esf":{"source":"iana","extensions":["esf"]},"application/vnd.epson.msf":{"source":"iana","extensions":["msf"]},"application/vnd.epson.quickanime":{"source":"iana","extensions":["qam"]},"application/vnd.epson.salt":{"source":"iana","extensions":["slt"]},"application/vnd.epson.ssf":{"source":"iana","extensions":["ssf"]},"application/vnd.ericsson.quickcall":{"source":"iana"},"application/vnd.espass-espass+zip":{"source":"iana","compressible":false},"application/vnd.eszigno3+xml":{"source":"iana","compressible":true,"extensions":["es3","et3"]},"application/vnd.etsi.aoc+xml":{"source":"iana","compressible":true},"application/vnd.etsi.asic-e+zip":{"source":"iana","compressible":false},"application/vnd.etsi.asic-s+zip":{"source":"iana","compressible":false},"application/vnd.etsi.cug+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvcommand+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvdiscovery+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvprofile+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-bc+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-cod+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-npvr+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvservice+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsync+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvueprofile+xml":{"source":"iana","compressible":true},"application/vnd.etsi.mcid+xml":{"source":"iana","compressible":true},"application/vnd.etsi.mheg5":{"source":"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{"source":"iana","compressible":true},"application/vnd.etsi.pstn+xml":{"source":"iana","compressible":true},"application/vnd.etsi.sci+xml":{"source":"iana","compressible":true},"application/vnd.etsi.simservs+xml":{"source":"iana","compressible":true},"application/vnd.etsi.timestamp-token":{"source":"iana"},"application/vnd.etsi.tsl+xml":{"source":"iana","compressible":true},"application/vnd.etsi.tsl.der":{"source":"iana"},"application/vnd.eu.kasparian.car+json":{"source":"iana","compressible":true},"application/vnd.eudora.data":{"source":"iana"},"application/vnd.evolv.ecig.profile":{"source":"iana"},"application/vnd.evolv.ecig.settings":{"source":"iana"},"application/vnd.evolv.ecig.theme":{"source":"iana"},"application/vnd.exstream-empower+zip":{"source":"iana","compressible":false},"application/vnd.exstream-package":{"source":"iana"},"application/vnd.ezpix-album":{"source":"iana","extensions":["ez2"]},"application/vnd.ezpix-package":{"source":"iana","extensions":["ez3"]},"application/vnd.f-secure.mobile":{"source":"iana"},"application/vnd.familysearch.gedcom+zip":{"source":"iana","compressible":false},"application/vnd.fastcopy-disk-image":{"source":"iana"},"application/vnd.fdf":{"source":"iana","extensions":["fdf"]},"application/vnd.fdsn.mseed":{"source":"iana","extensions":["mseed"]},"application/vnd.fdsn.seed":{"source":"iana","extensions":["seed","dataless"]},"application/vnd.ffsns":{"source":"iana"},"application/vnd.ficlab.flb+zip":{"source":"iana","compressible":false},"application/vnd.filmit.zfc":{"source":"iana"},"application/vnd.fints":{"source":"iana"},"application/vnd.firemonkeys.cloudcell":{"source":"iana"},"application/vnd.flographit":{"source":"iana","extensions":["gph"]},"application/vnd.fluxtime.clip":{"source":"iana","extensions":["ftc"]},"application/vnd.font-fontforge-sfd":{"source":"iana"},"application/vnd.framemaker":{"source":"iana","extensions":["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{"source":"iana","extensions":["fnc"]},"application/vnd.frogans.ltf":{"source":"iana","extensions":["ltf"]},"application/vnd.fsc.weblaunch":{"source":"iana","extensions":["fsc"]},"application/vnd.fujifilm.fb.docuworks":{"source":"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{"source":"iana"},"application/vnd.fujifilm.fb.docuworks.container":{"source":"iana"},"application/vnd.fujifilm.fb.jfi+xml":{"source":"iana","compressible":true},"application/vnd.fujitsu.oasys":{"source":"iana","extensions":["oas"]},"application/vnd.fujitsu.oasys2":{"source":"iana","extensions":["oa2"]},"application/vnd.fujitsu.oasys3":{"source":"iana","extensions":["oa3"]},"application/vnd.fujitsu.oasysgp":{"source":"iana","extensions":["fg5"]},"application/vnd.fujitsu.oasysprs":{"source":"iana","extensions":["bh2"]},"application/vnd.fujixerox.art-ex":{"source":"iana"},"application/vnd.fujixerox.art4":{"source":"iana"},"application/vnd.fujixerox.ddd":{"source":"iana","extensions":["ddd"]},"application/vnd.fujixerox.docuworks":{"source":"iana","extensions":["xdw"]},"application/vnd.fujixerox.docuworks.binder":{"source":"iana","extensions":["xbd"]},"application/vnd.fujixerox.docuworks.container":{"source":"iana"},"application/vnd.fujixerox.hbpl":{"source":"iana"},"application/vnd.fut-misnet":{"source":"iana"},"application/vnd.futoin+cbor":{"source":"iana"},"application/vnd.futoin+json":{"source":"iana","compressible":true},"application/vnd.fuzzysheet":{"source":"iana","extensions":["fzs"]},"application/vnd.genomatix.tuxedo":{"source":"iana","extensions":["txd"]},"application/vnd.gentics.grd+json":{"source":"iana","compressible":true},"application/vnd.geo+json":{"source":"iana","compressible":true},"application/vnd.geocube+xml":{"source":"iana","compressible":true},"application/vnd.geogebra.file":{"source":"iana","extensions":["ggb"]},"application/vnd.geogebra.slides":{"source":"iana"},"application/vnd.geogebra.tool":{"source":"iana","extensions":["ggt"]},"application/vnd.geometry-explorer":{"source":"iana","extensions":["gex","gre"]},"application/vnd.geonext":{"source":"iana","extensions":["gxt"]},"application/vnd.geoplan":{"source":"iana","extensions":["g2w"]},"application/vnd.geospace":{"source":"iana","extensions":["g3w"]},"application/vnd.gerber":{"source":"iana"},"application/vnd.globalplatform.card-content-mgt":{"source":"iana"},"application/vnd.globalplatform.card-content-mgt-response":{"source":"iana"},"application/vnd.gmx":{"source":"iana","extensions":["gmx"]},"application/vnd.google-apps.document":{"compressible":false,"extensions":["gdoc"]},"application/vnd.google-apps.presentation":{"compressible":false,"extensions":["gslides"]},"application/vnd.google-apps.spreadsheet":{"compressible":false,"extensions":["gsheet"]},"application/vnd.google-earth.kml+xml":{"source":"iana","compressible":true,"extensions":["kml"]},"application/vnd.google-earth.kmz":{"source":"iana","compressible":false,"extensions":["kmz"]},"application/vnd.gov.sk.e-form+xml":{"source":"iana","compressible":true},"application/vnd.gov.sk.e-form+zip":{"source":"iana","compressible":false},"application/vnd.gov.sk.xmldatacontainer+xml":{"source":"iana","compressible":true},"application/vnd.grafeq":{"source":"iana","extensions":["gqf","gqs"]},"application/vnd.gridmp":{"source":"iana"},"application/vnd.groove-account":{"source":"iana","extensions":["gac"]},"application/vnd.groove-help":{"source":"iana","extensions":["ghf"]},"application/vnd.groove-identity-message":{"source":"iana","extensions":["gim"]},"application/vnd.groove-injector":{"source":"iana","extensions":["grv"]},"application/vnd.groove-tool-message":{"source":"iana","extensions":["gtm"]},"application/vnd.groove-tool-template":{"source":"iana","extensions":["tpl"]},"application/vnd.groove-vcard":{"source":"iana","extensions":["vcg"]},"application/vnd.hal+json":{"source":"iana","compressible":true},"application/vnd.hal+xml":{"source":"iana","compressible":true,"extensions":["hal"]},"application/vnd.handheld-entertainment+xml":{"source":"iana","compressible":true,"extensions":["zmm"]},"application/vnd.hbci":{"source":"iana","extensions":["hbci"]},"application/vnd.hc+json":{"source":"iana","compressible":true},"application/vnd.hcl-bireports":{"source":"iana"},"application/vnd.hdt":{"source":"iana"},"application/vnd.heroku+json":{"source":"iana","compressible":true},"application/vnd.hhe.lesson-player":{"source":"iana","extensions":["les"]},"application/vnd.hl7cda+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.hl7v2+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.hp-hpgl":{"source":"iana","extensions":["hpgl"]},"application/vnd.hp-hpid":{"source":"iana","extensions":["hpid"]},"application/vnd.hp-hps":{"source":"iana","extensions":["hps"]},"application/vnd.hp-jlyt":{"source":"iana","extensions":["jlt"]},"application/vnd.hp-pcl":{"source":"iana","extensions":["pcl"]},"application/vnd.hp-pclxl":{"source":"iana","extensions":["pclxl"]},"application/vnd.httphone":{"source":"iana"},"application/vnd.hydrostatix.sof-data":{"source":"iana","extensions":["sfd-hdstx"]},"application/vnd.hyper+json":{"source":"iana","compressible":true},"application/vnd.hyper-item+json":{"source":"iana","compressible":true},"application/vnd.hyperdrive+json":{"source":"iana","compressible":true},"application/vnd.hzn-3d-crossword":{"source":"iana"},"application/vnd.ibm.afplinedata":{"source":"iana"},"application/vnd.ibm.electronic-media":{"source":"iana"},"application/vnd.ibm.minipay":{"source":"iana","extensions":["mpy"]},"application/vnd.ibm.modcap":{"source":"iana","extensions":["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{"source":"iana","extensions":["irm"]},"application/vnd.ibm.secure-container":{"source":"iana","extensions":["sc"]},"application/vnd.iccprofile":{"source":"iana","extensions":["icc","icm"]},"application/vnd.ieee.1905":{"source":"iana"},"application/vnd.igloader":{"source":"iana","extensions":["igl"]},"application/vnd.imagemeter.folder+zip":{"source":"iana","compressible":false},"application/vnd.imagemeter.image+zip":{"source":"iana","compressible":false},"application/vnd.immervision-ivp":{"source":"iana","extensions":["ivp"]},"application/vnd.immervision-ivu":{"source":"iana","extensions":["ivu"]},"application/vnd.ims.imsccv1p1":{"source":"iana"},"application/vnd.ims.imsccv1p2":{"source":"iana"},"application/vnd.ims.imsccv1p3":{"source":"iana"},"application/vnd.ims.lis.v2.result+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolproxy+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolproxy.id+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolsettings+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolsettings.simple+json":{"source":"iana","compressible":true},"application/vnd.informedcontrol.rms+xml":{"source":"iana","compressible":true},"application/vnd.informix-visionary":{"source":"iana"},"application/vnd.infotech.project":{"source":"iana"},"application/vnd.infotech.project+xml":{"source":"iana","compressible":true},"application/vnd.innopath.wamp.notification":{"source":"iana"},"application/vnd.insors.igm":{"source":"iana","extensions":["igm"]},"application/vnd.intercon.formnet":{"source":"iana","extensions":["xpw","xpx"]},"application/vnd.intergeo":{"source":"iana","extensions":["i2g"]},"application/vnd.intertrust.digibox":{"source":"iana"},"application/vnd.intertrust.nncp":{"source":"iana"},"application/vnd.intu.qbo":{"source":"iana","extensions":["qbo"]},"application/vnd.intu.qfx":{"source":"iana","extensions":["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.conceptitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.knowledgeitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.newsitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.newsmessage+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.packageitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.planningitem+xml":{"source":"iana","compressible":true},"application/vnd.ipunplugged.rcprofile":{"source":"iana","extensions":["rcprofile"]},"application/vnd.irepository.package+xml":{"source":"iana","compressible":true,"extensions":["irp"]},"application/vnd.is-xpr":{"source":"iana","extensions":["xpr"]},"application/vnd.isac.fcs":{"source":"iana","extensions":["fcs"]},"application/vnd.iso11783-10+zip":{"source":"iana","compressible":false},"application/vnd.jam":{"source":"iana","extensions":["jam"]},"application/vnd.japannet-directory-service":{"source":"iana"},"application/vnd.japannet-jpnstore-wakeup":{"source":"iana"},"application/vnd.japannet-payment-wakeup":{"source":"iana"},"application/vnd.japannet-registration":{"source":"iana"},"application/vnd.japannet-registration-wakeup":{"source":"iana"},"application/vnd.japannet-setstore-wakeup":{"source":"iana"},"application/vnd.japannet-verification":{"source":"iana"},"application/vnd.japannet-verification-wakeup":{"source":"iana"},"application/vnd.jcp.javame.midlet-rms":{"source":"iana","extensions":["rms"]},"application/vnd.jisp":{"source":"iana","extensions":["jisp"]},"application/vnd.joost.joda-archive":{"source":"iana","extensions":["joda"]},"application/vnd.jsk.isdn-ngn":{"source":"iana"},"application/vnd.kahootz":{"source":"iana","extensions":["ktz","ktr"]},"application/vnd.kde.karbon":{"source":"iana","extensions":["karbon"]},"application/vnd.kde.kchart":{"source":"iana","extensions":["chrt"]},"application/vnd.kde.kformula":{"source":"iana","extensions":["kfo"]},"application/vnd.kde.kivio":{"source":"iana","extensions":["flw"]},"application/vnd.kde.kontour":{"source":"iana","extensions":["kon"]},"application/vnd.kde.kpresenter":{"source":"iana","extensions":["kpr","kpt"]},"application/vnd.kde.kspread":{"source":"iana","extensions":["ksp"]},"application/vnd.kde.kword":{"source":"iana","extensions":["kwd","kwt"]},"application/vnd.kenameaapp":{"source":"iana","extensions":["htke"]},"application/vnd.kidspiration":{"source":"iana","extensions":["kia"]},"application/vnd.kinar":{"source":"iana","extensions":["kne","knp"]},"application/vnd.koan":{"source":"iana","extensions":["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{"source":"iana","extensions":["sse"]},"application/vnd.las":{"source":"iana"},"application/vnd.las.las+json":{"source":"iana","compressible":true},"application/vnd.las.las+xml":{"source":"iana","compressible":true,"extensions":["lasxml"]},"application/vnd.laszip":{"source":"iana"},"application/vnd.leap+json":{"source":"iana","compressible":true},"application/vnd.liberty-request+xml":{"source":"iana","compressible":true},"application/vnd.llamagraphics.life-balance.desktop":{"source":"iana","extensions":["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{"source":"iana","compressible":true,"extensions":["lbe"]},"application/vnd.logipipe.circuit+zip":{"source":"iana","compressible":false},"application/vnd.loom":{"source":"iana"},"application/vnd.lotus-1-2-3":{"source":"iana","extensions":["123"]},"application/vnd.lotus-approach":{"source":"iana","extensions":["apr"]},"application/vnd.lotus-freelance":{"source":"iana","extensions":["pre"]},"application/vnd.lotus-notes":{"source":"iana","extensions":["nsf"]},"application/vnd.lotus-organizer":{"source":"iana","extensions":["org"]},"application/vnd.lotus-screencam":{"source":"iana","extensions":["scm"]},"application/vnd.lotus-wordpro":{"source":"iana","extensions":["lwp"]},"application/vnd.macports.portpkg":{"source":"iana","extensions":["portpkg"]},"application/vnd.mapbox-vector-tile":{"source":"iana","extensions":["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.conftoken+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.license+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.mdcf":{"source":"iana"},"application/vnd.mason+json":{"source":"iana","compressible":true},"application/vnd.maxar.archive.3tz+zip":{"source":"iana","compressible":false},"application/vnd.maxmind.maxmind-db":{"source":"iana"},"application/vnd.mcd":{"source":"iana","extensions":["mcd"]},"application/vnd.medcalcdata":{"source":"iana","extensions":["mc1"]},"application/vnd.mediastation.cdkey":{"source":"iana","extensions":["cdkey"]},"application/vnd.meridian-slingshot":{"source":"iana"},"application/vnd.mfer":{"source":"iana","extensions":["mwf"]},"application/vnd.mfmp":{"source":"iana","extensions":["mfm"]},"application/vnd.micro+json":{"source":"iana","compressible":true},"application/vnd.micrografx.flo":{"source":"iana","extensions":["flo"]},"application/vnd.micrografx.igx":{"source":"iana","extensions":["igx"]},"application/vnd.microsoft.portable-executable":{"source":"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{"source":"iana"},"application/vnd.miele+json":{"source":"iana","compressible":true},"application/vnd.mif":{"source":"iana","extensions":["mif"]},"application/vnd.minisoft-hp3000-save":{"source":"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{"source":"iana"},"application/vnd.mobius.daf":{"source":"iana","extensions":["daf"]},"application/vnd.mobius.dis":{"source":"iana","extensions":["dis"]},"application/vnd.mobius.mbk":{"source":"iana","extensions":["mbk"]},"application/vnd.mobius.mqy":{"source":"iana","extensions":["mqy"]},"application/vnd.mobius.msl":{"source":"iana","extensions":["msl"]},"application/vnd.mobius.plc":{"source":"iana","extensions":["plc"]},"application/vnd.mobius.txf":{"source":"iana","extensions":["txf"]},"application/vnd.mophun.application":{"source":"iana","extensions":["mpn"]},"application/vnd.mophun.certificate":{"source":"iana","extensions":["mpc"]},"application/vnd.motorola.flexsuite":{"source":"iana"},"application/vnd.motorola.flexsuite.adsi":{"source":"iana"},"application/vnd.motorola.flexsuite.fis":{"source":"iana"},"application/vnd.motorola.flexsuite.gotap":{"source":"iana"},"application/vnd.motorola.flexsuite.kmr":{"source":"iana"},"application/vnd.motorola.flexsuite.ttc":{"source":"iana"},"application/vnd.motorola.flexsuite.wem":{"source":"iana"},"application/vnd.motorola.iprm":{"source":"iana"},"application/vnd.mozilla.xul+xml":{"source":"iana","compressible":true,"extensions":["xul"]},"application/vnd.ms-3mfdocument":{"source":"iana"},"application/vnd.ms-artgalry":{"source":"iana","extensions":["cil"]},"application/vnd.ms-asf":{"source":"iana"},"application/vnd.ms-cab-compressed":{"source":"iana","extensions":["cab"]},"application/vnd.ms-color.iccprofile":{"source":"apache"},"application/vnd.ms-excel":{"source":"iana","compressible":false,"extensions":["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{"source":"iana","extensions":["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{"source":"iana","extensions":["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{"source":"iana","extensions":["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{"source":"iana","extensions":["xltm"]},"application/vnd.ms-fontobject":{"source":"iana","compressible":true,"extensions":["eot"]},"application/vnd.ms-htmlhelp":{"source":"iana","extensions":["chm"]},"application/vnd.ms-ims":{"source":"iana","extensions":["ims"]},"application/vnd.ms-lrm":{"source":"iana","extensions":["lrm"]},"application/vnd.ms-office.activex+xml":{"source":"iana","compressible":true},"application/vnd.ms-officetheme":{"source":"iana","extensions":["thmx"]},"application/vnd.ms-opentype":{"source":"apache","compressible":true},"application/vnd.ms-outlook":{"compressible":false,"extensions":["msg"]},"application/vnd.ms-package.obfuscated-opentype":{"source":"apache"},"application/vnd.ms-pki.seccat":{"source":"apache","extensions":["cat"]},"application/vnd.ms-pki.stl":{"source":"apache","extensions":["stl"]},"application/vnd.ms-playready.initiator+xml":{"source":"iana","compressible":true},"application/vnd.ms-powerpoint":{"source":"iana","compressible":false,"extensions":["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{"source":"iana","extensions":["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{"source":"iana","extensions":["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{"source":"iana","extensions":["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{"source":"iana","extensions":["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{"source":"iana","extensions":["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{"source":"iana","compressible":true},"application/vnd.ms-printing.printticket+xml":{"source":"apache","compressible":true},"application/vnd.ms-printschematicket+xml":{"source":"iana","compressible":true},"application/vnd.ms-project":{"source":"iana","extensions":["mpp","mpt"]},"application/vnd.ms-tnef":{"source":"iana"},"application/vnd.ms-windows.devicepairing":{"source":"iana"},"application/vnd.ms-windows.nwprinting.oob":{"source":"iana"},"application/vnd.ms-windows.printerpairing":{"source":"iana"},"application/vnd.ms-windows.wsd.oob":{"source":"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{"source":"iana"},"application/vnd.ms-wmdrm.lic-resp":{"source":"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{"source":"iana"},"application/vnd.ms-wmdrm.meter-resp":{"source":"iana"},"application/vnd.ms-word.document.macroenabled.12":{"source":"iana","extensions":["docm"]},"application/vnd.ms-word.template.macroenabled.12":{"source":"iana","extensions":["dotm"]},"application/vnd.ms-works":{"source":"iana","extensions":["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{"source":"iana","extensions":["wpl"]},"application/vnd.ms-xpsdocument":{"source":"iana","compressible":false,"extensions":["xps"]},"application/vnd.msa-disk-image":{"source":"iana"},"application/vnd.mseq":{"source":"iana","extensions":["mseq"]},"application/vnd.msign":{"source":"iana"},"application/vnd.multiad.creator":{"source":"iana"},"application/vnd.multiad.creator.cif":{"source":"iana"},"application/vnd.music-niff":{"source":"iana"},"application/vnd.musician":{"source":"iana","extensions":["mus"]},"application/vnd.muvee.style":{"source":"iana","extensions":["msty"]},"application/vnd.mynfc":{"source":"iana","extensions":["taglet"]},"application/vnd.nacamar.ybrid+json":{"source":"iana","compressible":true},"application/vnd.ncd.control":{"source":"iana"},"application/vnd.ncd.reference":{"source":"iana"},"application/vnd.nearst.inv+json":{"source":"iana","compressible":true},"application/vnd.nebumind.line":{"source":"iana"},"application/vnd.nervana":{"source":"iana"},"application/vnd.netfpx":{"source":"iana"},"application/vnd.neurolanguage.nlu":{"source":"iana","extensions":["nlu"]},"application/vnd.nimn":{"source":"iana"},"application/vnd.nintendo.nitro.rom":{"source":"iana"},"application/vnd.nintendo.snes.rom":{"source":"iana"},"application/vnd.nitf":{"source":"iana","extensions":["ntf","nitf"]},"application/vnd.noblenet-directory":{"source":"iana","extensions":["nnd"]},"application/vnd.noblenet-sealer":{"source":"iana","extensions":["nns"]},"application/vnd.noblenet-web":{"source":"iana","extensions":["nnw"]},"application/vnd.nokia.catalogs":{"source":"iana"},"application/vnd.nokia.conml+wbxml":{"source":"iana"},"application/vnd.nokia.conml+xml":{"source":"iana","compressible":true},"application/vnd.nokia.iptv.config+xml":{"source":"iana","compressible":true},"application/vnd.nokia.isds-radio-presets":{"source":"iana"},"application/vnd.nokia.landmark+wbxml":{"source":"iana"},"application/vnd.nokia.landmark+xml":{"source":"iana","compressible":true},"application/vnd.nokia.landmarkcollection+xml":{"source":"iana","compressible":true},"application/vnd.nokia.n-gage.ac+xml":{"source":"iana","compressible":true,"extensions":["ac"]},"application/vnd.nokia.n-gage.data":{"source":"iana","extensions":["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{"source":"iana","extensions":["n-gage"]},"application/vnd.nokia.ncd":{"source":"iana"},"application/vnd.nokia.pcd+wbxml":{"source":"iana"},"application/vnd.nokia.pcd+xml":{"source":"iana","compressible":true},"application/vnd.nokia.radio-preset":{"source":"iana","extensions":["rpst"]},"application/vnd.nokia.radio-presets":{"source":"iana","extensions":["rpss"]},"application/vnd.novadigm.edm":{"source":"iana","extensions":["edm"]},"application/vnd.novadigm.edx":{"source":"iana","extensions":["edx"]},"application/vnd.novadigm.ext":{"source":"iana","extensions":["ext"]},"application/vnd.ntt-local.content-share":{"source":"iana"},"application/vnd.ntt-local.file-transfer":{"source":"iana"},"application/vnd.ntt-local.ogw_remote-access":{"source":"iana"},"application/vnd.ntt-local.sip-ta_remote":{"source":"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{"source":"iana"},"application/vnd.oasis.opendocument.chart":{"source":"iana","extensions":["odc"]},"application/vnd.oasis.opendocument.chart-template":{"source":"iana","extensions":["otc"]},"application/vnd.oasis.opendocument.database":{"source":"iana","extensions":["odb"]},"application/vnd.oasis.opendocument.formula":{"source":"iana","extensions":["odf"]},"application/vnd.oasis.opendocument.formula-template":{"source":"iana","extensions":["odft"]},"application/vnd.oasis.opendocument.graphics":{"source":"iana","compressible":false,"extensions":["odg"]},"application/vnd.oasis.opendocument.graphics-template":{"source":"iana","extensions":["otg"]},"application/vnd.oasis.opendocument.image":{"source":"iana","extensions":["odi"]},"application/vnd.oasis.opendocument.image-template":{"source":"iana","extensions":["oti"]},"application/vnd.oasis.opendocument.presentation":{"source":"iana","compressible":false,"extensions":["odp"]},"application/vnd.oasis.opendocument.presentation-template":{"source":"iana","extensions":["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{"source":"iana","compressible":false,"extensions":["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{"source":"iana","extensions":["ots"]},"application/vnd.oasis.opendocument.text":{"source":"iana","compressible":false,"extensions":["odt"]},"application/vnd.oasis.opendocument.text-master":{"source":"iana","extensions":["odm"]},"application/vnd.oasis.opendocument.text-template":{"source":"iana","extensions":["ott"]},"application/vnd.oasis.opendocument.text-web":{"source":"iana","extensions":["oth"]},"application/vnd.obn":{"source":"iana"},"application/vnd.ocf+cbor":{"source":"iana"},"application/vnd.oci.image.manifest.v1+json":{"source":"iana","compressible":true},"application/vnd.oftn.l10n+json":{"source":"iana","compressible":true},"application/vnd.oipf.contentaccessdownload+xml":{"source":"iana","compressible":true},"application/vnd.oipf.contentaccessstreaming+xml":{"source":"iana","compressible":true},"application/vnd.oipf.cspg-hexbinary":{"source":"iana"},"application/vnd.oipf.dae.svg+xml":{"source":"iana","compressible":true},"application/vnd.oipf.dae.xhtml+xml":{"source":"iana","compressible":true},"application/vnd.oipf.mippvcontrolmessage+xml":{"source":"iana","compressible":true},"application/vnd.oipf.pae.gem":{"source":"iana"},"application/vnd.oipf.spdiscovery+xml":{"source":"iana","compressible":true},"application/vnd.oipf.spdlist+xml":{"source":"iana","compressible":true},"application/vnd.oipf.ueprofile+xml":{"source":"iana","compressible":true},"application/vnd.oipf.userprofile+xml":{"source":"iana","compressible":true},"application/vnd.olpc-sugar":{"source":"iana","extensions":["xo"]},"application/vnd.oma-scws-config":{"source":"iana"},"application/vnd.oma-scws-http-request":{"source":"iana"},"application/vnd.oma-scws-http-response":{"source":"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.drm-trigger+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.imd+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.ltkm":{"source":"iana"},"application/vnd.oma.bcast.notification+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.provisioningtrigger":{"source":"iana"},"application/vnd.oma.bcast.sgboot":{"source":"iana"},"application/vnd.oma.bcast.sgdd+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.sgdu":{"source":"iana"},"application/vnd.oma.bcast.simple-symbol-container":{"source":"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.sprov+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.stkm":{"source":"iana"},"application/vnd.oma.cab-address-book+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-feature-handler+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-pcc+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-subs-invite+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-user-prefs+xml":{"source":"iana","compressible":true},"application/vnd.oma.dcd":{"source":"iana"},"application/vnd.oma.dcdc":{"source":"iana"},"application/vnd.oma.dd2+xml":{"source":"iana","compressible":true,"extensions":["dd2"]},"application/vnd.oma.drm.risd+xml":{"source":"iana","compressible":true},"application/vnd.oma.group-usage-list+xml":{"source":"iana","compressible":true},"application/vnd.oma.lwm2m+cbor":{"source":"iana"},"application/vnd.oma.lwm2m+json":{"source":"iana","compressible":true},"application/vnd.oma.lwm2m+tlv":{"source":"iana"},"application/vnd.oma.pal+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.detailed-progress-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.final-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.groups+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.invocation-descriptor+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.optimized-progress-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.push":{"source":"iana"},"application/vnd.oma.scidm.messages+xml":{"source":"iana","compressible":true},"application/vnd.oma.xcap-directory+xml":{"source":"iana","compressible":true},"application/vnd.omads-email+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.omads-file+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.omads-folder+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.omaloc-supl-init":{"source":"iana"},"application/vnd.onepager":{"source":"iana"},"application/vnd.onepagertamp":{"source":"iana"},"application/vnd.onepagertamx":{"source":"iana"},"application/vnd.onepagertat":{"source":"iana"},"application/vnd.onepagertatp":{"source":"iana"},"application/vnd.onepagertatx":{"source":"iana"},"application/vnd.openblox.game+xml":{"source":"iana","compressible":true,"extensions":["obgx"]},"application/vnd.openblox.game-binary":{"source":"iana"},"application/vnd.openeye.oeb":{"source":"iana"},"application/vnd.openofficeorg.extension":{"source":"apache","extensions":["oxt"]},"application/vnd.openstreetmap.data+xml":{"source":"iana","compressible":true,"extensions":["osm"]},"application/vnd.opentimestamps.ots":{"source":"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawing+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{"source":"iana","compressible":false,"extensions":["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slide":{"source":"iana","extensions":["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{"source":"iana","extensions":["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.template":{"source":"iana","extensions":["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"source":"iana","compressible":false,"extensions":["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{"source":"iana","extensions":["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.theme+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.vmldrawing":{"source":"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{"source":"iana","compressible":false,"extensions":["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{"source":"iana","extensions":["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.core-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.relationships+xml":{"source":"iana","compressible":true},"application/vnd.oracle.resource+json":{"source":"iana","compressible":true},"application/vnd.orange.indata":{"source":"iana"},"application/vnd.osa.netdeploy":{"source":"iana"},"application/vnd.osgeo.mapguide.package":{"source":"iana","extensions":["mgp"]},"application/vnd.osgi.bundle":{"source":"iana"},"application/vnd.osgi.dp":{"source":"iana","extensions":["dp"]},"application/vnd.osgi.subsystem":{"source":"iana","extensions":["esa"]},"application/vnd.otps.ct-kip+xml":{"source":"iana","compressible":true},"application/vnd.oxli.countgraph":{"source":"iana"},"application/vnd.pagerduty+json":{"source":"iana","compressible":true},"application/vnd.palm":{"source":"iana","extensions":["pdb","pqa","oprc"]},"application/vnd.panoply":{"source":"iana"},"application/vnd.paos.xml":{"source":"iana"},"application/vnd.patentdive":{"source":"iana"},"application/vnd.patientecommsdoc":{"source":"iana"},"application/vnd.pawaafile":{"source":"iana","extensions":["paw"]},"application/vnd.pcos":{"source":"iana"},"application/vnd.pg.format":{"source":"iana","extensions":["str"]},"application/vnd.pg.osasli":{"source":"iana","extensions":["ei6"]},"application/vnd.piaccess.application-licence":{"source":"iana"},"application/vnd.picsel":{"source":"iana","extensions":["efif"]},"application/vnd.pmi.widget":{"source":"iana","extensions":["wg"]},"application/vnd.poc.group-advertisement+xml":{"source":"iana","compressible":true},"application/vnd.pocketlearn":{"source":"iana","extensions":["plf"]},"application/vnd.powerbuilder6":{"source":"iana","extensions":["pbd"]},"application/vnd.powerbuilder6-s":{"source":"iana"},"application/vnd.powerbuilder7":{"source":"iana"},"application/vnd.powerbuilder7-s":{"source":"iana"},"application/vnd.powerbuilder75":{"source":"iana"},"application/vnd.powerbuilder75-s":{"source":"iana"},"application/vnd.preminet":{"source":"iana"},"application/vnd.previewsystems.box":{"source":"iana","extensions":["box"]},"application/vnd.proteus.magazine":{"source":"iana","extensions":["mgz"]},"application/vnd.psfs":{"source":"iana"},"application/vnd.publishare-delta-tree":{"source":"iana","extensions":["qps"]},"application/vnd.pvi.ptid1":{"source":"iana","extensions":["ptid"]},"application/vnd.pwg-multiplexed":{"source":"iana"},"application/vnd.pwg-xhtml-print+xml":{"source":"iana","compressible":true},"application/vnd.qualcomm.brew-app-res":{"source":"iana"},"application/vnd.quarantainenet":{"source":"iana"},"application/vnd.quark.quarkxpress":{"source":"iana","extensions":["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{"source":"iana"},"application/vnd.radisys.moml+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-conf+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-conn+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-dialog+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-stream+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-conf+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-base+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-fax-detect+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-group+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-speech+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-transform+xml":{"source":"iana","compressible":true},"application/vnd.rainstor.data":{"source":"iana"},"application/vnd.rapid":{"source":"iana"},"application/vnd.rar":{"source":"iana","extensions":["rar"]},"application/vnd.realvnc.bed":{"source":"iana","extensions":["bed"]},"application/vnd.recordare.musicxml":{"source":"iana","extensions":["mxl"]},"application/vnd.recordare.musicxml+xml":{"source":"iana","compressible":true,"extensions":["musicxml"]},"application/vnd.renlearn.rlprint":{"source":"iana"},"application/vnd.resilient.logic":{"source":"iana"},"application/vnd.restful+json":{"source":"iana","compressible":true},"application/vnd.rig.cryptonote":{"source":"iana","extensions":["cryptonote"]},"application/vnd.rim.cod":{"source":"apache","extensions":["cod"]},"application/vnd.rn-realmedia":{"source":"apache","extensions":["rm"]},"application/vnd.rn-realmedia-vbr":{"source":"apache","extensions":["rmvb"]},"application/vnd.route66.link66+xml":{"source":"iana","compressible":true,"extensions":["link66"]},"application/vnd.rs-274x":{"source":"iana"},"application/vnd.ruckus.download":{"source":"iana"},"application/vnd.s3sms":{"source":"iana"},"application/vnd.sailingtracker.track":{"source":"iana","extensions":["st"]},"application/vnd.sar":{"source":"iana"},"application/vnd.sbm.cid":{"source":"iana"},"application/vnd.sbm.mid2":{"source":"iana"},"application/vnd.scribus":{"source":"iana"},"application/vnd.sealed.3df":{"source":"iana"},"application/vnd.sealed.csf":{"source":"iana"},"application/vnd.sealed.doc":{"source":"iana"},"application/vnd.sealed.eml":{"source":"iana"},"application/vnd.sealed.mht":{"source":"iana"},"application/vnd.sealed.net":{"source":"iana"},"application/vnd.sealed.ppt":{"source":"iana"},"application/vnd.sealed.tiff":{"source":"iana"},"application/vnd.sealed.xls":{"source":"iana"},"application/vnd.sealedmedia.softseal.html":{"source":"iana"},"application/vnd.sealedmedia.softseal.pdf":{"source":"iana"},"application/vnd.seemail":{"source":"iana","extensions":["see"]},"application/vnd.seis+json":{"source":"iana","compressible":true},"application/vnd.sema":{"source":"iana","extensions":["sema"]},"application/vnd.semd":{"source":"iana","extensions":["semd"]},"application/vnd.semf":{"source":"iana","extensions":["semf"]},"application/vnd.shade-save-file":{"source":"iana"},"application/vnd.shana.informed.formdata":{"source":"iana","extensions":["ifm"]},"application/vnd.shana.informed.formtemplate":{"source":"iana","extensions":["itp"]},"application/vnd.shana.informed.interchange":{"source":"iana","extensions":["iif"]},"application/vnd.shana.informed.package":{"source":"iana","extensions":["ipk"]},"application/vnd.shootproof+json":{"source":"iana","compressible":true},"application/vnd.shopkick+json":{"source":"iana","compressible":true},"application/vnd.shp":{"source":"iana"},"application/vnd.shx":{"source":"iana"},"application/vnd.sigrok.session":{"source":"iana"},"application/vnd.simtech-mindmapper":{"source":"iana","extensions":["twd","twds"]},"application/vnd.siren+json":{"source":"iana","compressible":true},"application/vnd.smaf":{"source":"iana","extensions":["mmf"]},"application/vnd.smart.notebook":{"source":"iana"},"application/vnd.smart.teacher":{"source":"iana","extensions":["teacher"]},"application/vnd.snesdev-page-table":{"source":"iana"},"application/vnd.software602.filler.form+xml":{"source":"iana","compressible":true,"extensions":["fo"]},"application/vnd.software602.filler.form-xml-zip":{"source":"iana"},"application/vnd.solent.sdkm+xml":{"source":"iana","compressible":true,"extensions":["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{"source":"iana","extensions":["dxp"]},"application/vnd.spotfire.sfs":{"source":"iana","extensions":["sfs"]},"application/vnd.sqlite3":{"source":"iana"},"application/vnd.sss-cod":{"source":"iana"},"application/vnd.sss-dtf":{"source":"iana"},"application/vnd.sss-ntf":{"source":"iana"},"application/vnd.stardivision.calc":{"source":"apache","extensions":["sdc"]},"application/vnd.stardivision.draw":{"source":"apache","extensions":["sda"]},"application/vnd.stardivision.impress":{"source":"apache","extensions":["sdd"]},"application/vnd.stardivision.math":{"source":"apache","extensions":["smf"]},"application/vnd.stardivision.writer":{"source":"apache","extensions":["sdw","vor"]},"application/vnd.stardivision.writer-global":{"source":"apache","extensions":["sgl"]},"application/vnd.stepmania.package":{"source":"iana","extensions":["smzip"]},"application/vnd.stepmania.stepchart":{"source":"iana","extensions":["sm"]},"application/vnd.street-stream":{"source":"iana"},"application/vnd.sun.wadl+xml":{"source":"iana","compressible":true,"extensions":["wadl"]},"application/vnd.sun.xml.calc":{"source":"apache","extensions":["sxc"]},"application/vnd.sun.xml.calc.template":{"source":"apache","extensions":["stc"]},"application/vnd.sun.xml.draw":{"source":"apache","extensions":["sxd"]},"application/vnd.sun.xml.draw.template":{"source":"apache","extensions":["std"]},"application/vnd.sun.xml.impress":{"source":"apache","extensions":["sxi"]},"application/vnd.sun.xml.impress.template":{"source":"apache","extensions":["sti"]},"application/vnd.sun.xml.math":{"source":"apache","extensions":["sxm"]},"application/vnd.sun.xml.writer":{"source":"apache","extensions":["sxw"]},"application/vnd.sun.xml.writer.global":{"source":"apache","extensions":["sxg"]},"application/vnd.sun.xml.writer.template":{"source":"apache","extensions":["stw"]},"application/vnd.sus-calendar":{"source":"iana","extensions":["sus","susp"]},"application/vnd.svd":{"source":"iana","extensions":["svd"]},"application/vnd.swiftview-ics":{"source":"iana"},"application/vnd.sycle+xml":{"source":"iana","compressible":true},"application/vnd.syft+json":{"source":"iana","compressible":true},"application/vnd.symbian.install":{"source":"apache","extensions":["sis","sisx"]},"application/vnd.syncml+xml":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["xsm"]},"application/vnd.syncml.dm+wbxml":{"source":"iana","charset":"UTF-8","extensions":["bdm"]},"application/vnd.syncml.dm+xml":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["xdm"]},"application/vnd.syncml.dm.notification":{"source":"iana"},"application/vnd.syncml.dmddf+wbxml":{"source":"iana"},"application/vnd.syncml.dmddf+xml":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{"source":"iana"},"application/vnd.syncml.dmtnds+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.syncml.ds.notification":{"source":"iana"},"application/vnd.tableschema+json":{"source":"iana","compressible":true},"application/vnd.tao.intent-module-archive":{"source":"iana","extensions":["tao"]},"application/vnd.tcpdump.pcap":{"source":"iana","extensions":["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{"source":"iana","compressible":true},"application/vnd.tmd.mediaflex.api+xml":{"source":"iana","compressible":true},"application/vnd.tml":{"source":"iana"},"application/vnd.tmobile-livetv":{"source":"iana","extensions":["tmo"]},"application/vnd.tri.onesource":{"source":"iana"},"application/vnd.trid.tpt":{"source":"iana","extensions":["tpt"]},"application/vnd.triscape.mxs":{"source":"iana","extensions":["mxs"]},"application/vnd.trueapp":{"source":"iana","extensions":["tra"]},"application/vnd.truedoc":{"source":"iana"},"application/vnd.ubisoft.webplayer":{"source":"iana"},"application/vnd.ufdl":{"source":"iana","extensions":["ufd","ufdl"]},"application/vnd.uiq.theme":{"source":"iana","extensions":["utz"]},"application/vnd.umajin":{"source":"iana","extensions":["umj"]},"application/vnd.unity":{"source":"iana","extensions":["unityweb"]},"application/vnd.uoml+xml":{"source":"iana","compressible":true,"extensions":["uoml"]},"application/vnd.uplanet.alert":{"source":"iana"},"application/vnd.uplanet.alert-wbxml":{"source":"iana"},"application/vnd.uplanet.bearer-choice":{"source":"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{"source":"iana"},"application/vnd.uplanet.cacheop":{"source":"iana"},"application/vnd.uplanet.cacheop-wbxml":{"source":"iana"},"application/vnd.uplanet.channel":{"source":"iana"},"application/vnd.uplanet.channel-wbxml":{"source":"iana"},"application/vnd.uplanet.list":{"source":"iana"},"application/vnd.uplanet.list-wbxml":{"source":"iana"},"application/vnd.uplanet.listcmd":{"source":"iana"},"application/vnd.uplanet.listcmd-wbxml":{"source":"iana"},"application/vnd.uplanet.signal":{"source":"iana"},"application/vnd.uri-map":{"source":"iana"},"application/vnd.valve.source.material":{"source":"iana"},"application/vnd.vcx":{"source":"iana","extensions":["vcx"]},"application/vnd.vd-study":{"source":"iana"},"application/vnd.vectorworks":{"source":"iana"},"application/vnd.vel+json":{"source":"iana","compressible":true},"application/vnd.verimatrix.vcas":{"source":"iana"},"application/vnd.veritone.aion+json":{"source":"iana","compressible":true},"application/vnd.veryant.thin":{"source":"iana"},"application/vnd.ves.encrypted":{"source":"iana"},"application/vnd.vidsoft.vidconference":{"source":"iana"},"application/vnd.visio":{"source":"iana","extensions":["vsd","vst","vss","vsw"]},"application/vnd.visionary":{"source":"iana","extensions":["vis"]},"application/vnd.vividence.scriptfile":{"source":"iana"},"application/vnd.vsf":{"source":"iana","extensions":["vsf"]},"application/vnd.wap.sic":{"source":"iana"},"application/vnd.wap.slc":{"source":"iana"},"application/vnd.wap.wbxml":{"source":"iana","charset":"UTF-8","extensions":["wbxml"]},"application/vnd.wap.wmlc":{"source":"iana","extensions":["wmlc"]},"application/vnd.wap.wmlscriptc":{"source":"iana","extensions":["wmlsc"]},"application/vnd.webturbo":{"source":"iana","extensions":["wtb"]},"application/vnd.wfa.dpp":{"source":"iana"},"application/vnd.wfa.p2p":{"source":"iana"},"application/vnd.wfa.wsc":{"source":"iana"},"application/vnd.windows.devicepairing":{"source":"iana"},"application/vnd.wmc":{"source":"iana"},"application/vnd.wmf.bootstrap":{"source":"iana"},"application/vnd.wolfram.mathematica":{"source":"iana"},"application/vnd.wolfram.mathematica.package":{"source":"iana"},"application/vnd.wolfram.player":{"source":"iana","extensions":["nbp"]},"application/vnd.wordperfect":{"source":"iana","extensions":["wpd"]},"application/vnd.wqd":{"source":"iana","extensions":["wqd"]},"application/vnd.wrq-hp3000-labelled":{"source":"iana"},"application/vnd.wt.stf":{"source":"iana","extensions":["stf"]},"application/vnd.wv.csp+wbxml":{"source":"iana"},"application/vnd.wv.csp+xml":{"source":"iana","compressible":true},"application/vnd.wv.ssp+xml":{"source":"iana","compressible":true},"application/vnd.xacml+json":{"source":"iana","compressible":true},"application/vnd.xara":{"source":"iana","extensions":["xar"]},"application/vnd.xfdl":{"source":"iana","extensions":["xfdl"]},"application/vnd.xfdl.webform":{"source":"iana"},"application/vnd.xmi+xml":{"source":"iana","compressible":true},"application/vnd.xmpie.cpkg":{"source":"iana"},"application/vnd.xmpie.dpkg":{"source":"iana"},"application/vnd.xmpie.plan":{"source":"iana"},"application/vnd.xmpie.ppkg":{"source":"iana"},"application/vnd.xmpie.xlim":{"source":"iana"},"application/vnd.yamaha.hv-dic":{"source":"iana","extensions":["hvd"]},"application/vnd.yamaha.hv-script":{"source":"iana","extensions":["hvs"]},"application/vnd.yamaha.hv-voice":{"source":"iana","extensions":["hvp"]},"application/vnd.yamaha.openscoreformat":{"source":"iana","extensions":["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{"source":"iana","compressible":true,"extensions":["osfpvg"]},"application/vnd.yamaha.remote-setup":{"source":"iana"},"application/vnd.yamaha.smaf-audio":{"source":"iana","extensions":["saf"]},"application/vnd.yamaha.smaf-phrase":{"source":"iana","extensions":["spf"]},"application/vnd.yamaha.through-ngn":{"source":"iana"},"application/vnd.yamaha.tunnel-udpencap":{"source":"iana"},"application/vnd.yaoweme":{"source":"iana"},"application/vnd.yellowriver-custom-menu":{"source":"iana","extensions":["cmp"]},"application/vnd.youtube.yt":{"source":"iana"},"application/vnd.zul":{"source":"iana","extensions":["zir","zirz"]},"application/vnd.zzazz.deck+xml":{"source":"iana","compressible":true,"extensions":["zaz"]},"application/voicexml+xml":{"source":"iana","compressible":true,"extensions":["vxml"]},"application/voucher-cms+json":{"source":"iana","compressible":true},"application/vq-rtcpxr":{"source":"iana"},"application/wasm":{"source":"iana","compressible":true,"extensions":["wasm"]},"application/watcherinfo+xml":{"source":"iana","compressible":true,"extensions":["wif"]},"application/webpush-options+json":{"source":"iana","compressible":true},"application/whoispp-query":{"source":"iana"},"application/whoispp-response":{"source":"iana"},"application/widget":{"source":"iana","extensions":["wgt"]},"application/winhlp":{"source":"apache","extensions":["hlp"]},"application/wita":{"source":"iana"},"application/wordperfect5.1":{"source":"iana"},"application/wsdl+xml":{"source":"iana","compressible":true,"extensions":["wsdl"]},"application/wspolicy+xml":{"source":"iana","compressible":true,"extensions":["wspolicy"]},"application/x-7z-compressed":{"source":"apache","compressible":false,"extensions":["7z"]},"application/x-abiword":{"source":"apache","extensions":["abw"]},"application/x-ace-compressed":{"source":"apache","extensions":["ace"]},"application/x-amf":{"source":"apache"},"application/x-apple-diskimage":{"source":"apache","extensions":["dmg"]},"application/x-arj":{"compressible":false,"extensions":["arj"]},"application/x-authorware-bin":{"source":"apache","extensions":["aab","x32","u32","vox"]},"application/x-authorware-map":{"source":"apache","extensions":["aam"]},"application/x-authorware-seg":{"source":"apache","extensions":["aas"]},"application/x-bcpio":{"source":"apache","extensions":["bcpio"]},"application/x-bdoc":{"compressible":false,"extensions":["bdoc"]},"application/x-bittorrent":{"source":"apache","extensions":["torrent"]},"application/x-blorb":{"source":"apache","extensions":["blb","blorb"]},"application/x-bzip":{"source":"apache","compressible":false,"extensions":["bz"]},"application/x-bzip2":{"source":"apache","compressible":false,"extensions":["bz2","boz"]},"application/x-cbr":{"source":"apache","extensions":["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{"source":"apache","extensions":["vcd"]},"application/x-cfs-compressed":{"source":"apache","extensions":["cfs"]},"application/x-chat":{"source":"apache","extensions":["chat"]},"application/x-chess-pgn":{"source":"apache","extensions":["pgn"]},"application/x-chrome-extension":{"extensions":["crx"]},"application/x-cocoa":{"source":"nginx","extensions":["cco"]},"application/x-compress":{"source":"apache"},"application/x-conference":{"source":"apache","extensions":["nsc"]},"application/x-cpio":{"source":"apache","extensions":["cpio"]},"application/x-csh":{"source":"apache","extensions":["csh"]},"application/x-deb":{"compressible":false},"application/x-debian-package":{"source":"apache","extensions":["deb","udeb"]},"application/x-dgc-compressed":{"source":"apache","extensions":["dgc"]},"application/x-director":{"source":"apache","extensions":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{"source":"apache","extensions":["wad"]},"application/x-dtbncx+xml":{"source":"apache","compressible":true,"extensions":["ncx"]},"application/x-dtbook+xml":{"source":"apache","compressible":true,"extensions":["dtb"]},"application/x-dtbresource+xml":{"source":"apache","compressible":true,"extensions":["res"]},"application/x-dvi":{"source":"apache","compressible":false,"extensions":["dvi"]},"application/x-envoy":{"source":"apache","extensions":["evy"]},"application/x-eva":{"source":"apache","extensions":["eva"]},"application/x-font-bdf":{"source":"apache","extensions":["bdf"]},"application/x-font-dos":{"source":"apache"},"application/x-font-framemaker":{"source":"apache"},"application/x-font-ghostscript":{"source":"apache","extensions":["gsf"]},"application/x-font-libgrx":{"source":"apache"},"application/x-font-linux-psf":{"source":"apache","extensions":["psf"]},"application/x-font-pcf":{"source":"apache","extensions":["pcf"]},"application/x-font-snf":{"source":"apache","extensions":["snf"]},"application/x-font-speedo":{"source":"apache"},"application/x-font-sunos-news":{"source":"apache"},"application/x-font-type1":{"source":"apache","extensions":["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{"source":"apache"},"application/x-freearc":{"source":"apache","extensions":["arc"]},"application/x-futuresplash":{"source":"apache","extensions":["spl"]},"application/x-gca-compressed":{"source":"apache","extensions":["gca"]},"application/x-glulx":{"source":"apache","extensions":["ulx"]},"application/x-gnumeric":{"source":"apache","extensions":["gnumeric"]},"application/x-gramps-xml":{"source":"apache","extensions":["gramps"]},"application/x-gtar":{"source":"apache","extensions":["gtar"]},"application/x-gzip":{"source":"apache"},"application/x-hdf":{"source":"apache","extensions":["hdf"]},"application/x-httpd-php":{"compressible":true,"extensions":["php"]},"application/x-install-instructions":{"source":"apache","extensions":["install"]},"application/x-iso9660-image":{"source":"apache","extensions":["iso"]},"application/x-iwork-keynote-sffkey":{"extensions":["key"]},"application/x-iwork-numbers-sffnumbers":{"extensions":["numbers"]},"application/x-iwork-pages-sffpages":{"extensions":["pages"]},"application/x-java-archive-diff":{"source":"nginx","extensions":["jardiff"]},"application/x-java-jnlp-file":{"source":"apache","compressible":false,"extensions":["jnlp"]},"application/x-javascript":{"compressible":true},"application/x-keepass2":{"extensions":["kdbx"]},"application/x-latex":{"source":"apache","compressible":false,"extensions":["latex"]},"application/x-lua-bytecode":{"extensions":["luac"]},"application/x-lzh-compressed":{"source":"apache","extensions":["lzh","lha"]},"application/x-makeself":{"source":"nginx","extensions":["run"]},"application/x-mie":{"source":"apache","extensions":["mie"]},"application/x-mobipocket-ebook":{"source":"apache","extensions":["prc","mobi"]},"application/x-mpegurl":{"compressible":false},"application/x-ms-application":{"source":"apache","extensions":["application"]},"application/x-ms-shortcut":{"source":"apache","extensions":["lnk"]},"application/x-ms-wmd":{"source":"apache","extensions":["wmd"]},"application/x-ms-wmz":{"source":"apache","extensions":["wmz"]},"application/x-ms-xbap":{"source":"apache","extensions":["xbap"]},"application/x-msaccess":{"source":"apache","extensions":["mdb"]},"application/x-msbinder":{"source":"apache","extensions":["obd"]},"application/x-mscardfile":{"source":"apache","extensions":["crd"]},"application/x-msclip":{"source":"apache","extensions":["clp"]},"application/x-msdos-program":{"extensions":["exe"]},"application/x-msdownload":{"source":"apache","extensions":["exe","dll","com","bat","msi"]},"application/x-msmediaview":{"source":"apache","extensions":["mvb","m13","m14"]},"application/x-msmetafile":{"source":"apache","extensions":["wmf","wmz","emf","emz"]},"application/x-msmoney":{"source":"apache","extensions":["mny"]},"application/x-mspublisher":{"source":"apache","extensions":["pub"]},"application/x-msschedule":{"source":"apache","extensions":["scd"]},"application/x-msterminal":{"source":"apache","extensions":["trm"]},"application/x-mswrite":{"source":"apache","extensions":["wri"]},"application/x-netcdf":{"source":"apache","extensions":["nc","cdf"]},"application/x-ns-proxy-autoconfig":{"compressible":true,"extensions":["pac"]},"application/x-nzb":{"source":"apache","extensions":["nzb"]},"application/x-perl":{"source":"nginx","extensions":["pl","pm"]},"application/x-pilot":{"source":"nginx","extensions":["prc","pdb"]},"application/x-pkcs12":{"source":"apache","compressible":false,"extensions":["p12","pfx"]},"application/x-pkcs7-certificates":{"source":"apache","extensions":["p7b","spc"]},"application/x-pkcs7-certreqresp":{"source":"apache","extensions":["p7r"]},"application/x-pki-message":{"source":"iana"},"application/x-rar-compressed":{"source":"apache","compressible":false,"extensions":["rar"]},"application/x-redhat-package-manager":{"source":"nginx","extensions":["rpm"]},"application/x-research-info-systems":{"source":"apache","extensions":["ris"]},"application/x-sea":{"source":"nginx","extensions":["sea"]},"application/x-sh":{"source":"apache","compressible":true,"extensions":["sh"]},"application/x-shar":{"source":"apache","extensions":["shar"]},"application/x-shockwave-flash":{"source":"apache","compressible":false,"extensions":["swf"]},"application/x-silverlight-app":{"source":"apache","extensions":["xap"]},"application/x-sql":{"source":"apache","extensions":["sql"]},"application/x-stuffit":{"source":"apache","compressible":false,"extensions":["sit"]},"application/x-stuffitx":{"source":"apache","extensions":["sitx"]},"application/x-subrip":{"source":"apache","extensions":["srt"]},"application/x-sv4cpio":{"source":"apache","extensions":["sv4cpio"]},"application/x-sv4crc":{"source":"apache","extensions":["sv4crc"]},"application/x-t3vm-image":{"source":"apache","extensions":["t3"]},"application/x-tads":{"source":"apache","extensions":["gam"]},"application/x-tar":{"source":"apache","compressible":true,"extensions":["tar"]},"application/x-tcl":{"source":"apache","extensions":["tcl","tk"]},"application/x-tex":{"source":"apache","extensions":["tex"]},"application/x-tex-tfm":{"source":"apache","extensions":["tfm"]},"application/x-texinfo":{"source":"apache","extensions":["texinfo","texi"]},"application/x-tgif":{"source":"apache","extensions":["obj"]},"application/x-ustar":{"source":"apache","extensions":["ustar"]},"application/x-virtualbox-hdd":{"compressible":true,"extensions":["hdd"]},"application/x-virtualbox-ova":{"compressible":true,"extensions":["ova"]},"application/x-virtualbox-ovf":{"compressible":true,"extensions":["ovf"]},"application/x-virtualbox-vbox":{"compressible":true,"extensions":["vbox"]},"application/x-virtualbox-vbox-extpack":{"compressible":false,"extensions":["vbox-extpack"]},"application/x-virtualbox-vdi":{"compressible":true,"extensions":["vdi"]},"application/x-virtualbox-vhd":{"compressible":true,"extensions":["vhd"]},"application/x-virtualbox-vmdk":{"compressible":true,"extensions":["vmdk"]},"application/x-wais-source":{"source":"apache","extensions":["src"]},"application/x-web-app-manifest+json":{"compressible":true,"extensions":["webapp"]},"application/x-www-form-urlencoded":{"source":"iana","compressible":true},"application/x-x509-ca-cert":{"source":"iana","extensions":["der","crt","pem"]},"application/x-x509-ca-ra-cert":{"source":"iana"},"application/x-x509-next-ca-cert":{"source":"iana"},"application/x-xfig":{"source":"apache","extensions":["fig"]},"application/x-xliff+xml":{"source":"apache","compressible":true,"extensions":["xlf"]},"application/x-xpinstall":{"source":"apache","compressible":false,"extensions":["xpi"]},"application/x-xz":{"source":"apache","extensions":["xz"]},"application/x-zmachine":{"source":"apache","extensions":["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{"source":"iana"},"application/xacml+xml":{"source":"iana","compressible":true},"application/xaml+xml":{"source":"apache","compressible":true,"extensions":["xaml"]},"application/xcap-att+xml":{"source":"iana","compressible":true,"extensions":["xav"]},"application/xcap-caps+xml":{"source":"iana","compressible":true,"extensions":["xca"]},"application/xcap-diff+xml":{"source":"iana","compressible":true,"extensions":["xdf"]},"application/xcap-el+xml":{"source":"iana","compressible":true,"extensions":["xel"]},"application/xcap-error+xml":{"source":"iana","compressible":true},"application/xcap-ns+xml":{"source":"iana","compressible":true,"extensions":["xns"]},"application/xcon-conference-info+xml":{"source":"iana","compressible":true},"application/xcon-conference-info-diff+xml":{"source":"iana","compressible":true},"application/xenc+xml":{"source":"iana","compressible":true,"extensions":["xenc"]},"application/xhtml+xml":{"source":"iana","compressible":true,"extensions":["xhtml","xht"]},"application/xhtml-voice+xml":{"source":"apache","compressible":true},"application/xliff+xml":{"source":"iana","compressible":true,"extensions":["xlf"]},"application/xml":{"source":"iana","compressible":true,"extensions":["xml","xsl","xsd","rng"]},"application/xml-dtd":{"source":"iana","compressible":true,"extensions":["dtd"]},"application/xml-external-parsed-entity":{"source":"iana"},"application/xml-patch+xml":{"source":"iana","compressible":true},"application/xmpp+xml":{"source":"iana","compressible":true},"application/xop+xml":{"source":"iana","compressible":true,"extensions":["xop"]},"application/xproc+xml":{"source":"apache","compressible":true,"extensions":["xpl"]},"application/xslt+xml":{"source":"iana","compressible":true,"extensions":["xsl","xslt"]},"application/xspf+xml":{"source":"apache","compressible":true,"extensions":["xspf"]},"application/xv+xml":{"source":"iana","compressible":true,"extensions":["mxml","xhvml","xvml","xvm"]},"application/yang":{"source":"iana","extensions":["yang"]},"application/yang-data+json":{"source":"iana","compressible":true},"application/yang-data+xml":{"source":"iana","compressible":true},"application/yang-patch+json":{"source":"iana","compressible":true},"application/yang-patch+xml":{"source":"iana","compressible":true},"application/yin+xml":{"source":"iana","compressible":true,"extensions":["yin"]},"application/zip":{"source":"iana","compressible":false,"extensions":["zip"]},"application/zlib":{"source":"iana"},"application/zstd":{"source":"iana"},"audio/1d-interleaved-parityfec":{"source":"iana"},"audio/32kadpcm":{"source":"iana"},"audio/3gpp":{"source":"iana","compressible":false,"extensions":["3gpp"]},"audio/3gpp2":{"source":"iana"},"audio/aac":{"source":"iana"},"audio/ac3":{"source":"iana"},"audio/adpcm":{"source":"apache","extensions":["adp"]},"audio/amr":{"source":"iana","extensions":["amr"]},"audio/amr-wb":{"source":"iana"},"audio/amr-wb+":{"source":"iana"},"audio/aptx":{"source":"iana"},"audio/asc":{"source":"iana"},"audio/atrac-advanced-lossless":{"source":"iana"},"audio/atrac-x":{"source":"iana"},"audio/atrac3":{"source":"iana"},"audio/basic":{"source":"iana","compressible":false,"extensions":["au","snd"]},"audio/bv16":{"source":"iana"},"audio/bv32":{"source":"iana"},"audio/clearmode":{"source":"iana"},"audio/cn":{"source":"iana"},"audio/dat12":{"source":"iana"},"audio/dls":{"source":"iana"},"audio/dsr-es201108":{"source":"iana"},"audio/dsr-es202050":{"source":"iana"},"audio/dsr-es202211":{"source":"iana"},"audio/dsr-es202212":{"source":"iana"},"audio/dv":{"source":"iana"},"audio/dvi4":{"source":"iana"},"audio/eac3":{"source":"iana"},"audio/encaprtp":{"source":"iana"},"audio/evrc":{"source":"iana"},"audio/evrc-qcp":{"source":"iana"},"audio/evrc0":{"source":"iana"},"audio/evrc1":{"source":"iana"},"audio/evrcb":{"source":"iana"},"audio/evrcb0":{"source":"iana"},"audio/evrcb1":{"source":"iana"},"audio/evrcnw":{"source":"iana"},"audio/evrcnw0":{"source":"iana"},"audio/evrcnw1":{"source":"iana"},"audio/evrcwb":{"source":"iana"},"audio/evrcwb0":{"source":"iana"},"audio/evrcwb1":{"source":"iana"},"audio/evs":{"source":"iana"},"audio/flexfec":{"source":"iana"},"audio/fwdred":{"source":"iana"},"audio/g711-0":{"source":"iana"},"audio/g719":{"source":"iana"},"audio/g722":{"source":"iana"},"audio/g7221":{"source":"iana"},"audio/g723":{"source":"iana"},"audio/g726-16":{"source":"iana"},"audio/g726-24":{"source":"iana"},"audio/g726-32":{"source":"iana"},"audio/g726-40":{"source":"iana"},"audio/g728":{"source":"iana"},"audio/g729":{"source":"iana"},"audio/g7291":{"source":"iana"},"audio/g729d":{"source":"iana"},"audio/g729e":{"source":"iana"},"audio/gsm":{"source":"iana"},"audio/gsm-efr":{"source":"iana"},"audio/gsm-hr-08":{"source":"iana"},"audio/ilbc":{"source":"iana"},"audio/ip-mr_v2.5":{"source":"iana"},"audio/isac":{"source":"apache"},"audio/l16":{"source":"iana"},"audio/l20":{"source":"iana"},"audio/l24":{"source":"iana","compressible":false},"audio/l8":{"source":"iana"},"audio/lpc":{"source":"iana"},"audio/melp":{"source":"iana"},"audio/melp1200":{"source":"iana"},"audio/melp2400":{"source":"iana"},"audio/melp600":{"source":"iana"},"audio/mhas":{"source":"iana"},"audio/midi":{"source":"apache","extensions":["mid","midi","kar","rmi"]},"audio/mobile-xmf":{"source":"iana","extensions":["mxmf"]},"audio/mp3":{"compressible":false,"extensions":["mp3"]},"audio/mp4":{"source":"iana","compressible":false,"extensions":["m4a","mp4a"]},"audio/mp4a-latm":{"source":"iana"},"audio/mpa":{"source":"iana"},"audio/mpa-robust":{"source":"iana"},"audio/mpeg":{"source":"iana","compressible":false,"extensions":["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{"source":"iana"},"audio/musepack":{"source":"apache"},"audio/ogg":{"source":"iana","compressible":false,"extensions":["oga","ogg","spx","opus"]},"audio/opus":{"source":"iana"},"audio/parityfec":{"source":"iana"},"audio/pcma":{"source":"iana"},"audio/pcma-wb":{"source":"iana"},"audio/pcmu":{"source":"iana"},"audio/pcmu-wb":{"source":"iana"},"audio/prs.sid":{"source":"iana"},"audio/qcelp":{"source":"iana"},"audio/raptorfec":{"source":"iana"},"audio/red":{"source":"iana"},"audio/rtp-enc-aescm128":{"source":"iana"},"audio/rtp-midi":{"source":"iana"},"audio/rtploopback":{"source":"iana"},"audio/rtx":{"source":"iana"},"audio/s3m":{"source":"apache","extensions":["s3m"]},"audio/scip":{"source":"iana"},"audio/silk":{"source":"apache","extensions":["sil"]},"audio/smv":{"source":"iana"},"audio/smv-qcp":{"source":"iana"},"audio/smv0":{"source":"iana"},"audio/sofa":{"source":"iana"},"audio/sp-midi":{"source":"iana"},"audio/speex":{"source":"iana"},"audio/t140c":{"source":"iana"},"audio/t38":{"source":"iana"},"audio/telephone-event":{"source":"iana"},"audio/tetra_acelp":{"source":"iana"},"audio/tetra_acelp_bb":{"source":"iana"},"audio/tone":{"source":"iana"},"audio/tsvcis":{"source":"iana"},"audio/uemclip":{"source":"iana"},"audio/ulpfec":{"source":"iana"},"audio/usac":{"source":"iana"},"audio/vdvi":{"source":"iana"},"audio/vmr-wb":{"source":"iana"},"audio/vnd.3gpp.iufp":{"source":"iana"},"audio/vnd.4sb":{"source":"iana"},"audio/vnd.audiokoz":{"source":"iana"},"audio/vnd.celp":{"source":"iana"},"audio/vnd.cisco.nse":{"source":"iana"},"audio/vnd.cmles.radio-events":{"source":"iana"},"audio/vnd.cns.anp1":{"source":"iana"},"audio/vnd.cns.inf1":{"source":"iana"},"audio/vnd.dece.audio":{"source":"iana","extensions":["uva","uvva"]},"audio/vnd.digital-winds":{"source":"iana","extensions":["eol"]},"audio/vnd.dlna.adts":{"source":"iana"},"audio/vnd.dolby.heaac.1":{"source":"iana"},"audio/vnd.dolby.heaac.2":{"source":"iana"},"audio/vnd.dolby.mlp":{"source":"iana"},"audio/vnd.dolby.mps":{"source":"iana"},"audio/vnd.dolby.pl2":{"source":"iana"},"audio/vnd.dolby.pl2x":{"source":"iana"},"audio/vnd.dolby.pl2z":{"source":"iana"},"audio/vnd.dolby.pulse.1":{"source":"iana"},"audio/vnd.dra":{"source":"iana","extensions":["dra"]},"audio/vnd.dts":{"source":"iana","extensions":["dts"]},"audio/vnd.dts.hd":{"source":"iana","extensions":["dtshd"]},"audio/vnd.dts.uhd":{"source":"iana"},"audio/vnd.dvb.file":{"source":"iana"},"audio/vnd.everad.plj":{"source":"iana"},"audio/vnd.hns.audio":{"source":"iana"},"audio/vnd.lucent.voice":{"source":"iana","extensions":["lvp"]},"audio/vnd.ms-playready.media.pya":{"source":"iana","extensions":["pya"]},"audio/vnd.nokia.mobile-xmf":{"source":"iana"},"audio/vnd.nortel.vbk":{"source":"iana"},"audio/vnd.nuera.ecelp4800":{"source":"iana","extensions":["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{"source":"iana","extensions":["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{"source":"iana","extensions":["ecelp9600"]},"audio/vnd.octel.sbc":{"source":"iana"},"audio/vnd.presonus.multitrack":{"source":"iana"},"audio/vnd.qcelp":{"source":"iana"},"audio/vnd.rhetorex.32kadpcm":{"source":"iana"},"audio/vnd.rip":{"source":"iana","extensions":["rip"]},"audio/vnd.rn-realaudio":{"compressible":false},"audio/vnd.sealedmedia.softseal.mpeg":{"source":"iana"},"audio/vnd.vmx.cvsd":{"source":"iana"},"audio/vnd.wave":{"compressible":false},"audio/vorbis":{"source":"iana","compressible":false},"audio/vorbis-config":{"source":"iana"},"audio/wav":{"compressible":false,"extensions":["wav"]},"audio/wave":{"compressible":false,"extensions":["wav"]},"audio/webm":{"source":"apache","compressible":false,"extensions":["weba"]},"audio/x-aac":{"source":"apache","compressible":false,"extensions":["aac"]},"audio/x-aiff":{"source":"apache","extensions":["aif","aiff","aifc"]},"audio/x-caf":{"source":"apache","compressible":false,"extensions":["caf"]},"audio/x-flac":{"source":"apache","extensions":["flac"]},"audio/x-m4a":{"source":"nginx","extensions":["m4a"]},"audio/x-matroska":{"source":"apache","extensions":["mka"]},"audio/x-mpegurl":{"source":"apache","extensions":["m3u"]},"audio/x-ms-wax":{"source":"apache","extensions":["wax"]},"audio/x-ms-wma":{"source":"apache","extensions":["wma"]},"audio/x-pn-realaudio":{"source":"apache","extensions":["ram","ra"]},"audio/x-pn-realaudio-plugin":{"source":"apache","extensions":["rmp"]},"audio/x-realaudio":{"source":"nginx","extensions":["ra"]},"audio/x-tta":{"source":"apache"},"audio/x-wav":{"source":"apache","extensions":["wav"]},"audio/xm":{"source":"apache","extensions":["xm"]},"chemical/x-cdx":{"source":"apache","extensions":["cdx"]},"chemical/x-cif":{"source":"apache","extensions":["cif"]},"chemical/x-cmdf":{"source":"apache","extensions":["cmdf"]},"chemical/x-cml":{"source":"apache","extensions":["cml"]},"chemical/x-csml":{"source":"apache","extensions":["csml"]},"chemical/x-pdb":{"source":"apache"},"chemical/x-xyz":{"source":"apache","extensions":["xyz"]},"font/collection":{"source":"iana","extensions":["ttc"]},"font/otf":{"source":"iana","compressible":true,"extensions":["otf"]},"font/sfnt":{"source":"iana"},"font/ttf":{"source":"iana","compressible":true,"extensions":["ttf"]},"font/woff":{"source":"iana","extensions":["woff"]},"font/woff2":{"source":"iana","extensions":["woff2"]},"image/aces":{"source":"iana","extensions":["exr"]},"image/apng":{"compressible":false,"extensions":["apng"]},"image/avci":{"source":"iana","extensions":["avci"]},"image/avcs":{"source":"iana","extensions":["avcs"]},"image/avif":{"source":"iana","compressible":false,"extensions":["avif"]},"image/bmp":{"source":"iana","compressible":true,"extensions":["bmp"]},"image/cgm":{"source":"iana","extensions":["cgm"]},"image/dicom-rle":{"source":"iana","extensions":["drle"]},"image/emf":{"source":"iana","extensions":["emf"]},"image/fits":{"source":"iana","extensions":["fits"]},"image/g3fax":{"source":"iana","extensions":["g3"]},"image/gif":{"source":"iana","compressible":false,"extensions":["gif"]},"image/heic":{"source":"iana","extensions":["heic"]},"image/heic-sequence":{"source":"iana","extensions":["heics"]},"image/heif":{"source":"iana","extensions":["heif"]},"image/heif-sequence":{"source":"iana","extensions":["heifs"]},"image/hej2k":{"source":"iana","extensions":["hej2"]},"image/hsj2":{"source":"iana","extensions":["hsj2"]},"image/ief":{"source":"iana","extensions":["ief"]},"image/jls":{"source":"iana","extensions":["jls"]},"image/jp2":{"source":"iana","compressible":false,"extensions":["jp2","jpg2"]},"image/jpeg":{"source":"iana","compressible":false,"extensions":["jpeg","jpg","jpe"]},"image/jph":{"source":"iana","extensions":["jph"]},"image/jphc":{"source":"iana","extensions":["jhc"]},"image/jpm":{"source":"iana","compressible":false,"extensions":["jpm"]},"image/jpx":{"source":"iana","compressible":false,"extensions":["jpx","jpf"]},"image/jxr":{"source":"iana","extensions":["jxr"]},"image/jxra":{"source":"iana","extensions":["jxra"]},"image/jxrs":{"source":"iana","extensions":["jxrs"]},"image/jxs":{"source":"iana","extensions":["jxs"]},"image/jxsc":{"source":"iana","extensions":["jxsc"]},"image/jxsi":{"source":"iana","extensions":["jxsi"]},"image/jxss":{"source":"iana","extensions":["jxss"]},"image/ktx":{"source":"iana","extensions":["ktx"]},"image/ktx2":{"source":"iana","extensions":["ktx2"]},"image/naplps":{"source":"iana"},"image/pjpeg":{"compressible":false},"image/png":{"source":"iana","compressible":false,"extensions":["png"]},"image/prs.btif":{"source":"iana","extensions":["btif"]},"image/prs.pti":{"source":"iana","extensions":["pti"]},"image/pwg-raster":{"source":"iana"},"image/sgi":{"source":"apache","extensions":["sgi"]},"image/svg+xml":{"source":"iana","compressible":true,"extensions":["svg","svgz"]},"image/t38":{"source":"iana","extensions":["t38"]},"image/tiff":{"source":"iana","compressible":false,"extensions":["tif","tiff"]},"image/tiff-fx":{"source":"iana","extensions":["tfx"]},"image/vnd.adobe.photoshop":{"source":"iana","compressible":true,"extensions":["psd"]},"image/vnd.airzip.accelerator.azv":{"source":"iana","extensions":["azv"]},"image/vnd.cns.inf2":{"source":"iana"},"image/vnd.dece.graphic":{"source":"iana","extensions":["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{"source":"iana","extensions":["djvu","djv"]},"image/vnd.dvb.subtitle":{"source":"iana","extensions":["sub"]},"image/vnd.dwg":{"source":"iana","extensions":["dwg"]},"image/vnd.dxf":{"source":"iana","extensions":["dxf"]},"image/vnd.fastbidsheet":{"source":"iana","extensions":["fbs"]},"image/vnd.fpx":{"source":"iana","extensions":["fpx"]},"image/vnd.fst":{"source":"iana","extensions":["fst"]},"image/vnd.fujixerox.edmics-mmr":{"source":"iana","extensions":["mmr"]},"image/vnd.fujixerox.edmics-rlc":{"source":"iana","extensions":["rlc"]},"image/vnd.globalgraphics.pgb":{"source":"iana"},"image/vnd.microsoft.icon":{"source":"iana","compressible":true,"extensions":["ico"]},"image/vnd.mix":{"source":"iana"},"image/vnd.mozilla.apng":{"source":"iana"},"image/vnd.ms-dds":{"compressible":true,"extensions":["dds"]},"image/vnd.ms-modi":{"source":"iana","extensions":["mdi"]},"image/vnd.ms-photo":{"source":"apache","extensions":["wdp"]},"image/vnd.net-fpx":{"source":"iana","extensions":["npx"]},"image/vnd.pco.b16":{"source":"iana","extensions":["b16"]},"image/vnd.radiance":{"source":"iana"},"image/vnd.sealed.png":{"source":"iana"},"image/vnd.sealedmedia.softseal.gif":{"source":"iana"},"image/vnd.sealedmedia.softseal.jpg":{"source":"iana"},"image/vnd.svf":{"source":"iana"},"image/vnd.tencent.tap":{"source":"iana","extensions":["tap"]},"image/vnd.valve.source.texture":{"source":"iana","extensions":["vtf"]},"image/vnd.wap.wbmp":{"source":"iana","extensions":["wbmp"]},"image/vnd.xiff":{"source":"iana","extensions":["xif"]},"image/vnd.zbrush.pcx":{"source":"iana","extensions":["pcx"]},"image/webp":{"source":"apache","extensions":["webp"]},"image/wmf":{"source":"iana","extensions":["wmf"]},"image/x-3ds":{"source":"apache","extensions":["3ds"]},"image/x-cmu-raster":{"source":"apache","extensions":["ras"]},"image/x-cmx":{"source":"apache","extensions":["cmx"]},"image/x-freehand":{"source":"apache","extensions":["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{"source":"apache","compressible":true,"extensions":["ico"]},"image/x-jng":{"source":"nginx","extensions":["jng"]},"image/x-mrsid-image":{"source":"apache","extensions":["sid"]},"image/x-ms-bmp":{"source":"nginx","compressible":true,"extensions":["bmp"]},"image/x-pcx":{"source":"apache","extensions":["pcx"]},"image/x-pict":{"source":"apache","extensions":["pic","pct"]},"image/x-portable-anymap":{"source":"apache","extensions":["pnm"]},"image/x-portable-bitmap":{"source":"apache","extensions":["pbm"]},"image/x-portable-graymap":{"source":"apache","extensions":["pgm"]},"image/x-portable-pixmap":{"source":"apache","extensions":["ppm"]},"image/x-rgb":{"source":"apache","extensions":["rgb"]},"image/x-tga":{"source":"apache","extensions":["tga"]},"image/x-xbitmap":{"source":"apache","extensions":["xbm"]},"image/x-xcf":{"compressible":false},"image/x-xpixmap":{"source":"apache","extensions":["xpm"]},"image/x-xwindowdump":{"source":"apache","extensions":["xwd"]},"message/cpim":{"source":"iana"},"message/delivery-status":{"source":"iana"},"message/disposition-notification":{"source":"iana","extensions":["disposition-notification"]},"message/external-body":{"source":"iana"},"message/feedback-report":{"source":"iana"},"message/global":{"source":"iana","extensions":["u8msg"]},"message/global-delivery-status":{"source":"iana","extensions":["u8dsn"]},"message/global-disposition-notification":{"source":"iana","extensions":["u8mdn"]},"message/global-headers":{"source":"iana","extensions":["u8hdr"]},"message/http":{"source":"iana","compressible":false},"message/imdn+xml":{"source":"iana","compressible":true},"message/news":{"source":"iana"},"message/partial":{"source":"iana","compressible":false},"message/rfc822":{"source":"iana","compressible":true,"extensions":["eml","mime"]},"message/s-http":{"source":"iana"},"message/sip":{"source":"iana"},"message/sipfrag":{"source":"iana"},"message/tracking-status":{"source":"iana"},"message/vnd.si.simp":{"source":"iana"},"message/vnd.wfa.wsc":{"source":"iana","extensions":["wsc"]},"model/3mf":{"source":"iana","extensions":["3mf"]},"model/e57":{"source":"iana"},"model/gltf+json":{"source":"iana","compressible":true,"extensions":["gltf"]},"model/gltf-binary":{"source":"iana","compressible":true,"extensions":["glb"]},"model/iges":{"source":"iana","compressible":false,"extensions":["igs","iges"]},"model/mesh":{"source":"iana","compressible":false,"extensions":["msh","mesh","silo"]},"model/mtl":{"source":"iana","extensions":["mtl"]},"model/obj":{"source":"iana","extensions":["obj"]},"model/step":{"source":"iana"},"model/step+xml":{"source":"iana","compressible":true,"extensions":["stpx"]},"model/step+zip":{"source":"iana","compressible":false,"extensions":["stpz"]},"model/step-xml+zip":{"source":"iana","compressible":false,"extensions":["stpxz"]},"model/stl":{"source":"iana","extensions":["stl"]},"model/vnd.collada+xml":{"source":"iana","compressible":true,"extensions":["dae"]},"model/vnd.dwf":{"source":"iana","extensions":["dwf"]},"model/vnd.flatland.3dml":{"source":"iana"},"model/vnd.gdl":{"source":"iana","extensions":["gdl"]},"model/vnd.gs-gdl":{"source":"apache"},"model/vnd.gs.gdl":{"source":"iana"},"model/vnd.gtw":{"source":"iana","extensions":["gtw"]},"model/vnd.moml+xml":{"source":"iana","compressible":true},"model/vnd.mts":{"source":"iana","extensions":["mts"]},"model/vnd.opengex":{"source":"iana","extensions":["ogex"]},"model/vnd.parasolid.transmit.binary":{"source":"iana","extensions":["x_b"]},"model/vnd.parasolid.transmit.text":{"source":"iana","extensions":["x_t"]},"model/vnd.pytha.pyox":{"source":"iana"},"model/vnd.rosette.annotated-data-model":{"source":"iana"},"model/vnd.sap.vds":{"source":"iana","extensions":["vds"]},"model/vnd.usdz+zip":{"source":"iana","compressible":false,"extensions":["usdz"]},"model/vnd.valve.source.compiled-map":{"source":"iana","extensions":["bsp"]},"model/vnd.vtu":{"source":"iana","extensions":["vtu"]},"model/vrml":{"source":"iana","compressible":false,"extensions":["wrl","vrml"]},"model/x3d+binary":{"source":"apache","compressible":false,"extensions":["x3db","x3dbz"]},"model/x3d+fastinfoset":{"source":"iana","extensions":["x3db"]},"model/x3d+vrml":{"source":"apache","compressible":false,"extensions":["x3dv","x3dvz"]},"model/x3d+xml":{"source":"iana","compressible":true,"extensions":["x3d","x3dz"]},"model/x3d-vrml":{"source":"iana","extensions":["x3dv"]},"multipart/alternative":{"source":"iana","compressible":false},"multipart/appledouble":{"source":"iana"},"multipart/byteranges":{"source":"iana"},"multipart/digest":{"source":"iana"},"multipart/encrypted":{"source":"iana","compressible":false},"multipart/form-data":{"source":"iana","compressible":false},"multipart/header-set":{"source":"iana"},"multipart/mixed":{"source":"iana"},"multipart/multilingual":{"source":"iana"},"multipart/parallel":{"source":"iana"},"multipart/related":{"source":"iana","compressible":false},"multipart/report":{"source":"iana"},"multipart/signed":{"source":"iana","compressible":false},"multipart/vnd.bint.med-plus":{"source":"iana"},"multipart/voice-message":{"source":"iana"},"multipart/x-mixed-replace":{"source":"iana"},"text/1d-interleaved-parityfec":{"source":"iana"},"text/cache-manifest":{"source":"iana","compressible":true,"extensions":["appcache","manifest"]},"text/calendar":{"source":"iana","extensions":["ics","ifb"]},"text/calender":{"compressible":true},"text/cmd":{"compressible":true},"text/coffeescript":{"extensions":["coffee","litcoffee"]},"text/cql":{"source":"iana"},"text/cql-expression":{"source":"iana"},"text/cql-identifier":{"source":"iana"},"text/css":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["css"]},"text/csv":{"source":"iana","compressible":true,"extensions":["csv"]},"text/csv-schema":{"source":"iana"},"text/directory":{"source":"iana"},"text/dns":{"source":"iana"},"text/ecmascript":{"source":"iana"},"text/encaprtp":{"source":"iana"},"text/enriched":{"source":"iana"},"text/fhirpath":{"source":"iana"},"text/flexfec":{"source":"iana"},"text/fwdred":{"source":"iana"},"text/gff3":{"source":"iana"},"text/grammar-ref-list":{"source":"iana"},"text/html":{"source":"iana","compressible":true,"extensions":["html","htm","shtml"]},"text/jade":{"extensions":["jade"]},"text/javascript":{"source":"iana","compressible":true},"text/jcr-cnd":{"source":"iana"},"text/jsx":{"compressible":true,"extensions":["jsx"]},"text/less":{"compressible":true,"extensions":["less"]},"text/markdown":{"source":"iana","compressible":true,"extensions":["markdown","md"]},"text/mathml":{"source":"nginx","extensions":["mml"]},"text/mdx":{"compressible":true,"extensions":["mdx"]},"text/mizar":{"source":"iana"},"text/n3":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["n3"]},"text/parameters":{"source":"iana","charset":"UTF-8"},"text/parityfec":{"source":"iana"},"text/plain":{"source":"iana","compressible":true,"extensions":["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{"source":"iana","charset":"UTF-8"},"text/prs.fallenstein.rst":{"source":"iana"},"text/prs.lines.tag":{"source":"iana","extensions":["dsc"]},"text/prs.prop.logic":{"source":"iana"},"text/raptorfec":{"source":"iana"},"text/red":{"source":"iana"},"text/rfc822-headers":{"source":"iana"},"text/richtext":{"source":"iana","compressible":true,"extensions":["rtx"]},"text/rtf":{"source":"iana","compressible":true,"extensions":["rtf"]},"text/rtp-enc-aescm128":{"source":"iana"},"text/rtploopback":{"source":"iana"},"text/rtx":{"source":"iana"},"text/sgml":{"source":"iana","extensions":["sgml","sgm"]},"text/shaclc":{"source":"iana"},"text/shex":{"source":"iana","extensions":["shex"]},"text/slim":{"extensions":["slim","slm"]},"text/spdx":{"source":"iana","extensions":["spdx"]},"text/strings":{"source":"iana"},"text/stylus":{"extensions":["stylus","styl"]},"text/t140":{"source":"iana"},"text/tab-separated-values":{"source":"iana","compressible":true,"extensions":["tsv"]},"text/troff":{"source":"iana","extensions":["t","tr","roff","man","me","ms"]},"text/turtle":{"source":"iana","charset":"UTF-8","extensions":["ttl"]},"text/ulpfec":{"source":"iana"},"text/uri-list":{"source":"iana","compressible":true,"extensions":["uri","uris","urls"]},"text/vcard":{"source":"iana","compressible":true,"extensions":["vcard"]},"text/vnd.a":{"source":"iana"},"text/vnd.abc":{"source":"iana"},"text/vnd.ascii-art":{"source":"iana"},"text/vnd.curl":{"source":"iana","extensions":["curl"]},"text/vnd.curl.dcurl":{"source":"apache","extensions":["dcurl"]},"text/vnd.curl.mcurl":{"source":"apache","extensions":["mcurl"]},"text/vnd.curl.scurl":{"source":"apache","extensions":["scurl"]},"text/vnd.debian.copyright":{"source":"iana","charset":"UTF-8"},"text/vnd.dmclientscript":{"source":"iana"},"text/vnd.dvb.subtitle":{"source":"iana","extensions":["sub"]},"text/vnd.esmertec.theme-descriptor":{"source":"iana","charset":"UTF-8"},"text/vnd.familysearch.gedcom":{"source":"iana","extensions":["ged"]},"text/vnd.ficlab.flt":{"source":"iana"},"text/vnd.fly":{"source":"iana","extensions":["fly"]},"text/vnd.fmi.flexstor":{"source":"iana","extensions":["flx"]},"text/vnd.gml":{"source":"iana"},"text/vnd.graphviz":{"source":"iana","extensions":["gv"]},"text/vnd.hans":{"source":"iana"},"text/vnd.hgl":{"source":"iana"},"text/vnd.in3d.3dml":{"source":"iana","extensions":["3dml"]},"text/vnd.in3d.spot":{"source":"iana","extensions":["spot"]},"text/vnd.iptc.newsml":{"source":"iana"},"text/vnd.iptc.nitf":{"source":"iana"},"text/vnd.latex-z":{"source":"iana"},"text/vnd.motorola.reflex":{"source":"iana"},"text/vnd.ms-mediapackage":{"source":"iana"},"text/vnd.net2phone.commcenter.command":{"source":"iana"},"text/vnd.radisys.msml-basic-layout":{"source":"iana"},"text/vnd.senx.warpscript":{"source":"iana"},"text/vnd.si.uricatalogue":{"source":"iana"},"text/vnd.sosi":{"source":"iana"},"text/vnd.sun.j2me.app-descriptor":{"source":"iana","charset":"UTF-8","extensions":["jad"]},"text/vnd.trolltech.linguist":{"source":"iana","charset":"UTF-8"},"text/vnd.wap.si":{"source":"iana"},"text/vnd.wap.sl":{"source":"iana"},"text/vnd.wap.wml":{"source":"iana","extensions":["wml"]},"text/vnd.wap.wmlscript":{"source":"iana","extensions":["wmls"]},"text/vtt":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["vtt"]},"text/x-asm":{"source":"apache","extensions":["s","asm"]},"text/x-c":{"source":"apache","extensions":["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{"source":"nginx","extensions":["htc"]},"text/x-fortran":{"source":"apache","extensions":["f","for","f77","f90"]},"text/x-gwt-rpc":{"compressible":true},"text/x-handlebars-template":{"extensions":["hbs"]},"text/x-java-source":{"source":"apache","extensions":["java"]},"text/x-jquery-tmpl":{"compressible":true},"text/x-lua":{"extensions":["lua"]},"text/x-markdown":{"compressible":true,"extensions":["mkd"]},"text/x-nfo":{"source":"apache","extensions":["nfo"]},"text/x-opml":{"source":"apache","extensions":["opml"]},"text/x-org":{"compressible":true,"extensions":["org"]},"text/x-pascal":{"source":"apache","extensions":["p","pas"]},"text/x-processing":{"compressible":true,"extensions":["pde"]},"text/x-sass":{"extensions":["sass"]},"text/x-scss":{"extensions":["scss"]},"text/x-setext":{"source":"apache","extensions":["etx"]},"text/x-sfv":{"source":"apache","extensions":["sfv"]},"text/x-suse-ymp":{"compressible":true,"extensions":["ymp"]},"text/x-uuencode":{"source":"apache","extensions":["uu"]},"text/x-vcalendar":{"source":"apache","extensions":["vcs"]},"text/x-vcard":{"source":"apache","extensions":["vcf"]},"text/xml":{"source":"iana","compressible":true,"extensions":["xml"]},"text/xml-external-parsed-entity":{"source":"iana"},"text/yaml":{"compressible":true,"extensions":["yaml","yml"]},"video/1d-interleaved-parityfec":{"source":"iana"},"video/3gpp":{"source":"iana","extensions":["3gp","3gpp"]},"video/3gpp-tt":{"source":"iana"},"video/3gpp2":{"source":"iana","extensions":["3g2"]},"video/av1":{"source":"iana"},"video/bmpeg":{"source":"iana"},"video/bt656":{"source":"iana"},"video/celb":{"source":"iana"},"video/dv":{"source":"iana"},"video/encaprtp":{"source":"iana"},"video/ffv1":{"source":"iana"},"video/flexfec":{"source":"iana"},"video/h261":{"source":"iana","extensions":["h261"]},"video/h263":{"source":"iana","extensions":["h263"]},"video/h263-1998":{"source":"iana"},"video/h263-2000":{"source":"iana"},"video/h264":{"source":"iana","extensions":["h264"]},"video/h264-rcdo":{"source":"iana"},"video/h264-svc":{"source":"iana"},"video/h265":{"source":"iana"},"video/iso.segment":{"source":"iana","extensions":["m4s"]},"video/jpeg":{"source":"iana","extensions":["jpgv"]},"video/jpeg2000":{"source":"iana"},"video/jpm":{"source":"apache","extensions":["jpm","jpgm"]},"video/jxsv":{"source":"iana"},"video/mj2":{"source":"iana","extensions":["mj2","mjp2"]},"video/mp1s":{"source":"iana"},"video/mp2p":{"source":"iana"},"video/mp2t":{"source":"iana","extensions":["ts"]},"video/mp4":{"source":"iana","compressible":false,"extensions":["mp4","mp4v","mpg4"]},"video/mp4v-es":{"source":"iana"},"video/mpeg":{"source":"iana","compressible":false,"extensions":["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{"source":"iana"},"video/mpv":{"source":"iana"},"video/nv":{"source":"iana"},"video/ogg":{"source":"iana","compressible":false,"extensions":["ogv"]},"video/parityfec":{"source":"iana"},"video/pointer":{"source":"iana"},"video/quicktime":{"source":"iana","compressible":false,"extensions":["qt","mov"]},"video/raptorfec":{"source":"iana"},"video/raw":{"source":"iana"},"video/rtp-enc-aescm128":{"source":"iana"},"video/rtploopback":{"source":"iana"},"video/rtx":{"source":"iana"},"video/scip":{"source":"iana"},"video/smpte291":{"source":"iana"},"video/smpte292m":{"source":"iana"},"video/ulpfec":{"source":"iana"},"video/vc1":{"source":"iana"},"video/vc2":{"source":"iana"},"video/vnd.cctv":{"source":"iana"},"video/vnd.dece.hd":{"source":"iana","extensions":["uvh","uvvh"]},"video/vnd.dece.mobile":{"source":"iana","extensions":["uvm","uvvm"]},"video/vnd.dece.mp4":{"source":"iana"},"video/vnd.dece.pd":{"source":"iana","extensions":["uvp","uvvp"]},"video/vnd.dece.sd":{"source":"iana","extensions":["uvs","uvvs"]},"video/vnd.dece.video":{"source":"iana","extensions":["uvv","uvvv"]},"video/vnd.directv.mpeg":{"source":"iana"},"video/vnd.directv.mpeg-tts":{"source":"iana"},"video/vnd.dlna.mpeg-tts":{"source":"iana"},"video/vnd.dvb.file":{"source":"iana","extensions":["dvb"]},"video/vnd.fvt":{"source":"iana","extensions":["fvt"]},"video/vnd.hns.video":{"source":"iana"},"video/vnd.iptvforum.1dparityfec-1010":{"source":"iana"},"video/vnd.iptvforum.1dparityfec-2005":{"source":"iana"},"video/vnd.iptvforum.2dparityfec-1010":{"source":"iana"},"video/vnd.iptvforum.2dparityfec-2005":{"source":"iana"},"video/vnd.iptvforum.ttsavc":{"source":"iana"},"video/vnd.iptvforum.ttsmpeg2":{"source":"iana"},"video/vnd.motorola.video":{"source":"iana"},"video/vnd.motorola.videop":{"source":"iana"},"video/vnd.mpegurl":{"source":"iana","extensions":["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{"source":"iana","extensions":["pyv"]},"video/vnd.nokia.interleaved-multimedia":{"source":"iana"},"video/vnd.nokia.mp4vr":{"source":"iana"},"video/vnd.nokia.videovoip":{"source":"iana"},"video/vnd.objectvideo":{"source":"iana"},"video/vnd.radgamettools.bink":{"source":"iana"},"video/vnd.radgamettools.smacker":{"source":"iana"},"video/vnd.sealed.mpeg1":{"source":"iana"},"video/vnd.sealed.mpeg4":{"source":"iana"},"video/vnd.sealed.swf":{"source":"iana"},"video/vnd.sealedmedia.softseal.mov":{"source":"iana"},"video/vnd.uvvu.mp4":{"source":"iana","extensions":["uvu","uvvu"]},"video/vnd.vivo":{"source":"iana","extensions":["viv"]},"video/vnd.youtube.yt":{"source":"iana"},"video/vp8":{"source":"iana"},"video/vp9":{"source":"iana"},"video/webm":{"source":"apache","compressible":false,"extensions":["webm"]},"video/x-f4v":{"source":"apache","extensions":["f4v"]},"video/x-fli":{"source":"apache","extensions":["fli"]},"video/x-flv":{"source":"apache","compressible":false,"extensions":["flv"]},"video/x-m4v":{"source":"apache","extensions":["m4v"]},"video/x-matroska":{"source":"apache","compressible":false,"extensions":["mkv","mk3d","mks"]},"video/x-mng":{"source":"apache","extensions":["mng"]},"video/x-ms-asf":{"source":"apache","extensions":["asf","asx"]},"video/x-ms-vob":{"source":"apache","extensions":["vob"]},"video/x-ms-wm":{"source":"apache","extensions":["wm"]},"video/x-ms-wmv":{"source":"apache","compressible":false,"extensions":["wmv"]},"video/x-ms-wmx":{"source":"apache","extensions":["wmx"]},"video/x-ms-wvx":{"source":"apache","extensions":["wvx"]},"video/x-msvideo":{"source":"apache","extensions":["avi"]},"video/x-sgi-movie":{"source":"apache","extensions":["movie"]},"video/x-smv":{"source":"apache","extensions":["smv"]},"x-conference/x-cooltalk":{"source":"apache","extensions":["ice"]},"x-shader/x-fragment":{"compressible":true},"x-shader/x-vertex":{"compressible":true}}')}}]);
|
|
|
//# sourceMappingURL=2238.bb5d1b9f.js.map |