diff --git a/app/assets/html5-logo.svg b/app/assets/html5-logo.svg new file mode 100755 index 0000000..b1dbadd --- /dev/null +++ b/app/assets/html5-logo.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + diff --git a/app/assets/js13kgames-square-logo.png b/app/assets/js13kgames-square-logo.png new file mode 100644 index 0000000..fae0dd0 Binary files /dev/null and b/app/assets/js13kgames-square-logo.png differ diff --git a/app/assets/js13kgames.png b/app/assets/js13kgames.png new file mode 100644 index 0000000..32793be Binary files /dev/null and b/app/assets/js13kgames.png differ diff --git a/app/assets/patreon.png b/app/assets/patreon.png new file mode 100644 index 0000000..5443ec9 Binary files /dev/null and b/app/assets/patreon.png differ diff --git a/app/assets/preact-logo.svg b/app/assets/preact-logo.svg new file mode 100755 index 0000000..dd2015d --- /dev/null +++ b/app/assets/preact-logo.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/app/assets/react-logo.svg b/app/assets/react-logo.svg new file mode 100644 index 0000000..189e332 --- /dev/null +++ b/app/assets/react-logo.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/script.js b/app/script.js index 46a4889..9465f78 100644 --- a/app/script.js +++ b/app/script.js @@ -77,4 +77,4 @@ if ( }); } -webpackJsonp([0],{"+ZAi":function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0,t.default=void 0;var r=o("KM04"),l=o("inAt"),d=n(l),c=o("CIHI"),p=n(c),h=(0,r.h)("h1",null,"Atomic CSS Settings"),u=(0,r.h)("h3",null,"Configure Atomizer settings."," ",(0,r.h)("a",{href:"https://github.com/acss-io/atomizer#api",target:"_blank",rel:"noopener noreferrer"},"Read more")," ","about available settings."),m=function(e){function t(){return s(this,t),a(this,e.apply(this,arguments))}return i(t,e),t.prototype.componentDidUpdate=function(){var e=this;this.props.show&&setTimeout(function(){e.props.settings&&e.cm.setValue(e.props.settings.acssConfig),e.cm.refresh(),e.cm.focus()},500)},t.prototype.render=function(){var e=this;return(0,r.h)(d.default,{show:this.props.show,closeHandler:this.props.closeHandler},h,u,(0,r.h)("div",{style:"height: calc(100vh - 350px);"},(0,r.h)(p.default,{options:{mode:"application/ld+json",theme:this.props.editorTheme},onCreation:function(t){return e.cm=t},onBlur:function(t){return e.props.onChange(t.getValue())}})),(0,r.h)("div",{class:"flex flex-h-end"},(0,r.h)("button",{class:"btn btn--primary",onClick:this.props.closeHandler},"Apply and Close")))},t}(r.Component);t.default=m},"0job":function(e,t,o){"use strict";t.__esModule=!0,t.Icons=function(){return(0,n.h)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",style:{display:"none"}},s,a,i,r,l,d,c,p,h,u,m,f,(0,n.h)("symbol",{id:"gift-icon",viewBox:"0 0 24 24"},g,b,y,v,C,S,k,(0,n.h)("symbol",{id:"loader-icon",viewBox:"0 0 44 44"},w)))};var n=o("KM04"),s=(0,n.h)("symbol",{id:"logo",viewBox:"-145 -2 372 175"},(0,n.h)("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",transform:"translate(-145.000000, -1.000000)"},(0,n.h)("polygon",{id:"Path-1",fill:"#FF4600",points:"31 0 232 0 132 173.310547"}),(0,n.h)("polygon",{id:"Path-1",fill:"#FF6C00",points:"0 0 201 0 101 173.310547"}),(0,n.h)("polygon",{id:"Path-1",fill:"#FF6C00",transform:"translate(271.500000, 86.500000) scale(1, -1) translate(-271.500000, -86.500000) ",points:"171 0 372 0 272 173.310547"}),(0,n.h)("polygon",{id:"Path-1",fill:"#FF4600",transform:"translate(241.500000, 86.500000) scale(1, -1) translate(-241.500000, -86.500000) ",points:"141 0 342 0 242 173.310547"}))),a=(0,n.h)("symbol",{id:"bug-icon",viewBox:"0 0 24 24"},(0,n.h)("path",{d:"M14,12H10V10H14M14,16H10V14H14M20,8H17.19C16.74,7.22 16.12,6.55 15.37,6.04L17,4.41L15.59,3L13.42,5.17C12.96,5.06 12.5,5 12,5C11.5,5 11.04,5.06 10.59,5.17L8.41,3L7,4.41L8.62,6.04C7.88,6.55 7.26,7.22 6.81,8H4V10H6.09C6.04,10.33 6,10.66 6,11V12H4V14H6V15C6,15.34 6.04,15.67 6.09,16H4V18H6.81C7.85,19.79 9.78,21 12,21C14.22,21 16.15,19.79 17.19,18H20V16H17.91C17.96,15.67 18,15.34 18,15V14H20V12H18V11C18,10.66 17.96,10.33 17.91,10H20V8Z"})),i=(0,n.h)("symbol",{id:"google-icon",viewBox:"0 0 24 24"},(0,n.h)("path",{d:"M21.35,11.1H12.18V13.83H18.69C18.36,17.64 15.19,19.27 12.19,19.27C8.36,19.27 5,16.25 5,12C5,7.9 8.2,4.73 12.2,4.73C15.29,4.73 17.1,6.7 17.1,6.7L19,4.72C19,4.72 16.56,2 12.1,2C6.42,2 2.03,6.8 2.03,12C2.03,17.05 6.16,22 12.25,22C17.6,22 21.5,18.33 21.5,12.91C21.5,11.76 21.35,11.1 21.35,11.1V11.1Z"})),r=(0,n.h)("symbol",{id:"fb-icon",viewBox:"0 0 24 24"},(0,n.h)("path",{d:"M17,2V2H17V6H15C14.31,6 14,6.81 14,7.5V10H14L17,10V14H14V22H10V14H7V10H10V6A4,4 0 0,1 14,2H17Z"})),l=(0,n.h)("symbol",{id:"github-icon",viewBox:"0 0 24 24"},(0,n.h)("path",{d:"M12,2A10,10 0 0,0 2,12C2,16.42 4.87,20.17 8.84,21.5C9.34,21.58 9.5,21.27 9.5,21C9.5,20.77 9.5,20.14 9.5,19.31C6.73,19.91 6.14,17.97 6.14,17.97C5.68,16.81 5.03,16.5 5.03,16.5C4.12,15.88 5.1,15.9 5.1,15.9C6.1,15.97 6.63,16.93 6.63,16.93C7.5,18.45 8.97,18 9.54,17.76C9.63,17.11 9.89,16.67 10.17,16.42C7.95,16.17 5.62,15.31 5.62,11.5C5.62,10.39 6,9.5 6.65,8.79C6.55,8.54 6.2,7.5 6.75,6.15C6.75,6.15 7.59,5.88 9.5,7.17C10.29,6.95 11.15,6.84 12,6.84C12.85,6.84 13.71,6.95 14.5,7.17C16.41,5.88 17.25,6.15 17.25,6.15C17.8,7.5 17.45,8.54 17.35,8.79C18,9.5 18.38,10.39 18.38,11.5C18.38,15.32 16.04,16.16 13.81,16.41C14.17,16.72 14.5,17.33 14.5,18.26C14.5,19.6 14.5,20.68 14.5,21C14.5,21.27 14.66,21.59 15.17,21.5C19.14,20.16 22,16.42 22,12A10,10 0 0,0 12,2Z"})),d=(0,n.h)("symbol",{id:"settings-icon",viewBox:"0 0 24 24"},(0,n.h)("path",{d:"M12,15.5A3.5,3.5 0 0,1 8.5,12A3.5,3.5 0 0,1 12,8.5A3.5,3.5 0 0,1 15.5,12A3.5,3.5 0 0,1 12,15.5M19.43,12.97C19.47,12.65 19.5,12.33 19.5,12C19.5,11.67 19.47,11.34 19.43,11L21.54,9.37C21.73,9.22 21.78,8.95 21.66,8.73L19.66,5.27C19.54,5.05 19.27,4.96 19.05,5.05L16.56,6.05C16.04,5.66 15.5,5.32 14.87,5.07L14.5,2.42C14.46,2.18 14.25,2 14,2H10C9.75,2 9.54,2.18 9.5,2.42L9.13,5.07C8.5,5.32 7.96,5.66 7.44,6.05L4.95,5.05C4.73,4.96 4.46,5.05 4.34,5.27L2.34,8.73C2.21,8.95 2.27,9.22 2.46,9.37L4.57,11C4.53,11.34 4.5,11.67 4.5,12C4.5,12.33 4.53,12.65 4.57,12.97L2.46,14.63C2.27,14.78 2.21,15.05 2.34,15.27L4.34,18.73C4.46,18.95 4.73,19.03 4.95,18.95L7.44,17.94C7.96,18.34 8.5,18.68 9.13,18.93L9.5,21.58C9.54,21.82 9.75,22 10,22H14C14.25,22 14.46,21.82 14.5,21.58L14.87,18.93C15.5,18.67 16.04,18.34 16.56,17.94L19.05,18.95C19.27,19.03 19.54,18.95 19.66,18.73L21.66,15.27C21.78,15.05 21.73,14.78 21.54,14.63L19.43,12.97Z"})),c=(0,n.h)("symbol",{id:"twitter-icon",viewBox:"0 0 16 16"},(0,n.h)("path",{d:"M15.969,3.058c-0.586,0.26-1.217,0.436-1.878,0.515c0.675-0.405,1.194-1.045,1.438-1.809 c-0.632,0.375-1.332,0.647-2.076,0.793c-0.596-0.636-1.446-1.033-2.387-1.033c-1.806,0-3.27,1.464-3.27,3.27 c0,0.256,0.029,0.506,0.085,0.745C5.163,5.404,2.753,4.102,1.14,2.124C0.859,2.607,0.698,3.168,0.698,3.767 c0,1.134,0.577,2.135,1.455,2.722C1.616,6.472,1.112,6.325,0.671,6.08c0,0.014,0,0.027,0,0.041c0,1.584,1.127,2.906,2.623,3.206 C3.02,9.402,2.731,9.442,2.433,9.442c-0.211,0-0.416-0.021-0.615-0.059c0.416,1.299,1.624,2.245,3.055,2.271 c-1.119,0.877-2.529,1.4-4.061,1.4c-0.264,0-0.524-0.015-0.78-0.046c1.447,0.928,3.166,1.469,5.013,1.469 c6.015,0,9.304-4.983,9.304-9.304c0-0.142-0.003-0.283-0.009-0.423C14.976,4.29,15.531,3.714,15.969,3.058z"})),p=(0,n.h)("symbol",{id:"heart-icon",viewBox:"0 0 24 24"},(0,n.h)("path",{d:"M12,21.35L10.55,20.03C5.4,15.36 2,12.27 2,8.5C2,5.41 4.42,3 7.5,3C9.24,3 10.91,3.81 12,5.08C13.09,3.81 14.76,3 16.5,3C19.58,3 22,5.41 22,8.5C22,12.27 18.6,15.36 13.45,20.03L12,21.35Z"})),h=(0,n.h)("symbol",{id:"play-icon",viewBox:"0 0 24 24"},(0,n.h)("svg",null,(0,n.h)("path",{d:"M8,5.14V19.14L19,12.14L8,5.14Z"}))),u=(0,n.h)("symbol",{id:"cancel-icon",viewBox:"0 0 24 24"},(0,n.h)("svg",null,(0,n.h)("path",{d:"M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12C4,13.85 4.63,15.55 5.68,16.91L16.91,5.68C15.55,4.63 13.85,4 12,4M12,20A8,8 0 0,0 20,12C20,10.15 19.37,8.45 18.32,7.09L7.09,18.32C8.45,19.37 10.15,20 12,20Z"}))),m=(0,n.h)("symbol",{id:"chevron-icon",viewBox:"0 0 24 24"},(0,n.h)("svg",null,(0,n.h)("path",{d:"M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z"}))),f=(0,n.h)("symbol",{id:"chat-icon",viewBox:"0 0 24 24"},(0,n.h)("path",{d:"M20,2H4A2,2 0 0,0 2,4V22L6,18H20A2,2 0 0,0 22,16V4A2,2 0 0,0 20,2M8,14H6V12H8V14M8,11H6V9H8V11M8,8H6V6H8V8M15,14H10V12H15V14M18,11H10V9H18V11M18,8H10V6H18V8Z"})),g=(0,n.h)("path",{d:"M22,12V20A2,2 0 0,1 20,22H4A2,2 0 0,1 2,20V12A1,1 0 0,1 1,11V8A2,2 0 0,1 3,6H6.17C6.06,5.69 6,5.35 6,5A3,3 0 0,1 9,2C10,2 10.88,2.5 11.43,3.24V3.23L12,4L12.57,3.23V3.24C13.12,2.5 14,2 15,2A3,3 0 0,1 18,5C18,5.35 17.94,5.69 17.83,6H21A2,2 0 0,1 23,8V11A1,1 0 0,1 22,12M4,20H11V12H4V20M20,20V12H13V20H20M9,4A1,1 0 0,0 8,5A1,1 0 0,0 9,6A1,1 0 0,0 10,5A1,1 0 0,0 9,4M15,4A1,1 0 0,0 14,5A1,1 0 0,0 15,6A1,1 0 0,0 16,5A1,1 0 0,0 15,4M3,8V10H11V8H3M13,8V10H21V8H13Z"}),b=(0,n.h)("symbol",{id:"gift-icon",viewBox:"0 0 24 24"}),y=(0,n.h)("symbol",{id:"cross-icon",viewBox:"0 0 24 24"},(0,n.h)("path",{d:"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"})),v=(0,n.h)("symbol",{id:"keyboard-icon",viewBox:"0 0 24 24"},(0,n.h)("path",{d:"M19,10H17V8H19M19,13H17V11H19M16,10H14V8H16M16,13H14V11H16M16,17H8V15H16M7,10H5V8H7M7,13H5V11H7M8,11H10V13H8M8,8H10V10H8M11,11H13V13H11M11,8H13V10H11M20,5H4C2.89,5 2,5.89 2,7V17A2,2 0 0,0 4,19H20A2,2 0 0,0 22,17V7C22,5.89 21.1,5 20,5Z"})),C=(0,n.h)("symbol",{id:"mode-icon",viewBox:"0 0 100 100"},(0,n.h)("g",null,(0,n.h)("rect",{x:0,y:0,width:28,height:47}),(0,n.h)("rect",{x:36,y:0,width:28,height:47}),(0,n.h)("rect",{x:72,y:0,width:28,height:47}),(0,n.h)("rect",{x:0,y:53,width:100,height:47}))),S=(0,n.h)("symbol",{id:"vertical-mode-icon",viewBox:"0 0 100 100"},(0,n.h)("g",null,(0,n.h)("rect",{x:0,y:0,width:20,height:100}),(0,n.h)("rect",{x:23,y:0,width:20,height:100}),(0,n.h)("rect",{x:46,y:0,width:20,height:100}),(0,n.h)("rect",{x:69,y:0,width:32,height:100}))),k=(0,n.h)("symbol",{id:"search",viewBox:"0 0 24 24"},(0,n.h)("path",{d:"M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z"})),w=(0,n.h)("g",{fill:"none",fillRule:"evenodd",strokeWidth:10},(0,n.h)("circle",{cx:22,cy:22,r:1},(0,n.h)("animate",{attributeName:"r",begin:"0s",dur:"1.8s",values:"1; 20",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.165, 0.84, 0.44, 1",repeatCount:"indefinite"}),(0,n.h)("animate",{attributeName:"stroke-opacity",begin:"0s",dur:"1.8s",values:"1; 0",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.3, 0.61, 0.355, 1",repeatCount:"indefinite"})),(0,n.h)("circle",{cx:22,cy:22,r:1},(0,n.h)("animate",{attributeName:"r",begin:"-0.9s",dur:"1.8s",values:"1; 20",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.165, 0.84, 0.44, 1",repeatCount:"indefinite"}),(0,n.h)("animate",{attributeName:"stroke-opacity",begin:"-0.9s",dur:"1.8s",values:"1; 0",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.3, 0.61, 0.355, 1",repeatCount:"indefinite"})))},"0lUe":function(e,t,o){"use strict";function n(e,t){var o={};for(var n in e)0<=t.indexOf(n)||Object.prototype.hasOwnProperty.call(e,n)&&(o[n]=e[n]);return o}function s(e){var t,o=e.type,n=e.children;return"bug"===o?t=c:"a11y"===o&&(t=p),(0,l.h)("li",null,t,": ",n)}function a(e){var t=e.name,o=e.url;return(0,l.h)("a",{href:o,target:"_blank",rel:"noopener noreferrer"}," ",t)}function i(e){var t=e.version,o=e.isLatest,s=n(e,["version","isLatest"]);return(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},t),(0,l.h)("ul",null,s.children),o?(0,l.h)("div",{class:"mt-2"},h,u,(0,l.h)("p",null,"Web Maker now has more than 50K weekly active users! Thank you for being a part of this community of awesome developers. If you find Web Maker helpful,"," ",m,"\xA0",f,"\xA0",(0,l.h)(d.Button,{"aria-label":"Support the developer",onClick:s.onSupportBtnClick,"data-event-action":"supportDeveloperChangelogBtnClick","data-event-category":"ui",class:"btn btn-icon"},"Support the developer"))):null)}t.__esModule=!0;var r=Object.assign||function(e){for(var t,o=1;o",(0,l.h)("a",{href:"https://webmakerapp.com/app/",target:"_blank",rel:"noopener noreferrer"},"https://webmakerapp.com/app/"),"."),(0,l.h)("li",null,"Now use Web Maker web app on any modern browser (tested with Chrome and Firefox)."),(0,l.h)("li",null,(0,l.h)("strong",null,"User Accounts")," - The much requested user accounts are here. Now maintain your account and store all your creations in the cloud and access them anywhere anytime."),(0,l.h)("li",null,(0,l.h)("strong",null,"New layout mode")," - One more layout mode, that lets you align all the panes vertically."),(0,l.h)("li",null,(0,l.h)("strong",null,"No more restriction on scripts (Web app only)")," - If you are using the web app, there is no more a restriction to load scripts from only specific domains. Load any script!"),(0,l.h)("li",null,(0,l.h)("strong",null,"Inline scripts (Web app only)")," - The restriction of writing JavaScript only in JS pane is also removed."))),O=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.9.7"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("a",{href:"https://tailwindcss.com/",target:"_blank",rel:"noopener noreferrer"},"Tailwind CSS")," ","added to popular CSS libraries list. Thanks"," ",(0,l.h)(a,{url:"https://github.com/diomed",name:"diomed"}),"."),(0,l.h)("li",null,"Popular libraries list updated. Thanks"," ",(0,l.h)(a,{url:"https://github.com/diomed",name:"diomed"}),"."),(0,l.h)("li",null,(0,l.h)("strong",null,"Dev"),": Bug fixes and code refactoring to make things simple."," ",(0,l.h)(a,{url:"https://github.com/iamandrewluca",name:"iamandrewluca"})," ","."))),P=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.9.6"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix"),": Fix close buttons not working in notifications and keyboard shortcuts modal."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix"),": Fix keyboard shortcut to see keyboard shortcuts :) Thanks",(0,l.h)("a",{href:"https://github.com/ClassicOldSong",target:"_blank",rel:"noopener noreferrer"},"ClassicOldSong"),"."))),T=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.9.5"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("a",{href:"https://medium.com/web-maker/release-2-9-5-add-library-search-pane-collapsing-ux-improvements-more-1085216c1301",target:"_blank",rel:"noopener noreferrer"},"Read blog post about this release.")),(0,l.h)("li",null,(0,l.h)("strong",null,"Keyboard shortcuts panel"),": Add a list of all keyboard shotcuts. Access with",(0,l.h)("code",null," Ctrl/\u2318 + Shift + ?")," or click keyboard button in footer."),(0,l.h)("li",null,(0,l.h)("strong",null,"Add external library"),": Better UX for searching third party libraries."),(0,l.h)("li",null,(0,l.h)("strong",null,"Improvement"),": Code panes now go fullscreen when double-clicked on their headers - which is much more intuitive behavior based on feedback from lot of developers."),(0,l.h)("li",null,(0,l.h)("strong",null,"Improvement"),": Add",(0,l.h)("code",null,"allowfullscreen")," attribute on iframes. Thanks",(0,l.h)("a",{href:"https://github.com/ClassicOldSong",target:"_blank",rel:"noopener noreferrer"},"ClassicOldSong"),"."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Stop screenlog.js from showing up in the exported HTML."),(0,l.h)("li",null,"Popular external libraries list updated. Thanks",(0,l.h)("a",{href:"https://github.com/jlapitan",target:"_blank",rel:"noopener noreferrer"},"jlapitan"),"."))),V=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.9.4"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"Improvement"),": Atomic CSS (Atomizer) has been updated to latest version. Now you can do things like psuedo elements. Learn More."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Logging circular objects is now possible. It won't show in the Web Maker console, but will show fine in browser's console."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Console's z-index issue has been fixed."))),D=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.9.3"),(0,l.h)("ul",null,(0,l.h)("li",null,"Choose the save location while exporting your saved creations. Now easily sync them to your Dropbox or any cloud storage."),(0,l.h)("li",null,"All modals inside the app now have a close button."),(0,l.h)("li",null,"Checkbox that showed on clicking a boolean value is now removed. Thanks",(0,l.h)("a",{href:"https://github.com/gauravmuk",target:"_blank",rel:"noopener noreferrer"},"Gaurav Nanda"),"."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Screenshots on retina device are now correct. Thanks",(0,l.h)("a",{href:"https://github.com/AshBardhan",target:"_blank",rel:"noopener noreferrer"},"Ashish Bardhan"),"."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Double console log in detached mode fixed."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Console.clear now works in detached mode too."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - DOCTYPE added in preview."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Typo correction in README. Thanks",(0,l.h)("a",{href:"https://github.com/AdilMah",target:"_blank",rel:"noopener noreferrer"},"Adil Mahmood"),"."),(0,l.h)("li",null,"gstatic.com is available to load external JavaScripts from."),(0,l.h)("li",null,"Popular libraries list updated. Thanks",(0,l.h)("a",{href:"https://github.com/diomed",target:"_blank",rel:"noopener noreferrer"},"diomed"),"."),(0,l.h)("li",null,"Added",(0,l.h)("a",{href:"https://github.com/chinchang/web-maker/blob/master/CONTRIBUTING.md",target:"_blank",rel:"noopener noreferrer"},"contribution guidelines")," ","in the Github repository."))),F=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.9.2"),(0,l.h)("ul",null,(0,l.h)("li",null,"Minor bug fixes."))),W=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.9.1"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("a",{href:"https://medium.com/web-maker/v2-9-lots-of-goodies-bd1e939571f6",target:"_blank",rel:"noopener noreferrer"},"Read blog post about last release.")),(0,l.h)("li",null,"Use Ctrl/Cmd+D to select next occurence of matching selection."),(0,l.h)("li",null,"Improve onboard experience."))),N=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.9.0"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("a",{href:"https://medium.com/web-maker/v2-9-lots-of-goodies-bd1e939571f6",target:"_blank",rel:"noopener noreferrer"},"Read blog post about this release.")),(0,l.h)("li",null,(0,l.h)("strong",null,"Detached Preview")," - Yes, you read that correct! You can now detach your preview and send it to your secondary monitor."),(0,l.h)("li",null,(0,l.h)("strong",null,"Find & Replace")," - Long awaited, now its there. Ctrl/Cmd+f to find and add Alt to replace."),(0,l.h)("li",null,(0,l.h)("strong",null,"Atomic CSS (Atomizer) configurations")," - Add custom config for Atomic CSS.",(0,l.h)("a",{href:"https://github.com/acss-io/atomizer#api",target:"_blank",rel:"noopener noreferrer"},"Read more"),"."),(0,l.h)("li",null,(0,l.h)("strong",null,"Light mode")," - This new setting makes Web Maker drop some heavy effects like blur etc to gain more performance. Thanks",(0,l.h)("a",{href:"https://github.com/iamandrewluca",target:"_blank",rel:"noopener noreferrer"},"Andrew"),"."),(0,l.h)("li",null,(0,l.h)("strong",null,"Preserve logs setting")," - Choose whether or not to preserve logs across preview refreshes. Thanks",(0,l.h)("a",{href:"https://github.com/BasitAli",target:"_blank",rel:"noopener noreferrer"},"Basit"),"."),(0,l.h)("li",null,(0,l.h)("strong",null,"Line wrap setting")," - As the name says."),(0,l.h)("li",null,"Semantic UI added to popular libraries."),(0,l.h)("li",null,"Bootstrap, Vue, UI-Kit and more updated to latest versions in popular libraries."),(0,l.h)("li",null,"UX improvements in settings UI"),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Trigger preview refresh anytime with Ctrl/\u2318 + Shift + 5. Even with auto-preview on."))),z=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.8.1"),(0,l.h)("ul",null,(0,l.h)("li",null,"Vue.js & UIKit version updated to latest version in 'Add Library' list."),(0,l.h)("li",null,"UTF-8 charset added to preview HTML to support universal characters."))),U=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.8.0"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("a",{href:"https://medium.com/web-maker/release-v2-8-is-out-f44e6ea5d9c4",target:"_blank",rel:"noopener noreferrer"},"Read blog post about this release.")),(0,l.h)("li",null,(0,l.h)("strong",null,"Auto Save")," - Your creations now auto-save after your first manual save. This is configurable from settings."),(0,l.h)("li",null,(0,l.h)("strong",null,"Base2Tone-Meadow Editor Theme")," - First user contributed theme. Thanks to Diomed."),(0,l.h)("li",null,(0,l.h)("strong",null,"Use System Fonts")," - You can now use any of your existing system fonts in the editor!"),(0,l.h)("li",null,(0,l.h)("strong",null,"Matching Tag Highlight")," - Cursor over any HTML tag would highlight the matching pair tag."),(0,l.h)("li",null,"Auto-completion suggestion can now be switched off from settings."),(0,l.h)("li",null,(0,l.h)("strong",null,"Improvement")," - Stop white flicker in editor when the app opens."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Add Babel Polyfill to enable use of next-gen built-ins like Promise or WeakMap."),(0,l.h)("li",null,"Vue.js version updated to 2.4.0 in popular library list."),(0,l.h)("li",null,"Downloads permission is optional. Asked only when you take screenshot."))),R=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.7.2"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"External Libraries")," - Add Foundation.js and update UIKit 3 to latest beta."),(0,l.h)("li",null,(0,l.h)("strong",null,"rawgit.com")," &",(0,l.h)("strong",null,"wzrd.in")," domains are now allowed for loading external libraries from."),(0,l.h)("li",null,"Minor booting speed improvements"))),K=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.7.1"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"Framer.js support")," - You can now load the latest framer.js library from",(0,l.h)("a",{href:"https://builds.framerjs.com/",target:"_blank",rel:"noopener noreferrer"},"framer builds page")," ","and start coding framer prototypes."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix"),": Edit on CodePen is back in action."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix"),": Autocompletion menu doesn't show on cut and paste now."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix"),": Updated & fixed urls of some common external libraries to latest versions. UIKit3 & Bootstrap 4\u03B1 are now in the list."),(0,l.h)("li",null,"Preprocessor selector are now more accessible."))),J=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.7.0"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"Fork any creation!"),": Now you can fork any existing creation of yours to start a new work based on it. One big use case of this feature is \"Templates\"!",(0,l.h)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://kushagragour.in/blog/2017/05/web-maker-fork-templates/?utm_source=webmakerapp&utm_medium=referral"},"Read more about it"),"."),(0,l.h)("li",null,(0,l.h)("strong",null,"Fonts \uD83D\uDE0D "),": Super-awesome 4 fonts (mostly with ligature support) now available to choose from. Fira Code is the default font now."),(0,l.h)("li",null,"Updated most used external libraries to latest versions."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix"),": Add missing Bootstrap JS file to most used external libraries list."),(0,l.h)("li",null,"Several other minor bugfixes and improvements to make Web Maker awesome!"),(0,l.h)("li",null,"Great news to share with you - Web Maker has been featured on the Chrome Webstore homepage! Thanks for all the love :)"))),q=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.6.1"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix"),": Emojis vanishing while exporting to Codepen has been fixed."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix"),":",(0,l.h)("code",null,"console.clear()")," now doesn't error and clears the inbuilt console."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix"),": External libraries added to the creation are exported as well to Codepen."))),G=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.6.0"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"The \"Console\""),": The most awaited feature is here! There is now an inbuilt console to see your logs, errors and for quickly evaluating JavaScript code inside your preview. Enjoy! I also a",(0,l.h)("a",{href:"https://kushagragour.in/blog/2017/05/web-maker-console-is-here/?utm_source=webmakerapp&utm_medium=referral",target:"_blank",rel:"noopener noreferrer"},"blog post about it"),"."),(0,l.h)("li",null,"Number slider which popped on clicking any number in the code has been removed due to poor user experience."),(0,l.h)("li",null,"Minor usability improvements."))),Z=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.5.0"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"Atomic CSS"),": Use can now use Atomic CSS(ACSS) in your work!",(0,l.h)("a",{href:"https://acss.io/",target:"_blank",rel:"noopener noreferrer"},"Read more about it here"),"."),(0,l.h)("li",null,(0,l.h)("strong",null,"Search your saved creations"),": Easily search through all your saved creations by title."),(0,l.h)("li",null,(0,l.h)("strong",null,"Configurable Auto-preview")," - You can turn off the auto preview in settings if you don't want the preview to update as you type."),(0,l.h)("li",null,(0,l.h)("strong",null,"Configurable refresh on resize")," - You can configure whether you want the preview to refresh when you resize the preview panel."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Fix indentation",(0,l.h)("a",{href:"https://github.com/chinchang/web-maker/issues/104",target:"_blank",rel:"noopener noreferrer"},"issue")," ","with custom indentation size."))),Y=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.4.2"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"Improved infinite loop protection"),": Infinite loop protection is now faster and more reliable. And works without the need of Escodegen. Thanks to Ariya Hidayat!"),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Default parameters not working in JavaScript is fixed."))),Q=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.4.0"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"Import/Export"),": Your creations are most important. Now export all your creations into a single file as a backup that can be imported anytime & anywhere."),(0,l.h)("li",null,(0,l.h)("strong",null,"Editor themes"),": You have been heard. Now you can choose from a huge list of wonderful editor themes!"),(0,l.h)("li",null,(0,l.h)("strong",null,"Identation settings"),": Not a spaces fan? Switch to tabs and set your indentation size."),(0,l.h)("li",null,(0,l.h)("strong",null,"Vim key bindings"),": Rejoice Vim lovers!"),(0,l.h)("li",null,(0,l.h)("strong",null,"Code blast"),": Why don't you try coding with this switched on from the settings? Go on..."),(0,l.h)("li",null,(0,l.h)("strong",null,"Important"),": Due to security policy changes from Chrome 57 onwards, Web Maker now allows loading external JavaScript libraries only from certain whitelisted domains (localhost, https://ajax.googleapis.com, https://code.jquery.com, https://cdnjs.cloudflare.com, https://unpkg.com, https://maxcdn.com, https://cdn77.com, https://maxcdn.bootstrapcdn.com, https://cdn.jsdelivr.net/)"),(0,l.h)("li",null,"Save button now highlights when you have unsaved changes."),(0,l.h)("li",null,"Jade is now called Pug. Just a name change."))),X=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.3.2"),(0,l.h)("ul",null,(0,l.h)("li",null,"Update Babel to support latest and coolest ES6 features."),(0,l.h)("li",null,"Improve onboarding experience at first install."))),ee=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.3.1"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Splitting of code and preview panes is remembered by the editor."),(0,l.h)("li",null,"Title of the creation is used for the file name when saving as HTML."))),te=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.3.0"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"Add Library Autocompletion")," - Just start typing the name of library and you'll be shown matching libraries from cdnjs."),(0,l.h)("li",null,(0,l.h)("strong",null,"Preview Screenshot Capture")," - Want to grab a nice screenshot of your creation. You have it! Click and capture."),(0,l.h)("li",null,(0,l.h)("strong",null,"Auto Indent Code")," - Select your code and hit Shift-Tab to auto-indent it!"),(0,l.h)("li",null,(0,l.h)("strong",null,"Keyboard Navigation in Saved List")," - Now select your creation using arrow keys and hit ENTER to open it."),(0,l.h)("li",null,"Highlight active line in code panes."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Fix in generated title of new creation."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - HTML autocompletion is manual triggered now with Ctrl+Space."))),oe=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.2.0"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"Code Autocompletion")," - See code suggestions while you type!"),(0,l.h)("li",null,(0,l.h)("strong",null,"Full Screen Preview")," - Checkout your creation in a full-screen layout."),(0,l.h)("li",null,(0,l.h)("strong",null,"SASS")," - SASS support added for CSS."),(0,l.h)("li",null,(0,l.h)("strong",null,"Faster CSS update")," - Preview updates instantly without refresh when just CSS is changed."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Indentation fixed while going on new line."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Works even in Chrome Canary now. Though libraries can be added only through CDNs."))),ne=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.1.0"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"TypeScript")," - Now you can code in TypeScript too!"),(0,l.h)("li",null,(0,l.h)("strong",null,"Stylus Preprocessor")," - Stylus supported adding for CSS."),(0,l.h)("li",null,(0,l.h)("strong",null,"Code Folding")," - Collapse large code blocks for easy editing."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Support JSX in JavaScript."),(0,l.h)("li",null,"Better onboarding for first time users."))),se=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.0.0"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"Save and Load")," - Long pending and super-useful, now you can save your creations and resume them anytime later."),(0,l.h)("li",null,(0,l.h)("strong",null,"Insert JS & CSS")," - Load popular JavaScript & CSS libraries in your work without writing any code."),(0,l.h)("li",null,(0,l.h)("strong",null,"Collapsed Panes")," - Collapse/uncollapse code panes with a single click. Your pane configuration is even saved with every creation!"),(0,l.h)("li",null,(0,l.h)("strong",null,"Quick color & number change")," - Click on any color or number and experiment with quick values using a slider."),(0,l.h)("li",null,(0,l.h)("strong",null,"Linting")," - See your code errors right where you are coding."),(0,l.h)("li",null,"No more browser hang due to infinite loops!"))),ae=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"1.7.0"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"Preprocessors!")," - Enjoy a whole list of preprocessors for HTML(Jade & markdown), CSS(SCSS & LESS) and JavaScript(CoffeeScript & Babel)."),(0,l.h)("li",null,"More awesome font for code."))),ie=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"1.6.0"),(0,l.h)("ul",null,(0,l.h)("li",null,"You can now configure Web-Maker to not replace new tab page from the settings. It is always accessible from the icon in the top-right."),(0,l.h)("li",null,"Download current code as HTML file with Ctrl/\u2318 + S keyboard shortcut."),(0,l.h)("li",null,"New notifications panel added so you are always aware of the new changes in Web-Maker.")))},"18yn":function(e,t,o){"use strict";t.__esModule=!0,t.Profile=function(e){var t=e.user,o=e.logoutBtnHandler;return(0,n.h)("div",{class:"tac"},(0,n.h)("img",{height:"80",class:"profile-modal__avatar-img",src:t?t.photoURL||s:"",id:"profileAvatarImg",alt:"Profile image"}),(0,n.h)("h3",{id:"profileUserName",class:"mb-2"},t&&t.displayName?t.displayName:"Anonymous Creator"),(0,n.h)("p",null,(0,n.h)("button",{class:"btn","aria-label":"Logout from your account",onClick:o},"Logout")))};var n=o("KM04"),s="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='#ccc' d='M12,19.2C9.5,19.2 7.29,17.92 6,16C6.03,14 10,12.9 12,12.9C14,12.9 17.97,14 18,16C16.71,17.92 14.5,19.2 12,19.2M12,5A3,3 0 0,1 15,8A3,3 0 0,1 12,11A3,3 0 0,1 9,8A3,3 0 0,1 12,5M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z' /%3E%3C/svg%3E"},"1IZv":function(e,t,o){"use strict";t.__esModule=!0,t.KeyboardShortcutsModal=function(e){var t=e.show,o=e.closeHandler;return(0,n.h)(a.default,{show:t,closeHandler:o},i,r)};var n=o("KM04"),s=o("inAt"),a=function(e){return e&&e.__esModule?e:{default:e}}(s),i=(0,n.h)("h1",null,"Keyboard Shortcuts"),r=(0,n.h)("div",{class:"flex"},(0,n.h)("div",null,(0,n.h)("h2",null,"Global"),(0,n.h)("p",null,(0,n.h)("span",{class:"kbd-shortcut__keys"},"Ctrl/\u2318 + Shift + ?"),(0,n.h)("span",{class:"kbd-shortcut__details"},"See keyboard shortcuts")),(0,n.h)("p",null,(0,n.h)("span",{class:"kbd-shortcut__keys"},"Ctrl/\u2318 + Shift + 5"),(0,n.h)("span",{class:"kbd-shortcut__details"},"Refresh preview")),(0,n.h)("p",null,(0,n.h)("span",{class:"kbd-shortcut__keys"},"Ctrl/\u2318 + S"),(0,n.h)("span",{class:"kbd-shortcut__details"},"Save current creations")),(0,n.h)("p",null,(0,n.h)("span",{class:"kbd-shortcut__keys"},"Ctrl/\u2318 + O"),(0,n.h)("span",{class:"kbd-shortcut__details"},"Open list of saved creations")),(0,n.h)("p",null,(0,n.h)("span",{class:"kbd-shortcut__keys"},"Ctrl + L"),(0,n.h)("span",{class:"kbd-shortcut__details"},"Clear console (works when console input is focused)")),(0,n.h)("p",null,(0,n.h)("span",{class:"kbd-shortcut__keys"},"Esc"),(0,n.h)("span",{class:"kbd-shortcut__details"},"Close saved creations panel & modals"))),(0,n.h)("div",{class:"ml-2"},(0,n.h)("h2",null,"Editor"),(0,n.h)("p",null,(0,n.h)("span",{class:"kbd-shortcut__keys"},"Ctrl/\u2318 + F"),(0,n.h)("span",{class:"kbd-shortcut__details"},"Find")),(0,n.h)("p",null,(0,n.h)("span",{class:"kbd-shortcut__keys"},"Ctrl/\u2318 + G"),(0,n.h)("span",{class:"kbd-shortcut__details"},"Select next match")),(0,n.h)("p",null,(0,n.h)("span",{class:"kbd-shortcut__keys"},"Ctrl/\u2318 + Shift + G"),(0,n.h)("span",{class:"kbd-shortcut__details"},"Select previous match")),(0,n.h)("p",null,(0,n.h)("span",{class:"kbd-shortcut__keys"},"Ctrl/\u2318 + Opt/Alt + F"),(0,n.h)("span",{class:"kbd-shortcut__details"},"Find & replace")),(0,n.h)("p",null,(0,n.h)("span",{class:"kbd-shortcut__keys"},"Shift + Tab"),(0,n.h)("span",{class:"kbd-shortcut__details"},"Realign code")),(0,n.h)("p",null,(0,n.h)("span",{class:"kbd-shortcut__keys"},"Ctrl/\u2318 + ]"),(0,n.h)("span",{class:"kbd-shortcut__details"},"Indent code right")),(0,n.h)("p",null,(0,n.h)("span",{class:"kbd-shortcut__keys"},"Ctrl/\u2318 + ["),(0,n.h)("span",{class:"kbd-shortcut__details"},"Indent code left")),(0,n.h)("p",null,(0,n.h)("span",{class:"kbd-shortcut__keys"},"Tab"),(0,n.h)("span",{class:"kbd-shortcut__details"},"Emmet code completion"," ",(0,n.h)("a",{href:"https://emmet.io/",target:"_blank",rel:"noopener noreferrer"},"Read more"))),(0,n.h)("p",null,(0,n.h)("span",{class:"kbd-shortcut__keys"},"Ctrl/\u2318 + /"),(0,n.h)("span",{class:"kbd-shortcut__details"},"Single line comment"))))},"3Z4F":function(e,t){"use strict";t.__esModule=!0;var o=Object.assign||function(e){for(var t,o=1;o":"")},""),i=n.externalLibs.css.split("\n").reduce(function(e,t){return e+(t?"\n":"")},""));var r="\n\n\n\n"+i+"\n\n\n\n"+e+"\n"+a+"\n";if(s||(r+=""),n.jsMode===d.JsModes.ES6&&(r+=""),"string"==typeof o)r+="\n\n",r}t.__esModule=!0,t.BASE_PATH=void 0,t.semverCompare=function(e,t){for(var o=e.split("."),n=t.split("."),s=0;3>s;s++){var a=+o[s],i=+n[s];if(a>i)return 1;if(i>a)return-1;if(!isNaN(a)&&isNaN(i))return 1;if(isNaN(a)&&!isNaN(i))return-1}return 0},t.generateRandomId=function(e){for(var t="",o=e||10;o--;)t+=u[~~(Math.random()*u.length)];return t},t.onButtonClick=function(e,t){e.addEventListener("click",function(o){return t(o),!1})},t.log=n,t.addInfiniteLoopProtection=function(e,t){var o=t.timeout,n=1,s=[],a="_wmloopvar";return p.parse(e,{tolerant:!0,range:!0,jsx:!0},function(e){switch(e.type){case"DoWhileStatement":case"ForStatement":case"ForInStatement":case"ForOfStatement":case"WhileStatement":var t=1+e.body.range[0],i=e.body.range[1],r=("\nif (Date.now() - %d > "+o+") { window.top.previewException(new Error(\"Infinite loop\")); break;}\n").replace("%d",a+n),l="";"BlockStatement"!==e.body.type&&(r="{"+r,l="}",--t),s.push({pos:t,str:r}),s.push({pos:i,str:l}),s.push({pos:e.range[0],str:"var %d = Date.now();\n".replace("%d",a+n)}),++n;break;default:}}),s.sort(function(e,t){return t.pos-e.pos}).forEach(function(t){e=e.slice(0,t.pos)+t.str+e.slice(t.pos)}),e},t.getHumanDate=function(e){var t=new Date(e),o=t.getDate()+" "+["January","February","March","April","May","June","July","August","September","October","November","December"][t.getMonth()]+" "+t.getFullYear();return o},t.once=function(e,t,o){e.addEventListener(t,function(n){return n.target.removeEventListener(t,arguments.callee),o(n)})},t.downloadFile=s,t.writeFile=a,t.loadJS=function(e){var t=(0,c.deferred)(),o=window.document.getElementsByTagName("script")[0],n=window.document.createElement("script");return n.src=e,n.async=!0,o.parentNode.insertBefore(n,o),n.onload=function(){t.resolve()},t.promise},t.getCompleteHtml=i,t.saveAsHtml=function(e){var t=(0,l.computeHtml)(e.html,e.htmlMode),o=(0,l.computeCss)(e.css,e.cssMode),n=(0,l.computeJs)(e.js,e.jsMode,!1);Promise.all([t,o,n]).then(function(t){var o=t[0].code,n=t[1].code,a=t[2].code,l=i(o,n,a,e,!0),c=new Date,d=["web-maker",c.getFullYear(),c.getMonth()+1,c.getDate(),c.getHours(),c.getMinutes(),c.getSeconds()].join("-");e.title&&(d=e.title),d+=".html";var p=new Blob([l],{type:"text/html;charset=UTF-8"});s(d,p),(0,r.trackEvent)("fn","saveFileComplete")})},t.handleDownloadsPermission=function(){var e=(0,c.deferred)();return window.IS_EXTENSION?(chrome.permissions.contains({permissions:["downloads"]},function(t){t?e.resolve():chrome.permissions.request({permissions:["downloads"]},function(t){t?((0,r.trackEvent)("fn","downloadsPermGiven"),e.resolve()):e.reject()})}),e.promise):(e.resolve(),e.promise)};var r=o("qV3Q"),l=o("E5zE"),d=o("y5h4"),c=o("3Z4F"),p=o("4E2n");window.DEBUG=-1n?e.classList.add("is-minimized"):e.classList.remove("is-minimized"),-1===e.style[o].indexOf("100% - "+2*k+"px")?e.classList.remove("is-maximized"):e.classList.add("is-maximized")})},50)},t.prototype.toggleCodeWrapCollapse=function(e){if(e.classList.contains("is-minimized")||e.classList.contains("is-maximized"))e.classList.remove("is-minimized"),e.classList.remove("is-maximized"),this.codeSplitInstance.setSizes([33.3,33.3,33.3]);else{var t=parseInt(e.dataset.codeWrapId,10),o=[k+"px",k+"px",k+"px"];o[t]="calc(100% - "+2*k+"px)",this.codeSplitInstance.setSizes(o),e.classList.add("is-maximized")}this.updateSplits()},t.prototype.collapseBtnHandler=function(t){var e=t.currentTarget.parentElement.parentElement.parentElement;this.toggleCodeWrapCollapse(e),(0,m.trackEvent)("ui","paneCollapseBtnClick",e.dataset.type)},t.prototype.codeWrapHeaderDblClickHandler=function(t){if(t.target.classList.contains("js-code-wrap__header")){var e=t.target.parentElement;this.toggleCodeWrapCollapse(e),(0,m.trackEvent)("ui","paneHeaderDblClick",e.dataset.type)}},t.prototype.resetSplitting=function(){this.setState({codeSplitSizes:this.getCodeSplitSizes(),mainSplitSizes:this.getMainSplitSizesToApply()})},t.prototype.updateSplits=function(){this.props.onSplitUpdate(),this.state.codeSplitSizes=this.props.currentItem.sizes,this.state.mainSplitSizes=this.props.currentItem.mainSizes},t.prototype.getMainSplitSizesToApply=function(){var e,t=this.props,o=t.currentItem,n=t.currentLayoutMode;return e=o&&o.mainSizes?3===n?[o.mainSizes[1],o.mainSizes[0]]:o.mainSizes:5===n?[75,25]:[50,50],e},t.prototype.getCodeSplitSizes=function(){return this.props.currentItem&&this.props.currentItem.sizes?this.props.currentItem.sizes:[33.33,33.33,33.33]},t.prototype.mainSplitDragEndHandler=function(){var e=this;this.props.prefs.refreshOnResize&&setTimeout(function(){e.setPreviewContent(!0)},1),this.updateSplits()},t.prototype.codeSplitDragStart=function(){document.body.classList.add("is-dragging")},t.prototype.codeSplitDragEnd=function(){this.updateCodeWrapCollapseStates(),document.body.classList.remove("is-dragging"),this.updateSplits()},t.prototype.handleModeRequirements=function(e){function t(){p.modes[e].hasLoaded=!0,n.resolve()}var o="lib/transpilers",n=(0,v.deferred)();return p.modes[e].hasLoaded?(n.resolve(),n.promise):(e===p.HtmlModes.JADE?(0,h.loadJS)(o+"/jade.js").then(t):e===p.HtmlModes.MARKDOWN?(0,h.loadJS)(o+"/marked.js").then(t):e===p.CssModes.LESS?(0,h.loadJS)(o+"/less.min.js").then(t):e===p.CssModes.SCSS||e===p.CssModes.SASS?(0,h.loadJS)(o+"/sass.js").then(function(){window.sass=new Sass(o+"/sass.worker.js"),t()}):e===p.CssModes.STYLUS?(0,h.loadJS)(o+"/stylus.min.js").then(t):e===p.CssModes.ACSS?(0,h.loadJS)(o+"/atomizer.browser.js").then(t):e===p.JsModes.COFFEESCRIPT?(0,h.loadJS)(o+"/coffee-script.js").then(t):e===p.JsModes.ES6?(0,h.loadJS)(o+"/babel.min.js").then(t):e===p.JsModes.TS?(0,h.loadJS)(o+"/typescript.js").then(t):n.resolve(),n.promise)},t.prototype.updateHtmlMode=function(e){return this.props.onCodeModeChange("html",e),this.props.currentItem.htmlMode=e,this.cm.html.setOption("mode",p.modes[e].cmMode),g.default.autoLoadMode(this.cm.html,p.modes[e].cmPath||p.modes[e].cmMode),this.handleModeRequirements(e)},t.prototype.updateCssMode=function(e){return this.props.onCodeModeChange("css",e),this.props.currentItem.cssMode=e,this.cm.css.setOption("mode",p.modes[e].cmMode),this.cm.css.setOption("readOnly",p.modes[e].cmDisable),window.cssSettingsBtn.classList[p.modes[e].hasSettings?"remove":"add"]("hide"),g.default.autoLoadMode(this.cm.css,p.modes[e].cmPath||p.modes[e].cmMode),this.handleModeRequirements(e)},t.prototype.updateJsMode=function(e){return this.props.onCodeModeChange("js",e),this.props.currentItem.jsMode=e,this.cm.js.setOption("mode",p.modes[e].cmMode),g.default.autoLoadMode(this.cm.js,p.modes[e].cmPath||p.modes[e].cmMode),this.handleModeRequirements(e)},t.prototype.codeModeChangeHandler=function(t){var e=this,o=t.target.value,n=t.target.dataset.type,s=this.props.currentItem["html"===n?"htmlMode":"css"===n?"cssMode":"jsMode"];s!==o&&("html"===n?this.updateHtmlMode(o).then(function(){return e.setPreviewContent(!0)}):"js"===n?this.updateJsMode(o).then(function(){return e.setPreviewContent(!0)}):"css"===n&&this.updateCssMode(o).then(function(){return e.setPreviewContent(!0)}),(0,m.trackEvent)("ui","updateCodeMode",o))},t.prototype.detachPreview=function(){var e=this;if(this.detachedWindow)return void this.detachedWindow.focus();var t=this.frame.getBoundingClientRect(),o=t.width,n=t.height;document.body.classList.add("is-detached-mode"),window.globalConsoleContainerEl.insertBefore(window.consoleEl,null),this.detachedWindow=window.open("./preview.html","Web Maker","width="+o+",height="+n+",resizable,scrollbars=yes,status=1"),setTimeout(function(){e.setPreviewContent(!0)},1500);var s=window.setInterval(function(){e.detachedWindow&&e.detachedWindow.closed&&(clearInterval(s),document.body.classList.remove("is-detached-mode"),$("#js-demo-side").insertBefore(window.consoleEl,null),e.detachedWindow=null,e.setPreviewContent(!0))},500)},t.prototype.onMessageFromConsole=function(){var e=this;[].concat(Array.prototype.slice.call(arguments)).forEach(function(t){t&&t.indexOf&&-1!==t.indexOf("filesystem:chrome-extension")&&(t=t.replace(/filesystem:chrome-extension.*\.js:(\d+):*(\d*)/g,"script $1:$2"));try{e.consoleCm.replaceRange(t+" "+((t+"").match(/\[object \w+]/)?JSON.stringify(t):"")+"\n",{line:Infinity})}catch(t){e.consoleCm.replaceRange("\uD83C\uDF00\n",{line:Infinity})}e.consoleCm.scrollTo(0,Infinity),e.logCount++}),logCountEl.textContent=this.logCount},t.prototype.previewException=function(e){console.error("Possible infinite loop detected.",e.stack),this.onMessageFromConsole("Possible infinite loop detected.",e.stack)},t.prototype.toggleConsole=function(){this.setState({isConsoleOpen:!this.state.isConsoleOpen}),(0,m.trackEvent)("ui","consoleToggle")},t.prototype.consoleHeaderDblClickHandler=function(t){t.target.classList.contains("js-console__header")&&((0,m.trackEvent)("ui","consoleToggleDblClick"),this.toggleConsole())},t.prototype.clearConsole=function(){this.consoleCm.setValue(""),this.logCount=0,window.logCountEl.textContent=this.logCount},t.prototype.clearConsoleBtnClickHandler=function(){this.clearConsole(),(0,m.trackEvent)("ui","consoleClearBtnClick")},t.prototype.evalConsoleExpr=function(t){(76===t.which||12===t.which)&&t.ctrlKey?(this.clearConsole(),(0,m.trackEvent)("ui","consoleClearKeyboardShortcut")):13===t.which&&(this.onMessageFromConsole("> "+t.target.value),this.frame.contentWindow._wmEvaluate(t.target.value),t.target.value="",(0,m.trackEvent)("fn","evalConsoleExpr"))},t.prototype.cssSettingsBtnClickHandler=function(){this.setState({isCssSettingsModalOpen:!0}),(0,m.trackEvent)("ui","cssSettingsBtnClick")},t.prototype.cssSettingsChangeHandler=function(e){this.props.onCodeSettingsChange("css",e),this.setPreviewContent(!0)},t.prototype.getDemoFrame=function(e){e(this.frame)},t.prototype.editorFocusHandler=function(e){this.props.onEditorFocus(e)},t.prototype.render=function(){var e=this;return(0,r.h)(u.SplitPane,{class:"content-wrap flex flex-grow",sizes:this.state.mainSplitSizes,minSize:150,style:"",direction:2===this.props.currentLayoutMode?"vertical":"horizontal",onDragEnd:this.mainSplitDragEndHandler.bind(this)},(0,r.h)(u.SplitPane,{class:"code-side",id:"js-code-side",sizes:this.state.codeSplitSizes,minSize:k,direction:2===this.props.currentLayoutMode||5===this.props.currentLayoutMode?"horizontal":"vertical",onDragStart:this.codeSplitDragStart.bind(this),onDragEnd:this.codeSplitDragEnd.bind(this),onSplit:function(t){return e.codeSplitInstance=t}},(0,r.h)("div",{"data-code-wrap-id":"0",id:"htmlCodeEl","data-type":"html",class:"code-wrap",onTransitionEnd:this.updateCodeWrapCollapseStates.bind(this)},(0,r.h)("div",{class:"js-code-wrap__header code-wrap__header",title:"Double click to toggle code pane",onDblClick:this.codeWrapHeaderDblClickHandler.bind(this)},(0,r.h)("label",{class:"btn-group",dropdow:!0,title:"Click to change"},(0,r.h)("span",{class:"code-wrap__header-label"},p.modes[this.props.currentItem.htmlMode||"html"].label),w,(0,r.h)("select",{"data-type":"html",class:"js-mode-select hidden-select",onChange:this.codeModeChangeHandler.bind(this),value:this.props.currentItem.htmlMode},M,_,x)),(0,r.h)("div",{class:"code-wrap__header-right-options"},(0,r.h)("a",{class:"js-code-collapse-btn code-wrap__header-btn code-wrap__collapse-btn",title:"Toggle code pane",onClick:this.collapseBtnHandler.bind(this)}))),(0,r.h)(d.default,{options:{mode:"htmlmixed",profile:"xhtml",gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],noAutocomplete:!0,matchTags:{bothTags:!0},emmet:!0},prefs:this.props.prefs,onChange:this.onHtmlCodeChange.bind(this),onCreation:function(t){return e.cm.html=t},onFocus:this.editorFocusHandler.bind(this)})),(0,r.h)("div",{"data-code-wrap-id":"1",id:"cssCodeEl","data-type":"css",class:"code-wrap",onTransitionEnd:this.updateCodeWrapCollapseStates.bind(this)},(0,r.h)("div",{class:"js-code-wrap__header code-wrap__header",title:"Double click to toggle code pane",onDblClick:this.codeWrapHeaderDblClickHandler.bind(this)},(0,r.h)("label",{class:"btn-group",title:"Click to change"},(0,r.h)("span",{class:"code-wrap__header-label"},p.modes[this.props.currentItem.cssMode||"css"].label),H,(0,r.h)("select",{"data-type":"css",class:"js-mode-select hidden-select",onChange:this.codeModeChangeHandler.bind(this),value:this.props.currentItem.cssMode},L,I,E,j,A,B)),(0,r.h)("div",{class:"code-wrap__header-right-options"},(0,r.h)("a",{href:"#",id:"cssSettingsBtn",title:"Atomic CSS configuration",onClick:this.cssSettingsBtnClickHandler.bind(this),class:"code-wrap__header-btn hide"},O),(0,r.h)("a",{class:"js-code-collapse-btn code-wrap__header-btn code-wrap__collapse-btn",title:"Toggle code pane",onClick:this.collapseBtnHandler.bind(this)}))),(0,r.h)(d.default,{options:{mode:"css",gutters:["error-gutter","CodeMirror-linenumbers","CodeMirror-foldgutter"],emmet:!0},prefs:this.props.prefs,onChange:this.onCssCodeChange.bind(this),onCreation:function(t){return e.cm.css=t},onFocus:this.editorFocusHandler.bind(this)})),(0,r.h)("div",{"data-code-wrap-id":"2",id:"jsCodeEl","data-type":"js",class:"code-wrap",onTransitionEnd:this.updateCodeWrapCollapseStates.bind(this)},(0,r.h)("div",{class:"js-code-wrap__header code-wrap__header",title:"Double click to toggle code pane",onDblClick:this.codeWrapHeaderDblClickHandler.bind(this)},(0,r.h)("label",{class:"btn-group",title:"Click to change"},(0,r.h)("span",{class:"code-wrap__header-label"},p.modes[this.props.currentItem.jsMode||"js"].label),P,(0,r.h)("select",{"data-type":"js",class:"js-mode-select hidden-select",onChange:this.codeModeChangeHandler.bind(this),value:this.props.currentItem.jsMode},T,V,D,F)),(0,r.h)("div",{class:"code-wrap__header-right-options"},(0,r.h)("a",{class:"js-code-collapse-btn code-wrap__header-btn code-wrap__collapse-btn",title:"Toggle code pane",onClick:this.collapseBtnHandler.bind(this)}))),(0,r.h)(d.default,{options:{mode:"javascript",gutters:["error-gutter","CodeMirror-linenumbers","CodeMirror-foldgutter"]},prefs:this.props.prefs,autoComplete:this.props.prefs.autoComplete,onChange:this.onJsCodeChange.bind(this),onCreation:function(t){return e.cm.js=t},onFocus:this.editorFocusHandler.bind(this)}))),(0,r.h)("div",{class:"demo-side",id:"js-demo-side",style:""},(0,r.h)("iframe",{ref:function(t){return e.frame=t},src:"about://blank",frameborder:"0",id:"demo-frame",allowfullscreen:!0}),(0,r.h)("div",{id:"consoleEl",class:"console "+(this.state.isConsoleOpen?"":"is-minimized")},(0,r.h)("div",{id:"consoleLogEl",class:"console__log"},(0,r.h)("div",{class:"js-console__header code-wrap__header",title:"Double click to toggle console",onDblClick:this.consoleHeaderDblClickHandler.bind(this)},W,(0,r.h)("div",{class:"code-wrap__header-right-options"},(0,r.h)("a",{class:"code-wrap__header-btn",title:"Clear console (CTRL + L)",onClick:this.clearConsoleBtnClickHandler.bind(this)},N),(0,r.h)("a",{class:"code-wrap__header-btn code-wrap__collapse-btn",title:"Toggle console",onClick:this.toggleConsole.bind(this)}))),(0,r.h)(y.default,{options:{mode:"javascript",lineWrapping:!0,theme:"monokai",foldGutter:!0,readOnly:!0,gutters:["CodeMirror-foldgutter"]},onCreation:function(t){return e.consoleCm=t}})),(0,r.h)("div",{id:"consolePromptEl",class:"console__prompt flex flex-v-center"},z,(0,r.h)("input",{onKeyUp:this.evalConsoleExpr.bind(this),class:"console-exec-input"}))),(0,r.h)(S.default,{show:this.state.isCssSettingsModalOpen,closeHandler:function(){return e.setState({isCssSettingsModalOpen:!1})},onChange:this.cssSettingsChangeHandler.bind(this),settings:this.props.currentItem.cssSettings,editorTheme:this.props.prefs.editorTheme})))},t}(r.Component);t.default=U},"9VU0":function(e,t,o){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0,t.LibraryAutoSuggest=void 0;var i=function(){function e(e,t){for(var o,n=0;n"+t[o].name+"";e.isShowingSuggestions=!0,e.textareaBounds||(e.textareaBounds=e.t.getBoundingClientRect(),e.list.style.top=e.textareaBounds.bottom+"px",e.list.style.left=e.textareaBounds.left+"px",e.list.style.width=e.textareaBounds.width+"px"),e.list.classList.add("is-open")})},500)}},t.prototype.onKeyDown=function(e){var t;this.isShowingSuggestions&&(27===e.keyCode&&(this.closeSuggestions(),e.stopPropagation()),40===e.keyCode&&this.isShowingSuggestions?(t=this.list.querySelector(".selected"),t?(t.classList.remove("selected"),t.nextElementSibling.classList.add("selected")):this.list.querySelector("li:first-child").classList.add("selected"),this.list.querySelector(".selected").scrollIntoView(!1),e.preventDefault()):38===e.keyCode&&this.isShowingSuggestions?(t=this.list.querySelector(".selected"),t?(t.classList.remove("selected"),t.previousElementSibling.classList.add("selected")):this.list.querySelector("li:first-child").classList.add("selected"),this.list.querySelector(".selected").scrollIntoView(!1),e.preventDefault()):13===e.keyCode&&this.isShowingSuggestions&&(t=this.list.querySelector(".selected"),this.selectSuggestion(t.dataset.url),this.closeSuggestions()))},t.prototype.onListMouseDown=function(e){var t=e.target;t.parentElement.dataset.url&&this.selectSuggestion(t.parentElement.dataset.url)},t.prototype.selectSuggestion=function(e){this.t.focus(),(0,l.trackEvent)("ui","autoSuggestionLibSelected",e),this.selectedCallback?this.selectedCallback.call(null,e):this.replaceCurrentLine(e),this.closeSuggestions()},t.prototype.render=function(){var e=this;return(0,r.h)("div",{class:"btn-group "+(this.props.fullWidth?"flex-grow":""),ref:function(t){return e.wrap=t}},this.props.children,(0,r.h)("ul",{ref:function(t){return e.list=t},class:"dropdown__menu autocomplete-dropdown"}),(0,r.h)("div",{ref:function(t){return e.loader=t},class:"loader autocomplete__loader",style:"display:none"}))},i(t,[{key:"currentLineNumber",get:function(){return this.t.value.substr(0,this.t.selectionStart).split("\n").length}},{key:"currentLine",get:function(){var e=this.currentLineNumber;return this.t.value.split("\n")[e-1]}}]),t}(r.Component)},BcU7:function(e,t,o){"use strict";function n(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,o){function n(s,a){try{var i=t[s](a),r=i.value}catch(e){return void o(e)}return i.done?void e(r):Promise.resolve(r).then(function(e){n("next",e)},function(e){n("throw",e)})}return n("next")})}}var s=Object.assign||function(e){for(var t,o=1;oHello, World!\"}"})),X=(0,d.h)(k.default,null),ee=(0,d.h)(K.Icons,null),te=(0,d.h)("form",{style:"display:none;",action:"https://codepen.io/pen/define",method:"POST",target:"_blank",id:"codepenForm"},(0,d.h)("input",{type:"hidden",name:"data",value:"{\"title\": \"New Pen!\", \"html\": \"
Hello, World!
\"}"})),oe=function(e){function t(){a(this,t);var o=i(this,e.call(this));return o.AUTO_SAVE_INTERVAL=15000,o.state={isSavedItemPaneOpen:!1,isModalOpen:!1,isAddLibraryModalOpen:!1,isSettingsModalOpen:!1,isHelpModalOpen:!1,isNotificationsModalOpen:!1,isLoginModalOpen:!1,isProfileModalOpen:!1,isSupportDeveloperModalOpen:!1,isKeyboardShortcutsModalOpen:!1,isAskToImportModalOpen:!1,isOnboardModalOpen:!1,prefs:{},currentItem:{title:"",externalLibs:{js:"",css:""}}},o.defaultSettings={preserveLastCode:!0,replaceNewTab:!1,htmlMode:"html",jsMode:"js",cssMode:"css",isCodeBlastOn:!1,indentWith:"spaces",indentSize:2,editorTheme:"monokai",keymap:"sublime",fontSize:16,refreshOnResize:!1,autoPreview:!0,editorFont:"FiraCode",editorCustomFont:"",autoSave:!0,autoComplete:!0,preserveConsoleLogs:!0,lightVersion:!1,lineWrap:!0,infiniteLoopTimeout:1e3,layoutMode:2},o.prefs={},B.default.auth().onAuthStateChanged(function(e){o.setState({isLoginModalOpen:!1}),e?((0,w.log)("You are -> ",e),j.alertsService.add("You are now logged in!"),o.setState({user:e}),window.user=e,!window.localStorage[J.ASKED_TO_IMPORT_CREATIONS]&&o.fetchItems(!1,!0).then(function(e){e.length&&(o.oldSavedItems=e,o.oldSavedCreationsCount=e.length,o.setState({isAskToImportModalOpen:!0}),(0,I.trackEvent)("ui","askToImportModalSeen"))}),window.db.getUser(e.uid).then(function(t){if(t){var n=l({},o.state.prefs);l(n,e.settings),o.setState({prefs:n}),o.updateSetting()}})):(o.setState({user:void 0}),delete window.user),o.updateProfileUi()}),o}return r(t,e),t.prototype.componentWillMount=function(){var e,t=this;window.onunload=function(){t.saveCode("code"),t.detachedWindow&&t.detachedWindow.close()},db.local.get({layoutMode:1,code:""},function(o){t.toggleLayout(o.layoutMode),t.state.prefs.layoutMode=o.layoutMode,o.code&&(e=o.code)}),db.getSettings(this.defaultSettings).then(function(o){o.preserveLastCode&&e?(t.setState({unsavedEditCount:0}),e.id&&window.IS_EXTENSION?db.local.get(e.id,function(o){o[e.id]&&((0,w.log)("Load item ",e.id),t.setCurrentItem(o[e.id]).then(function(){return t.refreshEditor()}))}):((0,w.log)("Load last unsaved item",e),t.setCurrentItem(e).then(function(){return t.refreshEditor()}))):t.createNewItem(),l(t.state.prefs,o),t.setState({prefs:t.state.prefs}),t.updateSetting()}),db.getUserLastSeenVersion().then(function(e){e||(t.setState({isOnboardModalOpen:!0}),-1===document.cookie.indexOf("onboarded")&&((0,I.trackEvent)("ui","onboardModalSeen",G),document.cookie="onboarded=1"),window.db.setUserLastSeenVersion(G)),e&&-1===(0,w.semverCompare)(e,G)&&!window.localStorage.pledgeModalSeen&&(t.openSupportDeveloperModal(),window.localStorage.pledgeModalSeen=!0),e&&-1!==(0,w.semverCompare)(e,G)||(t.setState({hasUnseenChangelog:!0}),t.hasSeenNotifications=!1)})},t.prototype.updateProfileUi=function(){this.state.user?document.body.classList.add("is-logged-in"):document.body.classList.remove("is-logged-in")},t.prototype.refreshEditor=function(){this.toggleLayout(this.state.currentItem.layoutMode||this.state.prefs.layoutMode),this.updateExternalLibCount(),this.contentWrap.refreshEditor()},t.prototype.forkItem=function(e){var t=this;if(this.state.unsavedEditCount){var o=confirm("You have unsaved changes in your current work. Do you want to discard unsaved changes and continue?");if(!o)return}var n=JSON.parse(JSON.stringify(e));delete n.id,n.title="(Forked) "+e.title,n.updatedOn=Date.now(),this.setCurrentItem(n).then(function(){return t.refreshEditor()}),j.alertsService.add("\""+e.title+"\" was forked"),(0,I.trackEvent)("fn","itemForked")},t.prototype.createNewItem=function(){var e=this,t=new Date;this.setCurrentItem({title:"Untitled "+t.getDate()+"-"+(t.getMonth()+1)+"-"+t.getHours()+":"+t.getMinutes(),html:"",css:"",js:"",externalLibs:{js:"",css:""},layoutMode:this.state.currentLayoutMode}).then(function(){return e.refreshEditor()}),j.alertsService.add("New item created")},t.prototype.openItem=function(e){var t=this;this.setCurrentItem(e).then(function(){return t.refreshEditor()}),j.alertsService.add("Saved item loaded")},t.prototype.removeItem=function(e){var t=this,o=confirm("Are you sure you want to delete \""+e.title+"\"?");o&&(M.itemService.unsetItemForUser(e.id),M.itemService.removeItem(e.id).then(function(){j.alertsService.add("Item removed.",e),t.state.currentItem.id===e.id&&t.createNewItem()}),delete this.state.savedItems[e.id],this.setState({savedItems:l({},this.state.savedItems)}),(0,I.trackEvent)("fn","itemRemoved"))},t.prototype.setCurrentItem=function(e){var t=(0,E.deferred)();return e.htmlMode=e.htmlMode||this.state.prefs.htmlMode||L.HtmlModes.HTML,e.cssMode=e.cssMode||this.state.prefs.cssMode||L.CssModes.CSS,e.jsMode=e.jsMode||this.state.prefs.jsMode||L.JsModes.JS,this.setState({currentItem:e},t.resolve),this.isAutoSavingEnabled=!1,this.setState({unsavedEditCount:0}),t.promise},t.prototype.saveBtnClickHandler=function(){(0,I.trackEvent)("ui","saveBtnClick",this.state.currentItem.id?"saved":"new"),this.saveItem()},t.prototype.populateItemsInSavedPane=function(){this.setState({savedItems:l({},this.state.savedItems)}),this.toggleSavedItemsPane()},t.prototype.toggleSavedItemsPane=function(){this.setState({isSavedItemPaneOpen:!this.state.isSavedItemPaneOpen}),this.state.isSavedItemPaneOpen?window.searchInput.focus():window.searchInput.value="",document.body.classList[this.state.isSavedItemPaneOpen?"add":"remove"]("overlay-visible")},t.prototype.fetchItems=function(){var e=s(function*(e,t){var o=this,n=(0,E.deferred)();this.state.savedItems={};var s=[];return window.user&&!t?(s=yield M.itemService.getAllItems(),(0,w.log)("got items"),e&&s.forEach(function(e){o.state.savedItems[e.id]=e}),n.resolve(s),n.promise):(db.local.get("items",function(t){var a=Object.getOwnPropertyNames(t.items||{});a.length||n.resolve([]),(0,I.trackEvent)("fn","fetchItems",a.length);for(var r=function(t){db.local.get(a[t],function(i){e&&(o.state.savedItems[a[t]]=i[a[t]]),s.push(i[a[t]]),a.length===s.length&&n.resolve(s)})},l=0;lwindow.innerWidth?2:e,this.state.currentLayoutMode===e?(this.contentWrap.resetSplitting(),void this.setState({currentLayoutMode:e})):void([1,2,3,4,5].forEach(function(e){window["layoutBtn"+e].classList.remove("selected"),document.body.classList.remove("layout-"+e)}),$("#layoutBtn"+e).classList.add("selected"),document.body.classList.add("layout-"+e),this.setState({currentLayoutMode:e},function(){t.contentWrap.resetSplitting(),t.contentWrap.setPreviewContent(!0)}))},t.prototype.layoutBtnClickHandler=function(e){this.saveSetting("layoutMode",e),(0,I.trackEvent)("ui","toggleLayoutClick",e),this.toggleLayout(e)},t.prototype.getCodePaneSizes=function(){var e,t=this.state.currentLayoutMode,o=2===t||5===t?"width":"height";try{e=[htmlCodeEl.style[o],cssCodeEl.style[o],jsCodeEl.style[o]]}catch(t){e=[33.33,33.33,33.33]}finally{return e}},t.prototype.getMainPaneSizes=function(){var e,t=this.state.currentLayoutMode,o=2===t?"height":"width";try{e=[+$("#js-code-side").style[o].match(/([\d.]+)%/)[1],+$("#js-demo-side").style[o].match(/([\d.]+)%/)[1]]}catch(t){e=[50,50]}finally{return e}},t.prototype.saveSetting=function(e,t){var o,n=(0,E.deferred)(),s=(o={},o[e]=t,o);return db.local.set(s,n.resolve),n.promise},t.prototype.saveCode=function(e){return this.state.currentItem.updatedOn=Date.now(),this.state.currentItem.layoutMode=this.state.currentLayoutMode,this.state.currentItem.sizes=this.getCodePaneSizes(),this.state.currentItem.mainSizes=this.getMainPaneSizes(),(0,w.log)("saving key",e||this.state.currentItem.id,this.state.currentItem),M.itemService.setItem(e||this.state.currentItem.id,this.state.currentItem).then(function(){window.user&&!navigator.onLine?j.alertsService.add("Item saved locally. Will save to account when you are online."):j.alertsService.add("Item saved."),this.setState({unsavedEditCount:0})}.bind(this))},t.prototype.saveItem=function(){var e=this;if(!window.user&&!window.localStorage[J.LOGIN_AND_SAVE_MESSAGE_SEEN]){var t=confirm("Saving without signing in will save your work only on this machine and this browser. If you want it to be secure & available anywhere, please login in your account and then save.\n\nDo you still want to continue saving locally?");if(window.localStorage[J.LOGIN_AND_SAVE_MESSAGE_SEEN]=!0,!t)return(0,I.trackEvent)("ui",J.LOGIN_AND_SAVE_MESSAGE_SEEN,"login"),this.closeAllOverlays(),void this.setState({isLoginModalOpen:!0});(0,I.trackEvent)("ui",J.LOGIN_AND_SAVE_MESSAGE_SEEN,"local")}var o=!this.state.currentItem.id;this.state.currentItem.id=this.state.currentItem.id||"item-"+(0,w.generateRandomId)(),this.setState({isSaving:!0}),this.saveCode().then(function(){e.setState({isSaving:!1}),!e.isAutoSavingEnabled&&e.state.prefs.autoSave&&(e.isAutoSavingEnabled=!0,j.alertsService.add("Auto-save enabled."))}),o&&M.itemService.setItemForUser(this.state.currentItem.id)},t.prototype.onCodeModeChange=function(e,t){var o=l({},this.state.currentItem);o[e+"Mode"]=t,this.setState({currentItem:o})},t.prototype.onCodeChange=function(e,t,o){this.state.currentItem[e]=t,o&&(this.setState({unsavedEditCount:this.state.unsavedEditCount+1}),0==this.state.unsavedEditCount%q&&this.state.unsavedEditCount>=q&&(window.saveBtn.classList.add("animated"),window.saveBtn.classList.add("wobble"),window.saveBtn.addEventListener("animationend",function(){window.saveBtn.classList.remove("animated"),window.saveBtn.classList.remove("wobble")})))},t.prototype.onCodeSettingsChange=function(e,t){this.state.currentItem[e+"Settings"]={acssConfig:t}},t.prototype.titleInputBlurHandler=function(t){this.state.currentItem.title=t.target.value,this.state.currentItem.id&&(this.saveItem(),(0,I.trackEvent)("ui","titleChanged"))},t.prototype.updateSetting=function(t){var e=this;if(t){var o=t.target.dataset.setting,n={},s=t.target;(0,w.log)(o,"checkbox"===s.type?s.checked:s.value);var a=l({},this.state.prefs);a[o]="checkbox"===s.type?s.checked:s.value,n[o]=a[o],this.setState({prefs:a}),db.sync.set(n,function(){j.alertsService.add("Setting saved")}),window.user&&window.db.getDb().then(function(t){var n;t.collection("users").doc(window.user.uid).update((n={},n["settings."+o]=e.state.prefs[o],n)).then(function(e){(0,w.log)("Setting \""+o+"\" for user",e)}).catch(function(e){return(0,w.log)(e)})}),(0,I.trackEvent)("ui","updatePref-"+o,a[o])}var i=this.state.prefs;runBtn.classList[i.autoPreview?"add":"remove"]("hide"),this.contentWrap.applyCodemirrorSettings(this.state.prefs),i.autoSave?!this.autoSaveInterval&&(this.autoSaveInterval=setInterval(function(){e.autoSaveLoop()},this.AUTO_SAVE_INTERVAL)):(clearInterval(this.autoSaveInterval),this.autoSaveInterval=null),document.body.classList[i.lightVersion?"add":"remove"]("light-version")},t.prototype.autoSaveLoop=function(){this.isAutoSavingEnabled&&this.state.unsavedEditCount&&this.saveItem()},t.prototype.loginBtnClickHandler=function(){this.setState({isLoginModalOpen:!0})},t.prototype.profileBtnClickHandler=function(){this.setState({isProfileModalOpen:!0})},t.prototype.logout=function(){if(this.state.unsavedEditCount){var e=confirm("You have unsaved changes. Do you still want to logout?");if(!e)return}(0,I.trackEvent)("fn","loggedOut"),P.auth.logout(),this.setState({isProfileModalOpen:!1}),j.alertsService.add("Log out successfull")},t.prototype.itemClickHandler=function(e){var t=this;setTimeout(function(){t.openItem(e)},350),this.toggleSavedItemsPane()},t.prototype.itemRemoveBtnClickHandler=function(e){this.removeItem(e)},t.prototype.itemForkBtnClickHandler=function(e){var t=this;this.toggleSavedItemsPane(),setTimeout(function(){t.forkItem(e)},350)},t.prototype.newBtnClickHandler=function(){if((0,I.trackEvent)("ui","newBtnClick"),this.state.unsavedEditCount){var e=confirm("You have unsaved changes. Do you still want to create something new?");e&&this.createNewItem()}else this.createNewItem()},t.prototype.openBtnClickHandler=function(){(0,I.trackEvent)("ui","openBtnClick"),this.openSavedItemsPane()},t.prototype.detachedPreviewBtnHandler=function(){(0,I.trackEvent)("ui","detachPreviewBtnClick"),this.contentWrap.detachPreview()},t.prototype.notificationsBtnClickHandler=function(){return this.setState({isNotificationsModalOpen:!0}),this.state.isNotificationsModalOpen&&!this.hasSeenNotifications&&(this.hasSeenNotifications=!0,this.setState({hasUnseenChangelog:!1}),window.db.setUserLastSeenVersion(G)),(0,I.trackEvent)("ui","notificationButtonClick",G),!1},t.prototype.codepenBtnClickHandler=function(t){if(this.state.currentItem.cssMode===L.CssModes.ACSS)return alert("Oops! CodePen doesn't supports Atomic CSS currently. \nHere is something you can still do -> https://medium.com/web-maker/sharing-your-atomic-css-work-on-codepen-a402001b26ab"),void t.preventDefault();var e={title:"A Web Maker experiment",html:this.state.currentItem.html,css:this.state.currentItem.css,js:this.state.currentItem.js,html_pre_processor:L.modes[this.state.currentItem.htmlMode].codepenVal,css_pre_processor:L.modes[this.state.currentItem.cssMode].codepenVal,js_pre_processor:L.modes[this.state.currentItem.jsMode].codepenVal,css_external:this.state.currentItem.externalLibs.css.split("\n").join(";"),js_external:this.state.currentItem.externalLibs.js.split("\n").join(";")};this.state.currentItem.title.match(/Untitled\s\d\d*-\d/)||(e.title=this.state.currentItem.title),e=JSON.stringify(e),window.codepenForm.querySelector("input").value=e,window.codepenForm.submit(),(0,I.trackEvent)("ui","openInCodepen"),t.preventDefault()},t.prototype.saveHtmlBtnClickHandler=function(t){(0,w.saveAsHtml)(this.state.currentItem),(0,I.trackEvent)("ui","saveHtmlClick"),t.preventDefault()},t.prototype.runBtnClickHandler=function(){this.contentWrap.setPreviewContent(!0,!0),(0,I.trackEvent)("ui","runBtnClick")},t.prototype.exportItems=function(){var e=this;(0,w.handleDownloadsPermission)().then(function(){e.fetchItems().then(function(e){var t=new Date,o=["web-maker-export",t.getFullYear(),t.getMonth()+1,t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds()].join("-");o+=".json";var n=new Blob([JSON.stringify(e,!1,2)],{type:"application/json;charset=UTF-8"});(0,w.downloadFile)(o,n),(0,I.trackEvent)("fn","exportItems")})})},t.prototype.exportBtnClickHandler=function(t){this.exportItems(),t.preventDefault(),(0,I.trackEvent)("ui","exportBtnClicked")},t.prototype.screenshotBtnClickHandler=function(t){this.contentWrap.getDemoFrame(function(e){(0,D.takeScreenshot)(e.getBoundingClientRect())}),t.preventDefault()},t.prototype.openSupportDeveloperModal=function(){this.closeAllOverlays(),this.setState({isSupportDeveloperModalOpen:!0})},t.prototype.supportDeveloperBtnClickHandler=function(t){this.openSupportDeveloperModal(t)},t.prototype.dontAskToImportAnymore=function(t){this.setState({isAskToImportModalOpen:!1}),window.localStorage[J.ASKED_TO_IMPORT_CREATIONS]=!0,t&&(0,I.trackEvent)("ui","dontAskToImportBtnClick")},t.prototype.importCreationsAndSettingsIntoApp=function(){var e=this;this.mergeImportedItems(this.oldSavedItems).then(function(){(0,I.trackEvent)("fn","oldItemsImported"),e.dontAskToImportAnymore()})},t.prototype.editorFocusHandler=function(e){this.editorWithFocus=e},t.prototype.modalOverlayClickHandler=function(){this.closeAllOverlays()},t.prototype.splitUpdateHandler=function(){this.state.currentItem.sizes=this.getCodePaneSizes(),this.state.currentItem.mainSizes=this.getMainPaneSizes()},t.prototype.render=function(){var e=this;return(0,d.h)("div",null,(0,d.h)("div",{class:"main-container"},(0,d.h)(c.MainHeader,{externalLibCount:this.state.externalLibCount,openBtnHandler:this.openBtnClickHandler.bind(this),newBtnHandler:this.newBtnClickHandler.bind(this),saveBtnHandler:this.saveBtnClickHandler.bind(this),loginBtnHandler:this.loginBtnClickHandler.bind(this),profileBtnHandler:this.profileBtnClickHandler.bind(this),addLibraryBtnHandler:this.openAddLibrary.bind(this),runBtnClickHandler:this.runBtnClickHandler.bind(this),isFetchingItems:this.state.isFetchingItems,isSaving:this.state.isSaving,title:this.state.currentItem.title,titleInputBlurHandler:this.titleInputBlurHandler.bind(this),user:this.state.user,unsavedEditCount:this.state.unsavedEditCount}),(0,d.h)(h.default,{currentLayoutMode:this.state.currentLayoutMode,currentItem:this.state.currentItem,onCodeChange:this.onCodeChange.bind(this),onCodeSettingsChange:this.onCodeSettingsChange.bind(this),onCodeModeChange:this.onCodeModeChange.bind(this),onRef:function(t){return e.contentWrap=t},prefs:this.state.prefs,onEditorFocus:this.editorFocusHandler.bind(this),onSplitUpdate:this.splitUpdateHandler.bind(this)}),Z,(0,d.h)(m.default,{layoutBtnClickHandler:this.layoutBtnClickHandler.bind(this),helpBtnClickHandler:function(){return e.setState({isHelpModalOpen:!0})},settingsBtnClickHandler:function(){return e.setState({isSettingsModalOpen:!0})},notificationsBtnClickHandler:this.notificationsBtnClickHandler.bind(this),supportDeveloperBtnClickHandler:this.supportDeveloperBtnClickHandler.bind(this),detachedPreviewBtnHandler:this.detachedPreviewBtnHandler.bind(this),codepenBtnClickHandler:this.codepenBtnClickHandler.bind(this),saveHtmlBtnClickHandler:this.saveHtmlBtnClickHandler.bind(this),keyboardShortcutsBtnClickHandler:function(){return e.setState({isKeyboardShortcutsModalOpen:!0})},screenshotBtnClickHandler:this.screenshotBtnClickHandler.bind(this),hasUnseenChangelog:this.state.hasUnseenChangelog})),(0,d.h)(g.default,{items:this.state.savedItems,isOpen:this.state.isSavedItemPaneOpen,closeHandler:this.closeSavedItemsPane.bind(this),itemClickHandler:this.itemClickHandler.bind(this),itemRemoveBtnClickHandler:this.itemRemoveBtnClickHandler.bind(this),itemForkBtnClickHandler:this.itemForkBtnClickHandler.bind(this),exportBtnClickHandler:this.exportBtnClickHandler.bind(this)}),Y,Q,(0,d.h)(C.default,{show:this.state.isAddLibraryModalOpen,closeHandler:function(){return e.setState({isAddLibraryModalOpen:!1})}},(0,d.h)(y.default,{js:this.state.currentItem.externalLibs?this.state.currentItem.externalLibs.js:"",css:this.state.currentItem.externalLibs?this.state.currentItem.externalLibs.css:"",onChange:this.onExternalLibChange.bind(this)})),(0,d.h)(C.default,{show:this.state.isNotificationsModalOpen,closeHandler:function(){return e.setState({isNotificationsModalOpen:!1})}},(0,d.h)(_.Notifications,{onSupportBtnClick:this.openSupportDeveloperModal.bind(this)})),(0,d.h)(C.default,{extraClasses:"modal--settings",show:this.state.isSettingsModalOpen,closeHandler:function(){return e.setState({isSettingsModalOpen:!1})}},(0,d.h)(H.default,{prefs:this.state.prefs,onChange:this.updateSetting.bind(this)})),(0,d.h)(C.default,{extraClasses:"login-modal",show:this.state.isLoginModalOpen,closeHandler:function(){return e.setState({isLoginModalOpen:!1})}},X),(0,d.h)(C.default,{show:this.state.isProfileModalOpen,closeHandler:function(){return e.setState({isProfileModalOpen:!1})}},(0,d.h)(O.Profile,{user:this.state.user,logoutBtnHandler:this.logout.bind(this)})),(0,d.h)(U.HelpModal,{show:this.state.isHelpModalOpen,closeHandler:function(){return e.setState({isHelpModalOpen:!1})},onSupportBtnClick:this.openSupportDeveloperModal.bind(this),version:"3.3.1"}),(0,d.h)(T.SupportDeveloperModal,{show:this.state.isSupportDeveloperModalOpen,closeHandler:function(){return e.setState({isSupportDeveloperModalOpen:!1})}}),(0,d.h)(V.KeyboardShortcutsModal,{show:this.state.isKeyboardShortcutsModalOpen,closeHandler:function(){return e.setState({isKeyboardShortcutsModalOpen:!1})}}),(0,d.h)(F.AskToImportModal,{show:this.state.isAskToImportModalOpen,closeHandler:function(){return e.setState({isAskToImportModalOpen:!1})},oldSavedCreationsCount:this.oldSavedCreationsCount,importBtnClickHandler:this.importCreationsAndSettingsIntoApp.bind(this),dontAskBtnClickHandler:this.dontAskToImportAnymore.bind(this)}),(0,d.h)(R.OnboardingModal,{show:this.state.isOnboardModalOpen,closeHandler:function(){return e.setState({isOnboardModalOpen:!1})}}),(0,d.h)(z.default,{into:"body"},(0,d.h)("div",{class:"modal-overlay",onClick:this.modalOverlayClickHandler.bind(this)})),ee,te)},t}(d.Component);t.default=oe},y5h4:function(e,t){"use strict";t.__esModule=!0;var o=t.HtmlModes={HTML:"html",MARKDOWN:"markdown",JADE:"jade"},n=t.CssModes={CSS:"css",SCSS:"scss",SASS:"sass",LESS:"less",STYLUS:"stylus",ACSS:"acss"},s=t.JsModes={JS:"js",ES6:"es6",COFFEESCRIPT:"coffee",TS:"typescript"},a=t.modes={};a[o.HTML]={label:"HTML",cmMode:"htmlmixed",codepenVal:"none"},a[o.MARKDOWN]={label:"Markdown",cmMode:"markdown",codepenVal:"markdown"},a[o.JADE]={label:"Pug",cmMode:"pug",codepenVal:"pug"},a[s.JS]={label:"JS",cmMode:"javascript",codepenVal:"none"},a[s.COFFEESCRIPT]={label:"CoffeeScript",cmMode:"coffeescript",codepenVal:"coffeescript"},a[s.ES6]={label:"ES6 (Babel)",cmMode:"jsx",codepenVal:"babel"},a[s.TS]={label:"TypeScript",cmPath:"jsx",cmMode:"text/typescript-jsx",codepenVal:"typescript"},a[n.CSS]={label:"CSS",cmPath:"css",cmMode:"css",codepenVal:"none"},a[n.SCSS]={label:"SCSS",cmPath:"css",cmMode:"text/x-scss",codepenVal:"scss"},a[n.SASS]={label:"SASS",cmMode:"sass",codepenVal:"sass"},a[n.LESS]={label:"LESS",cmPath:"css",cmMode:"text/x-less",codepenVal:"less"},a[n.STYLUS]={label:"Stylus",cmMode:"stylus",codepenVal:"stylus"},a[n.ACSS]={label:"Atomic CSS",cmPath:"css",cmMode:"css",codepenVal:"notsupported",cmDisable:!0,hasSettings:!0}}},["pwNi"]); \ No newline at end of file +webpackJsonp([0],{"+ZAi":function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0,t.default=void 0;var r=o("KM04"),l=o("inAt"),d=n(l),c=o("CIHI"),p=n(c),h=(0,r.h)("h1",null,"Atomic CSS Settings"),u=(0,r.h)("h3",null,"Configure Atomizer settings."," ",(0,r.h)("a",{href:"https://github.com/acss-io/atomizer#api",target:"_blank",rel:"noopener noreferrer"},"Read more")," ","about available settings."),m=function(e){function t(){return s(this,t),a(this,e.apply(this,arguments))}return i(t,e),t.prototype.componentDidUpdate=function(){var e=this;this.props.show&&setTimeout(function(){e.props.settings&&e.cm.setValue(e.props.settings.acssConfig),e.cm.refresh(),e.cm.focus()},500)},t.prototype.render=function(){var e=this;return(0,r.h)(d.default,{show:this.props.show,closeHandler:this.props.closeHandler},h,u,(0,r.h)("div",{style:"height: calc(100vh - 350px);"},(0,r.h)(p.default,{options:{mode:"application/ld+json",theme:this.props.editorTheme},onCreation:function(t){return e.cm=t},onBlur:function(t){return e.props.onChange(t.getValue())}})),(0,r.h)("div",{class:"flex flex-h-end"},(0,r.h)("button",{class:"btn btn--primary",onClick:this.props.closeHandler},"Apply and Close")))},t}(r.Component);t.default=m},0:function(){},"03MQ":function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.CreateNewModal=function(e){var t=e.show,o=e.closeHandler,n=e.onBlankTemplateSelect,a=e.onTemplateSelect;return(0,s.h)(i.default,{show:t,closeHandler:o,smll:!0},(0,s.h)("div",{class:"tac"},(0,s.h)("button",{className:"btn",onClick:n},"Start a blank creation")),c,"Or choose from a template:",(0,s.h)("div",{class:"saved-items-pane__container"},d.default.map(function(e){return(0,s.h)(r.ItemTile,{item:e,focusable:!0,onClick:a.bind(null,e)})})))};var s=o("KM04"),a=o("inAt"),i=n(a),r=o("iGzD"),l=o("g3Nw"),d=n(l),c=(0,s.h)("hr",null)},"0job":function(e,t,o){"use strict";t.__esModule=!0,t.Icons=function(){return(0,n.h)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",style:{display:"none"}},s,a,i,r,l,d,c,p,h,u,m,f,(0,n.h)("symbol",{id:"gift-icon",viewBox:"0 0 24 24"},g,b,y,v,C,k,S,(0,n.h)("symbol",{id:"loader-icon",viewBox:"0 0 44 44"},w)))};var n=o("KM04"),s=(0,n.h)("symbol",{id:"logo",viewBox:"-145 -2 372 175"},(0,n.h)("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",transform:"translate(-145.000000, -1.000000)"},(0,n.h)("polygon",{id:"Path-1",fill:"#FF4600",points:"31 0 232 0 132 173.310547"}),(0,n.h)("polygon",{id:"Path-1",fill:"#FF6C00",points:"0 0 201 0 101 173.310547"}),(0,n.h)("polygon",{id:"Path-1",fill:"#FF6C00",transform:"translate(271.500000, 86.500000) scale(1, -1) translate(-271.500000, -86.500000) ",points:"171 0 372 0 272 173.310547"}),(0,n.h)("polygon",{id:"Path-1",fill:"#FF4600",transform:"translate(241.500000, 86.500000) scale(1, -1) translate(-241.500000, -86.500000) ",points:"141 0 342 0 242 173.310547"}))),a=(0,n.h)("symbol",{id:"bug-icon",viewBox:"0 0 24 24"},(0,n.h)("path",{d:"M14,12H10V10H14M14,16H10V14H14M20,8H17.19C16.74,7.22 16.12,6.55 15.37,6.04L17,4.41L15.59,3L13.42,5.17C12.96,5.06 12.5,5 12,5C11.5,5 11.04,5.06 10.59,5.17L8.41,3L7,4.41L8.62,6.04C7.88,6.55 7.26,7.22 6.81,8H4V10H6.09C6.04,10.33 6,10.66 6,11V12H4V14H6V15C6,15.34 6.04,15.67 6.09,16H4V18H6.81C7.85,19.79 9.78,21 12,21C14.22,21 16.15,19.79 17.19,18H20V16H17.91C17.96,15.67 18,15.34 18,15V14H20V12H18V11C18,10.66 17.96,10.33 17.91,10H20V8Z"})),i=(0,n.h)("symbol",{id:"google-icon",viewBox:"0 0 24 24"},(0,n.h)("path",{d:"M21.35,11.1H12.18V13.83H18.69C18.36,17.64 15.19,19.27 12.19,19.27C8.36,19.27 5,16.25 5,12C5,7.9 8.2,4.73 12.2,4.73C15.29,4.73 17.1,6.7 17.1,6.7L19,4.72C19,4.72 16.56,2 12.1,2C6.42,2 2.03,6.8 2.03,12C2.03,17.05 6.16,22 12.25,22C17.6,22 21.5,18.33 21.5,12.91C21.5,11.76 21.35,11.1 21.35,11.1V11.1Z"})),r=(0,n.h)("symbol",{id:"fb-icon",viewBox:"0 0 24 24"},(0,n.h)("path",{d:"M17,2V2H17V6H15C14.31,6 14,6.81 14,7.5V10H14L17,10V14H14V22H10V14H7V10H10V6A4,4 0 0,1 14,2H17Z"})),l=(0,n.h)("symbol",{id:"github-icon",viewBox:"0 0 24 24"},(0,n.h)("path",{d:"M12,2A10,10 0 0,0 2,12C2,16.42 4.87,20.17 8.84,21.5C9.34,21.58 9.5,21.27 9.5,21C9.5,20.77 9.5,20.14 9.5,19.31C6.73,19.91 6.14,17.97 6.14,17.97C5.68,16.81 5.03,16.5 5.03,16.5C4.12,15.88 5.1,15.9 5.1,15.9C6.1,15.97 6.63,16.93 6.63,16.93C7.5,18.45 8.97,18 9.54,17.76C9.63,17.11 9.89,16.67 10.17,16.42C7.95,16.17 5.62,15.31 5.62,11.5C5.62,10.39 6,9.5 6.65,8.79C6.55,8.54 6.2,7.5 6.75,6.15C6.75,6.15 7.59,5.88 9.5,7.17C10.29,6.95 11.15,6.84 12,6.84C12.85,6.84 13.71,6.95 14.5,7.17C16.41,5.88 17.25,6.15 17.25,6.15C17.8,7.5 17.45,8.54 17.35,8.79C18,9.5 18.38,10.39 18.38,11.5C18.38,15.32 16.04,16.16 13.81,16.41C14.17,16.72 14.5,17.33 14.5,18.26C14.5,19.6 14.5,20.68 14.5,21C14.5,21.27 14.66,21.59 15.17,21.5C19.14,20.16 22,16.42 22,12A10,10 0 0,0 12,2Z"})),d=(0,n.h)("symbol",{id:"settings-icon",viewBox:"0 0 24 24"},(0,n.h)("path",{d:"M12,15.5A3.5,3.5 0 0,1 8.5,12A3.5,3.5 0 0,1 12,8.5A3.5,3.5 0 0,1 15.5,12A3.5,3.5 0 0,1 12,15.5M19.43,12.97C19.47,12.65 19.5,12.33 19.5,12C19.5,11.67 19.47,11.34 19.43,11L21.54,9.37C21.73,9.22 21.78,8.95 21.66,8.73L19.66,5.27C19.54,5.05 19.27,4.96 19.05,5.05L16.56,6.05C16.04,5.66 15.5,5.32 14.87,5.07L14.5,2.42C14.46,2.18 14.25,2 14,2H10C9.75,2 9.54,2.18 9.5,2.42L9.13,5.07C8.5,5.32 7.96,5.66 7.44,6.05L4.95,5.05C4.73,4.96 4.46,5.05 4.34,5.27L2.34,8.73C2.21,8.95 2.27,9.22 2.46,9.37L4.57,11C4.53,11.34 4.5,11.67 4.5,12C4.5,12.33 4.53,12.65 4.57,12.97L2.46,14.63C2.27,14.78 2.21,15.05 2.34,15.27L4.34,18.73C4.46,18.95 4.73,19.03 4.95,18.95L7.44,17.94C7.96,18.34 8.5,18.68 9.13,18.93L9.5,21.58C9.54,21.82 9.75,22 10,22H14C14.25,22 14.46,21.82 14.5,21.58L14.87,18.93C15.5,18.67 16.04,18.34 16.56,17.94L19.05,18.95C19.27,19.03 19.54,18.95 19.66,18.73L21.66,15.27C21.78,15.05 21.73,14.78 21.54,14.63L19.43,12.97Z"})),c=(0,n.h)("symbol",{id:"twitter-icon",viewBox:"0 0 16 16"},(0,n.h)("path",{d:"M15.969,3.058c-0.586,0.26-1.217,0.436-1.878,0.515c0.675-0.405,1.194-1.045,1.438-1.809 c-0.632,0.375-1.332,0.647-2.076,0.793c-0.596-0.636-1.446-1.033-2.387-1.033c-1.806,0-3.27,1.464-3.27,3.27 c0,0.256,0.029,0.506,0.085,0.745C5.163,5.404,2.753,4.102,1.14,2.124C0.859,2.607,0.698,3.168,0.698,3.767 c0,1.134,0.577,2.135,1.455,2.722C1.616,6.472,1.112,6.325,0.671,6.08c0,0.014,0,0.027,0,0.041c0,1.584,1.127,2.906,2.623,3.206 C3.02,9.402,2.731,9.442,2.433,9.442c-0.211,0-0.416-0.021-0.615-0.059c0.416,1.299,1.624,2.245,3.055,2.271 c-1.119,0.877-2.529,1.4-4.061,1.4c-0.264,0-0.524-0.015-0.78-0.046c1.447,0.928,3.166,1.469,5.013,1.469 c6.015,0,9.304-4.983,9.304-9.304c0-0.142-0.003-0.283-0.009-0.423C14.976,4.29,15.531,3.714,15.969,3.058z"})),p=(0,n.h)("symbol",{id:"heart-icon",viewBox:"0 0 24 24"},(0,n.h)("path",{d:"M12,21.35L10.55,20.03C5.4,15.36 2,12.27 2,8.5C2,5.41 4.42,3 7.5,3C9.24,3 10.91,3.81 12,5.08C13.09,3.81 14.76,3 16.5,3C19.58,3 22,5.41 22,8.5C22,12.27 18.6,15.36 13.45,20.03L12,21.35Z"})),h=(0,n.h)("symbol",{id:"play-icon",viewBox:"0 0 24 24"},(0,n.h)("svg",null,(0,n.h)("path",{d:"M8,5.14V19.14L19,12.14L8,5.14Z"}))),u=(0,n.h)("symbol",{id:"cancel-icon",viewBox:"0 0 24 24"},(0,n.h)("svg",null,(0,n.h)("path",{d:"M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12C4,13.85 4.63,15.55 5.68,16.91L16.91,5.68C15.55,4.63 13.85,4 12,4M12,20A8,8 0 0,0 20,12C20,10.15 19.37,8.45 18.32,7.09L7.09,18.32C8.45,19.37 10.15,20 12,20Z"}))),m=(0,n.h)("symbol",{id:"chevron-icon",viewBox:"0 0 24 24"},(0,n.h)("svg",null,(0,n.h)("path",{d:"M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z"}))),f=(0,n.h)("symbol",{id:"chat-icon",viewBox:"0 0 24 24"},(0,n.h)("path",{d:"M20,2H4A2,2 0 0,0 2,4V22L6,18H20A2,2 0 0,0 22,16V4A2,2 0 0,0 20,2M8,14H6V12H8V14M8,11H6V9H8V11M8,8H6V6H8V8M15,14H10V12H15V14M18,11H10V9H18V11M18,8H10V6H18V8Z"})),g=(0,n.h)("path",{d:"M22,12V20A2,2 0 0,1 20,22H4A2,2 0 0,1 2,20V12A1,1 0 0,1 1,11V8A2,2 0 0,1 3,6H6.17C6.06,5.69 6,5.35 6,5A3,3 0 0,1 9,2C10,2 10.88,2.5 11.43,3.24V3.23L12,4L12.57,3.23V3.24C13.12,2.5 14,2 15,2A3,3 0 0,1 18,5C18,5.35 17.94,5.69 17.83,6H21A2,2 0 0,1 23,8V11A1,1 0 0,1 22,12M4,20H11V12H4V20M20,20V12H13V20H20M9,4A1,1 0 0,0 8,5A1,1 0 0,0 9,6A1,1 0 0,0 10,5A1,1 0 0,0 9,4M15,4A1,1 0 0,0 14,5A1,1 0 0,0 15,6A1,1 0 0,0 16,5A1,1 0 0,0 15,4M3,8V10H11V8H3M13,8V10H21V8H13Z"}),b=(0,n.h)("symbol",{id:"gift-icon",viewBox:"0 0 24 24"}),y=(0,n.h)("symbol",{id:"cross-icon",viewBox:"0 0 24 24"},(0,n.h)("path",{d:"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"})),v=(0,n.h)("symbol",{id:"keyboard-icon",viewBox:"0 0 24 24"},(0,n.h)("path",{d:"M19,10H17V8H19M19,13H17V11H19M16,10H14V8H16M16,13H14V11H16M16,17H8V15H16M7,10H5V8H7M7,13H5V11H7M8,11H10V13H8M8,8H10V10H8M11,11H13V13H11M11,8H13V10H11M20,5H4C2.89,5 2,5.89 2,7V17A2,2 0 0,0 4,19H20A2,2 0 0,0 22,17V7C22,5.89 21.1,5 20,5Z"})),C=(0,n.h)("symbol",{id:"mode-icon",viewBox:"0 0 100 100"},(0,n.h)("g",null,(0,n.h)("rect",{x:0,y:0,width:28,height:47}),(0,n.h)("rect",{x:36,y:0,width:28,height:47}),(0,n.h)("rect",{x:72,y:0,width:28,height:47}),(0,n.h)("rect",{x:0,y:53,width:100,height:47}))),k=(0,n.h)("symbol",{id:"vertical-mode-icon",viewBox:"0 0 100 100"},(0,n.h)("g",null,(0,n.h)("rect",{x:0,y:0,width:20,height:100}),(0,n.h)("rect",{x:23,y:0,width:20,height:100}),(0,n.h)("rect",{x:46,y:0,width:20,height:100}),(0,n.h)("rect",{x:69,y:0,width:32,height:100}))),S=(0,n.h)("symbol",{id:"search",viewBox:"0 0 24 24"},(0,n.h)("path",{d:"M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z"})),w=(0,n.h)("g",{fill:"none",fillRule:"evenodd",strokeWidth:10},(0,n.h)("circle",{cx:22,cy:22,r:1},(0,n.h)("animate",{attributeName:"r",begin:"0s",dur:"1.8s",values:"1; 20",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.165, 0.84, 0.44, 1",repeatCount:"indefinite"}),(0,n.h)("animate",{attributeName:"stroke-opacity",begin:"0s",dur:"1.8s",values:"1; 0",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.3, 0.61, 0.355, 1",repeatCount:"indefinite"})),(0,n.h)("circle",{cx:22,cy:22,r:1},(0,n.h)("animate",{attributeName:"r",begin:"-0.9s",dur:"1.8s",values:"1; 20",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.165, 0.84, 0.44, 1",repeatCount:"indefinite"}),(0,n.h)("animate",{attributeName:"stroke-opacity",begin:"-0.9s",dur:"1.8s",values:"1; 0",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.3, 0.61, 0.355, 1",repeatCount:"indefinite"})))},"0lUe":function(e,t,o){"use strict";function n(e,t){var o={};for(var n in e)0<=t.indexOf(n)||Object.prototype.hasOwnProperty.call(e,n)&&(o[n]=e[n]);return o}function s(e){var t,o=e.type,n=e.children;return"bug"===o?t=c:"a11y"===o?t=p:"ui"===o&&(t=h),(0,l.h)("li",null,t,": ",n)}function a(e){var t=e.name,o=e.url;return(0,l.h)("a",{href:o,target:"_blank",rel:"noopener noreferrer"}," ",t)}function i(e){var t=e.version,o=e.isLatest,s=n(e,["version","isLatest"]);return(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},t),(0,l.h)("ul",null,s.children),o?(0,l.h)("div",{class:"mt-2"},u,m,(0,l.h)("p",null,"Web Maker now has more than 50K weekly active users! Thank you for being a part of this community of awesome developers. If you find Web Maker helpful,"," ",f,"\xA0",g,"\xA0",(0,l.h)(d.Button,{"aria-label":"Support the developer",onClick:s.onSupportBtnClick,"data-event-action":"supportDeveloperChangelogBtnClick","data-event-category":"ui",class:"btn btn-icon"},"Support the developer"))):null)}t.__esModule=!0;var r=Object.assign||function(e){for(var t,o=1;o",(0,l.h)("a",{href:"https://webmakerapp.com/app/",target:"_blank",rel:"noopener noreferrer"},"https://webmakerapp.com/app/"),"."),(0,l.h)("li",null,"Now use Web Maker web app on any modern browser (tested with Chrome and Firefox)."),(0,l.h)("li",null,(0,l.h)("strong",null,"User Accounts")," - The much requested user accounts are here. Now maintain your account and store all your creations in the cloud and access them anywhere anytime."),(0,l.h)("li",null,(0,l.h)("strong",null,"New layout mode")," - One more layout mode, that lets you align all the panes vertically."),(0,l.h)("li",null,(0,l.h)("strong",null,"No more restriction on scripts (Web app only)")," - If you are using the web app, there is no more a restriction to load scripts from only specific domains. Load any script!"),(0,l.h)("li",null,(0,l.h)("strong",null,"Inline scripts (Web app only)")," - The restriction of writing JavaScript only in JS pane is also removed."))),z=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.9.7"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("a",{href:"https://tailwindcss.com/",target:"_blank",rel:"noopener noreferrer"},"Tailwind CSS")," ","added to popular CSS libraries list. Thanks"," ",(0,l.h)(a,{url:"https://github.com/diomed",name:"diomed"}),"."),(0,l.h)("li",null,"Popular libraries list updated. Thanks"," ",(0,l.h)(a,{url:"https://github.com/diomed",name:"diomed"}),"."),(0,l.h)("li",null,(0,l.h)("strong",null,"Dev"),": Bug fixes and code refactoring to make things simple."," ",(0,l.h)(a,{url:"https://github.com/iamandrewluca",name:"iamandrewluca"})," ","."))),N=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.9.6"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix"),": Fix close buttons not working in notifications and keyboard shortcuts modal."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix"),": Fix keyboard shortcut to see keyboard shortcuts :) Thanks",(0,l.h)("a",{href:"https://github.com/ClassicOldSong",target:"_blank",rel:"noopener noreferrer"},"ClassicOldSong"),"."))),W=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.9.5"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("a",{href:"https://medium.com/web-maker/release-2-9-5-add-library-search-pane-collapsing-ux-improvements-more-1085216c1301",target:"_blank",rel:"noopener noreferrer"},"Read blog post about this release.")),(0,l.h)("li",null,(0,l.h)("strong",null,"Keyboard shortcuts panel"),": Add a list of all keyboard shotcuts. Access with",(0,l.h)("code",null," Ctrl/\u2318 + Shift + ?")," or click keyboard button in footer."),(0,l.h)("li",null,(0,l.h)("strong",null,"Add external library"),": Better UX for searching third party libraries."),(0,l.h)("li",null,(0,l.h)("strong",null,"Improvement"),": Code panes now go fullscreen when double-clicked on their headers - which is much more intuitive behavior based on feedback from lot of developers."),(0,l.h)("li",null,(0,l.h)("strong",null,"Improvement"),": Add",(0,l.h)("code",null,"allowfullscreen")," attribute on iframes. Thanks",(0,l.h)("a",{href:"https://github.com/ClassicOldSong",target:"_blank",rel:"noopener noreferrer"},"ClassicOldSong"),"."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Stop screenlog.js from showing up in the exported HTML."),(0,l.h)("li",null,"Popular external libraries list updated. Thanks",(0,l.h)("a",{href:"https://github.com/jlapitan",target:"_blank",rel:"noopener noreferrer"},"jlapitan"),"."))),U=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.9.4"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"Improvement"),": Atomic CSS (Atomizer) has been updated to latest version. Now you can do things like psuedo elements. Learn More."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Logging circular objects is now possible. It won't show in the Web Maker console, but will show fine in browser's console."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Console's z-index issue has been fixed."))),R=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.9.3"),(0,l.h)("ul",null,(0,l.h)("li",null,"Choose the save location while exporting your saved creations. Now easily sync them to your Dropbox or any cloud storage."),(0,l.h)("li",null,"All modals inside the app now have a close button."),(0,l.h)("li",null,"Checkbox that showed on clicking a boolean value is now removed. Thanks",(0,l.h)("a",{href:"https://github.com/gauravmuk",target:"_blank",rel:"noopener noreferrer"},"Gaurav Nanda"),"."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Screenshots on retina device are now correct. Thanks",(0,l.h)("a",{href:"https://github.com/AshBardhan",target:"_blank",rel:"noopener noreferrer"},"Ashish Bardhan"),"."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Double console log in detached mode fixed."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Console.clear now works in detached mode too."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - DOCTYPE added in preview."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Typo correction in README. Thanks",(0,l.h)("a",{href:"https://github.com/AdilMah",target:"_blank",rel:"noopener noreferrer"},"Adil Mahmood"),"."),(0,l.h)("li",null,"gstatic.com is available to load external JavaScripts from."),(0,l.h)("li",null,"Popular libraries list updated. Thanks",(0,l.h)("a",{href:"https://github.com/diomed",target:"_blank",rel:"noopener noreferrer"},"diomed"),"."),(0,l.h)("li",null,"Added",(0,l.h)("a",{href:"https://github.com/chinchang/web-maker/blob/master/CONTRIBUTING.md",target:"_blank",rel:"noopener noreferrer"},"contribution guidelines")," ","in the Github repository."))),K=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.9.2"),(0,l.h)("ul",null,(0,l.h)("li",null,"Minor bug fixes."))),J=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.9.1"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("a",{href:"https://medium.com/web-maker/v2-9-lots-of-goodies-bd1e939571f6",target:"_blank",rel:"noopener noreferrer"},"Read blog post about last release.")),(0,l.h)("li",null,"Use Ctrl/Cmd+D to select next occurence of matching selection."),(0,l.h)("li",null,"Improve onboard experience."))),q=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.9.0"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("a",{href:"https://medium.com/web-maker/v2-9-lots-of-goodies-bd1e939571f6",target:"_blank",rel:"noopener noreferrer"},"Read blog post about this release.")),(0,l.h)("li",null,(0,l.h)("strong",null,"Detached Preview")," - Yes, you read that correct! You can now detach your preview and send it to your secondary monitor."),(0,l.h)("li",null,(0,l.h)("strong",null,"Find & Replace")," - Long awaited, now its there. Ctrl/Cmd+f to find and add Alt to replace."),(0,l.h)("li",null,(0,l.h)("strong",null,"Atomic CSS (Atomizer) configurations")," - Add custom config for Atomic CSS.",(0,l.h)("a",{href:"https://github.com/acss-io/atomizer#api",target:"_blank",rel:"noopener noreferrer"},"Read more"),"."),(0,l.h)("li",null,(0,l.h)("strong",null,"Light mode")," - This new setting makes Web Maker drop some heavy effects like blur etc to gain more performance. Thanks",(0,l.h)("a",{href:"https://github.com/iamandrewluca",target:"_blank",rel:"noopener noreferrer"},"Andrew"),"."),(0,l.h)("li",null,(0,l.h)("strong",null,"Preserve logs setting")," - Choose whether or not to preserve logs across preview refreshes. Thanks",(0,l.h)("a",{href:"https://github.com/BasitAli",target:"_blank",rel:"noopener noreferrer"},"Basit"),"."),(0,l.h)("li",null,(0,l.h)("strong",null,"Line wrap setting")," - As the name says."),(0,l.h)("li",null,"Semantic UI added to popular libraries."),(0,l.h)("li",null,"Bootstrap, Vue, UI-Kit and more updated to latest versions in popular libraries."),(0,l.h)("li",null,"UX improvements in settings UI"),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Trigger preview refresh anytime with Ctrl/\u2318 + Shift + 5. Even with auto-preview on."))),G=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.8.1"),(0,l.h)("ul",null,(0,l.h)("li",null,"Vue.js & UIKit version updated to latest version in 'Add Library' list."),(0,l.h)("li",null,"UTF-8 charset added to preview HTML to support universal characters."))),Z=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.8.0"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("a",{href:"https://medium.com/web-maker/release-v2-8-is-out-f44e6ea5d9c4",target:"_blank",rel:"noopener noreferrer"},"Read blog post about this release.")),(0,l.h)("li",null,(0,l.h)("strong",null,"Auto Save")," - Your creations now auto-save after your first manual save. This is configurable from settings."),(0,l.h)("li",null,(0,l.h)("strong",null,"Base2Tone-Meadow Editor Theme")," - First user contributed theme. Thanks to Diomed."),(0,l.h)("li",null,(0,l.h)("strong",null,"Use System Fonts")," - You can now use any of your existing system fonts in the editor!"),(0,l.h)("li",null,(0,l.h)("strong",null,"Matching Tag Highlight")," - Cursor over any HTML tag would highlight the matching pair tag."),(0,l.h)("li",null,"Auto-completion suggestion can now be switched off from settings."),(0,l.h)("li",null,(0,l.h)("strong",null,"Improvement")," - Stop white flicker in editor when the app opens."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Add Babel Polyfill to enable use of next-gen built-ins like Promise or WeakMap."),(0,l.h)("li",null,"Vue.js version updated to 2.4.0 in popular library list."),(0,l.h)("li",null,"Downloads permission is optional. Asked only when you take screenshot."))),Y=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.7.2"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"External Libraries")," - Add Foundation.js and update UIKit 3 to latest beta."),(0,l.h)("li",null,(0,l.h)("strong",null,"rawgit.com")," &",(0,l.h)("strong",null,"wzrd.in")," domains are now allowed for loading external libraries from."),(0,l.h)("li",null,"Minor booting speed improvements"))),Q=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.7.1"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"Framer.js support")," - You can now load the latest framer.js library from",(0,l.h)("a",{href:"https://builds.framerjs.com/",target:"_blank",rel:"noopener noreferrer"},"framer builds page")," ","and start coding framer prototypes."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix"),": Edit on CodePen is back in action."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix"),": Autocompletion menu doesn't show on cut and paste now."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix"),": Updated & fixed urls of some common external libraries to latest versions. UIKit3 & Bootstrap 4\u03B1 are now in the list."),(0,l.h)("li",null,"Preprocessor selector are now more accessible."))),X=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.7.0"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"Fork any creation!"),": Now you can fork any existing creation of yours to start a new work based on it. One big use case of this feature is \"Templates\"!",(0,l.h)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://kushagragour.in/blog/2017/05/web-maker-fork-templates/?utm_source=webmakerapp&utm_medium=referral"},"Read more about it"),"."),(0,l.h)("li",null,(0,l.h)("strong",null,"Fonts \uD83D\uDE0D "),": Super-awesome 4 fonts (mostly with ligature support) now available to choose from. Fira Code is the default font now."),(0,l.h)("li",null,"Updated most used external libraries to latest versions."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix"),": Add missing Bootstrap JS file to most used external libraries list."),(0,l.h)("li",null,"Several other minor bugfixes and improvements to make Web Maker awesome!"),(0,l.h)("li",null,"Great news to share with you - Web Maker has been featured on the Chrome Webstore homepage! Thanks for all the love :)"))),ee=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.6.1"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix"),": Emojis vanishing while exporting to Codepen has been fixed."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix"),":",(0,l.h)("code",null,"console.clear()")," now doesn't error and clears the inbuilt console."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix"),": External libraries added to the creation are exported as well to Codepen."))),te=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.6.0"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"The \"Console\""),": The most awaited feature is here! There is now an inbuilt console to see your logs, errors and for quickly evaluating JavaScript code inside your preview. Enjoy! I also a",(0,l.h)("a",{href:"https://kushagragour.in/blog/2017/05/web-maker-console-is-here/?utm_source=webmakerapp&utm_medium=referral",target:"_blank",rel:"noopener noreferrer"},"blog post about it"),"."),(0,l.h)("li",null,"Number slider which popped on clicking any number in the code has been removed due to poor user experience."),(0,l.h)("li",null,"Minor usability improvements."))),oe=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.5.0"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"Atomic CSS"),": Use can now use Atomic CSS(ACSS) in your work!",(0,l.h)("a",{href:"https://acss.io/",target:"_blank",rel:"noopener noreferrer"},"Read more about it here"),"."),(0,l.h)("li",null,(0,l.h)("strong",null,"Search your saved creations"),": Easily search through all your saved creations by title."),(0,l.h)("li",null,(0,l.h)("strong",null,"Configurable Auto-preview")," - You can turn off the auto preview in settings if you don't want the preview to update as you type."),(0,l.h)("li",null,(0,l.h)("strong",null,"Configurable refresh on resize")," - You can configure whether you want the preview to refresh when you resize the preview panel."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Fix indentation",(0,l.h)("a",{href:"https://github.com/chinchang/web-maker/issues/104",target:"_blank",rel:"noopener noreferrer"},"issue")," ","with custom indentation size."))),ne=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.4.2"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"Improved infinite loop protection"),": Infinite loop protection is now faster and more reliable. And works without the need of Escodegen. Thanks to Ariya Hidayat!"),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Default parameters not working in JavaScript is fixed."))),se=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.4.0"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"Import/Export"),": Your creations are most important. Now export all your creations into a single file as a backup that can be imported anytime & anywhere."),(0,l.h)("li",null,(0,l.h)("strong",null,"Editor themes"),": You have been heard. Now you can choose from a huge list of wonderful editor themes!"),(0,l.h)("li",null,(0,l.h)("strong",null,"Identation settings"),": Not a spaces fan? Switch to tabs and set your indentation size."),(0,l.h)("li",null,(0,l.h)("strong",null,"Vim key bindings"),": Rejoice Vim lovers!"),(0,l.h)("li",null,(0,l.h)("strong",null,"Code blast"),": Why don't you try coding with this switched on from the settings? Go on..."),(0,l.h)("li",null,(0,l.h)("strong",null,"Important"),": Due to security policy changes from Chrome 57 onwards, Web Maker now allows loading external JavaScript libraries only from certain whitelisted domains (localhost, https://ajax.googleapis.com, https://code.jquery.com, https://cdnjs.cloudflare.com, https://unpkg.com, https://maxcdn.com, https://cdn77.com, https://maxcdn.bootstrapcdn.com, https://cdn.jsdelivr.net/)"),(0,l.h)("li",null,"Save button now highlights when you have unsaved changes."),(0,l.h)("li",null,"Jade is now called Pug. Just a name change."))),ae=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.3.2"),(0,l.h)("ul",null,(0,l.h)("li",null,"Update Babel to support latest and coolest ES6 features."),(0,l.h)("li",null,"Improve onboarding experience at first install."))),ie=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.3.1"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Splitting of code and preview panes is remembered by the editor."),(0,l.h)("li",null,"Title of the creation is used for the file name when saving as HTML."))),re=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.3.0"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"Add Library Autocompletion")," - Just start typing the name of library and you'll be shown matching libraries from cdnjs."),(0,l.h)("li",null,(0,l.h)("strong",null,"Preview Screenshot Capture")," - Want to grab a nice screenshot of your creation. You have it! Click and capture."),(0,l.h)("li",null,(0,l.h)("strong",null,"Auto Indent Code")," - Select your code and hit Shift-Tab to auto-indent it!"),(0,l.h)("li",null,(0,l.h)("strong",null,"Keyboard Navigation in Saved List")," - Now select your creation using arrow keys and hit ENTER to open it."),(0,l.h)("li",null,"Highlight active line in code panes."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Fix in generated title of new creation."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - HTML autocompletion is manual triggered now with Ctrl+Space."))),le=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.2.0"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"Code Autocompletion")," - See code suggestions while you type!"),(0,l.h)("li",null,(0,l.h)("strong",null,"Full Screen Preview")," - Checkout your creation in a full-screen layout."),(0,l.h)("li",null,(0,l.h)("strong",null,"SASS")," - SASS support added for CSS."),(0,l.h)("li",null,(0,l.h)("strong",null,"Faster CSS update")," - Preview updates instantly without refresh when just CSS is changed."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Indentation fixed while going on new line."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Works even in Chrome Canary now. Though libraries can be added only through CDNs."))),de=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.1.0"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"TypeScript")," - Now you can code in TypeScript too!"),(0,l.h)("li",null,(0,l.h)("strong",null,"Stylus Preprocessor")," - Stylus supported adding for CSS."),(0,l.h)("li",null,(0,l.h)("strong",null,"Code Folding")," - Collapse large code blocks for easy editing."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Support JSX in JavaScript."),(0,l.h)("li",null,"Better onboarding for first time users."))),ce=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.0.0"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"Save and Load")," - Long pending and super-useful, now you can save your creations and resume them anytime later."),(0,l.h)("li",null,(0,l.h)("strong",null,"Insert JS & CSS")," - Load popular JavaScript & CSS libraries in your work without writing any code."),(0,l.h)("li",null,(0,l.h)("strong",null,"Collapsed Panes")," - Collapse/uncollapse code panes with a single click. Your pane configuration is even saved with every creation!"),(0,l.h)("li",null,(0,l.h)("strong",null,"Quick color & number change")," - Click on any color or number and experiment with quick values using a slider."),(0,l.h)("li",null,(0,l.h)("strong",null,"Linting")," - See your code errors right where you are coding."),(0,l.h)("li",null,"No more browser hang due to infinite loops!"))),pe=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"1.7.0"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"Preprocessors!")," - Enjoy a whole list of preprocessors for HTML(Jade & markdown), CSS(SCSS & LESS) and JavaScript(CoffeeScript & Babel)."),(0,l.h)("li",null,"More awesome font for code."))),he=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"1.6.0"),(0,l.h)("ul",null,(0,l.h)("li",null,"You can now configure Web-Maker to not replace new tab page from the settings. It is always accessible from the icon in the top-right."),(0,l.h)("li",null,"Download current code as HTML file with Ctrl/\u2318 + S keyboard shortcut."),(0,l.h)("li",null,"New notifications panel added so you are always aware of the new changes in Web-Maker.")))},1:function(){},"18yn":function(e,t,o){"use strict";t.__esModule=!0,t.Profile=function(e){var t=e.user,o=e.logoutBtnHandler;return(0,n.h)("div",{class:"tac"},(0,n.h)("img",{height:"80",class:"profile-modal__avatar-img",src:t?t.photoURL||s:"",id:"profileAvatarImg",alt:"Profile image"}),(0,n.h)("h3",{id:"profileUserName",class:"mb-2"},t&&t.displayName?t.displayName:"Anonymous Creator"),(0,n.h)("p",null,(0,n.h)("button",{class:"btn","aria-label":"Logout from your account",onClick:o},"Logout")))};var n=o("KM04"),s="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='#ccc' d='M12,19.2C9.5,19.2 7.29,17.92 6,16C6.03,14 10,12.9 12,12.9C14,12.9 17.97,14 18,16C16.71,17.92 14.5,19.2 12,19.2M12,5A3,3 0 0,1 15,8A3,3 0 0,1 12,11A3,3 0 0,1 9,8A3,3 0 0,1 12,5M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z' /%3E%3C/svg%3E"},"1IZv":function(e,t,o){"use strict";t.__esModule=!0,t.KeyboardShortcutsModal=function(e){var t=e.show,o=e.closeHandler;return(0,n.h)(a.default,{show:t,closeHandler:o},i,r)};var n=o("KM04"),s=o("inAt"),a=function(e){return e&&e.__esModule?e:{default:e}}(s),i=(0,n.h)("h1",null,"Keyboard Shortcuts"),r=(0,n.h)("div",{class:"flex"},(0,n.h)("div",null,(0,n.h)("h2",null,"Global"),(0,n.h)("p",null,(0,n.h)("span",{class:"kbd-shortcut__keys"},"Ctrl/\u2318 + Shift + ?"),(0,n.h)("span",{class:"kbd-shortcut__details"},"See keyboard shortcuts")),(0,n.h)("p",null,(0,n.h)("span",{class:"kbd-shortcut__keys"},"Ctrl/\u2318 + Shift + 5"),(0,n.h)("span",{class:"kbd-shortcut__details"},"Refresh preview")),(0,n.h)("p",null,(0,n.h)("span",{class:"kbd-shortcut__keys"},"Ctrl/\u2318 + S"),(0,n.h)("span",{class:"kbd-shortcut__details"},"Save current creations")),(0,n.h)("p",null,(0,n.h)("span",{class:"kbd-shortcut__keys"},"Ctrl/\u2318 + O"),(0,n.h)("span",{class:"kbd-shortcut__details"},"Open list of saved creations")),(0,n.h)("p",null,(0,n.h)("span",{class:"kbd-shortcut__keys"},"Ctrl + L"),(0,n.h)("span",{class:"kbd-shortcut__details"},"Clear console (works when console input is focused)")),(0,n.h)("p",null,(0,n.h)("span",{class:"kbd-shortcut__keys"},"Esc"),(0,n.h)("span",{class:"kbd-shortcut__details"},"Close saved creations panel & modals"))),(0,n.h)("div",{class:"ml-2"},(0,n.h)("h2",null,"Editor"),(0,n.h)("p",null,(0,n.h)("span",{class:"kbd-shortcut__keys"},"Ctrl/\u2318 + F"),(0,n.h)("span",{class:"kbd-shortcut__details"},"Find")),(0,n.h)("p",null,(0,n.h)("span",{class:"kbd-shortcut__keys"},"Ctrl/\u2318 + G"),(0,n.h)("span",{class:"kbd-shortcut__details"},"Select next match")),(0,n.h)("p",null,(0,n.h)("span",{class:"kbd-shortcut__keys"},"Ctrl/\u2318 + Shift + G"),(0,n.h)("span",{class:"kbd-shortcut__details"},"Select previous match")),(0,n.h)("p",null,(0,n.h)("span",{class:"kbd-shortcut__keys"},"Ctrl/\u2318 + Opt/Alt + F"),(0,n.h)("span",{class:"kbd-shortcut__details"},"Find & replace")),(0,n.h)("p",null,(0,n.h)("span",{class:"kbd-shortcut__keys"},"Shift + Tab"),(0,n.h)("span",{class:"kbd-shortcut__details"},"Realign code")),(0,n.h)("p",null,(0,n.h)("span",{class:"kbd-shortcut__keys"},"Ctrl/\u2318 + ]"),(0,n.h)("span",{class:"kbd-shortcut__details"},"Indent code right")),(0,n.h)("p",null,(0,n.h)("span",{class:"kbd-shortcut__keys"},"Ctrl/\u2318 + ["),(0,n.h)("span",{class:"kbd-shortcut__details"},"Indent code left")),(0,n.h)("p",null,(0,n.h)("span",{class:"kbd-shortcut__keys"},"Tab"),(0,n.h)("span",{class:"kbd-shortcut__details"},"Emmet code completion"," ",(0,n.h)("a",{href:"https://emmet.io/",target:"_blank",rel:"noopener noreferrer"},"Read more"))),(0,n.h)("p",null,(0,n.h)("span",{class:"kbd-shortcut__keys"},"Ctrl/\u2318 + /"),(0,n.h)("span",{class:"kbd-shortcut__details"},"Single line comment"))))},"3Z4F":function(e,t){"use strict";t.__esModule=!0;var o=Object.assign||function(e){for(var t,o=1;o":"")},""),i=n.externalLibs.css.split("\n").reduce(function(e,t){return e+(t?"\n":"")},""));var r="\n\n\n\n"+i+"\n\n\n\n"+e+"\n"+a+"\n";if(s||(r+=""),n.jsMode===d.JsModes.ES6&&(r+=""),"string"==typeof o)r+="\n\n",r}t.__esModule=!0,t.BASE_PATH=void 0,t.semverCompare=function(e,t){for(var o=e.split("."),n=t.split("."),s=0;3>s;s++){var a=+o[s],i=+n[s];if(a>i)return 1;if(i>a)return-1;if(!isNaN(a)&&isNaN(i))return 1;if(isNaN(a)&&!isNaN(i))return-1}return 0},t.generateRandomId=function(e){for(var t="",o=e||10;o--;)t+=u[~~(Math.random()*u.length)];return t},t.onButtonClick=function(e,t){e.addEventListener("click",function(o){return t(o),!1})},t.log=n,t.addInfiniteLoopProtection=function(e,t){var o=t.timeout,n=1,s=[],a="_wmloopvar";return p.parse(e,{tolerant:!0,range:!0,jsx:!0},function(e){switch(e.type){case"DoWhileStatement":case"ForStatement":case"ForInStatement":case"ForOfStatement":case"WhileStatement":var t=1+e.body.range[0],i=e.body.range[1],r=("\nif (Date.now() - %d > "+o+") { window.top.previewException(new Error(\"Infinite loop\")); break;}\n").replace("%d",a+n),l="";"BlockStatement"!==e.body.type&&(r="{"+r,l="}",--t),s.push({pos:t,str:r}),s.push({pos:i,str:l}),s.push({pos:e.range[0],str:"var %d = Date.now();\n".replace("%d",a+n)}),++n;break;default:}}),s.sort(function(e,t){return t.pos-e.pos}).forEach(function(t){e=e.slice(0,t.pos)+t.str+e.slice(t.pos)}),e},t.getHumanDate=function(e){var t=new Date(e),o=t.getDate()+" "+["January","February","March","April","May","June","July","August","September","October","November","December"][t.getMonth()]+" "+t.getFullYear();return o},t.once=function(e,t,o){e.addEventListener(t,function(n){return n.target.removeEventListener(t,arguments.callee),o(n)})},t.downloadFile=s,t.writeFile=a,t.loadJS=function(e){var t=(0,c.deferred)(),o=window.document.getElementsByTagName("script")[0],n=window.document.createElement("script");return n.src=e,n.async=!0,o.parentNode.insertBefore(n,o),n.onload=function(){t.resolve()},t.promise},t.getCompleteHtml=i,t.saveAsHtml=function(e){var t=(0,l.computeHtml)(e.html,e.htmlMode),o=(0,l.computeCss)(e.css,e.cssMode),n=(0,l.computeJs)(e.js,e.jsMode,!1);Promise.all([t,o,n]).then(function(t){var o=t[0].code,n=t[1].code,a=t[2].code,l=i(o,n,a,e,!0),c=new Date,d=["web-maker",c.getFullYear(),c.getMonth()+1,c.getDate(),c.getHours(),c.getMinutes(),c.getSeconds()].join("-");e.title&&(d=e.title),d+=".html";var p=new Blob([l],{type:"text/html;charset=UTF-8"});s(d,p),(0,r.trackEvent)("fn","saveFileComplete")})},t.handleDownloadsPermission=function(){var e=(0,c.deferred)();return window.IS_EXTENSION?(chrome.permissions.contains({permissions:["downloads"]},function(t){t?e.resolve():chrome.permissions.request({permissions:["downloads"]},function(t){t?((0,r.trackEvent)("fn","downloadsPermGiven"),e.resolve()):e.reject()})}),e.promise):(e.resolve(),e.promise)},t.getFilenameFromUrl=function(e){return e?e.match(/\/([^/]*)$/)[1]:""};var r=o("qV3Q"),l=o("E5zE"),d=o("y5h4"),c=o("3Z4F"),p=o("4E2n");window.DEBUG=-1n?e.classList.add("is-minimized"):e.classList.remove("is-minimized"),-1===e.style[o].indexOf("100% - "+2*S+"px")?e.classList.remove("is-maximized"):e.classList.add("is-maximized")})},50)},t.prototype.toggleCodeWrapCollapse=function(e){if(e.classList.contains("is-minimized")||e.classList.contains("is-maximized"))e.classList.remove("is-minimized"),e.classList.remove("is-maximized"),this.codeSplitInstance.setSizes([33.3,33.3,33.3]);else{var t=parseInt(e.dataset.codeWrapId,10),o=[S+"px",S+"px",S+"px"];o[t]="calc(100% - "+2*S+"px)",this.codeSplitInstance.setSizes(o),e.classList.add("is-maximized")}this.updateSplits()},t.prototype.collapseBtnHandler=function(t){var e=t.currentTarget.parentElement.parentElement.parentElement;this.toggleCodeWrapCollapse(e),(0,m.trackEvent)("ui","paneCollapseBtnClick",e.dataset.type)},t.prototype.codeWrapHeaderDblClickHandler=function(t){if(t.target.classList.contains("js-code-wrap__header")){var e=t.target.parentElement;this.toggleCodeWrapCollapse(e),(0,m.trackEvent)("ui","paneHeaderDblClick",e.dataset.type)}},t.prototype.resetSplitting=function(){this.setState({codeSplitSizes:this.getCodeSplitSizes(),mainSplitSizes:this.getMainSplitSizesToApply()})},t.prototype.updateSplits=function(){this.props.onSplitUpdate(),this.state.codeSplitSizes=this.props.currentItem.sizes,this.state.mainSplitSizes=this.props.currentItem.mainSizes},t.prototype.getMainSplitSizesToApply=function(){var e,t=this.props,o=t.currentItem,n=t.currentLayoutMode;return e=o&&o.mainSizes?3===n?[o.mainSizes[1],o.mainSizes[0]]:o.mainSizes:5===n?[75,25]:[50,50],e},t.prototype.getCodeSplitSizes=function(){return this.props.currentItem&&this.props.currentItem.sizes?this.props.currentItem.sizes:[33.33,33.33,33.33]},t.prototype.mainSplitDragEndHandler=function(){var e=this;this.props.prefs.refreshOnResize&&setTimeout(function(){e.setPreviewContent(!0)},1),this.updateSplits()},t.prototype.codeSplitDragStart=function(){document.body.classList.add("is-dragging")},t.prototype.codeSplitDragEnd=function(){this.updateCodeWrapCollapseStates(),document.body.classList.remove("is-dragging"),this.updateSplits()},t.prototype.handleModeRequirements=function(e){function t(){p.modes[e].hasLoaded=!0,n.resolve()}var o="lib/transpilers",n=(0,v.deferred)();return p.modes[e].hasLoaded?(n.resolve(),n.promise):(e===p.HtmlModes.JADE?(0,h.loadJS)(o+"/jade.js").then(t):e===p.HtmlModes.MARKDOWN?(0,h.loadJS)(o+"/marked.js").then(t):e===p.CssModes.LESS?(0,h.loadJS)(o+"/less.min.js").then(t):e===p.CssModes.SCSS||e===p.CssModes.SASS?(0,h.loadJS)(o+"/sass.js").then(function(){window.sass=new Sass(o+"/sass.worker.js"),t()}):e===p.CssModes.STYLUS?(0,h.loadJS)(o+"/stylus.min.js").then(t):e===p.CssModes.ACSS?(0,h.loadJS)(o+"/atomizer.browser.js").then(t):e===p.JsModes.COFFEESCRIPT?(0,h.loadJS)(o+"/coffee-script.js").then(t):e===p.JsModes.ES6?(0,h.loadJS)(o+"/babel.min.js").then(t):e===p.JsModes.TS?(0,h.loadJS)(o+"/typescript.js").then(t):n.resolve(),n.promise)},t.prototype.updateHtmlMode=function(e){return this.props.onCodeModeChange("html",e),this.props.currentItem.htmlMode=e,this.cm.html.setOption("mode",p.modes[e].cmMode),g.default.autoLoadMode(this.cm.html,p.modes[e].cmPath||p.modes[e].cmMode),this.handleModeRequirements(e)},t.prototype.updateCssMode=function(e){return this.props.onCodeModeChange("css",e),this.props.currentItem.cssMode=e,this.cm.css.setOption("mode",p.modes[e].cmMode),this.cm.css.setOption("readOnly",p.modes[e].cmDisable),window.cssSettingsBtn.classList[p.modes[e].hasSettings?"remove":"add"]("hide"),g.default.autoLoadMode(this.cm.css,p.modes[e].cmPath||p.modes[e].cmMode),this.handleModeRequirements(e)},t.prototype.updateJsMode=function(e){return this.props.onCodeModeChange("js",e),this.props.currentItem.jsMode=e,this.cm.js.setOption("mode",p.modes[e].cmMode),g.default.autoLoadMode(this.cm.js,p.modes[e].cmPath||p.modes[e].cmMode),this.handleModeRequirements(e)},t.prototype.codeModeChangeHandler=function(t){var e=this,o=t.target.value,n=t.target.dataset.type,s=this.props.currentItem["html"===n?"htmlMode":"css"===n?"cssMode":"jsMode"];s!==o&&("html"===n?this.updateHtmlMode(o).then(function(){return e.setPreviewContent(!0)}):"js"===n?this.updateJsMode(o).then(function(){return e.setPreviewContent(!0)}):"css"===n&&this.updateCssMode(o).then(function(){return e.setPreviewContent(!0)}),(0,m.trackEvent)("ui","updateCodeMode",o))},t.prototype.detachPreview=function(){var e=this;if(this.detachedWindow)return void this.detachedWindow.focus();var t=this.frame.getBoundingClientRect(),o=t.width,n=t.height;document.body.classList.add("is-detached-mode"),window.globalConsoleContainerEl.insertBefore(window.consoleEl,null),this.detachedWindow=window.open("./preview.html","Web Maker","width="+o+",height="+n+",resizable,scrollbars=yes,status=1"),setTimeout(function(){e.setPreviewContent(!0)},1500);var s=window.setInterval(function(){e.detachedWindow&&e.detachedWindow.closed&&(clearInterval(s),document.body.classList.remove("is-detached-mode"),$("#js-demo-side").insertBefore(window.consoleEl,null),e.detachedWindow=null,e.setPreviewContent(!0))},500)},t.prototype.onMessageFromConsole=function(){var e=this;[].concat(Array.prototype.slice.call(arguments)).forEach(function(t){t&&t.indexOf&&-1!==t.indexOf("filesystem:chrome-extension")&&(t=t.replace(/filesystem:chrome-extension.*\.js:(\d+):*(\d*)/g,"script $1:$2"));try{e.consoleCm.replaceRange(t+" "+((t+"").match(/\[object \w+]/)?JSON.stringify(t):"")+"\n",{line:Infinity})}catch(t){e.consoleCm.replaceRange("\uD83C\uDF00\n",{line:Infinity})}e.consoleCm.scrollTo(0,Infinity),e.logCount++}),logCountEl.textContent=this.logCount},t.prototype.previewException=function(e){console.error("Possible infinite loop detected.",e.stack),this.onMessageFromConsole("Possible infinite loop detected.",e.stack)},t.prototype.toggleConsole=function(){this.setState({isConsoleOpen:!this.state.isConsoleOpen}),(0,m.trackEvent)("ui","consoleToggle")},t.prototype.consoleHeaderDblClickHandler=function(t){t.target.classList.contains("js-console__header")&&((0,m.trackEvent)("ui","consoleToggleDblClick"),this.toggleConsole())},t.prototype.clearConsole=function(){this.consoleCm.setValue(""),this.logCount=0,window.logCountEl.textContent=this.logCount},t.prototype.clearConsoleBtnClickHandler=function(){this.clearConsole(),(0,m.trackEvent)("ui","consoleClearBtnClick")},t.prototype.evalConsoleExpr=function(t){(76===t.which||12===t.which)&&t.ctrlKey?(this.clearConsole(),(0,m.trackEvent)("ui","consoleClearKeyboardShortcut")):13===t.which&&(this.onMessageFromConsole("> "+t.target.value),this.frame.contentWindow._wmEvaluate(t.target.value),t.target.value="",(0,m.trackEvent)("fn","evalConsoleExpr"))},t.prototype.cssSettingsBtnClickHandler=function(){this.setState({isCssSettingsModalOpen:!0}),(0,m.trackEvent)("ui","cssSettingsBtnClick")},t.prototype.cssSettingsChangeHandler=function(e){this.props.onCodeSettingsChange("css",e),this.setPreviewContent(!0)},t.prototype.getDemoFrame=function(e){e(this.frame)},t.prototype.editorFocusHandler=function(e){this.props.onEditorFocus(e)},t.prototype.render=function(){var e=this;return(0,r.h)(u.SplitPane,{class:"content-wrap flex flex-grow",sizes:this.state.mainSplitSizes,minSize:150,style:"",direction:2===this.props.currentLayoutMode?"vertical":"horizontal",onDragEnd:this.mainSplitDragEndHandler.bind(this)},(0,r.h)(u.SplitPane,{class:"code-side",id:"js-code-side",sizes:this.state.codeSplitSizes,minSize:S,direction:2===this.props.currentLayoutMode||5===this.props.currentLayoutMode?"horizontal":"vertical",onDragStart:this.codeSplitDragStart.bind(this),onDragEnd:this.codeSplitDragEnd.bind(this),onSplit:function(t){return e.codeSplitInstance=t}},(0,r.h)("div",{"data-code-wrap-id":"0",id:"htmlCodeEl","data-type":"html",class:"code-wrap",onTransitionEnd:this.updateCodeWrapCollapseStates.bind(this)},(0,r.h)("div",{class:"js-code-wrap__header code-wrap__header",title:"Double click to toggle code pane",onDblClick:this.codeWrapHeaderDblClickHandler.bind(this)},(0,r.h)("label",{class:"btn-group",dropdow:!0,title:"Click to change"},(0,r.h)("span",{class:"code-wrap__header-label"},p.modes[this.props.currentItem.htmlMode||"html"].label),w,(0,r.h)("select",{"data-type":"html",class:"js-mode-select hidden-select",onChange:this.codeModeChangeHandler.bind(this),value:this.props.currentItem.htmlMode},M,_,x)),(0,r.h)("div",{class:"code-wrap__header-right-options"},(0,r.h)("a",{class:"js-code-collapse-btn code-wrap__header-btn code-wrap__collapse-btn",title:"Toggle code pane",onClick:this.collapseBtnHandler.bind(this)}))),(0,r.h)(d.default,{options:{mode:"htmlmixed",profile:"xhtml",gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],noAutocomplete:!0,matchTags:{bothTags:!0},emmet:!0},prefs:this.props.prefs,onChange:this.onHtmlCodeChange.bind(this),onCreation:function(t){return e.cm.html=t},onFocus:this.editorFocusHandler.bind(this)})),(0,r.h)("div",{"data-code-wrap-id":"1",id:"cssCodeEl","data-type":"css",class:"code-wrap",onTransitionEnd:this.updateCodeWrapCollapseStates.bind(this)},(0,r.h)("div",{class:"js-code-wrap__header code-wrap__header",title:"Double click to toggle code pane",onDblClick:this.codeWrapHeaderDblClickHandler.bind(this)},(0,r.h)("label",{class:"btn-group",title:"Click to change"},(0,r.h)("span",{class:"code-wrap__header-label"},p.modes[this.props.currentItem.cssMode||"css"].label),H,(0,r.h)("select",{"data-type":"css",class:"js-mode-select hidden-select",onChange:this.codeModeChangeHandler.bind(this),value:this.props.currentItem.cssMode},L,I,j,E,B,A)),(0,r.h)("div",{class:"code-wrap__header-right-options"},(0,r.h)("a",{href:"#",id:"cssSettingsBtn",title:"Atomic CSS configuration",onClick:this.cssSettingsBtnClickHandler.bind(this),class:"code-wrap__header-btn hide"},O),(0,r.h)("a",{class:"js-code-collapse-btn code-wrap__header-btn code-wrap__collapse-btn",title:"Toggle code pane",onClick:this.collapseBtnHandler.bind(this)}))),(0,r.h)(d.default,{options:{mode:"css",gutters:["error-gutter","CodeMirror-linenumbers","CodeMirror-foldgutter"],emmet:!0},prefs:this.props.prefs,onChange:this.onCssCodeChange.bind(this),onCreation:function(t){return e.cm.css=t},onFocus:this.editorFocusHandler.bind(this)})),(0,r.h)("div",{"data-code-wrap-id":"2",id:"jsCodeEl","data-type":"js",class:"code-wrap",onTransitionEnd:this.updateCodeWrapCollapseStates.bind(this)},(0,r.h)("div",{class:"js-code-wrap__header code-wrap__header",title:"Double click to toggle code pane",onDblClick:this.codeWrapHeaderDblClickHandler.bind(this)},(0,r.h)("label",{class:"btn-group",title:"Click to change"},(0,r.h)("span",{class:"code-wrap__header-label"},p.modes[this.props.currentItem.jsMode||"js"].label),T,(0,r.h)("select",{"data-type":"js",class:"js-mode-select hidden-select",onChange:this.codeModeChangeHandler.bind(this),value:this.props.currentItem.jsMode},P,D,V,F)),(0,r.h)("div",{class:"code-wrap__header-right-options"},(0,r.h)("a",{class:"js-code-collapse-btn code-wrap__header-btn code-wrap__collapse-btn",title:"Toggle code pane",onClick:this.collapseBtnHandler.bind(this)}))),(0,r.h)(d.default,{options:{mode:"javascript",gutters:["error-gutter","CodeMirror-linenumbers","CodeMirror-foldgutter"]},prefs:this.props.prefs,autoComplete:this.props.prefs.autoComplete,onChange:this.onJsCodeChange.bind(this),onCreation:function(t){return e.cm.js=t},onFocus:this.editorFocusHandler.bind(this)}))),(0,r.h)("div",{class:"demo-side",id:"js-demo-side",style:""},(0,r.h)("iframe",{ref:function(t){return e.frame=t},src:"about://blank",frameborder:"0",id:"demo-frame",allowfullscreen:!0}),(0,r.h)("div",{id:"consoleEl",class:"console "+(this.state.isConsoleOpen?"":"is-minimized")},(0,r.h)("div",{id:"consoleLogEl",class:"console__log"},(0,r.h)("div",{class:"js-console__header code-wrap__header",title:"Double click to toggle console",onDblClick:this.consoleHeaderDblClickHandler.bind(this)},z,(0,r.h)("div",{class:"code-wrap__header-right-options"},(0,r.h)("a",{class:"code-wrap__header-btn",title:"Clear console (CTRL + L)",onClick:this.clearConsoleBtnClickHandler.bind(this)},N),(0,r.h)("a",{class:"code-wrap__header-btn code-wrap__collapse-btn",title:"Toggle console",onClick:this.toggleConsole.bind(this)}))),(0,r.h)(y.default,{options:{mode:"javascript",lineWrapping:!0,theme:"monokai",foldGutter:!0,readOnly:!0,gutters:["CodeMirror-foldgutter"]},onCreation:function(t){return e.consoleCm=t}})),(0,r.h)("div",{id:"consolePromptEl",class:"console__prompt flex flex-v-center"},W,(0,r.h)("input",{tabIndex:this.state.isConsoleOpen?0:-1,onKeyUp:this.evalConsoleExpr.bind(this),class:"console-exec-input"}))),(0,r.h)(k.default,{show:this.state.isCssSettingsModalOpen,closeHandler:function(){return e.setState({isCssSettingsModalOpen:!1})},onChange:this.cssSettingsChangeHandler.bind(this),settings:this.props.currentItem.cssSettings,editorTheme:this.props.prefs.editorTheme})))},t}(r.Component);t.default=U},"9VU0":function(e,t,o){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0,t.LibraryAutoSuggest=void 0;var i=function(){function e(e,t){for(var o,n=0;n"+t[o].name+"";e.isShowingSuggestions=!0,e.textareaBounds||(e.textareaBounds=e.t.getBoundingClientRect(),e.list.style.top=e.textareaBounds.bottom+"px",e.list.style.left=e.textareaBounds.left+"px",e.list.style.width=e.textareaBounds.width+"px"),e.list.classList.add("is-open")})},500)}},t.prototype.onKeyDown=function(e){var t;this.isShowingSuggestions&&(27===e.keyCode&&(this.closeSuggestions(),e.stopPropagation()),40===e.keyCode&&this.isShowingSuggestions?(t=this.list.querySelector(".selected"),t?(t.classList.remove("selected"),t.nextElementSibling.classList.add("selected")):this.list.querySelector("li:first-child").classList.add("selected"),this.list.querySelector(".selected").scrollIntoView(!1),e.preventDefault()):38===e.keyCode&&this.isShowingSuggestions?(t=this.list.querySelector(".selected"),t?(t.classList.remove("selected"),t.previousElementSibling.classList.add("selected")):this.list.querySelector("li:first-child").classList.add("selected"),this.list.querySelector(".selected").scrollIntoView(!1),e.preventDefault()):13===e.keyCode&&this.isShowingSuggestions&&(t=this.list.querySelector(".selected"),this.selectSuggestion(t.dataset.url),this.closeSuggestions()))},t.prototype.onListMouseDown=function(e){var t=e.target;t.parentElement.dataset.url&&this.selectSuggestion(t.parentElement.dataset.url)},t.prototype.selectSuggestion=function(e){this.t.focus(),(0,l.trackEvent)("ui","autoSuggestionLibSelected",e),this.selectedCallback?this.selectedCallback.call(null,e):this.replaceCurrentLine(e),this.closeSuggestions()},t.prototype.render=function(){var e=this;return(0,r.h)("div",{class:"btn-group "+(this.props.fullWidth?"flex-grow":""),ref:function(t){return e.wrap=t}},this.props.children,(0,r.h)("ul",{ref:function(t){return e.list=t},class:"dropdown__menu autocomplete-dropdown"}),(0,r.h)("div",{ref:function(t){return e.loader=t},class:"loader autocomplete__loader",style:"display:none"}))},i(t,[{key:"currentLineNumber",get:function(){return this.t.value.substr(0,this.t.selectionStart).split("\n").length}},{key:"currentLine",get:function(){var e=this.currentLineNumber;return this.t.value.split("\n")[e-1]}}]),t}(r.Component)},BcU7:function(e,t,o){"use strict";function n(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,o){function n(s,a){try{var i=t[s](a),r=i.value}catch(e){return void o(e)}return i.done?void e(r):Promise.resolve(r).then(function(e){n("next",e)},function(e){n("throw",e)})}return n("next")})}}var s=Object.assign||function(e){for(var t,o=1;o+l&&(a=Math.floor((r-l)/1e3/3600/24)),i.setState({daysLeft:a}),i}return a(t,e),t.prototype.render=function(){var e=this.props.codeSize?(this.props.codeSize/1024).toFixed(2):0;return(0,i.h)("div",{role:"button",class:"flex flex-v-center",tabIndex:"0",onClick:this.props.onClick,onBlur:this.props.onBlur},l," ",(0,i.h)("div",{class:"footer__js13k-days-left"},this.state.daysLeft," days to go"),(0,i.h)("div",{class:"footer__js13k-code-size",style:{color:10Hello, World!\"}"})),se=(0,d.h)(S.default,null),ae=(0,d.h)(G.Icons,null),ie=(0,d.h)("form",{style:"display:none;",action:"https://codepen.io/pen/define",method:"POST",target:"_blank",id:"codepenForm"},(0,d.h)("input",{type:"hidden",name:"data",value:"{\"title\": \"New Pen!\", \"html\": \"
Hello, World!
\"}"})),re=function(e){function t(){a(this,t);var o=i(this,e.call(this));return o.AUTO_SAVE_INTERVAL=15000,o.modalDefaultStates={isModalOpen:!1,isAddLibraryModalOpen:!1,isSettingsModalOpen:!1,isHelpModalOpen:!1,isNotificationsModalOpen:!1,isLoginModalOpen:!1,isProfileModalOpen:!1,isSupportDeveloperModalOpen:!1,isKeyboardShortcutsModalOpen:!1,isAskToImportModalOpen:!1,isOnboardModalOpen:!1,isJs13KModalOpen:!1,isCreateNewModalOpen:!1},o.state=l({isSavedItemPaneOpen:!1},o.modalDefaultStates,{prefs:{},currentItem:{title:"",externalLibs:{js:"",css:""}}}),o.defaultSettings={preserveLastCode:!0,replaceNewTab:!1,htmlMode:"html",jsMode:"js",cssMode:"css",isCodeBlastOn:!1,indentWith:"spaces",indentSize:2,editorTheme:"monokai",keymap:"sublime",fontSize:16,refreshOnResize:!1,autoPreview:!0,editorFont:"FiraCode",editorCustomFont:"",autoSave:!0,autoComplete:!0,preserveConsoleLogs:!0,lightVersion:!1,lineWrap:!0,infiniteLoopTimeout:1e3,layoutMode:2,isJs13kModeOn:!1},o.prefs={},O.default.auth().onAuthStateChanged(function(e){o.setState({isLoginModalOpen:!1}),e?((0,M.log)("You are -> ",e),B.alertsService.add("You are now logged in!"),o.setState({user:e}),window.user=e,!window.localStorage[Q.ASKED_TO_IMPORT_CREATIONS]&&o.fetchItems(!1,!0).then(function(e){e.length&&(o.oldSavedItems=e,o.oldSavedCreationsCount=e.length,o.setState({isAskToImportModalOpen:!0}),(0,j.trackEvent)("ui","askToImportModalSeen"))}),window.db.getUser(e.uid).then(function(t){if(t){var n=l({},o.state.prefs);l(n,e.settings),o.setState({prefs:n}),o.updateSetting()}})):(o.setState({user:void 0}),delete window.user),o.updateProfileUi()}),o}return r(t,e),t.prototype.componentWillMount=function(){var e,t=this;window.onunload=function(){t.saveCode("code"),t.detachedWindow&&t.detachedWindow.close()},db.local.get({layoutMode:1,code:""},function(o){t.toggleLayout(o.layoutMode),t.state.prefs.layoutMode=o.layoutMode,o.code&&(e=o.code)}),db.getSettings(this.defaultSettings).then(function(o){o.preserveLastCode&&e?(t.setState({unsavedEditCount:0}),e.id&&window.IS_EXTENSION?db.local.get(e.id,function(o){o[e.id]&&((0,M.log)("Load item ",e.id),t.setCurrentItem(o[e.id]).then(function(){return t.refreshEditor()}))}):((0,M.log)("Load last unsaved item",e),t.setCurrentItem(e).then(function(){return t.refreshEditor()}))):t.createNewItem(),l(t.state.prefs,o),t.setState({prefs:t.state.prefs}),t.updateSetting()}),db.getUserLastSeenVersion().then(function(e){e||(t.setState({isOnboardModalOpen:!0}),-1===document.cookie.indexOf("onboarded")&&((0,j.trackEvent)("ui","onboardModalSeen",ee),document.cookie="onboarded=1"),window.db.setUserLastSeenVersion(ee)),e&&-1===(0,M.semverCompare)(e,ee)&&!window.localStorage.pledgeModalSeen&&(t.openSupportDeveloperModal(),window.localStorage.pledgeModalSeen=!0),e&&-1!==(0,M.semverCompare)(e,ee)||(t.setState({hasUnseenChangelog:!0}),t.hasSeenNotifications=!1)})},t.prototype.updateProfileUi=function(){this.state.user?document.body.classList.add("is-logged-in"):document.body.classList.remove("is-logged-in")},t.prototype.refreshEditor=function(){this.toggleLayout(this.state.currentItem.layoutMode||this.state.prefs.layoutMode),this.updateExternalLibCount(),this.contentWrap.refreshEditor()},t.prototype.forkItem=function(e){var t=this;if(this.state.unsavedEditCount){var o=confirm("You have unsaved changes in your current work. Do you want to discard unsaved changes and continue?");if(!o)return}var n=JSON.parse(JSON.stringify(e));delete n.id,n.title="(Forked) "+e.title,n.updatedOn=Date.now(),this.setCurrentItem(n).then(function(){return t.refreshEditor()}),B.alertsService.add("\""+e.title+"\" was forked"),(0,j.trackEvent)("fn","itemForked")},t.prototype.createNewItem=function(){var e=this,t=new Date;this.setCurrentItem({title:"Untitled "+t.getDate()+"-"+(t.getMonth()+1)+"-"+t.getHours()+":"+t.getMinutes(),html:"",css:"",js:"",externalLibs:{js:"",css:""},layoutMode:this.state.currentLayoutMode}).then(function(){return e.refreshEditor()}),B.alertsService.add("New item created")},t.prototype.openItem=function(e){var t=this;this.setCurrentItem(e).then(function(){return t.refreshEditor()}),B.alertsService.add("Saved item loaded")},t.prototype.removeItem=function(e){var t=this,o=confirm("Are you sure you want to delete \""+e.title+"\"?");o&&(_.itemService.unsetItemForUser(e.id),_.itemService.removeItem(e.id).then(function(){B.alertsService.add("Item removed.",e),t.state.currentItem.id===e.id&&t.createNewItem()}),delete this.state.savedItems[e.id],this.setState({savedItems:l({},this.state.savedItems)}),(0,j.trackEvent)("fn","itemRemoved"))},t.prototype.setCurrentItem=function(e){var t=(0,E.deferred)();return e.htmlMode=e.htmlMode||this.state.prefs.htmlMode||I.HtmlModes.HTML,e.cssMode=e.cssMode||this.state.prefs.cssMode||I.CssModes.CSS,e.jsMode=e.jsMode||this.state.prefs.jsMode||I.JsModes.JS,this.setState({currentItem:e},t.resolve),this.isAutoSavingEnabled=!1,this.setState({unsavedEditCount:0}),t.promise},t.prototype.saveBtnClickHandler=function(){(0,j.trackEvent)("ui","saveBtnClick",this.state.currentItem.id?"saved":"new"),this.saveItem()},t.prototype.populateItemsInSavedPane=function(){this.setState({savedItems:l({},this.state.savedItems)}),this.toggleSavedItemsPane()},t.prototype.toggleSavedItemsPane=function(){this.setState({isSavedItemPaneOpen:!this.state.isSavedItemPaneOpen}),this.state.isSavedItemPaneOpen?window.searchInput.focus():window.searchInput.value="",document.body.classList[this.state.isSavedItemPaneOpen?"add":"remove"]("overlay-visible")},t.prototype.fetchItems=function(){var e=s(function*(e,t){var o=this,n=(0,E.deferred)();this.state.savedItems={};var s=[];return window.user&&!t?(s=yield _.itemService.getAllItems(),(0,M.log)("got items"),e&&s.forEach(function(e){o.state.savedItems[e.id]=e}),n.resolve(s),n.promise):(db.local.get("items",function(t){var a=Object.getOwnPropertyNames(t.items||{});a.length||n.resolve([]),(0,j.trackEvent)("fn","fetchItems",a.length);for(var r=function(t){db.local.get(a[t],function(i){e&&(o.state.savedItems[a[t]]=i[a[t]]),s.push(i[a[t]]),a.length===s.length&&n.resolve(s)})},l=0;lwindow.innerWidth?2:e,this.state.currentLayoutMode===e?(this.contentWrap.resetSplitting(),void this.setState({currentLayoutMode:e})):void([1,2,3,4,5].forEach(function(e){window["layoutBtn"+e].classList.remove("selected"),document.body.classList.remove("layout-"+e)}),$("#layoutBtn"+e).classList.add("selected"),document.body.classList.add("layout-"+e),this.setState({currentLayoutMode:e},function(){t.contentWrap.resetSplitting(),t.contentWrap.setPreviewContent(!0)}))},t.prototype.layoutBtnClickHandler=function(e){this.saveSetting("layoutMode",e),(0,j.trackEvent)("ui","toggleLayoutClick",e),this.toggleLayout(e)},t.prototype.getCodePaneSizes=function(){var e,t=this.state.currentLayoutMode,o=2===t||5===t?"width":"height";try{e=[htmlCodeEl.style[o],cssCodeEl.style[o],jsCodeEl.style[o]]}catch(t){e=[33.33,33.33,33.33]}finally{return e}},t.prototype.getMainPaneSizes=function(){var e,t=this.state.currentLayoutMode,o=2===t?"height":"width";try{e=[+$("#js-code-side").style[o].match(/([\d.]+)%/)[1],+$("#js-demo-side").style[o].match(/([\d.]+)%/)[1]]}catch(t){e=[50,50]}finally{return e}},t.prototype.saveSetting=function(e,t){var o,n=(0,E.deferred)(),s=(o={},o[e]=t,o);return db.local.set(s,n.resolve),n.promise},t.prototype.saveCode=function(e){return this.state.currentItem.updatedOn=Date.now(),this.state.currentItem.layoutMode=this.state.currentLayoutMode,this.state.currentItem.sizes=this.getCodePaneSizes(),this.state.currentItem.mainSizes=this.getMainPaneSizes(),(0,M.log)("saving key",e||this.state.currentItem.id,this.state.currentItem),_.itemService.setItem(e||this.state.currentItem.id,this.state.currentItem).then(function(){window.user&&!navigator.onLine?B.alertsService.add("Item saved locally. Will save to account when you are online."):B.alertsService.add("Item saved."),this.setState({unsavedEditCount:0})}.bind(this))},t.prototype.saveItem=function(){var e=this;if(!window.user&&!window.localStorage[Q.LOGIN_AND_SAVE_MESSAGE_SEEN]){var t=confirm("Saving without signing in will save your work only on this machine and this browser. If you want it to be secure & available anywhere, please login in your account and then save.\n\nDo you still want to continue saving locally?");if(window.localStorage[Q.LOGIN_AND_SAVE_MESSAGE_SEEN]=!0,!t)return(0,j.trackEvent)("ui",Q.LOGIN_AND_SAVE_MESSAGE_SEEN,"login"),this.closeAllOverlays(),void this.setState({isLoginModalOpen:!0});(0,j.trackEvent)("ui",Q.LOGIN_AND_SAVE_MESSAGE_SEEN,"local")}var o=!this.state.currentItem.id;this.state.currentItem.id=this.state.currentItem.id||"item-"+(0,M.generateRandomId)(),this.setState({isSaving:!0}),this.saveCode().then(function(){e.setState({isSaving:!1}),!e.isAutoSavingEnabled&&e.state.prefs.autoSave&&(e.isAutoSavingEnabled=!0,B.alertsService.add("Auto-save enabled."))}),o&&_.itemService.setItemForUser(this.state.currentItem.id)},t.prototype.onCodeModeChange=function(e,t){var o=l({},this.state.currentItem);o[e+"Mode"]=t,this.setState({currentItem:o})},t.prototype.onCodeChange=function(e,t,o){this.state.currentItem[e]=t,o&&(this.setState({unsavedEditCount:this.state.unsavedEditCount+1}),0==this.state.unsavedEditCount%X&&this.state.unsavedEditCount>=X&&(window.saveBtn.classList.add("animated"),window.saveBtn.classList.add("wobble"),window.saveBtn.addEventListener("animationend",function(){window.saveBtn.classList.remove("animated"),window.saveBtn.classList.remove("wobble")}))),this.state.prefs.isJs13kModeOn&&this.calculateCodeSize()},t.prototype.onCodeSettingsChange=function(e,t){this.state.currentItem[e+"Settings"]={acssConfig:t}},t.prototype.titleInputBlurHandler=function(t){this.state.currentItem.title=t.target.value,this.state.currentItem.id&&(this.saveItem(),(0,j.trackEvent)("ui","titleChanged"))},t.prototype.updateSetting=function(t){var e=this;if(t){var o=t.target.dataset.setting,n={},s=t.target;(0,M.log)(o,"checkbox"===s.type?s.checked:s.value);var a=l({},this.state.prefs);a[o]="checkbox"===s.type?s.checked:s.value,n[o]=a[o],this.setState({prefs:a}),db.sync.set(n,function(){B.alertsService.add("Setting saved")}),window.user&&window.db.getDb().then(function(t){var n;t.collection("users").doc(window.user.uid).update((n={},n["settings."+o]=e.state.prefs[o],n)).then(function(e){(0,M.log)("Setting \""+o+"\" for user",e)}).catch(function(e){return(0,M.log)(e)})}),(0,j.trackEvent)("ui","updatePref-"+o,a[o])}var i=this.state.prefs;runBtn.classList[i.autoPreview?"add":"remove"]("hide"),this.contentWrap.applyCodemirrorSettings(this.state.prefs),i.autoSave?!this.autoSaveInterval&&(this.autoSaveInterval=setInterval(function(){e.autoSaveLoop()},this.AUTO_SAVE_INTERVAL)):(clearInterval(this.autoSaveInterval),this.autoSaveInterval=null),document.body.classList[i.lightVersion?"add":"remove"]("light-version")},t.prototype.autoSaveLoop=function(){this.isAutoSavingEnabled&&this.state.unsavedEditCount&&this.saveItem()},t.prototype.loginBtnClickHandler=function(){this.setState({isLoginModalOpen:!0})},t.prototype.profileBtnClickHandler=function(){this.setState({isProfileModalOpen:!0})},t.prototype.logout=function(){if(this.state.unsavedEditCount){var e=confirm("You have unsaved changes. Do you still want to logout?");if(!e)return}(0,j.trackEvent)("fn","loggedOut"),P.auth.logout(),this.setState({isProfileModalOpen:!1}),B.alertsService.add("Log out successfull")},t.prototype.itemClickHandler=function(e){var t=this;setTimeout(function(){t.openItem(e)},350),this.toggleSavedItemsPane()},t.prototype.itemRemoveBtnClickHandler=function(e){this.removeItem(e)},t.prototype.itemForkBtnClickHandler=function(e){var t=this;this.toggleSavedItemsPane(),setTimeout(function(){t.forkItem(e)},350)},t.prototype.newBtnClickHandler=function(){if((0,j.trackEvent)("ui","newBtnClick"),this.state.unsavedEditCount){var e=confirm("You have unsaved changes. Do you still want to create something new?");e&&this.setState({isCreateNewModalOpen:!0})}else this.setState({isCreateNewModalOpen:!0})},t.prototype.openBtnClickHandler=function(){(0,j.trackEvent)("ui","openBtnClick"),this.openSavedItemsPane()},t.prototype.detachedPreviewBtnHandler=function(){(0,j.trackEvent)("ui","detachPreviewBtnClick"),this.contentWrap.detachPreview()},t.prototype.notificationsBtnClickHandler=function(){return this.setState({isNotificationsModalOpen:!0}),this.state.isNotificationsModalOpen&&!this.hasSeenNotifications&&(this.hasSeenNotifications=!0,this.setState({hasUnseenChangelog:!1}),window.db.setUserLastSeenVersion(ee)),(0,j.trackEvent)("ui","notificationButtonClick",ee),!1},t.prototype.codepenBtnClickHandler=function(t){if(this.state.currentItem.cssMode===I.CssModes.ACSS)return alert("Oops! CodePen doesn't supports Atomic CSS currently. \nHere is something you can still do -> https://medium.com/web-maker/sharing-your-atomic-css-work-on-codepen-a402001b26ab"),void t.preventDefault();var e={title:"A Web Maker experiment",html:this.state.currentItem.html,css:this.state.currentItem.css,js:this.state.currentItem.js,html_pre_processor:I.modes[this.state.currentItem.htmlMode].codepenVal,css_pre_processor:I.modes[this.state.currentItem.cssMode].codepenVal,js_pre_processor:I.modes[this.state.currentItem.jsMode].codepenVal,css_external:this.state.currentItem.externalLibs.css.split("\n").join(";"),js_external:this.state.currentItem.externalLibs.js.split("\n").join(";")};this.state.currentItem.title.match(/Untitled\s\d\d*-\d/)||(e.title=this.state.currentItem.title),e=JSON.stringify(e),window.codepenForm.querySelector("input").value=e,window.codepenForm.submit(),(0,j.trackEvent)("ui","openInCodepen"),t.preventDefault()},t.prototype.saveHtmlBtnClickHandler=function(t){(0,M.saveAsHtml)(this.state.currentItem),(0,j.trackEvent)("ui","saveHtmlClick"),t.preventDefault()},t.prototype.runBtnClickHandler=function(){this.contentWrap.setPreviewContent(!0,!0),(0,j.trackEvent)("ui","runBtnClick")},t.prototype.exportItems=function(){var e=this;(0,M.handleDownloadsPermission)().then(function(){e.fetchItems().then(function(e){var t=new Date,o=["web-maker-export",t.getFullYear(),t.getMonth()+1,t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds()].join("-");o+=".json";var n=new Blob([JSON.stringify(e,!1,2)],{type:"application/json;charset=UTF-8"});(0,M.downloadFile)(o,n),(0,j.trackEvent)("fn","exportItems")})})},t.prototype.exportBtnClickHandler=function(t){this.exportItems(),t.preventDefault(),(0,j.trackEvent)("ui","exportBtnClicked")},t.prototype.screenshotBtnClickHandler=function(t){this.contentWrap.getDemoFrame(function(e){(0,F.takeScreenshot)(e.getBoundingClientRect())}),t.preventDefault()},t.prototype.openSupportDeveloperModal=function(){this.closeAllOverlays(),this.setState({isSupportDeveloperModalOpen:!0})},t.prototype.supportDeveloperBtnClickHandler=function(t){this.openSupportDeveloperModal(t)},t.prototype.dontAskToImportAnymore=function(t){this.setState({isAskToImportModalOpen:!1}),window.localStorage[Q.ASKED_TO_IMPORT_CREATIONS]=!0,t&&(0,j.trackEvent)("ui","dontAskToImportBtnClick")},t.prototype.importCreationsAndSettingsIntoApp=function(){var e=this;this.mergeImportedItems(this.oldSavedItems).then(function(){(0,j.trackEvent)("fn","oldItemsImported"),e.dontAskToImportAnymore()})},t.prototype.editorFocusHandler=function(e){this.editorWithFocus=e},t.prototype.modalOverlayClickHandler=function(){this.closeAllOverlays()},t.prototype.splitUpdateHandler=function(){this.state.currentItem.sizes=this.getCodePaneSizes(),this.state.currentItem.mainSizes=this.getMainPaneSizes()},t.prototype.calculateTextSize=function(e){if(!e)return 0;var t=/(\r?\n|\r)/g,o=/(\r?\n|\r|\s+)/g;return{count:function(e,n){n=n||{},n.lineBreaks=n.lineBreaks||1,n.ignoreWhitespace=n.ignoreWhitespace||!1;var s=e.length,a=s-e.replace(/[\u0100-\uFFFF]/g,"").length,i=s-e.replace(t,"").length;return n.ignoreWhitespace?(e=e.replace(o,""),e.length+a):s+a+Math.max(0,n.lineBreaks*(i-1))},format:function(e,t){for(var o=0;1024"+e+"")+" "+o+"B"}}.count(e)},t.prototype.getExternalLibCode=function(){var e=this.state.currentItem,t=e.externalLibs&&e.externalLibs.js||"";return t+="\n"+e.externalLibs&&e.externalLibs.css||"",t=t.split("\n").filter(function(e){return e}),t.map(function(e){return fetch(e).then(function(e){return e.text()}).then(function(t){return{code:t,fileName:(0,M.getFilenameFromUrl)(e)}})})},t.prototype.calculateCodeSize=function(){var e=this,t=this.state.currentItem,o=(0,w.computeHtml)(t.html,t.htmlMode),n=(0,w.computeCss)(t.css,t.cssMode),s=(0,w.computeJs)(t.js,t.jsMode,!1);Promise.all([o,n,s].concat(this.getExternalLibCode())).then(function(o){var n=o[0].code||"",s=o[1].code||"",a=o[2].code||"",r=(0,M.getCompleteHtml)(n,s,a,t,!0),l=new Y.default;l.file("index.html",r);for(var d,c=3;csvg{fill:rgba(255,255,255,.2)}input[type=number],input[type=text],select,textarea{padding:3px 5px;font-size:inherit}.hidden-select{opacity:0;position:absolute;left:0;right:0;top:0;bottom:0}.btn{display:inline-block;color:var(--color-button);font-size:inherit;border:3px solid var(--color-button);border-radius:5px;padding:9px 15px;cursor:pointer;letter-spacing:.2px;line-height:1;white-space:nowrap;transition:box-shadow .2s ease}.btn--primary{background:var(--color-button) linear-gradient(180deg,rgba(0,0,0,.5) 0,transparent);color:#fff}.btn--big{padding:15px 30px;border-radius:3px}.btn-icon{display:inline-flex;align-items:center}.btn:hover{text-decoration:none;box-shadow:0 5px 5px 0 rgba(0,0,0,.25)}[class*=btn]:focus{outline-width:4px;outline-color:#b76b29;outline-style:solid;outline-offset:1px}.btn-icon>svg{width:20px;height:20px;fill:currentColor;vertical-align:middle;margin-right:8px}.btn--big>svg{width:25px;height:25px;margin-right:12px}.btn-loader{display:none}.is-loading>svg{display:none}.is-loading .btn-loader{display:block}.star:after{content:'★';color:currentColor}.show-when-selected{display:none}.selected .show-when-selected{display:inline-block}.main-container{position:absolute;left:0;right:0;top:0;bottom:0;display:flex;flex-direction:column;overflow:hidden;transition:.1s ease .2s;will-change:filter}body:not(.light-version).overlay-visible .main-container{transition-duration:.5s;transition-delay:.4s;filter:blur(3px)}.content-wrap{height:1px;max-height:calc(100% - 70px)}.code-side,.demo-side{flex-basis:inherit;position:relative;width:50%}.layout-3 .content-wrap{flex-direction:row-reverse}.code-side{display:flex;flex-direction:column}.layout-2 .content-wrap{flex-direction:column}.layout-2 .code-side{flex-direction:row;width:auto}.layout-2 .demo-side{width:auto}.layout-5 .code-side{flex-direction:row;width:auto}.layout-5 .code-wrap{height:auto}.layout-4 .code-side{display:none}.layout-4 .code-side+.gutter{display:none}.layout-4 .demo-side{width:100%!important}.is-detached-mode .demo-side{display:none}.is-detached-mode .code-side{width:100%!important}.is-detached-mode.layout-2 .code-side{height:auto!important}.code-wrap{display:flex;flex-direction:column;flex-basis:inherit;height:33%;overflow:hidden;position:relative;background:var(--color-bg);transition:height .3s ease,width .3s ease;will-change:height}.layout-2 .code-wrap.is-minimized,.layout-5 .code-wrap.is-minimized{flex-direction:row}.is-dragging .code-wrap{transition:none}.layout-2 .code-wrap{height:auto;width:33%}.code-wrap__header{display:flex;flex-shrink:0;justify-content:space-between;align-items:center;padding:5px 10px;background:rgba(0,0,0,.2);color:#888;border-bottom:1px solid rgba(0,0,0,.3);font-weight:700;user-select:none}.code-wrap__header-label{display:inline-block;font-size:1.1em}.layout-2 .code-side .is-minimized .code-wrap__header,.layout-5 .code-side .is-minimized .code-wrap__header{writing-mode:vertical-lr;padding:10px 5px}.code-wrap__header .caret{transition:.2s ease}.is-minimized .code-wrap__header .caret{opacity:0}.code-wrap__header-btn{display:inline-block;vertical-align:top;margin-left:8px}.code-wrap__header-btn,.code-wrap__header-btn>svg{width:18px;height:18px}.code-wrap__header-right-options{position:relative;z-index:1}.code-wrap__collapse-btn:before{content:url('data:image/svg+xml;utf8,')}.is-maximized .code-wrap__collapse-btn:before{content:url('data:image/svg+xml;utf8,')}@keyframes pop-in{from{transform:scale(.9);opacity:0}to{transform:scale(1);opacity:1}}.CodeMirror{width:100%;height:calc(100% - 25px);font-size:var(--code-font-size)}.layout-2 .is-minimized .Codemirror,.layout-5 .is-minimized .Codemirror{height:calc(100%)}.CodeMirror pre{font-variant-ligatures:contextual}.cm-s-monokai .CodeMirror-linenumber{color:rgba(255,255,255,.2)}.cm-s-monokai .CodeMirror-gutters,.cm-s-monokai.CodeMirror{background:var(--color-bg)}.cm-s-monokai .CodeMirror-guttermarker-subtle{opacity:.4}.cm-s-monokai .CodeMirror-activeline-background,.cm-s-monokai .CodeMirror-activeline-gutter{background:rgba(0,0,0,.1)!important}.CodeMirror-hints{font-size:var(--code-font-size);border:0;background:#1e1e2c}.CodeMirror-hint{color:#bbb;padding:2px 4px}li.CodeMirror-hint-active{background:#5b429d}#demo-frame{border:0;width:100%;height:calc(100% - 29px);position:absolute;z-index:1;background:#fff}body>#demo-frame{height:100%}.footer,.main-header{padding:5px 10px;background-color:#12131b;color:rgba(255,255,255,.45);border-top:1px solid rgba(255,255,255,.14)}.footer{z-index:6}.main-header{display:flex;flex-wrap:nowrap;border:0;border-bottom:1px solid rgba(255,255,255,.14)}.btn--dark,.main-header__btn-wrap>button{box-sizing:content-box;font-size:.8em;font-weight:700;line-height:20px;height:20px;letter-spacing:.6px;white-space:nowrap;color:#9297b3;border-radius:3px;margin-left:10px;padding:0 8px;border:1px solid rgba(0,0,0,.9);background:linear-gradient(180deg,rgba(0,0,0,.5) 0,rgba(255,255,255,.1) 100%);box-shadow:0 -1px 0 0 rgba(255,255,255,.15);text-transform:uppercase}.btn--dark>svg{fill:#9297b3;margin-right:4px}.main-header__btn-wrap>.is-marked>svg{fill:#dc143c}.btn--dark:hover{border-color:rgba(146,151,179,.5)}.main-header__btn-wrap>.is-loading{pointer-events:none;opacity:.4}.main-header__avatar-img,.profile-modal__avatar-img{border-radius:50%}.logo{display:inline-block;height:25px;width:48px;margin-right:5px;background:url(icon-48.png) 0 -12px;background-repeat:no-repeat;vertical-align:middle;-webkit-filter:grayscale(.9);filter:grayscale(.9);transition:.4s ease;opacity:.3;will-change:opacity,filter}.footer:hover .logo{-webkit-filter:grayscale(0);filter:grayscale(0);opacity:1}.footer__right{font-size:0;line-height:0}.footer__separator{display:inline-block;height:24px;margin:0 10px 0 20px;border-left:1px solid rgba(255,255,255,.2)}.mode-btn{background:0 0;border:0;padding:0;margin-left:10px;display:inline-block}.footer__link:first-of-type{margin-left:5px}.footer__link{display:inline-block;background:0 0;border:0;padding:0;margin-right:5px;position:relative;top:2px}.footer a>svg,.footer button>svg{transition:.3s ease;fill:rgba(255,255,255,.2)}.footer a:hover svg,.footer button:hover svg{fill:rgba(255,255,255,.45)}.mode-btn svg{width:24px;height:24px}.mode-btn.selected svg{fill:rgba(255,255,255,.45)}.gutter{background:rgba(255,255,255,.05);flex-shrink:0}.gutter-horizontal{cursor:ew-resize}.gutter-vertical{cursor:ns-resize}.item-title-input{background:0 0;border:0;color:rgba(255,255,255,.6);flex:1}.search-input{background:rgba(255,255,255,.1);padding:10px 20px;border:0;width:100%;font-size:16px;color:#fff;border-radius:4px}.modal{position:fixed;top:0;left:0;width:100vw;height:100vh;overflow-y:auto;align-items:center;display:flex;align-items:baseline;justify-content:center;z-index:2000;visibility:hidden;will-change:transform}@keyframes anim-modal-overlay{to{opacity:1;transform:translateY(0) scale(1)}}.modal__close-btn{position:absolute;right:1rem;top:1rem;text-transform:uppercase;font-weight:700;font-size:.8rem;opacity:.8;transition:.25s ease;border:1px solid #000;border-radius:2px;padding:.2rem .5rem}.modal__close-btn>svg{fill:#000;width:30px;height:30px}.modal__close-btn:hover{opacity:.7}.modal__content{background:#fdfdfd;color:#444;position:relative;border-radius:8px;opacity:0;padding:3em;font-size:1.1em;line-height:1.4;max-width:85vw;margin:2rem auto;box-sizing:border-box;overflow-y:auto;pointer-events:auto;transform:translateY(50px) scale(.95);animation:anim-modal .3s ease forwards;animation-delay:150ms}@keyframes anim-modal{to{opacity:1;transform:translateY(0) scale(1)}}@media screen and (max-width:900px){.modal__content{max-width:95vw}}.is-modal-visible{visibility:visible}.modal-overlay{position:fixed;width:100%;height:100%;visibility:hidden;top:0;left:0;z-index:5;opacity:0;will-change:opacity;background:rgba(0,0,0,.6);transition:opacity .3s}.ask-to-import-modal .modal__content,.pledge-modal .modal__content{max-width:800px}.login-modal .modal__content{overflow-y:initial}.saved-items-pane{position:fixed;right:0;top:0;bottom:0;width:450px;padding:20px 30px;z-index:6;background-color:var(--color-sidebar);transition:.3s cubic-bezier(1,.13,.21,.87);transition-property:transform;will-change:transform;transform:translateX(100%)}.saved-items-pane.is-open{transition-duration:.4s;transform:translateX(0)}.is-modal-visible~.modal-overlay,.overlay-visible .modal-overlay,.saved-items-pane.is-open~.modal-overlay{opacity:1;visibility:visible}.saved-items-pane__close-btn{position:absolute;left:-18px;top:24px;opacity:0;visibility:hidden;border-radius:50%;padding:10px 14px;background:#dc143c;color:#fff;border:0;transform:scale(0);will-change:transform,opacity;transition:.3s ease;transition-delay:0}.saved-items-pane.is-open .saved-items-pane__close-btn{opacity:1;transition-delay:.4s;transform:scale(1);visibility:visible}.saved-item-tile{padding:20px;background-color:rgba(255,255,255,.06);position:relative;margin:20px 0;display:block;border-radius:4px;cursor:pointer;opacity:0;transform:translateX(50px);will-change:opacity,transform;box-shadow:0 2px 4px 0 rgba(0,0,0,.2);animation:slide-left .35s ease forwards}.saved-item-tile:nth-child(1){animation-delay:.2s}.saved-item-tile:nth-child(2){animation-delay:.25s}.saved-item-tile:nth-child(3){animation-delay:.3s}.saved-item-tile:nth-child(4){animation-delay:.35s}.saved-item-tile:nth-child(5){animation-delay:.4s}.saved-item-tile:nth-child(6){animation-delay:.45s}.saved-item-tile:nth-child(7){animation-delay:.5s}.saved-item-tile:nth-child(8){animation-delay:.55s}.saved-item-tile:nth-child(9){animation-delay:.6s}.saved-item-tile:nth-child(10){animation-delay:.65s}.saved-item-tile:nth-child(11){animation-delay:.7s}.saved-item-tile:nth-child(12){animation-delay:.75s}.saved-item-tile:nth-child(n+12){animation-delay:.8s}@keyframes slide-left{from{opacity:0;transform:translateX(50px)}to{opacity:1;transform:translateX(0)}}.saved-item-tile.selected,.saved-item-tile:hover{background:rgba(255,255,255,.1)}.saved-item-tile__btns{position:absolute;top:6px;z-index:1;right:8px;opacity:0;pointer-events:none;transition:.25s ease}.saved-item-tile.selected .saved-item-tile__btns,.saved-item-tile:hover .saved-item-tile__btns{opacity:1;pointer-events:auto}.saved-item-tile__btn{padding:7px 10px;color:rgba(255,255,255,.3);border-radius:20px;margin-left:2px;background:rgba(255,255,255,.05);text-transform:uppercase}.saved-item-tile__btn:hover{background:rgba(255,255,255,.8);color:#555}.saved-item-tile__title{pointer-events:none;font-size:1.4em;margin:0 0 1em 0;opacity:.8}.saved-item-tile__meta{pointer-events:none;opacity:.3}.saved-items-pane__container{overflow-y:scroll;max-height:calc(100vh - 90px)}.notifications-btn{position:relative}@keyframes shake{2%,22%{transform:translate3d(-1px,0,0)}20%,5%{transform:translate3d(2px,0,0)}12%,17%,7%{transform:translate3d(-4px,0,0)}10%,15%{transform:translate3d(4px,0,0)}}.notifications-btn.has-new{animation:shake 7s linear infinite;transform-origin:50% 10px}.notifications-btn__dot{position:absolute;right:1;top:-2px;background:#31fe45;border-radius:50%;width:12px;height:12px;display:none}.has-new .notifications-btn__dot{display:block}.notification{border:1px solid #f1f1f1;border-radius:5px;padding:20px;background:#f8f6f9;position:relative}.notification:not(:last-child){margin-bottom:10px}.notification li:not(:last-child){margin-bottom:10px}.notification__version{background:#ff8c00;color:#fff;padding:3px;border-radius:5px;position:absolute;top:2px;left:2px}.loader,.loader:after{border-radius:50%;width:3em;height:3em}.loader{font-size:5px;position:relative;text-indent:-9999em;border-top:1.1em solid rgba(118,57,229,.2);border-right:1.1em solid rgba(118,57,229,.2);border-bottom:1.1em solid rgba(118,57,229,.2);border-left:1.1em solid #7639e5;transform:translateZ(0);animation:load8 1.1s infinite linear}@keyframes load8{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.btn-group{position:relative;cursor:pointer}.dropdown__menu{position:absolute;top:100%;left:0;padding:0;margin:0;min-width:200px;display:block;font-size:.88rem;list-style:none;border-radius:4px;overflow:hidden;opacity:0;visibility:hidden;transition:transform .25s ease;transform:translateY(10px);z-index:5;background:#fff}.dropdown__menu>li>a{display:block;padding:6px 15px;color:#333;cursor:pointer}.dropdown__menu>li.selected>a,.dropdown__menu>li>a:hover{background:var(--color-sidebar);color:#fff}.dropdown__menu>li:not(:last-child){border-bottom:1px solid rgba(0,0,0,.05)}.dropdown__menu.is-open,.open>.dropdown__menu{opacity:1;visibility:visible;transform:translateY(0)}.alerts-container{position:fixed;will-change:transform;left:50%;top:-5px;padding:10px;background:#fff;border:1px solid #eee;color:#333;box-shadow:0 3px 5px rgba(0,0,0,.2);font-size:1rem;border-radius:3px;z-index:6;transform:translateX(-50%) translateY(-100%);transition:.3s ease}.alerts-container.is-active{transform:translateX(-50%) translateY(0)}.error-gutter{width:8px}.gutter-error-marker{width:8px;height:20px;background:red;border-radius:0;position:relative;top:0;left:1px}.gutter-error-marker:after{content:attr(data-title);background:red;color:#fff;padding:4px;opacity:0;visibility:hidden;position:absolute;top:14px;left:0;width:300px;transform:translateX(-10px);will-change:transform;transition:.2s ease}.gutter-error-marker:hover:after{opacity:1;visibility:visible;transform:translateX(0)}.count-label{color:rgba(0,0,0,.8);background:rgba(255,255,255,.53);border-radius:5px;padding:1px 6px;font-weight:700}.onboard-step{background:#f7f2f1;border:1px solid #ecdede;margin:15px;padding:20px 30px;background-color:#fff;border-radius:10px;box-shadow:0 16px 22px rgba(0,0,0,.1);flex:1}.onboard-step__icon{fill:#fff2ed;stroke-width:.5px;stroke:#e79f80;width:80px;height:80px}.autocomplete-dropdown{border-top-left-radius:0;border-top-right-radius:0;right:0;max-height:200px;overflow-y:auto;border:1px solid rgba(0,0,0,.5);z-index:2001}.autocomplete__loader{position:absolute;right:3px;bottom:1px}@keyframes wobble{from{transform:none}15%{transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg)}30%{transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg)}45%{transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg)}60%{transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg)}75%{transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg)}to{transform:none}}.animated{animation-duration:1s;animation-fill-mode:both}.wobble{animation-name:wobble}.console{background:var(--color-bg);z-index:6;position:absolute;bottom:0;min-height:80px;height:35vh;left:0;right:0;display:flex;flex-direction:column;transform:translateY(0);transition:transform .4s cubic-bezier(.76,.01,.13,.9)}.console.is-minimized{transform:translateY(calc(100% - 29px))}.console .CodeMirror{height:calc(100% - 30px)}.console__log{flex:1}.console-exec-input{padding:5px;font-size:1.3em;flex:1;background:rgba(0,0,0,.3);color:#fff;border:0}.console:not(.is-minimized) .code-wrap__header{cursor:ns-resize}.global-console-container{display:none;position:relative;height:35px}.is-detached-mode .console,.is-detached-mode .footer{z-index:4}.is-detached-mode .global-console-container{display:block}.kbd-shortcut__keys{background:rgba(0,0,0,.1);border-radius:3px;padding:3px 8px;margin-right:5px;display:inline-block;font-size:.9rem;font-weight:700}.kbd-shortcut__details{display:inline-block}.web-maker-with-tag{position:relative;display:inline-block}.is-extension .web-maker-with-tag:after{display:none}.social-login-btn--github{color:#fff;background:#656b6f;border-color:#656b6f}.social-login-btn--facebook{color:#fff;background:#4e62c0;border-color:#4e62c0}.social-login-btn--google{background:#fff;border:2px solid currentColor;color:inherit}body.is-logged-in .hide-on-login,body:not(.is-app) .show-when-app,body:not(.is-extension) .show-when-extension,body:not(.is-logged-in) .hide-on-logout{display:none}.onboard-selection{padding:10px;margin:0 40px;border-radius:5px;transition:.25s ease;position:relative;border:1px solid transparent}.onboard-selection:hover{cursor:pointer;transform:scale(1.15)}.onboard-selection.selected:after{content:'';position:absolute;right:-20px;bottom:40px;width:80px;height:80px;border-radius:50%;background:#fff url('data:image/svg+xml;charset=UTF-8,')}.bookmarklet{display:inline-flex;align-items:center;border:1px #aaa solid;padding:0 5px;border-style:dashed;color:#333}.help-text{font-size:.9em;color:#616465}.social-login-btn:after,.social-login-btn:before,.social-login-btn:hover:after,.social-login-btn:hover:before{visibility:hidden}.last-login-github .social-login-btn--github:after,.last-login-github .social-login-btn--github:before{visibility:visible}.last-login-facebook .social-login-btn--facebook:after,.last-login-facebook .social-login-btn--facebook:before{visibility:visible}.last-login-google .social-login-btn--google:after,.last-login-google .social-login-btn--google:before{visibility:visible}@media screen and (max-width:600px){body{font-size:70%}.main-header{overflow-x:auto}.main-header__btn-wrap{flex-shrink:0}.modal__content{padding:1em}.saved-items-pane{width:77vw;padding:10px 20px}}.cm-s-paraiso-dark.CodeMirror{background:#2f1e2e;color:#b9b6b0}.cm-s-paraiso-dark .CodeMirror-gutters{background:#2f1e2e;border-right:0}.cm-s-paraiso-dark .CodeMirror-activeline-background{background:#4d344a}.cm-s-monokai.CodeMirror{background:#272822;color:#f8f8f2}.cm-s-monokai .CodeMirror-gutters{background:#272822;border-right:0}.cm-s-monokai .CodeMirror-activeline-background{background:#373831}.cm-s-3024-day.CodeMirror{background:#f7f7f7;color:#3a3432}.cm-s-3024-day .CodeMirror-gutters{background:#f7f7f7;border-right:0}.cm-s-3024-day .CodeMirror-activeline-background{background:#e8f2ff}.cm-s-material.CodeMirror{background-color:#263238;color:rgba(233,237,237,1)}.cm-s-material .CodeMirror-gutters{background:#263238;color:#537f7e}.cm-s-material .CodeMirror-activeline-background{background:rgba(0,0,0,0)}.cm-s-dracula .CodeMirror-gutters,.cm-s-dracula.CodeMirror{background-color:#282a36!important;color:#f8f8f2!important}.cm-s-dracula .CodeMirror-activeline-background{background:rgba(255,255,255,.1)}.cm-s-blackboard.CodeMirror{background:#0c1021;color:#f8f8f8}.cm-s-blackboard .CodeMirror-gutters{background:#0c1021;border-right:0}.cm-s-blackboard .CodeMirror-activeline-background{background:#3c3636}.cm-s-midnight.CodeMirror{background:#0f192a;color:#d1edff}.cm-s-midnight .CodeMirror-gutters{background:#0f192a;border-right:1px solid}.cm-s-midnight .CodeMirror-activeline-background{background:#253540} \ No newline at end of file +:root{--color-text:#d4cde9;--color-bg:#252637;--color-popup:#3a2b63;--code-font-size:16px;--color-button:#d3a447;--color-focus-outline:#d3a447}body{margin:0;padding:0;background:rgba(0,0,0,.5);background:var(--color-bg);color:rgba(255,255,255,.9);min-height:100vh;font-size:87.5%;position:relative;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Helvetica,Arial,sans-serif,'Segoe UI Emoji','Segoe UI Symbol'}h1{margin-top:0}input,select,textarea{font-size:inherit;color:var(--color-text);background:rgba(0,0,0,.24);border:1px solid rgba(255,255,255,.09);border-bottom-color:rgba(255,255,255,.17);box-shadow:inset 0 2px 5px rgba(0,0,0,.2);border-radius:3px;padding:10px;box-sizing:border-box}[role=button]{cursor:pointer}a{text-decoration:none;color:#f7ae2d;cursor:pointer}a:hover{text-decoration:underline}p{line-height:1.65}button{font-family:inherit;font-size:100%}.hide{display:none!important}.flex{display:flex}.flex-grow{flex-grow:1}.flex-v-center{align-items:center}.flex-h-center{justify-content:center}.flex-h-end{justify-content:flex-end}.fr{float:right}.relative{position:relative}.tac{text-align:center}.tar{text-align:right}.va-m{vertical-align:middle}.full-width{width:100%}.opacity--30{opacity:.3}.opacity--70{opacity:.7}.pointer-none{pointer-events:none}.ml-1{margin-left:1rem}.ml-2{margin-left:2rem}.mb-1{margin-bottom:1rem}.mb-2{margin-bottom:2rem}.mt-1{margin-top:1rem}.mt-2{margin-top:2rem}.mb-0{margin-bottom:0}.mt-0{margin-top:0}.support-link{color:#f7ae2d}@media screen and (max-width:600px){.block--mobile{display:block}.ml-0--mobile{margin-left:0}.hide-on-mobile{display:none!important}}@media screen and (min-width:601px){.show-on-mobile{display:none}.flex--desk{display:flex}}hr{background:0;border:0;border-bottom:1px solid rgba(255,255,255,.12);margin:20px 0}label{cursor:pointer}[class*=hint--]:after{text-transform:none;font-weight:400;letter-spacing:.5px;font-size:14px}.line{display:block;margin-bottom:1em}.caret{display:inline-block;width:0;height:0;border:6px solid transparent;border-top-color:currentColor;position:relative;top:5px;margin-left:8px}a>svg{fill:rgba(255,255,255,.2)}.hidden-select{opacity:0;position:absolute;left:0;right:0;top:0;bottom:0}.btn{display:inline-block;color:var(--color-button);font-size:inherit;background:0 0;border:3px solid var(--color-button);border-radius:5px;padding:9px 15px;cursor:pointer;letter-spacing:.2px;line-height:1;white-space:nowrap;transition:box-shadow .2s ease}.btn--primary{background:var(--color-button) linear-gradient(180deg,rgba(0,0,0,.15) 0,transparent);color:#000;font-weight:600}.btn--big{padding:15px 30px;border-radius:3px}.btn-icon{display:inline-flex;align-items:center}.btn:hover{text-decoration:none;box-shadow:0 5px 5px 0 rgba(0,0,0,.25)}:focus{outline-width:4px;outline-color:var(--color-button);outline-style:solid;outline-offset:1px}.btn-icon>svg{width:20px;height:20px;fill:currentColor;vertical-align:middle;margin-right:8px}.btn--big>svg{width:25px;height:25px;margin-right:12px}.btn-loader{display:none}.is-loading>svg{display:none}.is-loading .btn-loader{display:block}.star:after{content:'★';color:currentColor}.show-when-selected{display:none}.selected .show-when-selected{display:inline-block}.main-container{position:absolute;left:0;right:0;top:0;bottom:0;display:flex;flex-direction:column;overflow:hidden;transition:.1s ease .2s;will-change:filter}body:not(.light-version).overlay-visible .main-container{transition-duration:.5s;transition-delay:.4s;filter:blur(3px)}.content-wrap{height:1px;max-height:calc(100% - 70px)}.code-side,.demo-side{flex-basis:inherit;position:relative;width:50%}.layout-3 .content-wrap{flex-direction:row-reverse}.code-side{display:flex;flex-direction:column}.layout-2 .content-wrap{flex-direction:column}.layout-2 .code-side{flex-direction:row;width:auto}.layout-2 .demo-side{width:auto}.layout-5 .code-side{flex-direction:row;width:auto}.layout-5 .code-wrap{height:auto}.layout-4 .code-side{display:none}.layout-4 .code-side+.gutter{display:none}.layout-4 .demo-side{width:100%!important}.is-detached-mode .demo-side{display:none}.is-detached-mode .code-side{width:100%!important}.is-detached-mode.layout-2 .code-side{height:auto!important}.code-wrap{display:flex;flex-direction:column;flex-basis:inherit;height:33%;overflow:hidden;position:relative;background:var(--color-bg);transition:height .3s ease,width .3s ease;will-change:height}.layout-2 .code-wrap.is-minimized,.layout-5 .code-wrap.is-minimized{flex-direction:row}.is-dragging .code-wrap{transition:none}.layout-2 .code-wrap{height:auto;width:33%}.code-wrap__header{display:flex;flex-shrink:0;justify-content:space-between;align-items:center;padding:5px 10px;background:rgba(0,0,0,.2);color:#888;border-bottom:1px solid rgba(0,0,0,.3);font-weight:700;user-select:none}.code-wrap__header-label{display:inline-block;font-size:1.1em}.layout-2 .code-side .is-minimized .code-wrap__header,.layout-5 .code-side .is-minimized .code-wrap__header{writing-mode:vertical-lr;padding:10px 5px}.code-wrap__header .caret{transition:.2s ease}.is-minimized .code-wrap__header .caret{opacity:0}.code-wrap__header-btn{display:inline-block;vertical-align:top;margin-left:8px}.code-wrap__header-btn,.code-wrap__header-btn>svg{width:18px;height:18px}.code-wrap__header-right-options{position:relative;z-index:1}.code-wrap__collapse-btn:before{content:url('data:image/svg+xml;utf8,')}.is-maximized .code-wrap__collapse-btn:before{content:url('data:image/svg+xml;utf8,')}@keyframes pop-in{from{transform:scale(.9);opacity:0}to{transform:scale(1);opacity:1}}.CodeMirror{width:100%;height:calc(100% - 25px);font-size:var(--code-font-size)}.layout-2 .is-minimized .Codemirror,.layout-5 .is-minimized .Codemirror{height:calc(100%)}.CodeMirror pre{font-variant-ligatures:contextual}.cm-s-monokai .CodeMirror-linenumber{color:rgba(255,255,255,.2)}.cm-s-monokai .CodeMirror-gutters,.cm-s-monokai.CodeMirror{background:var(--color-bg)}.cm-s-monokai .CodeMirror-guttermarker-subtle{opacity:.4}.cm-s-monokai .CodeMirror-activeline-background,.cm-s-monokai .CodeMirror-activeline-gutter{background:rgba(0,0,0,.1)!important}.CodeMirror-hints{font-size:var(--code-font-size);border:0;background:#1e1e2c}.CodeMirror-hint{color:#bbb;padding:2px 4px}li.CodeMirror-hint-active{background:#5b429d}#demo-frame{border:0;width:100%;height:calc(100% - 29px);position:absolute;z-index:1;background:#fff}body>#demo-frame{height:100%}.footer,.main-header{padding:5px 10px;background-color:#12131b;color:rgba(255,255,255,.45);border-top:1px solid rgba(255,255,255,.14)}.footer{display:flex;justify-content:space-between;z-index:6}.main-header{display:flex;flex-wrap:nowrap;border:0;border-bottom:1px solid rgba(255,255,255,.14)}.btn--dark,.main-header__btn-wrap>button{box-sizing:content-box;text-transform:uppercase;font-size:12px;font-weight:700;line-height:20px;height:20px;letter-spacing:.6px;white-space:nowrap;color:#9297b3;border-radius:3px;margin-left:10px;padding:0 8px;border:1px solid rgba(0,0,0,.9);background:linear-gradient(180deg,rgba(0,0,0,.5) 0,rgba(255,255,255,.1) 100%);box-shadow:0 -1px 0 0 rgba(255,255,255,.15)}.btn--dark>svg{fill:#9297b3;margin-right:4px}.main-header__btn-wrap>.is-marked>svg{fill:#dc143c}.btn--dark:hover{border-color:rgba(146,151,179,.5)}.main-header__btn-wrap>.is-loading{pointer-events:none;opacity:.4}.main-header__avatar-img,.profile-modal__avatar-img{border-radius:50%}.logo{display:inline-block;height:25px;width:48px;margin-right:5px;background:url(icon-48.png) 0 -12px;background-repeat:no-repeat;vertical-align:middle;-webkit-filter:grayscale(.9);filter:grayscale(.9);transition:.4s ease;opacity:.3;will-change:opacity,filter}.footer:hover .logo{-webkit-filter:grayscale(0);filter:grayscale(0);opacity:1}.footer__right{font-size:0;line-height:0}.footer__separator{display:inline-block;height:24px;margin:0 10px 0 20px;border-left:1px solid rgba(255,255,255,.2)}.mode-btn{background:0 0;border:0;padding:0;margin-left:10px;display:inline-block}.footer__link:first-of-type{margin-left:5px}.footer__link{display:inline-block;background:0 0;border:0;padding:0;margin-right:5px;position:relative;top:2px}.footer a>svg,.footer button>svg{transition:.3s ease;fill:rgba(255,255,255,.2)}.footer a:hover svg,.footer button:hover svg{fill:rgba(255,255,255,.45)}.mode-btn svg{width:24px;height:24px}.mode-btn.selected svg{fill:rgba(255,255,255,.45)}.gutter{background:rgba(255,255,255,.05);flex-shrink:0}.gutter-horizontal{cursor:ew-resize}.gutter-vertical{cursor:ns-resize}.item-title-input{background:0 0;border:0!important;color:rgba(255,255,255,.6);flex:1;padding:3px 5px!important}.search-input{width:100%;font-size:16px}.modal{position:fixed;top:0;left:0;width:100vw;height:100vh;overflow-y:auto;align-items:center;display:flex;align-items:baseline;justify-content:center;z-index:2000;visibility:hidden;will-change:transform}@keyframes anim-modal-overlay{to{opacity:1;transform:translateY(0) scale(1)}}.modal__close-btn{position:absolute;right:1rem;top:1rem;text-transform:uppercase;font-weight:700;font-size:.8rem;opacity:.8;transition:.25s ease;border:1px solid #000;border-radius:2px;padding:.2rem .5rem}.modal__close-btn>svg{fill:#000;width:30px;height:30px}.modal__close-btn:hover{opacity:.7}.modal__content{background:var(--color-popup);color:var(--color-text);position:relative;border-radius:5px;opacity:0;padding:3em;font-size:1.1em;line-height:1.4;max-width:85vw;margin:2rem auto;box-sizing:border-box;overflow-y:auto;pointer-events:auto;transform:translateY(50px) scale(.95);animation:anim-modal .3s ease forwards;animation-delay:150ms}@keyframes anim-modal{to{opacity:1;transform:translateY(0) scale(1)}}@media screen and (max-width:900px){.modal__content{max-width:95vw}}.is-modal-visible{visibility:visible}.modal-overlay{position:fixed;width:100%;height:100%;visibility:hidden;top:0;left:0;z-index:5;opacity:0;will-change:opacity;background:rgba(0,0,0,.6);transition:opacity .3s}.ask-to-import-modal .modal__content,.modal--small .modal__content,.pledge-modal .modal__content{max-width:800px}.login-modal .modal__content{overflow-y:initial}.saved-items-pane{position:fixed;right:0;top:0;bottom:0;width:450px;padding:20px 30px;z-index:6;background-color:var(--color-popup);transition:.3s cubic-bezier(1,.13,.21,.87);transition-property:transform;will-change:transform;transform:translateX(100%)}.saved-items-pane.is-open{transition-duration:.4s;transform:translateX(0)}.is-modal-visible~.modal-overlay,.overlay-visible .modal-overlay,.saved-items-pane.is-open~.modal-overlay{opacity:1;visibility:visible}.saved-items-pane__close-btn{position:absolute;left:-18px;top:24px;opacity:0;visibility:hidden;border-radius:50%;padding:10px 14px;background:#dc143c;color:#fff;border:0;transform:scale(0);will-change:transform,opacity;transition:.3s ease;transition-delay:0}.saved-items-pane.is-open .saved-items-pane__close-btn{opacity:1;transition-delay:.4s;transform:scale(1);visibility:visible}.saved-item-tile{padding:20px;background-color:rgba(255,255,255,.06);position:relative;margin:20px 0;display:block;border-radius:4px;cursor:pointer;opacity:0;transform:translateX(50px);will-change:opacity,transform;box-shadow:0 2px 4px 0 rgba(0,0,0,.2);animation:slide-left .35s ease forwards}.saved-item-tile:nth-child(1){animation-delay:.2s}.saved-item-tile:nth-child(2){animation-delay:.25s}.saved-item-tile:nth-child(3){animation-delay:.3s}.saved-item-tile:nth-child(4){animation-delay:.35s}.saved-item-tile:nth-child(5){animation-delay:.4s}.saved-item-tile:nth-child(6){animation-delay:.45s}.saved-item-tile:nth-child(7){animation-delay:.5s}.saved-item-tile:nth-child(8){animation-delay:.55s}.saved-item-tile:nth-child(9){animation-delay:.6s}.saved-item-tile:nth-child(10){animation-delay:.65s}.saved-item-tile:nth-child(11){animation-delay:.7s}.saved-item-tile:nth-child(12){animation-delay:.75s}.saved-item-tile:nth-child(n+12){animation-delay:.8s}@keyframes slide-left{from{opacity:0;transform:translateX(50px)}to{opacity:1;transform:translateX(0)}}.saved-item-tile.selected,.saved-item-tile:hover{background:rgba(255,255,255,.1)}.saved-item-tile__btns{position:absolute;top:6px;z-index:1;right:8px;opacity:0;pointer-events:none;transition:.25s ease}.saved-item-tile.selected .saved-item-tile__btns,.saved-item-tile:hover .saved-item-tile__btns{opacity:1;pointer-events:auto}.saved-item-tile__img{margin-right:10px}.saved-item-tile__btn{padding:7px 10px;color:rgba(255,255,255,.3);border-radius:20px;margin-left:2px;background:rgba(255,255,255,.05);text-transform:uppercase}.saved-item-tile__btn:hover{background:rgba(255,255,255,.8);color:#555}.saved-item-tile__title{pointer-events:none;font-size:1.4em;margin:0;opacity:.8}.saved-item-tile__meta{margin-top:8px;pointer-events:none;opacity:.3}.saved-items-pane__container{overflow-y:scroll;max-height:calc(100vh - 90px)}.notifications-btn{position:relative}@keyframes shake{2%,22%{transform:translate3d(-1px,0,0)}20%,5%{transform:translate3d(2px,0,0)}12%,17%,7%{transform:translate3d(-4px,0,0)}10%,15%{transform:translate3d(4px,0,0)}}.notifications-btn.has-new{animation:shake 7s linear infinite;transform-origin:50% 10px}.notifications-btn__dot{position:absolute;right:1;top:-2px;background:#31fe45;border-radius:50%;width:12px;height:12px;display:none}.has-new .notifications-btn__dot{display:block}.notification{border-radius:5px;padding:20px;background:rgba(248,246,249,.05);position:relative}.notification:not(:last-child){margin-bottom:10px}.notification li:not(:last-child){margin-bottom:10px}.notification__version{background:#af6204;color:#fff;padding:3px;border-radius:5px;position:absolute;top:2px;left:2px}.loader,.loader:after{border-radius:50%;width:3em;height:3em}.loader{font-size:5px;position:relative;text-indent:-9999em;border-top:1.1em solid rgba(118,57,229,.2);border-right:1.1em solid rgba(118,57,229,.2);border-bottom:1.1em solid rgba(118,57,229,.2);border-left:1.1em solid #7639e5;transform:translateZ(0);animation:load8 1.1s infinite linear}@keyframes load8{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.btn-group{position:relative;cursor:pointer}.dropdown__menu{position:absolute;top:100%;left:0;padding:0;margin:0;min-width:200px;display:block;font-size:.88rem;list-style:none;border-radius:4px;overflow:hidden;opacity:0;visibility:hidden;transition:transform .25s ease;transform:translateY(10px);z-index:5;background:#fff}.dropdown__menu>li>a{display:block;padding:6px 15px;color:#333;cursor:pointer}.dropdown__menu>li.selected>a,.dropdown__menu>li>a:hover{background:var(--color-popup);color:#fff}.dropdown__menu>li:not(:last-child){border-bottom:1px solid rgba(0,0,0,.05)}.dropdown__menu.is-open,.open>.dropdown__menu{opacity:1;visibility:visible;transform:translateY(0)}.alerts-container{position:fixed;will-change:transform;left:50%;top:-5px;padding:10px;background:#fff;border:1px solid #eee;color:#333;box-shadow:0 3px 5px rgba(0,0,0,.2);font-size:1rem;border-radius:3px;z-index:6;transform:translateX(-50%) translateY(-100%);transition:.3s ease}.alerts-container.is-active{transform:translateX(-50%) translateY(0)}.error-gutter{width:8px}.gutter-error-marker{width:8px;height:20px;background:red;border-radius:0;position:relative;top:0;left:1px}.gutter-error-marker:after{content:attr(data-title);background:red;color:#fff;padding:4px;opacity:0;visibility:hidden;position:absolute;top:14px;left:0;width:300px;transform:translateX(-10px);will-change:transform;transition:.2s ease}.gutter-error-marker:hover:after{opacity:1;visibility:visible;transform:translateX(0)}.count-label{color:rgba(0,0,0,.8);background:rgba(255,255,255,.53);border-radius:5px;padding:1px 6px;font-weight:700}.onboard-step{margin:15px;padding:20px 30px;background-color:rgba(255,255,255,.1);border-radius:10px;box-shadow:0 16px 22px rgba(0,0,0,.1);flex:1}.onboard-step__icon{fill:rgba(255,255,255,.3);stroke-width:.5px;stroke:rgba(0,0,0,.4);width:80px;height:80px}.autocomplete-dropdown{border-top-left-radius:0;border-top-right-radius:0;right:0;max-height:200px;overflow-y:auto;border:1px solid rgba(0,0,0,.5);z-index:2001}.autocomplete__loader{position:absolute;right:3px;bottom:1px}@keyframes wobble{from{transform:none}15%{transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg)}30%{transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg)}45%{transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg)}60%{transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg)}75%{transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg)}to{transform:none}}.animated{animation-duration:1s;animation-fill-mode:both}.wobble{animation-name:wobble}.console{background:var(--color-bg);z-index:6;position:absolute;bottom:0;min-height:80px;height:35vh;left:0;right:0;display:flex;flex-direction:column;transform:translateY(0);transition:transform .4s cubic-bezier(.76,.01,.13,.9)}.console.is-minimized{transform:translateY(calc(100% - 29px))}.console .CodeMirror{height:calc(100% - 30px)}.console__log{flex:1}.console-exec-input{padding:5px;font-size:1.3em;flex:1;background:rgba(0,0,0,.3);color:#fff;border:0}.console:not(.is-minimized) .code-wrap__header{cursor:ns-resize}.global-console-container{display:none;position:relative;height:35px}.is-detached-mode .console,.is-detached-mode .footer{z-index:4}.is-detached-mode .global-console-container{display:block}.kbd-shortcut__keys{background:rgba(0,0,0,.3);border-radius:3px;padding:3px 8px;margin-right:5px;display:inline-block;font-size:.9rem;font-weight:700}.kbd-shortcut__details{display:inline-block}.web-maker-with-tag{position:relative;display:inline-block}.is-extension .web-maker-with-tag:after{display:none}.social-login-btn--github{color:#fff;background:#656b6f;border-color:#656b6f}.social-login-btn--facebook{color:#fff;background:#4e62c0;border-color:#4e62c0}.social-login-btn--google{background:#fff;border:2px solid currentColor;color:#000}body.is-logged-in .hide-on-login,body:not(.is-app) .show-when-app,body:not(.is-extension) .show-when-extension,body:not(.is-logged-in) .hide-on-logout{display:none}.onboard-selection{padding:10px;margin:0 40px;border-radius:5px;transition:.25s ease;position:relative;border:1px solid transparent}.onboard-selection:hover{cursor:pointer;transform:scale(1.15)}.onboard-selection.selected:after{content:'';position:absolute;right:-20px;bottom:40px;width:80px;height:80px;border-radius:50%;background:#fff url('data:image/svg+xml;charset=UTF-8,')}.bookmarklet{display:inline-flex;align-items:center;border:1px #aaa solid;padding:0 5px;border-style:dashed;color:#f7f7f7}.help-text{font-size:.9em;color:rgba(255,255,255,.5)}.social-login-btn:after,.social-login-btn:before,.social-login-btn:hover:after,.social-login-btn:hover:before{visibility:hidden}.last-login-github .social-login-btn--github:after,.last-login-github .social-login-btn--github:before{visibility:visible}.last-login-facebook .social-login-btn--facebook:after,.last-login-facebook .social-login-btn--facebook:before{visibility:visible}.last-login-google .social-login-btn--google:after,.last-login-google .social-login-btn--google:before{visibility:visible}.footer__js13k-days-left{padding:1px 9px;text-transform:uppercase;background:#b12a34;color:#fff;border-radius:3px;letter-spacing:.7px}.footer__js13k-code-size{margin-left:1rem}.js13k__dropdown{position:fixed;display:inline-block;background:var(--color-popup);color:var(--color-text);bottom:35px;padding:16px;border-radius:4px;box-shadow:0 -7px 13px 2px rgba(0,0,0,.2);left:50%;margin-left:-115px}@media screen and (max-width:600px){body{font-size:70%}.main-header{overflow-x:auto}.main-header__btn-wrap{flex-shrink:0}.modal__content{padding:1em}.saved-items-pane{width:77vw;padding:10px 20px}}.cm-s-paraiso-dark.CodeMirror{background:#2f1e2e;color:#b9b6b0}.cm-s-paraiso-dark .CodeMirror-gutters{background:#2f1e2e;border-right:0}.cm-s-paraiso-dark .CodeMirror-activeline-background{background:#4d344a}.cm-s-monokai.CodeMirror{background:#272822;color:#f8f8f2}.cm-s-monokai .CodeMirror-gutters{background:#272822;border-right:0}.cm-s-monokai .CodeMirror-activeline-background{background:#373831}.cm-s-3024-day.CodeMirror{background:#f7f7f7;color:#3a3432}.cm-s-3024-day .CodeMirror-gutters{background:#f7f7f7;border-right:0}.cm-s-3024-day .CodeMirror-activeline-background{background:#e8f2ff}.cm-s-material.CodeMirror{background-color:#263238;color:rgba(233,237,237,1)}.cm-s-material .CodeMirror-gutters{background:#263238;color:#537f7e}.cm-s-material .CodeMirror-activeline-background{background:rgba(0,0,0,0)}.cm-s-dracula .CodeMirror-gutters,.cm-s-dracula.CodeMirror{background-color:#282a36!important;color:#f8f8f2!important}.cm-s-dracula .CodeMirror-activeline-background{background:rgba(255,255,255,.1)}.cm-s-blackboard.CodeMirror{background:#0c1021;color:#f8f8f8}.cm-s-blackboard .CodeMirror-gutters{background:#0c1021;border-right:0}.cm-s-blackboard .CodeMirror-activeline-background{background:#3c3636}.cm-s-midnight.CodeMirror{background:#0f192a;color:#d1edff}.cm-s-midnight .CodeMirror-gutters{background:#0f192a;border-right:1px solid}.cm-s-midnight .CodeMirror-activeline-background{background:#253540} \ No newline at end of file diff --git a/app/templates/template-kontra-game-engine.json b/app/templates/template-kontra-game-engine.json new file mode 100644 index 0000000..a8a1dab --- /dev/null +++ b/app/templates/template-kontra-game-engine.json @@ -0,0 +1,18 @@ +{ + "title": "Kontra HTML5 game engine template", + "html": " ", + "css": "", + "js": + "// Learn More here -> https://straker.github.io/kontra/getting-started\nkontra.init();\n\nvar sprite = kontra.sprite({\n x: 100, // starting x,y position of the sprite\n y: 80,\n color: '#bad455', // fill color of the sprite rectangle\n width: 20, // width and height of the sprite rectangle\n height: 40,\n dx: 2, // move the sprite 2px to the right every frame\n});\n\nvar loop = kontra.gameLoop({ // create the main game loop\n update: function() { // update the game state\n sprite.update();\n\n // wrap the sprites position when it reaches\n // the edge of the screen\n if (sprite.x > kontra.canvas.width) {\n sprite.x = -sprite.width;\n }\n },\n render: function() { // render the game state\n sprite.render();\n }\n});\n\nloop.start(); // start the game", + "externalLibs": { + "js": + "https://unpkg.com/kontra@3.3.0/dist/core.js\nhttps://unpkg.com/kontra@3.3.0/dist/sprite.js\nhttps://unpkg.com/kontra@3.3.0/dist/gameLoop.js\nhttps://unpkg.com/kontra@3.3.0/dist/pointer.js", + "css": "" + }, + "htmlMode": "html", + "cssMode": "css", + "jsMode": "js", + "sizes": ["33px", "33px", "calc(100% - 66px)"], + "mainSizes": [50, 50], + "layoutMode": 1 +} diff --git a/app/templates/template-preact.json b/app/templates/template-preact.json new file mode 100644 index 0000000..f8ac914 --- /dev/null +++ b/app/templates/template-preact.json @@ -0,0 +1,16 @@ +{ + "title": "Preact template", + "externalLibs": { + "js": "\nhttps://cdnjs.cloudflare.com/ajax/libs/preact/8.2.9/preact.min.js", + "css": "" + }, + "sizes": ["calc(30% - 3px)", "30px", "calc(70% - 3px)"], + "mainSizes": [68.1051, 31.6949], + "htmlMode": "html", + "cssMode": "css", + "jsMode": "es6", + "layoutMode": 1, + "js": + "\nconst { h, Component, render, createElement } = window.preact;\nconst React = {createElement}\n\nclass App extends Component {\n constructor() {\n super();\n this.message = 'World';\n }\n render() {\n return (
Hello {this.message}
)\n }\n}\nrender(, window.root)\n\n", + "html": "
\n" +} diff --git a/app/templates/template-react.json b/app/templates/template-react.json new file mode 100644 index 0000000..69ced8f --- /dev/null +++ b/app/templates/template-react.json @@ -0,0 +1,18 @@ +{ + "title": "React template", + "externalLibs": { + "js": + "\nhttps://cdnjs.cloudflare.com/ajax/libs/react/15.3.1/react.min.js\nhttps://cdnjs.cloudflare.com/ajax/libs/react/15.3.1/react-dom.min.js", + "css": "" + }, + "updatedOn": 1531063870556, + "sizes": ["", "calc(17.4842% - 6px)", "calc(49.1221% - 3px)"], + "mainSizes": [68.1051, 31.6949], + "htmlMode": "html", + "cssMode": "css", + "jsMode": "es6", + "layoutMode": 1, + "js": + "class App extends React.Component {\n constructor() {\n super();\n this.message = 'World';\n }\n render() {\n return (

Hello {this.message}

);\n }\n}\nReactDOM.render(, window.root);\n\n\n", + "html": "
\n" +} diff --git a/app/vendor.js b/app/vendor.js index beb5321..9f44db9 100644 --- a/app/vendor.js +++ b/app/vendor.js @@ -1 +1 @@ -(function(e){function t(n){if(o[n])return o[n].exports;var r=o[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n=window.webpackJsonp;window.webpackJsonp=function(o,s,l){for(var d=0,i=[],c,p,u;dy(t,e.to):0<=y(t,e.from)&&0>=y(t,e.to)}function y(e,t){return e.line-t.line||e.ch-t.ch}function b(e){return{from:e.start,to:e.end}}function x(e,t,n){var o=new we(e,t);if(o.eatWhile(fe.isSpace),t=o.pos,n){for(o.pos=n,o.backUp();!o.sof()&&(0,fe.isSpace)(o.peek());)o.backUp();o.next(),n=o.pos}else n=t;return{from:t,to:n}}function v(e,t){for(var n=t.line,o=t.ch,r=void 0;0<=o;){if(r=e.getTokenAt({line:n,ch:o}),"property"===r.type)return r.string;if(r.start!==o)o=r.start;else break}}function k(e,t){var n=e.getModeAt(t);if(n&&"css"===n.name){var o=e.getTokenAt(t),r=o.state&&o.state.localState||o.state;return r&&r.context&&"prop"===r.context.type}return!1}function S(e,t,n){var o=l(e,t);if(n&&!C(e,t,o))return null;var r=(0,be.default)(e.getLine(t.line),t.ch,{lookAhead:!0,syntax:o.type,prefix:"jsx"===o.syntax&&e.getOption("jsxBracket")?"<":""});if(r){var i={line:t.line,ch:r.start},s={line:t.line,ch:r.end};return"stylesheet"===o.type&&n&&k(e,t)&&(o.options=de({property:v(e,t)},o.options)),{abbreviation:r.abbreviation,range:{from:i,to:s},config:o}}}function C(e,t,n){var o=e.getTokenTypeAt(t);return"stylesheet"===n.type?"comment"!==o&&"string"!==o:"html"===n.syntax?null===o:"slim"===n.syntax||"pug"===n.syntax?null===o||"tag"===o||o&&/attribute/.test(o):"haml"===n.syntax?null===o||"attribute"===o:"jsx"===n.syntax}function w(e,t,n){var o=e.getLine(t.from.line),r=o.match(/^\s+/),i=u(e,n,r&&r[0]),s=(0,ge.default)(i);return e.operation(function(){e.replaceRange(s.string,t.from,t.to);var n=e.indexFromPos(t.from);if(s.fields.length){var o=s.fields[0],r=e.posFromIndex(o.location+n),i=e.posFromIndex(o.location+o.length+n);e.setSelection(r,i)}else e.setCursor(e.posFromIndex(n+s.string.length));return!0})}function T(e,t,n){var o=E(e,t);if(o&&o.model)return o.model;var r=S(e,t,n);if(r)try{var i=new Ee(r.abbreviation,r.range,r.config);return i.valid(e,n)?i:null}catch(e){}}function E(e,t){for(var n=e.findMarksAt(t),o=0,r;o"===r.string&&"tag bracket"===i.type&&"y(t.anchor,t.head)?{from:t.anchor,to:t.head}:{from:t.head,to:t.anchor}}return F(e,e.getCursor())}function F(e,t){var n=e.getEmmetDocumentModel(),o=n&&n.nodeForPoint(t);if(!o)return null;if(B(o.open,t)||B(o.close,t))return b(o);var r=o.open.end,i=o.close?o.close.start:o.open.end;return x(e,r,i)}function B(e,t){return e&&f(b(e),t)}function U(e,t,n){n(window.prompt(t))}function V(e,t){var n=E(e,t);if(n)return n;A(e);var o=T(e,t,!0);if(o)return I(e,o)}function q(e,t){t=t||e.getCursor();var n=[],o=T(e,t,!0);o&&o.abbreviation!==o.snippet&&n.push(G(e,t,o));var r=o?o.config:l(e,t);return n="stylesheet"===r.type?n.concat(W(e,t,r)):n.concat(j(e,t,r)),{type:r.type,syntax:r.syntax,abbreviation:o,completions:n.filter(Boolean)}}function j(e,t,n){var o=e.getLine(t.line).slice(0,t.ch),r=X(o,/[\w:\-$@]/);if(r){var i={from:{line:t.line,ch:t.ch-r.length},to:t};return z(e,t,n).filter(function(e){return e.key!==r&&0===e.key.indexOf(r)}).map(function(t){return new Ae("snippet",e,i,t.key,t.preview,t.snippet)})}return[]}function W(e,t,n){var o=e.getLine(t.line).slice(0,t.ch),r=X(o,/[\w-@$]/);if(r){var i={from:{line:t.line,ch:t.ch-r.length},to:t};if(n.options&&n.options.property){var s=n.options.property.toLowerCase(),l=z(e,t,n).find(function(e){return e.property&&e.property===s});if(l&&l.keywords.length)return l.keywords.map(function(t){return 0===t.key.indexOf(r)&&new Ae("value",e,i,t.key,t.preview,t.snippet)}).filter(Boolean)}else return z(e,t,n).filter(function(e){return e.key!==r&&0===e.key.indexOf(r)}).map(function(t){return new Ae("snippet",e,i,t.key,t.preview,t.snippet)})}return[]}function z(e,t,n){var o=n.type,r=n.syntax;e.state.emmetCompletions||(e.state.emmetCompletions={});var i=e.state.emmetCompletions;if(!(r in i)){var s=(0,xe.createSnippetsRegistry)(o,r,n.snippets);i[r]="stylesheet"===o?H(s,n):K(s,n)}return i[r]}function H(e){return(0,ve.convertToCSSSnippets)(e).map(function(e){var t=e.property,n=e.keywords();return n.length?t+=": "+g(n.join(" | ")):e.value&&(t+=": "+g(e.value)),{key:e.key,value:e.value,snippet:e.key,property:e.property,keywords:n.map(function(e){var t=e.match(/^[\w-]+/);return t&&{key:t[0],preview:g(e),snippet:e}}).filter(Boolean),preview:t}})}function K(e,t){return e.all({type:"string"}).map(function(e){return{key:e.key,value:e.value,preview:g((0,xe.expand)(e.value,t)),snippet:e.key}})}function G(e,t,n){var o=n.preview;return 500=c(this.pos,this._sof)},t.prototype.eof=function(){return 0<=c(this.pos,this._eof)},t.prototype.limit=function(e,t){return new this.constructor(this.editor,e,{from:e,to:t})},t.prototype.peek=function(){var e=this.pos,t=e.line,n=e.ch,o=this.editor.getLine(t);return n=this._lineLength(this.pos.line)&&(this.pos.line++,this.pos.ch=0),this.eof()&&(this.pos=de({},this._eof)),e}return NaN},t.prototype.backUp=function(e){var t=this.editor.constructor,n=this.pos,o=n.line,r=n.ch;for(r-=e||1;0<=o&&0>r;)o--,r+=this._lineLength(o);return this.pos=0>o||0>r?t.Pos(0,0):t.Pos(o,r),this.peek()},t.prototype.current=function(){return this.substring(this.start,this.pos)},t.prototype.substring=function(e,t){return this.editor.getRange(e,t)},t.prototype.error=function(e){var t=new Error(e+" at line "+this.pos.line+", column "+this.pos.ch);return t.originalMessage=e,t.pos=this.pos,t.string=this.string,t},t.prototype._lineLength=function(e){var t=e===this.editor.lastLine();return this.editor.getLine(e).length+(t?0:1)},t}(me.default),Te="emmet-abbreviation",Ee=function(){function e(t,n,o){r(this,e),this.abbreviation=t,this.range=n,this.config=o,this.ast=(0,xe.parse)(t,o),this.snippet=(0,xe.expand)(this.ast,o),this.preview=g(this.snippet)}return e.prototype.insert=function(e,t){return w(e,t||this.range,this.snippet)},e.prototype.valid=function(e,t){return this.preview&&this.abbreviation!==this.preview&&(t&&"stylesheet"===this.config.type?this._isValidForStylesheet(e):!0)},e.prototype._isValidForStylesheet=function(e){var t=this.range.from,n=e.getTokenAt(t);if(/^[#!]/.test(this.abbreviation))return k(e,t);var o=this.ast.children.every(function(e){return e.name}),r=n.state&&n.state.localState||n.state;return!o||"sass"===this.config.syntax||r&&r.context&&"block"===r.context.type},e}(),Ae=function(){function e(t,n,o,i,s,l){r(this,e),this.type=t,this.editor=n,this.range=o,this.name=i,this.preview=s,this.snippet=l,this._inserted=!1}return e.prototype.insert=function(){this._inserted||(this._inserted=!0,"function"==typeof this.snippet?this.snippet(this.editor,this.range):w(this.editor,this.range,this.snippet),A(this.editor))},e}(),Ie=function(){function e(t,n,o){r(this,e),this.dom=t,this.type=n,this.syntax=o}return e.prototype.nodeForPoint=function(e,t){for(var n=this.dom.firstChild,o=null;n;)f(b(n),e,t)?(o=n,n=n.firstChild):n=n.nextSibling;return o},e}(),Ne="emmet-open-tag",Le="emmet-close-tag";t.default=function(e){de(e.commands,{emmetExpandAbbreviation:function(e){return L(e,!0)},emmetExpandAbbreviationAll:function(e){return L(e,!1)},emmetInsertLineBreak:_,emmetWrapWithAbbreviation:R});var t=function(e){return V(e,e.getCursor())};e.defineOption("markEmmetAbbreviation",!0,function(e,n){n?e.on("change",t):(e.off("change",t),A(e))}),e.defineOption("autoRenameTags",!0,function(e,t){t?e.on("change",ie):e.off("change",ie)}),e.defineOption("jsxBracket",!0),e.defineOption("markTagPairs",!1,function(e,t){t?(e.on("cursorActivity",ee),e.on("change",Y)):(e.off("cursorActivity",ee),e.off("change",Y),Y(e),ne(e))}),e.defineOption("emmet",{}),e.defineExtension("getEmmetCompletions",function(e,t){var n=this;"boolean"==typeof e&&(t=e,e=null),e=e||n.getCursor();var o=q(n,e);if(o&&o.completions.length)return n.getOption("markEmmetAbbreviation")&&!E(n,e)&&t&&(A(n),I(o.model)),{from:o.abbreviation.range.from,to:o.abbreviation.range.to,list:o.completions}}),e.defineExtension("getEmmetAbbreviation",function(e,t){return T(this,e||this.getCursor(),t)}),e.defineExtension("findEmmetMarker",function(e){return E(this,e||this.getCursor())}),e.defineExtension("getEmmetDocumentModel",function(){var e=this;return e.getOption("markTagPairs")?$(e):J(e)})}},"/rE2":function(e,t,n){"use strict";function o(e,t){var n=new Set;(function e(o){var i=t.resolve(o.name);if(i&&!n.has(i)){if("function"==typeof i.value)return i.value(o,t,e);var s=(0,p.default)(i.value);n.add(i),s.walk(e),n.delete(i);var d=l(s);for(r(d,o);s.firstChild;)o.parent.insertBefore(s.firstChild,o);d.parent.insertBefore(o,d),d.remove()}})(e)}function r(e,t){return t.name=e.name,e.selfClosing&&(t.selfClosing=!0),null!=e.value&&(t.value=e.value),e.repeat&&(t.repeat=d({},e.repeat)),i(e,t)}function i(e,t){s(e,t);for(var n=new Map,o=e.attributes,r=0;r=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function i(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function s(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t)if(r(e))continue;else return;if(!o(e,t+1)){e.ch=t+1;continue}var n=e.text.lastIndexOf("/",t),i=-1",e.ch-1):-1;if(-1==t)if(i(e))continue;else return;if(!o(e,t+1)){e.ch=t;continue}var n=e.text.lastIndexOf("/",t),r=-1p&&(!t||t==o[2]))return{tag:o[2],from:m(r,l),to:m(e.line,e.ch)}}else n.push(o[2])}}function u(e,t){for(var n=[],o;;){if(o=c(e),!o)return;if("selfClose"==o){l(e);continue}var r=e.line,s=e.ch,d=l(e);if(!d)return;if(d[1])n.push(d[2]);else{for(var p=n.length-1;0<=p;--p)if(n[p]==d[2]){n.length=p;break}if(0>p&&(!t||t==d[2]))return{tag:d[2],from:m(e.line,e.ch),to:m(r,s)}}}}var m=e.Pos,h=/<(\/?)([A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD-:.0-9\u00B7\u0300-\u036F\u203F-\u2040]*)/g;e.registerHelper("fold","xml",function(e,o){for(var r=new n(e,o.line,0),i;;){if(i=d(r),!i||r.line!=o.line)return;var l=s(r);if(!l)return;if(!i[1]&&"selfClose"!=l){var c=m(r.line,r.ch),u=p(r,i[2]);return u&&0")||-1!=i.text.indexOf("<")){var d=s(i),c=d&&m(i.line,i.ch),h=d&&l(i);if(d&&h&&!(0c);u++)i=e.getLine(d++),p=null==p?i:p+"\n"+i;l*=2,t.lastIndex=s.ch;var m=t.exec(p);if(m){var g=p.slice(0,m.index).split("\n"),f=m[0].split("\n"),y=s.line+g.length-1,b=g[g.length-1].length;return{from:h(y,b),to:h(y+f.length-1,1==f.length?b+f[0].length:f[f.length-1].length),match:m}}}}function s(e,t){for(var n=0,o;;){t.lastIndex=n;var r=t.exec(e);if(!r)return o;if(o=r,n=o.index+(o[0].length||1),n==e.length)return o}}function l(e,t,o){t=n(t,"g");for(var r=o.line,i=o.ch,l=e.firstLine(),d;r>=l;r--,i=-1){d=e.getLine(r),-1=d;){for(var p=0,i;p>1,l=o(e.slice(0,s)).length;if(l==n)return s;l>n?i=s:r=s+1}}function p(e,t,n,o){if(!t.length)return null;var r=o?g:f,s=r(t).split(/\r|\n\r?/);search:for(var l=n.line,d=n.ch,p=e.lastLine()+1-s.length;l<=p;l++,d=0){var u=e.getLine(l).slice(d),m=r(u);if(1==s.length){var y=m.indexOf(s[0]);if(-1==y)continue search;var n=c(u,m,y,r)+d;return{from:h(l,c(u,m,y,r)+d),to:h(l,c(u,m,y+s[0].length,r)+d)}}var b=m.length-s[0].length;if(m.slice(b)!=s[0])continue search;for(var x=1;x=p;l--,d=-1){u=e.getLine(l),-1=i.start&&(n.unshift(i.comment),this.leading.splice(r,1),this.trailing.splice(r,1));n.length&&(e.innerComments=n)}},e.prototype.findTrailingComments=function(e){var t=[];if(0=e.end.offset&&t.unshift(o.comment);return this.trailing.length=0,t}var r=this.stack[this.stack.length-1];if(r&&r.node.trailingComments){var i=r.node.trailingComments[0];i&&i.range[0]>=e.end.offset&&(t=r.node.trailingComments,delete r.node.trailingComments)}return t},e.prototype.findLeadingComments=function(e){for(var t=[],n,o;0=e.start.offset);)n=o.node,this.stack.pop();if(n){for(var r=n.leadingComments?n.leadingComments.length:0,s=r-1,i;0<=s;--s)i=n.leadingComments[s],i.range[1]<=e.start.offset&&(t.unshift(i),n.leadingComments.splice(s,1));return n.leadingComments&&0===n.leadingComments.length&&delete n.leadingComments,t}for(var s=this.leading.length-1,o;0<=s;--s)o=this.leading[s],o.start<=e.start.offset&&(t.unshift(o.comment),this.leading.splice(s,1));return t},e.prototype.visitNode=function(e,t){if(!(e.type===o.Syntax.Program&&0");)t=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute(),e.push(t);return e},t.prototype.parseJSXOpeningElement=function(){var e=this.createJSXNode();this.expectJSX("<");var t=this.parseJSXElementName(),n=this.parseJSXAttributes(),o=this.matchJSX("/");return o&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new l.JSXOpeningElement(t,o,n))},t.prototype.parseJSXBoundaryElement=function(){var e=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var t=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(e,new l.JSXClosingElement(t))}var n=this.parseJSXElementName(),o=this.parseJSXAttributes(),r=this.matchJSX("/");return r&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new l.JSXOpeningElement(n,r,o))},t.prototype.parseJSXEmptyExpression=function(){var e=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(e,new l.JSXEmptyExpression)},t.prototype.parseJSXExpressionContainer=function(){var e=this.createJSXNode();this.expectJSX("{");var t;return this.matchJSX("}")?(t=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),t=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(e,new l.JSXExpressionContainer(t))},t.prototype.parseJSXChildren=function(){for(var e=[];!this.scanner.eof();){var t=this.createJSXChildNode(),n=this.nextJSXText();if(n.starte?n(e):n(55296+(e-65536>>10))+n(56320+(1023&e-65536))},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||5760<=e&&0<=[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStart:function(e){return 36===e||95===e||65<=e&&90>=e||97<=e&&122>=e||92===e||128<=e&&o.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(e))},isIdentifierPart:function(e){return 36===e||95===e||65<=e&&90>=e||97<=e&&122>=e||48<=e&&57>=e||92===e||128<=e&&o.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(e))},isDecimalDigit:function(e){return 48<=e&&57>=e},isHexDigit:function(e){return 48<=e&&57>=e||65<=e&&70>=e||97<=e&&102>=e},isOctalDigit:function(e){return 48<=e&&55>=e}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(6),r=function(){return function(e){this.type=o.JSXSyntax.JSXClosingElement,this.name=e}}();t.JSXClosingElement=r;var i=function(){return function(e,t,n){this.type=o.JSXSyntax.JSXElement,this.openingElement=e,this.children=t,this.closingElement=n}}();t.JSXElement=i;var s=function(){return function(){this.type=o.JSXSyntax.JSXEmptyExpression}}();t.JSXEmptyExpression=s;var l=function(){return function(e){this.type=o.JSXSyntax.JSXExpressionContainer,this.expression=e}}();t.JSXExpressionContainer=l;var d=function(){return function(e){this.type=o.JSXSyntax.JSXIdentifier,this.name=e}}();t.JSXIdentifier=d;var c=function(){return function(e,t){this.type=o.JSXSyntax.JSXMemberExpression,this.object=e,this.property=t}}();t.JSXMemberExpression=c;var p=function(){return function(e,t){this.type=o.JSXSyntax.JSXAttribute,this.name=e,this.value=t}}();t.JSXAttribute=p;var u=function(){return function(e,t){this.type=o.JSXSyntax.JSXNamespacedName,this.namespace=e,this.name=t}}();t.JSXNamespacedName=u;var m=function(){return function(e,t,n){this.type=o.JSXSyntax.JSXOpeningElement,this.name=e,this.selfClosing=t,this.attributes=n}}();t.JSXOpeningElement=m;var h=function(){return function(e){this.type=o.JSXSyntax.JSXSpreadAttribute,this.argument=e}}();t.JSXSpreadAttribute=h;var g=function(){return function(e,t){this.type=o.JSXSyntax.JSXText,this.value=e,this.raw=t}}();t.JSXText=g},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),r=function(){return function(e){this.type=o.Syntax.ArrayExpression,this.elements=e}}();t.ArrayExpression=r;var i=function(){return function(e){this.type=o.Syntax.ArrayPattern,this.elements=e}}();t.ArrayPattern=i;var s=function(){return function(e,t,n){this.type=o.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n,this.async=!1}}();t.ArrowFunctionExpression=s;var l=function(){return function(e,t,n){this.type=o.Syntax.AssignmentExpression,this.operator=e,this.left=t,this.right=n}}();t.AssignmentExpression=l;var d=function(){return function(e,t){this.type=o.Syntax.AssignmentPattern,this.left=e,this.right=t}}();t.AssignmentPattern=d;var c=function(){return function(e,t,n){this.type=o.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n,this.async=!0}}();t.AsyncArrowFunctionExpression=c;var p=function(){return function(e,t,n){this.type=o.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=n,this.generator=!1,this.expression=!1,this.async=!0}}();t.AsyncFunctionDeclaration=p;var u=function(){return function(e,t,n){this.type=o.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=n,this.generator=!1,this.expression=!1,this.async=!0}}();t.AsyncFunctionExpression=u;var m=function(){return function(e){this.type=o.Syntax.AwaitExpression,this.argument=e}}();t.AwaitExpression=m;var h=function(){return function(e,t,n){this.type="||"===e||"&&"===e?o.Syntax.LogicalExpression:o.Syntax.BinaryExpression,this.operator=e,this.left=t,this.right=n}}();t.BinaryExpression=h;var g=function(){return function(e){this.type=o.Syntax.BlockStatement,this.body=e}}();t.BlockStatement=g;var f=function(){return function(e){this.type=o.Syntax.BreakStatement,this.label=e}}();t.BreakStatement=f;var y=function(){return function(e,t){this.type=o.Syntax.CallExpression,this.callee=e,this.arguments=t}}();t.CallExpression=y;var b=function(){return function(e,t){this.type=o.Syntax.CatchClause,this.param=e,this.body=t}}();t.CatchClause=b;var x=function(){return function(e){this.type=o.Syntax.ClassBody,this.body=e}}();t.ClassBody=x;var v=function(){return function(e,t,n){this.type=o.Syntax.ClassDeclaration,this.id=e,this.superClass=t,this.body=n}}();t.ClassDeclaration=v;var k=function(){return function(e,t,n){this.type=o.Syntax.ClassExpression,this.id=e,this.superClass=t,this.body=n}}();t.ClassExpression=k;var S=function(){return function(e,t){this.type=o.Syntax.MemberExpression,this.computed=!0,this.object=e,this.property=t}}();t.ComputedMemberExpression=S;var C=function(){return function(e,t,n){this.type=o.Syntax.ConditionalExpression,this.test=e,this.consequent=t,this.alternate=n}}();t.ConditionalExpression=C;var w=function(){return function(e){this.type=o.Syntax.ContinueStatement,this.label=e}}();t.ContinueStatement=w;var T=function(){return function(){this.type=o.Syntax.DebuggerStatement}}();t.DebuggerStatement=T;var E=function(){return function(e,t){this.type=o.Syntax.ExpressionStatement,this.expression=e,this.directive=t}}();t.Directive=E;var A=function(){return function(e,t){this.type=o.Syntax.DoWhileStatement,this.body=e,this.test=t}}();t.DoWhileStatement=A;var I=function(){return function(){this.type=o.Syntax.EmptyStatement}}();t.EmptyStatement=I;var N=function(){return function(e){this.type=o.Syntax.ExportAllDeclaration,this.source=e}}();t.ExportAllDeclaration=N;var L=function(){return function(e){this.type=o.Syntax.ExportDefaultDeclaration,this.declaration=e}}();t.ExportDefaultDeclaration=L;var _=function(){return function(e,t,n){this.type=o.Syntax.ExportNamedDeclaration,this.declaration=e,this.specifiers=t,this.source=n}}();t.ExportNamedDeclaration=_;var M=function(){return function(e,t){this.type=o.Syntax.ExportSpecifier,this.exported=t,this.local=e}}();t.ExportSpecifier=M;var O=function(){return function(e){this.type=o.Syntax.ExpressionStatement,this.expression=e}}();t.ExpressionStatement=O;var D=function(){return function(e,t,n){this.type=o.Syntax.ForInStatement,this.left=e,this.right=t,this.body=n,this.each=!1}}();t.ForInStatement=D;var R=function(){return function(e,t,n){this.type=o.Syntax.ForOfStatement,this.left=e,this.right=t,this.body=n}}();t.ForOfStatement=R;var P=function(){return function(e,t,n,r){this.type=o.Syntax.ForStatement,this.init=e,this.test=t,this.update=n,this.body=r}}();t.ForStatement=P;var F=function(){return function(e,t,n,r){this.type=o.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=n,this.generator=r,this.expression=!1,this.async=!1}}();t.FunctionDeclaration=F;var B=function(){return function(e,t,n,r){this.type=o.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=n,this.generator=r,this.expression=!1,this.async=!1}}();t.FunctionExpression=B;var U=function(){return function(e){this.type=o.Syntax.Identifier,this.name=e}}();t.Identifier=U;var V=function(){return function(e,t,n){this.type=o.Syntax.IfStatement,this.test=e,this.consequent=t,this.alternate=n}}();t.IfStatement=V;var q=function(){return function(e,t){this.type=o.Syntax.ImportDeclaration,this.specifiers=e,this.source=t}}();t.ImportDeclaration=q;var j=function(){return function(e){this.type=o.Syntax.ImportDefaultSpecifier,this.local=e}}();t.ImportDefaultSpecifier=j;var W=function(){return function(e){this.type=o.Syntax.ImportNamespaceSpecifier,this.local=e}}();t.ImportNamespaceSpecifier=W;var z=function(){return function(e,t){this.type=o.Syntax.ImportSpecifier,this.local=e,this.imported=t}}();t.ImportSpecifier=z;var H=function(){return function(e,t){this.type=o.Syntax.LabeledStatement,this.label=e,this.body=t}}();t.LabeledStatement=H;var K=function(){return function(e,t){this.type=o.Syntax.Literal,this.value=e,this.raw=t}}();t.Literal=K;var G=function(){return function(e,t){this.type=o.Syntax.MetaProperty,this.meta=e,this.property=t}}();t.MetaProperty=G;var X=function(){return function(e,t,n,r,i){this.type=o.Syntax.MethodDefinition,this.key=e,this.computed=t,this.value=n,this.kind=r,this.static=i}}();t.MethodDefinition=X;var Q=function(){return function(e){this.type=o.Syntax.Program,this.body=e,this.sourceType="module"}}();t.Module=Q;var J=function(){return function(e,t){this.type=o.Syntax.NewExpression,this.callee=e,this.arguments=t}}();t.NewExpression=J;var $=function(){return function(e){this.type=o.Syntax.ObjectExpression,this.properties=e}}();t.ObjectExpression=$;var Y=function(){return function(e){this.type=o.Syntax.ObjectPattern,this.properties=e}}();t.ObjectPattern=Y;var Z=function(){return function(e,t,n,r,i,s){this.type=o.Syntax.Property,this.key=t,this.computed=n,this.value=r,this.kind=e,this.method=i,this.shorthand=s}}();t.Property=Z;var ee=function(){return function(e,t,n,r){this.type=o.Syntax.Literal,this.value=e,this.raw=t,this.regex={pattern:n,flags:r}}}();t.RegexLiteral=ee;var te=function(){return function(e){this.type=o.Syntax.RestElement,this.argument=e}}();t.RestElement=te;var ne=function(){return function(e){this.type=o.Syntax.ReturnStatement,this.argument=e}}();t.ReturnStatement=ne;var oe=function(){return function(e){this.type=o.Syntax.Program,this.body=e,this.sourceType="script"}}();t.Script=oe;var re=function(){return function(e){this.type=o.Syntax.SequenceExpression,this.expressions=e}}();t.SequenceExpression=re;var ae=function(){return function(e){this.type=o.Syntax.SpreadElement,this.argument=e}}();t.SpreadElement=ae;var ie=function(){return function(e,t){this.type=o.Syntax.MemberExpression,this.computed=!1,this.object=e,this.property=t}}();t.StaticMemberExpression=ie;var se=function(){return function(){this.type=o.Syntax.Super}}();t.Super=se;var le=function(){return function(e,t){this.type=o.Syntax.SwitchCase,this.test=e,this.consequent=t}}();t.SwitchCase=le;var de=function(){return function(e,t){this.type=o.Syntax.SwitchStatement,this.discriminant=e,this.cases=t}}();t.SwitchStatement=de;var ce=function(){return function(e,t){this.type=o.Syntax.TaggedTemplateExpression,this.tag=e,this.quasi=t}}();t.TaggedTemplateExpression=ce;var pe=function(){return function(e,t){this.type=o.Syntax.TemplateElement,this.value=e,this.tail=t}}();t.TemplateElement=pe;var ue=function(){return function(e,t){this.type=o.Syntax.TemplateLiteral,this.quasis=e,this.expressions=t}}();t.TemplateLiteral=ue;var me=function(){return function(){this.type=o.Syntax.ThisExpression}}();t.ThisExpression=me;var he=function(){return function(e){this.type=o.Syntax.ThrowStatement,this.argument=e}}();t.ThrowStatement=he;var ge=function(){return function(e,t,n){this.type=o.Syntax.TryStatement,this.block=e,this.handler=t,this.finalizer=n}}();t.TryStatement=ge;var fe=function(){return function(e,t){this.type=o.Syntax.UnaryExpression,this.operator=e,this.argument=t,this.prefix=!0}}();t.UnaryExpression=fe;var ye=function(){return function(e,t,n){this.type=o.Syntax.UpdateExpression,this.operator=e,this.argument=t,this.prefix=n}}();t.UpdateExpression=ye;var be=function(){return function(e,t){this.type=o.Syntax.VariableDeclaration,this.declarations=e,this.kind=t}}();t.VariableDeclaration=be;var xe=function(){return function(e,t){this.type=o.Syntax.VariableDeclarator,this.id=e,this.init=t}}();t.VariableDeclarator=xe;var ve=function(){return function(e,t){this.type=o.Syntax.WhileStatement,this.test=e,this.body=t}}();t.WhileStatement=ve;var ke=function(){return function(e,t){this.type=o.Syntax.WithStatement,this.object=e,this.body=t}}();t.WithStatement=ke;var Se=function(){return function(e,t){this.type=o.Syntax.YieldExpression,this.argument=e,this.delegate=t}}();t.YieldExpression=Se},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(9),r=n(10),s=n(11),l=n(7),i=n(12),d=n(2),c=n(13),p="ArrowParameterPlaceHolder",u=function(){function e(e,t,n){void 0===t&&(t={}),this.config={range:"boolean"==typeof t.range&&t.range,loc:"boolean"==typeof t.loc&&t.loc,source:null,tokens:"boolean"==typeof t.tokens&&t.tokens,comment:"boolean"==typeof t.comment&&t.comment,tolerant:"boolean"==typeof t.tolerant&&t.tolerant},this.config.loc&&t.source&&null!==t.source&&(this.config.source=t.source+""),this.delegate=n,this.errorHandler=new r.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new i.Scanner(e,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return e.prototype.throwError=function(e){for(var t=[],n=1;n>="===e||">>>="===e||"&="===e||"^="===e||"|="===e},e.prototype.isolateCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,o=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var r=e.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=t,this.context.isAssignmentTarget=n,this.context.firstCoverInitializedNameError=o,r},e.prototype.inheritCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,o=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var r=e.call(this);return this.context.isBindingElement=this.context.isBindingElement&&t,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&n,this.context.firstCoverInitializedNameError=o||this.context.firstCoverInitializedNameError,r},e.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():!this.hasLineTerminator&&(2!==this.lookahead.type&&!this.match("}")&&this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},e.prototype.parsePrimaryExpression=function(){var e=this.createNode(),t,n,o;switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),t=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(e,new l.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,s.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,n=this.nextToken(),o=this.getTokenRaw(n),t=this.finalize(e,new l.Literal(n.value,o));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,n=this.nextToken(),o=this.getTokenRaw(n),t=this.finalize(e,new l.Literal("true"===n.value,o));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,n=this.nextToken(),o=this.getTokenRaw(n),t=this.finalize(e,new l.Literal(null,o));break;case 10:t=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,t=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":t=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":t=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,n=this.nextRegexToken(),o=this.getTokenRaw(n),t=this.finalize(e,new l.RegexLiteral(n.regex,o,n.pattern,n.flags));break;default:t=this.throwUnexpectedToken(this.nextToken());}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?t=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?t=this.finalize(e,new l.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?t=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),t=this.finalize(e,new l.ThisExpression)):this.matchKeyword("class")?t=this.parseClassExpression():t=this.throwUnexpectedToken(this.nextToken()));break;default:t=this.throwUnexpectedToken(this.nextToken());}return t},e.prototype.parseSpreadElement=function(){var e=this.createNode();this.expect("...");var t=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(e,new l.SpreadElement(t))},e.prototype.parseArrayInitializer=function(){var e=this.createNode(),t=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),t.push(null);else if(this.match("...")){var n=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),t.push(n)}else t.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(e,new l.ArrayExpression(t))},e.prototype.parsePropertyMethod=function(e){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var t=this.context.strict,n=this.context.allowStrictDirective;this.context.allowStrictDirective=e.simple;var o=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&e.firstRestricted&&this.tolerateUnexpectedToken(e.firstRestricted,e.message),this.context.strict&&e.stricted&&this.tolerateUnexpectedToken(e.stricted,e.message),this.context.strict=t,this.context.allowStrictDirective=n,o},e.prototype.parsePropertyMethodFunction=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!1;var n=this.parseFormalParameters(),o=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new l.FunctionExpression(null,n.params,o,!1))},e.prototype.parsePropertyMethodAsyncFunction=function(){var e=this.createNode(),t=this.context.allowYield,n=this.context.await;this.context.allowYield=!1,this.context.await=!0;var o=this.parseFormalParameters(),r=this.parsePropertyMethod(o);return this.context.allowYield=t,this.context.await=n,this.finalize(e,new l.AsyncFunctionExpression(null,o.params,r))},e.prototype.parseObjectPropertyKey=function(){var e=this.createNode(),t=this.nextToken(),n;switch(t.type){case 8:case 6:this.context.strict&&t.octal&&this.tolerateUnexpectedToken(t,s.Messages.StrictOctalLiteral);var o=this.getTokenRaw(t);n=this.finalize(e,new l.Literal(t.value,o));break;case 3:case 1:case 5:case 4:n=this.finalize(e,new l.Identifier(t.value));break;case 7:"["===t.value?(n=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):n=this.throwUnexpectedToken(t);break;default:n=this.throwUnexpectedToken(t);}return n},e.prototype.isPropertyKey=function(e,t){return e.type===d.Syntax.Identifier&&e.name===t||e.type===d.Syntax.Literal&&e.value===t},e.prototype.parseObjectProperty=function(e){var t=this.createNode(),n=this.lookahead,o=null,r=null,i=!1,d=!1,c=!1,p=!1,u;if(3===n.type){var m=n.value;this.nextToken(),i=this.match("["),p=!this.hasLineTerminator&&"async"===m&&!this.match(":")&&!this.match("(")&&!this.match("*"),o=p?this.parseObjectPropertyKey():this.finalize(t,new l.Identifier(m))}else this.match("*")?this.nextToken():(i=this.match("["),o=this.parseObjectPropertyKey());var h=this.qualifiedPropertyName(this.lookahead);if(3===n.type&&!p&&"get"===n.value&&h)u="get",i=this.match("["),o=this.parseObjectPropertyKey(),this.context.allowYield=!1,r=this.parseGetterMethod();else if(3===n.type&&!p&&"set"===n.value&&h)u="set",i=this.match("["),o=this.parseObjectPropertyKey(),r=this.parseSetterMethod();else if(7===n.type&&"*"===n.value&&h)u="init",i=this.match("["),o=this.parseObjectPropertyKey(),r=this.parseGeneratorMethod(),d=!0;else if(o||this.throwUnexpectedToken(this.lookahead),u="init",this.match(":")&&!p)!i&&this.isPropertyKey(o,"__proto__")&&(e.value&&this.tolerateError(s.Messages.DuplicateProtoProperty),e.value=!0),this.nextToken(),r=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))r=p?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),d=!0;else if(3===n.type){var m=this.finalize(t,new l.Identifier(n.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),c=!0;var g=this.isolateCoverGrammar(this.parseAssignmentExpression);r=this.finalize(t,new l.AssignmentPattern(m,g))}else c=!0,r=m}else this.throwUnexpectedToken(this.nextToken());return this.finalize(t,new l.Property(u,o,i,r,d,c))},e.prototype.parseObjectInitializer=function(){var e=this.createNode();this.expect("{");for(var t=[],n={value:!1};!this.match("}");)t.push(this.parseObjectProperty(n)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(e,new l.ObjectExpression(t))},e.prototype.parseTemplateHead=function(){o.assert(this.lookahead.head,"Template literal must start with a template head");var e=this.createNode(),t=this.nextToken(),n=t.value,r=t.cooked;return this.finalize(e,new l.TemplateElement({raw:n,cooked:r},t.tail))},e.prototype.parseTemplateElement=function(){10!==this.lookahead.type&&this.throwUnexpectedToken();var e=this.createNode(),t=this.nextToken(),n=t.value,o=t.cooked;return this.finalize(e,new l.TemplateElement({raw:n,cooked:o},t.tail))},e.prototype.parseTemplateLiteral=function(){var e=this.createNode(),t=[],n=[],o=this.parseTemplateHead();for(n.push(o);!o.tail;)t.push(this.parseExpression()),o=this.parseTemplateElement(),n.push(o);return this.finalize(e,new l.TemplateLiteral(n,t))},e.prototype.reinterpretExpressionAsPattern=function(e){switch(e.type){case d.Syntax.Identifier:case d.Syntax.MemberExpression:case d.Syntax.RestElement:case d.Syntax.AssignmentPattern:break;case d.Syntax.SpreadElement:e.type=d.Syntax.RestElement,this.reinterpretExpressionAsPattern(e.argument);break;case d.Syntax.ArrayExpression:e.type=d.Syntax.ArrayPattern;for(var t=0;t")||this.expect("=>"),e={type:p,params:[],async:!1};else{var t=this.lookahead,n=[];if(this.match("..."))e=this.parseRestElement(n),this.expect(")"),this.match("=>")||this.expect("=>"),e={type:p,params:[e],async:!1};else{var o=!1;if(this.context.isBindingElement=!0,e=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var r=[];for(this.context.isAssignmentTarget=!1,r.push(e);2!==this.lookahead.type&&!!this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var s=0;s")||this.expect("=>"),this.context.isBindingElement=!1;for(var s=0;s")&&(e.type===d.Syntax.Identifier&&"yield"===e.name&&(o=!0,e={type:p,params:[e],async:!1}),!o)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),e.type===d.Syntax.SequenceExpression)for(var s=0;s")){for(var c=0;c=o);){for(;2")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var r=e.async,i=this.reinterpretAsCoverFormalsList(e);if(i){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var c=this.context.strict,u=this.context.allowStrictDirective;this.context.allowStrictDirective=i.simple;var m=this.context.allowYield,h=this.context.await;this.context.allowYield=!0,this.context.await=r;var g=this.startNode(t);this.expect("=>");var f;if(this.match("{")){var y=this.context.allowIn;this.context.allowIn=!0,f=this.parseFunctionSourceElements(),this.context.allowIn=y}else f=this.isolateCoverGrammar(this.parseAssignmentExpression);var b=f.type!==d.Syntax.BlockStatement;this.context.strict&&i.firstRestricted&&this.throwUnexpectedToken(i.firstRestricted,i.message),this.context.strict&&i.stricted&&this.tolerateUnexpectedToken(i.stricted,i.message),e=r?this.finalize(g,new l.AsyncArrowFunctionExpression(i.params,f,b)):this.finalize(g,new l.ArrowFunctionExpression(i.params,f,b)),this.context.strict=c,this.context.allowStrictDirective=u,this.context.allowYield=m,this.context.await=h}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(s.Messages.InvalidLHSInAssignment),this.context.strict&&e.type===d.Syntax.Identifier){var x=e;this.scanner.isRestrictedWord(x.name)&&this.tolerateUnexpectedToken(n,s.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(x.name)&&this.tolerateUnexpectedToken(n,s.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(e):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1),n=this.nextToken();var v=n.value,k=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new l.AssignmentExpression(v,e,k)),this.context.firstCoverInitializedNameError=null}}return e},e.prototype.parseExpression=function(){var e=this.lookahead,t=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){for(var n=[t];2!==this.lookahead.type&&!!this.match(",");)this.nextToken(),n.push(this.isolateCoverGrammar(this.parseAssignmentExpression));t=this.finalize(this.startNode(e),new l.SequenceExpression(n))}return t},e.prototype.parseStatementListItem=function(){var e;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,4===this.lookahead.type)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,s.Messages.IllegalExportDeclaration),e=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,s.Messages.IllegalImportDeclaration),e=this.parseImportDeclaration();break;case"const":e=this.parseLexicalDeclaration({inFor:!1});break;case"function":e=this.parseFunctionDeclaration();break;case"class":e=this.parseClassDeclaration();break;case"let":e=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:e=this.parseStatement();}else e=this.parseStatement();return e},e.prototype.parseBlock=function(){var e=this.createNode();this.expect("{");for(var t=[];!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.finalize(e,new l.BlockStatement(t))},e.prototype.parseLexicalBinding=function(e,t){var n=this.createNode(),o=this.parsePattern([],e);this.context.strict&&o.type===d.Syntax.Identifier&&this.scanner.isRestrictedWord(o.name)&&this.tolerateError(s.Messages.StrictVarName);var r=null;return"const"===e?!this.matchKeyword("in")&&!this.matchContextualKeyword("of")&&(this.match("=")?(this.nextToken(),r=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(s.Messages.DeclarationMissingInitializer,"const")):(!t.inFor&&o.type!==d.Syntax.Identifier||this.match("="))&&(this.expect("="),r=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(n,new l.VariableDeclarator(o,r))},e.prototype.parseBindingList=function(e,t){for(var n=[this.parseLexicalBinding(e,t)];this.match(",");)this.nextToken(),n.push(this.parseLexicalBinding(e,t));return n},e.prototype.isLexicalDeclaration=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.scanner.lex();return this.scanner.restoreState(e),3===t.type||7===t.type&&"["===t.value||7===t.type&&"{"===t.value||4===t.type&&"let"===t.value||4===t.type&&"yield"===t.value},e.prototype.parseLexicalDeclaration=function(e){var t=this.createNode(),n=this.nextToken().value;o.assert("let"===n||"const"===n,"Lexical declaration must be either let or const");var r=this.parseBindingList(n,e);return this.consumeSemicolon(),this.finalize(t,new l.VariableDeclaration(r,n))},e.prototype.parseBindingRestElement=function(e,t){var n=this.createNode();this.expect("...");var o=this.parsePattern(e,t);return this.finalize(n,new l.RestElement(o))},e.prototype.parseArrayPattern=function(e,t){var n=this.createNode();this.expect("[");for(var o=[];!this.match("]");)if(this.match(","))this.nextToken(),o.push(null);else{if(this.match("...")){o.push(this.parseBindingRestElement(e,t));break}else o.push(this.parsePatternWithDefault(e,t));this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(n,new l.ArrayPattern(o))},e.prototype.parsePropertyPattern=function(e,t){var n=this.createNode(),o=!1,r=!1,i,s;if(3===this.lookahead.type){var d=this.lookahead;i=this.parseVariableIdentifier();var c=this.finalize(n,new l.Identifier(d.value));if(this.match("=")){e.push(d),r=!0,this.nextToken();var p=this.parseAssignmentExpression();s=this.finalize(this.startNode(d),new l.AssignmentPattern(c,p))}else this.match(":")?(this.expect(":"),s=this.parsePatternWithDefault(e,t)):(e.push(d),r=!0,s=c)}else o=this.match("["),i=this.parseObjectPropertyKey(),this.expect(":"),s=this.parsePatternWithDefault(e,t);return this.finalize(n,new l.Property("init",i,o,s,!1,r))},e.prototype.parseObjectPattern=function(e,t){var n=this.createNode(),o=[];for(this.expect("{");!this.match("}");)o.push(this.parsePropertyPattern(e,t)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(n,new l.ObjectPattern(o))},e.prototype.parsePattern=function(e,t){var n;return this.match("[")?n=this.parseArrayPattern(e,t):this.match("{")?n=this.parseObjectPattern(e,t):(this.matchKeyword("let")&&("const"===t||"let"===t)&&this.tolerateUnexpectedToken(this.lookahead,s.Messages.LetInLexicalBinding),e.push(this.lookahead),n=this.parseVariableIdentifier(t)),n},e.prototype.parsePatternWithDefault=function(e,t){var n=this.lookahead,o=this.parsePattern(e,t);if(this.match("=")){this.nextToken();var r=this.context.allowYield;this.context.allowYield=!0;var i=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=r,o=this.finalize(this.startNode(n),new l.AssignmentPattern(o,i))}return o},e.prototype.parseVariableIdentifier=function(e){var t=this.createNode(),n=this.nextToken();return 4===n.type&&"yield"===n.value?this.context.strict?this.tolerateUnexpectedToken(n,s.Messages.StrictReservedWord):!this.context.allowYield&&this.throwUnexpectedToken(n):3===n.type?(this.context.isModule||this.context.await)&&3===n.type&&"await"===n.value&&this.tolerateUnexpectedToken(n):this.context.strict&&4===n.type&&this.scanner.isStrictModeReservedWord(n.value)?this.tolerateUnexpectedToken(n,s.Messages.StrictReservedWord):(this.context.strict||"let"!==n.value||"var"!==e)&&this.throwUnexpectedToken(n),this.finalize(t,new l.Identifier(n.value))},e.prototype.parseVariableDeclaration=function(e){var t=this.createNode(),n=this.parsePattern([],"var");this.context.strict&&n.type===d.Syntax.Identifier&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(s.Messages.StrictVarName);var o=null;return this.match("=")?(this.nextToken(),o=this.isolateCoverGrammar(this.parseAssignmentExpression)):n.type!==d.Syntax.Identifier&&!e.inFor&&this.expect("="),this.finalize(t,new l.VariableDeclarator(n,o))},e.prototype.parseVariableDeclarationList=function(e){var t={inFor:e.inFor},n=[];for(n.push(this.parseVariableDeclaration(t));this.match(",");)this.nextToken(),n.push(this.parseVariableDeclaration(t));return n},e.prototype.parseVariableStatement=function(){var e=this.createNode();this.expectKeyword("var");var t=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(e,new l.VariableDeclaration(t,"var"))},e.prototype.parseEmptyStatement=function(){var e=this.createNode();return this.expect(";"),this.finalize(e,new l.EmptyStatement)},e.prototype.parseExpressionStatement=function(){var e=this.createNode(),t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new l.ExpressionStatement(t))},e.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(s.Messages.StrictFunction),this.parseStatement()},e.prototype.parseIfStatement=function(){var e=this.createNode(),t=null,n;this.expectKeyword("if"),this.expect("(");var o=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),n=this.finalize(this.createNode(),new l.EmptyStatement)):(this.expect(")"),n=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),t=this.parseIfClause())),this.finalize(e,new l.IfStatement(o,n,t))},e.prototype.parseDoWhileStatement=function(){var e=this.createNode();this.expectKeyword("do");var t=this.context.inIteration;this.context.inIteration=!0;var n=this.parseStatement();this.context.inIteration=t,this.expectKeyword("while"),this.expect("(");var o=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(e,new l.DoWhileStatement(n,o))},e.prototype.parseWhileStatement=function(){var e=this.createNode(),t;this.expectKeyword("while"),this.expect("(");var n=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),t=this.finalize(this.createNode(),new l.EmptyStatement);else{this.expect(")");var o=this.context.inIteration;this.context.inIteration=!0,t=this.parseStatement(),this.context.inIteration=o}return this.finalize(e,new l.WhileStatement(n,t))},e.prototype.parseForStatement=function(){var e=null,t=null,n=null,o=!0,r=this.createNode(),i,c;if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){e=this.createNode(),this.nextToken();var p=this.context.allowIn;this.context.allowIn=!1;var u=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=p,1===u.length&&this.matchKeyword("in")){var m=u[0];m.init&&(m.id.type===d.Syntax.ArrayPattern||m.id.type===d.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(s.Messages.ForInOfLoopInitializer,"for-in"),e=this.finalize(e,new l.VariableDeclaration(u,"var")),this.nextToken(),i=e,c=this.parseExpression(),e=null}else 1===u.length&&null===u[0].init&&this.matchContextualKeyword("of")?(e=this.finalize(e,new l.VariableDeclaration(u,"var")),this.nextToken(),i=e,c=this.parseAssignmentExpression(),e=null,o=!1):(e=this.finalize(e,new l.VariableDeclaration(u,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){e=this.createNode();var h=this.nextToken().value;if(!this.context.strict&&"in"===this.lookahead.value)e=this.finalize(e,new l.Identifier(h)),this.nextToken(),i=e,c=this.parseExpression(),e=null;else{var p=this.context.allowIn;this.context.allowIn=!1;var u=this.parseBindingList(h,{inFor:!0});this.context.allowIn=p,1===u.length&&null===u[0].init&&this.matchKeyword("in")?(e=this.finalize(e,new l.VariableDeclaration(u,h)),this.nextToken(),i=e,c=this.parseExpression(),e=null):1===u.length&&null===u[0].init&&this.matchContextualKeyword("of")?(e=this.finalize(e,new l.VariableDeclaration(u,h)),this.nextToken(),i=e,c=this.parseAssignmentExpression(),e=null,o=!1):(this.consumeSemicolon(),e=this.finalize(e,new l.VariableDeclaration(u,h)))}}else{var g=this.lookahead,p=this.context.allowIn;if(this.context.allowIn=!1,e=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=p,this.matchKeyword("in"))this.context.isAssignmentTarget&&e.type!==d.Syntax.AssignmentExpression||this.tolerateError(s.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(e),i=e,c=this.parseExpression(),e=null;else if(this.matchContextualKeyword("of"))this.context.isAssignmentTarget&&e.type!==d.Syntax.AssignmentExpression||this.tolerateError(s.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(e),i=e,c=this.parseAssignmentExpression(),e=null,o=!1;else{if(this.match(",")){for(var f=[e];this.match(",");)this.nextToken(),f.push(this.isolateCoverGrammar(this.parseAssignmentExpression));e=this.finalize(this.startNode(g),new l.SequenceExpression(f))}this.expect(";")}}"undefined"==typeof i&&(!this.match(";")&&(t=this.parseExpression()),this.expect(";"),!this.match(")")&&(n=this.parseExpression()));var y;if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),y=this.finalize(this.createNode(),new l.EmptyStatement);else{this.expect(")");var b=this.context.inIteration;this.context.inIteration=!0,y=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=b}return"undefined"==typeof i?this.finalize(r,new l.ForStatement(e,t,n,y)):o?this.finalize(r,new l.ForInStatement(i,c,y)):this.finalize(r,new l.ForOfStatement(i,c,y))},e.prototype.parseContinueStatement=function(){var e=this.createNode();this.expectKeyword("continue");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier();t=n;var o="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,o)||this.throwError(s.Messages.UnknownLabel,n.name)}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.throwError(s.Messages.IllegalContinue),this.finalize(e,new l.ContinueStatement(t))},e.prototype.parseBreakStatement=function(){var e=this.createNode();this.expectKeyword("break");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier(),o="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,o)||this.throwError(s.Messages.UnknownLabel,n.name),t=n}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.context.inSwitch||this.throwError(s.Messages.IllegalBreak),this.finalize(e,new l.BreakStatement(t))},e.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(s.Messages.IllegalReturn);var e=this.createNode();this.expectKeyword("return");var t=!this.match(";")&&!this.match("}")&&!this.hasLineTerminator&&2!==this.lookahead.type,n=t?this.parseExpression():null;return this.consumeSemicolon(),this.finalize(e,new l.ReturnStatement(n))},e.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(s.Messages.StrictModeWith);var e=this.createNode(),t;this.expectKeyword("with"),this.expect("(");var n=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),t=this.finalize(this.createNode(),new l.EmptyStatement)):(this.expect(")"),t=this.parseStatement()),this.finalize(e,new l.WithStatement(n,t))},e.prototype.parseSwitchCase=function(){var e=this.createNode(),t;this.matchKeyword("default")?(this.nextToken(),t=null):(this.expectKeyword("case"),t=this.parseExpression()),this.expect(":");for(var n=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)n.push(this.parseStatementListItem());return this.finalize(e,new l.SwitchCase(t,n))},e.prototype.parseSwitchStatement=function(){var e=this.createNode();this.expectKeyword("switch"),this.expect("(");var t=this.parseExpression();this.expect(")");var n=this.context.inSwitch;this.context.inSwitch=!0;var o=[],r=!1;for(this.expect("{");!this.match("}");){var i=this.parseSwitchCase();null===i.test&&(r&&this.throwError(s.Messages.MultipleDefaultsInSwitch),r=!0),o.push(i)}return this.expect("}"),this.context.inSwitch=n,this.finalize(e,new l.SwitchStatement(t,o))},e.prototype.parseLabelledStatement=function(){var e=this.createNode(),t=this.parseExpression(),n;if(t.type===d.Syntax.Identifier&&this.match(":")){this.nextToken();var o=t,r="$"+o.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)&&this.throwError(s.Messages.Redeclaration,"Label",o.name),this.context.labelSet[r]=!0;var i;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),i=this.parseClassDeclaration();else if(this.matchKeyword("function")){var c=this.lookahead,p=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(c,s.Messages.StrictFunction):p.generator&&this.tolerateUnexpectedToken(c,s.Messages.GeneratorInLegacyContext),i=p}else i=this.parseStatement();delete this.context.labelSet[r],n=new l.LabeledStatement(o,i)}else this.consumeSemicolon(),n=new l.ExpressionStatement(t);return this.finalize(e,n)},e.prototype.parseThrowStatement=function(){var e=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(s.Messages.NewlineAfterThrow);var t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new l.ThrowStatement(t))},e.prototype.parseCatchClause=function(){var e=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var t=[],n=this.parsePattern(t),o={},r=0,i;r=this.length},e.prototype.throwUnexpectedToken=function(e){return void 0===e&&(e=d.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.tolerateUnexpectedToken=function(e){void 0===e&&(e=d.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.skipSingleLineComment=function(e){var t=[],n,o;for(this.trackComment&&(t=[],n=this.index-e,o={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{}});!this.eof();){var r=this.source.charCodeAt(this.index);if(++this.index,l.Character.isLineTerminator(r)){if(this.trackComment){o.end={line:this.lineNumber,column:this.index-this.lineStart-1};var i={multiLine:!1,slice:[n+e,this.index-1],range:[n,this.index-1],loc:o};t.push(i)}return 13===r&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t}}if(this.trackComment){o.end={line:this.lineNumber,column:this.index-this.lineStart};var i={multiLine:!1,slice:[n+e,this.index],range:[n,this.index],loc:o};t.push(i)}return t},e.prototype.skipMultiLineComment=function(){var e=[],t,n;for(this.trackComment&&(e=[],t=this.index-2,n={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var o=this.source.charCodeAt(this.index);if(l.Character.isLineTerminator(o))13===o&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===o){if(47===this.source.charCodeAt(this.index+1)){if(this.index+=2,this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart};var r={multiLine:!0,slice:[t+2,this.index-2],range:[t,this.index],loc:n};e.push(r)}return e}++this.index}else++this.index}if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart};var r={multiLine:!0,slice:[t+2,this.index],range:[t,this.index],loc:n};e.push(r)}return this.tolerateUnexpectedToken(),e},e.prototype.scanComments=function(){var e;this.trackComment&&(e=[]);for(var t=0===this.index,n;!this.eof();)if(n=this.source.charCodeAt(this.index),l.Character.isWhiteSpace(n))++this.index;else if(l.Character.isLineTerminator(n))++this.index,13===n&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t=!0;else if(47===n){if(n=this.source.charCodeAt(this.index+1),47===n){this.index+=2;var o=this.skipSingleLineComment(2);this.trackComment&&(e=e.concat(o)),t=!0}else if(42===n){this.index+=2;var o=this.skipMultiLineComment();this.trackComment&&(e=e.concat(o))}else break;}else if(t&&45===n){if(45===this.source.charCodeAt(this.index+1)&&62===this.source.charCodeAt(this.index+2)){this.index+=3;var o=this.skipSingleLineComment(3);this.trackComment&&(e=e.concat(o))}else break;}else if(60!==n)break;else if("!--"===this.source.slice(this.index+1,this.index+4)){this.index+=4;var o=this.skipSingleLineComment(4);this.trackComment&&(e=e.concat(o))}else break;return e},e.prototype.isFutureReservedWord=function(e){return"enum"===e||"export"===e||"import"===e||"super"===e},e.prototype.isStrictModeReservedWord=function(e){return"implements"===e||"interface"===e||"package"===e||"private"===e||"protected"===e||"public"===e||"static"===e||"yield"===e||"let"===e},e.prototype.isRestrictedWord=function(e){return"eval"===e||"arguments"===e},e.prototype.isKeyword=function(e){switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1;}},e.prototype.codePointAt=function(e){var t=this.source.charCodeAt(e);if(55296<=t&&56319>=t){var n=this.source.charCodeAt(e+1);if(56320<=n&&57343>=n){var o=t;t=1024*(o-55296)+n-56320+65536}}return t},e.prototype.scanHexEscape=function(e){for(var t="u"===e?4:2,o=0,s=0;st)return this.index=e,this.getComplexIdentifier();if(l.Character.isIdentifierPart(t))++this.index;else break}return this.source.slice(e,this.index)},e.prototype.getComplexIdentifier=function(){var e=this.codePointAt(this.index),t=l.Character.fromCodePoint(e);this.index+=t.length;var n;for(92===e&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,n=this.scanUnicodeCodePointEscape()):(n=this.scanHexEscape("u"),(null===n||"\\"===n||!l.Character.isIdentifierStart(n.charCodeAt(0)))&&this.throwUnexpectedToken()),t=n);!this.eof()&&(e=this.codePointAt(this.index),!!l.Character.isIdentifierPart(e));)n=l.Character.fromCodePoint(e),t+=n,this.index+=n.length,92===e&&(t=t.substr(0,t.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,n=this.scanUnicodeCodePointEscape()):(n=this.scanHexEscape("u"),(null===n||"\\"===n||!l.Character.isIdentifierPart(n.charCodeAt(0)))&&this.throwUnexpectedToken()),t+=n);return t},e.prototype.octalToDecimal=function(e){var t="0"!==e,n=i(e);return!this.eof()&&l.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(t=!0,n=8*n+i(this.source[this.index++]),0<="0123".indexOf(e)&&!this.eof()&&l.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(n=8*n+i(this.source[this.index++]))),{code:n,octal:t}},e.prototype.scanIdentifier=function(){var e=this.index,t=92===this.source.charCodeAt(e)?this.getComplexIdentifier():this.getIdentifier(),n;if(n=1===t.length?3:this.isKeyword(t)?4:"null"===t?5:"true"===t||"false"===t?1:3,3!==n&&e+t.length!==this.index){var o=this.index;this.index=e,this.tolerateUnexpectedToken(d.Messages.InvalidEscapedReservedWord),this.index=o}return{type:n,value:t,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanPunctuator=function(){var e=this.index,t=this.source[this.index];return"("===t||"{"===t?("{"===t&&this.curlyStack.push("{"),++this.index):"."===t?(++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,t="...")):"}"===t?(++this.index,this.curlyStack.pop()):")"===t||";"===t||","===t||"["===t||"]"===t||":"===t||"?"===t||"~"===t?++this.index:(t=this.source.substr(this.index,4),">>>="===t?this.index+=4:(t=t.substr(0,3),"==="===t||"!=="===t||">>>"===t||"<<="===t||">>="===t||"**="===t?this.index+=3:(t=t.substr(0,2),"&&"===t||"||"===t||"=="===t||"!="===t||"+="===t||"-="===t||"*="===t||"/="===t||"++"===t||"--"===t||"<<"===t||">>"===t||"&="===t||"|="===t||"^="===t||"%="===t||"<="===t||">="===t||"=>"===t||"**"===t?this.index+=2:(t=this.source[this.index],0<="<>=!+-*%&|^/".indexOf(t)&&++this.index)))),this.index===e&&this.throwUnexpectedToken(),{type:7,value:t,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanHexLiteral=function(e){for(var t="";!this.eof()&&!!l.Character.isHexDigit(this.source.charCodeAt(this.index));)t+=this.source[this.index++];return 0===t.length&&this.throwUnexpectedToken(),l.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+t,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanBinaryLiteral=function(e){for(var t="",n;!this.eof()&&(n=this.source[this.index],"0"===n||"1"===n);)t+=this.source[this.index++];return 0===t.length&&this.throwUnexpectedToken(),this.eof()||(n=this.source.charCodeAt(this.index),(l.Character.isIdentifierStart(n)||l.Character.isDecimalDigit(n))&&this.throwUnexpectedToken()),{type:6,value:parseInt(t,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanOctalLiteral=function(e,t){var n="",o=!1;for(l.Character.isOctalDigit(e.charCodeAt(0))?(o=!0,n="0"+this.source[this.index++]):++this.index;!this.eof()&&!!l.Character.isOctalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];return o||0!==n.length||this.throwUnexpectedToken(),(l.Character.isIdentifierStart(this.source.charCodeAt(this.index))||l.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(n,8),octal:o,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.isImplicitOctalLiteral=function(){for(var e=this.index+1,t;e=s?n(s):o}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,o));try{RegExp(r)}catch(t){this.throwUnexpectedToken(d.Messages.InvalidRegExp)}try{return new RegExp(e,t)}catch(e){return null}},e.prototype.scanRegExpBody=function(){var e=this.source[this.index];s.assert("/"===e,"Regular expression literal must start with a slash");for(var t=this.source[this.index++],n=!1,o=!1;!this.eof();)if(e=this.source[this.index++],t+=e,"\\"===e)e=this.source[this.index++],l.Character.isLineTerminator(e.charCodeAt(0))&&this.throwUnexpectedToken(d.Messages.UnterminatedRegExp),t+=e;else if(l.Character.isLineTerminator(e.charCodeAt(0)))this.throwUnexpectedToken(d.Messages.UnterminatedRegExp);else if(n)"]"===e&&(n=!1);else if("/"===e){o=!0;break}else"["===e&&(n=!0);return o||this.throwUnexpectedToken(d.Messages.UnterminatedRegExp),t.substr(1,t.length-2)},e.prototype.scanRegExpFlags=function(){for(var e="",t="",n;!this.eof()&&(n=this.source[this.index],!!l.Character.isIdentifierPart(n.charCodeAt(0)));)if(++this.index,"\\"!==n||this.eof())t+=n,e+=n;else if(n=this.source[this.index],"u"===n){++this.index;var o=this.index,r=this.scanHexEscape("u");if(null!==r)for(t+=r,e+="\\u";oe&&l.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},e}();t.Scanner=c},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.TokenName={},t.TokenName[1]="Boolean",t.TokenName[2]="",t.TokenName[3]="Identifier",t.TokenName[4]="Keyword",t.TokenName[5]="Null",t.TokenName[6]="Numeric",t.TokenName[7]="Punctuator",t.TokenName[8]="String",t.TokenName[9]="RegularExpression",t.TokenName[10]="Template"},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.XHTMLEntities={quot:"\"",amp:"&",apos:"'",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",lang:"\u27E8",rang:"\u27E9"}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(10),r=n(12),i=n(13),s=function(){function e(){this.values=[],this.curly=this.paren=-1}return e.prototype.beforeFunctionExpression=function(e){return 0<=["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(e)},e.prototype.isRegexStart=function(){var e=this.values[this.values.length-1],t=null!==e;switch(e){case"this":case"]":t=!1;break;case")":var n=this.values[this.paren-1];t="if"===n||"while"===n||"for"===n||"with"===n;break;case"}":if(t=!1,"function"===this.values[this.curly-3]){var o=this.values[this.curly-4];t=!!o&&!this.beforeFunctionExpression(o)}else if("function"===this.values[this.curly-4]){var o=this.values[this.curly-5];t=!o||!this.beforeFunctionExpression(o)}break;default:}return t},e.prototype.push=function(e){7===e.type||4===e.type?("{"===e.value?this.curly=this.values.length:"("===e.value&&(this.paren=this.values.length),this.values.push(e.value)):this.values.push(null)},e}(),l=function(){function e(e,t){this.errorHandler=new o.ErrorHandler,this.errorHandler.tolerant=!!t&&"boolean"==typeof t.tolerant&&t.tolerant,this.scanner=new r.Scanner(e,this.errorHandler),this.scanner.trackComment=!!t&&"boolean"==typeof t.comment&&t.comment,this.trackRange=!!t&&"boolean"==typeof t.range&&t.range,this.trackLoc=!!t&&"boolean"==typeof t.loc&&t.loc,this.buffer=[],this.reader=new s}return e.prototype.errors=function(){return this.errorHandler.errors},e.prototype.getNextToken=function(){if(0===this.buffer.length){var t=this.scanner.scanComments();if(this.scanner.trackComment)for(var n=0;n=m&&l()},200)}),t.on(i,"focus",function(){++m})}),t.defineExtension("openNotification",function(o,r){function i(){l||(l=!0,clearTimeout(c),t.rmClass(s.parentNode,"dialog-opened"),s.parentNode.removeChild(s))}n(this,i);var s=e(this,o,r&&r.bottom),l=!1,d=r&&"undefined"!=typeof r.duration?r.duration:5e3,c;return t.on(s,"click",function(n){t.e_preventDefault(n),i()}),d&&(c=setTimeout(i,d)),i})})},"58xA":function(e,t,n){"use strict";function o(e,t){if(!(t instanceof Object))return t;switch(t.constructor){case Date:return new Date(t.getTime());case Object:void 0===e&&(e={});break;case Array:e=[];break;default:return t;}for(var n in t)t.hasOwnProperty(n)&&(e[n]=o(e[n],t[n]));return e}function r(e){return JSON.parse(e)}function i(e,t){if("object"!=typeof e||null===e)return!1;for(var n=0,o=t,r;n 4. Need to update it?");}var r=e+" failed: ";return r+=o+" argument ",r}var d=String.fromCharCode;Object.defineProperty(t,"__esModule",{value:!0});var c=n("vCxL"),p={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"},u=function(e,t){if(!e)throw m(t)},m=function(e){return new Error("Firebase Database ("+p.SDK_VERSION+") INTERNAL ASSERT FAILED: "+e)},h=function(e){for(var t=[],n=0,o=0,r;or?t[n++]=r:2048>r?(t[n++]=192|r>>6,t[n++]=128|63&r):55296==(64512&r)&&o+1>18,t[n++]=128|63&r>>12,t[n++]=128|63&r>>6,t[n++]=128|63&r):(t[n++]=224|r>>12,t[n++]=128|63&r>>6,t[n++]=128|63&r);return t},g=function(e){for(var t=[],n=0,o=0,r;nr)t[o++]=d(r);else if(191r){var i=e[n++];t[o++]=d((31&r)<<6|63&i)}else if(239r){var i=e[n++],s=e[n++],l=e[n++],c=((7&r)<<18|(63&i)<<12|(63&s)<<6|63&l)-65536;t[o++]=d(55296+(c>>10)),t[o++]=d(56320+(1023&c))}else{var i=e[n++],s=e[n++];t[o++]=d((15&r)<<12|(63&i)<<6|63&s)}return t.join("")},f={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray:function(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();for(var n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,o=[],r=0;r>6,u=63&c;d||(u=64,!s&&(p=64)),o.push(n[i>>2],n[(3&i)<<4|l>>4],n[p],n[u])}return o.join("")},encodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(h(e),t)},decodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):g(this.decodeStringToByteArray(e,t))},decodeStringToByteArray:function(e,t){this.init_();for(var n=t?this.charToByteMapWebSafe_:this.charToByteMap_,o=[],r=0;r>4),64!=c){if(o.push(240&l<<4|c>>2),64!=u){o.push(192&c<<6|u)}}}return o},init_:function(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(var e=0;e=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}},y=function(e){try{return f.decodeString(e,!0)}catch(t){console.error("base64Decode failed: ",t)}return null},b=function(){function e(){var e=this;this.promise=new Promise(function(t,n){e.resolve=t,e.reject=n})}return e.prototype.wrapCallback=function(e){var t=this;return function(n,o){n?t.reject(n):t.resolve(o),"function"==typeof e&&(t.promise.catch(function(){}),1===e.length?e(n):e(n,o))}},e}(),x=function(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""},v="FirebaseError",k=Error.captureStackTrace,S=function(){return function(e,t){if(this.code=e,this.message=t,k)k(this,C.prototype.create);else try{throw Error.apply(this,arguments)}catch(e){this.name=v,Object.defineProperty(this,"stack",{get:function(){return e.stack}})}}}();S.prototype=Object.create(Error.prototype),S.prototype.constructor=S,S.prototype.name=v;var C=function(){function e(e,t,n){this.service=e,this.serviceName=t,this.errors=n,this.pattern=/\{\$([^}]+)}/g}return e.prototype.create=function(e,t){void 0===t&&(t={});var n=this.errors[e],o=this.service+"/"+e,r;r=void 0===n?"Error":n.replace(this.pattern,function(e,n){var o=t[n];return void 0===o?"<"+n+"?>":o.toString()}),r=this.serviceName+": "+r+" ("+o+").";var i=new S(o,r);for(var s in t)t.hasOwnProperty(s)&&"_"!==s.slice(-1)&&(i[s]=t[s]);return i},e}(),w=function(e){var t={},n={},o={},i="";try{var s=e.split(".");t=r(y(s[0])||""),n=r(y(s[1])||""),i=s[2],o=n.d||{},delete n.d}catch(t){}return{header:t,claims:n,data:o,signature:i}},T=function(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(n,e[n])},E=function(e,t){return T(t,function(t,n){e[t]=n}),e},A=function(e,t,n){for(var o in e)if(t.call(n,e[o],o,e))return o},I=function(){return function(){this.blockSize=-1}}(),N=function(e){function t(){var t=e.call(this)||this;t.chain_=[],t.buf_=[],t.W_=[],t.pad_=[],t.inbuf_=0,t.total_=0,t.blockSize=64,t.pad_[0]=128;for(var n=1;ns;s++)r[s]=n.charCodeAt(o)<<24|n.charCodeAt(o+1)<<16|n.charCodeAt(o+2)<<8|n.charCodeAt(o+3),o+=4;else for(var s=0;16>s;s++)r[s]=n[o]<<24|n[o+1]<<16|n[o+2]<<8|n[o+3],o+=4;for(var s=16,i;80>s;s++)i=r[s-3]^r[s-8]^r[s-14]^r[s-16],r[s]=4294967295&(i<<1|i>>>31);for(var t=this.chain_[0],l=this.chain_[1],p=this.chain_[2],c=this.chain_[3],d=this.chain_[4],s=0,e,u;80>s;s++){40>s?20>s?(e=c^l&(p^c),u=1518500249):(e=l^p^c,u=1859775393):60>s?(e=l&p|c&(l|p),u=2400959708):(e=l^p^c,u=3395469782);var i=4294967295&(t<<5|t>>>27)+e+d+u+r[s];d=c,c=p,p=4294967295&(l<<30|l>>>2),l=t,t=i}this.chain_[0]=4294967295&this.chain_[0]+t,this.chain_[1]=4294967295&this.chain_[1]+l,this.chain_[2]=4294967295&this.chain_[2]+p,this.chain_[3]=4294967295&this.chain_[3]+c,this.chain_[4]=4294967295&this.chain_[4]+d},t.prototype.update=function(e,t){if(null!=e){void 0===t&&(t=e.length);for(var o=t-this.blockSize,r=0,n=this.buf_,i=this.inbuf_;rthis.inbuf_?this.update(this.pad_,56-this.inbuf_):this.update(this.pad_,this.blockSize-(this.inbuf_-56));for(var o=this.blockSize-1;56<=o;o--)this.buf_[o]=255&t,t/=256;this.compress_(this.buf_);for(var r=0,o=0;5>o;o++)for(var n=24;0<=n;n-=8)e[r]=255&this.chain_[o]>>n,++r;return e},t}(I),L=function(){function e(e,t){var n=this;this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then(function(){e(n)}).catch(function(t){n.error(t)})}return e.prototype.next=function(e){this.forEachObserver(function(t){t.next(e)})},e.prototype.error=function(e){this.forEachObserver(function(t){t.error(e)}),this.close(e)},e.prototype.complete=function(){this.forEachObserver(function(e){e.complete()}),this.close()},e.prototype.subscribe=function(e,t,n){var o=this,r;if(void 0===e&&void 0===t&&void 0===n)throw new Error("Missing Observer.");r=i(e,["next","error","complete"])?e:{next:e,error:t,complete:n},void 0===r.next&&(r.next=s),void 0===r.error&&(r.error=s),void 0===r.complete&&(r.complete=s);var l=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(function(){try{o.finalError?r.error(o.finalError):r.complete()}catch(t){}}),this.observers.push(r),l},e.prototype.unsubscribeOne=function(e){void 0===this.observers||void 0===this.observers[e]||(delete this.observers[e],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))},e.prototype.forEachObserver=function(e){if(!this.finalized)for(var t=0;t=o&&n<=r},t.clone=function(e){return E({},e)},t.contains=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.every=function(e,t){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&!t(n,e[n]))return!1;return!0},t.extend=E,t.findKey=A,t.findValue=function(e,t,n){var o=A(e,t,n);return o&&e[o]},t.forEach=T,t.getAnyKey=function(e){for(var t in e)return t},t.getCount=function(e){var t=0;for(var n in e)t++;return t},t.getValues=function(e){var t=[],n=0;for(var o in e)t[n++]=e[o];return t},t.isEmpty=function(e){for(var t in e)return!1;return!0},t.isNonNullObject=function(e){return"object"==typeof e&&null!==e},t.map=function(e,t,n){var o={};for(var r in e)o[r]=t.call(n,e[r],r,e);return o},t.safeGet=function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]},t.querystring=function(e){var t=[];return T(e,function(e,n){Array.isArray(n)?n.forEach(function(n){t.push(encodeURIComponent(e)+"="+encodeURIComponent(n))}):t.push(encodeURIComponent(e)+"="+encodeURIComponent(n))}),t.length?"&"+t.join("&"):""},t.querystringDecode=function(e){var t={},n=e.replace(/^\?/,"").split("&");return n.forEach(function(e){if(e){var n=e.split("=");t[n[0]]=n[1]}}),t},t.Sha1=N,t.async=function(e,t){return function(){for(var n=[],o=0;on&&(r=0===n?"none":"no more than "+n),r){var i=e+" failed: Was called with "+o+(1===o?" argument.":" arguments.")+" Expects "+r+".";throw new Error(i)}},t.validateCallback=function(e,t,n,o){if((!o||n)&&"function"!=typeof n)throw new Error(l(e,t,o)+"must be a valid function.")},t.validateContextObject=function(e,t,n,o){if((!o||n)&&("object"!=typeof n||null===n))throw new Error(l(e,t,o)+"must be a valid context object.")},t.validateNamespace=function(e,t,n,o){if((!o||n)&&"string"!=typeof n)throw new Error(l(e,t,o)+"must be a valid firebase namespace.")},t.stringLength=function(e){for(var t=0,n=0,o;no?t++:2048>o?t+=2:55296<=o&&56319>=o?(t+=4,n++):t+=3;return t},t.stringToByteArray=function(e){for(var t=[],n=0,o=0,r;o=r){var i=r-55296;o++,u(or?t[n++]=r:2048>r?(t[n++]=192|r>>6,t[n++]=128|63&r):65536>r?(t[n++]=224|r>>12,t[n++]=128|63&r>>6,t[n++]=128|63&r):(t[n++]=240|r>>18,t[n++]=128|63&r>>12,t[n++]=128|63&r>>6,t[n++]=128|63&r)}return t}},"5E0L":function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=function(){function e(e,t){for(var n=0,o;nr)){for(var s=null,l=o.line+1,i=n.lastLine(),d;l<=i;++l)if(d=t(n,l),-1==d);else if(d>r)s=l;else break;if(s)return{from:e.Pos(o.line,n.getLine(o.line).length),to:e.Pos(s,n.getLine(s).length)}}})})},"6r0S":function(e,t,n){"use strict";(function(e){e(n("tQq4"))})(function(e){function t(t,n){for(var o=0,r=t.length;oi.ch&&(d.end=i.ch,d.string=d.string.slice(0,i.ch-d.start)):d={start:i.ch,end:i.ch,string:"",state:d.state,type:"."==d.string?"property":null};for(var p=d;"property"==p.type;){if(p=o(t,l(i.line,p.start)),"."!=p.string)return;if(p=o(t,l(i.line,p.start)),!u)var u=[];u.push(p)}return{list:s(d,u,n,r),from:l(i.line,d.start),to:l(i.line,d.end)}}}}function r(e,t){var n=e.getTokenAt(t);return t.ch==n.start+1&&"."==n.string.charAt(0)?(n.end=n.start,n.string=".",n.type="property"):/^\.[\w$_]*$/.test(n.string)&&(n.type="property",n.start++,n.string=n.string.replace(/\./,"")),n}function i(e,t){if(!Object.getOwnPropertyNames||!Object.getPrototypeOf)for(var n in e)t(n);else for(var r=e;r;r=Object.getPrototypeOf(r))Object.getOwnPropertyNames(r).forEach(t)}function s(e,o,r,s){function l(e){0!=e.lastIndexOf(h,0)||n(m,e)||m.push(e)}function u(e){"string"==typeof e?t(d,l):e instanceof Array?t(c,l):e instanceof Function&&t(p,l),i(e,l)}var m=[],h=e.string,g=s&&s.globalScope||window;if(o&&o.length){var f=o.pop(),y;for(f.type&&0===f.type.indexOf("variable")?(s&&s.additionalContext&&(y=s.additionalContext[f.string]),(!s||!1!==s.useGlobalScope)&&(y=y||g[f.string])):"string"==f.type?y="":"atom"==f.type?y=1:"function"==f.type&&(null!=g.jQuery&&("$"==f.string||"jQuery"==f.string)&&"function"==typeof g.jQuery?y=g.jQuery():null!=g._&&"_"==f.string&&"function"==typeof g._&&(y=g._()));null!=y&&o.length;)y=y[o.pop().string];null!=y&&u(y)}else{for(var b=e.state.localVars;b;b=b.next)l(b.name);for(var b=e.state.globalVars;b;b=b.next)l(b.name);s&&!1===s.useGlobalScope||u(g),t(r,l)}return m}var l=e.Pos;e.registerHelper("hint","javascript",function(e,t){return o(e,u,function(t,e){return t.getTokenAt(e)},t)}),e.registerHelper("hint","coffeescript",function(e,t){return o(e,m,r,t)});var d=["charAt","charCodeAt","indexOf","lastIndexOf","substring","substr","slice","trim","trimLeft","trimRight","toUpperCase","toLowerCase","split","concat","match","replace","search"],c=["length","concat","join","splice","push","pop","shift","unshift","slice","reverse","sort","indexOf","lastIndexOf","every","some","filter","forEach","map","reduce","reduceRight",""],p=["prototype","apply","call","bind"],u=["break","case","catch","class","const","continue","debugger","default","delete","do","else","export","extends","false","finally","for","function","if","in","import","instanceof","new","null","return","super","switch","this","throw","true","try","typeof","var","void","while","with","yield"],m=["and","break","catch","class","continue","delete","do","else","extends","false","finally","for","if","in","instanceof","isnt","new","no","not","null","of","off","on","or","return","switch","then","throw","true","try","typeof","until","void","while","with","yes"]})},"7EAy":function(e,t){"use strict";t.__esModule=!0;var n=new Set(["a","abbr","acronym","applet","b","basefont","bdo","big","br","button","cite","code","del","dfn","em","font","i","iframe","img","input","ins","kbd","label","map","object","q","s","samp","select","small","span","strike","strong","sub","sup","textarea","tt","u","var"]),o={p:"span",ul:"li",ol:"li",table:"tr",tr:"td",tbody:"tr",thead:"tr",tfoot:"tr",colgroup:"col",select:"option",optgroup:"option",audio:"source",video:"source",object:"param",map:"area"};t.default=function(e){return e=(e||"").toLowerCase(),o[e]||(n.has(e)?"span":"div")}},"7vHL":function(e,t,n){"use strict";n("eA7g")},A9O4:function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e){if(e.eat(S))return e.start=e.pos,{count:e.eatWhile(y.isNumber)?+e.current():null}}function i(e){if((0,y.eatQuoted)(e,C))return e.current().slice(1,-1)}function s(e){var t=e.pos;if(e.eat(w)){for(var n=1,o=void 0,r="",i=e.pos;!e.eof();)if(o=e.next(),o===w)n++;else if(o!==T)o===E&&(o=e.next(),(o===w||o===T)&&(r+=e.substring(i,e.pos-2)+String.fromCharCode(o),i=e.pos));else if(n--,!n)return e.start=t,r+e.substring(i,e.pos-1);throw e.pos=t,e.error("Unable to find closing } for text start")}return null}function l(e){if(!e.eat(L))return null;for(var t=[],n=void 0,o=void 0;!e.eof();){if(e.eatWhile(y.isWhiteSpace),e.eat(_))return t;if(null!=(n=i(e)))t.push({name:null,value:n});else if(c(e))n=e.current(),M.test(n)?(o=d(n),t.push(o),e.eat(N)&&(null==(n=i(e))?null==(n=s(e))?c(e)&&(o.value=e.current()):(o.value=n,o.options={before:"{",after:"}"}):o.value=n)):t.push({name:null,value:n});else throw e.error("Expected attribute name")}throw e.error("Expected closing \"]\" brace")}function d(e){var t={};e.charCodeAt(0)===A&&(e=e.slice(1),t.implied=!0),e.charCodeAt(e.length-1)===I&&(e=e.slice(0,e.length-1),t.boolean=!0);var n={name:e};return Object.keys(t).length&&(n.options=t),n}function c(e){var t=e.pos;if(e.eatWhile(p))return e.start=t,!0}function p(e){return!(0,y.isSpace)(e)&&!(0,y.isQuote)(e)&&e!==L&&e!==_&&e!==N}function u(e){for(var t=e.pos,n=new x.default(m(e)),o=void 0;!e.eof();)if(e.eat(D))n.addClass(m(e));else if(e.eat(O))n.setAttribute("id",m(e));else if(e.eat(R)){if(n.isGroup)throw e.backUp(1),e.error("Unexpected self-closing indicator");n.selfClosing=!0,(o=r(e))&&(n.repeat=o);break}else if(o=l(e))for(var d=0,i=o.length;d","i")}function s(e,t){for(var n in e)for(var o=t[n]||(t[n]=[]),r=e[n],s=r.length-1;0<=s;s--)o.unshift(r[s])}function i(e,t){for(var n=0,r;n\s\/]/.test(o.current())&&(m=s.htmlState.tagName&&s.htmlState.tagName.toLowerCase())&&p.hasOwnProperty(m))s.inTag=m+" ";else if(s.inTag&&u&&/>$/.test(o.current())){var h=/^([\S]+) (.*)/.exec(s.inTag);s.inTag=null;var g=">"==o.current()&&i(p[h[1]],h[2]),f=e.getMode(n,g),y=r(h[1],!0),b=r(h[1],!1);s.token=function(e,n){return e.match(y,!1)?(n.token=d,n.localState=n.localMode=null,null):t(e,b,n.localMode.token(e,n.localState))},s.localMode=f,s.localState=e.startState(f,c.indent(s.htmlState,""))}else s.inTag&&(s.inTag+=o.current(),o.eol()&&(s.inTag+=" "));return l}var c=e.getMode(n,{name:"xml",htmlMode:!0,multilineTagIndentFactor:o.multilineTagIndentFactor,multilineTagIndentPastTag:o.multilineTagIndentPastTag}),p={},u=o&&o.tags,m=o&&o.scriptTypes;if(s(l,p),u&&s(u,p),m)for(var h=m.length-1;0<=h;h--)p.script.unshift(["type",m[h].matches,m[h].mode]);return{startState:function(){var t=e.startState(c);return{token:d,inTag:null,localMode:null,localState:null,htmlState:t}},copyState:function(t){var n;return t.localState&&(n=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:n,htmlState:e.copyState(c,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,n,o){return!t.localMode||/^\s*<\//.test(n)?c.indent(t.htmlState,n):t.localMode.indent?t.localMode.indent(t.localState,n,o):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||c}}}},"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")})},AhD2:function(){"use strict";var e=Math.round;(function(){function t(e){var t=getComputedStyle(e).color;if(t)try{return t.match(/(\d+), (\d+), (\d+)/).slice(1)}catch(t){return[255,255,255]}else return[255,255,255]}function n(e,t,n){var o={x:e,y:t+10,alpha:1,color:n};return 1===L?(o.size=s(2,4),o.vx=T.x[0]+Math.random()*(T.x[1]-T.x[0]),o.vy=T.y[0]+Math.random()*(T.y[1]-T.y[0])):2===L&&(o.size=s(2,8),o.drag=0.92,o.vx=s(-3,3),o.vy=s(-3,3),o.wander=0.15,o.theta=s(0,360)*m/180),o}function o(t){t.vy+=S,t.x+=t.vx,t.y+=t.vy,t.alpha*=C,O.fillStyle="rgba("+t.color[0]+","+t.color[1]+","+t.color[2]+","+t.alpha+")",O.fillRect(e(t.x-1),e(t.y-1),t.size,t.size)}function r(t){t.x+=t.vx,t.y+=t.vy,t.vx*=t.drag,t.vy*=t.drag,t.theta+=s(-0.5,0.5),t.vx+=0.1*Math.sin(t.theta),t.vy+=0.1*Math.cos(t.theta),t.size*=0.96,O.fillStyle="rgba("+t.color[0]+","+t.color[1]+","+t.color[2]+","+t.alpha+")",O.beginPath(),O.arc(e(t.x-1),e(t.y-1),t.size,0,2*m),O.fill()}function i(){for(var e=x.length,t;e--;)(t=x[e],!(!t||0.01>t.alpha||0.5>=t.size))&&(1===L?o(t):2===L&&r(t))}function s(e,t){return t||(t=e,e=0),e+~~(Math.random()*(t-e+1))}function l(e,t){var n=!1;return function(){n||(e.apply(this,arguments),n=!0,setTimeout(function(){n=!1},t))}}function d(){h&&(O.clearRect(0,0,E,w),D=new Date().getTime(),!b&&(b=D),R=(D-b)/1e3,b=D,0src:m+img","ri:t|ri:type":"pic>src:t+img","!!!":"{}",doc:"html[lang=${lang}]>(head>meta[charset=${charset}]+meta:vp+meta:edge+title{${1:Document}})+body","!|html:5":"!!!+doc",c:"{}","cc:ie":"{}","cc:noie":"{${0}}"},css:{"@f":"@font-face {\n\tfont-family: ${1};\n\tsrc: url(${1});\n}","@ff":"@font-face {\n\tfont-family: '${1:FontName}';\n\tsrc: url('${2:FileName}.eot');\n\tsrc: url('${2:FileName}.eot?#iefix') format('embedded-opentype'),\n\t\t url('${2:FileName}.woff') format('woff'),\n\t\t url('${2:FileName}.ttf') format('truetype'),\n\t\t url('${2:FileName}.svg#${1:FontName}') format('svg');\n\tfont-style: ${3:normal};\n\tfont-weight: ${4:normal};\n}","@i|@import":"@import url(${0});","@kf":"@keyframes ${1:identifier} {\n\t${2}\n}","@m|@media":"@media ${1:screen} {\n\t${0}\n}",ac:"align-content:flex-start|flex-end|center|space-between|space-around|stretch",ai:"align-items:flex-start|flex-end|center|baseline|stretch",anim:"animation:${1:name} ${2:duration} ${3:timing-function} ${4:delay} ${5:iteration-count} ${6:direction} ${7:fill-mode}",animdel:"animation-delay:${1:time}",animdir:"animation-direction:normal|reverse|alternate|alternate-reverse",animdur:"animation-duration:${1:0}s",animfm:"animation-fill-mode:both|forwards|backwards",animic:"animation-iteration-count:1|infinite",animn:"animation-name",animps:"animation-play-state:running|paused",animtf:"animation-timing-function:linear|ease|ease-in|ease-out|ease-in-out|cubic-bezier(${1:0.1}, ${2:0.7}, ${3:1.0}, ${3:0.1})",ap:"appearance:none",as:"align-self:auto|flex-start|flex-end|center|baseline|stretch",b:"bottom",bd:"border:${1:1px} ${2:solid} ${3:#000}",bdb:"border-bottom:${1:1px} ${2:solid} ${3:#000}",bdbc:"border-bottom-color:#${1:000}",bdbi:"border-bottom-image:url(${0})",bdbk:"border-break:close",bdbli:"border-bottom-left-image:url(${0})|continue",bdblrs:"border-bottom-left-radius",bdbri:"border-bottom-right-image:url(${0})|continue",bdbrrs:"border-bottom-right-radius",bdbs:"border-bottom-style",bdbw:"border-bottom-width",bdc:"border-color:#${1:000}",bdci:"border-corner-image:url(${0})|continue",bdcl:"border-collapse:collapse|separate",bdf:"border-fit:repeat|clip|scale|stretch|overwrite|overflow|space",bdi:"border-image:url(${0})",bdl:"border-left:${1:1px} ${2:solid} ${3:#000}",bdlc:"border-left-color:#${1:000}",bdlen:"border-length",bdli:"border-left-image:url(${0})",bdls:"border-left-style",bdlw:"border-left-width",bdr:"border-right:${1:1px} ${2:solid} ${3:#000}",bdrc:"border-right-color:#${1:000}",bdri:"border-right-image:url(${0})",bdrs:"border-radius",bdrst:"border-right-style",bdrw:"border-right-width",bds:"border-style:none|hidden|dotted|dashed|solid|double|dot-dash|dot-dot-dash|wave|groove|ridge|inset|outset",bdsp:"border-spacing",bdt:"border-top:${1:1px} ${2:solid} ${3:#000}",bdtc:"border-top-color:#${1:000}",bdti:"border-top-image:url(${0})",bdtli:"border-top-left-image:url(${0})|continue",bdtlrs:"border-top-left-radius",bdtri:"border-top-right-image:url(${0})|continue",bdtrrs:"border-top-right-radius",bdts:"border-top-style",bdtw:"border-top-width",bdw:"border-width",bfv:"backface-visibility:hidden|visible",bg:"background:#${1:000}",bga:"background-attachment:fixed|scroll",bgbk:"background-break:bounding-box|each-box|continuous",bgc:"background-color:#${1:fff}",bgcp:"background-clip:padding-box|border-box|content-box|no-clip",bgi:"background-image:url(${0})",bgo:"background-origin:padding-box|border-box|content-box",bgp:"background-position:${1:0} ${2:0}",bgpx:"background-position-x",bgpy:"background-position-y",bgr:"background-repeat:no-repeat|repeat-x|repeat-y|space|round",bgsz:"background-size:contain|cover",bxsh:"box-shadow:${1:inset }${2:hoff} ${3:voff} ${4:blur} #${5:000}|none",bxsz:"box-sizing:border-box|content-box|border-box",c:"color:#${1:000}",cl:"clear:both|left|right|none",cm:"/* ${0} */",cnt:"content:'${0}'|normal|open-quote|no-open-quote|close-quote|no-close-quote|attr(${0})|counter(${0})|counters({$0})",coi:"counter-increment",colm:"columns",colmc:"column-count",colmf:"column-fill",colmg:"column-gap",colmr:"column-rule",colmrc:"column-rule-color",colmrs:"column-rule-style",colmrw:"column-rule-width",colms:"column-span",colmw:"column-width",cor:"counter-reset",cp:"clip:auto|rect(${1:top} ${2:right} ${3:bottom} ${4:left})",cps:"caption-side:top|bottom",cur:"cursor:pointer|auto|default|crosshair|hand|help|move|pointer|text",d:"display:block|none|flex|inline-flex|inline|inline-block|list-item|run-in|compact|table|inline-table|table-caption|table-column|table-column-group|table-header-group|table-footer-group|table-row|table-row-group|table-cell|ruby|ruby-base|ruby-base-group|ruby-text|ruby-text-group",ec:"empty-cells:show|hide",f:"font:${1:1em} ${2:sans-serif}",fef:"font-effect:none|engrave|emboss|outline",fem:"font-emphasize",femp:"font-emphasize-position:before|after",fems:"font-emphasize-style:none|accent|dot|circle|disc",ff:"font-family:serif|sans-serif|cursive|fantasy|monospace",fl:"float:left|right|none",fs:"font-style:italic|normal|oblique",fsm:"font-smoothing:antialiased|subpixel-antialiased|none",fst:"font-stretch:normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded",fv:"font-variant:normal|small-caps",fw:"font-weight:normal|bold|bolder|lighter",fx:"flex",fxb:"flex-basis:fill|max-content|min-content|fit-content|content",fxd:"flex-direction:row|row-reverse|column|column-reverse",fxf:"flex-flow",fxg:"flex-grow",fxsh:"flex-shrink",fxw:"flex-wrap:nowrap|wrap|wrap-reverse",fz:"font-size",fza:"font-size-adjust",h:"height",jc:"justify-content:flex-start|flex-end|center|space-between|space-around",l:"left",lg:"background-image:linear-gradient(${1})",lh:"line-height",lis:"list-style",lisi:"list-style-image",lisp:"list-style-position:inside|outside",list:"list-style-type:disc|circle|square|decimal|decimal-leading-zero|lower-roman|upper-roman",lts:"letter-spacing:normal",m:"margin",mah:"max-height",mar:"max-resolution",maw:"max-width",mb:"margin-bottom",mih:"min-height",mir:"min-resolution",miw:"min-width",ml:"margin-left",mr:"margin-right",mt:"margin-top",ol:"outline",olc:"outline-color:#${1:000}|invert",olo:"outline-offset",ols:"outline-style:none|dotted|dashed|solid|double|groove|ridge|inset|outset",olw:"outline-width|thin|medium|thick",op:"opacity",ord:"order",ori:"orientation:landscape|portrait",orp:"orphans",ov:"overflow:hidden|visible|hidden|scroll|auto",ovs:"overflow-style:scrollbar|auto|scrollbar|panner|move|marquee",ovx:"overflow-x:hidden|visible|hidden|scroll|auto",ovy:"overflow-y:hidden|visible|hidden|scroll|auto",p:"padding",pb:"padding-bottom",pgba:"page-break-after:auto|always|left|right",pgbb:"page-break-before:auto|always|left|right",pgbi:"page-break-inside:auto|avoid",pl:"padding-left",pos:"position:relative|absolute|relative|fixed|static",pr:"padding-right",pt:"padding-top",q:"quotes",qen:"quotes:'\\201C' '\\201D' '\\2018' '\\2019'",qru:"quotes:'\\00AB' '\\00BB' '\\201E' '\\201C'",r:"right",rsz:"resize:none|both|horizontal|vertical",t:"top",ta:"text-align:left|center|right|justify",tal:"text-align-last:left|center|right",tbl:"table-layout:fixed",td:"text-decoration:none|underline|overline|line-through",te:"text-emphasis:none|accent|dot|circle|disc|before|after",th:"text-height:auto|font-size|text-size|max-size",ti:"text-indent",tj:"text-justify:auto|inter-word|inter-ideograph|inter-cluster|distribute|kashida|tibetan",to:"text-outline:${1:0} ${2:0} ${3:#000}",tov:"text-overflow:ellipsis|clip",tr:"text-replace",trf:"transform:${1}|skewX(${1:angle})|skewY(${1:angle})|scale(${1:x}, ${2:y})|scaleX(${1:x})|scaleY(${1:y})|scaleZ(${1:z})|scale3d(${1:x}, ${2:y}, ${3:z})|rotate(${1:angle})|rotateX(${1:angle})|rotateY(${1:angle})|rotateZ(${1:angle})|translate(${1:x}, ${2:y})|translateX(${1:x})|translateY(${1:y})|translateZ(${1:z})|translate3d(${1:tx}, ${2:ty}, ${3:tz})",trfo:"transform-origin",trfs:"transform-style:preserve-3d",trs:"transition:${1:prop} ${2:time}",trsde:"transition-delay:${1:time}",trsdu:"transition-duration:${1:time}",trsp:"transition-property:${1:prop}",trstf:"transition-timing-function:${1:fn}",tsh:"text-shadow:${1:hoff} ${2:voff} ${3:blur} ${4:#000}",tt:"text-transform:uppercase|lowercase|capitalize|none",tw:"text-wrap:none|normal|unrestricted|suppress",us:"user-select:none",v:"visibility:hidden|visible|collapse",va:"vertical-align:top|super|text-top|middle|baseline|bottom|text-bottom|sub",w:"width",whs:"white-space:nowrap|pre|pre-wrap|pre-line|normal",whsc:"white-space-collapse:normal|keep-all|loose|break-strict|break-all",wid:"widows",wm:"writing-mode:lr-tb|lr-tb|lr-bt|rl-tb|rl-bt|tb-rl|tb-lr|bt-lr|bt-rl",wob:"word-break:normal|keep-all|break-all",wos:"word-spacing",wow:"word-wrap:none|unrestricted|suppress|break-word|normal",z:"z-index",zom:"zoom:1"},xsl:{"tm|tmatch":"xsl:template[match mode]","tn|tname":"xsl:template[name]",call:"xsl:call-template[name]",ap:"xsl:apply-templates[select mode]",api:"xsl:apply-imports",imp:"xsl:import[href]",inc:"xsl:include[href]",ch:"xsl:choose","wh|xsl:when":"xsl:when[test]",ot:"xsl:otherwise",if:"xsl:if[test]",par:"xsl:param[name]",pare:"xsl:param[name select]",var:"xsl:variable[name]",vare:"xsl:variable[name select]",wp:"xsl:with-param[name select]",key:"xsl:key[name match use]",elem:"xsl:element[name]",attr:"xsl:attribute[name]",attrs:"xsl:attribute-set[name]",cp:"xsl:copy[select]",co:"xsl:copy-of[select]",val:"xsl:value-of[select]","for|each":"xsl:for-each[select]",tex:"xsl:text",com:"xsl:comment",msg:"xsl:message[terminate=no]",fall:"xsl:fallback",num:"xsl:number[value]",nam:"namespace-alias[stylesheet-prefix result-prefix]",pres:"xsl:preserve-space[elements]",strip:"xsl:strip-space[elements]",proc:"xsl:processing-instruction[name]",sort:"xsl:sort[select order]",choose:"xsl:choose>xsl:when+xsl:otherwise",xsl:"!!!+xsl:stylesheet[version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform]>{\n|}","!!!":"{}"}}},BVSg:function(e,t,n){"use strict";(function(e){e(n("tQq4"),n("1JcR"))})(function(e){function t(t){if(t.getOption("disableInput"))return e.Pass;for(var n=t.listSelections(),o=[],c=t.getOption("autoCloseTags"),p=0;pi.ch&&(b=b.slice(0,b.length-u.end+i.ch));var x=b.toLowerCase();if(!b||"string"==u.type&&(u.end!=i.ch||!/[\"\']/.test(u.string.charAt(u.string.length-1))||1==u.string.length)||"tag"==u.type&&"closeTag"==h.type||u.string.indexOf("/")==u.string.length-1||f&&-1"+(v?"\n\n":"")+"",newPos:v?e.Pos(i.line+1,0):e.Pos(i.line,i.ch+1)}}for(var k="object"==typeof c&&c.dontIndentOnAutoClose,p=n.length-1,S;0<=p;p--){S=o[p],t.replaceRange(S.text,n[p].head,n[p].anchor,"+insert");var C=t.listSelections().slice(0);C[p]={head:S.newPos,anchor:S.newPos},t.setSelections(C),!k&&S.indent&&(t.indentLine(S.newPos.line,null,!0),t.indentLine(S.newPos.line+1,null,!0))}}function n(t,n){for(var o=t.listSelections(),r=[],l=n?"/":""!=t.getLine(i.line).charAt(u.end)&&(g+=">"),r[p]=g}if(t.replaceSelections(r),o=t.listSelections(),!c)for(var p=0;p'"]=function(e){return t(e)}),n.addKeyMap(s)}});var l=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],d=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];e.commands.closeTag=function(e){return n(e)}})},BtxX:function(e){"use strict";(function(t){function n(){}function o(e,t){return function(){e.apply(t,arguments)}}function r(e){if(!(this instanceof r))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],p(e,this)}function s(e,t){for(;3===e._state;)e=e._value;return 0===e._state?void e._deferreds.push(t):void(e._handled=!0,r._immediateFn(function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null===n)return void(1===e._state?i:l)(t.promise,e._value);var o;try{o=n(e._value)}catch(n){return void l(t.promise,n)}i(t.promise,o)}))}function i(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof r)return t._state=3,t._value=e,void d(t);if("function"==typeof n)return void p(o(n,e),t)}t._state=1,t._value=e,d(t)}catch(n){l(t,n)}}function l(e,t){e._state=2,e._value=t,d(e)}function d(e){2===e._state&&0===e._deferreds.length&&r._immediateFn(function(){e._handled||r._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;to&&(t=t.slice(0,o-1).concat(t.slice(o-1).join(", ")));t.length;){var r=t.shift(),s=n.fields.shift(),l=r.length-s.length;n.string=n.string.slice(0,s.location)+r+n.string.slice(s.location+s.length);for(var d=0,i=n.fields.length;d>4).toString(16)}function c(e){return p(e.toString(16),2)}function p(e,t){for(;e.lengthe.firstLine();)r=t.Pos(r.line-1,0),p=l(!1);if(p&&!p.cleared&&"unfold"!==s){var u=n(e,i);t.on(u,"mousedown",function(n){m.clear(),t.e_preventDefault(n)});var m=e.markText(p.from,p.to,{replacedWith:u,clearOnEnter:o(e,i,"clearOnEnter"),__isFold:!0});m.on("clear",function(n,o){t.signal(e,"unfold",e,n,o)}),t.signal(e,"fold",e,p.from,p.to)}}function n(e,t){var n=o(e,t,"widget");if("string"==typeof n){var r=document.createTextNode(n);n=document.createElement("span"),n.appendChild(r),n.className="CodeMirror-foldmarker"}else n&&(n=n.cloneNode(!0));return n}function o(e,t,n){if(t&&void 0!==t[n])return t[n];var o=e.options.foldOptions;return o&&void 0!==o[n]?o[n]:r[n]}t.newFoldFunction=function(t,n){return function(o,r){e(o,r,{rangeFinder:t,widget:n})}},t.defineExtension("foldCode",function(t,n,o){e(this,t,n,o)}),t.defineExtension("isFolded",function(e){for(var t=this.findMarksAt(e),n=0;n")):null:e.match("--")?n(d("comment","-->")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(c(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=d("meta","?>"),"meta"):(A=e.eat("/")?"closeTag":"openTag",t.tokenize=s,"tag bracket");if("&"==o){var r;return r=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),r?"atom":"error"}return e.eatWhile(/[^&<]/),null}function s(e,t){var n=e.next();if(">"==n||"/"==n&&e.eat(">"))return t.tokenize=i,A=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return A="equals",null;if("<"==n){t.tokenize=i,t.state=h,t.tagName=t.tagStart=null;var o=t.tokenize(e,t);return o?o+" tag error":"tag error"}return /[\'\"]/.test(n)?(t.tokenize=l(n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function l(e){var t=function(t,n){for(;!t.eol();)if(t.next()==e){n.tokenize=s;break}return"string"};return t.isInAttribute=!0,t}function d(e,t){return function(n,o){for(;!n.eol();){if(n.match(t)){o.tokenize=i;break}n.next()}return e}}function c(e){return function(t,n){for(var o;null!=(o=t.next());){if("<"==o)return n.tokenize=c(e+1),n.tokenize(t,n);if(">"==o)if(1==e){n.tokenize=i;break}else return n.tokenize=c(e-1),n.tokenize(t,n)}return"meta"}}function p(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(w.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function u(e){e.context&&(e.context=e.context.prev)}function m(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!w.contextGrabbers.hasOwnProperty(n)||!w.contextGrabbers[n].hasOwnProperty(t))return;u(e)}}function h(e,t,n){return"openTag"==e?(n.tagStart=t.column(),g):"closeTag"==e?f:h}function g(e,t,n){return"word"==e?(n.tagName=t.current(),I="tag",x):w.allowMissingTagName&&"endTag"==e?(I="tag bracket",x(e,t,n)):(I="error",g)}function f(e,t,n){if("word"==e){var o=t.current();return n.context&&n.context.tagName!=o&&w.implicitlyClosed.hasOwnProperty(n.context.tagName)&&u(n),n.context&&n.context.tagName==o||!1===w.matchClosing?(I="tag",y):(I="tag error",b)}return w.allowMissingTagName&&"endTag"==e?(I="tag bracket",y(e,t,n)):(I="error",b)}function y(e,t,n){return"endTag"==e?(u(n),h):(I="error",y)}function b(e,t,n){return I="error",y(e,t,n)}function x(e,t,n){if("word"==e)return I="attribute",v;if("endTag"==e||"selfcloseTag"==e){var o=n.tagName,r=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||w.autoSelfClosers.hasOwnProperty(o)?m(n,o):(m(n,o),n.context=new p(n,o,r==n.indented)),h}return I="error",x}function v(e,t,n){return"equals"==e?k:(w.allowMissing||(I="error"),x(e,t,n))}function k(e,t,n){return"string"==e?S:"word"==e&&w.allowUnquoted?(I="string",x):(I="error",x(e,t,n))}function S(e,t,n){return"string"==e?S:x(e,t,n)}var C=o.indentUnit,w={},T=r.htmlMode?t:n;for(var E in T)w[E]=T[E];for(var E in r)w[E]=r[E];var A,I;return i.isInText=!0,{startState:function(e){var t={tokenize:i,state:h,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;A=null;var n=t.tokenize(e,t);return(n||A)&&"comment"!=n&&(I=null,t.state=t.state(A||n,e,t),I&&(n="error"==I?n+" error":I)),n},indent:function(t,n,o){var r=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+C;if(r&&r.noIndent)return e.Pass;if(t.tokenize!=s&&t.tokenize!=i)return o?o.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1===w.multilineTagIndentPastTag?t.tagStart+C*(w.multilineTagIndentFactor||1):t.tagStart+t.tagName.length+2;if(w.alignCDATA&&/$/,blockCommentStart:"",configuration:w.htmlMode?"html":"xml",helperType:w.htmlMode?"html":"xml",skipAttribute:function(e){e.state==k&&(e.state=x)}}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})})},IIoC:function(e,t,n){"use strict";var o=Math.round,r=Math.floor,i=Math.max;(function(t){(function(){function s(e){return"string"==typeof e}function l(e,t){e=e.split("."),t=t||Do;for(var n=0;nn?null:s(t)?t.charAt(n):t[n]}function _e(e){if(!v(e))for(var t=e.length-1;0<=t;t--)delete e[t];e.length=0}function et(){return Array.prototype.concat.apply([],arguments)}function tt(e){var t=e.length;if(0t?1:0}function rt(e){return-1!=Vo.indexOf(e)}function y(e,t,n){for(var o in e)t.call(n,e[o],o,e)}function at(e){var t=[],n=0,o;for(o in e)t[n++]=e[o];return t}function it(e){var t=[],n=0,o;for(o in e)t[n++]=o;return t}function st(e){var t={},n;for(n in e)t[n]=e[n];return t}function lt(t){for(var n=1,e,o;no.keyCode||void 0!=o.returnValue)){a:{var i=!1;if(0==o.keyCode)try{o.keyCode=-1;break a}catch(e){i=!0}(i||void 0==o.returnValue)&&(o.returnValue=!0)}for(o=[],i=n.a;i;i=i.parentNode)o.push(i);for(t=t.type,i=o.length-1;0<=i;i--){n.a=o[i];var e=Et(o[i],t,!0,n);r=r&&e}for(i=0;it.b&&(t.b++,e.next=t.a,t.a=e)}fr=!1}function Kt(e,t){_t.call(this),this.b=e||1,this.a=t||Do,this.c=_(this.qb,this),this.g=Ro()}function Gt(e){e.ea=!1,e.O&&(e.a.clearTimeout(e.O),e.O=null)}function Xt(e,t,n){if(m(e))n&&(e=_(e,n));else if(e&&"function"==typeof e.handleEvent)e=_(e.handleEvent,e);else throw Error("Invalid listener argument");return 2147483647<+t?-1:Do.setTimeout(e,t||0)}function Qt(e,t,n){$.call(this),this.f=null==n?e:_(e,n),this.c=t,this.b=_(this.kb,this),this.a=[]}function Jt(e){e.Y=Xt(e.b,e.c),e.f.apply(null,e.a)}function $t(e){$.call(this),this.b=e,this.a={}}function Yt(t,n,o,r){v(o)||(o&&(vr[0]=o.toString()),o=vr);for(var i=0,e;ii.length)){var e=i[1];if(v(e)&&!(1>e.length)){var s=e[0];if("noop"!=s&&"stop"!=s&&"close"!=s)for(var l=1;ln)&&(3!=n||Ko||t.a.V())){t.B||4!=n||7==o||(8==o||0>=r?mn(3):mn(2)),Fn(t);var i=t.a.W();t.C=i,(o=t.a.V())||cn(t.b,function(){return"No response text for uri "+t.g+" status "+i}),t.f=200==i,ln(t.b,t.o,t.g,t.c,t.T,n,i),t.f?((r=_n(t))&&(dn(t.b,t.c,r,"Initial handshake response via X-HTTP-Initial-Response"),t.v=!0,Vn(t,r)),t.K?(Mn(t,n,o),Ko&&t.f&&3==n&&On(t)):(dn(t.b,t.c,o,null),Vn(t,o)),4==n&&Un(t),t.f&&!t.B&&(4==n?t.i.ta(t):(t.f=!1,Rn(t)))):(400==i&&0t.length)?Pr:(t=t.substr(o,n),e.G=o+n,t)}function Rn(e){e.U=Ro()+e.R,Pn(e,e.R)}function Pn(e,t){if(null!=e.s)throw Error("WatchDog timer not null");e.s=yn(_(e.lb,e),t)}function Fn(e){e.s&&(Do.clearTimeout(e.s),e.s=null)}function Bn(e){e.i.La()||e.B||e.i.ta(e)}function Un(e){Fn(e);var t=e.I;t&&"function"==typeof t.$&&t.$(),e.I=null,Gt(e.S),Zt(e.L),e.a&&(t=e.a,e.a=null,t.abort(),t.$())}function Vn(e,t){try{e.i.Oa(e,t),mn(4)}catch(t){H(e.b,t,"Error in httprequest callback")}}function qn(e){if(e.A&&"function"==typeof e.A)return e.A();if(s(e))return e.split("");if(p(e)){for(var t=[],n=e.length,o=0;o2*e.c&&Hn(e),!0)}function Hn(t){if(t.c!=t.a.length){for(var n=0,o=0,r;nt)throw Error("Bad port number "+t);e.i=t}else e.i=null}function Jn(e,t,n){t instanceof ro?(e.c=t,po(e.c,e.h)):(n||(t=no(t,qr)),e.c=new ro(t,e.h))}function $n(e,t,n){e.c.set(t,n)}function R(e,t,n){v(n)||(n=[n+""]),so(e.c,t,n)}function Yn(e){return $n(e,"zx",r(2147483648*Math.random()).toString(36)+Math.abs(r(2147483648*Math.random())^Ro()).toString(36)),e}function Zn(e){return e instanceof Gn?Q(e):new Gn(e,void 0)}function eo(t,n,o,r){var i=new Gn(null,void 0);return t&&M(i,t),n&&Xn(i,n),o&&Qn(i,o),r&&(i.a=r),i}function to(e,t){return e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}function no(e,t,n){return s(e)?(e=encodeURI(e).replace(t,oo),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function oo(e){return e=e.charCodeAt(0),"%"+(15&e>>4).toString(16)+(15&e).toString(16)}function ro(e,t){this.b=this.a=null,this.c=e||null,this.f=!!t}function ao(e){e.a||(e.a=new Wn,e.b=0,e.c&&P(e.c,function(t,n){e.add(decodeURIComponent(t.replace(/\+/g," ")),n)}))}function S(e,t){ao(e),t=co(e,t),Kn(e.a.b,t)&&(e.c=null,e.b-=e.a.get(t).length,zn(e.a,t))}function io(e,t){return ao(e),t=co(e,t),Kn(e.a.b,t)}function so(e,t,n){S(e,t),0=e.f}function de(e,t){return e.b?e=e.b==t:e.a?(t=xo(t),e=Kn(e.a.a.b,t)):e=!1,e}function ee(e,t){e.a?e.a.add(t):e.b=t}function ce(e,t){if(e.b&&e.b==t)e.b=null;else{var n;(n=e.a)&&(n=xo(t),n=Kn(e.a.a.b,n)),n&&zn(e.a.a,xo(t))}}function fe(e){if(null!=e.b)return e.c.concat(e.b.u);if(null!=e.a&&0!=e.a.a.c){var t=e.c;return Bo(e.a.A(),function(e){t=t.concat(e.u)}),t}return tt(e.c)}function ge(e,t){e.c=e.c.concat(t)}function he(){}function ie(){this.a=new he}function je(e,t,n){var o=n||"";try{jn(e,function(n,r){var i=n;I(n)&&(i=Dt(n)),t.push(o+r+"="+encodeURIComponent(i))})}catch(n){throw t.push(o+"type="+encodeURIComponent("_badmap")),n}}function ke(e,t){var n=new E;cn(n,"TestLoadImage: loading "+e);var o=new Image;o.onload=f(le,n,o,"TestLoadImage: loaded",!0,t),o.onerror=f(le,n,o,"TestLoadImage: error",!1,t),o.onabort=f(le,n,o,"TestLoadImage: abort",!1,t),o.ontimeout=f(le,n,o,"TestLoadImage: timeout",!1,t),Do.setTimeout(function(){o.ontimeout&&o.ontimeout()},1E4),o.src=e}function le(t,n,o,r,i){try{cn(t,o),n.onload=null,n.onerror=null,n.onabort=null,n.ontimeout=null,i(r)}catch(e){H(t,e)}}function me(e){_t.call(this),this.headers=new Wn,this.s=e||null,this.c=!1,this.D=this.a=null,this.K=this.B="",this.j=0,this.g="",this.h=this.I=this.u=this.G=!1,this.l=0,this.C=null,this.L=ae,this.v=this.o=!1}function T(e){return zo&&ut(9)&&"number"==typeof e.timeout&&void 0!==e.ontimeout}function se(e){return"content-type"==e.toLowerCase()}function Co(e,t){e.c=!1,e.a&&(e.h=!0,e.a.abort(),e.h=!1),e.g=t,e.j=5,qe(e),ve(e)}function qe(e){e.G||(e.G=!0,e.dispatchEvent("complete"),e.dispatchEvent("error"))}function te(t){if(t.c&&"undefined"!=typeof Oo)if(t.D[1]&&4==re(t)&&2==t.W())an(t.b,wo(t,"Local request error detected and ignored"));else if(t.u&&4==re(t))Xt(t.Na,0,t);else if(t.dispatchEvent("readystatechange"),4==re(t)){an(t.b,wo(t,"Request complete")),t.c=!1;try{var n=t.W();a:switch(n){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var o=!0;break a;default:o=!1;}var r;if(!(r=o)){var i;if(i=0===n){var e=(t.B+"").match(Fr)[1]||null;if(!e&&Do.self&&Do.self.location){var s=Do.self.location.protocol;e=s.substr(0,s.length-1)}i=!ne.test(e?e.toLowerCase():"")}r=i}r?(t.dispatchEvent("complete"),t.dispatchEvent("success")):(t.j=6,t.g=t.Ha()+" ["+t.W()+"]",qe(t))}finally{ve(t)}}}function ve(t,e){if(t.a){ue(t);var o=t.a,r=t.D[0]?n:null;t.a=null,t.D=null,e||t.dispatchEvent("ready");try{o.onreadystatechange=r}catch(n){(t=t.b)&&t.log(Sr,"Problem encountered resetting onreadystatechange: "+n.message,void 0)}}}function ue(e){e.a&&e.v&&(e.a.ontimeout=null),e.C&&(Do.clearTimeout(e.C),e.C=null)}function re(e){return e.a?e.a.readyState:0}function N(e,t){return e.a?e.a.getResponseHeader(t):null}function wo(e,t){return t+" ["+e.K+" "+e.B+" "+e.W()+"]"}function U(e){var t="";return y(e,function(e,n){t+=n,t+=":",t+=e,t+="\r\n"}),t}function we(t,n,o){a:{for(r in o){var r=!1;break a}r=!0}if(r)return t;if(o=U(o),s(t)){if(n=encodeURIComponent(n+""),o=null==o?"":"="+encodeURIComponent(o+""),n+=o){if(o=t.indexOf("#"),0>o&&(o=t.length),r=t.indexOf("?"),0>r||r>o){r=o;var i=""}else i=t.substring(r+1,o);t=[t.substr(0,r),i,t.substr(o)],o=t[1],t[1]=n?o?o+"&"+n:n:o,t=t[0]+(t[1]?"?"+t[1]:"")+t[2]}return t}return $n(t,n,o),t}function xe(e){this.ya=0,this.g=[],this.a=new E,this.I=new yo,this.X=this.ua=this.D=this.ja=this.b=this.K=this.j=this.U=this.h=this.L=this.i=null,this.Za=this.R=0,this.Xa=!!l("internalChannelParams.failFast",e),this.ka=this.C=this.s=this.l=this.m=this.f=null,this.u=this.xa=this.N=-1,this.T=this.B=this.v=0,this.Wa=l("internalChannelParams.baseRetryDelayMs",e)||5E3,this.$a=l("internalChannelParams.retryDelaySeedMs",e)||1E4,this.Ya=l("internalChannelParams.forwardChannelMaxRetries",e)||2,this.wa=l("internalChannelParams.forwardChannelRequestTimeoutMs",e)||2E4,this.Ta=e&&e.Kb||void 0,this.G=void 0,this.S=e&&e.supportsCrossDomainXhr||!1,this.J="",this.c=new ko(e&&e.concurrentRequestLimit),this.la=new ie,this.o=e&&void 0!==e.backgroundChannelTest?e.backgroundChannelTest:!0,(this.va=e&&e.fastHandshake||!1)&&!this.o&&(rn(this.a.a,"Force backgroundChannelTest when fastHandshake is enabled."),this.o=!0),e&&e.Fa&&this.a.Fa()}function ye(e){if(cn(e.a,"disconnect()"),ze(e),3==e.F){var t=e.R++,n=Q(e.D);$n(n,"SID",e.J),$n(n,"RID",t),$n(n,"TYPE","terminate"),Je(e,n),t=new En(e,e.a,t,void 0),t.J=2,t.h=Yn(Q(n)),n=!1,Do.navigator&&Do.navigator.sendBeacon&&(n=Do.navigator.sendBeacon(t.h.toString(),"")),!n&&Do.Image&&(new Image().src=t.h,n=!0),n||(t.a=t.i.ca(null),t.a.fa(t.h)),t.D=Ro(),Rn(t)}V(e)}function ze(e){e.C&&(e.C.abort(),e.C=null),e.b&&(e.b.cancel(),e.b=null),e.l&&(Do.clearTimeout(e.l),e.l=null),Eo(e),e.c.cancel(),e.m&&(Do.clearTimeout(e.m),e.m=null)}function Ae(e,t){1E3==e.g.length&&F(e.a,function(){return"Already have 1000 queued maps upon queueing "+Dt(t)}),e.g.push(new vo(e.Za++,t)),3==e.F&&Ee(e)}function Ee(e){be(e.c)||e.m||(e.m=yn(_(e.Qa,e),0),e.v=0)}function Fe(e,t){var n=e.c;return(n.b?1:n.a?n.a.a.c:0)>=e.c.f-(e.m?1:0)?(F(e.a,"Unexpected retry request is scheduled."),!1):e.m?(cn(e.a,"Use the retry request that is already scheduled."),e.g=t.u.concat(e.g),!0):1==e.F||2==e.F||e.v>=(e.Xa?0:e.Ya)?!1:(cn(e.a,"Going to retry POST"),e.m=yn(_(e.Qa,e,t),De(e,e.v)),e.v++,!0)}function Ge(e,t){var n=t?t.c:e.R++;var r=Q(e.D);$n(r,"SID",e.J),$n(r,"RID",n),$n(r,"AID",e.N),Je(e,r),e.h&&e.i&&we(r,e.h,e.i),n=new En(e,e.a,n,e.v+1),null===e.h&&(n.j=e.i),t&&(e.g=t.u.concat(e.g)),t=Be(e,n),n.setTimeout(o(.5*e.wa)+o(.5*e.wa*Math.random())),ee(e.c,n),An(n,r,t)}function Je(e,t){e.f&&jn({},function(e,n){$n(t,n,e)})}function Be(t,n){var o=Math.min(t.g.length,1E3),r=t.f?_(t.f.ab,t.f,t):null;a:for(var s=t.g,e=-1,l;;){l=["count="+o],-1==e?0p)e=i(0,s[c].a-100),d=!1;else try{je(u,l,"req"+p+"_")}catch(e){r&&r(u)}}if(d){r=l.join("&");break a}}return t=t.g.splice(0,o),n.u=t,r}function Ie(e){if(!e.b&&!e.l){e.T=1;var t=e.Pa;xr||zt(),fr||(xr(),fr=!0),yr.add(t,e),e.B=0}}function Ke(e){return e.b||e.l?(F(e.a,"Request already in progress"),!1):!(3<=e.B)&&(cn(e.a,"Going to retry GET"),e.T++,e.l=yn(_(e.Pa,e),De(e,e.B)),e.B++,!0)}function Le(e,t,n){cn(e.a,"Test Connection Finished");var o=t.l;o&&So(e.c,o),e.ka=n,e.u=t.f,cn(e.a,"connectChannel_()"),e.D=Ce(e,e.ja),Ee(e)}function To(e,t){cn(e.a,"Test Connection Failed"),e.u=t.f,He(e,2)}function Eo(e){null!=e.s&&(Do.clearTimeout(e.s),e.s=null)}function De(e,t){var n=e.Wa+r(Math.random()*e.$a);return e.qa()||(cn(e.a,"Inactive channel"),n*=2),n*t}function He(e,t){if(pn(e.a,"Error code "+t),2==t){var n=null;e.f&&(n=null);var o=_(e.pb,e);n||(n=new Gn("//www.google.com/images/cleardot.gif"),Do.location&&"http"==Do.location.protocol||M(n,"https"),Yn(n)),ke(n.toString(),o)}else gn(2);cn(e.a,"HttpChannel: error - "+t),e.F=0,e.f&&e.f.Ba(t),V(e),ze(e)}function V(e){if(e.F=0,e.u=-1,e.f){var t=fe(e.c);(0!=t.length||0!=e.g.length)&&(cn(e.a,function(){return"Number of undelivered maps, pending: "+t.length+", outgoing: "+e.g.length}),e.c.c.length=0,tt(e.g),e.g.length=0),e.f.Aa()}}function Ce(e,t){return t=Ao(e,null,t),cn(e.a,"GetForwardChannelUri: "+t),t}function Me(e,t,n){return t=Ao(e,e.ia()?t:null,n),cn(e.a,"GetBackChannelUri: "+t),t}function Ao(t,n,o){var r=Zn(o);if(""!=r.b)n&&Xn(r,n+"."+r.b),Qn(r,r.i);else{var i=Do.location,e;e=n?n+"."+i.hostname:i.hostname,r=eo(i.protocol,e,i.port,o)}return t.U&&y(t.U,function(e,t){$n(r,t,e)}),n=t.j,o=t.K,n&&o&&$n(r,n,o),$n(r,"VER",t.na),Je(t,r),r}function Ne(){}function Oe(){for(var t=arguments[0],n=1,o;nthis.c)throw Error(Hr);this.a=new Re,this.b=new bo,this.g=null,this.aa()}function Ye(e){if("function"==typeof e.$)e.$();else for(var t in e)e[t]=null}function Io(e){return We(e.a)+e.b.a.c}function $e(e,t){this.a=e,this.b=t}function No(e){if(this.a=[],e)a:{if(e instanceof No){var t=e.M();if(e=e.A(),0>=this.a.length){for(var n=this.a,o=0;o>1,e[o].a>n.a);)e[t]=e[o],t=o;e[t]=n}function _o(){No.call(this)}function Mo(e,t){this.f=new _o,Xe.call(this,e,t)}function Y(e,t,n,o){this.l=e,this.j=!!o,Mo.call(this,t,n)}var Oo=Oo||{},Do=this,k="closure_uid_"+(1E9*Math.random()>>>0),q=0,Ro=Date.now||function(){return+new Date},t;b(u,Error),u.prototype.name="CustomError",b(j,u),j.prototype.name="AssertionError";var g=0,Po={};$.prototype.i=!1,$.prototype.$=function(){},$.prototype.w=function(){if(this.m)for(;this.m.length;)this.m.shift()()};var Fo=Array.prototype.indexOf?function(e,t){return Array.prototype.indexOf.call(e,t,void 0)}:function(e,t){if(s(e))return s(t)&&1==t.length?e.indexOf(t,0):-1;for(var n=0;nparseFloat(Jo)){Qo=Yo+"";break a}}Qo=Jo}var Zo={},er=Do.document,tr;tr=er&&zo?pt()||("CSS1Compat"==er.compatMode?parseInt(Qo,10):5):void 0;var nr=Object.freeze||function(e){return e},or=!zo||9<=+tr,rr=zo&&!ut("9"),ar=function(){if(!Do.addEventListener||!Object.defineProperty)return!1;var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});return Do.addEventListener("test",n,t),Do.removeEventListener("test",n,t),e}();mt.prototype.b=function(){this.Ra=!1},b(A,mt);var ir=nr({2:"touch",3:"pen",4:"mouse"});A.prototype.b=function(){A.H.b.call(this);var e=this.c;if(e.preventDefault)e.preventDefault();else if(e.returnValue=!1,rr)try{(e.ctrlKey||112<=e.keyCode&&123>=e.keyCode)&&(e.keyCode=-1)}catch(e){}};var sr="closure_listenable_"+(0|1E6*Math.random()),lr=0;ft.prototype.add=function(t,n,o,r,i){var e=t.toString();t=this.a[e],t||(t=this.a[e]=[],this.b++);var s=bt(t,n,r,i);return-1>>0);b(_t,$),_t.prototype[sr]=!0,t=_t.prototype,t.addEventListener=function(e,t,n,o){xt(this,e,t,n,o)},t.removeEventListener=function(e,t,n,o){Ct(this,e,t,n,o)},t.dispatchEvent=function(t){var n=this.J,o;if(n)for(o=[];n;n=n.J)o.push(n);n=this.N;var r=t.type||t;if(s(t))t=new mt(t,n);else if(t instanceof mt)t.target=t.target||n;else{var i=t;t=new mt(r,n),lt(t,i)}if(i=!0,o)for(var e=o.length-1,l;0<=e;e--)l=t.a=o[e],i=B(l,r,!0,t)&&i;if(l=t.a=n,i=B(l,r,!0,t)&&i,i=B(l,r,!1,t)&&i,o)for(e=0;e=C(this).value)for(m(t)&&(t=t()),e=new en(e,t+"",this.f),n&&(e.a=n),n=this;n;)n=n.a};var Ar={},Ir=null;E.prototype.Fa=function(){this.b=!1};var Nr=new _t;b(un,mt),b(hn,mt),b(K,mt);var Lr={NO_ERROR:0,rb:1,yb:2,xb:3,ub:4,wb:5,zb:6,Ua:7,TIMEOUT:8,Cb:9},_r={tb:"complete",Gb:"success",Va:"error",Ua:"abort",Eb:"ready",Fb:"readystatechange",TIMEOUT:"timeout",Ab:"incrementaldata",Db:"progress",vb:"downloadprogress",Hb:"uploadprogress"};bn.prototype.a=null;var Mr={OPEN:"a",sb:"b",Va:"c",Bb:"d"};b(kn,mt),b(Sn,mt);var Or;b(Cn,bn),Or=new Cn;var Dr=45E3,Rr={},Pr={};t=En.prototype,t.setTimeout=function(e){this.R=e},t.nb=function(e){e=e.target;var t=this.I;t&&3==re(e)?(cn(this.b,"Throttling readystatechange."),t.cb()):this.Sa(e)},t.Sa=function(e){try{e==this.a?Ln(this):rn(this.b.a,"Called back with an unexpected xmlhttp")}catch(e){if(cn(this.b,"Failed call to OnXmlHttpReadyStateChanged_"),this.a&&this.a.V()){var t=this;H(this.b,e,function(){return"ResponseText: "+t.a.V()})}else H(this.b,e,"No response text")}finally{}},t.mb=function(){if(this.a){var e=re(this.a),t=this.a.V();this.Gn&&this.ka&&0==this.B&&!this.s&&(this.s=yn(_(this.ib,this),6E3)))}else if((t.v||this.b==t)&&Eo(this),!nt(n))for(n=o=this.la.a.parse(n),o=0;oe-this.g)){for(var t;0this.c&&0=i)e=void 0;else{if(1==i)_e(r);else{r[0]=r.pop(),r=0,o=o.a,i=o.length;for(var s=o[r];r>1;){var l=2*r+1,d=2*r+2;if(l=ds.a)break;o[r]=o[l],r=l}o[r]=s}e=e.b}e.apply(this,[n])}},t.ma=function(e){Mo.H.ma.call(this,e),this.ra()},t.aa=function(){Mo.H.aa.call(this),this.ra()},t.w=function(){Mo.H.w.call(this),Do.clearTimeout(void 0),_e(this.f.a),this.f=null},b(Y,Mo),Y.prototype.pa=function(){var e=new me,t=this.l;return t&&t.forEach(function(t,n){e.headers.set(n,t)}),this.j&&(e.o=!0),e},Y.prototype.sa=function(e){return!e.i&&!e.a},Pe.prototype.createWebChannel=Pe.prototype.a,Qe.prototype.send=Qe.prototype.gb,Qe.prototype.open=Qe.prototype.fb,Qe.prototype.close=Qe.prototype.close,Lr.NO_ERROR=0,Lr.TIMEOUT=8,Lr.HTTP_ERROR=6,_r.COMPLETE="complete",vn.EventType=Mr,Mr.OPEN="a",Mr.CLOSE="b",Mr.ERROR="c",Mr.MESSAGE="d",_t.prototype.listen=_t.prototype.Ia,Y.prototype.getObject=Y.prototype.da,Y.prototype.releaseObject=Y.prototype.ob,me.prototype.listenOnce=me.prototype.Ja,me.prototype.getLastError=me.prototype.hb,me.prototype.getLastErrorCode=me.prototype.Ga,me.prototype.getStatus=me.prototype.W,me.prototype.getStatusText=me.prototype.Ha,me.prototype.getResponseJson=me.prototype.eb,me.prototype.getResponseText=me.prototype.V,me.prototype.getResponseText=me.prototype.V,me.prototype.send=me.prototype.fa,e.exports={createWebChannelTransport:pe,ErrorCode:Lr,EventType:_r,WebChannel:vn,XhrIoPool:Y}}).call("undefined"==typeof t?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:t)}).call(t,n("h6ac"))},IYZm:function(e,t,n){"use strict";(function(e){e(n("tQq4"),n("LiPu"))})(function(e){function t(e){for(var t in u)u.hasOwnProperty(t)&&(e.attrs[t]=u[t])}var n=["ab","aa","af","ak","sq","am","ar","an","hy","as","av","ae","ay","az","bm","ba","eu","be","bn","bh","bi","bs","br","bg","my","ca","ch","ce","ny","zh","cv","kw","co","cr","hr","cs","da","dv","nl","dz","en","eo","et","ee","fo","fj","fi","fr","ff","gl","ka","de","el","gn","gu","ht","ha","he","hz","hi","ho","hu","ia","id","ie","ga","ig","ik","io","is","it","iu","ja","jv","kl","kn","kr","ks","kk","km","ki","rw","ky","kv","kg","ko","ku","kj","la","lb","lg","li","ln","lo","lt","lu","lv","gv","mk","mg","ms","ml","mt","mi","mr","mh","mn","na","nv","nb","nd","ne","ng","nn","no","ii","nr","oc","oj","cu","om","or","os","pa","pi","fa","pl","ps","pt","qu","rm","rn","ro","ru","sa","sc","sd","se","sm","sg","sr","gd","sn","si","sk","sl","so","st","es","su","sw","ss","sv","ta","te","tg","th","ti","bo","tk","tl","tn","to","tr","ts","tt","tw","ty","ug","uk","ur","uz","ve","vi","vo","wa","cy","wo","fy","xh","yi","yo","za","zu"],o=["_blank","_self","_top","_parent"],r=["ascii","utf-8","utf-16","latin1","latin1"],i=["get","post","put","delete"],l=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],d=["all","screen","print","embossed","braille","handheld","print","projection","screen","tty","tv","speech","3d-glasses","resolution [>][<][=] [X]","device-aspect-ratio: X/Y","orientation:portrait","orientation:landscape","device-height: [X]","device-width: [X]"],c={attrs:{}},p={a:{attrs:{href:null,ping:null,type:null,media:d,target:o,hreflang:n}},abbr:c,acronym:c,address:c,applet:c,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:d,hreflang:n,type:null,shape:["default","rect","circle","poly"]}},article:c,aside:c,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["","autoplay"],loop:["","loop"],controls:["","controls"]}},b:c,base:{attrs:{href:null,target:o}},basefont:c,bdi:c,bdo:c,big:c,blockquote:{attrs:{cite:null}},body:c,br:c,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["","autofocus"],disabled:["","autofocus"],formenctype:l,formmethod:i,formnovalidate:["","novalidate"],formtarget:o,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:c,center:c,cite:c,code:c,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["","disabled"],checked:["","checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["","disabled"],multiple:["","multiple"]}},datalist:{attrs:{data:null}},dd:c,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["","open"]}},dfn:c,dir:c,div:c,dl:c,dt:c,em:c,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["","disabled"],form:null,name:null}},figcaption:c,figure:c,font:c,footer:c,form:{attrs:{action:null,name:null,"accept-charset":r,autocomplete:["on","off"],enctype:l,method:i,novalidate:["","novalidate"],target:o}},frame:c,frameset:c,h1:c,h2:c,h3:c,h4:c,h5:c,h6:c,head:{attrs:{},children:["title","base","link","style","meta","script","noscript","command"]},header:c,hgroup:c,hr:c,html:{attrs:{manifest:null},children:["head","body"]},i:c,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["","seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["","autofocus"],checked:["","checked"],disabled:["","disabled"],formenctype:l,formmethod:i,formnovalidate:["","novalidate"],formtarget:o,multiple:["","multiple"],readonly:["","readonly"],required:["","required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:c,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["","autofocus"],disabled:["","disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:c,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:n,media:d,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:c,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:r,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:c,noframes:c,noscript:c,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["","typemustmatch"]}},ol:{attrs:{reversed:["","reversed"],start:null,type:["1","a","A","i","I"]}},optgroup:{attrs:{disabled:["","disabled"],label:null}},option:{attrs:{disabled:["","disabled"],label:null,selected:["","selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:c,param:{attrs:{name:null,value:null}},pre:c,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:c,rt:c,ruby:c,s:c,samp:c,script:{attrs:{type:["text/javascript"],src:null,async:["","async"],defer:["","defer"],charset:r}},section:c,select:{attrs:{form:null,name:null,size:null,autofocus:["","autofocus"],disabled:["","disabled"],multiple:["","multiple"]}},small:c,source:{attrs:{src:null,type:null,media:null}},span:c,strike:c,strong:c,style:{attrs:{type:["text/css"],media:d,scoped:null}},sub:c,summary:c,sup:c,table:c,tbody:c,td:{attrs:{colspan:null,rowspan:null,headers:null}},textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["","autofocus"],disabled:["","disabled"],readonly:["","readonly"],required:["","required"],wrap:["soft","hard"]}},tfoot:c,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:c,time:{attrs:{datetime:null}},title:c,tr:c,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:n}},tt:c,u:c,ul:c,var:c,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["","autoplay"],mediagroup:["movie"],muted:["","muted"],controls:["","controls"]}},wbr:c},u={accesskey:["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9"],class:null,contenteditable:["true","false"],contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["en","es"],spellcheck:["true","false"],style:null,tabindex:["1","2","3","4","5","6","7","8","9"],title:null,translate:["yes","no"],onclick:null,rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"]};for(var m in t(c),p)p.hasOwnProperty(m)&&p[m]!=c&&t(p[m]);e.htmlSchema=p,e.registerHelper("hint","html",function(t,n){var o={schemaInfo:p};if(n)for(var r in n)o[r]=n[r];return e.hint.xml(t,o)})})},Ipt8:function(e,t){"use strict";function n(e,t){for(var n=e.attributes,r=0,i=n.length,s;rn.line&&document.querySelector&&(o=t.display.wrapper.querySelector(".CodeMirror-dialog"))&&o.getBoundingClientRect().bottom-4>t.cursorCoords(n,"window").top&&((p=o).style.opacity=.4)}))};s(t,b,c,m,function(n,r){var i=e.keyName(n),s=t.getOption("extraKeys"),l=s&&s[i]||e.keyMap[t.getOption("keyMap")][i];"findNext"==l||"findPrev"==l||"findPersistentNext"==l||"findPersistentPrev"==l?(e.e_stop(n),u(t,o(t),r),t.execCommand(l)):("find"==l||"findPersistent"==l)&&(e.e_stop(n),m(r,n))}),i&&c&&(u(t,d,c),h(t,n))}else l(t,b,"Search for:",c,function(e){e&&!d.query&&t.operation(function(){u(t,d,e),d.posFrom=d.posTo=t.getCursor(),h(t,n)})})}function h(t,n,r){t.operation(function(){var s=o(t),l=i(t,s.query,n?s.posFrom:s.posTo);!l.find(n)&&(l=i(t,s.query,n?e.Pos(t.lastLine()):e.Pos(t.firstLine(),0)),!l.find(n))||(t.setSelection(l.from(),l.to()),t.scrollIntoView({from:l.from(),to:l.to()},20),s.posFrom=l.from(),s.posTo=l.to(),r&&r(l.from(),l.to()))})}function g(e){e.operation(function(){var t=o(e);t.lastQuery=t.query,t.query&&(t.query=t.queryText=null,e.removeOverlay(t.overlay),t.annotate&&(t.annotate.clear(),t.annotate=null))})}function f(e,t,n){e.operation(function(){for(var o=i(e,t);o.findNext();)if("string"!=typeof t){var r=e.getRange(o.from(),o.to()).match(t);o.replace(n.replace(/\$(\d)/g,function(e,t){return r[t]}))}else o.replace(n)})}function y(e,t){if(!e.getOption("readOnly")){var n=e.getSelection()||o(e).lastQuery,r=""+(t?"Replace all:":"Replace:")+"";l(e,r+x,r,n,function(n){n&&(n=p(n),l(e,v,"Replace with:","",function(o){if(o=c(o),t)f(e,n,o);else{g(e);var r=i(e,n,e.getCursor("from")),s=function t(){var s=r.from(),c;!(c=r.findNext())&&(r=i(e,n),!(c=r.findNext())||s&&r.from().line==s.line&&r.from().ch==s.ch)||(e.setSelection(r.from(),r.to()),e.scrollIntoView({from:r.from(),to:r.to()}),d(e,k,"Replace?",[function(){l(c)},t,function(){f(e,n,o)}]))},l=function(e){r.replace("string"==typeof n?o:o.replace(/\$(\d)/g,function(t,n){return e[n]})),s()};s()}}))})}}var b="Search: (Use /re/ syntax for regexp search)",x=" (Use /re/ syntax for regexp search)",v="With: ",k="Replace? ";e.commands.find=function(e){g(e),m(e)},e.commands.findPersistent=function(e){g(e),m(e,!1,!0)},e.commands.findPersistentNext=function(e){m(e,!1,!0,!0)},e.commands.findPersistentPrev=function(e){m(e,!0,!0,!0)},e.commands.findNext=m,e.commands.findPrev=function(e){m(e,!0)},e.commands.clearSearch=g,e.commands.replace=y,e.commands.replaceAll=function(e){y(e,!0)}})},KM04:function(M){"use strict";!function(){function O(){}function F(e,s){var n=U,d,o,c,i;for(i=arguments.length;2c.ch&&(p.end=c.ch,p.string=p.string.slice(0,c.ch-p.start));var u=e.innerMode(r.getMode(),p.state);if("xml"==u.mode.name){var m=[],h=!1,g=/\btag\b/.test(p.type)&&!/>$/.test(p.string),f=g&&/^\w/.test(p.string),y,b;if(f){var x=r.getLine(c.line).slice(o(0,p.start-2),p.start),v=/<\/$/.test(x)?"close":/<$/.test(x)?"open":null;v&&(b=p.start-("close"==v?2:1))}else g&&"<"==p.string?v="open":g&&"")}else{var S=l[u.state.tagName],T=S&&S.attrs,E=l["!attrs"];if(!T&&!E)return;if(!T)T=E;else if(E){var A={};for(var I in E)E.hasOwnProperty(I)&&(A[I]=E[I]);for(var I in T)T.hasOwnProperty(I)&&(A[I]=T[I]);T=A}if("string"==p.type||"="==p.string){var x=r.getRange(t(c.line,o(0,c.ch-60)),t(c.line,"string"==p.type?p.start:p.end)),N=x.match(/([^\s\u00a0=<>\"\']+)=$/),L;if(!N||!T.hasOwnProperty(N[1])||!(L=T[N[1]]))return;if("function"==typeof L&&(L=L.call(this,r)),"string"==p.type){y=p.string;var _=0;/['"]/.test(p.string.charAt(0))&&(d=p.string.charAt(0),y=p.string.slice(1),_++);var n=p.string.length;/['"]/.test(p.string.charAt(n-1))&&(d=p.string.charAt(n-1),y=p.string.substr(_,n-2)),h=!0}for(var w=0;w=this.end},e.prototype.limit=function(e,t){return new this.constructor(this.string,e,t)},e.prototype.peek=function(){return this.string.charCodeAt(this.pos)},e.prototype.next=function(){if(this.posthis.status,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new r(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){var b={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(b.arrayBuffer)var x=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],v=function(e){return e&&DataView.prototype.isPrototypeOf(e)},k=ArrayBuffer.isView||function(e){return e&&-1e.b&&(e.b++,t.next=e.a,e.a=t)}function rt(){this.b=this.a=null}function at(){var e=vc,t=null;return e.a&&(t=e.a,e.a=e.a.next,e.a||(e.b=null),t.next=null),t}function it(){this.next=this.b=this.a=null}function st(e,t){var n=e.length,o=s(e)?e.split(""):e;for(--n;0<=n;--n)n in o&&t.call(void 0,o[n],n,e)}function lt(t){a:{for(var n=Lr,o=t.length,r=s(t)?t.split(""):t,i=0;in?null:s(t)?t.charAt(n):t[n]}function dt(e,t){return 0<=wa(e,t)}function ct(e,t){t=wa(e,t);var n;return(n=0<=t)&&Array.prototype.splice.call(e,t,1),n}function pt(t,n){var o=0;st(t,function(r,i){n.call(void 0,r,i,t)&&1==Array.prototype.splice.call(t,i,1).length&&o++})}function ut(){return Array.prototype.concat.apply([],arguments)}function mt(e){var t=e.length;if(0")&&(e=e.replace(Pa,">")),-1!=e.indexOf("\"")&&(e=e.replace(Qa,""")),-1!=e.indexOf("'")&&(e=e.replace(Ra,"'")),-1!=e.indexOf("\0")&&(e=e.replace(Sa,"�")),e):e}function ft(e,t){return-1!=e.indexOf(t)}function w(e,t){return et?1:0}function yt(e){return ft(Na,e)}function x(e,t){for(var n in e)t.call(void 0,e[n],n,e)}function bt(e){for(var t in e)return!1;return!0}function xt(e){var t={},n;for(n in e)t[n]=e[n];return t}function vt(t){for(var n=1,e,o;nr.keyCode||void 0!=r.returnValue)){a:{var i=!1;if(0==r.keyCode)try{r.keyCode=-1;break a}catch(e){i=!0}(i||void 0==r.returnValue)&&(r.returnValue=!0)}for(r=[],i=n.b;i;i=i.parentNode)r.push(i);for(t=t.type,i=r.length-1;0<=i;i--){n.b=r[i];var e=ln(r[i],t,!0,n);o=o&&e}for(i=0;it)throw Error("Bad port number "+t);e.i=t}else e.i=null}function In(e,t,n){t instanceof Rn?(e.a=t,jn(e.a,e.f)):(n||(t=On(t,Qc)),e.a=new Rn(t,e.f))}function Nn(e,t,n){e.a.set(t,n)}function F(e,t){return e.a.get(t)}function Ln(e){return e instanceof Tn?new Tn(e):new Tn(e,void 0)}function _n(e,t){var n=new Tn(null,void 0);return En(n,"https"),e&&(n.b=e),t&&(n.g=t),n}function Mn(e,t){return e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}function On(e,t,n){return s(e)?(e=encodeURI(e).replace(t,Dn),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function Dn(e){return e=e.charCodeAt(0),"%"+(15&e>>4).toString(16)+(15&e).toString(16)}function Rn(e,t){this.b=this.a=null,this.c=e||null,this.f=!!t}function Pn(e){e.a||(e.a=new kn,e.b=0,e.c&&wn(e.c,function(t,n){e.add(decodeURIComponent(t.replace(/\+/g," ")),n)}))}function Fn(t){var n=xn(t);if("undefined"==typeof n)throw Error("Keys are undefined");var o=new Rn(null,void 0);t=bn(t);for(var r=0;r2*e.c&&Sn(e)))}function Un(e,t){return Pn(e),t=qn(e,t),Cn(e.a.b,t)}function Vn(e,t,n){Bn(e,t),0"),e=e.join("")}return e=n.createElement(e),o&&(s(o)?e.className=o:_(o)?e.className=o.join(" "):ro(e,o)),2e?!1:!_c||!zc||9",t=no(t),l.document.write(to(t)),l.document.close())):(l=r.open($n(n),o,l))&&t.noopener&&(l.opener=null),l)try{l.focus()}catch(e){}return l}function de(e){return new Et(function(t){function n(){yn(2E3).then(function(){return!e||e.closed?void t():n()})}return n()})}function fe(){var e=null;return new Et(function(t){"complete"==yc.document.readyState?t():(e=function(){t()},rn(window,"load",e))}).s(function(t){throw an(window,"load",e),t})}function he(){return ie(void 0)?fe().then(function(){return new Et(function(e,t){var n=yc.document,o=setTimeout(function(){t(Error("Cordova framework is not ready."))},1E3);n.addEventListener("deviceready",function(){clearTimeout(o),e()},!1)})}):A(Error("Cordova must run in an Android or iOS file scheme."))}function ie(e){return e=e||re(),"file:"===ve()&&e.toLowerCase().match(/iphone|ipad|ipod|android/)}function je(){var e=yc.window;try{return e&&e!=e.top}catch(e){return!1}}function le(){return"object"!=typeof yc.window&&"function"==typeof yc.importScripts}function me(){return uc.INTERNAL.hasOwnProperty("reactNative")?"ReactNative":uc.INTERNAL.hasOwnProperty("node")?"Node":le()?"Worker":"Browser"}function ne(){var e=me();return"ReactNative"===e||"Node"===e}function oe(){for(var e=50,t=[];0t)throw Error("Short delay should be less than long delay!");this.a=e,this.c=t,e=re(),t=me(),this.b=bo(e)||"ReactNative"===t}function Ce(){var e=yc.document;return e&&"undefined"!=typeof e.visibilityState?"visible"==e.visibilityState:!0}function De(){var e=yc.document,t=null;return Ce()||!e?It():new Et(function(n){t=function(){Ce()&&(e.removeEventListener("visibilitychange",t,!1),n())},e.addEventListener("visibilitychange",t,!1)}).s(function(n){throw e.removeEventListener("visibilitychange",t,!1),n})}function Ee(e){try{var t=new Date(parseInt(e,10));if(!isNaN(t.getTime())&&!/[^0-9]/.test(e))return t.toUTCString()}catch(e){}return null}function Fe(){return G("fireauth.oauthhelper",yc)||G("fireauth.iframe",yc)}function Ge(e){qe[e]||(qe[e]=!0,"undefined"!=typeof console&&"function"==typeof console.warn&&console.warn(e))}function Ie(e,t,n){He?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,value:n}):e[t]=n}function I(e,t){if(t)for(var n in t)t.hasOwnProperty(n)&&Ie(e,n,t[n])}function J(e){var t={};return I(t,e),t}function Le(e){var t={},n;for(n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function Me(e,t){if(!t||!t.length)return!0;if(!e)return!1;for(var n=0,o;n>4),64!=s&&(n(240&e<<4|s>>2),64!=l&&n(192&s<<6|l))}}function To(){if(!rp){rp={},ap={};for(var e=0;65>e;e++)rp[e]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(e),ap[rp[e]]=e,62<=e&&(ap["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.".charAt(e)]=e)}}function Eo(e){this.c=e.sub,ja(),this.a=e.provider_id||e.firebase&&e.firebase.sign_in_provider||null,this.b=!!e.is_anonymous||"anonymous"==this.a}function Ao(e){return(e=Io(e))&&e.sub&&e.iss&&e.aud&&e.exp?new Eo(e):null}function Io(e){if(!e)return null;if(e=e.split("."),3!=e.length)return null;e=e[1];for(var t=(4-e.length%4)%4,n=0;n Auth section -> Sign in method tab.",e):"http"==n||"https"==n?o=ht("This domain (%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab.",e):t="operation-not-supported-in-this-environment",Pe.call(this,t,o)}function cr(e,t,n){Pe.call(this,e,n),e=t||{},e.wb&&Ie(this,"email",e.wb),e.$&&Ie(this,"phoneNumber",e.$),e.credential&&Ie(this,"credential",e.credential)}function pr(e){if(e.code){var t=e.code||"";0==t.indexOf(We)&&(t=t.substring(We.length));var n={credential:rr(e)};if(e.email)n.wb=e.email;else if(e.phoneNumber)n.$=e.phoneNumber;else return new Pe(t,e.message||void 0);return new cr(t,n,e.message)}return null}function ur(){}function mr(e){return e.c||(e.c=e.b())}function hr(){}function gr(e){if(!e.f&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var t=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],n=0,o;nn;n++){i=0|o[n-15],r=0|o[n-2];var e=0|(0|o[n-16])+((i>>>7|i<<25)^(i>>>18|i<<14)^i>>>3),s=0|(0|o[n-7])+((r>>>17|r<<15)^(r>>>19|r<<13)^r>>>10);o[n]=0|e+s}r=0|t.a[0],i=0|t.a[1];var l=0|t.a[2],d=0|t.a[3],c=0|t.a[4],p=0|t.a[5],u=0|t.a[6];for(e=0|t.a[7],n=0;64>n;n++){var m=0|((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&i^r&l^i&l);s=c&p^~c&u,e=0|e+((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7)),s=0|s+(0|eu[n]),s=0|e+(0|s+(0|o[n])),e=u,u=p,p=c,c=0|d+s,d=l,l=i,i=r,r=0|s+m}t.a[0]=0|t.a[0]+r,t.a[1]=0|t.a[1]+i,t.a[2]=0|t.a[2]+l,t.a[3]=0|t.a[3]+d,t.a[4]=0|t.a[4]+c,t.a[5]=0|t.a[5]+p,t.a[6]=0|t.a[6]+u,t.a[7]=0|t.a[7]+e}function bs(t,n,o){void 0===o&&(o=n.length);var r=0,i=t.c;if(s(n))for(;r=e&&e==(0|e)))throw Error("message must be a byte array");t.f[i++]=e,i==t.b&&(ys(t),i=0)}else throw Error("message must be string or array");t.c=i,t.g+=o}function xs(){fs.call(this,8,iu)}function vs(t,n,o,r,i){this.l=t,this.i=n,this.m=o,this.o=r||null,this.u=i||null,this.h=n+":"+o,this.v=new gs,this.g=new ms(this.h),this.f=null,this.b=[],this.a=this.c=null}function ks(e){return new Pe("invalid-cordova-configuration",e)}function Ss(){for(var e=20,t=[];0n.c?bs(n,ru,56-n.c):bs(n,ru,n.b-(n.c-56));for(var r=63;56<=r;r--)n.f[r]=255&o,o/=256;for(ys(n),r=o=0;r>i;return So(t)}function ws(t,n,o,r){var i=Ss(),e=new ir(n,r,null,i,new Pe("no-auth-event")),s=G("BuildInfo.packageName",yc);if("string"!=typeof s)throw new Pe("invalid-cordova-configuration");var l=G("BuildInfo.displayName",yc),d={};if(re().toLowerCase().match(/iphone|ipad|ipod/))d.ibi=s;else if(re().toLowerCase().match(/android/))d.apn=s;else return A(new Pe("operation-not-supported-in-this-environment"));l&&(d.appDisplayName=l),i=Cs(i),d.sessionId=i;var p=_i(t.l,t.i,t.m,n,o,null,r,t.o,d,t.u);return t.ga().then(function(){var n=t.h;return t.v.a.set(Zp,e.D(),n)}).then(function(){var e=G("cordova.plugins.browsertab.isAvailable",yc);if("function"!=typeof e)throw new Pe("invalid-cordova-configuration");var n=null;e(function(e){if(e){if(n=G("cordova.plugins.browsertab.openUrl",yc),"function"!=typeof n)throw new Pe("invalid-cordova-configuration");n(p)}else{if(n=G("cordova.InAppBrowser.open",yc),"function"!=typeof n)throw new Pe("invalid-cordova-configuration");e=re(),e=e.match(/(iPad|iPhone|iPod).*OS 7_\d/i)||e.match(/(iPad|iPhone|iPod).*OS 8_\d/i),t.a=n(p,e?"_blank":"_system","location=yes")}})})}function Ts(e,t){for(var n=0;ne.f&&(e.a=e.f),t)}function Rl(e,t){e.stop(),e.b=yn(_l(e,t)).then(function(){return De()}).then(function(){return e.h()}).then(function(){Rl(e,!0)}).s(function(t){e.i(t)&&Rl(e,!1)})}function ed(e){this.f=e,this.b=this.a=null,this.c=0}function od(e,t){var n=t[Ip],o=t.refreshToken;t=id(t.expiresIn),e.b=n,e.c=t,e.a=o}function rd(e,t){e.b=t.b,e.a=t.a,e.c=t.c}function id(e){return ja()+1E3*parseInt(e,10)}function sd(e,t){return pa(e.f,t).then(function(t){return e.b=t.access_token,e.c=id(t.expires_in),e.a=t.refresh_token,{accessToken:e.b,expirationTime:e.c,refreshToken:e.a}}).s(function(t){throw"auth/user-token-expired"==t.code&&(e.a=null),t})}function ld(e,t){this.a=e||null,this.b=t||null,I(this,{lastSignInTime:Ee(t||null),creationTime:Ee(e||null)})}function dd(e){return new ld(e.a,e.b)}function ud(t,n,o,r,i,e){I(this,{uid:t,displayName:r||null,photoURL:i||null,email:o||null,phoneNumber:e||null,providerId:n})}function md(e,t){for(var n in Qt.call(this,e),t)this[n]=t[n]}function hd(e,t,n){this.G=[],this.l=e.apiKey,this.o=e.appName,this.u=e.authDomain||null,e=uc.SDK_VERSION?xo(uc.SDK_VERSION):null,this.b=new ra(this.l,Ka(wi),e),this.h=new ed(this.b),Ed(this,t[Ip]),od(this.h,t),Ie(this,"refreshToken",this.h.a),al(this,n||{}),mn.call(this),this.I=!1,this.u&&se()&&(this.a=Us(this.u,this.l,this.o)),this.N=[],this.i=null,this.w=vd(this),this.V=z(this.Ha,this);var o=this;this.ka=null,this.sa=function(e){o.oa(e.g)},this.X=null,this.O=[],this.ra=function(e){fd(o,e.c)},this.W=null}function gd(e,t){e.X&&an(e.X,"languageCodeChanged",e.sa),(e.X=t)&&tn(t,"languageCodeChanged",e.sa)}function fd(e,t){e.O=t,la(e.b,uc.SDK_VERSION?xo(uc.SDK_VERSION,e.O):null)}function yd(e,t){e.W&&an(e.W,"frameworkChanged",e.ra),(e.W=t)&&tn(t,"frameworkChanged",e.ra)}function bd(e){try{return uc.app(e.o).auth()}catch(t){throw new Pe("internal-error","No firebase.auth.Auth instance is available for the Firebase App '"+e.o+"'!")}}function vd(e){return new Zs(function(){return e.F(!0)},function(e){return e&&"auth/network-request-failed"==e.code},function(){var t=e.h.c-ja()-3E5;return 0i||i>=vu.length)throw new Pe("internal-error","Argument validator received an unsupported number of arguments.");o=vu[i],r=(r?"":o+" argument ")+(n.name?"\""+n.name+"\" ":"")+"must be "+n.K+".";break a}r=null}}if(r)throw new Pe("argument-error",t+" failed: "+r)}function Qd(e,t){return{name:e||"",K:"a valid string",optional:!!t,M:s}}function V(t,n){return{name:t||"",K:"a boolean",optional:!!n,M:e}}function Jd(e,t){return{name:e||"",K:"a valid object",optional:!!t,M:j}}function W(e,t){return{name:e||"",K:"a function",optional:!!t,M:h}}function $d(e,t){return{name:e||"",K:"null",optional:!!t,M:c}}function Yd(){return{name:"",K:"an HTML element",optional:!1,M:function(e){return!!(e&&e instanceof Element)}}}function Zd(){return{name:"auth",K:"an instance of Firebase Auth",optional:!0,M:function(e){return!!(e&&e instanceof Dl)}}}function ec(){return{name:"app",K:"an instance of Firebase App",optional:!0,M:function(e){return!!(e&&e instanceof uc.app.App)}}}function tc(e){return{name:e?e+"Credential":"credential",K:e?"a valid "+e+" credential":"a valid credential",optional:!1,M:function(t){if(!t)return!1;var n=!e||t.providerId===e;return t.ya&&n}}}function rc(){return{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(e){return!!(e&&e.providerId&&e.hasOwnProperty&&e.hasOwnProperty("isOAuthProvider"))}}}function ic(){return{name:"applicationVerifier",K:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,M:function(e){return!!(e&&s(e.type)&&h(e.verify))}}}function sc(e,t,n,o){return{name:n||"",K:e.K+" or "+t.K,optional:!!o,M:function(n){return e.M(n)||t.M(n)}}}function X(e,t){for(var n in t){var o=t[n].name;e[o]=Z(o,e[n],t[n].j)}}function Y(t,n){for(var o in n){var r=n[o].name;if(r!==o){var i=n[o].qb;Object.defineProperty(t,r,{get:function(){return this[o]},set:function(e){Xd(r,[i],[e],!0),this[o]=e},enumerable:!0})}}}function lc(e,t,n,o){e[t]=Z(t,n,o)}function Z(t,n,o){function r(){var e=Array.prototype.slice.call(arguments);return Xd(i,o,e),n.apply(this,e)}if(!o)return n;var i=pc(t),e;for(e in n)r[e]=n[e];for(e in n.prototype)r.prototype[e]=n.prototype[e];return r}function pc(e){return e=e.split("."),e[e.length-1]}var uc=o("dP58").default,mc=mc||{},yc=this,k="closure_uid_"+(1E9*Math.random()>>>0),ia=0,ja=Date.now||function(){return+new Date},na;$(et,Error),et.prototype.name="CustomError",$(u,et),u.prototype.name="AssertionError",nt.prototype.get=function(){if(0/g,Qa=/"/g,Ra=/'/g,Sa=/\x00/g,Ta=/[\x00&<>"']/,Na;a:{var Va=yc.navigator;if(Va){var Wa=Va.userAgent;if(Wa){Na=Wa;break a}}Na=""}var Xa=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],xc=!1,vc=new rt,ya=0,kc=2,Sc=3,Cc,wc;y.prototype.reset=function(){this.f=this.b=this.g=this.a=null,this.c=!1};var Tc=new nt(function(){return new y},function(e){e.reset()});Et.prototype.then=function(e,t,n){return Ot(this,h(e)?e:null,h(t)?t:null,n)},t(Et),na=Et.prototype,na.ia=function(e,t){return e=At(e,e,t),e.c=!0,Mt(this,e),this},na.s=function(e,t){return Ot(this,null,e,t)},na.cancel=function(e){this.a==ya&&Ct(function(){var t=new jt(e);_t(this,t)},this)},na.Lc=function(e){this.a=ya,Dt(this,kc,e)},na.Mc=function(e){this.a=ya,Dt(this,Sc,e)},na.Ub=function(){for(var e;e=Bt(this);)Ut(this,e,this.a,this.i);this.h=!1};var Ac=kt;$(jt,et),jt.prototype.name="cancel";var Ic=0,Nc={};Wt.prototype.pa=!1,Wt.prototype.ua=function(){if(this.ja)for(;this.ja.length;)this.ja.shift()()},Ht[" "]=p;var Lc=yt("Opera"),_c=yt("Trident")||yt("MSIE"),Mc=yt("Edge"),Dc=Mc||_c,Rc=yt("Gecko")&&(!ft(Na.toLowerCase(),"webkit")||yt("Edge"))&&!(yt("Trident")||yt("MSIE"))&&!yt("Edge"),Pc=ft(Na.toLowerCase(),"webkit")&&!yt("Edge"),Fc;a:{var Bc="",Uc=function(){var e=Na;return Rc?/rv:([^\);]+)(\)|;)/.exec(e):Mc?/Edge\/([\d\.]+)/.exec(e):_c?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(e):Pc?/WebKit\/(\S+)/.exec(e):Lc?/(?:Version)[ \/]?(\S+)/.exec(e):void 0}();if(Uc&&(Bc=Uc?Uc[1]:""),_c){var Vc=Gt();if(null!=Vc&&Vc>parseFloat(Bc)){Fc=Vc+"";break a}}Fc=Bc}var jc={},Wc=yc.document,zc;zc=Wc&&_c?Gt()||("CSS1Compat"==Wc.compatMode?parseInt(Fc,10):5):void 0;var Hc=Object.freeze||function(e){return e},ac=!_c||9<=+zc,Kc=_c&&!Xt("9"),cc=function(){if(!yc.addEventListener||!Object.defineProperty)return!1;var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});return yc.addEventListener("test",p,t),yc.removeEventListener("test",p,t),e}();Qt.prototype.preventDefault=function(){this.Gb=!1},$(C,Qt);var dc=Hc({2:"touch",3:"pen",4:"mouse"});C.prototype.preventDefault=function(){C.lb.preventDefault.call(this);var e=this.a;if(e.preventDefault)e.preventDefault();else if(e.returnValue=!1,Kc)try{(e.ctrlKey||112<=e.keyCode&&123>=e.keyCode)&&(e.keyCode=-1)}catch(e){}},C.prototype.f=function(){return this.a};var fc="closure_listenable_"+(0|1E6*Math.random()),gc=0;Yt.prototype.add=function(t,n,o,r,i){var e=t.toString();t=this.a[e],t||(t=this.a[e]=[],this.b++);var s=en(t,n,r,i);return-1>>0);$(mn,Wt),mn.prototype[fc]=!0,mn.prototype.addEventListener=function(e,t,n,o){tn(this,e,t,n,o)},mn.prototype.removeEventListener=function(e,t,n,o){an(this,e,t,n,o)},mn.prototype.dispatchEvent=function(t){var n=this.Ua,o;if(n)for(o=[];n;n=n.Ua)o.push(n);n=this.Nb;var r=t.type||t;if(s(t))t=new Qt(t,n);else if(t instanceof Qt)t.target=t.target||n;else{var i=t;t=new Qt(r,n),vt(t,i)}if(i=!0,o)for(var e=o.length-1,l;0<=e;e--)l=t.b=o[e],i=gn(l,r,!0,t)&&i;if(l=t.b=n,i=gn(l,r,!0,t)&&i,i=gn(l,r,!1,t)&&i,o)for(e=0;e"),no(""),no("
");var Gd={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"},Ld={'"':"\\\"","\\":"\\\\","/":"\\/","":"\\b"," ":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"," ":"\\u000b"},Td=/\uffff/.test("\uFFFF")?/[\\"\x00-\x1f\x7f-\uffff]/g:/[\\"\x00-\x1f\x7f-\xff]/g,Ud=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,ge="Firefox",ee="Chrome",ae={Sc:"FirebaseCore-web",Uc:"FirebaseUI-web"};Be.prototype.get=function(){var e=yc.navigator;return(e&&"boolean"==typeof e.onLine&&(ue()||"chrome-extension:"===ve()||"undefined"!=typeof e.connection)?e.onLine:1)?this.b?this.c:this.a:Math.min(5E3,this.a)};var qe={},He;try{var Je={};Object.defineProperty(Je,"abcd",{configurable:!0,enumerable:!0,value:1}),Object.defineProperty(Je,"abcd",{configurable:!0,enumerable:!0,value:2}),He=2==Je.abcd}catch(e){He=!1}var Ke="EMAIL_SIGNIN",Te="email",Qe="newEmail",Re="requestType",Se="email",Ve="fromEmail",Ue="data",Xe="operation";$(Pe,Error),Pe.prototype.D=function(){return{code:this.code,message:this.message}},Pe.prototype.toJSON=function(){return this.D()};var We="auth/",Ye={"argument-error":"","app-not-authorized":"This app, identified by the domain where it's hosted, is not authorized to use Firebase Authentication with the provided API key. Review your key configuration in the Google API console.","app-not-installed":"The requested mobile application corresponding to the identifier (Android package name or iOS bundle ID) provided is not installed on this device.","captcha-check-failed":"The reCAPTCHA response token provided is either invalid, expired, already used or the domain associated with it does not match the list of whitelisted domains.","code-expired":"The SMS code has expired. Please re-send the verification code to try again.","cordova-not-ready":"Cordova framework is not ready.","cors-unsupported":"This browser is not supported.","credential-already-in-use":"This credential is already associated with a different user account.","custom-token-mismatch":"The custom token corresponds to a different audience.","requires-recent-login":"This operation is sensitive and requires recent authentication. Log in again before retrying this request.","dynamic-link-not-activated":"Please activate Dynamic Links in the Firebase Console and agree to the terms and conditions.","email-already-in-use":"The email address is already in use by another account.","expired-action-code":"The action code has expired. ","cancelled-popup-request":"This operation has been cancelled due to another conflicting popup being opened.","internal-error":"An internal error has occurred.","invalid-app-credential":"The phone verification request contains an invalid application verifier. The reCAPTCHA token response is either invalid or expired.","invalid-app-id":"The mobile app identifier is not registed for the current project.","invalid-user-token":"This user's credential isn't valid for this project. This can happen if the user's token has been tampered with, or if the user isn't for the project associated with this API key.","invalid-auth-event":"An internal error has occurred.","invalid-verification-code":"The SMS verification code used to create the phone auth credential is invalid. Please resend the verification code sms and be sure use the verification code provided by the user.","invalid-continue-uri":"The continue URL provided in the request is invalid.","invalid-cordova-configuration":"The following Cordova plugins must be installed to enable OAuth sign-in: cordova-plugin-buildinfo, cordova-universal-links-plugin, cordova-plugin-browsertab, cordova-plugin-inappbrowser and cordova-plugin-customurlscheme.","invalid-custom-token":"The custom token format is incorrect. Please check the documentation.","invalid-email":"The email address is badly formatted.","invalid-api-key":"Your API key is invalid, please check you have copied it correctly.","invalid-cert-hash":"The SHA-1 certificate hash provided is invalid.","invalid-credential":"The supplied auth credential is malformed or has expired.","invalid-persistence-type":"The specified persistence type is invalid. It can only be local, session or none.","invalid-message-payload":"The email template corresponding to this action contains invalid characters in its message. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-oauth-provider":"EmailAuthProvider is not supported for this operation. This operation only supports OAuth providers.","invalid-oauth-client-id":"The OAuth client ID provided is either invalid or does not match the specified API key.","unauthorized-domain":"This domain is not authorized for OAuth operations for your Firebase project. Edit the list of authorized domains from the Firebase console.","invalid-action-code":"The action code is invalid. This can happen if the code is malformed, expired, or has already been used.","wrong-password":"The password is invalid or the user does not have a password.","invalid-phone-number":"The format of the phone number provided is incorrect. Please enter the phone number in a format that can be parsed into E.164 format. E.164 phone numbers are written in the format [+][country code][subscriber number including area code].","invalid-recipient-email":"The email corresponding to this action failed to send as the provided recipient email address is invalid.","invalid-sender":"The email template corresponding to this action contains an invalid sender email or name. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-verification-id":"The verification ID used to create the phone auth credential is invalid.","missing-android-pkg-name":"An Android Package Name must be provided if the Android App is required to be installed.","auth-domain-config-required":"Be sure to include authDomain when calling firebase.initializeApp(), by following the instructions in the Firebase console.","missing-app-credential":"The phone verification request is missing an application verifier assertion. A reCAPTCHA response token needs to be provided.","missing-verification-code":"The phone auth credential was created with an empty SMS verification code.","missing-continue-uri":"A continue URL must be provided in the request.","missing-iframe-start":"An internal error has occurred.","missing-ios-bundle-id":"An iOS Bundle ID must be provided if an App Store ID is provided.","missing-phone-number":"To send verification codes, provide a phone number for the recipient.","missing-verification-id":"The phone auth credential was created with an empty verification ID.","app-deleted":"This instance of FirebaseApp has been deleted.","account-exists-with-different-credential":"An account already exists with the same email address but different sign-in credentials. Sign in using a provider associated with this email address.","network-request-failed":"A network error (such as timeout, interrupted connection or unreachable host) has occurred.","no-auth-event":"An internal error has occurred.","no-such-provider":"User was not linked to an account with the given provider.","null-user":"A null user object was provided as the argument for an operation which requires a non-null user object.","operation-not-allowed":"The given sign-in provider is disabled for this Firebase project. Enable it in the Firebase console, under the sign-in method tab of the Auth section.","operation-not-supported-in-this-environment":"This operation is not supported in the environment this application is running on. \"location.protocol\" must be http, https or chrome-extension and web storage must be enabled.","popup-blocked":"Unable to establish a connection with the popup. It may have been blocked by the browser.","popup-closed-by-user":"The popup has been closed by the user before finalizing the operation.","provider-already-linked":"User can only be linked to one identity for the given provider.","quota-exceeded":"The project's quota for this operation has been exceeded.","redirect-cancelled-by-user":"The redirect operation has been cancelled by the user before finalizing.","redirect-operation-pending":"A redirect sign-in operation is already pending.",timeout:"The operation has timed out.","user-token-expired":"The user's credential is no longer valid. The user must sign in again.","too-many-requests":"We have blocked all requests from this device due to unusual activity. Try again later.","unauthorized-continue-uri":"The domain of the continue URL is not whitelisted. Please whitelist the domain in the Firebase console.","unsupported-persistence-type":"The current environment does not support the specified persistence type.","user-cancelled":"User did not grant your application the permissions it requested.","user-not-found":"There is no user record corresponding to this identifier. The user may have been deleted.","user-disabled":"The user account has been disabled by an administrator.","user-mismatch":"The supplied credentials do not correspond to the previously signed in user.","user-signed-out":"","weak-password":"The password must be 6 characters long or more.","web-storage-unsupported":"This browser is not supported or 3rd party cookies and data may be disabled."},Ze="android",$c="handleCodeInApp",Yc="iOS",Zc="url",ep="installApp",tp="minimumVersion",np="packageName",op="bundleId",rp=null,ap=null;Eo.prototype.f=function(){return this.b};var ip=["oauth_consumer_key","oauth_nonce","oauth_signature","oauth_signature_method","oauth_timestamp","oauth_token","oauth_version"],sp=["client_id","response_type","scope","redirect_uri","state"],lp={Tc:{Ma:"locale",Ba:500,Aa:600,Na:"facebook.com",eb:sp},Vc:{Ma:null,Ba:500,Aa:620,Na:"github.com",eb:sp},Wc:{Ma:"hl",Ba:515,Aa:680,Na:"google.com",eb:sp},bd:{Ma:"lang",Ba:485,Aa:705,Na:"twitter.com",eb:ip}},dp="idToken",cp="providerId";$(Mo,_o),$(Oo,Mo),$(Do,Mo),$(Ro,Mo),$(Po,Mo),Vo.prototype.ya=function(e){return Ma(e,qo(this))},Vo.prototype.c=function(e,t){var n=qo(this);return n.idToken=t,Da(e,n)},Vo.prototype.f=function(e,t){var n=qo(this);return Uo(Fa(e,n),t)},Vo.prototype.D=function(){var e={providerId:this.providerId,signInMethod:this.signInMethod};return this.idToken&&(e.oauthIdToken=this.idToken),this.accessToken&&(e.oauthAccessToken=this.accessToken),this.secret&&(e.oauthTokenSecret=this.secret),e},jo.prototype.Da=function(e){return this.vb=xt(e),this},$(Wo,jo),Wo.prototype.ta=function(e){return dt(this.a,e)||this.a.push(e),this},Wo.prototype.Ab=function(){return mt(this.a)},Wo.prototype.credential=function(e,t){if(!e&&!t)throw new Pe("argument-error","credential failed: must provide the ID token and/or the access token.");return new Vo(this.providerId,{idToken:e||null,accessToken:t||null},this.providerId)},$(M,Wo),Ie(M,"PROVIDER_ID","facebook.com"),Ie(M,"FACEBOOK_SIGN_IN_METHOD","facebook.com"),$(Ho,Wo),Ie(Ho,"PROVIDER_ID","github.com"),Ie(Ho,"GITHUB_SIGN_IN_METHOD","github.com"),$(Go,Wo),Ie(Go,"PROVIDER_ID","google.com"),Ie(Go,"GOOGLE_SIGN_IN_METHOD","google.com"),$(Qo,jo),Ie(Qo,"PROVIDER_ID","twitter.com"),Ie(Qo,"TWITTER_SIGN_IN_METHOD","twitter.com"),$o.prototype.ya=function(e){return this.signInMethod==Yo.EMAIL_LINK_SIGN_IN_METHOD?qa(e,gi,{email:this.a,oobCode:this.b}):qa(e,vi,{email:this.a,password:this.b})},$o.prototype.c=function(e,t){return this.signInMethod==Yo.EMAIL_LINK_SIGN_IN_METHOD?qa(e,Bp,{idToken:t,email:this.a,oobCode:this.b}):qa(e,qp,{idToken:t,email:this.a,password:this.b})},$o.prototype.f=function(e,t){return Uo(this.ya(e),t)},$o.prototype.D=function(){return{email:this.a,password:this.b,signInMethod:this.signInMethod}},I(Yo,{PROVIDER_ID:"password"}),I(Yo,{EMAIL_LINK_SIGN_IN_METHOD:"emailLink"}),I(Yo,{EMAIL_PASSWORD_SIGN_IN_METHOD:"password"}),er.prototype.ya=function(e){return e.Ta(tr(this))},er.prototype.c=function(e,t){var n=tr(this);return n.idToken=t,qa(e,ei,n)},er.prototype.f=function(e,t){var n=tr(this);return n.operation="REAUTH",e=qa(e,Hp,n),Uo(e,t)},er.prototype.D=function(){var e={providerId:"phone"};return this.a.Sa&&(e.verificationId=this.a.Sa),this.a.Ra&&(e.verificationCode=this.a.Ra),this.a.Fa&&(e.temporaryProof=this.a.Fa),this.a.$&&(e.phoneNumber=this.a.$),e},nr.prototype.Ta=function(e,t){var n=this.a.b;return It(t.verify()).then(function(o){if(!s(o))throw new Pe("argument-error","An implementation of firebase.auth.ApplicationVerifier.prototype.verify() must return a firebase.Promise that resolves with a string.");switch(t.type){case"recaptcha":return Ea(n,{phoneNumber:e,recaptchaToken:o}).then(function(e){return"function"==typeof t.reset&&t.reset(),e},function(e){throw"function"==typeof t.reset&&t.reset(),e});default:throw new Pe("argument-error","Only firebase.auth.ApplicationVerifiers with type=\"recaptcha\" are currently supported.");}})},I(nr,{PROVIDER_ID:"phone"}),I(nr,{PHONE_SIGN_IN_METHOD:"phone"}),ir.prototype.D=function(){return{type:this.b,eventId:this.c,urlResponse:this.f,sessionId:this.g,error:this.a&&this.a.D()}};var pp=null;lr.prototype.subscribe=function(e){var t=this;this.a.push(e),this.b||(this.b=function(e){for(var n=0;n=Sr(this).value)for(h(t)&&(t=t()),e=new xr(e,t+"",this.f),n&&(e.a=n),n=this;n;)n=n.a};var xp={},vp=null;$(P,ur),P.prototype.a=function(){return new Tr(this.f)},P.prototype.b=function(e){return function(){return e}}({}),$(Tr,mn);var kp=0;na=Tr.prototype,na.open=function(e,t){if(this.readyState!=kp)throw this.abort(),Error("Error reopening a connection");this.h=e,this.c=t,this.readyState=1,Er(this)},na.send=function(e){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.a=!0;var t={headers:this.g,method:this.h,credentials:void 0,cache:void 0};e&&(t.body=e),this.i.fetch(new Request(this.c,t)).then(this.ec.bind(this),this.Cb.bind(this))},na.abort=function(){this.responseText="",this.g=new Headers,this.status=0,1<=this.readyState&&this.a&&4!=this.readyState&&(this.readyState=4,this.a=!1,Er(this)),this.readyState=kp},na.ec=function(e){this.a&&(this.b||(this.b=e.headers,this.readyState=2,Er(this)),this.a&&(this.readyState=3,Er(this),this.a&&e.text().then(this.dc.bind(this,e),this.Cb.bind(this))))},na.dc=function(e,t){this.a&&(this.status=e.status,this.statusText=e.statusText,this.responseText=t,this.readyState=4,Er(this))},na.Cb=function(e){var t=this.f;t&&t.log(fp,"Failed to fetch url "+this.c,e instanceof Error?e:Error(e)),this.a&&(this.readyState=4,Er(this))},na.setRequestHeader=function(e,t){this.g.append(e,t)},na.getResponseHeader=function(e){return this.b?this.b.get(e.toLowerCase())||"":((e=this.f)&&e.log(fp,"Attempting to get response header but no headers have been received for url: "+this.c,void 0),"")},na.getAllResponseHeaders=function(){if(!this.b){var e=this.f;return e&&e.log(fp,"Attempting to get all response headers but no headers have been received for url: "+this.c,void 0),""}e=[];for(var t=this.b.entries(),n=t.next();!n.done;)n=n.value,e.push(n[0]+": "+n[1]),n=t.next();return e.join("\r\n")},$(Ar,mn);var Sp="";Ar.prototype.b=Cr("goog.net.XhrIo");var Cp=/^https?$/i,wp=["POST","PUT"];na=Ar.prototype,na.Ga=function(){"undefined"!=typeof mc&&this.a&&(this.h="Timed out after "+this.g+"ms, aborting",wr(this.b,Ur(this,this.h)),this.dispatchEvent("timeout"),this.abort(8))},na.abort=function(){this.a&&this.c&&(wr(this.b,Ur(this,"Aborting")),this.c=!1,this.f=!0,this.a.abort(),this.f=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),Dr(this))},na.ua=function(){this.a&&(this.c&&(this.c=!1,this.f=!0,this.a.abort(),this.f=!1),Dr(this,!0)),Ar.lb.ua.call(this)},na.Fb=function(){this.pa||(this.I||this.i||this.f?Or(this):this.tc())},na.tc=function(){Or(this)},na.getResponse=function(){try{if(!this.a)return null;if("response"in this.a)return this.a.response;switch(this.o){case Sp:case"text":return this.a.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in this.a)return this.a.mozResponseArrayBuffer;}var e=this.b;return e&&e.log(gp,"Response type "+this.o+" is not supported on this browser",void 0),null}catch(e){return wr(this.b,"Can not get response: "+e.message),null}},Vr.prototype.cancel=function(e){if(this.a)this.c instanceof Vr&&this.c.cancel();else{if(this.b){var t=this.b;delete this.b,e?t.cancel(e):(t.m--,0>=t.m&&t.cancel())}this.v?this.v.call(this.u,this):this.l=!0,this.a||(e=new Xr(this),jr(this),qr(this,!1,e))}},Vr.prototype.o=function(e,t){this.i=!1,qr(this,e,t)},Vr.prototype.C=function(){jr(this),qr(this,!0,null)},Vr.prototype.then=function(t,n,o){var r=new Et(function(e,t){i=e,s=t}),i,s;return zr(this,i,function(e){e instanceof Xr?r.cancel():s(e)}),r.then(t,n,o)},t(Vr),$(Gr,et),Gr.prototype.message="Deferred has already fired",Gr.prototype.name="AlreadyCalledError",$(Xr,et),Xr.prototype.message="Deferred was canceled",Xr.prototype.name="CanceledError",Qr.prototype.c=function(){throw delete Tp[this.a],this.b};var Tp={},Ep=0,Ap=1;$(ta,et),$(oa,ur),oa.prototype.a=function(){return new this.f},oa.prototype.b=function(){return{}};var Ip="idToken",L=new Be(3E4,6E4),Np={"Content-Type":"application/x-www-form-urlencoded"},Lp=new Be(3E4,6E4),_p={"Content-Type":"application/json"},Mp;ra.prototype.o=function(t,o,r,i,s,e){if(le()&&("undefined"==typeof yc.fetch||"undefined"==typeof yc.Headers||"undefined"==typeof yc.Request))throw new Pe("operation-not-supported-in-this-environment","fetch, Headers and Request native APIs or equivalent Polyfills must be available to support HTTP requests from a Worker environment.");var l=new Ar(this.c);if(e){l.g=n(0,e);var d=setTimeout(function(){l.dispatchEvent("timeout")},e)}E(l,"complete",function(){d&&clearTimeout(d);var e=null;try{e=JSON.parse(Br(this))||null}catch(t){e=null}o&&o(e)}),hn(l,"ready",function(){d&&clearTimeout(d),zt(this)}),hn(l,"timeout",function(){d&&clearTimeout(d),zt(this),o&&o(null)}),Ir(l,t,r,i,s)};var Op=Hn("https://apis.google.com/js/client.js?onload=%{onload}"),Dp="__fcb"+i(1E6*Math.random()).toString();ra.prototype.l=function(t,n,o,r,i){var s=this;Mp.then(function(){window.gapi.client.setApiKey(s.b);var l=window.gapi.auth.getToken();window.gapi.auth.setToken(null),window.gapi.client.request({path:t,method:o,body:r,headers:i,authType:"none",callback:function(e){window.gapi.auth.setToken(l),n&&n(e)}})}).s(function(e){n&&n({error:{message:e&&e.message||"CORS_UNSUPPORTED"}})})},ra.prototype.Pa=function(){return qa(this,jp,{})},ra.prototype.mb=function(e,t){return qa(this,di,{idToken:e,email:t})},ra.prototype.nb=function(e,t){return qa(this,qp,{idToken:e,password:t})};var Rp={displayName:"DISPLAY_NAME",photoUrl:"PHOTO_URL"};na=ra.prototype,na.ob=function(e,t){var n={idToken:e},o=[];return x(Rp,function(r,i){var s=t[i];null===s?o.push(r):i in t&&(n[i]=s)}),o.length&&(n.deleteAttribute=o),qa(this,di,n)},na.hb=function(e,t){return e={requestType:"PASSWORD_RESET",email:e},vt(e,t),qa(this,ci,e)},na.ib=function(e,t){return e={requestType:"EMAIL_SIGNIN",email:e},vt(e,t),qa(this,ti,e)},na.gb=function(e,t){return e={requestType:"VERIFY_EMAIL",idToken:e},vt(e,t),qa(this,bi,e)},na.Ta=function(e){return qa(this,zp,e)},na.Xa=function(e,t){return qa(this,ui,{oobCode:e,newPassword:t})},na.Ja=function(e){return qa(this,qi,{oobCode:e})},na.Va=function(e){return qa(this,Pp,{oobCode:e})};var Pp={endpoint:"setAccountInfo",B:Ua,da:"email"},qi={endpoint:"resetPassword",B:Ua,J:function(e){var t=e.requestType;if(!t||!e.email&&"EMAIL_SIGNIN"!=t)throw new Pe("internal-error")}},pi={endpoint:"signupNewUser",B:function(e){if(ma(e),!e.password)throw new Pe("weak-password")},J:va,R:!0},ri={endpoint:"createAuthUri"},Fp={endpoint:"deleteAccount",T:["idToken"]},si={endpoint:"setAccountInfo",T:["idToken","deleteProvider"],B:function(e){if(!_(e.deleteProvider))throw new Pe("internal-error")}},gi={endpoint:"emailLinkSignin",T:["email","oobCode"],B:ma,J:va,R:!0},Bp={endpoint:"emailLinkSignin",T:["idToken","email","oobCode"],B:ma,J:va,R:!0},Up={endpoint:"getAccountInfo"},ti={endpoint:"getOobConfirmationCode",T:["requestType"],B:function(e){if("EMAIL_SIGNIN"!=e.requestType)throw new Pe("internal-error");ma(e)},da:"email"},bi={endpoint:"getOobConfirmationCode",T:["idToken","requestType"],B:function(e){if("VERIFY_EMAIL"!=e.requestType)throw new Pe("internal-error")},da:"email"},ci={endpoint:"getOobConfirmationCode",T:["requestType"],B:function(e){if("PASSWORD_RESET"!=e.requestType)throw new Pe("internal-error");ma(e)},da:"email"},ai={rb:!0,endpoint:"getProjectConfig",Eb:"GET"},Vp={rb:!0,endpoint:"getRecaptchaParam",Eb:"GET",J:function(e){if(!e.recaptchaSiteKey)throw new Pe("internal-error")}},ui={endpoint:"resetPassword",B:Ua,da:"email"},oi={endpoint:"sendVerificationCode",T:["phoneNumber","recaptchaToken"],da:"sessionInfo"},di={endpoint:"setAccountInfo",T:["idToken"],B:ha,R:!0},qp={endpoint:"setAccountInfo",T:["idToken"],B:function(e){if(ha(e),!e.password)throw new Pe("weak-password")},J:va,R:!0},jp={endpoint:"signupNewUser",J:va,R:!0},Wp={endpoint:"verifyAssertion",B:Ia,J:_a,R:!0},ki={endpoint:"verifyAssertion",B:Ia,J:function(e){if(e.errorMessage&&"USER_NOT_FOUND"==e.errorMessage)throw new Pe("user-not-found");if(e.errorMessage)throw O(e.errorMessage);if(!e[Ip])throw new Pe("internal-error")},R:!0},mi={endpoint:"verifyAssertion",B:function(e){if(Ia(e),!e.idToken)throw new Pe("internal-error")},J:_a,R:!0},li={endpoint:"verifyCustomToken",B:function(e){if(!e.token)throw new Pe("invalid-custom-token")},J:va,R:!0},vi={endpoint:"verifyPassword",B:function(e){if(ma(e),!e.password)throw new Pe("wrong-password")},J:va,R:!0},zp={endpoint:"verifyPhoneNumber",B:ka,J:va},ei={endpoint:"verifyPhoneNumber",B:function(e){if(!e.idToken)throw new Pe("internal-error");ka(e)},J:function(e){if(e.temporaryProof)throw e.code="credential-already-in-use",pr(e);va(e)}},Hp={Tb:{USER_NOT_FOUND:"user-not-found"},endpoint:"verifyPhoneNumber",B:ka,J:va},Kp={Yc:{Za:"https://www.googleapis.com/identitytoolkit/v3/relyingparty/",fb:"https://securetoken.googleapis.com/v1/token",id:"p"},$c:{Za:"https://staging-www.sandbox.googleapis.com/identitytoolkit/v3/relyingparty/",fb:"https://staging-securetoken.sandbox.googleapis.com/v1/token",id:"s"},ad:{Za:"https://www-googleapis-test.sandbox.google.com/identitytoolkit/v3/relyingparty/",fb:"https://test-securetoken.sandbox.googleapis.com/v1/token",id:"t"}},wi;wi=Ka("__EID__")?"__EID__":void 0;var yi=Hn("https://apis.google.com/js/api.js?onload=%{onload}"),Fi=new Be(3E4,6E4),Gi=new Be(5E3,15E3),Ci=null;fi.prototype.toString=function(){return this.f?Nn(this.a,"v",this.f):Bn(this.a.a,"v"),this.b?Nn(this.a,"eid",this.b):Bn(this.a.a,"eid"),this.c.length?Nn(this.a,"fw",this.c.join(",")):Bn(this.a.a,"fw"),this.a.toString()},xi.prototype.toString=function(){var t=_n(this.o,"/__/auth/handler");if(Nn(t,"apiKey",this.l),Nn(t,"appName",this.c),Nn(t,"authType",this.m),this.a.isOAuthProvider){var n=this.a;try{var o=uc.app(this.c).auth().ea()}catch(e){o=null}for(var r in n.Ya=o,Nn(t,"providerId",this.a.providerId),n=this.a,o=xe(n.vb),o)o[r]=o[r].toString();r=n.Ac,o=xt(o);for(var i=0,e;ithis.c-3E4?this.a?sd(this,{grant_type:"refresh_token",refresh_token:this.a}):It(null):It({accessToken:this.b,expirationTime:this.c,refreshToken:this.a})},ld.prototype.D=function(){return{lastLoginAt:this.b,createdAt:this.a}},$(md,Qt),$(hd,mn),hd.prototype.oa=function(e){this.ka=e,sa(this.b,e)},hd.prototype.ea=function(){return this.ka},hd.prototype.xa=function(){return mt(this.O)},hd.prototype.Ha=function(){this.w.b&&(this.w.stop(),this.w.start())},Ie(hd.prototype,"providerId","firebase"),na=hd.prototype,na.reload=function(){var e=this;return ql(this,bl(this).then(function(){return hl(e).then(function(){return Nd(e)}).then(Md)}))},na.ac=function(e){return this.F(e).then(function(e){return new Ys(e)})},na.F=function(e){var t=this;return ql(this,bl(this).then(function(){return t.h.getToken(e)}).then(function(e){if(!e)throw new Pe("internal-error");return e.accessToken!=t.qa&&(Ed(t,e.accessToken),t.dispatchEvent(new md("tokenChanged"))),fl(t,"refreshToken",e.refreshToken),e.accessToken}))},na.uc=function(e){if(e=e.users,!e||!e.length)throw new Pe("internal-error");e=e[0],al(this,{uid:e.localId,displayName:e.displayName,photoURL:e.photoUrl,email:e.email,emailVerified:!!e.emailVerified,phoneNumber:e.phoneNumber,lastLoginAt:e.lastLoginAt,createdAt:e.createdAt});for(var t=jl(e),n=0;nthis.u&&(this.u=0),0==this.u&&S(this)&&Sd(S(this)),this.removeAuthTokenListener(e)},na.addAuthTokenListener=function(e){var t=this;this.o.push(e),Yl(this,this.i.then(function(){t.l||dt(t.o,e)&&e(U(t))}))},na.removeAuthTokenListener=function(e){pt(this.o,function(t){return t==e})},na.delete=function(){this.l=!0;for(var e=0;e=n||(c.line>=n&&(c=d(n,0)),n=i.line,null==r?t.uncomment(i,c,e)?r="un":(t.lineComment(i,c,e),r="line"):"un"==r?t.uncomment(i,c,e):t.lineComment(i,c,e))}}),e.defineExtension("lineComment",function(e,i,c){c||(c=s);var p=this,u=r(p,e),m=p.getLine(e.line);if(!(null==m||n(p,e,m))){var h=c.lineComment||u.lineComment;if(!h)return void((c.blockCommentStart||u.blockCommentStart)&&(c.fullLines=!0,p.blockComment(e,i,c)));var g=o(0!=i.ch||i.line==e.line?i.line+1:i.line,p.lastLine()+1),f=null==c.padding?" ":c.padding,y=c.commentBlankLines||e.line==i.line;p.operation(function(){if(c.indent){for(var n=null,o=e.line;oi.length)&&(n=i)}for(var o=e.line;oh||c.operation(function(){if(!1!=n.fullLines){var o=l.test(c.getLine(h));c.replaceRange(g+m,d(h)),c.replaceRange(u+g,d(e.line,0));var r=n.blockCommentLead||p.blockCommentLead;if(null!=r)for(var s=e.line+1;s<=h;++s)(s!=h||o)&&c.replaceRange(r+g,d(s,0))}else c.replaceRange(m,t),c.replaceRange(u,e)})}}),e.defineExtension("uncomment",function(e,t,n){n||(n=s);var c=this,p=r(c,e),u=o(0!=t.ch||t.line==e.line?t.line:t.line-1,c.lastLine()),m=o(e.line,u),h=n.lineComment||p.lineComment,g=[],f=null==n.padding?" ":n.padding,y;lineComment:{if(!h)break lineComment;for(var b=m;b<=u;++b){var i=c.getLine(b),x=i.indexOf(h);if(-1n||(t.slice(o,o+f.length)==f&&(o+=f.length),y=!0,c.replaceRange("",d(e,n),d(e,o)))}}),y)return!0}var v=n.blockCommentStart||p.blockCommentStart,k=n.blockCommentEnd||p.blockCommentEnd;if(!v||!k)return!1;var S=n.blockCommentLead||p.blockCommentLead,C=c.getLine(m),w=C.indexOf(v);if(-1==w)return!1;var T=u==m?C:c.getLine(u),E=T.indexOf(k,u==m?w+v.length:0),A=d(m,w+1),I=d(u,E+1);if(-1==E||!/comment/.test(c.getTokenTypeAt(A))||!/comment/.test(c.getTokenTypeAt(I))||-1o&&0==n.ch)return t.clipPos(h(n.line-1));var r=t.getLine(n.line);if(0=r.length)return t.clipPos(h(n.line+1,0));for(var s="start",l=n.ch,d=0>o?0:r.length,c=0,i;l!=d;l+=o,c++){var p=r.charAt(0>o?l-1:l),u="_"!=p&&e.isWordChar(p)?"w":"o";if("w"==u&&p.toUpperCase()==p&&(u="W"),"start"==s)"o"!=u&&(s="in",i=u);else if("in"==s&&i!=u){if("w"==i&&"W"==u&&0>o&&l--,"W"==i&&"w"==u&&0n?o.from():o.to()})}function o(t,n){return t.isReadOnly()?e.Pass:void(t.operation(function(){for(var e=t.listSelections().length,o=[],r=-1,s=0,i;s=n&&e.execCommand("goLineUp")}e.scrollTo(null,t.top-e.defaultTextHeight())},m.scrollLineDown=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var n=e.lineAtHeight(t.top,"local")+1;e.getCursor().line<=n&&e.execCommand("goLineDown")}e.scrollTo(null,t.top+e.defaultTextHeight())},m.splitSelectionByLine=function(e){for(var t=e.listSelections(),n=[],o=0;or.line&&s==i.line&&0==i.ch||n.push({anchor:s==r.line?r:h(s,0),head:s==i.line?i:h(s)});e.setSelections(n,0)},m.singleSelectionTop=function(e){var t=e.listSelections()[0];e.setSelection(t.anchor,t.head,{scroll:!1})},m.selectLine=function(e){for(var t=e.listSelections(),n=[],o=0,r;or?o.push(d,c):o.length&&(o[o.length-1]=c),r=c}t.operation(function(){for(var e=0;et.lastLine()?t.replaceRange("\n"+i,h(t.lastLine()),null,"+swapLine"):t.replaceRange(i+"\n",h(r,0),null,"+swapLine")}t.setSelections(s),t.scrollIntoView()})},m.swapLineDown=function(t){if(t.isReadOnly())return e.Pass;for(var n=t.listSelections(),o=[],r=t.lastLine()+1,s=n.length-1;0<=s;s--){var i=n[s],l=i.to().line+1,d=i.from().line;0!=i.to().ch||i.empty()||l--,l=e}function u(e){return 47e}function m(e){return e===N||e===I}function h(e){return e&&e!==O&&!m(e)&&!o(e)}function g(e,t,n){for(o(e.charCodeAt(t))&&t++;S(e.charCodeAt(t),n.syntax);)t++;return t}function f(e,t,n){if(!n)return 0;var o=new w(e),r=(n+"").split("").map(P);o.pos=t;for(var i;!o.sol();)if(!(y(o,B,F)||y(o,j,q))){if(i=o.pos,b(o,r))return i;o.pos--}return-1}function y(e,t,n){var o=e.pos;if(e.eat(t))for(;!e.sol();){if(e.eat(n))return!0;e.pos--}return e.pos=o,!1}function b(e,t){for(var n=e.pos,o=!1,r=t.length-1;0<=r&&!e.sol()&&!!e.eat(t[r]);r--)o=0===r;return o||(e.pos=n),o}function x(e,t){return-1!==e.indexOf(t)}function v(e){return 64e||96e||47e||W.has(e)}function k(e,t){return e===U||"markup"===t&&(e===F||e===q)}function S(e,t){return e===V||"markup"===t&&(e===B||e===j)}t.__esModule=!0;var C=Object.assign||function(e){for(var t=1,n;t","/"].map(P)),z=new Map().set(F,B).set(U,V).set(q,j),H={syntax:"markup",lookAhead:null,prefix:""};t.default=function(e,t,n){t=Math.min(e.length,Math.max(0,null==t?e.length:t)),n="boolean"==typeof n?C({},H,{lookAhead:n}):C({},H,n),(null==n.lookAhead||!0===n.lookAhead)&&(t=g(e,t,n));var o=void 0,r=f(e,t,n.prefix);if(-1===r)return null;var i=new w(e,r);i.pos=t;for(var s=[];!i.sol();){if(o=i.peek(),S(o,n.syntax))s.push(o);else if(k(o,n.syntax)){if(s.pop()!==z.get(o))break;}else if(x(s,B)||x(s,j)){i.pos--;continue}else if(R(i)||!v(o))break;i.pos--}if(!s.length&&i.pos!==t){var l=e.slice(i.pos,t).replace(/^[*+>^]+/,"");return{abbreviation:l,location:t-l.length,start:n.prefix?r-n.prefix.length:t-l.length,end:t}}}},ZUoI:function(e,t,n){"use strict";n("wGjj");var o=function(e){return e&&"object"==typeof e&&"default"in e?e["default"]:e}(n("dP58"));e.exports=o},Znrd:function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(null==e)return e;for(var n=[],o=function(e,n,o,r){return null==t[o]?"":n+t[o]+r},r="",s=0,l=0,i=void 0,d=void 0;l=t.get("inlineBreak"))return!0}for(var l=0,i=e.children.length;lo?0:o}function k(e,t){var n=e.node;if(t.enabled&&t.trigger&&n.name)for(var o=e.node.attributes.reduce(function(e,t){return t.name&&null!=t.value&&(e[t.name.toUpperCase().replace(/-/g,"_")]=t.value),e},{}),s=0,i=t.trigger.length;st?0:t}function E(e,t){var n=e.node;return!n.isTextOnly&&n.value&&(e.beforeText=X.test(n.value)?e.newline+e.indent+t.indent(1):" "),e}function A(e,t){if(null!=e.value&&X.test(e.value)){var n=i(e.value),o=t.indent(1),r=n.reduce(function(e,t){return Math.max(e,t.length)},0);return n.map(function(e,t){return""+(t?o:"")+I(e,r)+" |"}).join("\n")}return e.value}function I(e,t){for(;e.length"},z=/^id$/i,H=/^class$/i,K={primary:function(e){return e.join("")},secondary:function(e){return e.map(function(e){return e.isBoolean?e.name:e.name+"="+e.value}).join(", ")}},G={open:null,close:null,omitName:/^div$/i,attributes:K},X=/\n|\r/,Q=/\n|\r/,J={none:"[ SECONDARY_ATTRS]",round:"[(SECONDARY_ATTRS)]",curly:"[{SECONDARY_ATTRS}]",square:"[[SECONDARY_ATTRS]"},$=/\n|\r/,Y={html:function(e,t,n){n=R({},n);var o=S(n);return(0,U.default)(e,n.field,function(e){if(e=m(e,t),!c(e)){var n=e.node;if(n.name){var r=t.name(n.name),i=y(e,t);e.open="<"+r+i+(n.selfClosing?t.selfClose():"")+">",n.selfClosing||(e.close=""),k(e,o.comment)}!n.value&&(n.children.length||n.selfClosing)||(e.text=e.renderFields(n.value))}return e})},haml:function(e,t,n){n=n||{};var o={open:"[%NAME][PRIMARY_ATTRS][(SECONDARY_ATTRS)][SELF_CLOSE]",selfClose:"/",attributes:{secondary:function(e){return e.map(function(e){return e.isBoolean?""+e.name+(t.get("compactBooleanAttributes")?"":"=true"):e.name+"="+t.quote(e.value)}).join(" ")}}};return(0,U.default)(e,n.field,function(e){if(e=C(e,t,o),e=E(e,t),!c(e)){var n=e.node;!n.value&&(n.children.length||n.selfClosing)||(e.text=e.renderFields(A(n,t)))}return e})},slim:function(e,t,n){n=n||{};var o=n.attributeWrap&&J[n.attributeWrap]||J.none,r=o===J.none?function(e){return e.name+"=true"}:function(e){return e.name},i={open:"[NAME][PRIMARY_ATTRS]"+o+"[SELF_CLOSE]",selfClose:"/",attributes:{secondary:function(e){return e.map(function(e){return e.isBoolean?r(e):e.name+"="+t.quote(e.value)}).join(" ")}}};return(0,U.default)(e,n.field,function(e){if(e=C(e,t,i),e=N(e,t),!c(e)){var n=e.node;!n.value&&(n.children.length||n.selfClosing)||(e.text=e.renderFields(L(n,t)))}return e})},pug:function(e,t,n){n=n||{};var o={open:"[NAME][PRIMARY_ATTRS][(SECONDARY_ATTRS)]",attributes:{secondary:function(e){return e.map(function(e){return e.isBoolean?e.name:e.name+"="+t.quote(e.value)}).join(", ")}}};return(0,U.default)(e,n.field,function(e){if(e=C(e,t,o),e=M(e,t),!c(e)){var n=e.node;!n.value&&(n.children.length||n.selfClosing)||(e.text=e.renderFields(O(n,t)))}return e})}};t.default=function(e,t,n,o){return"object"==typeof n&&(o=n,n=null),D(n)||(n="html"),Y[n](e,t,o)},t.supports=D,t.template=r},aBJ1:function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){return e instanceof d?e:"string"==typeof e?new d(e,t):e&&"object"==typeof e?new d(e.name,e.value,e.options):void 0}function r(e){return(e+"").trim()}function i(e,t,n){return e&&n.indexOf(e)===t}t.__esModule=!0;var s=function(){function e(e,t){for(var n=0,o;nt||t>this.children.length)throw new Error("Unable to insert node: position is out of child list range");var n=this.children[t-1],o=this.children[t];e.remove(),e.parent=this,this.children.splice(t,0,e),n&&(e.previous=n,n.next=e),o&&(e.next=o,o.previous=e)},e.prototype.removeChild=function(e){var t=this.children.indexOf(e);-1!==t&&(this.children.splice(t,1),e.previous&&(e.previous.next=e.next),e.next&&(e.next.previous=e.previous),e.parent=e.next=e.previous=null)},e.prototype.remove=function(){this.parent&&this.parent.removeChild(this)},e.prototype.clone=function(t){var n=new e(this.name);return n.value=this.value,n.selfClosing=this.selfClosing,this.repeat&&(n.repeat=l({},this.repeat)),this._attributes.forEach(function(e){return n.setAttribute(e.clone())}),t&&this.children.forEach(function(e){return n.appendChild(e.clone(!0))}),n},e.prototype.walk=function(e,t){t=t||0;for(var n=this.firstChild,o;n;){if(o=n.next,!1===e(n,t)||!1===n.walk(e,t+1))return!1;n=o}},e.prototype.use=function(e){for(var t=[this],n=1;n=l&&(l=c,s=i)}return l>=r?s:null}function y(e,t){var n=e&&"object"==typeof e?e[t]:e,o=(n||"").match(/^[\w-@]+/);return o?o[0]:n}function b(e,t){for(var n=0,o=0;n=c?-1:d.lastIndexOf(r,c-1),-1==m){if(1==p)return;p=1,c=d.length;continue}if(1==p&&mv&&(v=i.length),0>k&&(k=i.length),x=Math.min(v,k),x==i.length)break;if(x==v)++h;else if(! --h){f=b,y=x;break outer}++x}return null==f||l==f&&y==u?void 0:{from:e.Pos(l,u),to:e.Pos(f,y)}}})})},dP58:function(e,t,n){"use strict";function o(){function e(e){return e=e||l,s(p,e)||r("no-app",{name:e}),p[e]}function t(){return Object.keys(p).map(function(e){return p[e]})}function n(e,t){Object.keys(u).forEach(function(n){var o=d(e,n);null===o||m[o]&&m[o](t,e)})}function d(e,t){if("serverAuth"===t)return null;e.options;return t}var p={},u={},m={},h={__esModule:!0,initializeApp:function(e,t){if(void 0===t&&(t={}),"object"!=typeof t||null===t){var o=t;t={name:o}}var i=t;void 0===i.name&&(i.name=l);var d=i.name;"string"==typeof d&&d||r("bad-app-name",{name:d+""}),s(p,d)&&r("duplicate-app",{name:d});var u=new c(e,i,h);return p[d]=u,n(u,"create"),u},app:e,apps:null,Promise:Promise,SDK_VERSION:"5.0.4",INTERNAL:{registerService:function(n,o,s,l,d){u[n]&&r("duplicate-service",{name:n}),u[n]=o,l&&(m[n]=l,t().forEach(function(e){l("create",e)}));var p=function(t){return void 0===t&&(t=e()),"function"!=typeof t[n]&&r("invalid-app-argument",{name:n}),t[n]()};return void 0!==s&&i.deepExtend(p,s),h[n]=p,c.prototype[n]=function(){for(var e=[],t=0;te.length)return e;e=e.slice();var t=e.length,n=/,$/,o=0;o=3=t?r(0,1):6=t?r(0,2):r(1,4);for(var s=0,i;so)throw new gt(ht.INVALID_ARGUMENT,"Function "+e+"() requires between "+n+" and "+(o+" arguments, but was called with ")+U(t.length,"argument")+".")}function S(e,t,n,o){if(!(t instanceof Array)||t.lengthn.indexOf(t))throw new gt(ht.INVALID_ARGUMENT,"Unknown option '"+t+"' passed to function "+e+"(). Available options: "+n.join(", "))})}function F(e,t,n,o){var r=O(o);return new gt(ht.INVALID_ARGUMENT,"Function "+e+"() requires its "+B(n)+" "+("argument to be a "+t+", but it was: "+r))}function B(e){return 1===e?"first":2===e?"second":3===e?"third":e+"th"}function U(e,t){return e+" "+t+(1===e?"":"s")}function V(e,t){return et?1:0}function q(e,t){return null!==e&&void 0!==e?!!(t&&e.isEqual(t)):e===t}function j(e,t){if(e.length!==t.length)return!1;for(var n=0;nt?1:e===t?0:isNaN(e)?isNaN(t)?0:-1:1}function X(e,t){return e===t?0!==e||1/e==1/t:e!==e&&t!==t}function Q(e){return null===e||void 0===e}function J(e){return nn(e)&&e<=tn&&e>=en}function $(e,t,n){if(n.isEqual(Vt.INSTANCE)){if(t!==rn.EQUAL)throw new gt(ht.INVALID_ARGUMENT,"Invalid query. You can only perform equals comparisons on null.");return new sn(e)}if(n.isEqual(zt.NAN)){if(t!==rn.EQUAL)throw new gt(ht.INVALID_ARGUMENT,"Invalid query. You can only perform equals comparisons on NaN.");return new ln(e)}return new an(e,t,n)}function Y(e){return e===ht.OK?d("Treated status OK as error"):e===ht.CANCELLED||e===ht.UNKNOWN||e===ht.DEADLINE_EXCEEDED||e===ht.RESOURCE_EXHAUSTED||e===ht.INTERNAL||e===ht.UNAVAILABLE||e===ht.UNAUTHENTICATED?!1:e===ht.INVALID_ARGUMENT||e===ht.NOT_FOUND||e===ht.ALREADY_EXISTS||e===ht.PERMISSION_DENIED||e===ht.FAILED_PRECONDITION||e===ht.ABORTED||e===ht.OUT_OF_RANGE||e===ht.UNIMPLEMENTED||e===ht.DATA_LOSS||d("Unknown status code: "+e)}function Z(e){var t=In[e];return void 0===t?void 0:ee(t)}function ee(e){return void 0===e?(s("GRPC error has no .code"),ht.UNKNOWN):e===In.OK?ht.OK:e===In.CANCELLED?ht.CANCELLED:e===In.UNKNOWN?ht.UNKNOWN:e===In.DEADLINE_EXCEEDED?ht.DEADLINE_EXCEEDED:e===In.RESOURCE_EXHAUSTED?ht.RESOURCE_EXHAUSTED:e===In.INTERNAL?ht.INTERNAL:e===In.UNAVAILABLE?ht.UNAVAILABLE:e===In.UNAUTHENTICATED?ht.UNAUTHENTICATED:e===In.INVALID_ARGUMENT?ht.INVALID_ARGUMENT:e===In.NOT_FOUND?ht.NOT_FOUND:e===In.ALREADY_EXISTS?ht.ALREADY_EXISTS:e===In.PERMISSION_DENIED?ht.PERMISSION_DENIED:e===In.FAILED_PRECONDITION?ht.FAILED_PRECONDITION:e===In.ABORTED?ht.ABORTED:e===In.OUT_OF_RANGE?ht.OUT_OF_RANGE:e===In.UNIMPLEMENTED?ht.UNIMPLEMENTED:e===In.DATA_LOSS?ht.DATA_LOSS:d("Unknown status code: "+e)}function te(e){return void 0===e?In.OK:e===ht.OK?In.OK:e===ht.CANCELLED?In.CANCELLED:e===ht.UNKNOWN?In.UNKNOWN:e===ht.DEADLINE_EXCEEDED?In.DEADLINE_EXCEEDED:e===ht.RESOURCE_EXHAUSTED?In.RESOURCE_EXHAUSTED:e===ht.INTERNAL?In.INTERNAL:e===ht.UNAVAILABLE?In.UNAVAILABLE:e===ht.UNAUTHENTICATED?In.UNAUTHENTICATED:e===ht.INVALID_ARGUMENT?In.INVALID_ARGUMENT:e===ht.NOT_FOUND?In.NOT_FOUND:e===ht.ALREADY_EXISTS?In.ALREADY_EXISTS:e===ht.PERMISSION_DENIED?In.PERMISSION_DENIED:e===ht.FAILED_PRECONDITION?In.FAILED_PRECONDITION:e===ht.ABORTED?In.ABORTED:e===ht.OUT_OF_RANGE?In.OUT_OF_RANGE:e===ht.UNIMPLEMENTED?In.UNIMPLEMENTED:e===ht.DATA_LOSS?In.DATA_LOSS:d("Unknown status code: "+e)}function ne(e){return 200===e?ht.OK:400===e?ht.INVALID_ARGUMENT:401===e?ht.UNAUTHENTICATED:403===e?ht.PERMISSION_DENIED:404===e?ht.NOT_FOUND:409===e?ht.ABORTED:416===e?ht.OUT_OF_RANGE:429===e?ht.RESOURCE_EXHAUSTED:499===e?ht.CANCELLED:500===e?ht.UNKNOWN:501===e?ht.UNIMPLEMENTED:503===e?ht.UNAVAILABLE:504===e?ht.DEADLINE_EXCEEDED:200<=e&&300>e?ht.OK:400<=e&&500>e?ht.FAILED_PRECONDITION:500<=e&&600>e?ht.INTERNAL:ht.UNKNOWN}function oe(){return Ln}function re(){return _n}function ae(){return Mn}function ie(){return On}function se(e,t){0i||i>t-2)&&d("Invalid encoded resource path: \""+e+"\"");var s=e.charAt(i+1);switch(s){case Vo:var l=e.substring(r,i),p=void 0;0===o.length?p=l:(o+=l,p=o,o=""),n.push(p);break;case qo:o+=e.substring(r,i),o+="\0";break;case jo:o+=e.substring(r,i+1);break;default:d("Invalid encoded resource path: \""+e+"\"");}r=i+2}return new Et(n)}function be(e,t,n,o){c(n=o,"Unexpected schema upgrade from v${fromVersion} to v{toVersion}."),1>n&&1<=o&&(xe(e),ve(e),Se(e),ke(e));var r=So.resolve();return 2>n&&2<=o&&(r=we(t).next(function(e){return Ce(t,e)})),r}function xe(e){e.createObjectStore(Ho.store)}function ve(e){e.createObjectStore(Ko.store,{keyPath:Ko.keyPath}),e.createObjectStore(Go.store,{keyPath:Go.keyPath}),e.createObjectStore(Xo.store)}function ke(e){e.createObjectStore(Jo.store)}function Se(e){var t=e.createObjectStore(Yo.store,{keyPath:Yo.keyPath});t.createIndex(Yo.documentTargetsIndex,Yo.documentTargetsKeyPath,{unique:!0});var n=e.createObjectStore($o.store,{keyPath:$o.keyPath});n.createIndex($o.queryTargetsIndexName,$o.queryTargetsKeyPath,{unique:!0}),e.createObjectStore(Zo.store)}function Ce(e,t){var n=e.store(Zo.store),o=e.store($o.store);return o.count().next(function(e){return t.targetCount=e,n.put(Zo.key,t)})}function we(e){var t=e.store(Zo.store);return t.get(Zo.key).next(function(e){return null==e?(e=new Zo(0,0,hn.MIN.toTimestamp(),0),t.put(Zo.key,e).next(function(){return e})):So.resolve(e)})}function Te(e){return new So(function(t,n){e.onsuccess=function(e){var n=e.target.result;t(n)},e.onerror=function(e){n(e.target.error)}})}function Ee(e){return e instanceof Uint8Array?(c("YES"===process.env.USE_MOCK_PERSISTENCE,"Persisting non-string stream tokens is only supported with mock persistence ."),e.toString()):e}function Ae(e){return Le(e,Go.store)}function Ie(e){return Le(e,Xo.store)}function Ne(e){return Le(e,Ko.store)}function Le(e,t){return e instanceof ar?e.store(t):d("Invalid transaction object provided!")}function _e(e){return De(e,$o.store)}function Me(e){return De(e,Zo.store)}function Oe(e){return De(e,Yo.store)}function De(e,t){return e instanceof ar?e.store(t):d("Invalid transaction object provided!")}function Re(e){return e instanceof ar?e.store(Jo.store):d("Invalid transaction object provided!")}function Pe(e){return e.path.toArray()}function Fe(e){return void 0!==e.documents}function Be(e){if(!e)return new jr;switch(e.type){case"gapi":return new Hr(e.client,e.sessionIndex||"0");case"provider":return e.client;default:throw new gt(ht.INVALID_ARGUMENT,"makeCredentialsProvider failed due to invalid credential type");}}function Ue(e){return Ve(e,["next","error","complete"])}function Ve(e,t){if("object"!=typeof e||null===e)return!1;for(var n=e,o=0,r=t,i;on.query.docComparator(r,t.doc),"Got added events in wrong order"),r=t.doc,{type:"added",doc:i,oldIndex:-1,newIndex:o++}})}var i=n.oldDocs;return n.docChanges.filter(function(e){return t||e.type!==mo.Metadata}).map(function(t){var o=new ha(e,t.doc.key,t.doc,n.fromCache),r=-1,s=-1;return t.type!==mo.Added&&(r=i.indexOf(t.doc.key),c(0<=r,"Index for document not found"),i=i.delete(t.doc.key)),t.type!==mo.Removed&&(i=i.add(t.doc),s=i.indexOf(t.doc.key)),{type:Ye(t.type),doc:o,oldIndex:r,newIndex:s}})}function Ye(e){return e===mo.Added?"added":e===mo.Modified||e===mo.Metadata?"modified":e===mo.Removed?"removed":d("Unknown change type: "+e)}function Ze(e){e.INTERNAL.registerService("firestore",function(e){return new la(e)},b(Ia))}function et(e){Ze(e)}var tt=Number.POSITIVE_INFINITY,nt=Math.floor,ot=String.fromCharCode,rt=Math.min,at=Math.max;Object.defineProperty(t,"__esModule",{value:!0});var it=function(e){return e&&"object"==typeof e&&"default"in e?e["default"]:e}(n("dP58")),st=n("TUpU"),lt=n("vCxL"),dt=n("IIoC"),ct=it.SDK_VERSION,pt=new st.Logger("@firebase/firestore"),ut;(function(e){e[e.DEBUG=0]="DEBUG",e[e.ERROR=1]="ERROR",e[e.SILENT=2]="SILENT"})(ut||(ut={}));var mt=function(){function e(){}return e.setPlatform=function(t){e.platform&&d("Platform already defined"),e.platform=t},e.getPlatform=function(){return e.platform||d("Platform not set"),e.platform},e}(),ht={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"},gt=function(e){function t(t,n){var o=e.call(this,n)||this;return o.code=t,o.message=n,o.name="FirebaseError",o.toString=function(){return o.name+": [code="+o.code+"]: "+o.message},o}return lt.__extends(t,e),t}(Error),ft=function(){function e(){}return e.newId=function(){for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t="",n=0;20>n;n++)t+=e.charAt(nt(Math.random()*e.length));return c(20===t.length,"Invalid auto ID: "+t),t},e}(),yt=function(){function e(e){K(),this._binaryString=e}return e.fromBase64String=function(t){x("Blob.fromBase64String",arguments,1),C("Blob.fromBase64String","string",1,t),K();try{var n=mt.getPlatform().atob(t);return new e(n)}catch(t){throw new gt(ht.INVALID_ARGUMENT,"Failed to construct Blob from Base64 string: "+t)}},e.fromUint8Array=function(t){if(x("Blob.fromUint8Array",arguments,1),H(),!(t instanceof Uint8Array))throw F("Blob.fromUint8Array","Uint8Array",1,t);var n=Array.prototype.map.call(t,function(e){return ot(e)}).join("");return new e(n)},e.prototype.toBase64=function(){return x("Blob.toBase64",arguments,0),K(),mt.getPlatform().btoa(this._binaryString)},e.prototype.toUint8Array=function(){x("Blob.toUint8Array",arguments,0),H();for(var e=new Uint8Array(this._binaryString.length),t=0;te||90t||180t)throw new gt(ht.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(1e9<=t)throw new gt(ht.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(-62135596800>e)throw new gt(ht.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e);if(253402300800<=e)throw new gt(ht.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}return e.now=function(){return e.fromMillis(Date.now())},e.fromDate=function(t){return e.fromMillis(t.getTime())},e.fromMillis=function(t){var n=nt(t/1e3);return new e(n,1e6*(t-1e3*n))},e.prototype.toDate=function(){return new Date(this.toMillis())},e.prototype.toMillis=function(){return 1e3*this.seconds+this.nanoseconds/1e6},e.prototype._compareTo=function(e){return this.seconds===e.seconds?V(this.nanoseconds,e.nanoseconds):V(this.seconds,e.seconds)},e.prototype.isEqual=function(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds},e.prototype.toString=function(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"},e}(),kt=function(){return function(e,t,n,o){this.databaseId=e,this.persistenceKey=t,this.host=n,this.ssl=o}}(),St="(default)",Ct=function(){function e(e,t){this.projectId=e,this.database=t?t:St}return Object.defineProperty(e.prototype,"isDefaultDatabase",{get:function(){return this.database===St},enumerable:!0,configurable:!0}),e.prototype.isEqual=function(t){return t instanceof e&&t.projectId===this.projectId&&t.database===this.database},e.prototype.compareTo=function(e){return V(this.projectId,e.projectId)||V(this.database,e.database)},e}(),wt="__name__",Tt=function(){function e(e,t,n){this.init(e,t,n)}return e.prototype.init=function(e,t,n){void 0===t?t=0:t>e.length&&d("offset "+t+" out of range "+e.length),void 0===n?n=e.length-t:n>e.length-t&&d("length "+n+" out of range "+(e.length-t)),this.segments=e,this.offset=t,this.len=n},e.prototype.construct=function(e,t,n){var o=Object.create(Object.getPrototypeOf(this));return o.init(e,t,n),o},Object.defineProperty(e.prototype,"length",{get:function(){return this.len},enumerable:!0,configurable:!0}),e.prototype.isEqual=function(t){return 0===e.comparator(this,t)},e.prototype.child=function(t){var n=this.segments.slice(this.offset,this.limit());return t instanceof e?t.forEach(function(e){n.push(e)}):"string"==typeof t?n.push(t):d("Unknown parameter type for Path.child(): "+t),this.construct(n)},e.prototype.limit=function(){return this.offset+this.length},e.prototype.popFirst=function(e){return e=void 0===e?1:e,c(this.length>=e,"Can't call popFirst() with less segments"),this.construct(this.segments,this.offset+e,this.length-e)},e.prototype.popLast=function(){return c(!this.isEmpty(),"Can't call popLast() on empty path"),this.construct(this.segments,this.offset,this.length-1)},e.prototype.firstSegment=function(){return c(!this.isEmpty(),"Can't call firstSegment() on empty path"),this.segments[this.offset]},e.prototype.lastSegment=function(){return c(!this.isEmpty(),"Can't call lastSegment() on empty path"),this.segments[this.limit()-1]},e.prototype.get=function(e){return c(ei)return 1}return e.lengtht.length?1:0},e}(),Et=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return lt.__extends(t,e),t.prototype.canonicalString=function(){return this.toArray().join("/")},t.prototype.toString=function(){return this.canonicalString()},t.fromString=function(e){if(0<=e.indexOf("//"))throw new gt(ht.INVALID_ARGUMENT,"Invalid path ("+e+"). Paths must not contain // in them.");var n=e.split("/").filter(function(e){return 0n?t=t.left:0o?n=n.left:(t+=n.left.size+1,n=n.right)}return-1},e.prototype.isEmpty=function(){return this.root.isEmpty()},Object.defineProperty(e.prototype,"size",{get:function(){return this.root.size},enumerable:!0,configurable:!0}),e.prototype.minKey=function(){return this.root.minKey()},e.prototype.maxKey=function(){return this.root.maxKey()},e.prototype.inorderTraversal=function(e){return this.root.inorderTraversal(e)},e.prototype.forEach=function(e){this.inorderTraversal(function(t,n){return e(t,n),!1})},e.prototype.reverseTraversal=function(e){return this.root.reverseTraversal(e)},e.prototype.getIterator=function(){return new Ot(this.root,null,this.comparator,!1)},e.prototype.getIteratorFrom=function(e){return new Ot(this.root,e,this.comparator,!1)},e.prototype.getReverseIterator=function(){return new Ot(this.root,null,this.comparator,!0)},e.prototype.getReverseIteratorFrom=function(e){return new Ot(this.root,e,this.comparator,!0)},e}(),Ot=function(){function e(e,t,n,o){this.isReverse=o,this.nodeStack=[];for(var r=1;!e.isEmpty();)if(r=t?n(e.key,t):1,o&&(r*=-1),0>r)e=this.isReverse?e.left:e.right;else if(0===r){this.nodeStack.push(e);break}else this.nodeStack.push(e),e=this.isReverse?e.right:e.left}return e.prototype.getNext=function(){c(0n?r.copy(null,null,null,r.left.insert(e,t,o),null):0===n?r.copy(null,t,null,null,null):r.copy(null,null,null,null,r.right.insert(e,t,o)),r.fixUp()},e.prototype.removeMin=function(){if(this.left.isEmpty())return e.EMPTY;var t=this;return t.left.isRed()||t.left.left.isRed()||(t=t.moveRedLeft()),t=t.copy(null,null,null,t.left.removeMin(),null),t.fixUp()},e.prototype.remove=function(t,o){var r=this,n;if(0>o(t,r.key))r.left.isEmpty()||r.left.isRed()||r.left.left.isRed()||(r=r.moveRedLeft()),r=r.copy(null,null,null,r.left.remove(t,o),null);else{if(r.left.isRed()&&(r=r.rotateRight()),r.right.isEmpty()||r.right.isRed()||r.right.left.isRed()||(r=r.moveRedRight()),0===o(t,r.key)){if(r.right.isEmpty())return e.EMPTY;n=r.right.min(),r=r.copy(n.key,n.value,null,null,r.right.removeMin())}r=r.copy(null,null,null,null,r.right.remove(t,o))}return r.fixUp()},e.prototype.isRed=function(){return this.color},e.prototype.fixUp=function(){var e=this;return e.right.isRed()&&!e.left.isRed()&&(e=e.rotateLeft()),e.left.isRed()&&e.left.left.isRed()&&(e=e.rotateRight()),e.left.isRed()&&e.right.isRed()&&(e=e.colorFlip()),e},e.prototype.moveRedLeft=function(){var e=this.colorFlip();return e.right.left.isRed()&&(e=e.copy(null,null,null,null,e.right.rotateRight()),e=e.rotateLeft(),e=e.colorFlip()),e},e.prototype.moveRedRight=function(){var e=this.colorFlip();return e.left.left.isRed()&&(e=e.rotateRight(),e=e.colorFlip()),e},e.prototype.rotateLeft=function(){var t=this.copy(null,null,e.RED,null,this.right.left);return this.right.copy(null,null,this.color,t,null)},e.prototype.rotateRight=function(){var t=this.copy(null,null,e.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,t)},e.prototype.colorFlip=function(){var e=this.left.copy(null,null,!this.left.color,null,null),t=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,t)},e.prototype.checkMaxDepth=function(){var e=this.check();return!!(Math.pow(2,e)<=this.size+1)},e.prototype.check=function(){if(this.isRed()&&this.left.isRed())throw d("Red node has red child("+this.key+","+this.value+")");if(this.right.isRed())throw d("Right child of ("+this.key+","+this.value+") is red");var e=this.left.check();if(e!==this.right.check())throw d("Black depths differ");else return e+(this.isRed()?0:1)},e.EMPTY=null,e.RED=!0,e.BLACK=!1,e}(),Rt=function(){function e(){this.size=0}return e.prototype.copy=function(){return this},e.prototype.insert=function(e,t){return new Dt(e,t)},e.prototype.remove=function(){return this},e.prototype.isEmpty=function(){return!0},e.prototype.inorderTraversal=function(){return!1},e.prototype.reverseTraversal=function(){return!1},e.prototype.minKey=function(){return null},e.prototype.maxKey=function(){return null},e.prototype.isRed=function(){return!1},e.prototype.checkMaxDepth=function(){return!0},e.prototype.check=function(){return 0},e}();Dt.EMPTY=new Rt;var Pt;(function(e){e[e.NullValue=0]="NullValue",e[e.BooleanValue=1]="BooleanValue",e[e.NumberValue=2]="NumberValue",e[e.TimestampValue=3]="TimestampValue",e[e.StringValue=4]="StringValue",e[e.BlobValue=5]="BlobValue",e[e.RefValue=6]="RefValue",e[e.GeoPointValue=7]="GeoPointValue",e[e.ArrayValue=8]="ArrayValue",e[e.ObjectValue=9]="ObjectValue"})(Pt||(Pt={}));var Ft;(function(e){e[e.Default=0]="Default",e[e.Estimate=1]="Estimate",e[e.Previous=2]="Previous"})(Ft||(Ft={}));var Bt=function(){function e(e,t){this.serverTimestampBehavior=e,this.timestampsInSnapshots=t}return e.fromSnapshotOptions=function(t,n){switch(t.serverTimestamps){case"estimate":return new e(Ft.Estimate,n);case"previous":return new e(Ft.Previous,n);case"none":case void 0:return new e(Ft.Default,n);default:return d("fromSnapshotOptions() called with invalid options.");}},e}(),Ut=function(){function e(){}return e.prototype.toString=function(){var e=this.value();return null===e?"null":e.toString()},e.prototype.defaultCompareTo=function(e){c(this.typeOrder!==e.typeOrder,"Default compareTo should not be used for values of same type.");var t=V(this.typeOrder,e.typeOrder);return t},e}(),Vt=function(e){function t(){var t=e.call(this)||this;return t.typeOrder=Pt.NullValue,t.internalValue=null,t}return lt.__extends(t,e),t.prototype.value=function(){return null},t.prototype.isEqual=function(e){return e instanceof t},t.prototype.compareTo=function(e){return e instanceof t?0:this.defaultCompareTo(e)},t.INSTANCE=new t,t}(Ut),qt=function(e){function t(t){var n=e.call(this)||this;return n.internalValue=t,n.typeOrder=Pt.BooleanValue,n}return lt.__extends(t,e),t.prototype.value=function(){return this.internalValue},t.prototype.isEqual=function(e){return e instanceof t&&this.internalValue===e.internalValue},t.prototype.compareTo=function(e){return e instanceof t?V(this,e):this.defaultCompareTo(e)},t.of=function(e){return e?t.TRUE:t.FALSE},t.TRUE=new t(!0),t.FALSE=new t(!1),t}(Ut),jt=function(e){function t(t){var n=e.call(this)||this;return n.internalValue=t,n.typeOrder=Pt.NumberValue,n}return lt.__extends(t,e),t.prototype.value=function(){return this.internalValue},t.prototype.compareTo=function(e){return e instanceof t?G(this.internalValue,e.internalValue):this.defaultCompareTo(e)},t}(Ut),Wt=function(e){function t(t){return e.call(this,t)||this}return lt.__extends(t,e),t.prototype.isEqual=function(e){return!!(e instanceof t)&&X(this.internalValue,e.internalValue)},t}(jt),zt=function(e){function t(t){var n=e.call(this,t)||this;return n.internalValue=t,n}return lt.__extends(t,e),t.prototype.isEqual=function(e){return!!(e instanceof t)&&X(this.internalValue,e.internalValue)},t.NAN=new t(NaN),t.POSITIVE_INFINITY=new t(Infinity),t.NEGATIVE_INFINITY=new t(-Infinity),t}(jt),Ht=function(e){function t(t){var n=e.call(this)||this;return n.internalValue=t,n.typeOrder=Pt.StringValue,n}return lt.__extends(t,e),t.prototype.value=function(){return this.internalValue},t.prototype.isEqual=function(e){return e instanceof t&&this.internalValue===e.internalValue},t.prototype.compareTo=function(e){return e instanceof t?V(this.internalValue,e.internalValue):this.defaultCompareTo(e)},t}(Ut),Kt=function(e){function t(t){var n=e.call(this)||this;return n.internalValue=t,n.typeOrder=Pt.TimestampValue,n}return lt.__extends(t,e),t.prototype.value=function(e){return e&&e.timestampsInSnapshots?this.internalValue:this.internalValue.toDate()},t.prototype.isEqual=function(e){return e instanceof t&&this.internalValue.isEqual(e.internalValue)},t.prototype.compareTo=function(e){return e instanceof t?this.internalValue._compareTo(e.internalValue):e instanceof Gt?-1:this.defaultCompareTo(e)},t}(Ut),Gt=function(e){function t(t,n){var o=e.call(this)||this;return o.localWriteTime=t,o.previousValue=n,o.typeOrder=Pt.TimestampValue,o}return lt.__extends(t,e),t.prototype.value=function(e){return e&&e.serverTimestampBehavior===Ft.Estimate?new Kt(this.localWriteTime).value(e):e&&e.serverTimestampBehavior===Ft.Previous?this.previousValue?this.previousValue.value(e):null:null},t.prototype.isEqual=function(e){return e instanceof t&&this.localWriteTime.isEqual(e.localWriteTime)},t.prototype.compareTo=function(e){return e instanceof t?this.localWriteTime._compareTo(e.localWriteTime):e instanceof Kt?1:this.defaultCompareTo(e)},t.prototype.toString=function(){return""},t}(Ut),Xt=function(e){function t(t){var n=e.call(this)||this;return n.internalValue=t,n.typeOrder=Pt.BlobValue,n}return lt.__extends(t,e),t.prototype.value=function(){return this.internalValue},t.prototype.isEqual=function(e){return e instanceof t&&this.internalValue.isEqual(e.internalValue)},t.prototype.compareTo=function(e){return e instanceof t?this.internalValue._compareTo(e.internalValue):this.defaultCompareTo(e)},t}(Ut),Qt=function(e){function t(t,n){var o=e.call(this)||this;return o.databaseId=t,o.key=n,o.typeOrder=Pt.RefValue,o}return lt.__extends(t,e),t.prototype.value=function(){return this.key},t.prototype.isEqual=function(e){return!!(e instanceof t)&&this.key.isEqual(e.key)&&this.databaseId.isEqual(e.databaseId)},t.prototype.compareTo=function(e){if(e instanceof t){var n=this.databaseId.compareTo(e.databaseId);return 0===n?Nt.comparator(this.key,e.key):n}return this.defaultCompareTo(e)},t}(Ut),Jt=function(e){function t(t){var n=e.call(this)||this;return n.internalValue=t,n.typeOrder=Pt.GeoPointValue,n}return lt.__extends(t,e),t.prototype.value=function(){return this.internalValue},t.prototype.isEqual=function(e){return e instanceof t&&this.internalValue.isEqual(e.internalValue)},t.prototype.compareTo=function(e){return e instanceof t?this.internalValue._compareTo(e.internalValue):this.defaultCompareTo(e)},t}(Ut),$t=function(e){function t(t){var n=e.call(this)||this;return n.internalValue=t,n.typeOrder=Pt.ObjectValue,n}return lt.__extends(t,e),t.prototype.value=function(e){var t={};return this.internalValue.inorderTraversal(function(n,o){t[n]=o.value(e)}),t},t.prototype.forEach=function(e){this.internalValue.inorderTraversal(e)},t.prototype.isEqual=function(e){if(e instanceof t){for(var n=this.internalValue.getIterator(),o=e.internalValue.getIterator();n.hasNext()&&o.hasNext();){var r=n.getNext(),i=o.getNext();if(r.key!==i.key||!r.value.isEqual(i.value))return!1}return!n.hasNext()&&!o.hasNext()}return!1},t.prototype.compareTo=function(e){if(e instanceof t){for(var n=this.internalValue.getIterator(),o=e.internalValue.getIterator();n.hasNext()&&o.hasNext();){var r=n.getNext(),i=o.getNext(),s=V(r.key,i.key)||r.value.compareTo(i.value);if(s)return s}return V(n.hasNext(),o.hasNext())}return this.defaultCompareTo(e)},t.prototype.set=function(e,n){if(c(!e.isEmpty(),"Cannot set field for empty path on ObjectValue"),1===e.length)return this.setChild(e.firstSegment(),n);var o=this.child(e.firstSegment());o instanceof t||(o=t.EMPTY);var r=o.set(e.popFirst(),n);return this.setChild(e.firstSegment(),r)},t.prototype.delete=function(e){if(c(!e.isEmpty(),"Cannot delete field for empty path on ObjectValue"),1===e.length)return new t(this.internalValue.remove(e.firstSegment()));var n=this.child(e.firstSegment());if(n instanceof t){var o=n.delete(e.popFirst());return new t(this.internalValue.insert(e.firstSegment(),o))}return this},t.prototype.contains=function(e){return void 0!==this.field(e)},t.prototype.field=function(e){c(!e.isEmpty(),"Can't get field of empty path");var n=this;return e.forEach(function(e){n=n instanceof t?n.internalValue.get(e)||void 0:void 0}),n},t.prototype.toString=function(){return JSON.stringify(this.value())},t.prototype.child=function(e){return this.internalValue.get(e)||void 0},t.prototype.setChild=function(e,n){return new t(this.internalValue.insert(e,n))},t.EMPTY=new t(new Mt(V)),t}(Ut),Yt=function(e){function t(t){var n=e.call(this)||this;return n.internalValue=t,n.typeOrder=Pt.ArrayValue,n}return lt.__extends(t,e),t.prototype.value=function(e){return this.internalValue.map(function(t){return t.value(e)})},t.prototype.forEach=function(e){this.internalValue.forEach(e)},t.prototype.isEqual=function(e){if(e instanceof t){if(this.internalValue.length!==e.internalValue.length)return!1;for(var n=0;n="===t?e.GREATER_THAN_OR_EQUAL:">"===t?e.GREATER_THAN:"array-contains"===t?e.ARRAY_CONTAINS:d("Unknown relation: "+t)},e.prototype.toString=function(){return this.name},e.prototype.isEqual=function(e){return this.name===e.name},e.LESS_THAN=new e("<"),e.LESS_THAN_OR_EQUAL=new e("<="),e.EQUAL=new e("=="),e.GREATER_THAN=new e(">"),e.GREATER_THAN_OR_EQUAL=new e(">="),e.ARRAY_CONTAINS=new e("array-contains"),e}(),an=function(){function e(e,t,n){this.field=e,this.op=t,this.value=n}return e.prototype.matches=function(e){if(this.field.isKeyField()){c(this.value instanceof Qt,"Comparing on key, but filter value not a RefValue"),c(this.op!==rn.ARRAY_CONTAINS,"array-contains queries don't make sense on document keys.");var t=this.value,n=Nt.comparator(e.key,t.key);return this.matchesComparison(n)}var o=e.field(this.field);return void 0!==o&&this.matchesValue(o)},e.prototype.matchesValue=function(e){var t=this;return this.op===rn.ARRAY_CONTAINS?e instanceof Yt&&void 0!==e.internalValue.find(function(e){return e.isEqual(t.value)}):this.value.typeOrder===e.typeOrder&&this.matchesComparison(e.compareTo(this.value))},e.prototype.matchesComparison=function(e){switch(this.op){case rn.LESS_THAN:return 0>e;case rn.LESS_THAN_OR_EQUAL:return 0>=e;case rn.EQUAL:return 0===e;case rn.GREATER_THAN:return 0=n:0>n},e.prototype.isEqual=function(e){if(null===e)return!1;if(this.before!==e.before||this.position.length!==e.position.length)return!1;for(var t=0;t":o.toString()}),r=this.serviceName+": "+r+" ("+o+").";var i=new eo(o,r);for(var s in t)t.hasOwnProperty(s)&&"_"!==s.slice(-1)&&(i[s]=t[s]);return i},e}(),no=function(){return function(){this.blockSize=-1}}(),oo=function(e){function t(){var t=e.call(this)||this;t.chain_=[],t.buf_=[],t.W_=[],t.pad_=[],t.inbuf_=0,t.total_=0,t.blockSize=64,t.pad_[0]=128;for(var n=1;ns;s++)r[s]=n.charCodeAt(o)<<24|n.charCodeAt(o+1)<<16|n.charCodeAt(o+2)<<8|n.charCodeAt(o+3),o+=4;else for(var s=0;16>s;s++)r[s]=n[o]<<24|n[o+1]<<16|n[o+2]<<8|n[o+3],o+=4;for(var s=16,i;80>s;s++)i=r[s-3]^r[s-8]^r[s-14]^r[s-16],r[s]=4294967295&(i<<1|i>>>31);for(var t=this.chain_[0],l=this.chain_[1],p=this.chain_[2],c=this.chain_[3],d=this.chain_[4],s=0,e,u;80>s;s++){40>s?20>s?(e=c^l&(p^c),u=1518500249):(e=l^p^c,u=1859775393):60>s?(e=l&p|c&(l|p),u=2400959708):(e=l^p^c,u=3395469782);var i=4294967295&(t<<5|t>>>27)+e+d+u+r[s];d=c,c=p,p=4294967295&(l<<30|l>>>2),l=t,t=i}this.chain_[0]=4294967295&this.chain_[0]+t,this.chain_[1]=4294967295&this.chain_[1]+l,this.chain_[2]=4294967295&this.chain_[2]+p,this.chain_[3]=4294967295&this.chain_[3]+c,this.chain_[4]=4294967295&this.chain_[4]+d},t.prototype.update=function(e,t){if(null!=e){void 0===t&&(t=e.length);for(var o=t-this.blockSize,r=0,n=this.buf_,i=this.inbuf_;rthis.inbuf_?this.update(this.pad_,56-this.inbuf_):this.update(this.pad_,this.blockSize-(this.inbuf_-56));for(var o=this.blockSize-1;56<=o;o--)this.buf_[o]=255&t,t/=256;this.compress_(this.buf_);for(var r=0,o=0;5>o;o++)for(var n=24;0<=n;n-=8)e[r]=255&this.chain_[o]>>n,++r;return e},t}(no),ro=function(){function e(e){this.sendFn=e.sendFn,this.closeFn=e.closeFn}return e.prototype.onOpen=function(e){c(!this.wrappedOnOpen,"Called onOpen on stream twice!"),this.wrappedOnOpen=e},e.prototype.onClose=function(e){c(!this.wrappedOnClose,"Called onClose on stream twice!"),this.wrappedOnClose=e},e.prototype.onMessage=function(e){c(!this.wrappedOnMessage,"Called onMessage on stream twice!"),this.wrappedOnMessage=e},e.prototype.close=function(){this.closeFn()},e.prototype.send=function(e){this.sendFn(e)},e.prototype.callOnOpen=function(){c(void 0!==this.wrappedOnOpen,"Cannot call onOpen because no callback was set"),this.wrappedOnOpen()},e.prototype.callOnClose=function(e){c(void 0!==this.wrappedOnClose,"Cannot call onClose because no callback was set"),this.wrappedOnClose(e)},e.prototype.callOnMessage=function(e){c(void 0!==this.wrappedOnMessage,"Cannot call onMessage because no callback was set"),this.wrappedOnMessage(e)},e}(),ao="Connection",io={BatchGetDocuments:"batchGet",Commit:"commit"},so=function(){function e(e){this.databaseId=e.databaseId,this.pool=new dt.XhrIoPool;var t=e.ssl?"https":"http";this.baseUrl=t+"://"+e.host}return e.prototype.modifyHeadersForRequest=function(e,t){if(t)for(var n in t.authHeaders)t.authHeaders.hasOwnProperty(n)&&(e[n]=t.authHeaders[n]);e["X-Goog-Api-Client"]="gl-js/ fire/"+ct},e.prototype.invokeRPC=function(e,t,n){var o=this,r=this.makeUrl(e);return new Promise(function(s,l){o.pool.getObject(function(c){c.listenOnce(dt.EventType.COMPLETE,function(){try{switch(c.getLastErrorCode()){case dt.ErrorCode.NO_ERROR:var t=c.getResponseJson();i(ao,"XHR received:",JSON.stringify(t)),s(t);break;case dt.ErrorCode.TIMEOUT:i(ao,"RPC \""+e+"\" timed out"),l(new gt(ht.DEADLINE_EXCEEDED,"Request time out"));break;case dt.ErrorCode.HTTP_ERROR:var n=c.getStatus();i(ao,"RPC \""+e+"\" failed with status:",n,"response text:",c.getResponseText()),0>Ao<=e?n|this.generatorId:(n|this.generatorId)-(1<",e),n=this.store.put(e)):(i(nr,"PUT",this.store.name,e,t),n=this.store.put(t,e)),Te(n)},e.prototype.get=function(e){var t=this,n=this.store.get(e);return Te(n).next(function(n){return void 0===n&&(n=null),i(nr,"GET",t.store.name,e,n),n})},e.prototype.delete=function(e){i(nr,"DELETE",this.store.name,e);var t=this.store.delete(e);return Te(t)},e.prototype.count=function(){i(nr,"COUNT",this.store.name);var e=this.store.count();return Te(e)},e.prototype.loadAll=function(e,t){var n=this.cursor(this.options(e,t)),o=[];return this.iterateCursor(n,function(e,t){o.push(t)}).next(function(){return o})},e.prototype.deleteAll=function(e,t){i(nr,"DELETE ALL",this.store.name);var n=this.options(e,t);n.keysOnly=!1;var o=this.cursor(n);return this.iterateCursor(o,function(e,t,n){return n.delete()})},e.prototype.iterate=function(e,t){var n;t?n=e:(n={},t=e);var o=this.cursor(n);return this.iterateCursor(o,t)},e.prototype.iterateCursor=function(e,t){var n=[];return new So(function(o,r){e.onerror=function(e){r(e.target.error)},e.onsuccess=function(e){var r=e.target.result;if(!r)return void o();var i=new rr(r),s=t(r.primaryKey,r.value,i);s instanceof So&&n.push(s),i.isDone?o():null===i.skipToKey?r.continue():r.continue(i.skipToKey)}}).next(function(){return So.waitFor(n)})},e.prototype.options=function(e,t){var n;return void 0!==e&&("string"==typeof e?n=e:(c(void 0===t,"3rd argument must not be defined if 2nd is a range."),t=e)),{index:n,range:t}},e.prototype.cursor=function(e){var t="next";if(e.reverse&&(t="prev"),e.index){var n=this.store.index(e.index);return e.keysOnly?n.openKeyCursor(e.range,t):n.openCursor(e.range,t)}return this.store.openCursor(e.range,t)},e}(),sr=function(){function e(e,t){this.userId=e,this.serializer=t,this.garbageCollector=null}return e.forUser=function(t,n){c(""!==t.uid,"UserID must not be an empty string.");var o=t.isAuthenticated()?t.uid:"";return new e(o,n)},e.prototype.start=function(t){var n=this;return e.loadNextBatchIdFromDb(t).next(function(e){return n.nextBatchId=e,Ne(t).get(n.userId)}).next(function(e){return e||(e=new Ko(n.userId,Po,"")),n.metadata=e,n.metadata.lastAcknowledgedBatchId>=n.nextBatchId?n.checkEmpty(t).next(function(e){return c(e,"Reset nextBatchID is only possible when the queue is empty"),n.metadata.lastAcknowledgedBatchId=Po,Ne(t).put(n.metadata)}):So.resolve()})},e.loadNextBatchIdFromDb=function(e){var t=Po;return Ae(e).iterate({reverse:!0},function(e,n,o){var r=e[0],i=e[1];if(i>t&&(t=n.batchId),""===r)o.done();else{var s=W(r);o.skip([s])}}).next(function(){return t+1})},e.prototype.checkEmpty=function(e){var t=!0,n=IDBKeyRange.bound(this.keyForBatchId(Number.NEGATIVE_INFINITY),this.keyForBatchId(Number.POSITIVE_INFINITY));return Ae(e).iterate({range:n},function(e,n,o){t=!1,o.done()}).next(function(){return t})},e.prototype.getNextBatchId=function(){return So.resolve(this.nextBatchId)},e.prototype.getHighestAcknowledgedBatchId=function(){return So.resolve(this.metadata.lastAcknowledgedBatchId)},e.prototype.acknowledgeBatch=function(e,t,n){var o=t.batchId;return c(o>this.metadata.lastAcknowledgedBatchId,"Mutation batchIDs must be acknowledged in order"),this.metadata.lastAcknowledgedBatchId=o,this.metadata.lastStreamToken=Ee(n),Ne(e).put(this.metadata)},e.prototype.getLastStreamToken=function(){return So.resolve(this.metadata.lastStreamToken)},e.prototype.setLastStreamToken=function(e,t){return this.metadata.lastStreamToken=Ee(t),Ne(e).put(this.metadata)},e.prototype.addMutationBatch=function(e,t,n){var o=this,r=this.nextBatchId;this.nextBatchId++;var i=new Fo(r,t,n),s=this.serializer.toDbMutationBatch(this.userId,i);return Ae(e).put(s).next(function(){for(var t=[],i=0,s=n;i=o,"Should have found mutation after "+o),i=n.serializer.fromDbMutationBatch(t)),r.done()}).next(function(){return i})},e.prototype.getAllMutationBatches=function(e){var t=this,n=IDBKeyRange.bound(this.keyForBatchId(Po),this.keyForBatchId(Number.POSITIVE_INFINITY));return Ae(e).loadAll(n).next(function(e){return e.map(function(e){return t.serializer.fromDbMutationBatch(e)})})},e.prototype.getAllMutationBatchesThroughBatchId=function(e,t){var n=this,o=IDBKeyRange.bound(this.keyForBatchId(Po),this.keyForBatchId(t));return Ae(e).loadAll(o).next(function(e){return e.map(function(e){return n.serializer.fromDbMutationBatch(e)})})},e.prototype.getAllMutationBatchesAffectingDocumentKey=function(e,t){var n=this,o=Xo.prefixForPath(this.userId,t.path),r=IDBKeyRange.lowerBound(o),i=[];return Ie(e).iterate({range:r},function(o,r,s){var l=o[0],c=o[1],p=o[2],u=ye(c);if(l!==n.userId||!t.path.isEqual(u))return void s.done();var m=n.keyForBatchId(p);return Ae(e).get(m).next(function(e){null===e&&d("Dangling document-mutation reference found: "+o+" which points to "+m),i.push(n.serializer.fromDbMutationBatch(e))})}).next(function(){return i})},e.prototype.getAllMutationBatchesAffectingQuery=function(e,t){var n=this;c(!t.isDocumentQuery(),"Document queries shouldn't go down this path");var o=t.path,r=o.length+1,i=Xo.prefixForPath(this.userId,o),s=IDBKeyRange.lowerBound(i),l=new Nn(V);return Ie(e).iterate({range:s},function(e,t,i){var s=e[0],d=e[1],c=e[2],p=ye(d);return s===n.userId&&o.isPrefixOf(p)?void(p.length!==r||(l=l.add(c))):void i.done()}).next(function(){var t=[],o=[];return l.forEach(function(r){var i=n.keyForBatchId(r);o.push(Ae(e).get(i).next(function(e){null===e&&d("Dangling document-mutation reference found, which points to "+i),t.push(n.serializer.fromDbMutationBatch(e))}))}),So.waitFor(o).next(function(){return t})})},e.prototype.removeMutationBatches=function(e,t){for(var n=Ae(e),o=Ie(e),r=[],i=function(e){var t=IDBKeyRange.only(s.keyForBatchId(e.batchId)),i=0,l=n.iterate({range:t},function(e,t,n){return i++,n.delete()});r.push(l.next(function(){c(1==i,"Dangling document-mutation reference found: Missing batch "+e.batchId)}));for(var d=0,p=e.mutations;dthis.metadata.highestTargetId&&(this.metadata.highestTargetId=e.targetId,t=!0),t},Object.defineProperty(e.prototype,"count",{get:function(){return this.metadata.targetCount},enumerable:!0,configurable:!0}),e.prototype.getQueryData=function(e,t){var n=this,o=t.canonicalId(),r=IDBKeyRange.bound([o,Number.NEGATIVE_INFINITY],[o,tt]),i=null;return _e(e).iterate({range:r,index:$o.queryTargetsIndexName},function(e,o,r){var s=n.serializer.fromDbTarget(o);t.isEqual(s.query)&&(i=s,r.done())}).next(function(){return i})},e.prototype.addMatchingKeys=function(e,t,n){var o=[],r=Oe(e);return t.forEach(function(e){var t=he(e.path);o.push(r.put(new Yo(n,t)))}),So.waitFor(o)},e.prototype.removeMatchingKeys=function(e,t,n){var o=this,r=[],i=Oe(e);return t.forEach(function(e){var t=he(e.path);r.push(i.delete([n,t])),null!==o.garbageCollector&&o.garbageCollector.addPotentialGarbageKey(e)}),So.waitFor(r)},e.prototype.removeMatchingKeysForTargetId=function(e,t){var n=Oe(e),o=IDBKeyRange.bound([t],[t+1],!1,!0);return this.notifyGCForRemovedKeys(e,o).next(function(){return n.delete(o)})},e.prototype.notifyGCForRemovedKeys=function(e,t){var n=this,o=Oe(e);return null!==this.garbageCollector&&this.garbageCollector.isEager?o.iterate({range:t,keysOnly:!0},function(e){var t=ye(e[1]),o=new Nt(t);c(null!==n.garbageCollector,"GarbageCollector for query cache set to null during key removal."),n.garbageCollector.addPotentialGarbageKey(o)}):So.resolve()},e.prototype.getMatchingKeysForTargetId=function(e,t){var n=IDBKeyRange.bound([t],[t+1],!1,!0),o=Oe(e),r=ie();return o.iterate({range:n,keysOnly:!0},function(e){var t=ye(e[1]),n=new Nt(t);r=r.add(n)}).next(function(){return r})},e.prototype.setGarbageCollector=function(e){this.garbageCollector=e},e.prototype.containsKey=function(e,t){c(null!==e,"Persistence Transaction cannot be null for query cache containsKey");var n=he(t.path),o=IDBKeyRange.bound([n],[z(n)],!1,!0),r=0;return Oe(e).iterate({index:Yo.documentTargetsIndex,keysOnly:!0,range:o},function(e,t,n){r++,n.done()}).next(function(){return 0t?(s("Persistence owner-lease is in the future. Discarding.",e),!1):e.ownerId!==this.getZombiedOwnerId())},e.prototype.scheduleOwnerLeaseRefreshes=function(){var e=this;this.ownerLeaseRefreshHandle=setInterval(function(){var t=e.runTransaction("Refresh owner timestamp",function(t){var n=t.store(Ho.store);return n.put("owner",new Ho(e.ownerId,Date.now()))});t.catch(function(t){s(t),e.stopOwnerLeaseRefreshes()})},4e3)},e.prototype.stopOwnerLeaseRefreshes=function(){this.ownerLeaseRefreshHandle&&(clearInterval(this.ownerLeaseRefreshHandle),this.ownerLeaseRefreshHandle=null)},e.prototype.attachWindowUnloadHook=function(){var e=this;"object"==typeof window&&"function"==typeof window.addEventListener&&(this.windowUnloadHandler=function(){e.setZombiedOwnerId(e.ownerId),e.shutdown()},window.addEventListener("unload",this.windowUnloadHandler))},e.prototype.detachWindowUnloadHook=function(){this.windowUnloadHandler&&(c("object"==typeof window&&"function"==typeof window.removeEventListener,"Expected 'window.removeEventListener' to be a function"),window.removeEventListener("unload",this.windowUnloadHandler),this.windowUnloadHandler=null)},e.prototype.getZombiedOwnerId=function(){try{var e=window.localStorage.getItem(this.zombiedOwnerLocalStorageKey());return i(pr,"Zombied ownerID from LocalStorage:",e),e}catch(t){return s("Failed to get zombie owner id.",t),null}},e.prototype.setZombiedOwnerId=function(e){try{null===e?window.localStorage.removeItem(this.zombiedOwnerLocalStorageKey()):window.localStorage.setItem(this.zombiedOwnerLocalStorageKey(),e)}catch(t){s("Failed to set zombie owner id.",t)}},e.prototype.zombiedOwnerLocalStorageKey=function(){return this.localStoragePrefix+"zombiedOwnerId"},e.prototype.generateOwnerId=function(){return ft.newId()},e.MAIN_DATABASE="main",e}(),hr=function(){function e(e,t){this.remoteDocumentCache=e,this.mutationQueue=t}return e.prototype.getDocument=function(e,t){var n=this;return this.remoteDocumentCache.getEntry(e,t).next(function(o){return n.computeLocalDocument(e,t,o)})},e.prototype.getDocuments=function(e,t){var n=this,o=[],r=oe();return t.forEach(function(t){o.push(n.getDocument(e,t).next(function(e){e||(e=new _t(t,hn.forDeletedDoc())),r=r.insert(t,e)}))}),So.waitFor(o).next(function(){return r})},e.prototype.getDocumentsMatchingQuery=function(e,t){return Nt.isDocumentKey(t.path)?this.getDocumentsMatchingDocumentQuery(e,t.path):this.getDocumentsMatchingCollectionQuery(e,t)},e.prototype.getDocumentsMatchingDocumentQuery=function(e,t){return this.getDocument(e,new Nt(t)).next(function(e){var t=re();return e instanceof Lt&&(t=t.insert(e.key,e)),t})},e.prototype.getDocumentsMatchingCollectionQuery=function(e,t){var n=this,o;return this.remoteDocumentCache.getDocumentsMatchingQuery(e,t).next(function(t){return n.computeLocalDocuments(e,t)}).next(function(r){return o=r,n.mutationQueue.getAllMutationBatchesAffectingQuery(e,t)}).next(function(t){for(var r=ie(),i=0,s=t,l;it,"Acknowledged batches can't be rejected."),o})}).next(function(){return t.removeMutationBatch(n,o)}).next(function(e){return r=e,t.mutationQueue.performConsistencyCheck(n)}).next(function(){return t.localDocuments.getDocuments(n,r)})})},e.prototype.getLastStreamToken=function(){var e=this;return this.persistence.runTransaction("Get last stream token",function(t){return e.mutationQueue.getLastStreamToken(t)})},e.prototype.setLastStreamToken=function(e){var t=this;return this.persistence.runTransaction("Set last stream token",function(n){return t.mutationQueue.setLastStreamToken(n,e)})},e.prototype.getLastRemoteSnapshotVersion=function(){return this.queryCache.getLastRemoteSnapshotVersion()},e.prototype.applyRemoteEvent=function(e){var t=this,n=new gr(this.remoteDocuments);return this.persistence.runTransaction("Apply remote event",function(o){var r=[];g(e.targetChanges,function(e,n){var i=t.targetIds[e];if(i){var s=n.mapping;if(s)if(s instanceof Fn)r.push(t.queryCache.removeMatchingKeysForTargetId(o,e).next(function(){return t.queryCache.addMatchingKeys(o,s.documents,e)}));else if(s instanceof Bn)r.push(t.queryCache.removeMatchingKeys(o,s.removedDocuments,e).next(function(){return t.queryCache.addMatchingKeys(o,s.addedDocuments,e)}));else return d("Unknown mapping type: "+JSON.stringify(s));var l=n.resumeToken;0=e.compareTo(t)||y(this.targetIds)},e.prototype.shouldHoldBatchResult=function(e){return!this.isRemoteUpToVersion(e)||0i.version.compareTo(s))&&(i=o.applyToRemoteDocument(r,i,t),i?n.addEntry(i):c(!e,"Mutation batch "+o+" applied to document "+e+" resulted in null"))})}),i},e}(),yr=function(){function e(){this.mutationQueue=[],this.nextBatchId=1,this.highestAcknowledgedBatchId=Po,this.lastStreamToken=p(),this.garbageCollector=null,this.batchesByDocumentKey=new Nn(Eo.compareByKey)}return e.prototype.start=function(){return 0===this.mutationQueue.length&&(this.nextBatchId=1,this.highestAcknowledgedBatchId=Po),c(this.highestAcknowledgedBatchIdthis.highestAcknowledgedBatchId,"Mutation batchIDs must be acknowledged in order");var r=this.indexOfExistingBatchId(o,"acknowledged"),i=this.mutationQueue[r];return c(o===i.batchId,"Queue ordering failure: expected batch "+o+", got batch "+i.batchId),c(!i.isTombstone(),"Can't acknowledge a previously removed batch"),this.highestAcknowledgedBatchId=o,this.lastStreamToken=n,So.resolve()},e.prototype.getLastStreamToken=function(){return So.resolve(this.lastStreamToken)},e.prototype.setLastStreamToken=function(e,t){return this.lastStreamToken=t,So.resolve()},e.prototype.addMutationBatch=function(e,t,n){c(0!==n.length,"Mutation batches should not be empty");var o=this.nextBatchId;if(this.nextBatchId++,0r?0:r,s;io?o=0:o>=n?o=n:o++,So.resolve(this.getAllLiveMutationBatchesBeforeIndex(o))},e.prototype.getAllMutationBatchesAffectingDocumentKey=function(e,t){var n=this,o=new Eo(t,0),r=new Eo(t,tt),i=[];return this.batchesByDocumentKey.forEachInRange([o,r],function(e){c(t.isEqual(e.key),"Should only iterate over a single key's batches");var o=n.findMutationBatch(e.targetOrBatchId);c(null!==o,"Batches in the index must exist in the main table"),i.push(o)}),So.resolve(i)},e.prototype.getAllMutationBatchesAffectingQuery=function(e,t){var n=this,o=t.path,r=o.length+1,i=o;Nt.isDocumentKey(i)||(i=i.child(""));var s=new Eo(new Nt(i),0),l=new Nn(V);this.batchesByDocumentKey.forEachWhile(function(e){var t=e.key.path;return!!o.isPrefixOf(t)&&(t.length===r&&(l=l.add(e.targetOrBatchId)),!0)},s);var d=[];return l.forEach(function(e){var t=n.findMutationBatch(e);null!==t&&d.push(t)}),So.resolve(d)},e.prototype.removeMutationBatches=function(e,t){var n=t.length;c(0t||t>=this.mutationQueue.length)return null;var n=this.mutationQueue[t];return c(n.batchId===e,"If found batch must match"),n.isTombstone()?null:n},e}(),br=function(){function e(){this.queries=new bo(function(e){return e.canonicalId()}),this.lastRemoteSnapshotVersion=hn.MIN,this.highestTargetId=0,this.references=new To,this.targetCount=0}return e.prototype.start=function(){return So.resolve()},e.prototype.getLastRemoteSnapshotVersion=function(){return this.lastRemoteSnapshotVersion},e.prototype.getHighestTargetId=function(){return this.highestTargetId},e.prototype.setLastRemoteSnapshotVersion=function(e,t){return this.lastRemoteSnapshotVersion=t,So.resolve()},e.prototype.saveQueryData=function(e){this.queries.set(e.query,e);var t=e.targetId;t>this.highestTargetId&&(this.highestTargetId=t)},e.prototype.addQueryData=function(e,t){return c(!this.queries.has(t.query),"Adding a query that already exists"),this.saveQueryData(t),this.targetCount+=1,So.resolve()},e.prototype.updateQueryData=function(e,t){return c(this.queries.has(t.query),"Updating a non-existent query"),this.saveQueryData(t),So.resolve()},e.prototype.removeQueryData=function(e,t){return c(0n.indexOf("Firestore Test Simulated Error")&&setTimeout(function(){throw e},0),e}).then(function(e){return t.operationInProgress=!1,e})});return this.tail=n,n},e.prototype.enqueueAfterDelay=function(e,t,n){var o=this;this.verifyNotFailed(),c(!this.containsDelayedOperation(e),"Attempted to schedule multiple operations with timer id "+e+".");var r=wr.createAndSchedule(this,e,t,n,function(e){return o.removeDelayedOperation(e)});return this.delayedOperations.push(r),r},e.prototype.verifyNotFailed=function(){this.failure&&d("AsyncQueue is already failed: "+(this.failure.stack||this.failure.message))},e.prototype.verifyOperationInProgress=function(){c(this.operationInProgress,"verifyOpInProgress() called when no op in progress on this queue.")},e.prototype.drain=function(){return this.enqueue(function(){return Promise.resolve()})},e.prototype.containsDelayedOperation=function(e){return 0<=this.delayedOperations.findIndex(function(t){return t.timerId===e})},e.prototype.runDelayedOperationsEarly=function(e){var t=this;return this.drain().then(function(){c(e===Cr.All||t.containsDelayedOperation(e),"Attempted to drain to missing operation "+e),t.delayedOperations.sort(function(e,t){return e.targetTimeMs-t.targetTimeMs});for(var n=0,o=t.delayedOperations,r;nthis.maxDelayMs&&(this.currentBaseMs=this.maxDelayMs)},e.prototype.cancel=function(){null!==this.timerPromise&&(this.timerPromise.cancel(),this.timerPromise=null)},e.prototype.jitterDelayMs=function(){return(Math.random()-0.5)*this.currentBaseMs},e}(),Ar;(function(e){e[e.Initial=0]="Initial",e[e.Auth=1]="Auth",e[e.Open=2]="Open",e[e.Error=3]="Error",e[e.Backoff=4]="Backoff",e[e.Stopped=5]="Stopped"})(Ar||(Ar={}));var Ir=function(){function e(e,t,n,o,r){this.queue=e,this.idleTimerId=n,this.connection=o,this.credentialsProvider=r,this.inactivityTimerPromise=null,this.stream=null,this.listener=null,this.backoff=new Er(e,t,1e3,1.5,60000),this.state=Ar.Initial}return e.prototype.isStarted=function(){return this.state===Ar.Backoff||this.state===Ar.Auth||this.state===Ar.Open},e.prototype.isOpen=function(){return this.state===Ar.Open},e.prototype.start=function(e){return this.state===Ar.Error?void this.performBackoff(e):void(c(this.state===Ar.Initial,"Already started"),this.listener=e,this.auth())},e.prototype.stop=function(){this.isStarted()&&this.close(Ar.Stopped)},e.prototype.inhibitBackoff=function(){c(!this.isStarted(),"Can only inhibit backoff in a stopped state"),this.state=Ar.Initial,this.backoff.reset()},e.prototype.markIdle=function(){var e=this;this.isOpen()&&null===this.inactivityTimerPromise&&(this.inactivityTimerPromise=this.queue.enqueueAfterDelay(this.idleTimerId,60000,function(){return e.handleIdleCloseTimer()}))},e.prototype.sendRequest=function(e){this.cancelIdleCheck(),this.stream.send(e)},e.prototype.handleIdleCloseTimer=function(){return lt.__awaiter(this,void 0,void 0,function(){return lt.__generator(this,function(){return this.isOpen()?[2,this.close(Ar.Initial)]:[2]})})},e.prototype.cancelIdleCheck=function(){this.inactivityTimerPromise&&(this.inactivityTimerPromise.cancel(),this.inactivityTimerPromise=null)},e.prototype.close=function(e,t){return lt.__awaiter(this,void 0,void 0,function(){var n;return lt.__generator(this,function(){return c(e===Ar.Error||Q(t),"Can't provide an error when not in an error state."),this.cancelIdleCheck(),this.backoff.cancel(),e===Ar.Error?t&&t.code===ht.RESOURCE_EXHAUSTED&&(s(t.toString()),s("Using maximum backoff delay to prevent overloading the backend."),this.backoff.resetToMax()):this.backoff.reset(),null!==this.stream&&(this.tearDown(),this.stream.close(),this.stream=null),this.state=e,n=this.listener,this.listener=null,e===Ar.Stopped?[2]:[2,n.onClose(t)]})})},e.prototype.tearDown=function(){},e.prototype.auth=function(){var e=this;c(this.state===Ar.Initial,"Must be in initial state to auth"),this.state=Ar.Auth,this.credentialsProvider.getToken(!1).then(function(t){e.startStream(t)},function(t){e.queue.enqueue(function(){return lt.__awaiter(e,void 0,void 0,function(){var e;return lt.__generator(this,function(){return this.state===Ar.Stopped?[2]:(e=new gt(ht.UNKNOWN,"Fetching auth token failed: "+t.message),[2,this.handleStreamClose(e)])})})})})},e.prototype.startStream=function(e){var t=this;if(this.state!==Ar.Stopped){c(this.state===Ar.Auth,"Trying to start stream in a non-auth state");var n=function(e,n){t.queue.enqueue(function(){return lt.__awaiter(t,void 0,void 0,function(){return lt.__generator(this,function(){return this.stream===e?[2,n()]:[2]})})})};if(null!==this.listener){var o=this.startRpc(e);this.stream=o,this.stream.onOpen(function(){n(o,function(){return c(t.state===Ar.Auth,"Expected stream to be in state auth, but was "+t.state),t.state=Ar.Open,t.listener.onOpen()})}),this.stream.onClose(function(e){n(o,function(){return t.handleStreamClose(e)})}),this.stream.onMessage(function(e){n(o,function(){return t.onMessage(e)})})}}},e.prototype.performBackoff=function(e){var t=this;c(this.state===Ar.Error,"Should only perform backoff in an error case"),this.state=Ar.Backoff,this.backoff.backoffAndRun(function(){return lt.__awaiter(t,void 0,void 0,function(){return lt.__generator(this,function(){return this.state===Ar.Stopped?[2]:(this.state=Ar.Initial,this.start(e),c(this.isStarted(),"PersistentStream should have started"),[2])})})})},e.prototype.handleStreamClose=function(e){return c(this.isStarted(),"Can't handle server close on non-started stream"),i("PersistentStream","close with error: "+e),this.stream=null,this.close(Ar.Error,e)},e}(),Nr=function(e){function t(t,n,o,r){var i=e.call(this,t,Cr.ListenStreamConnectionBackoff,Cr.ListenStreamIdle,n,o)||this;return i.serializer=r,i}return lt.__extends(t,e),t.prototype.startRpc=function(e){return this.connection.openStream("Listen",e)},t.prototype.onMessage=function(e){this.backoff.reset();var t=this.serializer.fromWatchChange(e),n=this.serializer.versionFromListenResponse(e);return this.listener.onWatchChange(t,n)},t.prototype.watch=function(e){var t={database:this.serializer.encodedDatabaseId,addTarget:this.serializer.toTarget(e)},n=this.serializer.toListenRequestLabels(e);n&&(t.labels=n),this.sendRequest(t)},t.prototype.unwatch=function(e){var t={};t.database=this.serializer.encodedDatabaseId,t.removeTarget=e,this.sendRequest(t)},t}(Ir),Lr=function(e){function t(t,n,o,r){var i=e.call(this,t,Cr.WriteStreamConnectionBackoff,Cr.WriteStreamIdle,n,o)||this;return i.serializer=r,i.handshakeComplete_=!1,i}return lt.__extends(t,e),Object.defineProperty(t.prototype,"handshakeComplete",{get:function(){return this.handshakeComplete_},enumerable:!0,configurable:!0}),t.prototype.start=function(t){this.handshakeComplete_=!1,e.prototype.start.call(this,t)},t.prototype.tearDown=function(){this.handshakeComplete_&&this.writeMutations([])},t.prototype.startRpc=function(e){return this.connection.openStream("Write",e)},t.prototype.onMessage=function(e){if(c(!!e.streamToken,"Got a write response without a stream token"),this.lastStreamToken=e.streamToken,!this.handshakeComplete_)return c(!e.writeResults||0===e.writeResults.length,"Got mutation results for handshake"),this.handshakeComplete_=!0,this.listener.onHandshakeComplete();this.backoff.reset();var t=this.serializer.fromWriteResults(e.writeResults),n=this.serializer.fromVersion(e.commitTime);return this.listener.onMutationResult(n,t)},t.prototype.writeHandshake=function(){c(this.isOpen(),"Writing handshake requires an opened stream"),c(!this.handshakeComplete_,"Handshake already completed");var e={};e.database=this.serializer.encodedDatabaseId,this.sendRequest(e)},t.prototype.writeMutations=function(e){var t=this;c(this.isOpen(),"Writing mutations requires an opened stream"),c(this.handshakeComplete_,"Handshake must be complete before writing mutations"),c(0=Or&&(this.clearOnlineStateTimer(),this.logClientOfflineWarningIfNecessary("Connection failed "+Or+" "+("times. Most recent error: "+e.toString())),this.setAndBroadcast(uo.Offline)))},e.prototype.set=function(e){this.clearOnlineStateTimer(),this.watchStreamFailures=0,e===uo.Online&&(this.shouldWarnClientIsOffline=!1),this.setAndBroadcast(e)},e.prototype.setAndBroadcast=function(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))},e.prototype.logClientOfflineWarningIfNecessary=function(e){var t="Could not reach Cloud Firestore backend. "+e+"\nThis typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.";this.shouldWarnClientIsOffline?(s(t),this.shouldWarnClientIsOffline=!1):i("OnlineStateTracker",t)},e.prototype.clearOnlineStateTimer=function(){null!==this.onlineStateTimer&&(this.onlineStateTimer.cancel(),this.onlineStateTimer=null)},e}(),Pr="RemoteStore",Fr=function(){function e(e,t,n,o){this.localStore=e,this.datastore=t,this.pendingWrites=[],this.lastBatchSeen=Po,this.listenTargets={},this.pendingTargetResponses={},this.accumulatedWatchChanges=[],this.watchStream=null,this.writeStream=null,this.onlineStateTracker=new Rr(n,o)}return e.prototype.start=function(){return this.enableNetwork()},e.prototype.isNetworkEnabled=function(){return c(null==this.watchStream==(null==this.writeStream),"WatchStream and WriteStream should both be null or non-null"),null!=this.watchStream},e.prototype.enableNetwork=function(){var e=this;return this.isNetworkEnabled()?Promise.resolve():(this.watchStream=this.datastore.newPersistentWatchStream(),this.writeStream=this.datastore.newPersistentWriteStream(),this.localStore.getLastStreamToken().then(function(t){return e.writeStream.lastStreamToken=t,e.shouldStartWatchStream()?e.startWatchStream():e.onlineStateTracker.set(uo.Unknown),e.fillWritePipeline()}))},e.prototype.disableNetwork=function(){return lt.__awaiter(this,void 0,void 0,function(){return lt.__generator(this,function(){return this.disableNetworkInternal(),this.onlineStateTracker.set(uo.Offline),[2]})})},e.prototype.disableNetworkInternal=function(){this.isNetworkEnabled()&&(this.watchStream.stop(),this.writeStream.stop(),this.cleanUpWatchStreamState(),this.cleanUpWriteStreamState(),this.writeStream=null,this.watchStream=null)},e.prototype.shutdown=function(){return i(Pr,"RemoteStore shutting down."),this.disableNetworkInternal(),this.onlineStateTracker.set(uo.Unknown),Promise.resolve()},e.prototype.listen=function(e){c(!m(this.listenTargets,e.targetId),"listen called with duplicate targetId!"),this.listenTargets[e.targetId]=e,this.shouldStartWatchStream()?this.startWatchStream():this.isNetworkEnabled()&&this.watchStream.isOpen()&&this.sendWatchRequest(e)},e.prototype.unlisten=function(e){c(m(this.listenTargets,e),"unlisten called without assigned target ID!"),delete this.listenTargets[e],this.isNetworkEnabled()&&this.watchStream.isOpen()&&(this.sendUnwatchRequest(e),y(this.listenTargets)&&this.watchStream.markIdle())},e.prototype.sendWatchRequest=function(e){this.recordPendingTargetRequest(e.targetId),this.watchStream.watch(e)},e.prototype.sendUnwatchRequest=function(e){this.recordPendingTargetRequest(e),this.watchStream.unwatch(e)},e.prototype.recordPendingTargetRequest=function(e){this.pendingTargetResponses[e]=(this.pendingTargetResponses[e]||0)+1},e.prototype.startWatchStream=function(){c(this.shouldStartWatchStream(),"startWriteStream() called when shouldStartWatchStream() is false."),this.watchStream.start({onOpen:this.onWatchStreamOpen.bind(this),onClose:this.onWatchStreamClose.bind(this),onWatchChange:this.onWatchStreamChange.bind(this)}),this.onlineStateTracker.handleWatchStreamStart()},e.prototype.shouldStartWatchStream=function(){return this.isNetworkEnabled()&&!this.watchStream.isStarted()&&!y(this.listenTargets)},e.prototype.cleanUpWatchStreamState=function(){this.accumulatedWatchChanges=[],this.pendingTargetResponses={}},e.prototype.onWatchStreamOpen=function(){return lt.__awaiter(this,void 0,void 0,function(){var e=this;return lt.__generator(this,function(){return g(this.listenTargets,function(t,n){e.sendWatchRequest(n)}),[2]})})},e.prototype.onWatchStreamClose=function(e){return lt.__awaiter(this,void 0,void 0,function(){return lt.__generator(this,function(){return c(this.isNetworkEnabled(),"onWatchStreamClose() should only be called when the network is enabled"),this.cleanUpWatchStreamState(),this.shouldStartWatchStream()?(e&&this.onlineStateTracker.handleWatchStreamFailure(e),this.startWatchStream()):this.onlineStateTracker.set(uo.Unknown),[2]})})},e.prototype.onWatchStreamChange=function(e,t){return lt.__awaiter(this,void 0,void 0,function(){var n;return lt.__generator(this,function(){return(this.onlineStateTracker.set(uo.Online),e instanceof jn&&e.state===qn.Removed&&e.cause)?[2,this.handleTargetError(e)]:(this.accumulatedWatchChanges.push(e),!t.isEqual(hn.MIN)&&0<=t.compareTo(this.localStore.getLastRemoteSnapshotVersion())?(n=this.accumulatedWatchChanges,this.accumulatedWatchChanges=[],[2,this.handleWatchChangeBatch(t,n)]):[2])})})},e.prototype.handleWatchChangeBatch=function(e,t){var n=this,o=new Wn(e,this.listenTargets,this.pendingTargetResponses);o.addChanges(t);var r=o.createRemoteEvent();this.pendingTargetResponses=o.pendingTargetResponses;var i=[];return g(o.existenceFilters,function(t,o){var s=n.listenTargets[t];if(s){var l=s.query;if(!l.isDocumentQuery()){var d=n.localStore.remoteDocumentKeys(t).then(function(e){if(r.targetChanges[t]){var i=r.targetChanges[t].mapping;null!==i&&(i instanceof Bn?e=i.applyToKeySet(e):(c(i instanceof Fn,"Expected either reset or update mapping but got something else: "+i),e=i.documents))}if(e.size!==o.count){r.handleExistenceFilterMismatch(t);var d=new fn(l,t,s.purpose);n.listenTargets[t]=d,n.sendUnwatchRequest(t);var p=new fn(l,t,gn.ExistenceFilterMismatch);n.sendWatchRequest(p)}});i.push(d)}else if(0===o.count){var p=new Nt(l.path),u=new _t(p,e);r.addDocumentUpdate(u)}else c(1===o.count,"Single document existence filter with count: "+o.count)}}),Promise.all(i).then(function(){return g(r.targetChanges,function(e,t){if(0() instead."),Yr=/^__.*__$/,Zr=function(){function e(e,t,n){this.data=e,this.fieldMask=t,this.fieldTransforms=n}return e.prototype.toMutations=function(e,t){var n=[];return null===this.fieldMask?n.push(new Cn(e,this.data,t)):n.push(new wn(e,this.data,this.fieldMask,t)),0=e.docs.size,"Too many documents returned on a document query");var o=e.docs.get(n._key);t.next(new ma(n.firestore,n._key,o,e.fromCache))}},error:o}),i=this._firestoreClient.listen(on.atPath(this._key.path),r,e);return function(){r.mute(),n._firestoreClient.unlisten(i)}},e.prototype.get=function(e){var t=this;return P("DocumentReference.get",e,["source"]),e&&L("DocumentReference.get","options","source",e.source,["default","server","cache"]),new Promise(function(n,o){e&&"cache"===e.source?t.firestore.ensureClientConfigured().getDocumentFromLocalCache(t._key).then(function(e){n(new ma(t.firestore,t._key,e,!0))},o):t.getViaSnapshotListener(n,o,e)})},e.prototype.getViaSnapshotListener=function(e,t,n){var o=this.onSnapshotInternal({includeMetadataChanges:!0,waitForSyncWhenOnline:!0},{next:function(r){o(),!r.exists&&r.metadata.fromCache?t(new gt(ht.UNAVAILABLE,"Failed to get document because the client is offline.")):r.exists&&r.metadata.fromCache&&n&&"server"===n.source?t(new gt(ht.UNAVAILABLE,"Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to \"server\" to retrieve the cached document.)")):e(r)},error:t})},e}(),ua=function(){function e(e,t){this.hasPendingWrites=e,this.fromCache=t}return e.prototype.isEqual=function(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache},e}(),ma=function(){function e(e,t,n,o){this._firestore=e,this._key=t,this._document=n,this._fromCache=o}return e.prototype.data=function(e){return k("DocumentSnapshot.data",arguments,0,1),e=Qe("DocumentSnapshot.data",e),this._document?this.convertObject(this._document.data,Bt.fromSnapshotOptions(e,this._firestore._areTimestampsInSnapshotsEnabled())):void 0},e.prototype.get=function(e,t){if(k("DocumentSnapshot.get",arguments,1,2),t=Qe("DocumentSnapshot.get",t),this._document){var n=this._document.data.field(ze("DocumentSnapshot.get",e));if(void 0!==n)return this.convertValue(n,Bt.fromSnapshotOptions(t,this._firestore._areTimestampsInSnapshotsEnabled()))}},Object.defineProperty(e.prototype,"id",{get:function(){return this._key.path.lastSegment()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ref",{get:function(){return new pa(this._key,this._firestore)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"exists",{get:function(){return null!==this._document},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"metadata",{get:function(){return new ua(null!==this._document&&this._document.hasLocalMutations,this._fromCache)},enumerable:!0,configurable:!0}),e.prototype.isEqual=function(t){if(!(t instanceof e))throw F("isEqual","DocumentSnapshot",1,t);return this._firestore===t._firestore&&this._fromCache===t._fromCache&&this._key.isEqual(t._key)&&(null===this._document?null===t._document:this._document.isEqual(t._document))},e.prototype.convertObject=function(e,t){var n=this,o={};return e.forEach(function(e,r){o[e]=n.convertValue(r,t)}),o},e.prototype.convertValue=function(e,t){if(e instanceof $t)return this.convertObject(e,t);if(e instanceof Yt)return this.convertArray(e,t);if(e instanceof Qt){var n=e.value(t),o=this._firestore.ensureClientConfigured().databaseId();return e.databaseId.isEqual(o)||s("Document "+this._key.path+" contains a document reference within a different database ("+(e.databaseId.projectId+"/"+e.databaseId.database+") which is not supported. It will be treated as a reference in the current ")+("database ("+o.projectId+"/"+o.database+") instead.")),new pa(n,this._firestore)}return e.value(t)},e.prototype.convertArray=function(e,t){var n=this;return e.internalValue.map(function(e){return n.convertValue(e,t)})},e}(),ha=function(e){function t(t,n,o,r){return e.call(this,t,n,o,r)||this}return lt.__extends(t,e),t.prototype.data=function(t){var n=e.prototype.data.call(this,t);return c("object"==typeof n,"Document in a QueryDocumentSnapshot should exist"),n},t}(ma),ga=function(){function e(e,t){this._query=e,this.firestore=t}return e.prototype.where=function(t,n,o){x("Query.where",arguments,3),C("Query.where","string",2,n),R("Query.where",3,o);var r=ze("Query.where",t),i=rn.fromString(n),s;if(r.isKeyField()){if(i===rn.ARRAY_CONTAINS)throw new gt(ht.INVALID_ARGUMENT,"Invalid Query. You can't perform array-contains queries on FieldPath.documentId() since document IDs are not arrays.");if("string"==typeof o){if(-1!==o.indexOf("/"))throw new gt(ht.INVALID_ARGUMENT,"Function Query.where() requires its third parameter to be a valid document ID if the first parameter is FieldPath.documentId(), but it contains a slash.");if(""===o)throw new gt(ht.INVALID_ARGUMENT,"Function Query.where() requires its third parameter to be a valid document ID if the first parameter is FieldPath.documentId(), but it was an empty string.");var l=this._query.path.child(new Et([o]));c(0==l.length%2,"Path should be a document key"),s=new Qt(this.firestore._databaseId,new Nt(l))}else if(o instanceof pa){s=new Qt(this.firestore._databaseId,o._key)}else throw new gt(ht.INVALID_ARGUMENT,"Function Query.where() requires its third parameter to be a string or a DocumentReference if the first parameter is FieldPath.documentId(), but it was: "+(O(o)+"."))}else s=this.firestore._dataConverter.parseQueryValue("Query.where",o);var d=$(r,i,s);return this.validateNewFilter(d),new e(this._query.addFilter(d),this.firestore)},e.prototype.orderBy=function(t,n){k("Query.orderBy",arguments,1,2),w("Query.orderBy","string",2,n);var o;if(void 0===n||"asc"===n)o=dn.ASCENDING;else if("desc"===n)o=dn.DESCENDING;else throw new gt(ht.INVALID_ARGUMENT,"Function Query.orderBy() has unknown direction '"+n+"', expected 'asc' or 'desc'.");if(null!==this._query.startAt)throw new gt(ht.INVALID_ARGUMENT,"Invalid query. You must not call Query.startAt() or Query.startAfter() before calling Query.orderBy().");if(null!==this._query.endAt)throw new gt(ht.INVALID_ARGUMENT,"Invalid query. You must not call Query.endAt() or Query.endBefore() before calling Query.orderBy().");var r=ze("Query.orderBy",t),i=new pn(r,o);return this.validateNewOrderBy(i),new e(this._query.addOrderBy(i),this.firestore)},e.prototype.limit=function(t){if(x("Query.limit",arguments,1),C("Query.limit","number",1,t),0>=t)throw new gt(ht.INVALID_ARGUMENT,"Invalid Query. Query limit ("+t+") is invalid. Limit must be positive.");return new e(this._query.withLimit(t),this.firestore)},e.prototype.startAt=function(t){for(var n=[],o=1;oo.length)throw new gt(ht.INVALID_ARGUMENT,"Too many arguments provided to "+e+"(). The number of arguments must be less than or equal to the number of Query.orderBy() clauses");for(var r=[],s=0;s, or >=) must be on the same field. But you have inequality filters on '"+t.toString()+"'"+(" and '"+e.field.toString()+"'"));var n=this._query.getFirstOrderByField();null!==n&&this.validateOrderByAndInequalityMatch(e.field,n)}else if(e.op===rn.ARRAY_CONTAINS&&this._query.hasArrayContainsFilter())throw new gt(ht.INVALID_ARGUMENT,"Invalid query. Queries only support a single array-contains filter.")},e.prototype.validateNewOrderBy=function(e){if(null===this._query.getFirstOrderByField()){var t=this._query.getInequalityFilterField();null!==t&&this.validateOrderByAndInequalityMatch(t,e.field)}},e.prototype.validateOrderByAndInequalityMatch=function(e,t){if(!t.isEqual(e))throw new gt(ht.INVALID_ARGUMENT,"Invalid query. You have a where filter with an inequality (<, <=, >, or >=) on field '"+e.toString()+"' "+("and so you must also use '"+e.toString()+"' as your first Query.orderBy(), but your first Query.orderBy() ")+("is on field '"+t.toString()+"' instead."))},e}(),fa=function(){function e(e,t,n){this._firestore=e,this._originalQuery=t,this._snapshot=n,this._cachedChanges=null,this._cachedChangesIncludeMetadataChanges=null,this.metadata=new ua(n.hasPendingWrites,n.fromCache)}return Object.defineProperty(e.prototype,"docs",{get:function(){var e=[];return this.forEach(function(t){return e.push(t)}),e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"empty",{get:function(){return this._snapshot.docs.isEmpty()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this._snapshot.docs.size},enumerable:!0,configurable:!0}),e.prototype.forEach=function(e,t){var n=this;k("QuerySnapshot.forEach",arguments,1,2),C("QuerySnapshot.forEach","function",1,e),this._snapshot.docs.forEach(function(o){e.call(t,n.convertToDocumentImpl(o))})},Object.defineProperty(e.prototype,"query",{get:function(){return new ga(this._originalQuery,this._firestore)},enumerable:!0,configurable:!0}),e.prototype.docChanges=function(e){P("QuerySnapshot.docChanges",e,["includeMetadataChanges"]),e&&E("QuerySnapshot.docChanges","boolean","includeMetadataChanges",e.includeMetadataChanges);var t=e&&e.includeMetadataChanges;if(t&&this._snapshot.excludesMetadataChanges)throw new gt(ht.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===t||(this._cachedChanges=$e(this._firestore,t,this._snapshot),this._cachedChangesIncludeMetadataChanges=t),this._cachedChanges},e.prototype.isEqual=function(t){if(!(t instanceof e))throw F("isEqual","QuerySnapshot",1,t);return this._firestore===t._firestore&&this._originalQuery.isEqual(t._originalQuery)&&this._snapshot.isEqual(t._snapshot)},e.prototype.convertToDocumentImpl=function(e){return new ha(this._firestore,e.key,e,this.metadata.fromCache)},e}(),ya=["length","forEach","map"].concat("undefined"==typeof Symbol?[]:[Symbol.iterator]);ya.forEach(function(e){try{Object.defineProperty(fa.prototype.docChanges,e,{get:function(){return Ge()}})}catch(e){}});var ba=function(e){function t(t,n){var o=e.call(this,on.atPath(t),n)||this;if(1!=t.length%2)throw new gt(ht.INVALID_ARGUMENT,"Invalid collection reference. Collection references must have an odd number of segments, but "+(t.canonicalString()+" has "+t.length));return o}return lt.__extends(t,e),Object.defineProperty(t.prototype,"id",{get:function(){return this._query.path.lastSegment()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){var e=this._query.path.popLast();return e.isEmpty()?null:new pa(new Nt(e),this.firestore)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return this._query.path.canonicalString()},enumerable:!0,configurable:!0}),t.prototype.doc=function(e){if(k("CollectionReference.doc",arguments,0,1),0===arguments.length&&(e=ft.newId()),C("CollectionReference.doc","string",1,e),""===e)throw new gt(ht.INVALID_ARGUMENT,"Document path must be a non-empty string");var t=Et.fromString(e);return pa.forPath(this._query.path.child(t),this.firestore)},t.prototype.add=function(e){x("CollectionReference.add",arguments,1),C("CollectionReference.add","object",1,e);var t=this.doc();return t.set(e).then(function(){return t})},t}(ga),xa=u(la,"Use firebase.firestore() instead."),va=u(da,"Use firebase.firestore().runTransaction() instead."),ka=u(ca,"Use firebase.firestore().batch() instead."),Sa=u(pa,"Use firebase.firestore().doc() instead."),Ca=u(ma),wa=u(ha),Ta=u(ga),Ea=u(fa),Aa=u(ba,"Use firebase.firestore().collection() instead."),Ia={Firestore:xa,GeoPoint:xt,Timestamp:vt,Blob:bt,Transaction:va,WriteBatch:ka,DocumentReference:Sa,DocumentSnapshot:Ca,Query:Ta,QueryDocumentSnapshot:wa,QuerySnapshot:Ea,CollectionReference:Aa,FieldPath:co,FieldValue:$r,setLogLevel:la.setLogLevel};et(it),t.registerFirestore=et},"ew/s":function(e,t,n){"use strict";(function(e){e(n("tQq4"),n("4e7A"))})(function(e){function t(e,t,n,o,r){e.openDialog?e.openDialog(t,r,{value:o,selectValueOnOpen:!0}):r(prompt(n,o))}function n(e,t){var n=+t;return /^[-+]/.test(t)?e.getCursor().line+n:n-1}e.commands.jumpToLine=function(e){var o=e.getCursor();t(e,"Jump to line: (Use line:column or scroll% syntax)","Jump to line:",o.line+1+":"+o.ch,function(t){if(t){var r;if(r=/^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(t))e.setCursor(n(e,r[1]),+r[2]);else if(r=/^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(t)){var i=Math.round(e.lineCount()*+r[1]/100);/^[-+]/.test(r[1])&&(i=o.line+i+1),e.setCursor(i-1,o.ch)}else(r=/^\s*\:?\s*([\+\-]?\d+)\s*/.exec(t))&&e.setCursor(n(e,r[1]),o.ch)}})},e.keyMap["default"]["Alt-G"]="jumpToLine"})},gPKv:function(e,t,n){"use strict";(function(e){e(n("tQq4"))})(function(e){function t(e){for(var t=0;tr)return v(o)?e.stylize(RegExp.prototype.toString.call(o),"regexp"):e.stylize("[Object]","special");e.seen.push(o);var n;return n=T?p(e,o,r,y,f):f.map(function(t){return u(e,o,r,y,t,T)}),e.seen.pop(),m(n,k,E)}function d(e,t){if(x(t))return e.stylize("undefined","undefined");if(b(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,"\"")+"'";return e.stylize(n,"string")}return f(t)?e.stylize(""+t,"number"):g(t)?e.stylize(""+t,"boolean"):y(t)?e.stylize("null","null"):void 0}function c(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,n,o,r){for(var s=[],d=0,i=t.length;de.seen.indexOf(c.value)?(d=y(n)?l(e,c.value,null):l(e,c.value,n-1),-1e?"0"+e.toString(10):e.toString(10)}function A(){var e=new Date,t=[E(e.getHours()),E(e.getMinutes()),E(e.getSeconds())].join(":");return[e.getDate(),M[e.getMonth()],t].join(" ")}function I(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var N=/%[sdj%]/g;t.format=function(e){if(!b(e)){for(var t=[],n=0;n=i)return e;switch(e){case"%s":return r[n++]+"";case"%d":return+r[n++];case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e;}}),l=r[n];n*\/]/.test(n)?o(null,"select-op"):"."==n&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?o("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?o(null,n):("u"==n||"U"==n)&&e.match(/rl(-prefix)?\(/i)||("d"==n||"D"==n)&&e.match("omain(",!0,!0)||("r"==n||"R"==n)&&e.match("egexp(",!0,!0)?(e.backUp(1),t.tokenize=s,o("property","word")):/[\w\\\-]/.test(n)?(e.eatWhile(/[\w\\\-]/),o("property","word")):o(null,null)}function i(e){return function(t,n){for(var r=!1,i;null!=(i=t.next());){if(i==e&&!r){")"==e&&t.backUp(1);break}r=!r&&"\\"==i}return i!=e&&(r||")"==e)||(n.tokenize=null),o("string","string")}}function s(e,t){return e.next(),t.tokenize=e.match(/\s*[\"\')]/,!1)?null:i(")"),o(null,"(")}function l(e,t,n){this.type=e,this.indent=t,this.prev=n}function d(e,t,n,o){return e.context=new l(n,t.indentation()+(!1===o?0:g),e.context),n}function c(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function p(e,t,n){return L[n.context.type](e,t,n)}function u(e,t,o,r){for(var n=r||1;0=l&&(l=c,s=i)}return l>=r?s:null}function b(e,t){var n=e&&"object"==typeof e?e[t]:e,o=(n||"").match(/^[\w-@]+/);return o?o[0]:n}function x(e,t){for(var n=0,o=0;no&&(o=e.index)}),-1!==o&&(t.index=o+1),n}t.__esModule=!0;var l=Object.assign||function(e){for(var t=1,n;t"),W=function(e){var t=e.pos;if(g(e,q,j,!0)){var n=A(e,t);return n.type="comment",n}return null},z=f(""),K=function(e){var t=e.pos;if(g(e,z,H,!0)){var n=A(e,t);return n.type="cdata",n}return null},G={xml:!1,special:["script","style"],empty:["img","meta","link","br","base","hr","area","wbr","col","embed","input","param","source","track"]};t.defaultOptions=G,t.match=y,t.default=function(e,t){t=k({},G,t);for(var n="string"==typeof e?new w.default(e):e,o=new E(n,"root"),r=new Set(t.empty),s=t.special.reduce(function(e,t){return e.set(t,f(""))},new Map),l=function(e,n){return e.selfClosing||!t.xml&&r.has(n)},d=void 0,c=void 0,p=void 0,u=[o];!n.eof();)if(!(d=y(n)))n.next();else if(p=x(d),"open"===d.type)c=new E(n,"tag",d),v(u).addChild(c),s.has(p)?c.close=b(n,s.get(p)):!l(d,p)&&u.push(c);else if("close"===d.type){for(var m=u.length-1;0=this.size-(this.bMin+I+this.bGutterSize)&&(e=this.size-(this.bMin+this.bGutterSize)),g.call(this,e),u.onDrag&&u.onDrag())}function y(){var e=t.getComputedStyle(this.parent),n=this.parent[R]-parseFloat(e[B]||0)-parseFloat(e[U]||0);this.size=this.a[r]()[D]+this.b[r]()[D]+this.aGutterSize+this.bGutterSize,this.percentage=Math.min(100*(this.size/n),100),this.start=this.a[r]()[F]}function x(){var e=this,n=e.a,r=e.b;e.dragging&&u.onDragEnd&&u.onDragEnd(),e.dragging=!1,t[o]("mouseup",e.stop),t[o]("touchend",e.stop),t[o]("touchcancel",e.stop),e.parent[o]("mousemove",e.move),e.parent[o]("touchmove",e.move),delete e.stop,delete e.move,n[o]("selectstart",i),n[o]("dragstart",i),r[o]("selectstart",i),r[o]("dragstart",i),n.style.userSelect="",n.style.webkitUserSelect="",n.style.MozUserSelect="",n.style.pointerEvents="",r.style.userSelect="",r.style.webkitUserSelect="",r.style.MozUserSelect="",r.style.pointerEvents="",e.gutter.style.cursor="",e.parent.style.cursor=""}function b(o){var e=this,r=e.a,s=e.b;!e.dragging&&u.onDragStart&&u.onDragStart(),o.preventDefault(),e.dragging=!0,e.move=f.bind(e),e.stop=x.bind(e),t[n]("mouseup",e.stop),t[n]("touchend",e.stop),t[n]("touchcancel",e.stop),e.parent[n]("mousemove",e.move),e.parent[n]("touchmove",e.move),r[n]("selectstart",i),r[n]("dragstart",i),s[n]("selectstart",i),s[n]("dragstart",i),r.style.userSelect="none",r.style.webkitUserSelect="none",r.style.MozUserSelect="none",r.style.pointerEvents="none",s.style.userSelect="none",s.style.webkitUserSelect="none",s.style.MozUserSelect="none",s.style.pointerEvents="none",e.gutter.style.cursor=L,e.parent.style.cursor=L,y.call(e)}function v(e){e.forEach(function(t,n){if(0e;e++)n.execCommand("goCharRight");else if("surround"==x){for(var t=n.getSelections(),e=0;e"))return r("=>","operator");if("0"==n&&e.match(/^(?:x[\da-f]+|o[0-7]+|b[01]+)n?/i))return r("number","number");if(/\d/.test(n))return e.match(/^\d*(?:n|(?:\.\d*)?(?:[eE][+\-]?\d+)?)?/),r("number","number");if("/"==n)return e.eat("*")?(t.tokenize=l,l(e,t)):e.eat("/")?(e.skipToEnd(),r("comment","comment")):Be(e,t,1)?(o(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),r("regexp","string-2")):(e.eat("="),r("operator","operator",e.current()));if("`"==n)return t.tokenize=d,d(e,t);if("#"==n)return e.skipToEnd(),r("error","error");if(Ke.test(n))return">"==n&&t.lexical&&">"==t.lexical.type||(e.eat("=")?("!"==n||"="==n)&&e.eat("="):/[<>*+\-]/.test(n)&&(e.eat(n),">"==n&&e.eat(n))),r("operator","operator",e.current());if(ze.test(n)){e.eatWhile(ze);var s=e.current();if("."!=t.lastType){if(He.propertyIsEnumerable(s)){var c=He[s];return r(c.type,c.style,s)}if("async"==s&&e.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,!1))return r("async","keyword",s)}return r("variable","variable",s)}}function i(e){return function(t,n){var o=!1,i;if(qe&&"@"==t.peek()&&t.match(Ge))return n.tokenize=s,r("jsonld-keyword","meta");for(;null!=(i=t.next())&&(i!=e||o);)o=!o&&"\\"==i;return o||(n.tokenize=s),r("string","string")}}function l(e,t){for(var n=!1,o;o=e.next();){if("/"==o&&n){t.tokenize=s;break}n="*"==o}return r("comment","comment")}function d(e,t){for(var n=!1,o;null!=(o=e.next());){if(!n&&("`"==o||"$"==o&&e.eat("{"))){t.tokenize=s;break}n=!n&&"\\"==o}return r("quasi","string-2",e.current())}function c(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(0>n)){if(We){var o=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,n));o&&(n=o.index)}for(var r=0,i=!1,s=n-1;0<=s;--s){var l=e.string.charAt(s),d=Xe.indexOf(l);if(0<=d&&3>d){if(!r){++s;break}if(0==--r){"("==l&&(i=!0);break}}else if(3<=d&&6>d)++r;else if(ze.test(l))i=!0;else{if(/["'\/]/.test(l))return;if(i&&!r){++s;break}}}i&&!r&&(t.fatArrowAt=s)}}function p(e,t,n,o,r,i){this.indented=e,this.column=t,this.type=n,this.prev=r,this.info=i,null!=o&&(this.align=o)}function u(e,t){for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var o=e.context;o;o=o.prev)for(var n=o.vars;n;n=n.next)if(n.name==t)return!0}function m(e,t,n,o,r){var i=e.cc;for(Je.state=e,Je.stream=r,Je.marked=null,Je.cc=i,Je.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){var s=i.length?i.pop():je?L:I;if(s(n,o)){for(;i.length&&i[i.length-1].lex;)i.pop()();return Je.marked?Je.marked:"variable"==n&&u(e,o)?"variable-2":t}}}function h(){for(var e=arguments.length-1;0<=e;e--)Je.cc.push(arguments[e])}function g(){return h.apply(null,arguments),!0}function f(e,t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}function y(e){var t=Je.state;if(Je.marked="def",t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var o=b(e,t.context);if(null!=o)return void(t.context=o)}else if(!f(e,t.localVars))return void(t.localVars=new k(e,t.localVars));n.globalVars&&!f(e,t.globalVars)&&(t.globalVars=new k(e,t.globalVars))}function b(e,t){if(!t)return null;if(t.block){var n=b(e,t.prev);return n?n==t.prev?t:new v(n,t.vars,!0):null}return f(e,t.vars)?t:new v(t.prev,new k(e,t.vars),!1)}function x(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function v(e,t,n){this.prev=e,this.vars=t,this.block=n}function k(e,t){this.name=e,this.next=t}function S(){Je.state.context=new v(Je.state.context,Je.state.localVars,!1),Je.state.localVars=$e}function C(){Je.state.context=new v(Je.state.context,Je.state.localVars,!0),Je.state.localVars=null}function w(){Je.state.localVars=Je.state.context.vars,Je.state.context=Je.state.context.prev}function T(e,t){var n=function(){var n=Je.state,o=n.indented;if("stat"==n.lexical.type)o=n.lexical.indented;else for(var r=n.lexical;r&&")"==r.type&&r.align;r=r.prev)o=r.indented;n.lexical=new p(o,Je.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function E(){var e=Je.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function A(e){function t(n){return n==e?g():";"==e?h():g(t)}return t}function I(e,t){return"var"==e?g(T("vardef",t),de,A(";"),E):"keyword a"==e?g(T("form"),M,I,E):"keyword b"==e?g(T("form"),I,E):"keyword d"==e?Je.stream.match(/^\s*$/,!1)?g():g(T("stat"),D,A(";"),E):"debugger"==e?g(A(";")):"{"==e?g(T("}"),C,$,E,w):";"==e?g():"if"==e?("else"==Je.state.lexical.info&&Je.state.cc[Je.state.cc.length-1]==E&&Je.state.cc.pop()(),g(T("form"),M,I,E,he)):"function"==e?g(ve):"for"==e?g(T("form"),ge,I,E):"class"==e||We&&"interface"==t?(Je.marked="keyword",g(T("form"),Ce,E)):"variable"==e?We&&"declare"==t?(Je.marked="keyword",g(I)):We&&("module"==t||"enum"==t||"type"==t)&&Je.stream.match(/^\s*\w/,!1)?(Je.marked="keyword","enum"==t?g(Re):"type"==t?g(te,A("operator"),te,A(";")):g(T("form"),ce,A("{"),T("}"),$,E,E)):We&&"namespace"==t?(Je.marked="keyword",g(T("form"),L,$,E)):We&&"abstract"==t?(Je.marked="keyword",g(I)):g(T("stat"),z):"switch"==e?g(T("form"),M,A("{"),T("}","switch"),C,$,E,E,w):"case"==e?g(L,A(":")):"default"==e?g(A(":")):"catch"==e?g(T("form"),S,N,I,E,w):"export"==e?g(T("stat"),Ae,E):"import"==e?g(T("stat"),Ne,E):"async"==e?g(I):"@"==t?g(L,I):h(T("stat"),L,A(";"),E)}function N(e){if("("==e)return g(ke,A(")"))}function L(e,t){return O(e,t,!1)}function _(e,t){return O(e,t,!0)}function M(e){return"("==e?g(T(")"),L,A(")"),E):h()}function O(e,t,n){if(Je.state.fatArrowAt==Je.stream.start){var o=n?V:U;if("("==e)return g(S,T(")"),Q(ke,")"),E,A("=>"),o,w);if("variable"==e)return h(S,ce,A("=>"),o,w)}var r=n?P:R;return Qe.hasOwnProperty(e)?g(r):"function"==e?g(ve,r):"class"==e||We&&"interface"==t?(Je.marked="keyword",g(T("form"),Se,E)):"keyword c"==e||"async"==e?g(n?_:L):"("==e?g(T(")"),D,A(")"),E,r):"operator"==e||"spread"==e?g(n?_:L):"["==e?g(T("]"),De,E,r):"{"==e?J(K,"}",null,r):"quasi"==e?h(F,r):"new"==e?g(q(n)):"import"==e?g(L):g()}function D(e){return e.match(/[;\}\)\],]/)?h():h(L)}function R(e,t){return","==e?g(L):P(e,t,!1)}function P(e,t,n){var o=!1==n?R:P,r=!1==n?L:_;return"=>"==e?g(S,n?V:U,w):"operator"==e?/\+\+|--/.test(t)||We&&"!"==t?g(o):We&&"<"==t&&Je.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?g(T(">"),Q(te,">"),E,o):"?"==t?g(L,A(":"),r):g(r):"quasi"==e?h(F,o):";"==e?void 0:"("==e?J(_,")","call",o):"."==e?g(H,o):"["==e?g(T("]"),D,A("]"),E,o):We&&"as"==t?(Je.marked="keyword",g(te,o)):"regexp"==e?(Je.state.lastType=Je.marked="operator",Je.stream.backUp(Je.stream.pos-Je.stream.start-1),g(r)):void 0}function F(e,t){return"quasi"==e?"${"==t.slice(t.length-2)?g(L,B):g(F):h()}function B(e){if("}"==e)return Je.marked="string-2",Je.state.tokenize=d,g(F)}function U(e){return c(Je.stream,Je.state),h("{"==e?I:L)}function V(e){return c(Je.stream,Je.state),h("{"==e?I:_)}function q(e){return function(t){return"."==t?g(e?W:j):"variable"==t&&We?g(ie,e?P:R):h(e?_:L)}}function j(e,t){if("target"==t)return Je.marked="keyword",g(R)}function W(e,t){if("target"==t)return Je.marked="keyword",g(P)}function z(e){return":"==e?g(E,I):h(R,A(";"),E)}function H(e){if("variable"==e)return Je.marked="property",g()}function K(e,t){if("async"==e)return Je.marked="property",g(K);if("variable"==e||"keyword"==Je.style){if(Je.marked="property","get"==t||"set"==t)return g(G);var n;return We&&Je.state.fatArrowAt==Je.stream.start&&(n=Je.stream.match(/^\s*:\s*/,!1))&&(Je.state.fatArrowAt=Je.stream.pos+n[0].length),g(X)}return"number"==e||"string"==e?(Je.marked=qe?"property":Je.style+" property",g(X)):"jsonld-keyword"==e?g(X):We&&x(t)?(Je.marked="keyword",g(K)):"["==e?g(L,Y,A("]"),X):"spread"==e?g(_,X):"*"==t?(Je.marked="keyword",g(K)):":"==e?h(X):void 0}function G(e){return"variable"==e?(Je.marked="property",g(ve)):h(X)}function X(e){return":"==e?g(_):"("==e?h(ve):void 0}function Q(e,t,n){function o(r,i){if(n?-1"),te):void 0}function ne(e){if("=>"==e)return g(te)}function oe(e,t){return"variable"==e||"keyword"==Je.style?(Je.marked="property",g(oe)):"?"==t?g(oe):":"==e?g(te):"["==e?g(L,Y,A("]"),oe):void 0}function re(e,t){return"variable"==e&&Je.stream.match(/^\s*[?:]/,!1)||"?"==t?g(re):":"==e?g(te):h(te)}function ae(e,t){return"<"==t?g(T(">"),Q(te,">"),E,ae):"|"==t||"."==e||"&"==t?g(te):"["==e?g(A("]"),ae):"extends"==t||"implements"==t?(Je.marked="keyword",g(te)):void 0}function ie(e,t){if("<"==t)return g(T(">"),Q(te,">"),E,ae)}function se(){return h(te,le)}function le(e,t){if("="==t)return g(te)}function de(e,t){return"enum"==t?(Je.marked="keyword",g(Re)):h(ce,Y,ue,me)}function ce(e,t){return We&&x(t)?(Je.marked="keyword",g(ce)):"variable"==e?(y(t),g()):"spread"==e?g(ce):"["==e?J(ce,"]"):"{"==e?J(pe,"}"):void 0}function pe(e,t){return"variable"!=e||Je.stream.match(/^\s*:/,!1)?("variable"==e&&(Je.marked="property"),"spread"==e?g(ce):"}"==e?h():g(A(":"),ce,ue)):(y(t),g(ue))}function ue(e,t){if("="==t)return g(_)}function me(e){if(","==e)return g(de)}function he(e,t){if("keyword b"==e&&"else"==t)return g(T("form","else"),I,E)}function ge(e,t){return"await"==t?g(ge):"("==e?g(T(")"),fe,A(")"),E):void 0}function fe(e){return"var"==e?g(de,A(";"),be):";"==e?g(be):"variable"==e?g(ye):h(L,A(";"),be)}function ye(e,t){return"in"==t||"of"==t?(Je.marked="keyword",g(L)):g(R,be)}function be(e,t){return";"==e?g(xe):"in"==t||"of"==t?(Je.marked="keyword",g(L)):h(L,A(";"),xe)}function xe(e){")"!=e&&g(L)}function ve(e,t){return"*"==t?(Je.marked="keyword",g(ve)):"variable"==e?(y(t),g(ve)):"("==e?g(S,T(")"),Q(ke,")"),E,Z,I,w):We&&"<"==t?g(T(">"),Q(se,">"),E,ve):void 0}function ke(e,t){return"@"==t&&g(L,ke),"spread"==e?g(ke):We&&x(t)?(Je.marked="keyword",g(ke)):h(ce,Y,ue)}function Se(e,t){return"variable"==e?Ce(e,t):we(e,t)}function Ce(e,t){if("variable"==e)return y(t),g(we)}function we(e,t){return"<"==t?g(T(">"),Q(se,">"),E,we):"extends"==t||"implements"==t||We&&","==e?("implements"==t&&(Je.marked="keyword"),g(We?te:L,we)):"{"==e?g(T("}"),Te,E):void 0}function Te(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||We&&x(t))&&Je.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(Je.marked="keyword",g(Te)):"variable"==e||"keyword"==Je.style?(Je.marked="property",g(We?Ee:ve,Te)):"["==e?g(L,Y,A("]"),We?Ee:ve,Te):"*"==t?(Je.marked="keyword",g(Te)):";"==e?g(Te):"}"==e?g():"@"==t?g(L,Te):void 0}function Ee(e,t){return"?"==t?g(Ee):":"==e?g(te,ue):"="==t?g(_):h(ve)}function Ae(e,t){return"*"==t?(Je.marked="keyword",g(Oe,A(";"))):"default"==t?(Je.marked="keyword",g(L,A(";"))):"{"==e?g(Q(Ie,"}"),Oe,A(";")):h(I)}function Ie(e,t){return"as"==t?(Je.marked="keyword",g(A("variable"))):"variable"==e?h(_,Ie):void 0}function Ne(e){return"string"==e?g():"("==e?h(L):h(Le,_e,Oe)}function Le(e,t){return"{"==e?J(Le,"}"):("variable"==e&&y(t),"*"==t&&(Je.marked="keyword"),g(Me))}function _e(e){if(","==e)return g(Le,_e)}function Me(e,t){if("as"==t)return Je.marked="keyword",g(Le)}function Oe(e,t){if("from"==t)return Je.marked="keyword",g(L)}function De(e){return"]"==e?g():h(Q(_,"]"))}function Re(){return h(T("form"),ce,A("{"),T("}"),Q(Pe,"}"),E,E)}function Pe(){return h(ce,ue)}function Fe(e,t){return"operator"==e.lastType||","==e.lastType||Ke.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function Be(e,t,n){return t.tokenize==s&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(n||0)))}var Ue=t.indentUnit,Ve=n.statementIndent,qe=n.jsonld,je=n.json||qe,We=n.typescript,ze=n.wordCharacters||/[\w$\xa1-\uffff]/,He=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),n=e("keyword b"),o=e("keyword c"),r=e("keyword d"),i=e("operator"),s={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:n,do:n,try:n,finally:n,return:r,break:r,continue:r,new:e("new"),delete:o,void:o,throw:o,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:i,typeof:i,instanceof:i,true:s,false:s,null:s,undefined:s,NaN:s,Infinity:s,this:e("this"),class:e("class"),super:e("atom"),yield:o,export:e("export"),import:e("import"),extends:o,await:o}}(),Ke=/[+\-*&%=<>!?|~^@]/,Ge=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Xe="([{}])",Qe={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},Je={state:null,column:null,marked:null,cc:null},$e=new k("this",new k("arguments",null)),Ye,Ze;return w.lex=!0,E.lex=!0,{startState:function(e){var t={tokenize:s,lastType:"sof",cc:[],lexical:new p((e||0)-Ue,0,"block",!1),localVars:n.localVars,context:n.localVars&&new v(null,null,!1),indented:e||0};return n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(!t.lexical.hasOwnProperty("align")&&(t.lexical.align=!1),t.indented=e.indentation(),c(e,t)),t.tokenize!=l&&e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==Ye?n:(t.lastType="operator"==Ye&&("++"==Ze||"--"==Ze)?"incdec":Ye,m(t,n,Ye,Ze,e))},indent:function(t,o){if(t.tokenize==l)return e.Pass;if(t.tokenize!=s)return 0;var r=o&&o.charAt(0),d=t.lexical,p;if(!/^\s*else\b/.test(o))for(var u=t.cc.length-1,i;0<=u;--u)if(i=t.cc[u],i==E)d=d.prev;else if(i!=he)break;for(;("stat"==d.type||"form"==d.type)&&("}"==r||(p=t.cc[t.cc.length-1])&&(p==R||p==P)&&!/^[,\.=+\-*:?[\(]/.test(o));)d=d.prev;Ve&&")"==d.type&&"stat"==d.prev.type&&(d=d.prev);var c=d.type,m=r==c;return"vardef"==c?d.indented+("operator"==t.lastType||","==t.lastType?d.info.length+1:0):"form"==c&&"{"==r?d.indented:"form"==c?d.indented+Ue:"stat"==c?d.indented+(Fe(t,o)?Ve||Ue:0):"switch"!=d.info||m||!1==n.doubleIndentSwitch?d.align?d.column+(m?0:1):d.indented+(m?0:Ue):d.indented+(/^(?:case|default)\b/.test(o)?Ue:2*Ue)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:je?null:"/*",blockCommentEnd:je?null:"*/",blockCommentContinue:je?null:" * ",lineComment:je?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:je?"json":"javascript",jsonldMode:qe,jsonMode:je,expressionAllowed:Be,skipExpression:function(e){var t=e.cc[e.cc.length-1];(t==L||t==_)&&e.cc.pop()}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})})},rbVD:function(e,t,n){"use strict";var o=Math.max;(function(e){e(n("tQq4"))})(function(e){function t(e,t){this.cm=e,this.options=t,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length;var n=this;e.on("cursorActivity",this.activityFunc=function(){n.cursorActivity()})}function n(e,t,n){var o=e.options.hintOptions,r={};for(var i in g)r[i]=g[i];if(o)for(var i in o)void 0!==o[i]&&(r[i]=o[i]);if(n)for(var i in n)void 0!==n[i]&&(r[i]=n[i]);return r.hint.resolve&&(r.hint=r.hint.resolve(e,t)),r}function r(e){return"string"==typeof e?e:e.text}function s(e,t){function n(e,n){var r;r="string"==typeof n?o.hasOwnProperty(n)?o[n]:n:function(e){return n(e,t)},i[e]=r}var o={Up:function(){t.moveFocus(-1)},Down:function(){t.moveFocus(1)},PageUp:function(){t.moveFocus(-t.menuSize()+1,!0)},PageDown:function(){t.moveFocus(t.menuSize()-1,!0)},Home:function(){t.setFocus(0)},End:function(){t.setFocus(t.length-1)},Enter:t.pick,Tab:t.pick,Esc:t.close},r=e.options.customKeys,i=r?{}:o;if(r)for(var s in r)r.hasOwnProperty(s)&&n(s,r[s]);var l=e.options.extraKeys;if(l)for(var s in l)l.hasOwnProperty(s)&&n(s,l[s]);return i}function i(e,t){for(;t&&t!=e;){if("LI"===t.nodeName.toUpperCase()&&t.parentNode==e)return t;t=t.parentNode}}function l(n,t){this.completion=n,this.data=t,this.picked=!1;var l=this,d=n.cm,c=this.hints=document.createElement("ul");c.className="CodeMirror-hints",this.selectedHint=t.selectedHint||0;for(var m=t.list,h=0;hc.clientHeight+1,A=d.getScrollInfo();if(0C){c.style.height=C-5+"px",c.style.top=(v=b.bottom-w.top)+"px";var L=d.getCursor();t.from.ch!=L.ch&&(b=d.cursorCoords(L),c.style.left=(x=b.left)+"px",w=c.getBoundingClientRect())}}var _=w.right-S;if(0<_&&(w.right-w.left>S&&(c.style.width=S-5+"px",_-=w.right-w.left-S),c.style.left=(x=b.left-_)+"px"),E)for(var M=c.firstChild;M;M=M.nextSibling)M.style.paddingRight=d.display.nativeBarWidth+"px";if(d.addKeyMap(this.keyMap=s(n,{moveFocus:function(e,t){l.changeActive(l.selectedHint+e,t)},setFocus:function(e){l.changeActive(e)},menuSize:function(){return l.screenAmount()},length:m.length,close:function(){n.close()},pick:function(){l.pick()},data:t})),n.options.closeOnUnfocus){var O;d.on("blur",this.onBlur=function(){O=setTimeout(function(){n.close()},100)}),d.on("focus",this.onFocus=function(){clearTimeout(O)})}return d.on("scroll",this.onScroll=function(){var e=d.getScrollInfo(),t=d.getWrapperElement().getBoundingClientRect(),o=v+A.top-e.top,r=o-(window.pageYOffset||(document.documentElement||document.body).scrollTop);return k||(r+=c.offsetHeight),r<=t.top||r>=t.bottom?n.close():void(c.style.top=o+"px",c.style.left=x+A.left-e.left+"px")}),e.on(c,"dblclick",function(n){var e=i(c,n.target||n.srcElement);e&&null!=e.hintId&&(l.changeActive(e.hintId),l.pick())}),e.on(c,"click",function(o){var e=i(c,o.target||o.srcElement);e&&null!=e.hintId&&(l.changeActive(e.hintId),n.options.completeOnSingleClick&&l.pick())}),e.on(c,"mousedown",function(){setTimeout(function(){d.focus()},20)}),e.signal(t,"select",m[this.selectedHint],c.childNodes[this.selectedHint]),!0}function d(e,t){if(!e.somethingSelected())return t;for(var n=[],o=0;o=this.data.list.length?t=n?this.data.list.length-1:0:0>t&&(t=n?0:this.data.list.length-1),this.selectedHint!=t){var o=this.hints.childNodes[this.selectedHint];o&&(o.className=o.className.replace(" "+u,"")),o=this.hints.childNodes[this.selectedHint=t],o.className+=" "+u,o.offsetTopthis.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=o.offsetTop+o.offsetHeight-this.hints.clientHeight+3),e.signal(this.data,"select",this.data.list[this.selectedHint],o)}},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}},e.registerHelper("hint","auto",{resolve:function(t,n){var o=t.getHelpers(n,"hint"),r;if(o.length){var i=function(e,t,n){function r(o){return o==s.length?t(null):void c(s[o],e,n,function(e){e&&0,]/,closeOnUnfocus:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null};e.defineOption("hintOptions",null)})},rc1b:function(e,t){"use strict";function n(e){return e===l||e===d}function o(e){return 47e}function r(e,t,n){return t=t||65,n=n||90,e&=-33,e>=t&&e<=n}function i(e){return 32===e||9===e||160===e}t.__esModule=!0;var s=Object.assign||function(e){for(var t=1,n;t=l&&(n=r(i.indicatorOpen))}e.setGutterMarker(t,i.gutter,n),++s})}function s(e){var t=e.getViewport(),n=e.state.foldGutter;n&&(e.operation(function(){i(e,t.from,t.to)}),n.from=t.from,n.to=t.to)}function l(e,t,n){var r=e.state.foldGutter;if(r){var i=r.options;if(n==i.gutter){var s=o(e,t);s?s.clear():e.foldCode(u(t,0),i.rangeFinder)}}}function d(e){var t=e.state.foldGutter;if(t){var n=t.options;t.from=t.to=0,clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){s(e)},n.foldOnChangeTimeSpan||600)}}function c(e){var t=e.state.foldGutter;if(t){var n=t.options;clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){var n=e.getViewport();t.from==t.to||20t.to&&(i(e,t.to,n.to),t.to=n.to)})},n.updateViewportTimeSpan||400)}}function p(e,t){var n=e.state.foldGutter;if(n){var o=t.line;o>=n.from&&on||n>=t)return i+(t-l);i+=n-l,i+=o-i%o,l=n+1}}function x(e,t){for(var n=0;n=t)return o+s(l,t-r);if(r+=i-o,r+=n-r%n,o=i+1,r>=t)return o}}function S(e){for(;es.length<=e;)es.push(C(es)+" ");return es[e]}function C(e){return e[e.length-1]}function w(e,t){for(var n=[],o=0;on?0o?-1:1;;){if(n==o)return n;var s=(n+o)/2,l=0>i?t(s):r(s);if(l==n)return e(l)?n:o;e(l)?o=l:n=l+i}}function D(e,t,n){var o=this;this.input=n,o.scrollbarFiller=p("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=p("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=u("div",null,"CodeMirror-code"),o.selectionDiv=p("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=p("div",null,"CodeMirror-cursors"),o.measure=p("div",null,"CodeMirror-measure"),o.lineMeasure=p("div",null,"CodeMirror-measure"),o.lineSpace=u("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var r=u("div",[o.lineSpace],"CodeMirror-lines");o.mover=p("div",[r],null,"position: relative"),o.sizer=p("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=p("div",null,null,"position: absolute; height: "+Qi+"px; width: 1px;"),o.gutters=p("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=p("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=p("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),Ai&&8>Ii&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),Ni||Ci&&Bi||(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,n.init(o)}function R(e,t){if(t-=e.first,0>t||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var o=0;;++o){var r=n.children[o],i=r.chunkSize();if(t=e.first&&tz(e,t)?t:e}function X(e,t){return 0>z(e,t)?e:t}function Q(e,t){return l(e.first,s(t,e.first+e.size-1))}function J(e,t){if(t.linen?W(n,R(e,n).text.length):$(t,R(e,t.line).text.length)}function $(e,t){var n=e.ch;return null==n||n>t?W(e.line,t):0>n?W(e.line,0):e}function Y(e,t){for(var n=[],o=0;o=t:i.to>t);(o||(o=[])).push(new te(s,i.from,d?null:i.to))}}return o}function se(e,t,n){var o;if(e)for(var r=0;r=t:i.to>t);if(l||i.from==t&&"bookmark"==s.type&&(!n||i.marker.insertLeft)){var d=null==i.from||(s.inclusiveLeft?i.from<=t:i.fromz(c.to,l.from)||0u)&&(i.inclusiveLeft||u)||p.push({from:c.from,to:l.from}),!(0ge(o,r.marker))&&(o=r.marker);return o}function ye(e){return fe(e,!0)}function be(e){return fe(e,!1)}function xe(e,t){var n=rs&&e.markedSpans,o;if(n)for(var r=0,i;rt)&&(!o||0>ge(o,i.marker))&&(o=i.marker);return o}function ve(e,t,n,o,r){var s=R(e,t),l=rs&&s.markedSpans;if(l)for(var d=0,i;d=u||0>=p&&0<=u)&&(0>=p&&(i.marker.inclusiveRight&&r.inclusiveLeft?0<=z(c.to,n):0=z(c.from,o):0>z(c.from,o))))return!0}}function ke(e){for(var t;t=ye(e);)e=t.find(-1,!0).line;return e}function Se(e){for(var t;t=be(e);)e=t.find(1,!0).line;return e}function Ce(e){for(var t,n;t=be(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function we(e,t){var n=R(e,t),o=ke(n);return n==o?t:U(o)}function Te(e,t){if(t>e.lastLine())return t;var n=R(e,t),o;if(!Ee(e,n))return t;for(;o=be(n);)n=o.find(1,!0).line;return U(n)+1}function Ee(e,t){var n=rs&&t.markedSpans;if(n)for(var o=void 0,r=0;rt.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}function _e(e,t,n,o){if(!e)return o(t,n,"ltr",0);for(var r=!1,d=0,i;dt||t==n&&i.to==t)&&(o(l(i.from,t),s(i.to,n),1==i.level?"rtl":"ltr",d),r=!0);r||o(t,n,"ltr")}function Me(e,t,n){var o;as=null;for(var r=0,i;rt)return r;i.to==t&&(i.from!=i.to&&"before"==n?o=r:as=r),i.from==t&&(i.from!=i.to&&"before"!=n?o=r:as=r)}return null==o?as:o}function Oe(e,t){var n=e.order;return null==n&&(n=e.order=is(e.text,t)),n}function De(e,t){return e._handlers&&e._handlers[t]||ss}function Re(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var o=e._handlers,r=o&&o[t];if(r){var i=x(r,n);-1=t.offsetWidth&&2Ii))}var n=ys?p("span","\u200B"):p("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Xe(e){if(null!=bs)return bs;var t=c(e,document.createTextNode("A\u062EA")),n=Ki(t,0,1).getBoundingClientRect(),o=Ki(t,1,2).getBoundingClientRect();return d(e),n&&n.left!=n.right&&(bs=3>o.right-n.right)}function Qe(e){if(null!=us)return us;var t=c(e,p("span","x")),o=t.getBoundingClientRect(),r=Ki(t,0,1).getBoundingClientRect();return us=1e&&l.splice(p,1,e,l[p+1],r),p+=2,i=s(e,r);if(t)if(o.opaque)l.splice(n,p-n,e,"overlay "+t),p=n+2;else for(;ne.options.maxHighlightLength&&et(e.doc.mode,o.state),i=ot(e,t,o);r&&(o.state=r),t.stateAfter=o.save(!r),t.styles=i.styles,i.classes?t.styleClasses=i.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=l(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function at(e,t,n){var o=e.doc,r=e.display;if(!o.mode.startState)return new vs(o,!0,t);var i=ut(e,t,n),s=i>o.first&&R(o,i-1).stateAfter,l=s?vs.fromSaved(o,s,i):new vs(o,nt(o.mode),i);return o.iter(i,t,function(n){it(e,n.text,l);var o=l.line;n.stateAfter=o==t-1||0==o%5||o>=r.viewFrom&&or;r++){o&&(o[0]=tt(e,n).mode);var i=e.token(t,n);if(t.pos>t.start)return i}throw new Error("Mode "+e.name+" failed to advance stream.")}function dt(e,t,n,o){var r=e.doc,i=r.mode,s;t=J(r,t);var l=R(r,t.line),d=at(e,t.line,n),c=new fs(l.text,e.options.tabSize,d),p;for(o&&(p=[]);(o||c.pose.options.maxHighlightLength?(d=!1,l&&it(e,t,o,u.pos),u.pos=t.length,h=null):h=ct(lt(n,u,o.state,m),i),m){var g=m[0].name;g&&(h="m-"+(h?g+" "+h:g))}if(!d||p!=h){for(;cr;--i){if(i<=o.first)return o.first;var d=R(o,i-1),c=d.stateAfter;if(c&&(!n||i+(c instanceof xs?c.lookAhead:0)<=o.modeFrontier))return i;var p=v(d.text,null,e.options.tabSize);(null==l||s>p)&&(l=i-1,s=p)}return l}function mt(e,t){if(e.modeFrontier=s(e.modeFrontier,t),!(e.highlightFrontiern;o--)if(r=R(e,o).stateAfter,r&&(!(r instanceof xs)||o+r.lookAheadIi&&(c=!0),e.pos+=t.length;else{u=document.createDocumentFragment();for(var h=0;;){d.lastIndex=h;var g=d.exec(t),f=g?g.index-h:t.length-h;if(f){var y=document.createTextNode(l.slice(h,h+f));Ai&&9>Ii?u.appendChild(p("span",[y])):u.appendChild(y),e.map.push(e.pos,e.pos+f,y),e.col+=f,e.pos+=f}if(!g)break;h+=f+1;var b=void 0;if("\t"==g[0]){var x=e.cm.options.tabSize,v=x-e.col%x;b=u.appendChild(p("span",S(v),"cm-tab")),b.setAttribute("role","presentation"),b.setAttribute("cm-text","\t"),e.col+=v}else"\r"==g[0]||"\n"==g[0]?(b=u.appendChild(p("span","\r"==g[0]?"\u240D":"\u2424","cm-invalidchar")),b.setAttribute("cm-text",g[0]),e.col+=1):(b=e.cm.options.specialCharPlaceholder(g[0]),b.setAttribute("cm-text",g[0]),Ai&&9>Ii?u.appendChild(p("span",[b])):u.appendChild(b),e.col+=1);e.map.push(e.pos,e.pos+1,b),e.pos++}}if(e.trailingSpace=32==l.charCodeAt(t.length-1),n||o||r||c||s){var k=n||"";o&&(k+=o),r&&(k+=r);var C=p("span",[u],k,s);return i&&(C.title=i),e.content.appendChild(C)}e.content.appendChild(u)}}function vt(e,t){if(1p&&m.from<=p));h++);if(m.to>=u)return e(n,o,r,s,l,d,c);e(n,o.slice(0,m.to-p),r,s,null,d,c),s=null,o=o.slice(m.to-p),p=m.to}}}function St(e,t,n,o){var r=!o&&n.widgetNode;r&&e.map.push(e.pos,e.pos+t,r),!o&&e.cm.display.input.needsContentAttribute&&(!r&&(r=e.content.appendChild(document.createElement("span"))),r.setAttribute("cm-marker",n.id)),r&&(e.cm.display.input.setUneditable(r),e.content.appendChild(r)),e.pos+=t,e.trailingSpace=!1}function Ct(e,t,n){var o=e.markedSpans,r=e.text,l=0;if(!o){for(var d=1;dp||E.collapsed&&T.to==p&&T.from==p)?(null!=T.to&&T.to!=p&&h>T.to&&(h=T.to,b=""),E.className&&(y+=" "+E.className),E.css&&(f=(f?f+";":"")+E.css),E.startStyle&&T.from==p&&(x+=" "+E.startStyle),E.endStyle&&T.to==h&&(C||(C=[])).push(E.endStyle,T.to),E.title&&!v&&(v=E.title),E.collapsed&&(!k||0>ge(k.marker,E))&&(k=T)):T.from>p&&h>T.from&&(h=T.from)}if(C)for(var m=0;m=c)break;for(var I=s(c,h);;){if(i){var N=p+i.length;if(!k){var L=N>I?i.slice(0,I-p):i;t.addToken(t,L,g?g+y:y,x,p+L.length==h?b:"",v,f)}if(N>=I){i=i.slice(I-p),p=I;break}p=N,x=""}i=r.slice(l,l=n[u++]),g=ft(n[u++],t.cm.options)}}}function wt(e,t,n){this.line=t,this.rest=Ce(t),this.size=this.rest?U(C(this.rest))-n+1:1,this.node=this.text=null,this.hidden=Ee(e,t)}function Tt(e,t,n){for(var o=[],r=t,i,s;rIi&&(e.node.style.zIndex=2)),e.node}function Ot(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 o=Mt(t);t.background=o.insertBefore(p("div",null,n),o.firstChild),e.display.input.setUneditable(t.background)}}function Dt(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):yt(e,t)}function Rt(e,t){var n=t.text.className,o=Dt(e,t);t.text==t.node&&(t.node=o.pre),t.text.parentNode.replaceChild(o.pre,t.text),t.text=o.pre,o.bgClass!=t.bgClass||o.textClass!=t.textClass?(t.bgClass=o.bgClass,t.textClass=o.textClass,Pt(e,t)):n&&(t.text.className=n)}function Pt(e,t){Ot(e,t),t.line.wrapClass?Mt(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 Ft(e,t,n,o){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 r=Mt(t);t.gutterBackground=p("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?o.fixedPos:-o.gutterTotalWidth)+"px; width: "+o.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),r.insertBefore(t.gutterBackground,t.text)}var i=t.line.gutterMarkers;if(e.options.lineNumbers||i){var s=Mt(t),l=t.gutter=p("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?o.fixedPos:-o.gutterTotalWidth)+"px");if(e.display.input.setUneditable(l),s.insertBefore(l,t.text),t.line.gutterClass&&(l.className+=" "+t.line.gutterClass),!e.options.lineNumbers||i&&i["CodeMirror-linenumbers"]||(t.lineNumber=l.appendChild(p("div",j(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+o.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),i)for(var d=0;dn)return{map:e.measure.maps[r],cache:e.measure.caches[r],before:!0}}function Zt(e,t){t=ke(t);var n=U(t),o=e.display.externalMeasured=new wt(e.doc,t,n);o.lineN=n;var r=o.built=yt(e,o);return o.text=r.pre,c(e.display.lineMeasure,r.pre),o}function en(e,t,n,o){return rn(e,nn(e,t),n,o)}function tn(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt)&&(s=c-d,i=s-1,t>=c&&(l="right")),null!=i){if(r=e[o+2],d==c&&n==(r.insertLeft?"left":"right")&&(l=n),"left"==n&&0==i)for(;o&&e[o-2]==e[o-3]&&e[o-1].insertLeft;)r=e[(o-=3)+2],l="left";if("right"==n&&i==c-d)for(;ou;u++){for(;l&&_(t.line.text.charAt(r.coverStart+l));)--l;for(;r.coverStart+dIi&&0==l&&d==r.coverEnd-r.coverStart?s.parentNode.getBoundingClientRect():sn(Ki(s,l,d).getClientRects(),o),p.left||p.right||0==l)break;d=l,--l,c="right"}Ai&&11>Ii&&(p=dn(e.display.measure,p))}else{0Ii&&!l&&(!p||!p.left&&!p.right)){var h=s.parentNode.getClientRects()[0];p=h?{left:h.left,right:h.left+Ln(e.display),top:h.top,bottom:h.bottom}:As}for(var g=p.top-t.rect.top,f=p.bottom-t.rect.top,y=t.view.measure.heights,b=0;b=o.text.length?(c=o.text.length,p="before"):0>=c&&(c=0,p="after"),!d)return s("before"==p?c-1:c,"before"==p);var u=Me(d,c,p),m=as,h=l(c,u,"before"==p);return null!=m&&(h.other=l(c,m,"before"!=p)),h}function vn(e,t){var n=0;t=J(e.doc,t),e.options.lineWrapping||(n=Ln(e.display)*t.ch);var o=R(e.doc,t.line),r=Ie(o)+Ht(e.display);return{left:n,right:n,top:r,bottom:r+o.height}}function kn(e,t,n,o,r){var i=W(e,t,n);return i.xRel=r,o&&(i.outside=!0),i}function Sn(e,t,n){var o=e.doc;if(n+=e.display.viewOffset,0>n)return kn(o.first,0,null,!0,-1);var r=V(o,n),i=o.first+o.size-1;if(r>i)return kn(o.first+o.size-1,R(o,i).text.length,null,!0,1);0>t&&(t=0);for(var s=R(o,r);;){var l=En(e,s,r,t,n),d=xe(s,l.ch+(0o},i,r),{begin:i,end:r}}function wn(e,t,n,o){n||(n=nn(e,t));var r=fn(e,t,rn(e,n,o),"line").top;return Cn(e,t,n,r)}function Tn(e,t,n,o){return!(e.bottom<=n)&&(!!(e.top>n)||(o?e.left:e.right)>t)}function En(e,t,n,o,r){r-=Ie(t);var i=nn(e,t),s=gn(t),l=0,d=t.text.length,c=!0,p=Oe(t,e.doc.direction);if(p){var u=(e.options.lineWrapping?In:An)(e,t,n,i,p,o,r);c=1!=u.level,l=c?u.from:u.to-1,d=c?u.to:u.from-1}var m=null,h=null,g=O(function(t){var n=rn(e,i,t);return(n.top+=s,n.bottom+=s,!!Tn(n,o,r,!1))&&(n.top<=r&&n.left<=o&&(m=t,h=n),!0)},l,d),f=!1,y,b;if(h){var x=o-h.left=k.bottom}return g=M(t.text,g,1),kn(n,g,b,f,o-y)}function An(e,t,n,o,r,s,l){var i=O(function(d){var i=r[d],c=1!=i.level;return Tn(xn(e,W(n,c?i.to:i.from,c?"before":"after"),"line",t,o),s,l,!0)},0,r.length-1),d=r[i];if(0l&&(d=r[i-1])}return d}function In(e,t,n,o,r,d,c){var u=Cn(e,t,o,c),m=u.begin,h=u.end;/\s/.test(t.text.charAt(h-1))&&h--;for(var g=null,f=null,y=0,i;y=h||i.to<=m)){var p=1!=i.level,b=rn(e,o,p?s(h,i.to)-1:l(m,i.from)).right,x=bx)&&(g=i,f=x)}return g||(g=r[r.length-1]),g.fromh&&(g={from:g.from,to:h,level:g.level}),g}function Nn(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Ns){Ns=p("pre");for(var t=0;49>t;++t)Ns.appendChild(document.createTextNode("x")),Ns.appendChild(p("br"));Ns.appendChild(document.createTextNode("x"))}c(e.measure,Ns);var n=Ns.offsetHeight/50;return 3=e.display.viewTo)return null;if(t-=e.display.viewFrom,0>t)return null;for(var n=e.display.view,o=0;ot)return o}function Fn(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Bn(e,t){void 0===t&&(t=!0);for(var n=e.doc,o={},r=o.cursors=document.createDocumentFragment(),s=o.selection=document.createDocumentFragment(),l=0;l=e.display.viewTo||i.to().linet&&(t=0),t=o(t),r=o(r),c.appendChild(p("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==n?h-e:n)+"px;\n height: "+(r-t)+"px"))}function i(t,n,o){function s(n,o){return bn(e,W(t,n),"div",l,o)}function i(t,n,o){var r=wn(e,l,null,t),i="ltr"==n==("after"==o)?"left":"right",d="after"==o?r.begin:r.end-(/\s/.test(l.text.charAt(r.end-1))?2:1);return s(d,i)[i]}var l=R(d,t),c=l.text.length,p=Oe(l,d.direction),u,f;return _e(p,n||0,null==o?c:o,function(e,t,l,d){var y="ltr"==l,b=s(e,y?"left":"right"),x=s(t-1,y?"right":"left"),v=null==n&&0==e,k=null==o&&t==c,S=0==d,C=!p||d==p.length-1;if(3>=x.top-b.top){var w=(g?v:k)&&S,T=(g?k:v)&&C,E=w?m:(y?b:x).left,A=T?h:(y?x:b).right;r(E,b.top,A-E,b.bottom)}else{var I,N,L,_;y?(I=g&&v&&S?m:b.left,N=g?h:i(e,l,"before"),L=g?m:i(t,l,"after"),_=g&&k&&C?h:x.right):(I=g?i(e,l,"before"):m,N=!g&&v&&S?h:b.right,L=!g&&k&&C?m:x.left,_=g?i(t,l,"after"):h),r(I,b.top,N-I,b.bottom),b.bottomVn(b,u))&&(u=b),0>Vn(x,u)&&(u=x),(!f||0>Vn(b,f))&&(f=b),0>Vn(x,f)&&(f=x)}),{start:u,end:f}}var s=e.display,d=e.doc,c=document.createDocumentFragment(),u=Gt(e.display),m=u.left,h=l(s.sizerWidth,Qt(e)-s.sizer.offsetLeft)-u.right,g="ltr"==d.direction,f=t.from(),y=t.to();if(f.line==y.line)i(f.line,f.ch,y.ch);else{var b=R(d,f.line),x=R(d,y.line),v=ke(b)==ke(x),k=i(f.line,f.ch,v?b.text.length+1:null).end,S=i(y.line,v?0:null,y.ch).start;v&&(k.tope.options.cursorBlinkRate&&(t.cursorDiv.style.visibility="hidden")}}function Wn(e){e.state.focused||(e.display.input.focus(),Hn(e))}function zn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Kn(e))},100)}function Hn(t,n){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),"nocursor"==t.options.readOnly||(!t.state.focused&&(Pe(t,"focus",t,n),t.state.focused=!0,g(t.display.wrapper,"CodeMirror-focused"),!t.curOp&&t.display.selForContextMenu!=t.doc.sel&&(t.display.input.reset(),Ni&&setTimeout(function(){return t.display.input.reset(!0)},20)),t.display.input.receivedFocus()),jn(t))}function Kn(t,n){t.state.delayingBlurEvent||(t.state.focused&&(Pe(t,"blur",t,n),t.state.focused=!1,Hi(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout(function(){t.state.focused||(t.display.shift=!1)},150))}function Gn(e){for(var t=e.display,n=t.lineDiv.offsetTop,o=0;oIi){var s=r.node.offsetTop+r.node.offsetHeight;i=s-n,n=s}else{var l=r.node.getBoundingClientRect();i=l.bottom-l.top}var d=r.line.height-i;if(2>i&&(i=Nn(t)),(.005d)&&(B(r.line,i),Xn(r.line),r.rest))for(var c=0;c=c&&(d=V(t,Ie(R(t,u))-e.wrapper.clientHeight),c=u)}return{from:d,to:l(c,d+1)}}function Jn(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var o=Mn(t)-t.scroller.scrollLeft+e.doc.scrollLeft,r=t.gutters.offsetWidth,s=o+"px",l=0;lt.top+o.top?r=!0:t.bottom+o.top>(window.innerHeight||document.documentElement.clientHeight)&&(r=!1),null!=r&&!Ri){var i=p("div","\u200B",null,"position: absolute;\n top: "+(t.top-n.viewOffset-Ht(e.display))+"px;\n height: "+(t.bottom-t.top+Xt(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+l(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(i),i.scrollIntoView(r),e.display.lineSpace.removeChild(i)}}}function Zn(e,t,o,r){null==r&&(r=0);var i;e.options.lineWrapping||t!=o||(t=t.ch?W(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t,o="before"==t.sticky?W(t.line,t.ch+1,"before"):t);for(var d=0;5>d;d++){var c=!1,p=xn(e,t),u=o&&o!=t?xn(e,o):p;i={left:s(p.left,u.left),top:s(p.top,u.top)-r,right:l(p.left,u.left),bottom:l(p.bottom,u.bottom)+r};var m=no(e,i),h=e.doc.scrollTop,g=e.doc.scrollLeft;if(null!=m.scrollTop&&(lo(e,m.scrollTop),1t.top&&(t.top=0);var r=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,i=Jt(e),d={};t.bottom-t.top>i&&(t.bottom=t.top+i);var c=e.doc.height+Kt(n),p=t.topc-o;if(t.topr+i){var m=s(t.top,(u?c:t.bottom)-i);m!=r&&(d.scrollTop=m)}var h=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft,g=Qt(e)-(e.options.fixedGutter?n.gutters.offsetWidth:0),f=t.right-t.left>g;return f&&(t.right=t.left+g),10>t.left?d.scrollLeft=0:t.leftg+h-3&&(d.scrollLeft=t.right+(f?0:10)-g),d}function to(e,t){null==t||(io(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function oo(e){io(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function ro(e,t,n){(null!=t||null!=n)&&io(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function ao(e,t){io(e),e.curOp.scrollToPos=t}function io(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=vn(e,t.from),o=vn(e,t.to);so(e,n,o,t.margin)}}function so(e,t,n,o){var r=no(e,{left:s(t.left,n.left),top:s(t.top,n.top)-o,right:l(t.right,n.right),bottom:l(t.bottom,n.bottom)+o});ro(e,r.scrollLeft,r.scrollTop)}function lo(e,t){2>n(e.doc.scrollTop-t)||(!Ci&&qo(e,{top:t}),co(e,t,!0),Ci&&qo(e),Do(e,100))}function co(e,t,n){t=s(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 po(e,t,o,r){t=s(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),(o?t==e.doc.scrollLeft:2>n(e.doc.scrollLeft-t))&&!r||(e.doc.scrollLeft=t,Jn(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function uo(e){var t=e.display,n=t.gutters.offsetWidth,r=o(e.doc.height+Kt(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+Xt(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}function mo(e,t){t||(t=uo(e));var n=e.display.barWidth,o=e.display.barHeight;ho(e,t);for(var r=0;4>r&&n!=e.display.barWidth||o!=e.display.barHeight;r++)n!=e.display.barWidth&&e.options.lineWrapping&&Gn(e),ho(e,uo(e)),n=e.display.barWidth,o=e.display.barHeight}function ho(e,t){var n=e.display,o=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=o.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=o.bottom)+"px",n.heightForcer.style.borderBottom=o.bottom+"px solid transparent",o.right&&o.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=o.bottom+"px",n.scrollbarFiller.style.width=o.right+"px"):n.scrollbarFiller.style.display="",o.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=o.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}function go(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&Hi(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new _s[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),ls(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?po(e,t):lo(e,t)},e),e.display.scrollbars.addClass&&g(e.display.wrapper,e.display.scrollbars.addClass)}function fo(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Ms},Et(e.curOp)}function yo(e){var t=e.curOp;It(t,function(e){for(var t=0;t=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Os(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function vo(e){e.updatedDisplay=e.mustUpdate&&Uo(e.cm,e.update)}function ko(e){var t=e.cm,n=t.display;e.updatedDisplay&&Gn(t),e.barMeasure=uo(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=en(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=l(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Xt(t)+t.display.barWidth),e.maxScrollLeft=l(0,n.sizer.offsetLeft+e.adjustWidthTo-Qt(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function So(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeftt)&&(r.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=r.viewTo)rs&&we(e.doc,t)r.viewFrom?Lo(e):(r.viewFrom+=o,r.viewTo+=o);else if(t<=r.viewFrom&&n>=r.viewTo)Lo(e);else if(t<=r.viewFrom){var i=_o(e,n,n+o,1);i?(r.view=r.view.slice(i.index),r.viewFrom=i.lineN,r.viewTo+=o):Lo(e)}else if(n>=r.viewTo){var s=_o(e,t,t,-1);s?(r.view=r.view.slice(0,s.index),r.viewTo=s.lineN):Lo(e)}else{var l=_o(e,t,t,-1),d=_o(e,n,n+o,1);l&&d?(r.view=r.view.slice(0,l.index).concat(Tt(e,l.lineN,d.lineN)).concat(r.view.slice(d.index)),r.viewTo+=o):Lo(e)}var c=r.externalMeasured;c&&(n=r.lineN&&t=o.viewTo)){var i=o.view[Pn(e,t)];if(null!=i.node){var s=i.changes||(i.changes=[]);-1==x(s,n)&&s.push(n)}}}function Lo(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function _o(e,t,o,r){var s=Pn(e,t),l=e.display.view,d;if(!rs||o==e.doc.first+e.doc.size)return{index:s,lineN:o};for(var c=e.display.viewFrom,n=0;nr?0:l.length-1))return null;o+=r*l[s-(0>r?1:0)].size,s+=r}return{index:s,lineN:o}}function Mo(e,t,n){var o=e.display,r=o.view;0==r.length||t>=o.viewTo||n<=o.viewFrom?(o.view=Tt(e,t,n),o.viewFrom=t):(o.viewFrom>t?o.view=Tt(e,t,o.viewFrom).concat(o.view):o.viewFromn&&(o.view=o.view.slice(0,Pn(e,n)))),o.viewTo=n}function Oo(e){for(var t=e.display.view,n=0,o=0,r;o=e.display.viewTo)){var n=+new Date+e.options.workTime,o=at(e,t.highlightFrontier),r=[];t.iter(o.line,s(t.first+t.size,e.display.viewTo+500),function(s){if(o.line>=e.display.viewFrom){var l=s.styles,d=s.text.length>e.options.maxHighlightLength?et(t.mode,o.state):null,c=ot(e,s,o,!0);d&&(o.state=d),s.styles=c.styles;var p=s.styleClasses,u=c.classes;u?s.styleClasses=u:p&&(s.styleClasses=null);for(var m=!l||l.length!=s.styles.length||p!=u&&(!p||!u||p.bgClass!=u.bgClass||p.textClass!=u.textClass),h=0;!m&&hn?(Do(e,e.options.workDelay),!0):void 0}),t.highlightFrontier=o.line,t.modeFrontier=l(t.modeFrontier,o.line),r.length&&wo(e,function(){for(var t=0;t=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==Oo(e))return!1;$n(e)&&(Lo(e),t.dims=_n(e));var r=o.first+o.size,i=l(t.visible.from-e.options.viewportMargin,o.first),c=s(r,t.visible.to+e.options.viewportMargin);n.viewFromi-n.viewFrom&&(i=l(o.first,n.viewFrom)),n.viewTo>c&&20>n.viewTo-c&&(c=s(r,n.viewTo)),rs&&(i=we(e.doc,i),c=Te(e.doc,c));var p=i!=n.viewFrom||c!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Mo(e,i,c),n.viewOffset=Ie(R(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var u=Oo(e);if(!p&&0==u&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var m=Fo(e);return 4=e.display.viewFrom&&t.visible.to<=e.display.viewTo))break;if(!Uo(e,t))break;Gn(e);var r=uo(e);Fn(e),mo(e,r),zo(e,r),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 qo(e,t){var n=new Os(e,t);if(Uo(e,n)){Gn(e),Vo(e,n);var o=uo(e);Fn(e),mo(e,o),zo(e,o),n.finish()}}function jo(e,t,n){function o(t){var n=t.nextSibling;return Ni&&Ui&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var r=e.display,s=e.options.lineNumbers,l=r.lineDiv,c=l.firstChild,p=r.view,u=r.viewFrom,m=0,i;mc.clientWidth,u=c.scrollHeight>c.clientHeight;if(o&&p||r&&u){if(r&&Ui&&Ni)outer:for(var m=n.target,h=d.view;m!=c;m=m.parentNode)for(var g=0;gi?f=l(0,f+i-50):y=s(t.doc.height,y+i+50),qo(t,{top:f,bottom:y})}20>Ds&&(null==d.wheelStartX?(d.wheelStartX=c.scrollLeft,d.wheelStartY=c.scrollTop,d.wheelDX=o,d.wheelDY=r,setTimeout(function(){if(null!=d.wheelStartX){var e=c.scrollLeft-d.wheelStartX,t=c.scrollTop-d.wheelStartY,n=t&&d.wheelDY&&t/d.wheelDY||e&&d.wheelDX&&e/d.wheelDX;d.wheelStartX=d.wheelStartY=null,n&&(Rs=(Rs*Ds+n)/(Ds+1),++Ds)}},200)):(d.wheelDX+=o,d.wheelDY+=r))}}function Jo(e,t){var n=e[t];e.sort(function(e,t){return z(e.from(),t.from())}),t=x(e,n);for(var o=1;oz(e,t.from))return e;if(0>=z(e,t.to))return Yo(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,o=e.ch;return e.line==t.to.line&&(o+=Yo(t).ch-t.to.ch),W(n,o)}function er(e,t){for(var n=[],o=0,r;oz(p.head,p.anchor);o[l]=new Fs(u?c:d,u?d:c)}else o[l]=new Fs(d,d)}return new Ps(o,e.sel.primIndex)}function or(e){e.doc.mode=Ye(e.options,e.doc.modeOption),rr(e)}function rr(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,Do(e,100),e.state.modeGen++,e.curOp&&Io(e)}function ar(e,t){return 0==t.from.ch&&0==t.to.ch&&""==C(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function ir(e,t,o,n){function r(e){return o?o[e]:null}function i(e,o,r){ht(e,o,r,n),Nt(e,"change",e,t)}function s(e,t){for(var o=[],s=e;si-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(s=hr(r,r.lastOp==o)))l=C(s.changes),0==z(t.from,t.to)&&0==z(t.from,l.to)?l.to=Yo(t):s.changes.push(ur(e,t));else{var d=C(r.done);for(d&&d.ranges||br(e.sel,r.done),s={changes:[ur(e,t)],generation:r.generation},r.done.push(s);r.done.length>r.undoDepth;)r.done.shift(),r.done[0].ranges||r.done.shift()}r.done.push(n),r.generation=++r.maxGeneration,r.lastModTime=r.lastSelTime=i,r.lastOp=r.lastSelOp=o,r.lastOrigin=r.lastSelOrigin=t.origin,l||Pe(e,"historyAdded")}function fr(e,t,n,o){var r=t.charAt(0);return"*"==r||"+"==r&&n.ranges.length==o.ranges.length&&n.somethingSelected()==o.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function yr(e,t,n,o){var r=e.history,i=o&&o.origin;n==r.lastSelOp||i&&r.lastSelOrigin==i&&(r.lastModTime==r.lastSelTime&&r.lastOrigin==i||fr(e,i,C(r.done),t))?r.done[r.done.length-1]=t:br(t,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=i,r.lastSelOp=n,o&&!1!==o.clearRedo&&mr(r.undone)}function br(e,t){var n=C(t);n&&n.ranges&&n.equals(e)||t.push(e)}function xr(e,t,o,r){var i=t["spans_"+e.id],d=0;e.iter(l(e.first,o),s(e.first+e.size,r),function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[d]=n.markedSpans),++d})}function vr(e){if(!e)return null;for(var t=0,n;tz(t,r);i==0>z(n,r)?i!=0>z(t,n)&&(t=n):(r=t,t=n)}return new Fs(r,t)}return new Fs(n||t,t)}function Tr(e,t,n,o,r){null==r&&(r=e.cm&&(e.cm.display.shift||e.extend)),_r(e,new Ps([wr(e.sel.primary(),t,n,r)],0),o)}function Er(e,t,n){for(var o=[],r=e.cm&&(e.cm.display.shift||e.extend),s=0;sz(t.primary().head,e.sel.primary().head)?-1:1);Or(e,Rr(e,t,o,!0)),!(n&&!1===n.scroll)&&e.cm&&oo(e.cm)}function Or(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=e.cm.curOp.selectionChanged=!0,Be(e.cm)),Nt(e,"cursorActivity",e))}function Dr(e){Or(e,Rr(e,e.sel,null,!1))}function Rr(e,t,n,o){for(var r=0,i;r=t.ch:i.to>t.ch))){if(r&&(Pe(d,"beforeCursorEnter"),d.explicitlyCleared))if(!s.markedSpans)break;else{--l;continue}if(!d.atomic)continue;if(n){var c=d.find(0>o?1:-1),p=void 0;if((0>o?d.inclusiveRight:d.inclusiveLeft)&&(c=Br(e,c,-o,c&&c.line==t.line?s:null)),c&&c.line==t.line&&(p=z(c,n))&&(0>o?0>p:0o?-1:1);return(0>o?d.inclusiveLeft:d.inclusiveRight)&&(u=Br(e,u,o,u.line==t.line?s:null)),u?Pr(e,u,t,o,r):null}}return t}function Fr(e,t,n,o,r){var i=o||1,s=Pr(e,t,n,i,r)||!r&&Pr(e,t,n,i,!0)||Pr(e,t,n,-i,r)||!r&&Pr(e,t,n,-i,!0);return s?s:(e.cantEdit=!0,W(e.first,0))}function Br(e,t,n,o){return 0>n&&0==t.ch?t.line>e.first?J(e,W(t.line-1)):null:0e.lastLine())){if(t.from.linei&&(t={from:t.from,to:W(i,R(e,i).text.length),text:[t.text[0]],origin:t.origin}),t.removed=P(e,t.from,t.to),n||(n=er(e,t)),e.cm?Kr(e.cm,t,o):ir(e,t,o),Mr(e,n,$i)}}function Kr(e,t,n){var o=e.doc,r=e.display,i=t.from,s=t.to,l=!1,d=i.line;e.options.lineWrapping||(d=U(ke(R(o,i.line))),o.iter(d,s.line+1,function(e){if(e==r.maxLine)return l=!0,!0})),-1r.maxLineLength&&(r.maxLine=e,r.maxLineLength=t,r.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),mt(o,i.line),Do(e,400);var c=t.text.length-(s.line-i.line)-1;t.full?Io(e):i.line!=s.line||1!=t.text.length||ar(e.doc,t)?Io(e,i.line,s.line+1,c):No(e,i.line,"text");var p=Ue(e,"changes"),u=Ue(e,"change");if(u||p){var m={from:i,to:s,text:t.text,removed:t.removed,origin:t.origin};u&&Nt(e,"change",e,m),p&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(m)}e.display.selForContextMenu=null}function Gr(e,t,n,o,r){if(o||(o=n),0>z(o,n)){var i;i=[o,n],n=i[0],o=i[1]}"string"==typeof t&&(t=e.splitLines(t)),qr(e,{from:n,to:o,text:t,origin:r})}function Xr(e,t,n,o){n+new Date-zs))return void ze(n);if(!(Fe(t,n)||zt(t.display,n))&&(n.dataTransfer.setData("Text",t.getSelection()),n.dataTransfer.effectAllowed="copyMove",n.dataTransfer.setDragImage&&!Oi)){var e=p("img",null,null,"position: fixed; left: 0; top: 0;");e.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Mi&&(e.width=e.height=1,t.display.wrapper.appendChild(e),e._top=e.offsetTop),n.dataTransfer.setDragImage(e,0,0),Mi&&e.parentNode.removeChild(e)}}function da(t,n){var e=Rn(t,n);if(e){var o=document.createDocumentFragment();Un(t,e,o),t.display.dragCursor||(t.display.dragCursor=p("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),t.display.lineSpace.insertBefore(t.display.dragCursor,t.display.cursorDiv)),c(t.display.dragCursor,o)}}function ca(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function pa(e){if(document.getElementsByClassName)for(var t=document.getElementsByClassName("CodeMirror"),n=0,o;n=z(i.from,C(o).to);){var s=o.pop();if(0>z(s.from,i.from)){i.from=s.from;break}}o.push(i)}wo(e,function(){for(var t=o.length-1;0<=t;t--)Gr(e.doc,"",o[t].from,o[t].to,"+delete");oo(e)})}function Ca(e,t,n){var o=M(e.text,t+n,n);return 0>o||o>e.text.length?null:o}function wa(e,t,n){var o=Ca(e,t.ch,n);return null==o?null:new W(t.line,o,0>n?"after":"before")}function Ta(e,t,n,o,r){if(e){var i=Oe(n,t.doc.direction);if(i){var s=0>r?C(i):i[0],l=0>r==(1==s.level),d=l?"after":"before",c;if(0r?n.text.length-1:0;var u=rn(t,p,c).top;c=O(function(e){return rn(t,p,e).top==u},0>r==(1==s.level)?s.from:s.to-1,c),"before"==d&&(c=Ca(n,c,1))}else c=0>r?s.to:s.from;return new W(o,c,d)}}return new W(o,0>r?n.text.length:0,0>r?"before":"after")}function Ea(e,t,n,o){var r=Oe(t,e.doc.direction);if(!r)return wa(t,n,o);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):0>=n.ch&&(n.ch=0,n.sticky="after");var i=Me(r,n.ch,n.sticky),s=r[i];if("ltr"==e.doc.direction&&0==s.level%2&&(0n.ch:s.fromo,m=l(n,u?1:-1);if(null!=m&&(u?m<=s.to&&m<=c.end:m>=s.from&&m>=c.begin)){var h=u?"before":"after";return new W(n.line,m,h)}}var g=function(e,t,o){for(var i=function(e,t){return t?new W(n.line,l(e,1),"before"):new W(n.line,e,"after")};0<=e&&eIi&&27==t.keyCode&&(t.returnValue=!1);var n=t.keyCode;e.display.shift=16==n||t.shiftKey;var o=Da(e,t);Mi&&(Zs=o?n:null,!o&&88==n&&!ps&&(Ui?t.metaKey:t.ctrlKey)&&e.replaceSelection("",null,"cut")),18!=n||/\bCodeMirror-crosshair\b/.test(e.display.lineDiv.className)||Fa(e)}}function Fa(e){function t(o){18!=o.keyCode&&o.altKey||(Hi(n,"CodeMirror-crosshair"),Re(document,"keyup",t),Re(document,"mouseover",t))}var n=e.display.lineDiv;g(n,"CodeMirror-crosshair"),ls(document,"keyup",t),ls(document,"mouseover",t)}function Ba(t){16==t.keyCode&&(this.doc.sel.shift=!1),Fe(this,t)}function Ua(t){var e=this;if(!(zt(e.display,t)||Fe(e,t)||t.ctrlKey&&!t.altKey||Ui&&t.metaKey)){var n=t.keyCode,o=t.charCode;if(Mi&&n==Zs)return Zs=null,void qe(t);if(!(Mi&&(!t.which||10>t.which)&&Da(e,t))){var r=i(null==o?n:o);"\b"==r||Ra(e,t,r)||e.display.input.onKeyPress(t)}}}function Va(e,t){var n=+new Date;return al&&al.compare(n,e,t)?(rl=al=null,"triple"):rl&&rl.compare(n,e,t)?(al=new el(n,e,t),rl=null,"double"):(rl=new el(n,e,t),al=null,"single")}function qa(t){var e=this,n=e.display;if(!(Fe(e,t)||n.activeTouch&&n.input.supportsTouch())){if(n.input.ensurePolled(),n.shift=t.shiftKey,zt(n,t))return void(Ni||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100)));if(!Ja(e,t)){var o=Rn(e,t),r=Ke(t),i=o?Va(o,r):"single";window.focus(),1==r&&e.state.selectingText&&e.state.selectingText(t),o&&ja(e,r,o,i,t)||(1==r?o?za(e,o,i,t):He(t)==n.scroller&&qe(t):2==r?(o&&Tr(e.doc,o),setTimeout(function(){return n.input.focus()},20)):3==r&&(zi?$a(e,t):zn(e)))}}}function ja(e,t,n,o,r){var i="Click";return"double"==o?i="Double"+i:"triple"==o&&(i="Triple"+i),i=(1==t?"Left":2==t?"Middle":"Right")+i,Ma(e,xa(i,r),r,function(t){if("string"==typeof t&&(t=$s[t]),!t)return!1;var o=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),o=t(e,n)!=Ji}finally{e.state.suppressEdits=!1}return o})}function Wa(e,t,n){var o=e.getOption("configureMouse"),r=o?o(e,t,n):{};if(null==r.unit){var i=Vi?n.shiftKey&&n.metaKey:n.altKey;r.unit=i?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==r.extend||e.doc.extend)&&(r.extend=e.doc.extend||n.shiftKey),null==r.addNew&&(r.addNew=Ui?n.metaKey:n.ctrlKey),null==r.moveOnDrag&&(r.moveOnDrag=Ui?!n.altKey:!n.ctrlKey),r}function za(e,t,n,o){Ai?setTimeout(y(Wn,e),0):e.curOp.focus=h();var r=Wa(e,n,o),i=e.doc.sel,s;e.options.dragDrop&&on&&!e.isReadOnly()&&"single"==n&&-1<(s=i.contains(t))&&(0>z((s=i.ranges[s]).from(),t)||0t.xRel)?Ha(e,o,t,r):Ga(e,o,t,r)}function Ha(t,e,o,r){var i=t.display,s=!1,l=To(t,function(n){Ni&&(i.scroller.draggable=!1),t.state.draggingText=!1,Re(i.wrapper.ownerDocument,"mouseup",l),Re(i.wrapper.ownerDocument,"mousemove",d),Re(i.scroller,"dragstart",c),Re(i.scroller,"drop",l),s||(qe(n),!r.addNew&&Tr(t.doc,o,null,null,r.extend),Ni||Ai&&9==Ii?setTimeout(function(){i.wrapper.ownerDocument.body.focus(),i.input.focus()},20):i.input.focus())}),d=function(t){s=s||10<=n(e.clientX-t.clientX)+n(e.clientY-t.clientY)},c=function(){return s=!0};Ni&&(i.scroller.draggable=!0),t.state.draggingText=l,l.copy=!r.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),ls(i.wrapper.ownerDocument,"mouseup",l),ls(i.wrapper.ownerDocument,"mousemove",d),ls(i.scroller,"dragstart",c),ls(i.scroller,"drop",l),zn(t),setTimeout(function(){return i.input.focus()},20)}function Ka(e,t,n){if("char"==n)return new Fs(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new Fs(W(t.line,0),J(e.doc,W(t.line+1,0)));var o=n(e,t);return new Fs(o.from,o.to)}function Ga(t,e,n,o){function r(e){if(0!=z(b,e))if(b=e,"rectangle"==o.unit){for(var r=[],i=t.options.tabSize,d=v(R(p,n.line).text,n.ch,i),c=v(R(p,e.line).text,e.ch,i),m=s(d,c),h=l(d,c),y=s(n.line,e.line),x=s(t.lastLine(),l(n.line,e.line));y<=x;y++){var S=R(p,y).text,C=k(S,m,i);m==h?r.push(new Fs(W(y,C),W(y,C))):S.length>C&&r.push(new Fs(W(y,C),W(y,k(S,h,i))))}r.length||r.push(new Fs(n,n)),_r(p,Jo(u.ranges.slice(0,f).concat(r),f),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var w=g,T=Ka(t,e,o.unit),E=w.anchor,A;0=l.to||s.linex.bottom?20:0;d&&setTimeout(To(t,function(){S!=e||(c.scroller.scrollTop+=d,i(n))}),50)}}function d(n){t.state.selectingText=!1,S=Infinity,qe(n),c.input.focus(),Re(c.wrapper.ownerDocument,"mousemove",C),Re(c.wrapper.ownerDocument,"mouseup",w),p.history.lastSelOrigin=null}var c=t.display,p=t.doc;qe(e);var u=p.sel,m=u.ranges,g,f;if(o.addNew&&!o.extend?(f=p.sel.contains(n),g=-1u:0=r(t.display.gutters.getBoundingClientRect().right))return!1;o&&qe(n);var d=t.display,c=d.lineDiv.getBoundingClientRect();if(l>c.bottom||!Ue(t,e))return We(n);l-=c.top-d.viewOffset;for(var p=0,i;p=s){var u=V(t.doc,l),m=t.options.gutters[p];return Pe(t,e,t,u,m,n),We(n)}}function Ja(t,n){return Qa(t,n,"gutterClick",!0)}function $a(t,n){zt(t.display,n)||Ya(t,n)||Fe(t,n,"contextmenu")||t.display.input.onContextMenu(n)}function Ya(t,n){return!!Ue(t,"gutterContextMenu")&&Qa(t,n,"gutterContextMenu",!1)}function Za(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),un(e)}function ei(e){Ho(e),Io(e),Jn(e)}function ti(e,t,n){if(!t!=!(n&&n!=tl)){var o=e.display.dragFunctions,r=t?ls:Re;r(e.display.scroller,"dragstart",o.start),r(e.display.scroller,"dragenter",o.enter),r(e.display.scroller,"dragover",o.over),r(e.display.scroller,"dragleave",o.leave),r(e.display.scroller,"drop",o.drop)}}function ni(e){e.options.lineWrapping?(g(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Hi(e.display.wrapper,"CodeMirror-wrap"),Le(e)),Dn(e),Io(e),un(e),setTimeout(function(){return mo(e)},100)}function oi(e,t){var n=this;if(!(this instanceof oi))return new oi(e,t);this.options=t=t?b(t):{},b(nl,t,!1),Ko(t);var o=t.value;"string"==typeof o&&(o=new Ws(o,t.mode,null,t.lineSeparator,t.direction)),this.doc=o;var r=new oi.inputStyles[t.inputStyle](this),s=this.display=new D(e,o,r);for(var l in s.wrapper.CodeMirror=this,Ho(this),Za(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),go(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 Xi,keySeq:null,specialChars:null},t.autofocus&&!Bi&&s.input.focus(),Ai&&11>Ii&&setTimeout(function(){return n.display.input.reset(!0)},20),ri(this),ua(),fo(this),this.curOp.forceUpdate=!0,lr(this,o),t.autofocus&&!Bi||this.hasFocus()?setTimeout(y(Hn,this),20):Kn(this),ol)ol.hasOwnProperty(l)&&ol[l](n,t[l],tl);$n(this),t.finishInit&&t.finishInit(this);for(var d=0;d=e.radiusX&&1>=e.radiusY}function r(e,t){if(null==t.left)return!0;var n=t.left-e.left,o=t.top-e.top;return 400Ii?ls(i.scroller,"dblclick",To(t,function(n){if(!Fe(t,n)){var e=Rn(t,n);if(!(!e||Ja(t,n)||zt(t.display,n))){qe(n);var o=t.findWordAt(e);Tr(t.doc,o.anchor,o.head)}}})):ls(i.scroller,"dblclick",function(n){return Fe(t,n)||qe(n)}),zi||ls(i.scroller,"contextmenu",function(n){return $a(t,n)});var s={end:0},l;ls(i.scroller,"touchstart",function(n){if(!Fe(t,n)&&!o(n)&&!Ja(t,n)){i.input.ensurePolled(),clearTimeout(l);var e=+new Date;i.activeTouch={start:e,moved:!1,prev:300>=e-s.end?s:null},1==n.touches.length&&(i.activeTouch.left=n.touches[0].pageX,i.activeTouch.top=n.touches[0].pageY)}}),ls(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),ls(i.scroller,"touchend",function(o){var e=i.activeTouch;if(e&&!zt(i,o)&&null!=e.left&&!e.moved&&300>new Date-e.start){var s=t.coordsChar(i.activeTouch,"page"),l;l=!e.prev||r(e,e.prev)?new Fs(s,s):!e.prev.prev||r(e,e.prev.prev)?t.findWordAt(s):new Fs(W(s.line,0),J(t.doc,W(s.line+1,0))),t.setSelection(l.anchor,l.head),t.focus(),qe(o)}n()}),ls(i.scroller,"touchcancel",n),ls(i.scroller,"scroll",function(){i.scroller.clientHeight&&(lo(t,i.scroller.scrollTop),po(t,i.scroller.scrollLeft,!0),Pe(t,"scroll",t))}),ls(i.scroller,"mousewheel",function(n){return Qo(t,n)}),ls(i.scroller,"DOMMouseScroll",function(n){return Qo(t,n)}),ls(i.wrapper,"scroll",function(){return i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={enter:function(n){Fe(t,n)||ze(n)},over:function(n){Fe(t,n)||(da(t,n),ze(n))},start:function(n){return la(t,n)},drop:To(t,sa),leave:function(n){Fe(t,n)||ca(t)}};var e=i.input.getField();ls(e,"keyup",function(n){return Ba.call(t,n)}),ls(e,"keydown",To(t,Pa)),ls(e,"keypress",To(t,Ua)),ls(e,"focus",function(n){return Hn(t,n)}),ls(e,"blur",function(n){return Kn(t,n)})}function ai(e,t,n,o){var s=e.doc,d;null==n&&(n="add"),"smart"==n&&(s.mode.indent?d=at(e,t).state:n="prev");var c=e.options.tabSize,p=R(s,t),u=v(p.text,null,c);p.stateAfter&&(p.stateAfter=null);var m=p.text.match(/^\s*/)[0],h;if(!o&&!/\S/.test(p.text))h=0,n="not";else if("smart"==n&&(h=s.mode.indent(d,p.text.slice(m.length),p.text),h==Ji||150s.first?h=v(R(s,t-1).text,null,c):h=0:"add"==n?h=u+e.options.indentUnit:"subtract"==n?h=u-e.options.indentUnit:"number"==typeof n&&(h=u+n),h=l(0,h);var g="",f=0;if(e.options.indentWithTabs)for(var y=r(h/c);y;--y)f+=c,g+="\t";if(f=e.first+e.size?!1:(t=new W(o,t.ch,t.sticky),c=R(e,o))}function s(o){var s;if(s=r?Ea(e.cm,c,t,n):wa(c,t,n),null!=s)t=s;else if(!o&&i())t=Ta(r,e.cm,c,t.line,n);else return!1;return!0}var l=t,d=n,c=R(e,t.line);if("char"==o)s();else if("column"==o)s(!0);else if("word"==o||"group"==o)for(var p=null,u="group"==o,m=e.cm&&e.cm.getHelper(t,"wordChars"),h=!0;;h=!1){if(0>n&&!s(!h))break;var g=c.text.charAt(t.ch)||"\n",f=N(g,m)?"w":u&&"\n"==g?"n":!u||/\s/.test(g)?null:"p";if(!u||h||f||(f="s"),p&&p!=f){0>n&&(n=1,s(),t.sticky="after");break}if(f&&(p=f),0n?0>=d:d>=r.height){u.hitSide=!0;break}d+=5*n}return u}function gi(e,t){var n=tn(e,t.line);if(!n||n.hidden)return null;var o=R(e.doc,t.line),r=Yt(n,o,t.line),i=Oe(o,e.doc.direction),s="left";if(i){var l=Me(i,t.ch);s=l%2?"right":"left"}var d=an(r.map,t.ch,s);return d.offset="right"==d.collapse?d.end:d.start,d}function fi(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function yi(e,t){return t&&(e.bad=!0),e}function bi(e,t,n,o,r){function i(e){return function(t){return t.id==e}}function s(){p&&(c+=u,m&&(c+=u),p=m=!1)}function l(e){e&&(s(),c+=e)}function d(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void l(n);var c=t.getAttribute("cm-marker"),h;if(c){var g=e.findMarks(W(o,0),W(r+1,0),i(+c));return void(g.length&&(h=g[0].find(0))&&l(P(e.doc,h.from,h.to).join(u)))}if("false"==t.getAttribute("contenteditable"))return;var f=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;f&&s();for(var y=0;yr?c.map:p[r];for(var s=0,l;sr?e.line:e.rest[r]),u=i[s]+o;return(0>o||l!=t)&&(u=i[s+(o?1:0)]),W(d,u)}}}var r=e.text.firstChild,i=!1;if(!t||!m(r,t))return yi(W(U(e.line),0),!0);if(t==r&&(i=!0,t=r.childNodes[n],n=0,!t)){var s=e.rest?C(e.rest):e.line;return yi(W(U(s),s.text.length),i)}var l=3==t.nodeType?t:null,d=t;for(l||1!=t.childNodes.length||3!=t.firstChild.nodeType||(l=t.firstChild,n&&(n=l.nodeValue.length));d.parentNode!=r;)d=d.parentNode;var c=e.measure,p=c.maps,u=o(l,d,n);if(u)return yi(u,i);for(var h=d.nextSibling,g=l?l.nodeValue.length-n:0;h;h=h.nextSibling){if(u=o(h,h.firstChild,0),u)return yi(W(u.line,u.ch-g),i);g+=h.textContent.length}for(var f=d.previousSibling,y=n;f;f=f.previousSibling){if(u=o(f,f.firstChild,-1),u)return yi(W(u.line,u.ch+y),i);y+=f.textContent.length}}var ki=navigator.userAgent,Si=navigator.platform,Ci=/gecko\/\d/i.test(ki),wi=/MSIE \d/.test(ki),Ti=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ki),Ei=/Edge\/(\d+)/.exec(ki),Ai=wi||Ti||Ei,Ii=Ai&&(wi?document.documentMode||6:+(Ei||Ti)[1]),Ni=!Ei&&/WebKit\//.test(ki),Li=Ni&&/Qt\/\d+\.\d+/.test(ki),_i=!Ei&&/Chrome\//.test(ki),Mi=/Opera\//.test(ki),Oi=/Apple Computer/.test(navigator.vendor),Di=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(ki),Ri=/PhantomJS/.test(ki),Pi=!Ei&&/AppleWebKit/.test(ki)&&/Mobile\/\w+/.test(ki),Fi=/Android/.test(ki),Bi=Pi||Fi||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(ki),Ui=Pi||/Mac/.test(Si),Vi=/\bCrOS\b/.test(ki),qi=/win/i.test(Si),ji=Mi&&ki.match(/Version\/(\d*\.\d*)/);ji&&(ji=+ji[1]),ji&&15<=ji&&(Mi=!1,Ni=!0);var Wi=Ui&&(Li||Mi&&(null==ji||12.11>ji)),zi=Ci||Ai&&9<=Ii,Hi=function(t,n){var o=t.className,r=e(n).exec(o);if(r){var i=o.slice(r.index+r[0].length);t.className=o.slice(0,r.index)+(i?r[1]+i:"")}},Ki;Ki=document.createRange?function(e,t,n,o){var i=document.createRange();return i.setEnd(o||e,n),i.setStart(e,t),i}:function(e,t,n){var o=document.body.createTextRange();try{o.moveToElementText(e.parentNode)}catch(t){return o}return o.collapse(!0),o.moveEnd("character",n),o.moveStart("character",t),o};var Gi=function(e){e.select()};Pi?Gi=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:Ai&&(Gi=function(e){try{e.select()}catch(e){}});var Xi=function(){this.id=null};Xi.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var Qi=30,Ji={toString:function(){return"CodeMirror.Pass"}},$i={scroll:!1},Yi={origin:"*mouse"},Zi={origin:"+move"},es=[""],ts=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,ns=/[\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]/,os=!1,rs=!1,as=null,is=function(){function e(e){return 247>=e?n.charAt(e):1424<=e&&1524>=e?"R":1536<=e&&1785>=e?o.charAt(e-1536):1774<=e&&2220>=e?"r":8192<=e&&8203>=e?"w":8204==e?"b":"L"}function t(e,t,n){this.level=e,this.from=t,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",o="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,s=/[LRr]/,l=/[Lb1n]/,d=/[1n]/;return function(n,o){var c="ltr"==o?"L":"R";if(0==n.length||"ltr"==o&&!r.test(n))return!1;for(var p=n.length,u=[],h=0;hIi)return!1;var e=p("div");return"draggable"in e||"dragDrop"in e}(),ds=3=="\n\nb".split(/\n/).length?function(e){return e.split(/\r\n?|\n/)}:function(e){for(var t=0,n=[],o=e.length,r;t<=o;){r=e.indexOf("\n",t),-1==r&&(r=e.length);var i=e.slice(t,"\r"==e.charAt(r-1)?r-1:r),s=i.indexOf("\r");-1==s?(n.push(i),t=r+1):(n.push(i.slice(0,s)),t+=s+1)}return n},cs=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(t){}return t&&t.parentElement()==e&&0!=t.compareEndPoints("StartToEnd",t)},ps=function(){var t=p("div");return!!("oncopy"in t)||(t.setAttribute("oncopy","return;"),"function"==typeof t.oncopy)}(),us=null,ms={},hs={},gs={},fs=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},ys,bs;fs.prototype.eol=function(){return this.pos>=this.string.length},fs.prototype.sol=function(){return this.pos==this.lineStart},fs.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},fs.prototype.next=function(){if(this.post},fs.prototype.eatSpace=function(){for(var e=this,t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++e.pos;return this.pos>t},fs.prototype.skipToEnd=function(){this.pos=this.string.length},fs.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(-1this.maxLookAhead&&(this.maxLookAhead=e),t},vs.prototype.baseToken=function(e){var t=this;if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)t.baseTokenPos+=2;var n=this.baseTokens[this.baseTokenPos+1];return{type:n&&n.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},vs.prototype.nextLine=function(){this.line++,0Ii&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")},Ns;Is.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,o=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?o+"px":"0";var r=e.viewHeight-(t?o:0);this.vert.firstChild.style.height=l(0,e.scrollHeight-e.clientHeight+r)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?o+"px":"0",this.horiz.style.left=e.barLeft+"px";var i=e.viewWidth-e.barLeft-(n?o:0);this.horiz.firstChild.style.width=l(0,e.scrollWidth-e.clientWidth+i)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&0=z(e,r.to()))return o;return-1};var Fs=function(e,t){this.anchor=e,this.head=t};Fs.prototype.from=function(){return X(this.anchor,this.head)},Fs.prototype.to=function(){return G(this.anchor,this.head)},Fs.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},Yr.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=this,o=e,r;othis.size-t&&(1=this.children.length)){var e=this;do{var t=e.children.splice(e.children.length-5,5),n=new Zr(t);if(!e.parent){var o=new Zr(e.children);o.parent=e,e.children=[o,n],e=o}else{e.size-=n.size,e.height-=n.height;var r=x(e.parent.children,e);e.parent.children.splice(r+1,0,n)}n.parent=e.parent}while(10t.display.maxLineLength&&(t.display.maxLine=p,t.display.maxLineLength=u,t.display.maxLineChanged=!0)}null!=r&&t&&this.collapsed&&Io(t,r,s+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&Dr(t.doc)),t&&Nt(t,"markerCleared",t,this,r,s),n&&yo(t),this.parent&&this.parent.clear()}},Vs.prototype.find=function(e,t){var n=this;null==e&&"bookmark"==this.type&&(e=1);for(var o=0,r,i;o=e.ch)&&t.push(r.marker.parent||r.marker);return t},findMarks:function(e,t,n){e=J(this,e),t=J(this,t);var o=[],r=e.line;return this.iter(e.line,t.line+1,function(s){var l=s.markedSpans;if(l)for(var d=0,i;d=i.to||null==i.from&&r!=e.line||null!=i.from&&r==t.line&&i.from>=t.ch||n&&!n(i.marker)||o.push(i.marker.parent||i.marker);++r}),o},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var o=0;oe?(o=e,!0):void(e-=i,++t)}),J(this,W(t,o))},indexFromPos:function(e){e=J(this,e);var t=e.ch;if(e.linee.ch)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 Ws(F(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.toGs;Gs++)Ks[Gs+48]=Ks[Gs+96]=Gs+"";for(var Xs=65;90>=Xs;Xs++)Ks[Xs]=i(Xs);for(var Qs=1;12>=Qs;Qs++)Ks[Qs+111]=Ks[Qs+63235]="F"+Qs;var Js={};Js.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"},Js.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"},Js.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Js.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"]},Js["default"]=Ui?Js.macDefault:Js.pcDefault;var $s={selectAll:Ur,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),$i)},killLine:function(e){return Sa(e,function(t){if(t.empty()){var n=R(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.linee.doc.first){var s=R(e.doc,r.line-1).text;s&&(r=new W(r.line,1),e.replaceRange(i.charAt(0)+e.doc.lineSeparator()+s.charAt(s.length-1),W(r.line-1,s.length-1),r,"+transpose"))}n.push(new Fs(r,r))}e.setSelections(n)})},newlineAndIndent:function(e){return wo(e,function(){for(var t=e.listSelections(),n=t.length-1;0<=n;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var o=0;oe&&0==z(t,this.pos)&&n==this.button};var tl={toString:function(){return"CodeMirror.Init"}},nl={},ol={},rl,al;oi.defaults=nl,oi.optionHandlers=ol;var il=[];oi.defineInitHook=function(e){return il.push(e)};var sl=null,ll=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Xi,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};ll.prototype.init=function(e){function t(t){if(!Fe(r,t)){if(r.somethingSelected())ii({lineWise:!1,text:r.getSelections()}),"cut"==t.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var e=ci(r);ii({lineWise:!0,text:e.text}),"cut"==t.type&&r.operation(function(){r.setSelections(e.ranges,0,$i),r.replaceSelection("",null,"cut")})}if(t.clipboardData){t.clipboardData.clearData();var n=sl.text.join("\n");if(t.clipboardData.setData("Text",n),t.clipboardData.getData("Text")==n)return void t.preventDefault()}var s=ui(),l=s.firstChild;r.display.lineSpace.insertBefore(s,r.display.lineSpace.firstChild),l.value=sl.text.join("\n");var d=document.activeElement;Gi(l),setTimeout(function(){r.display.lineSpace.removeChild(s),d.focus(),d==i&&o.showPrimarySelection()},50)}}var n=this,o=this,r=o.cm,i=o.div=e.lineDiv;pi(i,r.options.spellcheck),ls(i,"paste",function(t){Fe(r,t)||li(t,r)||11>=Ii&&setTimeout(To(r,function(){return n.updateFromDOM()}),20)}),ls(i,"compositionstart",function(t){n.composing={data:t.data,done:!1}}),ls(i,"compositionupdate",function(t){n.composing||(n.composing={data:t.data,done:!1})}),ls(i,"compositionend",function(t){n.composing&&(t.data!=n.composing.data&&n.readFromDOMSoon(),n.composing.done=!0)}),ls(i,"touchstart",function(){return o.forceCompositionEnd()}),ls(i,"input",function(){n.composing||n.readFromDOMSoon()}),ls(i,"copy",t),ls(i,"cut",t)},ll.prototype.prepareSelection=function(){var e=Bn(this.cm,!1);return e.focus=this.cm.state.focused,e},ll.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},ll.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},ll.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,n=t.doc.sel.primary(),o=n.from(),r=n.to();if(t.display.viewTo==t.display.viewFrom||o.line>=t.display.viewTo||r.line=t.display.viewFrom&&gi(t,o)||{node:l[0].measure.map[2],offset:0},c=r.linee.firstLine()&&(o=W(o.line-1,R(e.doc,o.line-1).length)),r.ch==R(e.doc,r.line).text.length&&r.linet.viewTo-1)return!1;var i,l,d;o.line==t.viewFrom||0==(i=Pn(e,o.line))?(l=U(t.view[0].line),d=t.view[0].node):(l=U(t.view[i].line),d=t.view[i-1].node.nextSibling);var c=Pn(e,r.line),p,u;if(c==t.view.length-1?(p=t.viewTo-1,u=t.lineDiv.lastChild):(p=U(t.view[c+1].line)-1,u=t.view[c+1].node.previousSibling),!d)return!1;for(var m=e.doc.splitLines(bi(e,d,u,l,p)),h=P(e.doc,W(l,0),W(p,R(e.doc,p).text.length));1o.ch&&v.charCodeAt(v.length-f-1)==k.charCodeAt(k.length-f-1);)g--,f++;m[m.length-1]=v.slice(0,v.length-f).replace(/^\u200b+/,""),m[0]=m[0].slice(g).replace(/\u200b+$/,"");var w=W(l,g),T=W(p,h.length?C(h).length-f:0);if(1Ii&&s.scrollbars.setScrollTop(s.scroller.scrollTop=d),null!=l.selectionStart){(!Ai||Ai&&9>Ii)&&e();var t=0,n=function e(){s.selForContextMenu==r.doc.sel&&0==l.selectionStart&&0t++?s.detectingSelectAll=setTimeout(e,500):(s.selForContextMenu=null,s.input.reset())};s.detectingSelectAll=setTimeout(n,200)}}var o=this,r=o.cm,s=r.display,l=o.textarea,i=Rn(r,t),d=s.scroller.scrollTop;if(i&&!Mi){var c=r.options.resetSelectionOnContextMenu;c&&-1==r.doc.sel.contains(i)&&To(r,_r)(r.doc,$o(i),$i);var p=l.style.cssText,u=o.wrapper.style.cssText;o.wrapper.style.cssText="position: absolute";var m=o.wrapper.getBoundingClientRect();l.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-m.top-5)+"px; left: "+(t.clientX-m.left-5)+"px;\n z-index: 1000; background: "+(Ai?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var h;if(Ni&&(h=window.scrollY),s.input.focus(),Ni&&window.scrollTo(null,h),s.input.reset(),r.somethingSelected()||(l.value=o.prevInput=" "),o.contextMenuPending=!0,s.selForContextMenu=r.doc.sel,clearTimeout(s.detectingSelectAll),Ai&&9<=Ii&&e(),zi){ze(t);var g=function e(){Re(window,"mouseup",e),setTimeout(n,20)};ls(window,"mouseup",g)}else setTimeout(n,50)}},dl.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},dl.prototype.setUneditable=function(){},dl.prototype.needsContentAttribute=!1,function(e){function t(t,o,r,i){e.defaults[t]=o,r&&(n[t]=i?function(e,t,n){n!=tl&&r(e,t,n)}:r)}var n=e.optionHandlers;e.defineOption=t,e.Init=tl,t("value","",function(e,t){return e.setValue(t)},!0),t("mode",null,function(e,t){e.doc.modeOption=t,or(e)},!0),t("indentUnit",2,or,!0),t("indentWithTabs",!1),t("smartIndent",!0),t("tabSize",4,function(e){rr(e),un(e),Io(e)},!0),t("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,!!t){var n=[],o=e.doc.first;e.doc.iter(function(e){for(var r=0,i;;){if(i=e.text.indexOf(t,r),-1==i)break;r=i+t.length,n.push(W(o,i))}o++});for(var r=n.length-1;0<=r;r--)Gr(e.doc,t,n[r],W(n[r].line,n[r].ch+t.length))}}),t("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=tl&&e.refresh()}),t("specialCharPlaceholder",bt,function(e){return e.refresh()},!0),t("electricChars",!0),t("inputStyle",Bi?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),t("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),t("rtlMoveVisually",!qi),t("wholeLineUpdateBefore",!0),t("theme","default",function(e){Za(e),ei(e)},!0),t("keyMap","default",function(e,t,n){var o=ka(t),r=n!=tl&&ka(n);r&&r.detach&&r.detach(e,o),o.attach&&o.attach(e,r||null)}),t("extraKeys",null),t("configureMouse",null),t("lineWrapping",!1,ni,!0),t("gutters",[],function(e){Ko(e.options),ei(e)},!0),t("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?Mn(e.display)+"px":"0",e.refresh()},!0),t("coverGutterNextToScrollbar",!1,function(e){return mo(e)},!0),t("scrollbarStyle","native",function(e){go(e),mo(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),t("lineNumbers",!1,function(e){Ko(e.options),ei(e)},!0),t("firstLineNumber",1,ei,!0),t("lineNumberFormatter",function(e){return e},ei,!0),t("showCursorWhenSelecting",!1,Fn,!0),t("resetSelectionOnContextMenu",!0),t("lineWiseCopyCut",!0),t("pasteLinesPerSelection",!0),t("readOnly",!1,function(e,t){"nocursor"==t&&(Kn(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),t("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),t("dragDrop",!0,ti),t("allowDropFileTypes",null),t("cursorBlinkRate",530),t("cursorScrollMargin",0),t("cursorHeight",1,Fn,!0),t("singleCursorHeightPerLine",!0,Fn,!0),t("workTime",100),t("workDelay",100),t("flattenSpans",!0,rr,!0),t("addModeClass",!1,rr,!0),t("pollInterval",100),t("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),t("historyEventDelay",1250),t("viewportMargin",10,function(e){return e.refresh()},!0),t("maxHighlightLength",1e4,rr,!0),t("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),t("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),t("autofocus",null),t("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0)}(oi),function(e){var t=e.optionHandlers,o=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var o=this.options,r=o[e];o[e]==n&&"mode"!=e||(o[e]=n,t.hasOwnProperty(e)&&To(this,t[e])(this,n,r),Pe(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"](ka(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;no&&(ai(t,i.head.line,e,!0),o=i.head.line,r==t.doc.sel.primIndex&&oo(t))}),getTokenAt:function(e,t){return dt(this,e,t)},getLineTokens:function(e,t){return dt(this,W(e),t,!0)},getTokenTypeAt:function(e){e=J(this.doc,e);var t=rt(this,R(this.doc,e.line)),n=0,o=(t.length-1)/2,r=e.ch,i;if(0==r)i=t[2];else for(;;){var s=n+o>>1;if((s?t[2*s-1]:0)>=r)o=s;else if(t[2*s+1]l?i:0==l?null:i.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 n=this,r=[];if(!o.hasOwnProperty(t))return r;var s=o[t],l=this.getModeAt(e);if("string"==typeof l[t])s[l[t]]&&r.push(s[l[t]]);else if(l[t])for(var d=0,i;di&&(e=i,o=!0),r=R(this.doc,e)}else r=e;return fn(this,r,{top:0,left:0},t||"page",n||o).top+(o?this.doc.height-Ie(r):0)},defaultTextHeight:function(){return Nn(this.display)},defaultCharWidth:function(){return Ln(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,o,r){var i=this.display;e=xn(this,J(this.doc,e));var s=e.bottom,d=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),i.sizer.appendChild(t),"over"==o)s=e.top;else if("above"==o||"near"==o){var c=l(i.wrapper.clientHeight,this.doc.height),p=l(i.sizer.clientWidth,i.lineSpace.clientWidth);("above"==o||e.bottom+t.offsetHeight>c)&&e.top>t.offsetHeight?s=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=c&&(s=e.bottom),d+t.offsetWidth>p&&(d=p-t.offsetWidth)}t.style.top=s+"px",t.style.left=t.style.right="","right"==r?(d=i.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==r?d=0:"middle"==r&&(d=(i.sizer.clientWidth-t.offsetWidth)/2),t.style.left=d+"px"),n&&eo(this,{left:d,top:s,right:d+t.offsetWidth,bottom:s+t.offsetHeight})},triggerOnKeyDown:Eo(Pa),triggerOnKeyPress:Eo(Ua),triggerOnKeyUp:Ba,triggerOnMouseDown:Eo(qa),execCommand:function(e){if($s.hasOwnProperty(e))return $s[e].call(null,this)},triggerElectric:Eo(function(e){di(this,e)}),findPosH:function(e,t,n,o){var r=this,s=1;0>t&&(s=-1,t=-t);for(var l=J(this.doc,e),d=0;de?o.from():o.to()},Zi)}),deleteH:Eo(function(e,t){var n=this.doc.sel,o=this.doc;n.somethingSelected()?o.replaceSelection("",null,"+delete"):Sa(this,function(n){var r=mi(o,n.head,e,t,!1);return 0>e?{from:r,to:n.head}:{from:n.head,to:r}})}),findPosV:function(e,t,n,o){var r=this,s=1,l=o;0>t&&(s=-1,t=-t);for(var d=J(this.doc,e),c=0,i;ce?i.from():i.to();var l=xn(n,i.head,"div");null!=i.goalColumn&&(l.left=i.goalColumn),r.push(l.left);var d=hi(n,l,e,t);return"page"==t&&i==o.sel.primary()&&to(n,bn(n,d,"div").top-l.top),d},Zi),r.length)for(var l=0;lx(cl,pl)&&(oi.prototype[pl]=function(e){return function(){return e.apply(this.doc,arguments)}}(Ws.prototype[pl]));return Ve(Ws),oi.inputStyles={textarea:dl,contenteditable:ll},oi.defineMode=function(e){oi.defaults.mode||"null"==e||(oi.defaults.mode=e),Je.apply(this,arguments)},oi.defineMIME=function(e,t){hs[e]=t},oi.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),oi.defineMIME("text/plain","null"),oi.defineExtension=function(e,t){oi.prototype[e]=t},oi.defineDocExtension=function(e,t){Ws.prototype[e]=t},oi.fromTextArea=function(e,t){function n(){e.value=l.getValue()}if(t=t?b(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var o=h();t.autofocus=o==e||null!=e.getAttribute("autofocus")&&o==document.body}var r;if(e.form&&(ls(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var i=e.form;r=i.submit;try{var s=i.submit=function(){n(),i.submit=r,i.submit(),i.submit=s}}catch(t){}}t.finishInit=function(t){t.save=n,t.getTextArea=function(){return e},t.toTextArea=function(){t.toTextArea=isNaN,n(),e.parentNode.removeChild(t.getWrapperElement()),e.style.display="",e.form&&(Re(e.form,"submit",n),"function"==typeof e.form.submit&&(e.form.submit=r))}},e.style.display="none";var l=oi(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return l},function(e){e.off=Re,e.on=ls,e.wheelEventPixels=Xo,e.Doc=Ws,e.splitLines=ds,e.countColumn=v,e.findColumn=k,e.isWordChar=I,e.Pass=Ji,e.signal=Pe,e.Line=Ss,e.changeEnd=Yo,e.scrollbarModel=_s,e.Pos=W,e.cmpPos=z,e.modes=ms,e.mimeModes=hs,e.resolveMode=$e,e.getMode=Ye,e.modeExtensions=gs,e.extendMode=Ze,e.copyState=et,e.startState=nt,e.innerMode=tt,e.commands=$s,e.keyMap=Js,e.keyName=va,e.isModifierKey=ba,e.lookupKey=ya,e.normalizeKeyMap=fa,e.StringStream=fs,e.SharedTextMarker=qs,e.TextMarker=Vs,e.LineWidget=Bs,e.e_preventDefault=qe,e.e_stopPropagation=je,e.e_stop=ze,e.addClass=g,e.contains=m,e.rmClass=Hi,e.keyNames=Ks}(oi),oi.version="5.38.0",oi})},uQIK:function(e,t,n){"use strict";(function(e){e(n("tQq4"))})(function(e){function t(e,t,o){var r=e.getLineHandle(t.line),i=t.ch-1,d=o&&o.afterCursor;null==d&&(d=/(^| )cm-fat-cursor($| )/.test(e.getWrapperElement().className));var c=!d&&0<=i&&l[r.text.charAt(i)]||l[r.text.charAt(++i)];if(!c)return null;var p=">"==c.charAt(1)?1:-1;if(o&&o.strict&&0i))for(m==t.line&&(g=t.ch-(0>n?1:0));g!=f;g+=n){var y=h.charAt(g);if(p.test(y)&&(void 0===o||e.getTokenTypeAt(s(m,g+1))==o)){var b=l[y];if(">"==b.charAt(1)==0document.documentMode),s=e.Pos,l={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"};e.defineOption("matchBrackets",!1,function(t,n,o){o&&o!=e.Init&&(t.off("cursorActivity",r),t.state.matchBrackets&&t.state.matchBrackets.currentlyHighlighted&&(t.state.matchBrackets.currentlyHighlighted(),t.state.matchBrackets.currentlyHighlighted=null)),n&&(t.state.matchBrackets="object"==typeof n?n:{},t.on("cursorActivity",r))}),e.defineExtension("matchBrackets",function(){o(this,!0)}),e.defineExtension("findMatchingBracket",function(e,n,o){return(o||"boolean"==typeof n)&&(o?(o.strict=n,n=o):n=n?{strict:!0}:null),t(this,e,n)}),e.defineExtension("scanForBracket",function(e,t,o,r){return n(this,e,t,o,r)})})},vCxL:function(e,t){"use strict";function n(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function o(t,o){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var s=n.call(t),i=[],l,r;try{for(;(void 0===o||0o.indexOf(t)&&(e[t]=n[t]);if(null!=n&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,t=Object.getOwnPropertySymbols(n);ro.indexOf(t[r])&&(e[t[r]]=n[t[r]]);return e},t.__decorate=function(e,t,n,o){var s=arguments.length,l=3>s?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o,r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,o);else for(var d=e.length-1;0<=d;d--)(r=e[d])&&(l=(3>s?r(l):3d[0]&&o[1]m;m++)if((5==e||r||m in c)&&(g=c[m],f=p(g,m,d),e))if(n)h[m]=f;else if(f)switch(e){case 3:return!0;case 5:return g;case 6:return m;case 2:h.push(g);}else if(o)return!1;return r?-1:3==e||o?o:h}},ue=se("unscopables"),me=Array.prototype;void 0==me[ue]&&P(me,ue,{});var he=function(e){me[ue][e]=!0},ge=pe(5),fe="find",ye=!0;fe in[]&&[,][fe](function(){ye=!1}),G(G.P+G.F*ye,"Array",{find:function(e){return ge(this,e,1e?we(e+t,0):o(e,t)},Ee=ie("keys"),Ae=function(e){return Ee[e]||(Ee[e]=V(e))},Ie=function(e){return function(t,n,o){var r=Ce(t),i=ne(r.length),s=Te(o,i),l;if(e&&n!=n){for(;i>s;)if(l=r[s++],l!=l)return!0;}else for(;i>s;s++)if((e||s in r)&&r[s]===n)return e||s||0;return!e&&-1}}(!1),Ne=Ae("IE_PROTO"),Le=function(e,t){var n=Ce(e),o=0,r=[],i;for(i in n)i!=Ne&&F(n,i)&&r.push(i);for(;t.length>o;)F(n,i=t[o++])&&(~Ie(r,i)||r.push(i));return r},_e=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Me=Object.keys||function(e){return Le(e,_e)},Oe=Object.getOwnPropertySymbols,De={f:Oe},Re={}.propertyIsEnumerable,Pe={f:Re},Fe=Object.assign,Be=!Fe||C(function(){var e={},t={},n=Symbol(),o="abcdefghijklmnopqrst";return e[n]=7,o.split("").forEach(function(e){t[e]=e}),7!=Fe({},e)[n]||Object.keys(Fe({},t)).join("")!=o})?function(e){for(var t=Y(e),n=arguments.length,o=1,r=De.f,i=Pe.f;n>o;)for(var s=J(arguments[o++]),l=r?Me(s).concat(r(s)):Me(s),d=l.length,c=0,p;d>c;)i.call(s,p=l[c++])&&(t[p]=s[p]);return t}:Fe;G(G.S+G.F,"Object",{assign:Be});var Ue=x.Object.assign,Ve=se("match"),qe=function(e){var t;return w(e)&&(void 0===(t=e[Ve])?"RegExp"==Q(e):!!t)},je=function(e,t,n){if(qe(t))throw TypeError("String#"+n+" doesn't accept regex!");return $(e)+""},We=se("match"),ze="startsWith",He=""[ze];G(G.P+G.F*function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[We]=!1,!"/./"[e](t)}catch(e){}}return!0}(ze),"String",{startsWith:function(e){var t=je(this,e,ze),n=ne(o(1r||r==Infinity)throw RangeError("Count can't be negative");for(;0>>=1)&&(t+=t))1&r&&(o+=t);return o}});var Ge=x.String.repeat,Xe=h(function(e){var t=V("meta"),n=D.f,o=0,r=Object.isExtensible||function(){return!0},i=!C(function(){return r(Object.preventExtensions({}))}),s=function(e){n(e,t,{value:{i:"O"+ ++o,w:{}}})},l=e.exports={KEY:t,NEED:!1,fastKey:function(e,n){if(!w(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!F(e,t)){if(!r(e))return"F";if(!n)return"E";s(e)}return e[t].i},getWeak:function(e,n){if(!F(e,t)){if(!r(e))return!0;if(!n)return!1;s(e)}return e[t].w},onFreeze:function(e){return i&&l.NEED&&r(e)&&!F(e,t)&&s(e),e}}}),Qe=Xe.KEY,Je=Xe.NEED,$e=Xe.fastKey,Ye=Xe.getWeak,Ze=Xe.onFreeze,et=D.f,tt=se("toStringTag"),nt=function(e,t,n){e&&!F(e=n?e:e.prototype,tt)&&et(e,tt,{configurable:!0,value:t})},ot={f:se},rt=!1,at=D.f,it=function(e){var t=x.Symbol||(x.Symbol=b.Symbol||{});"_"==e.charAt(0)||e in t||at(t,e,{value:ot.f(e)})},st=function(e){var t=Me(e),n=De.f;if(n)for(var o=n(e),r=Pe.f,s=0,i;o.length>s;)r.call(e,i=o[s++])&&t.push(i);return t},lt=T?Object.defineProperties:function(e,t){S(e);for(var n=Me(t),o=n.length,r=0,i;o>r;)D.f(e,i=n[r++],t[i]);return e},dt=b.document,ct=dt&&dt.documentElement,pt=Ae("IE_PROTO"),ut=function(){},mt="prototype",ht=function(){var e=I("iframe"),t=_e.length,n="<",o=">",r;for(e.style.display="none",ct.appendChild(e),e.src="javascript:",r=e.contentWindow.document,r.open(),r.write(n+"script"+o+"document.F=Object"+n+"/script"+o),r.close(),ht=r.F;t--;)delete ht[mt][_e[t]];return ht()},gt=Object.create||function(e,t){var n;return null===e?n=ht():(ut[mt]=S(e),n=new ut,ut[mt]=null,n[pt]=e),void 0===t?n:lt(n,t)},ft=_e.concat("length","prototype"),yt=Object.getOwnPropertyNames||function(e){return Le(e,ft)},bt={f:yt},xt=bt.f,vt={}.toString,kt="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],St=function(e){try{return xt(e)}catch(t){return kt.slice()}},Ct={f:function(e){return kt&&"[object Window]"==vt.call(e)?St(e):xt(Ce(e))}},wt=Object.getOwnPropertyDescriptor,Tt=T?wt:function(e,t){if(e=Ce(e),t=L(t,!0),N)try{return wt(e,t)}catch(t){}return F(e,t)?R(!Pe.f.call(e,t),e[t]):void 0},Et={f:Tt},At=Xe.KEY,It=Et.f,Nt=D.f,Lt=Ct.f,_t=b.Symbol,Mt=b.JSON,Ot=Mt&&Mt.stringify,Dt="prototype",Rt=se("_hidden"),Pt=se("toPrimitive"),Ft={}.propertyIsEnumerable,Bt=ie("symbol-registry"),Ut=ie("symbols"),Vt=ie("op-symbols"),qt=Object[Dt],jt="function"==typeof _t,Wt=b.QObject,zt=!Wt||!Wt[Dt]||!Wt[Dt].findChild,Ht=T&&C(function(){return 7!=gt(Nt({},"a",{get:function(){return Nt(this,"a",{value:7}).a}})).a})?function(e,t,n){var o=It(qt,t);o&&delete qt[t],Nt(e,t,n),o&&e!==qt&&Nt(qt,t,o)}:Nt,Kt=function(e){var t=Ut[e]=gt(_t[Dt]);return t._k=e,t},Gt=jt&&"symbol"==typeof _t.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof _t},Xt=function(e,t,n){return e===qt&&Xt(Vt,t,n),S(e),t=L(t,!0),S(n),F(Ut,t)?(n.enumerable?(F(e,Rt)&&e[Rt][t]&&(e[Rt][t]=!1),n=gt(n,{enumerable:R(0,!1)})):(!F(e,Rt)&&Nt(e,Rt,R(1,{})),e[Rt][t]=!0),Ht(e,t,n)):Nt(e,t,n)},Qt=function(e,t){S(e);for(var n=st(t=Ce(t)),o=0,r=n.length,i;r>o;)Xt(e,i=n[o++],t[i]);return e},Jt=function(e){var t=Ft.call(this,e=L(e,!0));return this===qt&&F(Ut,e)&&!F(Vt,e)?!1:t||!F(this,e)||!F(Ut,e)||F(this,Rt)&&this[Rt][e]?t:!0},$t=function(e,t){if(e=Ce(e),t=L(t,!0),e!==qt||!F(Ut,t)||F(Vt,t)){var n=It(e,t);return n&&F(Ut,t)&&!(F(e,Rt)&&e[Rt][t])&&(n.enumerable=!0),n}},Yt=function(e){for(var t=Lt(Ce(e)),n=[],o=0,r;t.length>o;)F(Ut,r=t[o++])||r==Rt||r==At||n.push(r);return n},Zt=function(e){for(var t=e===qt,n=Lt(t?Vt:Ce(e)),o=[],r=0,i;n.length>r;)F(Ut,i=n[r++])&&(!t||F(qt,i))&&o.push(Ut[i]);return o};jt||(_t=function(){if(this instanceof _t)throw TypeError("Symbol is not a constructor!");var e=V(0tn;)se(en[tn++]);for(var j=Me(se.store),nn=0;j.length>nn;)it(j[nn++]);G(G.S+G.F*!jt,"Symbol",{for:function(e){return F(Bt,e+="")?Bt[e]:Bt[e]=_t(e)},keyFor:function(e){if(!Gt(e))throw TypeError(e+" is not a symbol!");for(var t in Bt)if(Bt[t]===e)return t},useSetter:function(){zt=!0},useSimple:function(){zt=!1}}),G(G.S+G.F*!jt,"Object",{create:function(e,t){return void 0===t?gt(e):Qt(gt(e),t)},defineProperty:Xt,defineProperties:Qt,getOwnPropertyDescriptor:$t,getOwnPropertyNames:Yt,getOwnPropertySymbols:Zt}),Mt&&G(G.S+G.F*(!jt||C(function(){var e=_t();return"[null]"!=Ot([e])||"{}"!=Ot({a:e})||"{}"!=Ot(Object(e))})),"JSON",{stringify:function(e){for(var t=[e],n=1,o,r;arguments.length>n;)t.push(arguments[n++]);if(r=o=t[1],(w(o)||void 0!==e)&&!Gt(e))return oe(o)||(o=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!Gt(t))return t}),t[1]=o,Ot.apply(Mt,t)}}),_t[Dt][Pt]||P(_t[Dt],Pt,_t[Dt].valueOf),nt(_t,"Symbol"),nt(Math,"Math",!0),nt(b.JSON,"JSON",!0);var k=se("toStringTag"),on="Arguments"==Q(function(){return arguments}()),rn=function(e,t){try{return e[t]}catch(t){}},an=function(e){var t,n,o;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=rn(t=Object(e),k))?n:on?Q(t):"Object"==(o=Q(t))&&"function"==typeof t.callee?"Arguments":o};({})[se("toStringTag")]="z",q(Object.prototype,"toString",function(){return"[object "+an(this)+"]"},!0),it("asyncIterator"),it("observable");var sn=x.Symbol,ln={},dn={};P(dn,se("iterator"),function(){return this});var cn=function(e,t,n){e.prototype=gt(dn,{next:R(1,n)}),nt(e,t+" Iterator")},pn=Ae("IE_PROTO"),un=Object.prototype,mn=Object.getPrototypeOf||function(e){return e=Y(e),F(e,pn)?e[pn]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?un:null},hn=se("iterator"),gn=!([].keys&&"next"in[].keys()),fn="keys",yn="values",bn=function(){return this},xn=function(e,t,n,o,r,i,s){cn(n,t,o);var l=function(e){return!gn&&e in u?u[e]:e===fn?function(){return new n(this,e)}:e===yn?function(){return new n(this,e)}:function(){return new n(this,e)}},d=t+" Iterator",c=r==yn,p=!1,u=e.prototype,m=u[hn]||u["@@iterator"]||r&&u[r],h=m||l(r),g=r?c?l("entries"):h:void 0,f="Array"==t?u.entries||m:m,y,b,x;if(f&&(x=mn(f.call(new e)),x!==Object.prototype&&x.next&&(nt(x,d,!0),"function"!=typeof x[hn]&&P(x,hn,bn))),c&&m&&m.name!==yn&&(p=!0,h=function(){return m.call(this)}),(gn||p||!u[hn])&&P(u,hn,h),ln[t]=h,ln[d]=bn,r)if(y={values:c?h:l(yn),keys:i?h:l(fn),entries:g},s)for(b in y)b in u||q(u,b,y[b]);else G(G.P+G.F*(gn||p),t,y);return y},vn=function(e){return function(t,n){var o=$(t)+"",r=te(n),i=o.length,s,l;return 0>r||r>=i?e?"":void 0:(s=o.charCodeAt(r),55296>s||56319(l=o.charCodeAt(r+1))||57343=e.length?{value:void 0,done:!0}:(n=vn(e,t),this._i+=n.length,{value:n,done:!1})});var kn=function(e,t){return{value:t,done:!!e}},Sn=xn(Array,"Array",function(e,t){this._t=Ce(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,kn(1)):"keys"==t?kn(0,n):"values"==t?kn(0,e[n]):kn(0,[n,e[n]])},"values");ln.Arguments=ln.Array,he("keys"),he("values"),he("entries");for(var Cn=se("iterator"),wn=se("toStringTag"),Tn=ln.Array,En={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},An=Me(En),In=0;In",type:"keyToKey",toKeys:"h"},{keys:"",type:"keyToKey",toKeys:"l"},{keys:"",type:"keyToKey",toKeys:"k"},{keys:"",type:"keyToKey",toKeys:"j"},{keys:"",type:"keyToKey",toKeys:"l"},{keys:"",type:"keyToKey",toKeys:"h",context:"normal"},{keys:"",type:"keyToKey",toKeys:"W"},{keys:"",type:"keyToKey",toKeys:"B",context:"normal"},{keys:"",type:"keyToKey",toKeys:"w"},{keys:"",type:"keyToKey",toKeys:"b",context:"normal"},{keys:"",type:"keyToKey",toKeys:"j"},{keys:"",type:"keyToKey",toKeys:"k"},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:"",context:"insert"},{keys:"",type:"keyToKey",toKeys:"",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"",type:"keyToKey",toKeys:"0"},{keys:"",type:"keyToKey",toKeys:"$"},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"",type:"action",action:"toggleOverwrite",context:"insert"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"(",type:"motion",motion:"moveBySentence",motionArgs:{forward:!1}},{keys:")",type:"motion",motion:"moveBySentence",motionArgs:{forward:!0}},{keys:"",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"expandToLine",motionArgs:{linewise:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r",type:"action",action:"replace",isEdit:!0},{keys:"@",type:"action",action:"replayMacro"},{keys:"q",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0}},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"",type:"action",action:"redo"},{keys:"m",type:"action",action:"setMark"},{keys:"\"",type:"action",action:"setRegister"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a",type:"motion",motion:"textObjectManipulation"},{keys:"i",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],n=[{name:"colorscheme",shortName:"colo"},{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"unmap"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"se"},{name:"set",shortName:"se"},{name:"setlocal",shortName:"setl"},{name:"setglobal",shortName:"setg"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"nohlsearch",shortName:"noh"},{name:"yank",shortName:"y"},{name:"delmarks",shortName:"delm"},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"global",shortName:"g"}],c=t.Pos;t.Vim=function(){function i(e){e.setOption("disableInput",!0),e.setOption("showCursorWhenSelecting",!1),t.signal(e,"vim-mode-change",{mode:"normal"}),e.on("cursorActivity",ct),D(e),t.on(e.getInputField(),"paste",v(e))}function p(e){e.setOption("disableInput",!1),e.off("cursorActivity",ct),t.off(e.getInputField(),"paste",v(e)),e.state.vim=null}function u(e,n){this==t.keyMap.vim&&(t.rmClass(e.getWrapperElement(),"cm-fat-cursor"),"contenteditable"==e.getOption("inputStyle")&&null!=document.body.style.caretColor&&(y(e),e.getInputField().style.caretColor="")),n&&n.attach==m||p(e)}function m(e,n){this==t.keyMap.vim&&(t.addClass(e.getWrapperElement(),"cm-fat-cursor"),"contenteditable"==e.getOption("inputStyle")&&null!=document.body.style.caretColor&&(f(e),e.getInputField().style.caretColor="transparent")),n&&n.attach==m||i(e)}function h(e){for(var t=e.listSelections(),n=[],o=0,r;o")}function v(e){var t=e.state.vim;return t.onPasteFn||(t.onPasteFn=function(){t.insertMode||(e.setCursor(z(e.getCursor(),0,1)),Rt.enterInsertMode(e,{},t))}),t.onPasteFn}function k(e,t){for(var n=[],o=e;o=e.firstLine()&&t<=e.lastLine()}function C(e){return /^[a-z]$/.test(e)}function w(e){return-1!="()[]{}".indexOf(e)}function T(e){return xt.test(e)}function E(e){return /^[A-Z]$/.test(e)}function A(e){return /^\s*$/.test(e)}function I(e){return-1!=".?!".indexOf(e)}function N(e,t){for(var n=0;n"==t.slice(-11)){var n=t.length-11,o=e.slice(0,n),r=t.slice(0,n);return o==r&&e.length>n?"full":0==r.indexOf(o)&&"partial"}return e==t?"full":0==t.indexOf(e)&&"partial"}function X(e){var t=/^.*(<[^>]+>)$/.exec(e),n=t?t[1]:e.slice(-1);return 1"===n?"\n":""===n?" ":""),n}function Q(e,t,n){return function(){for(var o=0;op?m:0,g=o[h].anchor,f=l(g.line,r.line),y=d(g.line,r.line),b=g.ch,x=r.ch,v=o[h].head.ch-b,k=x-b;0=k?(b++,!i&&x--):0>v&&0<=k?(b--,!u&&x++):0>v&&-1==k&&(b--,x++);for(var S=f,C;S<=y;S++)C={anchor:new c(S,b),head:new c(S,x)},n.push(C);return e.setSelections(n),t.ch=x,g.ch=b,g}function se(e,t,n){for(var o=[],r=0,i;rm&&(r.line=m),r.ch=ne(e,r.line)}else r.ch=0,s.ch=ne(e,s.line);return{ranges:[{anchor:s,head:r}],primary:0}}if("block"==n){for(var h=l(s.line,r.line),g=l(s.ch,r.ch),f=d(s.line,r.line),y=d(s.ch,r.ch)+1,b=f-h+1,x=r.line==h?0:b-1,v=[],k=0;k=s.length)return null;o?d=kt[0]:(d=vt[0],!d(s.charAt(l))&&(d=vt[1]));for(var p=l,u=l;d(s.charAt(p))&&pu&&!y?y=!0:r=!1,m=d;m>p&&(r&&s(m)!=y&&m!=d||!l(m,-1,!0));m--);return i=new c(m,0),{start:i,end:h}}function Le(e,t,n,o){function r(e,t){if(0>t.pos+t.dir||t.pos+t.dir>=t.line.length){if(t.ln+=t.dir,!S(e,t.ln))return t.line=null,t.ln=null,void(t.pos=null);t.line=e.getLine(t.ln),t.pos=0o?s(e,l.ln,l.pos,o):i(e,l.ln,l.pos,o),n--;return c(l.ln,l.pos)}function _e(e,t,n,o){var r=t,i={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/}[n],s={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{"}[n],l=e.getLine(r.line).charAt(r.ch),d=l===s?1:0,p,u;if(p=e.scanForBracket(c(r.line,r.ch+d),-1,void 0,{bracketRegex:i}),u=e.scanForBracket(c(r.line,r.ch+d),1,void 0,{bracketRegex:i}),!p||!u)return{start:r,end:r};if(p=p.pos,u=u.pos,p.line==u.line&&p.ch>u.ch||p.line>u.line){var m=p;p=u,u=m}return o?u.ch+=1:p.ch+=1,{start:p,end:u}}function Me(e,t,n,o){var r=J(t),s=e.getLine(r.line),l=s.split(""),d=l.indexOf(n),p,u,m,i;if(r.ch"+t+"",{bottom:!0,duration:5e3}):alert(t)}function He(e,t){var n=""+(e||"")+"";return t&&(n+=" "+t+""),n}function Ke(e,t){var n=(t.prefix||"")+" "+(t.desc||""),o=He(t.prefix,t.desc);Re(e,o,n,t.onClose,t)}function Ge(e,t){if(e instanceof RegExp&&t instanceof RegExp){for(var n=["global","multiline","ignoreCase","source"],o=0,r;o=t&&e<=n:e==t}function et(e){var t=e.getScrollInfo(),n=e.coordsChar({left:0,top:6+t.top},"local"),o=t.clientHeight-10+t.top,r=e.coordsChar({left:0,top:o},"local");return{top:n.line,bottom:r.line}}function tt(e,t,n){if("'"==n){var o=e.doc.history.done,r=o[o.length-2];return r&&r.ranges&&r.ranges[0].head}if("."==n){if(0==e.doc.history.lastModTime)return;var i=e.doc.history.done.filter(function(e){if(void 0!==e.changes)return e});i.reverse();var s=i[0].changes[0].to;return s}var l=t.marks[n];return l&&l.find()}function nt(e,n,o,r,i,s,l,d,c){function p(){e.operation(function(){for(;!g;)u(),m();h()})}function u(){var t=e.getRange(s.from(),s.to()),n=t.replace(l,d);s.replace(n)}function m(){for(;s.findNext()&&Ze(s.from(),r,i);)if(o||!f||s.from().line!=f.line)return e.scrollIntoView(s.from(),30),e.setSelection(s.from(),s.to()),f=s.from(),void(g=!1);g=!0}function h(t){if(t&&t(),e.focus(),f){e.setCursor(f);var n=e.state.vim;n.exMode=!1,n.lastHPos=n.lastHSPos=f.ch}c&&c()}e.state.vim.exMode=!0;var g=!1,f=s.from();return m(),g?void ze(e,"No matches for "+l.source):n?void Ke(e,{prefix:"replace with "+d+" (y/n/a/q/l)",onKeyDown:function(n,o,r){t.e_stop(n);var i=t.keyName(n);switch(i){case"Y":u(),m();break;case"N":m();break;case"A":var s=c;c=void 0,e.operation(p),c=s;break;case"L":u();case"Q":case"Esc":case"Ctrl-C":case"Ctrl-[":h(r);}return g&&h(r),!0}}):(p(),void(c&&c()))}function ot(e){var n=e.state.vim,o=Lt.macroModeState,r=Lt.registerController.getRegister("."),s=o.isPlaying,l=o.lastInsertModeChanges,d=[];if(!s){for(var c=l.inVisualBlock&&n.lastSelection?n.lastSelection.visualBlock.height:1,p=l.changes,d=[],u=0;u|<\w+>|./.exec(i),u=p[0],i=i.substring(p.index+u.length),t.Vim.handleKey(e,u,"macro"),n.insertMode){var m=s.insertModeChanges[d++].changes;Lt.macroModeState.lastInsertModeChanges.changes=m,ft(e,m,1),ot(e)}o.isPlaying=!1}function it(e,t){if(!e.isPlaying){var n=e.latestRegister,o=Lt.registerController.getRegister(n);o&&o.pushText(t)}}function st(e){if(!e.isPlaying){var t=e.latestRegister,n=Lt.registerController.getRegister(t);n&&n.pushInsertModeChanges&&n.pushInsertModeChanges(e.lastInsertModeChanges)}}function lt(e,t){if(!e.isPlaying){var n=e.latestRegister,o=Lt.registerController.getRegister(n);o&&o.pushSearchQuery&&o.pushSearchQuery(t)}}function dt(e,t){var n=Lt.macroModeState,o=n.lastInsertModeChanges;if(!n.isPlaying)for(;t;){if(o.expectCursorActivityForChange=!0,"+input"==t.origin||"paste"==t.origin||void 0===t.origin){var r=t.text.join("\n");o.maybeReset&&(o.changes=[],o.maybeReset=!1),e.state.overwrite&&!/\n/.test(r)?o.changes.push([r]):o.changes.push(r)}t=t.next}}function ct(e){var t=e.state.vim;if(t.insertMode){var n=Lt.macroModeState;if(n.isPlaying)return;var o=n.lastInsertModeChanges;o.expectCursorActivityForChange?o.expectCursorActivityForChange=!1:o.maybeReset=!0}else e.curOp.isVimOp||ut(e,t);t.visualMode&&pt(e)}function pt(e){var t=e.state.vim,n=j(e,J(t.sel.head)),o=z(n,0,1);t.fakeCursor&&t.fakeCursor.clear(),t.fakeCursor=e.markText(n,o,{className:"cm-animate-fat-cursor"})}function ut(e,n){var o=e.getCursor("anchor"),r=e.getCursor("head");if(n.visualMode&&!e.somethingSelected()?ge(e,!1):!n.visualMode&&!n.insertMode&&e.somethingSelected()&&(n.visualMode=!0,n.visualLine=!1,t.signal(e,"vim-mode-change",{mode:"visual"})),n.visualMode){var i=Y(r,o)?0:-1,s=Y(r,o)?-1:0;r=z(r,0,i),o=z(o,0,s),n.sel={anchor:o,head:r},Ae(e,n,"<",Z(r,o)),Ae(e,n,">",ee(r,o))}else n.insertMode||(n.lastHPos=e.getCursor().ch)}function mt(e){this.keyName=e}function ht(n){var e=Lt.macroModeState,o=e.lastInsertModeChanges,r=t.keyName(n);r&&(-1==r.indexOf("Delete")&&-1==r.indexOf("Backspace")||t.lookupKey(r,"vim-insert",function(){return o.maybeReset&&(o.changes=[],o.maybeReset=!1),o.changes.push(new mt(r)),!0}))}function gt(e,t,n,o){function r(){d?Mt.processAction(e,t,t.lastEditActionCommand):Mt.evalInput(e,t)}function s(n){if(0"]),Et=[].concat(St,Ct,wt,["-","\"",".",":","/"]),At={};L("filetype",void 0,"string",["ft"],function(e,t){if(void 0!==t){if(void 0===e){var n=t.getOption("mode");return"null"==n?"":n}var n=""==e?"null":e;t.setOption("mode",n)}});var It=function(){var e=100,t=-1,n=0,o=0,r=Array(e);return{cachedCursor:void 0,add:function(i,s,l){function d(n){var o=++t%e,s=r[o];s&&s.clear(),r[o]=i.setBookmark(n)}var c=t%e,p=r[c];if(p){var u=p.find();u&&!$(u,s)&&d(s)}else d(s);d(l),n=t,o=t-e+1,0>o&&(o=0)},move:function(i,s){t+=s,t>n?t=n:to)}return l}}},Nt=function(e){return e?{changes:e.changes,expectCursorActivityForChange:e.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};O.prototype={exitMacroRecordMode:function(){var e=Lt.macroModeState;e.onRecordingDone&&e.onRecordingDone(),e.onRecordingDone=void 0,e.isRecording=!1},enterMacroRecordMode:function(e,t){var n=Lt.registerController.getRegister(t);n&&(n.clear(),this.latestRegister=t,e.openDialog&&(this.onRecordingDone=e.openDialog("(recording)["+t+"]",null,{bottom:!0})),this.isRecording=!0)}};var Lt,_t;P.prototype.pushRepeatDigit=function(e){this.operator?this.motionRepeat=this.motionRepeat.concat(e):this.prefixRepeat=this.prefixRepeat.concat(e)},P.prototype.getRepeat=function(){var e=0;return(0=n.length?(this.iterator=n.length,this.initialPrefix):0>r?e:void 0},pushInput:function(e){var t=this.historyBuffer.indexOf(e);-1"==i.keys.slice(-11)){var d=X(e);if(!d)return{type:"none"};n.selectedCharacter=d}return{type:"full",command:i}},processCommand:function(e,t,n){switch(t.inputState.repeatOverride=n.repeatOverride,n.type){case"motion":this.processMotion(e,t,n);break;case"operator":this.processOperator(e,t,n);break;case"operatorMotion":this.processOperatorMotion(e,t,n);break;case"action":this.processAction(e,t,n);break;case"search":this.processSearch(e,t,n);break;case"ex":case"keyToEx":this.processEx(e,t,n);break;default:}},processMotion:function(e,t,n){t.inputState.motion=n.motion,t.inputState.motionArgs=W(n.motionArgs),this.evalInput(e,t)},processOperator:function(e,t,n){var o=t.inputState;if(o.operator){if(o.operator==n.operator)return o.motion="expandToLine",o.motionArgs={linewise:!0},void this.evalInput(e,t);F(e)}o.operator=n.operator,o.operatorArgs=W(n.operatorArgs),t.visualMode&&this.evalInput(e,t)},processOperatorMotion:function(e,t,n){var o=t.visualMode,r=W(n.operatorMotionArgs);r&&o&&r.visualLine&&(t.visualLine=!0),this.processOperator(e,t,n),o||this.processMotion(e,t,n)},processAction:function(e,t,n){var o=t.inputState,r=o.getRepeat(),i=W(n.actionArgs)||{};o.selectedCharacter&&(i.selectedCharacter=o.selectedCharacter),n.operator&&this.processOperator(e,t,n),n.motion&&this.processMotion(e,t,n),(n.motion||n.operator)&&this.evalInput(e,t),i.repeat=r||1,i.repeatIsExplicit=!!r,i.registerName=o.registerName,F(e),t.lastMotion=null,n.isEdit&&this.recordLastEdit(t,o,n),Rt[n.action](e,i,t)},processSearch:function(n,e,o){function r(t,r,i){Lt.searchHistoryController.pushInput(t),Lt.searchHistoryController.reset();try{Xe(n,t,r,i)}catch(o){return ze(n,"Invalid regex: "+t),void F(n)}Mt.processMotion(n,e,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:o.searchArgs.toJumplist}})}function i(e){n.scrollTo(h.left,h.top),r(e,!0,!0);var t=Lt.macroModeState;t.isRecording&<(t,e)}function s(o,e,r){var i=t.keyName(o),s,d;"Up"==i||"Down"==i?(s="Up"==i,d=o.target?o.target.selectionEnd:0,e=Lt.searchHistoryController.nextMatch(e,s)||"",r(e),d&&o.target&&(o.target.selectionEnd=o.target.selectionStart=l(d,o.target.value.length))):"Left"!=i&&"Right"!=i&&"Ctrl"!=i&&"Alt"!=i&&"Shift"!=i&&Lt.searchHistoryController.reset();var p;try{p=Xe(n,e,!0,!0)}catch(t){}p?n.scrollIntoView($e(n,!c,p),30):(Ye(n),n.scrollTo(h.left,h.top))}function d(o,e,r){var i=t.keyName(o);"Esc"==i||"Ctrl-C"==i||"Ctrl-["==i||"Backspace"==i&&""==e?(Lt.searchHistoryController.pushInput(e),Lt.searchHistoryController.reset(),Xe(n,m),Ye(n),n.scrollTo(h.left,h.top),t.e_stop(o),F(n),r(),n.focus()):"Up"==i||"Down"==i?t.e_stop(o):"Ctrl-U"==i&&(t.e_stop(o),r(""))}if(n.getSearchCursor){var c=o.searchArgs.forward,p=o.searchArgs.wholeWordOnly;De(n).setReversed(!c);var u=c?"/":"?",m=De(n).getQuery(),h=n.getScrollInfo();switch(o.searchArgs.querySrc){case"prompt":var g=Lt.macroModeState;if(g.isPlaying){var f=g.replaySearchQueries.shift();r(f,!0,!1)}else Ke(n,{onClose:i,prefix:u,desc:Vt,onKeyUp:s,onKeyDown:d});break;case"wordUnderCursor":var y=xe(n,!1,!0,!1,!0),b=!0;if(y||(y=xe(n,!1,!0,!1,!1),b=!1),!y)return;var f=n.getLine(y.start.line).substring(y.start.ch,y.end.ch);f=b&&p?"\\b"+f+"\\b":re(f),Lt.jumpList.cachedCursor=n.getCursor(),n.setCursor(y.start),r(f,!0,!1);}}},processEx:function(n,e,o){function r(e){Lt.exCommandHistoryController.pushInput(e),Lt.exCommandHistoryController.reset(),Wt.processCommand(n,e)}function i(o,e,r){var i=t.keyName(o),s,d;("Esc"==i||"Ctrl-C"==i||"Ctrl-["==i||"Backspace"==i&&""==e)&&(Lt.exCommandHistoryController.pushInput(e),Lt.exCommandHistoryController.reset(),t.e_stop(o),F(n),r(),n.focus()),"Up"==i||"Down"==i?(t.e_stop(o),s="Up"==i,d=o.target?o.target.selectionEnd:0,e=Lt.exCommandHistoryController.nextMatch(e,s)||"",r(e),d&&o.target&&(o.target.selectionEnd=o.target.selectionStart=l(d,o.target.value.length))):"Ctrl-U"==i?(t.e_stop(o),r("")):"Left"!=i&&"Right"!=i&&"Ctrl"!=i&&"Alt"!=i&&"Shift"!=i&&Lt.exCommandHistoryController.reset()}"keyToEx"==o.type?Wt.processCommand(n,o.exArgs.input):e.visualMode?Ke(n,{onClose:r,prefix:":",value:"'<,'>",onKeyDown:i,selectValueOnOpen:!1}):Ke(n,{onClose:r,prefix:":",onKeyDown:i})},evalInput:function(e,t){var n=t.inputState,r=n.motion,s=n.motionArgs||{},l=n.operator,d=n.operatorArgs||{},p=n.registerName,u=t.sel,m=J(t.visualMode?j(e,u.head):e.getCursor("head")),h=J(t.visualMode?j(e,u.anchor):e.getCursor("anchor")),g=J(m),f=J(h),y,b,x;if(l&&this.recordLastEdit(t,n),x=void 0===n.repeatOverride?n.getRepeat():n.repeatOverride,0",Y(b,y)?y:b)):!l&&(y=j(e,y),e.setCursor(y.line,y.ch))}if(l){if(d.lastSel){b=f;var C=d.lastSel,w=o(C.head.line-C.anchor.line),T=o(C.head.ch-C.anchor.ch);y=C.visualLine?c(f.line+w,f.ch):C.visualBlock?c(f.line+w,f.ch+T):C.head.line==C.anchor.line?c(f.line,f.ch+T):c(f.line+w,f.ch),t.visualMode=!0,t.visualLine=C.visualLine,t.visualBlock=C.visualBlock,u=t.sel={anchor:b,head:y},ue(e)}else t.visualMode&&(d.lastSel={anchor:J(u.anchor),head:J(u.head),visualBlock:t.visualBlock,visualLine:t.visualLine});var E,A,I,N,L;if(!t.visualMode){if(E=J(b||f),A=J(y||g),Y(A,E)){var _=E;E=A,A=_}I=s.linewise||d.linewise,I?ye(e,E,A):s.forward&&fe(e,E,A),N="char";var M=!s.inclusive||I;L=me(e,{anchor:E,head:A},N,M)}else if(E=Z(u.head,u.anchor),A=ee(u.head,u.anchor),I=t.visualLine||d.linewise,N=t.visualBlock?"block":I?"line":"char",L=me(e,{anchor:E,head:A},N),I){var O=L.ranges;if("block"==N)for(var D=0;Dp&&r.line==p?this.moveToEol(e,t,n,o):(n.toFirstChar&&(i=be(e.getLine(l)),o.lastHPos=i),o.lastHSPos=e.charCoords(c(l,i),"div").left,c(l,i))},moveByDisplayLines:function(e,t,n,o){var r=t;switch(o.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:o.lastHSPos=e.charCoords(r,"div").left;}var i=n.repeat,s=e.findPosV(r,n.forward?i:-i,"line",o.lastHSPos);if(s.hitSide)if(n.forward)var l=e.charCoords(s,"div"),d={top:l.top+8,left:o.lastHSPos},s=e.coordsChar(d,"div");else{var p=e.charCoords(c(e.firstLine(),0),"div");p.left=o.lastHSPos,s=e.coordsChar(p,"div")}return o.lastHPos=s.ch,s},moveByPage:function(e,t,n){var o=n.repeat;return e.findPosV(t,n.forward?o:-o,"page")},moveByParagraph:function(e,t,n){var o=n.forward?1:-1;return Ne(e,t,n.repeat,o)},moveBySentence:function(e,t,n){var o=n.forward?1:-1;return Le(e,t,n.repeat,o)},moveByScroll:function(e,t,n,o){var r=e.getScrollInfo(),i=null,s=n.repeat;s||(s=r.clientHeight/(2*e.defaultTextHeight()));var l=e.charCoords(t,"local");n.repeat=s;var i=Ot.moveByDisplayLines(e,t,n,o);if(!i)return null;var d=e.charCoords(i,"local");return e.scrollTo(null,r.top+d.top-l.top),i},moveByWords:function(e,t,n){return we(e,t,n.repeat,!!n.forward,!!n.wordEnd,!!n.bigWord)},moveTillCharacter:function(e,t,n){var o=n.repeat,r=Te(e,o,n.forward,n.selectedCharacter),i=n.forward?-1:1;return(ke(i,n),!r)?null:(r.ch+=i,r)},moveToCharacter:function(e,t,n){var o=n.repeat;return ke(0,n),Te(e,o,n.forward,n.selectedCharacter)||t},moveToSymbol:function(e,t,n){var o=n.repeat;return Se(e,o,n.forward,n.selectedCharacter)||t},moveToColumn:function(e,t,n,o){var r=n.repeat;return o.lastHPos=r-1,o.lastHSPos=e.charCoords(t,"div").left,Ee(e,r)},moveToEol:function(e,t,n,o){o.lastHPos=Infinity;var r=c(t.line+n.repeat-1,Infinity),i=e.clipPos(r);return i.ch--,o.lastHSPos=e.charCoords(i,"div").left,r},moveToFirstNonWhiteSpaceCharacter:function(e,t){var n=t;return c(n.line,be(e.getLine(n.line)))},moveToMatchedSymbol:function(e,t){for(var n=t,o=n.line,r=n.ch,i=e.getLine(o),s;re.lastLine()&&n.linewise&&!g?e.replaceRange("",h,p):e.replaceRange("",d,p),n.linewise&&(!g&&(e.setCursor(h),t.commands.newlineAndIndent(e)),d.ch=r),s=d}else{l=e.getSelection();var f=q("",o.length);e.replaceSelections(f),s=Z(o[0].head,o[0].anchor)}Lt.registerController.pushText(n.registerName,"change",l,n.linewise,1p.top?(c.line+=(d-p.top)/i,c.line=Math.ceil(c.line),e.setCursor(c),p=e.charCoords(c,"local"),e.scrollTo(null,p.top)):e.scrollTo(null,d);else{var u=d+e.getScrollInfo().clientHeight;u=s.anchor.line?p=z(s.head,0,1):p=c(s.anchor.line,0);else if("inplace"==i&&r.visualMode)return;e.setOption("disableInput",!1),n&&n.replace?(e.toggleOverwrite(!0),e.setOption("keyMap","vim-replace"),t.signal(e,"vim-mode-change",{mode:"replace"})):(e.toggleOverwrite(!1),e.setOption("keyMap","vim-insert"),t.signal(e,"vim-mode-change",{mode:"insert"})),Lt.macroModeState.isPlaying||(e.on("change",dt),t.on(e.getInputField(),"keydown",ht)),r.visualMode&&ge(e),se(e,p,u)}},toggleVisualMode:function(e,n,o){var r=n.repeat,i=e.getCursor(),s;o.visualMode?o.visualLine^n.linewise||o.visualBlock^n.blockwise?(o.visualLine=!!n.linewise,o.visualBlock=!!n.blockwise,t.signal(e,"vim-mode-change",{mode:"visual",subMode:o.visualLine?"linewise":o.visualBlock?"blockwise":""}),ue(e)):ge(e):(o.visualMode=!0,o.visualLine=!!n.linewise,o.visualBlock=!!n.blockwise,s=j(e,c(i.line,i.ch+r-1),!0),o.sel={anchor:i,head:s},t.signal(e,"vim-mode-change",{mode:"visual",subMode:o.visualLine?"linewise":o.visualBlock?"blockwise":""}),ue(e),Ae(e,o,"<",Z(i,s)),Ae(e,o,">",ee(i,s)))},reselectLastSelection:function(e,n,o){var r=o.lastSelection;if(o.visualMode&&ce(e,o),r){var i=r.anchorMark.find(),s=r.headMark.find();if(!i||!s)return;o.sel={anchor:i,head:s},o.visualMode=!0,o.visualLine=r.visualLine,o.visualBlock=r.visualBlock,ue(e),Ae(e,o,"<",Z(i,s)),Ae(e,o,">",ee(i,s)),t.signal(e,"vim-mode-change",{mode:"visual",subMode:o.visualLine?"linewise":o.visualBlock?"blockwise":""})}},joinLines:function(e,t,n){var o,r;if(n.visualMode){if(o=e.getCursor("anchor"),r=e.getCursor("head"),Y(r,o)){var s=r;r=o,o=s}r.ch=ne(e,r.line)-1}else{var l=d(t.repeat,2);o=e.getCursor(),r=j(e,c(o.line+l-1,Infinity))}for(var p=0,u=o.line;un)return"";if(e.getOption("indentWithTabs")){var o=r(n/d);return Array(o+1).join("\t")}return Array(n+1).join(" ")});l+=g?"\n":""}if(1e.lastLine()&&e.replaceRange("\n",c(I,0));var N=ne(e,I);Np.length&&(l=p.length),d=c(i.line,l)}if("\n"==r)o.visualMode||e.replaceRange("",i,d),(t.commands.newlineAndIndentContinueComment||t.commands.newlineAndIndent)(e);else{var u=e.getRange(i,d);if(u=u.replace(/[^\n]/g,r),o.visualBlock){var m=Array(e.getOption("tabSize")+1).join(" ");u=e.getSelection(),u=u.replace(/\t/g,m).replace(/[^\n]/g,r).split("\n"),e.replaceSelections(u)}else e.replaceRange(u,i,d);o.visualMode?(i=Y(s[0].anchor,s[0].head)?s[0].anchor:s[0].head,e.setCursor(i),ge(e,!1)):e.setCursor(z(d,0,-1))}},incrementNumberToken:function(e,t){for(var n=e.getCursor(),o=e.getLine(n.line),r=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,i,s,l,d;null!==(i=r.exec(o))&&(s=i.index,l=s+i[0].length,!(n.cht.args.length?void ze(e,e.getOption("theme")):void e.setOption("theme",t.args[0])},map:function(e,t,n){var o=t.args;return!o||2>o.length?void(e&&ze(e,"Invalid mapping: "+t.input)):void Wt.map(o[0],o[1],n)},imap:function(e,t){this.map(e,t,"insert")},nmap:function(e,t){this.map(e,t,"normal")},vmap:function(e,t){this.map(e,t,"visual")},unmap:function(e,t,n){var o=t.args;return!o||1>o.length?void(e&&ze(e,"No such mapping: "+t.input)):void Wt.unmap(o[0],n)},move:function(e,t){Mt.processCommand(e,e.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:t.line+1})},set:function(e,t){var n=t.args,o=t.setCfg||{};if(!n||1>n.length)return void(e&&ze(e,"Invalid mapping: "+t.input));var r=n[0].split("="),i=r[0],s=r[1],l=!1;if("?"==i.charAt(i.length-1)){if(s)throw Error("Trailing characters: "+t.argString);i=i.substring(0,i.length-1),l=!0}void 0===s&&"no"==i.substring(0,2)&&(i=i.substring(2),s=!1);var d=At[i]&&"boolean"==At[i].type;if(d&&void 0==s&&(s=!0),!d&&void 0===s||l){var c=M(i,e,o);c instanceof Error?ze(e,c.message):!0===c||!1===c?ze(e," "+(c?"":"no")+i):ze(e," "+i+"="+c)}else{var p=_(i,s,e,o);p instanceof Error&&ze(e,p.message)}},setlocal:function(e,t){t.setCfg={scope:"local"},this.set(e,t)},setglobal:function(e,t){t.setCfg={scope:"global"},this.set(e,t)},registers:function(e,t){var n=t.args,o=Lt.registerController.registers,r="----------Registers----------

";if(!n)for(var s in o){var l=o[s].toString();l.length&&(r+="\""+s+" "+l+"
")}else{var s;n=n.join("");for(var d=0;d"}}ze(e,r)},sort:function(e,n){function o(e,t){if(l){var n;n=e,e=t,t=n}d&&(e=e.toLowerCase(),t=t.toLowerCase());var o=u&&x.exec(e),r=u&&x.exec(t);return o?(o=parseInt((o[1]+o[2]).toLowerCase(),v),r=parseInt((r[1]+r[2]).toLowerCase(),v),o-r):e");if(!d)return void ze(e,u);var h=0;(function t(){if(h=u)return void ze(e,"Invalid argument: "+n.argString.substring(i));for(var m=0,h;m<=u-p;m++)h=s(p+m),delete o.marks[h]}else return void ze(e,"Invalid argument: "+d+"-")}else delete o.marks[l]}}},Wt=new qt;return t.keyMap.vim={attach:m,detach:u,call:b},L("insertModeEscKeysTimeout",200,"number"),t.keyMap["vim-insert"]={fallthrough:["default"],attach:m,detach:u,call:b},t.keyMap["vim-replace"]={Backspace:"goCharLeft",fallthrough:["vim-insert"],attach:m,detach:u,call:b},R(),{buildKeyMap:function(){},getRegisterController:function(){return Lt.registerController},resetVimGlobalState_:R,getVimGlobalState_:function(){return Lt},maybeInitVimState_:D,suppressErrorLogging:!1,InsertModeKey:mt,map:function(e,t,n){Wt.map(e,t,n)},unmap:function(e,t){Wt.unmap(e,t)},setOption:_,getOption:M,defineOption:L,defineEx:function(e,t,n){if(!t)t=e;else if(0!==e.indexOf(t))throw new Error("(Vim.defineEx) \""+t+"\" is not a prefix of \""+e+"\", command not registered");jt[e]=n,Wt.commandMap_[t]={name:e,shortName:t,type:"api"}},handleKey:function(e,t,n){var o=this.findKey(e,t,n);if("function"==typeof o)return o()},findKey:function(n,o,r){function i(){var e=Lt.macroModeState;if(e.isRecording){if("q"==o)return e.exitMacroRecordMode(),F(n),!0;"mapping"!=r&&it(e,o)}}function s(){if(""==o)return F(n),d.visualMode?ge(n):d.insertMode&&ot(n),!0}function l(e){for(var r;e;)r=/<\w+-.+?>|<\w+>|./.exec(e),o=r[0],e=e.substring(r.index+o.length),t.Vim.handleKey(n,o,"mapping")}var d=D(n),c;return c=d.insertMode?function(){if(s())return!0;for(var t=d.inputState.keyBuffer+=o,r=1==o.length,l=Mt.matchCommand(t,e,d.inputState,"insert");1=r?-1:l.lastIndexOf(o,r-1),-1==d){if(1==i)break;i=1,r=l.length;continue}if(1==i&&dx&&(x=i.length),0>v&&(v=i.length),b=o(x,v),b==i.length)break;if(e.getTokenTypeAt(t.Pos(y,b+1))==u)if(b==x)++m;else if(! --m){g=y,f=b;break outer}++b}return null==g||s==g&&f==p?void 0:{from:t.Pos(s,p),to:t.Pos(g,f)}}}),t.registerHelper("fold","import",function(n,e){function r(r){if(rn.lastLine())return null;var s=n.getTokenAt(t.Pos(r,1));if(/\S/.test(s.string)||(s=n.getTokenAt(t.Pos(r,s.end+1))),"keyword"!=s.type||"import"!=s.string)return null;for(var l=r,i=o(n.lastLine(),r+10);l<=i;++l){var e=n.getLine(l),d=e.indexOf(";");if(-1!=d)return{startCh:s.end,end:t.Pos(l,d)}}}var i=e.line,s=r(i),l;if(!s||r(i-1)||(l=r(i-2))&&l.end.line==i-1)return null;for(var d=s.end,c;;){if(c=r(d.line+1),null==c)break;d=c.end}return{from:n.clipPos(t.Pos(i,s.startCh+1)),to:d}}),t.registerHelper("fold","include",function(e,n){function o(n){if(ne.lastLine())return null;var o=e.getTokenAt(t.Pos(n,1));if(/\S/.test(o.string)||(o=e.getTokenAt(t.Pos(n,o.end+1))),"meta"==o.type&&"#include"==o.string.slice(0,8))return o.start+8}var r=n.line,i=o(r);if(null==i||null!=o(r-1))return null;for(var s=r,l;;){if(l=o(s+1),null==l)break;++s}return{from:t.Pos(r,i+1),to:e.clipPos(t.Pos(s))}})})}}); \ No newline at end of file +(function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n=window.webpackJsonp;window.webpackJsonp=function(r,s,l){for(var d=0,i=[],p,c,u;de.avail_out&&(n=e.avail_out),0===n||(C.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function d(e,t){T._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,l(e.strm)}function p(e,t){e.pending_buf[e.pending++]=t}function c(e,t){e.pending_buf[e.pending++]=255&t>>>8,e.pending_buf[e.pending++]=255&t}function u(e,t,n,r){var o=e.avail_in;return(o>r&&(o=r),0===o)?0:(e.avail_in-=o,C.arraySet(t,e.input,e.next_in,o,n),1===e.state.wrap?e.adler=_(e.adler,t,o,n):2===e.state.wrap&&(e.adler=E(e.adler,t,o,n)),e.next_in+=o,e.total_in+=o,o)}function h(e,t){var n=e.max_chain_length,r=e.strstart,o=e.prev_length,i=e.nice_match,s=e.strstart>e.w_size-Y?e.strstart-(e.w_size-Y):0,l=e.window,d=e.w_mask,p=e.prev,c=e.strstart+Q,u=l[r+o-1],h=l[r+o],m,g;e.prev_length>=e.good_match&&(n>>=2),i>e.lookahead&&(i=e.lookahead);do{if(m=t,l[m+o]!==h||l[m+o-1]!==u||l[m]!==l[r]||l[++m]!==l[r+1])continue;r+=2,m++;do;while(l[++r]===l[++m]&&l[++r]===l[++m]&&l[++r]===l[++m]&&l[++r]===l[++m]&&l[++r]===l[++m]&&l[++r]===l[++m]&&l[++r]===l[++m]&&l[++r]===l[++m]&&ro){if(e.match_start=t,o=g,g>=i)break;u=l[r+o-1],h=l[r+o]}}while((t=p[t&d])>s&&0!=--n);return o<=e.lookahead?o:e.lookahead}function m(e){var t=e.w_size,r,o,n,i,s;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-Y)){C.arraySet(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,o=e.hash_size,r=o;do n=e.head[--r],e.head[r]=n>=t?n-t:0;while(--o);o=t,r=o;do n=e.prev[--r],e.prev[r]=n>=t?n-t:0;while(--o);i+=t}if(0===e.strm.avail_in)break;if(o=u(e.strm,e.window,e.strstart+e.lookahead,i),e.lookahead+=o,e.lookahead+e.insert>=X)for(s=e.strstart-e.insert,e.ins_h=e.window[s],e.ins_h=(e.ins_h<=X&&(e.ins_h=(e.ins_h<=X))r=T._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;else if(r=T._tr_tally(e,e.strstart-e.match_start,e.match_length-X),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=X){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<=X&&(e.ins_h=(e.ins_h<=e.match_length&&(e.strategy===B||e.match_length===X&&4096=X&&e.match_length<=e.prev_length){o=e.strstart+e.lookahead-X,r=T._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-X),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=o&&(e.ins_h=(e.ins_h<=X&&0e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=X?(r=T._tr_tally(e,1,e.match_length-X),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=T._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(d(e,!1),0===e.strm.avail_out))return oe}return e.insert=0,t===N?(d(e,!0),0===e.strm.avail_out?ie:se):e.last_lit&&(d(e,!1),0===e.strm.avail_out)?oe:ae}function y(e,t){for(var n;;){if(0===e.lookahead&&(m(e),0===e.lookahead)){if(t===I)return oe;break}if(e.match_length=0,n=T._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(d(e,!1),0===e.strm.avail_out))return oe}return e.insert=0,t===N?(d(e,!0),0===e.strm.avail_out?ie:se):e.last_lit&&(d(e,!1),0===e.strm.avail_out)?oe:ae}function b(e,t,n,r,o){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=o}function x(e){e.window_size=2*e.w_size,i(e.head),e.max_lazy_match=le[e.level].max_lazy,e.good_match=le[e.level].good_length,e.nice_match=le[e.level].nice_length,e.max_chain_length=le[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=X-1,e.match_available=0,e.ins_h=0}function v(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=j,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new C.Buf16(2*K),this.dyn_dtree=new C.Buf16(2*(2*W+1)),this.bl_tree=new C.Buf16(2*(2*H+1)),i(this.dyn_ltree),i(this.dyn_dtree),i(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new C.Buf16(G+1),this.heap=new C.Buf16(2*V+1),i(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new C.Buf16(2*V+1),i(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function k(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=z,t=e.state,t.pending=0,t.pending_out=0,0>t.wrap&&(t.wrap=-t.wrap),t.status=t.wrap?J:ne,e.adler=2===t.wrap?0:1,t.last_flush=I,T._tr_init(t),O):r(e,D)}function S(e){var t=k(e);return t===O&&x(e.state),t}function w(e,t,n,o,i,l){if(!e)return D;var d=1;if(t===P&&(t=6),0>o?(d=0,o=-o):15i||i>q||n!==j||8>o||15t||9l||l>U)return r(e,D);8===o&&(o=9);var p=new v;return e.state=p,p.strm=e,p.wrap=d,p.gzhead=null,p.w_bits=o,p.w_size=1<e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(1>=e.lookahead){if(m(e),0===e.lookahead&&t===I)return oe;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,d(e,!1),0===e.strm.avail_out))return oe;if(e.strstart-e.block_start>=e.w_size-Y&&(d(e,!1),0===e.strm.avail_out))return oe}return e.insert=0,t===N?(d(e,!0),0===e.strm.avail_out?ie:se):e.strstart>e.block_start&&(d(e,!1),0===e.strm.avail_out)?oe:oe}),new b(4,4,8,4,s),new b(4,5,16,8,s),new b(4,6,32,32,s),new b(4,4,16,16,g),new b(8,16,32,32,g),new b(8,16,128,128,g),new b(8,32,128,256,g),new b(32,128,258,1024,g),new b(32,258,258,4096,g)],t.deflateInit=function(e,t){return w(e,t,j,15,8,0)},t.deflateInit2=w,t.deflateReset=S,t.deflateResetKeep=k,t.deflateSetHeader=function(e,t){return e&&e.state?2===e.state.wrap?(e.state.gzhead=t,O):D:D},t.deflate=function(e,t){var n,d,s,u;if(!e||!e.state||t>L||0>t)return e?r(e,D):D;if(d=e.state,!e.output||!e.input&&0!==e.avail_in||d.status===re&&t!==N)return r(e,0===e.avail_out?R:D);if(d.strm=e,n=d.last_flush,d.last_flush=t,d.status===J)if(2===d.wrap)e.adler=0,p(d,31),p(d,139),p(d,8),d.gzhead?(p(d,(d.gzhead.text?1:0)+(d.gzhead.hcrc?2:0)+(d.gzhead.extra?4:0)+(d.gzhead.name?8:0)+(d.gzhead.comment?16:0)),p(d,255&d.gzhead.time),p(d,255&d.gzhead.time>>8),p(d,255&d.gzhead.time>>16),p(d,255&d.gzhead.time>>24),p(d,9===d.level?2:d.strategy>=F||2>d.level?4:0),p(d,255&d.gzhead.os),d.gzhead.extra&&d.gzhead.extra.length&&(p(d,255&d.gzhead.extra.length),p(d,255&d.gzhead.extra.length>>8)),d.gzhead.hcrc&&(e.adler=E(e.adler,d.pending_buf,d.pending,0)),d.gzindex=0,d.status=$):(p(d,0),p(d,0),p(d,0),p(d,0),p(d,0),p(d,9===d.level?2:d.strategy>=F||2>d.level?4:0),p(d,3),d.status=ne);else{var h=j+(d.w_bits-8<<4)<<8,m=-1;m=d.strategy>=F||2>d.level?0:6>d.level?1:6===d.level?2:3,h|=m<<6,0!==d.strstart&&(h|=32),h+=31-h%31,d.status=ne,c(d,h),0!==d.strstart&&(c(d,e.adler>>>16),c(d,65535&e.adler)),e.adler=1}if(d.status===$)if(d.gzhead.extra){for(s=d.pending;d.gzindex<(65535&d.gzhead.extra.length)&&!(d.pending===d.pending_buf_size&&(d.gzhead.hcrc&&d.pending>s&&(e.adler=E(e.adler,d.pending_buf,d.pending-s,s)),l(e),s=d.pending,d.pending===d.pending_buf_size));)p(d,255&d.gzhead.extra[d.gzindex]),d.gzindex++;d.gzhead.hcrc&&d.pending>s&&(e.adler=E(e.adler,d.pending_buf,d.pending-s,s)),d.gzindex===d.gzhead.extra.length&&(d.gzindex=0,d.status=Z)}else d.status=Z;if(d.status===Z)if(d.gzhead.name){s=d.pending;do{if(d.pending===d.pending_buf_size&&(d.gzhead.hcrc&&d.pending>s&&(e.adler=E(e.adler,d.pending_buf,d.pending-s,s)),l(e),s=d.pending,d.pending===d.pending_buf_size)){u=1;break}u=d.gzindexs&&(e.adler=E(e.adler,d.pending_buf,d.pending-s,s)),0===u&&(d.gzindex=0,d.status=ee)}else d.status=ee;if(d.status===ee)if(d.gzhead.comment){s=d.pending;do{if(d.pending===d.pending_buf_size&&(d.gzhead.hcrc&&d.pending>s&&(e.adler=E(e.adler,d.pending_buf,d.pending-s,s)),l(e),s=d.pending,d.pending===d.pending_buf_size)){u=1;break}u=d.gzindexs&&(e.adler=E(e.adler,d.pending_buf,d.pending-s,s)),0===u&&(d.status=te)}else d.status=te;if(d.status===te&&(d.gzhead.hcrc?(d.pending+2>d.pending_buf_size&&l(e),d.pending+2<=d.pending_buf_size&&(p(d,255&e.adler),p(d,255&e.adler>>8),e.adler=0,d.status=ne)):d.status=ne),0!==d.pending){if(l(e),0===e.avail_out)return d.last_flush=-1,O;}else if(0===e.avail_in&&o(t)<=o(n)&&t!==N)return r(e,R);if(d.status===re&&0!==e.avail_in)return r(e,R);if(0!==e.avail_in||0!==d.lookahead||t!==I&&d.status!==re){var g=d.strategy===F?y(d,t):d.strategy===3?f(d,t):le[d.level].func(d,t);if((g===ie||g===se)&&(d.status=re),g===oe||g===ie)return 0===e.avail_out&&(d.last_flush=-1),O;if(g===ae&&(t===1?T._tr_align(d):t!==L&&(T._tr_stored_block(d,0,0,!1),t===3&&(i(d.head),0===d.lookahead&&(d.strstart=0,d.block_start=0,d.insert=0))),l(e),0===e.avail_out))return d.last_flush=-1,O}return t===N?0>=d.wrap?M:(2===d.wrap?(p(d,255&e.adler),p(d,255&e.adler>>8),p(d,255&e.adler>>16),p(d,255&e.adler>>24),p(d,255&e.total_in),p(d,255&e.total_in>>8),p(d,255&e.total_in>>16),p(d,255&e.total_in>>24)):(c(d,e.adler>>>16),c(d,65535&e.adler)),l(e),0=o.w_size&&(0===n&&(i(o.head),o.strstart=0,o.block_start=0,o.insert=0),u=new C.Buf8(o.w_size),C.arraySet(u,t,r-o.w_size,o.w_size,0),t=u,r=o.w_size),d=e.avail_in,p=e.next_in,c=e.input,e.avail_in=r,e.next_in=0,e.input=t,m(o);o.lookahead>=X;){s=o.strstart,l=o.lookahead-(X-1);do o.ins_h=(o.ins_h<e?Z[e]:Z[256+(e>>>7)]}function d(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=255&t>>>8}function p(e,t,n){e.bi_valid>j-n?(e.bi_buf|=65535&t<>j-e.bi_valid,e.bi_valid+=n-j):(e.bi_buf|=65535&t<>>=1,n<<=1;while(0<--t);return n>>>1}function u(e){16===e.bi_valid?(d(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}function h(e,t){var r=t.dyn_tree,o=t.max_code,i=t.stat_desc.static_tree,s=t.stat_desc.has_stree,l=t.stat_desc.extra_bits,d=t.stat_desc.extra_base,p=t.stat_desc.max_length,c=0,u,h,n,m,g,y;for(m=0;m<=z;m++)e.bl_count[m]=0;for(r[2*e.heap[e.heap_max]+1]=0,u=e.heap_max+1;up&&(m=p,c++),r[2*h+1]=m,!(h>o))&&(e.bl_count[m]++,g=0,h>=d&&(g=l[h-d]),y=r[2*h],e.opt_len+=y*(m+g),s&&(e.static_len+=y*(i[2*h+1]+g)));if(0!=c){do{for(m=p-1;0===e.bl_count[m];)m--;e.bl_count[m]--,e.bl_count[m+1]+=2,e.bl_count[p]--,c-=2}while(0o))&&(r[2*n+1]!==m&&(e.opt_len+=(m-r[2*n+1])*r[2*n],r[2*n+1]=m),h--)}}function g(e,t,r){var o=Array(z+1),i=0,l,d;for(l=1;l<=z;l++)o[l]=i=i+r[l-1]<<1;for(d=0;d<=t;d++){var n=e[2*d+1];0!==n&&(e[2*d]=s(o[n]++,n))}}function m(){var e=Array(z+1),t,n,r,i,l;for(r=0,i=0;ii;i++)for(ne[i]=l,t=0;t<1<>=7;i=t;)J[2*t+1]=8,t++,e[8]++;for(;255>=t;)J[2*t+1]=9,t++,e[9]++;for(;279>=t;)J[2*t+1]=7,t++,e[7]++;for(;287>=t;)J[2*t+1]=8,t++,e[8]++;for(g(J,P+1,e),t=0;te.heap_len;)p=e.heap[++e.heap_len]=2>l?++l:0,r[2*p]=1,e.depth[p]=0,e.opt_len--,i&&(e.static_len-=o[2*p+1]);for(t.max_code=l,d=e.heap_len>>1;1<=d;d--)v(e,r,d);p=s;do d=e.heap[1],e.heap[1]=e.heap[e.heap_len--],v(e,r,1),n=e.heap[1],e.heap[--e.heap_max]=d,e.heap[--e.heap_max]=n,r[2*p]=r[2*d]+r[2*n],e.depth[p]=(e.depth[d]>=e.depth[n]?e.depth[d]:e.depth[n])+1,r[2*d+1]=r[2*n+1]=p,e.heap[1]=p++,v(e,r,1);while(2<=e.heap_len);e.heap[--e.heap_max]=e.heap[1],h(e,t),g(r,l,e.bl_count)}function w(e,t,r){var o=-1,i=t[1],s=0,l=7,d=4,p,n;for(0===i&&(l=138,d=3),t[2*(r+1)+1]=65535,p=0;p<=r;p++){if(n=i,i=t[2*(p+1)+1],++s=s?e.bl_tree[2*H]++:e.bl_tree[2*K]++:(n!==o&&e.bl_tree[2*n]++,e.bl_tree[2*W]++);s=0,o=n,0===i?(l=138,d=3):n===i?(l=6,d=3):(l=7,d=4)}}function C(e,t,r){var o=-1,i=t[1],s=0,l=7,d=4,u,n;for(0===i&&(l=138,d=3),u=0;u<=r;u++){if(n=i,i=t[2*(u+1)+1],++s=s?(c(e,H,e.bl_tree),p(e,s-3,3)):(c(e,K,e.bl_tree),p(e,s-11,7)):(n!==o&&(c(e,n,e.bl_tree),s--),c(e,W,e.bl_tree),p(e,s-3,2));s=0,o=n,0===i?(l=138,d=3):n===i?(l=6,d=3):(l=7,d=4)}}function T(e){var t;for(w(e,e.dyn_ltree,e.l_desc.max_code),w(e,e.dyn_dtree,e.d_desc.max_code),S(e,e.bl_desc),t=F-1;3<=t&&0===e.bl_tree[2*Y[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}function _(e,t,n,r){var o;for(p(e,t-257,5),p(e,n-1,5),p(e,r-4,4),o=0;o=r;r++,t>>>=1)if(1&t&&0!==e.dyn_ltree[2*r])return N;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return L;for(r=32;r>>3,s=e.static_len+3+7>>>3,s<=i&&(i=s)):i=s=n+5,n+4<=i&&-1!==t?A(e,t,n,r):e.strategy===4||s===i?(p(e,(M<<1)+(r?1:0),3),k(e,J,$)):(p(e,(2<<1)+(r?1:0),3),_(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),k(e,e.dyn_ltree,e.dyn_dtree)),f(e),r&&y(e)},t._tr_tally=function(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=255&t>>>8,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(ee[n]+R+1)]++,e.dyn_dtree[2*l(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){p(e,M<<1,3),c(e,V,J),u(e)}},"/+WI":function(e){"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},"/QFk":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e,t,n){t=t||e.getCursor();var r=d(e,t),o=(0,ce.default)(de({field:we},e.getOption("emmet"),n),{syntax:r}),i=e.getModeAt(t);return"jsx"===r?(o.profile=de({selfClosingStyle:"xml"},o.profile),o.options=de({jsx:!0},o.options)):"xml"===i.name&&(o.profile=de({selfClosingStyle:i.configuration},o.profile)),o}function d(e,t){var n=e.getMode();if("jsx"===n.name||"javascript"===n.name)return n.name;var r=e.getModeAt(t);return"xml"===r.name?"html":r.name}function p(e,t){return e.line-t.line||e.ch-t.ch}function c(e){return e.getOption("indentWithTabs")?"\t":m(" ",e.getOption("indentUnit"))}function u(e,t,n){var r=h(t),o=c(e);return"\t"!==o&&(r=r.map(function(e){return e.replace(/^\t+/,function(e){return m(o,e.length)})})),n&&(r=r.map(function(e,t){return t?n+e:e})),r.join("\n")}function h(e){return Array.isArray(e)?e:e.split(/\r\n|\r|\n/g)}function m(e,t){for(var n="";0y(t,e.to):0<=y(t,e.from)&&0>=y(t,e.to)}function y(e,t){return e.line-t.line||e.ch-t.ch}function b(e){return{from:e.start,to:e.end}}function x(e,t,n){var r=new Ce(e,t);if(r.eatWhile(fe.isSpace),t=r.pos,n){for(r.pos=n,r.backUp();!r.sof()&&(0,fe.isSpace)(r.peek());)r.backUp();r.next(),n=r.pos}else n=t;return{from:t,to:n}}function v(e,t){for(var n=t.line,r=t.ch,o=void 0;0<=r;){if(o=e.getTokenAt({line:n,ch:r}),"property"===o.type)return o.string;if(o.start!==r)r=o.start;else break}}function k(e,t){var n=e.getModeAt(t);if(n&&"css"===n.name){var r=e.getTokenAt(t),o=r.state&&r.state.localState||r.state;return o&&o.context&&"prop"===o.context.type}return!1}function S(e,t,n){var r=l(e,t);if(n&&!w(e,t,r))return null;var o=(0,be.default)(e.getLine(t.line),t.ch,{lookAhead:!0,syntax:r.type,prefix:"jsx"===r.syntax&&e.getOption("jsxBracket")?"<":""});if(o){var i={line:t.line,ch:o.start},s={line:t.line,ch:o.end};return"stylesheet"===r.type&&n&&k(e,t)&&(r.options=de({property:v(e,t)},r.options)),{abbreviation:o.abbreviation,range:{from:i,to:s},config:r}}}function w(e,t,n){var r=e.getTokenTypeAt(t);return"stylesheet"===n.type?"comment"!==r&&"string"!==r:"html"===n.syntax?null===r:"slim"===n.syntax||"pug"===n.syntax?null===r||"tag"===r||r&&/attribute/.test(r):"haml"===n.syntax?null===r||"attribute"===r:"jsx"===n.syntax}function C(e,t,n){var r=e.getLine(t.from.line),o=r.match(/^\s+/),i=u(e,n,o&&o[0]),s=(0,ge.default)(i);return e.operation(function(){e.replaceRange(s.string,t.from,t.to);var n=e.indexFromPos(t.from);if(s.fields.length){var r=s.fields[0],o=e.posFromIndex(r.location+n),i=e.posFromIndex(r.location+r.length+n);e.setSelection(o,i)}else e.setCursor(e.posFromIndex(n+s.string.length));return!0})}function T(e,t,n){var r=_(e,t);if(r&&r.model)return r.model;var o=S(e,t,n);if(o)try{var i=new _e(o.abbreviation,o.range,o.config);return i.valid(e,n)?i:null}catch(e){}}function _(e,t){for(var n=e.findMarksAt(t),r=0,o;r"===o.string&&"tag bracket"===i.type&&"y(t.anchor,t.head)?{from:t.anchor,to:t.head}:{from:t.head,to:t.anchor}}return B(e,e.getCursor())}function B(e,t){var n=e.getEmmetDocumentModel(),r=n&&n.nodeForPoint(t);if(!r)return null;if(F(r.open,t)||F(r.close,t))return b(r);var o=r.open.end,i=r.close?r.close.start:r.open.end;return x(e,o,i)}function F(e,t){return e&&f(b(e),t)}function U(e,t,n){n(window.prompt(t))}function z(e,t){var n=_(e,t);if(n)return n;E(e);var r=T(e,t,!0);if(r)return A(e,r)}function j(e,t){t=t||e.getCursor();var n=[],r=T(e,t,!0);r&&r.abbreviation!==r.snippet&&n.push(G(e,t,r));var o=r?r.config:l(e,t);return n="stylesheet"===o.type?n.concat(V(e,t,o)):n.concat(q(e,t,o)),{type:o.type,syntax:o.syntax,abbreviation:r,completions:n.filter(Boolean)}}function q(e,t,n){var r=e.getLine(t.line).slice(0,t.ch),o=X(r,/[\w:\-$@]/);if(o){var i={from:{line:t.line,ch:t.ch-o.length},to:t};return W(e,t,n).filter(function(e){return e.key!==o&&0===e.key.indexOf(o)}).map(function(t){return new Ee("snippet",e,i,t.key,t.preview,t.snippet)})}return[]}function V(e,t,n){var r=e.getLine(t.line).slice(0,t.ch),o=X(r,/[\w-@$]/);if(o){var i={from:{line:t.line,ch:t.ch-o.length},to:t};if(n.options&&n.options.property){var s=n.options.property.toLowerCase(),l=W(e,t,n).find(function(e){return e.property&&e.property===s});if(l&&l.keywords.length)return l.keywords.map(function(t){return 0===t.key.indexOf(o)&&new Ee("value",e,i,t.key,t.preview,t.snippet)}).filter(Boolean)}else return W(e,t,n).filter(function(e){return e.key!==o&&0===e.key.indexOf(o)}).map(function(t){return new Ee("snippet",e,i,t.key,t.preview,t.snippet)})}return[]}function W(e,t,n){var r=n.type,o=n.syntax;e.state.emmetCompletions||(e.state.emmetCompletions={});var i=e.state.emmetCompletions;if(!(o in i)){var s=(0,xe.createSnippetsRegistry)(r,o,n.snippets);i[o]="stylesheet"===r?H(s,n):K(s,n)}return i[o]}function H(e){return(0,ve.convertToCSSSnippets)(e).map(function(e){var t=e.property,n=e.keywords();return n.length?t+=": "+g(n.join(" | ")):e.value&&(t+=": "+g(e.value)),{key:e.key,value:e.value,snippet:e.key,property:e.property,keywords:n.map(function(e){var t=e.match(/^[\w-]+/);return t&&{key:t[0],preview:g(e),snippet:e}}).filter(Boolean),preview:t}})}function K(e,t){return e.all({type:"string"}).map(function(e){return{key:e.key,value:e.value,preview:g((0,xe.expand)(e.value,t)),snippet:e.key}})}function G(e,t,n){var r=n.preview;return 500=p(this.pos,this._sof)},t.prototype.eof=function(){return 0<=p(this.pos,this._eof)},t.prototype.limit=function(e,t){return new this.constructor(this.editor,e,{from:e,to:t})},t.prototype.peek=function(){var e=this.pos,t=e.line,n=e.ch,r=this.editor.getLine(t);return n=this._lineLength(this.pos.line)&&(this.pos.line++,this.pos.ch=0),this.eof()&&(this.pos=de({},this._eof)),e}return NaN},t.prototype.backUp=function(e){var t=this.editor.constructor,n=this.pos,r=n.line,o=n.ch;for(o-=e||1;0<=r&&0>o;)r--,o+=this._lineLength(r);return this.pos=0>r||0>o?t.Pos(0,0):t.Pos(r,o),this.peek()},t.prototype.current=function(){return this.substring(this.start,this.pos)},t.prototype.substring=function(e,t){return this.editor.getRange(e,t)},t.prototype.error=function(e){var t=new Error(e+" at line "+this.pos.line+", column "+this.pos.ch);return t.originalMessage=e,t.pos=this.pos,t.string=this.string,t},t.prototype._lineLength=function(e){var t=e===this.editor.lastLine();return this.editor.getLine(e).length+(t?0:1)},t}(he.default),Te="emmet-abbreviation",_e=function(){function e(t,n,r){o(this,e),this.abbreviation=t,this.range=n,this.config=r,this.ast=(0,xe.parse)(t,r),this.snippet=(0,xe.expand)(this.ast,r),this.preview=g(this.snippet)}return e.prototype.insert=function(e,t){return C(e,t||this.range,this.snippet)},e.prototype.valid=function(e,t){return this.preview&&this.abbreviation!==this.preview&&(t&&"stylesheet"===this.config.type?this._isValidForStylesheet(e):!0)},e.prototype._isValidForStylesheet=function(e){var t=this.range.from,n=e.getTokenAt(t);if(/^[#!]/.test(this.abbreviation))return k(e,t);var r=this.ast.children.every(function(e){return e.name}),o=n.state&&n.state.localState||n.state;return!r||"sass"===this.config.syntax||o&&o.context&&"block"===o.context.type},e}(),Ee=function(){function e(t,n,r,i,s,l){o(this,e),this.type=t,this.editor=n,this.range=r,this.name=i,this.preview=s,this.snippet=l,this._inserted=!1}return e.prototype.insert=function(){this._inserted||(this._inserted=!0,"function"==typeof this.snippet?this.snippet(this.editor,this.range):C(this.editor,this.range,this.snippet),E(this.editor))},e}(),Ae=function(){function e(t,n,r){o(this,e),this.dom=t,this.type=n,this.syntax=r}return e.prototype.nodeForPoint=function(e,t){for(var n=this.dom.firstChild,r=null;n;)f(b(n),e,t)?(r=n,n=n.firstChild):n=n.nextSibling;return r},e}(),Ie="emmet-open-tag",Ne="emmet-close-tag";t.default=function(e){de(e.commands,{emmetExpandAbbreviation:function(e){return N(e,!0)},emmetExpandAbbreviationAll:function(e){return N(e,!1)},emmetInsertLineBreak:L,emmetWrapWithAbbreviation:R});var t=function(e){return z(e,e.getCursor())};e.defineOption("markEmmetAbbreviation",!0,function(e,n){n?e.on("change",t):(e.off("change",t),E(e))}),e.defineOption("autoRenameTags",!0,function(e,t){t?e.on("change",ie):e.off("change",ie)}),e.defineOption("jsxBracket",!0),e.defineOption("markTagPairs",!1,function(e,t){t?(e.on("cursorActivity",ee),e.on("change",$)):(e.off("cursorActivity",ee),e.off("change",$),$(e),ne(e))}),e.defineOption("emmet",{}),e.defineExtension("getEmmetCompletions",function(e,t){var n=this;"boolean"==typeof e&&(t=e,e=null),e=e||n.getCursor();var r=j(n,e);if(r&&r.completions.length)return n.getOption("markEmmetAbbreviation")&&!_(n,e)&&t&&(E(n),A(r.model)),{from:r.abbreviation.range.from,to:r.abbreviation.range.to,list:r.completions}}),e.defineExtension("getEmmetAbbreviation",function(e,t){return T(this,e||this.getCursor(),t)}),e.defineExtension("findEmmetMarker",function(e){return _(this,e||this.getCursor())}),e.defineExtension("getEmmetDocumentModel",function(){var e=this;return e.getOption("markTagPairs")?J(e):Y(e)})}},"/rE2":function(e,t,n){"use strict";function r(e,t){var n=new Set;(function e(r){var i=t.resolve(r.name);if(i&&!n.has(i)){if("function"==typeof i.value)return i.value(r,t,e);var s=(0,c.default)(i.value);n.add(i),s.walk(e),n.delete(i);var d=l(s);for(o(d,r);s.firstChild;)r.parent.insertBefore(s.firstChild,r);d.parent.insertBefore(r,d),d.remove()}})(e)}function o(e,t){return t.name=e.name,e.selfClosing&&(t.selfClosing=!0),null!=e.value&&(t.value=e.value),e.repeat&&(t.repeat=d({},e.repeat)),i(e,t)}function i(e,t){s(e,t);for(var n=new Map,r=e.attributes,o=0;o=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function i(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function s(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t)if(o(e))continue;else return;if(!r(e,t+1)){e.ch=t+1;continue}var n=e.text.lastIndexOf("/",t),i=-1",e.ch-1):-1;if(-1==t)if(i(e))continue;else return;if(!r(e,t+1)){e.ch=t;continue}var n=e.text.lastIndexOf("/",t),o=-1c&&(!t||t==r[2]))return{tag:r[2],from:h(o,l),to:h(e.line,e.ch)}}else n.push(r[2])}}function u(e,t){for(var n=[],r;;){if(r=p(e),!r)return;if("selfClose"==r){l(e);continue}var o=e.line,s=e.ch,d=l(e);if(!d)return;if(d[1])n.push(d[2]);else{for(var c=n.length-1;0<=c;--c)if(n[c]==d[2]){n.length=c;break}if(0>c&&(!t||t==d[2]))return{tag:d[2],from:h(e.line,e.ch),to:h(o,s)}}}}var h=e.Pos,m=/<(\/?)([A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD-:.0-9\u00B7\u0300-\u036F\u203F-\u2040]*)/g;e.registerHelper("fold","xml",function(e,r){for(var o=new n(e,r.line,0),i;;){if(i=d(o),!i||o.line!=r.line)return;var l=s(o);if(!l)return;if(!i[1]&&"selfClose"!=l){var p=h(o.line,o.ch),u=c(o,i[2]);return u&&0")||-1!=i.text.indexOf("<")){var d=s(i),p=d&&h(i.line,i.ch),m=d&&l(i);if(d&&m&&!(0p);u++)i=e.getLine(d++),c=null==c?i:c+"\n"+i;l*=2,t.lastIndex=s.ch;var h=t.exec(c);if(h){var g=c.slice(0,h.index).split("\n"),f=h[0].split("\n"),y=s.line+g.length-1,b=g[g.length-1].length;return{from:m(y,b),to:m(y+f.length-1,1==f.length?b+f[0].length:f[f.length-1].length),match:h}}}}function s(e,t){for(var n=0,r;;){t.lastIndex=n;var o=t.exec(e);if(!o)return r;if(r=o,n=r.index+(r[0].length||1),n==e.length)return r}}function l(e,t,r){t=n(t,"g");for(var o=r.line,i=r.ch,l=e.firstLine(),d;o>=l;o--,i=-1){d=e.getLine(o),-1=d;){for(var c=0,i;c>1,l=r(e.slice(0,s)).length;if(l==n)return s;l>n?i=s:o=s+1}}function c(e,t,n,r){if(!t.length)return null;var o=r?g:f,s=o(t).split(/\r|\n\r?/);search:for(var l=n.line,d=n.ch,c=e.lastLine()+1-s.length;l<=c;l++,d=0){var u=e.getLine(l).slice(d),h=o(u);if(1==s.length){var y=h.indexOf(s[0]);if(-1==y)continue search;var n=p(u,h,y,o)+d;return{from:m(l,p(u,h,y,o)+d),to:m(l,p(u,h,y+s[0].length,o)+d)}}var b=h.length-s[0].length;if(h.slice(b)!=s[0])continue search;for(var x=1;x=c;l--,d=-1){u=e.getLine(l),-1C&&(T=C),0==C)return f[y++]=20971520,f[y++]=20971520,x.bits=1,0;for(w=1;wA)return-1;if(0i||e===p&&I>s)return 1;for(;;){V=k-E,b[S]q?(W=R[P+b[S]],H=L[O+b[S]]):(W=96,H=0),B=1<>E)+F]=0|(V<<24|W<<16|H);while(0!==F);for(B=1<>=1;if(0===B?N=0:(N&=B-1,N+=B),S++,0==--M[k]){if(k==C)break;k=t[n+b[S]]}if(k>T&&(N&z)!==U){for(0==E&&(E=T),j+=w,_=k-E,A=1<<_;_+E=A));)_++,A<<=1;if(I+=1<<_,e===d&&I>i||e===p&&I>s)return 1;U=N&z,f[U]=0|(T<<24|_<<16|j-y)}}return 0!==N&&(f[j+N]=0|(4194304|k-E<<24)),x.bits=T,0}},"34Q3":function(e,t,n){"use strict";function r(e,t){if(65537>t&&(e.subarray&&d||!e.subarray&&l))return o.apply(null,s.shrinkBuf(e,t));for(var n="",r=0;ri;i++)p[i]=252<=i?6:248<=i?5:240<=i?4:224<=i?3:192<=i?2:1;p[254]=p[254]=1,t.string2buf=function(e){var t=e.length,n=0,r,o,l,d,p;for(d=0;do?1:2048>o?2:65536>o?3:4;for(r=new s.Buf8(n),p=0,d=0;po?r[p++]=o:2048>o?(r[p++]=192|o>>>6,r[p++]=128|63&o):65536>o?(r[p++]=224|o>>>12,r[p++]=128|63&o>>>6,r[p++]=128|63&o):(r[p++]=240|o>>>18,r[p++]=128|63&o>>>12,r[p++]=128|63&o>>>6,r[p++]=128|63&o);return r},t.buf2binstring=function(e){return r(e,e.length)},t.binstring2buf=function(e){for(var t=new s.Buf8(e.length),n=0,r=t.length;nl){o[i++]=l;continue}if(d=p[l],4l?o[i++]=l:(l-=65536,o[i++]=55296|1023&l>>10,o[i++]=56320|1023&l)}return r(o,i)},t.utf8border=function(e,t){var n;for(t=t||e.length,t>e.length&&(t=e.length),n=t-1;0<=n&&128==(192&e[n]);)n--;return 0>n?t:0===n?t:n+p[e[n]]>t?n:t}},"38Wu":function(e,t,n){"use strict";function r(e,t){for(var n in e)t[n]=e[n]}function o(e,t,n){return s(e,t,n)}var i=n("dskh"),s=i.Buffer;s.from&&s.alloc&&s.allocUnsafe&&s.allocUnsafeSlow?e.exports=i:(r(i,t),t.Buffer=o),r(s,o),o.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return s(e,t,n)},o.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=s(e);return void 0===t?r.fill(0):"string"==typeof n?r.fill(t,n):r.fill(t),r},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return s(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i.SlowBuffer(e)}},"3Rhr":function(e){"use strict";e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3]);}return e.apply(n,t)}},"3Vd+":function(e){"use strict";var t=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=t)},"3bh8":function(e,t,n){"use strict";var r=n("z3uY"),o=n("HyWd");e.exports=n("s0rf")?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},"4Bm0":function(e){"use strict";e.exports="function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},"4E2n":function(e,t){"use strict";var n=String.fromCharCode;(function(t,n){e.exports=n()})(void 0,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){function r(e,t,n){var r=null,l=function(e,t){n&&n(e,t),r&&r.visit(e,t)},d="function"==typeof n?l:null,p=!1;if(t){p="boolean"==typeof t.comment&&t.comment;var c="boolean"==typeof t.attachComment&&t.attachComment;(p||c)&&(r=new o.CommentHandler,r.attach=c,t.comment=!0,d=l)}var u=!1;t&&"string"==typeof t.sourceType&&(u="module"===t.sourceType);var h=t&&"boolean"==typeof t.jsx&&t.jsx?new i.JSXParser(e,t,d):new s.Parser(e,t,d);var m=u?h.parseModule():h.parseScript(),g=m;return p&&r&&(g.comments=r.comments),h.config.tokens&&(g.tokens=h.tokens),h.config.tolerant&&(g.errors=h.errorHandler.errors),g}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=n(3),s=n(8),l=n(15);t.parse=r,t.parseModule=function(e,t,n){var o=t||{};return o.sourceType="module",r(e,o,n)},t.parseScript=function(e,t,n){var o=t||{};return o.sourceType="script",r(e,o,n)},t.tokenize=function(e,t,n){var r=new l.Tokenizer(e,t),o;o=[];try{for(;;){var i=r.getNextToken();if(!i)break;n&&(i=n(i)),o.push(i)}}catch(t){r.errorHandler.tolerate(t)}return r.errorHandler.tolerant&&(o.errors=r.errors()),o};var d=n(2);t.Syntax=d.Syntax,t.version="4.0.0"},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=function(){function e(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return e.prototype.insertInnerComments=function(e,t){if(e.type===r.Syntax.BlockStatement&&0===e.body.length){for(var n=[],o=this.leading.length-1,i;0<=o;--o)i=this.leading[o],t.end.offset>=i.start&&(n.unshift(i.comment),this.leading.splice(o,1),this.trailing.splice(o,1));n.length&&(e.innerComments=n)}},e.prototype.findTrailingComments=function(e){var t=[];if(0=e.end.offset&&t.unshift(r.comment);return this.trailing.length=0,t}var o=this.stack[this.stack.length-1];if(o&&o.node.trailingComments){var i=o.node.trailingComments[0];i&&i.range[0]>=e.end.offset&&(t=o.node.trailingComments,delete o.node.trailingComments)}return t},e.prototype.findLeadingComments=function(e){for(var t=[],n,r;0=e.start.offset);)n=r.node,this.stack.pop();if(n){for(var o=n.leadingComments?n.leadingComments.length:0,s=o-1,i;0<=s;--s)i=n.leadingComments[s],i.range[1]<=e.start.offset&&(t.unshift(i),n.leadingComments.splice(s,1));return n.leadingComments&&0===n.leadingComments.length&&delete n.leadingComments,t}for(var s=this.leading.length-1,r;0<=s;--s)r=this.leading[s],r.start<=e.start.offset&&(t.unshift(r.comment),this.leading.splice(s,1));return t},e.prototype.visitNode=function(e,t){if(!(e.type===r.Syntax.Program&&0");)t=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute(),e.push(t);return e},t.prototype.parseJSXOpeningElement=function(){var e=this.createJSXNode();this.expectJSX("<");var t=this.parseJSXElementName(),n=this.parseJSXAttributes(),r=this.matchJSX("/");return r&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new l.JSXOpeningElement(t,r,n))},t.prototype.parseJSXBoundaryElement=function(){var e=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var t=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(e,new l.JSXClosingElement(t))}var n=this.parseJSXElementName(),r=this.parseJSXAttributes(),o=this.matchJSX("/");return o&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new l.JSXOpeningElement(n,o,r))},t.prototype.parseJSXEmptyExpression=function(){var e=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(e,new l.JSXEmptyExpression)},t.prototype.parseJSXExpressionContainer=function(){var e=this.createJSXNode();this.expectJSX("{");var t;return this.matchJSX("}")?(t=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),t=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(e,new l.JSXExpressionContainer(t))},t.prototype.parseJSXChildren=function(){for(var e=[];!this.scanner.eof();){var t=this.createJSXChildNode(),n=this.nextJSXText();if(n.starte?n(e):n(55296+(e-65536>>10))+n(56320+(1023&e-65536))},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||5760<=e&&0<=[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStart:function(e){return 36===e||95===e||65<=e&&90>=e||97<=e&&122>=e||92===e||128<=e&&r.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(e))},isIdentifierPart:function(e){return 36===e||95===e||65<=e&&90>=e||97<=e&&122>=e||48<=e&&57>=e||92===e||128<=e&&r.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(e))},isDecimalDigit:function(e){return 48<=e&&57>=e},isHexDigit:function(e){return 48<=e&&57>=e||65<=e&&70>=e||97<=e&&102>=e},isOctalDigit:function(e){return 48<=e&&55>=e}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),o=function(){return function(e){this.type=r.JSXSyntax.JSXClosingElement,this.name=e}}();t.JSXClosingElement=o;var i=function(){return function(e,t,n){this.type=r.JSXSyntax.JSXElement,this.openingElement=e,this.children=t,this.closingElement=n}}();t.JSXElement=i;var s=function(){return function(){this.type=r.JSXSyntax.JSXEmptyExpression}}();t.JSXEmptyExpression=s;var l=function(){return function(e){this.type=r.JSXSyntax.JSXExpressionContainer,this.expression=e}}();t.JSXExpressionContainer=l;var d=function(){return function(e){this.type=r.JSXSyntax.JSXIdentifier,this.name=e}}();t.JSXIdentifier=d;var p=function(){return function(e,t){this.type=r.JSXSyntax.JSXMemberExpression,this.object=e,this.property=t}}();t.JSXMemberExpression=p;var c=function(){return function(e,t){this.type=r.JSXSyntax.JSXAttribute,this.name=e,this.value=t}}();t.JSXAttribute=c;var u=function(){return function(e,t){this.type=r.JSXSyntax.JSXNamespacedName,this.namespace=e,this.name=t}}();t.JSXNamespacedName=u;var h=function(){return function(e,t,n){this.type=r.JSXSyntax.JSXOpeningElement,this.name=e,this.selfClosing=t,this.attributes=n}}();t.JSXOpeningElement=h;var m=function(){return function(e){this.type=r.JSXSyntax.JSXSpreadAttribute,this.argument=e}}();t.JSXSpreadAttribute=m;var g=function(){return function(e,t){this.type=r.JSXSyntax.JSXText,this.value=e,this.raw=t}}();t.JSXText=g},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=function(){return function(e){this.type=r.Syntax.ArrayExpression,this.elements=e}}();t.ArrayExpression=o;var i=function(){return function(e){this.type=r.Syntax.ArrayPattern,this.elements=e}}();t.ArrayPattern=i;var s=function(){return function(e,t,n){this.type=r.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n,this.async=!1}}();t.ArrowFunctionExpression=s;var l=function(){return function(e,t,n){this.type=r.Syntax.AssignmentExpression,this.operator=e,this.left=t,this.right=n}}();t.AssignmentExpression=l;var d=function(){return function(e,t){this.type=r.Syntax.AssignmentPattern,this.left=e,this.right=t}}();t.AssignmentPattern=d;var p=function(){return function(e,t,n){this.type=r.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n,this.async=!0}}();t.AsyncArrowFunctionExpression=p;var c=function(){return function(e,t,n){this.type=r.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=n,this.generator=!1,this.expression=!1,this.async=!0}}();t.AsyncFunctionDeclaration=c;var u=function(){return function(e,t,n){this.type=r.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=n,this.generator=!1,this.expression=!1,this.async=!0}}();t.AsyncFunctionExpression=u;var h=function(){return function(e){this.type=r.Syntax.AwaitExpression,this.argument=e}}();t.AwaitExpression=h;var m=function(){return function(e,t,n){this.type="||"===e||"&&"===e?r.Syntax.LogicalExpression:r.Syntax.BinaryExpression,this.operator=e,this.left=t,this.right=n}}();t.BinaryExpression=m;var g=function(){return function(e){this.type=r.Syntax.BlockStatement,this.body=e}}();t.BlockStatement=g;var f=function(){return function(e){this.type=r.Syntax.BreakStatement,this.label=e}}();t.BreakStatement=f;var y=function(){return function(e,t){this.type=r.Syntax.CallExpression,this.callee=e,this.arguments=t}}();t.CallExpression=y;var b=function(){return function(e,t){this.type=r.Syntax.CatchClause,this.param=e,this.body=t}}();t.CatchClause=b;var x=function(){return function(e){this.type=r.Syntax.ClassBody,this.body=e}}();t.ClassBody=x;var v=function(){return function(e,t,n){this.type=r.Syntax.ClassDeclaration,this.id=e,this.superClass=t,this.body=n}}();t.ClassDeclaration=v;var k=function(){return function(e,t,n){this.type=r.Syntax.ClassExpression,this.id=e,this.superClass=t,this.body=n}}();t.ClassExpression=k;var S=function(){return function(e,t){this.type=r.Syntax.MemberExpression,this.computed=!0,this.object=e,this.property=t}}();t.ComputedMemberExpression=S;var w=function(){return function(e,t,n){this.type=r.Syntax.ConditionalExpression,this.test=e,this.consequent=t,this.alternate=n}}();t.ConditionalExpression=w;var C=function(){return function(e){this.type=r.Syntax.ContinueStatement,this.label=e}}();t.ContinueStatement=C;var T=function(){return function(){this.type=r.Syntax.DebuggerStatement}}();t.DebuggerStatement=T;var _=function(){return function(e,t){this.type=r.Syntax.ExpressionStatement,this.expression=e,this.directive=t}}();t.Directive=_;var E=function(){return function(e,t){this.type=r.Syntax.DoWhileStatement,this.body=e,this.test=t}}();t.DoWhileStatement=E;var A=function(){return function(){this.type=r.Syntax.EmptyStatement}}();t.EmptyStatement=A;var I=function(){return function(e){this.type=r.Syntax.ExportAllDeclaration,this.source=e}}();t.ExportAllDeclaration=I;var N=function(){return function(e){this.type=r.Syntax.ExportDefaultDeclaration,this.declaration=e}}();t.ExportDefaultDeclaration=N;var L=function(){return function(e,t,n){this.type=r.Syntax.ExportNamedDeclaration,this.declaration=e,this.specifiers=t,this.source=n}}();t.ExportNamedDeclaration=L;var O=function(){return function(e,t){this.type=r.Syntax.ExportSpecifier,this.exported=t,this.local=e}}();t.ExportSpecifier=O;var M=function(){return function(e){this.type=r.Syntax.ExpressionStatement,this.expression=e}}();t.ExpressionStatement=M;var D=function(){return function(e,t,n){this.type=r.Syntax.ForInStatement,this.left=e,this.right=t,this.body=n,this.each=!1}}();t.ForInStatement=D;var R=function(){return function(e,t,n){this.type=r.Syntax.ForOfStatement,this.left=e,this.right=t,this.body=n}}();t.ForOfStatement=R;var P=function(){return function(e,t,n,o){this.type=r.Syntax.ForStatement,this.init=e,this.test=t,this.update=n,this.body=o}}();t.ForStatement=P;var B=function(){return function(e,t,n,o){this.type=r.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=n,this.generator=o,this.expression=!1,this.async=!1}}();t.FunctionDeclaration=B;var F=function(){return function(e,t,n,o){this.type=r.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=n,this.generator=o,this.expression=!1,this.async=!1}}();t.FunctionExpression=F;var U=function(){return function(e){this.type=r.Syntax.Identifier,this.name=e}}();t.Identifier=U;var z=function(){return function(e,t,n){this.type=r.Syntax.IfStatement,this.test=e,this.consequent=t,this.alternate=n}}();t.IfStatement=z;var j=function(){return function(e,t){this.type=r.Syntax.ImportDeclaration,this.specifiers=e,this.source=t}}();t.ImportDeclaration=j;var q=function(){return function(e){this.type=r.Syntax.ImportDefaultSpecifier,this.local=e}}();t.ImportDefaultSpecifier=q;var V=function(){return function(e){this.type=r.Syntax.ImportNamespaceSpecifier,this.local=e}}();t.ImportNamespaceSpecifier=V;var W=function(){return function(e,t){this.type=r.Syntax.ImportSpecifier,this.local=e,this.imported=t}}();t.ImportSpecifier=W;var H=function(){return function(e,t){this.type=r.Syntax.LabeledStatement,this.label=e,this.body=t}}();t.LabeledStatement=H;var K=function(){return function(e,t){this.type=r.Syntax.Literal,this.value=e,this.raw=t}}();t.Literal=K;var G=function(){return function(e,t){this.type=r.Syntax.MetaProperty,this.meta=e,this.property=t}}();t.MetaProperty=G;var X=function(){return function(e,t,n,o,i){this.type=r.Syntax.MethodDefinition,this.key=e,this.computed=t,this.value=n,this.kind=o,this.static=i}}();t.MethodDefinition=X;var Q=function(){return function(e){this.type=r.Syntax.Program,this.body=e,this.sourceType="module"}}();t.Module=Q;var Y=function(){return function(e,t){this.type=r.Syntax.NewExpression,this.callee=e,this.arguments=t}}();t.NewExpression=Y;var J=function(){return function(e){this.type=r.Syntax.ObjectExpression,this.properties=e}}();t.ObjectExpression=J;var $=function(){return function(e){this.type=r.Syntax.ObjectPattern,this.properties=e}}();t.ObjectPattern=$;var Z=function(){return function(e,t,n,o,i,s){this.type=r.Syntax.Property,this.key=t,this.computed=n,this.value=o,this.kind=e,this.method=i,this.shorthand=s}}();t.Property=Z;var ee=function(){return function(e,t,n,o){this.type=r.Syntax.Literal,this.value=e,this.raw=t,this.regex={pattern:n,flags:o}}}();t.RegexLiteral=ee;var te=function(){return function(e){this.type=r.Syntax.RestElement,this.argument=e}}();t.RestElement=te;var ne=function(){return function(e){this.type=r.Syntax.ReturnStatement,this.argument=e}}();t.ReturnStatement=ne;var re=function(){return function(e){this.type=r.Syntax.Program,this.body=e,this.sourceType="script"}}();t.Script=re;var oe=function(){return function(e){this.type=r.Syntax.SequenceExpression,this.expressions=e}}();t.SequenceExpression=oe;var ae=function(){return function(e){this.type=r.Syntax.SpreadElement,this.argument=e}}();t.SpreadElement=ae;var ie=function(){return function(e,t){this.type=r.Syntax.MemberExpression,this.computed=!1,this.object=e,this.property=t}}();t.StaticMemberExpression=ie;var se=function(){return function(){this.type=r.Syntax.Super}}();t.Super=se;var le=function(){return function(e,t){this.type=r.Syntax.SwitchCase,this.test=e,this.consequent=t}}();t.SwitchCase=le;var de=function(){return function(e,t){this.type=r.Syntax.SwitchStatement,this.discriminant=e,this.cases=t}}();t.SwitchStatement=de;var pe=function(){return function(e,t){this.type=r.Syntax.TaggedTemplateExpression,this.tag=e,this.quasi=t}}();t.TaggedTemplateExpression=pe;var ce=function(){return function(e,t){this.type=r.Syntax.TemplateElement,this.value=e,this.tail=t}}();t.TemplateElement=ce;var ue=function(){return function(e,t){this.type=r.Syntax.TemplateLiteral,this.quasis=e,this.expressions=t}}();t.TemplateLiteral=ue;var he=function(){return function(){this.type=r.Syntax.ThisExpression}}();t.ThisExpression=he;var me=function(){return function(e){this.type=r.Syntax.ThrowStatement,this.argument=e}}();t.ThrowStatement=me;var ge=function(){return function(e,t,n){this.type=r.Syntax.TryStatement,this.block=e,this.handler=t,this.finalizer=n}}();t.TryStatement=ge;var fe=function(){return function(e,t){this.type=r.Syntax.UnaryExpression,this.operator=e,this.argument=t,this.prefix=!0}}();t.UnaryExpression=fe;var ye=function(){return function(e,t,n){this.type=r.Syntax.UpdateExpression,this.operator=e,this.argument=t,this.prefix=n}}();t.UpdateExpression=ye;var be=function(){return function(e,t){this.type=r.Syntax.VariableDeclaration,this.declarations=e,this.kind=t}}();t.VariableDeclaration=be;var xe=function(){return function(e,t){this.type=r.Syntax.VariableDeclarator,this.id=e,this.init=t}}();t.VariableDeclarator=xe;var ve=function(){return function(e,t){this.type=r.Syntax.WhileStatement,this.test=e,this.body=t}}();t.WhileStatement=ve;var ke=function(){return function(e,t){this.type=r.Syntax.WithStatement,this.object=e,this.body=t}}();t.WithStatement=ke;var Se=function(){return function(e,t){this.type=r.Syntax.YieldExpression,this.argument=e,this.delegate=t}}();t.YieldExpression=Se},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(9),o=n(10),s=n(11),l=n(7),i=n(12),d=n(2),p=n(13),c="ArrowParameterPlaceHolder",u=function(){function e(e,t,n){void 0===t&&(t={}),this.config={range:"boolean"==typeof t.range&&t.range,loc:"boolean"==typeof t.loc&&t.loc,source:null,tokens:"boolean"==typeof t.tokens&&t.tokens,comment:"boolean"==typeof t.comment&&t.comment,tolerant:"boolean"==typeof t.tolerant&&t.tolerant},this.config.loc&&t.source&&null!==t.source&&(this.config.source=t.source+""),this.delegate=n,this.errorHandler=new o.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new i.Scanner(e,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return e.prototype.throwError=function(e){for(var t=[],n=1;n>="===e||">>>="===e||"&="===e||"^="===e||"|="===e},e.prototype.isolateCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,r=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var o=e.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=t,this.context.isAssignmentTarget=n,this.context.firstCoverInitializedNameError=r,o},e.prototype.inheritCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,r=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var o=e.call(this);return this.context.isBindingElement=this.context.isBindingElement&&t,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&n,this.context.firstCoverInitializedNameError=r||this.context.firstCoverInitializedNameError,o},e.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():!this.hasLineTerminator&&(2!==this.lookahead.type&&!this.match("}")&&this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},e.prototype.parsePrimaryExpression=function(){var e=this.createNode(),t,n,r;switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),t=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(e,new l.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,s.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,n=this.nextToken(),r=this.getTokenRaw(n),t=this.finalize(e,new l.Literal(n.value,r));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,n=this.nextToken(),r=this.getTokenRaw(n),t=this.finalize(e,new l.Literal("true"===n.value,r));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,n=this.nextToken(),r=this.getTokenRaw(n),t=this.finalize(e,new l.Literal(null,r));break;case 10:t=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,t=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":t=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":t=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,n=this.nextRegexToken(),r=this.getTokenRaw(n),t=this.finalize(e,new l.RegexLiteral(n.regex,r,n.pattern,n.flags));break;default:t=this.throwUnexpectedToken(this.nextToken());}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?t=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?t=this.finalize(e,new l.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?t=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),t=this.finalize(e,new l.ThisExpression)):this.matchKeyword("class")?t=this.parseClassExpression():t=this.throwUnexpectedToken(this.nextToken()));break;default:t=this.throwUnexpectedToken(this.nextToken());}return t},e.prototype.parseSpreadElement=function(){var e=this.createNode();this.expect("...");var t=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(e,new l.SpreadElement(t))},e.prototype.parseArrayInitializer=function(){var e=this.createNode(),t=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),t.push(null);else if(this.match("...")){var n=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),t.push(n)}else t.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(e,new l.ArrayExpression(t))},e.prototype.parsePropertyMethod=function(e){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var t=this.context.strict,n=this.context.allowStrictDirective;this.context.allowStrictDirective=e.simple;var r=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&e.firstRestricted&&this.tolerateUnexpectedToken(e.firstRestricted,e.message),this.context.strict&&e.stricted&&this.tolerateUnexpectedToken(e.stricted,e.message),this.context.strict=t,this.context.allowStrictDirective=n,r},e.prototype.parsePropertyMethodFunction=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!1;var n=this.parseFormalParameters(),r=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new l.FunctionExpression(null,n.params,r,!1))},e.prototype.parsePropertyMethodAsyncFunction=function(){var e=this.createNode(),t=this.context.allowYield,n=this.context.await;this.context.allowYield=!1,this.context.await=!0;var r=this.parseFormalParameters(),o=this.parsePropertyMethod(r);return this.context.allowYield=t,this.context.await=n,this.finalize(e,new l.AsyncFunctionExpression(null,r.params,o))},e.prototype.parseObjectPropertyKey=function(){var e=this.createNode(),t=this.nextToken(),n;switch(t.type){case 8:case 6:this.context.strict&&t.octal&&this.tolerateUnexpectedToken(t,s.Messages.StrictOctalLiteral);var r=this.getTokenRaw(t);n=this.finalize(e,new l.Literal(t.value,r));break;case 3:case 1:case 5:case 4:n=this.finalize(e,new l.Identifier(t.value));break;case 7:"["===t.value?(n=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):n=this.throwUnexpectedToken(t);break;default:n=this.throwUnexpectedToken(t);}return n},e.prototype.isPropertyKey=function(e,t){return e.type===d.Syntax.Identifier&&e.name===t||e.type===d.Syntax.Literal&&e.value===t},e.prototype.parseObjectProperty=function(e){var t=this.createNode(),n=this.lookahead,r=null,o=null,i=!1,d=!1,p=!1,c=!1,u;if(3===n.type){var h=n.value;this.nextToken(),i=this.match("["),c=!this.hasLineTerminator&&"async"===h&&!this.match(":")&&!this.match("(")&&!this.match("*"),r=c?this.parseObjectPropertyKey():this.finalize(t,new l.Identifier(h))}else this.match("*")?this.nextToken():(i=this.match("["),r=this.parseObjectPropertyKey());var m=this.qualifiedPropertyName(this.lookahead);if(3===n.type&&!c&&"get"===n.value&&m)u="get",i=this.match("["),r=this.parseObjectPropertyKey(),this.context.allowYield=!1,o=this.parseGetterMethod();else if(3===n.type&&!c&&"set"===n.value&&m)u="set",i=this.match("["),r=this.parseObjectPropertyKey(),o=this.parseSetterMethod();else if(7===n.type&&"*"===n.value&&m)u="init",i=this.match("["),r=this.parseObjectPropertyKey(),o=this.parseGeneratorMethod(),d=!0;else if(r||this.throwUnexpectedToken(this.lookahead),u="init",this.match(":")&&!c)!i&&this.isPropertyKey(r,"__proto__")&&(e.value&&this.tolerateError(s.Messages.DuplicateProtoProperty),e.value=!0),this.nextToken(),o=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))o=c?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),d=!0;else if(3===n.type){var h=this.finalize(t,new l.Identifier(n.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),p=!0;var g=this.isolateCoverGrammar(this.parseAssignmentExpression);o=this.finalize(t,new l.AssignmentPattern(h,g))}else p=!0,o=h}else this.throwUnexpectedToken(this.nextToken());return this.finalize(t,new l.Property(u,r,i,o,d,p))},e.prototype.parseObjectInitializer=function(){var e=this.createNode();this.expect("{");for(var t=[],n={value:!1};!this.match("}");)t.push(this.parseObjectProperty(n)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(e,new l.ObjectExpression(t))},e.prototype.parseTemplateHead=function(){r.assert(this.lookahead.head,"Template literal must start with a template head");var e=this.createNode(),t=this.nextToken(),n=t.value,o=t.cooked;return this.finalize(e,new l.TemplateElement({raw:n,cooked:o},t.tail))},e.prototype.parseTemplateElement=function(){10!==this.lookahead.type&&this.throwUnexpectedToken();var e=this.createNode(),t=this.nextToken(),n=t.value,r=t.cooked;return this.finalize(e,new l.TemplateElement({raw:n,cooked:r},t.tail))},e.prototype.parseTemplateLiteral=function(){var e=this.createNode(),t=[],n=[],r=this.parseTemplateHead();for(n.push(r);!r.tail;)t.push(this.parseExpression()),r=this.parseTemplateElement(),n.push(r);return this.finalize(e,new l.TemplateLiteral(n,t))},e.prototype.reinterpretExpressionAsPattern=function(e){switch(e.type){case d.Syntax.Identifier:case d.Syntax.MemberExpression:case d.Syntax.RestElement:case d.Syntax.AssignmentPattern:break;case d.Syntax.SpreadElement:e.type=d.Syntax.RestElement,this.reinterpretExpressionAsPattern(e.argument);break;case d.Syntax.ArrayExpression:e.type=d.Syntax.ArrayPattern;for(var t=0;t")||this.expect("=>"),e={type:c,params:[],async:!1};else{var t=this.lookahead,n=[];if(this.match("..."))e=this.parseRestElement(n),this.expect(")"),this.match("=>")||this.expect("=>"),e={type:c,params:[e],async:!1};else{var r=!1;if(this.context.isBindingElement=!0,e=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var o=[];for(this.context.isAssignmentTarget=!1,o.push(e);2!==this.lookahead.type&&!!this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var s=0;s")||this.expect("=>"),this.context.isBindingElement=!1;for(var s=0;s")&&(e.type===d.Syntax.Identifier&&"yield"===e.name&&(r=!0,e={type:c,params:[e],async:!1}),!r)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),e.type===d.Syntax.SequenceExpression)for(var s=0;s")){for(var p=0;p=r);){for(;2")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var o=e.async,i=this.reinterpretAsCoverFormalsList(e);if(i){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var p=this.context.strict,u=this.context.allowStrictDirective;this.context.allowStrictDirective=i.simple;var h=this.context.allowYield,m=this.context.await;this.context.allowYield=!0,this.context.await=o;var g=this.startNode(t);this.expect("=>");var f;if(this.match("{")){var y=this.context.allowIn;this.context.allowIn=!0,f=this.parseFunctionSourceElements(),this.context.allowIn=y}else f=this.isolateCoverGrammar(this.parseAssignmentExpression);var b=f.type!==d.Syntax.BlockStatement;this.context.strict&&i.firstRestricted&&this.throwUnexpectedToken(i.firstRestricted,i.message),this.context.strict&&i.stricted&&this.tolerateUnexpectedToken(i.stricted,i.message),e=o?this.finalize(g,new l.AsyncArrowFunctionExpression(i.params,f,b)):this.finalize(g,new l.ArrowFunctionExpression(i.params,f,b)),this.context.strict=p,this.context.allowStrictDirective=u,this.context.allowYield=h,this.context.await=m}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(s.Messages.InvalidLHSInAssignment),this.context.strict&&e.type===d.Syntax.Identifier){var x=e;this.scanner.isRestrictedWord(x.name)&&this.tolerateUnexpectedToken(n,s.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(x.name)&&this.tolerateUnexpectedToken(n,s.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(e):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1),n=this.nextToken();var v=n.value,k=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new l.AssignmentExpression(v,e,k)),this.context.firstCoverInitializedNameError=null}}return e},e.prototype.parseExpression=function(){var e=this.lookahead,t=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){for(var n=[t];2!==this.lookahead.type&&!!this.match(",");)this.nextToken(),n.push(this.isolateCoverGrammar(this.parseAssignmentExpression));t=this.finalize(this.startNode(e),new l.SequenceExpression(n))}return t},e.prototype.parseStatementListItem=function(){var e;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,4===this.lookahead.type)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,s.Messages.IllegalExportDeclaration),e=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,s.Messages.IllegalImportDeclaration),e=this.parseImportDeclaration();break;case"const":e=this.parseLexicalDeclaration({inFor:!1});break;case"function":e=this.parseFunctionDeclaration();break;case"class":e=this.parseClassDeclaration();break;case"let":e=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:e=this.parseStatement();}else e=this.parseStatement();return e},e.prototype.parseBlock=function(){var e=this.createNode();this.expect("{");for(var t=[];!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.finalize(e,new l.BlockStatement(t))},e.prototype.parseLexicalBinding=function(e,t){var n=this.createNode(),r=this.parsePattern([],e);this.context.strict&&r.type===d.Syntax.Identifier&&this.scanner.isRestrictedWord(r.name)&&this.tolerateError(s.Messages.StrictVarName);var o=null;return"const"===e?!this.matchKeyword("in")&&!this.matchContextualKeyword("of")&&(this.match("=")?(this.nextToken(),o=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(s.Messages.DeclarationMissingInitializer,"const")):(!t.inFor&&r.type!==d.Syntax.Identifier||this.match("="))&&(this.expect("="),o=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(n,new l.VariableDeclarator(r,o))},e.prototype.parseBindingList=function(e,t){for(var n=[this.parseLexicalBinding(e,t)];this.match(",");)this.nextToken(),n.push(this.parseLexicalBinding(e,t));return n},e.prototype.isLexicalDeclaration=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.scanner.lex();return this.scanner.restoreState(e),3===t.type||7===t.type&&"["===t.value||7===t.type&&"{"===t.value||4===t.type&&"let"===t.value||4===t.type&&"yield"===t.value},e.prototype.parseLexicalDeclaration=function(e){var t=this.createNode(),n=this.nextToken().value;r.assert("let"===n||"const"===n,"Lexical declaration must be either let or const");var o=this.parseBindingList(n,e);return this.consumeSemicolon(),this.finalize(t,new l.VariableDeclaration(o,n))},e.prototype.parseBindingRestElement=function(e,t){var n=this.createNode();this.expect("...");var r=this.parsePattern(e,t);return this.finalize(n,new l.RestElement(r))},e.prototype.parseArrayPattern=function(e,t){var n=this.createNode();this.expect("[");for(var r=[];!this.match("]");)if(this.match(","))this.nextToken(),r.push(null);else{if(this.match("...")){r.push(this.parseBindingRestElement(e,t));break}else r.push(this.parsePatternWithDefault(e,t));this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(n,new l.ArrayPattern(r))},e.prototype.parsePropertyPattern=function(e,t){var n=this.createNode(),r=!1,o=!1,i,s;if(3===this.lookahead.type){var d=this.lookahead;i=this.parseVariableIdentifier();var p=this.finalize(n,new l.Identifier(d.value));if(this.match("=")){e.push(d),o=!0,this.nextToken();var c=this.parseAssignmentExpression();s=this.finalize(this.startNode(d),new l.AssignmentPattern(p,c))}else this.match(":")?(this.expect(":"),s=this.parsePatternWithDefault(e,t)):(e.push(d),o=!0,s=p)}else r=this.match("["),i=this.parseObjectPropertyKey(),this.expect(":"),s=this.parsePatternWithDefault(e,t);return this.finalize(n,new l.Property("init",i,r,s,!1,o))},e.prototype.parseObjectPattern=function(e,t){var n=this.createNode(),r=[];for(this.expect("{");!this.match("}");)r.push(this.parsePropertyPattern(e,t)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(n,new l.ObjectPattern(r))},e.prototype.parsePattern=function(e,t){var n;return this.match("[")?n=this.parseArrayPattern(e,t):this.match("{")?n=this.parseObjectPattern(e,t):(this.matchKeyword("let")&&("const"===t||"let"===t)&&this.tolerateUnexpectedToken(this.lookahead,s.Messages.LetInLexicalBinding),e.push(this.lookahead),n=this.parseVariableIdentifier(t)),n},e.prototype.parsePatternWithDefault=function(e,t){var n=this.lookahead,r=this.parsePattern(e,t);if(this.match("=")){this.nextToken();var o=this.context.allowYield;this.context.allowYield=!0;var i=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=o,r=this.finalize(this.startNode(n),new l.AssignmentPattern(r,i))}return r},e.prototype.parseVariableIdentifier=function(e){var t=this.createNode(),n=this.nextToken();return 4===n.type&&"yield"===n.value?this.context.strict?this.tolerateUnexpectedToken(n,s.Messages.StrictReservedWord):!this.context.allowYield&&this.throwUnexpectedToken(n):3===n.type?(this.context.isModule||this.context.await)&&3===n.type&&"await"===n.value&&this.tolerateUnexpectedToken(n):this.context.strict&&4===n.type&&this.scanner.isStrictModeReservedWord(n.value)?this.tolerateUnexpectedToken(n,s.Messages.StrictReservedWord):(this.context.strict||"let"!==n.value||"var"!==e)&&this.throwUnexpectedToken(n),this.finalize(t,new l.Identifier(n.value))},e.prototype.parseVariableDeclaration=function(e){var t=this.createNode(),n=this.parsePattern([],"var");this.context.strict&&n.type===d.Syntax.Identifier&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(s.Messages.StrictVarName);var r=null;return this.match("=")?(this.nextToken(),r=this.isolateCoverGrammar(this.parseAssignmentExpression)):n.type!==d.Syntax.Identifier&&!e.inFor&&this.expect("="),this.finalize(t,new l.VariableDeclarator(n,r))},e.prototype.parseVariableDeclarationList=function(e){var t={inFor:e.inFor},n=[];for(n.push(this.parseVariableDeclaration(t));this.match(",");)this.nextToken(),n.push(this.parseVariableDeclaration(t));return n},e.prototype.parseVariableStatement=function(){var e=this.createNode();this.expectKeyword("var");var t=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(e,new l.VariableDeclaration(t,"var"))},e.prototype.parseEmptyStatement=function(){var e=this.createNode();return this.expect(";"),this.finalize(e,new l.EmptyStatement)},e.prototype.parseExpressionStatement=function(){var e=this.createNode(),t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new l.ExpressionStatement(t))},e.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(s.Messages.StrictFunction),this.parseStatement()},e.prototype.parseIfStatement=function(){var e=this.createNode(),t=null,n;this.expectKeyword("if"),this.expect("(");var r=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),n=this.finalize(this.createNode(),new l.EmptyStatement)):(this.expect(")"),n=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),t=this.parseIfClause())),this.finalize(e,new l.IfStatement(r,n,t))},e.prototype.parseDoWhileStatement=function(){var e=this.createNode();this.expectKeyword("do");var t=this.context.inIteration;this.context.inIteration=!0;var n=this.parseStatement();this.context.inIteration=t,this.expectKeyword("while"),this.expect("(");var r=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(e,new l.DoWhileStatement(n,r))},e.prototype.parseWhileStatement=function(){var e=this.createNode(),t;this.expectKeyword("while"),this.expect("(");var n=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),t=this.finalize(this.createNode(),new l.EmptyStatement);else{this.expect(")");var r=this.context.inIteration;this.context.inIteration=!0,t=this.parseStatement(),this.context.inIteration=r}return this.finalize(e,new l.WhileStatement(n,t))},e.prototype.parseForStatement=function(){var e=null,t=null,n=null,r=!0,o=this.createNode(),i,p;if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){e=this.createNode(),this.nextToken();var c=this.context.allowIn;this.context.allowIn=!1;var u=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=c,1===u.length&&this.matchKeyword("in")){var h=u[0];h.init&&(h.id.type===d.Syntax.ArrayPattern||h.id.type===d.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(s.Messages.ForInOfLoopInitializer,"for-in"),e=this.finalize(e,new l.VariableDeclaration(u,"var")),this.nextToken(),i=e,p=this.parseExpression(),e=null}else 1===u.length&&null===u[0].init&&this.matchContextualKeyword("of")?(e=this.finalize(e,new l.VariableDeclaration(u,"var")),this.nextToken(),i=e,p=this.parseAssignmentExpression(),e=null,r=!1):(e=this.finalize(e,new l.VariableDeclaration(u,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){e=this.createNode();var m=this.nextToken().value;if(!this.context.strict&&"in"===this.lookahead.value)e=this.finalize(e,new l.Identifier(m)),this.nextToken(),i=e,p=this.parseExpression(),e=null;else{var c=this.context.allowIn;this.context.allowIn=!1;var u=this.parseBindingList(m,{inFor:!0});this.context.allowIn=c,1===u.length&&null===u[0].init&&this.matchKeyword("in")?(e=this.finalize(e,new l.VariableDeclaration(u,m)),this.nextToken(),i=e,p=this.parseExpression(),e=null):1===u.length&&null===u[0].init&&this.matchContextualKeyword("of")?(e=this.finalize(e,new l.VariableDeclaration(u,m)),this.nextToken(),i=e,p=this.parseAssignmentExpression(),e=null,r=!1):(this.consumeSemicolon(),e=this.finalize(e,new l.VariableDeclaration(u,m)))}}else{var g=this.lookahead,c=this.context.allowIn;if(this.context.allowIn=!1,e=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=c,this.matchKeyword("in"))this.context.isAssignmentTarget&&e.type!==d.Syntax.AssignmentExpression||this.tolerateError(s.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(e),i=e,p=this.parseExpression(),e=null;else if(this.matchContextualKeyword("of"))this.context.isAssignmentTarget&&e.type!==d.Syntax.AssignmentExpression||this.tolerateError(s.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(e),i=e,p=this.parseAssignmentExpression(),e=null,r=!1;else{if(this.match(",")){for(var f=[e];this.match(",");)this.nextToken(),f.push(this.isolateCoverGrammar(this.parseAssignmentExpression));e=this.finalize(this.startNode(g),new l.SequenceExpression(f))}this.expect(";")}}"undefined"==typeof i&&(!this.match(";")&&(t=this.parseExpression()),this.expect(";"),!this.match(")")&&(n=this.parseExpression()));var y;if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),y=this.finalize(this.createNode(),new l.EmptyStatement);else{this.expect(")");var b=this.context.inIteration;this.context.inIteration=!0,y=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=b}return"undefined"==typeof i?this.finalize(o,new l.ForStatement(e,t,n,y)):r?this.finalize(o,new l.ForInStatement(i,p,y)):this.finalize(o,new l.ForOfStatement(i,p,y))},e.prototype.parseContinueStatement=function(){var e=this.createNode();this.expectKeyword("continue");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier();t=n;var r="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)||this.throwError(s.Messages.UnknownLabel,n.name)}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.throwError(s.Messages.IllegalContinue),this.finalize(e,new l.ContinueStatement(t))},e.prototype.parseBreakStatement=function(){var e=this.createNode();this.expectKeyword("break");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier(),r="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)||this.throwError(s.Messages.UnknownLabel,n.name),t=n}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.context.inSwitch||this.throwError(s.Messages.IllegalBreak),this.finalize(e,new l.BreakStatement(t))},e.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(s.Messages.IllegalReturn);var e=this.createNode();this.expectKeyword("return");var t=!this.match(";")&&!this.match("}")&&!this.hasLineTerminator&&2!==this.lookahead.type,n=t?this.parseExpression():null;return this.consumeSemicolon(),this.finalize(e,new l.ReturnStatement(n))},e.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(s.Messages.StrictModeWith);var e=this.createNode(),t;this.expectKeyword("with"),this.expect("(");var n=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),t=this.finalize(this.createNode(),new l.EmptyStatement)):(this.expect(")"),t=this.parseStatement()),this.finalize(e,new l.WithStatement(n,t))},e.prototype.parseSwitchCase=function(){var e=this.createNode(),t;this.matchKeyword("default")?(this.nextToken(),t=null):(this.expectKeyword("case"),t=this.parseExpression()),this.expect(":");for(var n=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)n.push(this.parseStatementListItem());return this.finalize(e,new l.SwitchCase(t,n))},e.prototype.parseSwitchStatement=function(){var e=this.createNode();this.expectKeyword("switch"),this.expect("(");var t=this.parseExpression();this.expect(")");var n=this.context.inSwitch;this.context.inSwitch=!0;var r=[],o=!1;for(this.expect("{");!this.match("}");){var i=this.parseSwitchCase();null===i.test&&(o&&this.throwError(s.Messages.MultipleDefaultsInSwitch),o=!0),r.push(i)}return this.expect("}"),this.context.inSwitch=n,this.finalize(e,new l.SwitchStatement(t,r))},e.prototype.parseLabelledStatement=function(){var e=this.createNode(),t=this.parseExpression(),n;if(t.type===d.Syntax.Identifier&&this.match(":")){this.nextToken();var r=t,o="$"+r.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,o)&&this.throwError(s.Messages.Redeclaration,"Label",r.name),this.context.labelSet[o]=!0;var i;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),i=this.parseClassDeclaration();else if(this.matchKeyword("function")){var p=this.lookahead,c=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(p,s.Messages.StrictFunction):c.generator&&this.tolerateUnexpectedToken(p,s.Messages.GeneratorInLegacyContext),i=c}else i=this.parseStatement();delete this.context.labelSet[o],n=new l.LabeledStatement(r,i)}else this.consumeSemicolon(),n=new l.ExpressionStatement(t);return this.finalize(e,n)},e.prototype.parseThrowStatement=function(){var e=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(s.Messages.NewlineAfterThrow);var t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new l.ThrowStatement(t))},e.prototype.parseCatchClause=function(){var e=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var t=[],n=this.parsePattern(t),r={},o=0,i;o=this.length},e.prototype.throwUnexpectedToken=function(e){return void 0===e&&(e=d.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.tolerateUnexpectedToken=function(e){void 0===e&&(e=d.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.skipSingleLineComment=function(e){var t=[],n,r;for(this.trackComment&&(t=[],n=this.index-e,r={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{}});!this.eof();){var o=this.source.charCodeAt(this.index);if(++this.index,l.Character.isLineTerminator(o)){if(this.trackComment){r.end={line:this.lineNumber,column:this.index-this.lineStart-1};var i={multiLine:!1,slice:[n+e,this.index-1],range:[n,this.index-1],loc:r};t.push(i)}return 13===o&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t}}if(this.trackComment){r.end={line:this.lineNumber,column:this.index-this.lineStart};var i={multiLine:!1,slice:[n+e,this.index],range:[n,this.index],loc:r};t.push(i)}return t},e.prototype.skipMultiLineComment=function(){var e=[],t,n;for(this.trackComment&&(e=[],t=this.index-2,n={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var r=this.source.charCodeAt(this.index);if(l.Character.isLineTerminator(r))13===r&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===r){if(47===this.source.charCodeAt(this.index+1)){if(this.index+=2,this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart};var o={multiLine:!0,slice:[t+2,this.index-2],range:[t,this.index],loc:n};e.push(o)}return e}++this.index}else++this.index}if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart};var o={multiLine:!0,slice:[t+2,this.index],range:[t,this.index],loc:n};e.push(o)}return this.tolerateUnexpectedToken(),e},e.prototype.scanComments=function(){var e;this.trackComment&&(e=[]);for(var t=0===this.index,n;!this.eof();)if(n=this.source.charCodeAt(this.index),l.Character.isWhiteSpace(n))++this.index;else if(l.Character.isLineTerminator(n))++this.index,13===n&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t=!0;else if(47===n){if(n=this.source.charCodeAt(this.index+1),47===n){this.index+=2;var r=this.skipSingleLineComment(2);this.trackComment&&(e=e.concat(r)),t=!0}else if(42===n){this.index+=2;var r=this.skipMultiLineComment();this.trackComment&&(e=e.concat(r))}else break;}else if(t&&45===n){if(45===this.source.charCodeAt(this.index+1)&&62===this.source.charCodeAt(this.index+2)){this.index+=3;var r=this.skipSingleLineComment(3);this.trackComment&&(e=e.concat(r))}else break;}else if(60!==n)break;else if("!--"===this.source.slice(this.index+1,this.index+4)){this.index+=4;var r=this.skipSingleLineComment(4);this.trackComment&&(e=e.concat(r))}else break;return e},e.prototype.isFutureReservedWord=function(e){return"enum"===e||"export"===e||"import"===e||"super"===e},e.prototype.isStrictModeReservedWord=function(e){return"implements"===e||"interface"===e||"package"===e||"private"===e||"protected"===e||"public"===e||"static"===e||"yield"===e||"let"===e},e.prototype.isRestrictedWord=function(e){return"eval"===e||"arguments"===e},e.prototype.isKeyword=function(e){switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1;}},e.prototype.codePointAt=function(e){var t=this.source.charCodeAt(e);if(55296<=t&&56319>=t){var n=this.source.charCodeAt(e+1);if(56320<=n&&57343>=n){var r=t;t=1024*(r-55296)+n-56320+65536}}return t},e.prototype.scanHexEscape=function(e){for(var t="u"===e?4:2,r=0,s=0;st)return this.index=e,this.getComplexIdentifier();if(l.Character.isIdentifierPart(t))++this.index;else break}return this.source.slice(e,this.index)},e.prototype.getComplexIdentifier=function(){var e=this.codePointAt(this.index),t=l.Character.fromCodePoint(e);this.index+=t.length;var n;for(92===e&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,n=this.scanUnicodeCodePointEscape()):(n=this.scanHexEscape("u"),(null===n||"\\"===n||!l.Character.isIdentifierStart(n.charCodeAt(0)))&&this.throwUnexpectedToken()),t=n);!this.eof()&&(e=this.codePointAt(this.index),!!l.Character.isIdentifierPart(e));)n=l.Character.fromCodePoint(e),t+=n,this.index+=n.length,92===e&&(t=t.substr(0,t.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,n=this.scanUnicodeCodePointEscape()):(n=this.scanHexEscape("u"),(null===n||"\\"===n||!l.Character.isIdentifierPart(n.charCodeAt(0)))&&this.throwUnexpectedToken()),t+=n);return t},e.prototype.octalToDecimal=function(e){var t="0"!==e,n=i(e);return!this.eof()&&l.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(t=!0,n=8*n+i(this.source[this.index++]),0<="0123".indexOf(e)&&!this.eof()&&l.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(n=8*n+i(this.source[this.index++]))),{code:n,octal:t}},e.prototype.scanIdentifier=function(){var e=this.index,t=92===this.source.charCodeAt(e)?this.getComplexIdentifier():this.getIdentifier(),n;if(n=1===t.length?3:this.isKeyword(t)?4:"null"===t?5:"true"===t||"false"===t?1:3,3!==n&&e+t.length!==this.index){var r=this.index;this.index=e,this.tolerateUnexpectedToken(d.Messages.InvalidEscapedReservedWord),this.index=r}return{type:n,value:t,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanPunctuator=function(){var e=this.index,t=this.source[this.index];return"("===t||"{"===t?("{"===t&&this.curlyStack.push("{"),++this.index):"."===t?(++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,t="...")):"}"===t?(++this.index,this.curlyStack.pop()):")"===t||";"===t||","===t||"["===t||"]"===t||":"===t||"?"===t||"~"===t?++this.index:(t=this.source.substr(this.index,4),">>>="===t?this.index+=4:(t=t.substr(0,3),"==="===t||"!=="===t||">>>"===t||"<<="===t||">>="===t||"**="===t?this.index+=3:(t=t.substr(0,2),"&&"===t||"||"===t||"=="===t||"!="===t||"+="===t||"-="===t||"*="===t||"/="===t||"++"===t||"--"===t||"<<"===t||">>"===t||"&="===t||"|="===t||"^="===t||"%="===t||"<="===t||">="===t||"=>"===t||"**"===t?this.index+=2:(t=this.source[this.index],0<="<>=!+-*%&|^/".indexOf(t)&&++this.index)))),this.index===e&&this.throwUnexpectedToken(),{type:7,value:t,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanHexLiteral=function(e){for(var t="";!this.eof()&&!!l.Character.isHexDigit(this.source.charCodeAt(this.index));)t+=this.source[this.index++];return 0===t.length&&this.throwUnexpectedToken(),l.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+t,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanBinaryLiteral=function(e){for(var t="",n;!this.eof()&&(n=this.source[this.index],"0"===n||"1"===n);)t+=this.source[this.index++];return 0===t.length&&this.throwUnexpectedToken(),this.eof()||(n=this.source.charCodeAt(this.index),(l.Character.isIdentifierStart(n)||l.Character.isDecimalDigit(n))&&this.throwUnexpectedToken()),{type:6,value:parseInt(t,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanOctalLiteral=function(e,t){var n="",r=!1;for(l.Character.isOctalDigit(e.charCodeAt(0))?(r=!0,n="0"+this.source[this.index++]):++this.index;!this.eof()&&!!l.Character.isOctalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];return r||0!==n.length||this.throwUnexpectedToken(),(l.Character.isIdentifierStart(this.source.charCodeAt(this.index))||l.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(n,8),octal:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.isImplicitOctalLiteral=function(){for(var e=this.index+1,t;e=s?n(s):r}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,r));try{RegExp(o)}catch(t){this.throwUnexpectedToken(d.Messages.InvalidRegExp)}try{return new RegExp(e,t)}catch(e){return null}},e.prototype.scanRegExpBody=function(){var e=this.source[this.index];s.assert("/"===e,"Regular expression literal must start with a slash");for(var t=this.source[this.index++],n=!1,r=!1;!this.eof();)if(e=this.source[this.index++],t+=e,"\\"===e)e=this.source[this.index++],l.Character.isLineTerminator(e.charCodeAt(0))&&this.throwUnexpectedToken(d.Messages.UnterminatedRegExp),t+=e;else if(l.Character.isLineTerminator(e.charCodeAt(0)))this.throwUnexpectedToken(d.Messages.UnterminatedRegExp);else if(n)"]"===e&&(n=!1);else if("/"===e){r=!0;break}else"["===e&&(n=!0);return r||this.throwUnexpectedToken(d.Messages.UnterminatedRegExp),t.substr(1,t.length-2)},e.prototype.scanRegExpFlags=function(){for(var e="",t="",n;!this.eof()&&(n=this.source[this.index],!!l.Character.isIdentifierPart(n.charCodeAt(0)));)if(++this.index,"\\"!==n||this.eof())t+=n,e+=n;else if(n=this.source[this.index],"u"===n){++this.index;var r=this.index,o=this.scanHexEscape("u");if(null!==o)for(t+=o,e+="\\u";re&&l.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},e}();t.Scanner=p},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.TokenName={},t.TokenName[1]="Boolean",t.TokenName[2]="",t.TokenName[3]="Identifier",t.TokenName[4]="Keyword",t.TokenName[5]="Null",t.TokenName[6]="Numeric",t.TokenName[7]="Punctuator",t.TokenName[8]="String",t.TokenName[9]="RegularExpression",t.TokenName[10]="Template"},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.XHTMLEntities={quot:"\"",amp:"&",apos:"'",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",lang:"\u27E8",rang:"\u27E9"}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(10),o=n(12),i=n(13),s=function(){function e(){this.values=[],this.curly=this.paren=-1}return e.prototype.beforeFunctionExpression=function(e){return 0<=["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(e)},e.prototype.isRegexStart=function(){var e=this.values[this.values.length-1],t=null!==e;switch(e){case"this":case"]":t=!1;break;case")":var n=this.values[this.paren-1];t="if"===n||"while"===n||"for"===n||"with"===n;break;case"}":if(t=!1,"function"===this.values[this.curly-3]){var r=this.values[this.curly-4];t=!!r&&!this.beforeFunctionExpression(r)}else if("function"===this.values[this.curly-4]){var r=this.values[this.curly-5];t=!r||!this.beforeFunctionExpression(r)}break;default:}return t},e.prototype.push=function(e){7===e.type||4===e.type?("{"===e.value?this.curly=this.values.length:"("===e.value&&(this.paren=this.values.length),this.values.push(e.value)):this.values.push(null)},e}(),l=function(){function e(e,t){this.errorHandler=new r.ErrorHandler,this.errorHandler.tolerant=!!t&&"boolean"==typeof t.tolerant&&t.tolerant,this.scanner=new o.Scanner(e,this.errorHandler),this.scanner.trackComment=!!t&&"boolean"==typeof t.comment&&t.comment,this.trackRange=!!t&&"boolean"==typeof t.range&&t.range,this.trackLoc=!!t&&"boolean"==typeof t.loc&&t.loc,this.buffer=[],this.reader=new s}return e.prototype.errors=function(){return this.errorHandler.errors},e.prototype.getNextToken=function(){if(0===this.buffer.length){var t=this.scanner.scanComments();if(this.scanner.trackComment)for(var n=0;n=h&&l()},200)}),t.on(i,"focus",function(){++h})}),t.defineExtension("openNotification",function(r,o){function i(){l||(l=!0,clearTimeout(p),t.rmClass(s.parentNode,"dialog-opened"),s.parentNode.removeChild(s))}n(this,i);var s=e(this,r,o&&o.bottom),l=!1,d=o&&"undefined"!=typeof o.duration?o.duration:5e3,p;return t.on(s,"click",function(n){t.e_preventDefault(n),i()}),d&&(p=setTimeout(i,d)),i})})},"58xA":function(e,t,n){"use strict";function r(e,t){if(!(t instanceof Object))return t;switch(t.constructor){case Date:return new Date(t.getTime());case Object:void 0===e&&(e={});break;case Array:e=[];break;default:return t;}for(var n in t)t.hasOwnProperty(n)&&(e[n]=r(e[n],t[n]));return e}function o(e){return JSON.parse(e)}function i(e,t){if("object"!=typeof e||null===e)return!1;for(var n=0,r=t,o;n 4. Need to update it?");}var o=e+" failed: ";return o+=r+" argument ",o}var d=String.fromCharCode;Object.defineProperty(t,"__esModule",{value:!0});var p=n("vCxL"),c={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"},u=function(e,t){if(!e)throw h(t)},h=function(e){return new Error("Firebase Database ("+c.SDK_VERSION+") INTERNAL ASSERT FAILED: "+e)},m=function(e){for(var t=[],n=0,r=0,o;ro?t[n++]=o:2048>o?(t[n++]=192|o>>6,t[n++]=128|63&o):55296==(64512&o)&&r+1>18,t[n++]=128|63&o>>12,t[n++]=128|63&o>>6,t[n++]=128|63&o):(t[n++]=224|o>>12,t[n++]=128|63&o>>6,t[n++]=128|63&o);return t},g=function(e){for(var t=[],n=0,r=0,o;no)t[r++]=d(o);else if(191o){var i=e[n++];t[r++]=d((31&o)<<6|63&i)}else if(239o){var i=e[n++],s=e[n++],l=e[n++],p=((7&o)<<18|(63&i)<<12|(63&s)<<6|63&l)-65536;t[r++]=d(55296+(p>>10)),t[r++]=d(56320+(1023&p))}else{var i=e[n++],s=e[n++];t[r++]=d((15&o)<<12|(63&i)<<6|63&s)}return t.join("")},f={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray:function(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();for(var n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[],o=0;o>6,u=63&p;d||(u=64,!s&&(c=64)),r.push(n[i>>2],n[(3&i)<<4|l>>4],n[c],n[u])}return r.join("")},encodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(m(e),t)},decodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):g(this.decodeStringToByteArray(e,t))},decodeStringToByteArray:function(e,t){this.init_();for(var n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[],o=0;o>4),64!=p){if(r.push(240&l<<4|p>>2),64!=u){r.push(192&p<<6|u)}}}return r},init_:function(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(var e=0;e=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}},y=function(e){try{return f.decodeString(e,!0)}catch(t){console.error("base64Decode failed: ",t)}return null},b=function(){function e(){var e=this;this.promise=new Promise(function(t,n){e.resolve=t,e.reject=n})}return e.prototype.wrapCallback=function(e){var t=this;return function(n,r){n?t.reject(n):t.resolve(r),"function"==typeof e&&(t.promise.catch(function(){}),1===e.length?e(n):e(n,r))}},e}(),x=function(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""},v="FirebaseError",k=Error.captureStackTrace,S=function(){return function(e,t){if(this.code=e,this.message=t,k)k(this,w.prototype.create);else try{throw Error.apply(this,arguments)}catch(e){this.name=v,Object.defineProperty(this,"stack",{get:function(){return e.stack}})}}}();S.prototype=Object.create(Error.prototype),S.prototype.constructor=S,S.prototype.name=v;var w=function(){function e(e,t,n){this.service=e,this.serviceName=t,this.errors=n,this.pattern=/\{\$([^}]+)}/g}return e.prototype.create=function(e,t){void 0===t&&(t={});var n=this.errors[e],r=this.service+"/"+e,o;o=void 0===n?"Error":n.replace(this.pattern,function(e,n){var r=t[n];return void 0===r?"<"+n+"?>":r.toString()}),o=this.serviceName+": "+o+" ("+r+").";var i=new S(r,o);for(var s in t)t.hasOwnProperty(s)&&"_"!==s.slice(-1)&&(i[s]=t[s]);return i},e}(),C=function(e){var t={},n={},r={},i="";try{var s=e.split(".");t=o(y(s[0])||""),n=o(y(s[1])||""),i=s[2],r=n.d||{},delete n.d}catch(t){}return{header:t,claims:n,data:r,signature:i}},T=function(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(n,e[n])},_=function(e,t){return T(t,function(t,n){e[t]=n}),e},E=function(e,t,n){for(var r in e)if(t.call(n,e[r],r,e))return r},A=function(){return function(){this.blockSize=-1}}(),I=function(e){function t(){var t=e.call(this)||this;t.chain_=[],t.buf_=[],t.W_=[],t.pad_=[],t.inbuf_=0,t.total_=0,t.blockSize=64,t.pad_[0]=128;for(var n=1;ns;s++)o[s]=n.charCodeAt(r)<<24|n.charCodeAt(r+1)<<16|n.charCodeAt(r+2)<<8|n.charCodeAt(r+3),r+=4;else for(var s=0;16>s;s++)o[s]=n[r]<<24|n[r+1]<<16|n[r+2]<<8|n[r+3],r+=4;for(var s=16,i;80>s;s++)i=o[s-3]^o[s-8]^o[s-14]^o[s-16],o[s]=4294967295&(i<<1|i>>>31);for(var t=this.chain_[0],l=this.chain_[1],p=this.chain_[2],c=this.chain_[3],d=this.chain_[4],s=0,e,u;80>s;s++){40>s?20>s?(e=c^l&(p^c),u=1518500249):(e=l^p^c,u=1859775393):60>s?(e=l&p|c&(l|p),u=2400959708):(e=l^p^c,u=3395469782);var i=4294967295&(t<<5|t>>>27)+e+d+u+o[s];d=c,c=p,p=4294967295&(l<<30|l>>>2),l=t,t=i}this.chain_[0]=4294967295&this.chain_[0]+t,this.chain_[1]=4294967295&this.chain_[1]+l,this.chain_[2]=4294967295&this.chain_[2]+p,this.chain_[3]=4294967295&this.chain_[3]+c,this.chain_[4]=4294967295&this.chain_[4]+d},t.prototype.update=function(e,t){if(null!=e){void 0===t&&(t=e.length);for(var r=t-this.blockSize,o=0,n=this.buf_,i=this.inbuf_;othis.inbuf_?this.update(this.pad_,56-this.inbuf_):this.update(this.pad_,this.blockSize-(this.inbuf_-56));for(var r=this.blockSize-1;56<=r;r--)this.buf_[r]=255&t,t/=256;this.compress_(this.buf_);for(var o=0,r=0;5>r;r++)for(var n=24;0<=n;n-=8)e[o]=255&this.chain_[r]>>n,++o;return e},t}(A),N=function(){function e(e,t){var n=this;this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then(function(){e(n)}).catch(function(t){n.error(t)})}return e.prototype.next=function(e){this.forEachObserver(function(t){t.next(e)})},e.prototype.error=function(e){this.forEachObserver(function(t){t.error(e)}),this.close(e)},e.prototype.complete=function(){this.forEachObserver(function(e){e.complete()}),this.close()},e.prototype.subscribe=function(e,t,n){var r=this,o;if(void 0===e&&void 0===t&&void 0===n)throw new Error("Missing Observer.");o=i(e,["next","error","complete"])?e:{next:e,error:t,complete:n},void 0===o.next&&(o.next=s),void 0===o.error&&(o.error=s),void 0===o.complete&&(o.complete=s);var l=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(function(){try{r.finalError?o.error(r.finalError):o.complete()}catch(t){}}),this.observers.push(o),l},e.prototype.unsubscribeOne=function(e){void 0===this.observers||void 0===this.observers[e]||(delete this.observers[e],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))},e.prototype.forEachObserver=function(e){if(!this.finalized)for(var t=0;t=r&&n<=o},t.clone=function(e){return _({},e)},t.contains=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.every=function(e,t){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&!t(n,e[n]))return!1;return!0},t.extend=_,t.findKey=E,t.findValue=function(e,t,n){var r=E(e,t,n);return r&&e[r]},t.forEach=T,t.getAnyKey=function(e){for(var t in e)return t},t.getCount=function(e){var t=0;for(var n in e)t++;return t},t.getValues=function(e){var t=[],n=0;for(var r in e)t[n++]=e[r];return t},t.isEmpty=function(e){for(var t in e)return!1;return!0},t.isNonNullObject=function(e){return"object"==typeof e&&null!==e},t.map=function(e,t,n){var r={};for(var o in e)r[o]=t.call(n,e[o],o,e);return r},t.safeGet=function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]},t.querystring=function(e){var t=[];return T(e,function(e,n){Array.isArray(n)?n.forEach(function(n){t.push(encodeURIComponent(e)+"="+encodeURIComponent(n))}):t.push(encodeURIComponent(e)+"="+encodeURIComponent(n))}),t.length?"&"+t.join("&"):""},t.querystringDecode=function(e){var t={},n=e.replace(/^\?/,"").split("&");return n.forEach(function(e){if(e){var n=e.split("=");t[n[0]]=n[1]}}),t},t.Sha1=I,t.async=function(e,t){return function(){for(var n=[],r=0;rn&&(o=0===n?"none":"no more than "+n),o){var i=e+" failed: Was called with "+r+(1===r?" argument.":" arguments.")+" Expects "+o+".";throw new Error(i)}},t.validateCallback=function(e,t,n,r){if((!r||n)&&"function"!=typeof n)throw new Error(l(e,t,r)+"must be a valid function.")},t.validateContextObject=function(e,t,n,r){if((!r||n)&&("object"!=typeof n||null===n))throw new Error(l(e,t,r)+"must be a valid context object.")},t.validateNamespace=function(e,t,n,r){if((!r||n)&&"string"!=typeof n)throw new Error(l(e,t,r)+"must be a valid firebase namespace.")},t.stringLength=function(e){for(var t=0,n=0,r;nr?t++:2048>r?t+=2:55296<=r&&56319>=r?(t+=4,n++):t+=3;return t},t.stringToByteArray=function(e){for(var t=[],n=0,r=0,o;r=o){var i=o-55296;r++,u(ro?t[n++]=o:2048>o?(t[n++]=192|o>>6,t[n++]=128|63&o):65536>o?(t[n++]=224|o>>12,t[n++]=128|63&o>>6,t[n++]=128|63&o):(t[n++]=240|o>>18,t[n++]=128|63&o>>12,t[n++]=128|63&o>>6,t[n++]=128|63&o)}return t}},"5E0L":function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var r=function(){function e(e,t){for(var n=0,r;no)){for(var s=null,l=r.line+1,i=n.lastLine(),d;l<=i;++l)if(d=t(n,l),-1==d);else if(d>o)s=l;else break;if(s)return{from:e.Pos(r.line,n.getLine(r.line).length),to:e.Pos(s,n.getLine(s).length)}}})})},"6TpT":function(e){"use strict";e.exports=function(e){try{return!!e()}catch(t){return!0}}},"6r0S":function(e,t,n){"use strict";(function(e){e(n("tQq4"))})(function(e){function t(t,n){for(var r=0,o=t.length;ri.ch&&(d.end=i.ch,d.string=d.string.slice(0,i.ch-d.start)):d={start:i.ch,end:i.ch,string:"",state:d.state,type:"."==d.string?"property":null};for(var c=d;"property"==c.type;){if(c=r(t,l(i.line,c.start)),"."!=c.string)return;if(c=r(t,l(i.line,c.start)),!u)var u=[];u.push(c)}return{list:s(d,u,n,o),from:l(i.line,d.start),to:l(i.line,d.end)}}}}function o(e,t){var n=e.getTokenAt(t);return t.ch==n.start+1&&"."==n.string.charAt(0)?(n.end=n.start,n.string=".",n.type="property"):/^\.[\w$_]*$/.test(n.string)&&(n.type="property",n.start++,n.string=n.string.replace(/\./,"")),n}function i(e,t){if(!Object.getOwnPropertyNames||!Object.getPrototypeOf)for(var n in e)t(n);else for(var r=e;r;r=Object.getPrototypeOf(r))Object.getOwnPropertyNames(r).forEach(t)}function s(e,r,o,s){function l(e){0!=e.lastIndexOf(m,0)||n(h,e)||h.push(e)}function u(e){"string"==typeof e?t(d,l):e instanceof Array?t(p,l):e instanceof Function&&t(c,l),i(e,l)}var h=[],m=e.string,g=s&&s.globalScope||window;if(r&&r.length){var f=r.pop(),y;for(f.type&&0===f.type.indexOf("variable")?(s&&s.additionalContext&&(y=s.additionalContext[f.string]),(!s||!1!==s.useGlobalScope)&&(y=y||g[f.string])):"string"==f.type?y="":"atom"==f.type?y=1:"function"==f.type&&(null!=g.jQuery&&("$"==f.string||"jQuery"==f.string)&&"function"==typeof g.jQuery?y=g.jQuery():null!=g._&&"_"==f.string&&"function"==typeof g._&&(y=g._()));null!=y&&r.length;)y=y[r.pop().string];null!=y&&u(y)}else{for(var b=e.state.localVars;b;b=b.next)l(b.name);for(var b=e.state.globalVars;b;b=b.next)l(b.name);s&&!1===s.useGlobalScope||u(g),t(o,l)}return h}var l=e.Pos;e.registerHelper("hint","javascript",function(e,t){return r(e,u,function(t,e){return t.getTokenAt(e)},t)}),e.registerHelper("hint","coffeescript",function(e,t){return r(e,h,o,t)});var d=["charAt","charCodeAt","indexOf","lastIndexOf","substring","substr","slice","trim","trimLeft","trimRight","toUpperCase","toLowerCase","split","concat","match","replace","search"],p=["length","concat","join","splice","push","pop","shift","unshift","slice","reverse","sort","indexOf","lastIndexOf","every","some","filter","forEach","map","reduce","reduceRight",""],c=["prototype","apply","call","bind"],u=["break","case","catch","class","const","continue","debugger","default","delete","do","else","export","extends","false","finally","for","function","if","in","import","instanceof","new","null","return","super","switch","this","throw","true","try","typeof","var","void","while","with","yield"],h=["and","break","catch","class","continue","delete","do","else","extends","false","finally","for","if","in","instanceof","isnt","new","no","not","null","of","off","on","or","return","switch","then","throw","true","try","typeof","until","void","while","with","yes"]})},"7EAy":function(e,t){"use strict";t.__esModule=!0;var n=new Set(["a","abbr","acronym","applet","b","basefont","bdo","big","br","button","cite","code","del","dfn","em","font","i","iframe","img","input","ins","kbd","label","map","object","q","s","samp","select","small","span","strike","strong","sub","sup","textarea","tt","u","var"]),r={p:"span",ul:"li",ol:"li",table:"tr",tr:"td",tbody:"tr",thead:"tr",tfoot:"tr",colgroup:"col",select:"option",optgroup:"option",audio:"source",video:"source",object:"param",map:"area"};t.default=function(e){return e=(e||"").toLowerCase(),r[e]||(n.has(e)?"span":"div")}},"7tlB":function(e,t,n){"use strict";function r(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t);}return this.index=t,this.push({data:e,meta:{percent:this.max?100*(this.index/this.max):0}})},e.exports=r},AIXc:function(e,t,n){"use strict";(function(e){e(n("tQq4"),n("HeB0"),n("qqFR"),n("ggoL"))})(function(e){function t(e,t,n){var r=e.current(),o=r.search(t);return-1","i")}function s(e,t){for(var n in e)for(var r=t[n]||(t[n]=[]),o=e[n],s=o.length-1;0<=s;s--)r.unshift(o[s])}function i(e,t){for(var n=0,o;n\s\/]/.test(r.current())&&(h=s.htmlState.tagName&&s.htmlState.tagName.toLowerCase())&&c.hasOwnProperty(h))s.inTag=h+" ";else if(s.inTag&&u&&/>$/.test(r.current())){var m=/^([\S]+) (.*)/.exec(s.inTag);s.inTag=null;var g=">"==r.current()&&i(c[m[1]],m[2]),f=e.getMode(n,g),y=o(m[1],!0),b=o(m[1],!1);s.token=function(e,n){return e.match(y,!1)?(n.token=d,n.localState=n.localMode=null,null):t(e,b,n.localMode.token(e,n.localState))},s.localMode=f,s.localState=e.startState(f,p.indent(s.htmlState,""))}else s.inTag&&(s.inTag+=r.current(),r.eol()&&(s.inTag+=" "));return l}var p=e.getMode(n,{name:"xml",htmlMode:!0,multilineTagIndentFactor:r.multilineTagIndentFactor,multilineTagIndentPastTag:r.multilineTagIndentPastTag}),c={},u=r&&r.tags,h=r&&r.scriptTypes;if(s(l,c),u&&s(u,c),h)for(var m=h.length-1;0<=m;m--)c.script.unshift(["type",h[m].matches,h[m].mode]);return{startState:function(){var t=e.startState(p);return{token:d,inTag:null,localMode:null,localState:null,htmlState:t}},copyState:function(t){var n;return t.localState&&(n=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:n,htmlState:e.copyState(p,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,n,r){return!t.localMode||/^\s*<\//.test(n)?p.indent(t.htmlState,n):t.localMode.indent?t.localMode.indent(t.localState,n,r):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||p}}}},"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")})},AhD2:function(){"use strict";var e=Math.round;(function(){function t(e){var t=getComputedStyle(e).color;if(t)try{return t.match(/(\d+), (\d+), (\d+)/).slice(1)}catch(t){return[255,255,255]}else return[255,255,255]}function n(e,t,n){var r={x:e,y:t+10,alpha:1,color:n};return 1===N?(r.size=s(2,4),r.vx=T.x[0]+Math.random()*(T.x[1]-T.x[0]),r.vy=T.y[0]+Math.random()*(T.y[1]-T.y[0])):2===N&&(r.size=s(2,8),r.drag=0.92,r.vx=s(-3,3),r.vy=s(-3,3),r.wander=0.15,r.theta=s(0,360)*m/180),r}function r(t){t.vy+=S,t.x+=t.vx,t.y+=t.vy,t.alpha*=C,M.fillStyle="rgba("+t.color[0]+","+t.color[1]+","+t.color[2]+","+t.alpha+")",M.fillRect(e(t.x-1),e(t.y-1),t.size,t.size)}function o(t){t.x+=t.vx,t.y+=t.vy,t.vx*=t.drag,t.vy*=t.drag,t.theta+=s(-0.5,0.5),t.vx+=0.1*Math.sin(t.theta),t.vy+=0.1*Math.cos(t.theta),t.size*=0.96,M.fillStyle="rgba("+t.color[0]+","+t.color[1]+","+t.color[2]+","+t.alpha+")",M.beginPath(),M.arc(e(t.x-1),e(t.y-1),t.size,0,2*m),M.fill()}function i(){for(var e=x.length,t;e--;)(t=x[e],!(!t||0.01>t.alpha||0.5>=t.size))&&(1===N?r(t):2===N&&o(t))}function s(e,t){return t||(t=e,e=0),e+~~(Math.random()*(t-e+1))}function l(e,t){var n=!1;return function(){n||(e.apply(this,arguments),n=!0,setTimeout(function(){n=!1},t))}}function d(){h&&(M.clearRect(0,0,_,w),D=new Date().getTime(),!b&&(b=D),R=(D-b)/1e3,b=D,0src:m+img","ri:t|ri:type":"pic>src:t+img","!!!":"{}",doc:"html[lang=${lang}]>(head>meta[charset=${charset}]+meta:vp+meta:edge+title{${1:Document}})+body","!|html:5":"!!!+doc",c:"{}","cc:ie":"{}","cc:noie":"{${0}}"},css:{"@f":"@font-face {\n\tfont-family: ${1};\n\tsrc: url(${1});\n}","@ff":"@font-face {\n\tfont-family: '${1:FontName}';\n\tsrc: url('${2:FileName}.eot');\n\tsrc: url('${2:FileName}.eot?#iefix') format('embedded-opentype'),\n\t\t url('${2:FileName}.woff') format('woff'),\n\t\t url('${2:FileName}.ttf') format('truetype'),\n\t\t url('${2:FileName}.svg#${1:FontName}') format('svg');\n\tfont-style: ${3:normal};\n\tfont-weight: ${4:normal};\n}","@i|@import":"@import url(${0});","@kf":"@keyframes ${1:identifier} {\n\t${2}\n}","@m|@media":"@media ${1:screen} {\n\t${0}\n}",ac:"align-content:flex-start|flex-end|center|space-between|space-around|stretch",ai:"align-items:flex-start|flex-end|center|baseline|stretch",anim:"animation:${1:name} ${2:duration} ${3:timing-function} ${4:delay} ${5:iteration-count} ${6:direction} ${7:fill-mode}",animdel:"animation-delay:${1:time}",animdir:"animation-direction:normal|reverse|alternate|alternate-reverse",animdur:"animation-duration:${1:0}s",animfm:"animation-fill-mode:both|forwards|backwards",animic:"animation-iteration-count:1|infinite",animn:"animation-name",animps:"animation-play-state:running|paused",animtf:"animation-timing-function:linear|ease|ease-in|ease-out|ease-in-out|cubic-bezier(${1:0.1}, ${2:0.7}, ${3:1.0}, ${3:0.1})",ap:"appearance:none",as:"align-self:auto|flex-start|flex-end|center|baseline|stretch",b:"bottom",bd:"border:${1:1px} ${2:solid} ${3:#000}",bdb:"border-bottom:${1:1px} ${2:solid} ${3:#000}",bdbc:"border-bottom-color:#${1:000}",bdbi:"border-bottom-image:url(${0})",bdbk:"border-break:close",bdbli:"border-bottom-left-image:url(${0})|continue",bdblrs:"border-bottom-left-radius",bdbri:"border-bottom-right-image:url(${0})|continue",bdbrrs:"border-bottom-right-radius",bdbs:"border-bottom-style",bdbw:"border-bottom-width",bdc:"border-color:#${1:000}",bdci:"border-corner-image:url(${0})|continue",bdcl:"border-collapse:collapse|separate",bdf:"border-fit:repeat|clip|scale|stretch|overwrite|overflow|space",bdi:"border-image:url(${0})",bdl:"border-left:${1:1px} ${2:solid} ${3:#000}",bdlc:"border-left-color:#${1:000}",bdlen:"border-length",bdli:"border-left-image:url(${0})",bdls:"border-left-style",bdlw:"border-left-width",bdr:"border-right:${1:1px} ${2:solid} ${3:#000}",bdrc:"border-right-color:#${1:000}",bdri:"border-right-image:url(${0})",bdrs:"border-radius",bdrst:"border-right-style",bdrw:"border-right-width",bds:"border-style:none|hidden|dotted|dashed|solid|double|dot-dash|dot-dot-dash|wave|groove|ridge|inset|outset",bdsp:"border-spacing",bdt:"border-top:${1:1px} ${2:solid} ${3:#000}",bdtc:"border-top-color:#${1:000}",bdti:"border-top-image:url(${0})",bdtli:"border-top-left-image:url(${0})|continue",bdtlrs:"border-top-left-radius",bdtri:"border-top-right-image:url(${0})|continue",bdtrrs:"border-top-right-radius",bdts:"border-top-style",bdtw:"border-top-width",bdw:"border-width",bfv:"backface-visibility:hidden|visible",bg:"background:#${1:000}",bga:"background-attachment:fixed|scroll",bgbk:"background-break:bounding-box|each-box|continuous",bgc:"background-color:#${1:fff}",bgcp:"background-clip:padding-box|border-box|content-box|no-clip",bgi:"background-image:url(${0})",bgo:"background-origin:padding-box|border-box|content-box",bgp:"background-position:${1:0} ${2:0}",bgpx:"background-position-x",bgpy:"background-position-y",bgr:"background-repeat:no-repeat|repeat-x|repeat-y|space|round",bgsz:"background-size:contain|cover",bxsh:"box-shadow:${1:inset }${2:hoff} ${3:voff} ${4:blur} #${5:000}|none",bxsz:"box-sizing:border-box|content-box|border-box",c:"color:#${1:000}",cl:"clear:both|left|right|none",cm:"/* ${0} */",cnt:"content:'${0}'|normal|open-quote|no-open-quote|close-quote|no-close-quote|attr(${0})|counter(${0})|counters({$0})",coi:"counter-increment",colm:"columns",colmc:"column-count",colmf:"column-fill",colmg:"column-gap",colmr:"column-rule",colmrc:"column-rule-color",colmrs:"column-rule-style",colmrw:"column-rule-width",colms:"column-span",colmw:"column-width",cor:"counter-reset",cp:"clip:auto|rect(${1:top} ${2:right} ${3:bottom} ${4:left})",cps:"caption-side:top|bottom",cur:"cursor:pointer|auto|default|crosshair|hand|help|move|pointer|text",d:"display:block|none|flex|inline-flex|inline|inline-block|list-item|run-in|compact|table|inline-table|table-caption|table-column|table-column-group|table-header-group|table-footer-group|table-row|table-row-group|table-cell|ruby|ruby-base|ruby-base-group|ruby-text|ruby-text-group",ec:"empty-cells:show|hide",f:"font:${1:1em} ${2:sans-serif}",fef:"font-effect:none|engrave|emboss|outline",fem:"font-emphasize",femp:"font-emphasize-position:before|after",fems:"font-emphasize-style:none|accent|dot|circle|disc",ff:"font-family:serif|sans-serif|cursive|fantasy|monospace",fl:"float:left|right|none",fs:"font-style:italic|normal|oblique",fsm:"font-smoothing:antialiased|subpixel-antialiased|none",fst:"font-stretch:normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded",fv:"font-variant:normal|small-caps",fw:"font-weight:normal|bold|bolder|lighter",fx:"flex",fxb:"flex-basis:fill|max-content|min-content|fit-content|content",fxd:"flex-direction:row|row-reverse|column|column-reverse",fxf:"flex-flow",fxg:"flex-grow",fxsh:"flex-shrink",fxw:"flex-wrap:nowrap|wrap|wrap-reverse",fz:"font-size",fza:"font-size-adjust",h:"height",jc:"justify-content:flex-start|flex-end|center|space-between|space-around",l:"left",lg:"background-image:linear-gradient(${1})",lh:"line-height",lis:"list-style",lisi:"list-style-image",lisp:"list-style-position:inside|outside",list:"list-style-type:disc|circle|square|decimal|decimal-leading-zero|lower-roman|upper-roman",lts:"letter-spacing:normal",m:"margin",mah:"max-height",mar:"max-resolution",maw:"max-width",mb:"margin-bottom",mih:"min-height",mir:"min-resolution",miw:"min-width",ml:"margin-left",mr:"margin-right",mt:"margin-top",ol:"outline",olc:"outline-color:#${1:000}|invert",olo:"outline-offset",ols:"outline-style:none|dotted|dashed|solid|double|groove|ridge|inset|outset",olw:"outline-width|thin|medium|thick",op:"opacity",ord:"order",ori:"orientation:landscape|portrait",orp:"orphans",ov:"overflow:hidden|visible|hidden|scroll|auto",ovs:"overflow-style:scrollbar|auto|scrollbar|panner|move|marquee",ovx:"overflow-x:hidden|visible|hidden|scroll|auto",ovy:"overflow-y:hidden|visible|hidden|scroll|auto",p:"padding",pb:"padding-bottom",pgba:"page-break-after:auto|always|left|right",pgbb:"page-break-before:auto|always|left|right",pgbi:"page-break-inside:auto|avoid",pl:"padding-left",pos:"position:relative|absolute|relative|fixed|static",pr:"padding-right",pt:"padding-top",q:"quotes",qen:"quotes:'\\201C' '\\201D' '\\2018' '\\2019'",qru:"quotes:'\\00AB' '\\00BB' '\\201E' '\\201C'",r:"right",rsz:"resize:none|both|horizontal|vertical",t:"top",ta:"text-align:left|center|right|justify",tal:"text-align-last:left|center|right",tbl:"table-layout:fixed",td:"text-decoration:none|underline|overline|line-through",te:"text-emphasis:none|accent|dot|circle|disc|before|after",th:"text-height:auto|font-size|text-size|max-size",ti:"text-indent",tj:"text-justify:auto|inter-word|inter-ideograph|inter-cluster|distribute|kashida|tibetan",to:"text-outline:${1:0} ${2:0} ${3:#000}",tov:"text-overflow:ellipsis|clip",tr:"text-replace",trf:"transform:${1}|skewX(${1:angle})|skewY(${1:angle})|scale(${1:x}, ${2:y})|scaleX(${1:x})|scaleY(${1:y})|scaleZ(${1:z})|scale3d(${1:x}, ${2:y}, ${3:z})|rotate(${1:angle})|rotateX(${1:angle})|rotateY(${1:angle})|rotateZ(${1:angle})|translate(${1:x}, ${2:y})|translateX(${1:x})|translateY(${1:y})|translateZ(${1:z})|translate3d(${1:tx}, ${2:ty}, ${3:tz})",trfo:"transform-origin",trfs:"transform-style:preserve-3d",trs:"transition:${1:prop} ${2:time}",trsde:"transition-delay:${1:time}",trsdu:"transition-duration:${1:time}",trsp:"transition-property:${1:prop}",trstf:"transition-timing-function:${1:fn}",tsh:"text-shadow:${1:hoff} ${2:voff} ${3:blur} ${4:#000}",tt:"text-transform:uppercase|lowercase|capitalize|none",tw:"text-wrap:none|normal|unrestricted|suppress",us:"user-select:none",v:"visibility:hidden|visible|collapse",va:"vertical-align:top|super|text-top|middle|baseline|bottom|text-bottom|sub",w:"width",whs:"white-space:nowrap|pre|pre-wrap|pre-line|normal",whsc:"white-space-collapse:normal|keep-all|loose|break-strict|break-all",wid:"widows",wm:"writing-mode:lr-tb|lr-tb|lr-bt|rl-tb|rl-bt|tb-rl|tb-lr|bt-lr|bt-rl",wob:"word-break:normal|keep-all|break-all",wos:"word-spacing",wow:"word-wrap:none|unrestricted|suppress|break-word|normal",z:"z-index",zom:"zoom:1"},xsl:{"tm|tmatch":"xsl:template[match mode]","tn|tname":"xsl:template[name]",call:"xsl:call-template[name]",ap:"xsl:apply-templates[select mode]",api:"xsl:apply-imports",imp:"xsl:import[href]",inc:"xsl:include[href]",ch:"xsl:choose","wh|xsl:when":"xsl:when[test]",ot:"xsl:otherwise",if:"xsl:if[test]",par:"xsl:param[name]",pare:"xsl:param[name select]",var:"xsl:variable[name]",vare:"xsl:variable[name select]",wp:"xsl:with-param[name select]",key:"xsl:key[name match use]",elem:"xsl:element[name]",attr:"xsl:attribute[name]",attrs:"xsl:attribute-set[name]",cp:"xsl:copy[select]",co:"xsl:copy-of[select]",val:"xsl:value-of[select]","for|each":"xsl:for-each[select]",tex:"xsl:text",com:"xsl:comment",msg:"xsl:message[terminate=no]",fall:"xsl:fallback",num:"xsl:number[value]",nam:"namespace-alias[stylesheet-prefix result-prefix]",pres:"xsl:preserve-space[elements]",strip:"xsl:strip-space[elements]",proc:"xsl:processing-instruction[name]",sort:"xsl:sort[select order]",choose:"xsl:choose>xsl:when+xsl:otherwise",xsl:"!!!+xsl:stylesheet[version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform]>{\n|}","!!!":"{}"}}},BVSg:function(e,t,n){"use strict";(function(e){e(n("tQq4"),n("1JcR"))})(function(e){function t(t){if(t.getOption("disableInput"))return e.Pass;for(var n=t.listSelections(),r=[],p=t.getOption("autoCloseTags"),c=0;ci.ch&&(b=b.slice(0,b.length-u.end+i.ch));var x=b.toLowerCase();if(!b||"string"==u.type&&(u.end!=i.ch||!/[\"\']/.test(u.string.charAt(u.string.length-1))||1==u.string.length)||"tag"==u.type&&"closeTag"==m.type||u.string.indexOf("/")==u.string.length-1||f&&-1"+(v?"\n\n":"")+"",newPos:v?e.Pos(i.line+1,0):e.Pos(i.line,i.ch+1)}}for(var k="object"==typeof p&&p.dontIndentOnAutoClose,c=n.length-1,S;0<=c;c--){S=r[c],t.replaceRange(S.text,n[c].head,n[c].anchor,"+insert");var w=t.listSelections().slice(0);w[c]={head:S.newPos,anchor:S.newPos},t.setSelections(w),!k&&S.indent&&(t.indentLine(S.newPos.line,null,!0),t.indentLine(S.newPos.line+1,null,!0))}}function n(t,n){for(var r=t.listSelections(),o=[],l=n?"/":""!=t.getLine(i.line).charAt(u.end)&&(g+=">"),o[c]=g}if(t.replaceSelections(o),r=t.listSelections(),!p)for(var c=0;c'"]=function(e){return t(e)}),n.addKeyMap(s)}});var l=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],d=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];e.commands.closeTag=function(e){return n(e)}})},BtxX:function(e){"use strict";(function(t){function n(){}function r(e,t){return function(){e.apply(t,arguments)}}function o(e){if(!(this instanceof o))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],c(e,this)}function s(e,t){for(;3===e._state;)e=e._value;return 0===e._state?void e._deferreds.push(t):void(e._handled=!0,o._immediateFn(function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null===n)return void(1===e._state?i:l)(t.promise,e._value);var r;try{r=n(e._value)}catch(n){return void l(t.promise,n)}i(t.promise,r)}))}function i(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof o)return t._state=3,t._value=e,void d(t);if("function"==typeof n)return void c(r(n,e),t)}t._state=1,t._value=e,d(t)}catch(n){l(t,n)}}function l(e,t){e._state=2,e._value=t,d(e)}function d(e){2===e._state&&0===e._deferreds.length&&o._immediateFn(function(){e._handled||o._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;t=G?e=G:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function m(e,t){return 0>=e||0===t.length&&t.ended?0:t.objectMode?1:e===e?(e>t.highWaterMark&&(t.highWaterMark=h(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0)):t.flowing&&t.length?t.buffer.head.data.length:t.length}function g(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,f(e)}}function f(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(q("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?O.nextTick(y,e):y(e))}function y(e){q("emit readable"),e.emit("readable"),C(e)}function b(e,t){t.readingMore||(t.readingMore=!0,O.nextTick(x,e,t))}function x(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=_(e,t.buffer,t.decoder),r}function _(e,t,n){var r;return ei.length?i.length:e;if(o+=s===i.length?i:i.slice(0,e),e-=s,0===e){s===i.length?(++r,t.head=n.next?n.next:t.tail=null):(t.head=n,n.data=i.slice(s));break}++r}return t.length-=r,o}function A(e,t){var n=F.allocUnsafe(e),r=t.head,o=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var i=r.data,s=e>i.length?i.length:e;if(i.copy(n,n.length-e,0,s),e-=s,0===e){s===i.length?(++o,t.head=r.next?r.next:t.tail=null):(t.head=r,r.data=i.slice(s));break}++o}return t.length-=o,n}function I(e){var t=e._readableState;if(0=t.highWaterMark||t.ended))return q("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?I(this):f(this),null;if(e=m(e,t),0===e&&t.ended)return 0===t.length&&I(this),null;var r=t.needReadable;q("need readable",r),(0===t.length||t.length-er&&(t=t.slice(0,r-1).concat(t.slice(r-1).join(", ")));t.length;){var o=t.shift(),s=n.fields.shift(),l=o.length-s.length;n.string=n.string.slice(0,s.location)+o+n.string.slice(s.location+s.length);for(var d=0,i=n.fields.length;d=e?0:6==e>>5?2:14==e>>4?3:30==e>>3?4:2==e>>6?-1:-2}function l(e,t,n){var r=t.length-1;if(r=r)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function h(e,t){var r=(e.length-t)%3;return 0==r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1==r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function m(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function g(e){return e.toString(this.encoding)}function f(e){return e&&e.length?this.write(e):""}var y=n("38Wu").Buffer,b=y.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1;}};t.StringDecoder=i,i.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(t=this.fillLast(e),void 0===t)return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n>4).toString(16)}function p(e){return c(e.toString(16),2)}function c(e,t){for(;e.lengthe||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},t.prototype.emit=function(e){var t,r,l,d,p,i;if(this._events||(this._events={}),"error"===e&&(!this._events.error||o(this._events.error)&&!this._events.error.length))if(t=arguments[1],t instanceof Error)throw t;else{var c=new Error("Uncaught, unspecified \"error\" event. ("+t+")");throw c.context=t,c}if(r=this._events[e],s(r))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:d=Array.prototype.slice.call(arguments,1),r.apply(this,d);}else if(o(r))for(d=Array.prototype.slice.call(arguments,1),i=r.slice(),l=i.length,p=0;pi&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())),this},t.prototype.on=t.prototype.addListener,t.prototype.once=function(e,t){function r(){this.removeListener(e,r),o||(o=!0,t.apply(this,arguments))}if(!n(t))throw TypeError("listener must be a function");var o=!1;return r.listener=t,this.on(e,r),this},t.prototype.removeListener=function(e,t){var r,s,l,d;if(!n(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=this._events[e],l=r.length,s=-1,r===t||n(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(r)){for(d=l;0s)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(s,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},t.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[e],n(r))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},t.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?n(this._events[e])?[this._events[e]]:this._events[e].slice():[],t},t.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(n(t))return 1;if(t)return t.length}return 0},t.listenerCount=function(e,t){return e.listenerCount(t)}},GIDK:function(e,t,n){"use strict";function r(e){return(255&e>>>24)+(65280&e>>>8)+((65280&e)<<8)+((255&e)<<24)}function o(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new h.Buf16(320),this.work=new h.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function i(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=E,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new h.Buf32(oe),t.distcode=t.distdyn=new h.Buf32(ae),t.sane=1,t.back=-1,S):w}function s(e){var t;return e&&e.state?(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,i(e)):w}function l(e,t){var n,r;return e&&e.state?(r=e.state,0>t?(n=0,t=-t):(n=(t>>4)+1,48>t&&(t&=15)),t&&(8>t||15t;)e.lens[t++]=8;for(;256>t;)e.lens[t++]=9;for(;280>t;)e.lens[t++]=7;for(;288>t;)e.lens[t++]=8;for(y(b,e.lens,0,288,se,0,e.work,{bits:9}),t=0;32>t;)e.lens[t++]=5;y(x,e.lens,0,32,le,0,e.work,{bits:5}),ie=!1}e.lencode=se,e.lenbits=9,e.distcode=le,e.distbits=5}function c(e,t,n,r){var o=e.state,i;return null===o.window&&(o.wsize=1<=o.wsize?(h.arraySet(o.window,t,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>r&&(i=r),h.arraySet(o.window,t,n-r,i,o.wnext),r-=i,r?(h.arraySet(o.window,t,n-r,r,0),o.wnext=r,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whavepe;){if(0===se)break inf_leave;se--,de+=d[ae++]<>>8,l.check=g(l.check,i,2,0),de=0,pe=0,l.mode=A;break}if(l.flags=0,l.head&&(l.head.done=!1),!(1&l.wrap)||(((255&de)<<8)+(de>>8))%31){e.msg="incorrect header check",l.mode=ne;break}if((15&de)!=_){e.msg="unknown compression method",l.mode=ne;break}if(de>>>=4,pe-=4,Se=(15&de)+8,0===l.wbits)l.wbits=Se;else if(Se>l.wbits){e.msg="invalid window size",l.mode=ne;break}l.dmax=1<pe;){if(0===se)break inf_leave;se--,de+=d[ae++]<>8),512&l.flags&&(i[0]=255&de,i[1]=255&de>>>8,l.check=g(l.check,i,2,0)),de=0,pe=0,l.mode=I;case I:for(;32>pe;){if(0===se)break inf_leave;se--,de+=d[ae++]<>>8,i[2]=255&de>>>16,i[3]=255&de>>>24,l.check=g(l.check,i,4,0)),de=0,pe=0,l.mode=N;case N:for(;16>pe;){if(0===se)break inf_leave;se--,de+=d[ae++]<>8),512&l.flags&&(i[0]=255&de,i[1]=255&de>>>8,l.check=g(l.check,i,2,0)),de=0,pe=0,l.mode=L;case L:if(1024&l.flags){for(;16>pe;){if(0===se)break inf_leave;se--,de+=d[ae++]<>>8,l.check=g(l.check,i,2,0)),de=0,pe=0}else l.head&&(l.head.extra=null);l.mode=O;case O:if(1024&l.flags&&(he=l.length,he>se&&(he=se),he&&(l.head&&(Se=l.head.extra_len-l.length,!l.head.extra&&(l.head.extra=Array(l.head.extra_len)),h.arraySet(l.head.extra,d,ae,he,Se)),512&l.flags&&(l.check=g(l.check,d,he,ae)),se-=he,ae+=he,l.length-=he),l.length))break inf_leave;l.length=0,l.mode=M;case M:if(2048&l.flags){if(0===se)break inf_leave;he=0;do Se=d[ae+he++],l.head&&Se&&65536>l.length&&(l.head.name+=u(Se));while(Se&&hel.length&&(l.head.comment+=u(Se));while(Se&&hepe;){if(0===se)break inf_leave;se--,de+=d[ae++]<>9,l.head.done=!0),e.adler=l.check=0,l.mode=F;break;case P:for(;32>pe;){if(0===se)break inf_leave;se--,de+=d[ae++]<>>=7&pe,pe-=7&pe,l.mode=Z;break}for(;3>pe;){if(0===se)break inf_leave;se--,de+=d[ae++]<>>=1,pe-=1,3&de){case 0:l.mode=z;break;case 1:if(p(l),l.mode=K,t===k){de>>>=2,pe-=2;break inf_leave}break;case 2:l.mode=V;break;case 3:e.msg="invalid block type",l.mode=ne;}de>>>=2,pe-=2;break;case z:for(de>>>=7&pe,pe-=7&pe;32>pe;){if(0===se)break inf_leave;se--,de+=d[ae++]<>>16)){e.msg="invalid stored block lengths",l.mode=ne;break}if(l.length=65535&de,de=0,pe=0,l.mode=j,t===k)break inf_leave;case j:l.mode=q;case q:if(he=l.length,he){if(he>se&&(he=se),he>le&&(he=le),0===he)break inf_leave;h.arraySet(oe,d,ae,he,ie),se-=he,ae+=he,le-=he,ie+=he,l.length-=he;break}l.mode=F;break;case V:for(;14>pe;){if(0===se)break inf_leave;se--,de+=d[ae++]<>>=5,pe-=5,l.ndist=(31&de)+1,de>>>=5,pe-=5,l.ncode=(15&de)+4,de>>>=4,pe-=4,286pe;){if(0===se)break inf_leave;se--,de+=d[ae++]<>>=3,pe-=3}for(;19>l.have;)l.lens[s[l.have++]]=0;if(l.lencode=l.lendyn,l.lenbits=7,Ce={bits:l.lenbits},we=y(0,l.lens,0,19,l.lencode,0,l.work,Ce),l.lenbits=Ce.bits,we){e.msg="invalid code lengths set",l.mode=ne;break}l.have=0,l.mode=H;case H:for(;l.have>>24,ye=255&o>>>16,be=65535&o,fe<=pe)break;if(0===se)break inf_leave;se--,de+=d[ae++]<be)de>>>=fe,pe-=fe,l.lens[l.have++]=be;else{if(16===be){for(Te=fe+2;pe>>=fe,pe-=fe,0===l.have){e.msg="invalid bit length repeat",l.mode=ne;break}Se=l.lens[l.have-1],he=3+(3&de),de>>>=2,pe-=2}else if(17===be){for(Te=fe+3;pe>>=fe,pe-=fe,Se=0,he=3+(7&de),de>>>=3,pe-=3}else{for(Te=fe+7;pe>>=fe,pe-=fe,Se=0,he=11+(127&de),de>>>=7,pe-=7}if(l.have+he>l.nlen+l.ndist){e.msg="invalid bit length repeat",l.mode=ne;break}for(;he--;)l.lens[l.have++]=Se}}if(l.mode===ne)break;if(0===l.lens[256]){e.msg="invalid code -- missing end-of-block",l.mode=ne;break}if(l.lenbits=9,Ce={bits:l.lenbits},we=y(b,l.lens,0,l.nlen,l.lencode,0,l.work,Ce),l.lenbits=Ce.bits,we){e.msg="invalid literal/lengths set",l.mode=ne;break}if(l.distbits=6,l.distcode=l.distdyn,Ce={bits:l.distbits},we=y(x,l.lens,l.nlen,l.ndist,l.distcode,0,l.work,Ce),l.distbits=Ce.bits,we){e.msg="invalid distances set",l.mode=ne;break}if(l.mode=K,t===k)break inf_leave;case K:l.mode=G;case G:if(6<=se&&258<=le){e.next_out=ie,e.avail_out=le,e.next_in=ae,e.avail_in=se,l.hold=de,l.bits=pe,f(e,ue),ie=e.next_out,oe=e.output,le=e.avail_out,ae=e.next_in,d=e.input,se=e.avail_in,de=l.hold,pe=l.bits,l.mode===F&&(l.back=-1);break}for(l.back=0;;){if(o=l.lencode[de&(1<>>24,ye=255&o>>>16,be=65535&o,fe<=pe)break;if(0===se)break inf_leave;se--,de+=d[ae++]<>xe)],fe=o>>>24,ye=255&o>>>16,be=65535&o,xe+fe<=pe)break;if(0===se)break inf_leave;se--,de+=d[ae++]<>>=xe,pe-=xe,l.back+=xe}if(de>>>=fe,pe-=fe,l.back+=fe,l.length=be,0===ye){l.mode=$;break}if(32&ye){l.back=-1,l.mode=F;break}if(64&ye){e.msg="invalid literal/length code",l.mode=ne;break}l.extra=15&ye,l.mode=X;case X:if(l.extra){for(Te=l.extra;pe>>=l.extra,pe-=l.extra,l.back+=l.extra}l.was=l.length,l.mode=Q;case Q:for(;;){if(o=l.distcode[de&(1<>>24,ye=255&o>>>16,be=65535&o,fe<=pe)break;if(0===se)break inf_leave;se--,de+=d[ae++]<>xe)],fe=o>>>24,ye=255&o>>>16,be=65535&o,xe+fe<=pe)break;if(0===se)break inf_leave;se--,de+=d[ae++]<>>=xe,pe-=xe,l.back+=xe}if(de>>>=fe,pe-=fe,l.back+=fe,64&ye){e.msg="invalid distance code",l.mode=ne;break}l.offset=be,l.extra=15&ye,l.mode=Y;case Y:if(l.extra){for(Te=l.extra;pe>>=l.extra,pe-=l.extra,l.back+=l.extra}if(l.offset>l.dmax){e.msg="invalid distance too far back",l.mode=ne;break}l.mode=J;case J:if(0===le)break inf_leave;if(he=ue-le,l.offset>he){if(he=l.offset-he,he>l.whave&&l.sane){e.msg="invalid distance too far back",l.mode=ne;break}he>l.wnext?(he-=l.wnext,me=l.wsize-he):me=l.wnext-he,he>l.length&&(he=l.length),ge=l.window}else ge=oe,me=ie-l.offset,he=l.length;he>le&&(he=le),le-=he,l.length-=he;do oe[ie++]=ge[me++];while(--he);0===l.length&&(l.mode=G);break;case $:if(0===le)break inf_leave;oe[ie++]=l.length,le--,l.mode=G;break;case Z:if(l.wrap){for(;32>pe;){if(0===se)break inf_leave;se--,de|=d[ae++]<pe;){if(0===se)break inf_leave;se--,de+=d[ae++]<e.firstLine();)o=t.Pos(o.line-1,0),c=l(!1);if(c&&!c.cleared&&"unfold"!==s){var u=n(e,i);t.on(u,"mousedown",function(n){h.clear(),t.e_preventDefault(n)});var h=e.markText(c.from,c.to,{replacedWith:u,clearOnEnter:r(e,i,"clearOnEnter"),__isFold:!0});h.on("clear",function(n,r){t.signal(e,"unfold",e,n,r)}),t.signal(e,"fold",e,c.from,c.to)}}function n(e,t){var n=r(e,t,"widget");if("string"==typeof n){var o=document.createTextNode(n);n=document.createElement("span"),n.appendChild(o),n.className="CodeMirror-foldmarker"}else n&&(n=n.cloneNode(!0));return n}function r(e,t,n){if(t&&void 0!==t[n])return t[n];var r=e.options.foldOptions;return r&&void 0!==r[n]?r[n]:o[n]}t.newFoldFunction=function(t,n){return function(r,o){e(r,o,{rangeFinder:t,widget:n})}},t.defineExtension("foldCode",function(t,n,r){e(this,t,n,r)}),t.defineExtension("isFolded",function(e){for(var t=this.findMarksAt(e),n=0;n")):null:e.match("--")?n(d("comment","-->")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(p(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=d("meta","?>"),"meta"):(E=e.eat("/")?"closeTag":"openTag",t.tokenize=s,"tag bracket");if("&"==r){var o;return o=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),o?"atom":"error"}return e.eatWhile(/[^&<]/),null}function s(e,t){var n=e.next();if(">"==n||"/"==n&&e.eat(">"))return t.tokenize=i,E=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return E="equals",null;if("<"==n){t.tokenize=i,t.state=m,t.tagName=t.tagStart=null;var r=t.tokenize(e,t);return r?r+" tag error":"tag error"}return /[\'\"]/.test(n)?(t.tokenize=l(n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function l(e){var t=function(t,n){for(;!t.eol();)if(t.next()==e){n.tokenize=s;break}return"string"};return t.isInAttribute=!0,t}function d(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=i;break}n.next()}return e}}function p(e){return function(t,n){for(var r;null!=(r=t.next());){if("<"==r)return n.tokenize=p(e+1),n.tokenize(t,n);if(">"==r)if(1==e){n.tokenize=i;break}else return n.tokenize=p(e-1),n.tokenize(t,n)}return"meta"}}function c(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(C.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function u(e){e.context&&(e.context=e.context.prev)}function h(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!C.contextGrabbers.hasOwnProperty(n)||!C.contextGrabbers[n].hasOwnProperty(t))return;u(e)}}function m(e,t,n){return"openTag"==e?(n.tagStart=t.column(),g):"closeTag"==e?f:m}function g(e,t,n){return"word"==e?(n.tagName=t.current(),A="tag",x):C.allowMissingTagName&&"endTag"==e?(A="tag bracket",x(e,t,n)):(A="error",g)}function f(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&C.implicitlyClosed.hasOwnProperty(n.context.tagName)&&u(n),n.context&&n.context.tagName==r||!1===C.matchClosing?(A="tag",y):(A="tag error",b)}return C.allowMissingTagName&&"endTag"==e?(A="tag bracket",y(e,t,n)):(A="error",b)}function y(e,t,n){return"endTag"==e?(u(n),m):(A="error",y)}function b(e,t,n){return A="error",y(e,t,n)}function x(e,t,n){if("word"==e)return A="attribute",v;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,o=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||C.autoSelfClosers.hasOwnProperty(r)?h(n,r):(h(n,r),n.context=new c(n,r,o==n.indented)),m}return A="error",x}function v(e,t,n){return"equals"==e?k:(C.allowMissing||(A="error"),x(e,t,n))}function k(e,t,n){return"string"==e?S:"word"==e&&C.allowUnquoted?(A="string",x):(A="error",x(e,t,n))}function S(e,t,n){return"string"==e?S:x(e,t,n)}var w=r.indentUnit,C={},T=o.htmlMode?t:n;for(var _ in T)C[_]=T[_];for(var _ in o)C[_]=o[_];var E,A;return i.isInText=!0,{startState:function(e){var t={tokenize:i,state:m,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;E=null;var n=t.tokenize(e,t);return(n||E)&&"comment"!=n&&(A=null,t.state=t.state(E||n,e,t),A&&(n="error"==A?n+" error":A)),n},indent:function(t,n,r){var o=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+w;if(o&&o.noIndent)return e.Pass;if(t.tokenize!=s&&t.tokenize!=i)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1===C.multilineTagIndentPastTag?t.tagStart+w*(C.multilineTagIndentFactor||1):t.tagStart+t.tagName.length+2;if(C.alignCDATA&&/$/,blockCommentStart:"",configuration:C.htmlMode?"html":"xml",helperType:C.htmlMode?"html":"xml",skipAttribute:function(e){e.state==k&&(e.state=x)}}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})})},HyWd:function(e){"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},IDli:function(e,t,n){"use strict";e.exports=!n("s0rf")&&!n("6TpT")(function(){return 7!=Object.defineProperty(n("kdYR")("div"),"a",{get:function(){return 7}}).a})},IIoC:function(e,t,n){"use strict";var r=Math.round,o=Math.floor,i=Math.max;(function(t){(function(){function s(e){return"string"==typeof e}function l(e,t){e=e.split("."),t=t||Mr;for(var n=0;nn?null:s(t)?t.charAt(n):t[n]}function _e(e){if(!v(e))for(var t=e.length-1;0<=t;t--)delete e[t];e.length=0}function et(){return Array.prototype.concat.apply([],arguments)}function tt(e){var t=e.length;if(0t?1:0}function ot(e){return-1!=Ur.indexOf(e)}function y(e,t,n){for(var r in e)t.call(n,e[r],r,e)}function at(e){var t=[],n=0,r;for(r in e)t[n++]=e[r];return t}function it(e){var t=[],n=0,r;for(r in e)t[n++]=r;return t}function st(e){var t={},n;for(n in e)t[n]=e[n];return t}function lt(t){for(var n=1,e,r;nr.keyCode||void 0!=r.returnValue)){a:{var i=!1;if(0==r.keyCode)try{r.keyCode=-1;break a}catch(e){i=!0}(i||void 0==r.returnValue)&&(r.returnValue=!0)}for(r=[],i=n.a;i;i=i.parentNode)r.push(i);for(t=t.type,i=r.length-1;0<=i;i--){n.a=r[i];var e=_t(r[i],t,!0,n);o=o&&e}for(i=0;it.b&&(t.b++,e.next=t.a,t.a=e)}fo=!1}function Kt(e,t){Lt.call(this),this.b=e||1,this.a=t||Mr,this.c=j(this.qb,this),this.g=Dr()}function Gt(e){e.ea=!1,e.O&&(e.a.clearTimeout(e.O),e.O=null)}function Xt(e,t,n){if(h(e))n&&(e=j(e,n));else if(e&&"function"==typeof e.handleEvent)e=j(e.handleEvent,e);else throw Error("Invalid listener argument");return 2147483647<+t?-1:Mr.setTimeout(e,t||0)}function Qt(e,t,n){$.call(this),this.f=null==n?e:j(e,n),this.c=t,this.b=j(this.kb,this),this.a=[]}function Yt(e){e.Y=Xt(e.b,e.c),e.f.apply(null,e.a)}function Jt(e){$.call(this),this.b=e,this.a={}}function $t(t,n,r,o){v(r)||(r&&(vo[0]=r.toString()),r=vo);for(var i=0,e;ii.length)){var e=i[1];if(v(e)&&!(1>e.length)){var s=e[0];if("noop"!=s&&"stop"!=s&&"close"!=s)for(var l=1;ln)&&(3!=n||Hr||t.a.V())){t.B||4!=n||7==r||(8==r||0>=o?hn(3):hn(2)),Bn(t);var i=t.a.W();t.C=i,(r=t.a.V())||pn(t.b,function(){return"No response text for uri "+t.g+" status "+i}),t.f=200==i,ln(t.b,t.o,t.g,t.c,t.T,n,i),t.f?((o=Ln(t))&&(dn(t.b,t.c,o,"Initial handshake response via X-HTTP-Initial-Response"),t.v=!0,zn(t,o)),t.K?(On(t,n,r),Hr&&t.f&&3==n&&Mn(t)):(dn(t.b,t.c,r,null),zn(t,r)),4==n&&Un(t),t.f&&!t.B&&(4==n?t.i.ta(t):(t.f=!1,Rn(t)))):(400==i&&0t.length)?Po:(t=t.substr(r,n),e.G=r+n,t)}function Rn(e){e.U=Dr()+e.R,Pn(e,e.R)}function Pn(e,t){if(null!=e.s)throw Error("WatchDog timer not null");e.s=yn(j(e.lb,e),t)}function Bn(e){e.s&&(Mr.clearTimeout(e.s),e.s=null)}function Fn(e){e.i.La()||e.B||e.i.ta(e)}function Un(e){Bn(e);var t=e.I;t&&"function"==typeof t.$&&t.$(),e.I=null,Gt(e.S),Zt(e.L),e.a&&(t=e.a,e.a=null,t.abort(),t.$())}function zn(e,t){try{e.i.Oa(e,t),hn(4)}catch(t){H(e.b,t,"Error in httprequest callback")}}function jn(e){if(e.A&&"function"==typeof e.A)return e.A();if(s(e))return e.split("");if(p(e)){for(var t=[],n=e.length,r=0;r2*e.c&&Hn(e),!0)}function Hn(t){if(t.c!=t.a.length){for(var n=0,r=0,o;nt)throw Error("Bad port number "+t);e.i=t}else e.i=null}function Yn(e,t,n){t instanceof or?(e.c=t,pr(e.c,e.h)):(n||(t=nr(t,jo)),e.c=new or(t,e.h))}function Jn(e,t,n){e.c.set(t,n)}function R(e,t,n){v(n)||(n=[n+""]),sr(e.c,t,n)}function $n(e){return Jn(e,"zx",o(2147483648*Math.random()).toString(36)+Math.abs(o(2147483648*Math.random())^Dr()).toString(36)),e}function Zn(e){return e instanceof Gn?Q(e):new Gn(e,void 0)}function er(t,n,r,o){var i=new Gn(null,void 0);return t&&M(i,t),n&&Xn(i,n),r&&Qn(i,r),o&&(i.a=o),i}function tr(e,t){return e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}function nr(e,t,n){return s(e)?(e=encodeURI(e).replace(t,rr),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function rr(e){return e=e.charCodeAt(0),"%"+(15&e>>4).toString(16)+(15&e).toString(16)}function or(e,t){this.b=this.a=null,this.c=e||null,this.f=!!t}function ar(e){e.a||(e.a=new Vn,e.b=0,e.c&&P(e.c,function(t,n){e.add(decodeURIComponent(t.replace(/\+/g," ")),n)}))}function S(e,t){ar(e),t=dr(e,t),Kn(e.a.b,t)&&(e.c=null,e.b-=e.a.get(t).length,Wn(e.a,t))}function ir(e,t){return ar(e),t=dr(e,t),Kn(e.a.b,t)}function sr(e,t,n){S(e,t),0=e.f}function de(e,t){return e.b?e=e.b==t:e.a?(t=br(t),e=Kn(e.a.a.b,t)):e=!1,e}function ee(e,t){e.a?e.a.add(t):e.b=t}function ce(e,t){if(e.b&&e.b==t)e.b=null;else{var n;(n=e.a)&&(n=br(t),n=Kn(e.a.a.b,n)),n&&Wn(e.a.a,br(t))}}function fe(e){if(null!=e.b)return e.c.concat(e.b.u);if(null!=e.a&&0!=e.a.a.c){var t=e.c;return Br(e.a.A(),function(e){t=t.concat(e.u)}),t}return tt(e.c)}function ge(e,t){e.c=e.c.concat(t)}function he(){}function ie(){this.a=new he}function je(e,t,n){var r=n||"";try{qn(e,function(n,o){var i=n;_(n)&&(i=Dt(n)),t.push(r+o+"="+encodeURIComponent(i))})}catch(n){throw t.push(r+"type="+encodeURIComponent("_badmap")),n}}function ke(e,t){var n=new E;pn(n,"TestLoadImage: loading "+e);var r=new Image;r.onload=f(le,n,r,"TestLoadImage: loaded",!0,t),r.onerror=f(le,n,r,"TestLoadImage: error",!1,t),r.onabort=f(le,n,r,"TestLoadImage: abort",!1,t),r.ontimeout=f(le,n,r,"TestLoadImage: timeout",!1,t),Mr.setTimeout(function(){r.ontimeout&&r.ontimeout()},1E4),r.src=e}function le(t,n,r,o,i){try{pn(t,r),n.onload=null,n.onerror=null,n.onabort=null,n.ontimeout=null,i(o)}catch(e){H(t,e)}}function me(e){Lt.call(this),this.headers=new Vn,this.s=e||null,this.c=!1,this.D=this.a=null,this.K=this.B="",this.j=0,this.g="",this.h=this.I=this.u=this.G=!1,this.l=0,this.C=null,this.L=ae,this.v=this.o=!1}function T(e){return Vr&&ut(9)&&"number"==typeof e.timeout&&void 0!==e.ontimeout}function se(e){return"content-type"==e.toLowerCase()}function Sr(e,t){e.c=!1,e.a&&(e.h=!0,e.a.abort(),e.h=!1),e.g=t,e.j=5,qe(e),ve(e)}function qe(e){e.G||(e.G=!0,e.dispatchEvent("complete"),e.dispatchEvent("error"))}function te(t){if(t.c&&"undefined"!=typeof Or)if(t.D[1]&&4==re(t)&&2==t.W())an(t.b,wr(t,"Local request error detected and ignored"));else if(t.u&&4==re(t))Xt(t.Na,0,t);else if(t.dispatchEvent("readystatechange"),4==re(t)){an(t.b,wr(t,"Request complete")),t.c=!1;try{var n=t.W();a:switch(n){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var r=!0;break a;default:r=!1;}var o;if(!(o=r)){var i;if(i=0===n){var e=(t.B+"").match(Bo)[1]||null;if(!e&&Mr.self&&Mr.self.location){var s=Mr.self.location.protocol;e=s.substr(0,s.length-1)}i=!ne.test(e?e.toLowerCase():"")}o=i}o?(t.dispatchEvent("complete"),t.dispatchEvent("success")):(t.j=6,t.g=t.Ha()+" ["+t.W()+"]",qe(t))}finally{ve(t)}}}function ve(t,e){if(t.a){ue(t);var r=t.a,o=t.D[0]?n:null;t.a=null,t.D=null,e||t.dispatchEvent("ready");try{r.onreadystatechange=o}catch(n){(t=t.b)&&t.log(So,"Problem encountered resetting onreadystatechange: "+n.message,void 0)}}}function ue(e){e.a&&e.v&&(e.a.ontimeout=null),e.C&&(Mr.clearTimeout(e.C),e.C=null)}function re(e){return e.a?e.a.readyState:0}function N(e,t){return e.a?e.a.getResponseHeader(t):null}function wr(e,t){return t+" ["+e.K+" "+e.B+" "+e.W()+"]"}function U(e){var t="";return y(e,function(e,n){t+=n,t+=":",t+=e,t+="\r\n"}),t}function we(t,n,r){a:{for(o in r){var o=!1;break a}o=!0}if(o)return t;if(r=U(r),s(t)){if(n=encodeURIComponent(n+""),r=null==r?"":"="+encodeURIComponent(r+""),n+=r){if(r=t.indexOf("#"),0>r&&(r=t.length),o=t.indexOf("?"),0>o||o>r){o=r;var i=""}else i=t.substring(o+1,r);t=[t.substr(0,o),i,t.substr(r)],r=t[1],t[1]=n?r?r+"&"+n:n:r,t=t[0]+(t[1]?"?"+t[1]:"")+t[2]}return t}return Jn(t,n,r),t}function xe(e){this.ya=0,this.g=[],this.a=new E,this.I=new fr,this.X=this.ua=this.D=this.ja=this.b=this.K=this.j=this.U=this.h=this.L=this.i=null,this.Za=this.R=0,this.Xa=!!l("internalChannelParams.failFast",e),this.ka=this.C=this.s=this.l=this.m=this.f=null,this.u=this.xa=this.N=-1,this.T=this.B=this.v=0,this.Wa=l("internalChannelParams.baseRetryDelayMs",e)||5E3,this.$a=l("internalChannelParams.retryDelaySeedMs",e)||1E4,this.Ya=l("internalChannelParams.forwardChannelMaxRetries",e)||2,this.wa=l("internalChannelParams.forwardChannelRequestTimeoutMs",e)||2E4,this.Ta=e&&e.Kb||void 0,this.G=void 0,this.S=e&&e.supportsCrossDomainXhr||!1,this.J="",this.c=new vr(e&&e.concurrentRequestLimit),this.la=new ie,this.o=e&&void 0!==e.backgroundChannelTest?e.backgroundChannelTest:!0,(this.va=e&&e.fastHandshake||!1)&&!this.o&&(on(this.a.a,"Force backgroundChannelTest when fastHandshake is enabled."),this.o=!0),e&&e.Fa&&this.a.Fa()}function ye(e){if(pn(e.a,"disconnect()"),ze(e),3==e.F){var t=e.R++,n=Q(e.D);Jn(n,"SID",e.J),Jn(n,"RID",t),Jn(n,"TYPE","terminate"),Je(e,n),t=new _n(e,e.a,t,void 0),t.J=2,t.h=$n(Q(n)),n=!1,Mr.navigator&&Mr.navigator.sendBeacon&&(n=Mr.navigator.sendBeacon(t.h.toString(),"")),!n&&Mr.Image&&(new Image().src=t.h,n=!0),n||(t.a=t.i.ca(null),t.a.fa(t.h)),t.D=Dr(),Rn(t)}V(e)}function ze(e){e.C&&(e.C.abort(),e.C=null),e.b&&(e.b.cancel(),e.b=null),e.l&&(Mr.clearTimeout(e.l),e.l=null),Tr(e),e.c.cancel(),e.m&&(Mr.clearTimeout(e.m),e.m=null)}function Ae(e,t){1E3==e.g.length&&F(e.a,function(){return"Already have 1000 queued maps upon queueing "+Dt(t)}),e.g.push(new xr(e.Za++,t)),3==e.F&&Ee(e)}function Ee(e){be(e.c)||e.m||(e.m=yn(j(e.Qa,e),0),e.v=0)}function Fe(e,t){var n=e.c;return(n.b?1:n.a?n.a.a.c:0)>=e.c.f-(e.m?1:0)?(F(e.a,"Unexpected retry request is scheduled."),!1):e.m?(pn(e.a,"Use the retry request that is already scheduled."),e.g=t.u.concat(e.g),!0):1==e.F||2==e.F||e.v>=(e.Xa?0:e.Ya)?!1:(pn(e.a,"Going to retry POST"),e.m=yn(j(e.Qa,e,t),De(e,e.v)),e.v++,!0)}function Ge(e,t){var n=t?t.c:e.R++;var o=Q(e.D);Jn(o,"SID",e.J),Jn(o,"RID",n),Jn(o,"AID",e.N),Je(e,o),e.h&&e.i&&we(o,e.h,e.i),n=new _n(e,e.a,n,e.v+1),null===e.h&&(n.j=e.i),t&&(e.g=t.u.concat(e.g)),t=Be(e,n),n.setTimeout(r(.5*e.wa)+r(.5*e.wa*Math.random())),ee(e.c,n),En(n,o,t)}function Je(e,t){e.f&&qn({},function(e,n){Jn(t,n,e)})}function Be(t,n){var r=Math.min(t.g.length,1E3),o=t.f?j(t.f.ab,t.f,t):null;a:for(var s=t.g,e=-1,l;;){l=["count="+r],-1==e?0c)e=i(0,s[p].a-100),d=!1;else try{je(u,l,"req"+c+"_")}catch(e){o&&o(u)}}if(d){o=l.join("&");break a}}return t=t.g.splice(0,r),n.u=t,o}function Ie(e){if(!e.b&&!e.l){e.T=1;var t=e.Pa;xo||Wt(),fo||(xo(),fo=!0),yo.add(t,e),e.B=0}}function Ke(e){return e.b||e.l?(F(e.a,"Request already in progress"),!1):!(3<=e.B)&&(pn(e.a,"Going to retry GET"),e.T++,e.l=yn(j(e.Pa,e),De(e,e.B)),e.B++,!0)}function Le(e,t,n){pn(e.a,"Test Connection Finished");var r=t.l;r&&kr(e.c,r),e.ka=n,e.u=t.f,pn(e.a,"connectChannel_()"),e.D=Ce(e,e.ja),Ee(e)}function Cr(e,t){pn(e.a,"Test Connection Failed"),e.u=t.f,He(e,2)}function Tr(e){null!=e.s&&(Mr.clearTimeout(e.s),e.s=null)}function De(e,t){var n=e.Wa+o(Math.random()*e.$a);return e.qa()||(pn(e.a,"Inactive channel"),n*=2),n*t}function He(e,t){if(cn(e.a,"Error code "+t),2==t){var n=null;e.f&&(n=null);var r=j(e.pb,e);n||(n=new Gn("//www.google.com/images/cleardot.gif"),Mr.location&&"http"==Mr.location.protocol||M(n,"https"),$n(n)),ke(n.toString(),r)}else gn(2);pn(e.a,"HttpChannel: error - "+t),e.F=0,e.f&&e.f.Ba(t),V(e),ze(e)}function V(e){if(e.F=0,e.u=-1,e.f){var t=fe(e.c);(0!=t.length||0!=e.g.length)&&(pn(e.a,function(){return"Number of undelivered maps, pending: "+t.length+", outgoing: "+e.g.length}),e.c.c.length=0,tt(e.g),e.g.length=0),e.f.Aa()}}function Ce(e,t){return t=_r(e,null,t),pn(e.a,"GetForwardChannelUri: "+t),t}function Me(e,t,n){return t=_r(e,e.ia()?t:null,n),pn(e.a,"GetBackChannelUri: "+t),t}function _r(t,n,r){var o=Zn(r);if(""!=o.b)n&&Xn(o,n+"."+o.b),Qn(o,o.i);else{var i=Mr.location,e;e=n?n+"."+i.hostname:i.hostname,o=er(i.protocol,e,i.port,r)}return t.U&&y(t.U,function(e,t){Jn(o,t,e)}),n=t.j,r=t.K,n&&r&&Jn(o,n,r),Jn(o,"VER",t.na),Je(t,o),o}function Ne(){}function Oe(){for(var t=arguments[0],n=1,r;nthis.c)throw Error(Ho);this.a=new Re,this.b=new yr,this.g=null,this.aa()}function Ye(e){if("function"==typeof e.$)e.$();else for(var t in e)e[t]=null}function Er(e){return We(e.a)+e.b.a.c}function $e(e,t){this.a=e,this.b=t}function Ar(e){if(this.a=[],e)a:{if(e instanceof Ar){var t=e.M();if(e=e.A(),0>=this.a.length){for(var n=this.a,r=0;r>1,e[r].a>n.a);)e[t]=e[r],t=r;e[t]=n}function Nr(){Ar.call(this)}function Lr(e,t){this.f=new Nr,Xe.call(this,e,t)}function Y(e,t,n,r){this.l=e,this.j=!!r,Lr.call(this,t,n)}var Or=Or||{},Mr=this,k="closure_uid_"+(1E9*Math.random()>>>0),q=0,Dr=Date.now||function(){return+new Date},t;b(u,Error),u.prototype.name="CustomError",b(I,u),I.prototype.name="AssertionError";var g=0,Rr={};$.prototype.i=!1,$.prototype.$=function(){},$.prototype.w=function(){if(this.m)for(;this.m.length;)this.m.shift()()};var Pr=Array.prototype.indexOf?function(e,t){return Array.prototype.indexOf.call(e,t,void 0)}:function(e,t){if(s(e))return s(t)&&1==t.length?e.indexOf(t,0):-1;for(var n=0;nparseFloat(Qr)){Xr=Jr+"";break a}}Xr=Qr}var $r={},Zr=Mr.document,eo;eo=Zr&&Vr?ct()||("CSS1Compat"==Zr.compatMode?parseInt(Xr,10):5):void 0;var to=Object.freeze||function(e){return e},no=!Vr||9<=+eo,ro=Vr&&!ut("9"),oo=function(){if(!Mr.addEventListener||!Object.defineProperty)return!1;var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});return Mr.addEventListener("test",n,t),Mr.removeEventListener("test",n,t),e}();ht.prototype.b=function(){this.Ra=!1},b(A,ht);var ao=to({2:"touch",3:"pen",4:"mouse"});A.prototype.b=function(){A.H.b.call(this);var e=this.c;if(e.preventDefault)e.preventDefault();else if(e.returnValue=!1,ro)try{(e.ctrlKey||112<=e.keyCode&&123>=e.keyCode)&&(e.keyCode=-1)}catch(e){}};var io="closure_listenable_"+(0|1E6*Math.random()),so=0;ft.prototype.add=function(t,n,r,o,i){var e=t.toString();t=this.a[e],t||(t=this.a[e]=[],this.b++);var s=bt(t,n,o,i);return-1>>0);b(Lt,$),Lt.prototype[io]=!0,t=Lt.prototype,t.addEventListener=function(e,t,n,r){xt(this,e,t,n,r)},t.removeEventListener=function(e,t,n,r){wt(this,e,t,n,r)},t.dispatchEvent=function(t){var n=this.J,r;if(n)for(r=[];n;n=n.J)r.push(n);n=this.N;var o=t.type||t;if(s(t))t=new ht(t,n);else if(t instanceof ht)t.target=t.target||n;else{var i=t;t=new ht(o,n),lt(t,i)}if(i=!0,r)for(var e=r.length-1,l;0<=e;e--)l=t.a=r[e],i=B(l,o,!0,t)&&i;if(l=t.a=n,i=B(l,o,!0,t)&&i,i=B(l,o,!1,t)&&i,r)for(e=0;e=C(this).value)for(h(t)&&(t=t()),e=new en(e,t+"",this.f),n&&(e.a=n),n=this;n;)n=n.a};var Eo={},Ao=null;E.prototype.Fa=function(){this.b=!1};var Io=new Lt;b(un,ht),b(mn,ht),b(K,ht);var No={NO_ERROR:0,rb:1,yb:2,xb:3,ub:4,wb:5,zb:6,Ua:7,TIMEOUT:8,Cb:9},Lo={tb:"complete",Gb:"success",Va:"error",Ua:"abort",Eb:"ready",Fb:"readystatechange",TIMEOUT:"timeout",Ab:"incrementaldata",Db:"progress",vb:"downloadprogress",Hb:"uploadprogress"};bn.prototype.a=null;var Oo={OPEN:"a",sb:"b",Va:"c",Bb:"d"};b(kn,ht),b(Sn,ht);var Mo;b(wn,bn),Mo=new wn;var Do=45E3,Ro={},Po={};t=_n.prototype,t.setTimeout=function(e){this.R=e},t.nb=function(e){e=e.target;var t=this.I;t&&3==re(e)?(pn(this.b,"Throttling readystatechange."),t.cb()):this.Sa(e)},t.Sa=function(e){try{e==this.a?Nn(this):on(this.b.a,"Called back with an unexpected xmlhttp")}catch(e){if(pn(this.b,"Failed call to OnXmlHttpReadyStateChanged_"),this.a&&this.a.V()){var t=this;H(this.b,e,function(){return"ResponseText: "+t.a.V()})}else H(this.b,e,"No response text")}finally{}},t.mb=function(){if(this.a){var e=re(this.a),t=this.a.V();this.Gn&&this.ka&&0==this.B&&!this.s&&(this.s=yn(j(this.ib,this),6E3)))}else if((t.v||this.b==t)&&Tr(this),!nt(n))for(n=r=this.la.a.parse(n),r=0;re-this.g)){for(var t;0this.c&&0=i)e=void 0;else{if(1==i)_e(o);else{o[0]=o.pop(),o=0,r=r.a,i=r.length;for(var s=r[o];o>1;){var l=2*o+1,d=2*o+2;if(l=ds.a)break;r[o]=r[l],o=l}r[o]=s}e=e.b}e.apply(this,[n])}},t.ma=function(e){Lr.H.ma.call(this,e),this.ra()},t.aa=function(){Lr.H.aa.call(this),this.ra()},t.w=function(){Lr.H.w.call(this),Mr.clearTimeout(void 0),_e(this.f.a),this.f=null},b(Y,Lr),Y.prototype.pa=function(){var e=new me,t=this.l;return t&&t.forEach(function(t,n){e.headers.set(n,t)}),this.j&&(e.o=!0),e},Y.prototype.sa=function(e){return!e.i&&!e.a},Pe.prototype.createWebChannel=Pe.prototype.a,Qe.prototype.send=Qe.prototype.gb,Qe.prototype.open=Qe.prototype.fb,Qe.prototype.close=Qe.prototype.close,No.NO_ERROR=0,No.TIMEOUT=8,No.HTTP_ERROR=6,Lo.COMPLETE="complete",vn.EventType=Oo,Oo.OPEN="a",Oo.CLOSE="b",Oo.ERROR="c",Oo.MESSAGE="d",Lt.prototype.listen=Lt.prototype.Ia,Y.prototype.getObject=Y.prototype.da,Y.prototype.releaseObject=Y.prototype.ob,me.prototype.listenOnce=me.prototype.Ja,me.prototype.getLastError=me.prototype.hb,me.prototype.getLastErrorCode=me.prototype.Ga,me.prototype.getStatus=me.prototype.W,me.prototype.getStatusText=me.prototype.Ha,me.prototype.getResponseJson=me.prototype.eb,me.prototype.getResponseText=me.prototype.V,me.prototype.getResponseText=me.prototype.V,me.prototype.send=me.prototype.fa,e.exports={createWebChannelTransport:pe,ErrorCode:No,EventType:Lo,WebChannel:vn,XhrIoPool:Y}}).call("undefined"==typeof t?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:t)}).call(t,n("h6ac"))},IYZm:function(e,t,n){"use strict";(function(e){e(n("tQq4"),n("LiPu"))})(function(e){function t(e){for(var t in u)u.hasOwnProperty(t)&&(e.attrs[t]=u[t])}var n=["ab","aa","af","ak","sq","am","ar","an","hy","as","av","ae","ay","az","bm","ba","eu","be","bn","bh","bi","bs","br","bg","my","ca","ch","ce","ny","zh","cv","kw","co","cr","hr","cs","da","dv","nl","dz","en","eo","et","ee","fo","fj","fi","fr","ff","gl","ka","de","el","gn","gu","ht","ha","he","hz","hi","ho","hu","ia","id","ie","ga","ig","ik","io","is","it","iu","ja","jv","kl","kn","kr","ks","kk","km","ki","rw","ky","kv","kg","ko","ku","kj","la","lb","lg","li","ln","lo","lt","lu","lv","gv","mk","mg","ms","ml","mt","mi","mr","mh","mn","na","nv","nb","nd","ne","ng","nn","no","ii","nr","oc","oj","cu","om","or","os","pa","pi","fa","pl","ps","pt","qu","rm","rn","ro","ru","sa","sc","sd","se","sm","sg","sr","gd","sn","si","sk","sl","so","st","es","su","sw","ss","sv","ta","te","tg","th","ti","bo","tk","tl","tn","to","tr","ts","tt","tw","ty","ug","uk","ur","uz","ve","vi","vo","wa","cy","wo","fy","xh","yi","yo","za","zu"],r=["_blank","_self","_top","_parent"],o=["ascii","utf-8","utf-16","latin1","latin1"],i=["get","post","put","delete"],l=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],d=["all","screen","print","embossed","braille","handheld","print","projection","screen","tty","tv","speech","3d-glasses","resolution [>][<][=] [X]","device-aspect-ratio: X/Y","orientation:portrait","orientation:landscape","device-height: [X]","device-width: [X]"],p={attrs:{}},c={a:{attrs:{href:null,ping:null,type:null,media:d,target:r,hreflang:n}},abbr:p,acronym:p,address:p,applet:p,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:d,hreflang:n,type:null,shape:["default","rect","circle","poly"]}},article:p,aside:p,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["","autoplay"],loop:["","loop"],controls:["","controls"]}},b:p,base:{attrs:{href:null,target:r}},basefont:p,bdi:p,bdo:p,big:p,blockquote:{attrs:{cite:null}},body:p,br:p,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["","autofocus"],disabled:["","autofocus"],formenctype:l,formmethod:i,formnovalidate:["","novalidate"],formtarget:r,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:p,center:p,cite:p,code:p,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["","disabled"],checked:["","checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["","disabled"],multiple:["","multiple"]}},datalist:{attrs:{data:null}},dd:p,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["","open"]}},dfn:p,dir:p,div:p,dl:p,dt:p,em:p,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["","disabled"],form:null,name:null}},figcaption:p,figure:p,font:p,footer:p,form:{attrs:{action:null,name:null,"accept-charset":o,autocomplete:["on","off"],enctype:l,method:i,novalidate:["","novalidate"],target:r}},frame:p,frameset:p,h1:p,h2:p,h3:p,h4:p,h5:p,h6:p,head:{attrs:{},children:["title","base","link","style","meta","script","noscript","command"]},header:p,hgroup:p,hr:p,html:{attrs:{manifest:null},children:["head","body"]},i:p,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["","seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["","autofocus"],checked:["","checked"],disabled:["","disabled"],formenctype:l,formmethod:i,formnovalidate:["","novalidate"],formtarget:r,multiple:["","multiple"],readonly:["","readonly"],required:["","required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:p,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["","autofocus"],disabled:["","disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:p,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:n,media:d,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:p,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:o,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:p,noframes:p,noscript:p,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["","typemustmatch"]}},ol:{attrs:{reversed:["","reversed"],start:null,type:["1","a","A","i","I"]}},optgroup:{attrs:{disabled:["","disabled"],label:null}},option:{attrs:{disabled:["","disabled"],label:null,selected:["","selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:p,param:{attrs:{name:null,value:null}},pre:p,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:p,rt:p,ruby:p,s:p,samp:p,script:{attrs:{type:["text/javascript"],src:null,async:["","async"],defer:["","defer"],charset:o}},section:p,select:{attrs:{form:null,name:null,size:null,autofocus:["","autofocus"],disabled:["","disabled"],multiple:["","multiple"]}},small:p,source:{attrs:{src:null,type:null,media:null}},span:p,strike:p,strong:p,style:{attrs:{type:["text/css"],media:d,scoped:null}},sub:p,summary:p,sup:p,table:p,tbody:p,td:{attrs:{colspan:null,rowspan:null,headers:null}},textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["","autofocus"],disabled:["","disabled"],readonly:["","readonly"],required:["","required"],wrap:["soft","hard"]}},tfoot:p,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:p,time:{attrs:{datetime:null}},title:p,tr:p,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:n}},tt:p,u:p,ul:p,var:p,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["","autoplay"],mediagroup:["movie"],muted:["","muted"],controls:["","controls"]}},wbr:p},u={accesskey:["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9"],class:null,contenteditable:["true","false"],contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["en","es"],spellcheck:["true","false"],style:null,tabindex:["1","2","3","4","5","6","7","8","9"],title:null,translate:["yes","no"],onclick:null,rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"]};for(var h in t(p),c)c.hasOwnProperty(h)&&c[h]!=p&&t(c[h]);e.htmlSchema=c,e.registerHelper("hint","html",function(t,n){var r={schemaInfo:c};if(n)for(var o in n)r[o]=n[o];return e.hint.xml(t,r)})})},Ib92:function(e,t,n){"use strict";var r=n("iktq"),o=n("3Rhr"),i=n("zH6J"),s=n("kdYR"),l=n("3Vd+"),d=l.process,p=l.setImmediate,c=l.clearImmediate,u=l.MessageChannel,h=0,m={},g="onreadystatechange",f=function(){var e=+this;if(m.hasOwnProperty(e)){var t=m[e];delete m[e],t()}},y=function(e){f.call(e.data)},b,x,v;p&&c||(p=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return m[++h]=function(){o("function"==typeof e?e:Function(e),t)},b(h),h},c=function(e){delete m[e]},"process"==n("1ROC")(d)?b=function(e){d.nextTick(r(f,e,1))}:u?(x=new u,v=x.port2,x.port1.onmessage=y,b=r(v.postMessage,v,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(b=function(e){l.postMessage(e+"","*")},l.addEventListener("message",y,!1)):g in s("script")?b=function(e){i.appendChild(s("script"))[g]=function(){i.removeChild(this),f.call(e)}}:b=function(e){setTimeout(r(f,e,1),0)}),e.exports={set:p,clear:c}},Ipt8:function(e,t){"use strict";function n(e,t){for(var n=e.attributes,o=0,i=n.length,s;o>1,g=-7,f=o?p-1:0,i=o?-1:1,d=t[r+f],s,e;for(f+=i,s=d&(1<<-g)-1,d>>=-g,g+=c;0>=-g,g+=l;0>1,y=23===p?5.960464477539063e-8-6.617444900424222e-24:0,b=l?0:u-1,i=l?1:-1,d=0>r||0===r&&0>1/r?1:0,s,x,m;for(r=Math.abs(r),isNaN(r)||r===Infinity?(x=isNaN(r)?1:0,s=g):(s=Math.floor(Math.log(r)/Math.LN2),1>r*(m=n(2,-s))&&(s--,m*=2),r+=1<=s+f?y/m:y*n(2,1-f),2<=r*m&&(s++,m/=2),s+f>=g?(x=0,s=g):1<=s+f?(x=(r*m-1)*n(2,p),s+=f):(x=r*n(2,f-1)*n(2,p),s=0));8<=p;t[o+b]=255&x,b+=i,x/=256,p-=8);for(s=s<n.line&&document.querySelector&&(r=t.display.wrapper.querySelector(".CodeMirror-dialog"))&&r.getBoundingClientRect().bottom-4>t.cursorCoords(n,"window").top&&((c=r).style.opacity=.4)}))};s(t,b,p,h,function(n,o){var i=e.keyName(n),s=t.getOption("extraKeys"),l=s&&s[i]||e.keyMap[t.getOption("keyMap")][i];"findNext"==l||"findPrev"==l||"findPersistentNext"==l||"findPersistentPrev"==l?(e.e_stop(n),u(t,r(t),o),t.execCommand(l)):("find"==l||"findPersistent"==l)&&(e.e_stop(n),h(o,n))}),i&&p&&(u(t,d,p),m(t,n))}else l(t,b,"Search for:",p,function(e){e&&!d.query&&t.operation(function(){u(t,d,e),d.posFrom=d.posTo=t.getCursor(),m(t,n)})})}function m(t,n,o){t.operation(function(){var s=r(t),l=i(t,s.query,n?s.posFrom:s.posTo);!l.find(n)&&(l=i(t,s.query,n?e.Pos(t.lastLine()):e.Pos(t.firstLine(),0)),!l.find(n))||(t.setSelection(l.from(),l.to()),t.scrollIntoView({from:l.from(),to:l.to()},20),s.posFrom=l.from(),s.posTo=l.to(),o&&o(l.from(),l.to()))})}function g(e){e.operation(function(){var t=r(e);t.lastQuery=t.query,t.query&&(t.query=t.queryText=null,e.removeOverlay(t.overlay),t.annotate&&(t.annotate.clear(),t.annotate=null))})}function f(e,t,n){e.operation(function(){for(var r=i(e,t);r.findNext();)if("string"!=typeof t){var o=e.getRange(r.from(),r.to()).match(t);r.replace(n.replace(/\$(\d)/g,function(e,t){return o[t]}))}else r.replace(n)})}function y(e,t){if(!e.getOption("readOnly")){var n=e.getSelection()||r(e).lastQuery,o=""+(t?"Replace all:":"Replace:")+"";l(e,o+x,o,n,function(n){n&&(n=c(n),l(e,v,"Replace with:","",function(r){if(r=p(r),t)f(e,n,r);else{g(e);var o=i(e,n,e.getCursor("from")),s=function t(){var s=o.from(),p;!(p=o.findNext())&&(o=i(e,n),!(p=o.findNext())||s&&o.from().line==s.line&&o.from().ch==s.ch)||(e.setSelection(o.from(),o.to()),e.scrollIntoView({from:o.from(),to:o.to()}),d(e,k,"Replace?",[function(){l(p)},t,function(){f(e,n,r)}]))},l=function(e){o.replace("string"==typeof n?r:r.replace(/\$(\d)/g,function(t,n){return e[n]})),s()};s()}}))})}}var b="Search: (Use /re/ syntax for regexp search)",x=" (Use /re/ syntax for regexp search)",v="With: ",k="Replace? ";e.commands.find=function(e){g(e),h(e)},e.commands.findPersistent=function(e){g(e),h(e,!1,!0)},e.commands.findPersistentNext=function(e){h(e,!1,!0,!0)},e.commands.findPersistentPrev=function(e){h(e,!0,!0,!0)},e.commands.findNext=h,e.commands.findPrev=function(e){h(e,!0)},e.commands.clearSearch=g,e.commands.replace=y,e.commands.replaceAll=function(e){y(e,!0)}})},KM04:function(O){"use strict";!function(){function M(){}function B(e,s){var n=L,d,o,p,i;for(i=arguments.length;2f&&(g+=E[o++]<>>24,g>>>=S,f-=S,S=255&k>>>16,0===S)A[s++]=65535&k;else if(16&S){w=65535&k,S&=15,S&&(f>>=S,f-=S),15>f&&(g+=E[o++]<>>24,g>>>=S,f-=S,S=255&k>>>16,16&S){if(C=65535&k,S&=15,fp){e.msg="invalid distance too far back",r.mode=t;break top}if(g>>>=S,f-=S,S=s-l,C>S){if(S=C-S,S>u&&r.sane){e.msg="invalid distance too far back",r.mode=t;break top}if(T=0,_=m,0===h){if(T+=c-S,S>3,o-=w,f-=w<<3,g&=(1<p.ch&&(c.end=p.ch,c.string=c.string.slice(0,p.ch-c.start));var u=e.innerMode(o.getMode(),c.state);if("xml"==u.mode.name){var h=[],m=!1,g=/\btag\b/.test(c.type)&&!/>$/.test(c.string),f=g&&/^\w/.test(c.string),y,b;if(f){var x=o.getLine(p.line).slice(r(0,c.start-2),c.start),v=/<\/$/.test(x)?"close":/<$/.test(x)?"open":null;v&&(b=c.start-("close"==v?2:1))}else g&&"<"==c.string?v="open":g&&"")}else{var S=l[u.state.tagName],T=S&&S.attrs,_=l["!attrs"];if(!T&&!_)return;if(!T)T=_;else if(_){var E={};for(var A in _)_.hasOwnProperty(A)&&(E[A]=_[A]);for(var A in T)T.hasOwnProperty(A)&&(E[A]=T[A]);T=E}if("string"==c.type||"="==c.string){var x=o.getRange(t(p.line,r(0,p.ch-60)),t(p.line,"string"==c.type?c.start:c.end)),I=x.match(/([^\s\u00a0=<>\"\']+)=$/),N;if(!I||!T.hasOwnProperty(I[1])||!(N=T[I[1]]))return;if("function"==typeof N&&(N=N.call(this,o)),"string"==c.type){y=c.string;var L=0;/['"]/.test(c.string.charAt(0))&&(d=c.string.charAt(0),y=c.string.slice(1),L++);var n=c.string.length;/['"]/.test(c.string.charAt(n-1))&&(d=c.string.charAt(n-1),y=c.string.substr(L,n-2)),m=!0}for(var C=0;C=this.end},e.prototype.limit=function(e,t){return new this.constructor(this.string,e,t)},e.prototype.peek=function(){return this.string.charCodeAt(this.pos)},e.prototype.next=function(){if(this.posthis.status,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new o(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){var b={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(b.arrayBuffer)var x=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],v=function(e){return e&&DataView.prototype.isPrototypeOf(e)},k=ArrayBuffer.isView||function(e){return e&&-1e)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e},skip:function(e){this.setIndex(this.index+e)},byteAt:function(){},readInt:function(e){var t=0,n;for(this.checkOffset(e),n=this.index+e-1;n>=this.index;n--)t=(t<<8)+this.byteAt(n);return this.index+=e,t},readString:function(e){return o.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC((127&e>>25)+1980,(15&e>>21)-1,31&e>>16,31&e>>11,63&e>>5,(31&e)<<1))}},e.exports=r},PO9O:function(e,t,n){"use strict";function r(e,t,n,r,o){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=r,this.compressedContent=o}var o=n("8JlO"),i=n("ABU1"),s=n("S9RN"),l=n("gpbE"),s=n("S9RN");r.prototype={getContentWorker:function(){var e=new i(o.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new s("data_length")),t=this;return e.on("end",function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),e},getCompressedWorker:function(){return new i(o.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},r.createWorkerFrom=function(e,t,n){return e.pipe(new l).pipe(new s("uncompressedSize")).pipe(t.compressWorker(n)).pipe(new s("compressedSize")).withStreamInfo("compression",t)},e.exports=r},Ps3q:function(e,t,n){"use strict";var r=n("dvMn"),o=n("untT"),s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";t.encode=function(e){for(var t=[],n=0,o=e.length,i=o,l="string"!==r.getTypeOf(e),d,p,c,u,h,m,g;n>2,h=(3&d)<<4|p>>4,m=1>6:64,g=2>4,l=(15&c)<<4|u>>2,d=(3&u)<<6|h,g[n++]=i,64!==u&&(g[n++]=l),64!==h&&(g[n++]=d);return g}},Q14w:function(e,t){"use strict";function n(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===n(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===n(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===n(e)},t.isError=function(t){return"[object Error]"===n(t)||t instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e},t.isBuffer=Buffer.isBuffer},QAmr:function(e,t){"use strict";t.__esModule=!0;var n="function"==typeof fetch?fetch.bind():function(e,t){return t=t||{},new Promise(function(n,r){function o(){var e=[],t=[],r={},n;return s.getAllResponseHeaders().replace(/^(.*?):\s*([\s\S]*?)$/gm,function(o,i,s){e.push(i=i.toLowerCase()),t.push([i,s]),n=r[i],r[i]=n?n+","+s:s}),{ok:1==(0|s.status/200),status:s.status,statusText:s.statusText,url:s.responseURL,clone:o,text:function(){return Promise.resolve(s.responseText)},json:function(){return Promise.resolve(s.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([s.response]))},headers:{keys:function(){return e},entries:function(){return t},get:function(e){return r[e.toLowerCase()]},has:function(e){return e.toLowerCase()in r}}}}var s=new XMLHttpRequest;for(var l in s.open(t.method||"get",e),t.headers)s.setRequestHeader(l,t.headers[l]);s.withCredentials="include"==t.credentials,s.onload=function(){n(o())},s.onerror=r,s.send(t.body)})};t.default=n},R0uB:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t,n){n=n||i;var r=t.map(function(e,t){return{order:t,field:e,end:e.location+e.length}}).sort(function(e,t){return e.end-t.end||e.order-t.order}),o=0,s=r.map(function(t){var r=e.substr(t.field.location,t.field.length),i=e.slice(o,t.field.location);return o=t.end,i+n(t.field.index,r)});return s.join("")+e.slice(o)}function i(e,t){return t?"${"+e+":"+t+"}":"${"+e+"}"}function s(e,t){var n=e.pos;if(e.eat(h)){var r=d(e),o="";if(null!=r)return new y(r,o,t);if(e.eat(g)&&(r=d(e),null!=r&&(e.eat(m)&&(o=l(e)),e.eat(f))))return new y(r,o,t)}e.pos=n}function l(e){var t=void 0,n=[];for(e.start=e.pos;!e.eof();){if(t=e.peek(),t===g)n.push(e.pos);else if(t===f){if(!n.length)break;n.pop()}e.next()}if(n.length)throw e.error("Unable to find matching \"}\" for curly brace at "+n.pop());return e.current()}function d(e){if(e.start=e.pos,e.eatWhile(u.isNumber))return+e.current()}t.__esModule=!0,t.createToken=t.mark=void 0;var p=n("Lu2N"),c=function(e){return e&&e.__esModule?e:{default:e}}(p),u=n("rc1b"),h=36,m=58,g=123,f=125,y=function e(t,n,o){r(this,e),this.index=t,this.placeholder=n,this.location=o,this.length=this.placeholder.length},b=function(){function e(t,n){r(this,e),this.string=t,this.fields=n}return e.prototype.mark=function(e){return o(this.string,this.fields,e)},e.prototype.toString=function(){return this.string},e}();t.default=function(e){for(var t=new c.default(e),n=[],r="",o=0,i=0,l=void 0,d=void 0;!t.eof();)l=t.peek(),i=t.pos,l===92?(t.next(),t.next()):(d=s(t,r.length+i-o))?(n.push(d),r+=t.string.slice(o,i)+d.placeholder,o=t.pos):t.next();return new b(r+t.string.slice(o),n)},t.mark=o,t.createToken=i},REa7:function(e){"use strict";var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},RJVP:function(e,t,o){"use strict";var i=Math.floor,n=Math.max;(function(e){(function(){function s(e){return"string"==typeof e}function e(e){return"boolean"==typeof e}function p(){}function d(e){var t=typeof e;if("object"==t){if(e){if(e instanceof Array)return"array";if(e instanceof Object)return t;var n=Object.prototype.toString.call(e);if("[object Window]"==n)return"object";if("[object Array]"==n||"number"==typeof e.length&&"undefined"!=typeof e.splice&&"undefined"!=typeof e.propertyIsEnumerable&&!e.propertyIsEnumerable("splice"))return"array";if("[object Function]"==n||"undefined"!=typeof e.call&&"undefined"!=typeof e.propertyIsEnumerable&&!e.propertyIsEnumerable("call"))return"function"}else return"null";}else if("function"==t&&"undefined"==typeof e.call)return"object";return t}function c(e){return null===e}function _(e){return"array"==d(e)}function h(e){var t=d(e);return"array"==t||"object"==t&&"number"==typeof e.length}function m(e){return"function"==d(e)}function z(e){var t=typeof e;return"object"==t&&null!=e||"function"==t}function f(e){return e.call.apply(e.bind,arguments)}function b(e,t){if(!e)throw Error();if(2e.b&&(e.b++,t.next=e.a,e.a=t)}function ot(){this.b=this.a=null}function at(){var e=cp,t=null;return e.a&&(t=e.a,e.a=e.a.next,e.a||(e.b=null),t.next=null),t}function it(){this.next=this.b=this.a=null}function st(e,t){var n=e.length,r=s(e)?e.split(""):e;for(--n;0<=n;--n)n in r&&t.call(void 0,r[n],n,e)}function lt(t){a:{for(var n=No,r=t.length,o=s(t)?t.split(""):t,i=0;in?null:s(t)?t.charAt(n):t[n]}function dt(e,t){return 0<=wa(e,t)}function pt(e,t){t=wa(e,t);var n;return(n=0<=t)&&Array.prototype.splice.call(e,t,1),n}function ct(t,n){var r=0;st(t,function(o,i){n.call(void 0,o,i,t)&&1==Array.prototype.splice.call(t,i,1).length&&r++})}function ut(){return Array.prototype.concat.apply([],arguments)}function ht(e){var t=e.length;if(0")&&(e=e.replace(Pa,">")),-1!=e.indexOf("\"")&&(e=e.replace(Qa,""")),-1!=e.indexOf("'")&&(e=e.replace(Ra,"'")),-1!=e.indexOf("\0")&&(e=e.replace(Sa,"�")),e):e}function ft(e,t){return-1!=e.indexOf(t)}function w(e,t){return et?1:0}function yt(e){return ft(Na,e)}function x(e,t){for(var n in e)t.call(void 0,e[n],n,e)}function bt(e){for(var t in e)return!1;return!0}function xt(e){var t={},n;for(n in e)t[n]=e[n];return t}function vt(t){for(var n=1,e,r;no.keyCode||void 0!=o.returnValue)){a:{var i=!1;if(0==o.keyCode)try{o.keyCode=-1;break a}catch(e){i=!0}(i||void 0==o.returnValue)&&(o.returnValue=!0)}for(o=[],i=n.b;i;i=i.parentNode)o.push(i);for(t=t.type,i=o.length-1;0<=i;i--){n.b=o[i];var e=ln(o[i],t,!0,n);r=r&&e}for(i=0;it)throw Error("Bad port number "+t);e.i=t}else e.i=null}function An(e,t,n){t instanceof Rn?(e.a=t,qn(e.a,e.f)):(n||(t=Mn(t,Xp)),e.a=new Rn(t,e.f))}function In(e,t,n){e.a.set(t,n)}function F(e,t){return e.a.get(t)}function Nn(e){return e instanceof Tn?new Tn(e):new Tn(e,void 0)}function Ln(e,t){var n=new Tn(null,void 0);return _n(n,"https"),e&&(n.b=e),t&&(n.g=t),n}function On(e,t){return e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}function Mn(e,t,n){return s(e)?(e=encodeURI(e).replace(t,Dn),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function Dn(e){return e=e.charCodeAt(0),"%"+(15&e>>4).toString(16)+(15&e).toString(16)}function Rn(e,t){this.b=this.a=null,this.c=e||null,this.f=!!t}function Pn(e){e.a||(e.a=new kn,e.b=0,e.c&&Cn(e.c,function(t,n){e.add(decodeURIComponent(t.replace(/\+/g," ")),n)}))}function Bn(t){var n=xn(t);if("undefined"==typeof n)throw Error("Keys are undefined");var r=new Rn(null,void 0);t=bn(t);for(var o=0;o2*e.c&&Sn(e)))}function Un(e,t){return Pn(e),t=jn(e,t),wn(e.a.b,t)}function zn(e,t,n){Fn(e,t),0"),e=e.join("")}return e=n.createElement(e),r&&(s(r)?e.className=r:_(r)?e.className=r.join(" "):or(e,r)),2e?!1:!kp||!Op||9",t=nr(t),l.document.write(tr(t)),l.document.close())):(l=o.open(Jn(n),r,l))&&t.noopener&&(l.opener=null),l)try{l.focus()}catch(e){}return l}function de(e){return new _t(function(t){function n(){yn(2E3).then(function(){return!e||e.closed?void t():n()})}return n()})}function fe(){var e=null;return new _t(function(t){"complete"==dp.document.readyState?t():(e=function(){t()},on(window,"load",e))}).s(function(t){throw an(window,"load",e),t})}function he(){return ie(void 0)?fe().then(function(){return new _t(function(e,t){var n=dp.document,r=setTimeout(function(){t(Error("Cordova framework is not ready."))},1E3);n.addEventListener("deviceready",function(){clearTimeout(r),e()},!1)})}):A(Error("Cordova must run in an Android or iOS file scheme."))}function ie(e){return e=e||re(),"file:"===ve()&&e.toLowerCase().match(/iphone|ipad|ipod|android/)}function je(){var e=dp.window;try{return e&&e!=e.top}catch(e){return!1}}function le(){return"object"!=typeof dp.window&&"function"==typeof dp.importScripts}function me(){return sp.INTERNAL.hasOwnProperty("reactNative")?"ReactNative":sp.INTERNAL.hasOwnProperty("node")?"Node":le()?"Worker":"Browser"}function ne(){var e=me();return"ReactNative"===e||"Node"===e}function oe(){for(var e=50,t=[];0t)throw Error("Short delay should be less than long delay!");this.a=e,this.c=t,e=re(),t=me(),this.b=yr(e)||"ReactNative"===t}function Ce(){var e=dp.document;return e&&"undefined"!=typeof e.visibilityState?"visible"==e.visibilityState:!0}function De(){var e=dp.document,t=null;return Ce()||!e?At():new _t(function(n){t=function(){Ce()&&(e.removeEventListener("visibilitychange",t,!1),n())},e.addEventListener("visibilitychange",t,!1)}).s(function(n){throw e.removeEventListener("visibilitychange",t,!1),n})}function Ee(e){try{var t=new Date(parseInt(e,10));if(!isNaN(t.getTime())&&!/[^0-9]/.test(e))return t.toUTCString()}catch(e){}return null}function Fe(){return G("fireauth.oauthhelper",dp)||G("fireauth.iframe",dp)}function Ge(e){qe[e]||(qe[e]=!0,"undefined"!=typeof console&&"function"==typeof console.warn&&console.warn(e))}function Ie(e,t,n){He?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,value:n}):e[t]=n}function I(e,t){if(t)for(var n in t)t.hasOwnProperty(n)&&Ie(e,n,t[n])}function J(e){var t={};return I(t,e),t}function Le(e){var t={},n;for(n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function Me(e,t){if(!t||!t.length)return!0;if(!e)return!1;for(var n=0,r;n>4),64!=s&&(n(240&e<<4|s>>2),64!=l&&n(192&s<<6|l))}}function Cr(){if(!rc){rc={},oc={};for(var e=0;65>e;e++)rc[e]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(e),oc[rc[e]]=e,62<=e&&(oc["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.".charAt(e)]=e)}}function Tr(e){this.c=e.sub,ja(),this.a=e.provider_id||e.firebase&&e.firebase.sign_in_provider||null,this.b=!!e.is_anonymous||"anonymous"==this.a}function _r(e){return(e=Er(e))&&e.sub&&e.iss&&e.aud&&e.exp?new Tr(e):null}function Er(e){if(!e)return null;if(e=e.split("."),3!=e.length)return null;e=e[1];for(var t=(4-e.length%4)%4,n=0;n Auth section -> Sign in method tab.",e):"http"==n||"https"==n?r=mt("This domain (%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab.",e):t="operation-not-supported-in-this-environment",Pe.call(this,t,r)}function po(e,t,n){Pe.call(this,e,n),e=t||{},e.wb&&Ie(this,"email",e.wb),e.$&&Ie(this,"phoneNumber",e.$),e.credential&&Ie(this,"credential",e.credential)}function co(e){if(e.code){var t=e.code||"";0==t.indexOf(We)&&(t=t.substring(We.length));var n={credential:ro(e)};if(e.email)n.wb=e.email;else if(e.phoneNumber)n.$=e.phoneNumber;else return new Pe(t,e.message||void 0);return new po(t,n,e.message)}return null}function uo(){}function ho(e){return e.c||(e.c=e.b())}function mo(){}function go(e){if(!e.f&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var t=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],n=0,r;nn;n++){i=0|r[n-15],o=0|r[n-2];var e=0|(0|r[n-16])+((i>>>7|i<<25)^(i>>>18|i<<14)^i>>>3),s=0|(0|r[n-7])+((o>>>17|o<<15)^(o>>>19|o<<13)^o>>>10);r[n]=0|e+s}o=0|t.a[0],i=0|t.a[1];var l=0|t.a[2],d=0|t.a[3],p=0|t.a[4],c=0|t.a[5],u=0|t.a[6];for(e=0|t.a[7],n=0;64>n;n++){var h=0|((o>>>2|o<<30)^(o>>>13|o<<19)^(o>>>22|o<<10))+(o&i^o&l^i&l);s=p&c^~p&u,e=0|e+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7)),s=0|s+(0|eu[n]),s=0|e+(0|s+(0|r[n])),e=u,u=c,c=p,p=0|d+s,d=l,l=i,i=o,o=0|s+h}t.a[0]=0|t.a[0]+o,t.a[1]=0|t.a[1]+i,t.a[2]=0|t.a[2]+l,t.a[3]=0|t.a[3]+d,t.a[4]=0|t.a[4]+p,t.a[5]=0|t.a[5]+c,t.a[6]=0|t.a[6]+u,t.a[7]=0|t.a[7]+e}function bs(t,n,r){void 0===r&&(r=n.length);var o=0,i=t.c;if(s(n))for(;o=e&&e==(0|e)))throw Error("message must be a byte array");t.f[i++]=e,i==t.b&&(ys(t),i=0)}else throw Error("message must be string or array");t.c=i,t.g+=r}function xs(){fs.call(this,8,iu)}function vs(t,n,r,o,i){this.l=t,this.i=n,this.m=r,this.o=o||null,this.u=i||null,this.h=n+":"+r,this.v=new gs,this.g=new hs(this.h),this.f=null,this.b=[],this.a=this.c=null}function ks(e){return new Pe("invalid-cordova-configuration",e)}function Ss(){for(var e=20,t=[];0n.c?bs(n,ou,56-n.c):bs(n,ou,n.b-(n.c-56));for(var o=63;56<=o;o--)n.f[o]=255&r,r/=256;for(ys(n),o=r=0;o>i;return kr(t)}function Cs(t,n,r,o){var i=Ss(),e=new ao(n,o,null,i,new Pe("no-auth-event")),s=G("BuildInfo.packageName",dp);if("string"!=typeof s)throw new Pe("invalid-cordova-configuration");var l=G("BuildInfo.displayName",dp),d={};if(re().toLowerCase().match(/iphone|ipad|ipod/))d.ibi=s;else if(re().toLowerCase().match(/android/))d.apn=s;else return A(new Pe("operation-not-supported-in-this-environment"));l&&(d.appDisplayName=l),i=ws(i),d.sessionId=i;var p=Li(t.l,t.i,t.m,n,r,null,o,t.o,d,t.u);return t.ga().then(function(){var n=t.h;return t.v.a.set(Zc,e.D(),n)}).then(function(){var e=G("cordova.plugins.browsertab.isAvailable",dp);if("function"!=typeof e)throw new Pe("invalid-cordova-configuration");var n=null;e(function(e){if(e){if(n=G("cordova.plugins.browsertab.openUrl",dp),"function"!=typeof n)throw new Pe("invalid-cordova-configuration");n(p)}else{if(n=G("cordova.InAppBrowser.open",dp),"function"!=typeof n)throw new Pe("invalid-cordova-configuration");e=re(),e=e.match(/(iPad|iPhone|iPod).*OS 7_\d/i)||e.match(/(iPad|iPhone|iPod).*OS 8_\d/i),t.a=n(p,e?"_blank":"_system","location=yes")}})})}function Ts(e,t){for(var n=0;ne.f&&(e.a=e.f),t)}function Rl(e,t){e.stop(),e.b=yn(_l(e,t)).then(function(){return De()}).then(function(){return e.h()}).then(function(){Rl(e,!0)}).s(function(t){e.i(t)&&Rl(e,!1)})}function ed(e){this.f=e,this.b=this.a=null,this.c=0}function rd(e,t){var n=t[Ac],r=t.refreshToken;t=id(t.expiresIn),e.b=n,e.c=t,e.a=r}function od(e,t){e.b=t.b,e.a=t.a,e.c=t.c}function id(e){return ja()+1E3*parseInt(e,10)}function sd(e,t){return ca(e.f,t).then(function(t){return e.b=t.access_token,e.c=id(t.expires_in),e.a=t.refresh_token,{accessToken:e.b,expirationTime:e.c,refreshToken:e.a}}).s(function(t){throw"auth/user-token-expired"==t.code&&(e.a=null),t})}function ld(e,t){this.a=e||null,this.b=t||null,I(this,{lastSignInTime:Ee(t||null),creationTime:Ee(e||null)})}function dd(e){return new ld(e.a,e.b)}function ud(t,n,r,o,i,e){I(this,{uid:t,displayName:o||null,photoURL:i||null,email:r||null,phoneNumber:e||null,providerId:n})}function hd(e,t){for(var n in Qt.call(this,e),t)this[n]=t[n]}function md(e,t,n){this.G=[],this.l=e.apiKey,this.o=e.appName,this.u=e.authDomain||null,e=sp.SDK_VERSION?br(sp.SDK_VERSION):null,this.b=new oa(this.l,Ka(wi),e),this.h=new ed(this.b),_d(this,t[Ac]),rd(this.h,t),Ie(this,"refreshToken",this.h.a),al(this,n||{}),hn.call(this),this.I=!1,this.u&&se()&&(this.a=Us(this.u,this.l,this.o)),this.N=[],this.i=null,this.w=vd(this),this.V=j(this.Ha,this);var r=this;this.ka=null,this.sa=function(e){r.oa(e.g)},this.X=null,this.O=[],this.ra=function(e){fd(r,e.c)},this.W=null}function gd(e,t){e.X&&an(e.X,"languageCodeChanged",e.sa),(e.X=t)&&tn(t,"languageCodeChanged",e.sa)}function fd(e,t){e.O=t,la(e.b,sp.SDK_VERSION?br(sp.SDK_VERSION,e.O):null)}function yd(e,t){e.W&&an(e.W,"frameworkChanged",e.ra),(e.W=t)&&tn(t,"frameworkChanged",e.ra)}function bd(e){try{return sp.app(e.o).auth()}catch(t){throw new Pe("internal-error","No firebase.auth.Auth instance is available for the Firebase App '"+e.o+"'!")}}function vd(e){return new Zs(function(){return e.F(!0)},function(e){return e&&"auth/network-request-failed"==e.code},function(){var t=e.h.c-ja()-3E5;return 0i||i>=vu.length)throw new Pe("internal-error","Argument validator received an unsupported number of arguments.");r=vu[i],o=(o?"":r+" argument ")+(n.name?"\""+n.name+"\" ":"")+"must be "+n.K+".";break a}o=null}}if(o)throw new Pe("argument-error",t+" failed: "+o)}function Qd(e,t){return{name:e||"",K:"a valid string",optional:!!t,M:s}}function V(t,n){return{name:t||"",K:"a boolean",optional:!!n,M:e}}function Yd(e,t){return{name:e||"",K:"a valid object",optional:!!t,M:z}}function W(e,t){return{name:e||"",K:"a function",optional:!!t,M:m}}function Jd(e,t){return{name:e||"",K:"null",optional:!!t,M:c}}function $d(){return{name:"",K:"an HTML element",optional:!1,M:function(e){return!!(e&&e instanceof Element)}}}function Zd(){return{name:"auth",K:"an instance of Firebase Auth",optional:!0,M:function(e){return!!(e&&e instanceof Dl)}}}function ep(){return{name:"app",K:"an instance of Firebase App",optional:!0,M:function(e){return!!(e&&e instanceof sp.app.App)}}}function tp(e){return{name:e?e+"Credential":"credential",K:e?"a valid "+e+" credential":"a valid credential",optional:!1,M:function(t){if(!t)return!1;var n=!e||t.providerId===e;return t.ya&&n}}}function np(){return{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(e){return!!(e&&e.providerId&&e.hasOwnProperty&&e.hasOwnProperty("isOAuthProvider"))}}}function rp(){return{name:"applicationVerifier",K:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,M:function(e){return!!(e&&s(e.type)&&m(e.verify))}}}function op(e,t,n,r){return{name:n||"",K:e.K+" or "+t.K,optional:!!r,M:function(n){return e.M(n)||t.M(n)}}}function X(e,t){for(var n in t){var r=t[n].name;e[r]=Z(r,e[n],t[n].j)}}function Y(t,n){for(var r in n){var o=n[r].name;if(o!==r){var i=n[r].qb;Object.defineProperty(t,o,{get:function(){return this[r]},set:function(e){Xd(o,[i],[e],!0),this[r]=e},enumerable:!0})}}}function ap(e,t,n,r){e[t]=Z(t,n,r)}function Z(t,n,r){function o(){var e=Array.prototype.slice.call(arguments);return Xd(i,r,e),n.apply(this,e)}if(!r)return n;var i=ip(t),e;for(e in n)o[e]=n[e];for(e in n.prototype)o.prototype[e]=n.prototype[e];return o}function ip(e){return e=e.split("."),e[e.length-1]}var sp=o("dP58").default,lp=lp||{},dp=this,k="closure_uid_"+(1E9*Math.random()>>>0),ia=0,ja=Date.now||function(){return+new Date},na;$(et,Error),et.prototype.name="CustomError",$(u,et),u.prototype.name="AssertionError",nt.prototype.get=function(){if(0/g,Qa=/"/g,Ra=/'/g,Sa=/\x00/g,Ta=/[\x00&<>"']/,Na;a:{var Va=dp.navigator;if(Va){var Wa=Va.userAgent;if(Wa){Na=Wa;break a}}Na=""}var Xa=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],pp=!1,cp=new ot,ya=0,up=2,hp=3,mp,gp;y.prototype.reset=function(){this.f=this.b=this.g=this.a=null,this.c=!1};var fp=new nt(function(){return new y},function(e){e.reset()});_t.prototype.then=function(e,t,n){return Mt(this,m(e)?e:null,m(t)?t:null,n)},t(_t),na=_t.prototype,na.ia=function(e,t){return e=Et(e,e,t),e.c=!0,Ot(this,e),this},na.s=function(e,t){return Mt(this,null,e,t)},na.cancel=function(e){this.a==ya&&wt(function(){var t=new qt(e);Lt(this,t)},this)},na.Lc=function(e){this.a=ya,Dt(this,up,e)},na.Mc=function(e){this.a=ya,Dt(this,hp,e)},na.Ub=function(){for(var e;e=Ft(this);)Ut(this,e,this.a,this.i);this.h=!1};var yp=kt;$(qt,et),qt.prototype.name="cancel";var bp=0,xp={};Vt.prototype.pa=!1,Vt.prototype.ua=function(){if(this.ja)for(;this.ja.length;)this.ja.shift()()},Ht[" "]=p;var vp=yt("Opera"),kp=yt("Trident")||yt("MSIE"),Sp=yt("Edge"),wp=Sp||kp,Cp=yt("Gecko")&&(!ft(Na.toLowerCase(),"webkit")||yt("Edge"))&&!(yt("Trident")||yt("MSIE"))&&!yt("Edge"),Tp=ft(Na.toLowerCase(),"webkit")&&!yt("Edge"),_p;a:{var Ep="",Ap=function(){var e=Na;return Cp?/rv:([^\);]+)(\)|;)/.exec(e):Sp?/Edge\/([\d\.]+)/.exec(e):kp?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(e):Tp?/WebKit\/(\S+)/.exec(e):vp?/(?:Version)[ \/]?(\S+)/.exec(e):void 0}();if(Ap&&(Ep=Ap?Ap[1]:""),kp){var Ip=Gt();if(null!=Ip&&Ip>parseFloat(Ep)){_p=Ip+"";break a}}_p=Ep}var Np={},Lp=dp.document,Op;Op=Lp&&kp?Gt()||("CSS1Compat"==Lp.compatMode?parseInt(_p,10):5):void 0;var Mp=Object.freeze||function(e){return e},Dp=!kp||9<=+Op,Rp=kp&&!Xt("9"),Pp=function(){if(!dp.addEventListener||!Object.defineProperty)return!1;var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});return dp.addEventListener("test",p,t),dp.removeEventListener("test",p,t),e}();Qt.prototype.preventDefault=function(){this.Gb=!1},$(C,Qt);var Bp=Mp({2:"touch",3:"pen",4:"mouse"});C.prototype.preventDefault=function(){C.lb.preventDefault.call(this);var e=this.a;if(e.preventDefault)e.preventDefault();else if(e.returnValue=!1,Rp)try{(e.ctrlKey||112<=e.keyCode&&123>=e.keyCode)&&(e.keyCode=-1)}catch(e){}},C.prototype.f=function(){return this.a};var Fp="closure_listenable_"+(0|1E6*Math.random()),Up=0;$t.prototype.add=function(t,n,r,o,i){var e=t.toString();t=this.a[e],t||(t=this.a[e]=[],this.b++);var s=en(t,n,o,i);return-1>>0);$(hn,Vt),hn.prototype[Fp]=!0,hn.prototype.addEventListener=function(e,t,n,r){tn(this,e,t,n,r)},hn.prototype.removeEventListener=function(e,t,n,r){an(this,e,t,n,r)},hn.prototype.dispatchEvent=function(t){var n=this.Ua,r;if(n)for(r=[];n;n=n.Ua)r.push(n);n=this.Nb;var o=t.type||t;if(s(t))t=new Qt(t,n);else if(t instanceof Qt)t.target=t.target||n;else{var i=t;t=new Qt(o,n),vt(t,i)}if(i=!0,r)for(var e=r.length-1,l;0<=e;e--)l=t.b=r[e],i=gn(l,o,!0,t)&&i;if(l=t.b=n,i=gn(l,o,!0,t)&&i,i=gn(l,o,!1,t)&&i,r)for(e=0;e"),nr(""),nr("
");var Gd={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"},Ld={'"':"\\\"","\\":"\\\\","/":"\\/","":"\\b"," ":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"," ":"\\u000b"},Td=/\uffff/.test("\uFFFF")?/[\\"\x00-\x1f\x7f-\uffff]/g:/[\\"\x00-\x1f\x7f-\xff]/g,Ud=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,ge="Firefox",ee="Chrome",ae={Sc:"FirebaseCore-web",Uc:"FirebaseUI-web"};Be.prototype.get=function(){var e=dp.navigator;return(e&&"boolean"==typeof e.onLine&&(ue()||"chrome-extension:"===ve()||"undefined"!=typeof e.connection)?e.onLine:1)?this.b?this.c:this.a:Math.min(5E3,this.a)};var qe={},He;try{var Je={};Object.defineProperty(Je,"abcd",{configurable:!0,enumerable:!0,value:1}),Object.defineProperty(Je,"abcd",{configurable:!0,enumerable:!0,value:2}),He=2==Je.abcd}catch(e){He=!1}var Ke="EMAIL_SIGNIN",Te="email",Qe="newEmail",Re="requestType",Se="email",Ve="fromEmail",Ue="data",Xe="operation";$(Pe,Error),Pe.prototype.D=function(){return{code:this.code,message:this.message}},Pe.prototype.toJSON=function(){return this.D()};var We="auth/",Ye={"argument-error":"","app-not-authorized":"This app, identified by the domain where it's hosted, is not authorized to use Firebase Authentication with the provided API key. Review your key configuration in the Google API console.","app-not-installed":"The requested mobile application corresponding to the identifier (Android package name or iOS bundle ID) provided is not installed on this device.","captcha-check-failed":"The reCAPTCHA response token provided is either invalid, expired, already used or the domain associated with it does not match the list of whitelisted domains.","code-expired":"The SMS code has expired. Please re-send the verification code to try again.","cordova-not-ready":"Cordova framework is not ready.","cors-unsupported":"This browser is not supported.","credential-already-in-use":"This credential is already associated with a different user account.","custom-token-mismatch":"The custom token corresponds to a different audience.","requires-recent-login":"This operation is sensitive and requires recent authentication. Log in again before retrying this request.","dynamic-link-not-activated":"Please activate Dynamic Links in the Firebase Console and agree to the terms and conditions.","email-already-in-use":"The email address is already in use by another account.","expired-action-code":"The action code has expired. ","cancelled-popup-request":"This operation has been cancelled due to another conflicting popup being opened.","internal-error":"An internal error has occurred.","invalid-app-credential":"The phone verification request contains an invalid application verifier. The reCAPTCHA token response is either invalid or expired.","invalid-app-id":"The mobile app identifier is not registed for the current project.","invalid-user-token":"This user's credential isn't valid for this project. This can happen if the user's token has been tampered with, or if the user isn't for the project associated with this API key.","invalid-auth-event":"An internal error has occurred.","invalid-verification-code":"The SMS verification code used to create the phone auth credential is invalid. Please resend the verification code sms and be sure use the verification code provided by the user.","invalid-continue-uri":"The continue URL provided in the request is invalid.","invalid-cordova-configuration":"The following Cordova plugins must be installed to enable OAuth sign-in: cordova-plugin-buildinfo, cordova-universal-links-plugin, cordova-plugin-browsertab, cordova-plugin-inappbrowser and cordova-plugin-customurlscheme.","invalid-custom-token":"The custom token format is incorrect. Please check the documentation.","invalid-email":"The email address is badly formatted.","invalid-api-key":"Your API key is invalid, please check you have copied it correctly.","invalid-cert-hash":"The SHA-1 certificate hash provided is invalid.","invalid-credential":"The supplied auth credential is malformed or has expired.","invalid-persistence-type":"The specified persistence type is invalid. It can only be local, session or none.","invalid-message-payload":"The email template corresponding to this action contains invalid characters in its message. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-oauth-provider":"EmailAuthProvider is not supported for this operation. This operation only supports OAuth providers.","invalid-oauth-client-id":"The OAuth client ID provided is either invalid or does not match the specified API key.","unauthorized-domain":"This domain is not authorized for OAuth operations for your Firebase project. Edit the list of authorized domains from the Firebase console.","invalid-action-code":"The action code is invalid. This can happen if the code is malformed, expired, or has already been used.","wrong-password":"The password is invalid or the user does not have a password.","invalid-phone-number":"The format of the phone number provided is incorrect. Please enter the phone number in a format that can be parsed into E.164 format. E.164 phone numbers are written in the format [+][country code][subscriber number including area code].","invalid-recipient-email":"The email corresponding to this action failed to send as the provided recipient email address is invalid.","invalid-sender":"The email template corresponding to this action contains an invalid sender email or name. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-verification-id":"The verification ID used to create the phone auth credential is invalid.","missing-android-pkg-name":"An Android Package Name must be provided if the Android App is required to be installed.","auth-domain-config-required":"Be sure to include authDomain when calling firebase.initializeApp(), by following the instructions in the Firebase console.","missing-app-credential":"The phone verification request is missing an application verifier assertion. A reCAPTCHA response token needs to be provided.","missing-verification-code":"The phone auth credential was created with an empty SMS verification code.","missing-continue-uri":"A continue URL must be provided in the request.","missing-iframe-start":"An internal error has occurred.","missing-ios-bundle-id":"An iOS Bundle ID must be provided if an App Store ID is provided.","missing-phone-number":"To send verification codes, provide a phone number for the recipient.","missing-verification-id":"The phone auth credential was created with an empty verification ID.","app-deleted":"This instance of FirebaseApp has been deleted.","account-exists-with-different-credential":"An account already exists with the same email address but different sign-in credentials. Sign in using a provider associated with this email address.","network-request-failed":"A network error (such as timeout, interrupted connection or unreachable host) has occurred.","no-auth-event":"An internal error has occurred.","no-such-provider":"User was not linked to an account with the given provider.","null-user":"A null user object was provided as the argument for an operation which requires a non-null user object.","operation-not-allowed":"The given sign-in provider is disabled for this Firebase project. Enable it in the Firebase console, under the sign-in method tab of the Auth section.","operation-not-supported-in-this-environment":"This operation is not supported in the environment this application is running on. \"location.protocol\" must be http, https or chrome-extension and web storage must be enabled.","popup-blocked":"Unable to establish a connection with the popup. It may have been blocked by the browser.","popup-closed-by-user":"The popup has been closed by the user before finalizing the operation.","provider-already-linked":"User can only be linked to one identity for the given provider.","quota-exceeded":"The project's quota for this operation has been exceeded.","redirect-cancelled-by-user":"The redirect operation has been cancelled by the user before finalizing.","redirect-operation-pending":"A redirect sign-in operation is already pending.",timeout:"The operation has timed out.","user-token-expired":"The user's credential is no longer valid. The user must sign in again.","too-many-requests":"We have blocked all requests from this device due to unusual activity. Try again later.","unauthorized-continue-uri":"The domain of the continue URL is not whitelisted. Please whitelist the domain in the Firebase console.","unsupported-persistence-type":"The current environment does not support the specified persistence type.","user-cancelled":"User did not grant your application the permissions it requested.","user-not-found":"There is no user record corresponding to this identifier. The user may have been deleted.","user-disabled":"The user account has been disabled by an administrator.","user-mismatch":"The supplied credentials do not correspond to the previously signed in user.","user-signed-out":"","weak-password":"The password must be 6 characters long or more.","web-storage-unsupported":"This browser is not supported or 3rd party cookies and data may be disabled."},Ze="android",Yp="handleCodeInApp",Jp="iOS",$p="url",Zp="installApp",ec="minimumVersion",tc="packageName",nc="bundleId",rc=null,oc=null;Tr.prototype.f=function(){return this.b};var ac=["oauth_consumer_key","oauth_nonce","oauth_signature","oauth_signature_method","oauth_timestamp","oauth_token","oauth_version"],ic=["client_id","response_type","scope","redirect_uri","state"],sc={Tc:{Ma:"locale",Ba:500,Aa:600,Na:"facebook.com",eb:ic},Vc:{Ma:null,Ba:500,Aa:620,Na:"github.com",eb:ic},Wc:{Ma:"hl",Ba:515,Aa:680,Na:"google.com",eb:ic},bd:{Ma:"lang",Ba:485,Aa:705,Na:"twitter.com",eb:ac}},lc="idToken",dc="providerId";$(Lr,Nr),$(Or,Lr),$(Mr,Lr),$(Dr,Lr),$(Rr,Lr),Ur.prototype.ya=function(e){return Ma(e,zr(this))},Ur.prototype.c=function(e,t){var n=zr(this);return n.idToken=t,Da(e,n)},Ur.prototype.f=function(e,t){var n=zr(this);return Fr(Fa(e,n),t)},Ur.prototype.D=function(){var e={providerId:this.providerId,signInMethod:this.signInMethod};return this.idToken&&(e.oauthIdToken=this.idToken),this.accessToken&&(e.oauthAccessToken=this.accessToken),this.secret&&(e.oauthTokenSecret=this.secret),e},jr.prototype.Da=function(e){return this.vb=xt(e),this},$(qr,jr),qr.prototype.ta=function(e){return dt(this.a,e)||this.a.push(e),this},qr.prototype.Ab=function(){return ht(this.a)},qr.prototype.credential=function(e,t){if(!e&&!t)throw new Pe("argument-error","credential failed: must provide the ID token and/or the access token.");return new Ur(this.providerId,{idToken:e||null,accessToken:t||null},this.providerId)},$(M,qr),Ie(M,"PROVIDER_ID","facebook.com"),Ie(M,"FACEBOOK_SIGN_IN_METHOD","facebook.com"),$(Wr,qr),Ie(Wr,"PROVIDER_ID","github.com"),Ie(Wr,"GITHUB_SIGN_IN_METHOD","github.com"),$(Kr,qr),Ie(Kr,"PROVIDER_ID","google.com"),Ie(Kr,"GOOGLE_SIGN_IN_METHOD","google.com"),$(Xr,jr),Ie(Xr,"PROVIDER_ID","twitter.com"),Ie(Xr,"TWITTER_SIGN_IN_METHOD","twitter.com"),Yr.prototype.ya=function(e){return this.signInMethod==Jr.EMAIL_LINK_SIGN_IN_METHOD?qa(e,gi,{email:this.a,oobCode:this.b}):qa(e,vi,{email:this.a,password:this.b})},Yr.prototype.c=function(e,t){return this.signInMethod==Jr.EMAIL_LINK_SIGN_IN_METHOD?qa(e,Fc,{idToken:t,email:this.a,oobCode:this.b}):qa(e,jc,{idToken:t,email:this.a,password:this.b})},Yr.prototype.f=function(e,t){return Fr(this.ya(e),t)},Yr.prototype.D=function(){return{email:this.a,password:this.b,signInMethod:this.signInMethod}},I(Jr,{PROVIDER_ID:"password"}),I(Jr,{EMAIL_LINK_SIGN_IN_METHOD:"emailLink"}),I(Jr,{EMAIL_PASSWORD_SIGN_IN_METHOD:"password"}),Zr.prototype.ya=function(e){return e.Ta(eo(this))},Zr.prototype.c=function(e,t){var n=eo(this);return n.idToken=t,qa(e,ei,n)},Zr.prototype.f=function(e,t){var n=eo(this);return n.operation="REAUTH",e=qa(e,Hc,n),Fr(e,t)},Zr.prototype.D=function(){var e={providerId:"phone"};return this.a.Sa&&(e.verificationId=this.a.Sa),this.a.Ra&&(e.verificationCode=this.a.Ra),this.a.Fa&&(e.temporaryProof=this.a.Fa),this.a.$&&(e.phoneNumber=this.a.$),e},to.prototype.Ta=function(e,t){var n=this.a.b;return At(t.verify()).then(function(r){if(!s(r))throw new Pe("argument-error","An implementation of firebase.auth.ApplicationVerifier.prototype.verify() must return a firebase.Promise that resolves with a string.");switch(t.type){case"recaptcha":return _a(n,{phoneNumber:e,recaptchaToken:r}).then(function(e){return"function"==typeof t.reset&&t.reset(),e},function(e){throw"function"==typeof t.reset&&t.reset(),e});default:throw new Pe("argument-error","Only firebase.auth.ApplicationVerifiers with type=\"recaptcha\" are currently supported.");}})},I(to,{PROVIDER_ID:"phone"}),I(to,{PHONE_SIGN_IN_METHOD:"phone"}),ao.prototype.D=function(){return{type:this.b,eventId:this.c,urlResponse:this.f,sessionId:this.g,error:this.a&&this.a.D()}};var pc=null;so.prototype.subscribe=function(e){var t=this;this.a.push(e),this.b||(this.b=function(e){for(var n=0;n=So(this).value)for(m(t)&&(t=t()),e=new xo(e,t+"",this.f),n&&(e.a=n),n=this;n;)n=n.a};var xc={},vc=null;$(P,uo),P.prototype.a=function(){return new To(this.f)},P.prototype.b=function(e){return function(){return e}}({}),$(To,hn);var kc=0;na=To.prototype,na.open=function(e,t){if(this.readyState!=kc)throw this.abort(),Error("Error reopening a connection");this.h=e,this.c=t,this.readyState=1,_o(this)},na.send=function(e){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.a=!0;var t={headers:this.g,method:this.h,credentials:void 0,cache:void 0};e&&(t.body=e),this.i.fetch(new Request(this.c,t)).then(this.ec.bind(this),this.Cb.bind(this))},na.abort=function(){this.responseText="",this.g=new Headers,this.status=0,1<=this.readyState&&this.a&&4!=this.readyState&&(this.readyState=4,this.a=!1,_o(this)),this.readyState=kc},na.ec=function(e){this.a&&(this.b||(this.b=e.headers,this.readyState=2,_o(this)),this.a&&(this.readyState=3,_o(this),this.a&&e.text().then(this.dc.bind(this,e),this.Cb.bind(this))))},na.dc=function(e,t){this.a&&(this.status=e.status,this.statusText=e.statusText,this.responseText=t,this.readyState=4,_o(this))},na.Cb=function(e){var t=this.f;t&&t.log(gc,"Failed to fetch url "+this.c,e instanceof Error?e:Error(e)),this.a&&(this.readyState=4,_o(this))},na.setRequestHeader=function(e,t){this.g.append(e,t)},na.getResponseHeader=function(e){return this.b?this.b.get(e.toLowerCase())||"":((e=this.f)&&e.log(gc,"Attempting to get response header but no headers have been received for url: "+this.c,void 0),"")},na.getAllResponseHeaders=function(){if(!this.b){var e=this.f;return e&&e.log(gc,"Attempting to get all response headers but no headers have been received for url: "+this.c,void 0),""}e=[];for(var t=this.b.entries(),n=t.next();!n.done;)n=n.value,e.push(n[0]+": "+n[1]),n=t.next();return e.join("\r\n")},$(Eo,hn);var Sc="";Eo.prototype.b=wo("goog.net.XhrIo");var wc=/^https?$/i,Cc=["POST","PUT"];na=Eo.prototype,na.Ga=function(){"undefined"!=typeof lp&&this.a&&(this.h="Timed out after "+this.g+"ms, aborting",Co(this.b,Uo(this,this.h)),this.dispatchEvent("timeout"),this.abort(8))},na.abort=function(){this.a&&this.c&&(Co(this.b,Uo(this,"Aborting")),this.c=!1,this.f=!0,this.a.abort(),this.f=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),Do(this))},na.ua=function(){this.a&&(this.c&&(this.c=!1,this.f=!0,this.a.abort(),this.f=!1),Do(this,!0)),Eo.lb.ua.call(this)},na.Fb=function(){this.pa||(this.I||this.i||this.f?Mo(this):this.tc())},na.tc=function(){Mo(this)},na.getResponse=function(){try{if(!this.a)return null;if("response"in this.a)return this.a.response;switch(this.o){case Sc:case"text":return this.a.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in this.a)return this.a.mozResponseArrayBuffer;}var e=this.b;return e&&e.log(mc,"Response type "+this.o+" is not supported on this browser",void 0),null}catch(e){return Co(this.b,"Can not get response: "+e.message),null}},zo.prototype.cancel=function(e){if(this.a)this.c instanceof zo&&this.c.cancel();else{if(this.b){var t=this.b;delete this.b,e?t.cancel(e):(t.m--,0>=t.m&&t.cancel())}this.v?this.v.call(this.u,this):this.l=!0,this.a||(e=new Xo(this),qo(this),jo(this,!1,e))}},zo.prototype.o=function(e,t){this.i=!1,jo(this,e,t)},zo.prototype.C=function(){qo(this),jo(this,!0,null)},zo.prototype.then=function(t,n,r){var o=new _t(function(e,t){i=e,s=t}),i,s;return Wo(this,i,function(e){e instanceof Xo?o.cancel():s(e)}),o.then(t,n,r)},t(zo),$(Go,et),Go.prototype.message="Deferred has already fired",Go.prototype.name="AlreadyCalledError",$(Xo,et),Xo.prototype.message="Deferred was canceled",Xo.prototype.name="CanceledError",Qo.prototype.c=function(){throw delete Tc[this.a],this.b};var Tc={},_c=0,Ec=1;$(ta,et),$(ra,uo),ra.prototype.a=function(){return new this.f},ra.prototype.b=function(){return{}};var Ac="idToken",L=new Be(3E4,6E4),Ic={"Content-Type":"application/x-www-form-urlencoded"},Nc=new Be(3E4,6E4),Lc={"Content-Type":"application/json"},Oc;oa.prototype.o=function(t,r,o,i,s,e){if(le()&&("undefined"==typeof dp.fetch||"undefined"==typeof dp.Headers||"undefined"==typeof dp.Request))throw new Pe("operation-not-supported-in-this-environment","fetch, Headers and Request native APIs or equivalent Polyfills must be available to support HTTP requests from a Worker environment.");var l=new Eo(this.c);if(e){l.g=n(0,e);var d=setTimeout(function(){l.dispatchEvent("timeout")},e)}E(l,"complete",function(){d&&clearTimeout(d);var e=null;try{e=JSON.parse(Fo(this))||null}catch(t){e=null}r&&r(e)}),mn(l,"ready",function(){d&&clearTimeout(d),Wt(this)}),mn(l,"timeout",function(){d&&clearTimeout(d),Wt(this),r&&r(null)}),Ao(l,t,o,i,s)};var Mc=Hn("https://apis.google.com/js/client.js?onload=%{onload}"),Dc="__fcb"+i(1E6*Math.random()).toString();oa.prototype.l=function(t,n,r,o,i){var s=this;Oc.then(function(){window.gapi.client.setApiKey(s.b);var l=window.gapi.auth.getToken();window.gapi.auth.setToken(null),window.gapi.client.request({path:t,method:r,body:o,headers:i,authType:"none",callback:function(e){window.gapi.auth.setToken(l),n&&n(e)}})}).s(function(e){n&&n({error:{message:e&&e.message||"CORS_UNSUPPORTED"}})})},oa.prototype.Pa=function(){return qa(this,qc,{})},oa.prototype.mb=function(e,t){return qa(this,di,{idToken:e,email:t})},oa.prototype.nb=function(e,t){return qa(this,jc,{idToken:e,password:t})};var Rc={displayName:"DISPLAY_NAME",photoUrl:"PHOTO_URL"};na=oa.prototype,na.ob=function(e,t){var n={idToken:e},r=[];return x(Rc,function(o,i){var s=t[i];null===s?r.push(o):i in t&&(n[i]=s)}),r.length&&(n.deleteAttribute=r),qa(this,di,n)},na.hb=function(e,t){return e={requestType:"PASSWORD_RESET",email:e},vt(e,t),qa(this,ci,e)},na.ib=function(e,t){return e={requestType:"EMAIL_SIGNIN",email:e},vt(e,t),qa(this,ti,e)},na.gb=function(e,t){return e={requestType:"VERIFY_EMAIL",idToken:e},vt(e,t),qa(this,bi,e)},na.Ta=function(e){return qa(this,Wc,e)},na.Xa=function(e,t){return qa(this,ui,{oobCode:e,newPassword:t})},na.Ja=function(e){return qa(this,qi,{oobCode:e})},na.Va=function(e){return qa(this,Pc,{oobCode:e})};var Pc={endpoint:"setAccountInfo",B:Ua,da:"email"},qi={endpoint:"resetPassword",B:Ua,J:function(e){var t=e.requestType;if(!t||!e.email&&"EMAIL_SIGNIN"!=t)throw new Pe("internal-error")}},pi={endpoint:"signupNewUser",B:function(e){if(ha(e),!e.password)throw new Pe("weak-password")},J:va,R:!0},ri={endpoint:"createAuthUri"},Bc={endpoint:"deleteAccount",T:["idToken"]},si={endpoint:"setAccountInfo",T:["idToken","deleteProvider"],B:function(e){if(!_(e.deleteProvider))throw new Pe("internal-error")}},gi={endpoint:"emailLinkSignin",T:["email","oobCode"],B:ha,J:va,R:!0},Fc={endpoint:"emailLinkSignin",T:["idToken","email","oobCode"],B:ha,J:va,R:!0},Uc={endpoint:"getAccountInfo"},ti={endpoint:"getOobConfirmationCode",T:["requestType"],B:function(e){if("EMAIL_SIGNIN"!=e.requestType)throw new Pe("internal-error");ha(e)},da:"email"},bi={endpoint:"getOobConfirmationCode",T:["idToken","requestType"],B:function(e){if("VERIFY_EMAIL"!=e.requestType)throw new Pe("internal-error")},da:"email"},ci={endpoint:"getOobConfirmationCode",T:["requestType"],B:function(e){if("PASSWORD_RESET"!=e.requestType)throw new Pe("internal-error");ha(e)},da:"email"},ai={rb:!0,endpoint:"getProjectConfig",Eb:"GET"},zc={rb:!0,endpoint:"getRecaptchaParam",Eb:"GET",J:function(e){if(!e.recaptchaSiteKey)throw new Pe("internal-error")}},ui={endpoint:"resetPassword",B:Ua,da:"email"},oi={endpoint:"sendVerificationCode",T:["phoneNumber","recaptchaToken"],da:"sessionInfo"},di={endpoint:"setAccountInfo",T:["idToken"],B:ma,R:!0},jc={endpoint:"setAccountInfo",T:["idToken"],B:function(e){if(ma(e),!e.password)throw new Pe("weak-password")},J:va,R:!0},qc={endpoint:"signupNewUser",J:va,R:!0},Vc={endpoint:"verifyAssertion",B:Aa,J:Ia,R:!0},ki={endpoint:"verifyAssertion",B:Aa,J:function(e){if(e.errorMessage&&"USER_NOT_FOUND"==e.errorMessage)throw new Pe("user-not-found");if(e.errorMessage)throw O(e.errorMessage);if(!e[Ac])throw new Pe("internal-error")},R:!0},mi={endpoint:"verifyAssertion",B:function(e){if(Aa(e),!e.idToken)throw new Pe("internal-error")},J:Ia,R:!0},li={endpoint:"verifyCustomToken",B:function(e){if(!e.token)throw new Pe("invalid-custom-token")},J:va,R:!0},vi={endpoint:"verifyPassword",B:function(e){if(ha(e),!e.password)throw new Pe("wrong-password")},J:va,R:!0},Wc={endpoint:"verifyPhoneNumber",B:ka,J:va},ei={endpoint:"verifyPhoneNumber",B:function(e){if(!e.idToken)throw new Pe("internal-error");ka(e)},J:function(e){if(e.temporaryProof)throw e.code="credential-already-in-use",co(e);va(e)}},Hc={Tb:{USER_NOT_FOUND:"user-not-found"},endpoint:"verifyPhoneNumber",B:ka,J:va},Kc={Yc:{Za:"https://www.googleapis.com/identitytoolkit/v3/relyingparty/",fb:"https://securetoken.googleapis.com/v1/token",id:"p"},$c:{Za:"https://staging-www.sandbox.googleapis.com/identitytoolkit/v3/relyingparty/",fb:"https://staging-securetoken.sandbox.googleapis.com/v1/token",id:"s"},ad:{Za:"https://www-googleapis-test.sandbox.google.com/identitytoolkit/v3/relyingparty/",fb:"https://test-securetoken.sandbox.googleapis.com/v1/token",id:"t"}},wi;wi=Ka("__EID__")?"__EID__":void 0;var yi=Hn("https://apis.google.com/js/api.js?onload=%{onload}"),Fi=new Be(3E4,6E4),Gi=new Be(5E3,15E3),Ci=null;fi.prototype.toString=function(){return this.f?In(this.a,"v",this.f):Fn(this.a.a,"v"),this.b?In(this.a,"eid",this.b):Fn(this.a.a,"eid"),this.c.length?In(this.a,"fw",this.c.join(",")):Fn(this.a.a,"fw"),this.a.toString()},xi.prototype.toString=function(){var t=Ln(this.o,"/__/auth/handler");if(In(t,"apiKey",this.l),In(t,"appName",this.c),In(t,"authType",this.m),this.a.isOAuthProvider){var n=this.a;try{var r=sp.app(this.c).auth().ea()}catch(e){r=null}for(var o in n.Ya=r,In(t,"providerId",this.a.providerId),n=this.a,r=xe(n.vb),r)r[o]=r[o].toString();o=n.Ac,r=xt(r);for(var i=0,e;ithis.c-3E4?this.a?sd(this,{grant_type:"refresh_token",refresh_token:this.a}):At(null):At({accessToken:this.b,expirationTime:this.c,refreshToken:this.a})},ld.prototype.D=function(){return{lastLoginAt:this.b,createdAt:this.a}},$(hd,Qt),$(md,hn),md.prototype.oa=function(e){this.ka=e,sa(this.b,e)},md.prototype.ea=function(){return this.ka},md.prototype.xa=function(){return ht(this.O)},md.prototype.Ha=function(){this.w.b&&(this.w.stop(),this.w.start())},Ie(md.prototype,"providerId","firebase"),na=md.prototype,na.reload=function(){var e=this;return ql(this,bl(this).then(function(){return hl(e).then(function(){return Id(e)}).then(Od)}))},na.ac=function(e){return this.F(e).then(function(e){return new $s(e)})},na.F=function(e){var t=this;return ql(this,bl(this).then(function(){return t.h.getToken(e)}).then(function(e){if(!e)throw new Pe("internal-error");return e.accessToken!=t.qa&&(_d(t,e.accessToken),t.dispatchEvent(new hd("tokenChanged"))),fl(t,"refreshToken",e.refreshToken),e.accessToken}))},na.uc=function(e){if(e=e.users,!e||!e.length)throw new Pe("internal-error");e=e[0],al(this,{uid:e.localId,displayName:e.displayName,photoURL:e.photoUrl,email:e.email,emailVerified:!!e.emailVerified,phoneNumber:e.phoneNumber,lastLoginAt:e.lastLoginAt,createdAt:e.createdAt});for(var t=jl(e),n=0;nthis.u&&(this.u=0),0==this.u&&S(this)&&Sd(S(this)),this.removeAuthTokenListener(e)},na.addAuthTokenListener=function(e){var t=this;this.o.push(e),Yl(this,this.i.then(function(){t.l||dt(t.o,e)&&e(U(t))}))},na.removeAuthTokenListener=function(e){ct(this.o,function(t){return t==e})},na.delete=function(){this.l=!0;for(var e=0;ec;c++)u[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;u[254]=u[254]=1;var i=function(e){var t=e.length,n=0,r,o,s,d,p;for(d=0;do?1:2048>o?2:65536>o?3:4;for(r=l.uint8array?new Uint8Array(n):Array(n),p=0,d=0;po?r[p++]=o:2048>o?(r[p++]=192|o>>>6,r[p++]=128|63&o):65536>o?(r[p++]=224|o>>>12,r[p++]=128|63&o>>>6,r[p++]=128|63&o):(r[p++]=240|o>>>18,r[p++]=128|63&o>>>12,r[p++]=128|63&o>>>6,r[p++]=128|63&o);return r},h=function(e,t){var n;for(t=t||e.length,t>e.length&&(t=e.length),n=t-1;0<=n&&128==(192&e[n]);)n--;return 0>n?t:0===n?t:n+u[e[n]]>t?n:t},m=function(e){var t=e.length,n=Array(2*t),r,o,i,l;for(o=0,r=0;ri){n[o++]=i;continue}if(l=u[i],4i?n[o++]=i:(i-=65536,n[o++]=55296|1023&i>>10,n[o++]=56320|1023&i)}return n.length!==o&&(n.subarray?n=n.subarray(0,o):n.length=o),s.applyFromCharCode(n)};t.utf8encode=function(e){return l.nodebuffer?d.newBufferFrom(e,"utf-8"):i(e)},t.utf8decode=function(e){return l.nodebuffer?s.transformTo("nodebuffer",e).toString("utf-8"):(e=s.transformTo(l.uint8array?"uint8array":"array",e),m(e))},s.inherits(r,p),r.prototype.processChunk=function(e){var n=s.transformTo(l.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(l.uint8array){var r=n;n=new Uint8Array(r.length+this.leftOver.length),n.set(this.leftOver,0),n.set(r,this.leftOver.length)}else n=this.leftOver.concat(n);this.leftOver=null}var o=h(n),i=n;o!==n.length&&(l.uint8array?(i=n.subarray(0,o),this.leftOver=n.subarray(o,n.length)):(i=n.slice(0,o),this.leftOver=n.slice(o,n.length))),this.push({data:t.utf8decode(i),meta:e.meta})},r.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:t.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},t.Utf8DecodeWorker=r,s.inherits(o,p),o.prototype.processChunk=function(e){this.push({data:t.utf8encode(e.data),meta:e.meta})},t.Utf8EncodeWorker=o},TCoK:function(e,t,n){"use strict";function r(e){o.call(this,e);for(var t=0;tt;t++){n=t;for(var r=0;8>r;r++)n=1&n?3988292384^n>>>1:n>>>1;e[t]=n}return e}();e.exports=function(e,n,r,o){e^=-1;for(var s=o;s>>8^t[255&(e^n[s])];return-1^e}},X7my:function(e,t,n){"use strict";var r=Math.min;(function(e){e(n("tQq4"))})(function(e){function t(e){var t=e.search(l);return-1==t?0:t}function n(e,t,n){return /\bstring\b/.test(e.getTokenTypeAt(d(t.line,0)))&&!/^[\'\"\`]/.test(n)}function o(e,t){var n=e.getMode();return!1!==n.useInnerComments&&n.innerMode?e.getModeAt(t):n}var s={},l=/[^\s\u00a0]/,d=e.Pos;e.commands.toggleComment=function(e){e.toggleComment()},e.defineExtension("toggleComment",function(e){e||(e=s);for(var t=this,n=Infinity,r=this.listSelections(),o=null,l=r.length-1;0<=l;l--){var i=r[l].from(),p=r[l].to();i.line>=n||(p.line>=n&&(p=d(n,0)),n=i.line,null==o?t.uncomment(i,p,e)?o="un":(t.lineComment(i,p,e),o="line"):"un"==o?t.uncomment(i,p,e):t.lineComment(i,p,e))}}),e.defineExtension("lineComment",function(e,i,p){p||(p=s);var c=this,u=o(c,e),h=c.getLine(e.line);if(!(null==h||n(c,e,h))){var m=p.lineComment||u.lineComment;if(!m)return void((p.blockCommentStart||u.blockCommentStart)&&(p.fullLines=!0,c.blockComment(e,i,p)));var g=r(0!=i.ch||i.line==e.line?i.line+1:i.line,c.lastLine()+1),f=null==p.padding?" ":p.padding,y=p.commentBlankLines||e.line==i.line;c.operation(function(){if(p.indent){for(var n=null,r=e.line;ri.length)&&(n=i)}for(var r=e.line;rm||p.operation(function(){if(!1!=n.fullLines){var r=l.test(p.getLine(m));p.replaceRange(g+h,d(m)),p.replaceRange(u+g,d(e.line,0));var o=n.blockCommentLead||c.blockCommentLead;if(null!=o)for(var s=e.line+1;s<=m;++s)(s!=m||r)&&p.replaceRange(o+g,d(s,0))}else p.replaceRange(h,t),p.replaceRange(u,e)})}}),e.defineExtension("uncomment",function(e,t,n){n||(n=s);var p=this,c=o(p,e),u=r(0!=t.ch||t.line==e.line?t.line:t.line-1,p.lastLine()),h=r(e.line,u),m=n.lineComment||c.lineComment,g=[],f=null==n.padding?" ":n.padding,y;lineComment:{if(!m)break lineComment;for(var b=h;b<=u;++b){var i=p.getLine(b),x=i.indexOf(m);if(-1n||(t.slice(r,r+f.length)==f&&(r+=f.length),y=!0,p.replaceRange("",d(e,n),d(e,r)))}}),y)return!0}var v=n.blockCommentStart||c.blockCommentStart,k=n.blockCommentEnd||c.blockCommentEnd;if(!v||!k)return!1;var S=n.blockCommentLead||c.blockCommentLead,w=p.getLine(h),C=w.indexOf(v);if(-1==C)return!1;var T=u==h?w:p.getLine(u),_=T.indexOf(k,u==h?C+v.length:0),E=d(h,C+1),A=d(u,_+1);if(-1==_||!/comment/.test(p.getTokenTypeAt(E))||!/comment/.test(p.getTokenTypeAt(A))||-1r&&0==n.ch)return t.clipPos(m(n.line-1));var o=t.getLine(n.line);if(0=o.length)return t.clipPos(m(n.line+1,0));for(var s="start",l=n.ch,d=0>r?0:o.length,p=0,i;l!=d;l+=r,p++){var c=o.charAt(0>r?l-1:l),u="_"!=c&&e.isWordChar(c)?"w":"o";if("w"==u&&c.toUpperCase()==c&&(u="W"),"start"==s)"o"!=u&&(s="in",i=u);else if("in"==s&&i!=u){if("w"==i&&"W"==u&&0>r&&l--,"W"==i&&"w"==u&&0n?r.from():r.to()})}function r(t,n){return t.isReadOnly()?e.Pass:void(t.operation(function(){for(var e=t.listSelections().length,r=[],o=-1,s=0,i;s=n&&e.execCommand("goLineUp")}e.scrollTo(null,t.top-e.defaultTextHeight())},h.scrollLineDown=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var n=e.lineAtHeight(t.top,"local")+1;e.getCursor().line<=n&&e.execCommand("goLineDown")}e.scrollTo(null,t.top+e.defaultTextHeight())},h.splitSelectionByLine=function(e){for(var t=e.listSelections(),n=[],r=0;ro.line&&s==i.line&&0==i.ch||n.push({anchor:s==o.line?o:m(s,0),head:s==i.line?i:m(s)});e.setSelections(n,0)},h.singleSelectionTop=function(e){var t=e.listSelections()[0];e.setSelection(t.anchor,t.head,{scroll:!1})},h.selectLine=function(e){for(var t=e.listSelections(),n=[],r=0,o;ro?r.push(d,p):r.length&&(r[r.length-1]=p),o=p}t.operation(function(){for(var e=0;et.lastLine()?t.replaceRange("\n"+i,m(t.lastLine()),null,"+swapLine"):t.replaceRange(i+"\n",m(o,0),null,"+swapLine")}t.setSelections(s),t.scrollIntoView()})},h.swapLineDown=function(t){if(t.isReadOnly())return e.Pass;for(var n=t.listSelections(),r=[],o=t.lastLine()+1,s=n.length-1;0<=s;s--){var i=n[s],l=i.to().line+1,d=i.from().line;0!=i.to().ch||i.empty()||l--,l "+e:e}},e.exports=t},ZTma:function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e){return e===T||e===_}function o(e){var t=e.pos,n=e.prev();if(r(n))for(;!e.sol();)if(e.prev()===n&&e.peek()!==E)return!0;return e.pos=t,!1}function i(e){return s(e)||l(e)}function s(e){var t=e.pos;return o(e)&&e.eat(M)&&d(e)||(e.pos=t,!1)}function l(e){var t=e.pos;return e.eatWhile(c)&&e.eat(M)&&d(e)||(e.pos=t,!1)}function d(e){return e.eatWhile(p)}function p(e){return e===O||e===N||u(e)||h(e)}function u(e){return e&=-33,65<=e&&90>=e}function h(e){return 47e}function m(e){return e===I||e===A}function c(e){return e&&e!==M&&!m(e)&&!r(e)}function g(e,t,n){for(r(e.charCodeAt(t))&&t++;S(e.charCodeAt(t),n.syntax);)t++;return t}function f(e,t,n){if(!n)return 0;var r=new C(e),o=(n+"").split("").map(P);r.pos=t;for(var i;!r.sol();)if(!(y(r,F,B)||y(r,q,j))){if(i=r.pos,b(r,o))return i;r.pos--}return-1}function y(e,t,n){var r=e.pos;if(e.eat(t))for(;!e.sol();){if(e.eat(n))return!0;e.pos--}return e.pos=r,!1}function b(e,t){for(var n=e.pos,r=!1,o=t.length-1;0<=o&&!e.sol()&&!!e.eat(t[o]);o--)r=0===o;return r||(e.pos=n),r}function x(e,t){return-1!==e.indexOf(t)}function v(e){return 64e||96e||47e||V.has(e)}function k(e,t){return e===U||"markup"===t&&(e===B||e===j)}function S(e,t){return e===z||"markup"===t&&(e===F||e===q)}t.__esModule=!0;var w=Object.assign||function(e){for(var t=1,n;t","/"].map(P)),W=new Map().set(B,F).set(U,z).set(j,q),H={syntax:"markup",lookAhead:null,prefix:""};t.default=function(e,t,n){t=Math.min(e.length,Math.max(0,null==t?e.length:t)),n="boolean"==typeof n?w({},H,{lookAhead:n}):w({},H,n),(null==n.lookAhead||!0===n.lookAhead)&&(t=g(e,t,n));var r=void 0,o=f(e,t,n.prefix);if(-1===o)return null;var i=new C(e,o);i.pos=t;for(var s=[];!i.sol();){if(r=i.peek(),S(r,n.syntax))s.push(r);else if(k(r,n.syntax)){if(s.pop()!==W.get(r))break;}else if(x(s,F)||x(s,q)){i.pos--;continue}else if(R(i)||!v(r))break;i.pos--}if(!s.length&&i.pos!==t){var l=e.slice(i.pos,t).replace(/^[*+>^]+/,"");return{abbreviation:l,location:t-l.length,start:n.prefix?o-n.prefix.length:t-l.length,end:t}}}},ZUoI:function(e,t,n){"use strict";n("wGjj");var r=function(e){return e&&"object"==typeof e&&"default"in e?e["default"]:e}(n("dP58"));e.exports=r},Znrd:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(null==e)return e;for(var n=[],r=function(e,n,r,o){return null==t[r]?"":n+t[r]+o},o="",s=0,l=0,i=void 0,d=void 0;l=t.get("inlineBreak"))return!0}for(var l=0,i=e.children.length;lr?0:r}function k(e,t){var n=e.node;if(t.enabled&&t.trigger&&n.name)for(var r=e.node.attributes.reduce(function(e,t){return t.name&&null!=t.value&&(e[t.name.toUpperCase().replace(/-/g,"_")]=t.value),e},{}),s=0,i=t.trigger.length;st?0:t}function _(e,t){var n=e.node;return!n.isTextOnly&&n.value&&(e.beforeText=X.test(n.value)?e.newline+e.indent+t.indent(1):" "),e}function E(e,t){if(null!=e.value&&X.test(e.value)){var n=i(e.value),r=t.indent(1),o=n.reduce(function(e,t){return Math.max(e,t.length)},0);return n.map(function(e,t){return""+(t?r:"")+A(e,o)+" |"}).join("\n")}return e.value}function A(e,t){for(;e.length"},W=/^id$/i,H=/^class$/i,K={primary:function(e){return e.join("")},secondary:function(e){return e.map(function(e){return e.isBoolean?e.name:e.name+"="+e.value}).join(", ")}},G={open:null,close:null,omitName:/^div$/i,attributes:K},X=/\n|\r/,Q=/\n|\r/,Y={none:"[ SECONDARY_ATTRS]",round:"[(SECONDARY_ATTRS)]",curly:"[{SECONDARY_ATTRS}]",square:"[[SECONDARY_ATTRS]"},J=/\n|\r/,$={html:function(e,t,n){n=R({},n);var r=S(n);return(0,U.default)(e,n.field,function(e){if(e=h(e,t),!p(e)){var n=e.node;if(n.name){var o=t.name(n.name),i=y(e,t);e.open="<"+o+i+(n.selfClosing?t.selfClose():"")+">",n.selfClosing||(e.close=""),k(e,r.comment)}!n.value&&(n.children.length||n.selfClosing)||(e.text=e.renderFields(n.value))}return e})},haml:function(e,t,n){n=n||{};var r={open:"[%NAME][PRIMARY_ATTRS][(SECONDARY_ATTRS)][SELF_CLOSE]",selfClose:"/",attributes:{secondary:function(e){return e.map(function(e){return e.isBoolean?""+e.name+(t.get("compactBooleanAttributes")?"":"=true"):e.name+"="+t.quote(e.value)}).join(" ")}}};return(0,U.default)(e,n.field,function(e){if(e=w(e,t,r),e=_(e,t),!p(e)){var n=e.node;!n.value&&(n.children.length||n.selfClosing)||(e.text=e.renderFields(E(n,t)))}return e})},slim:function(e,t,n){n=n||{};var r=n.attributeWrap&&Y[n.attributeWrap]||Y.none,o=r===Y.none?function(e){return e.name+"=true"}:function(e){return e.name},i={open:"[NAME][PRIMARY_ATTRS]"+r+"[SELF_CLOSE]",selfClose:"/",attributes:{secondary:function(e){return e.map(function(e){return e.isBoolean?o(e):e.name+"="+t.quote(e.value)}).join(" ")}}};return(0,U.default)(e,n.field,function(e){if(e=w(e,t,i),e=I(e,t),!p(e)){var n=e.node;!n.value&&(n.children.length||n.selfClosing)||(e.text=e.renderFields(N(n,t)))}return e})},pug:function(e,t,n){n=n||{};var r={open:"[NAME][PRIMARY_ATTRS][(SECONDARY_ATTRS)]",attributes:{secondary:function(e){return e.map(function(e){return e.isBoolean?e.name:e.name+"="+t.quote(e.value)}).join(", ")}}};return(0,U.default)(e,n.field,function(e){if(e=w(e,t,r),e=O(e,t),!p(e)){var n=e.node;!n.value&&(n.children.length||n.selfClosing)||(e.text=e.renderFields(M(n,t)))}return e})}};t.default=function(e,t,n,r){return"object"==typeof n&&(r=n,n=null),D(n)||(n="html"),$[n](e,t,r)},t.supports=D,t.template=o},aBJ1:function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){return e instanceof d?e:"string"==typeof e?new d(e,t):e&&"object"==typeof e?new d(e.name,e.value,e.options):void 0}function o(e){return(e+"").trim()}function i(e,t,n){return e&&n.indexOf(e)===t}t.__esModule=!0;var s=function(){function e(e,t){for(var n=0,r;nt||t>this.children.length)throw new Error("Unable to insert node: position is out of child list range");var n=this.children[t-1],r=this.children[t];e.remove(),e.parent=this,this.children.splice(t,0,e),n&&(e.previous=n,n.next=e),r&&(e.next=r,r.previous=e)},e.prototype.removeChild=function(e){var t=this.children.indexOf(e);-1!==t&&(this.children.splice(t,1),e.previous&&(e.previous.next=e.next),e.next&&(e.next.previous=e.previous),e.parent=e.next=e.previous=null)},e.prototype.remove=function(){this.parent&&this.parent.removeChild(this)},e.prototype.clone=function(t){var n=new e(this.name);return n.value=this.value,n.selfClosing=this.selfClosing,this.repeat&&(n.repeat=l({},this.repeat)),this._attributes.forEach(function(e){return n.setAttribute(e.clone())}),t&&this.children.forEach(function(e){return n.appendChild(e.clone(!0))}),n},e.prototype.walk=function(e,t){t=t||0;for(var n=this.firstChild,r;n;){if(r=n.next,!1===e(n,t)||!1===n.walk(e,t+1))return!1;n=r}},e.prototype.use=function(e){for(var t=[this],n=1;n=l&&(l=p,s=i)}return l>=o?s:null}function y(e,t){var n=e&&"object"==typeof e?e[t]:e,r=(n||"").match(/^[\w-@]+/);return r?r[0]:n}function b(e,t){for(var n=0,r=0;n=p?-1:d.lastIndexOf(o,p-1),-1==h){if(1==c)return;c=1,p=d.length;continue}if(1==c&&hv&&(v=i.length),0>k&&(k=i.length),x=Math.min(v,k),x==i.length)break;if(x==v)++m;else if(! --m){f=b,y=x;break outer}++x}return null==f||l==f&&y==u?void 0:{from:e.Pos(l,u),to:e.Pos(f,y)}}})})},bdtv:function(e){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},c5OX:function(e){"use strict";e.exports={isNode:"undefined"!=typeof Buffer,newBufferFrom:function(e,t){return new Buffer(e,t)},allocBuffer:function(e){return Buffer.alloc?Buffer.alloc(e):new Buffer(e)},isBuffer:function(e){return Buffer.isBuffer(e)},isStream:function(e){return e&&"function"==typeof e.on&&"function"==typeof e.pause&&"function"==typeof e.resume}}},cVWy:function(e,t,n){"use strict";var r=n("3Vd+"),o=n("KxJl"),i=n("iktq"),s=n("3bh8"),l="prototype",d=function e(t,n,d){var p=t&e.F,c=t&e.G,u=t&e.S,h=t&e.P,m=t&e.B,g=t&e.W,f=c?o:o[n]||(o[n]={}),y=f[l],b=c?r:u?r[n]:(r[n]||{})[l],x,v,k;for(x in c&&(d=n),d)v=!p&&b&&void 0!==b[x],v&&x in f||(k=v?b[x]:d[x],f[x]=c&&"function"!=typeof b[x]?d[x]:m&&v?i(k,r):g&&b[x]==k?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n);}return new e(t,n,r)}return e.apply(this,arguments)};return t[l]=e[l],t}(k):h&&"function"==typeof k?i(Function.call,k):k,h&&((f.virtual||(f.virtual={}))[x]=k,t&e.R&&y&&!y[x]&&s(y,x,k)))};d.F=1,d.G=2,d.S=4,d.P=8,d.B=16,d.W=32,d.U=64,d.R=128,e.exports=d},cvyR:function(e,t,n){"use strict";function r(e,t,n,r){e^=-1;for(var o=r;o>>8^s[255&(e^t[o])];return-1^e}function o(e,t,n,r){e^=-1;for(var o=r;o>>8^s[255&(e^t.charCodeAt(o))];return-1^e}var i=n("dvMn"),s=function(){for(var e=[],t=0,n;256>t;t++){n=t;for(var r=0;8>r;r++)n=1&n?3988292384^n>>>1:n>>>1;e[t]=n}return e}();e.exports=function(e,t){if("undefined"==typeof e||!e.length)return 0;var n="string"!==i.getTypeOf(e);return n?r(0|t,e,e.length,0):o(0|t,e,e.length,0)}},dFUs:function(e,t,n){"use strict";function r(e,t){this.options=e,this.loadOptions=t}var o=n("9Uuy"),i=n("dvMn"),s=n("PO9O"),l=n("cvyR"),d=n("Sm7/"),p=n("XfO6"),c=n("untT"),u=function(e){for(var t in p)if(p.hasOwnProperty(t)&&p[t].magic===e)return p[t];return null};r.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(e){var t,n;if(e.skip(22),this.fileNameLength=e.readInt(2),n=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(n),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(t=u(this.compressionMethod),null===t)throw new Error("Corrupted zip : compression "+i.pretty(this.compressionMethod)+" unknown (inner file : "+i.transformTo("string",this.fileName)+")");this.decompressed=new s(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),e==0&&(this.dosPermissions=63&this.externalFileAttributes),e==3&&(this.unixPermissions=65535&this.externalFileAttributes>>16),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=o(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t=e.index+this.extraFieldsLength,n,r,o;for(this.extraFields||(this.extraFields={});e.indexe)throw new RangeError("\"size\" argument must not be negative")}function h(e,t,n,r){return u(t),0>=t?d(e,t):void 0===n?d(e,t):"string"==typeof r?d(e,t).fill(n,r):d(e,t).fill(n)}function m(e,t){if(u(t),e=d(e,0>t?0:0|x(t)),!p.TYPED_ARRAY_SUPPORT)for(var n=0;nt.length?0:0|x(t.length);e=d(e,n);for(var r=0;rn||t.byteLength=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function v(e,t){if(p.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return X(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return J(e).length;default:if(r)return X(e).length;t=(""+t).toLowerCase(),r=!0;}}function k(e,t,n){var r=!1;if((void 0===t||0>t)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),0>=n)return"";if(n>>>=0,t>>>=0,n<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,n);case"utf8":case"utf-8":return O(this,t,n);case"ascii":return D(this,t,n);case"latin1":case"binary":return R(this,t,n);case"base64":return L(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0;}}function S(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function w(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):2147483647n&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),0>n&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(0>n)if(o)n=0;else return-1;if("string"==typeof t&&(t=p.from(t,r)),p.isBuffer(t))return 0===t.length?-1:C(e,t,n,r,o);if("number"==typeof t)return t&=255,p.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):C(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function C(e,t,n,r,o){function s(e,t){return 1==l?e[t]:e.readUInt16BE(t*l)}var l=1,d=e.length,p=t.length;if(void 0!==r&&(r=(r+"").toLowerCase(),"ucs2"===r||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(2>e.length||2>t.length)return-1;l=2,d/=2,p/=2,n/=2}var c;if(o){var i=-1;for(c=n;cd&&(n=d-p),c=n;0<=c;c--){for(var u=!0,h=0;ho&&(r=o)):r=o;var s=t.length;if(0!=s%2)throw new TypeError("Invalid hex string");r>s/2&&(r=s/2);for(var l=0,i;li&&(s=i):2==d?(p=e[o+1],128==(192&p)&&(h=(31&i)<<6|63&p,127h||57343h&&(s=h))):void 0}null===s?(s=65533,d=1):65535>>10),s=56320|1023&s),r.push(s),o+=d}return M(r)}function M(e){var t=e.length;if(t<=re)return s.apply(String,e);for(var n="",r=0;rt)&&(t=0),(!n||0>n||n>r)&&(n=r);for(var o="",s=t;se)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function U(e,t,n,r,o,i){if(!p.isBuffer(e))throw new TypeError("\"buffer\" argument must be a Buffer instance");if(t>o||te.length)throw new RangeError("Index out of range")}function z(e,t,n,r){0>t&&(t=65535+t+1);for(var o=0,i=l(e.length-n,2);o>>8*(r?o:1-o)}function j(e,t,n,r){0>t&&(t=4294967295+t+1);for(var o=0,i=l(e.length-n,4);o>>8*(r?o:3-o)}function q(e,t,n,r){if(n+r>e.length)throw new RangeError("Index out of range");if(0>n)throw new RangeError("Index out of range")}function V(e,t,n,r,o){return o||q(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),te.write(e,t,n,r,23,4),n+4}function W(e,t,n,r,o){return o||q(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),te.write(e,t,n,r,52,8),n+8}function H(e){if(e=K(e).replace(oe,""),2>e.length)return"";for(;0!=e.length%4;)e+="=";return e}function K(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function G(e){return 16>e?"0"+e.toString(16):e.toString(16)}function X(e,t){t=t||Infinity;for(var n=e.length,r=null,o=[],s=0,i;si){if(!r){if(56319i){-1<(t-=3)&&o.push(239,191,189),r=i;continue}i=(r-55296<<10|i-56320)+65536}else r&&-1<(t-=3)&&o.push(239,191,189);if(r=null,128>i){if(0>(t-=1))break;o.push(i)}else if(2048>i){if(0>(t-=2))break;o.push(192|i>>6,128|63&i)}else if(65536>i){if(0>(t-=3))break;o.push(224|i>>12,128|63&i>>6,128|63&i)}else if(1114112>i){if(0>(t-=4))break;o.push(240|i>>18,128|63&i>>12,128|63&i>>6,128|63&i)}else throw new Error("Invalid code point")}return o}function Q(e){for(var t=[],n=0;n(t-=2));++r)o=e.charCodeAt(r),i=o>>8,s=o%256,n.push(s),n.push(i);return n}function J(e){return ee.toByteArray(H(e))}function $(e,t,n,r){for(var o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function Z(e){return e!==e}var ee=n("yh9p"),te=n("JgNJ"),ne=n("REa7");t.Buffer=p,t.SlowBuffer=function(e){return+e!=e&&(e=0),p.alloc(+e)},t.INSPECT_MAX_BYTES=50,p.TYPED_ARRAY_SUPPORT=void 0===e.TYPED_ARRAY_SUPPORT?function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(t){return!1}}():e.TYPED_ARRAY_SUPPORT,t.kMaxLength=i(),p.poolSize=8192,p._augment=function(e){return e.__proto__=p.prototype,e},p.from=function(e,t,n){return c(null,e,t,n)},p.TYPED_ARRAY_SUPPORT&&(p.prototype.__proto__=Uint8Array.prototype,p.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&p[Symbol.species]===p&&Object.defineProperty(p,Symbol.species,{value:null,configurable:!0})),p.alloc=function(e,t,n){return h(null,e,t,n)},p.allocUnsafe=function(e){return m(null,e)},p.allocUnsafeSlow=function(e){return m(null,e)},p.isBuffer=function(e){return!!(null!=e&&e._isBuffer)},p.compare=function(e,t){if(!p.isBuffer(e)||!p.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=l(n,r);on&&(e+=" ... ")),""},p.prototype.compare=function(e,t,n,r,o){if(!p.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),0>t||n>e.length||0>r||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,o>>>=0,this===e)return 0;for(var s=o-r,d=n-t,c=l(s,d),u=this.slice(r,o),h=e.slice(t,n),m=0;mo)&&(n=o),0n||0>t)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return T(this,e,t,n);case"utf8":case"utf-8":return _(this,e,t,n);case"ascii":return E(this,e,t,n);case"latin1":case"binary":return A(this,e,t,n);case"base64":return I(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0;}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var re=4096;p.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,0>e?(e+=n,0>e&&(e=0)):e>n&&(e=n),0>t?(t+=n,0>t&&(t=0)):t>n&&(t=n),t=s&&(o-=r(2,8*t)),o},p.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||F(e,t,this.length);for(var o=t,i=1,s=this[e+--o];0=i&&(s-=r(2,8*t)),s},p.prototype.readInt8=function(e,t){return t||F(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},p.prototype.readInt16LE=function(e,t){t||F(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},p.prototype.readInt16BE=function(e,t){t||F(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},p.prototype.readInt32LE=function(e,t){return t||F(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},p.prototype.readInt32BE=function(e,t){return t||F(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},p.prototype.readFloatLE=function(e,t){return t||F(e,4,this.length),te.read(this,e,!0,23,4)},p.prototype.readFloatBE=function(e,t){return t||F(e,4,this.length),te.read(this,e,!1,23,4)},p.prototype.readDoubleLE=function(e,t){return t||F(e,8,this.length),te.read(this,e,!0,52,8)},p.prototype.readDoubleBE=function(e,t){return t||F(e,8,this.length),te.read(this,e,!1,52,8)},p.prototype.writeUIntLE=function(e,t,n,o){if(e=+e,t|=0,n|=0,!o){var s=r(2,8*n)-1;U(this,e,t,n,s,0)}var l=1,d=0;for(this[t]=255&e;++d>>8):z(this,e,t,!0),t+2},p.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||U(this,e,t,2,65535,0),p.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):z(this,e,t,!1),t+2},p.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||U(this,e,t,4,4294967295,0),p.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):j(this,e,t,!0),t+4},p.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||U(this,e,t,4,4294967295,0),p.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):j(this,e,t,!1),t+4},p.prototype.writeIntLE=function(e,t,n,o){if(e=+e,t|=0,!o){var s=r(2,8*n-1);U(this,e,t,n,s-1,-s)}var l=0,i=1,d=0;for(this[t]=255&e;++le&&0==d&&0!==this[t+l-1]&&(d=1),this[t+l]=255&(e/i>>0)-d;return t+n},p.prototype.writeIntBE=function(e,t,n,o){if(e=+e,t|=0,!o){var s=r(2,8*n-1);U(this,e,t,n,s-1,-s)}var l=n-1,i=1,d=0;for(this[t+l]=255&e;0<=--l&&(i*=256);)0>e&&0==d&&0!==this[t+l+1]&&(d=1),this[t+l]=255&(e/i>>0)-d;return t+n},p.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||U(this,e,t,1,127,-128),p.TYPED_ARRAY_SUPPORT||(e=o(e)),0>e&&(e=255+e+1),this[t]=255&e,t+1},p.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||U(this,e,t,2,32767,-32768),p.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):z(this,e,t,!0),t+2},p.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||U(this,e,t,2,32767,-32768),p.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):z(this,e,t,!1),t+2},p.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||U(this,e,t,4,2147483647,-2147483648),p.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):j(this,e,t,!0),t+4},p.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||U(this,e,t,4,2147483647,-2147483648),0>e&&(e=4294967295+e+1),p.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):j(this,e,t,!1),t+4},p.prototype.writeFloatLE=function(e,t,n){return V(this,e,t,!0,n)},p.prototype.writeFloatBE=function(e,t,n){return V(this,e,t,!1,n)},p.prototype.writeDoubleLE=function(e,t,n){return W(this,e,t,!0,n)},p.prototype.writeDoubleBE=function(e,t,n){return W(this,e,t,!1,n)},p.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),0t)throw new RangeError("targetStart out of bounds");if(0>n||n>=this.length)throw new RangeError("sourceStart out of bounds");if(0>r)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-to||!p.TYPED_ARRAY_SUPPORT)for(s=0;so&&(e=o)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!p.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(0>t||this.length>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var s;if("number"==typeof e)for(s=t;sn?"0":"")+n.toString(16).toUpperCase();return t},t.delay=function(e,t,n){m(function(){e.apply(n||null,t||[])})},t.inherits=function(e,t){var n=function(){};n.prototype=t.prototype,e.prototype=new n},t.extend=function(){var e={},t,n;for(t=0;te.length)return e;e=e.slice();var t=e.length,n=/,$/,r=0;r=3=t?o(0,1):6=t?o(0,2):o(1,4);for(var s=0,i;sr)throw new gt(mt.INVALID_ARGUMENT,"Function "+e+"() requires between "+n+" and "+(r+" arguments, but was called with ")+U(t.length,"argument")+".")}function S(e,t,n,r){if(!(t instanceof Array)||t.lengthn.indexOf(t))throw new gt(mt.INVALID_ARGUMENT,"Unknown option '"+t+"' passed to function "+e+"(). Available options: "+n.join(", "))})}function B(e,t,n,r){var o=M(r);return new gt(mt.INVALID_ARGUMENT,"Function "+e+"() requires its "+F(n)+" "+("argument to be a "+t+", but it was: "+o))}function F(e){return 1===e?"first":2===e?"second":3===e?"third":e+"th"}function U(e,t){return e+" "+t+(1===e?"":"s")}function z(e,t){return et?1:0}function j(e,t){return null!==e&&void 0!==e?!!(t&&e.isEqual(t)):e===t}function q(e,t){if(e.length!==t.length)return!1;for(var n=0;nt?1:e===t?0:isNaN(e)?isNaN(t)?0:-1:1}function X(e,t){return e===t?0!==e||1/e==1/t:e!==e&&t!==t}function Q(e){return null===e||void 0===e}function Y(e){return nn(e)&&e<=tn&&e>=en}function J(e,t,n){if(n.isEqual(zt.INSTANCE)){if(t!==on.EQUAL)throw new gt(mt.INVALID_ARGUMENT,"Invalid query. You can only perform equals comparisons on null.");return new sn(e)}if(n.isEqual(Wt.NAN)){if(t!==on.EQUAL)throw new gt(mt.INVALID_ARGUMENT,"Invalid query. You can only perform equals comparisons on NaN.");return new ln(e)}return new an(e,t,n)}function $(e){return e===mt.OK?d("Treated status OK as error"):e===mt.CANCELLED||e===mt.UNKNOWN||e===mt.DEADLINE_EXCEEDED||e===mt.RESOURCE_EXHAUSTED||e===mt.INTERNAL||e===mt.UNAVAILABLE||e===mt.UNAUTHENTICATED?!1:e===mt.INVALID_ARGUMENT||e===mt.NOT_FOUND||e===mt.ALREADY_EXISTS||e===mt.PERMISSION_DENIED||e===mt.FAILED_PRECONDITION||e===mt.ABORTED||e===mt.OUT_OF_RANGE||e===mt.UNIMPLEMENTED||e===mt.DATA_LOSS||d("Unknown status code: "+e)}function Z(e){var t=An[e];return void 0===t?void 0:ee(t)}function ee(e){return void 0===e?(s("GRPC error has no .code"),mt.UNKNOWN):e===An.OK?mt.OK:e===An.CANCELLED?mt.CANCELLED:e===An.UNKNOWN?mt.UNKNOWN:e===An.DEADLINE_EXCEEDED?mt.DEADLINE_EXCEEDED:e===An.RESOURCE_EXHAUSTED?mt.RESOURCE_EXHAUSTED:e===An.INTERNAL?mt.INTERNAL:e===An.UNAVAILABLE?mt.UNAVAILABLE:e===An.UNAUTHENTICATED?mt.UNAUTHENTICATED:e===An.INVALID_ARGUMENT?mt.INVALID_ARGUMENT:e===An.NOT_FOUND?mt.NOT_FOUND:e===An.ALREADY_EXISTS?mt.ALREADY_EXISTS:e===An.PERMISSION_DENIED?mt.PERMISSION_DENIED:e===An.FAILED_PRECONDITION?mt.FAILED_PRECONDITION:e===An.ABORTED?mt.ABORTED:e===An.OUT_OF_RANGE?mt.OUT_OF_RANGE:e===An.UNIMPLEMENTED?mt.UNIMPLEMENTED:e===An.DATA_LOSS?mt.DATA_LOSS:d("Unknown status code: "+e)}function te(e){return void 0===e?An.OK:e===mt.OK?An.OK:e===mt.CANCELLED?An.CANCELLED:e===mt.UNKNOWN?An.UNKNOWN:e===mt.DEADLINE_EXCEEDED?An.DEADLINE_EXCEEDED:e===mt.RESOURCE_EXHAUSTED?An.RESOURCE_EXHAUSTED:e===mt.INTERNAL?An.INTERNAL:e===mt.UNAVAILABLE?An.UNAVAILABLE:e===mt.UNAUTHENTICATED?An.UNAUTHENTICATED:e===mt.INVALID_ARGUMENT?An.INVALID_ARGUMENT:e===mt.NOT_FOUND?An.NOT_FOUND:e===mt.ALREADY_EXISTS?An.ALREADY_EXISTS:e===mt.PERMISSION_DENIED?An.PERMISSION_DENIED:e===mt.FAILED_PRECONDITION?An.FAILED_PRECONDITION:e===mt.ABORTED?An.ABORTED:e===mt.OUT_OF_RANGE?An.OUT_OF_RANGE:e===mt.UNIMPLEMENTED?An.UNIMPLEMENTED:e===mt.DATA_LOSS?An.DATA_LOSS:d("Unknown status code: "+e)}function ne(e){return 200===e?mt.OK:400===e?mt.INVALID_ARGUMENT:401===e?mt.UNAUTHENTICATED:403===e?mt.PERMISSION_DENIED:404===e?mt.NOT_FOUND:409===e?mt.ABORTED:416===e?mt.OUT_OF_RANGE:429===e?mt.RESOURCE_EXHAUSTED:499===e?mt.CANCELLED:500===e?mt.UNKNOWN:501===e?mt.UNIMPLEMENTED:503===e?mt.UNAVAILABLE:504===e?mt.DEADLINE_EXCEEDED:200<=e&&300>e?mt.OK:400<=e&&500>e?mt.FAILED_PRECONDITION:500<=e&&600>e?mt.INTERNAL:mt.UNKNOWN}function re(){return Nn}function oe(){return Ln}function ae(){return On}function ie(){return Mn}function se(e,t){0i||i>t-2)&&d("Invalid encoded resource path: \""+e+"\"");var s=e.charAt(i+1);switch(s){case Ur:var l=e.substring(o,i),p=void 0;0===r.length?p=l:(r+=l,p=r,r=""),n.push(p);break;case zr:r+=e.substring(o,i),r+="\0";break;case jr:r+=e.substring(o,i+1);break;default:d("Invalid encoded resource path: \""+e+"\"");}o=i+2}return new _t(n)}function be(e,t,n,r){c(n=r,"Unexpected schema upgrade from v${fromVersion} to v{toVersion}."),1>n&&1<=r&&(xe(e),ve(e),Se(e),ke(e));var o=kr.resolve();return 2>n&&2<=r&&(o=Ce(t).next(function(e){return we(t,e)})),o}function xe(e){e.createObjectStore(Wr.store)}function ve(e){e.createObjectStore(Hr.store,{keyPath:Hr.keyPath}),e.createObjectStore(Kr.store,{keyPath:Kr.keyPath}),e.createObjectStore(Gr.store)}function ke(e){e.createObjectStore(Qr.store)}function Se(e){var t=e.createObjectStore(Jr.store,{keyPath:Jr.keyPath});t.createIndex(Jr.documentTargetsIndex,Jr.documentTargetsKeyPath,{unique:!0});var n=e.createObjectStore(Yr.store,{keyPath:Yr.keyPath});n.createIndex(Yr.queryTargetsIndexName,Yr.queryTargetsKeyPath,{unique:!0}),e.createObjectStore($r.store)}function we(e,t){var n=e.store($r.store),r=e.store(Yr.store);return r.count().next(function(e){return t.targetCount=e,n.put($r.key,t)})}function Ce(e){var t=e.store($r.store);return t.get($r.key).next(function(e){return null==e?(e=new $r(0,0,mn.MIN.toTimestamp(),0),t.put($r.key,e).next(function(){return e})):kr.resolve(e)})}function Te(e){return new kr(function(t,n){e.onsuccess=function(e){var n=e.target.result;t(n)},e.onerror=function(e){n(e.target.error)}})}function _e(e){return e instanceof Uint8Array?(c("YES"===process.env.USE_MOCK_PERSISTENCE,"Persisting non-string stream tokens is only supported with mock persistence ."),e.toString()):e}function Ee(e){return Ne(e,Kr.store)}function Ae(e){return Ne(e,Gr.store)}function Ie(e){return Ne(e,Hr.store)}function Ne(e,t){return e instanceof oo?e.store(t):d("Invalid transaction object provided!")}function Le(e){return De(e,Yr.store)}function Oe(e){return De(e,$r.store)}function Me(e){return De(e,Jr.store)}function De(e,t){return e instanceof oo?e.store(t):d("Invalid transaction object provided!")}function Re(e){return e instanceof oo?e.store(Qr.store):d("Invalid transaction object provided!")}function Pe(e){return e.path.toArray()}function Be(e){return void 0!==e.documents}function Fe(e){if(!e)return new qo;switch(e.type){case"gapi":return new Ho(e.client,e.sessionIndex||"0");case"provider":return e.client;default:throw new gt(mt.INVALID_ARGUMENT,"makeCredentialsProvider failed due to invalid credential type");}}function Ue(e){return ze(e,["next","error","complete"])}function ze(e,t){if("object"!=typeof e||null===e)return!1;for(var n=e,r=0,o=t,i;rn.query.docComparator(o,t.doc),"Got added events in wrong order"),o=t.doc,{type:"added",doc:i,oldIndex:-1,newIndex:r++}})}var i=n.oldDocs;return n.docChanges.filter(function(e){return t||e.type!==ur.Metadata}).map(function(t){var r=new ma(e,t.doc.key,t.doc,n.fromCache),o=-1,s=-1;return t.type!==ur.Added&&(o=i.indexOf(t.doc.key),c(0<=o,"Index for document not found"),i=i.delete(t.doc.key)),t.type!==ur.Removed&&(i=i.add(t.doc),s=i.indexOf(t.doc.key)),{type:$e(t.type),doc:r,oldIndex:o,newIndex:s}})}function $e(e){return e===ur.Added?"added":e===ur.Modified||e===ur.Metadata?"modified":e===ur.Removed?"removed":d("Unknown change type: "+e)}function Ze(e){e.INTERNAL.registerService("firestore",function(e){return new la(e)},b(Aa))}function et(e){Ze(e)}var tt=Number.POSITIVE_INFINITY,nt=Math.floor,rt=String.fromCharCode,ot=Math.min,at=Math.max;Object.defineProperty(t,"__esModule",{value:!0});var it=function(e){return e&&"object"==typeof e&&"default"in e?e["default"]:e}(n("dP58")),st=n("TUpU"),lt=n("vCxL"),dt=n("IIoC"),pt=it.SDK_VERSION,ct=new st.Logger("@firebase/firestore"),ut;(function(e){e[e.DEBUG=0]="DEBUG",e[e.ERROR=1]="ERROR",e[e.SILENT=2]="SILENT"})(ut||(ut={}));var ht=function(){function e(){}return e.setPlatform=function(t){e.platform&&d("Platform already defined"),e.platform=t},e.getPlatform=function(){return e.platform||d("Platform not set"),e.platform},e}(),mt={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"},gt=function(e){function t(t,n){var r=e.call(this,n)||this;return r.code=t,r.message=n,r.name="FirebaseError",r.toString=function(){return r.name+": [code="+r.code+"]: "+r.message},r}return lt.__extends(t,e),t}(Error),ft=function(){function e(){}return e.newId=function(){for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t="",n=0;20>n;n++)t+=e.charAt(nt(Math.random()*e.length));return c(20===t.length,"Invalid auto ID: "+t),t},e}(),yt=function(){function e(e){K(),this._binaryString=e}return e.fromBase64String=function(t){x("Blob.fromBase64String",arguments,1),w("Blob.fromBase64String","string",1,t),K();try{var n=ht.getPlatform().atob(t);return new e(n)}catch(t){throw new gt(mt.INVALID_ARGUMENT,"Failed to construct Blob from Base64 string: "+t)}},e.fromUint8Array=function(t){if(x("Blob.fromUint8Array",arguments,1),H(),!(t instanceof Uint8Array))throw B("Blob.fromUint8Array","Uint8Array",1,t);var n=Array.prototype.map.call(t,function(e){return rt(e)}).join("");return new e(n)},e.prototype.toBase64=function(){return x("Blob.toBase64",arguments,0),K(),ht.getPlatform().btoa(this._binaryString)},e.prototype.toUint8Array=function(){x("Blob.toUint8Array",arguments,0),H();for(var e=new Uint8Array(this._binaryString.length),t=0;te||90t||180t)throw new gt(mt.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(1e9<=t)throw new gt(mt.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(-62135596800>e)throw new gt(mt.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e);if(253402300800<=e)throw new gt(mt.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}return e.now=function(){return e.fromMillis(Date.now())},e.fromDate=function(t){return e.fromMillis(t.getTime())},e.fromMillis=function(t){var n=nt(t/1e3);return new e(n,1e6*(t-1e3*n))},e.prototype.toDate=function(){return new Date(this.toMillis())},e.prototype.toMillis=function(){return 1e3*this.seconds+this.nanoseconds/1e6},e.prototype._compareTo=function(e){return this.seconds===e.seconds?z(this.nanoseconds,e.nanoseconds):z(this.seconds,e.seconds)},e.prototype.isEqual=function(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds},e.prototype.toString=function(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"},e}(),kt=function(){return function(e,t,n,r){this.databaseId=e,this.persistenceKey=t,this.host=n,this.ssl=r}}(),St="(default)",wt=function(){function e(e,t){this.projectId=e,this.database=t?t:St}return Object.defineProperty(e.prototype,"isDefaultDatabase",{get:function(){return this.database===St},enumerable:!0,configurable:!0}),e.prototype.isEqual=function(t){return t instanceof e&&t.projectId===this.projectId&&t.database===this.database},e.prototype.compareTo=function(e){return z(this.projectId,e.projectId)||z(this.database,e.database)},e}(),Ct="__name__",Tt=function(){function e(e,t,n){this.init(e,t,n)}return e.prototype.init=function(e,t,n){void 0===t?t=0:t>e.length&&d("offset "+t+" out of range "+e.length),void 0===n?n=e.length-t:n>e.length-t&&d("length "+n+" out of range "+(e.length-t)),this.segments=e,this.offset=t,this.len=n},e.prototype.construct=function(e,t,n){var r=Object.create(Object.getPrototypeOf(this));return r.init(e,t,n),r},Object.defineProperty(e.prototype,"length",{get:function(){return this.len},enumerable:!0,configurable:!0}),e.prototype.isEqual=function(t){return 0===e.comparator(this,t)},e.prototype.child=function(t){var n=this.segments.slice(this.offset,this.limit());return t instanceof e?t.forEach(function(e){n.push(e)}):"string"==typeof t?n.push(t):d("Unknown parameter type for Path.child(): "+t),this.construct(n)},e.prototype.limit=function(){return this.offset+this.length},e.prototype.popFirst=function(e){return e=void 0===e?1:e,c(this.length>=e,"Can't call popFirst() with less segments"),this.construct(this.segments,this.offset+e,this.length-e)},e.prototype.popLast=function(){return c(!this.isEmpty(),"Can't call popLast() on empty path"),this.construct(this.segments,this.offset,this.length-1)},e.prototype.firstSegment=function(){return c(!this.isEmpty(),"Can't call firstSegment() on empty path"),this.segments[this.offset]},e.prototype.lastSegment=function(){return c(!this.isEmpty(),"Can't call lastSegment() on empty path"),this.segments[this.limit()-1]},e.prototype.get=function(e){return c(ei)return 1}return e.lengtht.length?1:0},e}(),_t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return lt.__extends(t,e),t.prototype.canonicalString=function(){return this.toArray().join("/")},t.prototype.toString=function(){return this.canonicalString()},t.fromString=function(e){if(0<=e.indexOf("//"))throw new gt(mt.INVALID_ARGUMENT,"Invalid path ("+e+"). Paths must not contain // in them.");var n=e.split("/").filter(function(e){return 0n?t=t.left:0r?n=n.left:(t+=n.left.size+1,n=n.right)}return-1},e.prototype.isEmpty=function(){return this.root.isEmpty()},Object.defineProperty(e.prototype,"size",{get:function(){return this.root.size},enumerable:!0,configurable:!0}),e.prototype.minKey=function(){return this.root.minKey()},e.prototype.maxKey=function(){return this.root.maxKey()},e.prototype.inorderTraversal=function(e){return this.root.inorderTraversal(e)},e.prototype.forEach=function(e){this.inorderTraversal(function(t,n){return e(t,n),!1})},e.prototype.reverseTraversal=function(e){return this.root.reverseTraversal(e)},e.prototype.getIterator=function(){return new Mt(this.root,null,this.comparator,!1)},e.prototype.getIteratorFrom=function(e){return new Mt(this.root,e,this.comparator,!1)},e.prototype.getReverseIterator=function(){return new Mt(this.root,null,this.comparator,!0)},e.prototype.getReverseIteratorFrom=function(e){return new Mt(this.root,e,this.comparator,!0)},e}(),Mt=function(){function e(e,t,n,r){this.isReverse=r,this.nodeStack=[];for(var o=1;!e.isEmpty();)if(o=t?n(e.key,t):1,r&&(o*=-1),0>o)e=this.isReverse?e.left:e.right;else if(0===o){this.nodeStack.push(e);break}else this.nodeStack.push(e),e=this.isReverse?e.right:e.left}return e.prototype.getNext=function(){c(0n?o.copy(null,null,null,o.left.insert(e,t,r),null):0===n?o.copy(null,t,null,null,null):o.copy(null,null,null,null,o.right.insert(e,t,r)),o.fixUp()},e.prototype.removeMin=function(){if(this.left.isEmpty())return e.EMPTY;var t=this;return t.left.isRed()||t.left.left.isRed()||(t=t.moveRedLeft()),t=t.copy(null,null,null,t.left.removeMin(),null),t.fixUp()},e.prototype.remove=function(t,r){var o=this,n;if(0>r(t,o.key))o.left.isEmpty()||o.left.isRed()||o.left.left.isRed()||(o=o.moveRedLeft()),o=o.copy(null,null,null,o.left.remove(t,r),null);else{if(o.left.isRed()&&(o=o.rotateRight()),o.right.isEmpty()||o.right.isRed()||o.right.left.isRed()||(o=o.moveRedRight()),0===r(t,o.key)){if(o.right.isEmpty())return e.EMPTY;n=o.right.min(),o=o.copy(n.key,n.value,null,null,o.right.removeMin())}o=o.copy(null,null,null,null,o.right.remove(t,r))}return o.fixUp()},e.prototype.isRed=function(){return this.color},e.prototype.fixUp=function(){var e=this;return e.right.isRed()&&!e.left.isRed()&&(e=e.rotateLeft()),e.left.isRed()&&e.left.left.isRed()&&(e=e.rotateRight()),e.left.isRed()&&e.right.isRed()&&(e=e.colorFlip()),e},e.prototype.moveRedLeft=function(){var e=this.colorFlip();return e.right.left.isRed()&&(e=e.copy(null,null,null,null,e.right.rotateRight()),e=e.rotateLeft(),e=e.colorFlip()),e},e.prototype.moveRedRight=function(){var e=this.colorFlip();return e.left.left.isRed()&&(e=e.rotateRight(),e=e.colorFlip()),e},e.prototype.rotateLeft=function(){var t=this.copy(null,null,e.RED,null,this.right.left);return this.right.copy(null,null,this.color,t,null)},e.prototype.rotateRight=function(){var t=this.copy(null,null,e.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,t)},e.prototype.colorFlip=function(){var e=this.left.copy(null,null,!this.left.color,null,null),t=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,t)},e.prototype.checkMaxDepth=function(){var e=this.check();return!!(Math.pow(2,e)<=this.size+1)},e.prototype.check=function(){if(this.isRed()&&this.left.isRed())throw d("Red node has red child("+this.key+","+this.value+")");if(this.right.isRed())throw d("Right child of ("+this.key+","+this.value+") is red");var e=this.left.check();if(e!==this.right.check())throw d("Black depths differ");else return e+(this.isRed()?0:1)},e.EMPTY=null,e.RED=!0,e.BLACK=!1,e}(),Rt=function(){function e(){this.size=0}return e.prototype.copy=function(){return this},e.prototype.insert=function(e,t){return new Dt(e,t)},e.prototype.remove=function(){return this},e.prototype.isEmpty=function(){return!0},e.prototype.inorderTraversal=function(){return!1},e.prototype.reverseTraversal=function(){return!1},e.prototype.minKey=function(){return null},e.prototype.maxKey=function(){return null},e.prototype.isRed=function(){return!1},e.prototype.checkMaxDepth=function(){return!0},e.prototype.check=function(){return 0},e}();Dt.EMPTY=new Rt;var Pt;(function(e){e[e.NullValue=0]="NullValue",e[e.BooleanValue=1]="BooleanValue",e[e.NumberValue=2]="NumberValue",e[e.TimestampValue=3]="TimestampValue",e[e.StringValue=4]="StringValue",e[e.BlobValue=5]="BlobValue",e[e.RefValue=6]="RefValue",e[e.GeoPointValue=7]="GeoPointValue",e[e.ArrayValue=8]="ArrayValue",e[e.ObjectValue=9]="ObjectValue"})(Pt||(Pt={}));var Bt;(function(e){e[e.Default=0]="Default",e[e.Estimate=1]="Estimate",e[e.Previous=2]="Previous"})(Bt||(Bt={}));var Ft=function(){function e(e,t){this.serverTimestampBehavior=e,this.timestampsInSnapshots=t}return e.fromSnapshotOptions=function(t,n){switch(t.serverTimestamps){case"estimate":return new e(Bt.Estimate,n);case"previous":return new e(Bt.Previous,n);case"none":case void 0:return new e(Bt.Default,n);default:return d("fromSnapshotOptions() called with invalid options.");}},e}(),Ut=function(){function e(){}return e.prototype.toString=function(){var e=this.value();return null===e?"null":e.toString()},e.prototype.defaultCompareTo=function(e){c(this.typeOrder!==e.typeOrder,"Default compareTo should not be used for values of same type.");var t=z(this.typeOrder,e.typeOrder);return t},e}(),zt=function(e){function t(){var t=e.call(this)||this;return t.typeOrder=Pt.NullValue,t.internalValue=null,t}return lt.__extends(t,e),t.prototype.value=function(){return null},t.prototype.isEqual=function(e){return e instanceof t},t.prototype.compareTo=function(e){return e instanceof t?0:this.defaultCompareTo(e)},t.INSTANCE=new t,t}(Ut),jt=function(e){function t(t){var n=e.call(this)||this;return n.internalValue=t,n.typeOrder=Pt.BooleanValue,n}return lt.__extends(t,e),t.prototype.value=function(){return this.internalValue},t.prototype.isEqual=function(e){return e instanceof t&&this.internalValue===e.internalValue},t.prototype.compareTo=function(e){return e instanceof t?z(this,e):this.defaultCompareTo(e)},t.of=function(e){return e?t.TRUE:t.FALSE},t.TRUE=new t(!0),t.FALSE=new t(!1),t}(Ut),qt=function(e){function t(t){var n=e.call(this)||this;return n.internalValue=t,n.typeOrder=Pt.NumberValue,n}return lt.__extends(t,e),t.prototype.value=function(){return this.internalValue},t.prototype.compareTo=function(e){return e instanceof t?G(this.internalValue,e.internalValue):this.defaultCompareTo(e)},t}(Ut),Vt=function(e){function t(t){return e.call(this,t)||this}return lt.__extends(t,e),t.prototype.isEqual=function(e){return!!(e instanceof t)&&X(this.internalValue,e.internalValue)},t}(qt),Wt=function(e){function t(t){var n=e.call(this,t)||this;return n.internalValue=t,n}return lt.__extends(t,e),t.prototype.isEqual=function(e){return!!(e instanceof t)&&X(this.internalValue,e.internalValue)},t.NAN=new t(NaN),t.POSITIVE_INFINITY=new t(Infinity),t.NEGATIVE_INFINITY=new t(-Infinity),t}(qt),Ht=function(e){function t(t){var n=e.call(this)||this;return n.internalValue=t,n.typeOrder=Pt.StringValue,n}return lt.__extends(t,e),t.prototype.value=function(){return this.internalValue},t.prototype.isEqual=function(e){return e instanceof t&&this.internalValue===e.internalValue},t.prototype.compareTo=function(e){return e instanceof t?z(this.internalValue,e.internalValue):this.defaultCompareTo(e)},t}(Ut),Kt=function(e){function t(t){var n=e.call(this)||this;return n.internalValue=t,n.typeOrder=Pt.TimestampValue,n}return lt.__extends(t,e),t.prototype.value=function(e){return e&&e.timestampsInSnapshots?this.internalValue:this.internalValue.toDate()},t.prototype.isEqual=function(e){return e instanceof t&&this.internalValue.isEqual(e.internalValue)},t.prototype.compareTo=function(e){return e instanceof t?this.internalValue._compareTo(e.internalValue):e instanceof Gt?-1:this.defaultCompareTo(e)},t}(Ut),Gt=function(e){function t(t,n){var r=e.call(this)||this;return r.localWriteTime=t,r.previousValue=n,r.typeOrder=Pt.TimestampValue,r}return lt.__extends(t,e),t.prototype.value=function(e){return e&&e.serverTimestampBehavior===Bt.Estimate?new Kt(this.localWriteTime).value(e):e&&e.serverTimestampBehavior===Bt.Previous?this.previousValue?this.previousValue.value(e):null:null},t.prototype.isEqual=function(e){return e instanceof t&&this.localWriteTime.isEqual(e.localWriteTime)},t.prototype.compareTo=function(e){return e instanceof t?this.localWriteTime._compareTo(e.localWriteTime):e instanceof Kt?1:this.defaultCompareTo(e)},t.prototype.toString=function(){return""},t}(Ut),Xt=function(e){function t(t){var n=e.call(this)||this;return n.internalValue=t,n.typeOrder=Pt.BlobValue,n}return lt.__extends(t,e),t.prototype.value=function(){return this.internalValue},t.prototype.isEqual=function(e){return e instanceof t&&this.internalValue.isEqual(e.internalValue)},t.prototype.compareTo=function(e){return e instanceof t?this.internalValue._compareTo(e.internalValue):this.defaultCompareTo(e)},t}(Ut),Qt=function(e){function t(t,n){var r=e.call(this)||this;return r.databaseId=t,r.key=n,r.typeOrder=Pt.RefValue,r}return lt.__extends(t,e),t.prototype.value=function(){return this.key},t.prototype.isEqual=function(e){return!!(e instanceof t)&&this.key.isEqual(e.key)&&this.databaseId.isEqual(e.databaseId)},t.prototype.compareTo=function(e){if(e instanceof t){var n=this.databaseId.compareTo(e.databaseId);return 0===n?It.comparator(this.key,e.key):n}return this.defaultCompareTo(e)},t}(Ut),Yt=function(e){function t(t){var n=e.call(this)||this;return n.internalValue=t,n.typeOrder=Pt.GeoPointValue,n}return lt.__extends(t,e),t.prototype.value=function(){return this.internalValue},t.prototype.isEqual=function(e){return e instanceof t&&this.internalValue.isEqual(e.internalValue)},t.prototype.compareTo=function(e){return e instanceof t?this.internalValue._compareTo(e.internalValue):this.defaultCompareTo(e)},t}(Ut),Jt=function(e){function t(t){var n=e.call(this)||this;return n.internalValue=t,n.typeOrder=Pt.ObjectValue,n}return lt.__extends(t,e),t.prototype.value=function(e){var t={};return this.internalValue.inorderTraversal(function(n,r){t[n]=r.value(e)}),t},t.prototype.forEach=function(e){this.internalValue.inorderTraversal(e)},t.prototype.isEqual=function(e){if(e instanceof t){for(var n=this.internalValue.getIterator(),r=e.internalValue.getIterator();n.hasNext()&&r.hasNext();){var o=n.getNext(),i=r.getNext();if(o.key!==i.key||!o.value.isEqual(i.value))return!1}return!n.hasNext()&&!r.hasNext()}return!1},t.prototype.compareTo=function(e){if(e instanceof t){for(var n=this.internalValue.getIterator(),r=e.internalValue.getIterator();n.hasNext()&&r.hasNext();){var o=n.getNext(),i=r.getNext(),s=z(o.key,i.key)||o.value.compareTo(i.value);if(s)return s}return z(n.hasNext(),r.hasNext())}return this.defaultCompareTo(e)},t.prototype.set=function(e,n){if(c(!e.isEmpty(),"Cannot set field for empty path on ObjectValue"),1===e.length)return this.setChild(e.firstSegment(),n);var r=this.child(e.firstSegment());r instanceof t||(r=t.EMPTY);var o=r.set(e.popFirst(),n);return this.setChild(e.firstSegment(),o)},t.prototype.delete=function(e){if(c(!e.isEmpty(),"Cannot delete field for empty path on ObjectValue"),1===e.length)return new t(this.internalValue.remove(e.firstSegment()));var n=this.child(e.firstSegment());if(n instanceof t){var r=n.delete(e.popFirst());return new t(this.internalValue.insert(e.firstSegment(),r))}return this},t.prototype.contains=function(e){return void 0!==this.field(e)},t.prototype.field=function(e){c(!e.isEmpty(),"Can't get field of empty path");var n=this;return e.forEach(function(e){n=n instanceof t?n.internalValue.get(e)||void 0:void 0}),n},t.prototype.toString=function(){return JSON.stringify(this.value())},t.prototype.child=function(e){return this.internalValue.get(e)||void 0},t.prototype.setChild=function(e,n){return new t(this.internalValue.insert(e,n))},t.EMPTY=new t(new Ot(z)),t}(Ut),$t=function(e){function t(t){var n=e.call(this)||this;return n.internalValue=t,n.typeOrder=Pt.ArrayValue,n}return lt.__extends(t,e),t.prototype.value=function(e){return this.internalValue.map(function(t){return t.value(e)})},t.prototype.forEach=function(e){this.internalValue.forEach(e)},t.prototype.isEqual=function(e){if(e instanceof t){if(this.internalValue.length!==e.internalValue.length)return!1;for(var n=0;n="===t?e.GREATER_THAN_OR_EQUAL:">"===t?e.GREATER_THAN:"array-contains"===t?e.ARRAY_CONTAINS:d("Unknown relation: "+t)},e.prototype.toString=function(){return this.name},e.prototype.isEqual=function(e){return this.name===e.name},e.LESS_THAN=new e("<"),e.LESS_THAN_OR_EQUAL=new e("<="),e.EQUAL=new e("=="),e.GREATER_THAN=new e(">"),e.GREATER_THAN_OR_EQUAL=new e(">="),e.ARRAY_CONTAINS=new e("array-contains"),e}(),an=function(){function e(e,t,n){this.field=e,this.op=t,this.value=n}return e.prototype.matches=function(e){if(this.field.isKeyField()){c(this.value instanceof Qt,"Comparing on key, but filter value not a RefValue"),c(this.op!==on.ARRAY_CONTAINS,"array-contains queries don't make sense on document keys.");var t=this.value,n=It.comparator(e.key,t.key);return this.matchesComparison(n)}var r=e.field(this.field);return void 0!==r&&this.matchesValue(r)},e.prototype.matchesValue=function(e){var t=this;return this.op===on.ARRAY_CONTAINS?e instanceof $t&&void 0!==e.internalValue.find(function(e){return e.isEqual(t.value)}):this.value.typeOrder===e.typeOrder&&this.matchesComparison(e.compareTo(this.value))},e.prototype.matchesComparison=function(e){switch(this.op){case on.LESS_THAN:return 0>e;case on.LESS_THAN_OR_EQUAL:return 0>=e;case on.EQUAL:return 0===e;case on.GREATER_THAN:return 0=n:0>n},e.prototype.isEqual=function(e){if(null===e)return!1;if(this.before!==e.before||this.position.length!==e.position.length)return!1;for(var t=0;t":r.toString()}),o=this.serviceName+": "+o+" ("+r+").";var i=new er(r,o);for(var s in t)t.hasOwnProperty(s)&&"_"!==s.slice(-1)&&(i[s]=t[s]);return i},e}(),nr=function(){return function(){this.blockSize=-1}}(),rr=function(e){function t(){var t=e.call(this)||this;t.chain_=[],t.buf_=[],t.W_=[],t.pad_=[],t.inbuf_=0,t.total_=0,t.blockSize=64,t.pad_[0]=128;for(var n=1;ns;s++)o[s]=n.charCodeAt(r)<<24|n.charCodeAt(r+1)<<16|n.charCodeAt(r+2)<<8|n.charCodeAt(r+3),r+=4;else for(var s=0;16>s;s++)o[s]=n[r]<<24|n[r+1]<<16|n[r+2]<<8|n[r+3],r+=4;for(var s=16,i;80>s;s++)i=o[s-3]^o[s-8]^o[s-14]^o[s-16],o[s]=4294967295&(i<<1|i>>>31);for(var t=this.chain_[0],l=this.chain_[1],p=this.chain_[2],c=this.chain_[3],d=this.chain_[4],s=0,e,u;80>s;s++){40>s?20>s?(e=c^l&(p^c),u=1518500249):(e=l^p^c,u=1859775393):60>s?(e=l&p|c&(l|p),u=2400959708):(e=l^p^c,u=3395469782);var i=4294967295&(t<<5|t>>>27)+e+d+u+o[s];d=c,c=p,p=4294967295&(l<<30|l>>>2),l=t,t=i}this.chain_[0]=4294967295&this.chain_[0]+t,this.chain_[1]=4294967295&this.chain_[1]+l,this.chain_[2]=4294967295&this.chain_[2]+p,this.chain_[3]=4294967295&this.chain_[3]+c,this.chain_[4]=4294967295&this.chain_[4]+d},t.prototype.update=function(e,t){if(null!=e){void 0===t&&(t=e.length);for(var r=t-this.blockSize,o=0,n=this.buf_,i=this.inbuf_;othis.inbuf_?this.update(this.pad_,56-this.inbuf_):this.update(this.pad_,this.blockSize-(this.inbuf_-56));for(var r=this.blockSize-1;56<=r;r--)this.buf_[r]=255&t,t/=256;this.compress_(this.buf_);for(var o=0,r=0;5>r;r++)for(var n=24;0<=n;n-=8)e[o]=255&this.chain_[r]>>n,++o;return e},t}(nr),or=function(){function e(e){this.sendFn=e.sendFn,this.closeFn=e.closeFn}return e.prototype.onOpen=function(e){c(!this.wrappedOnOpen,"Called onOpen on stream twice!"),this.wrappedOnOpen=e},e.prototype.onClose=function(e){c(!this.wrappedOnClose,"Called onClose on stream twice!"),this.wrappedOnClose=e},e.prototype.onMessage=function(e){c(!this.wrappedOnMessage,"Called onMessage on stream twice!"),this.wrappedOnMessage=e},e.prototype.close=function(){this.closeFn()},e.prototype.send=function(e){this.sendFn(e)},e.prototype.callOnOpen=function(){c(void 0!==this.wrappedOnOpen,"Cannot call onOpen because no callback was set"),this.wrappedOnOpen()},e.prototype.callOnClose=function(e){c(void 0!==this.wrappedOnClose,"Cannot call onClose because no callback was set"),this.wrappedOnClose(e)},e.prototype.callOnMessage=function(e){c(void 0!==this.wrappedOnMessage,"Cannot call onMessage because no callback was set"),this.wrappedOnMessage(e)},e}(),ar="Connection",ir={BatchGetDocuments:"batchGet",Commit:"commit"},sr=function(){function e(e){this.databaseId=e.databaseId,this.pool=new dt.XhrIoPool;var t=e.ssl?"https":"http";this.baseUrl=t+"://"+e.host}return e.prototype.modifyHeadersForRequest=function(e,t){if(t)for(var n in t.authHeaders)t.authHeaders.hasOwnProperty(n)&&(e[n]=t.authHeaders[n]);e["X-Goog-Api-Client"]="gl-js/ fire/"+pt},e.prototype.invokeRPC=function(e,t,n){var r=this,o=this.makeUrl(e);return new Promise(function(s,l){r.pool.getObject(function(p){p.listenOnce(dt.EventType.COMPLETE,function(){try{switch(p.getLastErrorCode()){case dt.ErrorCode.NO_ERROR:var t=p.getResponseJson();i(ar,"XHR received:",JSON.stringify(t)),s(t);break;case dt.ErrorCode.TIMEOUT:i(ar,"RPC \""+e+"\" timed out"),l(new gt(mt.DEADLINE_EXCEEDED,"Request time out"));break;case dt.ErrorCode.HTTP_ERROR:var n=p.getStatus();i(ar,"RPC \""+e+"\" failed with status:",n,"response text:",p.getResponseText()),0>_r<<_r,r=t-n;this.previousId=r>=e?n|this.generatorId:(n|this.generatorId)-(1<<_r)}return e.prototype.next=function(){return this.previousId+=1<<_r,this.previousId},e.forLocalStore=function(t){return void 0===t&&(t=0),new e(Er.LocalStore,t)},e.forSyncEngine=function(){return new e(Er.SyncEngine)},e}(),Ir=function(){return function(e){this.key=e}}(),Nr=function(){return function(e){this.key=e}}(),Lr=function(){function e(e,t){this.query=e,this._syncedDocuments=t,this.syncState=null,this.current=!1,this.limboDocuments=ie(),this.mutatedKeys=ie(),this.documentSet=new fr(e.docComparator.bind(e))}return Object.defineProperty(e.prototype,"syncedDocuments",{get:function(){return this._syncedDocuments},enumerable:!0,configurable:!0}),e.prototype.computeDocChanges=function(e,t){var n=this,r=t?t.changeSet:new mr,o=t?t.documentSet:this.documentSet,i=t?t.mutatedKeys:this.mutatedKeys,s=o,l=!1,d=this.query.hasLimit()&&o.size===this.query.limit?o.last():null;if(e.inorderTraversal(function(e,t){var p=o.get(e),u=t instanceof Nt?t:null;if(u&&(c(e.isEqual(u.key),"Mismatching keys found in document changes: "+e+" != "+u.key),u=n.query.matches(u)?u:null),u?(s=s.add(u),i=u.hasLocalMutations?i.add(e):i.delete(e)):(s=s.delete(e),i=i.delete(e)),p&&u){var h=p.data.isEqual(u.data);h&&p.hasLocalMutations===u.hasLocalMutations||(h?r.track({type:ur.Metadata,doc:u}):r.track({type:ur.Modified,doc:u}),d&&0this.query.limit;){var p=s.last();s=s.delete(p.key),r.track({type:ur.Removed,doc:p})}return c(!l||!t,"View was refilled using docs that themselves needed refilling."),{documentSet:s,changeSet:r,needsRefill:l,mutatedKeys:i}},e.prototype.applyChanges=function(e,t){var n=this;c(!e.needsRefill,"Cannot apply changes that need a refill");var r=this.documentSet;this.documentSet=e.documentSet,this.mutatedKeys=e.mutatedKeys;var o=e.changeSet.getChanges();o.sort(function(e,t){return he(e.type,t.type)||n.query.docComparator(e.doc,t.doc)}),this.applyTargetChange(t);var i=this.updateLimboDocuments(),s=0===this.limboDocuments.size&&this.current,l=s?hr.Synced:hr.Local,d=l!==this.syncState;if(this.syncState=l,0===o.length&&!d)return{limboChanges:i};var p=new gr(this.query,e.documentSet,r,o,l===hr.Local,!e.mutatedKeys.isEmpty(),d,!1);return{snapshot:p,limboChanges:i}},e.prototype.applyOnlineStateChange=function(e){return this.current&&e===cr.Offline?(this.current=!1,this.applyChanges({documentSet:this.documentSet,changeSet:new mr,mutatedKeys:this.mutatedKeys,needsRefill:!1})):{limboChanges:[]}},e.prototype.shouldBeInLimbo=function(e){return!this._syncedDocuments.has(e)&&!!this.documentSet.has(e)&&!this.documentSet.get(e).hasLocalMutations},e.prototype.applyTargetChange=function(e){if(e){var t=e.mapping;switch(t instanceof Bn?this._syncedDocuments=t.documents:t instanceof Fn&&(this._syncedDocuments=t.applyToKeySet(this._syncedDocuments)),e.currentStatusUpdate){case Rn.MarkCurrent:this.current=!0;break;case Rn.MarkNotCurrent:this.current=!1;break;case Rn.None:break;default:d("Unknown current status update: "+e.currentStatusUpdate);}}},e.prototype.updateLimboDocuments=function(){var e=this;if(!this.current)return[];var t=this.limboDocuments;this.limboDocuments=ie(),this.documentSet.forEach(function(t){e.shouldBeInLimbo(t.key)&&(e.limboDocuments=e.limboDocuments.add(t.key))});var n=[];return t.forEach(function(t){e.limboDocuments.has(t)||n.push(new Nr(t))}),this.limboDocuments.forEach(function(e){t.has(e)||n.push(new Ir(e))}),n},e}(),Or="SyncEngine",Mr=function(){return function(e,t,n,r){this.query=e,this.targetId=t,this.resumeToken=n,this.view=r}}(),Dr=function(){function e(e,t,n){this.localStore=e,this.remoteStore=t,this.currentUser=n,this.viewHandler=null,this.errorHandler=null,this.queryViewsByQuery=new yr(function(e){return e.canonicalId()}),this.queryViewsByTarget={},this.limboTargetsByKey=new Ot(It.comparator),this.limboKeysByTarget={},this.limboDocumentRefs=new Cr,this.limboCollector=new Sr,this.mutationUserCallbacks={},this.targetIdGenerator=Ar.forSyncEngine()}return e.prototype.subscribe=function(e,t){c(null!==e&&null!==t,"View and error handlers cannot be null"),c(null===this.viewHandler&&null===this.errorHandler,"SyncEngine already has a subscriber."),this.viewHandler=e,this.errorHandler=t,this.limboCollector.addGarbageSource(this.limboDocumentRefs)},e.prototype.listen=function(e){var t=this;return this.assertSubscribed("listen()"),c(!this.queryViewsByQuery.has(e),"We already listen to the query: "+e),this.localStore.allocateQuery(e).then(function(n){return t.localStore.executeQuery(e).then(function(r){return t.localStore.remoteDocumentKeys(n.targetId).then(function(o){var i=new Lr(e,o),s=i.computeDocChanges(r),l=i.applyChanges(s);c(0===l.limboChanges.length,"View returned limbo docs before target ack from the server."),c(!!l.snapshot,"applyChanges for new view should always return a snapshot");var d=new Mr(e,n.targetId,n.resumeToken,i);t.queryViewsByQuery.set(e,d),t.queryViewsByTarget[n.targetId]=d,t.viewHandler([l.snapshot]),t.remoteStore.listen(n)})}).then(function(){return n.targetId})})},e.prototype.unlisten=function(e){var t=this;this.assertSubscribed("unlisten()");var n=this.queryViewsByQuery.get(e);return c(!!n,"Trying to unlisten on query not found:"+e),this.localStore.releaseQuery(e).then(function(){return t.remoteStore.unlisten(n.targetId),t.removeAndCleanupQuery(n).then(function(){return t.localStore.collectGarbage()})})},e.prototype.write=function(e,t){var n=this;return this.assertSubscribed("write()"),this.localStore.localWrite(e).then(function(e){return n.addMutationCallback(e.batchId,t),n.emitNewSnapsAndNotifyLocalStore(e.changes)}).then(function(){return n.remoteStore.fillWritePipeline()})},e.prototype.wrapUpdateFunctionError=function(e){return e},e.prototype.runTransaction=function(e,t){var n=this;void 0===t&&(t=5),c(0<=t,"Got negative number of retries for transaction.");var r=this.remoteStore.createTransaction();return function(){try{var t=e(r);return!Q(t)&&t.catch&&t.then?t.catch(function(t){return Promise.reject(n.wrapUpdateFunctionError(t))}):Promise.reject(Error("Transaction callback must return a Promise"))}catch(t){return Promise.reject(n.wrapUpdateFunctionError(t))}}().then(function(o){return r.commit().then(function(){return o}).catch(function(r){return 0===t?Promise.reject(r):n.runTransaction(e,t-1)})})},e.prototype.applyRemoteEvent=function(e){var t=this;return this.assertSubscribed("applyRemoteEvent()"),g(e.targetChanges,function(n,r){var o=t.limboKeysByTarget[n];if(!o){var i=t.queryViewsByTarget[n];c(!!i,"Missing QueryView for non-limbo query: "+n),r.mapping.filterUpdates(i.view.syncedDocuments)}else e.synthesizeDeleteForLimboTargetChange(r,o)}),this.localStore.applyRemoteEvent(e).then(function(n){return t.emitNewSnapsAndNotifyLocalStore(n,e)})},e.prototype.applyOnlineStateChange=function(e){var t=[];this.queryViewsByQuery.forEach(function(n,r){var o=r.view.applyOnlineStateChange(e);c(0===o.limboChanges.length,"OnlineState should not affect limbo documents."),o.snapshot&&t.push(o.snapshot)}),this.viewHandler(t)},e.prototype.rejectListen=function(e,t){var n=this;this.assertSubscribed("rejectListens()");var r=this.limboKeysByTarget[e];if(r){this.limboTargetsByKey=this.limboTargetsByKey.remove(r),delete this.limboKeysByTarget[e];var o=new Ot(It.comparator);o=o.insert(r,new Lt(r,mn.forDeletedDoc()));var i=ie().add(r),s=new Dn(mn.MIN,{},o,i);return this.applyRemoteEvent(s)}var l=this.queryViewsByTarget[e];return c(!!l,"Unknown targetId: "+e),this.localStore.releaseQuery(l.query).then(function(){return n.removeAndCleanupQuery(l).then(function(){n.errorHandler(l.query,t)})})},e.prototype.applySuccessfulWrite=function(e){var t=this;return this.assertSubscribed("applySuccessfulWrite()"),this.processUserCallback(e.batch.batchId,null),this.localStore.acknowledgeBatch(e).then(function(e){return t.emitNewSnapsAndNotifyLocalStore(e)})},e.prototype.rejectFailedWrite=function(e,t){var n=this;return this.assertSubscribed("rejectFailedWrite()"),this.processUserCallback(e,t),this.localStore.rejectBatch(e).then(function(e){return n.emitNewSnapsAndNotifyLocalStore(e)})},e.prototype.addMutationCallback=function(e,t){var n=this.mutationUserCallbacks[this.currentUser.toKey()];n||(n=new Ot(z)),n=n.insert(e,t),this.mutationUserCallbacks[this.currentUser.toKey()]=n},e.prototype.processUserCallback=function(e,t){var n=this.mutationUserCallbacks[this.currentUser.toKey()];if(n){var r=n.get(e);r&&(c(e===n.minKey(),"Mutation callbacks processed out-of-order?"),t?r.reject(t):r.resolve(),n=n.remove(e)),this.mutationUserCallbacks[this.currentUser.toKey()]=n}},e.prototype.removeAndCleanupQuery=function(e){return this.queryViewsByQuery.delete(e.query),delete this.queryViewsByTarget[e.targetId],this.limboDocumentRefs.removeReferencesForId(e.targetId),this.gcLimboDocuments()},e.prototype.updateTrackedLimbos=function(e,t){for(var n=0,r=t,o;n",e),n=this.store.put(e)):(i(to,"PUT",this.store.name,e,t),n=this.store.put(t,e)),Te(n)},e.prototype.get=function(e){var t=this,n=this.store.get(e);return Te(n).next(function(n){return void 0===n&&(n=null),i(to,"GET",t.store.name,e,n),n})},e.prototype.delete=function(e){i(to,"DELETE",this.store.name,e);var t=this.store.delete(e);return Te(t)},e.prototype.count=function(){i(to,"COUNT",this.store.name);var e=this.store.count();return Te(e)},e.prototype.loadAll=function(e,t){var n=this.cursor(this.options(e,t)),r=[];return this.iterateCursor(n,function(e,t){r.push(t)}).next(function(){return r})},e.prototype.deleteAll=function(e,t){i(to,"DELETE ALL",this.store.name);var n=this.options(e,t);n.keysOnly=!1;var r=this.cursor(n);return this.iterateCursor(r,function(e,t,n){return n.delete()})},e.prototype.iterate=function(e,t){var n;t?n=e:(n={},t=e);var r=this.cursor(n);return this.iterateCursor(r,t)},e.prototype.iterateCursor=function(e,t){var n=[];return new kr(function(r,o){e.onerror=function(e){o(e.target.error)},e.onsuccess=function(e){var o=e.target.result;if(!o)return void r();var i=new ro(o),s=t(o.primaryKey,o.value,i);s instanceof kr&&n.push(s),i.isDone?r():null===i.skipToKey?o.continue():o.continue(i.skipToKey)}}).next(function(){return kr.waitFor(n)})},e.prototype.options=function(e,t){var n;return void 0!==e&&("string"==typeof e?n=e:(c(void 0===t,"3rd argument must not be defined if 2nd is a range."),t=e)),{index:n,range:t}},e.prototype.cursor=function(e){var t="next";if(e.reverse&&(t="prev"),e.index){var n=this.store.index(e.index);return e.keysOnly?n.openKeyCursor(e.range,t):n.openCursor(e.range,t)}return this.store.openCursor(e.range,t)},e}(),io=function(){function e(e,t){this.userId=e,this.serializer=t,this.garbageCollector=null}return e.forUser=function(t,n){c(""!==t.uid,"UserID must not be an empty string.");var r=t.isAuthenticated()?t.uid:"";return new e(r,n)},e.prototype.start=function(t){var n=this;return e.loadNextBatchIdFromDb(t).next(function(e){return n.nextBatchId=e,Ie(t).get(n.userId)}).next(function(e){return e||(e=new Hr(n.userId,Rr,"")),n.metadata=e,n.metadata.lastAcknowledgedBatchId>=n.nextBatchId?n.checkEmpty(t).next(function(e){return c(e,"Reset nextBatchID is only possible when the queue is empty"),n.metadata.lastAcknowledgedBatchId=Rr,Ie(t).put(n.metadata)}):kr.resolve()})},e.loadNextBatchIdFromDb=function(e){var t=Rr;return Ee(e).iterate({reverse:!0},function(e,n,r){var o=e[0],i=e[1];if(i>t&&(t=n.batchId),""===o)r.done();else{var s=V(o);r.skip([s])}}).next(function(){return t+1})},e.prototype.checkEmpty=function(e){var t=!0,n=IDBKeyRange.bound(this.keyForBatchId(Number.NEGATIVE_INFINITY),this.keyForBatchId(Number.POSITIVE_INFINITY));return Ee(e).iterate({range:n},function(e,n,r){t=!1,r.done()}).next(function(){return t})},e.prototype.getNextBatchId=function(){return kr.resolve(this.nextBatchId)},e.prototype.getHighestAcknowledgedBatchId=function(){return kr.resolve(this.metadata.lastAcknowledgedBatchId)},e.prototype.acknowledgeBatch=function(e,t,n){var r=t.batchId;return c(r>this.metadata.lastAcknowledgedBatchId,"Mutation batchIDs must be acknowledged in order"),this.metadata.lastAcknowledgedBatchId=r,this.metadata.lastStreamToken=_e(n),Ie(e).put(this.metadata)},e.prototype.getLastStreamToken=function(){return kr.resolve(this.metadata.lastStreamToken)},e.prototype.setLastStreamToken=function(e,t){return this.metadata.lastStreamToken=_e(t),Ie(e).put(this.metadata)},e.prototype.addMutationBatch=function(e,t,n){var r=this,o=this.nextBatchId;this.nextBatchId++;var i=new Pr(o,t,n),s=this.serializer.toDbMutationBatch(this.userId,i);return Ee(e).put(s).next(function(){for(var t=[],i=0,s=n;i=r,"Should have found mutation after "+r),i=n.serializer.fromDbMutationBatch(t)),o.done()}).next(function(){return i})},e.prototype.getAllMutationBatches=function(e){var t=this,n=IDBKeyRange.bound(this.keyForBatchId(Rr),this.keyForBatchId(Number.POSITIVE_INFINITY));return Ee(e).loadAll(n).next(function(e){return e.map(function(e){return t.serializer.fromDbMutationBatch(e)})})},e.prototype.getAllMutationBatchesThroughBatchId=function(e,t){var n=this,r=IDBKeyRange.bound(this.keyForBatchId(Rr),this.keyForBatchId(t));return Ee(e).loadAll(r).next(function(e){return e.map(function(e){return n.serializer.fromDbMutationBatch(e)})})},e.prototype.getAllMutationBatchesAffectingDocumentKey=function(e,t){var n=this,r=Gr.prefixForPath(this.userId,t.path),o=IDBKeyRange.lowerBound(r),i=[];return Ae(e).iterate({range:o},function(r,o,s){var l=r[0],p=r[1],c=r[2],u=ye(p);if(l!==n.userId||!t.path.isEqual(u))return void s.done();var h=n.keyForBatchId(c);return Ee(e).get(h).next(function(e){null===e&&d("Dangling document-mutation reference found: "+r+" which points to "+h),i.push(n.serializer.fromDbMutationBatch(e))})}).next(function(){return i})},e.prototype.getAllMutationBatchesAffectingQuery=function(e,t){var n=this;c(!t.isDocumentQuery(),"Document queries shouldn't go down this path");var r=t.path,o=r.length+1,i=Gr.prefixForPath(this.userId,r),s=IDBKeyRange.lowerBound(i),l=new In(z);return Ae(e).iterate({range:s},function(e,t,i){var s=e[0],d=e[1],p=e[2],c=ye(d);return s===n.userId&&r.isPrefixOf(c)?void(c.length!==o||(l=l.add(p))):void i.done()}).next(function(){var t=[],r=[];return l.forEach(function(o){var i=n.keyForBatchId(o);r.push(Ee(e).get(i).next(function(e){null===e&&d("Dangling document-mutation reference found, which points to "+i),t.push(n.serializer.fromDbMutationBatch(e))}))}),kr.waitFor(r).next(function(){return t})})},e.prototype.removeMutationBatches=function(e,t){for(var n=Ee(e),r=Ae(e),o=[],i=function(e){var t=IDBKeyRange.only(s.keyForBatchId(e.batchId)),i=0,l=n.iterate({range:t},function(e,t,n){return i++,n.delete()});o.push(l.next(function(){c(1==i,"Dangling document-mutation reference found: Missing batch "+e.batchId)}));for(var d=0,p=e.mutations;dthis.metadata.highestTargetId&&(this.metadata.highestTargetId=e.targetId,t=!0),t},Object.defineProperty(e.prototype,"count",{get:function(){return this.metadata.targetCount},enumerable:!0,configurable:!0}),e.prototype.getQueryData=function(e,t){var n=this,r=t.canonicalId(),o=IDBKeyRange.bound([r,Number.NEGATIVE_INFINITY],[r,tt]),i=null;return Le(e).iterate({range:o,index:Yr.queryTargetsIndexName},function(e,r,o){var s=n.serializer.fromDbTarget(r);t.isEqual(s.query)&&(i=s,o.done())}).next(function(){return i})},e.prototype.addMatchingKeys=function(e,t,n){var r=[],o=Me(e);return t.forEach(function(e){var t=me(e.path);r.push(o.put(new Jr(n,t)))}),kr.waitFor(r)},e.prototype.removeMatchingKeys=function(e,t,n){var r=this,o=[],i=Me(e);return t.forEach(function(e){var t=me(e.path);o.push(i.delete([n,t])),null!==r.garbageCollector&&r.garbageCollector.addPotentialGarbageKey(e)}),kr.waitFor(o)},e.prototype.removeMatchingKeysForTargetId=function(e,t){var n=Me(e),r=IDBKeyRange.bound([t],[t+1],!1,!0);return this.notifyGCForRemovedKeys(e,r).next(function(){return n.delete(r)})},e.prototype.notifyGCForRemovedKeys=function(e,t){var n=this,r=Me(e);return null!==this.garbageCollector&&this.garbageCollector.isEager?r.iterate({range:t,keysOnly:!0},function(e){var t=ye(e[1]),r=new It(t);c(null!==n.garbageCollector,"GarbageCollector for query cache set to null during key removal."),n.garbageCollector.addPotentialGarbageKey(r)}):kr.resolve()},e.prototype.getMatchingKeysForTargetId=function(e,t){var n=IDBKeyRange.bound([t],[t+1],!1,!0),r=Me(e),o=ie();return r.iterate({range:n,keysOnly:!0},function(e){var t=ye(e[1]),n=new It(t);o=o.add(n)}).next(function(){return o})},e.prototype.setGarbageCollector=function(e){this.garbageCollector=e},e.prototype.containsKey=function(e,t){c(null!==e,"Persistence Transaction cannot be null for query cache containsKey");var n=me(t.path),r=IDBKeyRange.bound([n],[W(n)],!1,!0),o=0;return Me(e).iterate({index:Jr.documentTargetsIndex,keysOnly:!0,range:r},function(e,t,n){o++,n.done()}).next(function(){return 0t?(s("Persistence owner-lease is in the future. Discarding.",e),!1):e.ownerId!==this.getZombiedOwnerId())},e.prototype.scheduleOwnerLeaseRefreshes=function(){var e=this;this.ownerLeaseRefreshHandle=setInterval(function(){var t=e.runTransaction("Refresh owner timestamp",function(t){var n=t.store(Wr.store);return n.put("owner",new Wr(e.ownerId,Date.now()))});t.catch(function(t){s(t),e.stopOwnerLeaseRefreshes()})},4e3)},e.prototype.stopOwnerLeaseRefreshes=function(){this.ownerLeaseRefreshHandle&&(clearInterval(this.ownerLeaseRefreshHandle),this.ownerLeaseRefreshHandle=null)},e.prototype.attachWindowUnloadHook=function(){var e=this;"object"==typeof window&&"function"==typeof window.addEventListener&&(this.windowUnloadHandler=function(){e.setZombiedOwnerId(e.ownerId),e.shutdown()},window.addEventListener("unload",this.windowUnloadHandler))},e.prototype.detachWindowUnloadHook=function(){this.windowUnloadHandler&&(c("object"==typeof window&&"function"==typeof window.removeEventListener,"Expected 'window.removeEventListener' to be a function"),window.removeEventListener("unload",this.windowUnloadHandler),this.windowUnloadHandler=null)},e.prototype.getZombiedOwnerId=function(){try{var e=window.localStorage.getItem(this.zombiedOwnerLocalStorageKey());return i(co,"Zombied ownerID from LocalStorage:",e),e}catch(t){return s("Failed to get zombie owner id.",t),null}},e.prototype.setZombiedOwnerId=function(e){try{null===e?window.localStorage.removeItem(this.zombiedOwnerLocalStorageKey()):window.localStorage.setItem(this.zombiedOwnerLocalStorageKey(),e)}catch(t){s("Failed to set zombie owner id.",t)}},e.prototype.zombiedOwnerLocalStorageKey=function(){return this.localStoragePrefix+"zombiedOwnerId"},e.prototype.generateOwnerId=function(){return ft.newId()},e.MAIN_DATABASE="main",e}(),mo=function(){function e(e,t){this.remoteDocumentCache=e,this.mutationQueue=t}return e.prototype.getDocument=function(e,t){var n=this;return this.remoteDocumentCache.getEntry(e,t).next(function(r){return n.computeLocalDocument(e,t,r)})},e.prototype.getDocuments=function(e,t){var n=this,r=[],o=re();return t.forEach(function(t){r.push(n.getDocument(e,t).next(function(e){e||(e=new Lt(t,mn.forDeletedDoc())),o=o.insert(t,e)}))}),kr.waitFor(r).next(function(){return o})},e.prototype.getDocumentsMatchingQuery=function(e,t){return It.isDocumentKey(t.path)?this.getDocumentsMatchingDocumentQuery(e,t.path):this.getDocumentsMatchingCollectionQuery(e,t)},e.prototype.getDocumentsMatchingDocumentQuery=function(e,t){return this.getDocument(e,new It(t)).next(function(e){var t=oe();return e instanceof Nt&&(t=t.insert(e.key,e)),t})},e.prototype.getDocumentsMatchingCollectionQuery=function(e,t){var n=this,r;return this.remoteDocumentCache.getDocumentsMatchingQuery(e,t).next(function(t){return n.computeLocalDocuments(e,t)}).next(function(o){return r=o,n.mutationQueue.getAllMutationBatchesAffectingQuery(e,t)}).next(function(t){for(var o=ie(),i=0,s=t,l;it,"Acknowledged batches can't be rejected."),r})}).next(function(){return t.removeMutationBatch(n,r)}).next(function(e){return o=e,t.mutationQueue.performConsistencyCheck(n)}).next(function(){return t.localDocuments.getDocuments(n,o)})})},e.prototype.getLastStreamToken=function(){var e=this;return this.persistence.runTransaction("Get last stream token",function(t){return e.mutationQueue.getLastStreamToken(t)})},e.prototype.setLastStreamToken=function(e){var t=this;return this.persistence.runTransaction("Set last stream token",function(n){return t.mutationQueue.setLastStreamToken(n,e)})},e.prototype.getLastRemoteSnapshotVersion=function(){return this.queryCache.getLastRemoteSnapshotVersion()},e.prototype.applyRemoteEvent=function(e){var t=this,n=new go(this.remoteDocuments);return this.persistence.runTransaction("Apply remote event",function(r){var o=[];g(e.targetChanges,function(e,n){var i=t.targetIds[e];if(i){var s=n.mapping;if(s)if(s instanceof Bn)o.push(t.queryCache.removeMatchingKeysForTargetId(r,e).next(function(){return t.queryCache.addMatchingKeys(r,s.documents,e)}));else if(s instanceof Fn)o.push(t.queryCache.removeMatchingKeys(r,s.removedDocuments,e).next(function(){return t.queryCache.addMatchingKeys(r,s.addedDocuments,e)}));else return d("Unknown mapping type: "+JSON.stringify(s));var l=n.resumeToken;0=e.compareTo(t)||y(this.targetIds)},e.prototype.shouldHoldBatchResult=function(e){return!this.isRemoteUpToVersion(e)||0i.version.compareTo(s))&&(i=r.applyToRemoteDocument(o,i,t),i?n.addEntry(i):c(!e,"Mutation batch "+r+" applied to document "+e+" resulted in null"))})}),i},e}(),yo=function(){function e(){this.mutationQueue=[],this.nextBatchId=1,this.highestAcknowledgedBatchId=Rr,this.lastStreamToken=p(),this.garbageCollector=null,this.batchesByDocumentKey=new In(Tr.compareByKey)}return e.prototype.start=function(){return 0===this.mutationQueue.length&&(this.nextBatchId=1,this.highestAcknowledgedBatchId=Rr),c(this.highestAcknowledgedBatchIdthis.highestAcknowledgedBatchId,"Mutation batchIDs must be acknowledged in order");var o=this.indexOfExistingBatchId(r,"acknowledged"),i=this.mutationQueue[o];return c(r===i.batchId,"Queue ordering failure: expected batch "+r+", got batch "+i.batchId),c(!i.isTombstone(),"Can't acknowledge a previously removed batch"),this.highestAcknowledgedBatchId=r,this.lastStreamToken=n,kr.resolve()},e.prototype.getLastStreamToken=function(){return kr.resolve(this.lastStreamToken)},e.prototype.setLastStreamToken=function(e,t){return this.lastStreamToken=t,kr.resolve()},e.prototype.addMutationBatch=function(e,t,n){c(0!==n.length,"Mutation batches should not be empty");var r=this.nextBatchId;if(this.nextBatchId++,0o?0:o,s;ir?r=0:r>=n?r=n:r++,kr.resolve(this.getAllLiveMutationBatchesBeforeIndex(r))},e.prototype.getAllMutationBatchesAffectingDocumentKey=function(e,t){var n=this,r=new Tr(t,0),o=new Tr(t,tt),i=[];return this.batchesByDocumentKey.forEachInRange([r,o],function(e){c(t.isEqual(e.key),"Should only iterate over a single key's batches");var r=n.findMutationBatch(e.targetOrBatchId);c(null!==r,"Batches in the index must exist in the main table"),i.push(r)}),kr.resolve(i)},e.prototype.getAllMutationBatchesAffectingQuery=function(e,t){var n=this,r=t.path,o=r.length+1,i=r;It.isDocumentKey(i)||(i=i.child(""));var s=new Tr(new It(i),0),l=new In(z);this.batchesByDocumentKey.forEachWhile(function(e){var t=e.key.path;return!!r.isPrefixOf(t)&&(t.length===o&&(l=l.add(e.targetOrBatchId)),!0)},s);var d=[];return l.forEach(function(e){var t=n.findMutationBatch(e);null!==t&&d.push(t)}),kr.resolve(d)},e.prototype.removeMutationBatches=function(e,t){var n=t.length;c(0t||t>=this.mutationQueue.length)return null;var n=this.mutationQueue[t];return c(n.batchId===e,"If found batch must match"),n.isTombstone()?null:n},e}(),bo=function(){function e(){this.queries=new yr(function(e){return e.canonicalId()}),this.lastRemoteSnapshotVersion=mn.MIN,this.highestTargetId=0,this.references=new Cr,this.targetCount=0}return e.prototype.start=function(){return kr.resolve()},e.prototype.getLastRemoteSnapshotVersion=function(){return this.lastRemoteSnapshotVersion},e.prototype.getHighestTargetId=function(){return this.highestTargetId},e.prototype.setLastRemoteSnapshotVersion=function(e,t){return this.lastRemoteSnapshotVersion=t,kr.resolve()},e.prototype.saveQueryData=function(e){this.queries.set(e.query,e);var t=e.targetId;t>this.highestTargetId&&(this.highestTargetId=t)},e.prototype.addQueryData=function(e,t){return c(!this.queries.has(t.query),"Adding a query that already exists"),this.saveQueryData(t),this.targetCount+=1,kr.resolve()},e.prototype.updateQueryData=function(e,t){return c(this.queries.has(t.query),"Updating a non-existent query"),this.saveQueryData(t),kr.resolve()},e.prototype.removeQueryData=function(e,t){return c(0n.indexOf("Firestore Test Simulated Error")&&setTimeout(function(){throw e},0),e}).then(function(e){return t.operationInProgress=!1,e})});return this.tail=n,n},e.prototype.enqueueAfterDelay=function(e,t,n){var r=this;this.verifyNotFailed(),c(!this.containsDelayedOperation(e),"Attempted to schedule multiple operations with timer id "+e+".");var o=Co.createAndSchedule(this,e,t,n,function(e){return r.removeDelayedOperation(e)});return this.delayedOperations.push(o),o},e.prototype.verifyNotFailed=function(){this.failure&&d("AsyncQueue is already failed: "+(this.failure.stack||this.failure.message))},e.prototype.verifyOperationInProgress=function(){c(this.operationInProgress,"verifyOpInProgress() called when no op in progress on this queue.")},e.prototype.drain=function(){return this.enqueue(function(){return Promise.resolve()})},e.prototype.containsDelayedOperation=function(e){return 0<=this.delayedOperations.findIndex(function(t){return t.timerId===e})},e.prototype.runDelayedOperationsEarly=function(e){var t=this;return this.drain().then(function(){c(e===wo.All||t.containsDelayedOperation(e),"Attempted to drain to missing operation "+e),t.delayedOperations.sort(function(e,t){return e.targetTimeMs-t.targetTimeMs});for(var n=0,r=t.delayedOperations,o;nthis.maxDelayMs&&(this.currentBaseMs=this.maxDelayMs)},e.prototype.cancel=function(){null!==this.timerPromise&&(this.timerPromise.cancel(),this.timerPromise=null)},e.prototype.jitterDelayMs=function(){return(Math.random()-0.5)*this.currentBaseMs},e}(),Eo;(function(e){e[e.Initial=0]="Initial",e[e.Auth=1]="Auth",e[e.Open=2]="Open",e[e.Error=3]="Error",e[e.Backoff=4]="Backoff",e[e.Stopped=5]="Stopped"})(Eo||(Eo={}));var Ao=function(){function e(e,t,n,r,o){this.queue=e,this.idleTimerId=n,this.connection=r,this.credentialsProvider=o,this.inactivityTimerPromise=null,this.stream=null,this.listener=null,this.backoff=new _o(e,t,1e3,1.5,60000),this.state=Eo.Initial}return e.prototype.isStarted=function(){return this.state===Eo.Backoff||this.state===Eo.Auth||this.state===Eo.Open},e.prototype.isOpen=function(){return this.state===Eo.Open},e.prototype.start=function(e){return this.state===Eo.Error?void this.performBackoff(e):void(c(this.state===Eo.Initial,"Already started"),this.listener=e,this.auth())},e.prototype.stop=function(){this.isStarted()&&this.close(Eo.Stopped)},e.prototype.inhibitBackoff=function(){c(!this.isStarted(),"Can only inhibit backoff in a stopped state"),this.state=Eo.Initial,this.backoff.reset()},e.prototype.markIdle=function(){var e=this;this.isOpen()&&null===this.inactivityTimerPromise&&(this.inactivityTimerPromise=this.queue.enqueueAfterDelay(this.idleTimerId,60000,function(){return e.handleIdleCloseTimer()}))},e.prototype.sendRequest=function(e){this.cancelIdleCheck(),this.stream.send(e)},e.prototype.handleIdleCloseTimer=function(){return lt.__awaiter(this,void 0,void 0,function(){return lt.__generator(this,function(){return this.isOpen()?[2,this.close(Eo.Initial)]:[2]})})},e.prototype.cancelIdleCheck=function(){this.inactivityTimerPromise&&(this.inactivityTimerPromise.cancel(),this.inactivityTimerPromise=null)},e.prototype.close=function(e,t){return lt.__awaiter(this,void 0,void 0,function(){var n;return lt.__generator(this,function(){return c(e===Eo.Error||Q(t),"Can't provide an error when not in an error state."),this.cancelIdleCheck(),this.backoff.cancel(),e===Eo.Error?t&&t.code===mt.RESOURCE_EXHAUSTED&&(s(t.toString()),s("Using maximum backoff delay to prevent overloading the backend."),this.backoff.resetToMax()):this.backoff.reset(),null!==this.stream&&(this.tearDown(),this.stream.close(),this.stream=null),this.state=e,n=this.listener,this.listener=null,e===Eo.Stopped?[2]:[2,n.onClose(t)]})})},e.prototype.tearDown=function(){},e.prototype.auth=function(){var e=this;c(this.state===Eo.Initial,"Must be in initial state to auth"),this.state=Eo.Auth,this.credentialsProvider.getToken(!1).then(function(t){e.startStream(t)},function(t){e.queue.enqueue(function(){return lt.__awaiter(e,void 0,void 0,function(){var e;return lt.__generator(this,function(){return this.state===Eo.Stopped?[2]:(e=new gt(mt.UNKNOWN,"Fetching auth token failed: "+t.message),[2,this.handleStreamClose(e)])})})})})},e.prototype.startStream=function(e){var t=this;if(this.state!==Eo.Stopped){c(this.state===Eo.Auth,"Trying to start stream in a non-auth state");var n=function(e,n){t.queue.enqueue(function(){return lt.__awaiter(t,void 0,void 0,function(){return lt.__generator(this,function(){return this.stream===e?[2,n()]:[2]})})})};if(null!==this.listener){var r=this.startRpc(e);this.stream=r,this.stream.onOpen(function(){n(r,function(){return c(t.state===Eo.Auth,"Expected stream to be in state auth, but was "+t.state),t.state=Eo.Open,t.listener.onOpen()})}),this.stream.onClose(function(e){n(r,function(){return t.handleStreamClose(e)})}),this.stream.onMessage(function(e){n(r,function(){return t.onMessage(e)})})}}},e.prototype.performBackoff=function(e){var t=this;c(this.state===Eo.Error,"Should only perform backoff in an error case"),this.state=Eo.Backoff,this.backoff.backoffAndRun(function(){return lt.__awaiter(t,void 0,void 0,function(){return lt.__generator(this,function(){return this.state===Eo.Stopped?[2]:(this.state=Eo.Initial,this.start(e),c(this.isStarted(),"PersistentStream should have started"),[2])})})})},e.prototype.handleStreamClose=function(e){return c(this.isStarted(),"Can't handle server close on non-started stream"),i("PersistentStream","close with error: "+e),this.stream=null,this.close(Eo.Error,e)},e}(),Io=function(e){function t(t,n,r,o){var i=e.call(this,t,wo.ListenStreamConnectionBackoff,wo.ListenStreamIdle,n,r)||this;return i.serializer=o,i}return lt.__extends(t,e),t.prototype.startRpc=function(e){return this.connection.openStream("Listen",e)},t.prototype.onMessage=function(e){this.backoff.reset();var t=this.serializer.fromWatchChange(e),n=this.serializer.versionFromListenResponse(e);return this.listener.onWatchChange(t,n)},t.prototype.watch=function(e){var t={database:this.serializer.encodedDatabaseId,addTarget:this.serializer.toTarget(e)},n=this.serializer.toListenRequestLabels(e);n&&(t.labels=n),this.sendRequest(t)},t.prototype.unwatch=function(e){var t={};t.database=this.serializer.encodedDatabaseId,t.removeTarget=e,this.sendRequest(t)},t}(Ao),No=function(e){function t(t,n,r,o){var i=e.call(this,t,wo.WriteStreamConnectionBackoff,wo.WriteStreamIdle,n,r)||this;return i.serializer=o,i.handshakeComplete_=!1,i}return lt.__extends(t,e),Object.defineProperty(t.prototype,"handshakeComplete",{get:function(){return this.handshakeComplete_},enumerable:!0,configurable:!0}),t.prototype.start=function(t){this.handshakeComplete_=!1,e.prototype.start.call(this,t)},t.prototype.tearDown=function(){this.handshakeComplete_&&this.writeMutations([])},t.prototype.startRpc=function(e){return this.connection.openStream("Write",e)},t.prototype.onMessage=function(e){if(c(!!e.streamToken,"Got a write response without a stream token"),this.lastStreamToken=e.streamToken,!this.handshakeComplete_)return c(!e.writeResults||0===e.writeResults.length,"Got mutation results for handshake"),this.handshakeComplete_=!0,this.listener.onHandshakeComplete();this.backoff.reset();var t=this.serializer.fromWriteResults(e.writeResults),n=this.serializer.fromVersion(e.commitTime);return this.listener.onMutationResult(n,t)},t.prototype.writeHandshake=function(){c(this.isOpen(),"Writing handshake requires an opened stream"),c(!this.handshakeComplete_,"Handshake already completed");var e={};e.database=this.serializer.encodedDatabaseId,this.sendRequest(e)},t.prototype.writeMutations=function(e){var t=this;c(this.isOpen(),"Writing mutations requires an opened stream"),c(this.handshakeComplete_,"Handshake must be complete before writing mutations"),c(0=Mo&&(this.clearOnlineStateTimer(),this.logClientOfflineWarningIfNecessary("Connection failed "+Mo+" "+("times. Most recent error: "+e.toString())),this.setAndBroadcast(cr.Offline)))},e.prototype.set=function(e){this.clearOnlineStateTimer(),this.watchStreamFailures=0,e===cr.Online&&(this.shouldWarnClientIsOffline=!1),this.setAndBroadcast(e)},e.prototype.setAndBroadcast=function(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))},e.prototype.logClientOfflineWarningIfNecessary=function(e){var t="Could not reach Cloud Firestore backend. "+e+"\nThis typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.";this.shouldWarnClientIsOffline?(s(t),this.shouldWarnClientIsOffline=!1):i("OnlineStateTracker",t)},e.prototype.clearOnlineStateTimer=function(){null!==this.onlineStateTimer&&(this.onlineStateTimer.cancel(),this.onlineStateTimer=null)},e}(),Po="RemoteStore",Bo=function(){function e(e,t,n,r){this.localStore=e,this.datastore=t,this.pendingWrites=[],this.lastBatchSeen=Rr,this.listenTargets={},this.pendingTargetResponses={},this.accumulatedWatchChanges=[],this.watchStream=null,this.writeStream=null,this.onlineStateTracker=new Ro(n,r)}return e.prototype.start=function(){return this.enableNetwork()},e.prototype.isNetworkEnabled=function(){return c(null==this.watchStream==(null==this.writeStream),"WatchStream and WriteStream should both be null or non-null"),null!=this.watchStream},e.prototype.enableNetwork=function(){var e=this;return this.isNetworkEnabled()?Promise.resolve():(this.watchStream=this.datastore.newPersistentWatchStream(),this.writeStream=this.datastore.newPersistentWriteStream(),this.localStore.getLastStreamToken().then(function(t){return e.writeStream.lastStreamToken=t,e.shouldStartWatchStream()?e.startWatchStream():e.onlineStateTracker.set(cr.Unknown),e.fillWritePipeline()}))},e.prototype.disableNetwork=function(){return lt.__awaiter(this,void 0,void 0,function(){return lt.__generator(this,function(){return this.disableNetworkInternal(),this.onlineStateTracker.set(cr.Offline),[2]})})},e.prototype.disableNetworkInternal=function(){this.isNetworkEnabled()&&(this.watchStream.stop(),this.writeStream.stop(),this.cleanUpWatchStreamState(),this.cleanUpWriteStreamState(),this.writeStream=null,this.watchStream=null)},e.prototype.shutdown=function(){return i(Po,"RemoteStore shutting down."),this.disableNetworkInternal(),this.onlineStateTracker.set(cr.Unknown),Promise.resolve()},e.prototype.listen=function(e){c(!h(this.listenTargets,e.targetId),"listen called with duplicate targetId!"),this.listenTargets[e.targetId]=e,this.shouldStartWatchStream()?this.startWatchStream():this.isNetworkEnabled()&&this.watchStream.isOpen()&&this.sendWatchRequest(e)},e.prototype.unlisten=function(e){c(h(this.listenTargets,e),"unlisten called without assigned target ID!"),delete this.listenTargets[e],this.isNetworkEnabled()&&this.watchStream.isOpen()&&(this.sendUnwatchRequest(e),y(this.listenTargets)&&this.watchStream.markIdle())},e.prototype.sendWatchRequest=function(e){this.recordPendingTargetRequest(e.targetId),this.watchStream.watch(e)},e.prototype.sendUnwatchRequest=function(e){this.recordPendingTargetRequest(e),this.watchStream.unwatch(e)},e.prototype.recordPendingTargetRequest=function(e){this.pendingTargetResponses[e]=(this.pendingTargetResponses[e]||0)+1},e.prototype.startWatchStream=function(){c(this.shouldStartWatchStream(),"startWriteStream() called when shouldStartWatchStream() is false."),this.watchStream.start({onOpen:this.onWatchStreamOpen.bind(this),onClose:this.onWatchStreamClose.bind(this),onWatchChange:this.onWatchStreamChange.bind(this)}),this.onlineStateTracker.handleWatchStreamStart()},e.prototype.shouldStartWatchStream=function(){return this.isNetworkEnabled()&&!this.watchStream.isStarted()&&!y(this.listenTargets)},e.prototype.cleanUpWatchStreamState=function(){this.accumulatedWatchChanges=[],this.pendingTargetResponses={}},e.prototype.onWatchStreamOpen=function(){return lt.__awaiter(this,void 0,void 0,function(){var e=this;return lt.__generator(this,function(){return g(this.listenTargets,function(t,n){e.sendWatchRequest(n)}),[2]})})},e.prototype.onWatchStreamClose=function(e){return lt.__awaiter(this,void 0,void 0,function(){return lt.__generator(this,function(){return c(this.isNetworkEnabled(),"onWatchStreamClose() should only be called when the network is enabled"),this.cleanUpWatchStreamState(),this.shouldStartWatchStream()?(e&&this.onlineStateTracker.handleWatchStreamFailure(e),this.startWatchStream()):this.onlineStateTracker.set(cr.Unknown),[2]})})},e.prototype.onWatchStreamChange=function(e,t){return lt.__awaiter(this,void 0,void 0,function(){var n;return lt.__generator(this,function(){return(this.onlineStateTracker.set(cr.Online),e instanceof qn&&e.state===jn.Removed&&e.cause)?[2,this.handleTargetError(e)]:(this.accumulatedWatchChanges.push(e),!t.isEqual(mn.MIN)&&0<=t.compareTo(this.localStore.getLastRemoteSnapshotVersion())?(n=this.accumulatedWatchChanges,this.accumulatedWatchChanges=[],[2,this.handleWatchChangeBatch(t,n)]):[2])})})},e.prototype.handleWatchChangeBatch=function(e,t){var n=this,r=new Vn(e,this.listenTargets,this.pendingTargetResponses);r.addChanges(t);var o=r.createRemoteEvent();this.pendingTargetResponses=r.pendingTargetResponses;var i=[];return g(r.existenceFilters,function(t,r){var s=n.listenTargets[t];if(s){var l=s.query;if(!l.isDocumentQuery()){var d=n.localStore.remoteDocumentKeys(t).then(function(e){if(o.targetChanges[t]){var i=o.targetChanges[t].mapping;null!==i&&(i instanceof Fn?e=i.applyToKeySet(e):(c(i instanceof Bn,"Expected either reset or update mapping but got something else: "+i),e=i.documents))}if(e.size!==r.count){o.handleExistenceFilterMismatch(t);var d=new fn(l,t,s.purpose);n.listenTargets[t]=d,n.sendUnwatchRequest(t);var p=new fn(l,t,gn.ExistenceFilterMismatch);n.sendWatchRequest(p)}});i.push(d)}else if(0===r.count){var p=new It(l.path),u=new Lt(p,e);o.addDocumentUpdate(u)}else c(1===r.count,"Single document existence filter with count: "+r.count)}}),Promise.all(i).then(function(){return g(o.targetChanges,function(e,t){if(0() instead."),$o=/^__.*__$/,Zo=function(){function e(e,t,n){this.data=e,this.fieldMask=t,this.fieldTransforms=n}return e.prototype.toMutations=function(e,t){var n=[];return null===this.fieldMask?n.push(new wn(e,this.data,t)):n.push(new Cn(e,this.data,this.fieldMask,t)),0=e.docs.size,"Too many documents returned on a document query");var r=e.docs.get(n._key);t.next(new ha(n.firestore,n._key,r,e.fromCache))}},error:r}),i=this._firestoreClient.listen(rn.atPath(this._key.path),o,e);return function(){o.mute(),n._firestoreClient.unlisten(i)}},e.prototype.get=function(e){var t=this;return P("DocumentReference.get",e,["source"]),e&&N("DocumentReference.get","options","source",e.source,["default","server","cache"]),new Promise(function(n,r){e&&"cache"===e.source?t.firestore.ensureClientConfigured().getDocumentFromLocalCache(t._key).then(function(e){n(new ha(t.firestore,t._key,e,!0))},r):t.getViaSnapshotListener(n,r,e)})},e.prototype.getViaSnapshotListener=function(e,t,n){var r=this.onSnapshotInternal({includeMetadataChanges:!0,waitForSyncWhenOnline:!0},{next:function(o){r(),!o.exists&&o.metadata.fromCache?t(new gt(mt.UNAVAILABLE,"Failed to get document because the client is offline.")):o.exists&&o.metadata.fromCache&&n&&"server"===n.source?t(new gt(mt.UNAVAILABLE,"Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to \"server\" to retrieve the cached document.)")):e(o)},error:t})},e}(),ua=function(){function e(e,t){this.hasPendingWrites=e,this.fromCache=t}return e.prototype.isEqual=function(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache},e}(),ha=function(){function e(e,t,n,r){this._firestore=e,this._key=t,this._document=n,this._fromCache=r}return e.prototype.data=function(e){return k("DocumentSnapshot.data",arguments,0,1),e=Qe("DocumentSnapshot.data",e),this._document?this.convertObject(this._document.data,Ft.fromSnapshotOptions(e,this._firestore._areTimestampsInSnapshotsEnabled())):void 0},e.prototype.get=function(e,t){if(k("DocumentSnapshot.get",arguments,1,2),t=Qe("DocumentSnapshot.get",t),this._document){var n=this._document.data.field(We("DocumentSnapshot.get",e));if(void 0!==n)return this.convertValue(n,Ft.fromSnapshotOptions(t,this._firestore._areTimestampsInSnapshotsEnabled()))}},Object.defineProperty(e.prototype,"id",{get:function(){return this._key.path.lastSegment()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ref",{get:function(){return new ca(this._key,this._firestore)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"exists",{get:function(){return null!==this._document},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"metadata",{get:function(){return new ua(null!==this._document&&this._document.hasLocalMutations,this._fromCache)},enumerable:!0,configurable:!0}),e.prototype.isEqual=function(t){if(!(t instanceof e))throw B("isEqual","DocumentSnapshot",1,t);return this._firestore===t._firestore&&this._fromCache===t._fromCache&&this._key.isEqual(t._key)&&(null===this._document?null===t._document:this._document.isEqual(t._document))},e.prototype.convertObject=function(e,t){var n=this,r={};return e.forEach(function(e,o){r[e]=n.convertValue(o,t)}),r},e.prototype.convertValue=function(e,t){if(e instanceof Jt)return this.convertObject(e,t);if(e instanceof $t)return this.convertArray(e,t);if(e instanceof Qt){var n=e.value(t),r=this._firestore.ensureClientConfigured().databaseId();return e.databaseId.isEqual(r)||s("Document "+this._key.path+" contains a document reference within a different database ("+(e.databaseId.projectId+"/"+e.databaseId.database+") which is not supported. It will be treated as a reference in the current ")+("database ("+r.projectId+"/"+r.database+") instead.")),new ca(n,this._firestore)}return e.value(t)},e.prototype.convertArray=function(e,t){var n=this;return e.internalValue.map(function(e){return n.convertValue(e,t)})},e}(),ma=function(e){function t(t,n,r,o){return e.call(this,t,n,r,o)||this}return lt.__extends(t,e),t.prototype.data=function(t){var n=e.prototype.data.call(this,t);return c("object"==typeof n,"Document in a QueryDocumentSnapshot should exist"),n},t}(ha),ga=function(){function e(e,t){this._query=e,this.firestore=t}return e.prototype.where=function(t,n,r){x("Query.where",arguments,3),w("Query.where","string",2,n),R("Query.where",3,r);var o=We("Query.where",t),i=on.fromString(n),s;if(o.isKeyField()){if(i===on.ARRAY_CONTAINS)throw new gt(mt.INVALID_ARGUMENT,"Invalid Query. You can't perform array-contains queries on FieldPath.documentId() since document IDs are not arrays.");if("string"==typeof r){if(-1!==r.indexOf("/"))throw new gt(mt.INVALID_ARGUMENT,"Function Query.where() requires its third parameter to be a valid document ID if the first parameter is FieldPath.documentId(), but it contains a slash.");if(""===r)throw new gt(mt.INVALID_ARGUMENT,"Function Query.where() requires its third parameter to be a valid document ID if the first parameter is FieldPath.documentId(), but it was an empty string.");var l=this._query.path.child(new _t([r]));c(0==l.length%2,"Path should be a document key"),s=new Qt(this.firestore._databaseId,new It(l))}else if(r instanceof ca){s=new Qt(this.firestore._databaseId,r._key)}else throw new gt(mt.INVALID_ARGUMENT,"Function Query.where() requires its third parameter to be a string or a DocumentReference if the first parameter is FieldPath.documentId(), but it was: "+(M(r)+"."))}else s=this.firestore._dataConverter.parseQueryValue("Query.where",r);var d=J(o,i,s);return this.validateNewFilter(d),new e(this._query.addFilter(d),this.firestore)},e.prototype.orderBy=function(t,n){k("Query.orderBy",arguments,1,2),C("Query.orderBy","string",2,n);var r;if(void 0===n||"asc"===n)r=dn.ASCENDING;else if("desc"===n)r=dn.DESCENDING;else throw new gt(mt.INVALID_ARGUMENT,"Function Query.orderBy() has unknown direction '"+n+"', expected 'asc' or 'desc'.");if(null!==this._query.startAt)throw new gt(mt.INVALID_ARGUMENT,"Invalid query. You must not call Query.startAt() or Query.startAfter() before calling Query.orderBy().");if(null!==this._query.endAt)throw new gt(mt.INVALID_ARGUMENT,"Invalid query. You must not call Query.endAt() or Query.endBefore() before calling Query.orderBy().");var o=We("Query.orderBy",t),i=new cn(o,r);return this.validateNewOrderBy(i),new e(this._query.addOrderBy(i),this.firestore)},e.prototype.limit=function(t){if(x("Query.limit",arguments,1),w("Query.limit","number",1,t),0>=t)throw new gt(mt.INVALID_ARGUMENT,"Invalid Query. Query limit ("+t+") is invalid. Limit must be positive.");return new e(this._query.withLimit(t),this.firestore)},e.prototype.startAt=function(t){for(var n=[],r=1;rr.length)throw new gt(mt.INVALID_ARGUMENT,"Too many arguments provided to "+e+"(). The number of arguments must be less than or equal to the number of Query.orderBy() clauses");for(var o=[],s=0;s, or >=) must be on the same field. But you have inequality filters on '"+t.toString()+"'"+(" and '"+e.field.toString()+"'"));var n=this._query.getFirstOrderByField();null!==n&&this.validateOrderByAndInequalityMatch(e.field,n)}else if(e.op===on.ARRAY_CONTAINS&&this._query.hasArrayContainsFilter())throw new gt(mt.INVALID_ARGUMENT,"Invalid query. Queries only support a single array-contains filter.")},e.prototype.validateNewOrderBy=function(e){if(null===this._query.getFirstOrderByField()){var t=this._query.getInequalityFilterField();null!==t&&this.validateOrderByAndInequalityMatch(t,e.field)}},e.prototype.validateOrderByAndInequalityMatch=function(e,t){if(!t.isEqual(e))throw new gt(mt.INVALID_ARGUMENT,"Invalid query. You have a where filter with an inequality (<, <=, >, or >=) on field '"+e.toString()+"' "+("and so you must also use '"+e.toString()+"' as your first Query.orderBy(), but your first Query.orderBy() ")+("is on field '"+t.toString()+"' instead."))},e}(),fa=function(){function e(e,t,n){this._firestore=e,this._originalQuery=t,this._snapshot=n,this._cachedChanges=null,this._cachedChangesIncludeMetadataChanges=null,this.metadata=new ua(n.hasPendingWrites,n.fromCache)}return Object.defineProperty(e.prototype,"docs",{get:function(){var e=[];return this.forEach(function(t){return e.push(t)}),e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"empty",{get:function(){return this._snapshot.docs.isEmpty()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this._snapshot.docs.size},enumerable:!0,configurable:!0}),e.prototype.forEach=function(e,t){var n=this;k("QuerySnapshot.forEach",arguments,1,2),w("QuerySnapshot.forEach","function",1,e),this._snapshot.docs.forEach(function(r){e.call(t,n.convertToDocumentImpl(r))})},Object.defineProperty(e.prototype,"query",{get:function(){return new ga(this._originalQuery,this._firestore)},enumerable:!0,configurable:!0}),e.prototype.docChanges=function(e){P("QuerySnapshot.docChanges",e,["includeMetadataChanges"]),e&&_("QuerySnapshot.docChanges","boolean","includeMetadataChanges",e.includeMetadataChanges);var t=e&&e.includeMetadataChanges;if(t&&this._snapshot.excludesMetadataChanges)throw new gt(mt.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===t||(this._cachedChanges=Je(this._firestore,t,this._snapshot),this._cachedChangesIncludeMetadataChanges=t),this._cachedChanges},e.prototype.isEqual=function(t){if(!(t instanceof e))throw B("isEqual","QuerySnapshot",1,t);return this._firestore===t._firestore&&this._originalQuery.isEqual(t._originalQuery)&&this._snapshot.isEqual(t._snapshot)},e.prototype.convertToDocumentImpl=function(e){return new ma(this._firestore,e.key,e,this.metadata.fromCache)},e}(),ya=["length","forEach","map"].concat("undefined"==typeof Symbol?[]:[Symbol.iterator]);ya.forEach(function(e){try{Object.defineProperty(fa.prototype.docChanges,e,{get:function(){return Ge()}})}catch(e){}});var ba=function(e){function t(t,n){var r=e.call(this,rn.atPath(t),n)||this;if(1!=t.length%2)throw new gt(mt.INVALID_ARGUMENT,"Invalid collection reference. Collection references must have an odd number of segments, but "+(t.canonicalString()+" has "+t.length));return r}return lt.__extends(t,e),Object.defineProperty(t.prototype,"id",{get:function(){return this._query.path.lastSegment()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){var e=this._query.path.popLast();return e.isEmpty()?null:new ca(new It(e),this.firestore)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return this._query.path.canonicalString()},enumerable:!0,configurable:!0}),t.prototype.doc=function(e){if(k("CollectionReference.doc",arguments,0,1),0===arguments.length&&(e=ft.newId()),w("CollectionReference.doc","string",1,e),""===e)throw new gt(mt.INVALID_ARGUMENT,"Document path must be a non-empty string");var t=_t.fromString(e);return ca.forPath(this._query.path.child(t),this.firestore)},t.prototype.add=function(e){x("CollectionReference.add",arguments,1),w("CollectionReference.add","object",1,e);var t=this.doc();return t.set(e).then(function(){return t})},t}(ga),xa=u(la,"Use firebase.firestore() instead."),va=u(da,"Use firebase.firestore().runTransaction() instead."),ka=u(pa,"Use firebase.firestore().batch() instead."),Sa=u(ca,"Use firebase.firestore().doc() instead."),wa=u(ha),Ca=u(ma),Ta=u(ga),_a=u(fa),Ea=u(ba,"Use firebase.firestore().collection() instead."),Aa={Firestore:xa,GeoPoint:xt,Timestamp:vt,Blob:bt,Transaction:va,WriteBatch:ka,DocumentReference:Sa,DocumentSnapshot:wa,Query:Ta,QueryDocumentSnapshot:Ca,QuerySnapshot:_a,CollectionReference:Ea,FieldPath:dr,FieldValue:Jo,setLogLevel:la.setLogLevel};et(it),t.registerFirestore=et},"ew/s":function(e,t,n){"use strict";(function(e){e(n("tQq4"),n("4e7A"))})(function(e){function t(e,t,n,r,o){e.openDialog?e.openDialog(t,o,{value:r,selectValueOnOpen:!0}):o(prompt(n,r))}function n(e,t){var n=+t;return /^[-+]/.test(t)?e.getCursor().line+n:n-1}e.commands.jumpToLine=function(e){var r=e.getCursor();t(e,"Jump to line: (Use line:column or scroll% syntax)","Jump to line:",r.line+1+":"+r.ch,function(t){if(t){var o;if(o=/^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(t))e.setCursor(n(e,o[1]),+o[2]);else if(o=/^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(t)){var i=Math.round(e.lineCount()*+o[1]/100);/^[-+]/.test(o[1])&&(i=r.line+i+1),e.setCursor(i-1,r.ch)}else(o=/^\s*\:?\s*([\+\-]?\d+)\s*/.exec(t))&&e.setCursor(n(e,o[1]),r.ch)}})},e.keyMap["default"]["Alt-G"]="jumpToLine"})},f4vO:function(e,t,n){"use strict";var r=n("tbG5").assign,o=n("nFS2"),i=n("faQk"),s=n("xUUw"),l={};r(l,o,i,s),e.exports=l},fOjT:function(e,t,n){"use strict";e.exports=n("fnRj")},faQk:function(e,t,n){"use strict";function r(e){if(!(this instanceof r))return new r(e);this.options=s.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&0<=t.windowBits&&16>t.windowBits&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),0<=t.windowBits&&16>t.windowBits&&!(e&&e.windowBits)&&(t.windowBits+=32),15t.windowBits&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var n=i.inflateInit2(this.strm,t.windowBits);if(n!==d.Z_OK)throw new Error(p[n]);this.header=new u,i.inflateGetHeader(this.strm,this.header)}function o(e,t){var n=new r(t);if(n.push(e,!0),n.err)throw n.msg||p[n.err];return n.result}var i=n("GIDK"),s=n("tbG5"),l=n("34Q3"),d=n("xUUw"),p=n("gMAY"),c=n("bdtv"),u=n("/+WI"),h=Object.prototype.toString;r.prototype.push=function(e,t){var n=this.strm,r=this.options.chunkSize,o=this.options.dictionary,p=!1,c,u,m,g,f,y;if(this.ended)return!1;u=t===~~t?t:!0===t?d.Z_FINISH:d.Z_NO_FLUSH,n.input="string"==typeof e?l.binstring2buf(e):"[object ArrayBuffer]"===h.call(e)?new Uint8Array(e):e,n.next_in=0,n.avail_in=n.input.length;do{if(0===n.avail_out&&(n.output=new s.Buf8(r),n.next_out=0,n.avail_out=r),c=i.inflate(n,d.Z_NO_FLUSH),c===d.Z_NEED_DICT&&o&&(y="string"==typeof o?l.string2buf(o):"[object ArrayBuffer]"===h.call(o)?new Uint8Array(o):o,c=i.inflateSetDictionary(this.strm,y)),c===d.Z_BUF_ERROR&&!0==p&&(c=d.Z_OK,p=!1),c!==d.Z_STREAM_END&&c!==d.Z_OK)return this.onEnd(c),this.ended=!0,!1;n.next_out&&(0===n.avail_out||c===d.Z_STREAM_END||0===n.avail_in&&(u===d.Z_FINISH||u===d.Z_SYNC_FLUSH))&&("string"===this.options.to?(m=l.utf8border(n.output,n.next_out),g=n.next_out-m,f=l.buf2string(n.output,m),n.next_out=g,n.avail_out=r-g,g&&s.arraySet(n.output,n.output,m,g,0),this.onData(f)):this.onData(s.shrinkBuf(n.output,n.next_out))),0===n.avail_in&&0===n.avail_out&&(p=!0)}while((0o)return v(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special");e.seen.push(r);var n;return n=T?c(e,r,o,y,f):f.map(function(t){return u(e,r,o,y,t,T)}),e.seen.pop(),h(n,k,_)}function d(e,t){if(x(t))return e.stylize("undefined","undefined");if(b(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,"\"")+"'";return e.stylize(n,"string")}return f(t)?e.stylize(""+t,"number"):g(t)?e.stylize(""+t,"boolean"):y(t)?e.stylize("null","null"):void 0}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function c(e,t,n,r,o){for(var s=[],d=0,i=t.length;de.seen.indexOf(p.value)?(d=y(n)?l(e,p.value,null):l(e,p.value,n-1),-1e?"0"+e.toString(10):e.toString(10)}function E(){var e=new Date,t=[_(e.getHours()),_(e.getMinutes()),_(e.getSeconds())].join(":");return[e.getDate(),O[e.getMonth()],t].join(" ")}function A(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var I=/%[sdj%]/g;t.format=function(e){if(!b(e)){for(var t=[],n=0;n=i)return e;switch(e){case"%s":return o[n++]+"";case"%d":return+o[n++];case"%j":try{return JSON.stringify(o[n++])}catch(e){return"[Circular]"}default:return e;}}),l=o[n];n*\/]/.test(n)?r(null,"select-op"):"."==n&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?r("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?r(null,n):("u"==n||"U"==n)&&e.match(/rl(-prefix)?\(/i)||("d"==n||"D"==n)&&e.match("omain(",!0,!0)||("r"==n||"R"==n)&&e.match("egexp(",!0,!0)?(e.backUp(1),t.tokenize=s,r("property","word")):/[\w\\\-]/.test(n)?(e.eatWhile(/[\w\\\-]/),r("property","word")):r(null,null)}function i(e){return function(t,n){for(var o=!1,i;null!=(i=t.next());){if(i==e&&!o){")"==e&&t.backUp(1);break}o=!o&&"\\"==i}return i!=e&&(o||")"==e)||(n.tokenize=null),r("string","string")}}function s(e,t){return e.next(),t.tokenize=e.match(/\s*[\"\')]/,!1)?null:i(")"),r(null,"(")}function l(e,t,n){this.type=e,this.indent=t,this.prev=n}function d(e,t,n,r){return e.context=new l(n,t.indentation()+(!1===r?0:g),e.context),n}function p(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function c(e,t,n){return N[n.context.type](e,t,n)}function u(e,t,r,o){for(var n=o||1;0=l&&(l=p,s=i)}return l>=o?s:null}function b(e,t){var n=e&&"object"==typeof e?e[t]:e,r=(n||"").match(/^[\w-@]+/);return r?r[0]:n}function x(e,t){for(var n=0,r=0;nr&&(r=e.index)}),-1!==r&&(t.index=r+1),n}t.__esModule=!0;var l=Object.assign||function(e){for(var t=1,n;t"),V=function(e){var t=e.pos;if(g(e,j,q,!0)){var n=E(e,t);return n.type="comment",n}return null},W=f(""),K=function(e){var t=e.pos;if(g(e,W,H,!0)){var n=E(e,t);return n.type="cdata",n}return null},G={xml:!1,special:["script","style"],empty:["img","meta","link","br","base","hr","area","wbr","col","embed","input","param","source","track"]};t.defaultOptions=G,t.match=y,t.default=function(e,t){t=k({},G,t);for(var n="string"==typeof e?new C.default(e):e,r=new _(n,"root"),o=new Set(t.empty),s=t.special.reduce(function(e,t){return e.set(t,f(""))},new Map),l=function(e,n){return e.selfClosing||!t.xml&&o.has(n)},d=void 0,p=void 0,c=void 0,u=[r];!n.eof();)if(!(d=y(n)))n.next();else if(c=x(d),"open"===d.type)p=new _(n,"tag",d),v(u).addChild(p),s.has(c)?p.close=b(n,s.get(c)):!l(d,c)&&u.push(p);else if("close"===d.type){for(var h=u.length-1;0=this.size-(this.bMin+A+this.bGutterSize)&&(e=this.size-(this.bMin+this.bGutterSize)),g.call(this,e),u.onDrag&&u.onDrag())}function y(){var e=t.getComputedStyle(this.parent),n=this.parent[R]-parseFloat(e[F]||0)-parseFloat(e[U]||0);this.size=this.a[o]()[D]+this.b[o]()[D]+this.aGutterSize+this.bGutterSize,this.percentage=Math.min(100*(this.size/n),100),this.start=this.a[o]()[B]}function x(){var e=this,n=e.a,o=e.b;e.dragging&&u.onDragEnd&&u.onDragEnd(),e.dragging=!1,t[r]("mouseup",e.stop),t[r]("touchend",e.stop),t[r]("touchcancel",e.stop),e.parent[r]("mousemove",e.move),e.parent[r]("touchmove",e.move),delete e.stop,delete e.move,n[r]("selectstart",i),n[r]("dragstart",i),o[r]("selectstart",i),o[r]("dragstart",i),n.style.userSelect="",n.style.webkitUserSelect="",n.style.MozUserSelect="",n.style.pointerEvents="",o.style.userSelect="",o.style.webkitUserSelect="",o.style.MozUserSelect="",o.style.pointerEvents="",e.gutter.style.cursor="",e.parent.style.cursor=""}function b(r){var e=this,o=e.a,s=e.b;!e.dragging&&u.onDragStart&&u.onDragStart(),r.preventDefault(),e.dragging=!0,e.move=f.bind(e),e.stop=x.bind(e),t[n]("mouseup",e.stop),t[n]("touchend",e.stop),t[n]("touchcancel",e.stop),e.parent[n]("mousemove",e.move),e.parent[n]("touchmove",e.move),o[n]("selectstart",i),o[n]("dragstart",i),s[n]("selectstart",i),s[n]("dragstart",i),o.style.userSelect="none",o.style.webkitUserSelect="none",o.style.MozUserSelect="none",o.style.pointerEvents="none",s.style.userSelect="none",s.style.webkitUserSelect="none",s.style.MozUserSelect="none",s.style.pointerEvents="none",e.gutter.style.cursor=N,e.parent.style.cursor=N,y.call(e)}function v(e){e.forEach(function(t,n){if(0t.windowBits&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new p,this.strm.avail_out=0;var n=i.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==h)throw new Error(d[n]);if(t.header&&i.deflateSetHeader(this.strm,t.header),t.dictionary){var o;if(o="string"==typeof t.dictionary?l.string2buf(t.dictionary):"[object ArrayBuffer]"===c.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,n=i.deflateSetDictionary(this.strm,o),n!==h)throw new Error(d[n]);this._dict_set=!0}}function o(e,t){var n=new r(t);if(n.push(e,!0),n.err)throw n.msg||d[n.err];return n.result}var i=n("+BLB"),s=n("tbG5"),l=n("34Q3"),d=n("gMAY"),p=n("bdtv"),c=Object.prototype.toString,u=4,h=0,m=1,g=2,f=-1,y=0,b=8;r.prototype.push=function(e,t){var n=this.strm,r=this.options.chunkSize,o,d;if(this.ended)return!1;d=t===~~t?t:!0===t?u:0,n.input="string"==typeof e?l.string2buf(e):"[object ArrayBuffer]"===c.call(e)?new Uint8Array(e):e,n.next_in=0,n.avail_in=n.input.length;do{if(0===n.avail_out&&(n.output=new s.Buf8(r),n.next_out=0,n.avail_out=r),o=i.deflate(n,d),o!==m&&o!==h)return this.onEnd(o),this.ended=!0,!1;(0===n.avail_out||0===n.avail_in&&(d===u||d===g))&&("string"===this.options.to?this.onData(l.buf2binstring(s.shrinkBuf(n.output,n.next_out))):this.onData(s.shrinkBuf(n.output,n.next_out)))}while((0e;e++)n.execCommand("goCharRight");else if("surround"==x){for(var t=n.getSelections(),e=0;e"))return o("=>","operator");if("0"==n&&e.match(/^(?:x[\da-f]+|o[0-7]+|b[01]+)n?/i))return o("number","number");if(/\d/.test(n))return e.match(/^\d*(?:n|(?:\.\d*)?(?:[eE][+\-]?\d+)?)?/),o("number","number");if("/"==n)return e.eat("*")?(t.tokenize=l,l(e,t)):e.eat("/")?(e.skipToEnd(),o("comment","comment")):Fe(e,t,1)?(r(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),o("regexp","string-2")):(e.eat("="),o("operator","operator",e.current()));if("`"==n)return t.tokenize=d,d(e,t);if("#"==n)return e.skipToEnd(),o("error","error");if(Ke.test(n))return">"==n&&t.lexical&&">"==t.lexical.type||(e.eat("=")?("!"==n||"="==n)&&e.eat("="):/[<>*+\-]/.test(n)&&(e.eat(n),">"==n&&e.eat(n))),o("operator","operator",e.current());if(We.test(n)){e.eatWhile(We);var s=e.current();if("."!=t.lastType){if(He.propertyIsEnumerable(s)){var p=He[s];return o(p.type,p.style,s)}if("async"==s&&e.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,!1))return o("async","keyword",s)}return o("variable","variable",s)}}function i(e){return function(t,n){var r=!1,i;if(je&&"@"==t.peek()&&t.match(Ge))return n.tokenize=s,o("jsonld-keyword","meta");for(;null!=(i=t.next())&&(i!=e||r);)r=!r&&"\\"==i;return r||(n.tokenize=s),o("string","string")}}function l(e,t){for(var n=!1,r;r=e.next();){if("/"==r&&n){t.tokenize=s;break}n="*"==r}return o("comment","comment")}function d(e,t){for(var n=!1,r;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=s;break}n=!n&&"\\"==r}return o("quasi","string-2",e.current())}function p(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(0>n)){if(Ve){var r=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,n));r&&(n=r.index)}for(var o=0,i=!1,s=n-1;0<=s;--s){var l=e.string.charAt(s),d=Xe.indexOf(l);if(0<=d&&3>d){if(!o){++s;break}if(0==--o){"("==l&&(i=!0);break}}else if(3<=d&&6>d)++o;else if(We.test(l))i=!0;else{if(/["'\/]/.test(l))return;if(i&&!o){++s;break}}}i&&!o&&(t.fatArrowAt=s)}}function c(e,t,n,r,o,i){this.indented=e,this.column=t,this.type=n,this.prev=o,this.info=i,null!=r&&(this.align=r)}function u(e,t){for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(var n=r.vars;n;n=n.next)if(n.name==t)return!0}function h(e,t,n,r,o){var i=e.cc;for(Ye.state=e,Ye.stream=o,Ye.marked=null,Ye.cc=i,Ye.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){var s=i.length?i.pop():qe?N:A;if(s(n,r)){for(;i.length&&i[i.length-1].lex;)i.pop()();return Ye.marked?Ye.marked:"variable"==n&&u(e,r)?"variable-2":t}}}function g(){for(var e=arguments.length-1;0<=e;e--)Ye.cc.push(arguments[e])}function f(){return g.apply(null,arguments),!0}function m(e,t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}function y(e){var t=Ye.state;if(Ye.marked="def",t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var r=b(e,t.context);if(null!=r)return void(t.context=r)}else if(!m(e,t.localVars))return void(t.localVars=new k(e,t.localVars));n.globalVars&&!m(e,t.globalVars)&&(t.globalVars=new k(e,t.globalVars))}function b(e,t){if(!t)return null;if(t.block){var n=b(e,t.prev);return n?n==t.prev?t:new v(n,t.vars,!0):null}return m(e,t.vars)?t:new v(t.prev,new k(e,t.vars),!1)}function x(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function v(e,t,n){this.prev=e,this.vars=t,this.block=n}function k(e,t){this.name=e,this.next=t}function S(){Ye.state.context=new v(Ye.state.context,Ye.state.localVars,!1),Ye.state.localVars=Je}function w(){Ye.state.context=new v(Ye.state.context,Ye.state.localVars,!0),Ye.state.localVars=null}function C(){Ye.state.localVars=Ye.state.context.vars,Ye.state.context=Ye.state.context.prev}function T(e,t){var n=function(){var n=Ye.state,r=n.indented;if("stat"==n.lexical.type)r=n.lexical.indented;else for(var o=n.lexical;o&&")"==o.type&&o.align;o=o.prev)r=o.indented;n.lexical=new c(r,Ye.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function E(){var e=Ye.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function _(e){function t(n){return n==e?f():";"==e?g():f(t)}return t}function A(e,t){return"var"==e?f(T("vardef",t),de,_(";"),E):"keyword a"==e?f(T("form"),O,A,E):"keyword b"==e?f(T("form"),A,E):"keyword d"==e?Ye.stream.match(/^\s*$/,!1)?f():f(T("stat"),D,_(";"),E):"debugger"==e?f(_(";")):"{"==e?f(T("}"),w,J,E,C):";"==e?f():"if"==e?("else"==Ye.state.lexical.info&&Ye.state.cc[Ye.state.cc.length-1]==E&&Ye.state.cc.pop()(),f(T("form"),O,A,E,me)):"function"==e?f(ve):"for"==e?f(T("form"),ge,A,E):"class"==e||Ve&&"interface"==t?(Ye.marked="keyword",f(T("form"),we,E)):"variable"==e?Ve&&"declare"==t?(Ye.marked="keyword",f(A)):Ve&&("module"==t||"enum"==t||"type"==t)&&Ye.stream.match(/^\s*\w/,!1)?(Ye.marked="keyword","enum"==t?f(Re):"type"==t?f(te,_("operator"),te,_(";")):f(T("form"),pe,_("{"),T("}"),J,E,E)):Ve&&"namespace"==t?(Ye.marked="keyword",f(T("form"),N,J,E)):Ve&&"abstract"==t?(Ye.marked="keyword",f(A)):f(T("stat"),W):"switch"==e?f(T("form"),O,_("{"),T("}","switch"),w,J,E,E,C):"case"==e?f(N,_(":")):"default"==e?f(_(":")):"catch"==e?f(T("form"),S,I,A,E,C):"export"==e?f(T("stat"),Ee,E):"import"==e?f(T("stat"),Ie,E):"async"==e?f(A):"@"==t?f(N,A):g(T("stat"),N,_(";"),E)}function I(e){if("("==e)return f(ke,_(")"))}function N(e,t){return M(e,t,!1)}function L(e,t){return M(e,t,!0)}function O(e){return"("==e?f(T(")"),N,_(")"),E):g()}function M(e,t,n){if(Ye.state.fatArrowAt==Ye.stream.start){var r=n?z:U;if("("==e)return f(S,T(")"),Q(ke,")"),E,_("=>"),r,C);if("variable"==e)return g(S,pe,_("=>"),r,C)}var o=n?P:R;return Qe.hasOwnProperty(e)?f(o):"function"==e?f(ve,o):"class"==e||Ve&&"interface"==t?(Ye.marked="keyword",f(T("form"),Se,E)):"keyword c"==e||"async"==e?f(n?L:N):"("==e?f(T(")"),D,_(")"),E,o):"operator"==e||"spread"==e?f(n?L:N):"["==e?f(T("]"),De,E,o):"{"==e?Y(K,"}",null,o):"quasi"==e?g(B,o):"new"==e?f(j(n)):"import"==e?f(N):f()}function D(e){return e.match(/[;\}\)\],]/)?g():g(N)}function R(e,t){return","==e?f(N):P(e,t,!1)}function P(e,t,n){var r=!1==n?R:P,o=!1==n?N:L;return"=>"==e?f(S,n?z:U,C):"operator"==e?/\+\+|--/.test(t)||Ve&&"!"==t?f(r):Ve&&"<"==t&&Ye.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?f(T(">"),Q(te,">"),E,r):"?"==t?f(N,_(":"),o):f(o):"quasi"==e?g(B,r):";"==e?void 0:"("==e?Y(L,")","call",r):"."==e?f(H,r):"["==e?f(T("]"),D,_("]"),E,r):Ve&&"as"==t?(Ye.marked="keyword",f(te,r)):"regexp"==e?(Ye.state.lastType=Ye.marked="operator",Ye.stream.backUp(Ye.stream.pos-Ye.stream.start-1),f(o)):void 0}function B(e,t){return"quasi"==e?"${"==t.slice(t.length-2)?f(N,F):f(B):g()}function F(e){if("}"==e)return Ye.marked="string-2",Ye.state.tokenize=d,f(B)}function U(e){return p(Ye.stream,Ye.state),g("{"==e?A:N)}function z(e){return p(Ye.stream,Ye.state),g("{"==e?A:L)}function j(e){return function(t){return"."==t?f(e?V:q):"variable"==t&&Ve?f(ie,e?P:R):g(e?L:N)}}function q(e,t){if("target"==t)return Ye.marked="keyword",f(R)}function V(e,t){if("target"==t)return Ye.marked="keyword",f(P)}function W(e){return":"==e?f(E,A):g(R,_(";"),E)}function H(e){if("variable"==e)return Ye.marked="property",f()}function K(e,t){if("async"==e)return Ye.marked="property",f(K);if("variable"==e||"keyword"==Ye.style){if(Ye.marked="property","get"==t||"set"==t)return f(G);var n;return Ve&&Ye.state.fatArrowAt==Ye.stream.start&&(n=Ye.stream.match(/^\s*:\s*/,!1))&&(Ye.state.fatArrowAt=Ye.stream.pos+n[0].length),f(X)}return"number"==e||"string"==e?(Ye.marked=je?"property":Ye.style+" property",f(X)):"jsonld-keyword"==e?f(X):Ve&&x(t)?(Ye.marked="keyword",f(K)):"["==e?f(N,$,_("]"),X):"spread"==e?f(L,X):"*"==t?(Ye.marked="keyword",f(K)):":"==e?g(X):void 0}function G(e){return"variable"==e?(Ye.marked="property",f(ve)):g(X)}function X(e){return":"==e?f(L):"("==e?g(ve):void 0}function Q(e,t,n){function r(o,i){if(n?-1"),te):void 0}function ne(e){if("=>"==e)return f(te)}function re(e,t){return"variable"==e||"keyword"==Ye.style?(Ye.marked="property",f(re)):"?"==t?f(re):":"==e?f(te):"["==e?f(N,$,_("]"),re):void 0}function oe(e,t){return"variable"==e&&Ye.stream.match(/^\s*[?:]/,!1)||"?"==t?f(oe):":"==e?f(te):g(te)}function ae(e,t){return"<"==t?f(T(">"),Q(te,">"),E,ae):"|"==t||"."==e||"&"==t?f(te):"["==e?f(_("]"),ae):"extends"==t||"implements"==t?(Ye.marked="keyword",f(te)):void 0}function ie(e,t){if("<"==t)return f(T(">"),Q(te,">"),E,ae)}function se(){return g(te,le)}function le(e,t){if("="==t)return f(te)}function de(e,t){return"enum"==t?(Ye.marked="keyword",f(Re)):g(pe,$,ue,he)}function pe(e,t){return Ve&&x(t)?(Ye.marked="keyword",f(pe)):"variable"==e?(y(t),f()):"spread"==e?f(pe):"["==e?Y(pe,"]"):"{"==e?Y(ce,"}"):void 0}function ce(e,t){return"variable"!=e||Ye.stream.match(/^\s*:/,!1)?("variable"==e&&(Ye.marked="property"),"spread"==e?f(pe):"}"==e?g():f(_(":"),pe,ue)):(y(t),f(ue))}function ue(e,t){if("="==t)return f(L)}function he(e){if(","==e)return f(de)}function me(e,t){if("keyword b"==e&&"else"==t)return f(T("form","else"),A,E)}function ge(e,t){return"await"==t?f(ge):"("==e?f(T(")"),fe,_(")"),E):void 0}function fe(e){return"var"==e?f(de,_(";"),be):";"==e?f(be):"variable"==e?f(ye):g(N,_(";"),be)}function ye(e,t){return"in"==t||"of"==t?(Ye.marked="keyword",f(N)):f(R,be)}function be(e,t){return";"==e?f(xe):"in"==t||"of"==t?(Ye.marked="keyword",f(N)):g(N,_(";"),xe)}function xe(e){")"!=e&&f(N)}function ve(e,t){return"*"==t?(Ye.marked="keyword",f(ve)):"variable"==e?(y(t),f(ve)):"("==e?f(S,T(")"),Q(ke,")"),E,Z,A,C):Ve&&"<"==t?f(T(">"),Q(se,">"),E,ve):void 0}function ke(e,t){return"@"==t&&f(N,ke),"spread"==e?f(ke):Ve&&x(t)?(Ye.marked="keyword",f(ke)):g(pe,$,ue)}function Se(e,t){return"variable"==e?we(e,t):Ce(e,t)}function we(e,t){if("variable"==e)return y(t),f(Ce)}function Ce(e,t){return"<"==t?f(T(">"),Q(se,">"),E,Ce):"extends"==t||"implements"==t||Ve&&","==e?("implements"==t&&(Ye.marked="keyword"),f(Ve?te:N,Ce)):"{"==e?f(T("}"),Te,E):void 0}function Te(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||Ve&&x(t))&&Ye.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(Ye.marked="keyword",f(Te)):"variable"==e||"keyword"==Ye.style?(Ye.marked="property",f(Ve?_e:ve,Te)):"["==e?f(N,$,_("]"),Ve?_e:ve,Te):"*"==t?(Ye.marked="keyword",f(Te)):";"==e?f(Te):"}"==e?f():"@"==t?f(N,Te):void 0}function _e(e,t){return"?"==t?f(_e):":"==e?f(te,ue):"="==t?f(L):g(ve)}function Ee(e,t){return"*"==t?(Ye.marked="keyword",f(Me,_(";"))):"default"==t?(Ye.marked="keyword",f(N,_(";"))):"{"==e?f(Q(Ae,"}"),Me,_(";")):g(A)}function Ae(e,t){return"as"==t?(Ye.marked="keyword",f(_("variable"))):"variable"==e?g(L,Ae):void 0}function Ie(e){return"string"==e?f():"("==e?g(N):g(Ne,Le,Me)}function Ne(e,t){return"{"==e?Y(Ne,"}"):("variable"==e&&y(t),"*"==t&&(Ye.marked="keyword"),f(Oe))}function Le(e){if(","==e)return f(Ne,Le)}function Oe(e,t){if("as"==t)return Ye.marked="keyword",f(Ne)}function Me(e,t){if("from"==t)return Ye.marked="keyword",f(N)}function De(e){return"]"==e?f():g(Q(L,"]"))}function Re(){return g(T("form"),pe,_("{"),T("}"),Q(Pe,"}"),E,E)}function Pe(){return g(pe,ue)}function Be(e,t){return"operator"==e.lastType||","==e.lastType||Ke.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function Fe(e,t,n){return t.tokenize==s&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(n||0)))}var Ue=t.indentUnit,ze=n.statementIndent,je=n.jsonld,qe=n.json||je,Ve=n.typescript,We=n.wordCharacters||/[\w$\xa1-\uffff]/,He=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),n=e("keyword b"),r=e("keyword c"),o=e("keyword d"),i=e("operator"),s={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:n,do:n,try:n,finally:n,return:o,break:o,continue:o,new:e("new"),delete:r,void:r,throw:r,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:i,typeof:i,instanceof:i,true:s,false:s,null:s,undefined:s,NaN:s,Infinity:s,this:e("this"),class:e("class"),super:e("atom"),yield:r,export:e("export"),import:e("import"),extends:r,await:r}}(),Ke=/[+\-*&%=<>!?|~^@]/,Ge=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Xe="([{}])",Qe={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},Ye={state:null,column:null,marked:null,cc:null},Je=new k("this",new k("arguments",null)),$e,Ze;return C.lex=!0,E.lex=!0,{startState:function(e){var t={tokenize:s,lastType:"sof",cc:[],lexical:new c((e||0)-Ue,0,"block",!1),localVars:n.localVars,context:n.localVars&&new v(null,null,!1),indented:e||0};return n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(!t.lexical.hasOwnProperty("align")&&(t.lexical.align=!1),t.indented=e.indentation(),p(e,t)),t.tokenize!=l&&e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==$e?n:(t.lastType="operator"==$e&&("++"==Ze||"--"==Ze)?"incdec":$e,h(t,n,$e,Ze,e))},indent:function(t,r){if(t.tokenize==l)return e.Pass;if(t.tokenize!=s)return 0;var o=r&&r.charAt(0),d=t.lexical,p;if(!/^\s*else\b/.test(r))for(var u=t.cc.length-1,i;0<=u;--u)if(i=t.cc[u],i==E)d=d.prev;else if(i!=me)break;for(;("stat"==d.type||"form"==d.type)&&("}"==o||(p=t.cc[t.cc.length-1])&&(p==R||p==P)&&!/^[,\.=+\-*:?[\(]/.test(r));)d=d.prev;ze&&")"==d.type&&"stat"==d.prev.type&&(d=d.prev);var c=d.type,h=o==c;return"vardef"==c?d.indented+("operator"==t.lastType||","==t.lastType?d.info.length+1:0):"form"==c&&"{"==o?d.indented:"form"==c?d.indented+Ue:"stat"==c?d.indented+(Be(t,r)?ze||Ue:0):"switch"!=d.info||h||!1==n.doubleIndentSwitch?d.align?d.column+(h?0:1):d.indented+(h?0:Ue):d.indented+(/^(?:case|default)\b/.test(r)?Ue:2*Ue)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:qe?null:"/*",blockCommentEnd:qe?null:"*/",blockCommentContinue:qe?null:" * ",lineComment:qe?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:qe?"json":"javascript",jsonldMode:je,jsonMode:qe,expressionAllowed:Fe,skipExpression:function(e){var t=e.cc[e.cc.length-1];(t==N||t==L)&&e.cc.pop()}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})})},rAgE:function(e,t,n){"use strict";function r(e){this.files=[],this.loadOptions=e}var o=n("9Uuy"),i=n("dvMn"),s=n("Ctqd"),l=n("dFUs"),d=n("Sm7/"),p=n("untT");r.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var t=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+i.pretty(t)+", expected "+i.pretty(e)+")")}},isSignature:function(e,t){var n=this.reader.index;this.reader.setIndex(e);var r=this.reader.readString(4);return this.reader.setIndex(n),r===t},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var e=this.reader.readData(this.zipCommentLength),t=p.uint8array?"uint8array":"array",n=i.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(n)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var e=this.zip64EndOfCentralSize-44,t,n,r;0e){var t=!this.isSignature(0,s.LOCAL_FILE_HEADER);if(t)throw new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");else throw new Error("Corrupted zip: can't find end of central directory")}this.reader.setIndex(e);var n=e;if(this.checkSignature(s.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===i.MAX_VALUE_16BITS||this.diskWithCentralDirStart===i.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===i.MAX_VALUE_16BITS||this.centralDirRecords===i.MAX_VALUE_16BITS||this.centralDirSize===i.MAX_VALUE_32BITS||this.centralDirOffset===i.MAX_VALUE_32BITS){if(this.zip64=!0,e=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR),0>e)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(e),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,s.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_END),0>this.relativeOffsetEndOfZip64CentralDir))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var r=this.centralDirOffset+this.centralDirSize;this.zip64&&(r+=20,r+=12+this.zip64EndOfCentralSize);var o=n-r;if(0o)throw new Error("Corrupted zip: missing "+Math.abs(o)+" bytes.")},prepareReader:function(e){this.reader=o(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},e.exports=r},rbVD:function(e,t,n){"use strict";var r=Math.max;(function(e){e(n("tQq4"))})(function(e){function t(e,t){this.cm=e,this.options=t,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length;var n=this;e.on("cursorActivity",this.activityFunc=function(){n.cursorActivity()})}function n(e,t,n){var r=e.options.hintOptions,o={};for(var i in g)o[i]=g[i];if(r)for(var i in r)void 0!==r[i]&&(o[i]=r[i]);if(n)for(var i in n)void 0!==n[i]&&(o[i]=n[i]);return o.hint.resolve&&(o.hint=o.hint.resolve(e,t)),o}function o(e){return"string"==typeof e?e:e.text}function s(e,t){function n(e,n){var o;o="string"==typeof n?r.hasOwnProperty(n)?r[n]:n:function(e){return n(e,t)},i[e]=o}var r={Up:function(){t.moveFocus(-1)},Down:function(){t.moveFocus(1)},PageUp:function(){t.moveFocus(-t.menuSize()+1,!0)},PageDown:function(){t.moveFocus(t.menuSize()-1,!0)},Home:function(){t.setFocus(0)},End:function(){t.setFocus(t.length-1)},Enter:t.pick,Tab:t.pick,Esc:t.close},o=e.options.customKeys,i=o?{}:r;if(o)for(var s in o)o.hasOwnProperty(s)&&n(s,o[s]);var l=e.options.extraKeys;if(l)for(var s in l)l.hasOwnProperty(s)&&n(s,l[s]);return i}function i(e,t){for(;t&&t!=e;){if("LI"===t.nodeName.toUpperCase()&&t.parentNode==e)return t;t=t.parentNode}}function l(n,t){this.completion=n,this.data=t,this.picked=!1;var l=this,d=n.cm,p=this.hints=document.createElement("ul");p.className="CodeMirror-hints",this.selectedHint=t.selectedHint||0;for(var h=t.list,m=0;mp.clientHeight+1,E=d.getScrollInfo();if(0w){p.style.height=w-5+"px",p.style.top=(v=b.bottom-C.top)+"px";var N=d.getCursor();t.from.ch!=N.ch&&(b=d.cursorCoords(N),p.style.left=(x=b.left)+"px",C=p.getBoundingClientRect())}}var L=C.right-S;if(0S&&(p.style.width=S-5+"px",L-=C.right-C.left-S),p.style.left=(x=b.left-L)+"px"),_)for(var O=p.firstChild;O;O=O.nextSibling)O.style.paddingRight=d.display.nativeBarWidth+"px";if(d.addKeyMap(this.keyMap=s(n,{moveFocus:function(e,t){l.changeActive(l.selectedHint+e,t)},setFocus:function(e){l.changeActive(e)},menuSize:function(){return l.screenAmount()},length:h.length,close:function(){n.close()},pick:function(){l.pick()},data:t})),n.options.closeOnUnfocus){var M;d.on("blur",this.onBlur=function(){M=setTimeout(function(){n.close()},100)}),d.on("focus",this.onFocus=function(){clearTimeout(M)})}return d.on("scroll",this.onScroll=function(){var e=d.getScrollInfo(),t=d.getWrapperElement().getBoundingClientRect(),r=v+E.top-e.top,o=r-(window.pageYOffset||(document.documentElement||document.body).scrollTop);return k||(o+=p.offsetHeight),o<=t.top||o>=t.bottom?n.close():void(p.style.top=r+"px",p.style.left=x+E.left-e.left+"px")}),e.on(p,"dblclick",function(n){var e=i(p,n.target||n.srcElement);e&&null!=e.hintId&&(l.changeActive(e.hintId),l.pick())}),e.on(p,"click",function(r){var e=i(p,r.target||r.srcElement);e&&null!=e.hintId&&(l.changeActive(e.hintId),n.options.completeOnSingleClick&&l.pick())}),e.on(p,"mousedown",function(){setTimeout(function(){d.focus()},20)}),e.signal(t,"select",h[this.selectedHint],p.childNodes[this.selectedHint]),!0}function d(e,t){if(!e.somethingSelected())return t;for(var n=[],r=0;r=this.data.list.length?t=n?this.data.list.length-1:0:0>t&&(t=n?0:this.data.list.length-1),this.selectedHint!=t){var r=this.hints.childNodes[this.selectedHint];r&&(r.className=r.className.replace(" "+u,"")),r=this.hints.childNodes[this.selectedHint=t],r.className+=" "+u,r.offsetTopthis.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=r.offsetTop+r.offsetHeight-this.hints.clientHeight+3),e.signal(this.data,"select",this.data.list[this.selectedHint],r)}},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}},e.registerHelper("hint","auto",{resolve:function(t,n){var r=t.getHelpers(n,"hint"),o;if(r.length){var i=function(e,t,n){function o(r){return r==s.length?t(null):void p(s[r],e,n,function(e){e&&0,]/,closeOnUnfocus:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null};e.defineOption("hintOptions",null)})},rc1b:function(e,t){"use strict";function n(e){return e===l||e===d}function r(e){return 47e}function o(e,t,n){return t=t||65,n=n||90,e&=-33,e>=t&&e<=n}function i(e){return 32===e||9===e||160===e}t.__esModule=!0;var s=Object.assign||function(e){for(var t=1,n;t=l&&(n=o(i.indicatorOpen))}e.setGutterMarker(t,i.gutter,n),++s})}function s(e){var t=e.getViewport(),n=e.state.foldGutter;n&&(e.operation(function(){i(e,t.from,t.to)}),n.from=t.from,n.to=t.to)}function l(e,t,n){var o=e.state.foldGutter;if(o){var i=o.options;if(n==i.gutter){var s=r(e,t);s?s.clear():e.foldCode(u(t,0),i.rangeFinder)}}}function d(e){var t=e.state.foldGutter;if(t){var n=t.options;t.from=t.to=0,clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){s(e)},n.foldOnChangeTimeSpan||600)}}function p(e){var t=e.state.foldGutter;if(t){var n=t.options;clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){var n=e.getViewport();t.from==t.to||20t.to&&(i(e,t.to,n.to),t.to=n.to)})},n.updateViewportTimeSpan||400)}}function c(e,t){var n=e.state.foldGutter;if(n){var r=t.line;r>=n.from&&rn||n>=t)return i+(t-l);i+=n-l,i+=r-i%r,l=n+1}}function x(e,t){for(var n=0;n=t)return r+s(l,t-o);if(o+=i-r,o+=n-o%n,r=i+1,o>=t)return r}}function S(e){for(;es.length<=e;)es.push(w(es)+" ");return es[e]}function w(e){return e[e.length-1]}function C(e,t){for(var n=[],r=0;rn?0r?-1:1;;){if(n==r)return n;var s=(n+r)/2,l=0>i?t(s):o(s);if(l==n)return e(l)?n:r;e(l)?r=l:n=l+i}}function D(e,t,n){var r=this;this.input=n,r.scrollbarFiller=c("div",null,"CodeMirror-scrollbar-filler"),r.scrollbarFiller.setAttribute("cm-not-content","true"),r.gutterFiller=c("div",null,"CodeMirror-gutter-filler"),r.gutterFiller.setAttribute("cm-not-content","true"),r.lineDiv=u("div",null,"CodeMirror-code"),r.selectionDiv=c("div",null,null,"position: relative; z-index: 1"),r.cursorDiv=c("div",null,"CodeMirror-cursors"),r.measure=c("div",null,"CodeMirror-measure"),r.lineMeasure=c("div",null,"CodeMirror-measure"),r.lineSpace=u("div",[r.measure,r.lineMeasure,r.selectionDiv,r.cursorDiv,r.lineDiv],null,"position: relative; outline: none");var o=u("div",[r.lineSpace],"CodeMirror-lines");r.mover=c("div",[o],null,"position: relative"),r.sizer=c("div",[r.mover],"CodeMirror-sizer"),r.sizerWidth=null,r.heightForcer=c("div",null,null,"position: absolute; height: "+Qi+"px; width: 1px;"),r.gutters=c("div",null,"CodeMirror-gutters"),r.lineGutter=null,r.scroller=c("div",[r.sizer,r.heightForcer,r.gutters],"CodeMirror-scroll"),r.scroller.setAttribute("tabIndex","-1"),r.wrapper=c("div",[r.scrollbarFiller,r.gutterFiller,r.scroller],"CodeMirror"),Ei&&8>Ai&&(r.gutters.style.zIndex=-1,r.scroller.style.paddingRight=0),Ii||wi&&Fi||(r.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(r.wrapper):e(r.wrapper)),r.viewFrom=r.viewTo=t.first,r.reportedViewFrom=r.reportedViewTo=t.first,r.view=[],r.renderedView=null,r.externalMeasured=null,r.viewOffset=0,r.lastWrapHeight=r.lastWrapWidth=0,r.updateLineNumbers=null,r.nativeBarWidth=r.barHeight=r.barWidth=0,r.scrollbarsClipped=!1,r.lineNumWidth=r.lineNumInnerWidth=r.lineNumChars=null,r.alignWidgets=!1,r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.maxLine=null,r.maxLineLength=0,r.maxLineChanged=!1,r.wheelDX=r.wheelDY=r.wheelStartX=r.wheelStartY=null,r.shift=!1,r.selForContextMenu=null,r.activeTouch=null,n.init(r)}function R(e,t){if(t-=e.first,0>t||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 o=n.children[r],i=o.chunkSize();if(t=e.first&&tW(e,t)?t:e}function X(e,t){return 0>W(e,t)?e:t}function Q(e,t){return l(e.first,s(t,e.first+e.size-1))}function Y(e,t){if(t.linen?V(n,R(e,n).text.length):J(t,R(e,t.line).text.length)}function J(e,t){var n=e.ch;return null==n||n>t?V(e.line,t):0>n?V(e.line,0):e}function $(e,t){for(var n=[],r=0;r=t:i.to>t);(r||(r=[])).push(new te(s,i.from,d?null:i.to))}}return r}function se(e,t,n){var r;if(e)for(var o=0;o=t:i.to>t);if(l||i.from==t&&"bookmark"==s.type&&(!n||i.marker.insertLeft)){var d=null==i.from||(s.inclusiveLeft?i.from<=t:i.fromW(c.to,l.from)||0u)&&(i.inclusiveLeft||u)||p.push({from:c.from,to:l.from}),!(0ge(r,o.marker))&&(r=o.marker);return r}function ye(e){return fe(e,!0)}function be(e){return fe(e,!1)}function xe(e,t){var n=os&&e.markedSpans,r;if(n)for(var o=0,i;ot)&&(!r||0>ge(r,i.marker))&&(r=i.marker);return r}function ve(e,t,n,r,o){var s=R(e,t),l=os&&s.markedSpans;if(l)for(var d=0,i;d=u||0>=c&&0<=u)&&(0>=c&&(i.marker.inclusiveRight&&o.inclusiveLeft?0<=W(p.to,n):0=W(p.from,r):0>W(p.from,r))))return!0}}function ke(e){for(var t;t=ye(e);)e=t.find(-1,!0).line;return e}function Se(e){for(var t;t=be(e);)e=t.find(1,!0).line;return e}function we(e){for(var t,n;t=be(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function Ce(e,t){var n=R(e,t),r=ke(n);return n==r?t:U(r)}function Te(e,t){if(t>e.lastLine())return t;var n=R(e,t),r;if(!_e(e,n))return t;for(;r=be(n);)n=r.find(1,!0).line;return U(n)+1}function _e(e,t){var n=os&&t.markedSpans;if(n)for(var r=void 0,o=0;ot.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}function Le(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var o=!1,d=0,i;dt||t==n&&i.to==t)&&(r(l(i.from,t),s(i.to,n),1==i.level?"rtl":"ltr",d),o=!0);o||r(t,n,"ltr")}function Oe(e,t,n){var r;as=null;for(var o=0,i;ot)return o;i.to==t&&(i.from!=i.to&&"before"==n?r=o:as=o),i.from==t&&(i.from!=i.to&&"before"!=n?r=o:as=o)}return null==r?as:r}function Me(e,t){var n=e.order;return null==n&&(n=e.order=is(e.text,t)),n}function De(e,t){return e._handlers&&e._handlers[t]||ss}function Re(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,o=r&&r[t];if(o){var i=x(o,n);-1=t.offsetWidth&&2Ai))}var n=ys?c("span","\u200B"):c("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Xe(e){if(null!=bs)return bs;var t=p(e,document.createTextNode("A\u062EA")),n=Ki(t,0,1).getBoundingClientRect(),r=Ki(t,1,2).getBoundingClientRect();return d(e),n&&n.left!=n.right&&(bs=3>r.right-n.right)}function Qe(e){if(null!=us)return us;var t=p(e,c("span","x")),r=t.getBoundingClientRect(),o=Ki(t,0,1).getBoundingClientRect();return us=1e&&l.splice(c,1,e,l[c+1],r),c+=2,i=s(e,r);if(t)if(o.opaque)l.splice(n,c-n,e,"overlay "+t),c=n+2;else for(;ne.options.maxHighlightLength&&et(e.doc.mode,r.state),i=rt(e,t,r);o&&(r.state=o),t.stateAfter=r.save(!o),t.styles=i.styles,i.classes?t.styleClasses=i.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=l(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function at(e,t,n){var r=e.doc,o=e.display;if(!r.mode.startState)return new vs(r,!0,t);var i=ut(e,t,n),s=i>r.first&&R(r,i-1).stateAfter,l=s?vs.fromSaved(r,s,i):new vs(r,nt(r.mode),i);return r.iter(i,t,function(n){it(e,n.text,l);var r=l.line;n.stateAfter=r==t-1||0==r%5||r>=o.viewFrom&&ro;o++){r&&(r[0]=tt(e,n).mode);var i=e.token(t,n);if(t.pos>t.start)return i}throw new Error("Mode "+e.name+" failed to advance stream.")}function dt(e,t,n,r){var o=e.doc,i=o.mode,s;t=Y(o,t);var l=R(o,t.line),d=at(e,t.line,n),p=new fs(l.text,e.options.tabSize,d),c;for(r&&(c=[]);(r||p.pose.options.maxHighlightLength?(d=!1,l&&it(e,t,r,u.pos),u.pos=t.length,m=null):m=pt(lt(n,u,r.state,h),i),h){var g=h[0].name;g&&(m="m-"+(m?g+" "+m:g))}if(!d||c!=m){for(;po;--i){if(i<=r.first)return r.first;var d=R(r,i-1),p=d.stateAfter;if(p&&(!n||i+(p instanceof xs?p.lookAhead:0)<=r.modeFrontier))return i;var c=v(d.text,null,e.options.tabSize);(null==l||s>c)&&(l=i-1,s=c)}return l}function ht(e,t){if(e.modeFrontier=s(e.modeFrontier,t),!(e.highlightFrontiern;r--)if(o=R(e,r).stateAfter,o&&(!(o instanceof xs)||r+o.lookAheadAi&&(p=!0),e.pos+=t.length;else{u=document.createDocumentFragment();for(var h=0;;){d.lastIndex=h;var g=d.exec(t),f=g?g.index-h:t.length-h;if(f){var y=document.createTextNode(l.slice(h,h+f));Ei&&9>Ai?u.appendChild(c("span",[y])):u.appendChild(y),e.map.push(e.pos,e.pos+f,y),e.col+=f,e.pos+=f}if(!g)break;h+=f+1;var b=void 0;if("\t"==g[0]){var x=e.cm.options.tabSize,v=x-e.col%x;b=u.appendChild(c("span",S(v),"cm-tab")),b.setAttribute("role","presentation"),b.setAttribute("cm-text","\t"),e.col+=v}else"\r"==g[0]||"\n"==g[0]?(b=u.appendChild(c("span","\r"==g[0]?"\u240D":"\u2424","cm-invalidchar")),b.setAttribute("cm-text",g[0]),e.col+=1):(b=e.cm.options.specialCharPlaceholder(g[0]),b.setAttribute("cm-text",g[0]),Ei&&9>Ai?u.appendChild(c("span",[b])):u.appendChild(b),e.col+=1);e.map.push(e.pos,e.pos+1,b),e.pos++}}if(e.trailingSpace=32==l.charCodeAt(t.length-1),n||r||o||p||s){var k=n||"";r&&(k+=r),o&&(k+=o);var w=c("span",[u],k,s);return i&&(w.title=i),e.content.appendChild(w)}e.content.appendChild(u)}}function vt(e,t){if(1c&&h.from<=c));m++);if(h.to>=u)return e(n,r,o,s,l,d,p);e(n,r.slice(0,h.to-c),o,s,null,d,p),s=null,r=r.slice(h.to-c),c=h.to}}}function St(e,t,n,r){var o=!r&&n.widgetNode;o&&e.map.push(e.pos,e.pos+t,o),!r&&e.cm.display.input.needsContentAttribute&&(!o&&(o=e.content.appendChild(document.createElement("span"))),o.setAttribute("cm-marker",n.id)),o&&(e.cm.display.input.setUneditable(o),e.content.appendChild(o)),e.pos+=t,e.trailingSpace=!1}function wt(e,t,n){var r=e.markedSpans,o=e.text,l=0;if(!r){for(var d=1;dc||_.collapsed&&T.to==c&&T.from==c)?(null!=T.to&&T.to!=c&&h>T.to&&(h=T.to,b=""),_.className&&(y+=" "+_.className),_.css&&(f=(f?f+";":"")+_.css),_.startStyle&&T.from==c&&(x+=" "+_.startStyle),_.endStyle&&T.to==h&&(w||(w=[])).push(_.endStyle,T.to),_.title&&!v&&(v=_.title),_.collapsed&&(!k||0>ge(k.marker,_))&&(k=T)):T.from>c&&h>T.from&&(h=T.from)}if(w)for(var m=0;m=p)break;for(var A=s(p,h);;){if(i){var I=c+i.length;if(!k){var N=I>A?i.slice(0,A-c):i;t.addToken(t,N,g?g+y:y,x,c+N.length==h?b:"",v,f)}if(I>=A){i=i.slice(A-c),c=A;break}c=I,x=""}i=o.slice(l,l=n[u++]),g=ft(n[u++],t.cm.options)}}}function Ct(e,t,n){this.line=t,this.rest=we(t),this.size=this.rest?U(w(this.rest))-n+1:1,this.node=this.text=null,this.hidden=_e(e,t)}function Tt(e,t,n){for(var r=[],o=t,i,s;oAi&&(e.node.style.zIndex=2)),e.node}function Mt(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=Ot(t);t.background=r.insertBefore(c("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}function Dt(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):yt(e,t)}function Rt(e,t){var n=t.text.className,r=Dt(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,Pt(e,t)):n&&(t.text.className=n)}function Pt(e,t){Mt(e,t),t.line.wrapClass?Ot(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 Bt(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 o=Ot(t);t.gutterBackground=c("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),o.insertBefore(t.gutterBackground,t.text)}var i=t.line.gutterMarkers;if(e.options.lineNumbers||i){var s=Ot(t),l=t.gutter=c("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(e.display.input.setUneditable(l),s.insertBefore(l,t.text),t.line.gutterClass&&(l.className+=" "+t.line.gutterClass),!e.options.lineNumbers||i&&i["CodeMirror-linenumbers"]||(t.lineNumber=l.appendChild(c("div",q(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),i)for(var d=0;dn)return{map:e.measure.maps[o],cache:e.measure.caches[o],before:!0}}function Zt(e,t){t=ke(t);var n=U(t),r=e.display.externalMeasured=new Ct(e.doc,t,n);r.lineN=n;var o=r.built=yt(e,r);return r.text=o.pre,p(e.display.lineMeasure,o.pre),r}function en(e,t,n,r){return rn(e,nn(e,t),n,r)}function tn(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt)&&(s=p-d,i=s-1,t>=p&&(l="right")),null!=i){if(o=e[r+2],d==p&&n==(o.insertLeft?"left":"right")&&(l=n),"left"==n&&0==i)for(;r&&e[r-2]==e[r-3]&&e[r-1].insertLeft;)o=e[(r-=3)+2],l="left";if("right"==n&&i==p-d)for(;ru;u++){for(;l&&L(t.line.text.charAt(o.coverStart+l));)--l;for(;o.coverStart+dAi&&0==l&&d==o.coverEnd-o.coverStart?s.parentNode.getBoundingClientRect():sn(Ki(s,l,d).getClientRects(),r),c.left||c.right||0==l)break;d=l,--l,p="right"}Ei&&11>Ai&&(c=dn(e.display.measure,c))}else{0Ai&&!l&&(!c||!c.left&&!c.right)){var m=s.parentNode.getClientRects()[0];c=m?{left:m.left,right:m.left+Nn(e.display),top:m.top,bottom:m.bottom}:Es}for(var g=c.top-t.rect.top,f=c.bottom-t.rect.top,y=t.view.measure.heights,b=0;b=r.text.length?(p=r.text.length,c="before"):0>=p&&(p=0,c="after"),!d)return s("before"==c?p-1:p,"before"==c);var u=Oe(d,p,c),h=as,m=l(p,u,"before"==c);return null!=h&&(m.other=l(p,h,"before"!=c)),m}function vn(e,t){var n=0;t=Y(e.doc,t),e.options.lineWrapping||(n=Nn(e.display)*t.ch);var r=R(e.doc,t.line),o=Ae(r)+Ht(e.display);return{left:n,right:n,top:o,bottom:o+r.height}}function kn(e,t,n,r,o){var i=V(e,t,n);return i.xRel=o,r&&(i.outside=!0),i}function Sn(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,0>n)return kn(r.first,0,null,!0,-1);var o=z(r,n),i=r.first+r.size-1;if(o>i)return kn(r.first+r.size-1,R(r,i).text.length,null,!0,1);0>t&&(t=0);for(var s=R(r,o);;){var l=_n(e,s,o,t,n),d=xe(s,l.ch+(0r},i,o),{begin:i,end:o}}function Cn(e,t,n,r){n||(n=nn(e,t));var o=fn(e,t,rn(e,n,r),"line").top;return wn(e,t,n,o)}function Tn(e,t,n,r){return!(e.bottom<=n)&&(!!(e.top>n)||(r?e.left:e.right)>t)}function _n(e,t,n,r,o){o-=Ae(t);var i=nn(e,t),s=gn(t),l=0,d=t.text.length,p=!0,c=Me(t,e.doc.direction);if(c){var u=(e.options.lineWrapping?An:En)(e,t,n,i,c,r,o);p=1!=u.level,l=p?u.from:u.to-1,d=p?u.to:u.from-1}var h=null,m=null,g=M(function(t){var n=rn(e,i,t);return(n.top+=s,n.bottom+=s,!!Tn(n,r,o,!1))&&(n.top<=o&&n.left<=r&&(h=t,m=n),!0)},l,d),f=!1,y,b;if(m){var x=r-m.left=k.bottom}return g=O(t.text,g,1),kn(n,g,b,f,r-y)}function En(e,t,n,r,o,s,l){var i=M(function(d){var i=o[d],p=1!=i.level;return Tn(xn(e,V(n,p?i.to:i.from,p?"before":"after"),"line",t,r),s,l,!0)},0,o.length-1),d=o[i];if(0l&&(d=o[i-1])}return d}function An(e,t,n,r,o,d,c){var u=wn(e,t,r,c),h=u.begin,m=u.end;/\s/.test(t.text.charAt(m-1))&&m--;for(var g=null,f=null,y=0,i;y=m||i.to<=h)){var p=1!=i.level,b=rn(e,r,p?s(m,i.to)-1:l(h,i.from)).right,x=bx)&&(g=i,f=x)}return g||(g=o[o.length-1]),g.fromm&&(g={from:g.from,to:m,level:g.level}),g}function In(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Is){Is=c("pre");for(var t=0;49>t;++t)Is.appendChild(document.createTextNode("x")),Is.appendChild(c("br"));Is.appendChild(document.createTextNode("x"))}p(e.measure,Is);var n=Is.offsetHeight/50;return 3=e.display.viewTo)return null;if(t-=e.display.viewFrom,0>t)return null;for(var n=e.display.view,r=0;rt)return r}function Bn(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Fn(e,t){void 0===t&&(t=!0);for(var n=e.doc,r={},o=r.cursors=document.createDocumentFragment(),s=r.selection=document.createDocumentFragment(),l=0;l=e.display.viewTo||i.to().linet&&(t=0),t=r(t),o=r(o),p.appendChild(c("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==n?m-e:n)+"px;\n height: "+(o-t)+"px"))}function i(t,n,r){function s(n,r){return bn(e,V(t,n),"div",l,r)}function i(t,n,r){var o=Cn(e,l,null,t),i="ltr"==n==("after"==r)?"left":"right",d="after"==r?o.begin:o.end-(/\s/.test(l.text.charAt(o.end-1))?2:1);return s(d,i)[i]}var l=R(d,t),p=l.text.length,c=Me(l,d.direction),u,f;return Le(c,n||0,null==r?p:r,function(e,t,l,d){var y="ltr"==l,b=s(e,y?"left":"right"),x=s(t-1,y?"right":"left"),v=null==n&&0==e,k=null==r&&t==p,S=0==d,w=!c||d==c.length-1;if(3>=x.top-b.top){var C=(g?v:k)&&S,T=(g?k:v)&&w,_=C?h:(y?b:x).left,E=T?m:(y?x:b).right;o(_,b.top,E-_,b.bottom)}else{var A,I,N,L;y?(A=g&&v&&S?h:b.left,I=g?m:i(e,l,"before"),N=g?h:i(t,l,"after"),L=g&&k&&w?m:x.right):(A=g?i(e,l,"before"):h,I=!g&&v&&S?m:b.right,N=!g&&k&&w?h:x.left,L=g?i(t,l,"after"):m),o(A,b.top,I-A,b.bottom),b.bottomzn(b,u))&&(u=b),0>zn(x,u)&&(u=x),(!f||0>zn(b,f))&&(f=b),0>zn(x,f)&&(f=x)}),{start:u,end:f}}var s=e.display,d=e.doc,p=document.createDocumentFragment(),u=Gt(e.display),h=u.left,m=l(s.sizerWidth,Qt(e)-s.sizer.offsetLeft)-u.right,g="ltr"==d.direction,f=t.from(),y=t.to();if(f.line==y.line)i(f.line,f.ch,y.ch);else{var b=R(d,f.line),x=R(d,y.line),v=ke(b)==ke(x),k=i(f.line,f.ch,v?b.text.length+1:null).end,S=i(y.line,v?0:null,y.ch).start;v&&(k.tope.options.cursorBlinkRate&&(t.cursorDiv.style.visibility="hidden")}}function Vn(e){e.state.focused||(e.display.input.focus(),Hn(e))}function Wn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Kn(e))},100)}function Hn(t,n){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),"nocursor"==t.options.readOnly||(!t.state.focused&&(Pe(t,"focus",t,n),t.state.focused=!0,g(t.display.wrapper,"CodeMirror-focused"),!t.curOp&&t.display.selForContextMenu!=t.doc.sel&&(t.display.input.reset(),Ii&&setTimeout(function(){return t.display.input.reset(!0)},20)),t.display.input.receivedFocus()),qn(t))}function Kn(t,n){t.state.delayingBlurEvent||(t.state.focused&&(Pe(t,"blur",t,n),t.state.focused=!1,Hi(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout(function(){t.state.focused||(t.display.shift=!1)},150))}function Gn(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;rAi){var s=o.node.offsetTop+o.node.offsetHeight;i=s-n,n=s}else{var l=o.node.getBoundingClientRect();i=l.bottom-l.top}var d=o.line.height-i;if(2>i&&(i=In(t)),(.005d)&&(F(o.line,i),Xn(o.line),o.rest))for(var p=0;p=p&&(d=z(t,Ae(R(t,u))-e.wrapper.clientHeight),p=u)}return{from:d,to:l(p,d+1)}}function Yn(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=On(t)-t.scroller.scrollLeft+e.doc.scrollLeft,o=t.gutters.offsetWidth,s=r+"px",l=0;lt.top+r.top?o=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!Ri){var i=c("div","\u200B",null,"position: absolute;\n top: "+(t.top-n.viewOffset-Ht(e.display))+"px;\n height: "+(t.bottom-t.top+Xt(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+l(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(i),i.scrollIntoView(o),e.display.lineSpace.removeChild(i)}}}function Zn(e,t,r,o){null==o&&(o=0);var i;e.options.lineWrapping||t!=r||(t=t.ch?V(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t,r="before"==t.sticky?V(t.line,t.ch+1,"before"):t);for(var d=0;5>d;d++){var p=!1,c=xn(e,t),u=r&&r!=t?xn(e,r):c;i={left:s(c.left,u.left),top:s(c.top,u.top)-o,right:l(c.left,u.left),bottom:l(c.bottom,u.bottom)+o};var h=tr(e,i),m=e.doc.scrollTop,g=e.doc.scrollLeft;if(null!=h.scrollTop&&(lr(e,h.scrollTop),1t.top&&(t.top=0);var o=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,i=Yt(e),d={};t.bottom-t.top>i&&(t.bottom=t.top+i);var p=e.doc.height+Kt(n),c=t.topp-r;if(t.topo+i){var h=s(t.top,(u?p:t.bottom)-i);h!=o&&(d.scrollTop=h)}var m=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft,g=Qt(e)-(e.options.fixedGutter?n.gutters.offsetWidth:0),f=t.right-t.left>g;return f&&(t.right=t.left+g),10>t.left?d.scrollLeft=0:t.leftg+m-3&&(d.scrollLeft=t.right+(f?0:10)-g),d}function nr(e,t){null==t||(ir(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function rr(e){ir(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function or(e,t,n){(null!=t||null!=n)&&ir(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function ar(e,t){ir(e),e.curOp.scrollToPos=t}function ir(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=vn(e,t.from),r=vn(e,t.to);sr(e,n,r,t.margin)}}function sr(e,t,n,r){var o=tr(e,{left:s(t.left,n.left),top:s(t.top,n.top)-r,right:l(t.right,n.right),bottom:l(t.bottom,n.bottom)+r});or(e,o.scrollLeft,o.scrollTop)}function lr(e,t){2>n(e.doc.scrollTop-t)||(!wi&&zr(e,{top:t}),dr(e,t,!0),wi&&zr(e),Mr(e,100))}function dr(e,t,n){t=s(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 pr(e,t,r,o){t=s(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),(r?t==e.doc.scrollLeft:2>n(e.doc.scrollLeft-t))&&!o||(e.doc.scrollLeft=t,Yn(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function cr(e){var t=e.display,n=t.gutters.offsetWidth,o=r(e.doc.height+Kt(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:o,scrollHeight:o+Xt(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}function ur(e,t){t||(t=cr(e));var n=e.display.barWidth,r=e.display.barHeight;hr(e,t);for(var o=0;4>o&&n!=e.display.barWidth||r!=e.display.barHeight;o++)n!=e.display.barWidth&&e.options.lineWrapping&&Gn(e),hr(e,cr(e)),n=e.display.barWidth,r=e.display.barHeight}function hr(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=""}function mr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&Hi(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Ls[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),ls(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?pr(e,t):lr(e,t)},e),e.display.scrollbars.addClass&&g(e.display.wrapper,e.display.scrollbars.addClass)}function gr(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Os},_t(e.curOp)}function fr(e){var t=e.curOp;At(t,function(e){for(var t=0;t=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Ms(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function xr(e){e.updatedDisplay=e.mustUpdate&&Fr(e.cm,e.update)}function vr(e){var t=e.cm,n=t.display;e.updatedDisplay&&Gn(t),e.barMeasure=cr(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=en(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=l(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Xt(t)+t.display.barWidth),e.maxScrollLeft=l(0,n.sizer.offsetLeft+e.adjustWidthTo-Qt(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function kr(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeftt)&&(o.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=o.viewTo)os&&Ce(e.doc,t)o.viewFrom?Ir(e):(o.viewFrom+=r,o.viewTo+=r);else if(t<=o.viewFrom&&n>=o.viewTo)Ir(e);else if(t<=o.viewFrom){var i=Nr(e,n,n+r,1);i?(o.view=o.view.slice(i.index),o.viewFrom=i.lineN,o.viewTo+=r):Ir(e)}else if(n>=o.viewTo){var s=Nr(e,t,t,-1);s?(o.view=o.view.slice(0,s.index),o.viewTo=s.lineN):Ir(e)}else{var l=Nr(e,t,t,-1),d=Nr(e,n,n+r,1);l&&d?(o.view=o.view.slice(0,l.index).concat(Tt(e,l.lineN,d.lineN)).concat(o.view.slice(d.index)),o.viewTo+=r):Ir(e)}var p=o.externalMeasured;p&&(n=o.lineN&&t=r.viewTo)){var i=r.view[Pn(e,t)];if(null!=i.node){var s=i.changes||(i.changes=[]);-1==x(s,n)&&s.push(n)}}}function Ir(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Nr(e,t,r,o){var s=Pn(e,t),l=e.display.view,d;if(!os||r==e.doc.first+e.doc.size)return{index:s,lineN:r};for(var p=e.display.viewFrom,n=0;no?0:l.length-1))return null;r+=o*l[s-(0>o?1:0)].size,s+=o}return{index:s,lineN:r}}function Lr(e,t,n){var r=e.display,o=r.view;0==o.length||t>=r.viewTo||n<=r.viewFrom?(r.view=Tt(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=Tt(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,Pn(e,n)))),r.viewTo=n}function Or(e){for(var t=e.display.view,n=0,r=0,o;r=e.display.viewTo)){var n=+new Date+e.options.workTime,r=at(e,t.highlightFrontier),o=[];t.iter(r.line,s(t.first+t.size,e.display.viewTo+500),function(s){if(r.line>=e.display.viewFrom){var l=s.styles,d=s.text.length>e.options.maxHighlightLength?et(t.mode,r.state):null,p=rt(e,s,r,!0);d&&(r.state=d),s.styles=p.styles;var c=s.styleClasses,u=p.classes;u?s.styleClasses=u:c&&(s.styleClasses=null);for(var h=!l||l.length!=s.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),m=0;!h&&mn?(Mr(e,e.options.workDelay),!0):void 0}),t.highlightFrontier=r.line,t.modeFrontier=l(t.modeFrontier,r.line),o.length&&wr(e,function(){for(var t=0;t=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==Or(e))return!1;Jn(e)&&(Ir(e),t.dims=Ln(e));var o=r.first+r.size,i=l(t.visible.from-e.options.viewportMargin,r.first),p=s(o,t.visible.to+e.options.viewportMargin);n.viewFromi-n.viewFrom&&(i=l(r.first,n.viewFrom)),n.viewTo>p&&20>n.viewTo-p&&(p=s(o,n.viewTo)),os&&(i=Ce(e.doc,i),p=Te(e.doc,p));var c=i!=n.viewFrom||p!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Lr(e,i,p),n.viewOffset=Ae(R(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var u=Or(e);if(!c&&0==u&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var h=Pr(e);return 4=e.display.viewFrom&&t.visible.to<=e.display.viewTo))break;if(!Fr(e,t))break;Gn(e);var o=cr(e);Bn(e),ur(e,o),Vr(e,o),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 zr(e,t){var n=new Ms(e,t);if(Fr(e,n)){Gn(e),Ur(e,n);var r=cr(e);Bn(e),ur(e,r),Vr(e,r),n.finish()}}function jr(e,t,n){function r(t){var n=t.nextSibling;return Ii&&Ui&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var o=e.display,s=e.options.lineNumbers,l=o.lineDiv,p=l.firstChild,c=o.view,u=o.viewFrom,h=0,i;hp.clientWidth,u=p.scrollHeight>p.clientHeight;if(r&&c||o&&u){if(o&&Ui&&Ii)outer:for(var h=n.target,m=d.view;h!=p;h=h.parentNode)for(var g=0;gi?f=l(0,f+i-50):y=s(t.doc.height,y+i+50),zr(t,{top:f,bottom:y})}20>Ds&&(null==d.wheelStartX?(d.wheelStartX=p.scrollLeft,d.wheelStartY=p.scrollTop,d.wheelDX=r,d.wheelDY=o,setTimeout(function(){if(null!=d.wheelStartX){var e=p.scrollLeft-d.wheelStartX,t=p.scrollTop-d.wheelStartY,n=t&&d.wheelDY&&t/d.wheelDY||e&&d.wheelDX&&e/d.wheelDX;d.wheelStartX=d.wheelStartY=null,n&&(Rs=(Rs*Ds+n)/(Ds+1),++Ds)}},200)):(d.wheelDX+=r,d.wheelDY+=o))}}function Qr(e,t){var n=e[t];e.sort(function(e,t){return W(e.from(),t.from())}),t=x(e,n);for(var r=1;rW(e,t.from))return e;if(0>=W(e,t.to))return Jr(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+=Jr(t).ch-t.to.ch),V(n,r)}function Zr(e,t){for(var n=[],r=0,o;rW(c.head,c.anchor);r[l]=new Bs(u?p:d,u?d:p)}else r[l]=new Bs(d,d)}return new Ps(r,e.sel.primIndex)}function no(e){e.doc.mode=$e(e.options,e.doc.modeOption),ro(e)}function ro(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,Mr(e,100),e.state.modeGen++,e.curOp&&Er(e)}function oo(e,t){return 0==t.from.ch&&0==t.to.ch&&""==w(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function ao(e,t,r,n){function o(e){return r?r[e]:null}function i(e,r,o){mt(e,r,o,n),It(e,"change",e,t)}function s(e,t){for(var r=[],s=e;si-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(s=mo(o,o.lastOp==r)))l=w(s.changes),0==W(t.from,t.to)&&0==W(t.from,l.to)?l.to=Jr(t):s.changes.push(uo(e,t));else{var d=w(o.done);for(d&&d.ranges||bo(e.sel,o.done),s={changes:[uo(e,t)],generation:o.generation},o.done.push(s);o.done.length>o.undoDepth;)o.done.shift(),o.done[0].ranges||o.done.shift()}o.done.push(n),o.generation=++o.maxGeneration,o.lastModTime=o.lastSelTime=i,o.lastOp=o.lastSelOp=r,o.lastOrigin=o.lastSelOrigin=t.origin,l||Pe(e,"historyAdded")}function fo(e,t,n,r){var o=t.charAt(0);return"*"==o||"+"==o&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function yo(e,t,n,r){var o=e.history,i=r&&r.origin;n==o.lastSelOp||i&&o.lastSelOrigin==i&&(o.lastModTime==o.lastSelTime&&o.lastOrigin==i||fo(e,i,w(o.done),t))?o.done[o.done.length-1]=t:bo(t,o.done),o.lastSelTime=+new Date,o.lastSelOrigin=i,o.lastSelOp=n,r&&!1!==r.clearRedo&&ho(o.undone)}function bo(e,t){var n=w(t);n&&n.ranges&&n.equals(e)||t.push(e)}function xo(e,t,r,o){var i=t["spans_"+e.id],d=0;e.iter(l(e.first,r),s(e.first+e.size,o),function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[d]=n.markedSpans),++d})}function vo(e){if(!e)return null;for(var t=0,n;tW(t,o);i==0>W(n,o)?i!=0>W(t,n)&&(t=n):(o=t,t=n)}return new Bs(o,t)}return new Bs(n||t,t)}function To(e,t,n,r,o){null==o&&(o=e.cm&&(e.cm.display.shift||e.extend)),Lo(e,new Ps([Co(e.sel.primary(),t,n,o)],0),r)}function _o(e,t,n){for(var r=[],o=e.cm&&(e.cm.display.shift||e.extend),s=0;sW(t.primary().head,e.sel.primary().head)?-1:1);Mo(e,Ro(e,t,r,!0)),!(n&&!1===n.scroll)&&e.cm&&rr(e.cm)}function Mo(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=e.cm.curOp.selectionChanged=!0,Fe(e.cm)),It(e,"cursorActivity",e))}function Do(e){Mo(e,Ro(e,e.sel,null,!1))}function Ro(e,t,n,r){for(var o=0,i;o=t.ch:i.to>t.ch))){if(o&&(Pe(d,"beforeCursorEnter"),d.explicitlyCleared))if(!s.markedSpans)break;else{--l;continue}if(!d.atomic)continue;if(n){var p=d.find(0>r?1:-1),c=void 0;if((0>r?d.inclusiveRight:d.inclusiveLeft)&&(p=Fo(e,p,-r,p&&p.line==t.line?s:null)),p&&p.line==t.line&&(c=W(p,n))&&(0>r?0>c:0r?-1:1);return(0>r?d.inclusiveLeft:d.inclusiveRight)&&(u=Fo(e,u,r,u.line==t.line?s:null)),u?Po(e,u,t,r,o):null}}return t}function Bo(e,t,n,r,o){var i=r||1,s=Po(e,t,n,i,o)||!o&&Po(e,t,n,i,!0)||Po(e,t,n,-i,o)||!o&&Po(e,t,n,-i,!0);return s?s:(e.cantEdit=!0,V(e.first,0))}function Fo(e,t,n,r){return 0>n&&0==t.ch?t.line>e.first?Y(e,V(t.line-1)):null:0e.lastLine())){if(t.from.linei&&(t={from:t.from,to:V(i,R(e,i).text.length),text:[t.text[0]],origin:t.origin}),t.removed=P(e,t.from,t.to),n||(n=Zr(e,t)),e.cm?Ko(e.cm,t,r):ao(e,t,r),Oo(e,n,Ji)}}function Ko(e,t,n){var r=e.doc,o=e.display,i=t.from,s=t.to,l=!1,d=i.line;e.options.lineWrapping||(d=U(ke(R(r,i.line))),r.iter(d,s.line+1,function(e){if(e==o.maxLine)return l=!0,!0})),-1o.maxLineLength&&(o.maxLine=e,o.maxLineLength=t,o.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),ht(r,i.line),Mr(e,400);var p=t.text.length-(s.line-i.line)-1;t.full?Er(e):i.line!=s.line||1!=t.text.length||oo(e.doc,t)?Er(e,i.line,s.line+1,p):Ar(e,i.line,"text");var c=Ue(e,"changes"),u=Ue(e,"change");if(u||c){var h={from:i,to:s,text:t.text,removed:t.removed,origin:t.origin};u&&It(e,"change",e,h),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(h)}e.display.selForContextMenu=null}function Go(e,t,n,r,o){if(r||(r=n),0>W(r,n)){var i;i=[r,n],n=i[0],r=i[1]}"string"==typeof t&&(t=e.splitLines(t)),jo(e,{from:n,to:r,text:t,origin:o})}function Xo(e,t,n,r){n+new Date-Ws))return void We(n);if(!(Be(t,n)||Wt(t.display,n))&&(n.dataTransfer.setData("Text",t.getSelection()),n.dataTransfer.effectAllowed="copyMove",n.dataTransfer.setDragImage&&!Mi)){var e=c("img",null,null,"position: fixed; left: 0; top: 0;");e.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Oi&&(e.width=e.height=1,t.display.wrapper.appendChild(e),e._top=e.offsetTop),n.dataTransfer.setDragImage(e,0,0),Oi&&e.parentNode.removeChild(e)}}function da(t,n){var e=Rn(t,n);if(e){var r=document.createDocumentFragment();Un(t,e,r),t.display.dragCursor||(t.display.dragCursor=c("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),t.display.lineSpace.insertBefore(t.display.dragCursor,t.display.cursorDiv)),p(t.display.dragCursor,r)}}function pa(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function ca(e){if(document.getElementsByClassName)for(var t=document.getElementsByClassName("CodeMirror"),n=0,r;n=W(i.from,w(r).to);){var s=r.pop();if(0>W(s.from,i.from)){i.from=s.from;break}}r.push(i)}wr(e,function(){for(var t=r.length-1;0<=t;t--)Go(e.doc,"",r[t].from,r[t].to,"+delete");rr(e)})}function wa(e,t,n){var r=O(e.text,t+n,n);return 0>r||r>e.text.length?null:r}function Ca(e,t,n){var r=wa(e,t.ch,n);return null==r?null:new V(t.line,r,0>n?"after":"before")}function Ta(e,t,n,r,o){if(e){var i=Me(n,t.doc.direction);if(i){var s=0>o?w(i):i[0],l=0>o==(1==s.level),d=l?"after":"before",p;if(0o?n.text.length-1:0;var u=rn(t,c,p).top;p=M(function(e){return rn(t,c,e).top==u},0>o==(1==s.level)?s.from:s.to-1,p),"before"==d&&(p=wa(n,p,1))}else p=0>o?s.to:s.from;return new V(r,p,d)}}return new V(r,0>o?n.text.length:0,0>o?"before":"after")}function _a(e,t,n,r){var o=Me(t,e.doc.direction);if(!o)return Ca(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):0>=n.ch&&(n.ch=0,n.sticky="after");var i=Oe(o,n.ch,n.sticky),s=o[i];if("ltr"==e.doc.direction&&0==s.level%2&&(0n.ch:s.fromr,h=l(n,u?1:-1);if(null!=h&&(u?h<=s.to&&h<=p.end:h>=s.from&&h>=p.begin)){var m=u?"before":"after";return new V(n.line,h,m)}}var g=function(e,t,r){for(var i=function(e,t){return t?new V(n.line,l(e,1),"before"):new V(n.line,e,"after")};0<=e&&eAi&&27==t.keyCode&&(t.returnValue=!1);var n=t.keyCode;e.display.shift=16==n||t.shiftKey;var r=Da(e,t);Oi&&(Zs=r?n:null,!r&&88==n&&!cs&&(Ui?t.metaKey:t.ctrlKey)&&e.replaceSelection("",null,"cut")),18!=n||/\bCodeMirror-crosshair\b/.test(e.display.lineDiv.className)||Ba(e)}}function Ba(e){function t(r){18!=r.keyCode&&r.altKey||(Hi(n,"CodeMirror-crosshair"),Re(document,"keyup",t),Re(document,"mouseover",t))}var n=e.display.lineDiv;g(n,"CodeMirror-crosshair"),ls(document,"keyup",t),ls(document,"mouseover",t)}function Fa(t){16==t.keyCode&&(this.doc.sel.shift=!1),Be(this,t)}function Ua(t){var e=this;if(!(Wt(e.display,t)||Be(e,t)||t.ctrlKey&&!t.altKey||Ui&&t.metaKey)){var n=t.keyCode,r=t.charCode;if(Oi&&n==Zs)return Zs=null,void je(t);if(!(Oi&&(!t.which||10>t.which)&&Da(e,t))){var o=i(null==r?n:r);"\b"==o||Ra(e,t,o)||e.display.input.onKeyPress(t)}}}function za(e,t){var n=+new Date;return al&&al.compare(n,e,t)?(ol=al=null,"triple"):ol&&ol.compare(n,e,t)?(al=new el(n,e,t),ol=null,"double"):(ol=new el(n,e,t),al=null,"single")}function ja(t){var e=this,n=e.display;if(!(Be(e,t)||n.activeTouch&&n.input.supportsTouch())){if(n.input.ensurePolled(),n.shift=t.shiftKey,Wt(n,t))return void(Ii||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100)));if(!Ya(e,t)){var r=Rn(e,t),o=Ke(t),i=r?za(r,o):"single";window.focus(),1==o&&e.state.selectingText&&e.state.selectingText(t),r&&qa(e,o,r,i,t)||(1==o?r?Wa(e,r,i,t):He(t)==n.scroller&&je(t):2==o?(r&&To(e.doc,r),setTimeout(function(){return n.input.focus()},20)):3==o&&(Wi?Ja(e,t):Wn(e)))}}}function qa(e,t,n,r,o){var i="Click";return"double"==r?i="Double"+i:"triple"==r&&(i="Triple"+i),i=(1==t?"Left":2==t?"Middle":"Right")+i,Oa(e,xa(i,o),o,function(t){if("string"==typeof t&&(t=Js[t]),!t)return!1;var r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r=t(e,n)!=Yi}finally{e.state.suppressEdits=!1}return r})}function Va(e,t,n){var r=e.getOption("configureMouse"),o=r?r(e,t,n):{};if(null==o.unit){var i=zi?n.shiftKey&&n.metaKey:n.altKey;o.unit=i?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==o.extend||e.doc.extend)&&(o.extend=e.doc.extend||n.shiftKey),null==o.addNew&&(o.addNew=Ui?n.metaKey:n.ctrlKey),null==o.moveOnDrag&&(o.moveOnDrag=Ui?!n.altKey:!n.ctrlKey),o}function Wa(e,t,n,r){Ei?setTimeout(y(Vn,e),0):e.curOp.focus=m();var o=Va(e,n,r),i=e.doc.sel,s;e.options.dragDrop&&on&&!e.isReadOnly()&&"single"==n&&-1<(s=i.contains(t))&&(0>W((s=i.ranges[s]).from(),t)||0t.xRel)?Ha(e,r,t,o):Ga(e,r,t,o)}function Ha(t,e,r,o){var i=t.display,s=!1,l=Cr(t,function(n){Ii&&(i.scroller.draggable=!1),t.state.draggingText=!1,Re(i.wrapper.ownerDocument,"mouseup",l),Re(i.wrapper.ownerDocument,"mousemove",d),Re(i.scroller,"dragstart",p),Re(i.scroller,"drop",l),s||(je(n),!o.addNew&&To(t.doc,r,null,null,o.extend),Ii||Ei&&9==Ai?setTimeout(function(){i.wrapper.ownerDocument.body.focus(),i.input.focus()},20):i.input.focus())}),d=function(t){s=s||10<=n(e.clientX-t.clientX)+n(e.clientY-t.clientY)},p=function(){return s=!0};Ii&&(i.scroller.draggable=!0),t.state.draggingText=l,l.copy=!o.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),ls(i.wrapper.ownerDocument,"mouseup",l),ls(i.wrapper.ownerDocument,"mousemove",d),ls(i.scroller,"dragstart",p),ls(i.scroller,"drop",l),Wn(t),setTimeout(function(){return i.input.focus()},20)}function Ka(e,t,n){if("char"==n)return new Bs(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new Bs(V(t.line,0),Y(e.doc,V(t.line+1,0)));var r=n(e,t);return new Bs(r.from,r.to)}function Ga(t,e,n,r){function o(e){if(0!=W(b,e))if(b=e,"rectangle"==r.unit){for(var o=[],i=t.options.tabSize,d=v(R(c,n.line).text,n.ch,i),p=v(R(c,e.line).text,e.ch,i),h=s(d,p),m=l(d,p),y=s(n.line,e.line),x=s(t.lastLine(),l(n.line,e.line));y<=x;y++){var S=R(c,y).text,w=k(S,h,i);h==m?o.push(new Bs(V(y,w),V(y,w))):S.length>w&&o.push(new Bs(V(y,w),V(y,k(S,m,i))))}o.length||o.push(new Bs(n,n)),Lo(c,Qr(u.ranges.slice(0,f).concat(o),f),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var C=g,T=Ka(t,e,r.unit),_=C.anchor,E;0=l.to||s.linex.bottom?20:0;d&&setTimeout(Cr(t,function(){S!=e||(p.scroller.scrollTop+=d,i(n))}),50)}}function d(n){t.state.selectingText=!1,S=Infinity,je(n),p.input.focus(),Re(p.wrapper.ownerDocument,"mousemove",w),Re(p.wrapper.ownerDocument,"mouseup",C),c.history.lastSelOrigin=null}var p=t.display,c=t.doc;je(e);var u=c.sel,h=u.ranges,g,f;if(r.addNew&&!r.extend?(f=c.sel.contains(n),g=-1u:0=o(t.display.gutters.getBoundingClientRect().right))return!1;r&&je(n);var d=t.display,p=d.lineDiv.getBoundingClientRect();if(l>p.bottom||!Ue(t,e))return Ve(n);l-=p.top-d.viewOffset;for(var c=0,i;c=s){var u=z(t.doc,l),h=t.options.gutters[c];return Pe(t,e,t,u,h,n),Ve(n)}}function Ya(t,n){return Qa(t,n,"gutterClick",!0)}function Ja(t,n){Wt(t.display,n)||$a(t,n)||Be(t,n,"contextmenu")||t.display.input.onContextMenu(n)}function $a(t,n){return!!Ue(t,"gutterContextMenu")&&Qa(t,n,"gutterContextMenu",!1)}function Za(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),un(e)}function ei(e){Wr(e),Er(e),Yn(e)}function ti(e,t,n){if(!t!=!(n&&n!=tl)){var r=e.display.dragFunctions,o=t?ls:Re;o(e.display.scroller,"dragstart",r.start),o(e.display.scroller,"dragenter",r.enter),o(e.display.scroller,"dragover",r.over),o(e.display.scroller,"dragleave",r.leave),o(e.display.scroller,"drop",r.drop)}}function ni(e){e.options.lineWrapping?(g(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Hi(e.display.wrapper,"CodeMirror-wrap"),Ne(e)),Dn(e),Er(e),un(e),setTimeout(function(){return ur(e)},100)}function ri(e,t){var n=this;if(!(this instanceof ri))return new ri(e,t);this.options=t=t?b(t):{},b(nl,t,!1),Hr(t);var r=t.value;"string"==typeof r&&(r=new Vs(r,t.mode,null,t.lineSeparator,t.direction)),this.doc=r;var o=new ri.inputStyles[t.inputStyle](this),s=this.display=new D(e,r,o);for(var l in s.wrapper.CodeMirror=this,Wr(this),Za(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),mr(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 Xi,keySeq:null,specialChars:null},t.autofocus&&!Fi&&s.input.focus(),Ei&&11>Ai&&setTimeout(function(){return n.display.input.reset(!0)},20),oi(this),ua(),gr(this),this.curOp.forceUpdate=!0,so(this,r),t.autofocus&&!Fi||this.hasFocus()?setTimeout(y(Hn,this),20):Kn(this),rl)rl.hasOwnProperty(l)&&rl[l](n,t[l],tl);Jn(this),t.finishInit&&t.finishInit(this);for(var d=0;d=e.radiusX&&1>=e.radiusY}function o(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return 400Ai?ls(i.scroller,"dblclick",Cr(t,function(n){if(!Be(t,n)){var e=Rn(t,n);if(!(!e||Ya(t,n)||Wt(t.display,n))){je(n);var r=t.findWordAt(e);To(t.doc,r.anchor,r.head)}}})):ls(i.scroller,"dblclick",function(n){return Be(t,n)||je(n)}),Wi||ls(i.scroller,"contextmenu",function(n){return Ja(t,n)});var s={end:0},l;ls(i.scroller,"touchstart",function(n){if(!Be(t,n)&&!r(n)&&!Ya(t,n)){i.input.ensurePolled(),clearTimeout(l);var e=+new Date;i.activeTouch={start:e,moved:!1,prev:300>=e-s.end?s:null},1==n.touches.length&&(i.activeTouch.left=n.touches[0].pageX,i.activeTouch.top=n.touches[0].pageY)}}),ls(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),ls(i.scroller,"touchend",function(r){var e=i.activeTouch;if(e&&!Wt(i,r)&&null!=e.left&&!e.moved&&300>new Date-e.start){var s=t.coordsChar(i.activeTouch,"page"),l;l=!e.prev||o(e,e.prev)?new Bs(s,s):!e.prev.prev||o(e,e.prev.prev)?t.findWordAt(s):new Bs(V(s.line,0),Y(t.doc,V(s.line+1,0))),t.setSelection(l.anchor,l.head),t.focus(),je(r)}n()}),ls(i.scroller,"touchcancel",n),ls(i.scroller,"scroll",function(){i.scroller.clientHeight&&(lr(t,i.scroller.scrollTop),pr(t,i.scroller.scrollLeft,!0),Pe(t,"scroll",t))}),ls(i.scroller,"mousewheel",function(n){return Xr(t,n)}),ls(i.scroller,"DOMMouseScroll",function(n){return Xr(t,n)}),ls(i.wrapper,"scroll",function(){return i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={enter:function(n){Be(t,n)||We(n)},over:function(n){Be(t,n)||(da(t,n),We(n))},start:function(n){return la(t,n)},drop:Cr(t,sa),leave:function(n){Be(t,n)||pa(t)}};var e=i.input.getField();ls(e,"keyup",function(n){return Fa.call(t,n)}),ls(e,"keydown",Cr(t,Pa)),ls(e,"keypress",Cr(t,Ua)),ls(e,"focus",function(n){return Hn(t,n)}),ls(e,"blur",function(n){return Kn(t,n)})}function ai(e,t,n,r){var s=e.doc,d;null==n&&(n="add"),"smart"==n&&(s.mode.indent?d=at(e,t).state:n="prev");var p=e.options.tabSize,c=R(s,t),u=v(c.text,null,p);c.stateAfter&&(c.stateAfter=null);var h=c.text.match(/^\s*/)[0],m;if(!r&&!/\S/.test(c.text))m=0,n="not";else if("smart"==n&&(m=s.mode.indent(d,c.text.slice(h.length),c.text),m==Yi||150s.first?m=v(R(s,t-1).text,null,p):m=0:"add"==n?m=u+e.options.indentUnit:"subtract"==n?m=u-e.options.indentUnit:"number"==typeof n&&(m=u+n),m=l(0,m);var g="",f=0;if(e.options.indentWithTabs)for(var y=o(m/p);y;--y)f+=p,g+="\t";if(f=e.first+e.size?!1:(t=new V(r,t.ch,t.sticky),p=R(e,r))}function s(r){var s;if(s=o?_a(e.cm,p,t,n):Ca(p,t,n),null!=s)t=s;else if(!r&&i())t=Ta(o,e.cm,p,t.line,n);else return!1;return!0}var l=t,d=n,p=R(e,t.line);if("char"==r)s();else if("column"==r)s(!0);else if("word"==r||"group"==r)for(var c=null,u="group"==r,h=e.cm&&e.cm.getHelper(t,"wordChars"),m=!0;;m=!1){if(0>n&&!s(!m))break;var g=p.text.charAt(t.ch)||"\n",f=I(g,h)?"w":u&&"\n"==g?"n":!u||/\s/.test(g)?null:"p";if(!u||m||f||(f="s"),c&&c!=f){0>n&&(n=1,s(),t.sticky="after");break}if(f&&(c=f),0n?0>=d:d>=o.height){u.hitSide=!0;break}d+=5*n}return u}function gi(e,t){var n=tn(e,t.line);if(!n||n.hidden)return null;var r=R(e.doc,t.line),o=$t(n,r,t.line),i=Me(r,e.doc.direction),s="left";if(i){var l=Oe(i,t.ch);s=l%2?"right":"left"}var d=an(o.map,t.ch,s);return d.offset="right"==d.collapse?d.end:d.start,d}function fi(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function yi(e,t){return t&&(e.bad=!0),e}function bi(e,t,n,r,o){function i(e){return function(t){return t.id==e}}function s(){c&&(p+=u,h&&(p+=u),c=h=!1)}function l(e){e&&(s(),p+=e)}function d(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void l(n);var p=t.getAttribute("cm-marker"),m;if(p){var g=e.findMarks(V(r,0),V(o+1,0),i(+p));return void(g.length&&(m=g[0].find(0))&&l(P(e.doc,m.from,m.to).join(u)))}if("false"==t.getAttribute("contenteditable"))return;var f=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;f&&s();for(var y=0;yo?p.map:c[o];for(var s=0,l;so?e.line:e.rest[o]),u=i[s]+r;return(0>r||l!=t)&&(u=i[s+(r?1:0)]),V(d,u)}}}var o=e.text.firstChild,i=!1;if(!t||!h(o,t))return yi(V(U(e.line),0),!0);if(t==o&&(i=!0,t=o.childNodes[n],n=0,!t)){var s=e.rest?w(e.rest):e.line;return yi(V(U(s),s.text.length),i)}var l=3==t.nodeType?t:null,d=t;for(l||1!=t.childNodes.length||3!=t.firstChild.nodeType||(l=t.firstChild,n&&(n=l.nodeValue.length));d.parentNode!=o;)d=d.parentNode;var p=e.measure,c=p.maps,u=r(l,d,n);if(u)return yi(u,i);for(var m=d.nextSibling,g=l?l.nodeValue.length-n:0;m;m=m.nextSibling){if(u=r(m,m.firstChild,0),u)return yi(V(u.line,u.ch-g),i);g+=m.textContent.length}for(var f=d.previousSibling,y=n;f;f=f.previousSibling){if(u=r(f,f.firstChild,-1),u)return yi(V(u.line,u.ch+y),i);y+=f.textContent.length}}var ki=navigator.userAgent,Si=navigator.platform,wi=/gecko\/\d/i.test(ki),Ci=/MSIE \d/.test(ki),Ti=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ki),_i=/Edge\/(\d+)/.exec(ki),Ei=Ci||Ti||_i,Ai=Ei&&(Ci?document.documentMode||6:+(_i||Ti)[1]),Ii=!_i&&/WebKit\//.test(ki),Ni=Ii&&/Qt\/\d+\.\d+/.test(ki),Li=!_i&&/Chrome\//.test(ki),Oi=/Opera\//.test(ki),Mi=/Apple Computer/.test(navigator.vendor),Di=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(ki),Ri=/PhantomJS/.test(ki),Pi=!_i&&/AppleWebKit/.test(ki)&&/Mobile\/\w+/.test(ki),Bi=/Android/.test(ki),Fi=Pi||Bi||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(ki),Ui=Pi||/Mac/.test(Si),zi=/\bCrOS\b/.test(ki),ji=/win/i.test(Si),qi=Oi&&ki.match(/Version\/(\d*\.\d*)/);qi&&(qi=+qi[1]),qi&&15<=qi&&(Oi=!1,Ii=!0);var Vi=Ui&&(Ni||Oi&&(null==qi||12.11>qi)),Wi=wi||Ei&&9<=Ai,Hi=function(t,n){var r=t.className,o=e(n).exec(r);if(o){var i=r.slice(o.index+o[0].length);t.className=r.slice(0,o.index)+(i?o[1]+i:"")}},Ki;Ki=document.createRange?function(e,t,n,o){var i=document.createRange();return i.setEnd(o||e,n),i.setStart(e,t),i}:function(e,t,n){var o=document.body.createTextRange();try{o.moveToElementText(e.parentNode)}catch(t){return o}return o.collapse(!0),o.moveEnd("character",n),o.moveStart("character",t),o};var Gi=function(e){e.select()};Pi?Gi=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:Ei&&(Gi=function(e){try{e.select()}catch(e){}});var Xi=function(){this.id=null};Xi.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var Qi=30,Yi={toString:function(){return"CodeMirror.Pass"}},Ji={scroll:!1},$i={origin:"*mouse"},Zi={origin:"+move"},es=[""],ts=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,ns=/[\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]/,rs=!1,os=!1,as=null,is=function(){function e(e){return 247>=e?n.charAt(e):1424<=e&&1524>=e?"R":1536<=e&&1785>=e?r.charAt(e-1536):1774<=e&&2220>=e?"r":8192<=e&&8203>=e?"w":8204==e?"b":"L"}function t(e,t,n){this.level=e,this.from=t,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",o=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,s=/[LRr]/,l=/[Lb1n]/,d=/[1n]/;return function(n,r){var p="ltr"==r?"L":"R";if(0==n.length||"ltr"==r&&!o.test(n))return!1;for(var c=n.length,u=[],h=0;hAi)return!1;var e=c("div");return"draggable"in e||"dragDrop"in e}(),ds=3=="\n\nb".split(/\n/).length?function(e){return e.split(/\r\n?|\n/)}:function(e){for(var t=0,n=[],r=e.length,o;t<=r;){o=e.indexOf("\n",t),-1==o&&(o=e.length);var i=e.slice(t,"\r"==e.charAt(o-1)?o-1:o),s=i.indexOf("\r");-1==s?(n.push(i),t=o+1):(n.push(i.slice(0,s)),t+=s+1)}return n},ps=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(t){}return t&&t.parentElement()==e&&0!=t.compareEndPoints("StartToEnd",t)},cs=function(){var t=c("div");return!!("oncopy"in t)||(t.setAttribute("oncopy","return;"),"function"==typeof t.oncopy)}(),us=null,hs={},ms={},gs={},fs=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},ys,bs;fs.prototype.eol=function(){return this.pos>=this.string.length},fs.prototype.sol=function(){return this.pos==this.lineStart},fs.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},fs.prototype.next=function(){if(this.post},fs.prototype.eatSpace=function(){for(var e=this,t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++e.pos;return this.pos>t},fs.prototype.skipToEnd=function(){this.pos=this.string.length},fs.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(-1this.maxLookAhead&&(this.maxLookAhead=e),t},vs.prototype.baseToken=function(e){var t=this;if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)t.baseTokenPos+=2;var n=this.baseTokens[this.baseTokenPos+1];return{type:n&&n.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},vs.prototype.nextLine=function(){this.line++,0Ai&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")},Is;As.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 o=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=l(0,e.scrollHeight-e.clientHeight+o)+"px"}else 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 i=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=l(0,e.scrollWidth-e.clientWidth+i)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&0=W(e,o.to()))return r;return-1};var Bs=function(e,t){this.anchor=e,this.head=t};Bs.prototype.from=function(){return X(this.anchor,this.head)},Bs.prototype.to=function(){return G(this.anchor,this.head)},Bs.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},$o.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=this,r=e,o;rthis.size-t&&(1=this.children.length)){var e=this;do{var t=e.children.splice(e.children.length-5,5),n=new Zo(t);if(!e.parent){var r=new Zo(e.children);r.parent=e,e.children=[r,n],e=r}else{e.size-=n.size,e.height-=n.height;var o=x(e.parent.children,e);e.parent.children.splice(o+1,0,n)}n.parent=e.parent}while(10t.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=u,t.display.maxLineChanged=!0)}null!=o&&t&&this.collapsed&&Er(t,o,s+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&Do(t.doc)),t&&It(t,"markerCleared",t,this,o,s),n&&fr(t),this.parent&&this.parent.clear()}},zs.prototype.find=function(e,t){var n=this;null==e&&"bookmark"==this.type&&(e=1);for(var r=0,o,i;r=e.ch)&&t.push(o.marker.parent||o.marker);return t},findMarks:function(e,t,n){e=Y(this,e),t=Y(this,t);var r=[],o=e.line;return this.iter(e.line,t.line+1,function(s){var l=s.markedSpans;if(l)for(var d=0,i;d=i.to||null==i.from&&o!=e.line||null!=i.from&&o==t.line&&i.from>=t.ch||n&&!n(i.marker)||r.push(i.marker.parent||i.marker);++o}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;re?(r=e,!0):void(e-=i,++t)}),Y(this,V(t,r))},indexFromPos:function(e){e=Y(this,e);var t=e.ch;if(e.linee.ch)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 Vs(B(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.toGs;Gs++)Ks[Gs+48]=Ks[Gs+96]=Gs+"";for(var Xs=65;90>=Xs;Xs++)Ks[Xs]=i(Xs);for(var Qs=1;12>=Qs;Qs++)Ks[Qs+111]=Ks[Qs+63235]="F"+Qs;var Ys={};Ys.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"},Ys.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"},Ys.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Ys.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"]},Ys["default"]=Ui?Ys.macDefault:Ys.pcDefault;var Js={selectAll:Uo,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Ji)},killLine:function(e){return Sa(e,function(t){if(t.empty()){var n=R(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.linee.doc.first){var s=R(e.doc,o.line-1).text;s&&(o=new V(o.line,1),e.replaceRange(i.charAt(0)+e.doc.lineSeparator()+s.charAt(s.length-1),V(o.line-1,s.length-1),o,"+transpose"))}n.push(new Bs(o,o))}e.setSelections(n)})},newlineAndIndent:function(e){return wr(e,function(){for(var t=e.listSelections(),n=t.length-1;0<=n;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;re&&0==W(t,this.pos)&&n==this.button};var tl={toString:function(){return"CodeMirror.Init"}},nl={},rl={},ol,al;ri.defaults=nl,ri.optionHandlers=rl;var il=[];ri.defineInitHook=function(e){return il.push(e)};var sl=null,ll=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Xi,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};ll.prototype.init=function(e){function t(t){if(!Be(o,t)){if(o.somethingSelected())ii({lineWise:!1,text:o.getSelections()}),"cut"==t.type&&o.replaceSelection("",null,"cut");else{if(!o.options.lineWiseCopyCut)return;var e=pi(o);ii({lineWise:!0,text:e.text}),"cut"==t.type&&o.operation(function(){o.setSelections(e.ranges,0,Ji),o.replaceSelection("",null,"cut")})}if(t.clipboardData){t.clipboardData.clearData();var n=sl.text.join("\n");if(t.clipboardData.setData("Text",n),t.clipboardData.getData("Text")==n)return void t.preventDefault()}var s=ui(),l=s.firstChild;o.display.lineSpace.insertBefore(s,o.display.lineSpace.firstChild),l.value=sl.text.join("\n");var d=document.activeElement;Gi(l),setTimeout(function(){o.display.lineSpace.removeChild(s),d.focus(),d==i&&r.showPrimarySelection()},50)}}var n=this,r=this,o=r.cm,i=r.div=e.lineDiv;ci(i,o.options.spellcheck),ls(i,"paste",function(t){Be(o,t)||li(t,o)||11>=Ai&&setTimeout(Cr(o,function(){return n.updateFromDOM()}),20)}),ls(i,"compositionstart",function(t){n.composing={data:t.data,done:!1}}),ls(i,"compositionupdate",function(t){n.composing||(n.composing={data:t.data,done:!1})}),ls(i,"compositionend",function(t){n.composing&&(t.data!=n.composing.data&&n.readFromDOMSoon(),n.composing.done=!0)}),ls(i,"touchstart",function(){return r.forceCompositionEnd()}),ls(i,"input",function(){n.composing||n.readFromDOMSoon()}),ls(i,"copy",t),ls(i,"cut",t)},ll.prototype.prepareSelection=function(){var e=Fn(this.cm,!1);return e.focus=this.cm.state.focused,e},ll.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},ll.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},ll.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,n=t.doc.sel.primary(),r=n.from(),o=n.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||o.line=t.display.viewFrom&&gi(t,r)||{node:l[0].measure.map[2],offset:0},p=o.linee.firstLine()&&(r=V(r.line-1,R(e.doc,r.line-1).length)),o.ch==R(e.doc,o.line).text.length&&o.linet.viewTo-1)return!1;var i,l,d;r.line==t.viewFrom||0==(i=Pn(e,r.line))?(l=U(t.view[0].line),d=t.view[0].node):(l=U(t.view[i].line),d=t.view[i-1].node.nextSibling);var p=Pn(e,o.line),c,u;if(p==t.view.length-1?(c=t.viewTo-1,u=t.lineDiv.lastChild):(c=U(t.view[p+1].line)-1,u=t.view[p+1].node.previousSibling),!d)return!1;for(var h=e.doc.splitLines(bi(e,d,u,l,c)),m=P(e.doc,V(l,0),V(c,R(e.doc,c).text.length));1r.ch&&v.charCodeAt(v.length-f-1)==k.charCodeAt(k.length-f-1);)g--,f++;h[h.length-1]=v.slice(0,v.length-f).replace(/^\u200b+/,""),h[0]=h[0].slice(g).replace(/\u200b+$/,"");var C=V(l,g),T=V(c,m.length?w(m).length-f:0);if(1Ai&&s.scrollbars.setScrollTop(s.scroller.scrollTop=d),null!=l.selectionStart){(!Ei||Ei&&9>Ai)&&e();var t=0,n=function e(){s.selForContextMenu==o.doc.sel&&0==l.selectionStart&&0t++?s.detectingSelectAll=setTimeout(e,500):(s.selForContextMenu=null,s.input.reset())};s.detectingSelectAll=setTimeout(n,200)}}var r=this,o=r.cm,s=o.display,l=r.textarea,i=Rn(o,t),d=s.scroller.scrollTop;if(i&&!Oi){var p=o.options.resetSelectionOnContextMenu;p&&-1==o.doc.sel.contains(i)&&Cr(o,Lo)(o.doc,Yr(i),Ji);var c=l.style.cssText,u=r.wrapper.style.cssText;r.wrapper.style.cssText="position: absolute";var h=r.wrapper.getBoundingClientRect();l.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-h.top-5)+"px; left: "+(t.clientX-h.left-5)+"px;\n z-index: 1000; background: "+(Ei?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var m;if(Ii&&(m=window.scrollY),s.input.focus(),Ii&&window.scrollTo(null,m),s.input.reset(),o.somethingSelected()||(l.value=r.prevInput=" "),r.contextMenuPending=!0,s.selForContextMenu=o.doc.sel,clearTimeout(s.detectingSelectAll),Ei&&9<=Ai&&e(),Wi){We(t);var g=function e(){Re(window,"mouseup",e),setTimeout(n,20)};ls(window,"mouseup",g)}else setTimeout(n,50)}},dl.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},dl.prototype.setUneditable=function(){},dl.prototype.needsContentAttribute=!1,function(e){function t(t,r,o,i){e.defaults[t]=r,o&&(n[t]=i?function(e,t,n){n!=tl&&o(e,t,n)}:o)}var n=e.optionHandlers;e.defineOption=t,e.Init=tl,t("value","",function(e,t){return e.setValue(t)},!0),t("mode",null,function(e,t){e.doc.modeOption=t,no(e)},!0),t("indentUnit",2,no,!0),t("indentWithTabs",!1),t("smartIndent",!0),t("tabSize",4,function(e){ro(e),un(e),Er(e)},!0),t("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,!!t){var n=[],r=e.doc.first;e.doc.iter(function(e){for(var o=0,i;;){if(i=e.text.indexOf(t,o),-1==i)break;o=i+t.length,n.push(V(r,i))}r++});for(var o=n.length-1;0<=o;o--)Go(e.doc,t,n[o],V(n[o].line,n[o].ch+t.length))}}),t("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=tl&&e.refresh()}),t("specialCharPlaceholder",bt,function(e){return e.refresh()},!0),t("electricChars",!0),t("inputStyle",Fi?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),t("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),t("rtlMoveVisually",!ji),t("wholeLineUpdateBefore",!0),t("theme","default",function(e){Za(e),ei(e)},!0),t("keyMap","default",function(e,t,n){var r=ka(t),o=n!=tl&&ka(n);o&&o.detach&&o.detach(e,r),r.attach&&r.attach(e,o||null)}),t("extraKeys",null),t("configureMouse",null),t("lineWrapping",!1,ni,!0),t("gutters",[],function(e){Hr(e.options),ei(e)},!0),t("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?On(e.display)+"px":"0",e.refresh()},!0),t("coverGutterNextToScrollbar",!1,function(e){return ur(e)},!0),t("scrollbarStyle","native",function(e){mr(e),ur(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),t("lineNumbers",!1,function(e){Hr(e.options),ei(e)},!0),t("firstLineNumber",1,ei,!0),t("lineNumberFormatter",function(e){return e},ei,!0),t("showCursorWhenSelecting",!1,Bn,!0),t("resetSelectionOnContextMenu",!0),t("lineWiseCopyCut",!0),t("pasteLinesPerSelection",!0),t("readOnly",!1,function(e,t){"nocursor"==t&&(Kn(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),t("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),t("dragDrop",!0,ti),t("allowDropFileTypes",null),t("cursorBlinkRate",530),t("cursorScrollMargin",0),t("cursorHeight",1,Bn,!0),t("singleCursorHeightPerLine",!0,Bn,!0),t("workTime",100),t("workDelay",100),t("flattenSpans",!0,ro,!0),t("addModeClass",!1,ro,!0),t("pollInterval",100),t("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),t("historyEventDelay",1250),t("viewportMargin",10,function(e){return e.refresh()},!0),t("maxHighlightLength",1e4,ro,!0),t("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),t("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),t("autofocus",null),t("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0)}(ri),function(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,o=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&Cr(this,t[e])(this,n,o),Pe(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"](ka(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;nr&&(ai(t,i.head.line,e,!0),r=i.head.line,o==t.doc.sel.primIndex&&rr(t))}),getTokenAt:function(e,t){return dt(this,e,t)},getLineTokens:function(e,t){return dt(this,V(e),t,!0)},getTokenTypeAt:function(e){e=Y(this.doc,e);var t=ot(this,R(this.doc,e.line)),n=0,r=(t.length-1)/2,o=e.ch,i;if(0==o)i=t[2];else for(;;){var s=n+r>>1;if((s?t[2*s-1]:0)>=o)r=s;else if(t[2*s+1]l?i:0==l?null:i.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 n=this,o=[];if(!r.hasOwnProperty(t))return o;var s=r[t],l=this.getModeAt(e);if("string"==typeof l[t])s[l[t]]&&o.push(s[l[t]]);else if(l[t])for(var d=0,i;di&&(e=i,r=!0),o=R(this.doc,e)}else o=e;return fn(this,o,{top:0,left:0},t||"page",n||r).top+(r?this.doc.height-Ae(o):0)},defaultTextHeight:function(){return In(this.display)},defaultCharWidth:function(){return Nn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,o){var i=this.display;e=xn(this,Y(this.doc,e));var s=e.bottom,d=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),i.sizer.appendChild(t),"over"==r)s=e.top;else if("above"==r||"near"==r){var p=l(i.wrapper.clientHeight,this.doc.height),c=l(i.sizer.clientWidth,i.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>p)&&e.top>t.offsetHeight?s=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=p&&(s=e.bottom),d+t.offsetWidth>c&&(d=c-t.offsetWidth)}t.style.top=s+"px",t.style.left=t.style.right="","right"==o?(d=i.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==o?d=0:"middle"==o&&(d=(i.sizer.clientWidth-t.offsetWidth)/2),t.style.left=d+"px"),n&&er(this,{left:d,top:s,right:d+t.offsetWidth,bottom:s+t.offsetHeight})},triggerOnKeyDown:Tr(Pa),triggerOnKeyPress:Tr(Ua),triggerOnKeyUp:Fa,triggerOnMouseDown:Tr(ja),execCommand:function(e){if(Js.hasOwnProperty(e))return Js[e].call(null,this)},triggerElectric:Tr(function(e){di(this,e)}),findPosH:function(e,t,n,r){var o=this,s=1;0>t&&(s=-1,t=-t);for(var l=Y(this.doc,e),d=0;de?r.from():r.to()},Zi)}),deleteH:Tr(function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):Sa(this,function(n){var o=hi(r,n.head,e,t,!1);return 0>e?{from:o,to:n.head}:{from:n.head,to:o}})}),findPosV:function(e,t,n,r){var o=this,s=1,l=r;0>t&&(s=-1,t=-t);for(var d=Y(this.doc,e),p=0,i;pe?i.from():i.to();var l=xn(n,i.head,"div");null!=i.goalColumn&&(l.left=i.goalColumn),o.push(l.left);var d=mi(n,l,e,t);return"page"==t&&i==r.sel.primary()&&nr(n,bn(n,d,"div").top-l.top),d},Zi),o.length)for(var l=0;lx(pl,cl)&&(ri.prototype[cl]=function(e){return function(){return e.apply(this.doc,arguments)}}(Vs.prototype[cl]));return ze(Vs),ri.inputStyles={textarea:dl,contenteditable:ll},ri.defineMode=function(e){ri.defaults.mode||"null"==e||(ri.defaults.mode=e),Ye.apply(this,arguments)},ri.defineMIME=function(e,t){ms[e]=t},ri.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),ri.defineMIME("text/plain","null"),ri.defineExtension=function(e,t){ri.prototype[e]=t},ri.defineDocExtension=function(e,t){Vs.prototype[e]=t},ri.fromTextArea=function(e,t){function n(){e.value=l.getValue()}if(t=t?b(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var r=m();t.autofocus=r==e||null!=e.getAttribute("autofocus")&&r==document.body}var o;if(e.form&&(ls(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var i=e.form;o=i.submit;try{var s=i.submit=function(){n(),i.submit=o,i.submit(),i.submit=s}}catch(t){}}t.finishInit=function(t){t.save=n,t.getTextArea=function(){return e},t.toTextArea=function(){t.toTextArea=isNaN,n(),e.parentNode.removeChild(t.getWrapperElement()),e.style.display="",e.form&&(Re(e.form,"submit",n),"function"==typeof e.form.submit&&(e.form.submit=o))}},e.style.display="none";var l=ri(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return l},function(e){e.off=Re,e.on=ls,e.wheelEventPixels=Gr,e.Doc=Vs,e.splitLines=ds,e.countColumn=v,e.findColumn=k,e.isWordChar=A,e.Pass=Yi,e.signal=Pe,e.Line=Ss,e.changeEnd=Jr,e.scrollbarModel=Ls,e.Pos=V,e.cmpPos=W,e.modes=hs,e.mimeModes=ms,e.resolveMode=Je,e.getMode=$e,e.modeExtensions=gs,e.extendMode=Ze,e.copyState=et,e.startState=nt,e.innerMode=tt,e.commands=Js,e.keyMap=Ys,e.keyName=va,e.isModifierKey=ba,e.lookupKey=ya,e.normalizeKeyMap=fa,e.StringStream=fs,e.SharedTextMarker=js,e.TextMarker=zs,e.LineWidget=Fs,e.e_preventDefault=je,e.e_stopPropagation=qe,e.e_stop=We,e.addClass=g,e.contains=h,e.rmClass=Hi,e.keyNames=Ks}(ri),ri.version="5.38.0",ri})},tbG5:function(e,t){"use strict";function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1),r;t.length;)if(r=t.shift(),r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var o in r)n(r,o)&&(e[o]=r[o])}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var o={arraySet:function(e,t,n,r,o){if(t.subarray&&e.subarray)return void e.set(t.subarray(n,n+r),o);for(var s=0;si))for(h==t.line&&(g=t.ch-(0>n?1:0));g!=f;g+=n){var y=m.charAt(g);if(c.test(y)&&(void 0===r||e.getTokenTypeAt(s(h,g+1))==r)){var b=l[y];if(">"==b.charAt(1)==0document.documentMode),s=e.Pos,l={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"};e.defineOption("matchBrackets",!1,function(t,n,r){r&&r!=e.Init&&(t.off("cursorActivity",o),t.state.matchBrackets&&t.state.matchBrackets.currentlyHighlighted&&(t.state.matchBrackets.currentlyHighlighted(),t.state.matchBrackets.currentlyHighlighted=null)),n&&(t.state.matchBrackets="object"==typeof n?n:{},t.on("cursorActivity",o))}),e.defineExtension("matchBrackets",function(){r(this,!0)}),e.defineExtension("findMatchingBracket",function(e,n,r){return(r||"boolean"==typeof n)&&(r?(r.strict=n,n=r):n=n?{strict:!0}:null),t(this,e,n)}),e.defineExtension("scanForBracket",function(e,t,r,o){return n(this,e,t,r,o)})})},uUPe:function(e,t,n){"use strict";(function(t){function n(){c=!0;for(var e=p.length,t,n;e;){for(n=p,p=[],t=-1;++t>>16,l=0;0!==r;){l=2e3=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function r(t,o){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var s=n.call(t),i=[],l,r;try{for(;(void 0===o||0r.indexOf(t)&&(e[t]=n[t]);if(null!=n&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,t=Object.getOwnPropertySymbols(n);or.indexOf(t[o])&&(e[t[o]]=n[t[o]]);return e},t.__decorate=function(e,t,n,o){var s=arguments.length,l=3>s?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o,r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,o);else for(var d=e.length-1;0<=d;d--)(r=e[d])&&(l=(3>s?r(l):3d[0]&&r[1]h;h++)if((5==e||o||h in p)&&(g=p[h],f=c(g,h,d),e))if(n)m[h]=f;else if(f)switch(e){case 3:return!0;case 5:return g;case 6:return h;case 2:m.push(g);}else if(r)return!1;return o?-1:3==e||r?r:m}},ue=se("unscopables"),he=Array.prototype;void 0==he[ue]&&D(he,ue,{});var me=function(e){he[ue][e]=!0},ge=ce(5),fe="find",ye=!0;fe in[]&&[,][fe](function(){ye=!1}),G(G.P+G.F*ye,"Array",{find:function(e){return ge(this,e,1e?Ce(e+t,0):r(e,t)},_e=ie("keys"),Ee=function(e){return _e[e]||(_e[e]=z(e))},Ae=function(e){return function(t,n,r){var o=we(t),i=ne(o.length),s=Te(r,i),l;if(e&&n!=n){for(;i>s;)if(l=o[s++],l!=l)return!0;}else for(;i>s;s++)if((e||s in o)&&o[s]===n)return e||s||0;return!e&&-1}}(!1),Ie=Ee("IE_PROTO"),Ne=function(e,t){var n=we(e),r=0,o=[],i;for(i in n)i!=Ie&&B(n,i)&&o.push(i);for(;t.length>r;)B(n,i=t[r++])&&(~Ae(o,i)||o.push(i));return o},Le=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Oe=Object.keys||function(e){return Ne(e,Le)},Me=Object.getOwnPropertySymbols,De={f:Me},Re={}.propertyIsEnumerable,Pe={f:Re},Be=Object.assign,Fe=!Be||C(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=Be({},e)[n]||Object.keys(Be({},t)).join("")!=r})?function(e){for(var t=$(e),n=arguments.length,r=1,o=De.f,i=Pe.f;n>r;)for(var s=Y(arguments[r++]),l=o?Oe(s).concat(o(s)):Oe(s),d=l.length,p=0,c;d>p;)i.call(s,c=l[p++])&&(t[c]=s[c]);return t}:Be;G(G.S+G.F,"Object",{assign:Fe});var Ue=x.Object.assign,ze=se("match"),je=function(e){var t;return w(e)&&(void 0===(t=e[ze])?"RegExp"==Q(e):!!t)},qe=function(e,t,n){if(je(t))throw TypeError("String#"+n+" doesn't accept regex!");return J(e)+""},Ve=se("match"),We="startsWith",He=""[We];G(G.P+G.F*function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[Ve]=!1,!"/./"[e](t)}catch(e){}}return!0}(We),"String",{startsWith:function(e){var t=qe(this,e,We),n=ne(r(1o||o==Infinity)throw RangeError("Count can't be negative");for(;0>>=1)&&(t+=t))1&o&&(r+=t);return r}});var Ge=x.String.repeat,Xe=m(function(e){var t=z("meta"),n=M.f,r=0,o=Object.isExtensible||function(){return!0},i=!C(function(){return o(Object.preventExtensions({}))}),s=function(e){n(e,t,{value:{i:"O"+ ++r,w:{}}})},l=e.exports={KEY:t,NEED:!1,fastKey:function(e,n){if(!w(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!B(e,t)){if(!o(e))return"F";if(!n)return"E";s(e)}return e[t].i},getWeak:function(e,n){if(!B(e,t)){if(!o(e))return!0;if(!n)return!1;s(e)}return e[t].w},onFreeze:function(e){return i&&l.NEED&&o(e)&&!B(e,t)&&s(e),e}}}),Qe=Xe.KEY,Ye=Xe.NEED,Je=Xe.fastKey,$e=Xe.getWeak,Ze=Xe.onFreeze,et=M.f,tt=se("toStringTag"),nt=function(e,t,n){e&&!B(e=n?e:e.prototype,tt)&&et(e,tt,{configurable:!0,value:t})},rt={f:se},ot=!1,at=M.f,it=function(e){var t=x.Symbol||(x.Symbol=b.Symbol||{});"_"==e.charAt(0)||e in t||at(t,e,{value:rt.f(e)})},st=function(e){var t=Oe(e),n=De.f;if(n)for(var r=n(e),o=Pe.f,s=0,i;r.length>s;)o.call(e,i=r[s++])&&t.push(i);return t},lt=T?Object.defineProperties:function(e,t){S(e);for(var n=Oe(t),r=n.length,o=0,i;r>o;)M.f(e,i=n[o++],t[i]);return e},dt=b.document,pt=dt&&dt.documentElement,ct=Ee("IE_PROTO"),ut=function(){},ht="prototype",mt=function(){var e=A("iframe"),t=Le.length,n="<",r=">",o;for(e.style.display="none",pt.appendChild(e),e.src="javascript:",o=e.contentWindow.document,o.open(),o.write(n+"script"+r+"document.F=Object"+n+"/script"+r),o.close(),mt=o.F;t--;)delete mt[ht][Le[t]];return mt()},gt=Object.create||function(e,t){var n;return null===e?n=mt():(ut[ht]=S(e),n=new ut,ut[ht]=null,n[ct]=e),void 0===t?n:lt(n,t)},ft=Le.concat("length","prototype"),yt=Object.getOwnPropertyNames||function(e){return Ne(e,ft)},bt={f:yt},xt=bt.f,vt={}.toString,kt="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],St=function(e){try{return xt(e)}catch(t){return kt.slice()}},wt={f:function(e){return kt&&"[object Window]"==vt.call(e)?St(e):xt(we(e))}},Ct=Object.getOwnPropertyDescriptor,Tt=T?Ct:function(e,t){if(e=we(e),t=N(t,!0),I)try{return Ct(e,t)}catch(t){}return B(e,t)?R(!Pe.f.call(e,t),e[t]):void 0},_t={f:Tt},Et=Xe.KEY,At=_t.f,It=M.f,Nt=wt.f,Lt=b.Symbol,Ot=b.JSON,Mt=Ot&&Ot.stringify,Dt="prototype",Rt=se("_hidden"),Pt=se("toPrimitive"),Bt={}.propertyIsEnumerable,Ft=ie("symbol-registry"),Ut=ie("symbols"),zt=ie("op-symbols"),jt=Object[Dt],qt="function"==typeof Lt,Vt=b.QObject,Wt=!Vt||!Vt[Dt]||!Vt[Dt].findChild,Ht=T&&C(function(){return 7!=gt(It({},"a",{get:function(){return It(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=At(jt,t);r&&delete jt[t],It(e,t,n),r&&e!==jt&&It(jt,t,r)}:It,Kt=function(e){var t=Ut[e]=gt(Lt[Dt]);return t._k=e,t},Gt=qt&&"symbol"==typeof Lt.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof Lt},Xt=function(e,t,n){return e===jt&&Xt(zt,t,n),S(e),t=N(t,!0),S(n),B(Ut,t)?(n.enumerable?(B(e,Rt)&&e[Rt][t]&&(e[Rt][t]=!1),n=gt(n,{enumerable:R(0,!1)})):(!B(e,Rt)&&It(e,Rt,R(1,{})),e[Rt][t]=!0),Ht(e,t,n)):It(e,t,n)},Qt=function(e,t){S(e);for(var n=st(t=we(t)),r=0,o=n.length,i;o>r;)Xt(e,i=n[r++],t[i]);return e},Yt=function(e){var t=Bt.call(this,e=N(e,!0));return this===jt&&B(Ut,e)&&!B(zt,e)?!1:t||!B(this,e)||!B(Ut,e)||B(this,Rt)&&this[Rt][e]?t:!0},Jt=function(e,t){if(e=we(e),t=N(t,!0),e!==jt||!B(Ut,t)||B(zt,t)){var n=At(e,t);return n&&B(Ut,t)&&!(B(e,Rt)&&e[Rt][t])&&(n.enumerable=!0),n}},$t=function(e){for(var t=Nt(we(e)),n=[],r=0,o;t.length>r;)B(Ut,o=t[r++])||o==Rt||o==Et||n.push(o);return n},Zt=function(e){for(var t=e===jt,n=Nt(t?zt:we(e)),r=[],o=0,i;n.length>o;)B(Ut,i=n[o++])&&(!t||B(jt,i))&&r.push(Ut[i]);return r};qt||(Lt=function(){if(this instanceof Lt)throw TypeError("Symbol is not a constructor!");var e=z(0tn;)se(en[tn++]);for(var j=Oe(se.store),nn=0;j.length>nn;)it(j[nn++]);G(G.S+G.F*!qt,"Symbol",{for:function(e){return B(Ft,e+="")?Ft[e]:Ft[e]=Lt(e)},keyFor:function(e){if(!Gt(e))throw TypeError(e+" is not a symbol!");for(var t in Ft)if(Ft[t]===e)return t},useSetter:function(){Wt=!0},useSimple:function(){Wt=!1}}),G(G.S+G.F*!qt,"Object",{create:function(e,t){return void 0===t?gt(e):Qt(gt(e),t)},defineProperty:Xt,defineProperties:Qt,getOwnPropertyDescriptor:Jt,getOwnPropertyNames:$t,getOwnPropertySymbols:Zt}),Ot&&G(G.S+G.F*(!qt||C(function(){var e=Lt();return"[null]"!=Mt([e])||"{}"!=Mt({a:e})||"{}"!=Mt(Object(e))})),"JSON",{stringify:function(e){for(var t=[e],n=1,r,o;arguments.length>n;)t.push(arguments[n++]);if(o=r=t[1],(w(r)||void 0!==e)&&!Gt(e))return re(r)||(r=function(e,t){if("function"==typeof o&&(t=o.call(this,e,t)),!Gt(t))return t}),t[1]=r,Mt.apply(Ot,t)}}),Lt[Dt][Pt]||D(Lt[Dt],Pt,Lt[Dt].valueOf),nt(Lt,"Symbol"),nt(Math,"Math",!0),nt(b.JSON,"JSON",!0);var k=se("toStringTag"),rn="Arguments"==Q(function(){return arguments}()),on=function(e,t){try{return e[t]}catch(t){}},an=function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=on(t=Object(e),k))?n:rn?Q(t):"Object"==(r=Q(t))&&"function"==typeof t.callee?"Arguments":r};({})[se("toStringTag")]="z",q(Object.prototype,"toString",function(){return"[object "+an(this)+"]"},!0),it("asyncIterator"),it("observable");var sn=x.Symbol,ln={},dn={};D(dn,se("iterator"),function(){return this});var pn=function(e,t,n){e.prototype=gt(dn,{next:R(1,n)}),nt(e,t+" Iterator")},cn=Ee("IE_PROTO"),un=Object.prototype,hn=Object.getPrototypeOf||function(e){return e=$(e),B(e,cn)?e[cn]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?un:null},mn=se("iterator"),gn=!([].keys&&"next"in[].keys()),fn="keys",yn="values",bn=function(){return this},xn=function(e,t,n,r,o,i,s){pn(n,t,r);var l=function(e){return!gn&&e in u?u[e]:e===fn?function(){return new n(this,e)}:e===yn?function(){return new n(this,e)}:function(){return new n(this,e)}},d=t+" Iterator",p=o==yn,c=!1,u=e.prototype,h=u[mn]||u["@@iterator"]||o&&u[o],m=h||l(o),g=o?p?l("entries"):m:void 0,f="Array"==t?u.entries||h:h,y,b,x;if(f&&(x=hn(f.call(new e)),x!==Object.prototype&&x.next&&(nt(x,d,!0),"function"!=typeof x[mn]&&D(x,mn,bn))),p&&h&&h.name!==yn&&(c=!0,m=function(){return h.call(this)}),(gn||c||!u[mn])&&D(u,mn,m),ln[t]=m,ln[d]=bn,o)if(y={values:p?m:l(yn),keys:i?m:l(fn),entries:g},s)for(b in y)b in u||q(u,b,y[b]);else G(G.P+G.F*(gn||c),t,y);return y},vn=function(e){return function(t,n){var r=J(t)+"",o=te(n),i=r.length,s,l;return 0>o||o>=i?e?"":void 0:(s=r.charCodeAt(o),55296>s||56319(l=r.charCodeAt(o+1))||57343=e.length?{value:void 0,done:!0}:(n=vn(e,t),this._i+=n.length,{value:n,done:!1})});var kn=function(e,t){return{value:t,done:!!e}},Sn=xn(Array,"Array",function(e,t){this._t=we(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,kn(1)):"keys"==t?kn(0,n):"values"==t?kn(0,e[n]):kn(0,[n,e[n]])},"values");ln.Arguments=ln.Array,me("keys"),me("values"),me("entries");for(var wn=se("iterator"),Cn=se("toStringTag"),Tn=ln.Array,_n={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},En=Oe(_n),An=0;An>>0),n=this.head,r=0;n;)o(n.data,t,r),r+=n.data.length,n=n.next;return t},e}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},xUUw:function(e){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},xdvC:function(e,t,n){"use strict";(function(e){e(n("tQq4"),n("1JcR"))})(function(e){function t(e){e.state.tagHit&&e.state.tagHit.clear(),e.state.tagOther&&e.state.tagOther.clear(),e.state.tagHit=e.state.tagOther=null}function n(n){n.state.failedTagMatch=!1,n.operation(function(){if(t(n),!n.somethingSelected()){var r=n.getCursor(),o=n.getViewport();o.from=Math.min(o.from,r.line),o.to=Math.max(r.line+1,o.to);var i=e.findMatchingTag(n,r,o);if(i){if(n.state.matchBothTags){var s="open"==i.at?i.open:i.close;s&&(n.state.tagHit=n.markText(s.from,s.to,{className:"CodeMirror-matchingtag"}))}var l="close"==i.at?i.open:i.close;l?n.state.tagOther=n.markText(l.from,l.to,{className:"CodeMirror-matchingtag"}):n.state.failedTagMatch=!0}}})}function r(e){e.state.failedTagMatch&&n(e)}e.defineOption("matchTags",!1,function(o,i,s){s&&s!=e.Init&&(o.off("cursorActivity",n),o.off("viewportChange",r),t(o)),i&&(o.state.matchBothTags="object"==typeof i&&i.bothTags,o.on("cursorActivity",n),o.on("viewportChange",r),n(o))}),e.commands.toMatchingTag=function(t){var n=e.findMatchingTag(t,t.getCursor());if(n){var r="close"==n.at?n.open:n.close;r&&t.extendSelection(r.to,r.from)}}})},xtj2:function(e,t,n){"use strict";function r(e,t,n,r){s.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=r,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}var o=n("dvMn"),s=n("ZKdc"),i=n("Sm7/"),l=n("cvyR"),d=n("Ctqd"),p=function(e,t){var n="",r;for(r=0;r>>=8;return n},c=function(e,t){var n=e;return e||(n=t?16893:33204),(65535&n)<<16},u=function(e){return 63&(e||0)},h=function(e,t,n,r,s,h){var m=e.file,g=e.compression,f=h!==i.utf8encode,y=o.transformTo("string",h(m.name)),b=o.transformTo("string",i.utf8encode(m.name)),x=m.comment,v=o.transformTo("string",h(x)),k=o.transformTo("string",i.utf8encode(x)),S=b.length!==m.name.length,w=k.length!==x.length,C="",T="",_="",E=m.dir,A=m.date,I={crc32:0,compressedSize:0,uncompressedSize:0},N,L;(!t||n)&&(I.crc32=e.crc32,I.compressedSize=e.compressedSize,I.uncompressedSize=e.uncompressedSize);var O=0;t&&(O|=8),!f&&(S||w)&&(O|=2048);var M=0,D=0;E&&(M|=16),"UNIX"===s?(D=798,M|=c(m.unixPermissions,E)):(D=20,M|=u(m.dosPermissions,E)),N=A.getUTCHours(),N<<=6,N|=A.getUTCMinutes(),N<<=5,N|=A.getUTCSeconds()/2,L=A.getUTCFullYear()-1980,L<<=4,L|=A.getUTCMonth()+1,L<<=5,L|=A.getUTCDate(),S&&(T=p(1,1)+p(l(y),4)+b,C+="up"+p(T.length,2)+T),w&&(_=p(1,1)+p(l(v),4)+k,C+="uc"+p(_.length,2)+_);var R="";R+="\n\0",R+=p(O,2),R+=g.magic,R+=p(N,2),R+=p(L,2),R+=p(I.crc32,4),R+=p(I.compressedSize,4),R+=p(I.uncompressedSize,4),R+=p(y.length,2),R+=p(C.length,2);var P=d.LOCAL_FILE_HEADER+R+y+C,B=d.CENTRAL_FILE_HEADER+p(D,2)+R+p(v.length,2)+"\0\0\0\0"+p(M,4)+p(r,4)+y+C+v;return{fileRecord:P,dirRecord:B}},m=function(e,t,n,r,i){var s="",l=o.transformTo("string",i(r));return s=d.CENTRAL_DIRECTORY_END+"\0\0\0\0"+p(e,2)+p(e,2)+p(t,4)+p(n,4)+p(l.length,2)+l,s},g=function(e){var t="";return t=d.DATA_DESCRIPTOR+p(e.crc32,4)+p(e.compressedSize,4)+p(e.uncompressedSize,4),t};o.inherits(r,s),r.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,r=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,s.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-r-1))/n:100}}))},r.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=h(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},r.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,n=h(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),t)this.push({data:g(e),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},r.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t",type:"keyToKey",toKeys:"h"},{keys:"",type:"keyToKey",toKeys:"l"},{keys:"",type:"keyToKey",toKeys:"k"},{keys:"",type:"keyToKey",toKeys:"j"},{keys:"",type:"keyToKey",toKeys:"l"},{keys:"",type:"keyToKey",toKeys:"h",context:"normal"},{keys:"",type:"keyToKey",toKeys:"W"},{keys:"",type:"keyToKey",toKeys:"B",context:"normal"},{keys:"",type:"keyToKey",toKeys:"w"},{keys:"",type:"keyToKey",toKeys:"b",context:"normal"},{keys:"",type:"keyToKey",toKeys:"j"},{keys:"",type:"keyToKey",toKeys:"k"},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:"",context:"insert"},{keys:"",type:"keyToKey",toKeys:"",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"",type:"keyToKey",toKeys:"0"},{keys:"",type:"keyToKey",toKeys:"$"},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"",type:"action",action:"toggleOverwrite",context:"insert"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"(",type:"motion",motion:"moveBySentence",motionArgs:{forward:!1}},{keys:")",type:"motion",motion:"moveBySentence",motionArgs:{forward:!0}},{keys:"",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"expandToLine",motionArgs:{linewise:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r",type:"action",action:"replace",isEdit:!0},{keys:"@",type:"action",action:"replayMacro"},{keys:"q",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0}},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"",type:"action",action:"redo"},{keys:"m",type:"action",action:"setMark"},{keys:"\"",type:"action",action:"setRegister"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a",type:"motion",motion:"textObjectManipulation"},{keys:"i",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],n=[{name:"colorscheme",shortName:"colo"},{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"unmap"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"se"},{name:"set",shortName:"se"},{name:"setlocal",shortName:"setl"},{name:"setglobal",shortName:"setg"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"nohlsearch",shortName:"noh"},{name:"yank",shortName:"y"},{name:"delmarks",shortName:"delm"},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"global",shortName:"g"}],p=t.Pos;t.Vim=function(){function i(e){e.setOption("disableInput",!0),e.setOption("showCursorWhenSelecting",!1),t.signal(e,"vim-mode-change",{mode:"normal"}),e.on("cursorActivity",pt),D(e),t.on(e.getInputField(),"paste",v(e))}function c(e){e.setOption("disableInput",!1),e.off("cursorActivity",pt),t.off(e.getInputField(),"paste",v(e)),e.state.vim=null}function u(e,n){this==t.keyMap.vim&&(t.rmClass(e.getWrapperElement(),"cm-fat-cursor"),"contenteditable"==e.getOption("inputStyle")&&null!=document.body.style.caretColor&&(y(e),e.getInputField().style.caretColor="")),n&&n.attach==h||c(e)}function h(e,n){this==t.keyMap.vim&&(t.addClass(e.getWrapperElement(),"cm-fat-cursor"),"contenteditable"==e.getOption("inputStyle")&&null!=document.body.style.caretColor&&(f(e),e.getInputField().style.caretColor="transparent")),n&&n.attach==h||i(e)}function m(e){for(var t=e.listSelections(),n=[],r=0,o;r")}function v(e){var t=e.state.vim;return t.onPasteFn||(t.onPasteFn=function(){t.insertMode||(e.setCursor(W(e.getCursor(),0,1)),Rt.enterInsertMode(e,{},t))}),t.onPasteFn}function k(e,t){for(var n=[],r=e;r=e.firstLine()&&t<=e.lastLine()}function w(e){return /^[a-z]$/.test(e)}function C(e){return-1!="()[]{}".indexOf(e)}function T(e){return xt.test(e)}function _(e){return /^[A-Z]$/.test(e)}function E(e){return /^\s*$/.test(e)}function A(e){return-1!=".?!".indexOf(e)}function I(e,t){for(var n=0;n"==t.slice(-11)){var n=t.length-11,r=e.slice(0,n),o=t.slice(0,n);return r==o&&e.length>n?"full":0==o.indexOf(r)&&"partial"}return e==t?"full":0==t.indexOf(e)&&"partial"}function X(e){var t=/^.*(<[^>]+>)$/.exec(e),n=t?t[1]:e.slice(-1);return 1"===n?"\n":""===n?" ":""),n}function Q(e,t,n){return function(){for(var r=0;rc?h:0,g=r[m].anchor,f=l(g.line,o.line),y=d(g.line,o.line),b=g.ch,x=o.ch,v=r[m].head.ch-b,k=x-b;0=k?(b++,!i&&x--):0>v&&0<=k?(b--,!u&&x++):0>v&&-1==k&&(b--,x++);for(var S=f,w;S<=y;S++)w={anchor:new p(S,b),head:new p(S,x)},n.push(w);return e.setSelections(n),t.ch=x,g.ch=b,g}function se(e,t,n){for(var r=[],o=0,i;oh&&(o.line=h),o.ch=ne(e,o.line)}else o.ch=0,s.ch=ne(e,s.line);return{ranges:[{anchor:s,head:o}],primary:0}}if("block"==n){for(var m=l(s.line,o.line),g=l(s.ch,o.ch),f=d(s.line,o.line),y=d(s.ch,o.ch)+1,b=f-m+1,x=o.line==m?0:b-1,v=[],k=0;k=s.length)return null;r?d=kt[0]:(d=vt[0],!d(s.charAt(l))&&(d=vt[1]));for(var c=l,u=l;d(s.charAt(c))&&cu&&!y?y=!0:o=!1,h=d;h>c&&(o&&s(h)!=y&&h!=d||!l(h,-1,!0));h--);return i=new p(h,0),{start:i,end:m}}function Ne(e,t,n,r){function o(e,t){if(0>t.pos+t.dir||t.pos+t.dir>=t.line.length){if(t.ln+=t.dir,!S(e,t.ln))return t.line=null,t.ln=null,void(t.pos=null);t.line=e.getLine(t.ln),t.pos=0r?s(e,l.ln,l.pos,r):i(e,l.ln,l.pos,r),n--;return p(l.ln,l.pos)}function Le(e,t,n,r){var o=t,i={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/}[n],s={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{"}[n],l=e.getLine(o.line).charAt(o.ch),d=l===s?1:0,c,u;if(c=e.scanForBracket(p(o.line,o.ch+d),-1,void 0,{bracketRegex:i}),u=e.scanForBracket(p(o.line,o.ch+d),1,void 0,{bracketRegex:i}),!c||!u)return{start:o,end:o};if(c=c.pos,u=u.pos,c.line==u.line&&c.ch>u.ch||c.line>u.line){var h=c;c=u,u=h}return r?u.ch+=1:c.ch+=1,{start:c,end:u}}function Oe(e,t,n,r){var o=Y(t),s=e.getLine(o.line),l=s.split(""),d=l.indexOf(n),c,u,h,i;if(o.ch"+t+"",{bottom:!0,duration:5e3}):alert(t)}function He(e,t){var n=""+(e||"")+"";return t&&(n+=" "+t+""),n}function Ke(e,t){var n=(t.prefix||"")+" "+(t.desc||""),r=He(t.prefix,t.desc);Re(e,r,n,t.onClose,t)}function Ge(e,t){if(e instanceof RegExp&&t instanceof RegExp){for(var n=["global","multiline","ignoreCase","source"],r=0,o;r=t&&e<=n:e==t}function et(e){var t=e.getScrollInfo(),n=e.coordsChar({left:0,top:6+t.top},"local"),r=t.clientHeight-10+t.top,o=e.coordsChar({left:0,top:r},"local");return{top:n.line,bottom:o.line}}function tt(e,t,n){if("'"==n){var r=e.doc.history.done,o=r[r.length-2];return o&&o.ranges&&o.ranges[0].head}if("."==n){if(0==e.doc.history.lastModTime)return;var i=e.doc.history.done.filter(function(e){if(void 0!==e.changes)return e});i.reverse();var s=i[0].changes[0].to;return s}var l=t.marks[n];return l&&l.find()}function nt(e,n,r,o,i,s,l,d,p){function c(){e.operation(function(){for(;!g;)u(),h();m()})}function u(){var t=e.getRange(s.from(),s.to()),n=t.replace(l,d);s.replace(n)}function h(){for(;s.findNext()&&Ze(s.from(),o,i);)if(r||!f||s.from().line!=f.line)return e.scrollIntoView(s.from(),30),e.setSelection(s.from(),s.to()),f=s.from(),void(g=!1);g=!0}function m(t){if(t&&t(),e.focus(),f){e.setCursor(f);var n=e.state.vim;n.exMode=!1,n.lastHPos=n.lastHSPos=f.ch}p&&p()}e.state.vim.exMode=!0;var g=!1,f=s.from();return h(),g?void We(e,"No matches for "+l.source):n?void Ke(e,{prefix:"replace with "+d+" (y/n/a/q/l)",onKeyDown:function(n,r,o){t.e_stop(n);var i=t.keyName(n);switch(i){case"Y":u(),h();break;case"N":h();break;case"A":var s=p;p=void 0,e.operation(c),p=s;break;case"L":u();case"Q":case"Esc":case"Ctrl-C":case"Ctrl-[":m(o);}return g&&m(o),!0}}):(c(),void(p&&p()))}function rt(e){var n=e.state.vim,r=Nt.macroModeState,o=Nt.registerController.getRegister("."),s=r.isPlaying,l=r.lastInsertModeChanges,d=[];if(!s){for(var p=l.inVisualBlock&&n.lastSelection?n.lastSelection.visualBlock.height:1,c=l.changes,d=[],u=0;u|<\w+>|./.exec(i),u=c[0],i=i.substring(c.index+u.length),t.Vim.handleKey(e,u,"macro"),n.insertMode){var h=s.insertModeChanges[d++].changes;Nt.macroModeState.lastInsertModeChanges.changes=h,ft(e,h,1),rt(e)}r.isPlaying=!1}function it(e,t){if(!e.isPlaying){var n=e.latestRegister,r=Nt.registerController.getRegister(n);r&&r.pushText(t)}}function st(e){if(!e.isPlaying){var t=e.latestRegister,n=Nt.registerController.getRegister(t);n&&n.pushInsertModeChanges&&n.pushInsertModeChanges(e.lastInsertModeChanges)}}function lt(e,t){if(!e.isPlaying){var n=e.latestRegister,r=Nt.registerController.getRegister(n);r&&r.pushSearchQuery&&r.pushSearchQuery(t)}}function dt(e,t){var n=Nt.macroModeState,r=n.lastInsertModeChanges;if(!n.isPlaying)for(;t;){if(r.expectCursorActivityForChange=!0,"+input"==t.origin||"paste"==t.origin||void 0===t.origin){var o=t.text.join("\n");r.maybeReset&&(r.changes=[],r.maybeReset=!1),e.state.overwrite&&!/\n/.test(o)?r.changes.push([o]):r.changes.push(o)}t=t.next}}function pt(e){var t=e.state.vim;if(t.insertMode){var n=Nt.macroModeState;if(n.isPlaying)return;var r=n.lastInsertModeChanges;r.expectCursorActivityForChange?r.expectCursorActivityForChange=!1:r.maybeReset=!0}else e.curOp.isVimOp||ut(e,t);t.visualMode&&ct(e)}function ct(e){var t=e.state.vim,n=q(e,Y(t.sel.head)),r=W(n,0,1);t.fakeCursor&&t.fakeCursor.clear(),t.fakeCursor=e.markText(n,r,{className:"cm-animate-fat-cursor"})}function ut(e,n){var r=e.getCursor("anchor"),o=e.getCursor("head");if(n.visualMode&&!e.somethingSelected()?ge(e,!1):!n.visualMode&&!n.insertMode&&e.somethingSelected()&&(n.visualMode=!0,n.visualLine=!1,t.signal(e,"vim-mode-change",{mode:"visual"})),n.visualMode){var i=$(o,r)?0:-1,s=$(o,r)?-1:0;o=W(o,0,i),r=W(r,0,s),n.sel={anchor:r,head:o},Ee(e,n,"<",Z(o,r)),Ee(e,n,">",ee(o,r))}else n.insertMode||(n.lastHPos=e.getCursor().ch)}function ht(e){this.keyName=e}function mt(n){var e=Nt.macroModeState,r=e.lastInsertModeChanges,o=t.keyName(n);o&&(-1==o.indexOf("Delete")&&-1==o.indexOf("Backspace")||t.lookupKey(o,"vim-insert",function(){return r.maybeReset&&(r.changes=[],r.maybeReset=!1),r.changes.push(new ht(o)),!0}))}function gt(e,t,n,r){function o(){d?Ot.processAction(e,t,t.lastEditActionCommand):Ot.evalInput(e,t)}function s(n){if(0"]),_t=[].concat(St,wt,Ct,["-","\"",".",":","/"]),Et={};N("filetype",void 0,"string",["ft"],function(e,t){if(void 0!==t){if(void 0===e){var n=t.getOption("mode");return"null"==n?"":n}var n=""==e?"null":e;t.setOption("mode",n)}});var At=function(){var e=100,t=-1,n=0,r=0,o=Array(e);return{cachedCursor:void 0,add:function(i,s,l){function d(n){var r=++t%e,s=o[r];s&&s.clear(),o[r]=i.setBookmark(n)}var p=t%e,c=o[p];if(c){var u=c.find();u&&!J(u,s)&&d(s)}else d(s);d(l),n=t,r=t-e+1,0>r&&(r=0)},move:function(i,s){t+=s,t>n?t=n:tr)}return l}}},It=function(e){return e?{changes:e.changes,expectCursorActivityForChange:e.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};M.prototype={exitMacroRecordMode:function(){var e=Nt.macroModeState;e.onRecordingDone&&e.onRecordingDone(),e.onRecordingDone=void 0,e.isRecording=!1},enterMacroRecordMode:function(e,t){var n=Nt.registerController.getRegister(t);n&&(n.clear(),this.latestRegister=t,e.openDialog&&(this.onRecordingDone=e.openDialog("(recording)["+t+"]",null,{bottom:!0})),this.isRecording=!0)}};var Nt,Lt;P.prototype.pushRepeatDigit=function(e){this.operator?this.motionRepeat=this.motionRepeat.concat(e):this.prefixRepeat=this.prefixRepeat.concat(e)},P.prototype.getRepeat=function(){var e=0;return(0=n.length?(this.iterator=n.length,this.initialPrefix):0>o?e:void 0},pushInput:function(e){var t=this.historyBuffer.indexOf(e);-1"==i.keys.slice(-11)){var d=X(e);if(!d)return{type:"none"};n.selectedCharacter=d}return{type:"full",command:i}},processCommand:function(e,t,n){switch(t.inputState.repeatOverride=n.repeatOverride,n.type){case"motion":this.processMotion(e,t,n);break;case"operator":this.processOperator(e,t,n);break;case"operatorMotion":this.processOperatorMotion(e,t,n);break;case"action":this.processAction(e,t,n);break;case"search":this.processSearch(e,t,n);break;case"ex":case"keyToEx":this.processEx(e,t,n);break;default:}},processMotion:function(e,t,n){t.inputState.motion=n.motion,t.inputState.motionArgs=V(n.motionArgs),this.evalInput(e,t)},processOperator:function(e,t,n){var r=t.inputState;if(r.operator){if(r.operator==n.operator)return r.motion="expandToLine",r.motionArgs={linewise:!0},void this.evalInput(e,t);B(e)}r.operator=n.operator,r.operatorArgs=V(n.operatorArgs),t.visualMode&&this.evalInput(e,t)},processOperatorMotion:function(e,t,n){var r=t.visualMode,o=V(n.operatorMotionArgs);o&&r&&o.visualLine&&(t.visualLine=!0),this.processOperator(e,t,n),r||this.processMotion(e,t,n)},processAction:function(e,t,n){var r=t.inputState,o=r.getRepeat(),i=V(n.actionArgs)||{};r.selectedCharacter&&(i.selectedCharacter=r.selectedCharacter),n.operator&&this.processOperator(e,t,n),n.motion&&this.processMotion(e,t,n),(n.motion||n.operator)&&this.evalInput(e,t),i.repeat=o||1,i.repeatIsExplicit=!!o,i.registerName=r.registerName,B(e),t.lastMotion=null,n.isEdit&&this.recordLastEdit(t,r,n),Rt[n.action](e,i,t)},processSearch:function(n,e,r){function o(t,o,i){Nt.searchHistoryController.pushInput(t),Nt.searchHistoryController.reset();try{Xe(n,t,o,i)}catch(r){return We(n,"Invalid regex: "+t),void B(n)}Ot.processMotion(n,e,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:r.searchArgs.toJumplist}})}function i(e){n.scrollTo(m.left,m.top),o(e,!0,!0);var t=Nt.macroModeState;t.isRecording&<(t,e)}function s(r,e,o){var i=t.keyName(r),s,d;"Up"==i||"Down"==i?(s="Up"==i,d=r.target?r.target.selectionEnd:0,e=Nt.searchHistoryController.nextMatch(e,s)||"",o(e),d&&r.target&&(r.target.selectionEnd=r.target.selectionStart=l(d,r.target.value.length))):"Left"!=i&&"Right"!=i&&"Ctrl"!=i&&"Alt"!=i&&"Shift"!=i&&Nt.searchHistoryController.reset();var c;try{c=Xe(n,e,!0,!0)}catch(t){}c?n.scrollIntoView(Je(n,!p,c),30):($e(n),n.scrollTo(m.left,m.top))}function d(r,e,o){var i=t.keyName(r);"Esc"==i||"Ctrl-C"==i||"Ctrl-["==i||"Backspace"==i&&""==e?(Nt.searchHistoryController.pushInput(e),Nt.searchHistoryController.reset(),Xe(n,h),$e(n),n.scrollTo(m.left,m.top),t.e_stop(r),B(n),o(),n.focus()):"Up"==i||"Down"==i?t.e_stop(r):"Ctrl-U"==i&&(t.e_stop(r),o(""))}if(n.getSearchCursor){var p=r.searchArgs.forward,c=r.searchArgs.wholeWordOnly;De(n).setReversed(!p);var u=p?"/":"?",h=De(n).getQuery(),m=n.getScrollInfo();switch(r.searchArgs.querySrc){case"prompt":var g=Nt.macroModeState;if(g.isPlaying){var f=g.replaySearchQueries.shift();o(f,!0,!1)}else Ke(n,{onClose:i,prefix:u,desc:zt,onKeyUp:s,onKeyDown:d});break;case"wordUnderCursor":var y=xe(n,!1,!0,!1,!0),b=!0;if(y||(y=xe(n,!1,!0,!1,!1),b=!1),!y)return;var f=n.getLine(y.start.line).substring(y.start.ch,y.end.ch);f=b&&c?"\\b"+f+"\\b":oe(f),Nt.jumpList.cachedCursor=n.getCursor(),n.setCursor(y.start),o(f,!0,!1);}}},processEx:function(n,e,r){function o(e){Nt.exCommandHistoryController.pushInput(e),Nt.exCommandHistoryController.reset(),Vt.processCommand(n,e)}function i(r,e,o){var i=t.keyName(r),s,d;("Esc"==i||"Ctrl-C"==i||"Ctrl-["==i||"Backspace"==i&&""==e)&&(Nt.exCommandHistoryController.pushInput(e),Nt.exCommandHistoryController.reset(),t.e_stop(r),B(n),o(),n.focus()),"Up"==i||"Down"==i?(t.e_stop(r),s="Up"==i,d=r.target?r.target.selectionEnd:0,e=Nt.exCommandHistoryController.nextMatch(e,s)||"",o(e),d&&r.target&&(r.target.selectionEnd=r.target.selectionStart=l(d,r.target.value.length))):"Ctrl-U"==i?(t.e_stop(r),o("")):"Left"!=i&&"Right"!=i&&"Ctrl"!=i&&"Alt"!=i&&"Shift"!=i&&Nt.exCommandHistoryController.reset()}"keyToEx"==r.type?Vt.processCommand(n,r.exArgs.input):e.visualMode?Ke(n,{onClose:o,prefix:":",value:"'<,'>",onKeyDown:i,selectValueOnOpen:!1}):Ke(n,{onClose:o,prefix:":",onKeyDown:i})},evalInput:function(e,t){var n=t.inputState,o=n.motion,s=n.motionArgs||{},l=n.operator,d=n.operatorArgs||{},c=n.registerName,u=t.sel,h=Y(t.visualMode?q(e,u.head):e.getCursor("head")),m=Y(t.visualMode?q(e,u.anchor):e.getCursor("anchor")),g=Y(h),f=Y(m),y,b,x;if(l&&this.recordLastEdit(t,n),x=void 0===n.repeatOverride?n.getRepeat():n.repeatOverride,0",$(b,y)?y:b)):!l&&(y=q(e,y),e.setCursor(y.line,y.ch))}if(l){if(d.lastSel){b=f;var w=d.lastSel,C=r(w.head.line-w.anchor.line),T=r(w.head.ch-w.anchor.ch);y=w.visualLine?p(f.line+C,f.ch):w.visualBlock?p(f.line+C,f.ch+T):w.head.line==w.anchor.line?p(f.line,f.ch+T):p(f.line+C,f.ch),t.visualMode=!0,t.visualLine=w.visualLine,t.visualBlock=w.visualBlock,u=t.sel={anchor:b,head:y},ue(e)}else t.visualMode&&(d.lastSel={anchor:Y(u.anchor),head:Y(u.head),visualBlock:t.visualBlock,visualLine:t.visualLine});var _,E,A,I,N;if(!t.visualMode){if(_=Y(b||f),E=Y(y||g),$(E,_)){var L=_;_=E,E=L}A=s.linewise||d.linewise,A?ye(e,_,E):s.forward&&fe(e,_,E),I="char";var O=!s.inclusive||A;N=he(e,{anchor:_,head:E},I,O)}else if(_=Z(u.head,u.anchor),E=ee(u.head,u.anchor),A=t.visualLine||d.linewise,I=t.visualBlock?"block":A?"line":"char",N=he(e,{anchor:_,head:E},I),A){var M=N.ranges;if("block"==I)for(var D=0;Dc&&o.line==c?this.moveToEol(e,t,n,r):(n.toFirstChar&&(i=be(e.getLine(l)),r.lastHPos=i),r.lastHSPos=e.charCoords(p(l,i),"div").left,p(l,i))},moveByDisplayLines:function(e,t,n,r){var o=t;switch(r.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:r.lastHSPos=e.charCoords(o,"div").left;}var i=n.repeat,s=e.findPosV(o,n.forward?i:-i,"line",r.lastHSPos);if(s.hitSide)if(n.forward)var l=e.charCoords(s,"div"),d={top:l.top+8,left:r.lastHSPos},s=e.coordsChar(d,"div");else{var c=e.charCoords(p(e.firstLine(),0),"div");c.left=r.lastHSPos,s=e.coordsChar(c,"div")}return r.lastHPos=s.ch,s},moveByPage:function(e,t,n){var r=n.repeat;return e.findPosV(t,n.forward?r:-r,"page")},moveByParagraph:function(e,t,n){var r=n.forward?1:-1;return Ie(e,t,n.repeat,r)},moveBySentence:function(e,t,n){var r=n.forward?1:-1;return Ne(e,t,n.repeat,r)},moveByScroll:function(e,t,n,r){var o=e.getScrollInfo(),i=null,s=n.repeat;s||(s=o.clientHeight/(2*e.defaultTextHeight()));var l=e.charCoords(t,"local");n.repeat=s;var i=Mt.moveByDisplayLines(e,t,n,r);if(!i)return null;var d=e.charCoords(i,"local");return e.scrollTo(null,o.top+d.top-l.top),i},moveByWords:function(e,t,n){return Ce(e,t,n.repeat,!!n.forward,!!n.wordEnd,!!n.bigWord)},moveTillCharacter:function(e,t,n){var r=n.repeat,o=Te(e,r,n.forward,n.selectedCharacter),i=n.forward?-1:1;return(ke(i,n),!o)?null:(o.ch+=i,o)},moveToCharacter:function(e,t,n){var r=n.repeat;return ke(0,n),Te(e,r,n.forward,n.selectedCharacter)||t},moveToSymbol:function(e,t,n){var r=n.repeat;return Se(e,r,n.forward,n.selectedCharacter)||t},moveToColumn:function(e,t,n,r){var o=n.repeat;return r.lastHPos=o-1,r.lastHSPos=e.charCoords(t,"div").left,_e(e,o)},moveToEol:function(e,t,n,r){r.lastHPos=Infinity;var o=p(t.line+n.repeat-1,Infinity),i=e.clipPos(o);return i.ch--,r.lastHSPos=e.charCoords(i,"div").left,o},moveToFirstNonWhiteSpaceCharacter:function(e,t){var n=t;return p(n.line,be(e.getLine(n.line)))},moveToMatchedSymbol:function(e,t){for(var n=t,r=n.line,o=n.ch,i=e.getLine(r),s;oe.lastLine()&&n.linewise&&!g?e.replaceRange("",m,c):e.replaceRange("",d,c),n.linewise&&(!g&&(e.setCursor(m),t.commands.newlineAndIndent(e)),d.ch=o),s=d}else{l=e.getSelection();var f=j("",r.length);e.replaceSelections(f),s=Z(r[0].head,r[0].anchor)}Nt.registerController.pushText(n.registerName,"change",l,n.linewise,1c.top?(p.line+=(d-c.top)/i,p.line=Math.ceil(p.line),e.setCursor(p),c=e.charCoords(p,"local"),e.scrollTo(null,c.top)):e.scrollTo(null,d);else{var u=d+e.getScrollInfo().clientHeight;u=s.anchor.line?c=W(s.head,0,1):c=p(s.anchor.line,0);else if("inplace"==i&&o.visualMode)return;e.setOption("disableInput",!1),n&&n.replace?(e.toggleOverwrite(!0),e.setOption("keyMap","vim-replace"),t.signal(e,"vim-mode-change",{mode:"replace"})):(e.toggleOverwrite(!1),e.setOption("keyMap","vim-insert"),t.signal(e,"vim-mode-change",{mode:"insert"})),Nt.macroModeState.isPlaying||(e.on("change",dt),t.on(e.getInputField(),"keydown",mt)),o.visualMode&&ge(e),se(e,c,u)}},toggleVisualMode:function(e,n,r){var o=n.repeat,i=e.getCursor(),s;r.visualMode?r.visualLine^n.linewise||r.visualBlock^n.blockwise?(r.visualLine=!!n.linewise,r.visualBlock=!!n.blockwise,t.signal(e,"vim-mode-change",{mode:"visual",subMode:r.visualLine?"linewise":r.visualBlock?"blockwise":""}),ue(e)):ge(e):(r.visualMode=!0,r.visualLine=!!n.linewise,r.visualBlock=!!n.blockwise,s=q(e,p(i.line,i.ch+o-1),!0),r.sel={anchor:i,head:s},t.signal(e,"vim-mode-change",{mode:"visual",subMode:r.visualLine?"linewise":r.visualBlock?"blockwise":""}),ue(e),Ee(e,r,"<",Z(i,s)),Ee(e,r,">",ee(i,s)))},reselectLastSelection:function(e,n,r){var o=r.lastSelection;if(r.visualMode&&pe(e,r),o){var i=o.anchorMark.find(),s=o.headMark.find();if(!i||!s)return;r.sel={anchor:i,head:s},r.visualMode=!0,r.visualLine=o.visualLine,r.visualBlock=o.visualBlock,ue(e),Ee(e,r,"<",Z(i,s)),Ee(e,r,">",ee(i,s)),t.signal(e,"vim-mode-change",{mode:"visual",subMode:r.visualLine?"linewise":r.visualBlock?"blockwise":""})}},joinLines:function(e,t,n){var r,o;if(n.visualMode){if(r=e.getCursor("anchor"),o=e.getCursor("head"),$(o,r)){var s=o;o=r,r=s}o.ch=ne(e,o.line)-1}else{var l=d(t.repeat,2);r=e.getCursor(),o=q(e,p(r.line+l-1,Infinity))}for(var c=0,u=r.line;un)return"";if(e.getOption("indentWithTabs")){var r=o(n/d);return Array(r+1).join("\t")}return Array(n+1).join(" ")});l+=g?"\n":""}if(1e.lastLine()&&e.replaceRange("\n",p(A,0));var I=ne(e,A);Ic.length&&(l=c.length),d=p(i.line,l)}if("\n"==o)r.visualMode||e.replaceRange("",i,d),(t.commands.newlineAndIndentContinueComment||t.commands.newlineAndIndent)(e);else{var u=e.getRange(i,d);if(u=u.replace(/[^\n]/g,o),r.visualBlock){var h=Array(e.getOption("tabSize")+1).join(" ");u=e.getSelection(),u=u.replace(/\t/g,h).replace(/[^\n]/g,o).split("\n"),e.replaceSelections(u)}else e.replaceRange(u,i,d);r.visualMode?(i=$(s[0].anchor,s[0].head)?s[0].anchor:s[0].head,e.setCursor(i),ge(e,!1)):e.setCursor(W(d,0,-1))}},incrementNumberToken:function(e,t){for(var n=e.getCursor(),r=e.getLine(n.line),o=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,i,s,l,d;null!==(i=o.exec(r))&&(s=i.index,l=s+i[0].length,!(n.cht.args.length?void We(e,e.getOption("theme")):void e.setOption("theme",t.args[0])},map:function(e,t,n){var r=t.args;return!r||2>r.length?void(e&&We(e,"Invalid mapping: "+t.input)):void Vt.map(r[0],r[1],n)},imap:function(e,t){this.map(e,t,"insert")},nmap:function(e,t){this.map(e,t,"normal")},vmap:function(e,t){this.map(e,t,"visual")},unmap:function(e,t,n){var r=t.args;return!r||1>r.length?void(e&&We(e,"No such mapping: "+t.input)):void Vt.unmap(r[0],n)},move:function(e,t){Ot.processCommand(e,e.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:t.line+1})},set:function(e,t){var n=t.args,r=t.setCfg||{};if(!n||1>n.length)return void(e&&We(e,"Invalid mapping: "+t.input));var o=n[0].split("="),i=o[0],s=o[1],l=!1;if("?"==i.charAt(i.length-1)){if(s)throw Error("Trailing characters: "+t.argString);i=i.substring(0,i.length-1),l=!0}void 0===s&&"no"==i.substring(0,2)&&(i=i.substring(2),s=!1);var d=Et[i]&&"boolean"==Et[i].type;if(d&&void 0==s&&(s=!0),!d&&void 0===s||l){var p=O(i,e,r);p instanceof Error?We(e,p.message):!0===p||!1===p?We(e," "+(p?"":"no")+i):We(e," "+i+"="+p)}else{var c=L(i,s,e,r);c instanceof Error&&We(e,c.message)}},setlocal:function(e,t){t.setCfg={scope:"local"},this.set(e,t)},setglobal:function(e,t){t.setCfg={scope:"global"},this.set(e,t)},registers:function(e,t){var n=t.args,r=Nt.registerController.registers,o="----------Registers----------

";if(!n)for(var s in r){var l=r[s].toString();l.length&&(o+="\""+s+" "+l+"
")}else{var s;n=n.join("");for(var d=0;d"}}We(e,o)},sort:function(e,n){function r(e,t){if(l){var n;n=e,e=t,t=n}d&&(e=e.toLowerCase(),t=t.toLowerCase());var r=u&&x.exec(e),o=u&&x.exec(t);return r?(r=parseInt((r[1]+r[2]).toLowerCase(),v),o=parseInt((o[1]+o[2]).toLowerCase(),v),r-o):e");if(!d)return void We(e,u);var m=0;(function t(){if(m=u)return void We(e,"Invalid argument: "+n.argString.substring(i));for(var h=0,m;h<=u-c;h++)m=s(c+h),delete r.marks[m]}else return void We(e,"Invalid argument: "+d+"-")}else delete r.marks[l]}}},Vt=new jt;return t.keyMap.vim={attach:h,detach:u,call:b},N("insertModeEscKeysTimeout",200,"number"),t.keyMap["vim-insert"]={fallthrough:["default"],attach:h,detach:u,call:b},t.keyMap["vim-replace"]={Backspace:"goCharLeft",fallthrough:["vim-insert"],attach:h,detach:u,call:b},R(),{buildKeyMap:function(){},getRegisterController:function(){return Nt.registerController},resetVimGlobalState_:R,getVimGlobalState_:function(){return Nt},maybeInitVimState_:D,suppressErrorLogging:!1,InsertModeKey:ht,map:function(e,t,n){Vt.map(e,t,n)},unmap:function(e,t){Vt.unmap(e,t)},setOption:L,getOption:O,defineOption:N,defineEx:function(e,t,n){if(!t)t=e;else if(0!==e.indexOf(t))throw new Error("(Vim.defineEx) \""+t+"\" is not a prefix of \""+e+"\", command not registered");qt[e]=n,Vt.commandMap_[t]={name:e,shortName:t,type:"api"}},handleKey:function(e,t,n){var r=this.findKey(e,t,n);if("function"==typeof r)return r()},findKey:function(n,r,o){function i(){var e=Nt.macroModeState;if(e.isRecording){if("q"==r)return e.exitMacroRecordMode(),B(n),!0;"mapping"!=o&&it(e,r)}}function s(){if(""==r)return B(n),d.visualMode?ge(n):d.insertMode&&rt(n),!0}function l(e){for(var o;e;)o=/<\w+-.+?>|<\w+>|./.exec(e),r=o[0],e=e.substring(o.index+r.length),t.Vim.handleKey(n,r,"mapping")}var d=D(n),p;return p=d.insertMode?function(){if(s())return!0;for(var t=d.inputState.keyBuffer+=r,o=1==r.length,l=Ot.matchCommand(t,e,d.inputState,"insert");1>18]+l[63&e>>12]+l[63&e>>6]+l[63&e]}function s(e,t,n){for(var r=[],s=t,i;s>16,l[c++]=255&i>>8,l[c++]=255&i;return 2===s&&(i=d[e.charCodeAt(h)]<<2|d[e.charCodeAt(h+1)]>>4,l[c++]=255&i),1===s&&(i=d[e.charCodeAt(h)]<<10|d[e.charCodeAt(h+1)]<<4|d[e.charCodeAt(h+2)]>>2,l[c++]=255&i>>8,l[c++]=255&i),l},t.fromByteArray=function(e){for(var t=e.length,n=t%3,r=[],o=16383,d=0,i=t-n,p;di?i:d+o));return 1==n?(p=e[t-1],r.push(l[p>>2]+l[63&p<<4]+"==")):2==n&&(p=(e[t-2]<<8)+e[t-1],r.push(l[p>>10]+l[63&p>>4]+l[63&p<<2]+"=")),r.join("")};for(var l=[],d=[],p="undefined"==typeof Uint8Array?Array:Uint8Array,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,i=c.length;u=o?-1:l.lastIndexOf(r,o-1),-1==d){if(1==i)break;i=1,o=l.length;continue}if(1==i&&dx&&(x=i.length),0>v&&(v=i.length),b=r(x,v),b==i.length)break;if(e.getTokenTypeAt(t.Pos(y,b+1))==u)if(b==x)++h;else if(! --h){g=y,f=b;break outer}++b}return null==g||s==g&&f==c?void 0:{from:t.Pos(s,c),to:t.Pos(g,f)}}}),t.registerHelper("fold","import",function(n,e){function o(o){if(on.lastLine())return null;var s=n.getTokenAt(t.Pos(o,1));if(/\S/.test(s.string)||(s=n.getTokenAt(t.Pos(o,s.end+1))),"keyword"!=s.type||"import"!=s.string)return null;for(var l=o,i=r(n.lastLine(),o+10);l<=i;++l){var e=n.getLine(l),d=e.indexOf(";");if(-1!=d)return{startCh:s.end,end:t.Pos(l,d)}}}var i=e.line,s=o(i),l;if(!s||o(i-1)||(l=o(i-2))&&l.end.line==i-1)return null;for(var d=s.end,p;;){if(p=o(d.line+1),null==p)break;d=p.end}return{from:n.clipPos(t.Pos(i,s.startCh+1)),to:d}}),t.registerHelper("fold","include",function(e,n){function r(n){if(ne.lastLine())return null;var r=e.getTokenAt(t.Pos(n,1));if(/\S/.test(r.string)||(r=e.getTokenAt(t.Pos(n,r.end+1))),"meta"==r.type&&"#include"==r.string.slice(0,8))return r.start+8}var o=n.line,i=r(o);if(null==i||null!=r(o-1))return null;for(var s=o,l;;){if(l=r(s+1),null==l)break;++s}return{from:t.Pos(o,i+1),to:e.clipPos(t.Pos(s))}})})}}); \ No newline at end of file