PageSourceSearch

https://asgardia.space/spa-assets/67ac14c7ffdfe8c2a62a015cb2b1aaa4.js

js asgardia.space collected 2026-09-24 09:36:27 UTC 589,231 bytes, 2 lines download raw bytes

1/*! For license information please see 67ac14c7ffdfe8c2a62a015cb2b1aaa4.js.LICENSE.txt */
2(self.webpackChunkasgardia=self.webpackChunkasgardia||[]).push([[18645],{82354:(e,t,n)=>{"use strict";var r=n(84581);function i(e){"function"==typeof(e=e||{}).codeMirrorInstance&&"function"==typeof e.codeMirrorInstance.defineMode?(String.prototype.includes||(String.prototype.includes=function(){return-1!==String.prototype.indexOf.apply(this,arguments)}),e.codeMirrorInstance.defineMode("spell-checker",(function(t){if(!i.aff_loading){i.aff_loading=!0;var n=new XMLHttpRequest;n.open("GET","https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.aff",!0),n.onload=function(){4===n.readyState&&200===n.status&&(i.aff_data=n.responseText,i.num_loaded++,2==i.num_loaded&&(i.typo=new r("en_US",i.aff_data,i.dic_data,{platform:"any"})))},n.send(null)}if(!i.dic_loading){i.dic_loading=!0;var o=new XMLHttpRequest;o.open("GET","https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.dic",!0),o.onload=function(){4===o.readyState&&200===o.status&&(i.dic_data=o.responseText,i.num_loaded++,2==i.num_loaded&&(i.typo=new r("en_US",i.aff_data,i.dic_data,{platform:"any"})))},o.send(null)}var a='!"#$%&()*+,-./:;<=>?@[\\]^_`{|}~ ',l={token:function(e){var t=e.peek(),n="";if(a.includes(t))return e.next(),null;for(;null!=(t=e.peek())&&!a.includes(t);)n+=t,e.next();return i.typo&&!i.typo.check(n)?"spell-error":null}},u=e.codeMirrorInstance.getMode(t,t.backdrop||"text/plain");return e.codeMirrorInstance.overlayMode(u,l,!0)}))):console.log("CodeMirror Spell Checker: You must provide an instance of CodeMirror via the option `codeMirrorInstance`")}i.num_loaded=0,i.aff_loading=!1,i.dic_loading=!1,i.aff_data="",i.dic_data="",i.typo,e.exports=i},21994:(e,t,n)=>{!function(e){"use strict";function t(t,r){function i(){t.display.wrapper.offsetHeight?(n(t,r),t.display.lastWrapHeight!=t.display.wrapper.clientHeight&&t.refresh()):r.timeout=setTimeout(i,r.delay)}r.timeout=setTimeout(i,r.delay),r.hurry=function(){clearTimeout(r.timeout),r.timeout=setTimeout(i,50)},e.on(window,"mouseup",r.hurry),e.on(window,"keyup",r.hurry)}function n(t,n){clearTimeout(n.timeout),e.off(window,"mouseup",n.hurry),e.off(window,"keyup",n.hurry)}e.defineOption("autoRefresh",!1,(function(e,r){e.state.autoRefresh&&(n(e,e.state.autoRefresh),e.state.autoRefresh=null),r&&0==e.display.wrapper.offsetHeight&&t(e,e.state.autoRefresh={delay:r.delay||250})}))}(n(4631))},960:(e,t,n)=>{!function(e){"use strict";function t(e){var t=e.getWrapperElement();e.state.fullScreenRestore={scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,width:t.style.width,height:t.style.height},t.style.width="",t.style.height="auto",t.className+=" CodeMirror-fullscreen",document.documentElement.style.overflow="hidden",e.refresh()}function n(e){var t=e.getWrapperElement();t.className=t.className.replace(/\s*CodeMirror-fullscreen\b/,""),document.documentElement.style.overflow="";var n=e.state.fullScreenRestore;t.style.width=n.width,t.style.height=n.height,window.scrollTo(n.scrollLeft,n.scrollTop),e.refresh()}e.defineOption("fullScreen",!1,(function(r,i,o){o==e.Init&&(o=!1),!o!=!i&&(i?t(r):n(r))}))}(n(4631))},88386:(e,t,n)=>{!function(e){function t(e){e.state.placeholder&&(e.state.placeholder.parentNode.removeChild(e.state.placeholder),e.state.placeholder=null)}function n(e){t(e);var n=e.state.placeholder=document.createElement("pre");n.style.cssText="height: 0; overflow: visible",n.style.direction=e.getOption("direction"),n.className="CodeMirror-placeholder CodeMirror-line-like";var r=e.getOption("placeholder");"string"==typeof r&&(r=document.createTextNode(r)),n.appendChild(r),e.display.lineSpace.insertBefore(n,e.display.lineSpace.firstChild)}function r(e){setTimeout((function(){var r=!1;if(1==e.lineCount()){var i=e.getInputField();r="TEXTAREA"==i.nodeName?!e.getLine(0).length:!/[^\u200b]/.test(i.querySelector(".CodeMirror-line").textContent)}r?n(e):t(e)}),20)}function i(e){a(e)&&n(e)}function o(e){var r=e.getWrapperElement(),i=a(e);r.className=r.className.replace(" CodeMirror-empty","")+(i?" CodeMirror-empty":""),i?n(e):t(e)}function a(e){return 1===e.lineCount()&&""===e.getLine(0)}e.defineOption("placeholder","",(function(n,a,l){var u=l&&l!=e.Init;if(a&&!u)n.on("blur",i),n.on("change",o),n.on("swapDoc",o),e.on(n.getInputField(),"compositionupdate",n.state.placeholderCompose=function(){r(n)}),o(n);else if(!a&&u){n.off("blur",i),n.off("change",o),n.off("swapDoc",o),e.off(n.getInputField(),"compositionupdate",n.state.placeholderCompose),t(n);var s=n.getWrapperElement();s.className=s.className.replace(" CodeMirror-empty","")}a&&!n.hasFocus()&&i(n)}))}(n(4631))},23350:(e,t,n)=>{!function(e){"use strict";var t=/^(\s*)(>
vendor: 135,390 bytes, line 2
2[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,n=/^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,r=/[*+-]\s/;function i(e,n){var r=n.line,i=0,o=0,a=t.exec(e.getLine(r)),l=a[1];do{var u=r+(i+=1),s=e.getLine(u),c=t.exec(s);if(c){var f=c[1],d=parseInt(a[3],10)+i-o,h=parseInt(c[3],10),p=h;if(l!==f||isNaN(h)){if(l.length>f.length)return;if(l.length<f.length&&1===i)return;o+=1}else d===h&&(p=h+1),d>h&&(p=d+1),e.replaceRange(s.replace(t,f+p+c[4]+c[5]),{line:u,ch:0},{line:u,ch:s.length})}}while(c)}e.commands.newlineAndIndentContinueMarkdownList=function(o){if(o.getOption("disableInput"))return e.Pass;for(var a=o.listSelections(),l=[],u=0;u<a.length;u++){var s=a[u].head,c=o.getStateAfter(s.line),f=e.innerMode(o.getMode(),c);if("markdown"!==f.mode.name&&"markdown"!==f.mode.helperType)return void o.execCommand("newlineAndIndent");var d=!1!==(c=f.state).list,h=0!==c.quote,p=o.getLine(s.line),g=t.exec(p),m=/^\s*$/.test(p.slice(0,s.ch));if(!a[u].empty()||!d&&!h||!g||m)return void o.execCommand("newlineAndIndent");if(n.test(p)){var v=h&&/>\s*$/.test(p),y=!/>\s*$/.test(p);(v||y)&&o.replaceRange("",{line:s.line,ch:0},{line:s.line,ch:s.ch+1}),l[u]="\n"}else{var E=g[1],_=g[5],x=!(r.test(g[2])||g[2].indexOf(">")>=0),b=x?parseInt(g[3],10)+1+g[4]:g[2].replace("x"," ");l[u]="\n"+E+b+_,x&&i(o,s)}}o.replaceSelections(l)}}(n(4631))},14146:(e,t,n)=>{!function(e){"use strict";e.overlayMode=function(t,n,r){return{startState:function(){return{base:e.startState(t),overlay:e.startState(n),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(r){return{base:e.copyState(t,r.base),overlay:e.copyState(n,r.overlay),basePos:r.basePos,baseCur:null,overlayPos:r.overlayPos,overlayCur:null}},token:function(e,i){return(e!=i.streamSeen||Math.min(i.basePos,i.overlayPos)<e.start)&&(i.streamSeen=e,i.basePos=i.overlayPos=e.start),e.start==i.basePos&&(i.baseCur=t.token(e,i.base),i.basePos=e.pos),e.start==i.overlayPos&&(e.pos=e.start,i.overlayCur=n.token(e,i.overlay),i.overlayPos=e.pos),e.pos=Math.min(i.basePos,i.overlayPos),null==i.overlayCur?i.baseCur:null!=i.baseCur&&i.overlay.combineTokens||r&&null==i.overlay.combineTokens?i.baseCur+" "+i.overlayCur:i.overlayCur},indent:t.indent&&function(e,n,r){return t.indent(e.base,n,r)},electricChars:t.electricChars,innerMode:function(e){return{state:e.base,mode:t}},blankLine:function(e){var i,o;return t.blankLine&&(i=t.blankLine(e.base)),n.blankLine&&(o=n.blankLine(e.overlay)),null==o?i:r&&null!=i?i+" "+o:o}}}}(n(4631))},32095:(e,t,n)=>{!function(e){"use strict";var t,n,r=e.Pos;function i(e){var t=e.flags;return null!=t?t:(e.ignoreCase?"i":"")+(e.global?"g":"")+(e.multiline?"m":"")}function o(e,t){for(var n=i(e),r=n,o=0;o<t.length;o++)-1==r.indexOf(t.charAt(o))&&(r+=t.charAt(o));return n==r?e:new RegExp(e.source,r)}function a(e){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(e.source)}function l(e,t,n){t=o(t,"g");for(var i=n.line,a=n.ch,l=e.lastLine();i<=l;i++,a=0){t.lastIndex=a;var u=e.getLine(i),s=t.exec(u);if(s)return{from:r(i,s.index),to:r(i,s.index+s[0].length),match:s}}}function u(e,t,n){if(!a(t))return l(e,t,n);t=o(t,"gm");for(var i,u=1,s=n.line,c=e.lastLine();s<=c;){for(var f=0;f<u&&!(s>c);f++){var d=e.getLine(s++);i=null==i?d:i+"\n"+d}u*=2,t.lastIndex=n.ch;var h=t.exec(i);if(h){var p=i.slice(0,h.index).split("\n"),g=h[0].split("\n"),m=n.line+p.length-1,v=p[p.length-1].length;return{from:r(m,v),to:r(m+g.length-1,1==g.length?v+g[0].length:g[g.length-1].length),match:h}}}}function s(e,t,n){for(var r,i=0;i<=e.length;){t.lastIndex=i;var o=t.exec(e);if(!o)break;var a=o.index+o[0].length;if(a>e.length-n)break;(!r||a>r.index+r[0].length)&&(r=o),i=o.index+1}return r}function c(e,t,n){t=o(t,"g");for(var i=n.line,a=n.ch,l=e.firstLine();i>=l;i--,a=-1){var u=e.getLine(i),c=s(u,t,a<0?0:u.length-a);if(c)return{from:r(i,c.index),to:r(i,c.index+c[0].length),match:c}}}function f(e,t,n){if(!a(t))return c(e,t,n);t=o(t,"gm");for(var i,l=1,u=e.getLine(n.line).length-n.ch,f=n.line,d=e.firstLine();f>=d;){for(var h=0;h<l&&f>=d;h++){var p=e.getLine(f--);i=null==i?p:p+"\n"+i}l*=2;var g=s(i,t,u);if(g){var m=i.slice(0,g.index).split("\n"),v=g[0].split("\n"),y=f+m.length,E=m[m.length-1].length;return{from:r(y,E),to:r(y+v.length-1,1==v.length?E+v[0].length:v[v.length-1].length),match:g}}}}function d(e,t,n,r){if(e.length==t.length)return n;for(var i=0,o=n+Math.max(0,e.length-t.length);;){if(i==o)return i;var a=i+o>>1,l=r(e.slice(0,a)).length;if(l==n)return a;l>n?o=a:i=a+1}}function h(e,i,o,a){if(!i.length)return null;var l=a?t:n,u=l(i).split(/\r|\n\r?/);e:for(var s=o.line,c=o.ch,f=e.lastLine()+1-u.length;s<=f;s++,c=0){var h=e.getLine(s).slice(c),p=l(h);if(1==u.length){var g=p.indexOf(u[0]);if(-1==g)continue e;return o=d(h,p,g,l)+c,{from:r(s,d(h,p,g,l)+c),to:r(s,d(h,p,g+u[0].length,l)+c)}}var m=p.length-u[0].length;if(p.slice(m)==u[0]){for(var v=1;v<u.length-1;v++)if(l(e.getLine(s+v))!=u[v])continue e;var y=e.getLine(s+u.length-1),E=l(y),_=u[u.length-1];if(E.slice(0,_.length)==_)return{from:r(s,d(h,p,m,l)+c),to:r(s+u.length-1,d(y,E,_.length,l))}}}}function p(e,i,o,a){if(!i.length)return null;var l=a?t:n,u=l(i).split(/\r|\n\r?/);e:for(var s=o.line,c=o.ch,f=e.firstLine()-1+u.length;s>=f;s--,c=-1){var h=e.getLine(s);c>-1&&(h=h.slice(0,c));var p=l(h);if(1==u.length){var g=p.lastIndexOf(u[0]);if(-1==g)continue e;return{from:r(s,d(h,p,g,l)),to:r(s,d(h,p,g+u[0].length,l))}}var m=u[u.length-1];if(p.slice(0,m.length)==m){var v=1;for(o=s-u.length+1;v<u.length-1;v++)if(l(e.getLine(o+v))!=u[v])continue e;var y=e.getLine(s+1-u.length),E=l(y);if(E.slice(E.length-u[0].length)==u[0])return{from:r(s+1-u.length,d(y,E,y.length-u[0].length,l)),to:r(s,d(h,p,m.length,l))}}}}function g(e,t,n,i){var a;this.atOccurrence=!1,this.afterEmptyMatch=!1,this.doc=e,n=n?e.clipPos(n):r(0,0),this.pos={from:n,to:n},"object"==typeof i?a=i.caseFold:(a=i,i=null),"string"==typeof t?(null==a&&(a=!1),this.matches=function(n,r){return(n?p:h)(e,t,r,a)}):(t=o(t,"gm"),i&&!1===i.multiline?this.matches=function(n,r){return(n?c:l)(e,t,r)}:this.matches=function(n,r){return(n?f:u)(e,t,r)})}String.prototype.normalize?(t=function(e){return e.normalize("NFD").toLowerCase()},n=function(e){return e.normalize("NFD")}):(t=function(e){return e.toLowerCase()},n=function(e){return e}),g.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(t){var n=this.doc.clipPos(t?this.pos.from:this.pos.to);if(this.afterEmptyMatch&&this.atOccurrence&&(n=r(n.line,n.ch),t?(n.ch--,n.ch<0&&(n.line--,n.ch=(this.doc.getLine(n.line)||"").length)):(n.ch++,n.ch>(this.doc.getLine(n.line)||"").length&&(n.ch=0,n.line++)),0!=e.cmpPos(n,this.doc.clipPos(n))))return this.atOccurrence=!1;var i=this.matches(t,n);if(this.afterEmptyMatch=i&&0==e.cmpPos(i.from,i.to),i)return this.pos=i,this.atOccurrence=!0,this.pos.match||!0;var o=r(t?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:o,to:o},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(t,n){if(this.atOccurrence){var i=e.splitLines(t);this.doc.replaceRange(i,this.pos.from,this.pos.to,n),this.pos.to=r(this.pos.from.line+i.length-1,i[i.length-1].length+(1==i.length?this.pos.from.ch:0))}}},e.defineExtension("getSearchCursor",(function(e,t,n){return new g(this.doc,e,t,n)})),e.defineDocExtension("getSearchCursor",(function(e,t,n){return new g(this,e,t,n)})),e.defineExtension("selectMatches",(function(t,n){for(var r=[],i=this.getSearchCursor(t,this.getCursor("from"),n);i.findNext()&&!(e.cmpPos(i.to(),this.getCursor("to"))>0);)r.push({anchor:i.from(),head:i.to()});r.length&&this.setSelections(r,0)}))}(n(4631))},64020:(e,t,n)=>{!function(e){"use strict";function t(e){e.state.markedSelection&&e.operation((function(){s(e)}))}function n(e){e.state.markedSelection&&e.state.markedSelection.length&&e.operation((function(){l(e)}))}e.defineOption("styleSelectedText",!1,(function(r,i,o){var a=o&&o!=e.Init;i&&!a?(r.state.markedSelection=[],r.state.markedSelectionStyle="string"==typeof i?i:"CodeMirror-selectedtext",u(r),r.on("cursorActivity",t),r.on("change",n)):!i&&a&&(r.off("cursorActivity",t),r.off("change",n),l(r),r.state.markedSelection=r.state.markedSelectionStyle=null)}));var r=8,i=e.Pos,o=e.cmpPos;function a(e,t,n,a){if(0!=o(t,n))for(var l=e.state.markedSelection,u=e.state.markedSelectionStyle,s=t.line;;){var c=s==t.line?t:i(s,0),f=s+r,d=f>=n.line,h=d?n:i(f,0),p=e.markText(c,h,{className:u});if(null==a?l.push(p):l.splice(a++,0,p),d)break;s=f}}function l(e){for(var t=e.state.markedSelection,n=0;n<t.length;++n)t[n].clear();t.length=0}function u(e){l(e);for(var t=e.listSelections(),n=0;n<t.length;n++)a(e,t[n].from(),t[n].to())}function s(e){if(!e.somethingSelected())return l(e);if(e.listSelections().length>1)return u(e);var t=e.getCursor("start"),n=e.getCursor("end"),i=e.state.markedSelection;if(!i.length)return a(e,t,n);var s=i[0].find(),c=i[i.length-1].find();if(!s||!c||n.line-t.line<=r||o(t,c.to)>=0||o(n,s.from)<=0)return u(e);for(;o(t,s.from)>0;)i.shift().clear(),s=i[0].find();for(o(t,s.from)<0&&(s.to.line-t.line<r?(i.shift().clear(),a(e,t,s.to,0)):a(e,t,s.from,0));o(n,c.to)<0;)i.pop().clear(),c=i[i.length-1].find();o(n,c.to)>0&&(n.line-c.from.line<r?(i.pop().clear(),a(e,c.from,n)):a(e,c.to,n))}}(n(4631))},4631:function(e){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),a=r||i||o,l=a&&(r?document.documentMode||6:+(o||i)[1]),u=!o&&/WebKit\//.test(e),s=u&&/Qt\/\d+\.\d+/.test(e),c=!o&&/Chrome\/(\d+)/.exec(e),f=c&&+c[1],d=/Opera\//.test(e),h=/Apple Computer/.test(navigator.vendor),p=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),g=/PhantomJS/.test(e),m=h&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),v=/Android/.test(e),y=m||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),E=m||/Mac/.test(t),_=/\bCrOS\b/.test(e),x=/win/i.test(t),b=d&&e.match(/Version\/(\d*\.\d*)/);b&&(b=Number(b[1])),b&&b>=15&&(d=!1,u=!0);var w=E&&(s||d&&(null==b||b<12.11)),D=n||a&&l>=9;function T(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var I,A=function(e,t){var n=e.className,r=T(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function C(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function S(e,t){return C(e).appendChild(t)}function O(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function L(e,t,n,r){var i=O(e,t,n,r);return i.setAttribute("role","presentation"),i}function R(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function k(e){var t;try{t=e.activeElement}catch(n){t=e.body||null}for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function M(e,t){var n=e.className;T(t).test(n)||(e.className+=(n?" ":"")+t)}function F(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!T(n[r]).test(t)&&(t+=" "+n[r]);return t}I=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(e){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var N=function(e){e.select()};function P(e){return e.display.wrapper.ownerDocument}function B(e){return P(e).defaultView}function G(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function z(e,t,n){for(var r in t||(t={}),e)!e.hasOwnProperty(r)||!1===n&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function U(e,t,n,r,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=r||0,a=i||0;;){var l=e.indexOf("\t",o);if(l<0||l>=t)return a+(t-o);a+=l-o,a+=n-a%n,o=l+1}}m?N=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(N=function(e){try{e.select()}catch(e){}});var W=function(){this.id=null,this.f=null,this.time=0,this.handler=G(this.onTimeout,this)};function H(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}W.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},W.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};var q=50,V={toString:function(){return"CodeMirror.Pass"}},j={scroll:!1},Y={origin:"*mouse"},X={origin:"+move"};function $(e,t,n){for(var r=0,i=0;;){var o=e.indexOf("\t",r);-1==o&&(o=e.length);var a=o-r;if(o==e.length||i+a>=t)return r+Math.min(a,t-i);if(i+=o-r,r=o+1,(i+=n-i%n)>=t)return r}}var Z=[""];function K(e){for(;Z.length<=e;)Z.push(Q(Z)+" ");return Z[e]}function Q(e){return e[e.length-1]}function J(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function ee(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}function te(){}function ne(e,t){var n;return Object.create?n=Object.create(e):(te.prototype=e,n=new te),t&&z(t,n),n}var re=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ie(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||re.test(e))}function oe(e,t){return t?!!(t.source.indexOf("\\w")>-1&&ie(e))||t.test(e):ie(e)}function ae(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var le=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ue(e){return e.charCodeAt(0)>=768&&le.test(e)}function se(e,t,n){for(;(n<0?t>0:t<e.length)&&ue(e.charAt(t));)t+=n;return t}function ce(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}function fe(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var a=e[o];(a.from<n&&a.to>t||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}var de=null;function he(e,t,n){var r;de=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:de=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:de=i)}return null!=r?r:de}var pe=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(n){return n<=247?e.charAt(n):1424<=n&&n<=1524?"R":1536<=n&&n<=1785?t.charAt(n-1536):1774<=n&&n<=2220?"r":8192<=n&&n<=8203?"w":8204==n?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,a=/[Lb1n]/,l=/[1n]/;function u(e,t,n){this.level=e,this.from=t,this.to=n}return function(e,t){var s="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!r.test(e))return!1;for(var c=e.length,f=[],d=0;d<c;++d)f.push(n(e.charCodeAt(d)));for(var h=0,p=s;h<c;++h){var g=f[h];"m"==g?f[h]=p:p=g}for(var m=0,v=s;m<c;++m){var y=f[m];"1"==y&&"r"==v?f[m]="n":o.test(y)&&(v=y,"r"==y&&(f[m]="R"))}for(var E=1,_=f[0];E<c-1;++E){var x=f[E];"+"==x&&"1"==_&&"1"==f[E+1]?f[E]="1":","!=x||_!=f[E+1]||"1"!=_&&"n"!=_||(f[E]=_),_=x}for(var b=0;b<c;++b){var w=f[b];if(","==w)f[b]="N";else if("%"==w){var D=void 0;for(D=b+1;D<c&&"%"==f[D];++D);for(var T=b&&"!"==f[b-1]||D<c&&"1"==f[D]?"1":"N",I=b;I<D;++I)f[I]=T;b=D-1}}for(var A=0,C=s;A<c;++A){var S=f[A];"L"==C&&"1"==S?f[A]="L":o.test(S)&&(C=S)}for(var O=0;O<c;++O)if(i.test(f[O])){var L=void 0;for(L=O+1;L<c&&i.test(f[L]);++L);for(var R="L"==(O?f[O-1]:s),k=R==("L"==(L<c?f[L]:s))?R?"L":"R":s,M=O;M<L;++M)f[M]=k;O=L-1}for(var F,N=[],P=0;P<c;)if(a.test(f[P])){var B=P;for(++P;P<c&&a.test(f[P]);++P);N.push(new u(0,B,P))}else{var G=P,z=N.length,U="rtl"==t?1:0;for(++P;P<c&&"L"!=f[P];++P);for(var W=G;W<P;)if(l.test(f[W])){G<W&&(N.splice(z,0,new u(1,G,W)),z+=U);var H=W;for(++W;W<P&&l.test(f[W]);++W);N.splice(z,0,new u(2,H,W)),z+=U,G=W}else++W;G<P&&N.splice(z,0,new u(1,G,P))}return"ltr"==t&&(1==N[0].level&&(F=e.match(/^\s+/))&&(N[0].from=F[0].length,N.unshift(new u(0,0,F[0].length))),1==Q(N).level&&(F=e.match(/\s+$/))&&(Q(N).to-=F[0].length,N.push(new u(0,c-F[0].length,c)))),"rtl"==t?N.reverse():N}}();function ge(e,t){var n=e.order;return null==n&&(n=e.order=pe(e.text,t)),n}var me=[],ve=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||me).concat(n)}};function ye(e,t){return e._handlers&&e._handlers[t]||me}function Ee(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,i=r&&r[t];if(i){var o=H(i,n);o>-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function _e(e,t){var n=ye(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)}function xe(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),_e(e,n||t.type,e,t),Ae(t)||t.codemirrorIgnore}function be(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)-1==H(n,t[r])&&n.push(t[r])}function we(e,t){return ye(e,t).length>0}function De(e){e.prototype.on=function(e,t){ve(this,e,t)},e.prototype.off=function(e,t){Ee(this,e,t)}}function Te(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Ie(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ae(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Ce(e){Te(e),Ie(e)}function Se(e){return e.target||e.srcElement}function Oe(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),E&&e.ctrlKey&&1==t&&(t=3),t}var Le,Re,ke=function(){if(a&&l<9)return!1;var e=O("div");return"draggable"in e||"dragDrop"in e}();function Me(e){if(null==Le){var t=O("span","​");S(e,O("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Le=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&l<8))}var n=Le?O("span","​"):O("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Fe(e){if(null!=Re)return Re;var t=S(e,document.createTextNode("AخA")),n=I(t,0,1).getBoundingClientRect(),r=I(t,1,2).getBoundingClientRect();return C(e),!(!n||n.left==n.right)&&(Re=r.right-n.right<3)}var Ne,Pe=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Be=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Ge="oncopy"in(Ne=O("div"))||(Ne.setAttribute("oncopy","return;"),"function"==typeof Ne.oncopy),ze=null;function Ue(e){if(null!=ze)return ze;var t=S(e,O("span","x")),n=t.getBoundingClientRect(),r=I(t,0,1).getBoundingClientRect();return ze=Math.abs(n.left-r.left)>1}var We={},He={};function qe(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),We[e]=t}function Ve(e,t){He[e]=t}function je(e){if("string"==typeof e&&He.hasOwnProperty(e))e=He[e];else if(e&&"string"==typeof e.name&&He.hasOwnProperty(e.name)){var t=He[e.name];"string"==typeof t&&(t={name:t}),(e=ne(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return je("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return je("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ye(e,t){t=je(t);var n=We[t.name];if(!n)return Ye(e,"text/plain");var r=n(e,t);if(Xe.hasOwnProperty(t.name)){var i=Xe[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}var Xe={};function $e(e,t){z(t,Xe.hasOwnProperty(e)?Xe[e]:Xe[e]={})}function Ze(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Ke(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Qe(e,t,n){return!e.startState||e.startState(t,n)}var Je=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function et(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t<o){n=i;break}t-=o}return n.lines[t]}function tt(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,(function(e){var o=e.text;i==n.line&&(o=o.slice(0,n.ch)),i==t.line&&(o=o.slice(t.ch)),r.push(o),++i})),r}function nt(e,t,n){var r=[];return e.iter(t,n,(function(e){r.push(e.text)})),r}function rt(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function it(e){if(null==e.parent)return null;for(var t=e.parent,n=H(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function ot(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],o=i.height;if(t<o){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(var a=0;a<e.lines.length;++a){var l=e.lines[a].height;if(t<l)break;t-=l}return n+a}function at(e,t){return t>=e.first&&t<e.first+e.size}function lt(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function ut(e,t,n){if(void 0===n&&(n=null),!(this instanceof ut))return new ut(e,t,n);this.line=e,this.ch=t,this.sticky=n}function st(e,t){return e.line-t.line||e.ch-t.ch}function ct(e,t){return e.sticky==t.sticky&&0==st(e,t)}function ft(e){return ut(e.line,e.ch)}function dt(e,t){return st(e,t)<0?t:e}function ht(e,t){return st(e,t)<0?e:t}function pt(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function gt(e,t){if(t.line<e.first)return ut(e.first,0);var n=e.first+e.size-1;return t.line>n?ut(n,et(e,n).text.length):mt(t,et(e,t.line).text.length)}function mt(e,t){var n=e.ch;return null==n||n>t?ut(e.line,t):n<0?ut(e.line,0):e}function vt(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=gt(e,t[r]);return n}Je.prototype.eol=function(){return this.pos>=this.string.length},Je.prototype.sol=function(){return this.pos==this.lineStart},Je.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Je.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Je.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},Je.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Je.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Je.prototype.skipToEnd=function(){this.pos=this.string.length},Je.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Je.prototype.backUp=function(e){this.pos-=e},Je.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=U(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?U(this.string,this.lineStart,this.tabSize):0)},Je.prototype.indentation=function(){return U(this.string,null,this.tabSize)-(this.lineStart?U(this.string,this.lineStart,this.tabSize):0)},Je.prototype.match=function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},Je.prototype.current=function(){return this.string.slice(this.start,this.pos)},Je.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Je.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Je.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var yt=function(e,t){this.state=e,this.lookAhead=t},Et=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function _t(e,t,n,r){var i=[e.state.modeGen],o={};St(e,t.text,e.doc.mode,n,(function(e,t){return i.push(e,t)}),o,r);for(var a=n.state,l=function(r){n.baseTokens=i;var l=e.state.overlays[r],u=1,s=0;n.state=!0,St(e,t.text,l.mode,n,(function(e,t){for(var n=u;s<e;){var r=i[u];r>e&&i.splice(u,1,e,i[u+1],r),u+=2,s=Math.min(e,r)}if(t)if(l.opaque)i.splice(n,u-n,e,"overlay "+t),u=n+2;else for(;n<u;n+=2){var o=i[n+1];i[n+1]=(o?o+" ":"")+"overlay "+t}}),o),n.state=a,n.baseTokens=null,n.baseTokenPos=1},u=0;u<e.state.overlays.length;++u)l(u);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function xt(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=bt(e,it(t)),i=t.text.length>e.options.maxHighlightLength&&Ze(e.doc.mode,r.state),o=_t(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function bt(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new Et(r,!0,t);var o=Ot(e,t,n),a=o>r.first&&et(r,o-1).stateAfter,l=a?Et.fromSaved(r,a,o):new Et(r,Qe(r.mode),o);return r.iter(o,t,(function(n){wt(e,n.text,l);var r=l.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&r<i.viewTo?l.save():null,l.nextLine()})),n&&(r.modeFrontier=l.line),l}function wt(e,t,n,r){var i=e.doc.mode,o=new Je(t,e.options.tabSize,n);for(o.start=o.pos=r||0,""==t&&Dt(i,n.state);!o.eol();)Tt(i,o,n.state),o.start=o.pos}function Dt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=Ke(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function Tt(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=Ke(e,n).mode);var o=e.token(t,n);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}Et.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Et.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Et.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Et.fromSaved=function(e,t,n){return t instanceof yt?new Et(e,Ze(e.mode,t.state),n,t.lookAhead):new Et(e,Ze(e.mode,t),n)},Et.prototype.save=function(e){var t=!1!==e?Ze(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new yt(t,this.maxLookAhead):t};var It=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function At(e,t,n,r){var i,o,a=e.doc,l=a.mode,u=et(a,(t=gt(a,t)).line),s=bt(e,t.line,n),c=new Je(u.text,e.options.tabSize,s);for(r&&(o=[]);(r||c.pos<t.ch)&&!c.eol();)c.start=c.pos,i=Tt(l,c,s.state),r&&o.push(new It(c,i,Ze(a.mode,s.state)));return r?o:new It(c,i,s.state)}function Ct(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";null==t[r]?t[r]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+n[2])}return e}function St(e,t,n,r,i,o,a){var l=n.flattenSpans;null==l&&(l=e.options.flattenSpans);var u,s=0,c=null,f=new Je(t,e.options.tabSize,r),d=e.options.addModeClass&&[null];for(""==t&&Ct(Dt(n,r.state),o);!f.eol();){if(f.pos>e.options.maxHighlightLength?(l=!1,a&&wt(e,t,r,f.pos),f.pos=t.length,u=null):u=Ct(Tt(n,f,r.state,d),o),d){var h=d[0].name;h&&(u="m-"+(u?h+" "+u:h))}if(!l||c!=u){for(;s<f.start;)i(s=Math.min(f.start,s+5e3),c);c=u}f.start=f.pos}for(;s<f.pos;){var p=Math.min(f.pos,s+5e3);i(p,c),s=p}}function Ot(e,t,n){for(var r,i,o=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),l=t;l>a;--l){if(l<=o.first)return o.first;var u=et(o,l-1),s=u.stateAfter;if(s&&(!n||l+(s instanceof yt?s.lookAhead:0)<=o.modeFrontier))return l;var c=U(u.text,null,e.options.tabSize);(null==i||r>c)&&(i=l-1,r=c)}return i}function Lt(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,r=t-1;r>n;r--){var i=et(e,r).stateAfter;if(i&&(!(i instanceof yt)||r+i.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}var Rt=!1,kt=!1;function Mt(){Rt=!0}function Ft(){kt=!0}function Nt(e,t,n){this.marker=e,this.from=t,this.to=n}function Pt(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function Bt(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function Gt(e,t,n){var r=n&&window.WeakSet&&(n.markedSpans||(n.markedSpans=new WeakSet));r&&e.markedSpans&&r.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],r&&r.add(e.markedSpans)),t.marker.attachLine(e)}function zt(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker;if(null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t)||o.from==t&&"bookmark"==a.type&&(!n||!o.marker.insertLeft)){var l=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);(r||(r=[])).push(new Nt(a,o.from,l?null:o.to))}}return r}function Ut(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker;if(null==o.to||(a.inclusiveRight?o.to>=t:o.to>t)||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var l=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);(r||(r=[])).push(new Nt(a,l?null:o.from-t,null==o.to?null:o.to-t))}}return r}function Wt(e,t){if(t.full)return null;var n=at(e,t.from.line)&&et(e,t.from.line).markedSpans,r=at(e,t.to.line)&&et(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,o=t.to.ch,a=0==st(t.from,t.to),l=zt(n,i,a),u=Ut(r,o,a),s=1==t.text.length,c=Q(t.text).length+(s?i:0);if(l)for(var f=0;f<l.length;++f){var d=l[f];if(null==d.to){var h=Pt(u,d.marker);h?s&&(d.to=null==h.to?null:h.to+c):d.to=i}}if(u)for(var p=0;p<u.length;++p){var g=u[p];null!=g.to&&(g.to+=c),null==g.from?Pt(l,g.marker)||(g.from=c,s&&(l||(l=[])).push(g)):(g.from+=c,s&&(l||(l=[])).push(g))}l&&(l=Ht(l)),u&&u!=l&&(u=Ht(u));var m=[l];if(!s){var v,y=t.text.length-2;if(y>0&&l)for(var E=0;E<l.length;++E)null==l[E].to&&(v||(v=[])).push(new Nt(l[E].marker,null,null));for(var _=0;_<y;++_)m.push(v);m.push(u)}return m}function Ht(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function qt(e,t,n){var r=null;if(e.iter(t.line,n.line+1,(function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||r&&-1!=H(r,n)||(r||(r=[])).push(n)}})),!r)return null;for(var i=[{from:t,to:n}],o=0;o<r.length;++o)for(var a=r[o],l=a.find(0),u=0;u<i.length;++u){var s=i[u];if(!(st(s.to,l.from)<0||st(s.from,l.to)>0)){var c=[u,1],f=st(s.from,l.from),d=st(s.to,l.to);(f<0||!a.inclusiveLeft&&!f)&&c.push({from:s.from,to:l.from}),(d>0||!a.inclusiveRight&&!d)&&c.push({from:l.to,to:s.to}),i.splice.apply(i,c),u+=c.length-3}}return i}function Vt(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function jt(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function Yt(e){return e.inclusiveLeft?-1:0}function Xt(e){return e.inclusiveRight?1:0}function $t(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var r=e.find(),i=t.find(),o=st(r.from,i.from)||Yt(e)-Yt(t);if(o)return-o;var a=st(r.to,i.to)||Xt(e)-Xt(t);return a||t.id-e.id}function Zt(e,t){var n,r=kt&&e.markedSpans;if(r)for(var i=void 0,o=0;o<r.length;++o)(i=r[o]).marker.collapsed&&null==(t?i.from:i.to)&&(!n||$t(n,i.marker)<0)&&(n=i.marker);return n}function Kt(e){return Zt(e,!0)}function Qt(e){return Zt(e,!1)}function Jt(e,t){var n,r=kt&&e.markedSpans;if(r)for(var i=0;i<r.length;++i){var o=r[i];o.marker.collapsed&&(null==o.from||o.from<t)&&(null==o.to||o.to>t)&&(!n||$t(n,o.marker)<0)&&(n=o.marker)}return n}function en(e,t,n,r,i){var o=et(e,t),a=kt&&o.markedSpans;if(a)for(var l=0;l<a.length;++l){var u=a[l];if(u.marker.collapsed){var s=u.marker.find(0),c=st(s.from,n)||Yt(u.marker)-Yt(i),f=st(s.to,r)||Xt(u.marker)-Xt(i);if(!(c>=0&&f<=0||c<=0&&f>=0)&&(c<=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?st(s.to,n)>=0:st(s.to,n)>0)||c>=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?st(s.from,r)<=0:st(s.from,r)<0)))return!0}}}function tn(e){for(var t;t=Kt(e);)e=t.find(-1,!0).line;return e}function nn(e){for(var t;t=Qt(e);)e=t.find(1,!0).line;return e}function rn(e){for(var t,n;t=Qt(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function on(e,t){var n=et(e,t),r=tn(n);return n==r?t:it(r)}function an(e,t){if(t>e.lastLine())return t;var n,r=et(e,t);if(!ln(e,r))return t;for(;n=Qt(r);)r=n.find(1,!0).line;return it(r)+1}function ln(e,t){var n=kt&&t.markedSpans;if(n)for(var r=void 0,i=0;i<n.length;++i)if((r=n[i]).marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&un(e,t,r))return!0}}function un(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return un(e,r.line,Pt(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if((i=t.markedSpans[o]).marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(null==i.to||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&un(e,t,i))return!0}function sn(e){for(var t=0,n=(e=tn(e)).parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var o=n.parent;o;o=(n=o).parent)for(var a=0;a<o.children.length;++a){var l=o.children[a];if(l==n)break;t+=l.height}return t}function cn(e){if(0==e.height)return 0;for(var t,n=e.text.length,r=e;t=Kt(r);){var i=t.find(0,!0);r=i.from.line,n+=i.from.ch-i.to.ch}for(r=e;t=Qt(r);){var o=t.find(0,!0);n-=r.text.length-o.from.ch,n+=(r=o.to.line).text.length-o.to.ch}return n}function fn(e){var t=e.display,n=e.doc;t.maxLine=et(n,n.first),t.maxLineLength=cn(t.maxLine),t.maxLineChanged=!0,n.iter((function(e){var n=cn(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var dn=function(e,t,n){this.text=e,jt(this,t),this.height=n?n(this):1};function hn(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Vt(e),jt(e,n);var i=r?r(e):1;i!=e.height&&rt(e,i)}function pn(e){e.parent=null,Vt(e)}dn.prototype.lineNo=function(){return it(this)},De(dn);var gn={},mn={};function vn(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?mn:gn;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function yn(e,t){var n=L("span",null,null,u?"padding-right: .1px":null),r={pre:L("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,a=void 0;r.pos=0,r.addToken=_n,Fe(e.display.measure)&&(a=ge(o,e.doc.direction))&&(r.addToken=bn(r.addToken,a)),r.map=[],Dn(o,r,xt(e,o,t!=e.display.externalMeasured&&it(o))),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=F(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=F(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Me(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(u){var l=r.content.lastChild;(/\bcm-tab\b/.test(l.className)||l.querySelector&&l.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return _e(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=F(r.pre.className,r.textClass||"")),r}function En(e){var t=O("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function _n(e,t,n,r,i,o,u){if(t){var s,c=e.splitSpaces?xn(t,e.trailingSpace):t,f=e.cm.state.specialChars,d=!1;if(f.test(t)){s=document.createDocumentFragment();for(var h=0;;){f.lastIndex=h;var p=f.exec(t),g=p?p.index-h:t.length-h;if(g){var m=document.createTextNode(c.slice(h,h+g));a&&l<9?s.appendChild(O("span",[m])):s.appendChild(m),e.map.push(e.pos,e.pos+g,m),e.col+=g,e.pos+=g}if(!p)break;h+=g+1;var v=void 0;if("\t"==p[0]){var y=e.cm.options.tabSize,E=y-e.col%y;(v=s.appendChild(O("span",K(E),"cm-tab"))).setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),e.col+=E}else"\r"==p[0]||"\n"==p[0]?((v=s.appendChild(O("span","\r"==p[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",p[0]),e.col+=1):((v=e.cm.options.specialCharPlaceholder(p[0])).setAttribute("cm-text",p[0]),a&&l<9?s.appendChild(O("span",[v])):s.appendChild(v),e.col+=1);e.map.push(e.pos,e.pos+1,v),e.pos++}}else e.col+=t.length,s=document.createTextNode(c),e.map.push(e.pos,e.pos+t.length,s),a&&l<9&&(d=!0),e.pos+=t.length;if(e.trailingSpace=32==c.charCodeAt(t.length-1),n||r||i||d||o||u){var _=n||"";r&&(_+=r),i&&(_+=i);var x=O("span",[s],_,o);if(u)for(var b in u)u.hasOwnProperty(b)&&"style"!=b&&"class"!=b&&x.setAttribute(b,u[b]);return e.content.appendChild(x)}e.content.appendChild(s)}}function xn(e,t){if(e.length>1&&!/  /.test(e))return e;for(var n=t,r="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!n||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=" "),r+=o,n=" "==o}return r}function bn(e,t){return function(n,r,i,o,a,l,u){i=i?i+" cm-force-border":"cm-force-border";for(var s=n.pos,c=s+r.length;;){for(var f=void 0,d=0;d<t.length&&!((f=t[d]).to>s&&f.from<=s);d++);if(f.to>=c)return e(n,r,i,o,a,l,u);e(n,r.slice(0,f.to-s),i,o,null,l,u),o=null,r=r.slice(f.to-s),s=f.to}}}function wn(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function Dn(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,l,u,s,c,f,d,h=i.length,p=0,g=1,m="",v=0;;){if(v==p){u=s=c=l="",d=null,f=null,v=1/0;for(var y=[],E=void 0,_=0;_<r.length;++_){var x=r[_],b=x.marker;if("bookmark"==b.type&&x.from==p&&b.widgetNode)y.push(b);else if(x.from<=p&&(null==x.to||x.to>p||b.collapsed&&x.to==p&&x.from==p)){if(null!=x.to&&x.to!=p&&v>x.to&&(v=x.to,s=""),b.className&&(u+=" "+b.className),b.css&&(l=(l?l+";":"")+b.css),b.startStyle&&x.from==p&&(c+=" "+b.startStyle),b.endStyle&&x.to==v&&(E||(E=[])).push(b.endStyle,x.to),b.title&&((d||(d={})).title=b.title),b.attributes)for(var w in b.attributes)(d||(d={}))[w]=b.attributes[w];b.collapsed&&(!f||$t(f.marker,b)<0)&&(f=x)}else x.from>p&&v>x.from&&(v=x.from)}if(E)for(var D=0;D<E.length;D+=2)E[D+1]==v&&(s+=" "+E[D]);if(!f||f.from==p)for(var T=0;T<y.length;++T)wn(t,0,y[T]);if(f&&(f.from||0)==p){if(wn(t,(null==f.to?h+1:f.to)-p,f.marker,null==f.from),null==f.to)return;f.to==p&&(f=!1)}}if(p>=h)break;for(var I=Math.min(h,v);;){if(m){var A=p+m.length;if(!f){var C=A>I?m.slice(0,I-p):m;t.addToken(t,C,a?a+u:u,c,p+C.length==v?s:"",l,d)}if(A>=I){m=m.slice(I-p),p=I;break}p=A,c=""}m=i.slice(o,o=n[g++]),a=vn(n[g++],t.cm.options)}}else for(var S=1;S<n.length;S+=2)t.addToken(t,i.slice(o,o=n[S]),vn(n[S+1],t.cm.options))}function Tn(e,t,n){this.line=t,this.rest=rn(t),this.size=this.rest?it(Q(this.rest))-n+1:1,this.node=this.text=null,this.hidden=ln(e,t)}function In(e,t,n){for(var r,i=[],o=t;o<n;o=r){var a=new Tn(e.doc,et(e.doc,o),o);r=o+a.size,i.push(a)}return i}var An=null;function Cn(e){An?An.ops.push(e):e.ownsGroup=An={ops:[e],delayedCallbacks:[]}}function Sn(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<t.length)}function On(e,t){var n=e.ownsGroup;if(n)try{Sn(n)}finally{An=null,t(n)}}var Ln=null;function Rn(e,t){var n=ye(e,t);if(n.length){var r,i=Array.prototype.slice.call(arguments,2);An?r=An.delayedCallbacks:Ln?r=Ln:(r=Ln=[],setTimeout(kn,0));for(var o=function(e){r.push((function(){return n[e].apply(null,i)}))},a=0;a<n.length;++a)o(a)}}function kn(){var e=Ln;Ln=null;for(var t=0;t<e.length;++t)e[t]()}function Mn(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?Bn(e,t):"gutter"==o?zn(e,t,n,r):"class"==o?Gn(e,t):"widget"==o&&Un(e,t,r)}t.changes=null}function Fn(e){return e.node==e.text&&(e.node=O("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),a&&l<8&&(e.node.style.zIndex=2)),e.node}function Nn(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=Fn(t);t.background=r.insertBefore(O("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}function Pn(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):yn(e,t)}function Bn(e,t){var n=t.text.className,r=Pn(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,Gn(e,t)):n&&(t.text.className=n)}function Gn(e,t){Nn(e,t),t.line.wrapClass?Fn(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function zn(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=Fn(t);t.gutterBackground=O("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var a=Fn(t),l=t.gutter=O("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(l.setAttribute("aria-hidden","true"),e.display.input.setUneditable(l),a.insertBefore(l,t.text),t.line.gutterClass&&(l.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=l.appendChild(O("div",lt(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var u=0;u<e.display.gutterSpecs.length;++u){var s=e.display.gutterSpecs[u].className,c=o.hasOwnProperty(s)&&o[s];c&&l.appendChild(O("div",[c],"CodeMirror-gutter-elt","left: "+r.gutterLeft[s]+"px; width: "+r.gutterWidth[s]+"px"))}}}function Un(e,t,n){t.alignable&&(t.alignable=null);for(var r=T("CodeMirror-linewidget"),i=t.node.firstChild,o=void 0;i;i=o)o=i.nextSibling,r.test(i.className)&&t.node.removeChild(i);Hn(e,t,n)}function Wn(e,t,n,r){var i=Pn(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),Gn(e,t),zn(e,t,n,r),Hn(e,t,r),t.node}function Hn(e,t,n){if(qn(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)qn(e,t.rest[r],t,n,!1)}function qn(e,t,n,r,i){if(t.widgets)for(var o=Fn(n),a=0,l=t.widgets;a<l.length;++a){var u=l[a],s=O("div",[u.node],"CodeMirror-linewidget"+(u.className?" "+u.className:""));u.handleMouseEvents||s.setAttribute("cm-ignore-events","true"),Vn(u,s,n,r),e.display.input.setUneditable(s),i&&u.above?o.insertBefore(s,n.gutter||n.text):o.appendChild(s),Rn(u,"redraw")}}function Vn(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var i=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(i-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function jn(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!R(document.body,e.node)){var n="position: relative;";e.coverGutter&&(n+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(n+="width: "+t.display.wrapper.clientWidth+"px;"),S(t.display.measure,O("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function Yn(e,t){for(var n=Se(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function Xn(e){return e.lineSpace.offsetTop}function $n(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Zn(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=S(e.measure,O("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(r.left)||isNaN(r.right)||(e.cachedPaddingH=r),r}function Kn(e){return q-e.display.nativeBarWidth}function Qn(e){return e.display.scroller.clientWidth-Kn(e)-e.display.barWidth}function Jn(e){return e.display.scroller.clientHeight-Kn(e)-e.display.barHeight}function er(e,t,n){var r=e.options.lineWrapping,i=r&&Qn(e);if(!t.measure.heights||r&&t.measure.width!=i){var o=t.measure.heights=[];if(r){t.measure.width=i;for(var a=t.text.firstChild.getClientRects(),l=0;l<a.length-1;l++){var u=a[l],s=a[l+1];Math.abs(u.bottom-s.bottom)>2&&o.push((u.bottom+s.top)/2-n.top)}}o.push(n.bottom-n.top)}}function tr(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var i=0;i<e.rest.length;i++)if(it(e.rest[i])>n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function nr(e,t){var n=it(t=tn(t)),r=e.display.externalMeasured=new Tn(e.doc,t,n);r.lineN=n;var i=r.built=yn(e,r);return r.text=i.pre,S(e.display.lineMeasure,i.pre),r}function rr(e,t,n,r){return ar(e,or(e,t),n,r)}function ir(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Gr(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function or(e,t){var n=it(t),r=ir(e,n);r&&!r.text?r=null:r&&r.changes&&(Mn(e,r,n,Mr(e)),e.curOp.forceUpdate=!0),r||(r=nr(e,t));var i=tr(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function ar(e,t,n,r,i){t.before&&(n=-1);var o,a=n+(r||"");return t.cache.hasOwnProperty(a)?o=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(er(e,t.view,t.rect),t.hasHeights=!0),(o=fr(e,t,n,r)).bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var lr,ur={left:0,right:0,top:0,bottom:0};function sr(e,t,n){for(var r,i,o,a,l,u,s=0;s<e.length;s+=3)if(l=e[s],u=e[s+1],t<l?(i=0,o=1,a="left"):t<u?o=1+(i=t-l):(s==e.length-3||t==u&&e[s+3]>t)&&(i=(o=u-l)-1,t>=u&&(a="right")),null!=i){if(r=e[s+2],l==u&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;s&&e[s-2]==e[s-3]&&e[s-1].insertLeft;)r=e[2+(s-=3)],a="left";if("right"==n&&i==u-l)for(;s<e.length-3&&e[s+3]==e[s+4]&&!e[s+5].insertLeft;)r=e[(s+=3)+2],a="right";break}return{node:r,start:i,end:o,collapse:a,coverStart:l,coverEnd:u}}function cr(e,t){var n=ur;if("left"==t)for(var r=0;r<e.length&&(n=e[r]).left==n.right;r++);else for(var i=e.length-1;i>=0&&(n=e[i]).left==n.right;i--);return n}function fr(e,t,n,r){var i,o=sr(t.map,n,r),u=o.node,s=o.start,c=o.end,f=o.collapse;if(3==u.nodeType){for(var d=0;d<4;d++){for(;s&&ue(t.line.text.charAt(o.coverStart+s));)--s;for(;o.coverStart+c<o.coverEnd&&ue(t.line.text.charAt(o.coverStart+c));)++c;if((i=a&&l<9&&0==s&&c==o.coverEnd-o.coverStart?u.parentNode.getBoundingClientRect():cr(I(u,s,c).getClientRects(),r)).left||i.right||0==s)break;c=s,s-=1,f="right"}a&&l<11&&(i=dr(e.display.measure,i))}else{var h;s>0&&(f=r="right"),i=e.options.lineWrapping&&(h=u.getClientRects()).length>1?h["right"==r?h.length-1:0]:u.getBoundingClientRect()}if(a&&l<9&&!s&&(!i||!i.left&&!i.right)){var p=u.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+kr(e.display),top:p.top,bottom:p.bottom}:ur}for(var g=i.top-t.rect.top,m=i.bottom-t.rect.top,v=(g+m)/2,y=t.view.measure.heights,E=0;E<y.length-1&&!(v<y[E]);E++);var _=E?y[E-1]:0,x=y[E],b={left:("right"==f?i.right:i.left)-t.rect.left,right:("left"==f?i.left:i.right)-t.rect.left,top:_,bottom:x};return i.left||i.right||(b.bogus=!0),e.options.singleCursorHeightPerLine||(b.rtop=g,b.rbottom=m),b}function dr(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!Ue(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}function hr(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function pr(e){e.display.externalMeasure=null,C(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)hr(e.display.view[t])}function gr(e){pr(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function mr(e){return c&&v?-(e.body.getBoundingClientRect().left-parseInt(getComputedStyle(e.body).marginLeft)):e.defaultView.pageXOffset||(e.documentElement||e.body).scrollLeft}function vr(e){return c&&v?-(e.body.getBoundingClientRect().top-parseInt(getComputedStyle(e.body).marginTop)):e.defaultView.pageYOffset||(e.documentElement||e.body).scrollTop}function yr(e){var t=tn(e).widgets,n=0;if(t)for(var r=0;r<t.length;++r)t[r].above&&(n+=jn(t[r]));return n}function Er(e,t,n,r,i){if(!i){var o=yr(t);n.top+=o,n.bottom+=o}if("line"==r)return n;r||(r="local");var a=sn(t);if("local"==r?a+=Xn(e.display):a-=e.display.viewOffset,"page"==r||"window"==r){var l=e.display.lineSpace.getBoundingClientRect();a+=l.top+("window"==r?0:vr(P(e)));var u=l.left+("window"==r?0:mr(P(e)));n.left+=u,n.right+=u}return n.top+=a,n.bottom+=a,n}function _r(e,t,n){if("div"==n)return t;var r=t.left,i=t.top;if("page"==n)r-=mr(P(e)),i-=vr(P(e));else if("local"==n||!n){var o=e.display.sizer.getBoundingClientRect();r+=o.left,i+=o.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:r-a.left,top:i-a.top}}function xr(e,t,n,r,i){return r||(r=et(e.doc,t.line)),Er(e,r,rr(e,r,t.ch,i),n)}function br(e,t,n,r,i,o){function a(t,a){var l=ar(e,i,t,a?"right":"left",o);return a?l.left=l.right:l.right=l.left,Er(e,r,l,n)}r=r||et(e.doc,t.line),i||(i=or(e,r));var l=ge(r,e.doc.direction),u=t.ch,s=t.sticky;if(u>=r.text.length?(u=r.text.length,s="before"):u<=0&&(u=0,s="after"),!l)return a("before"==s?u-1:u,"before"==s);function c(e,t,n){return a(n?e-1:e,1==l[t].level!=n)}var f=he(l,u,s),d=de,h=c(u,f,"before"==s);return null!=d&&(h.other=c(u,d,"before"!=s)),h}function wr(e,t){var n=0;t=gt(e.doc,t),e.options.lineWrapping||(n=kr(e.display)*t.ch);var r=et(e.doc,t.line),i=sn(r)+Xn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Dr(e,t,n,r,i){var o=ut(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function Tr(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Dr(r.first,0,null,-1,-1);var i=ot(r,n),o=r.first+r.size-1;if(i>o)return Dr(r.first+r.size-1,et(r,o).text.length,null,1,1);t<0&&(t=0);for(var a=et(r,i);;){var l=Sr(e,a,i,t,n),u=Jt(a,l.ch+(l.xRel>0||l.outside>0?1:0));if(!u)return l;var s=u.find(1);if(s.line==i)return s;a=et(r,i=s.line)}}function Ir(e,t,n,r){r-=yr(t);var i=t.text.length,o=ce((function(t){return ar(e,n,t-1).bottom<=r}),i,0);return{begin:o,end:i=ce((function(t){return ar(e,n,t).top>r}),o,i)}}function Ar(e,t,n,r){return n||(n=or(e,t)),Ir(e,t,n,Er(e,t,ar(e,n,r),"line").top)}function Cr(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function Sr(e,t,n,r,i){i-=sn(t);var o=or(e,t),a=yr(t),l=0,u=t.text.length,s=!0,c=ge(t,e.doc.direction);if(c){var f=(e.options.lineWrapping?Lr:Or)(e,t,n,o,c,r,i);l=(s=1!=f.level)?f.from:f.to-1,u=s?f.to:f.from-1}var d,h,p=null,g=null,m=ce((function(t){var n=ar(e,o,t);return n.top+=a,n.bottom+=a,!!Cr(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(p=t,g=n),!0)}),l,u),v=!1;if(g){var y=r-g.left<g.right-r,E=y==s;m=p+(E?0:1),h=E?"after":"before",d=y?g.left:g.right}else{s||m!=u&&m!=l||m++,h=0==m?"after":m==t.text.length?"before":ar(e,o,m-(s?1:0)).bottom+a<=i==s?"after":"before";var _=br(e,ut(n,m,h),"line",t,o);d=_.left,v=i<_.top?-1:i>=_.bottom?1:0}return Dr(n,m=se(t.text,m,1),h,v,r-d)}function Or(e,t,n,r,i,o,a){var l=ce((function(l){var u=i[l],s=1!=u.level;return Cr(br(e,ut(n,s?u.to:u.from,s?"before":"after"),"line",t,r),o,a,!0)}),0,i.length-1),u=i[l];if(l>0){var s=1!=u.level,c=br(e,ut(n,s?u.from:u.to,s?"after":"before"),"line",t,r);Cr(c,o,a,!0)&&c.top>a&&(u=i[l-1])}return u}function Lr(e,t,n,r,i,o,a){var l=Ir(e,t,r,a),u=l.begin,s=l.end;/\s/.test(t.text.charAt(s-1))&&s--;for(var c=null,f=null,d=0;d<i.length;d++){var h=i[d];if(!(h.from>=s||h.to<=u)){var p=ar(e,r,1!=h.level?Math.min(s,h.to)-1:Math.max(u,h.from)).right,g=p<o?o-p+1e9:p-o;(!c||f>g)&&(c=h,f=g)}}return c||(c=i[i.length-1]),c.from<u&&(c={from:u,to:c.to,level:c.level}),c.to>s&&(c={from:c.from,to:s,level:c.level}),c}function Rr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==lr){lr=O("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)lr.appendChild(document.createTextNode("x")),lr.appendChild(O("br"));lr.appendChild(document.createTextNode("x"))}S(e.measure,lr);var n=lr.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),C(e.measure),n||1}function kr(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=O("span","xxxxxxxxxx"),n=O("pre",[t],"CodeMirror-line-like");S(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Mr(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var l=e.display.gutterSpecs[a].className;n[l]=o.offsetLeft+o.clientLeft+i,r[l]=o.clientWidth}return{fixedPos:Fr(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Fr(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Nr(e){var t=Rr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/kr(e.display)-3);return function(i){if(ln(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a<i.widgets.length;a++)i.widgets[a].height&&(o+=i.widgets[a].height);return n?o+(Math.ceil(i.text.length/r)||1)*t:o+t}}function Pr(e){var t=e.doc,n=Nr(e);t.iter((function(e){var t=n(e);t!=e.height&&rt(e,t)}))}function Br(e,t,n,r){var i=e.display;if(!n&&"true"==Se(t).getAttribute("cm-not-content"))return null;var o,a,l=i.lineSpace.getBoundingClientRect();try{o=t.clientX-l.left,a=t.clientY-l.top}catch(e){return null}var u,s=Tr(e,o,a);if(r&&s.xRel>0&&(u=et(e.doc,s.line).text).length==s.ch){var c=U(u,u.length,e.options.tabSize)-u.length;s=ut(s.line,Math.max(0,Math.round((o-Zn(e.display).left)/kr(e.display))-c))}return s}function Gr(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;r<n.length;r++)if((t-=n[r].size)<0)return r}function zr(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var i=e.display;if(r&&n<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)kt&&on(e.doc,t)<i.viewTo&&Wr(e);else if(n<=i.viewFrom)kt&&an(e.doc,n+r)>i.viewFrom?Wr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)Wr(e);else if(t<=i.viewFrom){var o=Hr(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):Wr(e)}else if(n>=i.viewTo){var a=Hr(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):Wr(e)}else{var l=Hr(e,t,t,-1),u=Hr(e,n,n+r,1);l&&u?(i.view=i.view.slice(0,l.index).concat(In(e,l.lineN,u.lineN)).concat(i.view.slice(u.index)),i.viewTo+=r):Wr(e)}var s=i.externalMeasured;s&&(n<s.lineN?s.lineN+=r:t<s.lineN+s.size&&(i.externalMeasured=null))}function Ur(e,t,n){e.curOp.viewChanged=!0;var r=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var o=r.view[Gr(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==H(a,n)&&a.push(n)}}}function Wr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Hr(e,t,n,r){var i,o=Gr(e,t),a=e.display.view;if(!kt||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var l=e.display.viewFrom,u=0;u<o;u++)l+=a[u].size;if(l!=t){if(r>0){if(o==a.length-1)return null;i=l+a[o].size-t,o++}else i=l-t;t+=i,n+=i}for(;on(e.doc,n)!=n;){if(o==(r<0?0:a.length-1))return null;n+=r*a[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function qr(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=In(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=In(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(Gr(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(In(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,Gr(e,n)))),r.viewTo=n}function Vr(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var i=t[r];i.hidden||i.node&&!i.changes||++n}return n}function jr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Yr(e,t){void 0===t&&(t=!0);var n=e.doc,r={},i=r.cursors=document.createDocumentFragment(),o=r.selection=document.createDocumentFragment(),a=e.options.$customCursor;a&&(t=!0);for(var l=0;l<n.sel.ranges.length;l++)if(t||l!=n.sel.primIndex){var u=n.sel.ranges[l];if(!(u.from().line>=e.display.viewTo||u.to().line<e.display.viewFrom)){var s=u.empty();if(a){var c=a(e,u);c&&Xr(e,c,i)}else(s||e.options.showCursorWhenSelecting)&&Xr(e,u.head,i);s||Zr(e,u,o)}}return r}function Xr(e,t,n){var r=br(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(O("div"," ","CodeMirror-cursor"));if(i.style.left=r.left+"px",i.style.top=r.top+"px",i.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var o=xr(e,t,"div",null,null),a=o.right-o.left;i.style.width=(a>0?a:e.defaultCharWidth())+"px"}if(r.other){var l=n.appendChild(O("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));l.style.display="",l.style.left=r.other.left+"px",l.style.top=r.other.top+"px",l.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function $r(e,t){return e.top-t.top||e.left-t.left}function Zr(e,t,n){var r=e.display,i=e.doc,o=document.createDocumentFragment(),a=Zn(e.display),l=a.left,u=Math.max(r.sizerWidth,Qn(e)-r.sizer.offsetLeft)-a.right,s="ltr"==i.direction;function c(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),o.appendChild(O("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n                             top: "+t+"px; width: "+(null==n?u-e:n)+"px;\n                             height: "+(r-t)+"px"))}function f(t,n,r){var o,a,f=et(i,t),d=f.text.length;function h(n,r){return xr(e,ut(t,n),"div",f,r)}function p(t,n,r){var i=Ar(e,f,null,t),o="ltr"==n==("after"==r)?"left":"right";return h("after"==r?i.begin:i.end-(/\s/.test(f.text.charAt(i.end-1))?2:1),o)[o]}var g=ge(f,i.direction);return fe(g,n||0,null==r?d:r,(function(e,t,i,f){var m="ltr"==i,v=h(e,m?"left":"right"),y=h(t-1,m?"right":"left"),E=null==n&&0==e,_=null==r&&t==d,x=0==f,b=!g||f==g.length-1;if(y.top-v.top<=3){var w=(s?_:E)&&b,D=(s?E:_)&&x?l:(m?v:y).left,T=w?u:(m?y:v).right;c(D,v.top,T-D,v.bottom)}else{var I,A,C,S;m?(I=s&&E&&x?l:v.left,A=s?u:p(e,i,"before"),C=s?l:p(t,i,"after"),S=s&&_&&b?u:y.right):(I=s?p(e,i,"before"):l,A=!s&&E&&x?u:v.right,C=!s&&_&&b?l:y.left,S=s?p(t,i,"after"):u),c(I,v.top,A-I,v.bottom),v.bottom<y.top&&c(l,v.bottom,null,y.top),c(C,y.top,S-C,y.bottom)}(!o||$r(v,o)<0)&&(o=v),$r(y,o)<0&&(o=y),(!a||$r(v,a)<0)&&(a=v),$r(y,a)<0&&(a=y)})),{start:o,end:a}}var d=t.from(),h=t.to();if(d.line==h.line)f(d.line,d.ch,h.ch);else{var p=et(i,d.line),g=et(i,h.line),m=tn(p)==tn(g),v=f(d.line,d.ch,m?p.text.length+1:null).end,y=f(h.line,m?0:null,h.ch).start;m&&(v.top<y.top-2?(c(v.right,v.top,null,v.bottom),c(l,y.top,y.left,y.bottom)):c(v.right,v.top,y.left-v.right,v.bottom)),v.bottom<y.top&&c(l,v.bottom,null,y.top)}n.appendChild(o)}function Kr(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval((function(){e.hasFocus()||ti(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Qr(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||ei(e))}function Jr(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&ti(e))}),100)}function ei(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(_e(e,"focus",e,t),e.state.focused=!0,M(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),u&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),Kr(e))}function ti(e,t){e.state.delayingBlurEvent||(e.state.focused&&(_e(e,"blur",e,t),e.state.focused=!1,A(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function ni(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,o=0,u=0;u<t.view.length;u++){var s=t.view[u],c=e.options.lineWrapping,f=void 0,d=0;if(!s.hidden){if(i+=s.line.height,a&&l<8){var h=s.node.offsetTop+s.node.offsetHeight;f=h-n,n=h}else{var p=s.node.getBoundingClientRect();f=p.bottom-p.top,!c&&s.text.firstChild&&(d=s.text.firstChild.getBoundingClientRect().right-p.left-1)}var g=s.line.height-f;if((g>.005||g<-.005)&&(i<r&&(o-=g),rt(s.line,f),ri(s.line),s.rest))for(var m=0;m<s.rest.length;m++)ri(s.rest[m]);if(d>e.display.sizerWidth){var v=Math.ceil(d/kr(e.display));v>e.display.maxLineLength&&(e.display.maxLineLength=v,e.display.maxLine=s.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function ri(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function ii(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-Xn(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,o=ot(t,r),a=ot(t,i);if(n&&n.ensure){var l=n.ensure.from.line,u=n.ensure.to.line;l<o?(o=l,a=ot(t,sn(et(t,l))+e.wrapper.clientHeight)):Math.min(u,t.lastLine())>=a&&(o=ot(t,sn(et(t,u))-e.wrapper.clientHeight),a=u)}return{from:o,to:Math.max(a,o+1)}}function oi(e,t){if(!xe(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null,o=n.wrapper.ownerDocument;if(t.top+r.top<0?i=!0:t.bottom+r.top>(o.defaultView.innerHeight||o.documentElement.clientHeight)&&(i=!1),null!=i&&!g){var a=O("div","​",null,"position: absolute;\n                         top: "+(t.top-n.viewOffset-Xn(e.display))+"px;\n                         height: "+(t.bottom-t.top+Kn(e)+n.barHeight)+"px;\n                         left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(i),e.display.lineSpace.removeChild(a)}}}function ai(e,t,n,r){var i;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==t.sticky?ut(t.line,t.ch+1,"before"):t,t=t.ch?ut(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var a=!1,l=br(e,t),u=n&&n!=t?br(e,n):l,s=ui(e,i={left:Math.min(l.left,u.left),top:Math.min(l.top,u.top)-r,right:Math.max(l.left,u.left),bottom:Math.max(l.bottom,u.bottom)+r}),c=e.doc.scrollTop,f=e.doc.scrollLeft;if(null!=s.scrollTop&&(gi(e,s.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(a=!0)),null!=s.scrollLeft&&(vi(e,s.scrollLeft),Math.abs(e.doc.scrollLeft-f)>1&&(a=!0)),!a)break}return i}function li(e,t){var n=ui(e,t);null!=n.scrollTop&&gi(e,n.scrollTop),null!=n.scrollLeft&&vi(e,n.scrollLeft)}function ui(e,t){var n=e.display,r=Rr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=Jn(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var l=e.doc.height+$n(n),u=t.top<r,s=t.bottom>l-r;if(t.top<i)a.scrollTop=u?0:t.top;else if(t.bottom>i+o){var c=Math.min(t.top,(s?l:t.bottom)-o);c!=i&&(a.scrollTop=c)}var f=e.options.fixedGutter?0:n.gutters.offsetWidth,d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-f,h=Qn(e)-n.gutters.offsetWidth,p=t.right-t.left>h;return p&&(t.right=t.left+h),t.left<10?a.scrollLeft=0:t.left<d?a.scrollLeft=Math.max(0,t.left+f-(p?0:10)):t.right>h+d-3&&(a.scrollLeft=t.right+(p?0:10)-h),a}function si(e,t){null!=t&&(hi(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function ci(e){hi(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function fi(e,t,n){null==t&&null==n||hi(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function di(e,t){hi(e),e.curOp.scrollToPos=t}function hi(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,pi(e,wr(e,t.from),wr(e,t.to),t.margin))}function pi(e,t,n,r){var i=ui(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});fi(e,i.scrollLeft,i.scrollTop)}function gi(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||ji(e,{top:t}),mi(e,t,!0),n&&ji(e),Bi(e,100))}function mi(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function vi(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,Zi(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function yi(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+$n(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Kn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Ei=function(e,t,n){this.cm=n;var r=this.vert=O("div",[O("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=O("div",[O("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),ve(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),ve(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&l<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Ei.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},Ei.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Ei.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Ei.prototype.zeroWidthHack=function(){var e=E&&!p?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new W,this.disableVert=new W},Ei.prototype.enableZeroWidthBar=function(e,t,n){function r(){var i=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.visibility="hidden":t.set(1e3,r)}e.style.visibility="",t.set(1e3,r)},Ei.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var _i=function(){};function xi(e,t){t||(t=yi(e));var n=e.display.barWidth,r=e.display.barHeight;bi(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&ni(e),bi(e,yi(e)),n=e.display.barWidth,r=e.display.barHeight}function bi(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}_i.prototype.update=function(){return{bottom:0,right:0}},_i.prototype.setScrollLeft=function(){},_i.prototype.setScrollTop=function(){},_i.prototype.clear=function(){};var wi={native:Ei,null:_i};function Di(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&A(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new wi[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),ve(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?vi(e,t):gi(e,t)}),e),e.display.scrollbars.addClass&&M(e.display.wrapper,e.display.scrollbars.addClass)}var Ti=0;function Ii(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Ti,markArrays:null},Cn(e.curOp)}function Ai(e){var t=e.curOp;t&&On(t,(function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;Ci(e)}))}function Ci(e){for(var t=e.ops,n=0;n<t.length;n++)Si(t[n]);for(var r=0;r<t.length;r++)Oi(t[r]);for(var i=0;i<t.length;i++)Li(t[i]);for(var o=0;o<t.length;o++)Ri(t[o]);for(var a=0;a<t.length;a++)ki(t[a])}function Si(e){var t=e.cm,n=t.display;Ui(t),e.updateMaxLine&&fn(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new zi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Oi(e){e.updatedDisplay=e.mustUpdate&&qi(e.cm,e.update)}function Li(e){var t=e.cm,n=t.display;e.updatedDisplay&&ni(t),e.barMeasure=yi(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=rr(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Kn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Qn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Ri(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&vi(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==k(P(t));e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&xi(t,e.barMeasure),e.updatedDisplay&&$i(t,e.barMeasure),e.selectionChanged&&Kr(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&Qr(e.cm)}function ki(e){var t=e.cm,n=t.display,r=t.doc;e.updatedDisplay&&Vi(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null!=e.scrollTop&&mi(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&vi(t,e.scrollLeft,!0,!0),e.scrollToPos&&oi(t,ai(t,gt(r,e.scrollToPos.from),gt(r,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var a=0;a<i.length;++a)i[a].lines.length||_e(i[a],"hide");if(o)for(var l=0;l<o.length;++l)o[l].lines.length&&_e(o[l],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&_e(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Mi(e,t){if(e.curOp)return t();Ii(e);try{return t()}finally{Ai(e)}}function Fi(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Ii(e);try{return t.apply(e,arguments)}finally{Ai(e)}}}function Ni(e){return function(){if(this.curOp)return e.apply(this,arguments);Ii(this);try{return e.apply(this,arguments)}finally{Ai(this)}}}function Pi(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Ii(t);try{return e.apply(this,arguments)}finally{Ai(t)}}}function Bi(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,G(Gi,e))}function Gi(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=bt(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(o){if(r.line>=e.display.viewFrom){var a=o.styles,l=o.text.length>e.options.maxHighlightLength?Ze(t.mode,r.state):null,u=_t(e,o,r,!0);l&&(r.state=l),o.styles=u.styles;var s=o.styleClasses,c=u.classes;c?o.styleClasses=c:s&&(o.styleClasses=null);for(var f=!a||a.length!=o.styles.length||s!=c&&(!s||!c||s.bgClass!=c.bgClass||s.textClass!=c.textClass),d=0;!f&&d<a.length;++d)f=a[d]!=o.styles[d];f&&i.push(r.line),o.stateAfter=r.save(),r.nextLine()}else o.text.length<=e.options.maxHighlightLength&&wt(e,o.text,r),o.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return Bi(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Mi(e,(function(){for(var t=0;t<i.length;t++)Ur(e,i[t],"text")}))}}var zi=function(e,t,n){var r=e.display;this.viewport=t,this.visible=ii(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=Qn(e),this.force=n,this.dims=Mr(e),this.events=[]};function Ui(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Kn(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Kn(e)+"px",t.scrollbarsClipped=!0)}function Wi(e){if(e.hasFocus())return null;var t=k(P(e));if(!t||!R(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=B(e).getSelection();r.anchorNode&&r.extend&&R(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}function Hi(e){if(e&&e.activeElt&&e.activeElt!=k(e.activeElt.ownerDocument)&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&R(document.body,e.anchorNode)&&R(document.body,e.focusNode))){var t=e.activeElt.ownerDocument,n=t.defaultView.getSelection(),r=t.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),n.removeAllRanges(),n.addRange(r),n.extend(e.focusNode,e.focusOffset)}}function qi(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return Wr(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==Vr(e))return!1;Ki(e)&&(Wr(e),t.dims=Mr(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFrom<o&&o-n.viewFrom<20&&(o=Math.max(r.first,n.viewFrom)),n.viewTo>a&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),kt&&(o=on(e.doc,o),a=an(e.doc,a));var l=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;qr(e,o,a),n.viewOffset=sn(et(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var u=Vr(e);if(!l&&0==u&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var s=Wi(e);return u>4&&(n.lineDiv.style.display="none"),Yi(e,n.updateLineNumbers,t.dims),u>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,Hi(s),C(n.cursorDiv),C(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,l&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,Bi(e,400)),n.updateLineNumbers=null,!0}function Vi(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Qn(e))r&&(t.visible=ii(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+$n(e.display)-Jn(e),n.top)}),t.visible=ii(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!qi(e,t))break;ni(e);var i=yi(e);jr(e),xi(e,i),$i(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function ji(e,t){var n=new zi(e,t);if(qi(e,n)){ni(e),Vi(e,n);var r=yi(e);jr(e),xi(e,r),$i(e,r),n.finish()}}function Yi(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,a=o.firstChild;function l(t){var n=t.nextSibling;return u&&E&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var s=r.view,c=r.viewFrom,f=0;f<s.length;f++){var d=s[f];if(d.hidden);else if(d.node&&d.node.parentNode==o){for(;a!=d.node;)a=l(a);var h=i&&null!=t&&t<=c&&d.lineNumber;d.changes&&(H(d.changes,"gutter")>-1&&(h=!1),Mn(e,d,c,n)),h&&(C(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(lt(e.options,c)))),a=d.node.nextSibling}else{var p=Wn(e,d,c,n);o.insertBefore(p,a)}c+=d.size}for(;a;)a=l(a)}function Xi(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",Rn(e,"gutterChanged",e)}function $i(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Kn(e)+"px"}function Zi(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=Fr(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;a<n.length;a++)if(!n[a].hidden){e.options.fixedGutter&&(n[a].gutter&&(n[a].gutter.style.left=o),n[a].gutterBackground&&(n[a].gutterBackground.style.left=o));var l=n[a].alignable;if(l)for(var u=0;u<l.length;u++)l[u].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=r+i+"px")}}function Ki(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=lt(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(O("div",[O("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,a=i.offsetWidth-o;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(o,r.lineGutter.offsetWidth-a)+1,r.lineNumWidth=r.lineNumInnerWidth+a,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",Xi(e.display),!0}return!1}function Qi(e,t){for(var n=[],r=!1,i=0;i<e.length;i++){var o=e[i],a=null;if("string"!=typeof o&&(a=o.style,o=o.className),"CodeMirror-linenumbers"==o){if(!t)continue;r=!0}n.push({className:o,style:a})}return t&&!r&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function Ji(e){var t=e.gutters,n=e.gutterSpecs;C(t),e.lineGutter=null;for(var r=0;r<n.length;++r){var i=n[r],o=i.className,a=i.style,l=t.appendChild(O("div",null,"CodeMirror-gutter "+o));a&&(l.style.cssText=a),"CodeMirror-linenumbers"==o&&(e.lineGutter=l,l.style.width=(e.lineNumWidth||1)+"px")}t.style.display=n.length?"":"none",Xi(e)}function eo(e){Ji(e.display),zr(e),Zi(e)}function to(e,t,r,i){var o=this;this.input=r,o.scrollbarFiller=O("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=O("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=L("div",null,"CodeMirror-code"),o.selectionDiv=O("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=O("div",null,"CodeMirror-cursors"),o.measure=O("div",null,"CodeMirror-measure"),o.lineMeasure=O("div",null,"CodeMirror-measure"),o.lineSpace=L("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var s=L("div",[o.lineSpace],"CodeMirror-lines");o.mover=O("div",[s],null,"position: relative"),o.sizer=O("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=O("div",null,null,"position: absolute; height: "+q+"px; width: 1px;"),o.gutters=O("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=O("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=O("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),c&&f>=105&&(o.wrapper.style.clipPath="inset(0px)"),o.wrapper.setAttribute("translate","no"),a&&l<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),u||n&&y||(o.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(o.wrapper):e(o.wrapper)),o.viewFrom=o.viewTo=t.first,o.reportedViewFrom=o.reportedViewTo=t.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,o.gutterSpecs=Qi(i.gutters,i.lineNumbers),Ji(o),r.init(o)}zi.prototype.signal=function(e,t){we(e,t)&&this.events.push(arguments)},zi.prototype.finish=function(){for(var e=0;e<this.events.length;e++)_e.apply(null,this.events[e])};var no=0,ro=null;function io(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}}function oo(e){var t=io(e);return t.x*=ro,t.y*=ro,t}function ao(e,t){c&&102==f&&(null==e.display.chromeScrollHack?e.display.sizer.style.pointerEvents="none":clearTimeout(e.display.chromeScrollHack),e.display.chromeScrollHack=setTimeout((function(){e.display.chromeScrollHack=null,e.display.sizer.style.pointerEvents=""}),100));var r=io(t),i=r.x,o=r.y,a=ro;0===t.deltaMode&&(i=t.deltaX,o=t.deltaY,a=1);var l=e.display,s=l.scroller,h=s.scrollWidth>s.clientWidth,p=s.scrollHeight>s.clientHeight;if(i&&h||o&&p){if(o&&E&&u)e:for(var g=t.target,m=l.view;g!=s;g=g.parentNode)for(var v=0;v<m.length;v++)if(m[v].node==g){e.display.currentWheelTarget=g;break e}if(i&&!n&&!d&&null!=a)return o&&p&&gi(e,Math.max(0,s.scrollTop+o*a)),vi(e,Math.max(0,s.scrollLeft+i*a)),(!o||o&&p)&&Te(t),void(l.wheelStartX=null);if(o&&null!=a){var y=o*a,_=e.doc.scrollTop,x=_+l.wrapper.clientHeight;y<0?_=Math.max(0,_+y-50):x=Math.min(e.doc.height,x+y+50),ji(e,{top:_,bottom:x})}no<20&&0!==t.deltaMode&&(null==l.wheelStartX?(l.wheelStartX=s.scrollLeft,l.wheelStartY=s.scrollTop,l.wheelDX=i,l.wheelDY=o,setTimeout((function(){if(null!=l.wheelStartX){var e=s.scrollLeft-l.wheelStartX,t=s.scrollTop-l.wheelStartY,n=t&&l.wheelDY&&t/l.wheelDY||e&&l.wheelDX&&e/l.wheelDX;l.wheelStartX=l.wheelStartY=null,n&&(ro=(ro*no+n)/(no+1),++no)}}),200)):(l.wheelDX+=i,l.wheelDY+=o))}}a?ro=-.53:n?ro=15:c?ro=-.7:h&&(ro=-1/3);var lo=function(e,t){this.ranges=e,this.primIndex=t};lo.prototype.primary=function(){return this.ranges[this.primIndex]},lo.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(!ct(n.anchor,r.anchor)||!ct(n.head,r.head))return!1}return!0},lo.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new uo(ft(this.ranges[t].anchor),ft(this.ranges[t].head));return new lo(e,this.primIndex)},lo.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},lo.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(st(t,r.from())>=0&&st(e,r.to())<=0)return n}return-1};var uo=function(e,t){this.anchor=e,this.head=t};function so(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort((function(e,t){return st(e.from(),t.from())})),n=H(t,i);for(var o=1;o<t.length;o++){var a=t[o],l=t[o-1],u=st(l.to(),a.from());if(r&&!a.empty()?u>0:u>=0){var s=ht(l.from(),a.from()),c=dt(l.to(),a.to()),f=l.empty()?a.from()==a.head:l.from()==l.head;o<=n&&--n,t.splice(--o,2,new uo(f?c:s,f?s:c))}}return new lo(t,n)}function co(e,t){return new lo([new uo(e,t||e)],0)}function fo(e){return e.text?ut(e.from.line+e.text.length-1,Q(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function ho(e,t){if(st(e,t.from)<0)return e;if(st(e,t.to)<=0)return fo(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=fo(t).ch-t.to.ch),ut(n,r)}function po(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new uo(ho(i.anchor,t),ho(i.head,t)))}return so(e.cm,n,e.sel.primIndex)}function go(e,t,n){return e.line==t.line?ut(n.line,e.ch-t.ch+n.ch):ut(n.line+(e.line-t.line),e.ch)}function mo(e,t,n){for(var r=[],i=ut(e.first,0),o=i,a=0;a<t.length;a++){var l=t[a],u=go(l.from,i,o),s=go(fo(l),i,o);if(i=l.to,o=s,"around"==n){var c=e.sel.ranges[a],f=st(c.head,c.anchor)<0;r[a]=new uo(f?s:u,f?u:s)}else r[a]=new uo(u,u)}return new lo(r,e.sel.primIndex)}function vo(e){e.doc.mode=Ye(e.options,e.doc.modeOption),yo(e)}function yo(e){e.doc.iter((function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)})),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Bi(e,100),e.state.modeGen++,e.curOp&&zr(e)}function Eo(e,t){return 0==t.from.ch&&0==t.to.ch&&""==Q(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function _o(e,t,n,r){function i(e){return n?n[e]:null}function o(e,n,i){hn(e,n,i,r),Rn(e,"change",e,t)}function a(e,t){for(var n=[],o=e;o<t;++o)n.push(new dn(s[o],i(o),r));return n}var l=t.from,u=t.to,s=t.text,c=et(e,l.line),f=et(e,u.line),d=Q(s),h=i(s.length-1),p=u.line-l.line;if(t.full)e.insert(0,a(0,s.length)),e.remove(s.length,e.size-s.length);else if(Eo(e,t)){var g=a(0,s.length-1);o(f,f.text,h),p&&e.remove(l.line,p),g.length&&e.insert(l.line,g)}else if(c==f)if(1==s.length)o(c,c.text.slice(0,l.ch)+d+c.text.slice(u.ch),h);else{var m=a(1,s.length-1);m.push(new dn(d+c.text.slice(u.ch),h,r)),o(c,c.text.slice(0,l.ch)+s[0],i(0)),e.insert(l.line+1,m)}else if(1==s.length)o(c,c.text.slice(0,l.ch)+s[0]+f.text.slice(u.ch),i(0)),e.remove(l.line+1,p);else{o(c,c.text.slice(0,l.ch)+s[0],i(0)),o(f,d+f.text.slice(u.ch),h);var v=a(1,s.length-1);p>1&&e.remove(l.line+1,p-1),e.insert(l.line+1,v)}Rn(e,"change",e,t)}function xo(e,t,n){function r(e,i,o){if(e.linked)for(var a=0;a<e.linked.length;++a){var l=e.linked[a];if(l.doc!=i){var u=o&&l.sharedHist;n&&!u||(t(l.doc,u),r(l.doc,e,u))}}}r(e,null,!0)}function bo(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Pr(e),vo(e),wo(e),e.options.direction=t.direction,e.options.lineWrapping||fn(e),e.options.mode=t.modeOption,zr(e)}function wo(e){("rtl"==e.doc.direction?M:A)(e.display.lineDiv,"CodeMirror-rtl")}function Do(e){Mi(e,(function(){wo(e),zr(e)}))}function To(e){this.done=[],this.undone=[],this.undoDepth=e?e.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e?e.maxGeneration:1}function Io(e,t){var n={from:ft(t.from),to:fo(t),text:tt(e,t.from,t.to)};return ko(e,n,t.from.line,t.to.line+1),xo(e,(function(e){return ko(e,n,t.from.line,t.to.line+1)}),!0),n}function Ao(e){for(;e.length&&Q(e).ranges;)e.pop()}function Co(e,t){return t?(Ao(e.done),Q(e.done)):e.done.length&&!Q(e.done).ranges?Q(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Q(e.done)):void 0}function So(e,t,n,r){var i=e.history;i.undone.length=0;var o,a,l=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>l-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=Co(i,i.lastOp==r)))a=Q(o.changes),0==st(t.from,t.to)&&0==st(t.from,a.to)?a.to=fo(t):o.changes.push(Io(e,t));else{var u=Q(i.done);for(u&&u.ranges||Ro(e.sel,i.done),o={changes:[Io(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=l,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||_e(e,"historyAdded")}function Oo(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Lo(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||Oo(e,o,Q(i.done),t))?i.done[i.done.length-1]=t:Ro(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&Ao(i.undone)}function Ro(e,t){var n=Q(t);n&&n.ranges&&n.equals(e)||t.push(e)}function ko(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),(function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o}))}function Mo(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function Fo(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],i=0;i<t.text.length;++i)r.push(Mo(n[i]));return r}function No(e,t){var n=Fo(e,t),r=Wt(e,t);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var o=n[i],a=r[i];if(o&&a)e:for(var l=0;l<a.length;++l){for(var u=a[l],s=0;s<o.length;++s)if(o[s].marker==u.marker)continue e;o.push(u)}else a&&(n[i]=a)}return n}function Po(e,t,n){for(var r=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)r.push(n?lo.prototype.deepCopy.call(o):o);else{var a=o.changes,l=[];r.push({changes:l});for(var u=0;u<a.length;++u){var s=a[u],c=void 0;if(l.push({from:s.from,to:s.to,text:s.text}),t)for(var f in s)(c=f.match(/^spans_(\d+)$/))&&H(t,Number(c[1]))>-1&&(Q(l)[f]=s[f],delete s[f])}}}return r}function Bo(e,t,n,r){if(r){var i=e.anchor;if(n){var o=st(t,i)<0;o!=st(n,i)<0?(i=t,t=n):o!=st(t,n)<0&&(t=n)}return new uo(i,t)}return new uo(n||t,t)}function Go(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),Vo(e,new lo([Bo(e.sel.primary(),t,n,i)],0),r)}function zo(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)r[o]=Bo(e.sel.ranges[o],t[o],null,i);Vo(e,so(e.cm,r,e.sel.primIndex),n)}function Uo(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,Vo(e,so(e.cm,i,e.sel.primIndex),r)}function Wo(e,t,n,r){Vo(e,co(t,n),r)}function Ho(e,t,n){var r={ranges:t.ranges,update:function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new uo(gt(e,t[n].anchor),gt(e,t[n].head))},origin:n&&n.origin};return _e(e,"beforeSelectionChange",e,r),e.cm&&_e(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?so(e.cm,r.ranges,r.ranges.length-1):t}function qo(e,t,n){var r=e.history.done,i=Q(r);i&&i.ranges?(r[r.length-1]=t,jo(e,t,n)):Vo(e,t,n)}function Vo(e,t,n){jo(e,t,n),Lo(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function jo(e,t,n){(we(e,"beforeSelectionChange")||e.cm&&we(e.cm,"beforeSelectionChange"))&&(t=Ho(e,t,n));var r=n&&n.bias||(st(t.primary().head,e.sel.primary().head)<0?-1:1);Yo(e,$o(e,t,r,!0)),n&&!1===n.scroll||!e.cm||"nocursor"==e.cm.getOption("readOnly")||ci(e.cm)}function Yo(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,be(e.cm)),Rn(e,"cursorActivity",e))}function Xo(e){Yo(e,$o(e,e.sel,null,!1))}function $o(e,t,n,r){for(var i,o=0;o<t.ranges.length;o++){var a=t.ranges[o],l=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],u=Ko(e,a.anchor,l&&l.anchor,n,r),s=a.head==a.anchor?u:Ko(e,a.head,l&&l.head,n,r);(i||u!=a.anchor||s!=a.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new uo(u,s))}return i?so(e.cm,i,t.primIndex):t}function Zo(e,t,n,r,i){var o=et(e,t.line);if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var l=o.markedSpans[a],u=l.marker,s="selectLeft"in u?!u.selectLeft:u.inclusiveLeft,c="selectRight"in u?!u.selectRight:u.inclusiveRight;if((null==l.from||(s?l.from<=t.ch:l.from<t.ch))&&(null==l.to||(c?l.to>=t.ch:l.to>t.ch))){if(i&&(_e(u,"beforeCursorEnter"),u.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!u.atomic)continue;if(n){var f=u.find(r<0?1:-1),d=void 0;if((r<0?c:s)&&(f=Qo(e,f,-r,f&&f.line==t.line?o:null)),f&&f.line==t.line&&(d=st(f,n))&&(r<0?d<0:d>0))return Zo(e,f,t,r,i)}var h=u.find(r<0?-1:1);return(r<0?s:c)&&(h=Qo(e,h,r,h.line==t.line?o:null)),h?Zo(e,h,t,r,i):null}}return t}function Ko(e,t,n,r,i){var o=r||1,a=Zo(e,t,n,o,i)||!i&&Zo(e,t,n,o,!0)||Zo(e,t,n,-o,i)||!i&&Zo(e,t,n,-o,!0);return a||(e.cantEdit=!0,ut(e.first,0))}function Qo(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?gt(e,ut(t.line-1)):null:n>0&&t.ch==(r||et(e,t.line)).text.length?t.line<e.first+e.size-1?ut(t.line+1,0):null:new ut(t.line,t.ch+n)}function Jo(e){e.setSelection(ut(e.firstLine(),0),ut(e.lastLine()),j)}function ea(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return n&&(r.update=function(t,n,i,o){t&&(r.from=gt(e,t)),n&&(r.to=gt(e,n)),i&&(r.text=i),void 0!==o&&(r.origin=o)}),_e(e,"beforeChange",e,r),e.cm&&_e(e.cm,"beforeChange",e.cm,r),r.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:r.from,to:r.to,text:r.text,origin:r.origin}}function ta(e,t,n){if(e.cm){if(!e.cm.curOp)return Fi(e.cm,ta)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(we(e,"beforeChange")||e.cm&&we(e.cm,"beforeChange"))||(t=ea(e,t,!0))){var r=Rt&&!n&&qt(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)na(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else na(e,t)}}function na(e,t){if(1!=t.text.length||""!=t.text[0]||0!=st(t.from,t.to)){var n=po(e,t);So(e,t,n,e.cm?e.cm.curOp.id:NaN),oa(e,t,n,Wt(e,t));var r=[];xo(e,(function(e,n){n||-1!=H(r,e.history)||(ca(e.history,t),r.push(e.history)),oa(e,t,null,Wt(e,t))}))}}function ra(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var i,o=e.history,a=e.sel,l="undo"==t?o.done:o.undone,u="undo"==t?o.undone:o.done,s=0;s<l.length&&(i=l[s],n?!i.ranges||i.equals(e.sel):i.ranges);s++);if(s!=l.length){for(o.lastOrigin=o.lastSelOrigin=null;;){if(!(i=l.pop()).ranges){if(r)return void l.push(i);break}if(Ro(i,u),n&&!i.equals(e.sel))return void Vo(e,i,{clearRedo:!1});a=i}var c=[];Ro(a,u),u.push({changes:c,generation:o.generation}),o.generation=i.generation||++o.maxGeneration;for(var f=we(e,"beforeChange")||e.cm&&we(e.cm,"beforeChange"),d=function(n){var r=i.changes[n];if(r.origin=t,f&&!ea(e,r,!1))return l.length=0,{};c.push(Io(e,r));var o=n?po(e,r):Q(l);oa(e,r,o,No(e,r)),!n&&e.cm&&e.cm.scrollIntoView({from:r.from,to:fo(r)});var a=[];xo(e,(function(e,t){t||-1!=H(a,e.history)||(ca(e.history,r),a.push(e.history)),oa(e,r,null,No(e,r))}))},h=i.changes.length-1;h>=0;--h){var p=d(h);if(p)return p.v}}}}function ia(e,t){if(0!=t&&(e.first+=t,e.sel=new lo(J(e.sel.ranges,(function(e){return new uo(ut(e.anchor.line+t,e.anchor.ch),ut(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){zr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)Ur(e.cm,r,"gutter")}}function oa(e,t,n,r){if(e.cm&&!e.cm.curOp)return Fi(e.cm,oa)(e,t,n,r);if(t.to.line<e.first)ia(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);ia(e,i),t={from:ut(e.first,0),to:ut(t.to.line+i,t.to.ch),text:[Q(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:ut(o,et(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=tt(e,t.from,t.to),n||(n=po(e,t)),e.cm?aa(e.cm,t,r):_o(e,t,r),jo(e,n,j),e.cantEdit&&Ko(e,ut(e.firstLine(),0))&&(e.cantEdit=!1)}}function aa(e,t,n){var r=e.doc,i=e.display,o=t.from,a=t.to,l=!1,u=o.line;e.options.lineWrapping||(u=it(tn(et(r,o.line))),r.iter(u,a.line+1,(function(e){if(e==i.maxLine)return l=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&be(e),_o(r,t,n,Nr(e)),e.options.lineWrapping||(r.iter(u,o.line+t.text.length,(function(e){var t=cn(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,l=!1)})),l&&(e.curOp.updateMaxLine=!0)),Lt(r,o.line),Bi(e,400);var s=t.text.length-(a.line-o.line)-1;t.full?zr(e):o.line!=a.line||1!=t.text.length||Eo(e.doc,t)?zr(e,o.line,a.line+1,s):Ur(e,o.line,"text");var c=we(e,"changes"),f=we(e,"change");if(f||c){var d={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};f&&Rn(e,"change",e,d),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(d)}e.display.selForContextMenu=null}function la(e,t,n,r,i){var o;r||(r=n),st(r,n)<0&&(n=(o=[r,n])[0],r=o[1]),"string"==typeof t&&(t=e.splitLines(t)),ta(e,{from:n,to:r,text:t,origin:i})}function ua(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function sa(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i],a=!0;if(o.ranges){o.copied||((o=e[i]=o.deepCopy()).copied=!0);for(var l=0;l<o.ranges.length;l++)ua(o.ranges[l].anchor,t,n,r),ua(o.ranges[l].head,t,n,r)}else{for(var u=0;u<o.changes.length;++u){var s=o.changes[u];if(n<s.from.line)s.from=ut(s.from.line+r,s.from.ch),s.to=ut(s.to.line+r,s.to.ch);else if(t<=s.to.line){a=!1;break}}a||(e.splice(0,i+1),i=0)}}}function ca(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;sa(e.done,n,r,i),sa(e.undone,n,r,i)}function fa(e,t,n,r){var i=t,o=t;return"number"==typeof t?o=et(e,pt(e,t)):i=it(t),null==i?null:(r(o,i)&&e.cm&&Ur(e.cm,i,n),o)}function da(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}function ha(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var i=e[r];t+=i.chunkSize(),n+=i.height,i.parent=this}this.size=t,this.height=n,this.parent=null}uo.prototype.from=function(){return ht(this.anchor,this.head)},uo.prototype.to=function(){return dt(this.anchor,this.head)},uo.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},da.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;n<r;++n){var i=this.lines[n];this.height-=i.height,pn(i),Rn(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}},ha.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(e<i){var o=Math.min(t,i-e),a=r.height;if(r.removeInner(e,o),this.height-=a-r.height,i==o&&(this.children.splice(n--,1),r.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof da))){var l=[];this.collapse(l),this.children=[new da(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(var a=i.lines.length%25+25,l=a;l<i.lines.length;){var u=new da(i.lines.slice(l,l+=25));i.height-=u.height,this.children.splice(++r,0,u),u.parent=this}i.lines=i.lines.slice(0,a),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new ha(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var n=H(e.parent.children,e);e.parent.children.splice(n+1,0,t)}else{var r=new ha(e.children);r.parent=e,e.children=[r,t],e=r}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<o){var a=Math.min(t,o-e);if(i.iterN(e,a,n))return!0;if(0==(t-=a))break;e=0}else e-=o}}};var pa=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};function ga(e,t,n){sn(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&si(e,n)}function ma(e,t,n,r){var i=new pa(e,n,r),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),fa(e,t,"widget",(function(t){var n=t.widgets||(t.widgets=[]);if(null==i.insertAt?n.push(i):n.splice(Math.min(n.length,Math.max(0,i.insertAt)),0,i),i.line=t,o&&!ln(e,t)){var r=sn(t)<e.scrollTop;rt(t,t.height+jn(i)),r&&si(o,i.height),o.curOp.forceUpdate=!0}return!0})),o&&Rn(o,"lineWidgetAdded",o,i,"number"==typeof t?t:it(t)),i}pa.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=it(n);if(null!=r&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(n.widgets=null);var o=jn(this);rt(n,Math.max(0,n.height-o)),e&&(Mi(e,(function(){ga(e,n,-o),Ur(e,r,"widget")})),Rn(e,"lineWidgetCleared",e,this,r))}},pa.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var i=jn(this)-t;i&&(ln(this.doc,r)||rt(r,r.height+i),n&&Mi(n,(function(){n.curOp.forceUpdate=!0,ga(n,r,i),Rn(n,"lineWidgetChanged",n,e,it(r))})))},De(pa);var va=0,ya=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++va};function Ea(e,t,n,r,i){if(r&&r.shared)return xa(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return Fi(e.cm,Ea)(e,t,n,r,i);var o=new ya(e,i),a=st(t,n);if(r&&z(r,o,!1),a>0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=L("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(en(e,t.line,t,n,o)||t.line!=n.line&&en(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ft()}o.addToHistory&&So(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var l,u=t.line,s=e.cm;if(e.iter(u,n.line+1,(function(r){s&&o.collapsed&&!s.options.lineWrapping&&tn(r)==s.display.maxLine&&(l=!0),o.collapsed&&u!=t.line&&rt(r,0),Gt(r,new Nt(o,u==t.line?t.ch:null,u==n.line?n.ch:null),e.cm&&e.cm.curOp),++u})),o.collapsed&&e.iter(t.line,n.line+1,(function(t){ln(e,t)&&rt(t,0)})),o.clearOnEnter&&ve(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(Mt(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++va,o.atomic=!0),s){if(l&&(s.curOp.updateMaxLine=!0),o.collapsed)zr(s,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var c=t.line;c<=n.line;c++)Ur(s,c,"text");o.atomic&&Xo(s.doc),Rn(s,"markerAdded",s,o)}return o}ya.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Ii(e),we(this,"clear")){var n=this.find();n&&Rn(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;o<this.lines.length;++o){var a=this.lines[o],l=Pt(a.markedSpans,this);e&&!this.collapsed?Ur(e,it(a),"text"):e&&(null!=l.to&&(i=it(a)),null!=l.from&&(r=it(a))),a.markedSpans=Bt(a.markedSpans,l),null==l.from&&this.collapsed&&!ln(this.doc,a)&&e&&rt(a,Rr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var u=0;u<this.lines.length;++u){var s=tn(this.lines[u]),c=cn(s);c>e.display.maxLineLength&&(e.display.maxLine=s,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&zr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Xo(e.doc)),e&&Rn(e,"markerCleared",e,this,r,i),t&&Ai(e),this.parent&&this.parent.clear()}},ya.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i<this.lines.length;++i){var o=this.lines[i],a=Pt(o.markedSpans,this);if(null!=a.from&&(n=ut(t?o:it(o),a.from),-1==e))return n;if(null!=a.to&&(r=ut(t?o:it(o),a.to),1==e))return r}return n&&{from:n,to:r}},ya.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;t&&r&&Mi(r,(function(){var i=t.line,o=it(t.line),a=ir(r,o);if(a&&(hr(a),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!ln(n.doc,i)&&null!=n.height){var l=n.height;n.height=null;var u=jn(n)-l;u&&rt(i,i.height+u)}Rn(r,"markerChanged",r,e)}))},ya.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=H(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},ya.prototype.detachLine=function(e){if(this.lines.splice(H(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},De(ya);var _a=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};function xa(e,t,n,r,i){(r=z(r)).shared=!1;var o=[Ea(e,t,n,r,i)],a=o[0],l=r.widgetNode;return xo(e,(function(e){l&&(r.widgetNode=l.cloneNode(!0)),o.push(Ea(e,gt(e,t),gt(e,n),r,i));for(var u=0;u<e.linked.length;++u)if(e.linked[u].isParent)return;a=Q(o)})),new _a(o,a)}function ba(e){return e.findMarks(ut(e.first,0),e.clipPos(ut(e.lastLine())),(function(e){return e.parent}))}function wa(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.find(),o=e.clipPos(i.from),a=e.clipPos(i.to);if(st(o,a)){var l=Ea(e,o,a,r.primary,r.primary.type);r.markers.push(l),l.parent=r}}}function Da(e){for(var t=function(t){var n=e[t],r=[n.primary.doc];xo(n.primary.doc,(function(e){return r.push(e)}));for(var i=0;i<n.markers.length;i++){var o=n.markers[i];-1==H(r,o.doc)&&(o.parent=null,n.markers.splice(i--,1))}},n=0;n<e.length;n++)t(n)}_a.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Rn(this,"clear")}},_a.prototype.find=function(e,t){return this.primary.find(e,t)},De(_a);var Ta=0,Ia=function(e,t,n,r,i){if(!(this instanceof Ia))return new Ia(e,t,n,r,i);null==n&&(n=0),ha.call(this,[new da([new dn("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var o=ut(n,0);this.sel=co(o),this.history=new To(null),this.id=++Ta,this.modeOption=t,this.lineSep=r,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),_o(this,{from:o,to:o,text:e}),Vo(this,co(o),j)};Ia.prototype=ne(ha.prototype,{constructor:Ia,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=nt(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:Pi((function(e){var t=ut(this.first,0),n=this.first+this.size-1;ta(this,{from:t,to:ut(n,et(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&fi(this.cm,0,0),Vo(this,co(t),j)})),replaceRange:function(e,t,n,r){la(this,e,t=gt(this,t),n=n?gt(this,n):t,r)},getRange:function(e,t,n){var r=tt(this,gt(this,e),gt(this,t));return!1===n?r:""===n?r.join(""):r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(at(this,e))return et(this,e)},getLineNumber:function(e){return it(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=et(this,e)),tn(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return gt(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Pi((function(e,t,n){Wo(this,gt(this,"number"==typeof e?ut(e,t||0):e),null,n)})),setSelection:Pi((function(e,t,n){Wo(this,gt(this,e),gt(this,t||e),n)})),extendSelection:Pi((function(e,t,n){Go(this,gt(this,e),t&&gt(this,t),n)})),extendSelections:Pi((function(e,t){zo(this,vt(this,e),t)})),extendSelectionsBy:Pi((function(e,t){zo(this,vt(this,J(this.sel.ranges,e)),t)})),setSelections:Pi((function(e,t,n){if(e.length){for(var r=[],i=0;i<e.length;i++)r[i]=new uo(gt(this,e[i].anchor),gt(this,e[i].head||e[i].anchor));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),Vo(this,so(this.cm,r,t),n)}})),addSelection:Pi((function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new uo(gt(this,e),gt(this,t||e))),Vo(this,so(this.cm,r,r.length-1),n)})),getSelection:function(e){for(var t,n=this.sel.ranges,r=0;r<n.length;r++){var i=tt(this,n[r].from(),n[r].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var i=tt(this,n[r].from(),n[r].to());!1!==e&&(i=i.join(e||this.lineSeparator())),t[r]=i}return t},replaceSelection:function(e,t,n){for(var r=[],i=0;i<this.sel.ranges.length;i++)r[i]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:Pi((function(e,t,n){for(var r=[],i=this.sel,o=0;o<i.ranges.length;o++){var a=i.ranges[o];r[o]={from:a.from(),to:a.to(),text:this.splitLines(e[o]),origin:n}}for(var l=t&&"end"!=t&&mo(this,r,t),u=r.length-1;u>=0;u--)ta(this,r[u]);l?qo(this,l):this.cm&&ci(this.cm)})),undo:Pi((function(){ra(this,"undo")})),redo:Pi((function(){ra(this,"redo")})),undoSelection:Pi((function(){ra(this,"undo",!0)})),redoSelection:Pi((function(){ra(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){var e=this;this.history=new To(this.history),xo(this,(function(t){return t.history=e.history}),!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Po(this.history.done),undone:Po(this.history.undone)}},setHistory:function(e){var t=this.history=new To(this.history);t.done=Po(e.done.slice(0),null,!0),t.undone=Po(e.undone.slice(0),null,!0)},setGutterMarker:Pi((function(e,t,n){return fa(this,e,"gutter",(function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&ae(r)&&(e.gutterMarkers=null),!0}))})),clearGutter:Pi((function(e){var t=this;this.iter((function(n){n.gutterMarkers&&n.gutterMarkers[e]&&fa(t,n,"gutter",(function(){return n.gutterMarkers[e]=null,ae(n.gutterMarkers)&&(n.gutterMarkers=null),!0}))}))})),lineInfo:function(e){var t;if("number"==typeof e){if(!at(this,e))return null;if(t=e,!(e=et(this,e)))return null}else if(null==(t=it(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Pi((function(e,t,n){return fa(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[r]){if(T(n).test(e[r]))return!1;e[r]+=" "+n}else e[r]=n;return!0}))})),removeLineClass:Pi((function(e,t,n){return fa(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",i=e[r];if(!i)return!1;if(null==n)e[r]=null;else{var o=i.match(T(n));if(!o)return!1;var a=o.index+o[0].length;e[r]=i.slice(0,o.index)+(o.index&&a!=i.length?" ":"")+i.slice(a)||null}return!0}))})),addLineWidget:Pi((function(e,t,n){return ma(this,e,t,n)})),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return Ea(this,gt(this,e),gt(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return Ea(this,e=gt(this,e),e,n,"bookmark")},findMarksAt:function(e){var t=[],n=et(this,(e=gt(this,e)).line).markedSpans;if(n)for(var r=0;r<n.length;++r){var i=n[r];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=gt(this,e),t=gt(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,(function(o){var a=o.markedSpans;if(a)for(var l=0;l<a.length;l++){var u=a[l];null!=u.to&&i==e.line&&e.ch>=u.to||null==u.from&&i!=e.line||null!=u.from&&i==t.line&&u.from>=t.ch||n&&!n(u.marker)||r.push(u.marker.parent||u.marker)}++i})),r},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)null!=n[r].from&&e.push(n[r].marker)})),e},posFromIndex:function(e){var t,n=this.first,r=this.lineSeparator().length;return this.iter((function(i){var o=i.text.length+r;if(o>e)return t=e,!0;e-=o,++n})),gt(this,ut(n,t))},indexFromPos:function(e){var t=(e=gt(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,(function(e){t+=e.text.length+n})),t},copy:function(e){var t=new Ia(nt(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var r=new Ia(nt(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],wa(r,ba(this)),r},unlinkDoc:function(e){if(e instanceof zl&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t)if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Da(ba(this));break}if(e.history==this.history){var n=[e.id];xo(e,(function(e){return n.push(e.id)}),!0),e.history=new To(null),e.history.done=Po(this.history.done,n),e.history.undone=Po(this.history.undone,n)}},iterLinkedDocs:function(e){xo(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Pe(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:Pi((function(e){"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter((function(e){return e.order=null})),this.cm&&Do(this.cm))}))}),Ia.prototype.eachLine=Ia.prototype.iter;var Aa=0;function Ca(e){var t=this;if(La(t),!xe(t,e)&&!Yn(t.display,e)){Te(e),a&&(Aa=+new Date);var n=Br(t,e,!0),r=e.dataTransfer.files;if(n&&!t.isReadOnly())if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,o=Array(i),l=0,u=function(){++l==i&&Fi(t,(function(){var e={from:n=gt(t.doc,n),to:n,text:t.doc.splitLines(o.filter((function(e){return null!=e})).join(t.doc.lineSeparator())),origin:"paste"};ta(t.doc,e),qo(t.doc,co(gt(t.doc,n),gt(t.doc,fo(e))))}))()},s=function(e,n){if(t.options.allowDropFileTypes&&-1==H(t.options.allowDropFileTypes,e.type))u();else{var r=new FileReader;r.onerror=function(){return u()},r.onload=function(){var e=r.result;/[\x00-\x08\x0e-\x1f]{2}/.test(e)||(o[n]=e),u()},r.readAsText(e)}},c=0;c<r.length;c++)s(r[c],c);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var f=e.dataTransfer.getData("Text");if(f){var d;if(t.state.draggingText&&!t.state.draggingText.copy&&(d=t.listSelections()),jo(t.doc,co(n,n)),d)for(var h=0;h<d.length;++h)la(t.doc,"",d[h].anchor,d[h].head,"drag");t.replaceSelection(f,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Sa(e,t){if(a&&(!e.state.draggingText||+new Date-Aa<100))Ce(t);else if(!xe(e,t)&&!Yn(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!h)){var n=O("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),d&&n.parentNode.removeChild(n)}}function Oa(e,t){var n=Br(e,t);if(n){var r=document.createDocumentFragment();Xr(e,n,r),e.display.dragCursor||(e.display.dragCursor=O("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),S(e.display.dragCursor,r)}}function La(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Ra(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),n=[],r=0;r<t.length;r++){var i=t[r].CodeMirror;i&&n.push(i)}n.length&&n[0].operation((function(){for(var t=0;t<n.length;t++)e(n[t])}))}}var ka=!1;function Ma(){ka||(Fa(),ka=!0)}function Fa(){var e;ve(window,"resize",(function(){null==e&&(e=setTimeout((function(){e=null,Ra(Na)}),100))})),ve(window,"blur",(function(){return Ra(ti)}))}function Na(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Pa={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Ba=0;Ba<10;Ba++)Pa[Ba+48]=Pa[Ba+96]=String(Ba);for(var Ga=65;Ga<=90;Ga++)Pa[Ga]=String.fromCharCode(Ga);for(var za=1;za<=12;za++)Pa[za+111]=Pa[za+63235]="F"+za;var Ua={};function Wa(e){var t,n,r,i,o=e.split(/-(?!$)/);e=o[o.length-1];for(var a=0;a<o.length-1;a++){var l=o[a];if(/^(cmd|meta|m)$/i.test(l))i=!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))throw new Error("Unrecognized modifier name: "+l);r=!0}}return t&&(e="Alt-"+e),n&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),r&&(e="Shift-"+e),e}function Ha(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var i=J(n.split(" "),Wa),o=0;o<i.length;o++){var a=void 0,l=void 0;o==i.length-1?(l=i.join(" "),a=r):(l=i.slice(0,o+1).join(" "),a="...");var u=t[l];if(u){if(u!=a)throw new Error("Inconsistent bindings for "+l)}else t[l]=a}delete e[n]}for(var s in t)e[s]=t[s];return e}function qa(e,t,n,r){var i=(t=Xa(t)).call?t.call(e,r):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&n(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return qa(e,t.fallthrough,n,r);for(var o=0;o<t.fallthrough.length;o++){var a=qa(e,t.fallthrough[o],n,r);if(a)return a}}}function Va(e){var t="string"==typeof e?e:Pa[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function ja(e,t,n){var r=e;return t.altKey&&"Alt"!=r&&(e="Alt-"+e),(w?t.metaKey:t.ctrlKey)&&"Ctrl"!=r&&(e="Ctrl-"+e),(w?t.ctrlKey:t.metaKey)&&"Mod"!=r&&(e="Cmd-"+e),!n&&t.shiftKey&&"Shift"!=r&&(e="Shift-"+e),e}function Ya(e,t){if(d&&34==e.keyCode&&e.char)return!1;var n=Pa[e.keyCode];return null!=n&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(n=e.code),ja(n,e,t))}function Xa(e){return"string"==typeof e?Ua[e]:e}function $a(e,t){for(var n=e.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var o=t(n[i]);r.length&&st(o.from,Q(r).to)<=0;){var a=r.pop();if(st(a.from,o.from)<0){o.from=a.from;break}}r.push(o)}Mi(e,(function(){for(var t=r.length-1;t>=0;t--)la(e.doc,"",r[t].from,r[t].to,"+delete");ci(e)}))}function Za(e,t,n){var r=se(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Ka(e,t,n){var r=Za(e,t.ch,n);return null==r?null:new ut(t.line,r,n<0?"after":"before")}function Qa(e,t,n,r,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=ge(n,t.doc.direction);if(o){var a,l=i<0?Q(o):o[0],u=i<0==(1==l.level)?"after":"before";if(l.level>0||"rtl"==t.doc.direction){var s=or(t,n);a=i<0?n.text.length-1:0;var c=ar(t,s,a).top;a=ce((function(e){return ar(t,s,e).top==c}),i<0==(1==l.level)?l.from:l.to-1,a),"before"==u&&(a=Za(n,a,1))}else a=i<0?l.to:l.from;return new ut(r,a,u)}}return new ut(r,i<0?n.text.length:0,i<0?"before":"after")}function Ja(e,t,n,r){var i=ge(t,e.doc.direction);if(!i)return Ka(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=he(i,n.ch,n.sticky),a=i[o];if("ltr"==e.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from<n.ch))return Ka(t,n,r);var l,u=function(e,n){return Za(t,e instanceof ut?e.ch:e,n)},s=function(n){return e.options.lineWrapping?(l=l||or(e,t),Ar(e,t,l,n)):{begin:0,end:t.text.length}},c=s("before"==n.sticky?u(n,-1):n.ch);if("rtl"==e.doc.direction||1==a.level){var f=1==a.level==r<0,d=u(n,f?1:-1);if(null!=d&&(f?d<=a.to&&d<=c.end:d>=a.from&&d>=c.begin)){var h=f?"before":"after";return new ut(n.line,d,h)}}var p=function(e,t,r){for(var o=function(e,t){return t?new ut(n.line,u(e,1),"before"):new ut(n.line,e,"after")};e>=0&&e<i.length;e+=t){var a=i[e],l=t>0==(1!=a.level),s=l?r.begin:u(r.end,-1);if(a.from<=s&&s<a.to)return o(s,l);if(s=l?a.from:u(a.to,-1),r.begin<=s&&s<r.end)return o(s,l)}},g=p(o+r,r,c);if(g)return g;var m=r>0?c.end:u(c.begin,-1);return null==m||r>0&&m==t.text.length||!(g=p(r>0?0:i.length-1,r,s(m)))?null:g}Ua.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Ua.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Ua.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Ua.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Ua.default=E?Ua.macDefault:Ua.pcDefault;var el={selectAll:Jo,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),j)},killLine:function(e){return $a(e,(function(t){if(t.empty()){var n=et(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:ut(t.head.line+1,0)}:{from:t.head,to:ut(t.head.line,n)}}return{from:t.from(),to:t.to()}}))},deleteLine:function(e){return $a(e,(function(t){return{from:ut(t.from().line,0),to:gt(e.doc,ut(t.to().line+1,0))}}))},delLineLeft:function(e){return $a(e,(function(e){return{from:ut(e.from().line,0),to:e.from()}}))},delWrappedLineLeft:function(e){return $a(e,(function(t){var n=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:n},"div"),to:t.from()}}))},delWrappedLineRight:function(e){return $a(e,(function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:r}}))},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(ut(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(ut(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy((function(t){return tl(e,t.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy((function(t){return rl(e,t.head)}),{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy((function(t){return nl(e,t.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")}),X)},goLineLeft:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")}),X)},goLineLeftSmart:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return r.ch<e.getLine(r.line).search(/\S/)?rl(e,t.head):r}),X)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),r=e.options.tabSize,i=0;i<n.length;i++){var o=n[i].from(),a=U(e.getLine(o.line),o.ch,r);t.push(K(r-a%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Mi(e,(function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)if(t[r].empty()){var i=t[r].head,o=et(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new ut(i.line,i.ch-1)),i.ch>0)i=new ut(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),ut(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=et(e.doc,i.line-1).text;a&&(i=new ut(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),ut(i.line-1,a.length-1),i,"+transpose"))}n.push(new uo(i,i))}e.setSelections(n)}))},newlineAndIndent:function(e){return Mi(e,(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r<t.length;r++)e.indentLine(t[r].from().line,null,!0);ci(e)}))},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function tl(e,t){var n=et(e.doc,t),r=tn(n);return r!=n&&(t=it(r)),Qa(!0,e,r,t,1)}function nl(e,t){var n=et(e.doc,t),r=nn(n);return r!=n&&(t=it(r)),Qa(!0,e,n,t,-1)}function rl(e,t){var n=tl(e,t.line),r=et(e.doc,n.line),i=ge(r,e.doc.direction);if(!i||0==i[0].level){var o=Math.max(n.ch,r.text.search(/\S/)),a=t.line==n.line&&t.ch<=o&&t.ch;return ut(n.line,a?0:o,n.sticky)}return n}function il(e,t,n){if("string"==typeof t&&!(t=el[t]))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=V}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function ol(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=qa(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&qa(t,e.options.extraKeys,n,e)||qa(t,e.options.keyMap,n,e)}var al=new W;function ll(e,t,n,r){var i=e.state.keySeq;if(i){if(Va(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:al.set(50,(function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())})),ul(e,i+" "+t,n,r))return!0}return ul(e,t,n,r)}function ul(e,t,n,r){var i=ol(e,t,r);return"multi"==i&&(e.state.keySeq=t),"handled"==i&&Rn(e,"keyHandled",e,t,n),"handled"!=i&&"multi"!=i||(Te(n),Kr(e)),!!i}function sl(e,t){var n=Ya(t,!0);return!!n&&(t.shiftKey&&!e.state.keySeq?ll(e,"Shift-"+n,t,(function(t){return il(e,t,!0)}))||ll(e,n,t,(function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return il(e,t)})):ll(e,n,t,(function(t){return il(e,t)})))}function cl(e,t,n){return ll(e,"'"+n+"'",t,(function(t){return il(e,t,!0)}))}var fl=null;function dl(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||(t.curOp.focus=k(P(t)),xe(t,e)))){a&&l<11&&27==e.keyCode&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=16==r||e.shiftKey;var i=sl(t,e);d&&(fl=i?r:null,i||88!=r||Ge||!(E?e.metaKey:e.ctrlKey)||t.replaceSelection("",null,"cut")),n&&!E&&!i&&46==r&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=r||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||hl(t)}}
2function hl(e){var t=e.display.lineDiv;function n(e){18!=e.keyCode&&e.altKey||(A(t,"CodeMirror-crosshair"),Ee(document,"keyup",n),Ee(document,"mouseover",n))}M(t,"CodeMirror-crosshair"),ve(document,"keyup",n),ve(document,"mouseover",n)}function pl(e){16==e.keyCode&&(this.doc.sel.shift=!1),xe(this,e)}function gl(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||Yn(t.display,e)||xe(t,e)||e.ctrlKey&&!e.altKey||E&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(d&&n==fl)return fl=null,void Te(e);if(!d||e.which&&!(e.which<10)||!sl(t,e)){var i=String.fromCharCode(null==r?n:r);"\b"!=i&&(cl(t,e,i)||t.display.input.onKeyPress(e))}}}var ml,vl,yl=400,El=function(e,t,n){this.time=e,this.pos=t,this.button=n};function _l(e,t){var n=+new Date;return vl&&vl.compare(n,e,t)?(ml=vl=null,"triple"):ml&&ml.compare(n,e,t)?(vl=new El(n,e,t),ml=null,"double"):(ml=new El(n,e,t),vl=null,"single")}function xl(e){var t=this,n=t.display;if(!(xe(t,e)||n.activeTouch&&n.input.supportsTouch()))if(n.input.ensurePolled(),n.shift=e.shiftKey,Yn(n,e))u||(n.scroller.draggable=!1,setTimeout((function(){return n.scroller.draggable=!0}),100));else if(!Ol(t,e)){var r=Br(t,e),i=Oe(e),o=r?_l(r,i):"single";B(t).focus(),1==i&&t.state.selectingText&&t.state.selectingText(e),r&&bl(t,i,r,o,e)||(1==i?r?Dl(t,r,o,e):Se(e)==n.scroller&&Te(e):2==i?(r&&Go(t.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==i&&(D?t.display.input.onContextMenu(e):Jr(t)))}}function bl(e,t,n,r,i){var o="Click";return"double"==r?o="Double"+o:"triple"==r&&(o="Triple"+o),ll(e,ja(o=(1==t?"Left":2==t?"Middle":"Right")+o,i),i,(function(t){if("string"==typeof t&&(t=el[t]),!t)return!1;var r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r=t(e,n)!=V}finally{e.state.suppressEdits=!1}return r}))}function wl(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(null==i.unit){var o=_?n.shiftKey&&n.metaKey:n.altKey;i.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==i.extend||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),null==i.addNew&&(i.addNew=E?n.metaKey:n.ctrlKey),null==i.moveOnDrag&&(i.moveOnDrag=!(E?n.altKey:n.ctrlKey)),i}function Dl(e,t,n,r){a?setTimeout(G(Qr,e),0):e.curOp.focus=k(P(e));var i,o=wl(e,n,r),l=e.doc.sel;e.options.dragDrop&&ke&&!e.isReadOnly()&&"single"==n&&(i=l.contains(t))>-1&&(st((i=l.ranges[i]).from(),t)<0||t.xRel>0)&&(st(i.to(),t)>0||t.xRel<0)?Tl(e,r,t,o):Al(e,r,t,o)}function Tl(e,t,n,r){var i=e.display,o=!1,s=Fi(e,(function(t){u&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Jr(e)),Ee(i.wrapper.ownerDocument,"mouseup",s),Ee(i.wrapper.ownerDocument,"mousemove",c),Ee(i.scroller,"dragstart",f),Ee(i.scroller,"drop",s),o||(Te(t),r.addNew||Go(e.doc,n,null,null,r.extend),u&&!h||a&&9==l?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),c=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},f=function(){return o=!0};u&&(i.scroller.draggable=!0),e.state.draggingText=s,s.copy=!r.moveOnDrag,ve(i.wrapper.ownerDocument,"mouseup",s),ve(i.wrapper.ownerDocument,"mousemove",c),ve(i.scroller,"dragstart",f),ve(i.scroller,"drop",s),e.state.delayingBlurEvent=!0,setTimeout((function(){return i.input.focus()}),20),i.scroller.dragDrop&&i.scroller.dragDrop()}function Il(e,t,n){if("char"==n)return new uo(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new uo(ut(t.line,0),gt(e.doc,ut(t.line+1,0)));var r=n(e,t);return new uo(r.from,r.to)}function Al(e,t,n,r){a&&Jr(e);var i=e.display,o=e.doc;Te(t);var l,u,s=o.sel,c=s.ranges;if(r.addNew&&!r.extend?(u=o.sel.contains(n),l=u>-1?c[u]:new uo(n,n)):(l=o.sel.primary(),u=o.sel.primIndex),"rectangle"==r.unit)r.addNew||(l=new uo(n,n)),n=Br(e,t,!0,!0),u=-1;else{var f=Il(e,n,r.unit);l=r.extend?Bo(l,f.anchor,f.head,r.extend):f}r.addNew?-1==u?(u=c.length,Vo(o,so(e,c.concat([l]),u),{scroll:!1,origin:"*mouse"})):c.length>1&&c[u].empty()&&"char"==r.unit&&!r.extend?(Vo(o,so(e,c.slice(0,u).concat(c.slice(u+1)),0),{scroll:!1,origin:"*mouse"}
vendor: 43,444 bytes, line 2
2),s=o.sel):Uo(o,u,l,Y):(u=0,Vo(o,new lo([l],0),Y),s=o.sel);var d=n;function h(t){if(0!=st(d,t))if(d=t,"rectangle"==r.unit){for(var i=[],a=e.options.tabSize,c=U(et(o,n.line).text,n.ch,a),f=U(et(o,t.line).text,t.ch,a),h=Math.min(c,f),p=Math.max(c,f),g=Math.min(n.line,t.line),m=Math.min(e.lastLine(),Math.max(n.line,t.line));g<=m;g++){var v=et(o,g).text,y=$(v,h,a);h==p?i.push(new uo(ut(g,y),ut(g,y))):v.length>y&&i.push(new uo(ut(g,y),ut(g,$(v,p,a))))}i.length||i.push(new uo(n,n)),Vo(o,so(e,s.ranges.slice(0,u).concat(i),u),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var E,_=l,x=Il(e,t,r.unit),b=_.anchor;st(x.anchor,b)>0?(E=x.head,b=ht(_.from(),x.anchor)):(E=x.anchor,b=dt(_.to(),x.head));var w=s.ranges.slice(0);w[u]=Cl(e,new uo(gt(o,b),E)),Vo(o,so(e,w,u),Y)}}var p=i.wrapper.getBoundingClientRect(),g=0;function m(t){var n=++g,a=Br(e,t,!0,"rectangle"==r.unit);if(a)if(0!=st(a,d)){e.curOp.focus=k(P(e)),h(a);var l=ii(i,o);(a.line>=l.to||a.line<l.from)&&setTimeout(Fi(e,(function(){g==n&&m(t)})),150)}else{var u=t.clientY<p.top?-20:t.clientY>p.bottom?20:0;u&&setTimeout(Fi(e,(function(){g==n&&(i.scroller.scrollTop+=u,m(t))})),50)}}function v(t){e.state.selectingText=!1,g=1/0,t&&(Te(t),i.input.focus()),Ee(i.wrapper.ownerDocument,"mousemove",y),Ee(i.wrapper.ownerDocument,"mouseup",E),o.history.lastSelOrigin=null}var y=Fi(e,(function(e){0!==e.buttons&&Oe(e)?m(e):v(e)})),E=Fi(e,v);e.state.selectingText=E,ve(i.wrapper.ownerDocument,"mousemove",y),ve(i.wrapper.ownerDocument,"mouseup",E)}function Cl(e,t){var n=t.anchor,r=t.head,i=et(e.doc,n.line);if(0==st(n,r)&&n.sticky==r.sticky)return t;var o=ge(i);if(!o)return t;var a=he(o,n.ch,n.sticky),l=o[a];if(l.from!=n.ch&&l.to!=n.ch)return t;var u,s=a+(l.from==n.ch==(1!=l.level)?0:1);if(0==s||s==o.length)return t;if(r.line!=n.line)u=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=he(o,r.ch,r.sticky),f=c-a||(r.ch-n.ch)*(1==l.level?-1:1);u=c==s-1||c==s?f<0:f>0}var d=o[s+(u?-1:0)],h=u==(1==d.level),p=h?d.from:d.to,g=h?"after":"before";return n.ch==p&&n.sticky==g?t:new uo(new ut(n.line,p,g),r)}function Sl(e,t,n,r){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(e){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&Te(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(o>l.bottom||!we(e,n))return Ae(t);o-=l.top-a.viewOffset;for(var u=0;u<e.display.gutterSpecs.length;++u){var s=a.gutters.childNodes[u];if(s&&s.getBoundingClientRect().right>=i)return _e(e,n,e,ot(e.doc,o),e.display.gutterSpecs[u].className,t),Ae(t)}}function Ol(e,t){return Sl(e,t,"gutterClick",!0)}function Ll(e,t){Yn(e.display,t)||Rl(e,t)||xe(e,t,"contextmenu")||D||e.display.input.onContextMenu(t)}function Rl(e,t){return!!we(e,"gutterContextMenu")&&Sl(e,t,"gutterContextMenu",!1)}function kl(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),gr(e)}El.prototype.compare=function(e,t,n){return this.time+yl>e&&0==st(t,this.pos)&&n==this.button};var Ml={toString:function(){return"CodeMirror.Init"}},Fl={},Nl={};function Pl(e){var t=e.optionHandlers;function n(n,r,i,o){e.defaults[n]=r,i&&(t[n]=o?function(e,t,n){n!=Ml&&i(e,t,n)}:i)}e.defineOption=n,e.Init=Ml,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,vo(e)}),!0),n("indentUnit",2,vo,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){yo(e),gr(e),zr(e)}),!0),n("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter((function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,n.push(ut(r,o))}r++}));for(var i=n.length-1;i>=0;i--)la(e.doc,t,n[i],ut(n[i].line,n[i].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Ml&&e.refresh()})),n("specialCharPlaceholder",En,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",y?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!x),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){kl(e),eo(e)}),!0),n("keyMap","default",(function(e,t,n){var r=Xa(t),i=n!=Ml&&Xa(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Gl,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=Qi(t,e.options.lineNumbers),eo(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?Fr(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return xi(e)}),!0),n("scrollbarStyle","native",(function(e){Di(e),xi(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=Qi(e.options.gutters,t),eo(e)}),!0),n("firstLineNumber",1,eo,!0),n("lineNumberFormatter",(function(e){return e}),eo,!0),n("showCursorWhenSelecting",!1,jr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(ti(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,Bl),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,jr,!0),n("singleCursorHeightPerLine",!0,jr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,yo,!0),n("addModeClass",!1,yo,!0),n("pollInterval",100),n("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),n("historyEventDelay",1250),n("viewportMargin",10,(function(e){return e.refresh()}),!0),n("maxHighlightLength",1e4,yo,!0),n("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),n("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),n("autofocus",null),n("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),n("phrases",null)}function Bl(e,t,n){if(!t!=!(n&&n!=Ml)){var r=e.display.dragFunctions,i=t?ve:Ee;i(e.display.scroller,"dragstart",r.start),i(e.display.scroller,"dragenter",r.enter),i(e.display.scroller,"dragover",r.over),i(e.display.scroller,"dragleave",r.leave),i(e.display.scroller,"drop",r.drop)}}function Gl(e){e.options.lineWrapping?(M(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(A(e.display.wrapper,"CodeMirror-wrap"),fn(e)),Pr(e),zr(e),gr(e),setTimeout((function(){return xi(e)}),100)}function zl(e,t){var n=this;if(!(this instanceof zl))return new zl(e,t);this.options=t=t?z(t):{},z(Fl,t,!1);var r=t.value;"string"==typeof r?r=new Ia(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new zl.inputStyles[t.inputStyle](this),o=this.display=new to(e,r,i,t);for(var s in o.wrapper.CodeMirror=this,kl(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Di(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new W,keySeq:null,specialChars:null},t.autofocus&&!y&&o.input.focus(),a&&l<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),Ul(this),Ma(),Ii(this),this.curOp.forceUpdate=!0,bo(this,r),t.autofocus&&!y||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&ei(n)}),20):ti(this),Nl)Nl.hasOwnProperty(s)&&Nl[s](this,t[s],Ml);Ki(this),t.finishInit&&t.finishInit(this);for(var c=0;c<Wl.length;++c)Wl[c](this);Ai(this),u&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}function Ul(e){var t=e.display;ve(t.scroller,"mousedown",Fi(e,xl)),ve(t.scroller,"dblclick",a&&l<11?Fi(e,(function(t){if(!xe(e,t)){var n=Br(e,t);if(n&&!Ol(e,t)&&!Yn(e.display,t)){Te(t);var r=e.findWordAt(n);Go(e.doc,r.anchor,r.head)}}})):function(t){return xe(e,t)||Te(t)}),ve(t.scroller,"contextmenu",(function(t){return Ll(e,t)})),ve(t.input.getField(),"contextmenu",(function(n){t.scroller.contains(n.target)||Ll(e,n)}));var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout((function(){return t.activeTouch=null}),1e3),(r=t.activeTouch).end=+new Date)}function o(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function u(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}ve(t.scroller,"touchstart",(function(i){if(!xe(e,i)&&!o(i)&&!Ol(e,i)){t.input.ensurePolled(),clearTimeout(n);var a=+new Date;t.activeTouch={start:a,moved:!1,prev:a-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),ve(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),ve(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!Yn(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var o,a=e.coordsChar(t.activeTouch,"page");o=!r.prev||u(r,r.prev)?new uo(a,a):!r.prev.prev||u(r,r.prev.prev)?e.findWordAt(a):new uo(ut(a.line,0),gt(e.doc,ut(a.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),Te(n)}i()})),ve(t.scroller,"touchcancel",i),ve(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(gi(e,t.scroller.scrollTop),vi(e,t.scroller.scrollLeft,!0),_e(e,"scroll",e))})),ve(t.scroller,"mousewheel",(function(t){return ao(e,t)})),ve(t.scroller,"DOMMouseScroll",(function(t){return ao(e,t)})),ve(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){xe(e,t)||Ce(t)},over:function(t){xe(e,t)||(Oa(e,t),Ce(t))},start:function(t){return Sa(e,t)},drop:Fi(e,Ca),leave:function(t){xe(e,t)||La(e)}};var s=t.input.getField();ve(s,"keyup",(function(t){return pl.call(e,t)})),ve(s,"keydown",Fi(e,dl)),ve(s,"keypress",Fi(e,gl)),ve(s,"focus",(function(t){return ei(e,t)})),ve(s,"blur",(function(t){return ti(e,t)}))}zl.defaults=Fl,zl.optionHandlers=Nl;var Wl=[];function Hl(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=bt(e,t).state:n="prev");var a=e.options.tabSize,l=et(o,t),u=U(l.text,null,a);l.stateAfter&&(l.stateAfter=null);var s,c=l.text.match(/^\s*/)[0];if(r||/\S/.test(l.text)){if("smart"==n&&((s=o.mode.indent(i,l.text.slice(c.length),l.text))==V||s>150)){if(!r)return;n="prev"}}else s=0,n="not";"prev"==n?s=t>o.first?U(et(o,t-1).text,null,a):0:"add"==n?s=u+e.options.indentUnit:"subtract"==n?s=u-e.options.indentUnit:"number"==typeof n&&(s=u+n),s=Math.max(0,s);var f="",d=0;if(e.options.indentWithTabs)for(var h=Math.floor(s/a);h;--h)d+=a,f+="\t";if(d<s&&(f+=K(s-d)),f!=c)return la(o,f,ut(t,0),ut(t,c.length),"+input"),l.stateAfter=null,!0;for(var p=0;p<o.sel.ranges.length;p++){var g=o.sel.ranges[p];if(g.head.line==t&&g.head.ch<c.length){var m=ut(t,c.length);Uo(o,p,new uo(m,m));break}}}zl.defineInitHook=function(e){return Wl.push(e)};var ql=null;function Vl(e){ql=e}function jl(e,t,n,r,i){var o=e.doc;e.display.shift=!1,r||(r=o.sel);var a=+new Date-200,l="paste"==i||e.state.pasteIncoming>a,u=Pe(t),s=null;if(l&&r.ranges.length>1)if(ql&&ql.text.join("\n")==t){if(r.ranges.length%ql.text.length==0){s=[];for(var c=0;c<ql.text.length;c++)s.push(o.splitLines(ql.text[c]))}}else u.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(s=J(u,(function(e){return[e]})));for(var f=e.curOp.updateInput,d=r.ranges.length-1;d>=0;d--){var h=r.ranges[d],p=h.from(),g=h.to();h.empty()&&(n&&n>0?p=ut(p.line,p.ch-n):e.state.overwrite&&!l?g=ut(g.line,Math.min(et(o,g.line).text.length,g.ch+Q(u).length)):l&&ql&&ql.lineWise&&ql.text.join("\n")==u.join("\n")&&(p=g=ut(p.line,0)));var m={from:p,to:g,text:s?s[d%s.length]:u,origin:i||(l?"paste":e.state.cutIncoming>a?"cut":"+input")};ta(e.doc,m),Rn(e,"inputRead",e,m)}t&&!l&&Xl(e,t),ci(e),e.curOp.updateInput<2&&(e.curOp.updateInput=f),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Yl(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||!t.hasFocus()||Mi(t,(function(){return jl(t,n,0,null,"paste")})),!0}function Xl(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var l=0;l<o.electricChars.length;l++)if(t.indexOf(o.electricChars.charAt(l))>-1){a=Hl(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(et(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Hl(e,i.head.line,"smart"));a&&Rn(e,"electricInput",e,i.head.line)}}}function $l(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,o={anchor:ut(i,0),head:ut(i+1,0)};n.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:n}}function Zl(e,t,n,r){e.setAttribute("autocorrect",n?"on":"off"),e.setAttribute("autocapitalize",r?"on":"off"),e.setAttribute("spellcheck",!!t)}function Kl(){var e=O("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=O("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return u?e.style.width="1000px":e.setAttribute("wrap","off"),m&&(e.style.border="1px solid black"),t}function Ql(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){B(this).focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,i=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&Fi(this,t[e])(this,n,i),_e(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Xa(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:Ni((function(t,n){var r=t.token?t:e.getMode(this.options,t);if(r.startState)throw new Error("Overlays may not be stateful.");ee(this.state.overlays,{mode:r,modeSpec:t,opaque:n&&n.opaque,priority:n&&n.priority||0},(function(e){return e.priority})),this.state.modeGen++,zr(this)})),removeOverlay:Ni((function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var r=t[n].modeSpec;if(r==e||"string"==typeof e&&r.name==e)return t.splice(n,1),this.state.modeGen++,void zr(this)}})),indentLine:Ni((function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),at(this.doc,e)&&Hl(this,e,t,n)})),indentSelection:Ni((function(e){for(var t=this.doc.sel.ranges,n=-1,r=0;r<t.length;r++){var i=t[r];if(i.empty())i.head.line>n&&(Hl(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&ci(this));else{var o=i.from(),a=i.to(),l=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var u=l;u<n;++u)Hl(this,u,e);var s=this.doc.sel.ranges;0==o.ch&&t.length==s.length&&s[r].from().ch>0&&Uo(this.doc,r,new uo(o,s[r].to()),j)}}})),getTokenAt:function(e,t){return At(this,e,t)},getLineTokens:function(e,t){return At(this,ut(e),t,!0)},getTokenTypeAt:function(e){e=gt(this.doc,e);var t,n=xt(this,et(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]<o)){t=n[2*a+2];break}r=a+1}}var l=t?t.indexOf("overlay "):-1;return l<0?t:0==l?null:t.slice(0,l-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var r=[];if(!n.hasOwnProperty(t))return r;var i=n[t],o=this.getModeAt(e);if("string"==typeof o[t])i[o[t]]&&r.push(i[o[t]]);else if(o[t])for(var a=0;a<o[t].length;a++){var l=i[o[t][a]];l&&r.push(l)}else o.helperType&&i[o.helperType]?r.push(i[o.helperType]):i[o.name]&&r.push(i[o.name]);for(var u=0;u<i._global.length;u++){var s=i._global[u];s.pred(o,this)&&-1==H(r,s.val)&&r.push(s.val)}return r},getStateAfter:function(e,t){var n=this.doc;return bt(this,(e=pt(n,null==e?n.first+n.size-1:e))+1,t).state},cursorCoords:function(e,t){var n=this.doc.sel.primary();return br(this,null==e?n.head:"object"==typeof e?gt(this.doc,e):e?n.from():n.to(),t||"page")},charCoords:function(e,t){return xr(this,gt(this.doc,e),t||"page")},coordsChar:function(e,t){return Tr(this,(e=_r(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=_r(this,{top:e,left:0},t||"page").top,ot(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,n){var r,i=!1;if("number"==typeof e){var o=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>o&&(e=o,i=!0),r=et(this.doc,e)}else r=e;return Er(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-sn(r):0)},defaultTextHeight:function(){return Rr(this.display)},defaultCharWidth:function(){return kr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o=this.display,a=(e=br(this,gt(this.doc,e))).bottom,l=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==r)a=e.top;else if("above"==r||"near"==r){var u=Math.max(o.wrapper.clientHeight,this.doc.height),s=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>u)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=u&&(a=e.bottom),l+t.offsetWidth>s&&(l=s-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(l=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?l=0:"middle"==i&&(l=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=l+"px"),n&&li(this,{left:l,top:a,right:l+t.offsetWidth,bottom:a+t.offsetHeight})},triggerOnKeyDown:Ni(dl),triggerOnKeyPress:Ni(gl),triggerOnKeyUp:pl,triggerOnMouseDown:Ni(xl),execCommand:function(e){if(el.hasOwnProperty(e))return el[e].call(null,this)},triggerElectric:Ni((function(e){Xl(this,e)})),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=gt(this.doc,e),a=0;a<t&&!(o=Jl(this.doc,o,i,n,r)).hitSide;++a);return o},moveH:Ni((function(e,t){var n=this;this.extendSelectionsBy((function(r){return n.display.shift||n.doc.extend||r.empty()?Jl(n.doc,r.head,e,t,n.options.rtlMoveVisually):e<0?r.from():r.to()}),X)})),deleteH:Ni((function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):$a(this,(function(n){var i=Jl(r,n.head,e,t,!1);return e<0?{from:i,to:n.head}:{from:n.head,to:i}}))})),findPosV:function(e,t,n,r){var i=1,o=r;t<0&&(i=-1,t=-t);for(var a=gt(this.doc,e),l=0;l<t;++l){var u=br(this,a,"div");if(null==o?o=u.left:u.left=o,(a=eu(this,u,i,n)).hitSide)break}return a},moveV:Ni((function(e,t){var n=this,r=this.doc,i=[],o=!this.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy((function(a){if(o)return e<0?a.from():a.to();var l=br(n,a.head,"div");null!=a.goalColumn&&(l.left=a.goalColumn),i.push(l.left);var u=eu(n,l,e,t);return"page"==t&&a==r.sel.primary()&&si(n,xr(n,u,"div").top-l.top),u}),X),i.length)for(var a=0;a<r.sel.ranges.length;a++)r.sel.ranges[a].goalColumn=i[a]})),findWordAt:function(e){var t=et(this.doc,e.line).text,n=e.ch,r=e.ch;if(t){var i=this.getHelper(e,"wordChars");"before"!=e.sticky&&r!=t.length||!n?++r:--n;for(var o=t.charAt(n),a=oe(o,i)?function(e){return oe(e,i)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!oe(e)};n>0&&a(t.charAt(n-1));)--n;for(;r<t.length&&a(t.charAt(r));)++r}return new uo(ut(e.line,n),ut(e.line,r))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?M(this.display.cursorDiv,"CodeMirror-overwrite"):A(this.display.cursorDiv,"CodeMirror-overwrite"),_e(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==k(P(this))},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:Ni((function(e,t){fi(this,e,t)})),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Kn(this)-this.display.barHeight,width:e.scrollWidth-Kn(this)-this.display.barWidth,clientHeight:Jn(this),clientWidth:Qn(this)}},scrollIntoView:Ni((function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:ut(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?di(this,e):pi(this,e.from,e.to,e.margin)})),setSize:Ni((function(e,t){var n=this,r=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=r(e)),null!=t&&(this.display.wrapper.style.height=r(t)),this.options.lineWrapping&&pr(this);var i=this.display.viewFrom;this.doc.iter(i,this.display.viewTo,(function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){Ur(n,i,"widget");break}++i})),this.curOp.forceUpdate=!0,_e(this,"refresh",this)})),operation:function(e){return Mi(this,e)},startOperation:function(){return Ii(this)},endOperation:function(){return Ai(this)},refresh:Ni((function(){var e=this.display.cachedTextHeight;zr(this),this.curOp.forceUpdate=!0,gr(this),fi(this,this.doc.scrollLeft,this.doc.scrollTop),Xi(this.display),(null==e||Math.abs(e-Rr(this.display))>.5||this.options.lineWrapping)&&Pr(this),_e(this,"refresh",this)})),swapDoc:Ni((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),bo(this,e),gr(this),this.display.input.reset(),fi(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Rn(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},De(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,o){e.registerHelper(t,r,o),n[t]._global.push({pred:i,val:o})}}function Jl(e,t,n,r,i){var o=t,a=n,l=et(e,t.line),u=i&&"rtl"==e.direction?-n:n;function s(){var n=t.line+u;return!(n<e.first||n>=e.first+e.size)&&(t=new ut(n,t.ch,t.sticky),l=et(e,n))}function c(o){var a;if("codepoint"==r){var c=l.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(c))a=null;else{var f=n>0?c>=55296&&c<56320:c>=56320&&c<57343;a=new ut(t.line,Math.max(0,Math.min(l.text.length,t.ch+n*(f?2:1))),-n)}}else a=i?Ja(e.cm,l,t,n):Ka(l,t,n);if(null==a){if(o||!s())return!1;t=Qa(i,e.cm,l,t.line,u)}else t=a;return!0}if("char"==r||"codepoint"==r)c();else if("column"==r)c(!0);else if("word"==r||"group"==r)for(var f=null,d="group"==r,h=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;!(n<0)||c(!p);p=!1){var g=l.text.charAt(t.ch)||"\n",m=oe(g,h)?"w":d&&"\n"==g?"n":!d||/\s/.test(g)?null:"p";if(!d||p||m||(m="s"),f&&f!=m){n<0&&(n=1,c(),t.sticky="after");break}if(m&&(f=m),n>0&&!c(!p))break}var v=Ko(e,t,o,a,!0);return ct(o,v)&&(v.hitSide=!0),v}function eu(e,t,n,r){var i,o,a=e.doc,l=t.left;if("page"==r){var u=Math.min(e.display.wrapper.clientHeight,B(e).innerHeight||a(e).documentElement.clientHeight),s=Math.max(u-.5*Rr(e.display),3);i=(n>0?t.bottom:t.top)+n*s}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;(o=Tr(e,l,i)).outside;){if(n<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*n}return o}var tu=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new W,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function nu(e,t){var n=ir(e,t.line);if(!n||n.hidden)return null;var r=et(e.doc,t.line),i=tr(n,r,t.line),o=ge(r,e.doc.direction),a="left";o&&(a=he(o,t.ch)%2?"right":"left");var l=sr(i.map,t.ch,a);return l.offset="right"==l.collapse?l.end:l.start,l}function ru(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function iu(e,t){return t&&(e.bad=!0),e}function ou(e,t,n,r,i){var o="",a=!1,l=e.doc.lineSeparator(),u=!1;function s(e){return function(t){return t.id==e}}function c(){a&&(o+=l,u&&(o+=l),a=u=!1)}function f(e){e&&(c(),o+=e)}function d(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void f(n);var o,h=t.getAttribute("cm-marker");if(h){var p=e.findMarks(ut(r,0),ut(i+1,0),s(+h));return void(p.length&&(o=p[0].find(0))&&f(tt(e.doc,o.from,o.to).join(l)))}if("false"==t.getAttribute("contenteditable"))return;var g=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;g&&c();for(var m=0;m<t.childNodes.length;m++)d(t.childNodes[m]);/^(pre|p)$/i.test(t.nodeName)&&(u=!0),g&&(a=!0)}else 3==t.nodeType&&f(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;d(t),t!=n;)t=t.nextSibling,u=!1;return o}function au(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return iu(e.clipPos(ut(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==r)return lu(o,t,n)}}function lu(e,t,n){var r=e.text.firstChild,i=!1;if(!t||!R(r,t))return iu(ut(it(e.line),0),!0);if(t==r&&(i=!0,t=r.childNodes[n],n=0,!t)){var o=e.rest?Q(e.rest):e.line;return iu(ut(it(o),o.text.length),i)}var a=3==t.nodeType?t:null,l=t;for(a||1!=t.childNodes.length||3!=t.firstChild.nodeType||(a=t.firstChild,n&&(n=a.nodeValue.length));l.parentNode!=r;)l=l.parentNode;var u=e.measure,s=u.maps;function c(t,n,r){for(var i=-1;i<(s?s.length:0);i++)for(var o=i<0?u.map:s[i],a=0;a<o.length;a+=3){var l=o[a+2];if(l==t||l==n){var c=it(i<0?e.line:e.rest[i]),f=o[a]+r;return(r<0||l!=t)&&(f=o[a+(r?1:0)]),ut(c,f)}}}var f=c(a,l,n);if(f)return iu(f,i);for(var d=l.nextSibling,h=a?a.nodeValue.length-n:0;d;d=d.nextSibling){if(f=c(d,d.firstChild,0))return iu(ut(f.line,f.ch-h),i);h+=d.textContent.length}for(var p=l.previousSibling,g=n;p;p=p.previousSibling){if(f=c(p,p.firstChild,-1))return iu(ut(f.line,f.ch+g),i);g+=p.textContent.length}}tu.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;function o(e){for(var t=e.target;t;t=t.parentNode){if(t==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(t.className))break}return!1}function a(e){if(o(e)&&!xe(r,e)){if(r.somethingSelected())Vl({lineWise:!1,text:r.getSelections()}),"cut"==e.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var t=$l(r);Vl({lineWise:!0,text:t.text}),"cut"==e.type&&r.operation((function(){r.setSelections(t.ranges,0,j),r.replaceSelection("",null,"cut")}))}if(e.clipboardData){e.clipboardData.clearData();var a=ql.text.join("\n");if(e.clipboardData.setData("Text",a),e.clipboardData.getData("Text")==a)return void e.preventDefault()}var l=Kl(),u=l.firstChild;Zl(u),r.display.lineSpace.insertBefore(l,r.display.lineSpace.firstChild),u.value=ql.text.join("\n");var s=k(i.ownerDocument);N(u),setTimeout((function(){r.display.lineSpace.removeChild(l),s.focus(),s==i&&n.showPrimarySelection()}),50)}}i.contentEditable=!0,Zl(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize),ve(i,"paste",(function(e){!o(e)||xe(r,e)||Yl(e,r)||l<=11&&setTimeout(Fi(r,(function(){return t.updateFromDOM()})),20)})),ve(i,"compositionstart",(function(e){t.composing={data:e.data,done:!1}})),ve(i,"compositionupdate",(function(e){t.composing||(t.composing={data:e.data,done:!1})})),ve(i,"compositionend",(function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)})),ve(i,"touchstart",(function(){return n.forceCompositionEnd()})),ve(i,"input",(function(){t.composing||t.readFromDOMSoon()})),ve(i,"copy",a),ve(i,"cut",a)},tu.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},tu.prototype.prepareSelection=function(){var e=Yr(this.cm,!1);return e.focus=k(this.div.ownerDocument)==this.div,e},tu.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},tu.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},tu.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),i=r.from(),o=r.to();if(t.display.viewTo==t.display.viewFrom||i.line>=t.display.viewTo||o.line<t.display.viewFrom)e.removeAllRanges();else{var a=au(t,e.anchorNode,e.anchorOffset),l=au(t,e.focusNode,e.focusOffset);if(!a||a.bad||!l||l.bad||0!=st(ht(a,l),i)||0!=st(dt(a,l),o)){var u=t.display.view,s=i.line>=t.display.viewFrom&&nu(t,i)||{node:u[0].measure.map[2],offset:0},c=o.line<t.display.viewTo&&nu(t,o);if(!c){var f=u[u.length-1].measure,d=f.maps?f.maps[f.maps.length-1]:f.map;c={node:d[d.length-1],offset:d[d.length-2]-d[d.length-3]}}if(s&&c){var h,p=e.rangeCount&&e.getRangeAt(0);try{h=I(s.node,s.offset,c.offset,c.node)}catch(e){}h&&(!n&&t.state.focused?(e.collapse(s.node,s.offset),h.collapsed||(e.removeAllRanges(),e.addRange(h))):(e.removeAllRanges(),e.addRange(h)),p&&null==e.anchorNode?e.addRange(p):n&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},tu.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout((function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation((function(){return e.cm.curOp.selectionChanged=!0}))}),20)},tu.prototype.showMultipleSelections=function(e){S(this.cm.display.cursorDiv,e.cursors),S(this.cm.display.selectionDiv,e.selection)},tu.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},tu.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return R(this.div,t)},tu.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&k(this.div.ownerDocument)==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},tu.prototype.blur=function(){this.div.blur()},tu.prototype.getField=function(){return this.div},tu.prototype.supportsTouch=function(){return!0},tu.prototype.receivedFocus=function(){var e=this,t=this;function n(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,n))}this.selectionInEditor()?setTimeout((function(){return e.pollSelection()}),20):Mi(this.cm,(function(){return t.cm.curOp.selectionChanged=!0})),this.polling.set(this.cm.options.pollInterval,n)},tu.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},tu.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(v&&c&&this.cm.display.gutterSpecs.length&&ru(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var n=au(t,e.anchorNode,e.anchorOffset),r=au(t,e.focusNode,e.focusOffset);n&&r&&Mi(t,(function(){Vo(t.doc,co(n,r),j),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)}))}}},tu.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,n,r=this.cm,i=r.display,o=r.doc.sel.primary(),a=o.from(),l=o.to();if(0==a.ch&&a.line>r.firstLine()&&(a=ut(a.line-1,et(r.doc,a.line-1).length)),l.ch==et(r.doc,l.line).text.length&&l.line<r.lastLine()&&(l=ut(l.line+1,0)),a.line<i.viewFrom||l.line>i.viewTo-1)return!1;a.line==i.viewFrom||0==(e=Gr(r,a.line))?(t=it(i.view[0].line),n=i.view[0].node):(t=it(i.view[e].line),n=i.view[e-1].node.nextSibling);var u,s,c=Gr(r,l.line);if(c==i.view.length-1?(u=i.viewTo-1,s=i.lineDiv.lastChild):(u=it(i.view[c+1].line)-1,s=i.view[c+1].node.previousSibling),!n)return!1;for(var f=r.doc.splitLines(ou(r,n,s,t,u)),d=tt(r.doc,ut(t,0),ut(u,et(r.doc,u).text.length));f.length>1&&d.length>1;)if(Q(f)==Q(d))f.pop(),d.pop(),u--;else{if(f[0]!=d[0])break;f.shift(),d.shift(),t++}for(var h=0,p=0,g=f[0],m=d[0],v=Math.min(g.length,m.length);h<v&&g.charCodeAt(h)==m.charCodeAt(h);)++h;for(var y=Q(f),E=Q(d),_=Math.min(y.length-(1==f.length?h:0),E.length-(1==d.length?h:0));p<_&&y.charCodeAt(y.length-p-1)==E.charCodeAt(E.length-p-1);)++p;if(1==f.length&&1==d.length&&t==a.line)for(;h&&h>a.ch&&y.charCodeAt(y.length-p-1)==E.charCodeAt(E.length-p-1);)h--,p++;f[f.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),f[0]=f[0].slice(h).replace(/\u200b+$/,"");var x=ut(t,h),b=ut(u,d.length?Q(d).length-p:0);return f.length>1||f[0]||st(x,b)?(la(r.doc,f,x,b,"+input"),!0):void 0},tu.prototype.ensurePolled=function(){this.forceCompositionEnd()},tu.prototype.reset=function(){this.forceCompositionEnd()},tu.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},tu.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},tu.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Mi(this.cm,(function(){return zr(e.cm)}))},tu.prototype.setUneditable=function(e){e.contentEditable="false"},tu.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Fi(this.cm,jl)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},tu.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},tu.prototype.onContextMenu=function(){},tu.prototype.resetPosition=function(){},tu.prototype.needsContentAttribute=!0;var uu=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new W,this.hasSelection=!1,this.composing=null,this.resetting=!1};function su(e,t){if((t=t?z(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=k(e.ownerDocument);t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=l.getValue()}var i;if(e.form&&(ve(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var a=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=a}}catch(e){}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(Ee(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var l=zl((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return l}function cu(e){e.off=Ee,e.on=ve,e.wheelEventPixels=oo,e.Doc=Ia,e.splitLines=Pe,e.countColumn=U,e.findColumn=$,e.isWordChar=ie,e.Pass=V,e.signal=_e,e.Line=dn,e.changeEnd=fo,e.scrollbarModel=wi,e.Pos=ut,e.cmpPos=st,e.modes=We,e.mimeModes=He,e.resolveMode=je,e.getMode=Ye,e.modeExtensions=Xe,e.extendMode=$e,e.copyState=Ze,e.startState=Qe,e.innerMode=Ke,e.commands=el,e.keyMap=Ua,e.keyName=Ya,e.isModifierKey=Va,e.lookupKey=qa,e.normalizeKeyMap=Ha,e.StringStream=Je,e.SharedTextMarker=_a,e.TextMarker=ya,e.LineWidget=pa,e.e_preventDefault=Te,e.e_stopPropagation=Ie,e.e_stop=Ce,e.addClass=M,e.contains=R,e.rmClass=A,e.keyNames=Pa}uu.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!xe(r,e)){if(r.somethingSelected())Vl({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=$l(r);Vl({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,j):(n.prevInput="",i.value=t.text.join("\n"),N(i))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),m&&(i.style.width="0px"),ve(i,"input",(function(){a&&l>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),ve(i,"paste",(function(e){xe(r,e)||Yl(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),ve(i,"cut",o),ve(i,"copy",o),ve(e.scroller,"paste",(function(t){if(!Yn(e,t)&&!xe(r,t)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}})),ve(e.lineSpace,"selectstart",(function(t){Yn(e,t)||Te(t)})),ve(i,"compositionstart",(function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}})),ve(i,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},uu.prototype.createField=function(e){this.wrapper=Kl(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;Zl(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},uu.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},uu.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=Yr(e);if(e.options.moveInputWithCursor){var i=br(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},uu.prototype.showSelection=function(e){var t=this.cm.display;S(t.cursorDiv,e.cursors),S(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},uu.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&N(this.textarea),a&&l>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",a&&l>=9&&(this.hasSelection=null));this.resetting=!1}},uu.prototype.getField=function(){return this.textarea},uu.prototype.supportsTouch=function(){return!1},uu.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!y||k(this.textarea.ownerDocument)!=this.textarea))try{this.textarea.focus()}catch(e){}},uu.prototype.blur=function(){this.textarea.blur()},uu.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},uu.prototype.receivedFocus=function(){this.slowPoll()},uu.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},uu.prototype.fastPoll=function(){var e=!1,t=this;function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}t.pollingFast=!0,t.polling.set(20,n)},uu.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||Be(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(a&&l>=9&&this.hasSelection===i||E&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var u=0,s=Math.min(r.length,i.length);u<s&&r.charCodeAt(u)==i.charCodeAt(u);)++u;return Mi(t,(function(){jl(t,i.slice(u),r.length-u,null,e.composing?"*compose":null),i.length>1e3||i.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},uu.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},uu.prototype.onKeyPress=function(){a&&l>=9&&(this.hasSelection=null),this.fastPoll()},uu.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=Br(n,e),s=r.scroller.scrollTop;if(o&&!d){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(o)&&Fi(n,Vo)(n.doc,co(o),j);var c,f=i.style.cssText,h=t.wrapper.style.cssText,p=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n      top: "+(e.clientY-p.top-5)+"px; left: "+(e.clientX-p.left-5)+"px;\n      z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n      outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",u&&(c=i.ownerDocument.defaultView.scrollY),r.input.focus(),u&&i.ownerDocument.defaultView.scrollTo(null,c),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=v,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),a&&l>=9&&m(),D){Ce(e);var g=function(){Ee(window,"mouseup",g),setTimeout(v,20)};ve(window,"mouseup",g)}else setTimeout(v,50)}function m(){if(null!=i.selectionStart){var e=n.somethingSelected(),o="​"+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"​",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function v(){if(t.contextMenuPending==v&&(t.contextMenuPending=!1,t.wrapper.style.cssText=h,i.style.cssText=f,a&&l<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=s),null!=i.selectionStart)){(!a||a&&l<9)&&m();var e=0,o=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?Fi(n,Jo)(n):e++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(o,200)}}},uu.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},uu.prototype.setUneditable=function(){},uu.prototype.needsContentAttribute=!1,Pl(zl),Ql(zl);var fu="iter insert remove copy getEditor constructor".split(" ");for(var du in Ia.prototype)Ia.prototype.hasOwnProperty(du)&&H(fu,du)<0&&(zl.prototype[du]=function(e){return function(){return e.apply(this.doc,arguments)}}(Ia.prototype[du]));return De(Ia),zl.inputStyles={textarea:uu,contenteditable:tu},zl.defineMode=function(e){zl.defaults.mode||"null"==e||(zl.defaults.mode=e),qe.apply(this,arguments)},zl.defineMIME=Ve,zl.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}}
2)),zl.defineMIME("text/plain","null"),zl.defineExtension=function(e,t){zl.prototype[e]=t},zl.defineDocExtension=function(e,t){Ia.prototype[e]=t},zl.fromTextArea=su,cu(zl),zl.version="5.65.11",zl}()},42425:(e,t,n)=>{!function(e){"use strict";var t=/^((?:(?:aaas?|about|acap|adiumxtra|af[ps]|aim|apt|attachment|aw|beshare|bitcoin|bolo|callto|cap|chrome(?:-extension)?|cid|coap|com-eventbrite-attendee|content|crid|cvs|data|dav|dict|dlna-(?:playcontainer|playsingle)|dns|doi|dtn|dvb|ed2k|facetime|feed|file|finger|fish|ftp|geo|gg|git|gizmoproject|go|gopher|gtalk|h323|hcp|https?|iax|icap|icon|im|imap|info|ipn|ipp|irc[6s]?|iris(?:\.beep|\.lwz|\.xpc|\.xpcs)?|itms|jar|javascript|jms|keyparc|lastfm|ldaps?|magnet|mailto|maps|market|message|mid|mms|ms-help|msnim|msrps?|mtqp|mumble|mupdate|mvn|news|nfs|nih?|nntp|notes|oid|opaquelocktoken|palm|paparazzi|platform|pop|pres|proxy|psyc|query|res(?:ource)?|rmi|rsync|rtmp|rtsp|secondlife|service|session|sftp|sgn|shttp|sieve|sips?|skype|sm[bs]|snmp|soap\.beeps?|soldat|spotify|ssh|steam|svn|tag|teamspeak|tel(?:net)?|tftp|things|thismessage|tip|tn3270|tv|udp|unreal|urn|ut2004|vemmi|ventrilo|view-source|webcal|wss?|wtai|wyciwyg|xcon(?:-userid)?|xfire|xmlrpc\.beeps?|xmpp|xri|ymsgr|z39\.50[rs]?):(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i;e.defineMode("gfm",(function(n,r){var i=0;function o(e){return e.code=!1,null}var a={startState:function(){return{code:!1,codeBlock:!1,ateSpace:!1}},copyState:function(e){return{code:e.code,codeBlock:e.codeBlock,ateSpace:e.ateSpace}},token:function(e,n){if(n.combineTokens=null,n.codeBlock)return e.match(/^```+/)?(n.codeBlock=!1,null):(e.skipToEnd(),null);if(e.sol()&&(n.code=!1),e.sol()&&e.match(/^```+/))return e.skipToEnd(),n.codeBlock=!0,null;if("`"===e.peek()){e.next();var o=e.pos;e.eatWhile("`");var a=1+e.pos-o;return n.code?a===i&&(n.code=!1):(i=a,n.code=!0),null}if(n.code)return e.next(),null;if(e.eatSpace())return n.ateSpace=!0,null;if((e.sol()||n.ateSpace)&&(n.ateSpace=!1,!1!==r.gitHubSpice)){if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?=.{0,6}\d)(?:[a-f0-9]{7,40}\b)/))return n.combineTokens=!0,"link";if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/))return n.combineTokens=!0,"link"}return e.match(t)&&"]("!=e.string.slice(e.start-2,e.start)&&(0==e.start||/\W/.test(e.string.charAt(e.start-1)))?(n.combineTokens=!0,"link"):(e.next(),null)},blankLine:o},l={taskLists:!0,strikethrough:!0,emoji:!0};for(var u in r)l[u]=r[u];return l.name="markdown",e.overlayMode(e.getMode(n,l),a)}),"markdown"),e.defineMIME("text/x-gfm","gfm")}(n(4631),n(49047),n(14146))},49047:(e,t,n)=>{!function(e){"use strict";e.defineMode("markdown",(function(t,n){var r=e.getMode(t,"text/html"),i="null"==r.name;function o(n){if(e.findModeByName){var r=e.findModeByName(n);r&&(n=r.mime||r.mimes[0])}var i=e.getMode(t,n);return"null"==i.name?null:i}void 0===n.highlightFormatting&&(n.highlightFormatting=!1),void 0===n.maxBlockquoteDepth&&(n.maxBlockquoteDepth=0),void 0===n.taskLists&&(n.taskLists=!1),void 0===n.strikethrough&&(n.strikethrough=!1),void 0===n.emoji&&(n.emoji=!1),void 0===n.fencedCodeBlockHighlighting&&(n.fencedCodeBlockHighlighting=!0),void 0===n.fencedCodeBlockDefaultMode&&(n.fencedCodeBlockDefaultMode="text/plain"),void 0===n.xml&&(n.xml=!0),void 0===n.tokenTypeOverrides&&(n.tokenTypeOverrides={});var a={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var l in a)a.hasOwnProperty(l)&&n.tokenTypeOverrides[l]&&(a[l]=n.tokenTypeOverrides[l]);var u=/^([*\-_])(?:\s*\1){2,}\s*$/,s=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,c=/^\[(x| )\](?=\s)/i,f=n.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,d=/^ {0,3}(?:\={1,}|-{2,})\s*$/,h=/^[^#!\[\]*_\\<>` "'(~:]+/,p=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,g=/^\s*\[[^\]]+?\]:.*$/,m=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,v="    ";function y(e,t,n){return t.f=t.inline=n,n(e,t)}function E(e,t,n){return t.f=t.block=n,n(e,t)}function _(e){return!e||!/\S/.test(e.string)}function x(t){if(t.linkTitle=!1,t.linkHref=!1,t.linkText=!1,t.em=!1,t.strong=!1,t.strikethrough=!1,t.quote=0,t.indentedCode=!1,t.f==w){var n=i;if(!n){var o=e.innerMode(r,t.htmlState);
vendor: 9,276 bytes, line 2
2n="xml"==o.mode.name&&null===o.state.tagStart&&!o.state.context&&o.state.tokenize.isInText}n&&(t.f=A,t.block=b,t.htmlState=null)}return t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.prevLine=t.thisLine,t.thisLine={stream:null},null}function b(t,r){var i=t.column()===r.indentation,l=_(r.prevLine.stream),h=r.indentedCode,m=r.prevLine.hr,v=!1!==r.list,E=(r.listStack[r.listStack.length-1]||0)+3;r.indentedCode=!1;var x=r.indentation;if(null===r.indentationDiff&&(r.indentationDiff=r.indentation,v)){for(r.list=null;x<r.listStack[r.listStack.length-1];)r.listStack.pop(),r.listStack.length?r.indentation=r.listStack[r.listStack.length-1]:r.list=!1;!1!==r.list&&(r.indentationDiff=x-r.listStack[r.listStack.length-1])}var b=!(l||m||r.prevLine.header||v&&h||r.prevLine.fencedCodeEnd),w=(!1===r.list||m||l)&&r.indentation<=E&&t.match(u),I=null;if(r.indentationDiff>=4&&(h||r.prevLine.fencedCodeEnd||r.prevLine.header||l))return t.skipToEnd(),r.indentedCode=!0,a.code;if(t.eatSpace())return null;if(i&&r.indentation<=E&&(I=t.match(f))&&I[1].length<=6)return r.quote=0,r.header=I[1].length,r.thisLine.header=!0,n.highlightFormatting&&(r.formatting="header"),r.f=r.inline,T(r);if(r.indentation<=E&&t.eat(">"))return r.quote=i?1:r.quote+1,n.highlightFormatting&&(r.formatting="quote"),t.eatSpace(),T(r);if(!w&&!r.setext&&i&&r.indentation<=E&&(I=t.match(s))){var A=I[1]?"ol":"ul";return r.indentation=x+t.current().length,r.list=!0,r.quote=0,r.listStack.push(r.indentation),r.em=!1,r.strong=!1,r.code=!1,r.strikethrough=!1,n.taskLists&&t.match(c,!1)&&(r.taskList=!0),r.f=r.inline,n.highlightFormatting&&(r.formatting=["list","list-"+A]),T(r)}return i&&r.indentation<=E&&(I=t.match(p,!0))?(r.quote=0,r.fencedEndRE=new RegExp(I[1]+"+ *$"),r.localMode=n.fencedCodeBlockHighlighting&&o(I[2]||n.fencedCodeBlockDefaultMode),r.localMode&&(r.localState=e.startState(r.localMode)),r.f=r.block=D,n.highlightFormatting&&(r.formatting="code-block"),r.code=-1,T(r)):r.setext||!(b&&v||r.quote||!1!==r.list||r.code||w||g.test(t.string))&&(I=t.lookAhead(1))&&(I=I.match(d))?(r.setext?(r.header=r.setext,r.setext=0,t.skipToEnd(),n.highlightFormatting&&(r.formatting="header")):(r.header="="==I[0].charAt(0)?1:2,r.setext=r.header),r.thisLine.header=!0,r.f=r.inline,T(r)):w?(t.skipToEnd(),r.hr=!0,r.thisLine.hr=!0,a.hr):"["===t.peek()?y(t,r,R):y(t,r,r.inline)}function w(t,n){var o=r.token(t,n.htmlState);if(!i){var a=e.innerMode(r,n.htmlState);("xml"==a.mode.name&&null===a.state.tagStart&&!a.state.context&&a.state.tokenize.isInText||n.md_inside&&t.current().indexOf(">")>-1)&&(n.f=A,n.block=b,n.htmlState=null)}return o}function D(e,t){var r,i=t.listStack[t.listStack.length-1]||0,o=t.indentation<i,l=i+3;return t.fencedEndRE&&t.indentation<=l&&(o||e.match(t.fencedEndRE))?(n.highlightFormatting&&(t.formatting="code-block"),o||(r=T(t)),t.localMode=t.localState=null,t.block=b,t.f=A,t.fencedEndRE=null,t.code=0,t.thisLine.fencedCodeEnd=!0,o?E(e,t,t.block):r):t.localMode?t.localMode.token(e,t.localState):(e.skipToEnd(),a.code)}function T(e){var t=[];if(e.formatting){t.push(a.formatting),"string"==typeof e.formatting&&(e.formatting=[e.formatting]);for(var r=0;r<e.formatting.length;r++)t.push(a.formatting+"-"+e.formatting[r]),"header"===e.formatting[r]&&t.push(a.formatting+"-"+e.formatting[r]+"-"+e.header),"quote"===e.formatting[r]&&(!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(a.formatting+"-"+e.formatting[r]+"-"+e.quote):t.push("error"))}if(e.taskOpen)return t.push("meta"),t.length?t.join(" "):null;if(e.taskClosed)return t.push("property"),t.length?t.join(" "):null;if(e.linkHref?t.push(a.linkHref,"url"):(e.strong&&t.push(a.strong),e.em&&t.push(a.em),e.strikethrough&&t.push(a.strikethrough),e.emoji&&t.push(a.emoji),e.linkText&&t.push(a.linkText),e.code&&t.push(a.code),e.image&&t.push(a.image),e.imageAltText&&t.push(a.imageAltText,"link"),e.imageMarker&&t.push(a.imageMarker)),e.header&&t.push(a.header,a.header+"-"+e.header),e.quote&&(t.push(a.quote),!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(a.quote+"-"+e.quote):t.push(a.quote+"-"+n.maxBlockquoteDepth)),!1!==e.list){var i=(e.listStack.length-1)%3;i?1===i?t.push(a.list2):t.push(a.list3):t.push(a.list1)}return e.trailingSpaceNewLine?t.push("trailing-space-new-line"):e.trailingSpace&&t.push("trailing-space-"+(e.trailingSpace%2?"a":"b")),t.length?t.join(" "):null}function I(e,t){if(e.match(h,!0))return T(t)}function A(t,i){var o=i.text(t,i);if(void 0!==o)return o;if(i.list)return i.list=null,T(i);if(i.taskList)return" "===t.match(c,!0)[1]?i.taskOpen=!0:i.taskClosed=!0,n.highlightFormatting&&(i.formatting="task"),i.taskList=!1,T(i);if(i.taskOpen=!1,i.taskClosed=!1,i.header&&t.match(/^#+$/,!0))return n.highlightFormatting&&(i.formatting="header"),T(i);var l=t.next();if(i.linkTitle){i.linkTitle=!1;var u=l;"("===l&&(u=")");var s="^\\s*(?:[^"+(u=(u+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1"))+"\\\\]+|\\\\\\\\|\\\\.)"+u;if(t.match(new RegExp(s),!0))return a.linkHref}if("`"===l){var f=i.formatting;n.highlightFormatting&&(i.formatting="code"),t.eatWhile("`");var d=t.current().length;if(0!=i.code||i.quote&&1!=d){if(d==i.code){var h=T(i);return i.code=0,h}return i.formatting=f,T(i)}return i.code=d,T(i)}if(i.code)return T(i);if("\\"===l&&(t.next(),n.highlightFormatting)){var p=T(i),g=a.formatting+"-escape";return p?p+" "+g:g}if("!"===l&&t.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return i.imageMarker=!0,i.image=!0,n.highlightFormatting&&(i.formatting="image"),T(i);if("["===l&&i.imageMarker&&t.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return i.imageMarker=!1,i.imageAltText=!0,n.highlightFormatting&&(i.formatting="image"),T(i);if("]"===l&&i.imageAltText){n.highlightFormatting&&(i.formatting="image");var p=T(i);return i.imageAltText=!1,i.image=!1,i.inline=i.f=S,p}if("["===l&&!i.image)return i.linkText&&t.match(/^.*?\]/)||(i.linkText=!0,n.highlightFormatting&&(i.formatting="link")),T(i);if("]"===l&&i.linkText){n.highlightFormatting&&(i.formatting="link");var p=T(i);return i.linkText=!1,i.inline=i.f=t.match(/\(.*?\)| ?\[.*?\]/,!1)?S:A,p}if("<"===l&&t.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=C,n.highlightFormatting&&(i.formatting="link"),(p=T(i))?p+=" ":p="",p+a.linkInline;if("<"===l&&t.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=C,n.highlightFormatting&&(i.formatting="link"),(p=T(i))?p+=" ":p="",p+a.linkEmail;if(n.xml&&"<"===l&&t.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var v=t.string.indexOf(">",t.pos);if(-1!=v){var y=t.string.substring(t.start,v);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(y)&&(i.md_inside=!0)}return t.backUp(1),i.htmlState=e.startState(r),E(t,i,w)}if(n.xml&&"<"===l&&t.match(/^\/\w*?>/))return i.md_inside=!1,"tag";if("*"===l||"_"===l){for(var _=1,x=1==t.pos?" ":t.string.charAt(t.pos-2);_<3&&t.eat(l);)_++;var b=t.peek()||" ",D=!/\s/.test(b)&&(!m.test(b)||/\s/.test(x)||m.test(x)),I=!/\s/.test(x)&&(!m.test(x)||/\s/.test(b)||m.test(b)),O=null,L=null;if(_%2&&(i.em||!D||"*"!==l&&I&&!m.test(x)?i.em!=l||!I||"*"!==l&&D&&!m.test(b)||(O=!1):O=!0),_>1&&(i.strong||!D||"*"!==l&&I&&!m.test(x)?i.strong!=l||!I||"*"!==l&&D&&!m.test(b)||(L=!1):L=!0),null!=L||null!=O)return n.highlightFormatting&&(i.formatting=null==O?"strong":null==L?"em":"strong em"),!0===O&&(i.em=l),!0===L&&(i.strong=l),h=T(i),!1===O&&(i.em=!1),!1===L&&(i.strong=!1),h}else if(" "===l&&(t.eat("*")||t.eat("_"))){if(" "===t.peek())return T(i);t.backUp(1)}if(n.strikethrough)if("~"===l&&t.eatWhile(l)){if(i.strikethrough)return n.highlightFormatting&&(i.formatting="strikethrough"),h=T(i),i.strikethrough=!1,h;if(t.match(/^[^\s]/,!1))return i.strikethrough=!0,n.highlightFormatting&&(i.formatting="strikethrough"),T(i)}else if(" "===l&&t.match("~~",!0)){if(" "===t.peek())return T(i);t.backUp(2)}if(n.emoji&&":"===l&&t.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){i.emoji=!0,n.highlightFormatting&&(i.formatting="emoji");var R=T(i);return i.emoji=!1,R}return" "===l&&(t.match(/^ +$/,!1)?i.trailingSpace++:i.trailingSpace&&(i.trailingSpaceNewLine=!0)),T(i)}function C(e,t){if(">"===e.next()){t.f=t.inline=A,n.highlightFormatting&&(t.formatting="link");var r=T(t);return r?r+=" ":r="",r+a.linkInline}return e.match(/^[^>]+/,!0),a.linkInline}function S(e,t){if(e.eatSpace())return null;var r=e.next();return"("===r||"["===r?(t.f=t.inline=L("("===r?")":"]"),n.highlightFormatting&&(t.formatting="link-string"),t.linkHref=!0,T(t)):"error"}var O={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function L(e){return function(t,r){if(t.next()===e){r.f=r.inline=A,n.highlightFormatting&&(r.formatting="link-string");var i=T(r);return r.linkHref=!1,i}return t.match(O[e]),r.linkHref=!0,T(r)}}function R(e,t){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(t.f=k,e.next(),n.highlightFormatting&&(t.formatting="link"),t.linkText=!0,T(t)):y(e,t,A)}function k(e,t){if(e.match("]:",!0)){t.f=t.inline=M,n.highlightFormatting&&(t.formatting="link");var r=T(t);return t.linkText=!1,r}return e.match(/^([^\]\\]|\\.)+/,!0),a.linkText}function M(e,t){return e.eatSpace()?null:(e.match(/^[^\s]+/,!0),void 0===e.peek()?t.linkTitle=!0:e.match(/^(?:\s+(?:"(?:[^"\\]|\\.)+"|'(?:[^'\\]|\\.)+'|\((?:[^)\\]|\\.)+\)))?/,!0),t.f=t.inline=A,a.linkHref+" url")}
2var F={startState:function(){return{f:b,prevLine:{stream:null},thisLine:{stream:null},block:b,htmlState:null,indentation:0,inline:A,text:I,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(t){return{f:t.f,prevLine:t.prevLine,thisLine:t.thisLine,block:t.block,htmlState:t.htmlState&&e.copyState(r,t.htmlState),indentation:t.indentation,localMode:t.localMode,localState:t.localMode?e.copyState(t.localMode,t.localState):null,inline:t.inline,text:t.text,formatting:!1,linkText:t.linkText,linkTitle:t.linkTitle,linkHref:t.linkHref,code:t.code,em:t.em,strong:t.strong,strikethrough:t.strikethrough,emoji:t.emoji,header:t.header,setext:t.setext,hr:t.hr,taskList:t.taskList,list:t.list,listStack:t.listStack.slice(0),quote:t.quote,indentedCode:t.indentedCode,trailingSpace:t.trailingSpace,trailingSpaceNewLine:t.trailingSpaceNewLine,md_inside:t.md_inside,fencedEndRE:t.fencedEndRE}},token:function(e,t){if(t.formatting=!1,e!=t.thisLine.stream){if(t.header=0,t.hr=!1,e.match(/^\s*$/,!0))return x(t),null;if(t.prevLine=t.thisLine,t.thisLine={stream:e},t.taskList=!1,t.trailingSpace=0,t.trailingSpaceNewLine=!1,!t.localState&&(t.f=t.block,t.f!=w)){var n=e.match(/^\s*/,!0)[0].replace(/\t/g,v).length;if(t.indentation=n,t.indentationDiff=null,n>0)return null}}return t.f(e,t)},innerMode:function(e){return e.block==w?{state:e.htmlState,mode:r}:e.localState?{state:e.localState,mode:e.localMode}:{state:e,mode:F}},indent:function(t,n,i){return t.block==w&&r.indent?r.indent(t.htmlState,n,i):t.localState&&t.localMode.indent?t.localMode.indent(t.localState,n,i):e.Pass},blankLine:x,getType:T,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return F}),"xml"),e.defineMIME("text/markdown","markdown"),e.defineMIME("text/x-markdown","markdown")}(n(4631),n(29589),n(52539))},52539:(e,t,n)=>{!
vendor: 11,787 bytes, line 2
2function(e){"use strict";e.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy","cbl"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded JavaScript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"],alias:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var t=0;t<e.modeInfo.length;t++){var n=e.modeInfo[t];n.mimes&&(n.mime=n.mimes[0])}e.findModeByMIME=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var 
vendor: 5,003 bytes, line 2
2r=e.modeInfo[n];if(r.mime==t)return r;if(r.mimes)for(var i=0;i<r.mimes.length;i++)if(r.mimes[i]==t)return r}return/\+xml$/.test(t)?e.findModeByMIME("application/xml"):/\+json$/.test(t)?e.findModeByMIME("application/json"):void 0},e.findModeByExtension=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.ext)for(var i=0;i<r.ext.length;i++)if(r.ext[i]==t)return r}},e.findModeByFileName=function(t){for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.file&&r.file.test(t))return r}var i=t.lastIndexOf("."),o=i>-1&&t.substring(i+1,t.length);if(o)return e.findModeByExtension(o)},e.findModeByName=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.name.toLowerCase()==t)return r;if(r.alias)for(var i=0;i<r.alias.length;i++)if(r.alias[i].toLowerCase()==t)return r}}}(n(4631))},29589:(e,t,n)=>{!function(e){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode("xml",(function(r,i){var o,a,l=r.indentUnit,u={},s=i.htmlMode?t:n;for(var c in s)u[c]=s[c];for(var c in i)u[c]=i[c];function f(e,t){function n(n){return t.tokenize=n,n(e,t)}var r=e.next();return"<"==r?e.eat("!")?e.eat("[")?e.match("CDATA[")?n(p("atom","]]>")):null:e.match("--")?n(p("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(g(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=p("meta","?>"),"meta"):(o=e.eat("/")?"closeTag":"openTag",t.tokenize=d,"tag bracket"):"&"==r?(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error":(e.eatWhile(/[^&<]/),null)}function d(e,t){var n=e.next();if(">"==n||"/"==n&&e.eat(">"))return t.tokenize=f,o=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return o="equals",null;if("<"==n){t.tokenize=f,t.state=_,t.tagName=t.tagStart=null;var r=t.tokenize(e,t);return r?r+" tag error":"tag error"}return/[\'\"]/.test(n)?(t.tokenize=h(n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function h(e){var t=function(t,n){for(;!t.eol();)if(t.next()==e){n.tokenize=d;break}return"string"};return t.isInAttribute=!0,t}function p(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=f;break}n.next()}return e}}function g(e){return function(t,n){for(var r;null!=(r=t.next());){if("<"==r)return n.tokenize=g(e+1),n.tokenize(t,n);if(">"==r){if(1==e){n.tokenize=f;break}return n.tokenize=g(e-1),n.tokenize(t,n)}}return"meta"}}function m(e){return e&&e.toLowerCase()}function v(e,t,n){this.prev=e.context,this.tagName=t||"",this.indent=e.indented,this.startOfLine=n,(u.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function y(e){e.context&&(e.context=e.context.prev)}function E(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!u.contextGrabbers.hasOwnProperty(m(n))||!u.contextGrabbers[m(n)].hasOwnProperty(m(t)))return;y(e)}}function _(e,t,n){return"openTag"==e?(n.tagStart=t.column(),x):"closeTag"==e?b:_}function x(e,t,n){return"word"==e?(n.tagName=t.current(),a="tag",T):u.allowMissingTagName&&"endTag"==e?(a="tag bracket",T(e,t,n)):(a="error",x)}function b(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&u.implicitlyClosed.hasOwnProperty(m(n.context.tagName))&&y(n),n.context&&n.context.tagName==r||!1===u.matchClosing?(a="tag",w):(a="tag error",D)}return u.allowMissingTagName&&"endTag"==e?(a="tag bracket",w(e,t,n)):(a="error",D)}function w(e,t,n){return"endTag"!=e?(a="error",w):(y(n),_)}function D(e,t,n){return a="error",w(e,t,n)}function T(e,t,n){if("word"==e)return a="attribute",I;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||u.autoSelfClosers.hasOwnProperty(m(r))?E(n,r):(E(n,r),n.context=new v(n,r,i==n.indented)),_}return a="error",T}function I(e,t,n){return"equals"==e?A:(u.allowMissing||(a="error"),T(e,t,n))}function A(e,t,n){return"string"==e?C:"word"==e&&u.allowUnquoted?(a="string",T):(a="error",T(e,t,n))}
2function C(e,t,n){return"string"==e?C:T(e,t,n)}return f.isInText=!0,{startState:function(e){var t={tokenize:f,state:_,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;o=null;var n=t.tokenize(e,t);return(n||o)&&"comment"!=n&&(a=null,t.state=t.state(o||n,e,t),a&&(n="error"==a?n+" error":a)),n},indent:function(t,n,r){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+l;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=d&&t.tokenize!=f)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==u.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+l*(u.multilineTagIndentFactor||1);if(u.alignCDATA&&/<!\[CDATA\[/.test(n))return 0;var o=n&&/^<(\/)?([\w_:\.-]*)/.exec(n);if(o&&o[1])for(;i;){if(i.tagName==o[2]){i=i.prev;break}if(!u.implicitlyClosed.hasOwnProperty(m(i.tagName)))break;i=i.prev}else if(o)for(;i;){var a=u.contextGrabbers[m(i.tagName)];if(!a||!a.hasOwnProperty(m(o[2])))break;i=i.prev}for(;i&&i.prev&&!i.startOfLine;)i=i.prev;return i?i.indent+l:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:u.htmlMode?"html":"xml",helperType:u.htmlMode?"html":"xml",skipAttribute:function(e){e.state==A&&(e.state=T)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},xmlCurrentContext:function(e){for(var t=[],n=e.context;n;n=n.prev)t.push(n.tagName);return t.reverse()}}})),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}(n(4631))},91857:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(19013),i=n(13882);function o(e,t){(0,i.Z)(2,arguments);var n=(0,r.default)(e),o=(0,r.default)(t);return n.getFullYear()-o.getFullYear()}},5001:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(19013),i=n(91857),o=n(49474),a=n(13882);function l(e,t){(0,a.Z)(2,arguments);var n=(0,r.default)(e),l=(0,r.default)(t),u=(0,o.Z)(n,l),s=Math.abs((0,i.default)(n,l));n.setFullYear(1584),l.setFullYear(1584);var c=(0,o.Z)(n,l)===-u,f=u*(s-Number(c));return 0===f?0:f}},83863:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(19013),i=n(4810),o=n(13882);function a(e,t){var n,a;(0,o.Z)(1,arguments);var l=(0,r.default)(e);if(isNaN(l.getTime()))throw new RangeError("Invalid time value");var u=String(null!==(n=null==t?void 0:t.format)&&void 0!==n?n:"extended"),s=String(null!==(a=null==t?void 0:t.representation)&&void 0!==a?a:"complete");if("extended"!==u&&"basic"!==u)throw new RangeError("format must be 'extended' or 'basic'");if("date"!==s&&"time"!==s&&"complete"!==s)throw new RangeError("representation must be 'date', 'time', or 'complete'");var c="",f="",d="extended"===u?"-":"",h="extended"===u?":":"";if("time"!==s){var p=(0,i.Z)(l.getDate(),2),g=(0,i.Z)(l.getMonth()+1,2),m=(0,i.Z)(l.getFullYear(),4);c="".concat(m).concat(d).concat(g).concat(d).concat(p)}if("date"!==s){var v=l.getTimezoneOffset();if(0!==v){var y=Math.abs(v),E=(0,i.Z)(Math.floor(y/60),2),_=(0,i.Z)(y%60,2),x=v<0?"+":"-";f="".concat(x).concat(E,":").concat(_)}else f="Z";var b=(0,i.Z)(l.getHours(),2),w=(0,i.Z)(l.getMinutes(),2),D=(0,i.Z)(l.getSeconds(),2),T=""===c?"":"T",I=[b,w,D].join(h);c="".concat(c).concat(T).concat(I).concat(f)}return c}}
vendor: 19,423 bytes, line 2
2,96912:(e,t,n)=>{var r=n(4631);r.commands.tabAndIndentMarkdownList=function(e){var t=e.listSelections()[0].head;if(!1!==e.getStateAfter(t.line).list)e.execCommand("indentMore");else if(e.options.indentWithTabs)e.execCommand("insertTab");else{var n=Array(e.options.tabSize+1).join(" ");e.replaceSelection(n)}},r.commands.shiftTabAndUnindentMarkdownList=function(e){var t=e.listSelections()[0].head;if(!1!==e.getStateAfter(t.line).list)e.execCommand("indentLess");else if(e.options.indentWithTabs)e.execCommand("insertTab");else{var n=Array(e.options.tabSize+1).join(" ");e.replaceSelection(n)}}},24442:(e,t,n)=>{"use strict";var r=n(4631);n(23350),n(96912),n(960),n(49047),n(14146),n(88386),n(21994),n(64020),n(32095),n(42425),n(29589);var i=n(82354),o=n(21733).TU,a=/Mac/.test(navigator.platform),l=new RegExp(/(<a.*?https?:\/\/.*?[^a]>)+?/g),u={toggleBold:y,toggleItalic:E,drawLink:M,toggleHeadingSmaller:w,toggleHeadingBigger:D,drawImage:F,toggleBlockquote:b,toggleOrderedList:R,toggleUnorderedList:L,toggleCodeBlock:x,togglePreview:q,toggleStrikethrough:_,toggleHeading1:T,toggleHeading2:I,toggleHeading3:A,toggleHeading4:C,toggleHeading5:S,toggleHeading6:O,cleanBlock:k,drawTable:G,drawHorizontalRule:z,undo:U,redo:W,toggleSideBySide:H,toggleFullScreen:v},s={toggleBold:"Cmd-B",toggleItalic:"Cmd-I",drawLink:"Cmd-K",toggleHeadingSmaller:"Cmd-H",toggleHeadingBigger:"Shift-Cmd-H",toggleHeading1:"Ctrl+Alt+1",toggleHeading2:"Ctrl+Alt+2",toggleHeading3:"Ctrl+Alt+3",toggleHeading4:"Ctrl+Alt+4",toggleHeading5:"Ctrl+Alt+5",toggleHeading6:"Ctrl+Alt+6",cleanBlock:"Cmd-E",drawImage:"Cmd-Alt-I",toggleBlockquote:"Cmd-'",toggleOrderedList:"Cmd-Alt-L",toggleUnorderedList:"Cmd-L",toggleCodeBlock:"Cmd-Alt-C",togglePreview:"Cmd-P",toggleSideBySide:"F9",toggleFullScreen:"F11"},c=function(){var e,t=!1;return e=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e.substr(0,4)))&&(t=!0),t};function f(e){return e=a?e.replace("Ctrl","Cmd"):e.replace("Cmd","Ctrl")}function d(e,t,n,r){var i=h(e,!1,t,n,"button",r);i.classList.add("easymde-dropdown"),i.onclick=function(){i.focus()};var o=document.createElement("div");o.className="easymde-dropdown-content";for(var a=0;a<e.children.length;a++){var l,u=e.children[a];(l=h("string"==typeof u&&u in te?te[u]:u,!0,t,n,"button",r)).addEventListener("click",(function(e){e.stopPropagation()}),!1),o.appendChild(l)}return i.appendChild(o),i}function h(e,t,n,r,i,o){e=e||{};var l=document.createElement(i);if(e.attributes)for(var s in e.attributes)Object.prototype.hasOwnProperty.call(e.attributes,s)&&l.setAttribute(s,e.attributes[s]);var c=o.options.toolbarButtonClassPrefix?o.options.toolbarButtonClassPrefix+"-":"";l.className=c+e.name,l.setAttribute("type",i),n=null==n||n,e.text&&(l.innerText=e.text),e.name&&e.name in r&&(u[e.name]=e.action),e.title&&n&&(l.title=function(e,t,n){var r,i=e;t&&n[r=function(e){for(var t in u)if(u[t]===e)return t;return null}(t)]&&(i+=" ("+f(n[r])+")");return i}(e.title,e.action,r),a&&(l.title=l.title.replace("Ctrl","⌘"),l.title=l.title.replace("Alt","⌥"))),e.title&&l.setAttribute("aria-label",e.title),e.noDisable&&l.classList.add("no-disable"),e.noMobile&&l.classList.add("no-mobile");var d=[];void 0!==e.className&&(d=e.className.split(" "));for(var h=[],p=0;p<d.length;p++){var g=d[p];g.match(/^fa([srlb]|(-[\w-]*)|$)/)?h.push(g):l.classList.add(g)}if(l.tabIndex=-1,h.length>0){for(var m=document.createElement("i"),v=0;v<h.length;v++){var y=h[v];m.classList.add(y)}l.appendChild(m)}return void 0!==e.icon&&(l.innerHTML=e.icon),e.action&&t&&("function"==typeof e.action?l.onclick=function(t){t.preventDefault(),e.action(o)}:"string"==typeof e.action&&(l.onclick=function(t){t.preventDefault(),window.open(e.action,"_blank")})),l}function p(){var e=document.createElement("i");return e.className="separator",e.innerHTML="|",e}function g(e,t){t=t||e.getCursor("start");var n=e.getTokenAt(t);if(!n.type)return{};for(var r,i,o=n.type.split(" "),a={},l=0;l<o.length;l++)"strong"===(r=o[l])?a.bold=!0:"variable-2"===r?(i=e.getLine(t.line),/^\s*\d+\.\s/.test(i)?a["ordered-list"]=!0:a["unordered-list"]=!0):"atom"===r?a.quote=!0:"em"===r?a.italic=!0:"quote"===r?a.quote=!0:"strikethrough"===r?a.strikethrough=!0:"comment"===r?a.code=!0:"link"!==r||a.image?"image"===r?a.image=!0:r.match(/^header(-[1-6])?$/)&&(a[r.replace("header","heading")]=!0):a.link=!0;return a}var m="";function v(e){var t=e.codemirror;t.setOption("fullScreen",!t.getOption("fullScreen")),t.getOption("fullScreen")?(m=document.body.style.overflow,document.body.style.overflow="hidden"):document.body.style.overflow=m;var n=t.getWrapperElement(),r=n.nextSibling;if(r.classList.contains("editor-preview-active-side"))if(!1===e.options.sideBySideFullscreen){var i=n.parentNode;t.getOption("fullScreen")?i.classList.remove("sided--no-fullscreen"):i.classList.add("sided--no-fullscreen")}else H(e);(e.options.onToggleFullScreen&&e.options.onToggleFullScreen(t.getOption("fullScreen")||!1),void 0!==e.options.maxHeight&&(t.getOption("fullScreen")?(t.getScrollerElement().style.removeProperty("height"),r.style.removeProperty("height")):(t.getScrollerElement().style.height=e.options.maxHeight,e.setPreviewMaxHeight())),e.toolbar_div.classList.toggle("fullscreen"),e.toolbarElements&&e.toolbarElements.fullscreen)&&e.toolbarElements.fullscreen.classList.toggle("active")}function y(e){$(e,"bold",e.options.blockStyles.bold)}function E(e){$(e,"italic",e.options.blockStyles.italic)}function _(e){$(e,"strikethrough","~~")}function x(e){var t=e.options.blockStyles.code;function n(e){if("object"!=typeof e)throw"fencing_line() takes a 'line' object (not a line number, or line text).  Got: "+typeof e+": "+e;return e.styles&&e.styles[2]&&-1!==e.styles[2].indexOf("formatting-code-block")}function r(e){return e.state.base.base||e.state.base}function i(e,t,i,o,a){i=i||e.getLineHandle(t),o=o||e.getTokenAt({line:t,ch:1}),a=a||!!i.text&&e.getTokenAt({line:t,ch:i.text.length-1});var l=o.type?o.type.split(" "):[];return a&&r(a).indentedCode?"indented":-1!==l.indexOf("comment")&&(r(o).fencedChars||r(a).fencedChars||n(i)?"fenced":"single")}var o,a,l,u=e.codemirror,s=u.getCursor("start"),c=u.getCursor("end"),f=u.getTokenAt({line:s.line,ch:s.ch||1}),d=u.getLineHandle(s.line),h=i(u,s.line,d,f);if("single"===h){var p=d.text.slice(0,s.ch).replace("`",""),g=d.text.slice(s.ch).replace("`","");u.replaceRange(p+g,{line:s.line,ch:0},{line:s.line,ch:99999999999999}),s.ch--,s!==c&&c.ch--,u.setSelection(s,c),u.focus()}else if("fenced"===h)if(s.line!==c.line||s.ch!==c.ch){for(o=s.line;o>=0&&!n(d=u.getLineHandle(o));o--);var m,v,y,E,_=r(u.getTokenAt({line:o,ch:1})).fencedChars;n(u.getLineHandle(s.line))?(m="",v=s.line):n(u.getLineHandle(s.line-1))?(m="",v=s.line-1):(m=_+"\n",v=s.line),n(u.getLineHandle(c.line))?(y="",E=c.line,0===c.ch&&(E+=1)):0!==c.ch&&n(u.getLineHandle(c.line+1))?(y="",E=c.line+1):(y=_+"\n",E=c.line+1),0===c.ch&&(E-=1),u.operation((function(){u.replaceRange(y,{line:E,ch:0},{line:E+(y?0:1),ch:0}),u.replaceRange(m,{line:v,ch:0},{line:v+(m?0:1),ch:0})})),u.setSelection({line:v+(m?1:0),ch:0},{line:E+(m?1:-1),ch:0}),u.focus()}else{var x=s.line;if(n(u.getLineHandle(s.line))&&("fenced"===i(u,s.line+1)?(o=s.line,x=s.line+1):(a=s.line,x=s.line-1)),void 0===o)for(o=x;o>=0&&!n(d=u.getLineHandle(o));o--);if(void 0===a)for(l=u.lineCount(),a=x;a<l&&!n(d=u.getLineHandle(a));a++);u.operation((function(){u.replaceRange("",{line:o,ch:0},{line:o+1,ch:0}),u.replaceRange("",{line:a-1,ch:0},{line:a,ch:0})})),u.focus()}else if("indented"===h){if(s.line!==c.line||s.ch!==c.ch)o=s.line,a=c.line,0===c.ch&&a--;else{for(o=s.line;o>=0;o--)if(!(d=u.getLineHandle(o)).text.match(/^\s*$/)&&"indented"!==i(u,o,d)){o+=1;break}for(l=u.lineCount(),a=s.line;a<l;a++)if(!(d=u.getLineHandle(a)).text.match(/^\s*$/)&&"indented"!==i(u,a,d)){a-=1;break}}var b=u.getLineHandle(a+1),w=b&&u.getTokenAt({line:a+1,ch:b.text.length-1});w&&r(w).indentedCode&&u.replaceRange("\n",{line:a+1,ch:0});for(var D=o;D<=a;D++)u.indentLine(D,"subtract");u.focus()}else{var T=s.line===c.line&&s.ch===c.ch&&0===s.ch,I=s.line!==c.line;T||I?function(e,t,n,r){var i=t.line+1,o=n.line+1,a=t.line!==n.line,l=r+"\n",u="\n"+r;a&&o++,a&&0===n.ch&&(u=r+"\n",o--),V(e,!1,[l,u]),e.setSelection({line:i,ch:0},{line:o,ch:0})}(u,s,c,t):V(u,!1,["`","`"])}}function b(e){Y(e.codemirror,"quote")}function w(e){j(e.codemirror,"smaller")}function D(e){j(e.codemirror,"bigger")}function T(e){j(e.codemirror,void 0,1)}function I(e){j(e.codemirror,void 0,2)}function A(e){j(e.codemirror,void 0,3)}function C(e){j(e.codemirror,void 0,4)}function S(e){j(e.codemirror,void 0,5)}function O(e){j(e.codemirror,void 0,6)}function L(e){var t=e.codemirror,n="*";["-","+","*"].includes(e.options.unorderedListStyle)&&(n=e.options.unorderedListStyle),Y(t,"unordered-list",n)}function R(e){Y(e.codemirror,"ordered-list")}function k(e){!function(e){if(e.getWrapperElement().lastChild.classList.contains("editor-preview-active"))return;for(var t,n=e.getCursor("start"),r=e.getCursor("end"),i=n.line;i<=r.line;i++)t=(t=e.getLine(i)).replace(/^[ ]*([# ]+|\*|-|[> ]+|[0-9]+(.|\)))[ ]*/,""),e.replaceRange(t,{line:i,ch:0},{line:i,ch:99999999999999})}(e.codemirror)}function M(e){var t=e.options,n="https://";if(t.promptURLs){var r=prompt(t.promptTexts.link,n);if(!r)return!1;n=N(r)}X(e,"link",t.insertTexts.link,n)}function F(e){var t=e.options,n="https://";if(t.promptURLs){var r=prompt(t.promptTexts.image,n);if(!r)return!1;n=N(r)}X(e,"image",t.insertTexts.image,n)}function N(e){return encodeURI(e).replace(/([\\()])/g,"\\$1")}function P(e){e.openBrowseFileWindow()}function B(e,t){var n=e.codemirror,r=g(n),i=e.options,o=t.substr(t.lastIndexOf("/")+1),a=o.substring(o.lastIndexOf(".")+1).replace(/\?.*$/,"").toLowerCase();if(["png","jpg","jpeg","gif","svg","apng","avif","webp"].includes(a))V(n,r.image,i.insertTexts.uploadedImage,t);else{var l=i.insertTexts.link;l[0]="["+o,V(n,r.link,l,t)}e.updateStatusBar("upload-image",e.options.imageTexts.sbOnUploaded.replace("#image_name#",o)),setTimeout((function(){e.updateStatusBar("upload-image",e.options.imageTexts.sbInit)}),1e3)}function G(e){var t=e.codemirror,n=g(t),r=e.options;V(t,n.table,r.insertTexts.table)}function z(e){var t=e.codemirror,n=g(t),r=e.options;V(t,n.image,r.insertTexts.horizontalRule)}function U(e){var t=e.codemirror;t.undo(),t.focus()}function W(e){var t=e.codemirror;t.redo(),t.focus()}function H(e){var t=e.codemirror,n=t.getWrapperElement(),r=n.nextSibling,i=e.toolbarElements&&e.toolbarElements["side-by-side"],o=!1,a=n.parentNode;r.classList.contains("editor-preview-active-side")?(!1===e.options.sideBySideFullscreen&&a.classList.remove("sided--no-fullscreen"),r.classList.remove("editor-preview-active-side"),i&&i.classList.remove("active"),n.classList.remove("CodeMirror-sided")):(setTimeout((function(){t.getOption("fullScreen")||(!1===e.options.sideBySideFullscreen?a.classList.add("sided--no-fullscreen"):v(e)),r.classList.add("editor-preview-active-side")}),1),i&&i.classList.add("active"),n.classList.add("CodeMirror-sided"),o=!0);var l=n.lastChild;if(l.classList.contains("editor-preview-active")){l.classList.remove("editor-preview-active");var u=e.toolbarElements.preview,s=e.toolbar_div;u.classList.remove("active"),s.classList.remove("disabled-for-preview")}if(t.sideBySideRenderingFunction||(t.sideBySideRenderingFunction=function(){var t=e.options.previewRender(e.value(),r);null!=t&&(r.innerHTML=t)}),o){var c=e.options.previewRender(e.value(),r);null!=c&&(r.innerHTML=c),t.on("update",t.sideBySideRenderingFunction)}else t.off("update",t.sideBySideRenderingFunction);t.refresh()}function q(e){var t=e.codemirror,n=t.getWrapperElement(),r=e.toolbar_div,i=!!e.options.toolbar&&e.toolbarElements.preview,o=n.lastChild;if(t.getWrapperElement().nextSibling.classList.contains("editor-preview-active-side")&&H(e),!o||!o.classList.contains("editor-preview-full")){if((o=document.createElement("div")).className="editor-preview-full",e.options.previewClass)if(Array.isArray(e.options.previewClass))for(var a=0;a<e.options.previewClass.length;a++)o.classList.add(e.options.previewClass[a]);else"string"==typeof e.options.previewClass&&o.classList.add(e.options.previewClass);n.appendChild(o)}o.classList.contains("editor-preview-active")?(o.classList.remove("editor-preview-active"),i&&(i.classList.remove("active"),r.classList.remove("disabled-for-preview"))):(setTimeout((function(){o.classList.add("editor-preview-active")}),1),i&&(i.classList.add("active"),r.classList.add("disabled-for-preview")));var l=e.options.previewRender(e.value(),o);null!==l&&(o.innerHTML=l)}function V(e,t,n,r){if(!e.getWrapperElement().lastChild.classList.contains("editor-preview-active")){var i,o=n[0],a=n[1],l={},u={};Object.assign(l,e.getCursor("start")),Object.assign(u,e.getCursor("end")),r&&(o=o.replace("#url#",r),a=a.replace("#url#",r)),t?(o=(i=e.getLine(l.line)).slice(0,l.ch),a=i.slice(l.ch),e.replaceRange(o+a,{line:l.line,ch:0})):(i=e.getSelection(),e.replaceSelection(o+i+a),l.ch+=o.length,l!==u&&(u.ch+=o.length)),e.setSelection(l,u),e.focus()}}function j(e,t,n){if(!e.getWrapperElement().lastChild.classList.contains("editor-preview-active")){for(var r=e.getCursor("start"),i=e.getCursor("end"),o=r.line;o<=i.line;o++)!function(r){var i=e.getLine(r),o=i.search(/[^#]/);i=void 0!==t?o<=0?"bigger"==t?"###### "+i:"# "+i:6==o&&"smaller"==t?i.substr(7):1==o&&"bigger"==t?i.substr(2):"bigger"==t?i.substr(1):"#"+i:o<=0?"#".repeat(n)+" "+i:o==n?i.substr(o+1):"#".repeat(n)+" "+i.substr(o+1),e.replaceRange(i,{line:r,ch:0},{line:r,ch:99999999999999})}(o);e.focus()}}function Y(e,t,n){if(!e.getWrapperElement().lastChild.classList.contains("editor-preview-active")){for(var r=/^(\s*)(\*|-|\+|\d*\.)(\s+)/,i=/^\s*/,o=g(e),a=e.getCursor("start"),l=e.getCursor("end"),u={quote:/^(\s*)>\s+/,"unordered-list":r,"ordered-list":r},s=function(e,t,o){var a=r.exec(t),l=function(e,t){return{quote:">","unordered-list":n,"ordered-list":"%%i."}[e].replace("%%i",t)}(e,c);return null!==a?(function(e,t){var r=new RegExp({quote:">","unordered-list":"\\"+n,"ordered-list":"\\d+."}[e]);return t&&r.test(t)}(e,a[2])&&(l=""),t=a[1]+l+a[3]+t.replace(i,"").replace(u[e],"$1")):0==o&&(t=l+" "+t),t},c=1,f=a.line;f<=l.line;f++)!function(n){var r=e.getLine(n);o[t]?r=r.replace(u[t],"$1"):("unordered-list"==t&&(r=s("ordered-list",r,!0)),r=s(t,r,!1),c+=1),e.replaceRange(r,{line:n,ch:0},{line:n,ch:99999999999999})}(f);e.focus()}}function X(e,t,n,r){if(e.codemirror&&!e.isPreviewActive()){var i=e.codemirror,o=g(i)[t];if(o){var a=i.getCursor("start"),l=i.getCursor("end"),u=i.getLine(a.line),s=u.slice(0,a.ch),c=u.slice(a.ch);"link"==t?s=s.replace(/(.*)[^!]\[/,"$1"):"image"==t&&(s=s.replace(/(.*)!\[$/,"$1")),c=c.replace(/]\(.*?\)/,""),i.replaceRange(s+c,{line:a.line,ch:0},{line:a.line,ch:99999999999999}),a.ch-=n[0].length,a!==l&&(l.ch-=n[0].length),i.setSelection(a,l),i.focus()}else V(i,o,n,r)}}function $(e,t,n,r){if(e.codemirror&&!e.isPreviewActive()){r=void 0===r?n:r;var i,o=e.codemirror,a=g(o),l=n,u=r,s=o.getCursor("start"),c=o.getCursor("end");a[t]?(l=(i=o.getLine(s.line)).slice(0,s.ch),u=i.slice(s.ch),"bold"==t?(l=l.replace(/(\*\*|__)(?![\s\S]*(\*\*|__))/,""),u=u.replace(/(\*\*|__)/,"")):"italic"==t?(l=l.replace(/(\*|_)(?![\s\S]*(\*|_))/,""),u=u.replace(/(\*|_)/,"")):"strikethrough"==t&&(l=l.replace(/(\*\*|~~)(?![\s\S]*(\*\*|~~))/,""),u=u.replace(/(\*\*|~~)/,"")),o.replaceRange(l+u,{line:s.line,ch:0},{line:s.line,ch:99999999999999}),"bold"==t||"strikethrough"==t?(s.ch-=2,s!==c&&(c.ch-=2)):"italic"==t&&(s.ch-=1,s!==c&&(c.ch-=1))):(i=o.getSelection(),"bold"==t?i=(i=i.split("**").join("")).split("__").join(""):"italic"==t?i=(i=i.split("*").join("")).split("_").join(""):"strikethrough"==t&&(i=i.split("~~").join("")),o.replaceSelection(l+i+u),s.ch+=n.length,c.ch=s.ch+i.length),o.setSelection(s,c),o.focus()}}function Z(e,t){if(Math.abs(e)<1024)return""+e+t[0];var n=0;do{e/=1024,++n}while(Math.abs(e)>=1024&&n<t.length);return""+e.toFixed(1)+t[n]}function K(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(t[n]instanceof Array?e[n]=t[n].concat(e[n]instanceof Array?e[n]:[]):null!==t[n]&&"object"==typeof t[n]&&t[n].constructor===Object?e[n]=K(e[n]||{},t[n]):e[n]=t[n]);return e}function Q(e){for(var t=1;t<arguments.length;t++)e=K(e,arguments[t]);return e}function J(e){var t=e.match(/[a-zA-Z0-9_\u00A0-\u02AF\u0392-\u03c9\u0410-\u04F9]+|[\u4E00-\u9FFF\u3400-\u4dbf\uf900-\ufaff\u3040-\u309f\uac00-\ud7af]+/g),n=0;if(null===t)return n;for(var r=0;r<t.length;r++)t[r].charCodeAt(0)>=19968?n+=t[r].length:n+=1;return n}var ee={bold:"fa fa-bold",italic:"fa fa-italic",strikethrough:"fa fa-strikethrough",heading:"fa fa-header fa-heading","heading-smaller":"fa fa-header fa-heading header-smaller","heading-bigger":"fa fa-header fa-heading header-bigger","heading-1":"fa fa-header fa-heading header-1","heading-2":"fa fa-header fa-heading header-2","heading-3":"fa fa-header fa-heading header-3",code:"fa fa-code",quote:"fa fa-quote-left","ordered-list":"fa fa-list-ol","unordered-list":"fa fa-list-ul","clean-block":"fa fa-eraser",link:"fa fa-link",image:"fa fa-image","upload-image":"fa fa-image",table:"fa fa-table","horizontal-rule":"fa fa-minus",preview:"fa fa-eye","side-by-side":"fa fa-columns",fullscreen:"fa fa-arrows-alt",guide:"fa fa-question-circle",undo:"fa fa-undo",redo:"fa fa-repeat fa-redo"},te={bold:{name:"bold",action:y,className:ee.bold,title:"Bold",default:!0},italic:{name:"italic",action:E,className:ee.italic,title:"Italic",default:!0},strikethrough:{name:"strikethrough",action:_,className:ee.strikethrough,title:"Str
2ikethrough"},heading:{name:"heading",action:w,className:ee.heading,title:"Heading",default:!0},"heading-smaller":{name:"heading-smaller",action:w,className:ee["heading-smaller"],title:"Smaller Heading"},"heading-bigger":{name:"heading-bigger",action:D,className:ee["heading-bigger"],title:"Bigger Heading"},"heading-1":{name:"heading-1",action:T,className:ee["heading-1"],title:"Big Heading"},"heading-2":{name:"heading-2",action:I,className:ee["heading-2"],title:"Medium Heading"},"heading-3":{name:"heading-3",action:A,className:ee["heading-3"],title:"Small Heading"},"separator-1":{name:"separator-1"},code:{name:"code",action:x,className:ee.code,title:"Code"},quote:{name:"quote",action:b,className:ee.quote,title:"Quote",default:!0},"unordered-list":{name:"unordered-list",action:L,className:ee["unordered-list"],title:"Generic List",default:!0},"ordered-list":{name:"ordered-list",action:R,className:ee["ordered-list"],title:"Numbered List",default:!0},"clean-block":{name:"clean-block",action:k,className:ee["clean-block"],title:"Clean block"},"separator-2":{name:"separator-2"},link:{name:"link",action:M,className:ee.link,title:"Create Link",default:!0},image:{name:"image",action:F,className:ee.image,title:"Insert Image",default:!0},"upload-image":{name:"upload-image",action:P,className:ee["upload-image"],title:"Import an image"},table:{name:"table",action:G,className:ee.table,title:"Insert Table"},"horizontal-rule":{name:"horizontal-rule",action:z,className:ee["horizontal-rule"],title:"Insert Horizontal Line"},"separator-3":{name:"separator-3"},preview:{name:"preview",action:q,className:ee.preview,noDisable:!0,title:"Toggle Preview",default:!0},"side-by-side":{name:"side-by-side",action:H,className:ee["side-by-side"],noDisable:!0,noMobile:!0,title:"Toggle Side by Side",default:!0},fullscreen:{name:"fullscreen",action:v,className:ee.fullscreen,noDisable:!0,noMobile:!0,title:"Toggle Fullscreen",default:!0},"separator-4":{name:"separator-4"},guide:{name:"guide",action:"https://www.markdownguide.org/basic-syntax/",className:ee.guide,noDisable:!0,title:"Markdown Guide",default:!0},"separator-5":{name:"separator-5"},undo:{name:"undo",action:U,className:ee.undo,noDisable:!0,title:"Undo"},redo:{name:"redo",action:W,className:ee.redo,noDisable:!0,title:"Redo"}},ne={link:["[","](#url#)"],image:["![","](#url#)"],uploadedImage:["![](#url#)",""],table:["","\n\n| Column 1 | Column 2 | Column 3 |\n| -------- | -------- | -------- |\n| Text     | Text     | Text     |\n\n"],horizontalRule:["","\n\n-----\n\n"]},re={link:"URL for the link:",image:"URL of the image:"},ie={locale:"en-US",format:{hour:"2-digit",minute:"2-digit"}},oe={bold:"**",code:"```",italic:"*"},ae={sbInit:"Attach files by drag and dropping or pasting from clipboard.",sbOnDragEnter:"Drop image to upload it.",sbOnDrop:"Uploading image #images_names#...",sbProgress:"Uploading #file_name#: #progress#%",sbOnUploaded:"Uploaded #image_name#",sizeUnits:" B, KB, MB"},le={noFileGiven:"You must select a file.",typeNotAllowed:"This image type is not allowed.",fileTooLarge:"Image #image_name# is too big (#image_size#).\nMaximum file size is #image_max_size#.",importError:"Something went wrong when uploading the image #image_name#."};function ue(e){(e=e||{}).parent=this;var t=!0;if(!1===e.autoDownloadFontAwesome&&(t=!1),!0!==e.autoDownloadFontAwesome)for(var n=document.styleSheets,r=0;r<n.length;r++)n[r].href&&n[r].href.indexOf("//maxcdn.bootstrapcdn.com/font-awesome/")>-1&&(t=!1);if(t){var i=document.createElement("link");i.rel="stylesheet",i.href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css",document.getElementsByTagName("head")[0].appendChild(i)}if(e.element)this.element=e.element;else if(null===e.element)return void console.log("EasyMDE: Error. No element was found.");if(void 0===e.toolbar)for(var o in e.toolbar=[],te)Object.prototype.hasOwnProperty.call(te,o)&&(-1!=o.indexOf("separator-")&&e.toolbar.push("|"),(!0===te[o].default||e.showIcons&&e.showIcons.constructor===Array&&-1!=e.showIcons.indexOf(o))&&e.toolbar.push(o));if(Object.prototype.hasOwnProperty.call(e,"previewClass")||(e.previewClass="editor-preview"),Object.prototype.hasOwnProperty.call(e,"status")||(e.status=["autosave","lines","words","cursor"],e.uploadImage&&e.status.unshift("upload-image")),e.previewRender||(e.previewRender=function(e){return this.parent.markdown(e)}),e.parsingConfig=Q({highlightFormatting:!0},e.parsingConfig||{}),e.insertTexts=Q({},ne,e.insertTexts||{}),e.promptTexts=Q({},re,e.promptTexts||{}),e.blockStyles=Q({},oe,e.blockStyles||{}),null!=e.autosave&&(e.autosave.timeFormat=Q({},ie,e.autosave.timeFormat||{})),e.iconClassMap=Q({},ee,e.iconClassMap||{}),e.shortcuts=Q({},s,e.shortcuts||{}),e.maxHeight=e.maxHeight||void 0,e.direction=e.direction||"ltr",void 0!==e.maxHeight?e.minHeight=e.maxHeight:e.minHeight=e.minHeight||"300px",e.errorCallback=e.errorCallback||function(e){alert(e)},e.uploadImage=e.uploadImage||!1,e.imageMaxSize=e.imageMaxSize||2097152,e.imageAccept=e.imageAccept||"image/png, image/jpeg, image/gif, image/avif",e.imageTexts=Q({},ae,e.imageTexts||{}),e.errorMessages=Q({},le,e.errorMessages||{}),e.imagePathAbsolute=e.imagePathAbsolute||!1,e.imageCSRFName=e.imageCSRFName||"csrfmiddlewaretoken",e.imageCSRFHeader=e.imageCSRFHeader||!1,null!=e.autosave&&null!=e.autosave.unique_id&&""!=e.autosave.unique_id&&(e.autosave.uniqueId=e.autosave.unique_id),e.overlayMode&&void 0===e.overlayMode.combine&&(e.overlayMode.combine=!0),this.options=e,this.render(),!e.initialValue||this.options.autosave&&!0===this.options.autosave.foun
vendor: 19,243 bytes, line 2
2dSavedValue||this.value(e.initialValue),e.uploadImage){var a=this;this.codemirror.on("dragenter",(function(e,t){a.updateStatusBar("upload-image",a.options.imageTexts.sbOnDragEnter),t.stopPropagation(),t.preventDefault()})),this.codemirror.on("dragend",(function(e,t){a.updateStatusBar("upload-image",a.options.imageTexts.sbInit),t.stopPropagation(),t.preventDefault()})),this.codemirror.on("dragleave",(function(e,t){a.updateStatusBar("upload-image",a.options.imageTexts.sbInit),t.stopPropagation(),t.preventDefault()})),this.codemirror.on("dragover",(function(e,t){a.updateStatusBar("upload-image",a.options.imageTexts.sbOnDragEnter),t.stopPropagation(),t.preventDefault()})),this.codemirror.on("drop",(function(t,n){n.stopPropagation(),n.preventDefault(),e.imageUploadFunction?a.uploadImagesUsingCustomFunction(e.imageUploadFunction,n.dataTransfer.files):a.uploadImages(n.dataTransfer.files)})),this.codemirror.on("paste",(function(t,n){e.imageUploadFunction?a.uploadImagesUsingCustomFunction(e.imageUploadFunction,n.clipboardData.files):a.uploadImages(n.clipboardData.files)}))}}function se(){if("object"!=typeof localStorage)return!1;try{localStorage.setItem("smde_localStorage",1),localStorage.removeItem("smde_localStorage")}catch(e){return!1}return!0}ue.prototype.uploadImages=function(e,t,n){if(0!==e.length){for(var r=[],i=0;i<e.length;i++)r.push(e[i].name),this.uploadImage(e[i],t,n);this.updateStatusBar("upload-image",this.options.imageTexts.sbOnDrop.replace("#images_names#",r.join(", ")))}},ue.prototype.uploadImagesUsingCustomFunction=function(e,t){if(0!==t.length){for(var n=[],r=0;r<t.length;r++)n.push(t[r].name),this.uploadImageUsingCustomFunction(e,t[r]);this.updateStatusBar("upload-image",this.options.imageTexts.sbOnDrop.replace("#images_names#",n.join(", ")))}},ue.prototype.updateStatusBar=function(e,t){if(this.gui.statusbar){var n=this.gui.statusbar.getElementsByClassName(e);1===n.length?this.gui.statusbar.getElementsByClassName(e)[0].textContent=t:0===n.length?console.log("EasyMDE: status bar item "+e+" was not found."):console.log("EasyMDE: Several status bar items named "+e+" was found.")}},ue.prototype.markdown=function(e){if(o){var t;if(t=this.options&&this.options.renderingConfig&&this.options.renderingConfig.markedOptions?this.options.renderingConfig.markedOptions:{},this.options&&this.options.renderingConfig&&!1===this.options.renderingConfig.singleLineBreaks?t.breaks=!1:t.breaks=!0,this.options&&this.options.renderingConfig&&!0===this.options.renderingConfig.codeSyntaxHighlighting){var n=this.options.renderingConfig.hljs||window.hljs;n&&(t.highlight=function(e,t){return t&&n.getLanguage(t)?n.highlight(t,e).value:n.highlightAuto(e).value})}o.setOptions(t);var r=o.parse(e);return this.options.renderingConfig&&"function"==typeof this.options.renderingConfig.sanitizerFunction&&(r=this.options.renderingConfig.sanitizerFunction.call(this,r)),r=function(e){for(var t=(new DOMParser).parseFromString(e,"text/html"),n=t.getElementsByTagName("li"),r=0;r<n.length;r++)for(var i=n[r],o=0;o<i.children.length;o++){var a=i.children[o];a instanceof HTMLInputElement&&"checkbox"===a.type&&(i.style.marginLeft="-1.5em",i.style.listStyleType="none")}return t.documentElement.innerHTML}(r=function(e){for(var t;null!==(t=l.exec(e));){var n=t[0];if(-1===n.indexOf("target=")){var r=n.replace(/>$/,' target="_blank">');e=e.replace(n,r)}}return e}(r))}},ue.prototype.render=function(e){if(e||(e=this.element||document.getElementsByTagName("textarea")[0]),!this._rendered||this._rendered!==e){this.element=e;var t,n,o=this.options,a=this,l={};for(var s in o.shortcuts)null!==o.shortcuts[s]&&null!==u[s]&&function(e){l[f(o.shortcuts[e])]=function(){var t=u[e];"function"==typeof t?t(a):"string"==typeof t&&window.open(t,"_blank")}}(s);if(l.Enter="newlineAndIndentContinueMarkdownList",l.Tab="tabAndIndentMarkdownList",l["Shift-Tab"]="shiftTabAndUnindentMarkdownList",l.Esc=function(e){e.getOption("fullScreen")&&v(a)},this.documentOnKeyDown=function(e){27==(e=e||window.event).keyCode&&a.codemirror.getOption("fullScreen")&&v(a)},document.addEventListener("keydown",this.documentOnKeyDown,!1),o.overlayMode?(r.defineMode("overlay-mode",(function(e){return r.overlayMode(r.getMode(e,!1!==o.spellChecker?"spell-checker":"gfm"),o.overlayMode.mode,o.overlayMode.combine)})),t="overlay-mode",(n=o.parsingConfig).gitHubSpice=!1):((t=o.parsingConfig).name="gfm",t.gitHubSpice=!1),!1!==o.spellChecker&&(t="spell-checker",(n=o.parsingConfig).name="gfm",n.gitHubSpice=!1,"function"==typeof o.spellChecker?o.spellChecker({codeMirrorInstance:r}):i({codeMirrorInstance:r})),this.codemirror=r.fromTextArea(e,{mode:t,backdrop:n,theme:null!=o.theme?o.theme:"easymde",tabSize:null!=o.tabSize?o.tabSize:2,indentUnit:null!=o.tabSize?o.tabSize:2,indentWithTabs:!1!==o.indentWithTabs,lineNumbers:!0===o.lineNumbers,autofocus:!0===o.autofocus,extraKeys:l,direction:o.direction,lineWrapping:!1!==o.lineWrapping,allowDropFileTypes:["text/plain"],placeholder:o.placeholder||e.getAttribute("placeholder")||"",styleSelectedText:null!=o.styleSelectedText?o.styleSelectedText:!c(),scrollbarStyle:null!=o.scrollbarStyle?o.scrollbarStyle:"native",configureMouse:function(e,t,n){return{addNew:!1}},inputStyle:null!=o.inputStyle?o.inputStyle:c()?"contenteditable":"textarea",spellcheck:null==o.nativeSpellcheck||o.nativeSpellcheck,autoRefresh:null!=o.autoRefresh&&o.autoRefresh}),this.codemirror.getScrollerElement().style.minHeight=o.minHeight,void 0!==o.maxHeight&&(this.codemirror.getScrollerElement().style.height=o.maxHeight),!0===o.forceSync){var d=this.codemirror;d.on("change",(function(){d.save()}))}this.gui={};var h=document.createElement("div");h.classList.add("EasyMDEContainer"),h.setAttribute("role","application");var p=this.codemirror.getWrapperElement();p.parentNode.insertBefore(h,p),h.appendChild(p),!1!==o.toolbar&&(this.gui.toolbar=this.createToolbar()),!1!==o.status&&(this.gui.statusbar=this.createStatusbar()),null!=o.autosave&&!0===o.autosave.enabled&&(this.autosave(),this.codemirror.on("change",(function(){clearTimeout(a._autosave_timeout),a._autosave_timeout=setTimeout((function(){a.autosave()}),a.options.autosave.submit_delay||a.options.autosave.delay||1e3)})));var g=this;this.codemirror.on("update",(function(){o.previewImagesInEditor&&h.querySelectorAll(".cm-image-marker").forEach((function(e){var t=e.parentElement;if(t.innerText.match(/^!\[.*?\]\(.*\)/g)&&!t.hasAttribute("data-img-src")){var n=t.innerText.match("\\((.*)\\)");if(window.EMDEimagesCache||(window.EMDEimagesCache={}),n&&n.length>=2){var r=n[1];if(o.imagesPreviewHandler){var i=o.imagesPreviewHandler(n[1]);"string"==typeof i&&(r=i)}if(window.EMDEimagesCache[r])y(t,window.EMDEimagesCache[r]);else{var a=document.createElement("img");a.onload=function(){window.EMDEimagesCache[r]={naturalWidth:a.naturalWidth,naturalHeight:a.naturalHeight,url:r},y(t,window.EMDEimagesCache[r])},a.src=r}}}}))})),this.gui.sideBySide=this.createSideBySide(),this._rendered=this.element,(!0===o.autofocus||e.autofocus)&&this.codemirror.focus();var m=this.codemirror;setTimeout(function(){m.refresh()}.bind(m),0)}function y(e,t){var n,r;e.setAttribute("data-img-src",t.url),e.setAttribute("style","--bg-image:url("+t.url+");--width:"+t.naturalWidth+"px;--height:"+(n=t.naturalWidth,r=t.naturalHeight,n<window.getComputedStyle(document.querySelector(".CodeMirror-sizer")).width.replace("px","")?r+"px":r/n*100+"%")),g.codemirror.setSize()}},ue.prototype.cleanup=function(){document.removeEventListener("keydown",this.documentOnKeyDown)},ue.prototype.autosave=function(){if(se()){var e=this;if(null==this.options.autosave.uniqueId||""==this.options.autosave.uniqueId)return void console.log("EasyMDE: You must set a uniqueId to use the autosave feature");!0!==this.options.autosave.binded&&(null!=e.element.form&&null!=e.element.form&&e.element.form.addEventListener("submit",(function(){clearTimeout(e.autosaveTimeoutId),e.autosaveTimeoutId=void 0,localStorage.removeItem("smde_"+e.options.autosave.uniqueId)})),this.options.autosave.binded=!0),!0!==this.options.autosave.loaded&&("string"==typeof localStorage.getItem("smde_"+this.options.autosave.uniqueId)&&""!=localStorage.getItem("smde_"+this.options.autosave.uniqueId)&&(this.codemirror.setValue(localStorage.getItem("smde_"+this.options.autosave.uniqueId)),this.options.autosave.foundSavedValue=!0),this.options.autosave.loaded=!0);var t=e.value();""!==t?localStorage.setItem("smde_"+this.options.autosave.uniqueId,t):localStorage.removeItem("smde_"+this.options.autosave.uniqueId);var n=document.getElementById("autosaved");if(null!=n&&null!=n&&""!=n){var r=new Date,i=new Intl.DateTimeFormat([this.options.autosave.timeFormat.locale,"en-US"],this.options.autosave.timeFormat.format).format(r),o=null==this.options.autosave.text?"Autosaved: ":this.options.autosave.text;n.innerHTML=o+i}}else console.log("EasyMDE: localStorage not available, cannot autosave")},ue.prototype.clearAutosavedValue=function(){if(se()){if(null==this.options.autosave||null==this.options.autosave.uniqueId||""==this.options.autosave.uniqueId)return void console.log("EasyMDE: You must set a uniqueId to clear the autosave value");localStorage.removeItem("smde_"+this.options.autosave.uniqueId)}else console.log("EasyMDE: localStorage not available, cannot autosave")},ue.prototype.openBrowseFileWindow=function(e,t){var n=this,r=this.gui.toolbar.getElementsByClassName("imageInput")[0];r.click(),r.addEventListener("change",(function i(o){n.options.imageUploadFunction?n.uploadImagesUsingCustomFunction(n.options.imageUploadFunction,o.target.files):n.uploadImages(o.target.files,e,t),r.removeEventListener("change",i)}))},ue.prototype.uploadImage=function(e,t,n){var r=this;function i(e){r.updateStatusBar("upload-image",e),setTimeout((function(){r.updateStatusBar("upload-image",r.options.imageTexts.sbInit)}),1e4),n&&"function"==typeof n&&n(e),r.options.errorCallback(e)}function o(t){var n=r.options.imageTexts.sizeUnits.split(",");return t.replace("#image_name#",e.name).replace("#image_size#",Z(e.size,n)).replace("#image_max_size#",Z(r.options.imageMaxSize,n))}if(t=t||function(e){B(r,e)},e.size>this.options.imageMaxSize)i(o(this.options.errorMessages.fileTooLarge));else{var a=new FormData;a.append("image",e),r.options.imageCSRFToken&&!r.options.imageCSRFHeader&&a.append(r.options.imageCSRFName,r.options.imageCSRFToken);var l=new XMLHttpRequest;l.upload.onprogress=function(t){if(t.lengthComputable){var n=""+Math.round(100*t.loaded/t.total);r.updateStatusBar("upload-image",r.options.imageTexts.sbProgress.replace("#file_name#",e.name).replace("#progress#",n))}},l.open("POST",this.options.imageUploadEndpoint),r.options.imageCSRFToken&&r.options.imageCSRFHeader&&l.setRequestHeader(r.options.imageCSRFName,r.options.imageCSRFToken),l.onload=function(){try{var e=JSON.parse(this.responseText)}catch(e){return console.error("EasyMDE: The server did not return a valid json."),void i(o(r.options.errorMessages.importError))}200===this.status&&e&&!e.error&&e.data&&e.data.filePath?t((r.options.imagePathAbsolute?"":window.location.origin+"/")+e.data.filePath):e.error&&e.error in r.options.errorMessages?i(o(r.options.errorMessages[e.error])):e.error?i(o(e.error)):(console.error("EasyMDE: Received an unexpected response after uploading the image."+this.status+" ("+this.statusText+")"),i(o(r.options.errorMessages.importError)))},l.onerror=function(e){console.error("EasyMDE: An unexpected error occurred when trying to upload the image."+e.target.status+" ("+e.target.statusText+")"),i(r.options.errorMessages.importError)},l.send(a)}},ue.prototype.uploadImageUsingCustomFunction=function(e,t){var n=this;e.apply(this,[t,function(e){B(n,e)},function(e){var r=function(e){var r=n.options.imageTexts.sizeUnits.split(",");return e.replace("#image_name#",t.name).replace("#image_size#",Z(t.size,r)).replace("#image_max_size#",Z(n.options.imageMaxSize,r))}(e);n.updateStatusBar("upload-image",r),setTimeout((function(){n.updateStatusBar("upload-image",n.options.imageTexts.sbInit)}),1e4),n.options.errorCallback(r)}])},ue.prototype.setPreviewMaxHeight=function(){var e=this.codemirror.getWrapperElement(),t=e.nextSibling,n=parseInt(window.getComputedStyle(e).paddingTop),r=parseInt(window.getComputedStyle(e).borderTopWidth),i=(parseInt(this.options.maxHeight)+2*n+2*r).toString()+"px";t.style.height=i},ue.prototype.createSideBySide=function(){var e=this.codemirror,t=e.getWrapperElement(),n=t.nextSibling;if(!n||!n.classList.contains("editor-preview-side")){if((n=document.createElement("div")).className="editor-preview-side",this.options.previewClass)if(Array.isArray(this.options.previewClass))for(var r=0;r<this.options.previewClass.length;r++)n.classList.add(this.options.previewClass[r]);else"string"==typeof this.options.previewClass&&n.classList.add(this.options.previewClass);t.parentNode.insertBefore(n,t.nextSibling)}if(void 0!==this.options.maxHeight&&this.setPreviewMaxHeight(),!1===this.options.syncSideBySidePreviewScroll)return n;var i=!1,o=!1;return e.on("scroll",(function(e){if(i)i=!1;else{o=!0;var t=e.getScrollInfo().height-e.getScrollInfo().clientHeight,r=parseFloat(e.getScrollInfo().top)/t,a=(n.scrollHeight-n.clientHeight)*r;n.scrollTop=a}})),n.onscroll=function(){if(o)o=!1;else{i=!0;var t=n.scrollHeight-n.clientHeight,r=parseFloat(n.scrollTop)/t,a=(e.getScrollInfo().height-e.getScrollInfo().clientHeight)*r;e.scrollTo(0,a)}},n},ue.prototype.createToolbar=function(e){if((e=e||this.options.toolbar)&&0!==e.length){var t;for(t=0;t<e.length;t++)null!=te[e[t]]&&(e[t]=te[e[t]]);var n=document.createElement("div");n.className="editor-toolbar",n.setAttribute("role","toolbar");var r=this,i={};for(r.toolbar=e,t=0;t<e.length;t++)if(("guide"!=e[t].name||!1!==r.options.toolbarGuideIcon)&&!(r.options.hideIcons&&-1!=r.options.hideIcons.indexOf(e[t].name)||("fullscreen"==e[t].name||"side-by-side"==e[t].name)&&c())){if("|"===e[t]){for(var o=!1,a=t+1;a<e.length;a++)"|"===e[a]||r.options.hideIcons&&-1!=r.options.hideIcons.indexOf(e[a].name)||(o=!0);if(!o)continue}!function(e){var t;if(t="|"===e?p():e.children?d(e,r.options.toolbarTips,r.options.shortcuts,r):h(e,!0,r.options.toolbarTips,r.options.shortcuts,"button",r),i[e.name||e]=t,n.appendChild(t),"upload-image"===e.name){var o=document.createElement("input");o.className="imageInput",o.type="file",o.multiple=!0,o.name="image",o.accept=r.options.imageAccept,o.style.display="none",o.style.opacity=0,n.appendChild(o)}}(e[t])}r.toolbar_div=n,r.toolbarElements=i;var l=this.codemirror;l.on("cursorActivity",(function(){var e=g(l);for(var t in i)!function(t){var n=i[t];e[t]?n.classList.add("active"):"fullscreen"!=t&&"side-by-side"!=t&&n.classList.remove("active")}(t)}));var u=l.getWrapperElement();return u.parentNode.insertBefore(n,u),n}},ue.prototype.createStatusbar=function(e){e=e||this.options.status;var t=this.options,n=this.codemirror;if(e&&0!==e.length){var r,i,o,a,l=[];for(r=0;r<e.length;r++)if(i=void 0,o=void 0,a=void 0,"object"==typeof e[r])l.push({className:e[r].className,defaultValue:e[r].defaultValue,onUpdate:e[r].onUpdate,onActivity:e[r].onActivity});else{var u=e[r];"words"===u?(a=function(e){e.innerHTML=J(n.getValue())},i=function(e){e.innerHTML=J(n.getValue())}):"lines"===u?(a=function(e){e.innerHTML=n.lineCount()},i=function(e){e.innerHTML=n.lineCount()}):"cursor"===u?(a=function(e){e.innerHTML="1:1"},o=function(e){var t=n.getCursor(),r=t.line+1,i=t.ch+1;e.innerHTML=r+":"+i}):"autosave"===u?a=function(e){null!=t.autosave&&!0===t.autosave.enabled&&e.setAttribute("id","autosaved")}:"upload-image"===u&&(a=function(e){e.innerHTML=t.imageTexts.sbInit}),l.push({className:u,defaultValue:a,onUpdate:i,onActivity:o})}var s=document.createElement("div");for(s.className="editor-statusbar",r=0;r<l.length;r++){var c=l[r],f=document.createElement("span");f.className=c.className,"function"==typeof c.defaultValue&&c.defaultValue(f),"function"==typeof c.onUpdate&&this.codemirror.on("update",function(e,t){return function(){t.onUpdate(e)}}(f,c)),"function"==typeof c.onActivity&&this.codemirror.on("cursorActivity",function(e,t){return function(){t.onActivity(e)}}(f,c)),s.appendChild(f)}var d=this.codemirror.getWrapperElement();return d.parentNode.insertBefore(s,d.nextSibling),s}},ue.prototype.value=function(e){var t=this.codemirror;if(void 0===e)return t.getValue();if(t.getDoc().setValue(e),this.isPreviewActive()){var n=t.getWrapperElement().lastChild,r=this.options.previewRender(e,n);null!==r&&(n.innerHTML=r)}return this},ue.toggleBold=y,ue.toggleItalic=E,ue.toggleStrikethrough=_,ue.toggleBlockquote=b,ue.toggleHeadingSmaller=w,ue.toggleHeadingBigger=D,ue.toggleHeading1=T,ue.toggleHeading2=I,ue.toggleHeading3=A,ue.toggleHeading4=C,ue.toggleHeading5=S,ue.toggleHeading6=O,ue.toggleCodeBlock=x,ue.toggleUnorderedList=L,ue.toggleOrderedList=R,ue.cleanBlock=k,ue.drawLink=M,ue.drawImage=F,ue.drawUploadedImage=P,ue.drawTable=G,ue.drawHorizontalRule=z,ue.undo=U,ue.redo=W,ue.togglePreview=q,ue.toggleSideBySide=H,ue.toggleFullScreen=v,ue.prototype.toggleBold=function(){y(this)},ue.prototype.toggleItalic=function(){E(this)},ue.prototype.toggleStrikethrough=function(){_(this)},ue.prototype.toggleBlockquote=function(){b(this)},ue.prototype.toggleHeadingSmaller=function(){w(this)},ue.prototype.toggleHeadingBigger=function(){D(this)},ue.prototype.toggleHeading1=function(){T(this)},ue.prototype.toggleHeading2=function(){I(this)},ue.prototype.toggleHeading3=function(){A(this)},ue.prototype.toggleHeading4=function(){C(this)},ue.prototype.toggleHeading5=function(){S(this)},ue.prototype.toggleHeading6=function(){O(this)},ue.prototype.toggleCodeBlock=function(){x(this)},ue.prototype.toggleUnorderedList=function(){L(this)},ue.prototype.toggleOrderedList=function(){R(this)},ue.prototype.cleanBlock=function(){k(this)},ue.prototype.drawLink=function(){M(this)},ue.prototype.drawImage=function(){F(this)},ue.prototype.drawUploadedImage=function(){P(this)},ue.prototype.drawTable=function(){G(this)},ue.prototype.drawHorizontalRule=function(){z(this)},ue.prototype.undo=function(){U(this)},ue.prototype.redo=function(){W(this)},ue.prototype.togglePreview=function(){q(this)},ue.prototype.toggleSideBySide=function(){H(this)},ue.prototype.toggleFullScreen=function(){v(this)},ue.prototype.isPreviewActive=function(){return this.codemirror.getWrapperElement().lastChild.classList.contains("editor-preview-active")},ue.prototype.isSideBySideActive=function(){return this.codemirror.getWrapperElement().nextSibling.classList.contains("editor-preview-active-side")},ue.prototype.isFullscreenActive=function(){return this.codemirror.getOption("fullScreen")},ue.prototype.getState=function(){return g(this.codemirror)},ue.prototype.toTextArea=function(){var e=this.codemirror,t=e.getWrapperElement(),n=t.parentNode;n&&(this.gui.toolbar&&n.removeChild(this.gui.toolbar),this.gui.statusbar&&n.removeChild(this.gui.statusbar),this.gui.sideBySide&&n.removeChild(this.gui.sideBySide)),n.parentNode.insertBefore(t,n),n.remove(),e.toTextArea(),this.autosaveTimeoutId&&(clearTimeout(this.autosaveTimeoutId),this.autosaveTimeoutId=void 0,this.clearAutosavedValue())},e.exports=ue},18236:function(e){e.exports=function(){"use strict";var e=function(e){var t=e.addFilter,n=e.utils,r=n.Type,i=n.replaceInString,o=n.toNaturalFileSize;
2return t("ALLOW_HOPPER_ITEM",(function(e,t){var n=t.query;if(!n("GET_ALLOW_FILE_SIZE_VALIDATION"))return!0;var r=n("GET_MAX_FILE_SIZE");if(null!==r&&e.size>=r)return!1;var i=n("GET_MIN_FILE_SIZE");return!(null!==i&&e.size<=i)})),t("LOAD_FILE",(function(e,t){var n=t.query;return new Promise((function(t,r){if(!n("GET_ALLOW_FILE_SIZE_VALIDATION"))return t(e);var a=n("GET_FILE_VALIDATE_SIZE_FILTER");if(a&&!a(e))return t(e);var l=n("GET_MAX_FILE_SIZE");if(null!==l&&e.size>=l)r({status:{main:n("GET_LABEL_MAX_FILE_SIZE_EXCEEDED"),sub:i(n("GET_LABEL_MAX_FILE_SIZE"),{filesize:o(l)})}});else{var u=n("GET_MIN_FILE_SIZE");if(null!==u&&e.size<=u)r({status:{main:n("GET_LABEL_MIN_FILE_SIZE_EXCEEDED"),sub:i(n("GET_LABEL_MIN_FILE_SIZE"),{filesize:o(u)})}});else{var s=n("GET_MAX_TOTAL_FILE_SIZE");if(null!==s&&n("GET_ACTIVE_ITEMS").reduce((function(e,t){return e+t.fileSize}),0)>s)return void r({status:{main:n("GET_LABEL_MAX_TOTAL_FILE_SIZE_EXCEEDED"),sub:i(n("GET_LABEL_MAX_TOTAL_FILE_SIZE"),{filesize:o(s)})}});t(e)}}}))})),{options:{allowFileSizeValidation:[!0,r.BOOLEAN],maxFileSize:[null,r.INT],minFileSize:[null,r.INT],maxTotalFileSize:[null,r.INT],fileValidateSizeFilter:[null,r.FUNCTION],labelMinFileSizeExceeded:["File is too small",r.STRING],labelMinFileSize:["Minimum file size is {filesize}",r.STRING],labelMaxFileSizeExceeded:["File is too large",r.STRING],labelMaxFileSize:["Maximum file size is {filesize}",r.STRING],labelMaxTotalFileSizeExceeded:["Maximum total size exceeded",r.STRING],labelMaxTotalFileSize:["Maximum total file size is {filesize}",r.STRING]}}};return"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:e})),e}()},90521:function(e){e.exports=function(){"use strict";var e=function(e){var t=e.addFilter,n=e.utils,r=n.Type,i=n.isString,o=n.replaceInString,a=n.guesstimateMimeType,l=n.getExtensionFromFilename,u=n.getFilenameFromURL,s=function(e,t){return(/^[^/]+/.exec(e)||[]).pop()===t.slice(0,-2)},c=function(e,t){return e.some((function(e){return/\*$/.test(e)?s(t,e):e===t}))},f=function(e){var t="";if(i(e)){var n=u(e),r=l(n);r&&(t=a(r))}else t=e.type;return t},d=function(e,t,n){if(0===t.length)return!0;var r=f(e);return n?new Promise((function(i,o){n(e,r).then((function(e){c(t,e)?i():o()})).catch(o)})):c(t,r)},h=function(e){return function(t){return null!==e[t]&&(e[t]||t)}};return t("SET_ATTRIBUTE_TO_OPTION_MAP",(function(e){return Object.assign(e,{accept:"acceptedFileTypes"})})),t("ALLOW_HOPPER_ITEM",(function(e,t){var n=t.query;return!n("GET_ALLOW_FILE_TYPE_VALIDATION")||d(e,n("GET_ACCEPTED_FILE_TYPES"))})),t("LOAD_FILE",(function(e,t){var n=t.query;return new Promise((function(t,r){if(n("GET_ALLOW_FILE_TYPE_VALIDATION")){var i=n("GET_ACCEPTED_FILE_TYPES"),a=n("GET_FILE_VALIDATE_TYPE_DETECT_TYPE"),l=d(e,i,a),u=function(){var e=i.map(h(n("GET_FILE_VALIDATE_TYPE_LABEL_EXPECTED_TYPES_MAP"))).filter((function(e){return!1!==e}));r({status:{main:n("GET_LABEL_FILE_TYPE_NOT_ALLOWED"),sub:o(n("GET_FILE_VALIDATE_TYPE_LABEL_EXPECTED_TYPES"),{allTypes:e.join(", "),allButLastType:e.slice(0,-1).join(", "),lastType:e[e.length-1]})}})};if("boolean"==typeof l)return l?t(e):u();l.then((function(){t(e)})).catch(u)}else t(e)}))})),{options:{allowFileTypeValidation:[!0,r.BOOLEAN],acceptedFileTypes:[[],r.ARRAY],labelFileTypeNotAllowed:["File is of invalid type",r.STRING],fileValidateTypeLabelExpectedTypes:["Expects {allButLastType} or {lastType}",r.STRING],fileValidateTypeLabelExpectedTypesMap:[{},r.OBJECT],fileValidateTypeDetectType:[null,r.FUNCTION]}}};return"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:e})),e}()},85180:function(e){e.exports=function(){"use strict";var e=function(e){return/^image/.test(e.type)},t=function(t){var n=t.addFilter,r=t.utils,i=r.Type,o=r.isFile,a=r.getNumericAspectRatioFromString,l=function(t,n){return!(!e(t.file)||!n("GET_ALLOW_IMAGE_CROP"))},u=function(e){return"object"==typeof e},s=function(e){return"number"==typeof e},c=function(e,t){return e.setMetadata("crop",Object.assign({},e.getMetadata("crop"),t))};return n("DID_CREATE_ITEM",(function(e,t){var n=t.query;e.extend("setImageCrop",(function(t){if(l(e,n)&&u(center))return e.setMetadata("crop",t),t})),e.extend("setImageCropCenter",(function(t){if(l(e,n)&&u(t))return c(e,{center:t})})),e.extend("setImageCropZoom",(function(t){if(l(e,n)&&s(t))return c(e,{zoom:Math.max(1,t)})})),e.extend("setImageCropRotation",(function(t){if(l(e,n)&&s(t))return c(e,{rotation:t})})),e.extend("setImageCropFlip",(function(t){if(l(e,n)&&u(t))return c(e,{flip:t})})),e.extend("setImageCropAspectRatio",(function(t){if(l(e,n)&&void 0!==t){var r=e.getMetadata("crop"),i=a(t),o={center:{x:.5,y:.5},flip:r?Object.assign({},r.flip):{horizontal:!1,vertical:!1},rotation:0,zoom:1,aspectRatio:i};return e.setMetadata("crop",o),o}}
2))})),n("DID_LOAD_ITEM",(function(t,n){var r=n.query;return new Promise((function(n,i){var l=t.file;if(!o(l)||!e(l)||!r("GET_ALLOW_IMAGE_CROP"))return n(t);if(t.getMetadata("crop"))return n(t);var u=r("GET_IMAGE_CROP_ASPECT_RATIO");t.setMetadata("crop",{center:{x:.5,y:.5},flip:{horizontal:!1,vertical:!1},rotation:0,zoom:1,aspectRatio:u?a(u):null}),n(t)}))})),{options:{allowImageCrop:[!0,i.BOOLEAN],imageCropAspectRatio:[null,i.STRING]}}};return"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:t})),t}()},25865:function(e){e.exports=function(){"use strict";var e=function(e){return/^image/.test(e.type)},t=function(t){var n=t.addFilter,r=t.utils,i=t.views,o=r.Type,a=r.createRoute,l=r.createItemAPI,u=void 0===l?function(e){return e}:l,s=i.fileActionButton;n("SHOULD_REMOVE_ON_REVERT",(function(t,n){var r=n.item,i=n.query;return new Promise((function(t){var n=r.file;t(!(i("GET_ALLOW_IMAGE_EDIT")&&i("GET_IMAGE_EDIT_ALLOW_EDIT")&&e(n)))}))})),n("DID_LOAD_ITEM",(function(t,n){var r=n.query,i=n.dispatch;return new Promise((function(n,o){if(t.origin>1)n(t);else{var a=t.file;if(r("GET_ALLOW_IMAGE_EDIT")&&r("GET_IMAGE_EDIT_INSTANT_EDIT"))if(e(a)){var l=function(e,t,n){return function(r){c.shift(),r?t(e):n(e),i("KICK"),u()}},u=function(){if(c.length){var e=c[0],t=e.item,n=e.resolve,r=e.reject;i("EDIT_ITEM",{id:t.id,handleEditorResponse:l(t,n,r)})}};f({item:t,resolve:n,reject:o}),1===c.length&&u()}else n(t);else n(t)}}))})),n("DID_CREATE_ITEM",(function(e,t){t.query;var n=t.dispatch;e.extend("edit",(function(){n("EDIT_ITEM",{id:e.id})}))}));var c=[],f=function(e){return c.push(e),e};return n("CREATE_VIEW",(function(t){var n=t.is,r=t.view,i=t.query;if(i("GET_ALLOW_IMAGE_EDIT")){var o=i("GET_ALLOW_IMAGE_PREVIEW");if(n("file-info")&&!o||n("file")&&o){var l=i("GET_IMAGE_EDIT_EDITOR");if(l){l.filepondCallbackBridge||(l.outputData=!0,l.outputFile=!1,l.filepondCallbackBridge={onconfirm:l.onconfirm||function(){},oncancel:l.oncancel||function(){}});var c=function(e){var t=e.root,n=e.props,r=e.action,i=n.id,o=r.handleEditorResponse;l.cropAspectRatio=t.query("GET_IMAGE_CROP_ASPECT_RATIO")||l.cropAspectRatio,l.outputCanvasBackgroundColor=t.query("GET_IMAGE_TRANSFORM_CANVAS_BACKGROUND_COLOR")||l.outputCanvasBackgroundColor;var a=t.query("GET_ITEM",i);if(a){var s=a.file,c=a.getMetadata("crop"),f={center:{x:.5,y:.5},flip:{horizontal:!1,vertical:!1},zoom:1,rotation:0,aspectRatio:null},d=a.getMetadata("resize"),h=a.getMetadata("filter")||null,p=a.getMetadata("filters")||null,g=a.getMetadata("colors")||null,m=a.getMetadata("markup")||null,v={crop:c||f,size:d?{upscale:d.upscale,mode:d.mode,width:d.size.width,height:d.size.height}:null,filter:p?p.id||p.matrix:h,color:g,markup:m};l.onconfirm=function(e){var t=e.data,n=t.crop,r=t.size,i=t.filter,s=t.color,c=t.colorMatrix,f=t.markup,d={};if(n&&(d.crop=n),r){var h=(a.getMetadata("resize")||{}).size,p={width:r.width,height:r.height};p.width&&p.height||!h||(p.width=h.width,p.height=h.height),(p.width||p.height)&&(d.resize={upscale:r.upscale,mode:r.mode,size:p})}f&&(d.markup=f),d.colors=s,d.filters=i,d.filter=c,a.setMetadata(d),l.filepondCallbackBridge.onconfirm(t,u(a)),o&&(l.onclose=function(){o(!0),l.onclose=null})},l.oncancel=function(){l.filepondCallbackBridge.oncancel(u(a)),o&&(l.onclose=function(){o(!1),l.onclose=null})},l.open(s,v)}},f=function(t){var n=t.root,a=t.props;if(i("GET_IMAGE_EDIT_ALLOW_EDIT")){var l=a.id,u=i("GET_ITEM",l);if(u){var c=u.file;if(e(c))if(n.ref.handleEdit=function(e){e.stopPropagation(),n.dispatch("EDIT_ITEM",{id:l})},o){var f=r.createChildView(s,{label:"edit",icon:i("GET_IMAGE_EDIT_ICON_EDIT"),opacity:0});f.element.classList.add("filepond--action-edit-item"),f.element.dataset.align=i("GET_STYLE_IMAGE_EDIT_BUTTON_EDIT_ITEM_POSITION"),f.on("click",n.ref.handleEdit),n.ref.buttonEditItem=r.appendChildView(f)}else{var d=r.element.querySelector(".filepond--file-info-main"),h=document.createElement("button");h.className="filepond--action-edit-item-alt",h.innerHTML=i("GET_IMAGE_EDIT_ICON_EDIT")+"<span>edit</span>",h.addEventListener("click",n.ref.handleEdit),d.appendChild(h),n.ref.editButton=h}}}};r.registerDestroyer((function(e){var t=e.root;t.ref.buttonEditItem&&t.ref.buttonEditItem.off("click",t.ref.handleEdit),t.ref.editButton&&t.ref.editButton.removeEventListener("click",t.ref.handleEdit)}));var d={EDIT_ITEM:c,DID_LOAD_ITEM:f};if(o){var h=function(e){var t=e.root;t.ref.buttonEditItem&&(t.ref.buttonEditItem.opacity=1)};d.DID_IMAGE_PREVIEW_SHOW=h}r.registerWriter(a(d))}}}})),{options:{allowImageEdit:[!0,o.BOOLEAN],styleImageEditButtonEditItemPosition:["bottom center",o.STRING],imageEditInstantEdit:[!1,o.BOOLEAN],imageEditAllowEdit:[!0,o.BOOLEAN],imageEditIconEdit:['<svg width="26" height="26" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false">
2<path d="M8.5 17h1.586l7-7L15.5 8.414l-7 7V17zm-1.707-2.707l8-8a1 1 0 0 1 1.414 0l3 3a1 1 0 0 1 0 1.414l-8 8A1 1 0 0 1 10.5 19h-3a1 1 0 0 1-1-1v-3a1 1 0 0 1 .293-.707z" fill="currentColor" fill-rule="nonzero"/></svg>',o.STRING],imageEditEditor:[null,o.OBJECT]}}};return"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:t})),t}()},75227:function(e){e.exports=function(){"use strict";var e=function(e){return/^image\/jpeg/.test(e.type)},t={JPEG:65496,APP1:65505,EXIF:1165519206,TIFF:18761,Orientation:274,Unknown:65280},n=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e.getUint16(t,n)},r=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e.getUint32(t,n)},i=function(e){return new Promise((function(i,o){var a=new FileReader;a.onload=function(e){var o=new DataView(e.target.result);if(n(o,0)===t.JPEG){for(var a=o.byteLength,l=2;l<a;){var u=n(o,l);if(l+=2,u===t.APP1){if(r(o,l+=2)!==t.EXIF)break;var s=n(o,l+=6)===t.TIFF;l+=r(o,l+4,s);var c=n(o,l,s);l+=2;for(var f=0;f<c;f++)if(n(o,l+12*f,s)===t.Orientation)return void i(n(o,l+12*f+8,s))}else{if((u&t.Unknown)!==t.Unknown)break;l+=n(o,l)}}i(-1)}else i(-1)},a.readAsArrayBuffer(e.slice(0,65536))}))},o="undefined"!=typeof window&&void 0!==window.document,a="data:image/jpg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/4QA6RXhpZgAATU0AKgAAAAgAAwESAAMAAAABAAYAAAEoAAMAAAABAAIAAAITAAMAAAABAAEAAAAAAAD/2wBDAP//////////////////////////////////////////////////////////////////////////////////////wAALCAABAAIBASIA/8QAJgABAAAAAAAAAAAAAAAAAAAAAxABAAAAAAAAAAAAAAAAAAAAAP/aAAgBAQAAPwBH/9k=",l=void 0,u=o?new Image:{};u.onload=function(){return l=u.naturalWidth>u.naturalHeight},u.src=a;var s=function(){return l},c=function(t){var n=t.addFilter,r=t.utils,o=r.Type,a=r.isFile;return n("DID_LOAD_ITEM",(function(t,n){var r=n.query;return new Promise((function(n,o){var l=t.file;if(!(a(l)&&e(l)&&r("GET_ALLOW_IMAGE_EXIF_ORIENTATION")&&s()))return n(t);i(l).then((function(e){t.setMetadata("exif",{orientation:e}),n(t)}))}))})),{options:{allowImageExifOrientation:[!0,o.BOOLEAN]}}};return"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:c})),c}()},1571:function(e){e.exports=function(){"use strict";var e=function(e){return/^image/.test(e.type)},t=function(t){var n=t.addFilter,r=t.utils.Type;return n("DID_LOAD_ITEM",(function(t,n){var r=n.query;return new Promise((function(n,i){var o=t.file;if(!e(o)||!r("GET_ALLOW_IMAGE_FILTER"))return n(t);var a=r("GET_IMAGE_FILTER_COLOR_MATRIX");if(!a||20!==a.length)return n(t);t.setMetadata("filter",a),n(t)}))})),{options:{allowImageFilter:[!0,r.BOOLEAN],imageFilterColorMatrix:[null,r.ARRAY]}}};return"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:t})),t}()},72965:function(e){e.exports=function(){"use strict";var e=function(e){return/^image/.test(e.type)};function t(e){this.wrapped=e}function n(e){var n,r;function i(e,t){return new Promise((function(i,a){var l={key:e,arg:t,resolve:i,reject:a,next:null};r?r=r.next=l:(n=r=l,o(e,t))}))}function o(n,r){try{var i=e[n](r),l=i.value,u=l instanceof t;Promise.resolve(u?l.wrapped:l).then((function(e){u?o("next",e):a(i.done?"return":"normal",e)}),(function(e){o("throw",e)}))}catch(e){a("throw",e)}}function a(e,t){switch(e){case"return":n.resolve({value:t,done:!0});break;case"throw":n.reject(t);break;default:n.resolve({value:t,done:!1})}(n=n.next)?o(n.key,n.arg):r=null}this._invoke=i,"function"!=typeof e.return&&(this.return=void 0)}function r(e,t){return i(e)||o(e,t)||a()}function i(e){if(Array.isArray(e))return e}function o(e,t){var n=[],r=!0,i=!1,o=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){i=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(i)throw o}}return n}function a(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}"function"==typeof Symbol&&Symbol.asyncIterator&&(n.prototype[Symbol.asyncIterator]=function(){return this}),n.prototype.next=function(e){return this._invoke("next",e)},n.prototype.throw=function(e){return this._invoke("throw",e)},n.prototype.return=function(e){return this._invoke("return",e)};var l=function(e,t){return f(e.x*t,e.y*t)},u=function(e,t){return f(e.x+t.x,e.y+t.y)},s=function(e){var t=Math.sqrt(e.x*e.x+e.y*e.y);return 0===t?{x:0,y:0}:f(e.x/t,e.y/t)},c=function(e,t,n){var r=Math.cos(t),i=Math.sin(t),o=f(e.x-n.x,e.y-n.y);return f(n.x+r*o.x-i*o.y,n.y+i*o.x+r*o.y)},f=function(){return{x:arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,y:arguments.length>1&&void 0!==arguments[1]?arguments[1]:0}},d=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0;return"string"==typeof e?parseFloat(e)*n:"number"==typeof e?e*(r?t[r]:Math.min(t.width,t.height)):void 0}
2,h=function(e,t,n){var r=e.borderStyle||e.lineStyle||"solid",i=e.backgroundColor||e.fontColor||"transparent",o=e.borderColor||e.lineColor||"transparent",a=d(e.borderWidth||e.lineWidth,t,n);return{"stroke-linecap":e.lineCap||"round","stroke-linejoin":e.lineJoin||"round","stroke-width":a||0,"stroke-dasharray":"string"==typeof r?"":r.map((function(e){return d(e,t,n)})).join(","),stroke:o,fill:i,opacity:e.opacity||1}},p=function(e){return null!=e},g=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=d(e.x,t,n,"width")||d(e.left,t,n,"width"),i=d(e.y,t,n,"height")||d(e.top,t,n,"height"),o=d(e.width,t,n,"width"),a=d(e.height,t,n,"height"),l=d(e.right,t,n,"width"),u=d(e.bottom,t,n,"height");return p(i)||(i=p(a)&&p(u)?t.height-a-u:u),p(r)||(r=p(o)&&p(l)?t.width-o-l:l),p(o)||(o=p(r)&&p(l)?t.width-r-l:0),p(a)||(a=p(i)&&p(u)?t.height-i-u:0),{x:r||0,y:i||0,width:o||0,height:a||0}},m=function(e){return e.map((function(e,t){return"".concat(0===t?"M":"L"," ").concat(e.x," ").concat(e.y)})).join(" ")},v=function(e,t){return Object.keys(t).forEach((function(n){return e.setAttribute(n,t[n])}))},y="http://www.w3.org/2000/svg",E=function(e,t){var n=document.createElementNS(y,e);return t&&v(n,t),n},_=function(e){return v(e,Object.assign({},e.rect,e.styles))},x=function(e){var t=e.rect.x+.5*e.rect.width,n=e.rect.y+.5*e.rect.height,r=.5*e.rect.width,i=.5*e.rect.height;return v(e,Object.assign({cx:t,cy:n,rx:r,ry:i},e.styles))},b={contain:"xMidYMid meet",cover:"xMidYMid slice"},w=function(e,t){v(e,Object.assign({},e.rect,e.styles,{preserveAspectRatio:b[t.fit]||"none"}))},D={left:"start",center:"middle",right:"end"},T=function(e,t,n,r){var i=d(t.fontSize,n,r),o=t.fontFamily||"sans-serif",a=t.fontWeight||"normal",l=D[t.textAlign]||"start";v(e,Object.assign({},e.rect,e.styles,{"stroke-width":0,"font-weight":a,"font-size":i,"font-family":o,"text-anchor":l})),e.text!==t.text&&(e.text=t.text,e.textContent=t.text.length?t.text:" ")},I=function(e,t,n,r){v(e,Object.assign({},e.rect,e.styles,{fill:"none"}));var i=e.childNodes[0],o=e.childNodes[1],a=e.childNodes[2],f=e.rect,h={x:e.rect.x+e.rect.width,y:e.rect.y+e.rect.height};if(v(i,{x1:f.x,y1:f.y,x2:h.x,y2:h.y}),t.lineDecoration){o.style.display="none",a.style.display="none";var p=s({x:h.x-f.x,y:h.y-f.y}),g=d(.05,n,r);if(-1!==t.lineDecoration.indexOf("arrow-begin")){var m=l(p,g),y=u(f,m),E=c(f,2,y),_=c(f,-2,y);v(o,{style:"display:block;",d:"M".concat(E.x,",").concat(E.y," L").concat(f.x,",").concat(f.y," L").concat(_.x,",").concat(_.y)})}if(-1!==t.lineDecoration.indexOf("arrow-end")){var x=l(p,-g),b=u(h,x),w=c(h,2,b),D=c(h,-2,b);v(a,{style:"display:block;",d:"M".concat(w.x,",").concat(w.y," L").concat(h.x,",").concat(h.y," L").concat(D.x,",").concat(D.y)})}}},A=function(e,t,n,r){v(e,Object.assign({},e.styles,{fill:"none",d:m(t.points.map((function(e){return{x:d(e.x,n,r,"width"),y:d(e.y,n,r,"height")}})))}))},C=function(e){return function(t){return E(e,{id:t.id})}},S=function(e){var t=E("g",{id:e.id,"stroke-linecap":"round","stroke-linejoin":"round"}),n=E("line");t.appendChild(n);var r=E("path");t.appendChild(r);var i=E("path");return t.appendChild(i),t},O={image:function(e){var t=E("image",{id:e.id,"stroke-linecap":"round","stroke-linejoin":"round",opacity:"0"});return t.onload=function(){t.setAttribute("opacity",e.opacity||1)},t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.src),t},rect:C("rect"),ellipse:C("ellipse"),text:C("text"),path:C("path"),line:S},L={rect:_,ellipse:x,image:w,text:T,path:A,line:I},R=function(e,t){return O[e](t)},k=function(e,t,n,r,i){"path"!==t&&(e.rect=g(n,r,i)),e.styles=h(n,r,i),L[t](e,n,r,i)},M=["x","y","left","top","right","bottom","width","height"],F=function(e){return"string"==typeof e&&/%/.test(e)?parseFloat(e)/100:e},N=function(e){var t=r(e,2),n=t[0],i=t[1],o=i.points?{}:M.reduce((function(e,t){return e[t]=F(i[t]),e}),{});return[n,Object.assign({zIndex:0},i,o)]},P=function(e,t){return e[1].zIndex>t[1].zIndex?1:e[1].zIndex<t[1].zIndex?-1:0},B=function(e){return e.utils.createView({name:"image-preview-markup",tag:"svg",ignoreRect:!0,mixins:{apis:["width","height","crop","markup","resize","dirty"]},write:function(e){var t=e.root,n=e.props;if(n.dirty){var i=n.crop,o=n.resize,a=n.markup,l=n.width,u=n.height,s=i.width,c=i.height;if(o){var f=o.size,d=f&&f.width,h=f&&f.height,p=o.mode,g=o.upscale;
2d&&!h&&(h=d),h&&!d&&(d=h);var m=s<d&&c<h;if(!m||m&&g){var v,y=d/s,E=h/c;"force"===p?(s=d,c=h):("cover"===p?v=Math.max(y,E):"contain"===p&&(v=Math.min(y,E)),s*=v,c*=v)}}var _={width:l,height:u};t.element.setAttribute("width",_.width),t.element.setAttribute("height",_.height);var x=Math.min(l/s,u/c);t.element.innerHTML="";var b=t.query("GET_IMAGE_PREVIEW_MARKUP_FILTER");a.filter(b).map(N).sort(P).forEach((function(e){var n=r(e,2),i=n[0],o=n[1],a=R(i,o);k(a,i,o,_,x),t.element.appendChild(a)}))}}})},G=function(e,t){return{x:e,y:t}},z=function(e,t){return e.x*t.x+e.y*t.y},U=function(e,t){return G(e.x-t.x,e.y-t.y)},W=function(e,t){return z(U(e,t),U(e,t))},H=function(e,t){return Math.sqrt(W(e,t))},q=function(e,t){var n=e,r=1.5707963267948966,i=t,o=1.5707963267948966-t,a=Math.sin(r),l=Math.sin(i),u=Math.sin(o),s=Math.cos(o),c=n/a;return G(s*(c*l),s*(c*u))},V=function(e,t){var n=e.width,r=e.height,i=q(n,t),o=q(r,t),a=G(e.x+Math.abs(i.x),e.y-Math.abs(i.y)),l=G(e.x+e.width+Math.abs(o.y),e.y+Math.abs(o.x)),u=G(e.x-Math.abs(o.y),e.y+e.height-Math.abs(o.x));return{width:H(a,l),height:H(a,u)}},j=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=e.height/e.width,i=1,o=t,a=1,l=r;l>o&&(a=(l=o)/r);var u=Math.max(i/a,o/l),s=e.width/(n*u*a);return{width:s,height:s*t}},Y=function(e,t,n,r){var i=r.x>.5?1-r.x:r.x,o=r.y>.5?1-r.y:r.y,a=2*i*e.width,l=2*o*e.height,u=V(t,n);return Math.max(u.width/a,u.height/l)},X=function(e,t){var n=e.width,r=n*t;return r>e.height&&(n=(r=e.height)/t),{x:.5*(e.width-n),y:.5*(e.height-r),width:n,height:r}},$=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.zoom,r=t.rotation,i=t.center,o=t.aspectRatio;o||(o=e.height/e.width);var a=j(e,o,n),l={x:.5*a.width,y:.5*a.height},u={x:0,y:0,width:a.width,height:a.height,center:l},s=void 0===t.scaleToFit||t.scaleToFit,c=n*Y(e,X(u,o),r,s?i:{x:.5,y:.5});return{widthFloat:a.width/c,heightFloat:a.height/c,width:Math.round(a.width/c),height:Math.round(a.height/c)}},Z={type:"spring",stiffness:.5,damping:.45,mass:10},K=function(e){return e.utils.createView({name:"image-bitmap",ignoreRect:!0,mixins:{styles:["scaleX","scaleY"]},create:function(e){var t=e.root,n=e.props;t.appendChild(n.image)}})},Q=function(e){return e.utils.createView({name:"image-canvas-wrapper",tag:"div",ignoreRect:!0,mixins:{apis:["crop","width","height"],styles:["originX","originY","translateX","translateY","scaleX","scaleY","rotateZ"],animations:{originX:Z,originY:Z,scaleX:Z,scaleY:Z,translateX:Z,translateY:Z,rotateZ:Z}},create:function(t){var n=t.root,r=t.props;r.width=r.image.width,r.height=r.image.height,n.ref.bitmap=n.appendChildView(n.createChildView(K(e),{image:r.image}))},write:function(e){var t=e.root,n=e.props.crop.flip,r=t.ref.bitmap;r.scaleX=n.horizontal?-1:1,r.scaleY=n.vertical?-1:1}})},J=function(e){return e.utils.createView({name:"image-clip",tag:"div",ignoreRect:!0,mixins:{apis:["crop","markup","resize","width","height","dirty","background"],styles:["width","height","opacity"],animations:{opacity:{type:"tween",duration:250}}},didWriteView:function(e){var t=e.root,n=e.props;n.background&&(t.element.style.backgroundColor=n.background)},create:function(t){var n=t.root,r=t.props;n.ref.image=n.appendChildView(n.createChildView(Q(e),Object.assign({},r))),n.ref.createMarkup=function(){n.ref.markup||(n.ref.markup=n.appendChildView(n.createChildView(B(e),Object.assign({},r))))},n.ref.destroyMarkup=function(){n.ref.markup&&(n.removeChildView(n.ref.markup),n.ref.markup=null)};var i=n.query("GET_IMAGE_PREVIEW_TRANSPARENCY_INDICATOR");null!==i&&(n.element.dataset.transparencyIndicator="grid"===i?i:"color")},write:function(e){var t=e.root,n=e.props,r=e.shouldOptimize,i=n.crop,o=n.markup,a=n.resize,l=n.dirty,u=n.width,s=n.height;t.ref.image.crop=i;var c={x:0,y:0,width:u,height:s,center:{x:.5*u,y:.5*s}},f={width:t.ref.image.width,height:t.ref.image.height},d={x:i.center.x*f.width,y:i.center.y*f.height},h={x:c.center.x-f.width*i.center.x,y:c.center.y-f.height*i.center.y},p=2*Math.PI+i.rotation%(2*Math.PI),g=i.aspectRatio||f.height/f.width,m=void 0===i.scaleToFit||i.scaleToFit,v=Y(f,X(c,g),p,m?i.center:{x:.5,y:.5}),y=i.zoom*v;o&&o.length?(t.ref.createMarkup(),t.ref.markup.width=u,t.ref.markup.height=s,t.ref.markup.resize=a,t.ref.markup.dirty=l,t.ref.markup.markup=o,t.ref.markup.crop=$(f,i)):t.ref.markup&&t.ref.destroyMarkup();var E=t.ref.image;if(r)return E.originX=null,E.originY=null,E.translateX=null,E.translateY=null,E.rotateZ=null,E.scaleX=null,void(E.scaleY=null);E.originX=d.x,E.originY=d.y,E.translateX=h.x,E.translateY=h.y,E.rotateZ=p,E.scaleX=y,E.scaleY=y}})},ee=function(e){return e.utils.createView({name:"image-preview",tag:"div",ignoreRect:!0,mixins:{apis:["image","crop","markup","resize","dirty","background"],styles:["translateY","scaleX","scaleY","opacity"],animations:{scaleX:Z,scaleY:Z,translateY:Z,opacity:{type:"tween",duration:400}}},create:function(t){var n=t.root,r=t.props;n.ref.clip=n.appendChildView(n.createChildView(J(e),{id:r.id,image:r.image,crop:r.crop,markup:r.markup,resize:r.resize,dirty:r.dirty,background:r.background}))},write:function(e){var t=e.root,n=e.props,r=e.shouldOptimize,i=t.ref.clip,o=n.image,a=n.crop,l=n.markup,u=n.resize,s=n.dirty;if(i.crop=a,i.markup=l,i.resize=u,i.dirty=s,i.opacity=r?0:1,!r&&!t.re
2ct.element.hidden){var c=o.height/o.width,f=a.aspectRatio||c,d=t.rect.inner.width,h=t.rect.inner.height,p=t.query("GET_IMAGE_PREVIEW_HEIGHT"),g=t.query("GET_IMAGE_PREVIEW_MIN_HEIGHT"),m=t.query("GET_IMAGE_PREVIEW_MAX_HEIGHT"),v=t.query("GET_PANEL_ASPECT_RATIO"),y=t.query("GET_ALLOW_MULTIPLE");v&&!y&&(p=d*v,f=v);var E=null!==p?p:Math.max(g,Math.min(d*f,m)),_=E/f;_>d&&(E=(_=d)*f),E>h&&(E=h,_=h/f),i.width=_,i.height=E}}})},te='<svg width="500" height="200" viewBox="0 0 500 200" preserveAspectRatio="none">\n    <defs>\n        <radialGradient id="gradient-__UID__" cx=".5" cy="1.25" r="1.15">\n            <stop offset=\'50%\' stop-color=\'#000000\'/>\n            <stop offset=\'56%\' stop-color=\'#0a0a0a\'/>\n            <stop offset=\'63%\' stop-color=\'#262626\'/>\n            <stop offset=\'69%\' stop-color=\'#4f4f4f\'/>\n            <stop offset=\'75%\' stop-color=\'#808080\'/>\n            <stop offset=\'81%\' stop-color=\'#b1b1b1\'/>\n            <stop offset=\'88%\' stop-color=\'#dadada\'/>\n            <stop offset=\'94%\' stop-color=\'#f6f6f6\'/>\n            <stop offset=\'100%\' stop-color=\'#ffffff\'/>\n        </radialGradient>\n        <mask id="mask-__UID__">\n            <rect x="0" y="0" width="500" height="200" fill="url(#gradient-__UID__)"></rect>\n        </mask>\n    </defs>\n    <rect x="0" width="500" height="200" fill="currentColor" mask="url(#mask-__UID__)"></rect>\n</svg>',ne=!1,re=0,ie=function(e){return e.utils.createView({name:"image-preview-overlay",tag:"div",ignoreRect:!0,create:function(e){var t=e.root,n=e.props;!ne&&document.querySelector("base")&&(te=te.replace(/url\(\#/g,"url("+window.location.href.replace(window.location.hash,"")+"#"),ne=!0),re++,t.element.classList.add("filepond--image-preview-overlay-".concat(n.status)),t.element.innerHTML=te.replace(/__UID__/g,re)},mixins:{styles:["opacity"],animations:{opacity:{type:"spring",mass:25}}}})},oe=function(){self.onmessage=function(e){createImageBitmap(e.data.message.file).then((function(t){self.postMessage({id:e.data.id,message:t},[t])}))}},ae=function(){self.onmessage=function(e){for(var t=e.data.message.imageData,n=e.data.message.colorMatrix,r=t.data,i=r.length,o=n[0],a=n[1],l=n[2],u=n[3],s=n[4],c=n[5],f=n[6],d=n[7],h=n[8],p=n[9],g=n[10],m=n[11],v=n[12],y=n[13],E=n[14],_=n[15],x=n[16],b=n[17],w=n[18],D=n[19],T=0,I=0,A=0,C=0,S=0;T<i;T+=4)I=r[T]/255,A=r[T+1]/255,C=r[T+2]/255,S=r[T+3]/255,r[T]=Math.max(0,Math.min(255*(I*o+A*a+C*l+S*u+s),255)),r[T+1]=Math.max(0,Math.min(255*(I*c+A*f+C*d+S*h+p),255)),r[T+2]=Math.max(0,Math.min(255*(I*g+A*m+C*v+S*y+E),255)),r[T+3]=Math.max(0,Math.min(255*(I*_+A*x+C*b+S*w+D),255));self.postMessage({id:e.data.id,message:t},[t.data.buffer])}},le=function(e,t){var n=new Image;n.onload=function(){var e=n.naturalWidth,r=n.naturalHeight;n=null,t(e,r)},n.src=e},ue={1:function(){return[1,0,0,1,0,0]},2:function(e){return[-1,0,0,1,e,0]},3:function(e,t){return[-1,0,0,-1,e,t]},4:function(e,t){return[1,0,0,-1,0,t]},5:function(){return[0,1,1,0,0,0]},6:function(e,t){return[0,1,-1,0,t,0]},7:function(e,t){return[0,-1,-1,0,t,e]},8:function(e){return[0,-1,1,0,0,e]}},se=function(e,t,n,r){-1!==r&&e.transform.apply(e,ue[r](t,n))},ce=function(e,t,n,r){t=Math.round(t),n=Math.round(n);var i=document.createElement("canvas");i.width=t,i.height=n;var o=i.getContext("2d");if(r>=5&&r<=8){var a=[n,t];
2t=a[0],n=a[1]}return se(o,t,n,r),o.drawImage(e,0,0,t,n),i},fe=function(e){return/^image/.test(e.type)&&!/svg/.test(e.type)},de=10,he=10,pe=function(e){var t=Math.min(de/e.width,he/e.height),n=document.createElement("canvas"),r=n.getContext("2d"),i=n.width=Math.ceil(e.width*t),o=n.height=Math.ceil(e.height*t);r.drawImage(e,0,0,i,o);var a=null;try{a=r.getImageData(0,0,i,o).data}catch(e){return null}for(var l=a.length,u=0,s=0,c=0,f=0;f<l;f+=4)u+=a[f]*a[f],s+=a[f+1]*a[f+1],c+=a[f+2]*a[f+2];return{r:u=ge(u,l),g:s=ge(s,l),b:c=ge(c,l)}},ge=function(e,t){return Math.floor(Math.sqrt(e/(t/4)))},me=function(e,t){return(t=t||document.createElement("canvas")).width=e.width,t.height=e.height,t.getContext("2d").drawImage(e,0,0),t},ve=function(e){var t;try{t=new ImageData(e.width,e.height)}catch(n){t=document.createElement("canvas").getContext("2d").createImageData(e.width,e.height)}return t.data.set(new Uint8ClampedArray(e.data)),t},ye=function(e){return new Promise((function(t,n){var r=new Image;r.crossOrigin="Anonymous",r.onload=function(){t(r)},r.onerror=function(e){n(e)},r.src=e}))},Ee=function(e){var t=ie(e),n=ee(e),r=e.utils.createWorker,i=function(e,t,n){return new Promise((function(i){e.ref.imageData||(e.ref.imageData=n.getContext("2d").getImageData(0,0,n.width,n.height));var o=ve(e.ref.imageData);if(!t||20!==t.length)return n.getContext("2d").putImageData(o,0,0),i();var a=r(ae);a.post({imageData:o,colorMatrix:t},(function(e){n.getContext("2d").putImageData(e,0,0),a.terminate(),i()}),[o.data.buffer])}))},o=function(e,t){e.removeChildView(t),t.image.width=1,t.image.height=1,t._destroy()},a=function(e){var t=e.root,n=t.ref.images.shift();return n.opacity=0,n.translateY=-15,t.ref.imageViewBin.push(n),n},l=function(e){var t=e.root,r=e.props,i=e.image,o=r.id,a=t.query("GET_ITEM",{id:o});if(a){var l,u,s=a.getMetadata("crop")||{center:{x:.5,y:.5},flip:{horizontal:!1,vertical:!1},zoom:1,rotation:0,aspectRatio:null},c=t.query("GET_IMAGE_TRANSFORM_CANVAS_BACKGROUND_COLOR"),f=!1;t.query("GET_IMAGE_PREVIEW_MARKUP_SHOW")&&(l=a.getMetadata("markup")||[],u=a.getMetadata("resize"),f=!0);var d=t.appendChildView(t.createChildView(n,{id:o,image:i,crop:s,resize:u,markup:l,dirty:f,background:c,opacity:0,scaleX:1.15,scaleY:1.15,translateY:15}),t.childViews.length);t.ref.images.push(d),d.opacity=1,d.scaleX=1,d.scaleY=1,d.translateY=0,setTimeout((function(){t.dispatch("DID_IMAGE_PREVIEW_SHOW",{id:o})}),250)}},u=function(e){var t=e.root,n=e.props,r=t.query("GET_ITEM",{id:n.id});if(r){var i=t.ref.images[t.ref.images.length-1];i.crop=r.getMetadata("crop"),i.background=t.query("GET_IMAGE_TRANSFORM_CANVAS_BACKGROUND_COLOR"),t.query("GET_IMAGE_PREVIEW_MARKUP_SHOW")&&(i.dirty=!0,i.resize=r.getMetadata("resize"),i.markup=r.getMetadata("markup"))}},s=function(e){var t=e.root,n=e.props,r=e.action;if(/crop|filter|markup|resize/.test(r.change.key)&&t.ref.images.length){var o=t.query("GET_ITEM",{id:n.id});if(o)if(/filter/.test(r.change.key)){var s=t.ref.images[t.ref.images.length-1];i(t,r.change.value,s.image)}else if(/crop|markup|resize/.test(r.change.key)){var c=o.getMetadata("crop"),f=t.ref.images[t.ref.images.length-1];if(Math.abs(c.aspectRatio-f.crop.aspectRatio)>1e-5){var d=a({root:t});l({root:t,props:n,image:me(d.image)})}else u({root:t,props:n})}}},c=function(e){var t=window.navigator.userAgent.match(/Firefox\/([0-9]+)\./);return!((t?parseInt(t[1]):null)<=58)&&"createImageBitmap"in window&&fe(e)},f=function(e){var t=e.root,n=e.props.id,r=t.query("GET_ITEM",n);if(r){var i=URL.createObjectURL(r.file);le(i,(function(e,r){t.dispatch("DID_IMAGE_PREVIEW_CALCULATE_SIZE",{id:n,width:e,height:r})}))}},d=function(e){var t=e.root,n=e.props,o=n.id,a=t.query("GET_ITEM",o);if(a){var u=URL.createObjectURL(a.file),s=function(){ye(u).then(f)},f=function(e){URL.revokeObjectURL(u);var r=(a.getMetadata("exif")||{}).orientation||-1,o=e.width,s=e.height;if(r>=5&&r<=8){var c=[s,o];o=c[0],s=c[1]}var f=Math.max(1,.75*window.devicePixelRatio),d=t.query("GET_IMAGE_PREVIEW_ZOOM_FACTOR")*f,h=s/o,p=t.rect.element.width,g=t.rect.element.height,m=p,v=m*h;h>1?v=(m=Math.min(o,p*d))*h:m=(v=Math.min(s,g*d))/h;var y=ce(e,m,v,r),E=function(){var r=t.query("GET_IMAGE_PREVIEW_CALCULATE_AVERAGE_IMAGE_COLOR")?pe(data):null;a.setMetadata("color",r,!0),"close"in e&&e.close(),t.ref.overlaySha
2dow.opacity=1,l({root:t,props:n,image:y})},_=a.getMetadata("filter");_?i(t,_,y).then(E):E()};if(c(a.file)){var d=r(oe);d.post({file:a.file},(function(e){d.terminate(),e?f(e):s()}))}else s()}},h=function(e){var t=e.root,n=t.ref.images[t.ref.images.length-1];n.translateY=0,n.scaleX=1,n.scaleY=1,n.opacity=1},p=function(e){var t=e.root;t.ref.overlayShadow.opacity=1,t.ref.overlayError.opacity=0,t.ref.overlaySuccess.opacity=0},g=function(e){var t=e.root;t.ref.overlayShadow.opacity=.25,t.ref.overlayError.opacity=1},m=function(e){var t=e.root;t.ref.overlayShadow.opacity=.25,t.ref.overlaySuccess.opacity=1},v=function(e){var n=e.root;n.ref.images=[],n.ref.imageData=null,n.ref.imageViewBin=[],n.ref.overlayShadow=n.appendChildView(n.createChildView(t,{opacity:0,status:"idle"})),n.ref.overlaySuccess=n.appendChildView(n.createChildView(t,{opacity:0,status:"success"})),n.ref.overlayError=n.appendChildView(n.createChildView(t,{opacity:0,status:"failure"}))};return e.utils.createView({name:"image-preview-wrapper",create:v,styles:["height"],apis:["height"],destroy:function(e){e.root.ref.images.forEach((function(e){e.image.width=1,e.image.height=1}))},didWriteView:function(e){e.root.ref.images.forEach((function(e){e.dirty=!1}))},write:e.utils.createRoute({DID_IMAGE_PREVIEW_DRAW:h,DID_IMAGE_PREVIEW_CONTAINER_CREATE:f,DID_FINISH_CALCULATE_PREVIEWSIZE:d,DID_UPDATE_ITEM_METADATA:s,DID_THROW_ITEM_LOAD_ERROR:g,DID_THROW_ITEM_PROCESSING_ERROR:g,DID_THROW_ITEM_INVALID:g,DID_COMPLETE_ITEM_PROCESSING:m,DID_START_ITEM_PROCESSING:p,DID_REVERT_ITEM_PROCESSING:p},(function(e){var t=e.root,n=t.ref.imageViewBin.filter((function(e){return 0===e.opacity}));t.ref.imageViewBin=t.ref.imageViewBin.filter((function(e){return e.opacity>0})),n.forEach((function(e){return o(t,e)})),n.length=0}))})},_e=function(t){var n=t.addFilter,r=t.utils,i=r.Type,o=r.createRoute,a=r.isFile,l=Ee(t);return n("CREATE_VIEW",(function(t){var n=t.is,r=t.view,i=t.query;if(n("file")&&i("GET_ALLOW_IMAGE_PREVIEW")){var u=function(t){var n=t.root,o=t.props.id,u=i("GET_ITEM",o);if(u&&a(u.file)&&!u.archived){var s=u.file;if(e(s)&&i("GET_IMAGE_PREVIEW_FILTER_ITEM")(u)){var c="createImageBitmap"in(window||{}),f=i("GET_IMAGE_PREVIEW_MAX_FILE_SIZE");if(!(!c&&f&&s.size>f)){n.ref.imagePreview=r.appendChildView(r.createChildView(l,{id:o}));var d=n.query("GET_IMAGE_PREVIEW_HEIGHT");d&&n.dispatch("DID_UPDATE_PANEL_HEIGHT",{id:u.id,height:d});var h=!c&&s.size>i("GET_IMAGE_PREVIEW_MAX_INSTANT_PREVIEW_FILE_SIZE");n.dispatch("DID_IMAGE_PREVIEW_CONTAINER_CREATE",{id:o},h)}}}},s=function(e,t){if(e.ref.imagePreview){var n=t.id,r=e.query("GET_ITEM",{id:n});if(r){var i=e.query("GET_PANEL_ASPECT_RATIO"),o=e.query("GET_ITEM_PANEL_ASPECT_RATIO"),a=e.query("GET_IMAGE_PREVIEW_HEIGHT");if(!(i||o||a)){var l=e.ref,u=l.imageWidth,s=l.imageHeight;if(u&&s){var c=e.query("GET_IMAGE_PREVIEW_MIN_HEIGHT"),f=e.query("GET_IMAGE_PREVIEW_MAX_HEIGHT"),d=(r.getMetadata("exif")||{}).orientation||-1;if(d>=5&&d<=8){var h=[s,u];u=h[0],s=h[1]}if(!fe(r.file)||e.query("GET_IMAGE_PREVIEW_UPSCALE")){var p=2048/u;u*=p,s*=p}var g=s/u,m=(r.getMetadata("crop")||{}).aspectRatio||g,v=Math.max(c,Math.min(s,f)),y=e.rect.element.width,E=Math.min(y*m,v);e.dispatch("DID_UPDATE_PANEL_HEIGHT",{id:r.id,height:E})}}}}},c=function(e){e.root.ref.shouldRescale=!0},f=function(e){var t=e.root;"crop"===e.action.change.key&&(t.ref.shouldRescale=!0)},d=function(e){var t=e.root,n=e.action;t.ref.imageWidth=n.width,t.ref.imageHeight=n.height,t.ref.shouldRescale=!0,t.ref.shouldDrawPreview=!0,t.dispatch("KICK")};r.registerWriter(o({DID_RESIZE_ROOT:c,DID_STOP_RESIZE:c,DID_LOAD_ITEM:u,DID_IMAGE_PREVIEW_CALCULATE_SIZE:d,DID_UPDATE_ITEM_METADATA:f},(function(e){var t=e.root,n=e.props;t.ref.imagePreview&&(t.rect.element.hidden||(t.ref.shouldRescale&&(s(t,n),t.ref.shouldRescale=!1),t.ref.shouldDrawPreview&&(requestAnimationFrame((function(){t.dispatch("DID_FINISH_CALCULATE_PREVIEWSIZE",{id:n.id})})),t.ref.shouldDrawPreview=!1)))})))}})),{options:{allowImagePreview:[!0,i.BOOLEAN],imagePreviewFilterItem:[function(){return!0},i.FUNCTION],imagePreviewHeight:[null,i.INT],imagePreviewMinHeight:[44,i.INT],imagePreviewMaxHeight:[256,i.INT],imagePreviewMaxFileSize:[null,i.INT],imagePreviewZo
2omFactor:[2,i.INT],imagePreviewUpscale:[!1,i.BOOLEAN],imagePreviewMaxInstantPreviewFileSize:[1e6,i.INT],imagePreviewTransparencyIndicator:[null,i.STRING],imagePreviewCalculateAverageImageColor:[!1,i.BOOLEAN],imagePreviewMarkupShow:[!0,i.BOOLEAN],imagePreviewMarkupFilter:[function(){return!0},i.FUNCTION]}}};return"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:_e})),_e}()},63567:function(e){e.exports=function(){"use strict";var e=function(e){return/^image/.test(e.type)},t=function(e,t){var n=new Image;n.onload=function(){var e=n.naturalWidth,r=n.naturalHeight;n=null,t({width:e,height:r})},n.onerror=function(){return t(null)},n.src=e},n=function(n){var r=n.addFilter,i=n.utils.Type;return r("DID_LOAD_ITEM",(function(n,r){var i=r.query;return new Promise((function(r,o){var a=n.file;if(!e(a)||!i("GET_ALLOW_IMAGE_RESIZE"))return r(n);var l=i("GET_IMAGE_RESIZE_MODE"),u=i("GET_IMAGE_RESIZE_TARGET_WIDTH"),s=i("GET_IMAGE_RESIZE_TARGET_HEIGHT"),c=i("GET_IMAGE_RESIZE_UPSCALE");if(null===u&&null===s)return r(n);var f=null===u?s:u,d=null===s?f:s,h=URL.createObjectURL(a);t(h,(function(e){if(URL.revokeObjectURL(h),!e)return r(n);var t=e.width,i=e.height,o=(n.getMetadata("exif")||{}).orientation||-1;if(o>=5&&o<=8){var a=[i,t];t=a[0],i=a[1]}return t===f&&i===d||t<=f&&i<=d&&!c?r(n):(n.setMetadata("resize",{mode:l,upscale:c,size:{width:f,height:d}}),void r(n))}))}))})),{options:{allowImageResize:[!0,i.BOOLEAN],imageResizeMode:["cover",i.STRING],imageResizeUpscale:[!0,i.BOOLEAN],imageResizeTargetWidth:[null,i.INT],imageResizeTargetHeight:[null,i.INT]}}};return"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:n})),n}()},53863:function(e){e.exports=function(){"use strict";var e=function(e){return/^image/.test(e.type)},t=function(e){return e.substr(0,e.lastIndexOf("."))||e},n={jpeg:"jpg","svg+xml":"svg"},r=function(e,r){var i=t(e),o=r.split("/")[1],a=n[o]||o;return"".concat(i,".").concat(a)},i=function(e){return/jpeg|png|svg\+xml/.test(e)?e:"image/jpeg"},o=function(e){return/^image/.test(e.type)},a={1:function(){return[1,0,0,1,0,0]},2:function(e){return[-1,0,0,1,e,0]},3:function(e,t){return[-1,0,0,-1,e,t]},4:function(e,t){return[1,0,0,-1,0,t]},5:function(){return[0,1,1,0,0,0]},6:function(e,t){return[0,1,-1,0,t,0]},7:function(e,t){return[0,-1,-1,0,t,e]},8:function(e){return[0,-1,1,0,0,e]}},l=function(e,t,n){return-1===n&&(n=1),a[n](e,t)},u=function(e,t){return{x:e,y:t}},s=function(e,t){return e.x*t.x+e.y*t.y},c=function(e,t){return u(e.x-t.x,e.y-t.y)},f=function(e,t){return s(c(e,t),c(e,t))},d=function(e,t){return Math.sqrt(f(e,t))},h=function(e,t){var n=e,r=1.5707963267948966,i=t,o=1.5707963267948966-t,a=Math.sin(r),l=Math.sin(i),s=Math.sin(o),c=Math.cos(o),f=n/a;return u(c*(f*l),c*(f*s))},p=function(e,t){var n=e.width,r=e.height,i=h(n,t),o=h(r,t),a=u(e.x+Math.abs(i.x),e.y-Math.abs(i.y)),l=u(e.x+e.width+Math.abs(o.y),e.y+Math.abs(o.x)),s=u(e.x-Math.abs(o.y),e.y+e.height-Math.abs(o.x));return{width:d(a,l),height:d(a,s)}},g=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{x:.5,y:.5},i=r.x>.5?1-r.x:r.x,o=r.y>.5?1-r.y:r.y,a=2*i*e.width,l=2*o*e.height,u=p(t,n);return Math.max(u.width/a,u.height/l)},m=function(e,t){var n=e.width,r=n*t;return r>e.height&&(n=(r=e.height)/t),{x:.5*(e.width-n),y:.5*(e.height-r),width:n,height:r}},v=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=e.height/e.width,i=1,o=t,a=1,l=r;l>o&&(a=(l=o)/r);var u=Math.max(i/a,o/l),s=e.width/(n*u*a);return{width:s,height:s*t}},y=function(e){e.width=1,e.height=1,e.getContext("2d").clearRect(0,0,1,1)},E=function(e){return e&&(e.horizontal||e.vertical)},_=function(e,t,n){if(t<=1&&!E(n))return e.width=e.naturalWidth,e.height=e.naturalHeight,e;var r=document.createElement("canvas"),i=e.naturalWidth,o=e.naturalHeight,a=t>=5&&t<=8;a?(r.width=o,r.height=i):(r.width=i,r.height=o);var u=r.getContext("2d");if(t&&u.transform.apply(u,l(i,o,t)),E(n)){var s=[1,0,0,1,0,0];(!a&&n.horizontal||a&n.vertical)&&(s[0]=-1,s[4]=i),(!a&&n.vertical||a&&n.horizontal)&&(s[3]=-1,s[5]=o),u.transform.apply(u,s)}return u.drawImage(e,0,0,i,o),r},x=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.canvasMemoryLimit,o=r.background,a=void 0===o?null:o,l=n.zoom||1,u=_(e,t,n.flip),s={width:u.width,height:u.height},c=n.aspectRatio||s.height/s.width,f=v(s,c,l);if(i){var d=f.width*f.height;if(d>i){var h=Math.sqrt(i)/Math.sqrt(d);s.width=Math.floor(s.width*h),s.height=Math.floor(s.height*h),f=v(s,c,l)}}var p=document.createElement("canvas"),E={x:.5*f.width,y:.5*f.height},x={x:0,y:0,width:f.width,height:f.height,center:E},b=void 0===n.scaleToFit||n.scaleToFit,w=l*g(s,m(x,c),n.rotation,b?n.center:{x:.5,y:.5});p.width=Math.round(f.width/w),p.height=Math.round(f.height/w),E.x/=w,E.y/=w;var D={x:E.x-s.width*(n.center?n.center.x:.5),y:E.y-s.height*(n.center?n.center.y:.5)},T=p.getContext("2d");a&&(T.fillStyle=a,T.fillRect(0,0,p.width,p.height)),T.translate(E.x,E.y),T.rotate(n.rotation||0),T.drawImage(u,D.x-E.x,D.y-E.y,s.width,s.height);var I=T.getImageData(0,0,p.width,p.height);return y(p),I};"undefined"!=typeof window&&void 0!==window.document&&(HTMLCanvasElement.prototype.toBlob||Object.defineProperty(HTMLCanvasElement.prototype,"toBlob",{value:function(e,t,n){var r=this.toDataURL(t,n).split(",")[1];setTimeout((function(){for(var n=atob(r),i=n.length,o=new Uint8Array(i),a=0;a<i;a++)o[a]=n.charCodeAt(a);e(new Blob([o],{type:t||"image/png"}))}))}}));var b=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return new Promise((function(r){var i=n?n(e):e;Promise.resolve(i).then((function(e){e.toBlob(r,t.type,t.quality)}))}))},w=function(e,t){return A(e.x*t,e.y*t)},D=function(e,t){return A(e.x+t.x,e.y+t.y)},T=function(e){var t=Math.sqrt(e.x*e.x+e.y*e.y);return 0===t?{x:0,y:0}:A(e.x/t,e.y/t)},I=function(e,t,n){var r=Math.cos(t),i=Math.sin(t),o=A(e.x-n.x,e.y-n.y);return A(n.x+r*o.x-i*o.y,n.y+i*o.x+r*o.y)},A=function(){return{x:arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,y:arguments.length>1&&void 0!==arguments[1]?arguments[1]:0}},C=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0;return"string"==typeof e?parseFloat(e)*n:"number"==typeof e?e*(r?t[r]:Math.min(t.width,t.height)):void 0}
2,S=function(e,t,n){var r=e.borderStyle||e.lineStyle||"solid",i=e.backgroundColor||e.fontColor||"transparent",o=e.borderColor||e.lineColor||"transparent",a=C(e.borderWidth||e.lineWidth,t,n);return{"stroke-linecap":e.lineCap||"round","stroke-linejoin":e.lineJoin||"round","stroke-width":a||0,"stroke-dasharray":"string"==typeof r?"":r.map((function(e){return C(e,t,n)})).join(","),stroke:o,fill:i,opacity:e.opacity||1}},O=function(e){return null!=e},L=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=C(e.x,t,n,"width")||C(e.left,t,n,"width"),i=C(e.y,t,n,"height")||C(e.top,t,n,"height"),o=C(e.width,t,n,"width"),a=C(e.height,t,n,"height"),l=C(e.right,t,n,"width"),u=C(e.bottom,t,n,"height");return O(i)||(i=O(a)&&O(u)?t.height-a-u:u),O(r)||(r=O(o)&&O(l)?t.width-o-l:l),O(o)||(o=O(r)&&O(l)?t.width-r-l:0),O(a)||(a=O(i)&&O(u)?t.height-i-u:0),{x:r||0,y:i||0,width:o||0,height:a||0}},R=function(e){return e.map((function(e,t){return"".concat(0===t?"M":"L"," ").concat(e.x," ").concat(e.y)})).join(" ")},k=function(e,t){return Object.keys(t).forEach((function(n){return e.setAttribute(n,t[n])}))},M="http://www.w3.org/2000/svg",F=function(e,t){var n=document.createElementNS(M,e);return t&&k(n,t),n},N=function(e){return k(e,Object.assign({},e.rect,e.styles))},P=function(e){var t=e.rect.x+.5*e.rect.width,n=e.rect.y+.5*e.rect.height,r=.5*e.rect.width,i=.5*e.rect.height;return k(e,Object.assign({cx:t,cy:n,rx:r,ry:i},e.styles))},B={contain:"xMidYMid meet",cover:"xMidYMid slice"},G=function(e,t){k(e,Object.assign({},e.rect,e.styles,{preserveAspectRatio:B[t.fit]||"none"}))},z={left:"start",center:"middle",right:"end"},U=function(e,t,n,r){var i=C(t.fontSize,n,r),o=t.fontFamily||"sans-serif",a=t.fontWeight||"normal",l=z[t.textAlign]||"start";k(e,Object.assign({},e.rect,e.styles,{"stroke-width":0,"font-weight":a,"font-size":i,"font-family":o,"text-anchor":l})),e.text!==t.text&&(e.text=t.text,e.textContent=t.text.length?t.text:" ")},W=function(e,t,n,r){k(e,Object.assign({},e.rect,e.styles,{fill:"none"}));var i=e.childNodes[0],o=e.childNodes[1],a=e.childNodes[2],l=e.rect,u={x:e.rect.x+e.rect.width,y:e.rect.y+e.rect.height};if(k(i,{x1:l.x,y1:l.y,x2:u.x,y2:u.y}),t.lineDecoration){o.style.display="none",a.style.display="none";var s=T({x:u.x-l.x,y:u.y-l.y}),c=C(.05,n,r);if(-1!==t.lineDecoration.indexOf("arrow-begin")){var f=w(s,c),d=D(l,f),h=I(l,2,d),p=I(l,-2,d);k(o,{style:"display:block;",d:"M".concat(h.x,",").concat(h.y," L").concat(l.x,",").concat(l.y," L").concat(p.x,",").concat(p.y)})}if(-1!==t.lineDecoration.indexOf("arrow-end")){var g=w(s,-c),m=D(u,g),v=I(u,2,m),y=I(u,-2,m);k(a,{style:"display:block;",d:"M".concat(v.x,",").concat(v.y," L").concat(u.x,",").concat(u.y," L").concat(y.x,",").concat(y.y)})}}},H=function(e,t,n,r){k(e,Object.assign({},e.styles,{fill:"none",d:R(t.points.map((function(e){return{x:C(e.x,n,r,"width"),y:C(e.y,n,r,"height")}})))}))},q=function(e){return function(t){return F(e,{id:t.id})}},V=function(e){var t=F("g",{id:e.id,"stroke-linecap":"round","stroke-linejoin":"round"}),n=F("line");t.appendChild(n);var r=F("path");t.appendChild(r);var i=F("path");return t.appendChild(i),t},j={image:function(e){var t=F("image",{id:e.id,"stroke-linecap":"round","stroke-linejoin":"round",opacity:"0"});return t.onload=function(){t.setAttribute("opacity",e.opacity||1)},t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.src),t},rect:q("rect"),ellipse:q("ellipse"),text:q("text"),path:q("path"),line:V},Y={rect:N,ellipse:P,image:G,text:U,path:H,line:W},X=function(e,t){return j[e](t)},$=function(e,t,n,r,i){"path"!==t&&(e.rect=L(n,r,i)),e.styles=S(n,r,i),Y[t](e,n,r,i)},Z=function(e,t){return e[1].zIndex>t[1].zIndex?1:e[1].zIndex<t[1].zIndex?-1:0},K=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;return new Promise((function(i){var o=r.background,a=void 0===o?null:o,l=new FileReader;l.onloadend=function(){var e=l.result,r=document.createElement("div");r.style.cssText="position:absolute;pointer-events:none;width:0;height:0;visibility:hidden;",r.innerHTML=e;var o=r.querySelector("svg");document.body.appendChild(r);var u=o.getBBox();r.parentNode.removeChild(r);var s=r.querySelector("title"),c=o.getAttribute("viewBox")||"",f=o.getAttribute("width")||"",d=o.getAttribute("height")||"",h=parseFloat(f)||null,p=parseFloat(d)||null,v=(f.match(/[a-z]+/)||[])[0]||"",y=(d.match(/[a-z]+/)||[])[0]||"",E=c.split(" ").map(parseFloat),_=E.length?{x:E[0],y:E[1],width:E[2],height:E[3]}:u,x=null!=h?h:_.width,b=null!=p?p:_.height;o.style.overflow="visible",o.setAttribute("width",x),o.setAttribute("height",b);var w="";if(n&&n.length){var D={width:x,height:b};w=n.sort(Z).reduce((function(e,t){var n=X(t[0],t[1]);return $(n,t[0],t[1],D),n.removeAttribute("id"),1===n.getAttribute("op
2acity")&&n.removeAttribute("opacity"),e+"\n"+n.outerHTML+"\n"}),""),w="\n\n<g>".concat(w.replace(/&nbsp;/g," "),"</g>\n\n")}var T=t.aspectRatio||b/x,I=x,A=I*T,C=void 0===t.scaleToFit||t.scaleToFit,S=t.center?t.center.x:.5,O=t.center?t.center.y:.5,L=g({width:x,height:b},m({width:I,height:A},T),t.rotation,C?{x:S,y:O}:{x:.5,y:.5}),R=t.zoom*L,k=t.rotation*(180/Math.PI),M={x:.5*I,y:.5*A},F={x:M.x-x*S,y:M.y-b*O},N=["rotate(".concat(k," ").concat(M.x," ").concat(M.y,")"),"translate(".concat(M.x," ").concat(M.y,")"),"scale(".concat(R,")"),"translate(".concat(-M.x," ").concat(-M.y,")"),"translate(".concat(F.x," ").concat(F.y,")")],P=t.flip&&t.flip.horizontal,B=t.flip&&t.flip.vertical,G=["scale(".concat(P?-1:1," ").concat(B?-1:1,")"),"translate(".concat(P?-x:0," ").concat(B?-b:0,")")],z='<?xml version="1.0" encoding="UTF-8"?>\n<svg width="'.concat(I).concat(v,'" height="').concat(A).concat(y,'" \nviewBox="0 0 ').concat(I," ").concat(A,'" ').concat(a?'style="background:'+a+'" ':"",'\npreserveAspectRatio="xMinYMin"\nxmlns:xlink="http://www.w3.org/1999/xlink"\nxmlns="http://www.w3.org/2000/svg">\n\x3c!-- Generated by PQINA - https://pqina.nl/ --\x3e\n<title>').concat(s?s.textContent:"",'</title>\n<g transform="').concat(N.join(" "),'">\n<g transform="').concat(G.join(" "),'">\n').concat(o.outerHTML).concat(w,"\n</g>\n</g>\n</svg>");i(z)},l.readAsText(e)}))},Q=function(e){var t;try{t=new ImageData(e.width,e.height)}catch(n){t=document.createElement("canvas").getContext("2d").createImageData(e.width,e.height)}return t.data.set(e.data),t},J=function(){var e={resize:c,filter:s},t=function(t,n){return t.forEach((function(t){n=e[t.type](n,t.data)})),n},n=function(e,n){var r=e.transforms,i=null;if(r.forEach((function(e){"filter"===e.type&&(i=e)})),i){var o=null;r.forEach((function(e){"resize"===e.type&&(o=e)})),o&&(o.data.matrix=i.data,r=r.filter((function(e){return"filter"!==e.type})))}n(t(r,e.imageData))};self.onmessage=function(e){n(e.data.message,(function(t){self.postMessage({id:e.data.id,message:t},[t.data.buffer])}))};var r=1,i=1,o=1;function a(e,t,n){var a=t[e]/255,l=t[e+1]/255,u=t[e+2]/255,s=t[e+3]/255,c=a*n[0]+l*n[1]+u*n[2]+s*n[3]+n[4],f=a*n[5]+l*n[6]+u*n[7]+s*n[8]+n[9],d=a*n[10]+l*n[11]+u*n[12]+s*n[13]+n[14],h=a*n[15]+l*n[16]+u*n[17]+s*n[18]+n[19],p=Math.max(0,c*h)+r*(1-h),g=Math.max(0,f*h)+i*(1-h),m=Math.max(0,d*h)+o*(1-h);t[e]=255*Math.max(0,Math.min(1,p)),t[e+1]=255*Math.max(0,Math.min(1,g)),t[e+2]=255*Math.max(0,Math.min(1,m))}var l=self.JSON.stringify([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]);function u(e){return self.JSON.stringify(e||[])===l}function s(e,t){if(!t||u(t))return e;for(var n=e.data,a=n.length,l=t[0],s=t[1],c=t[2],f=t[3],d=t[4],h=t[5],p=t[6],g=t[7],m=t[8],v=t[9],y=t[10],E=t[11],_=t[12],x=t[13],b=t[14],w=t[15],D=t[16],T=t[17],I=t[18],A=t[19],C=0,S=0,O=0,L=0,R=0,k=0,M=0,F=0,N=0,P=0,B=0,G=0;C<a;C+=4)k=(S=n[C]/255)*l+(O=n[C+1]/255)*s+(L=n[C+2]/255)*c+(R=n[C+3]/255)*f+d,M=S*h+O*p+L*g+R*m+v,F=S*y+O*E+L*_+R*x+b,N=S*w+O*D+L*T+R*I+A,P=Math.max(0,k*N)+r*(1-N),B=Math.max(0,M*N)+i*(1-N),G=Math.max(0,F*N)+o*(1-N),n[C]=255*Math.max(0,Math.min(1,P)),n[C+1]=255*Math.max(0,Math.min(1,B)),n[C+2]=255*Math.max(0,Math.min(1,G));return e}function c(e,t){var n=t.mode,r=void 0===n?"contain":n,i=t.upscale,o=void 0!==i&&i,l=t.width,c=t.height,f=t.matrix;if(f=!f||u(f)?null:f,!l&&!c)return s(e,f);if(null===l?l=c:null===c&&(c=l),"force"!==r){var d=l/e.width,h=c/e.height,p=1;if("cover"===r?p=Math.max(d,h):"contain"===r&&(p=Math.min(d,h)),p>1&&!1===o)return s(e,f);l=e.width*p,c=e.height*p}for(var g=e.width,m=e.height,v=Math.round(l),y=Math.round(c),E=e.data,_=new Uint8ClampedArray(v*y*4),x=g/v,b=m/y,w=Math.ceil(.5*x),D=Math.ceil(.5*b),T=0;T<y;T++)for(var I=0;I<v;I++){for(var A=4*(I+T*v),C=0,S=0,O=0,L=0,R=0,k=0,M=0,F=(T+.5)*b,N=Math.floor(T*b);N<(T+1)*b;N++)for(var P=Math.abs(F-(N+.5))/D,B=(I+.5)*x,G=P*P,z=Math.floor(I*x);z<(I+1)*x;z++){var U=Math.abs(B-(z+.5))/w,W=Math.sqrt(G+U*U);if(W>=-1&&W<=1&&(C=2*W*W*W-3*W*W+1)>0){var H=E[3+(U=4*(z+N*g))];M+=C*H,O+=C,H<255&&(C=C*H/250),L+=C*E[U],R+=C*E[U+1],k+=C*E[U+2],S+=C}}_[A]=L/S,_[A+1]=R/S,_[A+2]=k/S,_[A+3]=M/O,f&&a(A,_,f)}return{data:_,width:v,height:y}}},ee=function(e,t){if(1165519206===e.getUint32(t+4,!1)){t+=4;var n=18761===e.getUint16(t+=6,!1);t+=e.getUint32(t+4,n);var r=e.getUint16(t,n);t+=2;
2for(var i=0;i<r;i++)if(274===e.getUint16(t+12*i,n))return e.setUint16(t+12*i+8,1,n),!0;return!1}},te=function(e){var t=new DataView(e);if(65496!==t.getUint16(0))return null;for(var n,r,i=2,o=!1;i<t.byteLength&&(n=t.getUint16(i,!1),r=t.getUint16(i+2,!1)+2,n>=65504&&n<=65519||65534===n)&&(o||(o=ee(t,i,r)),!(i+r>t.byteLength));)i+=r;return e.slice(0,i)},ne=function(e){return new Promise((function(t){var n=new FileReader;n.onload=function(){return t(te(n.result)||null)},n.readAsArrayBuffer(e.slice(0,262144))}))},re=function(){return window.BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder},ie=function(e,t){var n=re();if(n){var r=new n;return r.append(e),r.getBlob(t)}return new Blob([e],{type:t})},oe=function(){return Math.random().toString(36).substr(2,9)},ae=function(e){var t=new Blob(["(",e.toString(),")()"],{type:"application/javascript"}),n=URL.createObjectURL(t),r=new Worker(n),i=[];return{transfer:function(){},post:function(e,t,n){var o=oe();i[o]=t,r.onmessage=function(e){var t=i[e.data.id];t&&(t(e.data.message),delete i[e.data.id])},r.postMessage({id:o,message:e},n)},terminate:function(){r.terminate(),URL.revokeObjectURL(n)}}},le=function(e){return new Promise((function(t,n){var r=new Image;r.onload=function(){t(r)},r.onerror=function(e){n(e)},r.src=e}))},ue=function(e){return e.reduce((function(e,t){return e.then((function(e){return t().then(Array.prototype.concat.bind(e))}))}),Promise.resolve([]))},se=function(e,t){return new Promise((function(n){var r={width:e.width,height:e.height},i=e.getContext("2d"),o=t.sort(Z).map((function(e){return function(){return new Promise((function(t){de[e[0]](i,r,e[1],t)&&t()}))}}));ue(o).then((function(){return n(e)}))}))},ce=function(e,t){e.beginPath(),e.lineCap=t["stroke-linecap"],e.lineJoin=t["stroke-linejoin"],e.lineWidth=t["stroke-width"],t["stroke-dasharray"].length&&e.setLineDash(t["stroke-dasharray"].split(",")),e.fillStyle=t.fill,e.strokeStyle=t.stroke,e.globalAlpha=t.opacity||1},fe=function(e){e.fill(),e.stroke(),e.globalAlpha=1},de={rect:function(e,t,n){var r=L(n,t),i=S(n,t);return ce(e,i),e.rect(r.x,r.y,r.width,r.height),fe(e,i),!0},ellipse:function(e,t,n){var r=L(n,t),i=S(n,t);ce(e,i);var o=r.x,a=r.y,l=r.width,u=r.height,s=.5522848,c=l/2*s,f=u/2*s,d=o+l,h=a+u,p=o+l/2,g=a+u/2;return e.moveTo(o,g),e.bezierCurveTo(o,g-f,p-c,a,p,a),e.bezierCurveTo(p+c,a,d,g-f,d,g),e.bezierCurveTo(d,g+f,p+c,h,p,h),e.bezierCurveTo(p-c,h,o,g+f,o,g),fe(e,i),!0},image:function(e,t,n,r){var i=L(n,t),o=S(n,t);ce(e,o);var a=new Image;new URL(n.src,window.location.href).origin!==window.location.origin&&(a.crossOrigin=""),a.onload=function(){if("cover"===n.fit){var t=i.width/i.height,l=t>1?a.width:a.height*t,u=t>1?a.width/t:a.height,s=.5*a.width-.5*l,c=.5*a.height-.5*u;e.drawImage(a,s,c,l,u,i.x,i.y,i.width,i.height)}else if("contain"===n.fit){var f=Math.min(i.width/a.width,i.height/a.height),d=f*a.width,h=f*a.height,p=i.x+.5*i.width-.5*d,g=i.y+.5*i.height-.5*h;e.drawImage(a,0,0,a.width,a.height,p,g,d,h)}else e.drawImage(a,0,0,a.width,a.height,i.x,i.y,i.width,i.height);fe(e,o),r()},a.src=n.src},text:function(e,t,n){var r=L(n,t),i=S(n,t);ce(e,i);var o=C(n.fontSize,t),a=n.fontFamily||"sans-serif",l=n.fontWeight||"normal",u=n.textAlign||"left";return e.font="".concat(l," ").concat(o,"px ").concat(a),e.textAlign=u,e.fillText(n.text,r.x,r.y),fe(e,i),!0},line:function(e,t,n){var r=L(n,t),i=S(n,t);ce(e,i),e.beginPath();var o={x:r.x,y:r.y},a={x:r.x+r.width,y:r.y+r.height};e.moveTo(o.x,o.y),e.lineTo(a.x,a.y);var l=T({x:a.x-o.x,y:a.y-o.y}),u=.04*Math.min(t.width,t.height);if(-1!==n.lineDecoration.indexOf("arrow-begin")){var s=w(l,u),c=D(o,s),f=I(o,2,c),d=I(o,-2,c);e.moveTo(f.x,f.y),e.lineTo(o.x,o.y),e.lineTo(d.x,d.y)}if(-1!==n.lineDecoration.indexOf("arrow-end")){var h=w(l,-u),p=D(a,h),g=I(a,2,p),m=I(a,-2,p);e.moveTo(g.x,g.y),e.lineTo(a.x,a.y),e.lineTo(m.x,m.y)}return fe(e,i),!0},path:function(e,t,n){var r=S(n,t);ce(e,r),e.beginPath();var i=n.points.map((function(e){return{x:C(e.x,t,1,"width"),y:C(e.y,t,1,"height")}}));e.moveTo(i[0].x,i[0].y);for(var o=i.length,a=1;a<o;a++)e.lineTo(i[a].x,i[a].y);return fe(e,r),!0}},he=function(e){var t=document.createElement("canvas");return t.width=e.width,t.height=e.height,t.getContext("2d").putImageData(e,0,0),t},pe=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Promise((function(r,i){if(!e||!o(e))return i({status:"not an image file",file:e});var a=n.stripImageHead,l=n.beforeCreateBlob,u=n.afterCreateBlob,s=n.canvasMemoryLimit,c=t.crop,f=t.size,d=t.filter,h=t.markup,p=t.output,g=t.image&&t.image.orientation?Math.max(1,Math.min(8,t.image.orientation)):null,m=p&&p.quality,v=null===m?null:m/100,E=p&&p.type||null,_=p&&p.background||null,w=[];!f||"number"!=typeof f.width&&"number"!=typeof f.height||w.push({type:"resize",data:f}),d&&20===d.length&&w.push({type:"filter",data:d});var D=function(e){var t=u?u(e):e;Promise.resolve(t).then(r)},T=function(t,n){var r=he(t),o=h.length?se(r,h):r;Promise.resolve(o).then((function(t){b(t,n,l).then((function(n){if(y(t),a)return D(n);ne(e).then((function(e){null!==e&&(n=new Blob([e,n.slice(20)],{type:n.type})),D(n)}))})).catch(i)}))};if(/svg/.test(e.type)&&null===E)return K(e,c,h,{background:_}).then((function(e){r(ie(e,"image/svg+xml"))}));var I=URL.createObjectURL(e);le(I).then((function(t){URL.revokeObjectURL(I);var n=x(t,g,c,{canvasMemoryLimit:s,background:_}),r={quality:v,type:E||e.type};if(!w.length)return T(n,r);var i=ae(J);i.post({transforms:w,imageData:n},(function(e){T(Q(e),r),i.terminate()}),[n.data.buffer])})).catch(i)}))};function ge(e){this.wrapped=e}function me(e){var t,n;function r(e,r){return new Promise((function(o,a){var l={key:e,arg:r,resolve:o,reject:a,next:null};n?n=n.next=l:(t=n=l,i(e,r))}))}function i(t,n){try{var r=e[t](n),a=r.value,l=a instanceof ge;Promise.resolve(l?a.wrapped:a).then((function(e){l?i("next",e):o(r.done?"return":"normal",e)}),(function(e){i("throw",e)}))}catch(e){o("throw",e)}}function o(e,r){switch(e){case"return":t.resolve({value:r,done:!0});break;case"throw":t.reject(r);break;default:t.resolve({value:r,done:!1})}(t=t.next)?i(t.key,t.arg):n=null}
2this._invoke=r,"function"!=typeof e.return&&(this.return=void 0)}function ve(e,t){return ye(e)||Ee(e,t)||_e()}function ye(e){if(Array.isArray(e))return e}function Ee(e,t){var n=[],r=!0,i=!1,o=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){i=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(i)throw o}}return n}function _e(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}"function"==typeof Symbol&&Symbol.asyncIterator&&(me.prototype[Symbol.asyncIterator]=function(){return this}),me.prototype.next=function(e){return this._invoke("next",e)},me.prototype.throw=function(e){return this._invoke("throw",e)},me.prototype.return=function(e){return this._invoke("return",e)};var xe=["x","y","left","top","right","bottom","width","height"],be=function(e){return"string"==typeof e&&/%/.test(e)?parseFloat(e)/100:e},we=function(e){var t=ve(e,2),n=t[0],r=t[1],i=r.points?{}:xe.reduce((function(e,t){return e[t]=be(r[t]),e}),{});return[n,Object.assign({zIndex:0},r,i)]},De=function(e){return new Promise((function(t,n){var r=new Image;r.src=URL.createObjectURL(e);var i=function(){var e=r.naturalWidth,n=r.naturalHeight;e&&n&&(URL.revokeObjectURL(r.src),clearInterval(o),t({width:e,height:n}))};r.onerror=function(e){URL.revokeObjectURL(r.src),clearInterval(o),n(e)};var o=setInterval(i,1);i()}))};"undefined"!=typeof window&&void 0!==window.document&&(HTMLCanvasElement.prototype.toBlob||Object.defineProperty(HTMLCanvasElement.prototype,"toBlob",{value:function(e,t,n){var r=this;setTimeout((function(){for(var i=r.toDataURL(t,n).split(",")[1],o=atob(i),a=o.length,l=new Uint8Array(a);a--;)l[a]=o.charCodeAt(a);e(new Blob([l],{type:t||"image/png"}))}))}}));var Te="undefined"!=typeof window&&void 0!==window.document,Ie=Te&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,Ae=function(t){var n=t.addFilter,o=t.utils,a=o.Type,l=o.forin,u=o.getFileFromBlob,s=o.isFile,c=["crop","resize","filter","markup","output"],f=function(e){return function(t,n,r){return t(n,e?e(r):r)}},d=function(e){return null===e.aspectRatio&&0===e.rotation&&1===e.zoom&&e.center&&.5===e.center.x&&.5===e.center.y&&e.flip&&!1===e.flip.horizontal&&!1===e.flip.vertical};n("SHOULD_PREPARE_OUTPUT",(function(e,t){var n=t.query;return new Promise((function(e){e(!n("IS_ASYNC"))}))}));var h=function(t,n,r){return new Promise((function(i){if(!t("GET_ALLOW_IMAGE_TRANSFORM")||r.archived||!s(n)||!e(n))return i(!1);De(n).then((function(){var e=t("GET_IMAGE_TRANSFORM_IMAGE_FILTER");if(e){var r=e(n);if(null==r)return handleRevert(!0);if("boolean"==typeof r)return i(r);if("function"==typeof r.then)return r.then(i)}i(!0)})).catch((function(e){i(!1)}))}))};return n("DID_CREATE_ITEM",(function(e,t){var n=t.query,r=t.dispatch;n("GET_ALLOW_IMAGE_TRANSFORM")&&e.extend("requestPrepare",(function(){return new Promise((function(t,n){r("REQUEST_PREPARE_OUTPUT",{query:e.id,item:e,success:t,failure:n},!0)}))}))})),n("PREPARE_OUTPUT",(function(e,t){var n=t.query,o=t.item;return new Promise((function(t){h(n,e,o).then((function(a){if(!a)return t(e);var s=[];n("GET_IMAGE_TRANSFORM_VARIANTS_INCLUDE_ORIGINAL")&&s.push((function(){return new Promise((function(t){t({name:n("GET_IMAGE_TRANSFORM_VARIANTS_ORIGINAL_NAME"),file:e})}))})),n("GET_IMAGE_TRANSFORM_VARIANTS_INCLUDE_DEFAULT")&&s.push((function(e,t,r){return new Promise((function(i){e(t,r).then((function(e){return i({name:n("GET_IMAGE_TRANSFORM_VARIANTS_DEFAULT_NAME"),file:e})}))}))}));var h=n("GET_IMAGE_TRANSFORM_VARIANTS")||{};l(h,(function(e,t){var n=f(t);s.push((function(t,r,i){return new Promise((function(o){n(t,r,i).then((function(t){return o({name:e,file:t})}))}))}))}));var p=n("GET_IMAGE_TRANSFORM_OUTPUT_QUALITY"),g=n("GET_IMAGE_TRANSFORM_OUTPUT_QUALITY_MODE"),m=null===p?null:p/100,v=n("GET_IMAGE_TRANSFORM_OUTPUT_MIME_TYPE"),y=n("GET_IMAGE_TRANSFORM_CLIENT_TRANSFORMS")||c;o.setMetadata("output",{type:v,quality:m,client:y},!0);var E=function(e,t){return new Promise((function(o,a){var l=Object.assign({},t);Object.keys(l).filter((function(e){return"exif"!==e}
2)).forEach((function(e){-1===y.indexOf(e)&&delete l[e]}));var s=l.resize,c=l.exif,f=l.output,h=l.crop,p=l.filter,m=l.markup,v={image:{orientation:c?c.orientation:null},output:f&&(f.type||"number"==typeof f.quality||f.background)?{type:f.type,quality:"number"==typeof f.quality?100*f.quality:null,background:f.background||n("GET_IMAGE_TRANSFORM_CANVAS_BACKGROUND_COLOR")||null}:void 0,size:s&&(s.size.width||s.size.height)?Object.assign({mode:s.mode,upscale:s.upscale},s.size):void 0,crop:h&&!d(h)?Object.assign({},h):void 0,markup:m&&m.length?m.map(we):[],filter:p};if(v.output){var E=!!f.type&&f.type!==e.type,_=/\/jpe?g$/.test(e.type),x=null!==f.quality&&_&&"always"===g;if(!(v.size||v.crop||v.filter||E||x))return o(e)}var b={beforeCreateBlob:n("GET_IMAGE_TRANSFORM_BEFORE_CREATE_BLOB"),afterCreateBlob:n("GET_IMAGE_TRANSFORM_AFTER_CREATE_BLOB"),canvasMemoryLimit:n("GET_IMAGE_TRANSFORM_CANVAS_MEMORY_LIMIT"),stripImageHead:n("GET_IMAGE_TRANSFORM_OUTPUT_STRIP_IMAGE_HEAD")};pe(e,v,b).then((function(t){var n=u(t,r(e.name,i(t.type)));o(n)})).catch(a)}))},_=s.map((function(t){return t(E,e,o.getMetadata())}));Promise.all(_).then((function(e){t(1===e.length&&null===e[0].name?e[0].file:e)}))}))}))})),{options:{allowImageTransform:[!0,a.BOOLEAN],imageTransformImageFilter:[null,a.FUNCTION],imageTransformOutputMimeType:[null,a.STRING],imageTransformOutputQuality:[null,a.INT],imageTransformOutputStripImageHead:[!0,a.BOOLEAN],imageTransformClientTransforms:[null,a.ARRAY],imageTransformOutputQualityMode:["always",a.STRING],imageTransformVariants:[null,a.OBJECT],imageTransformVariantsIncludeDefault:[!0,a.BOOLEAN],imageTransformVariantsDefaultName:[null,a.STRING],imageTransformVariantsIncludeOriginal:[!1,a.BOOLEAN],imageTransformVariantsOriginalName:["original_",a.STRING],imageTransformBeforeCreateBlob:[null,a.FUNCTION],imageTransformAfterCreateBlob:[null,a.FUNCTION],imageTransformCanvasMemoryLimit:[Te&&Ie?16777216:null,a.INT],imageTransformCanvasBackgroundColor:[null,a.STRING]}}};return Te&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:Ae})),Ae}()},14755:function(e){e.exports=function(){"use strict";var e=function(e){return/^image/.test(e.type)},t=function(e){return new Promise((function(t,n){var r=document.createElement("img");r.src=URL.createObjectURL(e),r.onerror=function(e){clearInterval(i),n(e)};var i=setInterval((function(){r.naturalWidth&&r.naturalHeight&&(clearInterval(i),URL.revokeObjectURL(r.src),t({width:r.naturalWidth,height:r.naturalHeight}))}),1)}))},n=function(n){var r=n.addFilter,i=n.utils,o=i.Type,a=i.replaceInString,l=i.isFile,u=function(e,n,r){return new Promise((function(i,o){var a=function(e){var t=e.width,r=e.height,a=n.minWidth,l=n.minHeight,u=n.maxWidth,s=n.maxHeight,c=n.minResolution,f=n.maxResolution,d=t*r;t<a||r<l?o("TOO_SMALL"):t>u||r>s?o("TOO_BIG"):null!==c&&d<c?o("TOO_LOW_RES"):null!==f&&d>f&&o("TOO_HIGH_RES"),i()};t(e).then(a).catch((function(){r?r(e,n).then(a).catch((function(){return o()})):o()}))}))};return r("LOAD_FILE",(function(t,n){var r=n.query;return new Promise((function(n,i){if(l(t)&&e(t)&&r("GET_ALLOW_IMAGE_VALIDATE_SIZE")){var o={minWidth:r("GET_IMAGE_VALIDATE_SIZE_MIN_WIDTH"),minHeight:r("GET_IMAGE_VALIDATE_SIZE_MIN_HEIGHT"),maxWidth:r("GET_IMAGE_VALIDATE_SIZE_MAX_WIDTH"),maxHeight:r("GET_IMAGE_VALIDATE_SIZE_MAX_HEIGHT"),minResolution:r("GET_IMAGE_VALIDATE_SIZE_MIN_RESOLUTION"),maxResolution:r("GET_IMAGE_VALIDATE_SIZE_MAX_RESOLUTION")},s=r("GET_IMAGE_VALIDATE_SIZE_MEASURE");u(t,o,s).then((function(){n(t)})).catch((function(e){var n=e?{TOO_SMALL:{label:r("GET_IMAGE_VALIDATE_SIZE_LABEL_IMAGE_SIZE_TOO_SMALL"),details:r("GET_IMAGE_VALIDATE_SIZE_LABEL_EXPECTED_MIN_SIZE")},TOO_BIG:{label:r("GET_IMAGE_VALIDATE_SIZE_LABEL_IMAGE_SIZE_TOO_BIG"),details:r("GET_IMAGE_VALIDATE_SIZE_LABEL_EXPECTED_MAX_SIZE")},TOO_LOW_RES:{label:r("GET_IMAGE_VALIDATE_SIZE_LABEL_IMAGE_RESOLUTION_TOO_LOW"),details:r("GET_IMAGE_VALIDATE_SIZE_LABEL_EXPECTED_MIN_RESOLUTION")},TOO_HIGH_RES:{label:r("GET_IMAGE_VALIDATE_SIZE_LABEL_IMAGE_RESOLUTION_TOO_HIGH"),details:r("GET_IMAGE_VALIDATE_SIZE_LABEL_EXPECTED_MAX_RESOLUTION")}}[e]:{label:r("GET_IMAGE_VALIDATE_SIZE_LABEL_FORMAT_ERROR"),details:t.type};i({status:{main:n.label,sub:e?a(n.details,o):n.details}})}))}else n(t)}))})),{options:{allowImageValidateSize:[!0,o.BOOLEAN],imageValidateSizeLabelFormatError:["Image type not supported",o.STRING],imageValidateSizeMeasure:[null,o.FUNCTION],imageValidateSizeMinResolution:[null,o.INT],imageValidateSizeMaxResolution:[null,o.INT],imageValidateSizeLabelImageResolutionTooLow:["Resolution is too low",o.STRING],imageValidateSizeLabelImageResolutionTooHigh:["Resolution is too high",o.STRING],imageValidateSizeLabelExpectedMinResolution:["Minimum resolution is {minResolution}",o.STRING],imageValidateSizeLabelExpectedMaxResolution:["Maximum resolution is {maxResolution}",o.STRING],imageValidateSizeMinWidth:[1,o.INT],imageValidateSizeMinHeight:[1,o.INT],imageValidateSizeMaxWidth:[65535,o.INT],imageValidateSizeMaxHeight:[65535,o.INT],imageValidateSizeLabelImageSizeTooSmall:["Image is too small",o.STRING],imageValidateSizeLabelImageSizeTooBig:["Image is too big",o.STRING],imageValidateSizeLabelExpectedMinSize:["Minimum size is {minWidth} × {minHeight}",o.STRING],imageValidateSizeLabelExpectedMaxSize:["Maximum size is {maxWidth} × {maxHeight}",o.STRING]}}};return"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:n})),n}()},97908:function(e){e.exports=function(){"use strict";const e=e=>/^video/.test(e.type),t=e=>/^audio/.test(e.type);class n{constructor(e,t){this.mediaEl=e,this.audioElems=t,this.onplayhead=!1,this.duration=0,this.timelineWidth=this.audioElems.timeline.offsetWidth-this.audioElems.playhead.offsetWidth,this.moveplayheadFn=this.moveplayhead.bind(this),this.registerListeners()}registerListeners(){this.mediaEl.addEventListener("timeupdate",this.timeUpdate.bind(this),!1),this.mediaEl.addEventListener("canplaythrough",(()=>this.duration=this.mediaEl.duration),!1),this.audioElems.timeline.addEventListener("click",this.timelineClicked.bind(this),!1),this.audioElems.button.addEventListener("click",this.play.bind(this)),this.audioElems.playhead.addEventListener("mousedown",this.mouseDown.bind(this),!1),window.addEventListener("mouseup",this.mouseUp.bind(this),!1)}play(){this.mediaEl.paused?this.mediaEl.play():this.mediaEl.pause(),this.audioElems.button.classList.toggle("play"),this.audioElems.button.classList.toggle("pause")}timeUpdate(){let e=this.mediaEl.currentTime/this.duration*100;this.audioElems.playhead.style.marginLeft=e+"%",this.mediaEl.currentTime===this.duration&&(this.audioElems.button.classList.toggle("play"),this.audioElems.button.classList.toggle("pause"))}moveplayhead(e){let t=e.clientX-this.getPosition(this.audioElems.timeline);t>=0&&t<=this.timelineWidth&&(this.audioElems.playhead.style.marginLeft=t+"px"),t<0&&(this.audioElems.playhead.style.marginLeft="0px"),t>this.timelineWidth&&(this.audioElems.playhead.style.marginLeft=this.timelineWidth-4+"px")}timelineClicked(e){this.moveplayhead(e),this.mediaEl.currentTime=this.duration*this.clickPercent(e)}mouseDown(){this.onplayhead=!0,window.addEventListener("mousemove",this.moveplayheadFn,!0),this.mediaEl.removeEventListener("timeupdate",this.timeUpdate.bind(this),!1)}mouseUp(e){window.removeEventListener("mousemove",this.moveplayheadFn,!0),1==this.onplayhead&&(this.moveplayhead(e),this.mediaEl.currentTime=this.duration*this.clickPercent(e),this.mediaEl.addEventListener("timeupdate",this.timeUpdate.bind(this),!1)),this.onplayhead=!1}clickPercent(e){return(e.clientX-this.getPosition(this.audioElems.timeline))/this.timelineWidth}getPosition(e){return e.getBoundingClientRect().left}}const r=r=>r.utils.createView({name:"media-preview",tag:"div",ignoreRect:!0,create:({root:e,props:n})=>{const{id:r}=n,i=e.query("GET_ITEM",{id:n.id});let o=t(i.file)?"audio":"video";if(e.ref.media=document.createElement(o),e.ref.media.setAttribute("controls",!0),e.element.appendChild(e.ref.media),t(i.file)){let t=document.createDocumentFragment();e.ref.audio=[],e.ref.audio.container=document.createElement("div"),e.ref.audio.button=document.createElement("span"),e.ref.audio.timeline=document.createElement("div"),e.ref.audio.playhead=document.createElement("div"),e.ref.audio.container.className="audioplayer",e.ref.audio.button.className="playpausebtn play",e.ref.audio.timeline.className="timeline",e.ref.audio.playhead.className="playhead",e.ref.audio.timeline.appendChild(e.ref.audio.playhead),e.ref.audio.container.appendChild(e.ref.audio.button),e.ref.audio.container.appendChild(e.ref.audio.timeline),t.appendChild(e.ref.audio.container),e.element.appendChild(t)}},write:r.utils.createRoute({DID_MEDIA_PREVIEW_LOAD:({root:r,props:i})=>{const{id:o}=i,a=r.query("GET_ITEM",{id:i.id});if(!a)return;let l=window.URL||window.webkitURL,u=new Blob([a.file],{type:a.file.type});r.ref.media.type=a.file.type,r.ref.media.src=a.file.mock&&a.file.url||l.createObjectURL(u),t(a.file)&&new n(r.ref.media,r.ref.audio),r.ref.media.addEventListener("loadeddata",(()=>{let t=75;if(e(a.file)){let e=r.ref.media.offsetWidth,n=r.ref.media.videoWidth/e;t=r.ref.media.videoHeight/n}r.dispatch("DID_UPDATE_PANEL_HEIGHT",{id:i.id,height:t})}),!1)}})}),i=e=>{const t=({root:e,props:t})=>{const{id:n}=t;e.query("GET_ITEM",n)&&e.dispatch("DID_MEDIA_PREVIEW_LOAD",{id:n})},n=({root:t,props:n})=>{const i=r(e);t.ref.media=t.appendChildView(t.createChildView(i,{id:n.id}))};return e.utils.createView({name:"media-preview-wrapper",create:n,write:e.utils.createRoute({DID_MEDIA_PREVIEW_CONTAINER_CREATE:t})})},o=n=>{const{addFilter:r,utils:o}=n,{Type:a,createRoute:l}=o,u=i(n);return r("CREATE_VIEW",(n=>{const{is:r,view:i,query:o}=n;if(!r("file"))return;const a=({root:n,props:r})=>{const{id:a}=r,l=o("GET_ITEM",a),s=o("GET_ALLOW_VIDEO_PREVIEW"),c=o("GET_ALLOW_AUDIO_PREVIEW");
2l&&!l.archived&&(e(l.file)&&s||t(l.file)&&c)&&(n.ref.mediaPreview=i.appendChildView(i.createChildView(u,{id:a})),n.dispatch("DID_MEDIA_PREVIEW_CONTAINER_CREATE",{id:a}))};i.registerWriter(l({DID_LOAD_ITEM:a},(({root:n,props:r})=>{const{id:i}=r,a=o("GET_ITEM",i),l=n.query("GET_ALLOW_VIDEO_PREVIEW"),u=n.query("GET_ALLOW_AUDIO_PREVIEW");a&&(e(a.file)&&l||t(a.file)&&u)&&n.rect.element.hidden})))})),{options:{allowVideoPreview:[!0,a.BOOLEAN],allowAudioPreview:[!0,a.BOOLEAN]}}};return"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:o})),o}()},66136:function(e,t){!function(e){"use strict";var t=function(e){return e instanceof HTMLElement},n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=Object.assign({},e),i=[],o=[],a=function(){var e=[].concat(o);o.length=0,e.forEach((function(e){var t=e.type,n=e.data;l(t,n)}))},l=function(e,t,n){!n||document.hidden?(f[e]&&f[e](t),i.push({type:e,data:t})):o.push({type:e,data:t})},u=function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return c[e]?(t=c)[e].apply(t,r):null},s={getState:function(){return Object.assign({},r)},processActionQueue:function(){var e=[].concat(i);return i.length=0,e},processDispatchQueue:a,dispatch:l,query:u},c={};t.forEach((function(e){c=Object.assign({},e(r),{},c)}));var f={};return n.forEach((function(e){f=Object.assign({},e(l,u,r),{},f)})),s},r=function(e,t,n){"function"!=typeof n?Object.defineProperty(e,t,Object.assign({},n)):e[t]=n},i=function(e,t){for(var n in e)e.hasOwnProperty(n)&&t(n,e[n])},o=function(e){var t={};return i(e,(function(n){r(t,n,e[n])})),t},a=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(null===n)return e.getAttribute(t)||e.hasAttribute(t);e.setAttribute(t,n)},l="http://www.w3.org/2000/svg",u=["svg","path"],s=function(e){return u.includes(e)},c=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"object"==typeof t&&(n=t,t=null);var r=s(e)?document.createElementNS(l,e):document.createElement(e);return t&&(s(e)?a(r,"class",t):r.className=t),i(n,(function(e,t){a(r,e,t)})),r},f=function(e){return function(t,n){void 0!==n&&e.children[n]?e.insertBefore(t,e.children[n]):e.appendChild(t)}},d=function(e,t){return function(e,n){return void 0!==n?t.splice(n,0,e):t.push(e),e}},h=function(e,t){return function(n){return t.splice(t.indexOf(n),1),n.element.parentNode&&e.removeChild(n.element),n}},p="undefined"!=typeof window&&void 0!==window.document,g=function(){return p},m="children"in(g()?c("svg"):{})?function(e){return e.children.length}:function(e){return e.childNodes.length},v=function(e,t,n,r){var i=n[0]||e.left,o=n[1]||e.top,a=i+e.width,l=o+e.height*(r[1]||1),u={element:Object.assign({},e),inner:{left:e.left,top:e.top,right:e.right,bottom:e.bottom},outer:{left:i,top:o,right:a,bottom:l}};return t.filter((function(e){return!e.isRectIgnored()})).map((function(e){return e.rect})).forEach((function(e){y(u.inner,Object.assign({},e.inner)),y(u.outer,Object.assign({},e.outer))})),E(u.inner),u.outer.bottom+=u.element.marginBottom,u.outer.right+=u.element.marginRight,E(u.outer),u},y=function(e,t){t.top+=e.top,t.right+=e.left,t.bottom+=e.top,t.left+=e.left,t.bottom>e.bottom&&(e.bottom=t.bottom),t.right>e.right&&(e.right=t.right)},E=function(e){e.width=e.right-e.left,e.height=e.bottom-e.top},_=function(e){return"number"==typeof e},x=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.001;return Math.abs(e-t)<r&&Math.abs(n)<r},b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.stiffness,n=void 0===t?.5:t,r=e.damping,i=void 0===r?.75:r,a=e.mass,l=void 0===a?10:a,u=null,s=null,c=0,f=!1,d=o({interpolate:function(e,t){if(!f){if(!_(u)||!_(s))return f=!0,void(c=0);x(s+=c+=-(s-u)*n/l,u,c*=i)||t?(s=u,c=0,f=!0,d.onupdate(s),d.oncomplete(s)):d.onupdate(s)}},target:{set:function(e){if(_(e)&&!_(s)&&(s=e),null===u&&(u=e,s=e),s===(u=e)||void 0===u)return f=!0,c=0,d.onupdate(s),void d.oncomplete(s);f=!1},get:function(){return u}},resting:{get:function(){return f}},onupdate:function(e){},oncomplete:function(e){}});return d},w=function(e){return e<.5?2*e*e:(4-2*e)*e-1},D=function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.duration,i=void 0===r?500:r,a=n.easing,l=void 0===a?w:a,u=n.delay,s=void 0===u?0:u,c=null,f=!0,d=!1,h=null,p=o({interpolate:function(n,r){f||null===h||(null===c&&(c=n),n-c<s||((e=n-c-s)>=i||r?(e=1,t=d?0:1,p.onupdate(t*h),p.oncomplete(t*h),f=!0):(t=e/i,p.onupdate((e>=0?l(d?1-t:t):0)*h))))},target:{get:function(){return d?0:h},set:function(e){if(null===h)return h=e,p.onupdate(e),void p.oncomplete(e);e<h?(h=1,d=!0):(d=!1,h=e),f=!1,c=null}},resting:{get:function(){return f}},onupdate:function(e){},oncomplete:function(e){}});return p},T={spring:b,tween:D},I=function(e,t,n){var r=e[t]&&"object"==typeof e[t][n]?e[t][n]:e[t]||e,i="string"==typeof r?r:r.type,o="object"==typeof r?Object.assign({},r):{};return T[i]?T[i](o):null},A=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];
2(t=Array.isArray(t)?t:[t]).forEach((function(t){e.forEach((function(e){var i=e,o=function(){return n[e]},a=function(t){return n[e]=t};"object"==typeof e&&(i=e.key,o=e.getter||o,a=e.setter||a),t[i]&&!r||(t[i]={get:o,set:a})}))}))},C=function(e){return function(t,n){e.addEventListener(t,n)}},S=function(e){return function(t,n){e.removeEventListener(t,n)}},O=function(e){return null!=e},L={opacity:1,scaleX:1,scaleY:1,translateX:0,translateY:0,rotateX:0,rotateY:0,rotateZ:0,originX:0,originY:0},R=function(e){var t=e.mixinConfig,n=e.viewProps,r=e.viewInternalAPI,i=e.viewExternalAPI,o=e.view,a=Object.assign({},n),l={};A(t,[r,i],n);var u=function(){return[n.translateX||0,n.translateY||0]},s=function(){return[n.scaleX||0,n.scaleY||0]},c=function(){return o.rect?v(o.rect,o.childViews,u(),s()):null};return r.rect={get:c},i.rect={get:c},t.forEach((function(e){n[e]=void 0===a[e]?L[e]:a[e]})),{write:function(){if(k(l,n))return M(o.element,n),Object.assign(l,Object.assign({},n)),!0},destroy:function(){}}},k=function(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!0;for(var n in t)if(t[n]!==e[n])return!0;return!1},M=function(e,t){var n=t.opacity,r=t.perspective,i=t.translateX,o=t.translateY,a=t.scaleX,l=t.scaleY,u=t.rotateX,s=t.rotateY,c=t.rotateZ,f=t.originX,d=t.originY,h=t.width,p=t.height,g="",m="";(O(f)||O(d))&&(m+="transform-origin: "+(f||0)+"px "+(d||0)+"px;"),O(r)&&(g+="perspective("+r+"px) "),(O(i)||O(o))&&(g+="translate3d("+(i||0)+"px, "+(o||0)+"px, 0) "),(O(a)||O(l))&&(g+="scale3d("+(O(a)?a:1)+", "+(O(l)?l:1)+", 1) "),O(c)&&(g+="rotateZ("+c+"rad) "),O(u)&&(g+="rotateX("+u+"rad) "),O(s)&&(g+="rotateY("+s+"rad) "),g.length&&(m+="transform:"+g+";"),O(n)&&(m+="opacity:"+n+";",0===n&&(m+="visibility:hidden;"),n<1&&(m+="pointer-events:none;")),O(p)&&(m+="height:"+p+"px;"),O(h)&&(m+="width:"+h+"px;");var v=e.elementCurrentStyle||"";m.length===v.length&&m===v||(e.style.cssText=m,e.elementCurrentStyle=m)},F={styles:R,listeners:function(e){e.mixinConfig,e.viewProps,e.viewInternalAPI;var t=e.viewExternalAPI,n=(e.viewState,e.view),r=[],i=C(n.element),o=S(n.element);return t.on=function(e,t){r.push({type:e,fn:t}),i(e,t)},t.off=function(e,t){r.splice(r.findIndex((function(n){return n.type===e&&n.fn===t})),1),o(e,t)},{write:function(){return!0},destroy:function(){r.forEach((function(e){o(e.type,e.fn)}))}}},animations:function(e){var t=e.mixinConfig,n=e.viewProps,r=e.viewInternalAPI,o=e.viewExternalAPI,a=Object.assign({},n),l=[];return i(t,(function(e,t){var i=I(t);i&&(i.onupdate=function(t){n[e]=t},i.target=a[e],A([{key:e,setter:function(e){i.target!==e&&(i.target=e)},getter:function(){return n[e]}}],[r,o],n,!0),l.push(i))})),{write:function(e){var t=document.hidden,n=!0;return l.forEach((function(r){r.resting||(n=!1),r.interpolate(e,t)})),n},destroy:function(){}}},apis:function(e){var t=e.mixinConfig,n=e.viewProps,r=e.viewExternalAPI;A(t,r,n)}},N=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.layoutCalculated||(e.paddingTop=parseInt(n.paddingTop,10)||0,e.marginTop=parseInt(n.marginTop,10)||0,e.marginRight=parseInt(n.marginRight,10)||0,e.marginBottom=parseInt(n.marginBottom,10)||0,e.marginLeft=parseInt(n.marginLeft,10)||0,t.layoutCalculated=!0),e.left=t.offsetLeft||0,e.top=t.offsetTop||0,e.width=t.offsetWidth||0,e.height=t.offsetHeight||0,e.right=e.left+e.width,e.bottom=e.top+e.height,e.scrollTop=t.scrollTop,e.hidden=null===t.offsetParent,e},P=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.tag,n=void 0===t?"div":t,r=e.name,i=void 0===r?null:r,a=e.attributes,l=void 0===a?{}:a,u=e.read,s=void 0===u?function(){}:u,p=e.write,g=void 0===p?function(){}:p,y=e.create,E=void 0===y?function(){}:y,_=e.destroy,x=void 0===_?function(){}:_,b=e.filterFrameActionsForChild,w=void 0===b?function(e,t){return t}:b,D=e.didCreateView,T=void 0===D?function(){}:D,I=e.didWriteView,A=void 0===I?function(){}:I,C=e.ignoreRect,S=void 0!==C&&C,O=e.ignoreRectUpdate,L=void 0!==O&&O,R=e.mixins,k=void 0===R?[]:R;return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=c(n,"filepond--"+i,l),a=window.getComputedStyle(r,null),u=N(),p=null,y=!1,_=[],b=[],D={},I={},C=[g],O=[s],R=[x],M=function(){return r},P=function(){return _.concat()},B=function(){return D},G=function(e){return function(t,n){return t(e,n)}},z=function(){return p||(p=v(u,_,[0,0],[1,1]))},U=function(){p=null,_.forEach((function(e){return e._read()})),!(L&&u.width&&u.height)&&N(u,r,a);var e={root:X,props:t,rect:u};O.forEach((function(t){return t(e)}))},W=function(e,n,r){var i=0===n.length;
2return C.forEach((function(o){!1===o({props:t,root:X,actions:n,timestamp:e,shouldOptimize:r})&&(i=!1)})),b.forEach((function(t){!1===t.write(e)&&(i=!1)})),_.filter((function(e){return!!e.element.parentNode})).forEach((function(t){t._write(e,w(t,n),r)||(i=!1)})),_.forEach((function(t,o){t.element.parentNode||(X.appendChild(t.element,o),t._read(),t._write(e,w(t,n),r),i=!1)})),y=i,A({props:t,root:X,actions:n,timestamp:e}),i},H=function(){b.forEach((function(e){return e.destroy()})),R.forEach((function(e){e({root:X,props:t})})),_.forEach((function(e){return e._destroy()}))},q={element:{get:M},style:{get:function(){return a}},childViews:{get:P}},V=Object.assign({},q,{rect:{get:z},ref:{get:B},is:function(e){return i===e},appendChild:f(r),createChildView:G(e),linkView:function(e){return _.push(e),e},unlinkView:function(e){_.splice(_.indexOf(e),1)},appendChildView:d(r,_),removeChildView:h(r,_),registerWriter:function(e){return C.push(e)},registerReader:function(e){return O.push(e)},registerDestroyer:function(e){return R.push(e)},invalidateLayout:function(){return r.layoutCalculated=!1},dispatch:e.dispatch,query:e.query}),j={element:{get:M},childViews:{get:P},rect:{get:z},resting:{get:function(){return y}},isRectIgnored:function(){return S},_read:U,_write:W,_destroy:H},Y=Object.assign({},q,{rect:{get:function(){return u}}});Object.keys(k).sort((function(e,t){return"styles"===e?1:"styles"===t?-1:0})).forEach((function(e){var n=F[e]({mixinConfig:k[e],viewProps:t,viewState:I,viewInternalAPI:V,viewExternalAPI:j,view:o(Y)});n&&b.push(n)}));var X=o(V);E({root:X,props:t});var $=m(r);return _.forEach((function(e,t){X.appendChild(e.element,$+t)})),T(X),o(j)}},B=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:60,r="__framePainter";if(window[r])return window[r].readers.push(e),void window[r].writers.push(t);window[r]={readers:[e],writers:[t]};var i=window[r],o=1e3/n,a=null,l=null,u=null,s=null,c=function(){document.hidden?(u=function(){return window.setTimeout((function(){return f(performance.now())}),o)},s=function(){return window.clearTimeout(l)}):(u=function(){return window.requestAnimationFrame(f)},s=function(){return window.cancelAnimationFrame(l)})};document.addEventListener("visibilitychange",(function(){s&&s(),c(),f(performance.now())}));var f=function e(t){l=u(e),a||(a=t);var n=t-a;n<=o||(a=t-n%o,i.readers.forEach((function(e){return e()})),i.writers.forEach((function(e){return e(t)})))};return c(),f(performance.now()),{pause:function(){s(l)}}}
2,G=function(e,t){return function(n){var r=n.root,i=n.props,o=n.actions,a=void 0===o?[]:o,l=n.timestamp,u=n.shouldOptimize;a.filter((function(t){return e[t.type]})).forEach((function(t){return e[t.type]({root:r,props:i,action:t.data,timestamp:l,shouldOptimize:u})})),t&&t({root:r,props:i,actions:a,timestamp:l,shouldOptimize:u})}},z=function(e,t){return t.parentNode.insertBefore(e,t)},U=function(e,t){return t.parentNode.insertBefore(e,t.nextSibling)},W=function(e){return Array.isArray(e)},H=function(e){return null==e},q=function(e){return e.trim()},V=function(e){return""+e},j=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:",";return H(e)?[]:W(e)?e:V(e).split(t).map(q).filter((function(e){return e.length}))},Y=function(e){return"boolean"==typeof e},X=function(e){return Y(e)?e:"true"===e},$=function(e){return"string"==typeof e},Z=function(e){return _(e)?e:$(e)?V(e).replace(/[a-z]+/gi,""):0},K=function(e){return parseInt(Z(e),10)},Q=function(e){return parseFloat(Z(e))},J=function(e){return _(e)&&isFinite(e)&&Math.floor(e)===e},ee=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;if(J(e))return e;var n=V(e).trim();return/MB$/i.test(n)?(n=n.replace(/MB$i/,"").trim(),K(n)*t*t):/KB/i.test(n)?(n=n.replace(/KB$i/,"").trim(),K(n)*t):K(n)},te=function(e){return"function"==typeof e},ne=function(e){for(var t=self,n=e.split("."),r=null;r=n.shift();)if(!(t=t[r]))return null;return t},re={process:"POST",patch:"PATCH",revert:"DELETE",fetch:"GET",restore:"GET",load:"GET"},ie=function(e){var t={};return t.url=$(e)?e:e.url||"",t.timeout=e.timeout?parseInt(e.timeout,10):0,t.headers=e.headers?e.headers:{},i(re,(function(n){t[n]=oe(n,e[n],re[n],t.timeout,t.headers)})),t.remove=e.remove||null,delete t.headers,t},oe=function(e,t,n,r,i){if(null===t)return null;if("function"==typeof t)return t;var o={url:"GET"===n||"PATCH"===n?"?"+e+"=":"",method:n,headers:i,withCredentials:!1,timeout:r,onload:null,ondata:null,onerror:null};if($(t))return o.url=t,o;if(Object.assign(o,t),$(o.headers)){var a=o.headers.split(/:(.+)/);o.headers={header:a[0],value:a[1]}}return o.withCredentials=X(o.withCredentials),o},ae=function(e){return null===e},le=function(e){return"object"==typeof e&&null!==e},ue=function(e){return le(e)&&$(e.url)&&le(e.process)&&le(e.revert)&&le(e.restore)&&le(e.fetch)},se=function(e){return W(e)?"array":ae(e)?"null":J(e)?"int":/^[0-9]+ ?(?:GB|MB|KB)$/gi.test(e)?"bytes":ue(e)?"api":typeof e},ce=function(e){return e.replace(/{\s*'/g,'{"').replace(/'\s*}/g,'"}').replace(/'\s*:/g,'":').replace(/:\s*'/g,':"').replace(/,\s*'/g,',"').replace(/'\s*,/g,'",')},fe={array:j,boolean:X,int:function(e){return"bytes"===se(e)?ee(e):K(e)},number:Q,float:Q,bytes:ee,string:function(e){return te(e)?e:V(e)},function:function(e){return ne(e)},serverapi:function(e){return ie(e)},object:function(e){try{return JSON.parse(ce(e))}catch(e){return null}}},de=function(e,t){return fe[t](e)},he=function(e,t,n){if(e===t)return e;var r=se(e);if(r!==n){var i=de(e,n);if(r=se(i),null===i)throw'Trying to assign value with incorrect type to "'+option+'", allowed type: "'+n+'"';e=i}return e},pe=function(e,t){var n=e;return{enumerable:!0,get:function(){return n},set:function(r){n=he(r,e,t)}}},ge=function(e){var t={};return i(e,(function(n){var r=e[n];t[n]=pe(r[0],r[1])})),o(t)},me=function(e){return{items:[],listUpdateTimeout:null,itemUpdateTimeout:null,processingQueue:[],options:ge(e)}},ve=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-";return e.split(/(?=[A-Z])/).map((function(e){return e.toLowerCase()})).join(t)},ye=function(e,t){var n={};return i(t,(function(t){n[t]={get:function(){return e.getState().options[t]},set:function(n){e.dispatch("SET_"+ve(t,"_").toUpperCase(),{value:n})}}})),n},Ee=function(e){return function(t,n,r){var o={};return i(e,(function(e){var n=ve(e,"_").toUpperCase();o["SET_"+n]=function(i){try{r.options[e]=i.value}catch(e){}t("DID_SET_"+n,{value:r.options[e]})}})),o}},_e=function(e){return function(t){var n={};return i(e,(function(e){n["GET_"+ve(e,"_").toUpperCase()]=function(n){return t.options[e]}})),n}},xe={API:1,DROP:2,BROWSE:3,PASTE:4,NONE:5},be=function(){return Math.random().toString(36).substr(2,9)};function we(e){this.wrapped=e}function De(e){var t,n;function r(e,r){return new Promise((function(o,a){var l={key:e,arg:r,resolve:o,reject:a,next:null};n?n=n.next=l:(t=n=l,i(e,r))}))}function i(t,n){try{var r=e[t](n),a=r.value,l=a instanceof we;Promise.resolve(l?a.wrapped:a).then((function(e){l?i("next",e):o(r.done?"return":"normal",e)}),(function(e){i("throw",e)}))}catch(e){o("throw",e)}}function o(e,r){switch(e){case"return":t.resolve({value:r,done:!0});break;case"throw":t.reject(r);break;default:t.resolve({value:r,done:!1})}(t=t.next)?i(t.key,t.arg):n=null}
2this._invoke=r,"function"!=typeof e.return&&(this.return=void 0)}function Te(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function Ie(e,t){if(null==e)return{};var n,r,i=Te(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Ae(e){return Ce(e)||Se(e)||Oe()}function Ce(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}function Se(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function Oe(){throw new TypeError("Invalid attempt to spread non-iterable instance")}"function"==typeof Symbol&&Symbol.asyncIterator&&(De.prototype[Symbol.asyncIterator]=function(){return this}),De.prototype.next=function(e){return this._invoke("next",e)},De.prototype.throw=function(e){return this._invoke("throw",e)},De.prototype.return=function(e){return this._invoke("return",e)};var Le=function(e,t){return e.splice(t,1)},Re=function(e,t){t?e():document.hidden?Promise.resolve(1).then(e):setTimeout(e,0)},ke=function(){var e=[],t=function(t,n){Le(e,e.findIndex((function(e){return e.event===t&&(e.cb===n||!n)})))},n=function(t,n,r){e.filter((function(e){return e.event===t})).map((function(e){return e.cb})).forEach((function(e){return Re((function(){return e.apply(void 0,Ae(n))}),r)}))};return{fireSync:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];n(e,r,!0)},fire:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];n(e,r,!1)},on:function(t,n){e.push({event:t,cb:n})},onOnce:function(n,r){e.push({event:n,cb:function(){t(n,r),r.apply(void 0,arguments)}})},off:t}},Me=function(e,t,n){Object.getOwnPropertyNames(e).filter((function(e){return!n.includes(e)})).forEach((function(n){return Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))},Fe=["fire","process","revert","load","on","off","onOnce","retryLoad","extend","archive","archived","release","released","requestProcessing","freeze"],Ne=function(e){var t={};return Me(e,t,Fe),t},Pe=function(e){e.forEach((function(t,n){t.released&&Le(e,n)}))},Be={INIT:1,IDLE:2,PROCESSING_QUEUED:9,PROCESSING:3,PROCESSING_COMPLETE:5,PROCESSING_ERROR:6,PROCESSING_REVERT_ERROR:10,LOADING:7,LOAD_ERROR:8},Ge={INPUT:1,LIMBO:2,LOCAL:3},ze=function(e){return/[^0-9]+/.exec(e)},Ue=function(){return ze(1.1.toLocaleString())[0]},We=function(){var e=Ue(),t=1e3.toLocaleString();return t!==1e3.toString()?ze(t)[0]:"."===e?",":"."},He={BOOLEAN:"boolean",INT:"int",NUMBER:"number",STRING:"string",ARRAY:"array",OBJECT:"object",FUNCTION:"function",ACTION:"action",SERVER_API:"serverapi",REGEX:"regex"},qe=[],Ve=function(e,t,n){return new Promise((function(r,i){var o=qe.filter((function(t){return t.key===e})).map((function(e){return e.cb}));if(0!==o.length){var a=o.shift();o.reduce((function(e,t){return e.then((function(e){return t(e,n)}))}),a(t,n)).then((function(e){return r(e)})).catch((function(e){return i(e)}))}else r(t)}))},je=function(e,t,n){return qe.filter((function(t){return t.key===e})).map((function(e){return e.cb(t,n)}))},Ye=function(e,t){return qe.push({key:e,cb:t})},Xe=function(e){return Object.assign(Ke,e)},$e=function(){return Object.assign({},Ke)},Ze=function(e){i(e,(function(e,t){Ke[e]&&(Ke[e][0]=he(t,Ke[e][0],Ke[e][1]))}))},Ke={id:[null,He.STRING],name:["filepond",He.STRING],disabled:[!1,He.BOOLEAN],className:[null,He.STRING],required:[!1,He.BOOLEAN],captureMethod:[null,He.STRING],allowSyncAcceptAttribute:[!0,He.BOOLEAN],allowDrop:[!0,He.BOOLEAN],allowBrowse:[!0,He.BOOLEAN],allowPaste:[!0,He.BOOLEAN],allowMultiple:[!1,He.BOOLEAN],allowReplace:[!0,He.BOOLEAN],allowRevert:[!0,He.BOOLEAN],allowRemove:[!0,He.BOOLEAN],allowProcess:[!0,He.BOOLEAN],allowReorder:[!1,He.BOOLEAN],allowDirectoriesOnly:[!1,He.BOOLEAN],forceRevert:[!1,He.BOOLEAN],maxFiles:[null,He.INT],checkValidity:[!1,He.BOOLEAN],itemInsertLocationFreedom:[!0,He.BOOLEAN],itemInsertLocation:["before",He.STRING],itemInsertInterval:[75,He.INT],dropOnPage:[!1,He.BOOLEAN],dropOnElement:[!0,He.BOOLEAN],dropValidation:[!1,He.BOOLEAN],ignoredFiles:[[".ds_store","thumbs.db","desktop.ini"],He.ARRAY],instantUpload:[!0,He.BOOLEAN],maxParallelUploads:[2,He.INT],chunkUploads:[!1,He.BOOLEAN],chunkForce:[!1,He.BOOLEAN],chunkSize:[5e6,He.INT],chunkRetryDelays:[[500,1e3,3e3],He.Array],server:[null,He.SERVER_API],fileSizeBase:[1e3,He.INT],labelDecimalSeparator:[Ue(),He.STRING],labelThousandsSeparator:[We(),He.STRING],labelIdle:['Drag & Drop your files or <span class="filepond--label-action">Browse</span>
2',He.STRING],labelInvalidField:["Field contains invalid files",He.STRING],labelFileWaitingForSize:["Waiting for size",He.STRING],labelFileSizeNotAvailable:["Size not available",He.STRING],labelFileCountSingular:["file in list",He.STRING],labelFileCountPlural:["files in list",He.STRING],labelFileLoading:["Loading",He.STRING],labelFileAdded:["Added",He.STRING],labelFileLoadError:["Error during load",He.STRING],labelFileRemoved:["Removed",He.STRING],labelFileRemoveError:["Error during remove",He.STRING],labelFileProcessing:["Uploading",He.STRING],labelFileProcessingComplete:["Upload complete",He.STRING],labelFileProcessingAborted:["Upload cancelled",He.STRING],labelFileProcessingError:["Error during upload",He.STRING],labelFileProcessingRevertError:["Error during revert",He.STRING],labelTapToCancel:["tap to cancel",He.STRING],labelTapToRetry:["tap to retry",He.STRING],labelTapToUndo:["tap to undo",He.STRING],labelButtonRemoveItem:["Remove",He.STRING],labelButtonAbortItemLoad:["Abort",He.STRING],labelButtonRetryItemLoad:["Retry",He.STRING],labelButtonAbortItemProcessing:["Cancel",He.STRING],labelButtonUndoItemProcessing:["
2Undo",He.STRING],labelButtonRetryItemProcessing:["Retry",He.STRING],labelButtonProcessItem:["Upload",He.STRING],iconRemove:['<svg width="26" height="26" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg"><path d="M11.586 13l-2.293 2.293a1 1 0 0 0 1.414 1.414L13 14.414l2.293 2.293a1 1 0 0 0 1.414-1.414L14.414 13l2.293-2.293a1 1 0 0 0-1.414-1.414L13 11.586l-2.293-2.293a1 1 0 0 0-1.414 1.414L11.586 13z" fill="currentColor" fill-rule="nonzero"/></svg>',He.STRING],iconProcess:['<svg width="26" height="26" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg"><path d="M14 10.414v3.585a1 1 0 0 1-2 0v-3.585l-1.293 1.293a1 1 0 0 1-1.414-1.415l3-3a1 1 0 0 1 1.414 0l3 3a1 1 0 0 1-1.414 1.415L14 10.414zM9 18a1 1 0 0 1 0-2h8a1 1 0 0 1 0 2H9z" fill="currentColor" fill-rule="evenodd"/></svg>',He.STRING],iconRetry:['<svg width="26" height="26" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg"><path d="M10.81 9.185l-.038.02A4.997 4.997 0 0 0 8 13.683a5 5 0 0 0 5 5 5 5 0 0 0 5-5 1 1 0 0 1 2 0A7 7 0 1 1 9.722 7.496l-.842-.21a.999.999 0 1 1 .484-1.94l3.23.806c.535.133.86.675.73 1.21l-.804 3.233a.997.997 0 0 1-1.21.73.997.997 0 0 1-.73-1.21l.23-.928v-.002z" fill="currentColor" fill-rule="nonzero"/></svg>',He.STRING],iconUndo:['<svg width="26" height="26" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg"><path d="M9.185 10.81l.02-.038A4.997 4.997 0 0 1 13.683 8a5 5 0 0 1 5 5 5 5 0 0 1-5 5 1 1 0 0 0 0 2A7 7 0 1 0 7.496 9.722l-.21-.842a.999.999 0 1 0-1.94.484l.806 3.23c.133.535.675.86 1.21.73l3.233-.803a.997.997 0 0 0 .73-1.21.997.997 0 0 0-1.21-.73l-.928.23-.002-.001z" fill="currentColor" fill-rule="nonzero"/></svg>',He.STRING],iconDone:['<svg width="26" height="26" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg"><path d="M18.293 9.293a1 1 0 0 1 1.414 1.414l-7.002 7a1 1 0 0 1-1.414 0l-3.998-4a1 1 0 1 1 1.414-1.414L12 15.586l6.294-6.293z" fill="currentColor" fill-rule="nonzero"/></svg>',He.STRING],oninit:[null,He.FUNCTION],onwarning:[null,He.FUNCTION],onerror:[null,He.FUNCTION],onactivatefile:[null,He.FUNCTION],oninitfile:[null,He.FUNCTION],onaddfilestart:[null,He.FUNCTION],onaddfileprogress:[null,He.FUNCTION],onaddfile:[null,He.FUNCTION],onprocessfilestart:[null,He.FUNCTION],onprocessfileprogress:[null,He.FUNCTION],onprocessfileabort:[null,He.FUNCTION],onprocessfilerevert:[null,He.FUNCTION],onprocessfile:[null,He.FUNCTION],onprocessfiles:[null,He.FUNCTION],onremovefile:[null,He.FUNCTION],onpreparefile:[null,He.FUNCTION],onupdatefiles:[null,He.FUNCTION],onreorderfiles:[null,He.FUNCTION],beforeDropFile:[null,He.FUNCTION],beforeAddFile:[null,He.FUNCTION],beforeRemoveFile:[null,He.FUNCTION],stylePanelLayout:[null,He.STRING],stylePanelAspectRatio:[null,He.STRING],styleItemPanelAspectRatio:[null,He.STRING],styleButtonRemoveItemPosition:["left",He.STRING],styleButtonProcessItemPosition:["right",He.STRING],styleLoadIndicatorPosition:["right",He.STRING],styleProgressIndicatorPosition:["right",He.STRING],styleButtonRemoveItemAlign:[!1,He.BOOLEAN],files:[[],He.ARRAY]},Qe=function(e,t){return H(t)?e[0]||null:J(t)?e[t]||null:("object"==typeof t&&(t=t.id),e.find((function(e){return e.id===t}))||null)},Je=function(e){if(H(e))return e;if(/:/.test(e)){var t=e.split(":");return t[1]/t[0]}return parseFloat(e)},et=function(e){return e.filter((function(e){return!e.archived}))},tt={EMPTY:0,IDLE:1,ERROR:2,BUSY:3,READY:4},nt=[Be.LOAD_ERROR,Be.PROCESSING_ERROR,Be.PROCESSING_REVERT_ERROR],rt=[Be.LOADING,Be.PROCESSING,Be.PROCESSING_QUEUED,Be.INIT],it=[Be.PROCESSING_COMPLETE],ot=function(e){return nt.includes(e.status)},at=function(e){return rt.includes(e.status)},lt=function(e){return it.includes(e.status)},ut=function(e){return{GET_STATUS:function(){var t=et(e.items),n=tt.EMPTY,r=tt.ERROR,i=tt.BUSY,o=tt.IDLE,a=tt.READY;return 0===t.length?n:t.some(ot)?r:t.some(at)?i:t.some(lt)?a:o},GET_ITEM:function(t){return Qe(e.items,t)},GET_ACTIVE_ITEM:function(t){return Qe(et(e.items),t)},GET_ACTIVE_ITEMS:function(){return et(e.items)},GET_ITEMS:function(){return e.items},GET_ITEM_NAME:function(t){var n=Qe(e.items,t);return n?n.filename:null},GET_ITEM_SIZE:function(t){var n=Qe(e.items,t);return n?n.fileSize:null},GET_STYLES:function(){return Object.keys(e.options).filter((function(e){return/^style/.test(e)})).map((function(t){return{name:t,value:e.options[t]}}))},GET_PANEL_ASPECT_RATIO:function(){return/circle/.test(e.options.stylePanelLayout)?1:Je(e.options.stylePanelAspectRatio)},GET_ITEM_PANEL_ASPECT_RATIO:function(){return e.options.styleItemPanelAspectRatio},GET_ITEMS_BY_STATUS:function(t){return et(e.items).filter((function(e){return e.status===t}))},GET_TOTAL_ITEMS:function(){return et(e.items).length},IS_ASYNC:function(){return le(e.options.server)&&(le(e.options.server.process)||te(e.options.server.process))}}},st=function(e){var t=et(e.items).length;if(!e.options.allowMultiple)return 0===t;var n=e.options.maxFiles;return null===n||t<n},ct=function(e,t,n){return Math.max(Math.min(n,e),t)},ft=function(e,t,n){return e.splice(t,0,n)},dt=function(e,t,n){return H(t)?null:void 0===n?(e.push(t),t):(n=ct(n,
20,e.length),ft(e,n,t),t)},ht=function(e){return/^\s*data:([a-z]+\/[a-z0-9-+.]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s]*)\s*$/i.test(e)},pt=function(e){return e.split("/").pop().split("?").shift()},gt=function(e){return e.split(".").pop()},mt=function(e){if("string"!=typeof e)return"";var t=e.split("/").pop();return/svg/.test(t)?"svg":/zip|compressed/.test(t)?"zip":/plain/.test(t)?"txt":/msword/.test(t)?"doc":/[a-z]+/.test(t)?"jpeg"===t?"jpg":t:""},vt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(t+e).slice(-t.length)},yt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date;return e.getFullYear()+"-"+vt(e.getMonth()+1,"00")+"-"+vt(e.getDate(),"00")+"_"+vt(e.getHours(),"00")+"-"+vt(e.getMinutes(),"00")+"-"+vt(e.getSeconds(),"00")},Et=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i="string"==typeof n?e.slice(0,e.size,n):e.slice(0,e.size,e.type);return i.lastModifiedDate=new Date,e._relativePath&&(i._relativePath=e._relativePath),$(t)||(t=yt()),t&&null===r&&gt(t)?i.name=t:(r=r||mt(i.type),i.name=t+(r?"."+r:"")),i},_t=function(){return window.BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder},xt=function(e,t){var n=_t();if(n){var r=new n;return r.append(e),r.getBlob(t)}return new Blob([e],{type:t})}
2,bt=function(e,t){for(var n=new ArrayBuffer(e.length),r=new Uint8Array(n),i=0;i<e.length;i++)r[i]=e.charCodeAt(i);return xt(n,t)},wt=function(e){return(/^data:(.+);/.exec(e)||[])[1]||null},Dt=function(e){return e.split(",")[1].replace(/\s/g,"")},Tt=function(e){return atob(Dt(e))},It=function(e){var t=wt(e),n=Tt(e);return bt(n,t)},At=function(e,t,n){return Et(It(e),t,null,n)},Ct=function(e){if(!/^content-disposition:/i.test(e))return null;var t=e.split(/filename=|filename\*=.+''/).splice(1).map((function(e){return e.trim().replace(/^["']|[;"']{0,2}$/g,"")})).filter((function(e){return e.length}));return t.length?decodeURI(t[t.length-1]):null},St=function(e){if(/content-length:/i.test(e)){var t=e.match(/[0-9]+/)[0];return t?parseInt(t,10):null}return null},Ot=function(e){return/x-content-transfer-id:/i.test(e)&&(e.split(":")[1]||"").trim()||null},Lt=function(e){var t={source:null,name:null,size:null},n=e.split("\n"),r=!0,i=!1,o=void 0;try{for(var a,l=n[Symbol.iterator]();!(r=(a=l.next()).done);r=!0){var u=a.value,s=Ct(u);if(s)t.name=s;else{var c=St(u);if(c)t.size=c;else{var f=Ot(u);f&&(t.source=f)}}}}catch(e){i=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(i)throw o}}return t},Rt=function(e){var t={source:null,complete:!1,progress:0,size:null,timestamp:null,duration:0,request:null},n=function(){return t.progress},r=function(){t.request&&t.request.abort&&t.request.abort()},i=function(){var e=t.source;a.fire("init",e),e instanceof File?a.fire("load",e):e instanceof Blob?a.fire("load",Et(e,e.name)):ht(e)?a.fire("load",At(e)):o(e)},o=function(n){e?(t.timestamp=Date.now(),t.request=e(n,(function(e){t.duration=Date.now()-t.timestamp,t.complete=!0,e instanceof Blob&&(e=Et(e,e.name||pt(n))),a.fire("load",e instanceof Blob?e:e?e.body:null)}),(function(e){a.fire("error","string"==typeof e?{type:"error",code:0,body:e}:e)}),(function(e,n,r){r&&(t.size=r),t.duration=Date.now()-t.timestamp,e?(t.progress=n/r,a.fire("progress",t.progress)):t.progress=null}),(function(){a.fire("abort")}),(function(e){var n=Lt("string"==typeof e?e:e.headers);a.fire("meta",{size:t.size||n.size,filename:n.name,source:n.source})}))):a.fire("error",{type:"error",body:"Can't load URL",code:400})},a=Object.assign({},ke(),{setSource:function(e){return t.source=e},getProgress:n,abort:r,load:i});return a},kt=function(e){return/GET|HEAD/.test(e)},Mt=function(e,t,n){var r={onheaders:function(){},onprogress:function(){},onload:function(){},ontimeout:function(){},onerror:function(){},onabort:function(){},abort:function(){i=!0,a.abort()}},i=!1,o=!1;n=Object.assign({method:"POST",headers:{},withCredentials:!1},n),t=encodeURI(t),kt(n.method)&&e&&(t=""+t+encodeURIComponent("string"==typeof e?e:JSON.stringify(e)));var a=new XMLHttpRequest;return(kt(n.method)?a:a.upload).onprogress=function(e){i||r.onprogress(e.lengthComputable,e.loaded,e.total)},a.onreadystatechange=function(){a.readyState<2||4===a.readyState&&0===a.status||o||(o=!0,r.onheaders(a))},a.onload=function(){a.status>=200&&a.status<300?r.onload(a):r.onerror(a)},a.onerror=function(){return r.onerror(a)},a.onabort=function(){i=!0,r.onabort()},a.ontimeout=function(){return r.ontimeout(a)},a.open(n.method,t,!0),J(n.timeout)&&(a.timeout=n.timeout),Object.keys(n.headers).forEach((function(e){var t=unescape(encodeURIComponent(n.headers[e]));a.setRequestHeader(e,t)})),n.responseType&&(a.responseType=n.responseType),n.withCredentials&&(a.withCredentials=!0),a.send(e),r},Ft=function(e,t,n,r){return{type:e,code:t,body:n,headers:r}},Nt=function(e){return function(t){e(Ft("error",0,"Timeout",t.getAllResponseHeaders()))}},Pt=function(e){return/\?/.test(e)},Bt=function(){for(var e="",t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){e+=Pt(e)&&Pt(t)?t.replace(/\?/,"&"):t})),e},Gt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;if("function"==typeof t)return t;if(!t||!$(t.url))return null;var n=t.onload||function(e){return e},r=t.onerror||function(e){return null};return function(i,o,a,l,u,s){var c=Mt(i,Bt(e,t.url),Object.assign({},t,{responseType:"blob"}));return c.onload=function(e){var r=e.getAllResponseHeaders(),a=Lt(r).name||pt(i);o(Ft("load",e.status,"HEAD"===t.method?null:Et(n(e.response),a),r))},c.onerror=function(e){a(Ft("error",e.status,r(e.response)||e.statusText,e.getAllResponseHeaders()))}
2,c.onheaders=function(e){s(Ft("headers",e.status,null,e.getAllResponseHeaders()))},c.ontimeout=Nt(a),c.onprogress=l,c.onabort=u,c}},zt={QUEUED:0,COMPLETE:1,PROCESSING:2,ERROR:3,WAITING:4},Ut=function(e,t,n,r,i,o,a,l,u,s,c){for(var f=[],d=c.chunkTransferId,h=c.chunkServer,p=c.chunkSize,g=c.chunkRetryDelays,m={serverId:d,aborted:!1},v=t.ondata||function(e){return e},y=t.onload||function(e,t){return"HEAD"===t?e.getResponseHeader("Upload-Offset"):e.response},E=t.onerror||function(e){return null},_=function(o){var l=new FormData;le(i)&&l.append(n,JSON.stringify(i));var u="function"==typeof t.headers?t.headers(r,i):Object.assign({},t.headers,{"Upload-Length":r.size}),s=Object.assign({},t,{headers:u}),c=Mt(v(l),Bt(e,t.url),s);c.onload=function(e){return o(y(e,s.method))},c.onerror=function(e){return a(Ft("error",e.status,E(e.response)||e.statusText,e.getAllResponseHeaders()))},c.ontimeout=Nt(a)},x=function(n){var r=Bt(e,h.url,m.serverId),i={headers:"function"==typeof t.headers?t.headers(m.serverId):Object.assign({},t.headers),method:"HEAD"},o=Mt(null,r,i);o.onload=function(e){return n(y(e,i.method))},o.onerror=function(e){return a(Ft("error",e.status,E(e.response)||e.statusText,e.getAllResponseHeaders()))},o.ontimeout=Nt(a)},b=Math.floor(r.size/p),w=0;w<=b;w++){var D=w*p,T=r.slice(D,D+p,"application/offset+octet-stream");f[w]={index:w,size:T.size,offset:D,data:T,file:r,progress:0,retries:Ae(g),status:zt.QUEUED,error:null,request:null,timeout:null}}var I=function(){return o(m.serverId)},A=function(e){return e.status===zt.QUEUED||e.status===zt.ERROR},C=function(t){if(!m.aborted)if(t=t||f.find(A)){t.status=zt.PROCESSING,t.progress=null;var n=h.ondata||function(e){return e},i=h.onerror||function(e){return null},o=Bt(e,h.url,m.serverId),l="function"==typeof h.headers?h.headers(t):Object.assign({},h.headers,{"Content-Type":"application/offset+octet-stream","Upload-Offset":t.offset,"Upload-Length":r.size,"Upload-Name":r.name}),s=t.request=Mt(n(t.data),o,Object.assign({},h,{headers:l}));s.onload=function(){t.status=zt.COMPLETE,t.request=null,L()},s.onprogress=function(e,n,r){t.progress=e?n:null,O()},s.onerror=function(e){t.status=zt.ERROR,t.request=null,t.error=i(e.response)||e.statusText,S(t)||a(Ft("error",e.status,i(e.response)||e.statusText,e.getAllResponseHeaders()))},s.ontimeout=function(e){t.status=zt.ERROR,t.request=null,S(t)||Nt(a)(e)},s.onabort=function(){t.status=zt.QUEUED,t.request=null,u()}}else f.every((function(e){return e.status===zt.COMPLETE}))&&I()},S=function(e){return 0!==e.retries.length&&(e.status=zt.WAITING,clearTimeout(e.timeout),e.timeout=setTimeout((function(){C(e)}),e.retries.shift()),!0)},O=function(){var e=f.reduce((function(e,t){return null===e||null===t.progress?null:e+t.progress}),0);if(null===e)return l(!1,0,0);var t=f.reduce((function(e,t){return e+t.size}),0);l(!0,e,t)},L=function(){f.filter((function(e){return e.status===zt.PROCESSING})).length>=1||C()},R=function(){f.forEach((function(e){clearTimeout(e.timeout),e.request&&e.request.abort()}))};return m.serverId?x((function(e){m.aborted||(f.filter((function(t){return t.offset<e})).forEach((function(e){e.status=zt.COMPLETE,e.progress=e.size})),L())})):_((function(e){m.aborted||(s(e),m.serverId=e,L())})),{abort:function(){m.aborted=!0,R()}}},Wt=function(e,t,n,r){return function(i,o,a,l,u,s,c){if(i){var f=r.chunkUploads,d=f&&i.size>r.chunkSize,h=f&&(d||r.chunkForce);if(i instanceof Blob&&h)return Ut(e,t,n,i,o,a,l,u,s,c,r);var p=t.ondata||function(e){return e},g=t.onload||function(e){return e},m=t.onerror||function(e){return null},v=new FormData;le(o)&&v.append(n,JSON.stringify(o)),(i instanceof Blob?[{name:null,file:i}]:i).forEach((function(e){v.append(n,e.file,null===e.name?e.file.name:""+e.name+e.file.name)}));var y=Mt(p(v),Bt(e,t.url),t);return y.onload=function(e){a(Ft("load",e.status,g(e.response),e.getAllResponseHeaders()))},y.onerror=function(e){l(Ft("error",e.status,m(e.response)||e.statusText,e.getAllResponseHeaders()))},y.ontimeout=Nt(l),y.onprogress=u,y.onabort=s,y}}},Ht=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;return"function"==typeof t?function(){for(var e=arguments.length,i=new Array(e),o=0;o<e;o++)i[o]=arguments[o];return t.apply(void 0,[n].concat(i,[r]))}:t&&$(t.url)?Wt(e,t,n,r):null},qt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;if("function"==typeof t)return t;if(!t||!$(t.url))return function(e,t){return t()};var n=t.onload||function(e){return e},r=t.onerror||function(e){return null};return function(i,o,a){var l=Mt(i,e+t.url,t);return l.onload=function(e){o(Ft("load",e.status,n(e.response),e.getAllResponseHeaders()))},l.onerror=function(e){a(Ft("error",e.status,r(e.response)||e.statusText,e.getAllResponseHeaders()))},l.ontimeout=Nt(a),l}},Vt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e+Math.random()*(t-e)},jt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:25,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:250,i=null,o=Date.now();return function a(){var l=Date.now()-o,u=Vt(n,r);l+u>t&&(u=l+u-t);var s=l/t;s>=1||document.hidden?e(1):(e(s),i=setTimeout(a,u))}(),{clear:function(){clearTimeout(i)}}},Yt=function(e){var t={complete:!1,perceivedProgress:0,perceivedPerformanceUpdater:null,progress:null,timestamp:null,perceivedDuration:0,duration:0,request:null,response:null},n=function(n,r){var i=function(){0!==t.duration&&null!==t.progress&&l.fire("progress",l.getProgress())},o=function(){t.complete=!0,l.fire("load-perceived",t.response.body)};l.fire("start"),t.timestamp=Date.now(),t.perceivedPerformanceUpdater=jt((function(e){t.perceivedProgress=e,t.perceivedDuration=Date.now()-t.timestamp,i(),t.response&&1===t.perceivedProgress&&!t.complete&&o()}),Vt(750,1500)),t.request=e(n,r,(function(e){t.response=le(e)?e:{type:"load",code:200,body:""+e,headers:{}},t.duration=Date.now()-t.timestamp,t.progress=1,l.fire("load",t.response.body),1===t.perceivedProgress&&o()}),(function(e){t.perceivedPerformanceUpdater.clear(),l.fire("error",le(e)?e:{type:"error",code:0,body:""+e})}),(function(e,n,r){t.duration=Date.now()-t.timestamp,t.progress=e?n/r:null,i()}),(function(){t.perceivedPerformanceUpdater.clear(),l.fire("abort",t.response?t.response.body:null)}),(function(e){l.fire("transfer",e)}))},r=function(){t.request&&(t.perceivedPerformanceUpdater.clear(),t.request.abort&&t.request.abort(),t.complete=!0)},i=function(){r(),t.complete=!1,t.perceivedProgress=0,t.progress=0,t.timestamp=null,t.perceivedDuration=0,t.duration=0,t.request=null,t.response=null},o=function(){return t.progress?Math.min(t.progress,t.perceivedProgress):null},a=function(){return Math.min(t.duration,t.perceivedDuration)},l=Object.assign({},ke(),{process:n,abort:r,getProgress:o,getDuration:a,reset:i});return l},Xt=function(e){return e.substr(0,e.lastIndexOf("."))||e},$t=function(e){var t=[e.name,e.size,e.type];return e instanceof Blob||ht(e)?t[0]=e.name||yt():ht(e)?(t[1]=e.length,t[2]=wt(e)):$(e)&&(t[0]=pt(e),t[1]=0,t[2]="application/octet-stream"),{name:t[0],size:t[1],type:t[2]}},Zt=function(e){return!!(e instanceof File||e instanceof Blob&&e.name)},Kt=function e(t){if(!le(t))return t;var n=W(t)?[]:{};for(var r in t)if(t.hasOwnProperty(r)){var i=t[r];n[r]=i&&le(i)?e(i):i}return n},Qt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=be(),i={archived:!1,frozen:!1,released:!1,source:null,file:n,serverFileReference:t,transferId:null,processingAborted:!1,status:t?Be.PROCESSING_COMPLETE:Be.INIT,activeLoader:null,activeProcessor:null},a=null,l={},u=function(e){return i.status=e},s=function(e){if(!i.released&&!i.frozen){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];
2w.fire.apply(w,[e].concat(n))}},c=function(){return gt(i.file.name)},f=function(){return i.file.type},d=function(){return i.file.size},h=function(){return i.file},p=function(t,n,r){i.source=t,w.fireSync("init"),i.file?w.fireSync("load-skip"):(i.file=$t(t),n.on("init",(function(){s("load-init")})),n.on("meta",(function(t){i.file.size=t.size,i.file.filename=t.filename,t.source&&(e=Ge.LIMBO,i.serverFileReference=t.source,i.status=Be.PROCESSING_COMPLETE),s("load-meta")})),n.on("progress",(function(e){u(Be.LOADING),s("load-progress",e)})),n.on("error",(function(e){u(Be.LOAD_ERROR),s("load-request-error",e)})),n.on("abort",(function(){u(Be.INIT),s("load-abort")})),n.on("load",(function(t){i.activeLoader=null;var n=function(t){i.file=Zt(t)?t:i.file,e===Ge.LIMBO&&i.serverFileReference?u(Be.PROCESSING_COMPLETE):u(Be.IDLE),s("load")},o=function(e){i.file=t,s("load-meta"),u(Be.LOAD_ERROR),s("load-file-error",e)};i.serverFileReference?n(t):r(t,n,o)})),n.setSource(t),i.activeLoader=n,n.load())},g=function(){i.activeLoader&&i.activeLoader.load()},m=function(){i.activeLoader?i.activeLoader.abort():(u(Be.INIT),s("load-abort"))},v=function e(t,n){if(i.processingAborted)i.processingAborted=!1;else if(u(Be.PROCESSING),a=null,i.file instanceof Blob){t.on("load",(function(e){i.transferId=null,i.serverFileReference=e})),t.on("transfer",(function(e){i.transferId=e})),t.on("load-perceived",(function(e){i.activeProcessor=null,i.transferId=null,i.serverFileReference=e,u(Be.PROCESSING_COMPLETE),s("process-complete",e)})),t.on("start",(function(){s("process-start")})),t.on("error",(function(e){i.activeProcessor=null,u(Be.PROCESSING_ERROR),s("process-error",e)})),t.on("abort",(function(e){i.activeProcessor=null,i.transferId=null,i.serverFileReference=e,u(Be.IDLE),s("process-abort"),a&&a()})),t.on("progress",(function(e){s("process-progress",e)}));var r=function(e){i.archived||t.process(e,Object.assign({},l))},o=console.error;n(i.file,r,o),i.activeProcessor=t}else w.on("load",(function(){e(t,n)}))},y=function(){i.processingAborted=!1,u(Be.PROCESSING_QUEUED)},E=function(){return new Promise((function(e){if(!i.activeProcessor)return i.processingAborted=!0,u(Be.IDLE),s("process-abort"),void e();a=function(){e()},i.activeProcessor.abort()}))},_=function(e,t){return new Promise((function(n,r){null!==i.serverFileReference?(e(i.serverFileReference,(function(){i.serverFileReference=null,n()}),(function(e){t?(u(Be.PROCESSING_REVERT_ERROR),s("process-revert-error"),r(e)):n()})),u(Be.IDLE),s("process-revert")):n()}))},x=function(e,t,n){var r=e.split("."),i=r[0],o=r.pop(),a=l;r.forEach((function(e){return a=a[e]})),JSON.stringify(a[o])!==JSON.stringify(t)&&(a[o]=t,n||s("metadata-update",{key:i,value:l[i]}))},b=function(e){return Kt(e?l[e]:l)},w=Object.assign({id:{get:function(){return r}},origin:{get:function(){return e}},serverId:{get:function(){return i.serverFileReference}},transferId:{get:function(){return i.transferId}},status:{get:function(){return i.status}},filename:{get:function(){return i.file.name}},filenameWithoutExtension:{get:function(){return Xt(i.file.name)}},fileExtension:{get:c},fileType:{get:f},fileSize:{get:d},file:{get:h},relativePath:{get:function(){return i.file._relativePath}},source:{get:function(){return i.source}},getMetadata:b,setMetadata:function(e,t,n){if(le(e)){var r=e;return Object.keys(r).forEach((function(e){x(e,r[e],t)})),e}return x(e,t,n),t},extend:function(e,t){return D[e]=t},abortLoad:m,retryLoad:g,requestProcessing:y,abortProcessing:E,load:p,process:v,revert:_},ke(),{freeze:function(){return i.frozen=!0},release:function(){return i.released=!0},released:{get:function(){return i.released}},archive:function(){return i.archived=!0},archived:{get:function(){return i.archived}}}),D=o(w);return D},Jt=function(e,t){return H(t)?0:$(t)?e.findIndex((function(e){return e.id===t})):-1},en=function(e,t){var n=Jt(e,t);if(!(n<0))return e[n]||null},tn=function(e,t,n,r,i,o){var a=Mt(null,e,{method:"GET",responseType:"blob"});return a.onload=function(n){var r=n.getAllResponseHeaders(),i=Lt(r).name||pt(e);t(Ft("load",n.status,Et(n.response,i),r))},a.onerror=function(e){n(Ft("error",e.status,e.statusText,e.getAllResponseHeaders()))}
2,a.onheaders=function(e){o(Ft("headers",e.status,null,e.getAllResponseHeaders()))},a.ontimeout=Nt(n),a.onprogress=r,a.onabort=i,a},nn=function(e){return 0===e.indexOf("//")&&(e=location.protocol+e),e.toLowerCase().replace("blob:","").replace(/([a-z])?:\/\//,"$1").split("/")[0]},rn=function(e){return(e.indexOf(":")>-1||e.indexOf("//")>-1)&&nn(location.href)!==nn(e)},on=function(e){return function(){return te(e)?e.apply(void 0,arguments):e}},an=function(e){return!Zt(e.file)},ln=function(e,t){clearTimeout(t.listUpdateTimeout),t.listUpdateTimeout=setTimeout((function(){e("DID_UPDATE_ITEMS",{items:et(t.items)})}),0)},un=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new Promise((function(t){if(!e)return t(!0);var r=e.apply(void 0,n);return null==r?t(!0):"boolean"==typeof r?t(r):void("function"==typeof r.then&&r.then(t))}))},sn=function(e,t){e.items.sort((function(e,n){return t(Ne(e),Ne(n))}))},cn=function(e,t){return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.query,i=n.success,o=void 0===i?function(){}:i,a=n.failure,l=void 0===a?function(){}:a,u=Ie(n,["query","success","failure"]),s=Qe(e.items,r);s?t(s,o,l,u||{}):l({error:Ft("error",0,"Item not found"),file:null})}},fn=function(e,t,n){return{ABORT_ALL:function(){et(n.items).forEach((function(e){e.freeze(),e.abortLoad(),e.abortProcessing()}))},DID_SET_FILES:function(t){var r=t.value,i=(void 0===r?[]:r).map((function(e){return{source:e.source?e.source:e,options:e.options}})),o=et(n.items);o.forEach((function(t){i.find((function(e){return e.source===t.source||e.source===t.file}))||e("REMOVE_ITEM",{query:t,remove:!1})}
2)),o=et(n.items),i.forEach((function(t,n){o.find((function(e){return e.source===t.source||e.file===t.source}))||e("ADD_ITEM",Object.assign({},t,{interactionMethod:xe.NONE,index:n}))}))},DID_UPDATE_ITEM_METADATA:function(r){var i=r.id;clearTimeout(n.itemUpdateTimeout),n.itemUpdateTimeout=setTimeout((function(){var r=en(n.items,i);if(t("IS_ASYNC")){var o=function(){setTimeout((function(){e("REQUEST_ITEM_PROCESSING",{query:i})}),32)},a=function(e){r.revert(qt(n.options.server.url,n.options.server.revert),t("GET_FORCE_REVERT")).then(e?o:function(){}).catch((function(){}))},l=function(e){r.abortProcessing().then(e?o:function(){})};return r.status===Be.PROCESSING_COMPLETE?a(n.options.instantUpload):r.status===Be.PROCESSING?l(n.options.instantUpload):void(n.options.instantUpload&&o())}Ve("SHOULD_PREPARE_OUTPUT",!1,{item:r,query:t}).then((function(t){t&&e("REQUEST_PREPARE_OUTPUT",{query:i,item:r,success:function(t){e("DID_PREPARE_OUTPUT",{id:i,file:t})}},!0)}))}),0)},MOVE_ITEM:function(e){var t=e.query,r=e.index,i=Qe(n.items,t);if(i){var o=n.items.indexOf(i);o!==(r=ct(r,0,n.items.length-1))&&n.items.splice(r,0,n.items.splice(o,1)[0])}},SORT:function(r){var i=r.compare;sn(n,i),e("DID_SORT_ITEMS",{items:t("GET_ACTIVE_ITEMS")})},ADD_ITEMS:function(n){var r=n.items,i=n.index,o=n.interactionMethod,a=n.success,l=void 0===a?function(){}:a,u=n.failure,s=void 0===u?function(){}:u,c=i;if(-1===i||void 0===i){var f=t("GET_ITEM_INSERT_LOCATION"),d=t("GET_TOTAL_ITEMS");c="before"===f?0:d}var h=t("GET_IGNORED_FILES"),p=function(e){return Zt(e)?!h.includes(e.name.toLowerCase()):!H(e)},g=r.filter(p).map((function(t){return new Promise((function(n,r){e("ADD_ITEM",{interactionMethod:o,source:t.source||t,success:n,failure:r,index:c++,options:t.options||{}})}))}));Promise.all(g).then(l).catch(s)},ADD_ITEM:function(r){var i=r.source,o=r.index,a=void 0===o?-1:o,l=r.interactionMethod,u=r.success,s=void 0===u?function(){}:u,c=r.failure,f=void 0===c?function(){}:c,d=r.options,h=void 0===d?{}:d;if(H(i))f({error:Ft("error",0,"No source"),file:null});else if(!Zt(i)||!n.options.ignoredFiles.includes(i.name.toLowerCase())){if(!st(n)){if(n.options.allowMultiple||!n.options.allowMultiple&&!n.options.allowReplace){var p=Ft("warning",0,"Max files");return e("DID_THROW_MAX_FILES",{source:i,error:p}),void f({error:p,file:null})}var g=et(n.items)[0];if(g.status===Be.PROCESSING_COMPLETE||g.status===Be.PROCESSING_REVERT_ERROR){var m=t("GET_FORCE_REVERT");if(g.revert(qt(n.options.server.url,n.options.server.revert),m).then((function(){m&&e("ADD_ITEM",{source:i,index:a,interactionMethod:l,success:s,failure:f,options:h})})).catch((function(){})),m)return}e("REMOVE_ITEM",{query:g.id})}var v="local"===h.type?Ge.LOCAL:"limbo"===h.type?Ge.LIMBO:Ge.INPUT,y=Qt(v,v===Ge.INPUT?null:i,h.file);Object.keys(h.metadata||{}).forEach((function(e){y.setMetadata(e,h.metadata[e])})),je("DID_CREATE_ITEM",y,{query:t,dispatch:e});var E=t("GET_ITEM_INSERT_LOCATION");n.options.itemInsertLocationFreedom||(a="before"===E?-1:n.items.length),dt(n.items,y,a),te(E)&&i&&sn(n,E);var _=y.id;y.on("init",(function(){e("DID_INIT_ITEM",{id:_})})),y.on("load-init",(function(){e("DID_START_ITEM_LOAD",{id:_})})),y.on("load-meta",(function(){e("DID_UPDATE_ITEM_META",{id:_})})),y.on("load-progress",(function(t){e("DID_UPDATE_ITEM_LOAD_PROGRESS",{id:_,progress:t})})),y.on("load-request-error",(function(t){var r=on(n.options.labelFileLoadError)(t);if(t.code>=400&&t.code<500)return e("DID_THROW_ITEM_INVALID",{id:_,error:t,status:{main:r,sub:t.code+" ("+t.body+")"}}),void f({error:t,file:Ne(y)});e("DID_THROW_ITEM_LOAD_ERROR",{id:_,error:t,status:{main:r,sub:n.options.labelTapToRetry}})})),y.on("load-file-error",(function(t){e("DID_THROW_ITEM_INVALID",{id:_,error:t.status,status:t.status}),f({error:t.status,file:Ne(y)})})),y.on("load-abort",(function(){e("REMOVE_ITEM",{query:_})})),y.on("load-skip",(function(){e("COMPLETE_LOAD_ITEM",{query:_,item:y,data:{source:i,success:s}})})),y.on("load",(function(){var r=function(r){r?(y.on("metadata-update",(function(t){e("DID_UPDATE_ITEM_METADATA",{id:_,change:t})})),Ve("SHOULD_PREPARE_OUTPUT",!1,{item:y,query:t}).then((function(t){var r=function(){e("COMPLETE_LOAD_ITEM",{query:_,item:y,data:{source:i,success:s}}),ln(e,n)};t?e("REQUEST_PREPARE_OUTPUT",{query:_,item:y,success:function(t){e("DID_PREPARE_OUTPUT",{id:_,file:t}),r()}},!0):r()}))):e("REMOVE_ITEM",{query:_})};Ve("DID_LOAD_ITEM",y,{query:t,dispatch:e}).then((function(){un(t("GET_BEFORE_ADD_FILE"),Ne(y)).then(r)}
2)).catch((function(){r(!1)}))})),y.on("process-start",(function(){e("DID_START_ITEM_PROCESSING",{id:_})})),y.on("process-progress",(function(t){e("DID_UPDATE_ITEM_PROCESS_PROGRESS",{id:_,progress:t})})),y.on("process-error",(function(t){e("DID_THROW_ITEM_PROCESSING_ERROR",{id:_,error:t,status:{main:on(n.options.labelFileProcessingError)(t),sub:n.options.labelTapToRetry}})})),y.on("process-revert-error",(function(t){e("DID_THROW_ITEM_PROCESSING_REVERT_ERROR",{id:_,error:t,status:{main:on(n.options.labelFileProcessingRevertError)(t),sub:n.options.labelTapToRetry}})})),y.on("process-complete",(function(t){e("DID_COMPLETE_ITEM_PROCESSING",{id:_,error:null,serverFileReference:t}),e("DID_DEFINE_VALUE",{id:_,value:t})})),y.on("process-abort",(function(){e("DID_ABORT_ITEM_PROCESSING",{id:_})})),y.on("process-revert",(function(){e("DID_REVERT_ITEM_PROCESSING",{id:_}),e("DID_DEFINE_VALUE",{id:_,value:null})})),e("DID_ADD_ITEM",{id:_,index:a,interactionMethod:l}),ln(e,n);var x=n.options.server||{},b=x.url,w=x.load,D=x.restore,T=x.fetch;y.load(i,Rt(v===Ge.INPUT?$(i)&&rn(i)&&T?Gt(b,T):tn:v===Ge.LIMBO?Gt(b,D):Gt(b,w)),(function(e,n,r){Ve("LOAD_FILE",e,{query:t}).then(n).catch(r)}))}},REQUEST_PREPARE_OUTPUT:function(e){var n=e.item,r=e.success,i=e.failure,o=void 0===i?function(){}:i,a={error:Ft("error",0,"Item not found"),file:null};if(n.archived)return o(a);Ve("PREPARE_OUTPUT",n.file,{query:t,item:n}).then((function(e){Ve("COMPLETE_PREPARE_OUTPUT",e,{query:t,item:n}).then((function(e){if(n.archived)return o(a);r(e)}))}))},COMPLETE_LOAD_ITEM:function(r){var i=r.item,o=r.data,a=o.success,l=o.source,u=t("GET_ITEM_INSERT_LOCATION");if(te(u)&&l&&sn(n,u),e("DID_LOAD_ITEM",{id:i.id,error:null,serverFileReference:i.origin===Ge.INPUT?null:l}),a(Ne(i)),i.origin!==Ge.LOCAL)return i.origin===Ge.LIMBO?(e("DID_COMPLETE_ITEM_PROCESSING",{id:i.id,error:null,serverFileReference:l}),void e("DID_DEFINE_VALUE",{id:i.id,value:l})):void(t("IS_ASYNC")&&n.options.instantUpload&&e("REQUEST_ITEM_PROCESSING",{query:i.id}));e("DID_LOAD_LOCAL_ITEM",{id:i.id})},RETRY_ITEM_LOAD:cn(n,(function(e){e.retryLoad()})),REQUEST_ITEM_PREPARE:cn(n,(function(t,n,r){e("REQUEST_PREPARE_OUTPUT",{query:t.id,item:t,success:function(r){e("DID_PREPARE_OUTPUT",{id:t.id,file:r}),n({file:t,output:r})},failure:r},!0)})),REQUEST_ITEM_PROCESSING:cn(n,(function(r,i,o){if(r.status===Be.IDLE||r.status===Be.PROCESSING_ERROR)r.status!==Be.PROCESSING_QUEUED&&(r.requestProcessing(),e("DID_REQUEST_ITEM_PROCESSING",{id:r.id}),e("PROCESS_ITEM",{query:r,success:i,failure:o},!0));else{var a=function(){return e("REQUEST_ITEM_PROCESSING",{query:r,success:i,failure:o})},l=function(){return document.hidden?a():setTimeout(a,32)};r.status===Be.PROCESSING_COMPLETE||r.status===Be.PROCESSING_REVERT_ERROR?r.revert(qt(n.options.server.url,n.options.server.revert),t("GET_FORCE_REVERT")).then(l).catch((function(){})):r.status===Be.PROCESSING&&r.abortProcessing().then(l)}})),PROCESS_ITEM:cn(n,(function(r,i,o){var a=t("GET_MAX_PARALLEL_UPLOADS");if(t("GET_ITEMS_BY_STATUS",Be.PROCESSING).length!==a){if(r.status!==Be.PROCESSING){var l=function t(){var r=n.processingQueue.shift();if(r){var i=r.id,o=r.success,a=r.failure,l=Qe(n.items,i);l&&!l.archived?e("PROCESS_ITEM",{query:i,success:o,failure:a},!0):t()}};r.onOnce("process-complete",(function(){i(Ne(r)),l(),t("GET_ITEMS_BY_STATUS",Be.PROCESSING_COMPLETE).length===n.items.length&&e("DID_COMPLETE_ITEM_PROCESSING_ALL")})),r.onOnce("process-error",(function(e){o({error:e,file:Ne(r)}),l()}));var u=n.options;r.process(Yt(Ht(u.server.url,u.server.process,u.name,{chunkTransferId:r.transferId,chunkServer:u.server.patch,chunkUploads:u.chunkUploads,chunkForce:u.chunkForce,chunkSize:u.chunkSize,chunkRetryDelays:u.chunkRetryDelays})),(function(n,i,o){Ve("PREPARE_OUTPUT",n,{query:t,item:r}).then((function(t){e("DID_PREPARE_OUTPUT",{id:r.id,file:t}),i(t)})).catch(o)}))}}else n.processingQueue.push({id:r.id,success:i,failure:o})})),RETRY_ITEM_PROCESSING:cn(n,(function(t){e("REQUEST_ITEM_PROCESSING",{query:t})})),REQUEST_REMOVE_ITEM:cn(n,(function(n){un(t("GET_BEFORE_REMOVE_FILE"),Ne(n)).then((function(t){t&&e("REMOVE_ITEM",{query:n})}))})),RELEASE_ITEM:cn(n,(function(e){e.release()})),REMOVE_ITEM:cn(n,(function(r,i,o,a){var l=function(){var t=r.id;en(n.items,t).archive(),e("DID_REMOVE_ITEM",{error:null,id:t,item:r}),ln(e,n),i(Ne(r))},u=n.options.server;r.origin===Ge.LOCAL&&u&&te(u.remove)&&!1!==a.remove?(e("DID_START_ITEM_REMOVE",{id:r.id}),u.remove(r.source,(function(){return l()}
2),(function(t){e("DID_THROW_ITEM_REMOVE_ERROR",{id:r.id,error:Ft("error",0,t,null),status:{main:on(n.options.labelFileRemoveError)(t),sub:n.options.labelTapToRetry}})}))):(a.revert&&r.origin!==Ge.LOCAL&&null!==r.serverId&&r.revert(qt(n.options.server.url,n.options.server.revert),t("GET_FORCE_REVERT")),l())})),ABORT_ITEM_LOAD:cn(n,(function(e){e.abortLoad()})),ABORT_ITEM_PROCESSING:cn(n,(function(t){t.serverId?e("REVERT_ITEM_PROCESSING",{id:t.id}):t.abortProcessing().then((function(){n.options.instantUpload&&e("REMOVE_ITEM",{query:t.id})}))})),REQUEST_REVERT_ITEM_PROCESSING:cn(n,(function(r){if(n.options.instantUpload){var i=function(t){t&&e("REVERT_ITEM_PROCESSING",{query:r})},o=t("GET_BEFORE_REMOVE_FILE");if(!o)return i(!0);var a=o(Ne(r));return null==a?i(!0):"boolean"==typeof a?i(a):void("function"==typeof a.then&&a.then(i))}e("REVERT_ITEM_PROCESSING",{query:r})})),REVERT_ITEM_PROCESSING:cn(n,(function(r){r.revert(qt(n.options.server.url,n.options.server.revert),t("GET_FORCE_REVERT")).then((function(){(n.options.instantUpload||an(r))&&e("REMOVE_ITEM",{query:r.id})})).catch((function(){}))})),SET_OPTIONS:function(t){var n=t.options;i(n,(function(t,n){e("SET_"+ve(t,"_").toUpperCase(),{value:n})}))}}},dn=function(e){return e},hn=function(e){return document.createElement(e)},pn=function(e,t){var n=e.childNodes[0];n?t!==n.nodeValue&&(n.nodeValue=t):(n=document.createTextNode(t),e.appendChild(n))},gn=function(e,t,n,r){var i=(r%360-90)*Math.PI/180;return{x:e+n*Math.cos(i),y:t+n*Math.sin(i)}},mn=function(e,t,n,r,i,o){var a=gn(e,t,n,i),l=gn(e,t,n,r);return["M",a.x,a.y,"A",n,n,0,o,0,l.x,l.y].join(" ")},vn=function(e,t,n,r,i){var o=1;return i>r&&i-r<=.5&&(o=0),r>i&&r-i>=.5&&(o=0),mn(e,t,n,360*Math.min(.9999,r),360*Math.min(.9999,i),o)},yn=P({tag:"div",name:"progress-indicator",ignoreRectUpdate:!0,ignoreRect:!0,create:function(e){var t=e.root,n=e.props;n.spin=!1,n.progress=0,n.opacity=0;var r=c("svg");t.ref.path=c("path",{"stroke-width":2,"stroke-linecap":"round"}),r.appendChild(t.ref.path),t.ref.svg=r,t.appendChild(r)},write:function(e){var t=e.root,n=e.props;if(0!==n.opacity){n.align&&(t.element.dataset.align=n.align);var r=parseInt(a(t.ref.path,"stroke-width"),10),i=.5*t.rect.element.width,o=0,l=0;n.spin?(o=0,l=.5):(o=0,l=n.progress);var u=vn(i,i,i-r,o,l);a(t.ref.path,"d",u),a(t.ref.path,"stroke-opacity",n.spin||n.progress>0?1:0)}},mixins:{apis:["progress","spin","align"],styles:["opacity"],animations:{opacity:{type:"tween",duration:500},progress:{type:"spring",stiffness:.95,damping:.65,mass:10}}}}),En=P({tag:"button",attributes:{type:"button"},ignoreRect:!0,ignoreRectUpdate:!0,name:"file-action-button",mixins:{apis:["label"],styles:["translateX","translateY","scaleX","scaleY","opacity"],animations:{scaleX:"spring",scaleY:"spring",translateX:"spring",translateY:"spring",opacity:{type:"tween",duration:250}},listeners:!0},create:function(e){var t=e.root,n=e.props;t.element.innerHTML=(n.icon||"")+"<span>"+n.label+"</span>",n.isDisabled=!1},write:function(e){var t=e.root,n=e.props,r=n.isDisabled,i=t.query("GET_DISABLED")||0===n.opacity;i&&!r?(n.isDisabled=!0,a(t.element,"disabled","disabled")):!i&&r&&(n.isDisabled=!1,t.element.removeAttribute("disabled"))}}),_n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:".",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3,r=n,i=n*n,o=n*n*n;return(e=Math.round(Math.abs(e)))<r?e+" bytes":e<i?Math.floor(e/r)+" KB":e<o?xn(e/i,1,t)+" MB":xn(e/o,2,t)+" GB"},xn=function(e,t,n){return e.toFixed(t).split(".").filter((function(e){return"0"!==e})).join(n)},bn=function(e){var t=e.root,n=e.props,r=hn("span");r.className="filepond--file-info-main",a(r,"aria-hidden","true"),t.appendChild(r),t.ref.fileName=r;var i=hn("span");i.className="filepond--file-info-sub",t.appendChild(i),t.ref.fileSize=i,pn(i,t.query("GET_LABEL_FILE_WAITING_FOR_SIZE")),pn(r,dn(t.query("GET_ITEM_NAME",n.id)))},wn=function(e){var t=e.root,n=e.props;pn(t.ref.fileSize,_n(t.query("GET_ITEM_SIZE",n.id),".",t.query("GET_FILE_SIZE_BASE"))),pn(t.ref.fileName,dn(t.query("GET_ITEM_NAME",n.id)))},Dn=function(e){var t=e.root,n=e.props;J(t.query("GET_ITEM_SIZE",n.id))||pn(t.ref.fileSize,t.query("GET_LABEL_FILE_SIZE_NOT_AVAILABLE"))},Tn=P({name:"file-info",ignoreRect:!0,ignoreRectUpdate:!0,write:G({DID_LOAD_ITEM:wn,DID_UPDATE_ITEM_META:wn,DID_THROW_ITEM_LOAD_ERROR:Dn,DID_THROW_ITEM_INVALID:Dn}),didCreateView:function(e){je("CREATE_VIEW",Object.assign({},e,{view:e}))},create:bn,mixins:{styles:["translateX","translateY"],animations:{translateX:"spring",translateY:"spring"}}}),In=function(e){return Math.round(100*e)},An=function(e){var t=e.root,n=hn("span");n.className="filepond--file-status-main",t.appendChild(n),t.ref.main=n;var r=hn("span");r.className="filepond--file-status-sub",t.appendChild(r),t.ref.sub=r,Cn({root:t,action:{progress:null}})},Cn=function(e){var t=e.root,n=e.action,r=null===n.progress?t.query("GET_LABEL_FILE_LOADING"):t.query("GET_LABEL_FILE_LOADING")+" "+In(n.progress)+"%";pn(t.ref.main,r),pn(t.ref.sub,t.query("GET_LABEL_TAP_TO_CANCEL"))},Sn=function(e){var t=e.root;pn(t.ref.main,""),pn(t.ref.sub,"")},On=function(e){var t=e.root,n=e.action;pn(t.ref.main,n.status.main),pn(t.ref.sub,n.status.sub)},Ln=P({name:"file-status",ignoreRect:!0,ignoreRectUpdate:!0,write:G({DID_LOAD_ITEM:Sn,DID_REVERT_ITEM_PROCESSING:Sn,DID_REQUEST_ITEM_PROCESSING:function(e){var t=e.root;pn(t.ref.main,t.query("GET_LABEL_FILE_PROCESSING")),pn(t.ref.sub,t.query("GET_LABEL_TAP_TO_CANCEL"))},DID_ABORT_ITEM_PROCESSING:function(e){var t=e.root;pn(t.ref.main,t.query("GET_LABEL_FILE_PROCESSING_ABORTED")),pn(t.ref.sub,t.query("GET_LABEL_TAP_TO_RETRY"))},DID_COMPLETE_ITEM_PROCESSING:function(e){var t=e.root;pn(t.ref.main,t.query("GET_LABEL_FILE_PROCESSING_COMPLETE")),pn(t.ref.sub,t.query("GET_LABEL_TAP_TO_UNDO"))},DID_UPDATE_ITEM_PROCESS_PROGRESS:function(e){var t=e.root,n=e.action,r=null===n.progress?t.query("GET_LABEL_FILE_PROCESSING"):t.query("GET_LABEL_FILE_PROCESSING")+" "+In(n.progress)+"%";pn(t.ref.main,r),pn(t.ref.sub,t.query("GET_LABEL_TAP_TO_CANCEL"))},DID_UPDATE_ITEM_LOAD_PROGRESS:Cn,DID_THROW_ITEM_LOAD_ERROR:On,DID_THROW_ITEM_INVALID:On,DID_THROW_ITEM_PROCESSING_ERROR:On,DID_THROW_ITEM_PROCESSING_REVERT_ERROR:On,DID_THROW_ITEM_REMOVE_
2ERROR:On}),didCreateView:function(e){je("CREATE_VIEW",Object.assign({},e,{view:e}))},create:An,mixins:{styles:["translateX","translateY","opacity"],animations:{opacity:{type:"tween",duration:250},translateX:"spring",translateY:"spring"}}}),Rn={AbortItemLoad:{label:"GET_LABEL_BUTTON_ABORT_ITEM_LOAD",action:"ABORT_ITEM_LOAD",className:"filepond--action-abort-item-load",align:"LOAD_INDICATOR_POSITION"},RetryItemLoad:{label:"GET_LABEL_BUTTON_RETRY_ITEM_LOAD",action:"RETRY_ITEM_LOAD",icon:"GET_ICON_RETRY",className:"filepond--action-retry-item-load",align:"BUTTON_PROCESS_ITEM_POSITION"},RemoveItem:{label:"GET_LABEL_BUTTON_REMOVE_ITEM",action:"REQUEST_REMOVE_ITEM",icon:"GET_ICON_REMOVE",className:"filepond--action-remove-item",align:"BUTTON_REMOVE_ITEM_POSITION"},ProcessItem:{label:"GET_LABEL_BUTTON_PROCESS_ITEM",action:"REQUEST_ITEM_PROCESSING",icon:"GET_ICON_PROCESS",className:"filepond--action-process-item",align:"BUTTON_PROCESS_ITEM_POSITION"},AbortItemProcessing:{label:"GET_LABEL_BUTTON_ABORT_ITEM_PROCESSING",action:"ABORT_ITEM_PROCESSING",className:"filepond--action-abort-item-processing",align:"BUTTON_PROCESS_ITEM_POSITION"},RetryItemProcessing:{label:"GET_LABEL_BUTTON_RETRY_ITEM_PROCESSING",action:"RETRY_ITEM_PROCESSING",icon:"GET_ICON_RETRY",className:"filepond--action-retry-item-processing",align:"BUTTON_PROCESS_ITEM_POSITION"},RevertItemProcessing:{label:"GET_LABEL_BUTTON_UNDO_ITEM_PROCESSING",action:"REQUEST_REVERT_ITEM_PROCESSING",icon:"GET_ICON_UNDO",className:"filepond--action-revert-item-processing",align:"BUTTON_PROCESS_ITEM_POSITION"}},kn=[];i(Rn,(function(e){kn.push(e)}));var Mn,Fn=function(e){var t=e.ref.buttonRemoveItem.rect.element;return t.hidden?null:t.width+t.left},Nn=function(e){return e.ref.buttonAbortItemLoad.rect.element.width},Pn=function(e){return Math.floor(e.ref.buttonRemoveItem.rect.element.height/4)},Bn=function(e){return Math.floor(e.ref.buttonRemoveItem.rect.element.left/2)},Gn=function(e){return e.query("GET_STYLE_BUTTON_REMOVE_ITEM_POSITION")},zn={buttonAbortItemLoad:{opacity:0},buttonRetryItemLoad:{opacity:0},buttonRemoveItem:{opacity:0},buttonProcessItem:{opacity:0},buttonAbortItemProcessing:{opacity:0},buttonRetryItemProcessing:{opacity:0},buttonRevertItemProcessing:{opacity:0},loadProgressIndicator:{opacity:0,align:function(e){return e.query("GET_STYLE_LOAD_INDICATOR_POSITION")}},processProgressIndicator:{opacity:0,align:function(e){return e.query("GET_STYLE_PROGRESS_INDICATOR_POSITION")}},processingCompleteIndicator:{opacity:0,scaleX:.75,scaleY:.75},info:{translateX:0,translateY:0,opacity:0},status:{translateX:0,translateY:0,opacity:0}},Un={buttonRemoveItem:{opacity:1},buttonProcessItem:{opacity:1},info:{translateX:Fn},status:{translateX:Fn}},Wn={buttonAbortItemProcessing:{opacity:1},processProgressIndicator:{opacity:1},status:{opacity:1}},Hn={DID_THROW_ITEM_INVALID:{buttonRemoveItem:{opacity:1},info:{translateX:Fn},status:{translateX:Fn,opacity:1}},DID_START_ITEM_LOAD:{buttonAbortItemLoad:{opacity:1},loadProgressIndicator:{opacity:1},status:{opacity:1}},DID_THROW_ITEM_LOAD_ERROR:{buttonRetryItemLoad:{opacity:1},buttonRemoveItem:{opacity:1},info:{translateX:Fn},status:{opacity:1}},DID_START_ITEM_REMOVE:{processProgressIndicator:{opacity:1,align:Gn},info:{translateX:Fn},status:{opacity:0}},DID_THROW_ITEM_REMOVE_ERROR:{processProgressIndicator:{opacity:0,align:Gn},buttonRemoveItem:{opacity:1},info:{translateX:Fn},status:{opacity:1,translateX:Fn}},DID_LOAD_ITEM:Un,DID_LOAD_LOCAL_ITEM:{buttonRemoveItem:{opacity:1},info:{translateX:Fn},status:{translateX:Fn}},DID_START_ITEM_PROCESSING:Wn,DID_REQUEST_ITEM_PROCESSING:Wn,DID_UPDATE_ITEM_PROCESS_PROGRESS:Wn,DID_COMPLETE_ITEM_PROCESSING:{buttonRevertItemProcessing:{opacity:1},info:{opacity:1},status:{opacity:1}},DID_THROW_ITEM_PROCESSING_ERROR:{buttonRemoveItem:{opacity:1},buttonRetryItemProcessing:{opacity:1},status:{opacity:1},info:{translateX:Fn}},DID_THROW_ITEM_PROCESSING_REVERT_ERROR:{buttonRevertItemProcessing:{opacity:1},status:{opacity:1},info:{opacity:1}},DID_ABORT_ITEM_PROCESSING:{buttonRemoveItem:{opacity:1},buttonProcessItem:{opacity:1},info:{translateX:Fn},status:{opacity:1}},DID_REVERT_ITEM_PROCESSING:Un},qn=P({create:function(e){var t=e.root;t.element.innerHTML=t.query("GET_ICON_DONE")},name:"processing-complete-indicator",ignoreRect:!0,mixins:{styles:["scaleX","scaleY","opacity"],animations:{scaleX:"spring",scaleY:"spring",opacity:{type:"tween",duration:250}}}}),Vn=function(e){var t,n=e.root,r=e.props.id,o=n.query("GET_ALLOW_REVERT"),a=n.query("GET_ALLOW_REMOVE"),l=n.query("GET_ALLOW_PROCESS"),u=n.query("GET_INSTANT_UPLOAD"),s=n.query("IS_ASYNC"),c=n.query("GET_STYLE_BUTTON_REMOVE_ITEM_ALIGN");s?l&&!o?t=function(e){return!/RevertItemProcessing/.test(e)}:!l&&o?t=function(e){return!/ProcessItem|RetryItemProcessing|AbortItemProcessing/.test(e)}:l||o||(t=function(e){return!/Process/.test(e)}):t=function(e){return!/Process/.test(e)};var f=t?kn.filter(t):kn.concat();if(u&&o&&(Rn.RevertItemProcessing.label="GET_LABEL_BUTTON_REMOVE_ITEM",Rn.RevertItemProcessing.icon="GET_ICON_REMOVE"),s&&!o){var d=Hn.DID_COMPLETE_ITEM_PROCESSING;d.info.translateX=Bn,d.info.translateY=Pn,d.status.translateY=Pn,d.processingCompleteIndicator={opacity:1,scaleX:1,scaleY:1}}if(s&&!l&&(["DID_START_ITEM_PROCESSING","DID_REQUEST_ITEM_PROCESSING","DID_UPDATE_ITEM_PROCESS_PROGRESS","DID_THROW_ITEM_PROCESSING_ERROR"].forEach((function(e){Hn[e].status.translateY=Pn})),Hn.DID_THROW_ITEM_PROCESSING_ERROR.status.translateX=Nn),c&&o){Rn.RevertItemProcessing.align="BUTTON_REMOVE_ITEM_POSITION";var h=Hn.DID_COMPLETE_ITEM_PROCESSING;h.info.translateX=Fn,h.status.translateY=Pn,h.processingCompleteIndicator={opacity:1,scaleX:1,scaleY:1}}a||(Rn.RemoveItem.disabled=!0),i(Rn,(function(e,t){var i=n.createChildView(En,{label:n.query(t.label),icon:n.query(t.icon),opacity:0}
2);f.includes(e)&&n.appendChildView(i),t.disabled&&(i.element.setAttribute("disabled","disabled"),i.element.setAttribute("hidden","hidden")),i.element.dataset.align=n.query("GET_STYLE_"+t.align),i.element.classList.add(t.className),i.on("click",(function(e){e.stopPropagation(),t.disabled||n.dispatch(t.action,{query:r})})),n.ref["button"+e]=i})),n.ref.processingCompleteIndicator=n.appendChildView(n.createChildView(qn)),n.ref.processingCompleteIndicator.element.dataset.align=n.query("GET_STYLE_BUTTON_PROCESS_ITEM_POSITION"),n.ref.info=n.appendChildView(n.createChildView(Tn,{id:r})),n.ref.status=n.appendChildView(n.createChildView(Ln,{id:r}));var p=n.appendChildView(n.createChildView(yn,{opacity:0,align:n.query("GET_STYLE_LOAD_INDICATOR_POSITION")}));p.element.classList.add("filepond--load-indicator"),n.ref.loadProgressIndicator=p;var g=n.appendChildView(n.createChildView(yn,{opacity:0,align:n.query("GET_STYLE_PROGRESS_INDICATOR_POSITION")}));g.element.classList.add("filepond--process-indicator"),n.ref.processProgressIndicator=g,n.ref.activeStyles=[]},jn=function(e){var t=e.root,n=e.actions,r=e.props;Yn({root:t,actions:n,props:r});var o=n.concat().filter((function(e){return/^DID_/.test(e.type)})).reverse().find((function(e){return Hn[e.type]}));if(o){t.ref.activeStyles=[];var a=Hn[o.type];i(zn,(function(e,n){var r=t.ref[e];i(n,(function(n,i){var o=a[e]&&void 0!==a[e][n]?a[e][n]:i;t.ref.activeStyles.push({control:r,key:n,value:o})}))}))}t.ref.activeStyles.forEach((function(e){var n=e.control,r=e.key,i=e.value;n[r]="function"==typeof i?i(t):i}))},Yn=G({DID_SET_LABEL_BUTTON_ABORT_ITEM_PROCESSING:function(e){var t=e.root,n=e.action;t.ref.buttonAbortItemProcessing.label=n.value},DID_SET_LABEL_BUTTON_ABORT_ITEM_LOAD:function(e){var t=e.root,n=e.action;t.ref.buttonAbortItemLoad.label=n.value},DID_SET_LABEL_BUTTON_ABORT_ITEM_REMOVAL:function(e){var t=e.root,n=e.action;t.ref.buttonAbortItemRemoval.label=n.value},DID_REQUEST_ITEM_PROCESSING:function(e){var t=e.root;t.ref.processProgressIndicator.spin=!0,t.ref.processProgressIndicator.progress=0},DID_START_ITEM_LOAD:function(e){var t=e.root;t.ref.loadProgressIndicator.spin=!0,t.ref.loadProgressIndicator.progress=0},DID_START_ITEM_REMOVE:function(e){var t=e.root;t.ref.processProgressIndicator.spin=!0,t.ref.processProgressIndicator.progress=0},DID_UPDATE_ITEM_LOAD_PROGRESS:function(e){var t=e.root,n=e.action;t.ref.loadProgressIndicator.spin=!1,t.ref.loadProgressIndicator.progress=n.progress},DID_UPDATE_ITEM_PROCESS_PROGRESS:function(e){var t=e.root,n=e.action;t.ref.processProgressIndicator.spin=!1,t.ref.processProgressIndicator.progress=n.progress}}),Xn=P({create:Vn,write:jn,didCreateView:function(e){je("CREATE_VIEW",Object.assign({},e,{view:e}))},name:"file"}),$n=P({create:function(e){var t=e.root,n=e.props;t.ref.fileName=hn("legend"),t.appendChild(t.ref.fileName),t.ref.file=t.appendChildView(t.createChildView(Xn,{id:n.id})),t.ref.data=!1},ignoreRect:!0,write:G({DID_LOAD_ITEM:function(e){var t=e.root,n=e.props;pn(t.ref.fileName,dn(t.query("GET_ITEM_NAME",n.id)))}}),didCreateView:function(e){je("CREATE_VIEW",Object.assign({},e,{view:e}))},tag:"fieldset",name:"file-wrapper"}),Zn={type:"spring",damping:.6,mass:7},Kn=function(e){var t=e.root,n=e.props;[{name:"top"},{name:"center",props:{translateY:null,scaleY:null},mixins:{animations:{scaleY:Zn},styles:["translateY","scaleY"]}},{name:"bottom",props:{translateY:null},mixins:{animations:{translateY:Zn},styles:["translateY"]}}].forEach((function(e){Qn(t,e,n.name)})),t.element.classList.add("filepond--"+n.name),t.ref.scalable=null},Qn=function(e,t,n){var r=P({name:"panel-"+t.name+" filepond--"+n,mixins:t.mixins,ignoreRectUpdate:!0}),i=e.createChildView(r,t.props);e.ref[t.name]=e.appendChildView(i)},Jn=P({name:"panel",write:function(e){var t=e.root,n=e.props;if(null!==t.ref.scalable&&n.scalable===t.ref.scalable||(t.ref.scalable=!Y(n.scalable)||n.scalable,t.element.dataset.scalable=t.ref.scalable),n.height){var r=t.ref.top.rect.element,i=t.ref.bottom.rect.element,o=Math.max(r.height+i.height,n.height);t.ref.center.translateY=r.height,t.ref.center.scaleY=(o-r.height-i.height)/100,t.ref.bottom.translateY=o-i.height}},create:Kn,ignoreRect:!0,mixins:{apis:["height","scalable"]}}),er=function(e){var t=e.map((function(e){return e.id})),n=void 0;return{setIndex:function(e){n=e},getIndex:function(){return n},getItemIndex:function(e){return t.indexOf(e.id)}}},tr={type:"spring",stiffness:.75,damping:.45,mass:10}
2,nr="spring",rr={DID_START_ITEM_LOAD:"busy",DID_UPDATE_ITEM_LOAD_PROGRESS:"loading",DID_THROW_ITEM_INVALID:"load-invalid",DID_THROW_ITEM_LOAD_ERROR:"load-error",DID_LOAD_ITEM:"idle",DID_THROW_ITEM_REMOVE_ERROR:"remove-error",DID_START_ITEM_REMOVE:"busy",DID_START_ITEM_PROCESSING:"busy processing",DID_REQUEST_ITEM_PROCESSING:"busy processing",DID_UPDATE_ITEM_PROCESS_PROGRESS:"processing",DID_COMPLETE_ITEM_PROCESSING:"processing-complete",DID_THROW_ITEM_PROCESSING_ERROR:"processing-error",DID_THROW_ITEM_PROCESSING_REVERT_ERROR:"processing-revert-error",DID_ABORT_ITEM_PROCESSING:"cancelled",DID_REVERT_ITEM_PROCESSING:"idle"},ir=function(e){var t=e.root,n=e.props;if(t.ref.handleClick=function(e){return t.dispatch("DID_ACTIVATE_ITEM",{id:n.id})},t.element.id="filepond--item-"+n.id,t.element.addEventListener("click",t.ref.handleClick),t.ref.container=t.appendChildView(t.createChildView($n,{id:n.id})),t.ref.panel=t.appendChildView(t.createChildView(Jn,{name:"item-panel"})),t.ref.panel.height=null,n.markedForRemoval=!1,t.query("GET_ALLOW_REORDER")){t.element.dataset.dragState="idle";var r=function(e){if(e.isPrimary){var r=!1,i={x:e.pageX,y:e.pageY};n.dragOrigin={x:t.translateX,y:t.translateY},n.dragCenter={x:e.offsetX,y:e.offsetY};var o=er(t.query("GET_ACTIVE_ITEMS"));t.dispatch("DID_GRAB_ITEM",{id:n.id,dragState:o});var a=function(e){e.isPrimary&&(e.stopPropagation(),e.preventDefault(),n.dragOffset={x:e.pageX-i.x,y:e.pageY-i.y},n.dragOffset.x*n.dragOffset.x+n.dragOffset.y*n.dragOffset.y>16&&!r&&(r=!0,t.element.removeEventListener("click",t.ref.handleClick)),t.dispatch("DID_DRAG_ITEM",{id:n.id,dragState:o}))},l=function e(l){l.isPrimary&&(document.removeEventListener("pointermove",a),document.removeEventListener("pointerup",e),n.dragOffset={x:l.pageX-i.x,y:l.pageY-i.y},t.dispatch("DID_DROP_ITEM",{id:n.id,dragState:o}),r&&setTimeout((function(){return t.element.addEventListener("click",t.ref.handleClick)}),0))};document.addEventListener("pointermove",a),document.addEventListener("pointerup",l)}};t.element.addEventListener("pointerdown",r)}},or=G({DID_UPDATE_PANEL_HEIGHT:function(e){var t=e.root,n=e.action;t.height=n.height}}),ar=G({DID_GRAB_ITEM:function(e){var t=e.root;e.props.dragOrigin={x:t.translateX,y:t.translateY}},DID_DRAG_ITEM:function(e){e.root.element.dataset.dragState="drag"},DID_DROP_ITEM:function(e){var t=e.root,n=e.props;n.dragOffset=null,n.dragOrigin=null,t.element.dataset.dragState="drop"}},(function(e){var t=e.root,n=e.actions,r=e.props,i=e.shouldOptimize;"drop"===t.element.dataset.dragState&&t.scaleX<=1&&(t.element.dataset.dragState="idle");var o=n.concat().filter((function(e){return/^DID_/.test(e.type)})).reverse().find((function(e){return rr[e.type]}));o&&o.type!==r.currentState&&(r.currentState=o.type,t.element.dataset.filepondItemState=rr[r.currentState]||"");var a=t.query("GET_ITEM_PANEL_ASPECT_RATIO")||t.query("GET_PANEL_ASPECT_RATIO");a?i||(t.height=t.rect.element.width*a):(or({root:t,actions:n,props:r}),!t.height&&t.ref.container.rect.element.height>0&&(t.height=t.ref.container.rect.element.height)),i&&(t.ref.panel.height=null),t.ref.panel.height=t.height})),lr=P({create:ir,write:ar,destroy:function(e){var t=e.root,n=e.props;t.element.removeEventListener("click",t.ref.handleClick),t.dispatch("RELEASE_ITEM",{query:n.id})},tag:"li",name:"item",mixins:{apis:["id","interactionMethod","markedForRemoval","spawnDate","dragCenter","dragOrigin","dragOffset"],styles:["translateX","translateY","scaleX","scaleY","opacity","height"],animations:{scaleX:nr,scaleY:nr,translateX:tr,translateY:tr,opacity:{type:"tween",duration:150}}}}),ur=function(e,t,n){if(n){var r=e.rect.element.width,i=t.length,o=null;if(0===i||n.top<t[0].rect.element.top)return-1;var a=t[0].rect.element,l=a.marginLeft+a.marginRight,u=a.width+l,s=Math.round(r/u);if(1===s){for(var c=0;c<i;c++){var f=t[c],d=f.rect.outer.top+.5*f.rect.element.height;if(n.top<d)return c}return i}for(var h=a.marginTop+a.marginBottom,p=a.height+h,g=0;g<i;g++){var m=g%s*u,v=Math.floor(g/s)*p,y=v-a.marginTop,E=m+u,_=v+p+a.marginBottom;if(n.top<_&&n.top>y){if(n.left<E)return g;o=g!==i-1?g:null}}return null!==o?o:i}},sr={height:0,width:0,get getHeight(){return this.height},set setHeight(e){0!==this.height&&0!==e||(this.height=e)},get getWidth(){return this.width},set setWidth(e){0!==this.width&&0!==e||(this.width=e)},setDimensions:function(e,t){0!==this.height&&0!==e||(this.height=e),0!==this.width&&0!==t||(this.width=t)}},cr=function(e){var t=e.root;a(t.element,"role","list"),t.ref.lastItemSpanwDate=Date.now()},fr=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1;e.dragOffset?(e.translateX=null,e.translateY=null,e.translateX=e.dragOrigin.x+e.dragOffset.x,e.translateY=e.dragOrigin.y+e.dragOffset.y,e.scaleX=1.025,e.scaleY=1.025):(e.translateX=t,e.translateY=n,Date.now()>e.spawnDate&&(0===e.opacity&&dr(e,t,n,r,i),e.scaleX=1,e.scaleY=1,e.opacity=1))},dr=function(e,t,n,r,i){e.interactionMethod===xe.NONE?(e.translateX=null,e.translateX=t,e.translateY=null,e.translateY=n):e.interactionMethod===xe.DROP?(e.translateX=null,e.translateX=t-20*r,e.translateY=null,e.translateY=n-10*i,e.scaleX=.8,e.scaleY=.8):e.interactionMethod===xe.BROWSE?(e.translateY=null,e.translateY=n-30):e.interactionMethod===xe.API&&(e.translateX=null,e.translateX=t-30,e.translateY=null)},hr=function(e){return e.rect.element.height+.5*e.rect.element.marginBottom+.5*e.rect.element.marginTop},pr=function(e){return e.rect.element.width+.5*e.rect.element.marginLeft+.5*e.rect.element.marginRight}
2,gr=G({DID_ADD_ITEM:function(e){var t=e.root,n=e.action,r=n.id,i=n.index,o=n.interactionMethod;t.ref.addIndex=i;var a=Date.now(),l=a,u=1;if(o!==xe.NONE){u=0;var s=t.query("GET_ITEM_INSERT_INTERVAL"),c=a-t.ref.lastItemSpanwDate;l=c<s?a+(s-c):a}t.ref.lastItemSpanwDate=l,t.appendChildView(t.createChildView(lr,{spawnDate:l,id:r,opacity:u,interactionMethod:o}),i)},DID_REMOVE_ITEM:function(e){var t=e.root,n=e.action.id,r=t.childViews.find((function(e){return e.id===n}));r&&(r.scaleX=.9,r.scaleY=.9,r.opacity=0,r.markedForRemoval=!0)},DID_DRAG_ITEM:function(e){var t=e.root,n=e.action,r=n.id,i=n.dragState,o=t.query("GET_ITEM",{id:r}),a=t.childViews.find((function(e){return e.id===r})),l=t.childViews.length,u=i.getItemIndex(o);if(a){var s={x:a.dragOrigin.x+a.dragOffset.x+a.dragCenter.x,y:a.dragOrigin.y+a.dragOffset.y+a.dragCenter.y},c=hr(a),f=pr(a),d=Math.floor(t.rect.outer.width/f);d>l&&(d=l);var h=Math.floor(l/d+1);sr.setHeight=c*h,sr.setWidth=f*d;var p={y:Math.floor(s.y/c),x:Math.floor(s.x/f),getGridIndex:function(){return s.y>sr.getHeight||s.y<0||s.x>sr.getWidth||s.x<0?u:this.y*d+this.x},getColIndex:function(){for(var e=t.query("GET_ACTIVE_ITEMS"),n=t.childViews.filter((function(e){return e.rect.element.height})),r=e.map((function(e){return n.find((function(t){return t.id===e.id}))})),i=r.findIndex((function(e){return e===a})),o=hr(a),l=r.length,u=l,c=0,f=0,d=0;d<l;d++)if(c=(f=c)+hr(r[d]),s.y<c){if(i>d){if(s.y<f+o){u=d;break}continue}u=d;break}return u}},g=d>1?p.getGridIndex():p.getColIndex();t.dispatch("MOVE_ITEM",{query:a,index:g});var m=i.getIndex();if(void 0===m||m!==g){if(i.setIndex(g),void 0===m)return;t.dispatch("DID_REORDER_ITEMS",{items:t.query("GET_ACTIVE_ITEMS"),origin:u,target:g})}}}}),mr=P({create:cr,write:function(e){var t=e.root,n=e.props,r=e.actions,i=e.shouldOptimize;gr({root:t,props:n,actions:r});var o=n.dragCoordinates,a=t.rect.element.width,l=t.childViews.filter((function(e){return e.rect.element.height})),u=t.query("GET_ACTIVE_ITEMS").map((function(e){return l.find((function(t){return t.id===e.id}))})).filter((function(e){return e})),s=o?ur(t,u,o):null,c=t.ref.addIndex||null;t.ref.addIndex=null;var f=0,d=0,h=0;if(0!==u.length){var p=u[0].rect.element,g=p.marginTop+p.marginBottom,m=p.marginLeft+p.marginRight,v=p.width+m,y=p.height+g,E=Math.round(a/v);if(1===E){var _=0,x=0;u.forEach((function(e,t){if(s){var n=t-s;x=-2===n?.25*-g:-1===n?.75*-g:0===n?.75*g:1===n?.25*g:0}i&&(e.translateX=null,e.translateY=null),e.markedForRemoval||fr(e,0,_+x);var r=(e.rect.element.height+g)*(e.markedForRemoval?e.opacity:1);_+=r}))}else{var b=0,w=0;u.forEach((function(e,t){t===s&&(f=1),t===c&&(h+=1),e.markedForRemoval&&e.opacity<.5&&(d-=1);var n=t+h+f+d,r=n%E,o=Math.floor(n/E),a=r*v,l=o*y,u=Math.sign(a-b),p=Math.sign(l-w);b=a,w=l,e.markedForRemoval||(i&&(e.translateX=null,e.translateY=null),fr(e,a,l,u,p))}))}}},tag:"ul",name:"list",didWriteView:function(e){var t=e.root;t.childViews.filter((function(e){return e.markedForRemoval&&0===e.opacity&&e.resting})).forEach((function(e){e._destroy(),t.removeChildView(e)}))},filterFrameActionsForChild:function(e,t){return t.filter((function(t){return!t.data||!t.data.id||e.id===t.data.id}))},mixins:{apis:["dragCoordinates"]}}),vr=function(e){var t=e.root,n=e.props;t.ref.list=t.appendChildView(t.createChildView(mr)),n.dragCoordinates=null,n.overflowing=!1},yr=G({DID_DRAG:function(e){var t=e.root,n=e.props,r=e.action;t.query("GET_ITEM_INSERT_LOCATION_FREEDOM")&&(n.dragCoordinates={left:r.position.scopeLeft-t.ref.list.rect.element.left,top:r.position.scopeTop-(t.rect.outer.top+t.rect.element.marginTop+t.rect.element.scrollTop)})},DID_END_DRAG:function(e){e.props.dragCoordinates=null}}),Er=P({create:vr,write:function(e){var t=e.root,n=e.props,r=e.actions;if(yr({root:t,props:n,actions:r}),t.ref.list.dragCoordinates=n.dragCoordinates,n.overflowing&&!n.overflow&&(n.overflowing=!1,t.element.dataset.state="",t.height=null),n.overflow){var i=Math.round(n.overflow);i!==t.height&&(n.overflowing=!0,t.element.dataset.state="overflow",t.height=i)}},name:"list-scroller",mixins:{apis:["overflow","dragCoordinates"],styles:["height","translateY"],animations:{translateY:"spring"}}}),_r=function(e,t,n){n?a(e,t,arguments.length>3&&void 0!==arguments[3]?arguments[3]:""):e.removeAttribute(t)},xr=function(e){if(e&&""!==e.value){try{e.value=""}catch(e){}if(e.value){var t=hn("form"),n=e.parentNode,r=e.nextSibling;t.appendChild(e),t.reset(),r?n.insertBefore(e,r):n.appendChild(e)}}},br=function(e){var t=e.root,n=e.props;
2t.element.id="filepond--browser-"+n.id,a(t.element,"name",t.query("GET_NAME")),a(t.element,"aria-controls","filepond--assistant-"+n.id),a(t.element,"aria-labelledby","filepond--drop-label-"+n.id),wr({root:t,action:{value:t.query("GET_ACCEPTED_FILE_TYPES")}}),Dr({root:t,action:{value:t.query("GET_ALLOW_MULTIPLE")}}),Tr({root:t,action:{value:t.query("GET_ALLOW_DIRECTORIES_ONLY")}}),Ir({root:t}),Ar({root:t,action:{value:t.query("GET_REQUIRED")}}),Cr({root:t,action:{value:t.query("GET_CAPTURE_METHOD")}}),t.ref.handleChange=function(e){if(t.element.value){var r=Array.from(t.element.files).map((function(e){return e._relativePath=e.webkitRelativePath,e}));setTimeout((function(){n.onload(r),xr(t.element)}),250)}},t.element.addEventListener("change",t.ref.handleChange)},wr=function(e){var t=e.root,n=e.action;t.query("GET_ALLOW_SYNC_ACCEPT_ATTRIBUTE")&&_r(t.element,"accept",!!n.value,n.value?n.value.join(","):"")},Dr=function(e){var t=e.root,n=e.action;_r(t.element,"multiple",n.value)},Tr=function(e){var t=e.root,n=e.action;_r(t.element,"webkitdirectory",n.value)},Ir=function(e){var t=e.root,n=t.query("GET_DISABLED"),r=t.query("GET_ALLOW_BROWSE"),i=n||!r;_r(t.element,"disabled",i)},Ar=function(e){var t=e.root;e.action.value?0===t.query("GET_TOTAL_ITEMS")&&_r(t.element,"required",!0):_r(t.element,"required",!1)},Cr=function(e){var t=e.root,n=e.action;_r(t.element,"capture",!!n.value,!0===n.value?"":n.value)},Sr=function(e){var t=e.root,n=t.element;t.query("GET_TOTAL_ITEMS")>0?(_r(n,"required",!1),_r(n,"name",!1)):(_r(n,"name",!0,t.query("GET_NAME")),t.query("GET_CHECK_VALIDITY")&&n.setCustomValidity(""),t.query("GET_REQUIRED")&&_r(n,"required",!0))},Or=P({tag:"input",name:"browser",ignoreRect:!0,ignoreRectUpdate:!0,attributes:{type:"file"},create:br,destroy:function(e){var t=e.root;t.element.removeEventListener("change",t.ref.handleChange)},write:G({DID_LOAD_ITEM:Sr,DID_REMOVE_ITEM:Sr,DID_THROW_ITEM_INVALID:function(e){var t=e.root;t.query("GET_CHECK_VALIDITY")&&t.element.setCustomValidity(t.query("GET_LABEL_INVALID_FIELD"))},DID_SET_DISABLED:Ir,DID_SET_ALLOW_BROWSE:Ir,DID_SET_ALLOW_DIRECTORIES_ONLY:Tr,DID_SET_ALLOW_MULTIPLE:Dr,DID_SET_ACCEPTED_FILE_TYPES:wr,DID_SET_CAPTURE_METHOD:Cr,DID_SET_REQUIRED:Ar})}),Lr={ENTER:13,SPACE:32},Rr=function(e){var t=e.root,n=e.props,r=hn("label");a(r,"for","filepond--browser-"+n.id),a(r,"id","filepond--drop-label-"+n.id),a(r,"aria-hidden","true"),t.ref.handleKeyDown=function(e){(e.keyCode===Lr.ENTER||e.keyCode===Lr.SPACE)&&(e.preventDefault(),t.ref.label.click())},t.ref.handleClick=function(e){e.target===r||r.contains(e.target)||t.ref.label.click()},r.addEventListener("keydown",t.ref.handleKeyDown),t.element.addEventListener("click",t.ref.handleClick),kr(r,n.caption),t.appendChild(r),t.ref.label=r},kr=function(e,t){e.innerHTML=t;var n=e.querySelector(".filepond--label-action");return n&&a(n,"tabindex","0"),t},Mr=P({name:"drop-label",ignoreRect:!0,create:Rr,destroy:function(e){var t=e.root;t.ref.label.addEventListener("keydown",t.ref.handleKeyDown),t.element.removeEventListener("click",t.ref.handleClick)},write:G({DID_SET_LABEL_IDLE:function(e){var t=e.root,n=e.action;kr(t.ref.label,n.value)}}),mixins:{styles:["opacity","translateX","translateY"],animations:{opacity:{type:"tween",duration:150},translateX:"spring",translateY:"spring"}}}),Fr=P({name:"drip-blob",ignoreRect:!0,mixins:{styles:["translateX","translateY","scaleX","scaleY","opacity"],animations:{scaleX:"spring",scaleY:"spring",translateX:"spring",translateY:"spring",opacity:{type:"tween",duration:250}}}}),Nr=function(e){var t=e.root,n=.5*t.rect.element.width,r=.5*t.rect.element.height;t.ref.blob=t.appendChildView(t.createChildView(Fr,{opacity:0,scaleX:2.5,scaleY:2.5,translateX:n,translateY:r}))},Pr=function(e){var t=e.root,n=e.props,r=e.actions;Br({root:t,props:n,actions:r});var i=t.ref.blob;0===r.length&&i&&0===i.opacity&&(t.removeChildView(i),t.ref.blob=null)},Br=G({DID_DRAG:function(e){var t=e.root,n=e.action;t.ref.blob?(t.ref.blob.translateX=n.position.scopeLeft,t.ref.blob.translateY=n.position.scopeTop,t.ref.blob.scaleX=1,t.ref.blob.scaleY=1,t.ref.blob.opacity=1):Nr({root:t})},DID_DROP:function(e){var t=e.root;t.ref.blob&&(t.ref.blob.scaleX=2.5,t.ref.blob.scaleY=2.5,t.ref.blob.opacity=0)},DID_END_DRAG:function(e){var t=e.root;t.ref.blob&&(t.ref.blob.opacity=0)}}),Gr=P({ignoreRect:!0,ignoreRectUpdate:!0,name:"drip",write:Pr}),zr=function(e){return e.root.ref.fields={}},Ur=function(e,t){return e.ref.fields[t]},Wr=function(e){e.query("GET_ACTIVE_ITEMS").forEach((function(t){e.ref.fields[t.id]&&e.element.appendChild(e.ref.fields[t.id])}))},Hr=function(e){var t=e.root;return Wr(t)},qr=G({DID_SET_DISABLED:function(e){var t=e.root;t.element.disabled=t.query("GET_DISABLED")},DID_ADD_ITEM:function(e){var t=e.root,n=e.action,r=hn("input");r.type="hidden",r.name=t.query("GET_NAME"),r.disabled=t.query("GET_DISABLED"),t.ref.fields[n.id]=r,Wr(t)},DID_LOAD_ITEM:function(e){var t=e.root,n=e.action,r=Ur(t,n.id);r&&null!==n.serverFileReference&&(r.value=n.serverFileReference)},DID_REMOVE_ITEM:function(e){var t=e.root,n=e.action,r=Ur(t,n.id);r&&(r.parentNode.removeChild(r),delete t.ref.fields[n.id])},DID_DEFINE_VALUE:function(e){var t=e.root,n=e.action,r=Ur(t,n.id);r&&(null===n.value?r.removeAttribute("value"):r.value=n.value,Wr(t))},DID_REORDER_ITEMS:Hr,DID_SORT_ITEMS:Hr}),Vr=P({tag:"fieldset",name:"data",create:zr,write:qr,ignoreRect:!0}),jr=function(e){return"getRootNode"in e?e.getRootNode():document},Yr=["jpg","jpeg","png","gif","bmp","webp","svg","tiff"],Xr=["css","csv","html","txt"],$r={zip:"zip|compressed",epub:"application/epub+zip"},Zr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e=e.toLowerCase(),Yr.includes(e)?"image/"+("jpg"===e?"jpeg":"svg"===e?"svg+xml":e):Xr.includes(e)?"text/"+e:$r[e]||""},Kr=function(e){return new Promise((function(t,n){var r=li(e);if(r.length&&!Qr(e))return t(r);Jr(e).then(t)}))},Qr=function(e){return!!e.files&&e.files.length>0},Jr=function(e){return new Promise((function(t,n){var r=(e.items?Array.from(e.items):[]).filter((function(e){return ei(e)})).map((function(e){return ti(e)}));r.length?Promise.all(r).then((function(e){var n=[];e.forEach((function(e){n.push.apply(n,e)})),t(n.filter((function(e){return e})).map((function(e){return e._relativePath||(e._relativePath=e.webkitRelativePath),e})))})).catch(console.error):t(e.files?Array.from(e.files):[])}))},ei=function(e){if(oi(e)){var t=ai(e);if(t)return t.isFile||t.isDirectory}return"file"===e.kind},ti=function(e){return new Promise((function(t,n){ii(e)?ni(ai(e)).then(t).cat
2ch(n):t([e.getAsFile()])}))},ni=function(e){return new Promise((function(t,n){var r=[],i=0,o=0,a=function(){0===o&&0===i&&t(r)},l=function e(t){i++;var l=t.createReader(),u=function t(){l.readEntries((function(n){if(0===n.length)return i--,void a();n.forEach((function(t){t.isDirectory?e(t):(o++,t.file((function(e){var n=ri(e);t.fullPath&&(n._relativePath=t.fullPath),r.push(n),o--,a()})))})),t()}),n)};u()};l(e)}))},ri=function(e){if(e.type.length)return e;var t=e.lastModifiedDate,n=e.name;return(e=e.slice(0,e.size,Zr(gt(e.name)))).name=n,e.lastModifiedDate=t,e},ii=function(e){return oi(e)&&(ai(e)||{}).isDirectory},oi=function(e){return"webkitGetAsEntry"in e},ai=function(e){return e.webkitGetAsEntry()},li=function(e){var t=[];try{if((t=si(e)).length)return t;t=ui(e)}catch(e){}return t},ui=function(e){var t=e.getData("url");return"string"==typeof t&&t.length?[t]:[]},si=function(e){var t=e.getData("text/html");if("string"==typeof t&&t.length){var n=t.match(/src\s*=\s*"(.+?)"/);if(n)return[n[1]]}return[]},ci=[],fi=function(e){return{pageLeft:e.pageX,pageTop:e.pageY,scopeLeft:e.offsetX||e.layerX,scopeTop:e.offsetY||e.layerY}},di=function(e,t,n){var r=hi(t),i={element:e,filterElement:n,state:null,ondrop:function(){},onenter:function(){},ondrag:function(){},onexit:function(){},onload:function(){},allowdrop:function(){}};return i.destroy=r.addListener(i),i},hi=function(e){var t=ci.find((function(t){return t.element===e}));if(t)return t;var n=pi(e);return ci.push(n),n},pi=function(e){var t=[],n={dragenter:Ei,dragover:_i,dragleave:bi,drop:xi},r={};i(n,(function(n,i){r[n]=i(e,t),e.addEventListener(n,r[n],!1)}));var o={element:e,addListener:function(a){return t.push(a),function(){t.splice(t.indexOf(a),1),0===t.length&&(ci.splice(ci.indexOf(o),1),i(n,(function(t){e.removeEventListener(t,r[t],!1)})))}}};return o},gi=function(e,t){return"elementFromPoint"in e||(e=document),e.elementFromPoint(t.x,t.y)},mi=function(e,t){var n=jr(t),r=gi(n,{x:e.pageX-window.pageXOffset,y:e.pageY-window.pageYOffset});return r===t||t.contains(r)},vi=null,yi=function(e,t){try{e.dropEffect=t}catch(e){}},Ei=function(e,t){return function(e){e.preventDefault(),vi=e.target,t.forEach((function(t){var n=t.element,r=t.onenter;mi(e,n)&&(t.state="enter",r(fi(e)))}))}},_i=function(e,t){return function(e){e.preventDefault();var n=e.dataTransfer;Kr(n).then((function(r){var i=!1;t.some((function(t){var o=t.filterElement,a=t.element,l=t.onenter,u=t.onexit,s=t.ondrag,c=t.allowdrop;yi(n,"copy");var f=c(r);if(f)if(mi(e,a)){if(i=!0,null===t.state)return t.state="enter",void l(fi(e));if(t.state="over",o&&!f)return void yi(n,"none");s(fi(e))}else o&&!i&&yi(n,"none"),t.state&&(t.state=null,u(fi(e)));else yi(n,"none")}))}))}},xi=function(e,t){return function(e){e.preventDefault();var n=e.dataTransfer;Kr(n).then((function(n){t.forEach((function(t){var r=t.filterElement,i=t.element,o=t.ondrop,a=t.onexit,l=t.allowdrop;if(t.state=null,!r||mi(e,i))return l(n)?void o(fi(e),n):a(fi(e))}))}))}},bi=function(e,t){return function(e){vi===e.target&&t.forEach((function(t){var n=t.onexit;t.state=null,n(fi(e))}))}},wi=function(e,t,n){e.classList.add("filepond--hopper");var r=n.catchesDropsOnPage,i=n.requiresDropOnElement,o=n.filterItems,a=void 0===o?function(e){return e}:o,l=di(e,r?document.documentElement:e,i),u="",s="";l.allowdrop=function(e){return t(a(e))},l.ondrop=function(e,n){var r=a(n);t(r)?(s="drag-drop",c.onload(r,e)):c.ondragend(e)},l.ondrag=function(e){c.ondrag(e)},l.onenter=function(e){s="drag-over",c.ondragstart(e)},l.onexit=function(e){s="drag-exit",c.ondragend(e)};var c={updateHopperState:function(){u!==s&&(e.dataset.hopperState=s,u=s)},onload:function(){},ondragstart:function(){},ondrag:function(){},ondragend:function(){},destroy:function(){l.destroy()}};return c},Di=!1,Ti=[],Ii=function(e){var t=document.activeElement;if(t&&/textarea|input/i.test(t.nodeName)){for(var n=!1,r=t;r!==document.body;){if(r.classList.contains("filepond--root")){n=!0;break}r=r.parentNode}if(!n)return}Kr(e.clipboardData).then((function(e){e.length&&Ti.forEach((function(t){return t(e)}))}))},Ai=function(e){Ti.includes(e)||(Ti.push(e),Di||(Di=!0,document.addEventListener("paste",Ii)))},Ci=function(e){Le(Ti,Ti.indexOf(e)),0===Ti.length&&(document.removeEventListener("paste",Ii),Di=!1)},Si=function(){var e=function(e){t.onload(e)},t={destroy:function(){Ci(e)},onload:function(){}};return Ai(e),t},Oi=null,Li=null,Ri=[],ki=function(e,t){e.element.textContent=t},Mi=function(e){e.element.textContent=""},Fi=function(e,t,n){var r=e.query("GET_TOTAL_ITEMS");ki(e,n+" "+t+", "+r+" "+(1===r?e.query("GET_LABEL_FILE_COUNT_SINGULAR"):e.query("GET_LABEL_FILE_COUNT_PLURAL"))),clearTimeout(Li),Li=setTimeout((function(){Mi(e)}),1500)},Ni=function(e){return e.element.parentNode.contains(document.activeElement)},Pi=function(e){var t=e.root,n=e.action,r=t.query("GET_ITEM",n.id).filename,i=t.query("GET_LABEL_FILE_PROCESSING_ABORTED");ki(t,r+" "+i)},Bi=function(e){var t=e.root,n=e.action,r=t.query("GET_ITEM",n.id).filename;ki(t,n.status.main+" "+r+" "+n.status.sub)},Gi=P({create:function(e){var t=e.root,n=e.props;
2t.element.id="filepond--assistant-"+n.id,a(t.element,"role","status"),a(t.element,"aria-live","polite"),a(t.element,"aria-relevant","additions")},ignoreRect:!0,ignoreRectUpdate:!0,write:G({DID_LOAD_ITEM:function(e){var t=e.root,n=e.action;if(Ni(t)){t.element.textContent="";var r=t.query("GET_ITEM",n.id);Ri.push(r.filename),clearTimeout(Oi),Oi=setTimeout((function(){Fi(t,Ri.join(", "),t.query("GET_LABEL_FILE_ADDED")),Ri.length=0}),750)}},DID_REMOVE_ITEM:function(e){var t=e.root,n=e.action;if(Ni(t)){var r=n.item;Fi(t,r.filename,t.query("GET_LABEL_FILE_REMOVED"))}},DID_COMPLETE_ITEM_PROCESSING:function(e){var t=e.root,n=e.action,r=t.query("GET_ITEM",n.id).filename,i=t.query("GET_LABEL_FILE_PROCESSING_COMPLETE");ki(t,r+" "+i)},DID_ABORT_ITEM_PROCESSING:Pi,DID_REVERT_ITEM_PROCESSING:Pi,DID_THROW_ITEM_REMOVE_ERROR:Bi,DID_THROW_ITEM_LOAD_ERROR:Bi,DID_THROW_ITEM_INVALID:Bi,DID_THROW_ITEM_PROCESSING_ERROR:Bi}),tag:"span",name:"assistant"}),zi=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-";return e.replace(new RegExp(t+".","g"),(function(e){return e.charAt(1).toUpperCase()}))},Ui=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=Date.now(),i=null;return function(){for(var o=arguments.length,a=new Array(o),l=0;l<o;l++)a[l]=arguments[l];clearTimeout(i);var u=Date.now()-r,s=function(){r=Date.now(),e.apply(void 0,a)};u<t?n||(i=setTimeout(s,t-u)):s()}},Wi=1e6,Hi=function(e){return e.preventDefault()},qi=function(e){var t=e.root,n=e.props,r=t.query("GET_ID");r&&(t.element.id=r);var i=t.query("GET_CLASS_NAME");i&&i.split(" ").filter((function(e){return e.length})).forEach((function(e){t.element.classList.add(e)})),t.ref.label=t.appendChildView(t.createChildView(Mr,Object.assign({},n,{translateY:null,caption:t.query("GET_LABEL_IDLE")}))),t.ref.list=t.appendChildView(t.createChildView(Er,{translateY:null})),t.ref.panel=t.appendChildView(t.createChildView(Jn,{name:"panel-root"})),t.ref.assistant=t.appendChildView(t.createChildView(Gi,Object.assign({},n))),t.ref.data=t.appendChildView(t.createChildView(Vr,Object.assign({},n))),t.ref.measure=hn("div"),t.ref.measure.style.height="100%",t.element.appendChild(t.ref.measure),t.ref.bounds=null,t.query("GET_STYLES").filter((function(e){return!H(e.value)})).map((function(e){var n=e.name,r=e.value;t.element.dataset[n]=r})),t.ref.widthPrevious=null,t.ref.widthUpdated=Ui((function(){t.ref.updateHistory=[],t.dispatch("DID_RESIZE_ROOT")}),250),t.ref.previousAspectRatio=null,t.ref.updateHistory=[];var o=window.matchMedia("(pointer: fine) and (hover: hover)").matches,a="PointerEvent"in window;t.query("GET_ALLOW_REORDER")&&a&&!o&&(t.element.addEventListener("touchmove",Hi,{passive:!1}),t.element.addEventListener("gesturestart",Hi))},Vi=function(e){var t=e.root,n=e.props,r=e.actions;if(eo({root:t,props:n,actions:r}),r.filter((function(e){return/^DID_SET_STYLE_/.test(e.type)})).filter((function(e){return!H(e.data.value)})).map((function(e){var n=e.type,r=e.data,i=zi(n.substr(8).toLowerCase(),"_");t.element.dataset[i]=r.value,t.invalidateLayout()})),!t.rect.element.hidden){t.rect.element.width!==t.ref.widthPrevious&&(t.ref.widthPrevious=t.rect.element.width,t.ref.widthUpdated());var i=t.ref.bounds;i||(i=t.ref.bounds=Xi(t),t.element.removeChild(t.ref.measure),t.ref.measure=null);var o=t.ref,a=o.hopper,l=o.label,u=o.list,s=o.panel;a&&a.updateHopperState();var c=t.query("GET_PANEL_ASPECT_RATIO"),f=t.query("GET_ALLOW_MULTIPLE"),d=t.query("GET_TOTAL_ITEMS"),h=d===(f?t.query("GET_MAX_FILES")||Wi:1),p=r.find((function(e){return"DID_ADD_ITEM"===e.type}));if(h&&p){var g=p.data.interactionMethod;l.opacity=0,f?l.translateY=-40:g===xe.API?l.translateX=40:g===xe.BROWSE?l.translateY=40:l.translateY=30}else h||(l.opacity=1,l.translateX=0,l.translateY=0);var m=ji(t),v=Yi(t),y=l.rect.element.height,E=!f||h?0:y,_=h?u.rect.element.marginTop:0,x=0===d?0:u.rect.element.marginBottom,b=E+_+v.visual+x,w=E+_+v.bounds+x;if(u.translateY=Math.max(0,E-u.rect.element.marginTop)-m.top,c){var D=t.rect.element.width,T=D*c;c!==t.ref.previousAspectRatio&&(t.ref.previousAspectRatio=c,t.ref.updateHistory=[]);var I=t.ref.updateHistory;I.push(D);var A=2;if(I.length>2*A)for(var C=I.length,S=C-10,O=0,L=C;L>=S;L--)if(I[L]===I[L-2]&&O++,O>=A)return;s.scalable=!1,s.height=T;var R=T-E-(x-m.bottom)-(h?_:0);v.visual>R?u.overflow=R:u.overflow=null,t.height=T}else if(i.fixedHeight){s.scalable=!1;var k=i.fixedHeight-E-(x-m.bottom)-(h?_:0);v.visual>k?u.overflow=k:u.overflow=null}else if(i.cappedHeight){var M=b>=i.cappedHeight,F=Math.min(i.cappedHeight,b);
2s.scalable=!0,s.height=M?F:F-m.top-m.bottom;var N=F-E-(x-m.bottom)-(h?_:0);b>i.cappedHeight&&v.visual>N?u.overflow=N:u.overflow=null,t.height=Math.min(i.cappedHeight,w-m.top-m.bottom)}else{var P=d>0?m.top+m.bottom:0;s.scalable=!0,s.height=Math.max(y,b-P),t.height=Math.max(y,w-P)}}},ji=function(e){var t=e.ref.list.childViews[0].childViews[0];return t?{top:t.rect.element.marginTop,bottom:t.rect.element.marginBottom}:{top:0,bottom:0}},Yi=function(e){var t=0,n=0,r=e.ref.list,i=r.childViews[0],o=i.childViews.filter((function(e){return e.rect.element.height})),a=e.query("GET_ACTIVE_ITEMS").map((function(e){return o.find((function(t){return t.id===e.id}))})).filter((function(e){return e}));if(0===a.length)return{visual:t,bounds:n};var l=i.rect.element.width,u=ur(i,a,r.dragCoordinates),s=a[0].rect.element,c=s.marginTop+s.marginBottom,f=s.marginLeft+s.marginRight,d=s.width+f,h=s.height+c,p=void 0!==u&&u>=0?1:0,g=a.find((function(e){return e.markedForRemoval&&e.opacity<.45}))?-1:0,m=a.length+p+g,v=Math.round(l/d);return 1===v?a.forEach((function(e){var r=e.rect.element.height+c;n+=r,t+=r*e.opacity})):(n=Math.ceil(m/v)*h,t=n),{visual:t,bounds:n}},Xi=function(e){var t=e.ref.measureHeight||null;return{cappedHeight:parseInt(e.style.maxHeight,10)||null,fixedHeight:0===t?null:t}},$i=function(e,t){var n=e.query("GET_ALLOW_REPLACE"),r=e.query("GET_ALLOW_MULTIPLE"),i=e.query("GET_TOTAL_ITEMS"),o=e.query("GET_MAX_FILES"),a=t.length;return!r&&a>1||!!(J(o=r||n?o:1)&&i+a>o)&&(e.dispatch("DID_THROW_MAX_FILES",{source:t,error:Ft("warning",0,"Max files")}),!0)},Zi=function(e,t,n){var r=e.childViews[0];return ur(r,t,{left:n.scopeLeft-r.rect.element.left,top:n.scopeTop-(e.rect.outer.top+e.rect.element.marginTop+e.rect.element.scrollTop)})},Ki=function(e){var t=e.query("GET_ALLOW_DROP"),n=e.query("GET_DISABLED"),r=t&&!n;if(r&&!e.ref.hopper){var i=wi(e.element,(function(t){if($i(e,t))return!1;var n=e.query("GET_BEFORE_DROP_FILE")||function(){return!0};return!e.query("GET_DROP_VALIDATION")||t.every((function(t){return je("ALLOW_HOPPER_ITEM",t,{query:e.query}).every((function(e){return!0===e}))&&n(t)}))}),{filterItems:function(t){var n=e.query("GET_IGNORED_FILES");return t.filter((function(e){return!Zt(e)||!n.includes(e.name.toLowerCase())}))},catchesDropsOnPage:e.query("GET_DROP_ON_PAGE"),requiresDropOnElement:e.query("GET_DROP_ON_ELEMENT")});i.onload=function(t,n){var r=e.ref.list.childViews[0].childViews.filter((function(e){return e.rect.element.height})),i=e.query("GET_ACTIVE_ITEMS").map((function(e){return r.find((function(t){return t.id===e.id}))})).filter((function(e){return e}));e.dispatch("ADD_ITEMS",{items:t,index:Zi(e.ref.list,i,n),interactionMethod:xe.DROP}),e.dispatch("DID_DROP",{position:n}),e.dispatch("DID_END_DRAG",{position:n})},i.ondragstart=function(t){e.dispatch("DID_START_DRAG",{position:t})},i.ondrag=Ui((function(t){e.dispatch("DID_DRAG",{position:t})})),i.ondragend=function(t){e.dispatch("DID_END_DRAG",{position:t})},e.ref.hopper=i,e.ref.drip=e.appendChildView(e.createChildView(Gr))}else!r&&e.ref.hopper&&(e.ref.hopper.destroy(),e.ref.hopper=null,e.removeChildView(e.ref.drip))},Qi=function(e,t){var n=e.query("GET_ALLOW_BROWSE"),r=e.query("GET_DISABLED"),i=n&&!r;i&&!e.ref.browser?e.ref.browser=e.appendChildView(e.createChildView(Or,Object.assign({},t,{onload:function(t){if($i(e,t))return!1;e.dispatch("ADD_ITEMS",{items:t,index:-1,interactionMethod:xe.BROWSE})}})),0):!i&&e.ref.browser&&(e.removeChildView(e.ref.browser),e.ref.browser=null)},Ji=function(e){var t=e.query("GET_ALLOW_PASTE"),n=e.query("GET_DISABLED"),r=t&&!n;r&&!e.ref.paster?(e.ref.paster=Si(),e.ref.paster.onload=function(t){e.dispatch("ADD_ITEMS",{items:t,index:-1,interactionMethod:xe.PASTE})}):!r&&e.ref.paster&&(e.ref.paster.destroy(),e.ref.paster=null)},eo=G({DID_SET_ALLOW_BROWSE:function(e){var t=e.root,n=e.props;Qi(t,n)},DID_SET_ALLOW_DROP:function(e){var t=e.root;Ki(t)},DID_SET_ALLOW_PASTE:function(e){var t=e.root;Ji(t)},DID_SET_DISABLED:function(e){var t=e.root,n=e.props;Ki(t),Ji(t),Qi(t,n),t.query("GET_DISABLED")?t.element.dataset.disabled="disabled":t.element.removeAttribute("data-disabled")}}),to=P({name:"root",read:function(e){var t=e.root;t.ref.measure&&(t.ref.measureHeight=t.ref.measure.offsetHeight)},create:qi,write:Vi,destroy:function(e){var t=e.root;t.ref.paster&&t.ref.paster.destroy(),t.ref.hopper&&t.ref.hopper.destroy(),t.element.removeEventListener("touchmove",Hi),t.element.removeEventListener("gesturestart",Hi)},mixins:{styles:["height"]}}),no=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=null,r=$e(),i=n(me(r),[ut,_e(r)],[fn,Ee(r)]);i.dispatch("SET_OPTIONS",{options:e});var a=function(){document.hidden||i.dispatch("KICK")};document.addEventListener("visibilitychange",a);var l=null,u=!1,s=!1,c=null,f=null,d=function(){u||(u=!0),clearTimeout(l),l=setTimeout((function(){u=!1,c=null,f=null,s&&(s=!1,i.dispatch("DID_STOP_RESIZE"))}),500)};window.addEventListener("resize",d);var h=to(i,{id:be()}),p=!1,g=!1,m={_read:function(){u&&(f=window.innerWidth,c||(c=f),s||f===c||(i.dispatch("DID_START_RESIZE"),s=!0)),g&&p&&(p=null===h.element.offsetParent),p||(h._read(),g=h.rect.element.hidden)},_write:function(e){var t=i.processActionQueue().filter((function(e){return!/^SET_/.test(e.type)}));
2p&&!t.length||(x(t),p=h._write(e,t,s),Pe(i.query("GET_ITEMS")),p&&i.processDispatchQueue())}},v=function(e){return function(t){var n={type:e};if(!t)return n;if(t.hasOwnProperty("error")&&(n.error=t.error?Object.assign({},t.error):null),t.status&&(n.status=Object.assign({},t.status)),t.file&&(n.output=t.file),t.source)n.file=t.source;else if(t.item||t.id){var r=t.item?t.item:i.query("GET_ITEM",t.id);n.file=r?Ne(r):null}return t.items&&(n.items=t.items.map(Ne)),/progress/.test(e)&&(n.progress=t.progress),t.hasOwnProperty("origin")&&t.hasOwnProperty("target")&&(n.origin=t.origin,n.target=t.target),n}},y={DID_DESTROY:v("destroy"),DID_INIT:v("init"),DID_THROW_MAX_FILES:v("warning"),DID_INIT_ITEM:v("initfile"),DID_START_ITEM_LOAD:v("addfilestart"),DID_UPDATE_ITEM_LOAD_PROGRESS:v("addfileprogress"),DID_LOAD_ITEM:v("addfile"),DID_THROW_ITEM_INVALID:[v("error"),v("addfile")],DID_THROW_ITEM_LOAD_ERROR:[v("error"),v("addfile")],DID_THROW_ITEM_REMOVE_ERROR:[v("error"),v("removefile")],DID_PREPARE_OUTPUT:v("preparefile"),DID_START_ITEM_PROCESSING:v("processfilestart"),DID_UPDATE_ITEM_PROCESS_PROGRESS:v("processfileprogress"),DID_ABORT_ITEM_PROCESSING:v("processfileabort"),DID_COMPLETE_ITEM_PROCESSING:v("processfile"),DID_COMPLETE_ITEM_PROCESSING_ALL:v("processfiles"),DID_REVERT_ITEM_PROCESSING:v("processfilerevert"),DID_THROW_ITEM_PROCESSING_ERROR:[v("error"),v("processfile")],DID_REMOVE_ITEM:v("removefile"),DID_UPDATE_ITEMS:v("updatefiles"),DID_ACTIVATE_ITEM:v("activatefile"),DID_REORDER_ITEMS:v("reorderfiles")},E=function(e){var t=Object.assign({pond:M},e);delete t.type,h.element.dispatchEvent(new CustomEvent("FilePond:"+e.type,{detail:t,bubbles:!0,cancelable:!0,composed:!0}));var n=[];e.hasOwnProperty("error")&&n.push(e.error),e.hasOwnProperty("file")&&n.push(e.file);var r=["type","error","file"];Object.keys(e).filter((function(e){return!r.includes(e)})).forEach((function(t){return n.push(e[t])})),M.fire.apply(M,[e.type].concat(n));var o=i.query("GET_ON"+e.type.toUpperCase());o&&o.apply(void 0,n)},x=function(e){e.length&&e.filter((function(e){return y[e.type]})).forEach((function(e){var t=y[e.type];(Array.isArray(t)?t:[t]).forEach((function(t){"DID_INIT_ITEM"===e.type?E(t(e.data)):setTimeout((function(){E(t(e.data))}),0)}))}))},b=function(e){return i.dispatch("SET_OPTIONS",{options:e})},w=function(e){return i.query("GET_ACTIVE_ITEM",e)},D=function(e){return new Promise((function(t,n){i.dispatch("REQUEST_ITEM_PREPARE",{query:e,success:function(e){t(e)},failure:function(e){n(e)}})}))},T=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(n,r){C([{source:e,options:t}],{index:t.index}).then((function(e){return n(e&&e[0])})).catch(r)}))},I=function(e){return e.file&&e.id},A=function(e,t){return"object"!=typeof e||I(e)||t||(t=e,e=void 0),i.dispatch("REMOVE_ITEM",Object.assign({},t,{query:e})),null===i.query("GET_ACTIVE_ITEM",e)},C=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Promise((function(e,n){var r=[],o={};if(W(t[0]))r.push.apply(r,t[0]),Object.assign(o,t[1]||{});else{var a=t[t.length-1];"object"!=typeof a||a instanceof Blob||Object.assign(o,t.pop()),r.push.apply(r,t)}i.dispatch("ADD_ITEMS",{items:r,index:o.index,interactionMethod:xe.API,success:e,failure:n})}))},S=function(){return i.query("GET_ACTIVE_ITEMS")},O=function(e){return new Promise((function(t,n){i.dispatch("REQUEST_ITEM_PROCESSING",{query:e,success:function(e){t(e)},failure:function(e){n(e)}})}))},L=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Array.isArray(t[0])?t[0]:t,i=r.length?r:S();return Promise.all(i.map(D))},R=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Array.isArray(t[0])?t[0]:t;if(!r.length){var i=S().filter((function(e){return!(e.status===Be.IDLE&&e.origin===Ge.LOCAL)&&e.status!==Be.PROCESSING&&e.status!==Be.PROCESSING_COMPLETE&&e.status!==Be.PROCESSING_REVERT_ERROR}));return Promise.all(i.map(O))}return Promise.all(r.map(O))},k=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=Array.isArray(t[0])?t[0]:t;"object"==typeof i[i.length-1]?r=i.pop():Array.isArray(t[0])&&(r=t[1]);var o=S();return i.length?i.map((function(e){return _(e)?o[e]?o[e].id:null:e})).filter((function(e){return e})).map((function(e){return A(e,r)})):Promise.all(o.map((function(e){return A(e,r)})))},M=Object.assign({},ke(),{},m,{},ye(i,r),{setOptions:b,addFile:T,addFiles:C,getFile:w,processFile:O,prepareFile:D,removeFile:A,moveFile:function(e,t){return i.dispatch("MOVE_ITEM",{query:e,index:t})},getFiles:S,processFiles:R,removeFiles:k,prepareFiles:L,sort:function(e){return i.dispatch("SORT",{c
2ompare:e})},browse:function(){var e=h.element.querySelector("input[type=file]");e&&e.click()},destroy:function(){M.fire("destroy",h.element),i.dispatch("ABORT_ALL"),h._destroy(),window.removeEventListener("resize",d),document.removeEventListener("visibilitychange",a),i.dispatch("DID_DESTROY")},insertBefore:function(e){return z(h.element,e)},insertAfter:function(e){return U(h.element,e)},appendTo:function(e){return e.appendChild(h.element)},replaceElement:function(e){z(h.element,e),e.parentNode.removeChild(e),t=e},restoreElement:function(){t&&(U(t,h.element),h.element.parentNode.removeChild(h.element),t=null)},isAttachedTo:function(e){return h.element===e||t===e},element:{get:function(){return h.element}},status:{get:function(){return i.query("GET_STATUS")}}});return i.dispatch("DID_INIT"),o(M)},ro=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return i($e(),(function(e,n){t[e]=n[0]})),no(Object.assign({},t,{},e))},io=function(e){return e.charAt(0).toLowerCase()+e.slice(1)},oo=function(e){return zi(e.replace(/^data-/,""))},ao=function e(t,n){i(n,(function(n,r){i(t,(function(e,i){var o=new RegExp(n);if(o.test(e)&&(delete t[e],!1!==r))if($(r))t[r]=i;else{var a=r.group;le(r)&&!t[a]&&(t[a]={}),t[a][io(e.replace(o,""))]=i}})),r.mapping&&e(t[r.group],r.mapping)}))},lo=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[];i(e.attributes,(function(t){n.push(e.attributes[t])}));var r=n.filter((function(e){return e.name})).reduce((function(t,n){var r=a(e,n.name);return t[oo(n.name)]=r===n.name||r,t}),{});return ao(r,t),r},uo=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={"^class$":"className","^multiple$":"allowMultiple","^capture$":"captureMethod","^webkitdirectory$":"allowDirectoriesOnly","^server":{group:"server",mapping:{"^process":{group:"process"},"^revert":{group:"revert"},"^fetch":{group:"fetch"},"^restore":{group:"restore"},"^load":{group:"load"}}},"^type$":!1,"^files$":!1};je("SET_ATTRIBUTE_TO_OPTION_MAP",n);var r=Object.assign({},t),i=lo("FIELDSET"===e.nodeName?e.querySelector("input[type=file]"):e,n);
2Object.keys(i).forEach((function(e){le(i[e])?(le(r[e])||(r[e]={}),Object.assign(r[e],i[e])):r[e]=i[e]})),r.files=(t.files||[]).concat(Array.from(e.querySelectorAll("input:not([type=file])")).map((function(e){return{source:e.value,options:{type:e.dataset.type}}})));var o=ro(r);return e.files&&Array.from(e.files).forEach((function(e){o.addFile(e)})),o.replaceElement(e),o},so=function(){return t(arguments.length<=0?void 0:arguments[0])?uo.apply(void 0,arguments):ro.apply(void 0,arguments)},co=["fire","_read","_write"],fo=function(e){var t={};return Me(e,t,co),t},ho=function(e,t){return e.replace(/(?:{([a-zA-Z]+)})/g,(function(e,n){return t[n]}))},po=function(e){var t=new Blob(["(",e.toString(),")()"],{type:"application/javascript"}),n=URL.createObjectURL(t),r=new Worker(n);return{transfer:function(e,t){},post:function(e,t,n){var i=be();r.onmessage=function(e){e.data.id===i&&t(e.data.message)},r.postMessage({id:i,message:e},n)},terminate:function(){r.terminate(),URL.revokeObjectURL(n)}}},go=function(e){return new Promise((function(t,n){var r=new Image;r.onload=function(){t(r)},r.onerror=function(e){n(e)},r.src=e}))},mo=function(e,t){var n=e.slice(0,e.size,e.type);return n.lastModifiedDate=e.lastModifiedDate,n.name=t,n},vo=function(e){return mo(e,e.name)},yo=[],Eo=function(e){if(!yo.includes(e)){yo.push(e);var t=e({addFilter:Ye,utils:{Type:He,forin:i,isString:$,isFile:Zt,toNaturalFileSize:_n,replaceInString:ho,getExtensionFromFilename:gt,getFilenameWithoutExtension:Xt,guesstimateMimeType:Zr,getFileFromBlob:Et,getFilenameFromURL:pt,createRoute:G,createWorker:po,createView:P,createItemAPI:Ne,loadImage:go,copyFile:vo,renameFile:mo,createBlob:xt,applyFilterChain:Ve,text:pn,getNumericAspectRatioFromString:Je},views:{fileActionButton:En}});Xe(t.options)}},_o=function(){return"[object OperaMini]"===Object.prototype.toString.call(window.operamini)},xo=function(){return"Promise"in window},bo=function(){return"slice"in Blob.prototype},wo=function(){return"URL"in window&&"createObjectURL"in window.URL},Do=function(){return"visibilityState"in document},To=function(){return"performance"in window},Io=function(){return"supports"in(window.CSS||{})},Ao=function(){return/MSIE|Trident/.test(window.navigator.userAgent)},Co=(Mn=g()&&!_o()&&Do()&&xo()&&bo()&&wo()&&To()&&(Io()||Ao()),function(){return Mn}),So={apps:[]},Oo="filepond",Lo=function(){};if(e.Status={},e.FileStatus={},e.FileOrigin={},e.OptionTypes={},e.create=Lo,e.destroy=Lo,e.parse=Lo,e.find=Lo,e.registerPlugin=Lo,e.getOptions=Lo,e.setOptions=Lo,Co()){B((function(){So.apps.forEach((function(e){return e._read()}))}),(function(e){So.apps.forEach((function(t){return t._write(e)}))}));var Ro=function t(){document.dispatchEvent(new CustomEvent("FilePond:loaded",{detail:{supported:Co,create:e.create,destroy:e.destroy,parse:e.parse,find:e.find,registerPlugin:e.registerPlugin,setOptions:e.setOptions}})),document.removeEventListener("DOMContentLoaded",t)};"loading"!==document.readyState?setTimeout((function(){return Ro()}),0):document.addEventListener("DOMContentLoaded",Ro);var ko=function(){return i($e(),(function(t,n){e.OptionTypes[t]=n[1]}))};e.Status=Object.assign({},tt),e.FileOrigin=Object.assign({},Ge),e.FileStatus=Object.assign({},Be),e.OptionTypes={},ko(),e.create=function(){var t=so.apply(void 0,arguments);return t.on("destroy",e.destroy),So.apps.push(t),fo(t)},e.destroy=function(e){var t=So.apps.findIndex((function(t){return t.isAttachedTo(e)}));return t>=0&&(So.apps.splice(t,1)[0].restoreElement(),!0)},e.parse=function(t){return Array.from(t.querySelectorAll("."+Oo)).filter((function(e){return!So.apps.find((function(t){return t.isAttachedTo(e)}))})).map((function(t){return e.create(t)}))},e.find=function(e){var t=So.apps.find((function(t){return t.isAttachedTo(e)}));return t?fo(t):null},e.registerPlugin=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t.forEach(Eo),ko()},e.getOptions=function(){var e={};return i($e(),(function(t,n){e[t]=n[0]})),e},e.setOptions=function(t){return le(t)&&(So.apps.forEach((function(e){e.setOptions(t)})),Ze(t)),e.getOptions()}}
2e.supported=Co,Object.defineProperty(e,"__esModule",{value:!0})}(t)},96486:function(e,t,n){var r;e=n.nmd(e),function(){var i,o="Expected a function",a="__lodash_hash_undefined__",l="__lodash_placeholder__",u=16,s=32,c=64,f=128,d=256,h=1/0,p=9007199254740991,g=NaN,m=4294967295,v=[["ary",f],["bind",1],["bindKey",2],["curry",8],["curryRight",u],["flip",512],["partial",s],["partialRight",c],["rearg",d]],y="[object Arguments]",E="[object Array]",_="[object Boolean]",x="[object Date]",b="[object Error]",w="[object Function]",D="[object GeneratorFunction]",T="[object Map]",I="[object Number]",A="[object Object]",C="[object Promise]",S="[object RegExp]",O="[object Set]",L="[object String]",R="[object Symbol]",k="[object WeakMap]",M="[object ArrayBuffer]",F="[object DataView]",N="[object Float32Array]",P="[object Float64Array]",B="[object Int8Array]",G="[object Int16Array]",z="[object Int32Array]",U="[object Uint8Array]",W="[object Uint8ClampedArray]",H="[object Uint16Array]",q="[object Uint32Array]",V=/\b__p \+= '';/g,j=/\b(__p \+=) '' \+/g,Y=/(__e\(.*?\)|\b__t\)) \+\n'';/g,X=/&(?:amp|lt|gt|quot|#39);/g,$=/[&<>"']/g,Z=RegExp(X.source),K=RegExp($.source),Q=/<%-([\s\S]+?)%>/g,J=/<%([\s\S]+?)%>/g,ee=/<%=([\s\S]+?)%>/g,te=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ne=/^\w*$/,re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ie=/[\\^$.*+?()[\]{}|]/g,oe=RegExp(ie.source),ae=/^\s+/,le=/\s/,ue=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,se=/\{\n\/\* \[wrapped with (.+)\] \*/,ce=/,? & /,fe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,de=/[()=,{}\[\]\/\s]/,he=/\\(\\)?/g,pe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ge=/\w*$/,me=/^[-+]0x[0-9a-f]+$/i,ve=/^0b[01]+$/i,ye=/^\[object .+?Constructor\]$/,Ee=/^0o[0-7]+$/i,_e=/^(?:0|[1-9]\d*)$/,xe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u01
vendor: 7,871 bytes, line 2
27f]/g,be=/($^)/,we=/['\n\r\u2028\u2029\\]/g,De="\\ud800-\\udfff",Te="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ie="\\u2700-\\u27bf",Ae="a-z\\xdf-\\xf6\\xf8-\\xff",Ce="A-Z\\xc0-\\xd6\\xd8-\\xde",Se="\\ufe0e\\ufe0f",Oe="\\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",Le="['’]",Re="["+De+"]",ke="["+Oe+"]",Me="["+Te+"]",Fe="\\d+",Ne="["+Ie+"]",Pe="["+Ae+"]",Be="[^"+De+Oe+Fe+Ie+Ae+Ce+"]",Ge="\\ud83c[\\udffb-\\udfff]",ze="[^"+De+"]",Ue="(?:\\ud83c[\\udde6-\\uddff]){2}",We="[\\ud800-\\udbff][\\udc00-\\udfff]",He="["+Ce+"]",qe="\\u200d",Ve="(?:"+Pe+"|"+Be+")",je="(?:"+He+"|"+Be+")",Ye="(?:['’](?:d|ll|m|re|s|t|ve))?",Xe="(?:['’](?:D|LL|M|RE|S|T|VE))?",$e="(?:"+Me+"|"+Ge+")"+"?",Ze="["+Se+"]?",Ke=Ze+$e+("(?:"+qe+"(?:"+[ze,Ue,We].join("|")+")"+Ze+$e+")*"),Qe="(?:"+[Ne,Ue,We].join("|")+")"+Ke,Je="(?:"+[ze+Me+"?",Me,Ue,We,Re].join("|")+")",et=RegExp(Le,"g"),tt=RegExp(Me,"g"),nt=RegExp(Ge+"(?="+Ge+")|"+Je+Ke,"g"),rt=RegExp([He+"?"+Pe+"+"+Ye+"(?="+[ke,He,"$"].join("|")+")",je+"+"+Xe+"(?="+[ke,He+Ve,"$"].join("|")+")",He+"?"+Ve+"+"+Ye,He+"+"+Xe,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Fe,Qe].join("|"),"g"),it=RegExp("["+qe+De+Te+Se+"]"),ot=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,at=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],lt=-1,ut={};ut[N]=ut[P]=ut[B]=ut[G]=ut[z]=ut[U]=ut[W]=ut[H]=ut[q]=!0,ut[y]=ut[E]=ut[M]=ut[_]=ut[F]=ut[x]=ut[b]=ut[w]=ut[T]=ut[I]=ut[A]=ut[S]=ut[O]=ut[L]=ut[k]=!1;var st={};st[y]=st[E]=st[M]=st[F]=st[_]=st[x]=st[N]=st[P]=st[B]=st[G]=st[z]=st[T]=st[I]=st[A]=st[S]=st[O]=st[L]=st[R]=st[U]=st[W]=st[H]=st[q]=!0,st[b]=st[w]=st[k]=!1;var ct={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ft=parseFloat,dt=parseInt,ht="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,pt="object"==typeof self&&self&&self.Object===Object&&self,gt=ht||pt||Function("return this")(),mt=t&&!t.nodeType&&t,vt=mt&&e&&!e.nodeType&&e,yt=vt&&vt.exports===mt,Et=yt&&ht.process,_t=function(){try{var e=vt&&vt.require&&vt.require("util").types;return e||Et&&Et.binding&&Et.binding("util")}catch(e){}}(),xt=_t&&_t.isArrayBuffer,bt=_t&&_t.isDate,wt=_t&&_t.isMap,Dt=_t&&_t.isRegExp,Tt=_t&&_t.isSet,It=_t&&_t.isTypedArray;function At(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Ct(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function St(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Ot(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Lt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Rt(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function kt(e,t){return!!(null==e?0:e.length)&&Ht(e,t,0)>-1}function Mt(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function Ft(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function Nt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Pt(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function Bt(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function Gt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var zt=Yt("length");function Ut(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function Wt(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function Ht(e,t,n){return t==t?function(e,t,n){var r=n-1,i=e.length;for(;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):Wt(e,Vt,n)}function qt(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function Vt(e){return e!=e}function jt(e,t){var n=null==e?0:e.length;return n?Zt(e,t)/n:g}function Yt(e){return function(t){return null==t?i:t[e]}}function Xt(e){return function(t){return null==e?i:e[t]}}function $t(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function Zt(e,t){for(var n,r=-1,o=e.length;++r<o;){var a=t(e[r]);a!==i&&(n=n===i?a:n+a)}return n}function Kt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Qt(e){return e?e.slice(0,vn(e)+1).replace(ae,""):e}function Jt(e){return function(t){return e(t)}}function en(e,t){return Ft(t,(function(t){return e[t]}))}function tn(e,t){return e.has(t)}function nn(e,t){for(var n=-1,r=e.length;++n<r&&Ht(t,e[n],0)>-1;);return n}function rn(e,t){for(var n=e.length;n--&&Ht(t,e[n],0)>-1;);return n}function on(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var an=Xt({À:"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"}),ln=Xt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function un(e){return"\\"+ct[e]}function sn(e){return it.test(e)}function cn(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function fn(e,t){return function(n){return e(t(n))}}function dn(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n];a!==t&&a!==l||(e[n]=l,o[i++]=n)}return o}function hn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function pn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function gn(e){return sn(e)?function(e){var t=nt.lastIndex=0;for(;nt.test(e);)++t;return t}(e):zt(e)}function mn(e){return sn(e)?function(e){return e.match(nt)||[]}(e):function(e){return e.split("")}(e)}function vn(e){for(var t=e.length;t--&&le.test(e.charAt(t)););return t}var yn=Xt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var En=function e(t){var n,r=(t=null==t?gt:En.defaults(gt.Object(),t,En.pick(gt,at))).Array,le=t.Date,De=t.Error,Te=t.Function,Ie=t.Math,Ae=t.Object,Ce=t.RegExp,Se=t.String,Oe=t.TypeError,Le=r.prototype,Re=Te.prototype,ke=Ae.prototype,Me=t["__core-js_shared__"],Fe=Re.toString,Ne=ke.hasOwnProperty,Pe=0,Be=(n=/[^.]+$/.exec(Me&&Me.keys&&Me.keys.IE_PROTO||""))?"Symbol(sr
2c)_1."+n:"",Ge=ke.toString,ze=Fe.call(Ae),Ue=gt._,We=Ce("^"+Fe.call(Ne).replace(ie,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),He=yt?t.Buffer:i,qe=t.Symbol,Ve=t.Uint8Array,je=He?He.allocUnsafe:i,Ye=fn(Ae.getPrototypeOf,Ae),Xe=Ae.create,$e=ke.propertyIsEnumerable,Ze=Le.splice,Ke=qe?qe.isConcatSpreadable:i,Qe=qe?qe.iterator:i,Je=qe?qe.toStringTag:i,nt=function(){try{var e=po(Ae,"defineProperty");return e({},"",{}),e}catch(e){}}(),it=t.clearTimeout!==gt.clearTimeout&&t.clearTimeout,ct=le&&le.now!==gt.Date.now&&le.now,ht=t.setTimeout!==gt.setTimeout&&t.setTimeout,pt=Ie.ceil,mt=Ie.floor,vt=Ae.getOwnPropertySymbols,Et=He?He.isBuffer:i,_t=t.isFinite,zt=Le.join,Xt=fn(Ae.keys,Ae),_n=Ie.max,xn=Ie.min,bn=le.now,wn=t.parseInt,Dn=Ie.random,Tn=Le.reverse,In=po(t,"DataView"),An=po(t,"Map"),Cn=po(t,"Promise"),Sn=po(t,"Set"),On=po(t,"WeakMap"),Ln=po(Ae,"create"),Rn=On&&new On,kn={},Mn=Uo(In),Fn=Uo(An),Nn=Uo(Cn),Pn=Uo(Sn),Bn=Uo(On),Gn=qe?qe.prototype:i,zn=Gn?Gn.valueOf:i,Un=Gn?Gn.toString:i;function Wn(e){if(il(e)&&!Ya(e)&&!(e instanceof jn)){if(e instanceof Vn)return e;if(Ne.call(e,"__wrapped__"))return Wo(e)}return new Vn(e)}var Hn=function(){function e(){}return function(t){if(!rl(t))return{};if(Xe)return Xe(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function qn(){}function Vn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function jn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=m,this.__views__=[]}function Yn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Xn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function $n(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Zn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new $n;++t<n;)this.add(e[t])}function Kn(e){var t=this.__data__=new Xn(e);this.size=t.size}function Qn(e,t){var n=Ya(e),r=!n&&ja(e),i=!n&&!r&&Ka(e),o=!n&&!r&&!i&&dl(e),a=n||r||i||o,l=a?Kt(e.length,Se):[],u=l.length;for(var s in e)!t&&!Ne.call(e,s)||a&&("length"==s||i&&("offset"==s||"parent"==s)||o&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||xo(s,u))||l.push(s);return l}function Jn(e){var t=e.length;return t?e[Zr(0,t-1)]:i}function er(e,t){return Bo(Li(e),sr(t,0,e.length))}function tr(e){return Bo(Li(e))}function nr(e,t,n){(n!==i&&!Ha(e[t],n)||n===i&&!(t in e))&&lr(e,t,n)}function rr(e,t,n){var r=e[t];Ne.call(e,t)&&Ha(r,n)&&(n!==i||t in e)||lr(e,t,n)}function ir(e,t){for(var n=e.length;n--;)if(Ha(e[n][0],t))return n;return-1}function or(e,t,n,r){return pr(e,(function(e,i,o){t(r,e,n(e),o)})),r}function ar(e,t){return e&&Ri(t,Ml(t),e)}function lr(e,t,n){"__proto__"==t&&nt?nt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ur(e,t){for(var n=-1,o=t.length,a=r(o),l=null==e;++n<o;)a[n]=l?i:Sl(e,t[n]);return a}function sr(e,t,n){return e==e&&(n!==i&&(e=e<=n?e:n),t!==i&&(e=e>=t?e:t)),e}function cr(e,t,n,r,o,a){var l,u=1&t,s=2&t,c=4&t;if(n&&(l=o?n(e,r,o,a):n(e)),l!==i)return l;if(!rl(e))return e;var f=Ya(e);if(f){if(l=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Ne.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!u)return Li(e,l)}else{var d=vo(e),h=d==w||d==D;if(Ka(e))return Ti(e,u);if(d==A||d==y||h&&!o){if(l=s||h?{}:Eo(e),!u)return s?function(e,t){return Ri(e,mo(e),t)}(e,function(e,t){return e&&Ri(t,Fl(t),e)}(l,e)):function(e,t){return Ri(e,go(e),t)}(e,ar(l,e))}else{if(!st[d])return o?e:{};l=function(e,t,n){var r=e.constructor;switch(t){case M:return Ii(e);case _:case x:return new r(+e);case F:return function(e,t){var n=t?Ii(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case N:case P:case B:case G:case z:case U:case W:case H:case q:return Ai(e,n);case T:return new r;case I:case L:return new r(e);case S:return function(e){var t=new e.constructor(e.source,ge.exec(e));return t.lastIndex=e.lastIndex,t}(e);case O:return new r;case R:return i=e,zn?Ae(zn.call(i)):{}}var i}(e,d,u)}}a||(a=new Kn);var p=a.get(e);if(p)return p;a.set(e,l),sl(e)?e.forEach((function(r){l.add(cr(r,t,n,r,e,a))})):ol(e)&&e.forEach((function(r,i){l.set(i,cr(r,t,n,i,e,a))}));var g=f?i:(c?s?ao:oo:s?Fl:Ml)(e);return St(g||e,(function(r,i){g&&(r=e[i=r]),rr(l,i,cr(r,t,n,i,e,a))})),l}function fr(e,t,n){var r=n.length;if(null==e)return!r;for(e=Ae(e);r--;){var o=n[r],a=t[o],l=e[o];if(l===i&&!(o in e)||!a(l))return!1}return!0}function dr(e,t,n){if("function"!=typeof e)throw new Oe(o);return Mo((function(){e.apply(i,n)}),t)}function hr(e,t,n,r){var i=-1,o=kt,a=!0,l=e.length,u=[],s=t.length;if(!l)return u;n&&(t=Ft(t,Jt(n))),r?(o=Mt,a=!1):t.length>=200&&(o=tn,a=!1,t=new Zn(t));e:for(;++i<l;){var c=e[i],f=null==n?c:n(c);if(c=r||0!==c?c:0,a&&f==f){for(var d=s;d--;
vendor: 9,351 bytes, line 2
2)if(t[d]===f)continue e;u.push(c)}else o(t,f,r)||u.push(c)}return u}Wn.templateSettings={escape:Q,evaluate:J,interpolate:ee,variable:"",imports:{_:Wn}},Wn.prototype=qn.prototype,Wn.prototype.constructor=Wn,Vn.prototype=Hn(qn.prototype),Vn.prototype.constructor=Vn,jn.prototype=Hn(qn.prototype),jn.prototype.constructor=jn,Yn.prototype.clear=function(){this.__data__=Ln?Ln(null):{},this.size=0},Yn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Yn.prototype.get=function(e){var t=this.__data__;if(Ln){var n=t[e];return n===a?i:n}return Ne.call(t,e)?t[e]:i},Yn.prototype.has=function(e){var t=this.__data__;return Ln?t[e]!==i:Ne.call(t,e)},Yn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ln&&t===i?a:t,this},Xn.prototype.clear=function(){this.__data__=[],this.size=0},Xn.prototype.delete=function(e){var t=this.__data__,n=ir(t,e);return!(n<0)&&(n==t.length-1?t.pop():Ze.call(t,n,1),--this.size,!0)},Xn.prototype.get=function(e){var t=this.__data__,n=ir(t,e);return n<0?i:t[n][1]},Xn.prototype.has=function(e){return ir(this.__data__,e)>-1},Xn.prototype.set=function(e,t){var n=this.__data__,r=ir(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},$n.prototype.clear=function(){this.size=0,this.__data__={hash:new Yn,map:new(An||Xn),string:new Yn}},$n.prototype.delete=function(e){var t=fo(this,e).delete(e);return this.size-=t?1:0,t},$n.prototype.get=function(e){return fo(this,e).get(e)},$n.prototype.has=function(e){return fo(this,e).has(e)},$n.prototype.set=function(e,t){var n=fo(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Zn.prototype.add=Zn.prototype.push=function(e){return this.__data__.set(e,a),this},Zn.prototype.has=function(e){return this.__data__.has(e)},Kn.prototype.clear=function(){this.__data__=new Xn,this.size=0},Kn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Kn.prototype.get=function(e){return this.__data__.get(e)},Kn.prototype.has=function(e){return this.__data__.has(e)},Kn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Xn){var r=n.__data__;if(!An||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new $n(r)}return n.set(e,t),this.size=n.size,this};var pr=Fi(br),gr=Fi(wr,!0);function mr(e,t){var n=!0;return pr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function vr(e,t,n){for(var r=-1,o=e.length;++r<o;){var a=e[r],l=t(a);if(null!=l&&(u===i?l==l&&!fl(l):n(l,u)))var u=l,s=a}return s}function yr(e,t){var n=[];return pr(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function Er(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=_o),i||(i=[]);++o<a;){var l=e[o];t>0&&n(l)?t>1?Er(l,t-1,n,r,i):Nt(i,l):r||(i[i.length]=l)}return i}var _r=Ni(),xr=Ni(!0);function br(e,t){return e&&_r(e,t,Ml)}function wr(e,t){return e&&xr(e,t,Ml)}function Dr(e,t){return Rt(t,(function(t){return el(e[t])}))}function Tr(e,t){for(var n=0,r=(t=xi(t,e)).length;null!=e&&n<r;)e=e[zo(t[n++])];return n&&n==r?e:i}function Ir(e,t,n){var r=t(e);return Ya(e)?r:Nt(r,n(e))}function Ar(e){return null==e?e===i?"[object Undefined]":"[object Null]":Je&&Je in Ae(e)?function(e){var t=Ne.call(e,Je),n=e[Je];try{e[Je]=i;var r=!0}catch(e){}var o=Ge.call(e);r&&(t?e[Je]=n:delete e[Je]);return o}(e):function(e){return Ge.call(e)}(e)}function Cr(e,t){return e>t}function Sr(e,t){return null!=e&&Ne.call(e,t)}function Or(e,t){return null!=e&&t in Ae(e)}function Lr(e,t,n){for(var o=n?Mt:kt,a=e[0].length,l=e.length,u=l,s=r(l),c=1/0,f=[];u--;){var d=e[u];u&&t&&(d=Ft(d,Jt(t))),c=xn(d.length,c),s[u]=!n&&(t||a>=120&&d.length>=120)?new Zn(u&&d):i}d=e[0];var h=-1,p=s[0];e:for(;++h<a&&f.length<c;){var g=d[h],m=t?t(g):g;if(g=n||0!==g?g:0,!(p?tn(p,m):o(f,m,n))){for(u=l;--u;){var v=s[u];if(!(v?tn(v,m):o(e[u],m,n)))continue e}p&&p.push(m),f.push(g)}}return f}function Rr(e,t,n){var r=null==(e=Oo(e,t=xi(t,e)))?e:e[zo(Jo(t))];return null==r?i:At(r,e,n)}function kr(e){return il(e)&&Ar(e)==y}function Mr(e,t,n,r,o){return e===t||(null==e||null==t||!il(e)&&!il(t)?e!=e&&t!=t:function(e,t,n,r,o,a){var l=Ya(e),u=Ya(t),s=l?E:vo(e),c=u?E:vo(t),f=(s=s==y?A:s)==A,d=(c=c==y?A:c)==A,h=s==c;if(h&&Ka(e)){if(!Ka(t))return!1;l=!0,f=!1}if(h&&!f)return a||(a=new Kn),l||dl(e)?ro(e,t,n,r,o,a):function(e,t,n,r,i,o,a){switch(n){case F:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case M:return!(e.byteLength!=t.byteLength||!o(new Ve(e),new Ve(t)));case _:case x:case I:return Ha(+e,+t);case b:return e.name==t.name&&e.message==t.message;case S:case L:return e==t+"";case T:var l=cn;case O:var u=1&r;if(l||(l=hn),e.size!=t.size&&!u)return!1;var s=a.get(e);if(s)return s==t;r|=2,a.set(e,t);var c=ro(l(e),l(t),r,i,o,a);return a.delete(e),c;case R:if(zn)return zn.call(e)==zn.call(t)}return!1}(e,t,s,n,r,o,a);if(!(1&n)){var p=f&&Ne.call(e,"__wrapped__"),g=d&&Ne.call(t,"__wrapped__");if(p||g){var m=p?e.value():e,v=g?t.value():t;return a||(a=new Kn),o(m,v,n,r,a)}}if(!h)return!1;return a||(a=new Kn),function(e,t,n,r,o,a){var l=1&n,u=oo(e),s=u.length,c=oo(t),f=c.length;if(s!=f&&!l)return!1;var d=s;for(;d--;){var h=u[d];if(!(l?h in t:Ne.call(t,h)))return!1}var p=a.get(e),g=a.get(t);if(p&&g)return p==t&&g==e;var m=!0;a.set(e,t),a.set(t,e);var v=l;for(;++d<s;){var y=e[h=u[d]],E=t[h];if(r)var _=l?r(E,y,h,t,e,a):r(y,E,h,e,t,a);if(!(_===i?y===E||o(y,E,n,r,a):_)){m=!1;break}v||(v="constructor"==h)}if(m&&!v){var x=e.constructor,b=t.constructor;x==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof x&&x instanceof x&&"function"==typeof b&&b instanceof b||(m=!1)}return a.delete(e),a.delete(t),m}(e,t,n,r,o,a)}(e,t,n,r,Mr,o))}function Fr(e,t,n,r){var o=n.length,a=o,l=!r;if(null==e)return!a;for(e=Ae(e);o--;){var u=n[o];if(l&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<a;){var s=(u=n[o])[0],c=e[s],f=u[1];if(l&&u[2]){if(c===i&&!(s in e))return!1}else{var d=new Kn;if(r)var h=r(c,f,s,e,t,d);if(!(h===i?Mr(f,c,3,r,d):h))return!1}}return!0}function Nr(e){return!(!rl(e)||(t=e,Be&&Be in t))&&(el(e)?We:ye).test(Uo(e));var t}function Pr(e){return"function"==typeof e?e:null==e?au:"object"==typeof e?Ya(e)?Hr(e[0],e[1]):Wr(e):gu(e)}function Br(e){if(!Io(e))return Xt(e);var t=[];for(var n in Ae(e))Ne.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Gr(e){if(!rl(e))return function(e){var t=[];if(null!=e)for(var n in Ae(e))t.push(n);return t}(e);var t=Io(e),n=[];for(var r in e)("constructor"!=r||!t&&Ne.call(e,r))&&n.push(r);return n}function zr(e,t){return e<t}function Ur(e,t){var n=-1,i=$a(e)?r(e.length):[];return pr(e,(function(e,r,o){i[++n]=t(e,r,o)})),i}function Wr(e){var t=ho(e);return 1==t.length&&t[0][2]?Co(t[0][0],t[0][1]):function(n){return n===e||Fr(n,e,t)}}function Hr(e,t){return wo(e)&&Ao(t)?Co(zo(e),t):function(n){var r=Sl(n,e);return r===i&&r===t?Ol(n,e):Mr(t,r,3)}}function qr(e,t,n,r,o){e!==t&&_r(t,(function(a,l){if(o||(o=new Kn),rl(a))!function(e,t,n,r,o,a,l){var u=Ro(e,n),s=Ro(t,n),c=l.get(s);if(c)return void nr(e,n,c);var f=a?a(u,s,n+"",e,t,l):i,d=f===i;if(d){var h=Ya(s),p=!h&&Ka(s),g=!h&&!p&&dl(s);f=s,h||p||g?Ya(u)?f=u:Za(u)?f=Li(u):p?(d=!1,f=Ti(s,!0)):g?(d=!1,f=Ai(s,!0)):f=[]:ll(s)||ja(s)?(f=u,ja(u)?f=_l(u):rl(u)&&!el(u)||(f=Eo(s))):d=!1}d&&(l.set(s,f),o(f,s,r,a,l),l.delete(s));nr(e,n,f)}(e,t,l,n,qr,r,o);else{var u=r?r(Ro(e,l),a,l+"",e,t,o):i;u===i&&(u=a),nr(e,l,u)}}),Fl)}function Vr(e,t){var n=e.length;if(n)return xo(t+=t<0?n:0,n)?e[t]:i}function jr(e,t,n){t=t.length?Ft(t,(function(e){return Ya(e)?function(t){return Tr(t,1===e.length?e[0]:e)}:e})):[au];var r=-1;t=Ft(t,Jt(co()));var i=Ur(e,(function(e,n,i){var o=Ft(t,(function(t){return t(e)}));return{criteria:o,index:++r,value:e}}));return function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(i,(function(e,t){return function(e,t,n){var r=-1,i=e.criteria,o=t.criteria,a=i.length,l=n.length;for(;++r<a;){var u=Ci(i[r],o[r]);if(u)return r>=l?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function Yr(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],l=Tr(e,a);n(l,a)&&ti(o,xi(a,e),l)}return o}function Xr(e,t,n,r){var i=r?qt:Ht,o=-1,a=t.length,l=e;for(e===t&&(t=Li(t)),n&&(l=Ft(e,Jt(n)));++o<a;)for(var u=0,s=t[o],c=n?n(s):s;(u=i(l,c,u,r))>-1;)l!==e&&Ze.call(l,u,1),Ze.call(e,u,1);return e}function $r(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;xo(i)?Ze.call(e,i,1):hi(e,i)}}return e}function Zr(e,t){return e+mt(Dn()*(t-e+1))}function Kr(e,t){var n="";if(!e||t<1||t>p)return n;do{t%2&&(n+=e),(t=mt(t/2))&&(e+=e)}while(t);return n}function Qr(e,t){return Fo(So(e,t,au),e+"")}function Jr(e){return Jn(Hl(e))}function ei(e,t){var n=Hl(e);return Bo(n,sr(t,0,n.length))}function ti(e,t,n,r){if(!rl(e))return e;for(var o=-1,a=(t=xi(t,e)).length,l=a-1,u=e;null!=u&&++o<a;){var s=zo(t[o]),c=n;if("__proto__"===s||"constructor"===s||"prototype"===s)return e;if(o!=l){var f=u[s];(c=r?r(f,s,u):i)===i&&(c=rl(f)?f:xo(t[o+1])?[]:{})}rr(u,s,c),u=u[s]}return e}var ni=Rn?function(e,t){return Rn.set(e,t),e}:au,ri=nt?function(e,t){return nt(e,"toString",{configurable:!0,enumerable:!1,value:ru(t),writable:!0})}:au;function ii(e){return Bo(Hl(e))}function oi(e,t,n){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=r(o);++i<o;)a[i]=e[i+t];return a}function ai(e,t){var n;return pr(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}
vendor: 5,868 bytes, line 2
2function li(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=e[o];null!==a&&!fl(a)&&(n?a<=t:a<t)?r=o+1:i=o}return i}return ui(e,t,au,n)}function ui(e,t,n,r){var o=0,a=null==e?0:e.length;if(0===a)return 0;for(var l=(t=n(t))!=t,u=null===t,s=fl(t),c=t===i;o<a;){var f=mt((o+a)/2),d=n(e[f]),h=d!==i,p=null===d,g=d==d,m=fl(d);if(l)var v=r||g;else v=c?g&&(r||h):u?g&&h&&(r||!p):s?g&&h&&!p&&(r||!m):!p&&!m&&(r?d<=t:d<t);v?o=f+1:a=f}return xn(a,4294967294)}function si(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n],l=t?t(a):a;if(!n||!Ha(l,u)){var u=l;o[i++]=0===a?0:a}}return o}function ci(e){return"number"==typeof e?e:fl(e)?g:+e}function fi(e){if("string"==typeof e)return e;if(Ya(e))return Ft(e,fi)+"";if(fl(e))return Un?Un.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function di(e,t,n){var r=-1,i=kt,o=e.length,a=!0,l=[],u=l;if(n)a=!1,i=Mt;else if(o>=200){var s=t?null:Ki(e);if(s)return hn(s);a=!1,i=tn,u=new Zn}else u=t?[]:l;e:for(;++r<o;){var c=e[r],f=t?t(c):c;if(c=n||0!==c?c:0,a&&f==f){for(var d=u.length;d--;)if(u[d]===f)continue e;t&&u.push(f),l.push(c)}else i(u,f,n)||(u!==l&&u.push(f),l.push(c))}return l}function hi(e,t){return null==(e=Oo(e,t=xi(t,e)))||delete e[zo(Jo(t))]}function pi(e,t,n,r){return ti(e,t,n(Tr(e,t)),r)}function gi(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?oi(e,r?0:o,r?o+1:i):oi(e,r?o+1:0,r?i:o)}function mi(e,t){var n=e;return n instanceof jn&&(n=n.value()),Pt(t,(function(e,t){return t.func.apply(t.thisArg,Nt([e],t.args))}),n)}function vi(e,t,n){var i=e.length;if(i<2)return i?di(e[0]):[];for(var o=-1,a=r(i);++o<i;)for(var l=e[o],u=-1;++u<i;)u!=o&&(a[o]=hr(a[o]||l,e[u],t,n));return di(Er(a,1),t,n)}function yi(e,t,n){for(var r=-1,o=e.length,a=t.length,l={};++r<o;){var u=r<a?t[r]:i;n(l,e[r],u)}return l}function Ei(e){return Za(e)?e:[]}function _i(e){return"function"==typeof e?e:au}function xi(e,t){return Ya(e)?e:wo(e,t)?[e]:Go(xl(e))}var bi=Qr;function wi(e,t,n){var r=e.length;return n=n===i?r:n,!t&&n>=r?e:oi(e,t,n)}var Di=it||function(e){return gt.clearTimeout(e)};function Ti(e,t){if(t)return e.slice();var n=e.length,r=je?je(n):new e.constructor(n);return e.copy(r),r}function Ii(e){var t=new e.constructor(e.byteLength);return new Ve(t).set(new Ve(e)),t}function Ai(e,t){var n=t?Ii(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ci(e,t){if(e!==t){var n=e!==i,r=null===e,o=e==e,a=fl(e),l=t!==i,u=null===t,s=t==t,c=fl(t);if(!u&&!c&&!a&&e>t||a&&l&&s&&!u&&!c||r&&l&&s||!n&&s||!o)return 1;if(!r&&!a&&!c&&e<t||c&&n&&o&&!r&&!a||u&&n&&o||!l&&o||!s)return-1}return 0}function Si(e,t,n,i){for(var o=-1,a=e.length,l=n.length,u=-1,s=t.length,c=_n(a-l,0),f=r(s+c),d=!i;++u<s;)f[u]=t[u];for(;++o<l;)(d||o<a)&&(f[n[o]]=e[o]);for(;c--;)f[u++]=e[o++];return f}function Oi(e,t,n,i){for(var o=-1,a=e.length,l=-1,u=n.length,s=-1,c=t.length,f=_n(a-u,0),d=r(f+c),h=!i;++o<f;)d[o]=e[o];for(var p=o;++s<c;)d[p+s]=t[s];for(;++l<u;)(h||o<a)&&(d[p+n[l]]=e[o++]);return d}function Li(e,t){var n=-1,i=e.length;for(t||(t=r(i));++n<i;)t[n]=e[n];return t}function Ri(e,t,n,r){var o=!n;n||(n={});for(var a=-1,l=t.length;++a<l;){var u=t[a],s=r?r(n[u],e[u],u,n,e):i;s===i&&(s=e[u]),o?lr(n,u,s):rr(n,u,s)}return n}function ki(e,t){return function(n,r){var i=Ya(n)?Ct:or,o=t?t():{};return i(n,e,co(r,2),o)}}function Mi(e){return Qr((function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:i,l=o>2?n[2]:i;for(a=e.length>3&&"function"==typeof a?(o--,a):i,l&&bo(n[0],n[1],l)&&(a=o<3?i:a,o=1),t=Ae(t);++r<o;){var u=n[r];u&&e(t,u,r,a)}return t}))}function Fi(e,t){return function(n,r){if(null==n)return n;if(!$a(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Ae(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Ni(e){return function(t,n,r){for(var i=-1,o=Ae(t),a=r(t),l=a.length;l--;){var u=a[e?l:++i];if(!1===n(o[u],u,o))break}return t}}function Pi(e){return function(t){var n=sn(t=xl(t))?mn(t):i,r=n?n[0]:t.charAt(0),o=n?wi(n,1).join(""):t.slice(1);return r[e]()+o}}function Bi(e){return function(t){return Pt(eu(jl(t).replace(et,"")),e,"")}}function Gi(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Hn(e.prototype),r=e.apply(n,t);return rl(r)?r:n}}function zi(e){return function(t,n,r){var o=Ae(t);if(!$a(t)){var a=co(n,3);t=Ml(t),n=function(e){return a(o[e],e,o)}}var l=e(t,n,r);return l>-1?o[a?t[l]:l]:i}}function Ui(e){return io((function(t){var n=t.length,r=n,a=Vn.prototype.thru;for(e&&t.reverse();r--;){var l=t[r];if("function"!=typeof l)throw new Oe(o);if(a&&!u&&"wrapper"==uo(l))var u=new Vn([],!0)}for(r=u?r:n;++r<n;){var s=uo(l=t[r]),c="wrapper"==s?lo(l):i;u=c&&Do(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?u[uo(c[0])].apply(u,c[3]):1==l.length&&Do(l)?u[s]():u.thru(l)}return function(){var e=arguments,r=e[0];if(u&&1==e.length&&Ya(r))return u.plant(r).value();for(var i=0,o=n?t[i].apply(this,e):r;++i<n;)o=t[i].call(this,o);return o}}))}function Wi(e,t,n,o,a,l,u,s,c,d){var h=t&f,p=1&t,g=2&t,m=24&t,v=512&t,y=g?i:Gi(e);return function i(){for(var f=arguments.length,E=r(f),_=f;_--;)E[_]=arguments[_];if(m)var x=so(i),b=on(E,x);if(o&&(E=Si(E,o,a,m)),l&&(E=Oi(E,l,u,m)),f-=b,m&&f<d){var w=dn(E,x);return $i(e,t,Wi,i.placeholder,n,E,w,s,c,d-f)}var D=p?n:this,T=g?D[e]:e;return f=E.length,s?E=Lo(E,s):v&&f>1&&E.reverse(),h&&c<f&&(E.length=c),this&&this!==gt&&this instanceof i&&(T=y||Gi(T)),T.apply(D,E)}}function Hi(e,t){return function(n,r){return function(e,t,n,r){return br(e,(function(e,i,o){t(r,n(e),i,o)})),r}(n,e,t(r),{})}}function qi(e,t){return function(n,r){var o;if(n===i&&r===i)return t;
vendor: 23,601 bytes, line 2
2if(n!==i&&(o=n),r!==i){if(o===i)return r;"string"==typeof n||"string"==typeof r?(n=fi(n),r=fi(r)):(n=ci(n),r=ci(r)),o=e(n,r)}return o}}function Vi(e){return io((function(t){return t=Ft(t,Jt(co())),Qr((function(n){var r=this;return e(t,(function(e){return At(e,r,n)}))}))}))}function ji(e,t){var n=(t=t===i?" ":fi(t)).length;if(n<2)return n?Kr(t,e):t;var r=Kr(t,pt(e/gn(t)));return sn(t)?wi(mn(r),0,e).join(""):r.slice(0,e)}function Yi(e){return function(t,n,o){return o&&"number"!=typeof o&&bo(t,n,o)&&(n=o=i),t=ml(t),n===i?(n=t,t=0):n=ml(n),function(e,t,n,i){for(var o=-1,a=_n(pt((t-e)/(n||1)),0),l=r(a);a--;)l[i?a:++o]=e,e+=n;return l}(t,n,o=o===i?t<n?1:-1:ml(o),e)}}function Xi(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=El(t),n=El(n)),e(t,n)}}function $i(e,t,n,r,o,a,l,u,f,d){var h=8&t;t|=h?s:c,4&(t&=~(h?c:s))||(t&=-4);var p=[e,t,o,h?a:i,h?l:i,h?i:a,h?i:l,u,f,d],g=n.apply(i,p);return Do(e)&&ko(g,p),g.placeholder=r,No(g,e,t)}function Zi(e){var t=Ie[e];return function(e,n){if(e=El(e),(n=null==n?0:xn(vl(n),292))&&_t(e)){var r=(xl(e)+"e").split("e");return+((r=(xl(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Ki=Sn&&1/hn(new Sn([,-0]))[1]==h?function(e){return new Sn(e)}:fu;function Qi(e){return function(t){var n=vo(t);return n==T?cn(t):n==O?pn(t):function(e,t){return Ft(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Ji(e,t,n,a,h,p,g,m){var v=2&t;if(!v&&"function"!=typeof e)throw new Oe(o);var y=a?a.length:0;if(y||(t&=-97,a=h=i),g=g===i?g:_n(vl(g),0),m=m===i?m:vl(m),y-=h?h.length:0,t&c){var E=a,_=h;a=h=i}var x=v?i:lo(e),b=[e,t,n,a,h,E,_,p,g,m];if(x&&function(e,t){var n=e[1],r=t[1],i=n|r,o=i<131,a=r==f&&8==n||r==f&&n==d&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!o&&!a)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var u=t[3];if(u){var s=e[3];e[3]=s?Si(s,u,t[4]):u,e[4]=s?dn(e[3],l):t[4]}(u=t[5])&&(s=e[5],e[5]=s?Oi(s,u,t[6]):u,e[6]=s?dn(e[5],l):t[6]);(u=t[7])&&(e[7]=u);r&f&&(e[8]=null==e[8]?t[8]:xn(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=i}(b,x),e=b[0],t=b[1],n=b[2],a=b[3],h=b[4],!(m=b[9]=b[9]===i?v?0:e.length:_n(b[9]-y,0))&&24&t&&(t&=-25),t&&1!=t)w=8==t||t==u?function(e,t,n){var o=Gi(e);return function a(){for(var l=arguments.length,u=r(l),s=l,c=so(a);s--;)u[s]=arguments[s];var f=l<3&&u[0]!==c&&u[l-1]!==c?[]:dn(u,c);return(l-=f.length)<n?$i(e,t,Wi,a.placeholder,i,u,f,i,i,n-l):At(this&&this!==gt&&this instanceof a?o:e,this,u)}}(e,t,m):t!=s&&33!=t||h.length?Wi.apply(i,b):function(e,t,n,i){var o=1&t,a=Gi(e);return function t(){for(var l=-1,u=arguments.length,s=-1,c=i.length,f=r(c+u),d=this&&this!==gt&&this instanceof t?a:e;++s<c;)f[s]=i[s];for(;u--;)f[s++]=arguments[++l];return At(d,o?n:this,f)}}(e,t,n,a);else var w=function(e,t,n){var r=1&t,i=Gi(e);return function t(){return(this&&this!==gt&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,n);return No((x?ni:ko)(w,b),e,t)}function eo(e,t,n,r){return e===i||Ha(e,ke[n])&&!Ne.call(r,n)?t:e}function to(e,t,n,r,o,a){return rl(e)&&rl(t)&&(a.set(t,e),qr(e,t,i,to,a),a.delete(t)),e}function no(e){return ll(e)?i:e}function ro(e,t,n,r,o,a){var l=1&n,u=e.length,s=t.length;if(u!=s&&!(l&&s>u))return!1;var c=a.get(e),f=a.get(t);if(c&&f)return c==t&&f==e;var d=-1,h=!0,p=2&n?new Zn:i;for(a.set(e,t),a.set(t,e);++d<u;){var g=e[d],m=t[d];if(r)var v=l?r(m,g,d,t,e,a):r(g,m,d,e,t,a);if(v!==i){if(v)continue;h=!1;break}if(p){if(!Gt(t,(function(e,t){if(!tn(p,t)&&(g===e||o(g,e,n,r,a)))return p.push(t)}))){h=!1;break}}else if(g!==m&&!o(g,m,n,r,a)){h=!1;break}}return a.delete(e),a.delete(t),h}function io(e){return Fo(So(e,i,Xo),e+"")}function oo(e){return Ir(e,Ml,go)}function ao(e){return Ir(e,Fl,mo)}var lo=Rn?function(e){return Rn.get(e)}:fu;function uo(e){for(var t=e.name+"",n=kn[t],r=Ne.call(kn,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function so(e){return(Ne.call(Wn,"placeholder")?Wn:e).placeholder}function co(){var e=Wn.iteratee||lu;return e=e===lu?Pr:e,arguments.length?e(arguments[0],arguments[1]):e}function fo(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function ho(e){for(var t=Ml(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Ao(i)]}return t}function po(e,t){var n=function(e,t){return null==e?i:e[t]}(e,t);return Nr(n)?n:i}var go=vt?function(e){return null==e?[]:(e=Ae(e),Rt(vt(e),(function(t){return $e.call(e,t)})))}:yu,mo=vt?function(e){for(var t=[];e;)Nt(t,go(e)),e=Ye(e);return t}:yu,vo=Ar;function yo(e,t,n){for(var r=-1,i=(t=xi(t,e)).length,o=!1;++r<i;){var a=zo(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&nl(i)&&xo(a,i)&&(Ya(e)||ja(e))}function Eo(e){return"function"!=typeof e.constructor||Io(e)?{}:Hn(Ye(e))}function _o(e){return Ya(e)||ja(e)||!!(Ke&&e&&e[Ke])}function xo(e,t){var n=typeof e;return!!(t=null==t?p:t)&&("number"==n||"symbol"!=n&&_e.test(e))&&e>-1&&e%1==0&&e<t}function bo(e,t,n){if(!rl(n))return!1;var r=typeof t;return!!("number"==r?$a(n)&&xo(t,n.length):"string"==r&&t in n)&&Ha(n[t],e)}function wo(e,t){if(Ya(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!fl(e))||(ne.test(e)||!te.test(e)||null!=t&&e in Ae(t))}function Do(e){var t=uo(e),n=Wn[t];if("function"!=typeof n||!(t in jn.prototype))return!1;if(e===n)return!0;var r=lo(n);return!!r&&e===r[0]}(In&&vo(new In(new ArrayBuffer(1)))!=F||An&&vo(new An)!=T||Cn&&vo(Cn.resolve())!=C||Sn&&vo(new Sn)!=O||On&&vo(new On)!=k)&&(vo=function(e){var t=Ar(e),n=t==A?e.constructor:i,r=n?Uo(n):"";if(r)switch(r){case Mn:return F;case Fn:return T;case Nn:return C;case Pn:return O;case Bn:return k}return t});var To=Me?el:Eu;function Io(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ke)}function Ao(e){return e==e&&!rl(e)}function Co(e,t){return function(n){return null!=n&&(n[e]===t&&(t!==i||e in Ae(n)))}}function So(e,t,n){return t=_n(t===i?e.length-1:t,0),function(){for(var i=arguments,o=-1,a=_n(i.length-t,0),l=r(a);++o<a;)l[o]=i[t+o];o=-1;for(var u=r(t+1);++o<t;)u[o]=i[o];return u[t]=n(l),At(e,this,u)}}function Oo(e,t){return t.length<2?e:Tr(e,oi(t,0,-1))}function Lo(e,t){for(var n=e.length,r=xn(t.length,n),o=Li(e);r--;){var a=t[r];e[r]=xo(a,n)?o[a]:i}return e}function Ro(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var ko=Po(ni),Mo=ht||function(e,t){return gt.setTimeout(e,t)},Fo=Po(ri);function No(e,t,n){var r=t+"";return Fo(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ue,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return St(v,(function(n){var r="_."+n[0];t&n[1]&&!kt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(se);return t?t[1].split(ce):[]}(r),n)))}function Po(e){var t=0,n=0;return function(){var r=bn(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Bo(e,t){var n=-1,r=e.length,o=r-1;for(t=t===i?r:t;++n<t;){var a=Zr(n,o),l=e[a];e[a]=e[n],e[n]=l}return e.length=t,e}var Go=function(e){var t=Pa(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(re,(function(e,n,r,i){t.push(r?i.replace(he,"$1"):n||e)})),t}));function zo(e){if("string"==typeof e||fl(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Uo(e){if(null!=e){try{return Fe.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Wo(e){if(e instanceof jn)return e.clone();var t=new Vn(e.__wrapped__,e.__chain__);return t.__actions__=Li(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Ho=Qr((function(e,t){return Za(e)?hr(e,Er(t,1,Za,!0)):[]})),qo=Qr((function(e,t){var n=Jo(t);return Za(n)&&(n=i),Za(e)?hr(e,Er(t,1,Za,!0),co(n,2)):[]})),Vo=Qr((function(e,t){var n=Jo(t);return Za(n)&&(n=i),Za(e)?hr(e,Er(t,1,Za,!0),i,n):[]}));function jo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:vl(n);return i<0&&(i=_n(r+i,0)),Wt(e,co(t,3),i)}function Yo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r-1;return n!==i&&(o=vl(n),o=n<0?_n(r+o,0):xn(o,r-1)),Wt(e,co(t,3),o,!0)}function Xo(e){return(null==e?0:e.length)?Er(e,1):[]}function $o(e){return e&&e.length?e[0]:i}var Zo=Qr((function(e){var t=Ft(e,Ei);return t.length&&t[0]===e[0]?Lr(t):[]})),Ko=Qr((function(e){var t=Jo(e),n=Ft(e,Ei);return t===Jo(n)?t=i:n.pop(),n.length&&n[0]===e[0]?Lr(n,co(t,2)):[]})),Qo=Qr((function(e){var t=Jo(e),n=Ft(e,Ei);return(t="function"==typeof t?t:i)&&n.pop(),n.length&&n[0]===e[0]?Lr(n,i,t):[]}));function Jo(e){var t=null==e?0:e.length;return t?e[t-1]:i}var ea=Qr(ta);function ta(e,t){return e&&e.length&&t&&t.length?Xr(e,t):e}var na=io((function(e,t){var n=null==e?0:e.length,r=ur(e,t);return $r(e,Ft(t,(function(e){return xo(e,n)?+e:e})).sort(Ci)),r}));function ra(e){return null==e?e:Tn.call(e)}var ia=Qr((function(e){return di(Er(e,1,Za,!0))})),oa=Qr((function(e){var t=Jo(e);return Za(t)&&(t=i),di(Er(e,1,Za,!0),co(t,2))})),aa=Qr((function(e){var t=Jo(e);return t="function"==typeof t?t:i,di(Er(e,1,Za,!0),i,t)}));function la(e){if(!e||!e.length)return[];var t=0;return e=Rt(e,(function(e){if(Za(e))return t=_n(e.length,t),!0})),Kt(t,(function(t){return Ft(e,Yt(t))}))}function ua(e,t){if(!e||!e.length)return[];var n=la(e);return null==t?n:Ft(n,(function(e){return At(t,i,e)}))}var sa=Qr((function(e,t){return Za(e)?hr(e,t):[]})),ca=Qr((function(e){return vi(Rt(e,Za))})),fa=Qr((function(e){var t=Jo(e);return Za(t)&&(t=i),vi(Rt(e,Za),co(t,2))})),da=Qr((function(e){var t=Jo(e);return t="function"==typeof t?t:i,vi(Rt(e,Za),i,t)})),ha=Qr(la);var pa=Qr((function(e){var t=e.length,n=t>1?e[t-1]:i;return n="function"==typeof n?(e.pop(),n):i,ua(e,n)}));function ga(e){var t=Wn(e);return t.__chain__=!0,t}function ma(e,t){return t(e)}var va=io((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return ur(t,e)};return!(t>1||this.__actions__.length)&&r instanceof jn&&xo(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ma,args:[o],thisArg:i}),new Vn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(o)}));var ya=ki((function(e,t,n){Ne.call(e,n)?++e[n]:lr(e,n,1)}));var Ea=zi(jo),_a=zi(Yo);function xa(e,t){return(Ya(e)?St:pr)(e,co(t,3))}function ba(e,t){return(Ya(e)?Ot:gr)(e,co(t,3))}var wa=ki((function(e,t,n){Ne.call(e,n)?e[n].push(t):lr(e,n,[t])}));var Da=Qr((function(e,t,n){var i=-1,o="function"==typeof t,a=$a(e)?r(e.length):[];return pr(e,(function(e){a[++i]=o?At(t,e,n):Rr(e,t,n)})),a})),Ta=ki((function(e,t,n){lr(e,n,t)}));function Ia(e,t){return(Ya(e)?Ft:Ur)(e,co(t,3))}var Aa=ki((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var Ca=Qr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&bo(e,t[0],t[1])?t=[]:n>2&&bo(t[0],t[1],t[2])&&(t=[t[0]]),jr(e,Er(t,1),[])})),Sa=ct||function(){return gt.Date.now()};function Oa(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Ji(e,f,i,i,i,i,t)}function La(e,t){var n;if("function"!=typeof t)throw new Oe(o);return e=vl(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var Ra=Qr((function(e,t,n){var r=1;if(n.length){var i=dn(n,so(Ra));r|=s}return Ji(e,r,t,n,i)})),ka=Qr((function(e,t,n){var r=3;if(n.length){var i=dn(n,so(ka));r|=s}return Ji(t,r,e,n,i)}));function Ma(e,t,n){var r,a,l,u,s,c,f=0,d=!1,h=!1,p=!0;if("function"!=typeof e)throw new Oe(o);function g(t){var n=r,o=a;return r=a=i,f=t,u=e.apply(o,n)}function m(e){return f=e,s=Mo(y,t),d?g(e):u}function v(e){var n=e-c;return c===i||n>=t||n<0||h&&e-f>=l}function y(){var e=Sa();if(v(e))return E(e);s=Mo(y,function(e){var n=t-(e-c);return h?xn(n,l-(e-f)):n}(e))}function E(e){return s=i,p&&r?g(e):(r=a=i,u)}function _(){var e=Sa(),n=v(e);if(r=arguments,a=this,c=e,n){if(s===i)return m(c);if(h)return Di(s),s=Mo(y,t),g(c)}return s===i&&(s=Mo(y,t)),u}return t=El(t)||0,rl(n)&&(d=!!n.leading,l=(h="maxWait"in n)?_n(El(n.maxWait)||0,t):l,p="trailing"in n?!!n.trailing:p),_.cancel=function(){s!==i&&Di(s),f=0,r=c=a=s=i},_.flush=function(){return s===i?u:E(Sa())},_}var Fa=Qr((function(e,t){return dr(e,1,t)})),Na=Qr((function(e,t,n){return dr(e,El(t)||0,n)}));function Pa(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Oe(o);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Pa.Cache||$n),n}function Ba(e){if("function"!=typeof e)throw new Oe(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Pa.Cache=$n;var Ga=bi((function(e,t){var n=(t=1==t.length&&Ya(t[0])?Ft(t[0],Jt(co())):Ft(Er(t,1),Jt(co()))).length;return Qr((function(r){for(var i=-1,o=xn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return At(e,this,r)}))})),za=Qr((function(e,t){var n=dn(t,so(za));return Ji(e,s,i,t,n)})),Ua=Qr((function(e,t){var n=dn(t,so(Ua));return Ji(e,c,i,t,n)})),Wa=io((function(e,t){return Ji(e,d,i,i,i,t)}));function Ha(e,t){return e===t||e!=e&&t!=t}var qa=Xi(Cr),Va=Xi((function(e,t){return e>=t})),ja=kr(function(){return arguments}())?kr:function(e){return il(e)&&Ne.call(e,"callee")&&!$e.call(e,"callee")},Ya=r.isArray,Xa=xt?Jt(xt):function(e){return il(e)&&Ar(e)==M};function $a(e){return null!=e&&nl(e.length)&&!el(e)}function Za(e){return il(e)&&$a(e)}var Ka=Et||Eu,Qa=bt?Jt(bt):function(e){return il(e)&&Ar(e)==x};function Ja(e){if(!il(e))return!1;var t=Ar(e);return t==b||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!ll(e)}function el(e){if(!rl(e))return!1;var t=Ar(e);return t==w||t==D||"[object AsyncFunction]"==t||"[object Proxy]"==t}function tl(e){return"number"==typeof e&&e==vl(e)}function nl(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=p}function rl(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function il(e){return null!=e&&"object"==typeof e}var ol=wt?Jt(wt):function(e){return il(e)&&vo(e)==T};function al(e){return"number"==typeof e||il(e)&&Ar(e)==I}function ll(e){if(!il(e)||Ar(e)!=A)return!1;var t=Ye(e);if(null===t)return!0;var n=Ne.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Fe.call(n)==ze}var ul=Dt?Jt(Dt):function(e){return il(e)&&Ar(e)==S};var sl=Tt?Jt(Tt):function(e){return il(e)&&vo(e)==O};function cl(e){return"string"==typeof e||!Ya(e)&&il(e)&&Ar(e)==L}function fl(e){return"symbol"==typeof e||il(e)&&Ar(e)==R}var dl=It?Jt(It):function(e){return il(e)&&nl(e.length)&&!!ut[Ar(e)]};var hl=Xi(zr),pl=Xi((function(e,t){return e<=t}));function gl(e){if(!e)return[];if($a(e))return cl(e)?mn(e):Li(e);if(Qe&&e[Qe])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Qe]());var t=vo(e);return(t==T?cn:t==O?hn:Hl)(e)}function ml(e){return e?(e=El(e))===h||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function vl(e){var t=ml(e),n=t%1;return t==t?n?t-n:t:0}function yl(e){return e?sr(vl(e),0,m):0}function El(e){if("number"==typeof e)return e;if(fl(e))return g;if(rl(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=rl(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Qt(e);var n=ve.test(e);return n||Ee.test(e)?dt(e.slice(2),n?2:8):me.test(e)?g:+e}function _l(e){return Ri(e,Fl(e))}function xl(e){return null==e?"":fi(e)}var bl=Mi((function(e,t){if(Io(t)||$a(t))Ri(t,Ml(t),e);else for(var n in t)Ne.call(t,n)&&rr(e,n,t[n])})),wl=Mi((function(e,t){Ri(t,Fl(t),e)})),Dl=Mi((function(e,t,n,r){Ri(t,Fl(t),e,r)})),Tl=Mi((function(e,t,n,r){Ri(t,Ml(t),e,r)})),Il=io(ur);var Al=Qr((function(e,t){e=Ae(e);var n=-1,r=t.length,o=r>2?t[2]:i;for(o&&bo(t[0],t[1],o)&&(r=1);++n<r;)for(var a=t[n],l=Fl(a),u=-1,s=l.length;++u<s;){var c=l[u],f=e[c];(f===i||Ha(f,ke[c])&&!Ne.call(e,c))&&(e[c]=a[c])}return e})),Cl=Qr((function(e){return e.push(i,to),At(Pl,i,e)}));function Sl(e,t,n){var r=null==e?i:Tr(e,t);return r===i?n:r}function Ol(e,t){return null!=e&&yo(e,t,Or)}var Ll=Hi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ge.call(t)),e[t]=n}),ru(au)),Rl=Hi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ge.call(t)),Ne.call(e,t)?e[t].push(n):e[t]=[n]}),co),kl=Qr(Rr);function Ml(e){return $a(e)?Qn(e):Br(e)}function Fl(e){return $a(e)?Qn(e,!0):Gr(e)}var Nl=Mi((function(e,t,n){qr(e,t,n)})),Pl=Mi((function(e,t,n,r){qr(e,t,n,r)})),Bl=io((function(e,t){var n={};if(null==e)return n;var r=!1;t=Ft(t,(function(t){return t=xi(t,e),r||(r=t.length>1),t})),Ri(e,ao(e),n),r&&(n=cr(n,7,no));for(var i=t.length;i--;)hi(n,t[i]);return n}));var Gl=io((function(e,t){return null==e?{}:function(e,t){return Yr(e,t,(function(t,n){return Ol(e,n)}))}(e,t)}));function zl(e,t){if(null==e)return{};var n=Ft(ao(e),(function(e){return[e]}));return t=co(t),Yr(e,n,(function(e,n){return t(e,n[0])}))}var Ul=Qi(Ml),Wl=Qi(Fl);function Hl(e){return null==e?[]:en(e,Ml(e))}var ql=Bi((function(e,t,n){return t=t.toLowerCase(),e+(n?Vl(t):t)}));function Vl(e){return Jl(xl(e).toLowerCase())}function jl(e){return(e=xl(e))&&e.replace(xe,an).replace(tt,"")}var Yl=Bi((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Xl=Bi((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),$l=Pi("toLowerCase");var Zl=Bi((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Kl=Bi((function(e,t,n){return e+(n?" ":"")+Jl(t)}));var Ql=Bi((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Jl=Pi("toUpperCase");function eu(e,t,n){return e=xl(e),(t=n?i:t)===i?function(e){return ot.test(e)}(e)?function(e){return e.match(rt)||[]}(e):function(e){return e.match(fe)||[]}(e):e.match(t)||[]}var tu=Qr((function(e,t){try{return At(e,i,t)}catch(e){return Ja(e)?e:new De(e)}})),nu=io((function(e,t){return St(t,(function(t){t=zo(t),lr(e,t,Ra(e[t],e))})),e}));function ru(e){return function(){return e}}var iu=Ui(),ou=Ui(!0);function au(e){return e}function lu(e){return Pr("function"==typeof e?e:cr(e,1))}var uu=Qr((function(e,t){return function(n){return Rr(n,e,t)}})),su=Qr((function(e,t){return function(n){return Rr(e,n,t)}}));function cu(e,t,n){var r=Ml(t),i=Dr(t,r);null!=n||rl(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=Dr(t,Ml(t)));var o=!(rl(n)&&"chain"in n&&!n.chain),a=el(e);return St(i,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__),i=n.__actions__=Li(this.__actions__);return i.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Nt([this.value()],arguments))})})),e}function fu(){}var du=Vi(Ft),hu=Vi(Lt),pu=Vi(Gt);function gu(e){return wo(e)?Yt(zo(e)):function(e){return function(t){return Tr(t,e)}}(e)}var mu=Yi(),vu=Yi(!0);function yu(){return[]}function Eu(){return!1}var _u=qi((function(e,t){return e+t}),0),xu=Zi("ceil"),bu=qi((function(e,t){return e/t}),1),wu=Zi("floor");var Du,Tu=qi((function(e,t){return e*t}),1),Iu=Zi("round"),Au=qi((function(e,t){return e-t}),0);return Wn.after=function(e,t){if("function"!=typeof t)throw new Oe(o);return e=vl(e),function(){if(--e<1)return t.apply(this,arguments)}},Wn.ary=Oa,Wn.assign=bl,Wn.assignIn=wl,Wn.assignInWith=Dl,Wn.assignWith=Tl,Wn.at=Il,Wn.before=La,Wn.bind=Ra,Wn.bindAll=nu,Wn.bindKey=ka,Wn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ya(e)?e:[e]},Wn.chain=ga,Wn.chunk=function(e,t,n){t=(n?bo(e,t,n):t===i)?1:_n(vl(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var a=0,l=0,u=r(pt(o/t));a<o;)u[l++]=oi(e,a,a+=t);return u},Wn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},Wn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=r(e-1),n=arguments[0],i=e;i--;)t[i-1]=arguments[i];return Nt(Ya(n)?Li(n):[n],Er(t,1))},Wn.cond=function(e){var t=null==e?0:e.length,n=co();return e=t?Ft(e,(function(e){if("function"!=typeof e[1])throw new Oe(o);return[n(e[0]),e[1]]})):[],Qr((function(n){for(var r=-1;++r<t;){var i=e[r];if(At(i[0],this,n))return At(i[1],this,n)}}))},Wn.conforms=function(e){return function(e){var t=Ml(e);return function(n){return fr(n,e,t)}}(cr(e,1))},Wn.constant=ru,Wn.countBy=ya,Wn.create=function(e,t){var n=Hn(e);return null==t?n:ar(n,t)},Wn.curry=function e(t,n,r){var o=Ji(t,8,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},Wn.curryRight=function e(t,n,r){var o=Ji(t,u,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},Wn.debounce=Ma,Wn.defaults=Al,Wn.defaultsDeep=Cl,Wn.defer=Fa,Wn.delay=Na,Wn.difference=Ho,Wn.differenceBy=qo,Wn.differenceWith=Vo,Wn.drop=function(e,t,n){var r=null==e?0:e.length;return r?oi(e,(t=n||t===i?1:vl(t))<0?0:t,r):[]},Wn.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?oi(e,0,(t=r-(t=n||t===i?1:vl(t)))<0?0:t):[]},Wn.dropRightWhile=function(e,t){return e&&e.length?gi(e,co(t,3),!0,!0):[]},Wn.dropWhile=function(e,t){return e&&e.length?gi(e,co(t,3),!0):[]},Wn.fill=function(e,t,n,r){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&bo(e,t,n)&&(n=0,r=o),function(e,t,n,r){var o=e.length;for((n=vl(n))<0&&(n=-n>o?0:o+n),(r=r===i||r>o?o:vl(r))<0&&(r+=o),r=n>r?0:yl(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Wn.filter=function(e,t){return(Ya(e)?Rt:yr)(e,co(t,3))},Wn.flatMap=function(e,t){return Er(Ia(e,t),1)},Wn.flatMapDeep=function(e,t){return Er(Ia(e,t),h)},Wn.flatMapDepth=function(e,t,n){return n=n===i?1:vl(n),Er(Ia(e,t),n)},Wn.flatten=Xo,Wn.flattenDeep=function(e){return(null==e?0:e.length)?Er(e,h):[]},Wn.flattenDepth=function(e,t){return(null==e?0:e.length)?Er(e,t=t===i?1:vl(t)):[]},Wn.flip=function(e){return Ji(e,512)},Wn.flow=iu,Wn.flowRight=ou,Wn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},Wn.functions=function(e){return null==e?[]:Dr(e,Ml(e))},Wn.functionsIn=function(e){return null==e?[]:Dr(e,Fl(e))},Wn.groupBy=wa,Wn.initial=function(e){return(null==e?0:e.length)?oi(e,0,-1):[]},Wn.intersection=Zo,Wn.intersectionBy=Ko,Wn.intersectionWith=Qo,Wn.invert=Ll,Wn.invertBy=Rl,Wn.invokeMap=Da,Wn.iteratee=lu,Wn.keyBy=Ta,Wn.keys=Ml,Wn.keysIn=Fl,Wn.map=Ia,Wn.mapKeys=function(e,t){var n={};return t=co(t,3),br(e,(function(e,r,i){lr(n,t(e,r,i),e)})),n},Wn.mapValues=function(e,t){var n={};return t=co(t,3),br(e,(function(e,r,i){lr(n,r,t(e,r,i))})),n},Wn.matches=function(e){return Wr(cr(e,1))},Wn.matchesProperty=function(e,t){return Hr(e,cr(t,1))},Wn.memoize=Pa,Wn.merge=Nl,Wn.mergeWith=Pl,Wn.method=uu,Wn.methodOf=su,Wn.mixin=cu,Wn.negate=Ba,Wn.nthArg=function(e){return e=vl(e),Qr((function(t){return Vr(t,e)}))},Wn.omit=Bl,Wn.omitBy=function(e,t){return zl(e,Ba(co(t)))},Wn.once=function(e){return La(2,e)},Wn.orderBy=function(e,t,n,r){return null==e?[]:(Ya(t)||(t=null==t?[]:[t]),Ya(n=r?i:n)||(n=null==n?[]:[n]),jr(e,t,n))},Wn.over=du,Wn.overArgs=Ga,Wn.overEvery=hu,Wn.overSome=pu,Wn.partial=za,Wn.partialRight=Ua,Wn.partition=Aa,Wn.pick=Gl,Wn.pickBy=zl,Wn.property=gu,Wn.propertyOf=function(e){return function(t){return null==e?i:Tr(e,t)}},Wn.pull=ea,Wn.pullAll=ta,Wn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Xr(e,t,co(n,2)):e},Wn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Xr(e,t,i,n):e},Wn.pullAt=na,Wn.range=mu,Wn.rangeRight=vu,Wn.rearg=Wa,Wn.reject=function(e,t){return(Ya(e)?Rt:yr)(e,Ba(co(t,3)))},Wn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=co(t,3);++r<o;){var a=e[r];t(a,r,e)&&(n.push(a),i.push(r))}return $r(e,i),n},Wn.rest=function(e,t){if("function"!=typeof e)throw new Oe(o);return Qr(e,t=t===i?t:vl(t))},Wn.reverse=ra,Wn.sampleSize=function(e,t,n){return t=(n?bo(e,t,n):t===i)?1:vl(t),(Ya(e)?er:ei)(e,t)}
vendor: 4,872 bytes, line 2
2,Wn.set=function(e,t,n){return null==e?e:ti(e,t,n)},Wn.setWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:ti(e,t,n,r)},Wn.shuffle=function(e){return(Ya(e)?tr:ii)(e)},Wn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&bo(e,t,n)?(t=0,n=r):(t=null==t?0:vl(t),n=n===i?r:vl(n)),oi(e,t,n)):[]},Wn.sortBy=Ca,Wn.sortedUniq=function(e){return e&&e.length?si(e):[]},Wn.sortedUniqBy=function(e,t){return e&&e.length?si(e,co(t,2)):[]},Wn.split=function(e,t,n){return n&&"number"!=typeof n&&bo(e,t,n)&&(t=n=i),(n=n===i?m:n>>>0)?(e=xl(e))&&("string"==typeof t||null!=t&&!ul(t))&&!(t=fi(t))&&sn(e)?wi(mn(e),0,n):e.split(t,n):[]},Wn.spread=function(e,t){if("function"!=typeof e)throw new Oe(o);return t=null==t?0:_n(vl(t),0),Qr((function(n){var r=n[t],i=wi(n,0,t);return r&&Nt(i,r),At(e,this,i)}))},Wn.tail=function(e){var t=null==e?0:e.length;return t?oi(e,1,t):[]},Wn.take=function(e,t,n){return e&&e.length?oi(e,0,(t=n||t===i?1:vl(t))<0?0:t):[]},Wn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?oi(e,(t=r-(t=n||t===i?1:vl(t)))<0?0:t,r):[]},Wn.takeRightWhile=function(e,t){return e&&e.length?gi(e,co(t,3),!1,!0):[]},Wn.takeWhile=function(e,t){return e&&e.length?gi(e,co(t,3)):[]},Wn.tap=function(e,t){return t(e),e},Wn.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new Oe(o);return rl(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Ma(e,t,{leading:r,maxWait:t,trailing:i})},Wn.thru=ma,Wn.toArray=gl,Wn.toPairs=Ul,Wn.toPairsIn=Wl,Wn.toPath=function(e){return Ya(e)?Ft(e,zo):fl(e)?[e]:Li(Go(xl(e)))},Wn.toPlainObject=_l,Wn.transform=function(e,t,n){var r=Ya(e),i=r||Ka(e)||dl(e);if(t=co(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:rl(e)&&el(o)?Hn(Ye(e)):{}}return(i?St:br)(e,(function(e,r,i){return t(n,e,r,i)})),n},Wn.unary=function(e){return Oa(e,1)},Wn.union=ia,Wn.unionBy=oa,Wn.unionWith=aa,Wn.uniq=function(e){return e&&e.length?di(e):[]},Wn.uniqBy=function(e,t){return e&&e.length?di(e,co(t,2)):[]},Wn.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?di(e,i,t):[]},Wn.unset=function(e,t){return null==e||hi(e,t)},Wn.unzip=la,Wn.unzipWith=ua,Wn.update=function(e,t,n){return null==e?e:pi(e,t,_i(n))},Wn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:pi(e,t,_i(n),r)},Wn.values=Hl,Wn.valuesIn=function(e){return null==e?[]:en(e,Fl(e))},Wn.without=sa,Wn.words=eu,Wn.wrap=function(e,t){return za(_i(t),e)},Wn.xor=ca,Wn.xorBy=fa,Wn.xorWith=da,Wn.zip=ha,Wn.zipObject=function(e,t){return yi(e||[],t||[],rr)},Wn.zipObjectDeep=function(e,t){return yi(e||[],t||[],ti)},Wn.zipWith=pa,Wn.entries=Ul,Wn.entriesIn=Wl,Wn.extend=wl,Wn.extendWith=Dl,cu(Wn,Wn),Wn.add=_u,Wn.attempt=tu,Wn.camelCase=ql,Wn.capitalize=Vl,Wn.ceil=xu,Wn.clamp=function(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=(n=El(n))==n?n:0),t!==i&&(t=(t=El(t))==t?t:0),sr(El(e),t,n)},Wn.clone=function(e){return cr(e,4)},Wn.cloneDeep=function(e){return cr(e,5)},Wn.cloneDeepWith=function(e,t){return cr(e,5,t="function"==typeof t?t:i)},Wn.cloneWith=function(e,t){return cr(e,4,t="function"==typeof t?t:i)},Wn.conformsTo=function(e,t){return null==t||fr(e,t,Ml(t))},Wn.deburr=jl,Wn.defaultTo=function(e,t){return null==e||e!=e?t:e},Wn.divide=bu,Wn.endsWith=function(e,t,n){e=xl(e),t=fi(t);var r=e.length,o=n=n===i?r:sr(vl(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t},Wn.eq=Ha,Wn.escape=function(e){return(e=xl(e))&&K.test(e)?e.replace($,ln):e},Wn.escapeRegExp=function(e){return(e=xl(e))&&oe.test(e)?e.replace(ie,"\\$&"):e},Wn.every=function(e,t,n){var r=Ya(e)?Lt:mr;return n&&bo(e,t,n)&&(t=i),r(e,co(t,3))},Wn.find=Ea,Wn.findIndex=jo,Wn.findKey=function(e,t){return Ut(e,co(t,3),br)},Wn.findLast=_a,Wn.findLastIndex=Yo,Wn.findLastKey=function(e,t){return Ut(e,co(t,3),wr)},Wn.floor=wu,Wn.forEach=xa,Wn.forEachRight=ba,Wn.forIn=function(e,t){return null==e?e:_r(e,co(t,3),Fl)},Wn.forInRight=function(e,t){return null==e?e:xr(e,co(t,3),Fl)},Wn.forOwn=function(e,t){return e&&br(e,co(t,3))},Wn.forOwnRight=function(e,t){return e&&wr(e,co(t,3))},Wn.get=Sl,Wn.gt=qa,Wn.gte=Va,Wn.has=function(e,t){return null!=e&&yo(e,t,Sr)},Wn.hasIn=Ol,Wn.head=$o,Wn.identity=au,Wn.includes=function(e,t,n,r){e=$a(e)?e:Hl(e),n=n&&!r?vl(n):0;var i=e.length;return n<0&&(n=_n(i+n,0)),cl(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Ht(e,t,n)>-1},Wn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:vl(n);return i<0&&(i=_n(r+i,0)),Ht(e,t,i)},Wn.inRange=function(e,t,n){return t=ml(t),n===i?(n=t,t=0):n=ml(n),function(e,t,n){return e>=xn(t,n)&&e<_n(t,n)}(e=El(e),t,n)},Wn.invoke=kl,Wn.isArguments=ja,Wn.isArray=Ya,Wn.isArrayBuffer=Xa,Wn.isArrayLike=$a,Wn.isArrayLikeObject=Za,Wn.isBoolean=function(e){return!0===e||!1===e||il(e)&&Ar(e)==_},Wn.isBuffer=Ka,Wn.isDate=Qa,Wn.isElement=function(e){return il(e)&&1===e.nodeType&&!ll(e)},Wn.isEmpty=function(e){if(null==e)return!0;
vendor: 5,500 bytes, line 2
2if($a(e)&&(Ya(e)||"string"==typeof e||"function"==typeof e.splice||Ka(e)||dl(e)||ja(e)))return!e.length;var t=vo(e);if(t==T||t==O)return!e.size;if(Io(e))return!Br(e).length;for(var n in e)if(Ne.call(e,n))return!1;return!0},Wn.isEqual=function(e,t){return Mr(e,t)},Wn.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:i)?n(e,t):i;return r===i?Mr(e,t,i,n):!!r},Wn.isError=Ja,Wn.isFinite=function(e){return"number"==typeof e&&_t(e)},Wn.isFunction=el,Wn.isInteger=tl,Wn.isLength=nl,Wn.isMap=ol,Wn.isMatch=function(e,t){return e===t||Fr(e,t,ho(t))},Wn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:i,Fr(e,t,ho(t),n)},Wn.isNaN=function(e){return al(e)&&e!=+e},Wn.isNative=function(e){if(To(e))throw new De("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Nr(e)},Wn.isNil=function(e){return null==e},Wn.isNull=function(e){return null===e},Wn.isNumber=al,Wn.isObject=rl,Wn.isObjectLike=il,Wn.isPlainObject=ll,Wn.isRegExp=ul,Wn.isSafeInteger=function(e){return tl(e)&&e>=-9007199254740991&&e<=p},Wn.isSet=sl,Wn.isString=cl,Wn.isSymbol=fl,Wn.isTypedArray=dl,Wn.isUndefined=function(e){return e===i},Wn.isWeakMap=function(e){return il(e)&&vo(e)==k},Wn.isWeakSet=function(e){return il(e)&&"[object WeakSet]"==Ar(e)},Wn.join=function(e,t){return null==e?"":zt.call(e,t)},Wn.kebabCase=Yl,Wn.last=Jo,Wn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return n!==i&&(o=(o=vl(n))<0?_n(r+o,0):xn(o,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):Wt(e,Vt,o,!0)},Wn.lowerCase=Xl,Wn.lowerFirst=$l,Wn.lt=hl,Wn.lte=pl,Wn.max=function(e){return e&&e.length?vr(e,au,Cr):i},Wn.maxBy=function(e,t){return e&&e.length?vr(e,co(t,2),Cr):i},Wn.mean=function(e){return jt(e,au)},Wn.meanBy=function(e,t){return jt(e,co(t,2))},Wn.min=function(e){return e&&e.length?vr(e,au,zr):i},Wn.minBy=function(e,t){return e&&e.length?vr(e,co(t,2),zr):i},Wn.stubArray=yu,Wn.stubFalse=Eu,Wn.stubObject=function(){return{}},Wn.stubString=function(){return""},Wn.stubTrue=function(){return!0},Wn.multiply=Tu,Wn.nth=function(e,t){return e&&e.length?Vr(e,vl(t)):i},Wn.noConflict=function(){return gt._===this&&(gt._=Ue),this},Wn.noop=fu,Wn.now=Sa,Wn.pad=function(e,t,n){e=xl(e);var r=(t=vl(t))?gn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return ji(mt(i),n)+e+ji(pt(i),n)},Wn.padEnd=function(e,t,n){e=xl(e);var r=(t=vl(t))?gn(e):0;return t&&r<t?e+ji(t-r,n):e},Wn.padStart=function(e,t,n){e=xl(e);var r=(t=vl(t))?gn(e):0;return t&&r<t?ji(t-r,n)+e:e},Wn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),wn(xl(e).replace(ae,""),t||0)},Wn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&bo(e,t,n)&&(t=n=i),n===i&&("boolean"==typeof t?(n=t,t=i):"boolean"==typeof e&&(n=e,e=i)),e===i&&t===i?(e=0,t=1):(e=ml(e),t===i?(t=e,e=0):t=ml(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var o=Dn();return xn(e+o*(t-e+ft("1e-"+((o+"").length-1))),t)}return Zr(e,t)},Wn.reduce=function(e,t,n){var r=Ya(e)?Pt:$t,i=arguments.length<3;return r(e,co(t,4),n,i,pr)},Wn.reduceRight=function(e,t,n){var r=Ya(e)?Bt:$t,i=arguments.length<3;return r(e,co(t,4),n,i,gr)},Wn.repeat=function(e,t,n){return t=(n?bo(e,t,n):t===i)?1:vl(t),Kr(xl(e),t)},Wn.replace=function(){var e=arguments,t=xl(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Wn.result=function(e,t,n){var r=-1,o=(t=xi(t,e)).length;for(o||(o=1,e=i);++r<o;){var a=null==e?i:e[zo(t[r])];a===i&&(r=o,a=n),e=el(a)?a.call(e):a}return e},Wn.round=Iu,Wn.runInContext=e,Wn.sample=function(e){return(Ya(e)?Jn:Jr)(e)},Wn.size=function(e){if(null==e)return 0;if($a(e))return cl(e)?gn(e):e.length;var t=vo(e);return t==T||t==O?e.size:Br(e).length},Wn.snakeCase=Zl,Wn.some=function(e,t,n){var r=Ya(e)?Gt:ai;return n&&bo(e,t,n)&&(t=i),r(e,co(t,3))},Wn.sortedIndex=function(e,t){return li(e,t)},Wn.sortedIndexBy=function(e,t,n){return ui(e,t,co(n,2))},Wn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=li(e,t);if(r<n&&Ha(e[r],t))return r}return-1},Wn.sortedLastIndex=function(e,t){return li(e,t,!0)},Wn.sortedLastIndexBy=function(e,t,n){return ui(e,t,co(n,2),!0)},Wn.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=li(e,t,!0)-1;if(Ha(e[n],t))return n}return-1},Wn.startCase=Kl,Wn.startsWith=function(e,t,n){return e=xl(e),n=null==n?0:sr(vl(n),0,e.length),t=fi(t),e.slice(n,n+t.length)==t},Wn.subtract=Au,Wn.sum=function(e){return e&&e.length?Zt(e,au):0},Wn.sumBy=function(e,t){return e&&e.length?Zt(e,co(t,2)):0},Wn.template=function(e,t,n){var r=Wn.templateSettings;n&&bo(e,t,n)&&(t=i),e=xl(e),t=Dl({},t,r,eo);var o,a,l=Dl({},t.imports,r.imports,eo),u=Ml(l),s=en(l,u),c=0,f=t.interpolate||be,d="__p += '",h=Ce((t.escape||be).source+"|"+f.source+"|"+(f===ee?pe:be).source+"|"+(t.evaluate||be).source+"|$","g"),p="//# sourceURL="+(Ne.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++lt+"]")+"\n";e.replace(h,(function(t,n,r,i,l,u){return r||(r=i),d+=e.slice(c,u).replace(we,un),n&&(o=!0,d+="' +\n__e("+n+") +\n'"),l&&(a=!0,d+="';\n"+l+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=u+t.length,t})),d+="';\n";var g=Ne.call(t,"variable")&&t.variable;if(g){if(de.test(g))throw new De("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(a?d.replace(V,""):d).replace(j,"$1").replace(Y,"$1;"),d="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";
2\n")+d+"return __p\n}";var m=tu((function(){return Te(u,p+"return "+d).apply(i,s)}));if(m.source=d,Ja(m))throw m;return m},Wn.times=function(e,t){if((e=vl(e))<1||e>p)return[];var n=m,r=xn(e,m);t=co(t),e-=m;for(var i=Kt(r,t);++n<e;)t(n);return i},Wn.toFinite=ml,Wn.toInteger=vl,Wn.toLength=yl,Wn.toLower=function(e){return xl(e).toLowerCase()},Wn.toNumber=El,Wn.toSafeInteger=function(e){return e?sr(vl(e),-9007199254740991,p):0===e?e:0},Wn.toString=xl,Wn.toUpper=function(e){return xl(e).toUpperCase()},Wn.trim=function(e,t,n){if((e=xl(e))&&(n||t===i))return Qt(e);if(!e||!(t=fi(t)))return e;var r=mn(e),o=mn(t);return wi(r,nn(r,o),rn(r,o)+1).join("")},Wn.trimEnd=function(e,t,n){if((e=xl(e))&&(n||t===i))return e.slice(0,vn(e)+1);if(!e||!(t=fi(t)))return e;var r=mn(e);return wi(r,0,rn(r,mn(t))+1).join("")},Wn.trimStart=function(e,t,n){if((e=xl(e))&&(n||t===i))return e.replace(ae,"");if(!e||!(t=fi(t)))return e;var r=mn(e);return wi(r,nn(r,mn(t))).join("")},Wn.truncate=function(e,t){var n=30,r="...";if(rl(t)){var o="separator"in t?t.separator:o;n="length"in t?vl(t.length):n,r="omission"in t?fi(t.omission):r}var a=(e=xl(e)).length;if(sn(e)){var l=mn(e);a=l.length}if(n>=a)return e;var u=n-gn(r);if(u<1)return r;var s=l?wi(l,0,u).join(""):e.slice(0,u);if(o===i)return s+r;if(l&&(u+=s.length-u),ul(o)){if(e.slice(u).search(o)){var c,f=s;for(o.global||(o=Ce(o.source,xl(ge.exec(o))+"g")),o.lastIndex=0;c=o.exec(f);)var d=c.index;s=s.slice(0,d===i?u:d)}}else if(e.indexOf(fi(o),u)!=u){var h=s.lastIndexOf(o);h>-1&&(s=s.slice(0,h))}return s+r},Wn.unescape=function(e){return(e=xl(e))&&Z.test(e)?e.replace(X,yn):e},Wn.uniqueId=function(e){var t=++Pe;return xl(e)+t},Wn.upperCase=Ql,Wn.upperFirst=Jl,Wn.each=xa,Wn.eachRight=ba,Wn.first=$o,cu(Wn,(Du={},br(Wn,(function(e,t){Ne.call(Wn.prototype,t)||(Du[t]=e)})),Du),{chain:!1}),Wn.VERSION="4.17.21",St(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Wn[e].placeholder=Wn})),St(["drop","take"],(function(e,t){jn.prototype[e]=function(n){n=n===i?1:_n(vl(n),0);var r=this.__filtered__&&!t?new jn(this):this.clone();return r.__filtered__?r.__takeCount__=xn(n,r.__takeCount__):r.__views__.push({size:xn(n,m),type:e+(r.__dir__<0?"Right":"")}),r},jn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),St(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;jn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:co(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),St(["head","last"],(function(e,t){var n="take"+(t?"Right":"");jn.prototype[e]=function(){return this[n](1).value()[0]}})),St(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");jn.prototype[e]=function(){return this.__filtered__?new jn(this):this[n](1)}})),jn.prototype.compact=function(){return this.filter(au)},jn.prototype.find=function(e){return this.filter(e).head()},jn.prototype.findLast=function(e){return this.reverse().find(e)},jn.prototype.invokeMap=Qr((function(e,t){return"function"==typeof e?new jn(this):this.map((function(n){return Rr(n,e,t)}))})),jn.prototype.reject=function(e){return this.filter(Ba(co(e)))},jn.prototype.slice=function(e,t){e=vl(e);var n=this;return n.__filtered__&&(e>0||t<0)?new jn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(n=(t=vl(t))<0?n.dropRight(-t):n.take(t-e)),n)},jn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},jn.prototype.toArray=function(){return this.take(m)},br(jn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=Wn[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);o&&(Wn.prototype[t]=function(){var t=this.__wrapped__,l=r?[1]:arguments,u=t instanceof jn,s=l[0],c=u||Ya(t),f=function(e){var t=o.apply(Wn,Nt([e],l));return r&&d?t[0]:t};c&&n&&"function"==typeof s&&1!=s.length&&(u=c=!1);var d=this.__chain__,h=!!this.__actions__.length,p=a&&!d,g=u&&!h;if(!a&&c){t=g?t:new jn(this);var m=e.apply(t,l);return m.__actions__.push({func:ma,args:[f],thisArg:i}),new Vn(m,d)}return p&&g?e.apply(this,l):(m=this.thru(f),p?r?m.value()[0]:m.value():m)})})),St(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Le[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Wn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Ya(i)?i:[],e)}return this[n]((function(n){return t.apply(Ya(n)?n:[],e)}))}})),br(jn.prototype,(function(e,t){var n=Wn[t];if(n){var r=n.name+"";Ne.call(kn,r)||(kn[r]=[]),kn[r].push({name:t,func:n})}})),kn[Wi(i,2).name]=[{name:"wrapper",func:i}],jn.prototype.clone=function(){var e=new jn(this.__wrapped__);return e.__actions__=Li(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Li(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Li(this.__views__),e},jn.prototype.reverse=function(){if(this.__filtered__){var e=new jn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},jn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ya(e),r=t
2<0,i=n?e.length:0,o=function(e,t,n){var r=-1,i=n.length;for(;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=xn(t,e+a);break;case"takeRight":e=_n(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,l=o.end,u=l-a,s=r?l:a-1,c=this.__iteratees__,f=c.length,d=0,h=xn(u,this.__takeCount__);if(!n||!r&&i==u&&h==u)return mi(e,this.__actions__);var p=[];e:for(;u--&&d<h;){for(var g=-1,m=e[s+=t];++g<f;){var v=c[g],y=v.iteratee,E=v.type,_=y(m);if(2==E)m=_;else if(!_){if(1==E)continue e;break e}}p[d++]=m}return p},Wn.prototype.at=va,Wn.prototype.chain=function(){return ga(this)},Wn.prototype.commit=function(){return new Vn(this.value(),this.__chain__)},Wn.prototype.next=function(){this.__values__===i&&(this.__values__=gl(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},Wn.prototype.plant=function(e){for(var t,n=this;n instanceof qn;){var r=Wo(n);r.__index__=0,r.__values__=i,t?o.__wrapped__=r:t=r;var o=r;n=n.__wrapped__}return o.__wrapped__=e,t},Wn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof jn){var t=e;return this.__actions__.length&&(t=new jn(this)),(t=t.reverse()).__actions__.push({func:ma,args:[ra],thisArg:i}),new Vn(t,this.__chain__)}return this.thru(ra)},Wn.prototype.toJSON=Wn.prototype.valueOf=Wn.prototype.value=function(){return mi(this.__wrapped__,this.__actions__)},Wn.prototype.first=Wn.prototype.head,Qe&&(Wn.prototype[Qe]=function(){return this}),Wn}();gt._=En,(r=function(){return En}.call(t,n,t,e))===i||(e.exports=r)}.call(this)},75429:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>y,r7:()=>m});var r=n(45987),i=n(87462),o=n(15671),a=n(43144),l=n(60136),u=n(82963),s=n(61120),c=n(67294),f=(n(34412),n(73935),n(48533)),d=n(75912),h=(n(93998),n(35639),n(61085));function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,s.Z)(e);if(t){var i=(0,s.Z)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,u.Z)(this,n)}}var g={cacheOptions:!1,defaultOptions:!1,filterOption:null,isLoading:!1},m=function(e){var t,n;return n=t=function(t){(0,l.Z)(u,t);var n=p(u);function u(e){var t;return(0,o.Z)(this,u),(t=n.call(this)).select=void 0,t.lastRequest=void 0,t.mounted=!1,t.optionsCache={},t.handleInputChange=function(e,n){var r=t.props,i=r.cacheOptions,o=r.onInputChange,a=(0,f.G)(e,n,o);if(!a)return delete t.lastRequest,void t.setState({inputValue:"",loadedInputValue:"",loadedOptions:[],isLoading:!1,passEmptyOptions:!1});if(i&&t.optionsCache[a])t.setState({inputValue:a,loadedInputValue:a,loadedOptions:t.optionsCache[a],isLoading:!1,passEmptyOptions:!1});else{var l=t.lastRequest={};t.setState({inputValue:a,isLoading:!0,passEmptyOptions:!t.state.loadedInputValue},(function(){t.loadOptions(a,(function(e){t.mounted&&(e&&(t.optionsCache[a]=e),l===t.lastRequest&&(delete t.lastRequest,t.setState({isLoading:!1,loadedInputValue:a,loadedOptions:e||[],passEmptyOptions:!1})))}))}))}return a},t.state={defaultOptions:Array.isArray(e.defaultOptions)?e.defaultOptions:void 0,inputValue:void 0!==e.inputValue?e.inputValue:"",isLoading:!0===e.defaultOptions,loadedOptions:[],passEmptyOptions:!1},t}return(0,a.Z)(u,[{key:"componentDidMount",value:function(){var e=this;this.mounted=!0;var t=this.props.defaultOptions,n=this.state.inputValue;!0===t&&this.loadOptions(n,(function(t){if(e.mounted){var n=!!e.lastRequest;e.setState({defaultOptions:t||[],isLoading:n})}}))}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){e.cacheOptions!==this.props.cacheOptions&&(this.optionsCache={}),e.defaultOptions!==this.props.defaultOptions&&this.setState({defaultOptions:Array.isArray(e.defaultOptions)?e.defaultOptions:void 0})}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"loadOptions",value:function(e,t){var n=this.props.loadOptions;if(!n)return t();var r=n(e,t);r&&"function"==typeof r.then&&r.then(t,(function(){return t()}))}},{key:"render",value:function(){var t=this,n=this.props,o=(n.loadOptions,n.isLoading),a=(0,r.Z)(n,["loadOptions","isLoading"]),l=this.state,u=l.defaultOptions,s=l.inputValue,f=l.isLoading,d=l.loadedInputValue,h=l.loadedOptions,p=l.passEmptyOptions?[]:s&&d?h:u||[];return c.createElement(e,(0,i.Z)({},a,{ref:function(e){t.select=e},options:p,isLoading:f||o,onInputChange:this.handleInputChange}))}}]),u}(c.Component),t.defaultProps=g,n},v=(0,h.m)(d.S);const y=m(v)},55519:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>g});var r=n(15671),i=n(43144),o=n(60136),a=n(82963),l=n(61120),u=n(67294),s=n(30845),c=n(34412),f=(n(73935),n(75912)),d=(n(93998),n(35639),n(61085)),h=n(36043);function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,l.Z)(e);if(t){var i=(0,l.Z)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,a.Z)(this,n)}}u.Component;const g=(0,d.m)(f.S)},84581:(e,t,n)=>{var r;!function(){"use strict";(r=function(e,t,n,r){r=r||{},this.dictionary=null,this.rules={},this.dictionaryTable={},this.compoundRules=[],this.compoundRuleCodes={},this.replacementTable=[],this.flags=r.flags||{},this.memoized={},this.loaded=!1;var i,o,a,l,u,s=this;function c(e,t){var n=s._readFile(e,null,r.asyncLoad);r.asyncLoad?n.then((function(e){t(e)})):t(n)}function f(e){t=e,n&&h()}function d(e){n=e,t&&h()}
vendor: 14,712 bytes, line 2
2function h(){for(s.rules=s._parseAFF(t),s.compoundRuleCodes={},o=0,l=s.compoundRules.length;o<l;o++){var e=s.compoundRules[o];for(a=0,u=e.length;a<u;a++)s.compoundRuleCodes[e[a]]=[]}for(o in"ONLYINCOMPOUND"in s.flags&&(s.compoundRuleCodes[s.flags.ONLYINCOMPOUND]=[]),s.dictionaryTable=s._parseDIC(n),s.compoundRuleCodes)0===s.compoundRuleCodes[o].length&&delete s.compoundRuleCodes[o];for(o=0,l=s.compoundRules.length;o<l;o++){var i=s.compoundRules[o],c="";for(a=0,u=i.length;a<u;a++){var f=i[a];f in s.compoundRuleCodes?c+="("+s.compoundRuleCodes[f].join("|")+")":c+=f}s.compoundRules[o]=new RegExp(c,"i")}s.loaded=!0,r.asyncLoad&&r.loadedCallback&&r.loadedCallback(s)}return e&&(s.dictionary=e,t&&n?h():"undefined"!=typeof window&&"chrome"in window&&"extension"in window.chrome&&"getURL"in window.chrome.extension?(i=r.dictionaryPath?r.dictionaryPath:"typo/dictionaries",t||c(chrome.extension.getURL(i+"/"+e+"/"+e+".aff"),f),n||c(chrome.extension.getURL(i+"/"+e+"/"+e+".dic"),d)):(i=r.dictionaryPath?r.dictionaryPath:"//dictionaries",t||c(i+"/"+e+"/"+e+".aff",f),n||c(i+"/"+e+"/"+e+".dic",d))),this}).prototype={load:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);return this},_readFile:function(e,t,r){if(t=t||"utf8","undefined"!=typeof XMLHttpRequest){var i,o=new XMLHttpRequest;return o.open("GET",e,r),r&&(i=new Promise((function(e,t){o.onload=function(){200===o.status?e(o.responseText):t(o.statusText)},o.onerror=function(){t(o.statusText)}}))),o.overrideMimeType&&o.overrideMimeType("text/plain; charset="+t),o.send(null),r?i:o.responseText}var a=n(62562);try{if(a.existsSync(e))return a.readFileSync(e,t);console.log("Path "+e+" does not exist.")}catch(e){return console.log(e),""}},_parseAFF:function(e){var t,n,r,i,o,a,l,u={},s=e.split(/\r?\n/);for(i=0,a=s.length;i<a;i++)if(t=(t=this._removeAffixComments(s[i])).trim()){var c=t.split(/\s+/),f=c[0];if("PFX"==f||"SFX"==f){var d=c[1],h=c[2],p=[];for(o=i+1,l=i+1+(n=parseInt(c[3],10));o<l;o++){var g=(r=s[o].split(/\s+/))[2],m=r[3].split("/"),v=m[0];"0"===v&&(v="");var y=this.parseRuleCodes(m[1]),E=r[4],_={};_.add=v,y.length>0&&(_.continuationClasses=y),"."!==E&&(_.match="SFX"===f?new RegExp(E+"$"):new RegExp("^"+E)),"0"!=g&&(_.remove="SFX"===f?new RegExp(g+"$"):g),p.push(_)}u[d]={type:f,combineable:"Y"==h,entries:p},i+=n}else if("COMPOUNDRULE"===f){for(o=i+1,l=i+1+(n=parseInt(c[1],10));o<l;o++)r=(t=s[o]).split(/\s+/),this.compoundRules.push(r[1]);i+=n}else"REP"===f?3===(r=t.split(/\s+/)).length&&this.replacementTable.push([r[1],r[2]]):this.flags[f]=c[1]}return u},_removeAffixComments:function(e){return e.match(/^\s*#/,"")?"":e},_parseDIC:function(e){var t=(e=this._removeDicComments(e)).split(/\r?\n/),n={};function r(e,t){n.hasOwnProperty(e)||(n[e]=null),t.length>0&&(null===n[e]&&(n[e]=[]),n[e].push(t))}for(var i=1,o=t.length;i<o;i++){var a=t[i];if(a){var l=a.split("/",2),u=l[0];if(l.length>1){var s=this.parseRuleCodes(l[1]);"NEEDAFFIX"in this.flags&&-1!=s.indexOf(this.flags.NEEDAFFIX)||r(u,s);for(var c=0,f=s.length;c<f;c++){var d=s[c],h=this.rules[d];if(h)for(var p=this._applyRule(u,h),g=0,m=p.length;g<m;g++){var v=p[g];if(r(v,[]),h.combineable)for(var y=c+1;y<f;y++){var E=s[y],_=this.rules[E];if(_&&_.combineable&&h.type!=_.type)for(var x=this._applyRule(v,_),b=0,w=x.length;b<w;b++){r(x[b],[])}}}d in this.compoundRuleCodes&&this.compoundRuleCodes[d].push(u)}}else r(u.trim(),[])}}return n},_removeDicComments:function(e){return e=e.replace(/^\t.*$/gm,"")},parseRuleCodes:function(e){if(e){if("FLAG"in this.flags){if("long"===this.flags.FLAG){for(var t=[],n=0,r=e.length;n<r;n+=2)t.push(e.substr(n,2));return t}return"num"===this.flags.FLAG?e.split(","):"UTF-8"===this.flags.FLAG?Array.from(e):e.split("")}return e.split("")}return[]},_applyRule:function(e,t){for(var n=t.entries,r=[],i=0,o=n.length;i<o;i++){var a=n[i];if(!a.match||e.match(a.match)){var l=e;if(a.remove&&(l=l.replace(a.remove,"")),"SFX"===t.type?l+=a.add:l=a.add+l,r.push(l),"continuationClasses"in a)for(var u=0,s=a.continuationClasses.length;u<s;u++){var c=this.rules[a.continuationClasses[u]];c&&(r=r.concat(this._applyRule(l,c)))}}}return r},check:function(e){if(!this.loaded)throw"Dictionary not loaded.";var t=e.replace(/^\s\s*/,"").replace(/\s\s*$/,"");if(this.checkExact(t))return!0;if(t.toUpperCase()===t){var n=t[0]+t.substring(1).toLowerCase();if(this.hasFlag(n,"KEEPCASE"))return!1;if(this.checkExact(n))return!0;if(this.checkExact(t.toLowerCase()))return!0}var r=t[0].toLowerCase()+t.substring(1);if(r!==t){if(this.hasFlag(r,"KEEPCASE"))return!1;if(this.checkExact(r))return!0}return!1},checkExact:function(e){if(!this.loaded)throw"Dictionary not loaded.";var t,n,r=this.dictionaryTable[e];if(void 0===r){if("COMPOUNDMIN"in this.flags&&e.length>=this.flags.COMPOUNDMIN)for(t=0,n=this.compoundRules.length;t<n;t++)if(e.match(this.compoundRules[t]))return!0}else{if(null===r)return!0;if("object"==typeof r)for(t=0,n=r.length;t<n;t++)if(!this.hasFlag(e,"ONLYINCOMPOUND",r[t]))return!0}return!1},hasFlag:function(e,t,n){if(!this.loaded)throw"Dictionary not loaded.";return!(!(t in this.flags)||(void 0===n&&(n=Array.prototype.concat.apply([],this.dictionaryTable[e])),!n||-1===n.indexOf(this.flags[t])))},alphabet:"",suggest:function(e,t){if(!this.loaded)throw"Dictionary not loaded.";if(t=t||5,this.memoized.hasOwnProperty(e)){var n=this.memoized[e].limit;if(t<=n||this.memoized[e].suggestions.length<n)return this.memoized[e].suggestions.slice(0,t)}if(this.check(e))return[];for(var r=0,i=this.replacementTable.length;r<i;r++){var o=this.replacementTable[r];if(-1!==e.indexOf(o[0])){var a=e.replace(o[0],o[1]);if(this.check(a))return[a]}}var l=this;function u(e,t){var n,r,i,o,a={},u=l.alphabet.length;if("string"==typeof e){var s=e;(e={})[s]=!0}for(var s in e)for(n=0,i=s.length+1;n<i;n++){var c=[s.substring(0,n),s.substring(n)];if(c[1]&&(o=c[0]+c[1].substring(1),t&&!l.check(o)||(o in a?a[o]+=1:a[o]=1)),c[1].length>1&&c[1][1]!==c[1][0]&&(o=c[0]+c[1][1]+c[1][0]+c[1].substring(2),t&&!l.check(o)||(o in a?a[o]+=1:a[o]=1)),c[1]){var f=c[1].substring(0,1).toUpperCase()===c[1].substring(0,1)?"uppercase":"lowercase";for(r=0;r<u;r++){var d=l.alphabet[r];"uppercase"===f&&(d=d.toUpperCase()),d!=c[1].substring(0,1)&&(o=c[0]+d+c[1].substring(1),t&&!l.check(o)||(o in a?a[o]+=1:a[o]=1))}}if(c[1])for(r=0;r<u;r++){f=c[0].substring(-1).toUpperCase()===c[0].substring(-1)&&c[1].substring(0,1).toUpperCase()===c[1].substring(0,1)?"uppercase":"lowercase",d=l.alphabet[r];"uppercase"===f&&(d=d.toUpperCase()),o=c[0]+d+c[1],t&&!l.check(o)||(o in a?a[o]+=1:a[o]=1)}}return a}return l.alphabet="abcdefghijklmnopqrstuvwxyz",this.memoized[e]={suggestions:function(e){var n,r=u(e),i=u(r,!0);for(var o in r)l.check(o)&&(o in i?i[o]+=r[o]:i[o]=r[o]);var a=[];for(n in i)i.hasOwnProperty(n)&&a.push([n,i[n]]);a.sort((function(e,t){var n=e[1],r=t[1];return n<r?-1:n>r?1:t[0].localeCompare(e[0])})).reverse();var s=[],c="lowercase";e.toUpperCase()===e?c="uppercase":e.substr(0,1).toUpperCase()+e.substr(1).toLowerCase()===e&&(c="capitalized");var f=t;for(n=0;n<Math.min(f,a.length);n++)"uppercase"===c?a[n][0]=a[n][0].toUpperCase():"capitalized"===c&&(a[n][0]=a[n][0].substr(0,1).toUpperCase()+a[n][0].substr(1)),l.hasFlag(a[n][0],"NOSUGGEST")||-1!=s.indexOf(a[n][0])?f++:s.push(a[n][0]);return s}(e),limit:t},this.memoized[e].suggestions}}}(),e.exports=r},98963:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(67294);const i=function(e){var t=(0,r.useRef)();return t.current||(t.current={v:e()}),t.current.v}},21733:(e,t)=>{"use strict";function n(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,(i=r.key,o=void 0,"symbol"==typeof(o=function(e,t){if("object"!=typeof e||null===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 new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(i,"string"))?o:String(o)),r)}var i,o}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function i(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0;return function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}t.ce={async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};var a=/[&<>"']/,l=new RegExp(a.source,"g"),u=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,s=new RegExp(u.source,"g"),c={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},f=function(e){return c[e]};function d(e,t){if(t){if(a.test(e))return e.replace(l,f)}else if(u.test(e))return e.replace(s,f);return e}var h=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function p(e){return e.replace(h,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var g=/(^|[^\[])\^/g;function m(e,t){e="string"==typeof e?e:e.source,t=t||"";var n={replace:function(t,r){return r=(r=r.source||r).replace(g,"$1"),e=e.replace(t,r),n},getRegex:function(){return new RegExp(e,t)}};return n}var v=/[^\w:]/g,y=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function E(e,t,n){if(e){var r;try{r=decodeURIComponent(p(n)).replace(v,"").toLowerCase()}catch(e){return null}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return null}t&&!y.test(n)&&(n=function(e,t){_[" "+e]||(x.test(e)?_[" "+e]=e+"/":_[" "+e]=A(e,"/",!0));e=_[" "+e];var n=-1===e.indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(b,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(w,"$1")+t:e+t}(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(e){return null}return n}var _={},x=/^[^:]+:\/*[^/]*$/,b=/^([^:]+:)[\s\S]*$/,w=/^([^:]+:\/*[^/]*)[\s\S]*$/;var D={exec:function(){}};function T(e){for(var t,n,r=1;r<arguments.length;r++)for(n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function I(e,t){var n=e.replace(/\|/g,(function(e,t,n){for(var r=!1,i=t;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(/ \|/),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");return n}function A(e,t,n){var r=e.length;if(0===r)return"";for(var i=0;i<r;){var o=e.charAt(r-i-1);if(o!==t||n){if(o===t||!n)break;i++}else i++}return e.slice(0,r-i)}function C(e){e&&e.sanitize&&!e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function S(e,t){if(t<1)return"";for(var n="";t>1;)1&t&&(n+=e),t>>=1,e+=e;return n+e}function O(e,t,n,r){var i=t.href,o=t.title?d(t.title):null,a=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;var l={type:"link",raw:n,href:i,title:o,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,l}return{type:"image",raw:n,href:i,title:o,text:d(a)}}var L=function(){function e(e){this.options=e||t.ce}var n=e.prototype;return n.space=function(e){var t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}},n.code=function(e){var t=this.rules.block.code.exec(e);if(t){var n=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:A(n,"\n")}}},n.fences=function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var r=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:t[0].length>=r.length?e.slice(r.length):e})).join("\n")}(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline._escapes,"$1"):t[2],text:r}}},n.heading=function(e){var t=this.rules.block.heading.exec(e);if(t){var n=t[2].trim();if(/#$/.test(n)){var r=A(n,"#");this.options.pedantic?n=r.trim():r&&!/ $/.test(r)||(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}},n.hr=function(e){var t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}},n.blockquote=function(e){var t=this.rules.block.blockquote.exec(e);if(t){var n=t[0].replace(/^ *>[ \t]?/gm,""),r=this.lexer.state.top;this.lexer.state.top=!0;var i=this.lexer.blockTokens(n);return this.lexer.state.top=r,{type:"blockquote",raw:t[0],tokens:i,text:n}}},n.list=function(e){var t=this.rules.block.list.exec(e);if(t){var n,r,i,o,a,l,u,s,c,f,d,h,p=t[1].trim(),g=p.length>1,m={type:"list",raw:"",ordered:g,start:g?+p.slice(0,-1):"",loose:!1,items:[]};p=g?"\\d{1,9}\\"+p.slice(-1):"\\"+p,this.options.pedantic&&(p=g?p:"[*+-]");for(var v=new RegExp("^( {0,3}"+p+")((?:[\t ][^\\n]*)?(?:\\n|$))");e&&(h=!1,t=v.exec(e))&&!this.rules.block.hr.test(e);){if(n=t[0],e=e.substring(n.length),s=t[2].split("\n",1)[0].replace(/^\t+/,(function(e){return" ".repeat(3*e.length)})),c=e.split("\n",1)[0],this.options.pedantic?(o=2,d=s.trimLeft()):(o=(o=t[2].search(/[^ ]/))>4?1:o,d=s.slice(o),o+=t[1].length),l=!1,!s&&/^ *$/.test(c)&&(n+=c+"\n",e=e.substring(c.length+1),h=!0),!h)for(var y=new RegExp("^ {0,"+Math.min(3,o-1)+"}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))"),E=new RegExp("^ {0,"+Math.min(3,o-1)+"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)"),_=new RegExp("^ {0,"+Math.min(3,o-1)+"}(?:```|~~~)"),x=new RegExp("^ {0,"+Math.min(3,o-1)+"}#");e&&(c=f=e.split("\n",1)[0],this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g,"  ")),!_.test(c))&&!x.test(c)&&!y.test(c)&&!E.test(e);){if(c.search(/[^ ]/)>=o||!c.trim())d+="\n"+c.slice(o);else{if(l)break;if(s.search(/[^ ]/)>=4)break;
2if(_.test(s))break;if(x.test(s))break;if(E.test(s))break;d+="\n"+c}l||c.trim()||(l=!0),n+=f+"\n",e=e.substring(f.length+1),s=c.slice(o)}m.loose||(u?m.loose=!0:/\n *\n *$/.test(n)&&(u=!0)),this.options.gfm&&(r=/^\[[ xX]\] /.exec(d))&&(i="[ ] "!==r[0],d=d.replace(/^\[[ xX]\] +/,"")),m.items.push({type:"list_item",raw:n,task:!!r,checked:i,loose:!1,text:d}),m.raw+=n}m.items[m.items.length-1].raw=n.trimRight(),m.items[m.items.length-1].text=d.trimRight(),m.raw=m.raw.trimRight();var b=m.items.length;for(a=0;a<b;a++)if(this.lexer.state.top=!1,m.items[a].tokens=this.lexer.blockTokens(m.items[a].text,[]),!m.loose){var w=m.items[a].tokens.filter((function(e){return"space"===e.type})),D=w.length>0&&w.some((function(e){return/\n.*\n/.test(e.raw)}));m.loose=D}if(m.loose)for(a=0;a<b;a++)m.items[a].loose=!0;return m}},n.html=function(e){var t=this.rules.block.html.exec(e);if(t){var n={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};if(this.options.sanitize){var r=this.options.sanitizer?this.options.sanitizer(t[0]):d(t[0]);n.type="paragraph",n.text=r,n.tokens=this.lexer.inline(r)}return n}},n.def=function(e){var t=this.rules.block.def.exec(e);if(t){var n=t[1].toLowerCase().replace(/\s+/g," "),r=t[2]?t[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline._escapes,"$1"):"",i=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline._escapes,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:r,title:i}}},n.table=function(e){var t=this.rules.block.table.exec(e);if(t){var n={type:"table",header:I(t[1]).map((function(e){return{text:e}})),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(n.header.length===n.align.length){n.raw=t[0];var r,i,o,a,l=n.align.length;for(r=0;r<l;r++)/^ *-+: *$/.test(n.align[r])?n.align[r]="right":/^ *:-+: *$/.test(n.align[r])?n.align[r]="center":/^ *:-+ *$/.test(n.align[r])?n.align[r]="left":n.align[r]=null;for(l=n.rows.length,r=0;r<l;r++)n.rows[r]=I(n.rows[r],n.header.length).map((function(e){return{text:e}}));for(l=n.header.length,i=0;i<l;i++)n.header[i].tokens=this.lexer.inline(n.header[i].text);for(l=n.rows.length,i=0;i<l;i++)for(a=n.rows[i],o=0;o<a.length;o++)a[o].tokens=this.lexer.inline(a[o].text);return n}}},n.lheading=function(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])}},n.paragraph=function(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)}}},n.text=function(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])}},n.escape=function(e){var t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:d(t[1])}},n.tag=function(e){var t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):d(t[0]):t[0]}},n.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var n=t[2].trim();if(!this.options.pedantic&&/^</.test(n)){if(!/>$/.test(n))return;var r=A(n.slice(0,-1),"\\");if((n.length-r.length)%2==0)return}else{var i=function(e,t){if(-1===e.indexOf(t[1]))return-1;for(var n=e.length,r=0,i=0;i<n;i++)if("\\"===e[i])i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&--r<0)return i;return-1}(t[2],"()");if(i>-1){var o=(0===t[0].indexOf("!")?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,o).trim(),t[3]=""}}var a=t[2],l="";if(this.options.pedantic){var u=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(a);u&&(a=u[1],l=u[3])}else l=t[3]?t[3].slice(1,-1):"";return a=a.trim(),/^</.test(a)&&(a=this.options.pedantic&&!/>$/.test(n)?a.slice(1):a.slice(1,-1)),O(t,{href:a?a.replace(this.rules.inline._escapes,"$1"):a,title:l?l.replace(this.rules.inline._escapes,"$1"):l},t[0],this.lexer)}},n.reflink=function(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var r=(n[2]||n[1]).replace(/\s+/g," ");
2if(!(r=t[r.toLowerCase()])){var i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return O(n,r,n[0],this.lexer)}},n.emStrong=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.emStrong.lDelim.exec(e);if(r&&(!r[3]||!n.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFB
2D3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var i=r[1]||r[2]||"";if(!i||i&&(""===n||this.rules.inline.punctuation.exec(n))){var o,a,l=r[0].length-1,u=l,s=0,c="*"===r[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+l);
vendor: 24,592 bytes, line 2
2null!=(r=c.exec(t));)if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6])if(a=o.length,r[3]||r[4])u+=a;else if(!((r[5]||r[6])&&l%3)||(l+a)%3){if(!((u-=a)>0)){a=Math.min(a,a+u+s);var f=e.slice(0,l+r.index+(r[0].length-o.length)+a);if(Math.min(l,a)%2){var d=f.slice(1,-1);return{type:"em",raw:f,text:d,tokens:this.lexer.inlineTokens(d)}}var h=f.slice(2,-2);return{type:"strong",raw:f,text:h,tokens:this.lexer.inlineTokens(h)}}}else s+=a}}},n.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(/\n/g," "),r=/[^ ]/.test(n),i=/^ /.test(n)&&/ $/.test(n);return r&&i&&(n=n.substring(1,n.length-1)),n=d(n,!0),{type:"codespan",raw:t[0],text:n}}},n.br=function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}},n.del=function(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])}},n.autolink=function(e,t){var n,r,i=this.rules.inline.autolink.exec(e);if(i)return r="@"===i[2]?"mailto:"+(n=d(this.options.mangle?t(i[1]):i[1])):n=d(i[1]),{type:"link",raw:i[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}},n.url=function(e,t){var n;if(n=this.rules.inline.url.exec(e)){var r,i;if("@"===n[2])i="mailto:"+(r=d(this.options.mangle?t(n[0]):n[0]));else{var o;do{o=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(o!==n[0]);r=d(n[0]),i="www."===n[1]?"http://"+n[0]:n[0]}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}},n.inlineText=function(e,t){var n,r=this.rules.inline.text.exec(e);if(r)return n=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):d(r[0]):r[0]:d(this.options.smartypants?t(r[0]):r[0]),{type:"text",raw:r[0],text:n}},e}(),R={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {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|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:D,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};R.def=m(R.def).replace("label",R._label).replace("title",R._title).getRegex(),R.bullet=/(?:[*+-]|\d{1,9}[.)])/,R.listItemStart=m(/^( *)(bull) */).replace("bull",R.bullet).getRegex(),R.list=m(R.list).replace(/bull/g,R.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+R.def.source+")").getRegex(),R._tag="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|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",R._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,R.html=m(R.html,"i").replace("comment",R._comment).replace("tag",R._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),R.paragraph=m(R._paragraph).replace("hr",R.hr).replace("heading"," {0,3}#{1,6} ").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",R._tag).getRegex(),R.blockquote=m(R.blockquote).replace("paragraph",R.paragraph).getRegex(),R.normal=T({},R),R.gfm=T({},R.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),R.gfm.table=m(R.gfm.table).replace("hr",R.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\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",R._tag).getRegex(),R.gfm.paragraph=m(R._paragraph).replace("hr",R.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",R.gfm.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",R._tag).getRegex(),R.pedantic=T({},R.normal,{html:m("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",R._comment).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:D,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:m(R.normal._paragraph).replace("hr",R.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",R.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var k={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:D,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:D,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};function M(e){return e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function F(e){var t,n,r="",i=e.length;for(t=0;t<i;t++)n=e.charCodeAt(t),Math.random()>.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}k._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",k.punctuation=m(k.punctuation).replace(/punctuation/g,k._punctuation).getRegex(),k.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,k.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g,k._comment=m(R._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),k.emStrong.lDelim=m(k.emStrong.lDelim).replace(/punct/g,k._punctuation).getRegex(),k.emStrong.rDelimAst=m(k.emStrong.rDelimAst,"g").replace(/punct/g,k._punctuation).getRegex(),k.emStrong.rDelimUnd=m(k.emStrong.rDelimUnd,"g").replace(/punct/g,k._punctuation).getRegex(),k._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,k._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,k._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])?)+(?![-_])/,k.autolink=m(k.autolink).replace("scheme",k._scheme).replace("email",k._email).getRegex(),k._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,k.tag=m(k.tag).replace("comment",k._comment).replace("attribute",k._attribute).getRegex(),k._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,k._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,k._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,k.link=m(k.link).replace("label",k._label).replace("href",k._href).replace("title",k._title).getRegex(),k.reflink=m(k.reflink).replace("label",k._label).replace("ref",R._label).getRegex(),k.nolink=m(k.nolink).replace("ref",R._label).getRegex(),k.reflinkSearch=m(k.reflinkSearch,"g").replace("reflink",k.reflink).replace("nolink",k.nolink).getRegex(),k.normal=T({},k),k.pedantic=T({},k.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:m(/^!?\[(label)\]\((.*?)\)/).replace("label",k._label).getRegex(),reflink:m(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",k._label).getRegex()}),k.gfm=T({},k.normal,{escape:m(k.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\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.!#$%&'*+\/=?_`{\|}~-]+@)))/}),k.gfm.url=m(k.gfm.url,"i").replace("email",k.gfm._extended_email).getRegex(),k.breaks=T({},k.gfm,{br:m(k.br).replace("{2,}","*").getRegex(),text:m(k.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var N=function(){function e(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||t.ce,this.options.tokenizer=this.options.tokenizer||new L,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 n={block:R.normal,inline:k.normal};this.options.pedantic?(n.block=R.pedantic,n.inline=k.pedantic):this.options.gfm&&(n.block=R.gfm,this.options.breaks?n.inline=k.breaks:n.inline=k.gfm),this.tokenizer.rules=n}e.lex=function(t,n){return new e(n).lex(t)},e.lexInline=function(t,n){return new e(n).inlineTokens(t)};var r,i,o,a=e.prototype;return a.lex=function(e){var t;for(e=e.replace(/\r\n|\r/g,"\n"),this.blockTokens(e,this.tokens);t=this.inlineQueue.shift();)this.inlineTokens(t.src,t.tokens);return this.tokens},a.blockTokens=function(e,t){var n,r,i,o,a=this;for(void 0===t&&(t=[]),e=this.options.pedantic?e.replace(/\t/g,"    ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,(function(e,t,n){return t+"    ".repeat(n.length)}));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((function(r){return!!(n=r.call({lexer:a},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)}))))if(n=this.tokenizer.space(e))e=e.substring(n.raw.length),1===n.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(n);else if(n=this.tokenizer.code(e))e=e.substring(n.raw.length),!(r=t[t.length-1])||"paragraph"!==r.type&&"text"!==r.type?t.push(n):(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.fences(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.heading(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.hr(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.blockquote(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.list(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.html(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.def(e))e=e.substring(n.raw.length),!(r=t[t.length-1])||"paragraph"!==r.type&&"text"!==r.type?this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}):(r.raw+="\n"+n.raw,r.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.table(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.lheading(e))e=e.substring(n.raw.length),t.push(n);else if(i=e,this.options.extensions&&this.options.extensions.startBlock&&function(){var t=1/0,n=e.slice(1),r=void 0;a.options.extensions.startBlock.forEach((function(e){"number"==typeof(r=e.call({lexer:this},n))&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(i=e.substring(0,t+1))}(),this.state.top&&(n=this.tokenizer.paragraph(i)))r=t[t.length-1],o&&"paragraph"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n),o=i.length!==e.length,e=e.substring(n.raw.length);else if(n=this.tokenizer.text(e))e=e.substring(n.raw.length),(r=t[t.length-1])&&"text"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n);else if(e){var l="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(l);break}throw new Error(l)}return this.state.top=!0,t},a.inline=function(e,t){return void 0===t&&(t=[]),this.inlineQueue.push({src:e,tokens:t}),t},a.inlineTokens=function(e,t){var n,r,i,o=this;void 0===t&&(t=[]);var a,l,u,s=e;if(this.tokens.links){var c=Object.keys(this.tokens.links);if(c.length>0)for(;null!=(a=this.tokenizer.rules.inline.reflinkSearch.exec(s));)c.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,a.index)+"["+S("a",a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(a=this.tokenizer.rules.inline.blockSkip.exec(s));)s=s.slice(0,a.index)+"["+S("a",a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(a=this.tokenizer.rules.inline.escapedEmSt.exec(s));)s=s.slice(0,a.index+a[0].length-2)+"++"+s.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;e;)if(l||(u=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((function(r){return!!(n=r.call({lexer:o},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)}))))if(n=this.tokenizer.escape(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.tag(e))e=e.substring(n.raw.length),(r=t[t.length-1])&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.link(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(n.raw.length),(r=t[t.length-1])&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.emStrong(e,s,u))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.codespan(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.br(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.del(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.autolink(e,F))e=e.substring(n.raw.length),t.push(n);else if(this.state.inLink||!(n=this.tokenizer.url(e,F))){if(i=e,this.options.extensions&&this.options.extensions.startInline&&function(){var t=1/0,n=e.slice(1),r=void 0;o.options.extensions.startInline.forEach((function(e){"number"==typeof(r=e.call({lexer:this},n))&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(i=e.substring(0,t+1))}(),n=this.tokenizer.inlineText(i,M))e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(u=n.raw.slice(-1)),l=!0,(r=t[t.length-1])&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(e){var f="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(f);break}throw new Error(f)}}else e=e.substring(n.raw.length),t.push(n);return t},r=e,o=[{key:"rules",get:function(){return{block:R,inline:k}}}],(i=null)&&n(r.prototype,i),o&&n(r,o),Object.defineProperty(r,"prototype",{writable:!1}),e}(),P=function(){function e(e){this.options=e||t.ce}var n=e.prototype;return n.code=function(e,t,n){var r=(t||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(e,r);null!=i&&i!==e&&(n=!0,e=i)}return e=e.replace(/\n$/,"")+"\n",r?'<pre><code class="'+this.options.langPrefix+d(r)+'">'+(n?e:d(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:d(e,!0))+"</code></pre>\n"},n.blockquote=function(e){return"<blockquote>\n"+e+"</blockquote>\n"},n.html=function(e){return e},n.heading=function(e,t,n,r){return this.options.headerIds?"<h"+t+' id="'+(this.options.headerPrefix+r.slug(n))+'">'+e+"</h"+t+">\n":"<h"+t+">"+e+"</h"+t+">\n"},n.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},n.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"</"+r+">\n"},n.listitem=function(e){return"<li>"+e+"</li>\n"},n.checkbox=function(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},n.paragraph=function(e){return"<p>"+e+"</p>\n"},n.table=function(e,t){return t&&(t="<tbody>"+t+"</tbody>"),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"},n.tablerow=function(e){return"<tr>\n"+e+"</tr>\n"},n.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"</"+n+">\n"},n.strong=function(e){return"<strong>"+e+"</strong>"},n.em=function(e){return"<em>"+e+"</em>"},n.codespan=function(e){return"<code>"+e+"</code>"},n.br=function(){return this.options.xhtml?"<br/>":"<br>"},n.del=function(e){return"<del>"+e+"</del>"},n.link=function(e,t,n){if(null===(e=E(this.options.sanitize,this.options.baseUrl,e)))return n;var r='<a href="'+e+'"';return t&&(r+=' title="'+t+'"'),r+=">"+n+"</a>"},n.image=function(e,t,n){if(null===(e=E(this.options.sanitize,this.options.baseUrl,e)))return n;var r='<img src="'+e+'" alt="'+n+'"';return t&&(r+=' title="'+t+'"'),r+=this.options.xhtml?"/>":">"},n.text=function(e){return e},e}(),B=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,n){return""+n},t.image=function(e,t,n){return""+n},t.br=function(){return""},e}(),G=function(){function e(){this.seen={}}var t=e.prototype;return t.serialize=function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},t.getNextSafeSlug=function(e,t){var n=e,r=0;if(this.seen.hasOwnProperty(n)){r=this.seen[e];do{n=e+"-"+ ++r}while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=r,this.seen[n]=0),n},t.slug=function(e,t){void 0===t&&(t={});var n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)},e}(),z=function(){function e(e){this.options=e||t.ce,this.options.renderer=this.options.renderer||new P,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new B,this.slugger=new G}e.parse=function(t,n){return new e(n).parse(t)},e.parseInline=function(t,n){return new e(n).parseInline(t)};var n=e.prototype;return n.parse=function(e,t){void 0===t&&(t=!0);var n,r,i,o,a,l,u,s,c,f,d,h,g,m,v,y,E,_,x,b="",w=e.length;for(n=0;n<w;n++)if(f=e[n],!(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[f.type])||!1===(x=this.options.extensions.renderers[f.type].call({parser:this},f))&&["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(f.type))switch(f.type){case"space":continue;case"hr":b+=this.renderer.hr();continue;case"heading":b+=this.renderer.heading(this.parseInline(f.tokens),f.depth,p(this.parseInline(f.tokens,this.textRenderer)),this.slugger);continue;case"code":b+=this.renderer.code(f.text,f.lang,f.escaped);continue;case"table":for(s="",u="",o=f.header.length,r=0;r<o;r++)u+=this.renderer.tablecell(this.parseInline(f.header[r].tokens),{header:!0,align:f.align[r]});for(s+=this.renderer.tablerow(u),c="",o=f.rows.length,r=0;r<o;r++){for(u="",a=(l=f.rows[r]).length,i=0;i<a;i++)u+=this.renderer.tablecell(this.parseInline(l[i].tokens),{header:!1,align:f.align[i]});c+=this.renderer.tablerow(u)}b+=this.renderer.table(s,c);continue;case"blockquote":c=this.parse(f.tokens),b+=this.renderer.blockquote(c);continue;case"list":for(d=f.ordered,h=f.start,g=f.loose,o=f.items.length,c="",r=0;r<o;r++)y=(v=f.items[r]).checked,E=v.task,m="",v.task&&(_=this.renderer.checkbox(y),g?v.tokens.length>0&&"paragraph"===v.tokens[0].type?(v.tokens[0].text=_+" "+v.tokens[0].text,v.tokens[0].tokens&&v.tokens[0].tokens.length>0&&"text"===v.tokens[0].tokens[0].type&&(v.tokens[0].tokens[0].text=_+" "+v.tokens[0].tokens[0].text)):v.tokens.unshift({type:"text",text:_}):m+=_),m+=this.parse(v.tokens,g),c+=this.renderer.listitem(m,E,y);b+=this.renderer.list(c,d,h);continue;case"html":b+=this.renderer.html(f.text);continue;case"paragraph":b+=this.renderer.paragraph(this.parseInline(f.tokens));continue;case"text":for(c=f.tokens?this.parseInline(f.tokens):f.text;n+1<w&&"text"===e[n+1].type;)c+="\n"+((f=e[++n]).tokens?this.parseInline(f.tokens):f.text);b+=t?this.renderer.paragraph(c):c;continue;default:var D='Token with "'+f.type+'" type was not found.';if(this.options.silent)return void console.error(D);throw new Error(D)}else b+=x||"";return b},n.parseInline=function(e,t){t=t||this.renderer;var n,r,i,o="",a=e.length;for(n=0;n<a;n++)if(r=e[n],!(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[r.type])||!1===(i=this.options.extensions.renderers[r.type].call({parser:this},r))&&["escape","html","link","image","strong","em","codespan","br","del","text"].includes(r.type))switch(r.type){case"escape":case"text":o+=t.text(r.text);break;case"html":o+=t.html(r.text);break;case"link":o+=t.link(r.href,r.title,this.parseInline(r.tokens,t));break;case"image":o+=t.image(r.href,r.title,r.text);break;case"strong":o+=t.strong(this.parseInline(r.tokens,t));break;case"em":o+=t.em(this.parseInline(r.tokens,t));break;case"codespan":o+=t.codespan(r.text);break;case"br":o+=t.br();break;case"del":o+=t.del(this.parseInline(r.tokens,t));break;default:var l='Token with "'+r.type+'" type was not found.';if(this.options.silent)return void console.error(l);throw new Error(l)}else o+=i||"";return o},e}();function U(e,t,n){if(null==e)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if("function"==typeof t&&(n=t,t=null),C(t=T({},U.defaults,t||{})),n){var r,i=t.highlight;try{r=N.lex(e,t)}catch(e){return n(e)}var o=function(e){var o;if(!e)try{t.walkTokens&&U.walkTokens(r,t.walkTokens),o=z.parse(r,t)}catch(t){e=t}return t.highlight=i,e?n(e):n(null,o)};if(!i||i.length<3)return o();if(delete t.highlight,!r.length)return o();var a=0;return U.walkTokens(r,(function(e){"code"===e.type&&(a++,setTimeout((function(){i(e.text,e.lang,(function(t,n){if(t)return o(t);null!=n&&n!==e.text&&(e.text=n,e.escaped=!0),0===--a&&o()}))}),0))})),void(0===a&&o())}function l(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+d(e.message+"",!0)+"</pre>";throw e}try{var u=N.lex(e,t);if(t.walkTokens){if(t.async)return Promise.all(U.walkTokens(u,t.walkTokens)).then((function(){return z.parse(u,t)})).catch(l);U.walkTokens(u,t.walkTokens)}return z.parse(u,t)}catch(e){l(e)}}U.options=U.setOptions=function(e){var n;return T(U.defaults,e),n=U.defaults,t.ce=n,U},U.getDefaults=o,U.defaults=t.ce,U.use=function(){for(var e=U.defaults.extensions||{renderers:{},childTokens:{}},t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];
2n.forEach((function(t){var n=T({},t);if(n.async=U.defaults.async||n.async,t.extensions&&(t.extensions.forEach((function(t){if(!t.name)throw new Error("extension name required");if(t.renderer){var n=e.renderers[t.name];e.renderers[t.name]=n?function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];var o=t.renderer.apply(this,r);return!1===o&&(o=n.apply(this,r)),o}:t.renderer}if(t.tokenizer){if(!t.level||"block"!==t.level&&"inline"!==t.level)throw new Error("extension level must be 'block' or 'inline'");e[t.level]?e[t.level].unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&("block"===t.level?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:"inline"===t.level&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}t.childTokens&&(e.childTokens[t.name]=t.childTokens)})),n.extensions=e),t.renderer&&function(){var e=U.defaults.renderer||new P,r=function(n){var r=e[n];e[n]=function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var l=t.renderer[n].apply(e,o);return!1===l&&(l=r.apply(e,o)),l}};for(var i in t.renderer)r(i);n.renderer=e}(),t.tokenizer&&function(){var e=U.defaults.tokenizer||new L,r=function(n){var r=e[n];e[n]=function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var l=t.tokenizer[n].apply(e,o);return!1===l&&(l=r.apply(e,o)),l}};for(var i in t.tokenizer)r(i);n.tokenizer=e}(),t.walkTokens){var r=U.defaults.walkTokens;n.walkTokens=function(e){var n=[];return n.push(t.walkTokens.call(this,e)),r&&(n=n.concat(r.call(this,e))),n}}U.setOptions(n)}))},U.walkTokens=function(e,t){for(var n,r=[],o=function(){var e=n.value;switch(r=r.concat(t.call(U,e)),e.type){case"table":for(var o,a=i(e.header);!(o=a()).done;){var l=o.value;r=r.concat(U.walkTokens(l.tokens,t))}for(var u,s=i(e.rows);!(u=s()).done;)for(var c,f=i(u.value);!(c=f()).done;){var d=c.value;r=r.concat(U.walkTokens(d.tokens,t))}break;case"list":r=r.concat(U.walkTokens(e.items,t));break;default:U.defaults.extensions&&U.defaults.extensions.childTokens&&U.defaults.extensions.childTokens[e.type]?U.defaults.extensions.childTokens[e.type].forEach((function(n){r=r.concat(U.walkTokens(e[n],t))})):e.tokens&&(r=r.concat(U.walkTokens(e.tokens,t)))}},a=i(e);!(n=a()).done;)o();return r},U.parseInline=function(e,t){if(null==e)throw new Error("marked.parseInline(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");C(t=T({},U.defaults,t||{}));try{var n=N.lexInline(e,t);return t.walkTokens&&U.walkTokens(n,t.walkTokens),z.parseInline(n,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+d(e.message+"",!0)+"</pre>";throw e}},U.Parser=z,U.parser=z.parse,U.Renderer=P,U.TextRenderer=B,U.Lexer=N,U.lexer=N.lex,U.Tokenizer=L,U.Slugger=G,U.parse=U;var W=U.options,H=U.setOptions,q=U.use,V=U.walkTokens,j=U.parseInline,Y=U,X=z.parse,$=N.lex;t.TU=U}}]);

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