From 51cf7a98fb95c7df731700a0d620eb3fd7d63d70 Mon Sep 17 00:00:00 2001 From: oldj Date: Thu, 9 Jan 2020 14:31:21 +0800 Subject: [PATCH] - add notarization scripts. - fix some small issues of StatConfirm. --- .gitignore | 3 +++ app-ui/frame/MyFrame.jsx | 3 ++- app-ui/frame/StatConfirm.jsx | 3 ++- app/ui/app.js | 2 +- app/ui/common.js.LICENSE | 2 +- app/version.js | 2 +- package-lock.json | 33 +++++++++++++++++++++++++++++--- package.json | 7 ++++++- scripts/entitlements.mac.plist | 8 ++++++++ scripts/make.js | 6 +++++- scripts/notarize.js | 35 ++++++++++++++++++++++++++++++++++ 11 files changed, 94 insertions(+), 10 deletions(-) create mode 100644 scripts/entitlements.mac.plist create mode 100644 scripts/notarize.js diff --git a/.gitignore b/.gitignore index 44b7daf34..cab606743 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,6 @@ xcdebugger npm-debug.log* .nyc_output coverage/ + +.env + diff --git a/app-ui/frame/MyFrame.jsx b/app-ui/frame/MyFrame.jsx index 141fe2930..b4f28ad7c 100644 --- a/app-ui/frame/MyFrame.jsx +++ b/app-ui/frame/MyFrame.jsx @@ -60,7 +60,7 @@ export default class MyFrame extends React.Component { if (!this.props.show) { return null } - let {show, title, body, lang, width, okText, cancelText} = this.props + let {show, title, body, lang, width, okText, cancelText, maskClosable} = this.props return ( ]} + maskClosable={maskClosable} >
{body}
{/*
*/} diff --git a/app-ui/frame/StatConfirm.jsx b/app-ui/frame/StatConfirm.jsx index a8713867d..4330a0de7 100644 --- a/app-ui/frame/StatConfirm.jsx +++ b/app-ui/frame/StatConfirm.jsx @@ -33,12 +33,13 @@ const StatConfirm = (props) => { show={show} title={lang.pref_tab_usage_data_title} body={
{lang.pref_tab_usage_data_desc}
} - onOK={() => setShow(true)} + onOK={() => setSend(true)} onCancel={() => setSend(false)} lang={lang} width={400} okText={lang.send_usage_data_ok} cancelText={lang.send_usage_data_cancel} + maskClosable={false} /> ) } diff --git a/app/ui/app.js b/app/ui/app.js index 82cbf2f80..592771589 100644 --- a/app/ui/app.js +++ b/app/ui/app.js @@ -1,3 +1,3 @@ /*! For license information please see app.js.LICENSE */ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=272)}([function(e,t,n){e.exports=n(318)()},function(e,t,n){"use strict";e.exports=n(273)},function(e,t,n){(function(e){e.exports=function(){"use strict";var t,r;function o(){return t.apply(null,arguments)}function i(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function a(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function c(e){return void 0===e}function l(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function s(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function u(e,t){var n,r=[];for(n=0;n>>0,r=0;r0)for(n=0;n=0?n?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+r}var F=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,I=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,W={},R={};function U(e,t,n,r){var o=r;"string"==typeof r&&(o=function(){return this[r]()}),e&&(R[e]=o),t&&(R[t[0]]=function(){return A(o.apply(this,arguments),t[1],t[2])}),n&&(R[n]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function K(e,t){return e.isValid()?(t=B(t,e.localeData()),W[t]=W[t]||function(e){var t,n,r,o=e.match(F);for(t=0,n=o.length;t=0&&I.test(e);)e=e.replace(I,r),I.lastIndex=0,n-=1;return e}var G=/\d/,q=/\d\d/,J=/\d{3}/,$=/\d{4}/,X=/[+-]?\d{6}/,Q=/\d\d?/,Z=/\d\d\d\d?/,ee=/\d\d\d\d\d\d?/,te=/\d{1,3}/,ne=/\d{1,4}/,re=/[+-]?\d{1,6}/,oe=/\d+/,ie=/[+-]?\d+/,ae=/Z|[+-]\d\d:?\d\d/gi,ce=/Z|[+-]\d\d(?::?\d\d)?/gi,le=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,se={};function ue(e,t,n){se[e]=x(t)?t:function(e,r){return e&&n?n:t}}function de(e,t){return d(se,e)?se[e](t._strict,t._locale):new RegExp(fe(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,o){return t||n||r||o}))))}function fe(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var he={};function pe(e,t){var n,r=t;for("string"==typeof e&&(e=[e]),l(t)&&(r=function(e,n){n[t]=L(e)}),n=0;n68?1900:2e3)};var Te,Ce=xe("FullYear",!0);function xe(e,t){return function(n){return null!=n?(De(this,e,n),o.updateOffset(this,t),this):He(this,e)}}function He(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function De(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&Oe(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Ee(n,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function Ee(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,r=(t%(n=12)+n)%n;return e+=(t-r)/12,1===r?Oe(e)?29:28:31-r%7%2}Te=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t=0?(c=new Date(e+400,t,n,r,o,i,a),isFinite(c.getFullYear())&&c.setFullYear(e)):c=new Date(e,t,n,r,o,i,a),c}function Ue(e){var t;if(e<100&&e>=0){var n=Array.prototype.slice.call(arguments);n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)}else t=new Date(Date.UTC.apply(null,arguments));return t}function Ke(e,t,n){var r=7+t-n;return-(7+Ue(e,0,r).getUTCDay()-t)%7+r-1}function Be(e,t,n,r,o){var i,a,c=1+7*(t-1)+(7+n-r)%7+Ke(e,r,o);return c<=0?a=Se(i=e-1)+c:c>Se(e)?(i=e+1,a=c-Se(e)):(i=e,a=c),{year:i,dayOfYear:a}}function Ge(e,t,n){var r,o,i=Ke(e.year(),t,n),a=Math.floor((e.dayOfYear()-i-1)/7)+1;return a<1?r=a+qe(o=e.year()-1,t,n):a>qe(e.year(),t,n)?(r=a-qe(e.year(),t,n),o=e.year()+1):(o=e.year(),r=a),{week:r,year:o}}function qe(e,t,n){var r=Ke(e,t,n),o=Ke(e+1,t,n);return(Se(e)-r+o)/7}function Je(e,t){return e.slice(t,7).concat(e.slice(0,t))}U("w",["ww",2],"wo","week"),U("W",["WW",2],"Wo","isoWeek"),P("week","w"),P("isoWeek","W"),N("week",5),N("isoWeek",5),ue("w",Q),ue("ww",Q,q),ue("W",Q),ue("WW",Q,q),me(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=L(e)})),U("d",0,"do","day"),U("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),U("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),U("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),U("e",0,0,"weekday"),U("E",0,0,"isoWeekday"),P("day","d"),P("weekday","e"),P("isoWeekday","E"),N("day",11),N("weekday",11),N("isoWeekday",11),ue("d",Q),ue("e",Q),ue("E",Q),ue("dd",(function(e,t){return t.weekdaysMinRegex(e)})),ue("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),ue("dddd",(function(e,t){return t.weekdaysRegex(e)})),me(["dd","ddd","dddd"],(function(e,t,n,r){var o=n._locale.weekdaysParse(e,r,n._strict);null!=o?t.d=o:p(n).invalidWeekday=e})),me(["d","e","E"],(function(e,t,n,r){t[r]=L(e)}));var $e="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Xe="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Qe="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function Ze(e,t,n){var r,o,i,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)i=h([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(i,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(o=Te.call(this._weekdaysParse,a))?o:null:"ddd"===t?-1!==(o=Te.call(this._shortWeekdaysParse,a))?o:null:-1!==(o=Te.call(this._minWeekdaysParse,a))?o:null:"dddd"===t?-1!==(o=Te.call(this._weekdaysParse,a))?o:-1!==(o=Te.call(this._shortWeekdaysParse,a))?o:-1!==(o=Te.call(this._minWeekdaysParse,a))?o:null:"ddd"===t?-1!==(o=Te.call(this._shortWeekdaysParse,a))?o:-1!==(o=Te.call(this._weekdaysParse,a))?o:-1!==(o=Te.call(this._minWeekdaysParse,a))?o:null:-1!==(o=Te.call(this._minWeekdaysParse,a))?o:-1!==(o=Te.call(this._weekdaysParse,a))?o:-1!==(o=Te.call(this._shortWeekdaysParse,a))?o:null}var et=le,tt=le,nt=le;function rt(){function e(e,t){return t.length-e.length}var t,n,r,o,i,a=[],c=[],l=[],s=[];for(t=0;t<7;t++)n=h([2e3,1]).day(t),r=this.weekdaysMin(n,""),o=this.weekdaysShort(n,""),i=this.weekdays(n,""),a.push(r),c.push(o),l.push(i),s.push(r),s.push(o),s.push(i);for(a.sort(e),c.sort(e),l.sort(e),s.sort(e),t=0;t<7;t++)c[t]=fe(c[t]),l[t]=fe(l[t]),s[t]=fe(s[t]);this._weekdaysRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function ot(){return this.hours()%12||12}function it(e,t){U(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function at(e,t){return t._meridiemParse}U("H",["HH",2],0,"hour"),U("h",["hh",2],0,ot),U("k",["kk",2],0,(function(){return this.hours()||24})),U("hmm",0,0,(function(){return""+ot.apply(this)+A(this.minutes(),2)})),U("hmmss",0,0,(function(){return""+ot.apply(this)+A(this.minutes(),2)+A(this.seconds(),2)})),U("Hmm",0,0,(function(){return""+this.hours()+A(this.minutes(),2)})),U("Hmmss",0,0,(function(){return""+this.hours()+A(this.minutes(),2)+A(this.seconds(),2)})),it("a",!0),it("A",!1),P("hour","h"),N("hour",13),ue("a",at),ue("A",at),ue("H",Q),ue("h",Q),ue("k",Q),ue("HH",Q,q),ue("hh",Q,q),ue("kk",Q,q),ue("hmm",Z),ue("hmmss",ee),ue("Hmm",Z),ue("Hmmss",ee),pe(["H","HH"],be),pe(["k","kk"],(function(e,t,n){var r=L(e);t[be]=24===r?0:r})),pe(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),pe(["h","hh"],(function(e,t,n){t[be]=L(e),p(n).bigHour=!0})),pe("hmm",(function(e,t,n){var r=e.length-2;t[be]=L(e.substr(0,r)),t[Me]=L(e.substr(r)),p(n).bigHour=!0})),pe("hmmss",(function(e,t,n){var r=e.length-4,o=e.length-2;t[be]=L(e.substr(0,r)),t[Me]=L(e.substr(r,2)),t[we]=L(e.substr(o)),p(n).bigHour=!0})),pe("Hmm",(function(e,t,n){var r=e.length-2;t[be]=L(e.substr(0,r)),t[Me]=L(e.substr(r))})),pe("Hmmss",(function(e,t,n){var r=e.length-4,o=e.length-2;t[be]=L(e.substr(0,r)),t[Me]=L(e.substr(r,2)),t[we]=L(e.substr(o))}));var ct,lt=xe("Hours",!0),st={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Ye,monthsShort:je,week:{dow:0,doy:6},weekdays:$e,weekdaysMin:Qe,weekdaysShort:Xe,meridiemParse:/[ap]\.?m?\.?/i},ut={},dt={};function ft(e){return e?e.toLowerCase().replace("_","-"):e}function ht(t){var r=null;if(!ut[t]&&void 0!==e&&e&&e.exports)try{r=ct._abbr,n(354)("./"+t),pt(r)}catch(e){}return ut[t]}function pt(e,t){var n;return e&&((n=c(t)?vt(e):mt(e,t))?ct=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),ct._abbr}function mt(e,t){if(null!==t){var n,r=st;if(t.abbr=e,null!=ut[e])C("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=ut[e]._config;else if(null!=t.parentLocale)if(null!=ut[t.parentLocale])r=ut[t.parentLocale]._config;else{if(null==(n=ht(t.parentLocale)))return dt[t.parentLocale]||(dt[t.parentLocale]=[]),dt[t.parentLocale].push({name:e,config:t}),null;r=n._config}return ut[e]=new D(H(r,t)),dt[e]&&dt[e].forEach((function(e){mt(e.name,e.config)})),pt(e),ut[e]}return delete ut[e],null}function vt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return ct;if(!i(e)){if(t=ht(e))return t;e=[e]}return function(e){for(var t,n,r,o,i=0;i0;){if(r=ht(o.slice(0,t).join("-")))return r;if(n&&n.length>=t&&k(o,n,!0)>=t-1)break;t--}i++}return ct}(e)}function yt(e){var t,n=e._a;return n&&-2===p(e).overflow&&(t=n[_e]<0||n[_e]>11?_e:n[ge]<1||n[ge]>Ee(n[ye],n[_e])?ge:n[be]<0||n[be]>24||24===n[be]&&(0!==n[Me]||0!==n[we]||0!==n[Le])?be:n[Me]<0||n[Me]>59?Me:n[we]<0||n[we]>59?we:n[Le]<0||n[Le]>999?Le:-1,p(e)._overflowDayOfYear&&(tge)&&(t=ge),p(e)._overflowWeeks&&-1===t&&(t=ke),p(e)._overflowWeekday&&-1===t&&(t=ze),p(e).overflow=t),e}function _t(e,t,n){return null!=e?e:null!=t?t:n}function gt(e){var t,n,r,i,a,c=[];if(!e._d){for(r=function(e){var t=new Date(o.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[ge]&&null==e._a[_e]&&function(e){var t,n,r,o,i,a,c,l;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)i=1,a=4,n=_t(t.GG,e._a[ye],Ge(Pt(),1,4).year),r=_t(t.W,1),((o=_t(t.E,1))<1||o>7)&&(l=!0);else{i=e._locale._week.dow,a=e._locale._week.doy;var s=Ge(Pt(),i,a);n=_t(t.gg,e._a[ye],s.year),r=_t(t.w,s.week),null!=t.d?((o=t.d)<0||o>6)&&(l=!0):null!=t.e?(o=t.e+i,(t.e<0||t.e>6)&&(l=!0)):o=i}r<1||r>qe(n,i,a)?p(e)._overflowWeeks=!0:null!=l?p(e)._overflowWeekday=!0:(c=Be(n,r,o,i,a),e._a[ye]=c.year,e._dayOfYear=c.dayOfYear)}(e),null!=e._dayOfYear&&(a=_t(e._a[ye],r[ye]),(e._dayOfYear>Se(a)||0===e._dayOfYear)&&(p(e)._overflowDayOfYear=!0),n=Ue(a,0,e._dayOfYear),e._a[_e]=n.getUTCMonth(),e._a[ge]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=c[t]=r[t];for(;t<7;t++)e._a[t]=c[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[be]&&0===e._a[Me]&&0===e._a[we]&&0===e._a[Le]&&(e._nextDay=!0,e._a[be]=0),e._d=(e._useUTC?Ue:Re).apply(null,c),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[be]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(p(e).weekdayMismatch=!0)}}var bt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Mt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,wt=/Z|[+-]\d\d(?::?\d\d)?/,Lt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],kt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],zt=/^\/?Date\((\-?\d+)/i;function St(e){var t,n,r,o,i,a,c=e._i,l=bt.exec(c)||Mt.exec(c);if(l){for(p(e).iso=!0,t=0,n=Lt.length;t0&&p(e).unusedInput.push(a),c=c.slice(c.indexOf(n)+n.length),s+=n.length),R[i]?(n?p(e).empty=!1:p(e).unusedTokens.push(i),ve(i,n,e)):e._strict&&!n&&p(e).unusedTokens.push(i);p(e).charsLeftOver=l-s,c.length>0&&p(e).unusedInput.push(c),e._a[be]<=12&&!0===p(e).bigHour&&e._a[be]>0&&(p(e).bigHour=void 0),p(e).parsedDateParts=e._a.slice(0),p(e).meridiem=e._meridiem,e._a[be]=function(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}(e._locale,e._a[be],e._meridiem),gt(e),yt(e)}else xt(e);else St(e)}function Dt(e){var t=e._i,n=e._f;return e._locale=e._locale||vt(e._l),null===t||void 0===n&&""===t?v({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),M(t)?new b(yt(t)):(s(t)?e._d=t:i(n)?function(e){var t,n,r,o,i;if(0===e._f.length)return p(e).invalidFormat=!0,void(e._d=new Date(NaN));for(o=0;othis?this:e:v()}));function Vt(e,t){var n,r;if(1===t.length&&i(t[0])&&(t=t[0]),!t.length)return Pt();for(n=t[0],r=1;r=0?new Date(e+400,t,n)-dn:new Date(e,t,n).valueOf()}function pn(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-dn:Date.UTC(e,t,n)}function mn(e,t){U(0,[e,e.length],0,t)}function vn(e,t,n,r,o){var i;return null==e?Ge(this,r,o).year:(t>(i=qe(e,r,o))&&(t=i),yn.call(this,e,t,n,r,o))}function yn(e,t,n,r,o){var i=Be(e,t,n,r,o),a=Ue(i.year,0,i.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}U(0,["gg",2],0,(function(){return this.weekYear()%100})),U(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),mn("gggg","weekYear"),mn("ggggg","weekYear"),mn("GGGG","isoWeekYear"),mn("GGGGG","isoWeekYear"),P("weekYear","gg"),P("isoWeekYear","GG"),N("weekYear",1),N("isoWeekYear",1),ue("G",ie),ue("g",ie),ue("GG",Q,q),ue("gg",Q,q),ue("GGGG",ne,$),ue("gggg",ne,$),ue("GGGGG",re,X),ue("ggggg",re,X),me(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=L(e)})),me(["gg","GG"],(function(e,t,n,r){t[r]=o.parseTwoDigitYear(e)})),U("Q",0,"Qo","quarter"),P("quarter","Q"),N("quarter",7),ue("Q",G),pe("Q",(function(e,t){t[_e]=3*(L(e)-1)})),U("D",["DD",2],"Do","date"),P("date","D"),N("date",9),ue("D",Q),ue("DD",Q,q),ue("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),pe(["D","DD"],ge),pe("Do",(function(e,t){t[ge]=L(e.match(Q)[0])}));var _n=xe("Date",!0);U("DDD",["DDDD",3],"DDDo","dayOfYear"),P("dayOfYear","DDD"),N("dayOfYear",4),ue("DDD",te),ue("DDDD",J),pe(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=L(e)})),U("m",["mm",2],0,"minute"),P("minute","m"),N("minute",14),ue("m",Q),ue("mm",Q,q),pe(["m","mm"],Me);var gn=xe("Minutes",!1);U("s",["ss",2],0,"second"),P("second","s"),N("second",15),ue("s",Q),ue("ss",Q,q),pe(["s","ss"],we);var bn,Mn=xe("Seconds",!1);for(U("S",0,0,(function(){return~~(this.millisecond()/100)})),U(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),U(0,["SSS",3],0,"millisecond"),U(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),U(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),U(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),U(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),U(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),U(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),P("millisecond","ms"),N("millisecond",16),ue("S",te,G),ue("SS",te,q),ue("SSS",te,J),bn="SSSS";bn.length<=9;bn+="S")ue(bn,oe);function wn(e,t){t[Le]=L(1e3*("0."+e))}for(bn="S";bn.length<=9;bn+="S")pe(bn,wn);var Ln=xe("Milliseconds",!1);U("z",0,0,"zoneAbbr"),U("zz",0,0,"zoneName");var kn=b.prototype;function zn(e){return e}kn.add=tn,kn.calendar=function(e,t){var n=e||Pt(),r=Kt(n,this).startOf("day"),i=o.calendarFormat(this,r)||"sameElse",a=t&&(x(t[i])?t[i].call(this,n):t[i]);return this.format(a||this.localeData().calendar(i,this,Pt(n)))},kn.clone=function(){return new b(this)},kn.diff=function(e,t,n){var r,o,i;if(!this.isValid())return NaN;if(!(r=Kt(e,this)).isValid())return NaN;switch(o=6e4*(r.utcOffset()-this.utcOffset()),t=Y(t)){case"year":i=rn(this,r)/12;break;case"month":i=rn(this,r);break;case"quarter":i=rn(this,r)/3;break;case"second":i=(this-r)/1e3;break;case"minute":i=(this-r)/6e4;break;case"hour":i=(this-r)/36e5;break;case"day":i=(this-r-o)/864e5;break;case"week":i=(this-r-o)/6048e5;break;default:i=this-r}return n?i:w(i)},kn.endOf=function(e){var t;if(void 0===(e=Y(e))||"millisecond"===e||!this.isValid())return this;var n=this._isUTC?pn:hn;switch(e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=un-fn(t+(this._isUTC?0:this.utcOffset()*sn),un)-1;break;case"minute":t=this._d.valueOf(),t+=sn-fn(t,sn)-1;break;case"second":t=this._d.valueOf(),t+=ln-fn(t,ln)-1}return this._d.setTime(t),o.updateOffset(this,!0),this},kn.format=function(e){e||(e=this.isUtc()?o.defaultFormatUtc:o.defaultFormat);var t=K(this,e);return this.localeData().postformat(t)},kn.from=function(e,t){return this.isValid()&&(M(e)&&e.isValid()||Pt(e).isValid())?$t({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},kn.fromNow=function(e){return this.from(Pt(),e)},kn.to=function(e,t){return this.isValid()&&(M(e)&&e.isValid()||Pt(e).isValid())?$t({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},kn.toNow=function(e){return this.to(Pt(),e)},kn.get=function(e){return x(this[e=Y(e)])?this[e]():this},kn.invalidAt=function(){return p(this).overflow},kn.isAfter=function(e,t){var n=M(e)?e:Pt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=Y(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()9999?K(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):x(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",K(n,"Z")):K(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},kn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",o=t+'[")]';return this.format(n+r+"-MM-DD[T]HH:mm:ss.SSS"+o)},kn.toJSON=function(){return this.isValid()?this.toISOString():null},kn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},kn.unix=function(){return Math.floor(this.valueOf()/1e3)},kn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},kn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},kn.year=Ce,kn.isLeapYear=function(){return Oe(this.year())},kn.weekYear=function(e){return vn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},kn.isoWeekYear=function(e){return vn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},kn.quarter=kn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},kn.month=Ae,kn.daysInMonth=function(){return Ee(this.year(),this.month())},kn.week=kn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},kn.isoWeek=kn.isoWeeks=function(e){var t=Ge(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},kn.weeksInYear=function(){var e=this.localeData()._week;return qe(this.year(),e.dow,e.doy)},kn.isoWeeksInYear=function(){return qe(this.year(),1,4)},kn.date=_n,kn.day=kn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},kn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},kn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},kn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},kn.hour=kn.hours=lt,kn.minute=kn.minutes=gn,kn.second=kn.seconds=Mn,kn.millisecond=kn.milliseconds=Ln,kn.utcOffset=function(e,t,n){var r,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Ut(ce,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(r=Bt(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),i!==e&&(!t||this._changeInProgress?en(this,$t(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,o.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:Bt(this)},kn.utc=function(e){return this.utcOffset(0,e)},kn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Bt(this),"m")),this},kn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Ut(ae,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},kn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Pt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},kn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},kn.isLocal=function(){return!!this.isValid()&&!this._isUTC},kn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},kn.isUtc=Gt,kn.isUTC=Gt,kn.zoneAbbr=function(){return this._isUTC?"UTC":""},kn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},kn.dates=S("dates accessor is deprecated. Use date instead.",_n),kn.months=S("months accessor is deprecated. Use month instead",Ae),kn.years=S("years accessor is deprecated. Use year instead",Ce),kn.zone=S("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),kn.isDSTShifted=S("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!c(this._isDSTShifted))return this._isDSTShifted;var e={};if(_(e,this),(e=Dt(e))._a){var t=e._isUTC?h(e._a):Pt(e._a);this._isDSTShifted=this.isValid()&&k(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}));var Sn=D.prototype;function On(e,t,n,r){var o=vt(),i=h().set(r,t);return o[n](i,e)}function Tn(e,t,n){if(l(e)&&(t=e,e=void 0),e=e||"",null!=t)return On(e,t,n,"month");var r,o=[];for(r=0;r<12;r++)o[r]=On(e,r,n,"month");return o}function Cn(e,t,n,r){"boolean"==typeof e?(l(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,l(t)&&(n=t,t=void 0),t=t||"");var o,i=vt(),a=e?i._week.dow:0;if(null!=n)return On(t,(n+a)%7,r,"day");var c=[];for(o=0;o<7;o++)c[o]=On(t,(o+a)%7,r,"day");return c}Sn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return x(r)?r.call(t,n):r},Sn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,(function(e){return e.slice(1)})),this._longDateFormat[e])},Sn.invalidDate=function(){return this._invalidDate},Sn.ordinal=function(e){return this._ordinal.replace("%d",e)},Sn.preparse=zn,Sn.postformat=zn,Sn.relativeTime=function(e,t,n,r){var o=this._relativeTime[n];return x(o)?o(e,t,n,r):o.replace(/%d/i,e)},Sn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return x(n)?n(t):n.replace(/%s/i,t)},Sn.set=function(e){var t,n;for(n in e)x(t=e[n])?this[n]=t:this["_"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},Sn.months=function(e,t){return e?i(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Pe).test(t)?"format":"standalone"][e.month()]:i(this._months)?this._months:this._months.standalone},Sn.monthsShort=function(e,t){return e?i(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Pe.test(t)?"format":"standalone"][e.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},Sn.monthsParse=function(e,t,n){var r,o,i;if(this._monthsParseExact)return Ve.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(o=h([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(i="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[r]=new RegExp(i.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},Sn.monthsRegex=function(e){return this._monthsParseExact?(d(this,"_monthsRegex")||We.call(this),e?this._monthsStrictRegex:this._monthsRegex):(d(this,"_monthsRegex")||(this._monthsRegex=Ie),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},Sn.monthsShortRegex=function(e){return this._monthsParseExact?(d(this,"_monthsRegex")||We.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(d(this,"_monthsShortRegex")||(this._monthsShortRegex=Fe),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},Sn.week=function(e){return Ge(e,this._week.dow,this._week.doy).week},Sn.firstDayOfYear=function(){return this._week.doy},Sn.firstDayOfWeek=function(){return this._week.dow},Sn.weekdays=function(e,t){var n=i(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Je(n,this._week.dow):e?n[e.day()]:n},Sn.weekdaysMin=function(e){return!0===e?Je(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},Sn.weekdaysShort=function(e){return!0===e?Je(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},Sn.weekdaysParse=function(e,t,n){var r,o,i;if(this._weekdaysParseExact)return Ze.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(o=h([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(i="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[r]=new RegExp(i.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},Sn.weekdaysRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||rt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(d(this,"_weekdaysRegex")||(this._weekdaysRegex=et),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},Sn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||rt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(d(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=tt),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},Sn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||rt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(d(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=nt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},Sn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},Sn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},pt("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===L(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),o.lang=S("moment.lang is deprecated. Use moment.locale instead.",pt),o.langData=S("moment.langData is deprecated. Use moment.localeData instead.",vt);var xn=Math.abs;function Hn(e,t,n,r){var o=$t(t,n);return e._milliseconds+=r*o._milliseconds,e._days+=r*o._days,e._months+=r*o._months,e._bubble()}function Dn(e){return e<0?Math.floor(e):Math.ceil(e)}function En(e){return 4800*e/146097}function Pn(e){return 146097*e/4800}function Yn(e){return function(){return this.as(e)}}var jn=Yn("ms"),Vn=Yn("s"),Nn=Yn("m"),An=Yn("h"),Fn=Yn("d"),In=Yn("w"),Wn=Yn("M"),Rn=Yn("Q"),Un=Yn("y");function Kn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Bn=Kn("milliseconds"),Gn=Kn("seconds"),qn=Kn("minutes"),Jn=Kn("hours"),$n=Kn("days"),Xn=Kn("months"),Qn=Kn("years"),Zn=Math.round,er={ss:44,s:45,m:45,h:22,d:26,M:11};function tr(e,t,n,r,o){return o.relativeTime(t||1,!!n,e,r)}var nr=Math.abs;function rr(e){return(e>0)-(e<0)||+e}function or(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=nr(this._milliseconds)/1e3,r=nr(this._days),o=nr(this._months);e=w(n/60),t=w(e/60),n%=60,e%=60;var i=w(o/12),a=o%=12,c=r,l=t,s=e,u=n?n.toFixed(3).replace(/\.?0+$/,""):"",d=this.asSeconds();if(!d)return"P0D";var f=d<0?"-":"",h=rr(this._months)!==rr(d)?"-":"",p=rr(this._days)!==rr(d)?"-":"",m=rr(this._milliseconds)!==rr(d)?"-":"";return f+"P"+(i?h+i+"Y":"")+(a?h+a+"M":"")+(c?p+c+"D":"")+(l||s||u?"T":"")+(l?m+l+"H":"")+(s?m+s+"M":"")+(u?m+u+"S":"")}var ir=At.prototype;return ir.isValid=function(){return this._isValid},ir.abs=function(){var e=this._data;return this._milliseconds=xn(this._milliseconds),this._days=xn(this._days),this._months=xn(this._months),e.milliseconds=xn(e.milliseconds),e.seconds=xn(e.seconds),e.minutes=xn(e.minutes),e.hours=xn(e.hours),e.months=xn(e.months),e.years=xn(e.years),this},ir.add=function(e,t){return Hn(this,e,t,1)},ir.subtract=function(e,t){return Hn(this,e,t,-1)},ir.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=Y(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+En(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Pn(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},ir.asMilliseconds=jn,ir.asSeconds=Vn,ir.asMinutes=Nn,ir.asHours=An,ir.asDays=Fn,ir.asWeeks=In,ir.asMonths=Wn,ir.asQuarters=Rn,ir.asYears=Un,ir.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*L(this._months/12):NaN},ir._bubble=function(){var e,t,n,r,o,i=this._milliseconds,a=this._days,c=this._months,l=this._data;return i>=0&&a>=0&&c>=0||i<=0&&a<=0&&c<=0||(i+=864e5*Dn(Pn(c)+a),a=0,c=0),l.milliseconds=i%1e3,e=w(i/1e3),l.seconds=e%60,t=w(e/60),l.minutes=t%60,n=w(t/60),l.hours=n%24,a+=w(n/24),o=w(En(a)),c+=o,a-=Dn(Pn(o)),r=w(c/12),c%=12,l.days=a,l.months=c,l.years=r,this},ir.clone=function(){return $t(this)},ir.get=function(e){return e=Y(e),this.isValid()?this[e+"s"]():NaN},ir.milliseconds=Bn,ir.seconds=Gn,ir.minutes=qn,ir.hours=Jn,ir.days=$n,ir.weeks=function(){return w(this.days()/7)},ir.months=Xn,ir.years=Qn,ir.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=function(e,t,n){var r=$t(e).abs(),o=Zn(r.as("s")),i=Zn(r.as("m")),a=Zn(r.as("h")),c=Zn(r.as("d")),l=Zn(r.as("M")),s=Zn(r.as("y")),u=o<=er.ss&&["s",o]||o0,u[4]=n,tr.apply(null,u)}(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)},ir.toISOString=or,ir.toString=or,ir.toJSON=or,ir.locale=on,ir.localeData=cn,ir.toIsoString=S("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",or),ir.lang=an,U("X",0,0,"unix"),U("x",0,0,"valueOf"),ue("x",ie),ue("X",/[+-]?\d+(\.\d{1,3})?/),pe("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))})),pe("x",(function(e,t,n){n._d=new Date(L(e))})),o.version="2.24.0",t=Pt,o.fn=kn,o.min=function(){return Vt("isBefore",[].slice.call(arguments,0))},o.max=function(){return Vt("isAfter",[].slice.call(arguments,0))},o.now=function(){return Date.now?Date.now():+new Date},o.utc=h,o.unix=function(e){return Pt(1e3*e)},o.months=function(e,t){return Tn(e,t,"months")},o.isDate=s,o.locale=pt,o.invalid=v,o.duration=$t,o.isMoment=M,o.weekdays=function(e,t,n){return Cn(e,t,n,"weekdays")},o.parseZone=function(){return Pt.apply(null,arguments).parseZone()},o.localeData=vt,o.isDuration=Ft,o.monthsShort=function(e,t){return Tn(e,t,"monthsShort")},o.weekdaysMin=function(e,t,n){return Cn(e,t,n,"weekdaysMin")},o.defineLocale=mt,o.updateLocale=function(e,t){if(null!=t){var n,r,o=st;null!=(r=ht(e))&&(o=r._config),t=H(o,t),(n=new D(t)).parentLocale=ut[e],ut[e]=n,pt(e)}else null!=ut[e]&&(null!=ut[e].parentLocale?ut[e]=ut[e].parentLocale:null!=ut[e]&&delete ut[e]);return ut[e]},o.locales=function(){return O(ut)},o.weekdaysShort=function(e,t,n){return Cn(e,t,n,"weekdaysShort")},o.normalizeUnits=Y,o.relativeTimeRounding=function(e){return void 0===e?Zn:"function"==typeof e&&(Zn=e,!0)},o.relativeTimeThreshold=function(e,t){return void 0!==er[e]&&(void 0===t?er[e]:(er[e]=t,"s"===e&&(er.ss=t-1),!0))},o.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},o.prototype=kn,o.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},o}()}).call(this,n(83)(e))},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t0&&"function"==typeof t[t.length-1]&&(n=t.pop()),"function"==typeof n&&r.once(o,(e,t)=>n.apply(null,t)),r.send("x",{action:e,data:t,callback:o})}r.on("y",(e,t)=>{i.emit(t.event,...t.data||[])}),e.exports={IS_DEV:n,platform:o,act:c,pact:function(e,...t){return new Promise((n,r)=>{t.push((e,t)=>e?r(e):n(t)),c(e,...t)})},on:(...e)=>i.on(...e),emit:(...e)=>i.emit(...e)}},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function i(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function a(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,a=null,c=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?a="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(a="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?c="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(c="UNSAFE_componentWillUpdate"),null!==n||null!==a||null!==c){var l=e.displayName||e.name,s="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+l+" uses "+s+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==a?"\n "+a:"")+(null!==c?"\n "+c:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var u=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;u.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",(function(){return a})),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";var r={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){var t=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=r.F1&&t<=r.F12)return!1;switch(t){case r.ALT:case r.CAPS_LOCK:case r.CONTEXT_MENU:case r.CTRL:case r.DOWN:case r.END:case r.ESC:case r.HOME:case r.INSERT:case r.LEFT:case r.MAC_FF_META:case r.META:case r.NUMLOCK:case r.NUM_CENTER:case r.PAGE_DOWN:case r.PAGE_UP:case r.PAUSE:case r.PRINT_SCREEN:case r.RIGHT:case r.SHIFT:case r.UP:case r.WIN_KEY:case r.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=r.ZERO&&e<=r.NINE)return!0;if(e>=r.NUM_ZERO&&e<=r.NUM_MULTIPLY)return!0;if(e>=r.A&&e<=r.Z)return!0;if(-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case r.SPACE:case r.QUESTION_MARK:case r.NUM_PLUS:case r.NUM_MINUS:case r.NUM_PERIOD:case r.NUM_DIVISION:case r.SEMICOLON:case r.DASH:case r.EQUALS:case r.COMMA:case r.PERIOD:case r.SLASH:case r.APOSTROPHE:case r.SINGLE_QUOTE:case r.OPEN_SQUARE_BRACKET:case r.BACKSLASH:case r.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};t.a=r},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=m(n(1)),i=h(n(3)),a=m(n(320)),c=h(n(269)),l=h(n(323)),s=n(324),u=h(n(21)),d=h(n(58)),f=n(329);function h(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function m(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}function v(){return(v=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(1),o=n.n(r);function i(e){var t=[];return o.a.Children.forEach(e,(function(e){t.push(e)})),t}},function(e,t,n){"use strict";var r=n(4),o=n.n(r),i=n(9),a=n.n(i),c=n(7),l=n.n(c),s=n(10),u=n.n(s),d=n(6),f=n.n(d),h=n(8),p=n.n(h),m=n(1),v=n.n(m),y=n(0),_=n.n(y),g=function(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");return"function"!=typeof t.componentWillReceiveProps?e:v.a.Profiler?(t.UNSAFE_componentWillReceiveProps=t.componentWillReceiveProps,delete t.componentWillReceiveProps,e):e};function b(e){var t=[];return v.a.Children.forEach(e,(function(e){t.push(e)})),t}function M(e,t){var n=null;return e&&e.forEach((function(e){n||e&&e.key===t&&(n=e)})),n}function w(e,t,n){var r=null;return e&&e.forEach((function(e){if(e&&e.key===t&&e.props[n]){if(r)throw new Error("two child with same key for children");r=e}})),r}var L=n(5),k=n.n(L),z=n(60),S=n.n(z),O={transitionstart:{transition:"transitionstart",WebkitTransition:"webkitTransitionStart",MozTransition:"mozTransitionStart",OTransition:"oTransitionStart",msTransition:"MSTransitionStart"},animationstart:{animation:"animationstart",WebkitAnimation:"webkitAnimationStart",MozAnimation:"mozAnimationStart",OAnimation:"oAnimationStart",msAnimation:"MSAnimationStart"}},T={transitionend:{transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"mozTransitionEnd",OTransition:"oTransitionEnd",msTransition:"MSTransitionEnd"},animationend:{animation:"animationend",WebkitAnimation:"webkitAnimationEnd",MozAnimation:"mozAnimationEnd",OAnimation:"oAnimationEnd",msAnimation:"MSAnimationEnd"}},C=[],x=[];function H(e,t,n){e.addEventListener(t,n,!1)}function D(e,t,n){e.removeEventListener(t,n,!1)}"undefined"!=typeof window&&"undefined"!=typeof document&&function(){var e=document.createElement("div").style;function t(t,n){for(var r in t)if(t.hasOwnProperty(r)){var o=t[r];for(var i in o)if(i in e){n.push(o[i]);break}}}"AnimationEvent"in window||(delete O.animationstart.animation,delete T.animationend.animation),"TransitionEvent"in window||(delete O.transitionstart.transition,delete T.transitionend.transition),t(O,C),t(T,x)}();var E={startEvents:C,addStartEventListener:function(e,t){0!==C.length?C.forEach((function(n){H(e,n,t)})):window.setTimeout(t,0)},removeStartEventListener:function(e,t){0!==C.length&&C.forEach((function(n){D(e,n,t)}))},endEvents:x,addEndEventListener:function(e,t){0!==x.length?x.forEach((function(n){H(e,n,t)})):window.setTimeout(t,0)},removeEndEventListener:function(e,t){0!==x.length&&x.forEach((function(n){D(e,n,t)}))}},P=n(51),Y=n.n(P),j=0!==E.endEvents.length,V=["Webkit","Moz","O","ms"],N=["-webkit-","-moz-","-o-","ms-",""];function A(e,t){for(var n=window.getComputedStyle(e,null),r="",o=0;o children");return v.a.createElement(G,{key:n.key,ref:function(t){e.childrenRefs[n.key]=t},animation:t.animation,transitionName:t.transitionName,transitionEnter:t.transitionEnter,transitionAppear:t.transitionAppear,transitionLeave:t.transitionLeave},n)})));var i=t.component;if(i){var a=t;return"string"==typeof i&&(a=o()({className:t.className,style:t.style},t.componentProps)),v.a.createElement(i,a,r)}return r[0]||null}}]),t}(v.a.Component);X.isAnimate=!0,X.propTypes={className:_.a.string,style:_.a.object,component:_.a.any,componentProps:_.a.object,animation:_.a.object,transitionName:_.a.oneOfType([_.a.string,_.a.object]),transitionEnter:_.a.bool,transitionAppear:_.a.bool,exclusive:_.a.bool,transitionLeave:_.a.bool,onEnd:_.a.func,onEnter:_.a.func,onLeave:_.a.func,onAppear:_.a.func,showProp:_.a.string,children:_.a.node},X.defaultProps={animation:{},component:"span",componentProps:{},transitionEnter:!0,transitionLeave:!0,transitionAppear:!1,onEnd:$,onEnter:$,onLeave:$,onAppear:$};var Q=function(){var e=this;this.performEnter=function(t){e.childrenRefs[t]&&(e.currentlyAnimatingKeys[t]=!0,e.childrenRefs[t].componentWillEnter(e.handleDoneAdding.bind(e,t,"enter")))},this.performAppear=function(t){e.childrenRefs[t]&&(e.currentlyAnimatingKeys[t]=!0,e.childrenRefs[t].componentWillAppear(e.handleDoneAdding.bind(e,t,"appear")))},this.handleDoneAdding=function(t,n){var r=e.props;if(delete e.currentlyAnimatingKeys[t],!r.exclusive||r===e.nextProps){var o=b(J(r));e.isValidChildByKey(o,t)?"appear"===n?U.allowAppearCallback(r)&&(r.onAppear(t),r.onEnd(t,!0)):U.allowEnterCallback(r)&&(r.onEnter(t),r.onEnd(t,!0)):e.performLeave(t)}},this.performLeave=function(t){e.childrenRefs[t]&&(e.currentlyAnimatingKeys[t]=!0,e.childrenRefs[t].componentWillLeave(e.handleDoneLeaving.bind(e,t)))},this.handleDoneLeaving=function(t){var n=e.props;if(delete e.currentlyAnimatingKeys[t],!n.exclusive||n===e.nextProps){var r,o,i,a,c=b(J(n));if(e.isValidChildByKey(c,t))e.performEnter(t);else{var l=function(){U.allowLeaveCallback(n)&&(n.onLeave(t),n.onEnd(t,!1))};r=e.state.children,o=c,i=n.showProp,(a=r.length===o.length)&&r.forEach((function(e,t){var n=o[t];e&&n&&(e&&!n||!e&&n?a=!1:e.key!==n.key?a=!1:i&&e.props[i]!==n.props[i]&&(a=!1))})),a?l():e.setState({children:c},l)}}}};t.a=g(X)},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"resetWarned",{enumerable:!0,get:function(){return o.resetWarned}}),t.default=void 0;var o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var c=o?Object.getOwnPropertyDescriptor(e,a):null;c&&(c.get||c.set)?Object.defineProperty(n,a,c):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(115));function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}t.default=function(e,t,n){(0,o.default)(e,"[antd: ".concat(t,"] ").concat(n))}},function(e,t){function n(e,t=!1){let r=[];return Array.isArray(e)&&e.map(e=>{if(e&&(r.push(e),(!t||!e.collapsed)&&e.children)){let o=n(e.children,t);r=r.concat(o)}}),r}const r=(e,t)=>n(e).find(e=>e.id===t),o=(e,t,n=null)=>{let r=e.findIndex(e=>e.id===t);if(r>=0)return{idx:r,item:e[r],parent_list:e,parent:n};for(let n of e){Array.isArray(n.children)||(n.children=[]);let e=o(n.children,t,n);if(e)return e}return null},i=(e,t)=>{let n=e.findIndex(e=>e.id===t);return n>=0?(e.splice(n,1),e):(e.map(e=>i(e.children||[],t)),e)};e.exports={flatTree:n,updateTree:(e,t)=>{let{source_id:n,target_id:a,where_to:c}=t;if(!n||!a||n===a)return e;let l=r(e,n);e=i(e,n);let{item:s,parent_list:u,idx:d}=o(e,a)||{};return s?(0===c?(Array.isArray(s.children)||(s.children=[]),s.children.push(l)):-1===c?u.splice(d,0,l):u.splice(d+1,0,l),e):(console.log("no item!"),console.log(n,a),e)},getItemById:r,getItemDetailById:o,removeItemFromTreeById:i,getUpItemWithCollapseState:function(e,t){let r=n(e,!0),o=r.findIndex(e=>e.id===t);return o>0?r[o-1]:null},getDownItemWithCollapseState:function(e,t){let r=n(e,!0),o=r.findIndex(e=>e.id===t);return r[o+1]||null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.create=t.connect=t.Provider=void 0;var r=a(n(411)),o=a(n(412)),i=a(n(414));function a(e){return e&&e.__esModule?e:{default:e}}t.Provider=r.default,t.connect=o.default,t.create=i.default},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){var n=e.exports={version:"2.6.10"};"number"==typeof __e&&(__e=n)},function(e,t,n){e.exports=!n(43)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t,n){"use strict";n.r(t);var r=n(4),o=n.n(r);t.default=function(e,t){for(var n=o()({},e),r=0;r0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,n){var r=e[n];switch(n){case"class":t.className=r,delete t.class;break;default:t[n]=r}return t}),{})}var p=function(){function e(){a()(this,e),this.collection={}}return l()(e,[{key:"clear",value:function(){this.collection={}}},{key:"delete",value:function(e){return delete this.collection[e]}},{key:"get",value:function(e){return this.collection[e]}},{key:"has",value:function(e){return Boolean(this.collection[e])}},{key:"set",value:function(e,t){return this.collection[e]=t,this}},{key:"size",get:function(){return Object.keys(this.collection).length}}]),e}();function m(e,t,n){return n?u.createElement(e.tag,o()({key:t},h(e.attrs),n),(e.children||[]).map((function(n,r){return m(n,t+"-"+e.tag+"-"+r)}))):u.createElement(e.tag,o()({key:t},h(e.attrs)),(e.children||[]).map((function(n,r){return m(n,t+"-"+e.tag+"-"+r)})))}function v(e){return Object(s.generate)(e)[0]}function y(e,t){switch(t){case"fill":return e+"-fill";case"outline":return e+"-o";case"twotone":return e+"-twotone";default:throw new TypeError("Unknown theme type: "+t+", name: "+e)}}}).call(this,n(114))},function(e,t,n){var r=n(42),o=n(104),i=n(67),a=Object.defineProperty;t.f=n(26)?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var r,o=(r=n(11))&&r.__esModule?r:{default:r},i=n(22);e.exports=async(e,t,n=null)=>{let r={list:t},a=e.state.current;if(a&&a.is_sys){let e=await o.default.pact("getSysHosts");r.sys_hosts=e,r.current=e}else if(n)r.current=n;else if(a){let e=(0,i.flatTree)(t).find(e=>e.id===a.id);e&&(r.current=e)}e.setState(r,()=>{n&&o.default.emit("select",n.id)})}},function(e,t){e.exports=function(e,t,n,r){var o=n?n.call(r,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(var c=Object.prototype.hasOwnProperty.bind(t),l=0;l=15&&(d=!1,l=!0);var w=_&&(s||d&&(null==M||M<12.11)),L=n||a&&c>=9;function k(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var z,S=function(e,t){var n=e.className,r=k(t).exec(n);if(r){var o=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(o?r[1]+o:"")}};function O(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function T(e,t){return O(e).appendChild(t)}function C(e,t,n,r){var o=document.createElement(e);if(n&&(o.className=n),r&&(o.style.cssText=r),"string"==typeof t)o.appendChild(document.createTextNode(t));else if(t)for(var i=0;i=t)return a+(t-i);a+=c-i,a+=n-a%n,i=c+1}}m?Y=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(Y=function(e){try{e.select()}catch(e){}});var A=function(){this.id=null,this.f=null,this.time=0,this.handler=j(this.onTimeout,this)};function F(e,t){for(var n=0;n=t)return r+Math.min(a,t-o);if(o+=i-r,r=i+1,(o+=n-o%n)>=t)return r}}var G=[""];function q(e){for(;G.length<=e;)G.push(J(G)+" ");return G[e]}function J(e){return e[e.length-1]}function $(e,t){for(var n=[],r=0;r"\x80"&&(e.toUpperCase()!=e.toLowerCase()||Z.test(e))}function te(e,t){return t?!!(t.source.indexOf("\\w")>-1&&ee(e))||t.test(e):ee(e)}function ne(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var re=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function oe(e){return e.charCodeAt(0)>=768&&re.test(e)}function ie(e,t,n){for(;(n<0?t>0:tn?-1:1;;){if(t==n)return t;var o=(t+n)/2,i=r<0?Math.ceil(o):Math.floor(o);if(i==t)return e(i)?t:n;e(i)?n=i:t=i+r}}var ce=null;function le(e,t,n){var r;ce=null;for(var o=0;ot)return o;i.to==t&&(i.from!=i.to&&"before"==n?r=o:ce=o),i.from==t&&(i.from!=i.to&&"before"!=n?r=o:ce=o)}return null!=r?r:ce}var se=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,r=/[stwN]/,o=/[LRr]/,i=/[Lb1n]/,a=/[1n]/;function c(e,t,n){this.level=e,this.from=t,this.to=n}return function(l,s){var u="ltr"==s?"L":"R";if(0==l.length||"ltr"==s&&!n.test(l))return!1;for(var d,f=l.length,h=[],p=0;p-1&&(r[t]=o.slice(0,i).concat(o.slice(i+1)))}}}function me(e,t){var n=he(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),o=0;o0}function ge(e){e.prototype.on=function(e,t){fe(this,e,t)},e.prototype.off=function(e,t){pe(this,e,t)}}function be(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Me(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function we(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Le(e){be(e),Me(e)}function ke(e){return e.target||e.srcElement}function ze(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),_&&e.ctrlKey&&1==t&&(t=3),t}var Se,Oe,Te=function(){if(a&&c<9)return!1;var e=C("div");return"draggable"in e||"dragDrop"in e}();function Ce(e){if(null==Se){var t=C("span","\u200b");T(e,C("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Se=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&c<8))}var n=Se?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!=Oe)return Oe;var t=T(e,document.createTextNode("A\u062eA")),n=z(t,0,1).getBoundingClientRect(),r=z(t,1,2).getBoundingClientRect();return O(e),!(!n||n.left==n.right)&&(Oe=r.right-n.right<3)}var He,De=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var o=e.indexOf("\n",t);-1==o&&(o=e.length);var i=e.slice(t,"\r"==e.charAt(o-1)?o-1:o),a=i.indexOf("\r");-1!=a?(n.push(i.slice(0,a)),t+=a+1):(n.push(i),t=o+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Ee=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Pe="oncopy"in(He=C("div"))||(He.setAttribute("oncopy","return;"),"function"==typeof He.oncopy),Ye=null,je={},Ve={};function Ne(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),je[e]=t}function Ae(e){if("string"==typeof e&&Ve.hasOwnProperty(e))e=Ve[e];else if(e&&"string"==typeof e.name&&Ve.hasOwnProperty(e.name)){var t=Ve[e.name];"string"==typeof t&&(t={name:t}),(e=Q(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ae("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ae("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Fe(e,t){t=Ae(t);var n=je[t.name];if(!n)return Fe(e,"text/plain");var r=n(e,t);if(Ie.hasOwnProperty(t.name)){var o=Ie[t.name];for(var i in o)o.hasOwnProperty(i)&&(r.hasOwnProperty(i)&&(r["_"+i]=r[i]),r[i]=o[i])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}var Ie={};function We(e,t){V(t,Ie.hasOwnProperty(e)?Ie[e]:Ie[e]={})}function Re(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var o=t[r];o instanceof Array&&(o=o.concat([])),n[r]=o}return n}function Ue(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Ke(e,t,n){return!e.startState||e.startState(t,n)}var Be=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Ge(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var o=n.children[r],i=o.chunkSize();if(t=e.first&&tn?tt(n,Ge(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?tt(e.line,t):n<0?tt(e.line,0):e}(t,Ge(e,t.line).text.length)}function st(e,t){for(var n=[],r=0;r=this.string.length},Be.prototype.sol=function(){return this.pos==this.lineStart},Be.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Be.prototype.next=function(){if(this.post},Be.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Be.prototype.skipToEnd=function(){this.pos=this.string.length},Be.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Be.prototype.backUp=function(e){this.pos-=e},Be.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var o=function(e){return n?e.toLowerCase():e};if(o(this.string.substr(this.pos,e.length))==o(e))return!1!==t&&(this.pos+=e.length),!0},Be.prototype.current=function(){return this.string.slice(this.start,this.pos)},Be.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Be.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Be.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ut=function(e,t){this.state=e,this.lookAhead=t},dt=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function ft(e,t,n,r){var o=[e.state.modeGen],i={};Mt(e,t.text,e.doc.mode,n,(function(e,t){return o.push(e,t)}),i,r);for(var a=n.state,c=function(r){n.baseTokens=o;var c=e.state.overlays[r],l=1,s=0;n.state=!0,Mt(e,t.text,c.mode,n,(function(e,t){for(var n=l;se&&o.splice(l,1,e,o[l+1],r),l+=2,s=Math.min(e,r)}if(t)if(c.opaque)o.splice(n,l-n,e,"overlay "+t),l=n+2;else for(;ne.options.maxHighlightLength&&Re(e.doc.mode,r.state),i=ft(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=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function pt(e,t,n){var r=e.doc,o=e.display;if(!r.mode.startState)return new dt(r,!0,t);var i=function(e,t,n){for(var r,o,i=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),c=t;c>a;--c){if(c<=i.first)return i.first;var l=Ge(i,c-1),s=l.stateAfter;if(s&&(!n||c+(s instanceof ut?s.lookAhead:0)<=i.modeFrontier))return c;var u=N(l.text,null,e.options.tabSize);(null==o||r>u)&&(o=c-1,r=u)}return o}(e,t,n),a=i>r.first&&Ge(r,i-1).stateAfter,c=a?dt.fromSaved(r,a,i):new dt(r,Ke(r.mode),i);return r.iter(i,t,(function(n){mt(e,n.text,c);var r=c.line;n.stateAfter=r==t-1||r%5==0||r>=o.viewFrom&&rt.start)return i}throw new Error("Mode "+e.name+" failed to advance stream.")}dt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},dt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},dt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},dt.fromSaved=function(e,t,n){return t instanceof ut?new dt(e,Re(e.mode,t.state),n,t.lookAhead):new dt(e,Re(e.mode,t),n)},dt.prototype.save=function(e){var t=!1!==e?Re(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ut(t,this.maxLookAhead):t};var _t=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function gt(e,t,n,r){var o,i,a=e.doc,c=a.mode,l=Ge(a,(t=lt(a,t)).line),s=pt(e,t.line,n),u=new Be(l.text,e.options.tabSize,s);for(r&&(i=[]);(r||u.pose.options.maxHighlightLength?(c=!1,a&&mt(e,t,r,d.pos),d.pos=t.length,l=null):l=bt(yt(n,d,r.state,f),i),f){var h=f[0].name;h&&(l="m-"+(l?h+" "+l:h))}if(!c||u!=l){for(;s=t:i.to>t);(r||(r=[])).push(new kt(a,i.from,c?null:i.to))}}return r}(n,o,a),l=function(e,t,n){var r;if(e)for(var o=0;o=t:i.to>t)||i.from==t&&"bookmark"==a.type&&(!n||i.marker.insertLeft)){var c=null==i.from||(a.inclusiveLeft?i.from<=t:i.from0&&c)for(var g=0;gt)&&(!n||Et(n,i.marker)<0)&&(n=i.marker)}return n}function Nt(e,t,n,r,o){var i=Ge(e,t),a=Lt&&i.markedSpans;if(a)for(var c=0;c=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(l.marker.inclusiveRight&&o.inclusiveLeft?nt(s.to,n)>=0:nt(s.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&o.inclusiveLeft?nt(s.from,r)<=0:nt(s.from,r)<0)))return!0}}}function At(e){for(var t;t=Yt(e);)e=t.find(-1,!0).line;return e}function Ft(e,t){var n=Ge(e,t),r=At(n);return n==r?t:Xe(r)}function It(e,t){if(t>e.lastLine())return t;var n,r=Ge(e,t);if(!Wt(e,r))return t;for(;n=jt(r);)r=n.find(1,!0).line;return Xe(r)+1}function Wt(e,t){var n=Lt&&t.markedSpans;if(n)for(var r=void 0,o=0;ot.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var Gt=function(e,t,n){this.text=e,xt(this,t),this.height=n?n(this):1};function qt(e){e.parent=null,Ct(e)}Gt.prototype.lineNo=function(){return Xe(this)},ge(Gt);var Jt={},$t={};function Xt(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?$t:Jt;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Qt(e,t){var n=x("span",null,null,l?"padding-right: .1px":null),r={pre:x("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var o=0;o<=(t.rest?t.rest.length:0);o++){var i=o?t.rest[o-1]:t.line,a=void 0;r.pos=0,r.addToken=en,xe(e.display.measure)&&(a=ue(i,e.doc.direction))&&(r.addToken=tn(r.addToken,a)),r.map=[],rn(i,r,ht(e,i,t!=e.display.externalMeasured&&Xe(i))),i.styleClasses&&(i.styleClasses.bgClass&&(r.bgClass=P(i.styleClasses.bgClass,r.bgClass||"")),i.styleClasses.textClass&&(r.textClass=P(i.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Ce(e.display.measure))),0==o?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(l){var c=r.content.lastChild;(/\bcm-tab\b/.test(c.className)||c.querySelector&&c.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return me(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=P(r.pre.className,r.textClass||"")),r}function Zt(e){var t=C("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function en(e,t,n,r,o,i,l){if(t){var s,u=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",o=0;os&&d.from<=s);f++);if(d.to>=u)return e(n,r,o,i,a,c,l);e(n,r.slice(0,d.to-s),o,i,null,c,l),i=null,r=r.slice(d.to-s),s=d.to}}}function nn(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 rn(e,t,n){var r=e.markedSpans,o=e.text,i=0;if(r)for(var a,c,l,s,u,d,f,h=o.length,p=0,m=1,v="",y=0;;){if(y==p){l=s=u=c="",f=null,d=null,y=1/0;for(var _=[],g=void 0,b=0;bp||w.collapsed&&M.to==p&&M.from==p)){if(null!=M.to&&M.to!=p&&y>M.to&&(y=M.to,s=""),w.className&&(l+=" "+w.className),w.css&&(c=(c?c+";":"")+w.css),w.startStyle&&M.from==p&&(u+=" "+w.startStyle),w.endStyle&&M.to==y&&(g||(g=[])).push(w.endStyle,M.to),w.title&&((f||(f={})).title=w.title),w.attributes)for(var L in w.attributes)(f||(f={}))[L]=w.attributes[L];w.collapsed&&(!d||Et(d.marker,w)<0)&&(d=M)}else M.from>p&&y>M.from&&(y=M.from)}if(g)for(var k=0;k=h)break;for(var S=Math.min(h,y);;){if(v){var O=p+v.length;if(!d){var T=O>S?v.slice(0,S-p):v;t.addToken(t,T,a?a+l:l,u,p+T.length==y?s:"",c,f)}if(O>=S){v=v.slice(S-p),p=S;break}p=O,u=""}v=o.slice(i,i=n[m++]),a=Xt(n[m++],t.cm.options)}}else for(var C=1;Cn)return{map:e.measure.maps[o],cache:e.measure.caches[o],before:!0}}function Hn(e,t,n,r){return Pn(e,En(e,t),n,r)}function Dn(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&t2&&i.push((l.bottom+s.top)/2-n.top)}}i.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(i=function(e,t,n,r){var o,i=Vn(t.map,n,r),l=i.node,s=i.start,u=i.end,d=i.collapse;if(3==l.nodeType){for(var f=0;f<4;f++){for(;s&&oe(t.line.text.charAt(i.coverStart+s));)--s;for(;i.coverStart+u1}(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}(e.display.measure,o))}else{var h;s>0&&(d=r="right"),o=e.options.lineWrapping&&(h=l.getClientRects()).length>1?h["right"==r?h.length-1:0]:l.getBoundingClientRect()}if(a&&c<9&&!s&&(!o||!o.left&&!o.right)){var p=l.parentNode.getClientRects()[0];o=p?{left:p.left,right:p.left+ir(e.display),top:p.top,bottom:p.bottom}:jn}for(var m=o.top-t.rect.top,v=o.bottom-t.rect.top,y=(m+v)/2,_=t.view.measure.heights,g=0;g<_.length-1&&!(y<_[g]);g++);var b=g?_[g-1]:0,M=_[g],w={left:("right"==d?o.right:o.left)-t.rect.left,right:("left"==d?o.left:o.right)-t.rect.left,top:b,bottom:M};return o.left||o.right||(w.bogus=!0),e.options.singleCursorHeightPerLine||(w.rtop=m,w.rbottom=v),w}(e,t,n,r)).bogus||(t.cache[l]=i)),{left:i.left,right:i.right,top:o?i.rtop:i.top,bottom:o?i.rbottom:i.bottom}}var Yn,jn={left:0,right:0,top:0,bottom:0};function Vn(e,t,n){for(var r,o,i,a,c,l,s=0;st)&&(o=(i=l-c)-1,t>=l&&(a="right")),null!=o){if(r=e[s+2],c==l&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==o)for(;s&&e[s-2]==e[s-3]&&e[s-1].insertLeft;)r=e[2+(s-=3)],a="left";if("right"==n&&o==l-c)for(;s=0&&(n=e[o]).left==n.right;o--);return n}function An(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t=r.text.length?(l=r.text.length,s="before"):l<=0&&(l=0,s="after"),!c)return a("before"==s?l-1:l,"before"==s);function u(e,t,n){return a(n?e-1:e,1==c[t].level!=n)}var d=le(c,l,s),f=ce,h=u(l,d,"before"==s);return null!=f&&(h.other=u(l,f,"before"!=s)),h}function Jn(e,t){var n=0;t=lt(e.doc,t),e.options.lineWrapping||(n=ir(e.display)*t.ch);var r=Ge(e.doc,t.line),o=Ut(r)+kn(e.display);return{left:n,right:n,top:o,bottom:o+r.height}}function $n(e,t,n,r,o){var i=tt(e,t,n);return i.xRel=o,r&&(i.outside=r),i}function Xn(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return $n(r.first,0,null,-1,-1);var o=Qe(r,n),i=r.first+r.size-1;if(o>i)return $n(r.first+r.size-1,Ge(r,i).text.length,null,1,1);t<0&&(t=0);for(var a=Ge(r,o);;){var c=tr(e,a,o,t,n),l=Vt(a,c.ch+(c.xRel>0||c.outside>0?1:0));if(!l)return c;var s=l.find(1);if(s.line==o)return s;a=Ge(r,o=s.line)}}function Qn(e,t,n,r){r-=Un(t);var o=t.text.length,i=ae((function(t){return Pn(e,n,t-1).bottom<=r}),o,0);return{begin:i,end:o=ae((function(t){return Pn(e,n,t).top>r}),i,o)}}function Zn(e,t,n,r){return n||(n=En(e,t)),Qn(e,t,n,Kn(e,t,Pn(e,n,r),"line").top)}function er(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function tr(e,t,n,r,o){o-=Ut(t);var i=En(e,t),a=Un(t),c=0,l=t.text.length,s=!0,u=ue(t,e.doc.direction);if(u){var d=(e.options.lineWrapping?rr:nr)(e,t,n,i,u,r,o);c=(s=1!=d.level)?d.from:d.to-1,l=s?d.to:d.from-1}var f,h,p=null,m=null,v=ae((function(t){var n=Pn(e,i,t);return n.top+=a,n.bottom+=a,!!er(n,r,o,!1)&&(n.top<=o&&n.left<=r&&(p=t,m=n),!0)}),c,l),y=!1;if(m){var _=r-m.left=b.bottom?1:0}return $n(n,v=ie(t.text,v,1),h,y,r-f)}function nr(e,t,n,r,o,i,a){var c=ae((function(c){var l=o[c],s=1!=l.level;return er(qn(e,tt(n,s?l.to:l.from,s?"before":"after"),"line",t,r),i,a,!0)}),0,o.length-1),l=o[c];if(c>0){var s=1!=l.level,u=qn(e,tt(n,s?l.from:l.to,s?"after":"before"),"line",t,r);er(u,i,a,!0)&&u.top>a&&(l=o[c-1])}return l}function rr(e,t,n,r,o,i,a){var c=Qn(e,t,r,a),l=c.begin,s=c.end;/\s/.test(t.text.charAt(s-1))&&s--;for(var u=null,d=null,f=0;f=s||h.to<=l)){var p=Pn(e,r,1!=h.level?Math.min(s,h.to)-1:Math.max(l,h.from)).right,m=pm)&&(u=h,d=m)}}return u||(u=o[o.length-1]),u.froms&&(u={from:u.from,to:s,level:u.level}),u}function or(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Yn){Yn=C("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Yn.appendChild(document.createTextNode("x")),Yn.appendChild(C("br"));Yn.appendChild(document.createTextNode("x"))}T(e.measure,Yn);var n=Yn.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),O(e.measure),n||1}function ir(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=C("span","xxxxxxxxxx"),n=C("pre",[t],"CodeMirror-line-like");T(e.measure,n);var r=t.getBoundingClientRect(),o=(r.right-r.left)/10;return o>2&&(e.cachedCharWidth=o),o||10}function ar(e){for(var t=e.display,n={},r={},o=t.gutters.clientLeft,i=t.gutters.firstChild,a=0;i;i=i.nextSibling,++a){var c=e.display.gutterSpecs[a].className;n[c]=i.offsetLeft+i.clientLeft+o,r[c]=i.clientWidth}return{fixedPos:cr(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function cr(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function lr(e){var t=or(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/ir(e.display)-3);return function(o){if(Wt(e.doc,o))return 0;var i=0;if(o.widgets)for(var a=0;a=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;rt)&&(o.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=o.viewTo)Lt&&Ft(e.doc,t)o.viewFrom?pr(e):(o.viewFrom+=r,o.viewTo+=r);else if(t<=o.viewFrom&&n>=o.viewTo)pr(e);else if(t<=o.viewFrom){var i=mr(e,n,n+r,1);i?(o.view=o.view.slice(i.index),o.viewFrom=i.lineN,o.viewTo+=r):pr(e)}else if(n>=o.viewTo){var a=mr(e,t,t,-1);a?(o.view=o.view.slice(0,a.index),o.viewTo=a.lineN):pr(e)}else{var c=mr(e,t,t,-1),l=mr(e,n,n+r,1);c&&l?(o.view=o.view.slice(0,c.index).concat(an(e,c.lineN,l.lineN)).concat(o.view.slice(l.index)),o.viewTo+=r):pr(e)}var s=o.externalMeasured;s&&(n=o.lineN&&t=r.viewTo)){var i=r.view[dr(e,t)];if(null!=i.node){var a=i.changes||(i.changes=[]);-1==F(a,n)&&a.push(n)}}}function pr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function mr(e,t,n,r){var o,i=dr(e,t),a=e.display.view;if(!Lt||n==e.doc.first+e.doc.size)return{index:i,lineN:n};for(var c=e.display.viewFrom,l=0;l0){if(i==a.length-1)return null;o=c+a[i].size-t,i++}else o=c-t;t+=o,n+=o}for(;Ft(e.doc,n)!=n;){if(i==(r<0?0:a.length-1))return null;n+=r*a[i-(r<0?1:0)].size,i+=r}return{index:i,lineN:n}}function vr(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo||c.to().linet||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",i),o=!0)}o||r(t,n,"ltr")}(m,n||0,null==r?f:r,(function(e,t,o,d){var v="ltr"==o,y=h(e,v?"left":"right"),_=h(t-1,v?"right":"left"),g=null==n&&0==e,b=null==r&&t==f,M=0==d,w=!m||d==m.length-1;if(_.top-y.top<=3){var L=(s?b:g)&&w,k=(s?g:b)&&M?c:(v?y:_).left,z=L?l:(v?_:y).right;u(k,y.top,z-k,y.bottom)}else{var S,O,T,C;v?(S=s&&g&&M?c:y.left,O=s?l:p(e,o,"before"),T=s?c:p(t,o,"after"),C=s&&b&&w?l:_.right):(S=s?p(e,o,"before"):c,O=!s&&g&&M?l:y.right,T=!s&&b&&w?c:_.left,C=s?p(t,o,"after"):l),u(S,y.top,O-S,y.bottom),y.bottom<_.top&&u(c,y.bottom,null,_.top),u(T,_.top,C-T,_.bottom)}(!i||br(y,i)<0)&&(i=y),br(_,i)<0&&(i=_),(!a||br(y,a)<0)&&(a=y),br(_,a)<0&&(a=_)})),{start:i,end:a}}var f=t.from(),h=t.to();if(f.line==h.line)d(f.line,f.ch,h.ch);else{var p=Ge(o,f.line),m=Ge(o,h.line),v=At(p)==At(m),y=d(f.line,f.ch,v?p.text.length+1:null).end,_=d(h.line,v?0:null,h.ch).start;v&&(y.top<_.top-2?(u(y.right,y.top,null,y.bottom),u(c,_.top,_.left,_.bottom)):u(y.right,y.top,_.left-y.right,y.bottom)),y.bottom<_.top&&u(c,y.bottom,null,_.top)}n.appendChild(i)}function wr(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval((function(){return t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Lr(e){e.state.focused||(e.display.input.focus(),zr(e))}function kr(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Sr(e))}),100)}function zr(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(me(e,"focus",e,t),e.state.focused=!0,E(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),l&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),wr(e))}function Sr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(me(e,"blur",e,t),e.state.focused=!1,S(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Or(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r.005||f<-.005)&&($e(o.line,l),Tr(o.line),o.rest))for(var h=0;he.display.sizerWidth){var p=Math.ceil(s/ir(e.display));p>e.display.maxLineLength&&(e.display.maxLineLength=p,e.display.maxLine=o.line,e.display.maxLineChanged=!0)}}}}function Tr(e){if(e.widgets)for(var t=0;t=a&&(i=Qe(t,Ut(Ge(t,l))-e.wrapper.clientHeight),a=l)}return{from:i,to:Math.max(a,i+1)}}function xr(e,t){var n=e.display,r=or(e.display);t.top<0&&(t.top=0);var o=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,i=Cn(e),a={};t.bottom-t.top>i&&(t.bottom=t.top+i);var c=e.doc.height+zn(n),l=t.topc-r;if(t.topo+i){var u=Math.min(t.top,(s?c:t.bottom)-i);u!=o&&(a.scrollTop=u)}var d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft,f=Tn(e)-(e.options.fixedGutter?n.gutters.offsetWidth:0),h=t.right-t.left>f;return h&&(t.right=t.left+f),t.left<10?a.scrollLeft=0:t.leftf+d-3&&(a.scrollLeft=t.right+(h?0:10)-f),a}function Hr(e,t){null!=t&&(Pr(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Dr(e){Pr(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Er(e,t,n){null==t&&null==n||Pr(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Pr(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Yr(e,Jn(e,t.from),Jn(e,t.to),t.margin))}function Yr(e,t,n,r){var o=xr(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Er(e,o.scrollLeft,o.scrollTop)}function jr(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||so(e,{top:t}),Vr(e,t,!0),n&&so(e),oo(e,100))}function Vr(e,t,n){t=Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Nr(e,t,n,r){t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,ho(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Ar(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+zn(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+On(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Fr=function(e,t,n){this.cm=n;var r=this.vert=C("div",[C("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=C("div",[C("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=o.tabIndex=-1,e(r),e(o),fe(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),fe(o,"scroll",(function(){o.clientWidth&&t(o.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&c<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Fr.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=Math.max(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=Math.max(0,e.scrollWidth-e.clientWidth+i)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},Fr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Fr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Fr.prototype.zeroWidthHack=function(){var e=_&&!h?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new A,this.disableVert=new A},Fr.prototype.enableZeroWidthBar=function(e,t,n){e.style.pointerEvents="auto",t.set(1e3,(function r(){var o=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(o.right-1,(o.top+o.bottom)/2):document.elementFromPoint((o.right+o.left)/2,o.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,r)}))},Fr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Ir=function(){};function Wr(e,t){t||(t=Ar(e));var n=e.display.barWidth,r=e.display.barHeight;Rr(e,t);for(var o=0;o<4&&n!=e.display.barWidth||r!=e.display.barHeight;o++)n!=e.display.barWidth&&e.options.lineWrapping&&Or(e),Rr(e,Ar(e)),n=e.display.barWidth,r=e.display.barHeight}function Rr(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=""}Ir.prototype.update=function(){return{bottom:0,right:0}},Ir.prototype.setScrollLeft=function(){},Ir.prototype.setScrollTop=function(){},Ir.prototype.clear=function(){};var Ur={native:Fr,null:Ir};function Kr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&S(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Ur[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),fe(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?Nr(e,t):jr(e,t)}),e),e.display.scrollbars.addClass&&E(e.display.wrapper,e.display.scrollbars.addClass)}var Br=0;function Gr(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Br},t=e.curOp,cn?cn.ops.push(t):t.ownsGroup=cn={ops:[t],delayedCallbacks:[]}}function qr(e){var t=e.curOp;t&&function(e,t){var n=e.ownsGroup;if(n)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ao(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function $r(e){e.updatedDisplay=e.mustUpdate&&co(e.cm,e.update)}function Xr(e){var t=e.cm,n=t.display;e.updatedDisplay&&Or(t),e.barMeasure=Ar(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Hn(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+On(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Tn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Qr(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!p){var i=C("div","\u200b",null,"position: absolute;\n top: "+(t.top-n.viewOffset-kn(e.display))+"px;\n height: "+(t.bottom-t.top+On(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(i),i.scrollIntoView(o),e.display.lineSpace.removeChild(i)}}}(t,function(e,t,n,r){var o;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==(t=t.ch?tt(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?tt(t.line,t.ch+1,"before"):t);for(var i=0;i<5;i++){var a=!1,c=qn(e,t),l=n&&n!=t?qn(e,n):c,s=xr(e,o={left:Math.min(c.left,l.left),top:Math.min(c.top,l.top)-r,right:Math.max(c.left,l.left),bottom:Math.max(c.bottom,l.bottom)+r}),u=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=s.scrollTop&&(jr(e,s.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(a=!0)),null!=s.scrollLeft&&(Nr(e,s.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(a=!0)),!a)break}return o}(t,lt(r,e.scrollToPos.from),lt(r,e.scrollToPos.to),e.scrollToPos.margin));var o=e.maybeHiddenMarkers,i=e.maybeUnhiddenMarkers;if(o)for(var a=0;a=e.display.viewTo)){var n=+new Date+e.options.workTime,r=pt(e,t.highlightFrontier),o=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(i){if(r.line>=e.display.viewFrom){var a=i.styles,c=i.text.length>e.options.maxHighlightLength?Re(t.mode,r.state):null,l=ft(e,i,r,!0);c&&(r.state=c),i.styles=l.styles;var s=i.styleClasses,u=l.classes;u?i.styleClasses=u:s&&(i.styleClasses=null);for(var d=!a||a.length!=i.styles.length||s!=u&&(!s||!u||s.bgClass!=u.bgClass||s.textClass!=u.textClass),f=0;!d&&fn)return oo(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),o.length&&eo(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==vr(e))return!1;po(e)&&(pr(e),t.dims=ar(e));var o=r.first+r.size,i=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(o,t.visible.to+e.options.viewportMargin);n.viewFroma&&n.viewTo-a<20&&(a=Math.min(o,n.viewTo)),Lt&&(i=Ft(e.doc,i),a=It(e.doc,a));var c=i!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;!function(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=an(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=an(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,dr(e,n)))),r.viewTo=n}(e,i,a),n.viewOffset=Ut(Ge(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var s=vr(e);if(!c&&0==s&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=function(e){if(e.hasFocus())return null;var t=D();if(!t||!H(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&H(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(e);return s>4&&(n.lineDiv.style.display="none"),function(e,t,n){var r=e.display,o=e.options.lineNumbers,i=r.lineDiv,a=i.firstChild;function c(t){var n=t.nextSibling;return l&&_&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var s=r.view,u=r.viewFrom,d=0;d-1&&(h=!1),dn(e,f,u,n)),h&&(O(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(et(e.options,u)))),a=f.node.nextSibling}else{var p=_n(e,f,u,n);i.insertBefore(p,a)}u+=f.size}for(;a;)a=c(a)}(e,n.updateLineNumbers,t.dims),s>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(e){if(e&&e.activeElt&&e.activeElt!=D()&&(e.activeElt.focus(),e.anchorNode&&H(document.body,e.anchorNode)&&H(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}(u),O(n.cursorDiv),O(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,c&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,oo(e,400)),n.updateLineNumbers=null,!0}function lo(e,t){for(var n=t.viewport,r=!0;(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Tn(e)||(n&&null!=n.top&&(n={top:Math.min(e.doc.height+zn(e.display)-Cn(e),n.top)}),t.visible=Cr(e.display,e.doc,n),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&co(e,t);r=!1){Or(e);var o=Ar(e);yr(e),Wr(e,o),fo(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 so(e,t){var n=new ao(e,t);if(co(e,n)){Or(e),lo(e,n);var r=Ar(e);yr(e),Wr(e,r),fo(e,r),n.finish()}}function uo(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function fo(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+On(e)+"px"}function ho(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=cr(t)-t.scroller.scrollLeft+e.doc.scrollLeft,o=t.gutters.offsetWidth,i=r+"px",a=0;ac.clientWidth,u=c.scrollHeight>c.clientHeight;if(o&&s||i&&u){if(i&&_&&l)e:for(var f=t.target,h=a.view;f!=c;f=f.parentNode)for(var p=0;p=0&&nt(e,r.to())<=0)return n}return-1};var zo=function(e,t){this.anchor=e,this.head=t};function So(e,t,n){var r=e&&e.options.selectionsMayTouch,o=t[n];t.sort((function(e,t){return nt(e.from(),t.from())})),n=F(t,o);for(var i=1;i0:l>=0){var s=at(c.from(),a.from()),u=it(c.to(),a.to()),d=c.empty()?a.from()==a.head:c.from()==c.head;i<=n&&--n,t.splice(--i,2,new zo(d?u:s,d?s:u))}}return new ko(t,n)}function Oo(e,t){return new ko([new zo(e,t||e)],0)}function To(e){return e.text?tt(e.from.line+e.text.length-1,J(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Co(e,t){if(nt(e,t.from)<0)return e;if(nt(e,t.to)<=0)return To(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+=To(t).ch-t.to.ch),tt(n,r)}function xo(e,t){for(var n=[],r=0;r1&&e.remove(c.line+1,p-1),e.insert(c.line+1,y)}sn(e,"change",e,t)}function jo(e,t,n){!function e(r,o,i){if(r.linked)for(var a=0;ac-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(i=function(e,t){return t?(Io(e.done),J(e.done)):e.done.length&&!J(e.done).ranges?J(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),J(e.done)):void 0}(o,o.lastOp==r)))a=J(i.changes),0==nt(t.from,t.to)&&0==nt(t.from,a.to)?a.to=To(t):i.changes.push(Fo(e,t));else{var l=J(o.done);for(l&&l.ranges||Uo(e.sel,o.done),i={changes:[Fo(e,t)],generation:o.generation},o.done.push(i);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=c,o.lastOp=o.lastSelOp=r,o.lastOrigin=o.lastSelOrigin=t.origin,a||me(e,"historyAdded")}function Ro(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||function(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)}(e,i,J(o.done),t))?o.done[o.done.length-1]=t:Uo(t,o.done),o.lastSelTime=+new Date,o.lastSelOrigin=i,o.lastSelOp=n,r&&!1!==r.clearRedo&&Io(o.undone)}function Uo(e,t){var n=J(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Ko(e,t,n,r){var o=t["spans_"+e.id],i=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),(function(n){n.markedSpans&&((o||(o=t["spans_"+e.id]={}))[i]=n.markedSpans),++i}))}function Bo(e){if(!e)return null;for(var t,n=0;n-1&&(J(c)[d]=s[d],delete s[d])}}}return r}function Jo(e,t,n,r){if(r){var o=e.anchor;if(n){var i=nt(t,o)<0;i!=nt(n,o)<0?(o=t,t=n):i!=nt(t,n)<0&&(t=n)}return new zo(o,t)}return new zo(n||t,t)}function $o(e,t,n,r,o){null==o&&(o=e.cm&&(e.cm.display.shift||e.extend)),ti(e,new ko([Jo(e.sel.primary(),t,n,o)],0),r)}function Xo(e,t,n){for(var r=[],o=e.cm&&(e.cm.display.shift||e.extend),i=0;i=t.ch:c.to>t.ch))){if(o&&(me(l,"beforeCursorEnter"),l.explicitlyCleared)){if(i.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var d=l.find(r<0?1:-1),f=void 0;if((r<0?u:s)&&(d=li(e,d,-r,d&&d.line==t.line?i:null)),d&&d.line==t.line&&(f=nt(d,n))&&(r<0?f<0:f>0))return ai(e,d,t,r,o)}var h=l.find(r<0?-1:1);return(r<0?s:u)&&(h=li(e,h,r,h.line==t.line?i:null)),h?ai(e,h,t,r,o):null}}return t}function ci(e,t,n,r,o){var i=r||1,a=ai(e,t,n,i,o)||!o&&ai(e,t,n,i,!0)||ai(e,t,n,-i,o)||!o&&ai(e,t,n,-i,!0);return a||(e.cantEdit=!0,tt(e.first,0))}function li(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?lt(e,tt(t.line-1)):null:n>0&&t.ch==(r||Ge(e,t.line)).text.length?t.line0)){var u=[l,1],d=nt(s.from,c.from),f=nt(s.to,c.to);(d<0||!a.inclusiveLeft&&!d)&&u.push({from:s.from,to:c.from}),(f>0||!a.inclusiveRight&&!f)&&u.push({from:c.to,to:s.to}),o.splice.apply(o,u),l+=u.length-3}}return o}(e,t.from,t.to);if(r)for(var o=r.length-1;o>=0;--o)fi(e,{from:r[o].from,to:r[o].to,text:o?[""]:t.text,origin:t.origin});else fi(e,t)}}function fi(e,t){if(1!=t.text.length||""!=t.text[0]||0!=nt(t.from,t.to)){var n=xo(e,t);Wo(e,t,n,e.cm?e.cm.curOp.id:NaN),mi(e,t,n,Ot(e,t));var r=[];jo(e,(function(e,n){n||-1!=F(r,e.history)||(gi(e.history,t),r.push(e.history)),mi(e,t,null,Ot(e,t))}))}}function hi(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var o,i=e.history,a=e.sel,c="undo"==t?i.done:i.undone,l="undo"==t?i.undone:i.done,s=0;s=0;--h){var p=f(h);if(p)return p.v}}}}function pi(e,t){if(0!=t&&(e.first+=t,e.sel=new ko($(e.sel.ranges,(function(e){return new zo(tt(e.anchor.line+t,e.anchor.ch),tt(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){fr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.linei&&(t={from:t.from,to:tt(i,Ge(e,i).text.length),text:[t.text[0]],origin:t.origin}),t.removed=qe(e,t.from,t.to),n||(n=xo(e,t)),e.cm?function(e,t,n){var r=e.doc,o=e.display,i=t.from,a=t.to,c=!1,l=i.line;e.options.lineWrapping||(l=Xe(At(Ge(r,i.line))),r.iter(l,a.line+1,(function(e){if(e==o.maxLine)return c=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&ye(e),Yo(r,t,n,lr(e)),e.options.lineWrapping||(r.iter(l,i.line+t.text.length,(function(e){var t=Kt(e);t>o.maxLineLength&&(o.maxLine=e,o.maxLineLength=t,o.maxLineChanged=!0,c=!1)})),c&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var o=Ge(e,r).stateAfter;if(o&&(!(o instanceof ut)||r+o.lookAhead1||!(this.children[0]instanceof Mi))){var c=[];this.collapse(c),this.children=[new Mi(c)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var a=o.lines.length%25+25,c=a;c10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r0||0==a&&!1!==i.clearWhenEmpty)return i;if(i.replacedWith&&(i.collapsed=!0,i.widgetNode=x("span",[i.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||i.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(i.widgetNode.insertLeft=!0)),i.collapsed){if(Nt(e,t.line,t,n,i)||t.line!=n.line&&Nt(e,n.line,t,n,i))throw new Error("Inserting collapsed marker partially overlapping an existing one");Lt=!0}i.addToHistory&&Wo(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var c,l=t.line,s=e.cm;if(e.iter(l,n.line+1,(function(e){s&&i.collapsed&&!s.options.lineWrapping&&At(e)==s.display.maxLine&&(c=!0),i.collapsed&&l!=t.line&&$e(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new kt(i,l==t.line?t.ch:null,l==n.line?n.ch:null)),++l})),i.collapsed&&e.iter(t.line,n.line+1,(function(t){Wt(e,t)&&$e(t,0)})),i.clearOnEnter&&fe(i,"beforeCursorEnter",(function(){return i.clear()})),i.readOnly&&(wt=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),i.collapsed&&(i.id=++zi,i.atomic=!0),s){if(c&&(s.curOp.updateMaxLine=!0),i.collapsed)fr(s,t.line,n.line+1);else if(i.className||i.startStyle||i.endStyle||i.css||i.attributes||i.title)for(var u=t.line;u<=n.line;u++)hr(s,u,"text");i.atomic&&oi(s.doc),sn(s,"markerAdded",s,i)}return i}Si.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Gr(e),_e(this,"clear")){var n=this.find();n&&sn(this,"clear",n.from,n.to)}for(var r=null,o=null,i=0;ie.display.maxLineLength&&(e.display.maxLine=s,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&fr(e,r,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&oi(e.doc)),e&&sn(e,"markerCleared",e,this,r,o),t&&qr(e),this.parent&&this.parent.clear()}},Si.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var o=0;o=0;l--)di(this,r[l]);c?ei(this,c):this.cm&&Dr(this.cm)})),undo:ro((function(){hi(this,"undo")})),redo:ro((function(){hi(this,"redo")})),undoSelection:ro((function(){hi(this,"undo",!0)})),redoSelection:ro((function(){hi(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(o.marker.parent||o.marker)}return t},findMarks:function(e,t,n){e=lt(this,e),t=lt(this,t);var r=[],o=e.line;return this.iter(e.line,t.line+1,(function(i){var a=i.markedSpans;if(a)for(var c=0;c=l.to||null==l.from&&o!=e.line||null!=l.from&&o==t.line&&l.from>=t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++o})),r},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=i,++n})),lt(this,tt(n,t))},indexFromPos:function(e){var t=(e=lt(this,e)).ch;if(e.linet&&(t=e.from),null!=e.to&&e.to-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var u=e.dataTransfer.getData("Text");if(u){var d;if(t.state.draggingText&&!t.state.draggingText.copy&&(d=t.listSelections()),ni(t.doc,Oo(n,n)),d)for(var f=0;f=0;t--)vi(e.doc,"",r[t].from,r[t].to,"+delete");Dr(e)}))}function Zi(e,t,n){var r=ie(e.text,t+n,n);return r<0||r>e.text.length?null:r}function ea(e,t,n){var r=Zi(e,t.ch,n);return null==r?null:new tt(t.line,r,n<0?"after":"before")}function ta(e,t,n,r,o){if(e){var i=ue(n,t.doc.direction);if(i){var a,c=o<0?J(i):i[0],l=o<0==(1==c.level)?"after":"before";if(c.level>0||"rtl"==t.doc.direction){var s=En(t,n);a=o<0?n.text.length-1:0;var u=Pn(t,s,a).top;a=ae((function(e){return Pn(t,s,e).top==u}),o<0==(1==c.level)?c.from:c.to-1,a),"before"==l&&(a=Zi(n,a,1))}else a=o<0?c.to:c.from;return new tt(r,a,l)}}return new tt(r,o<0?n.text.length:0,o<0?"before":"after")}Ui.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"},Ui.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"},Ui.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"},Ui.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"]},Ui.default=_?Ui.macDefault:Ui.pcDefault;var na={selectAll:si,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),R)},killLine:function(e){return Qi(e,(function(t){if(t.empty()){var n=Ge(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)o=new tt(o.line,o.ch+1),e.replaceRange(i.charAt(o.ch-1)+i.charAt(o.ch-2),tt(o.line,o.ch-2),o,"+transpose");else if(o.line>e.doc.first){var a=Ge(e.doc,o.line-1).text;a&&(o=new tt(o.line,1),e.replaceRange(i.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),tt(o.line-1,a.length-1),o,"+transpose"))}n.push(new zo(o,o))}e.setSelections(n)}))},newlineAndIndent:function(e){return eo(e,(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r-1&&(nt((o=s.ranges[o]).from(),t)<0||t.xRel>0)&&(nt(o.to(),t)>0||t.xRel<0)?function(e,t,n,r){var o=e.display,i=!1,s=to(e,(function(t){l&&(o.scroller.draggable=!1),e.state.draggingText=!1,pe(o.wrapper.ownerDocument,"mouseup",s),pe(o.wrapper.ownerDocument,"mousemove",u),pe(o.scroller,"dragstart",d),pe(o.scroller,"drop",s),i||(be(t),r.addNew||$o(e.doc,n,null,null,r.extend),l||a&&9==c?setTimeout((function(){o.wrapper.ownerDocument.body.focus(),o.input.focus()}),20):o.input.focus())})),u=function(e){i=i||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},d=function(){return i=!0};l&&(o.scroller.draggable=!0),e.state.draggingText=s,s.copy=!r.moveOnDrag,o.scroller.dragDrop&&o.scroller.dragDrop(),fe(o.wrapper.ownerDocument,"mouseup",s),fe(o.wrapper.ownerDocument,"mousemove",u),fe(o.scroller,"dragstart",d),fe(o.scroller,"drop",s),kr(e),setTimeout((function(){return o.input.focus()}),20)}(e,r,t,i):function(e,t,n,r){var o=e.display,i=e.doc;be(t);var a,c,l=i.sel,s=l.ranges;if(r.addNew&&!r.extend?(c=i.sel.contains(n),a=c>-1?s[c]:new zo(n,n)):(a=i.sel.primary(),c=i.sel.primIndex),"rectangle"==r.unit)r.addNew||(a=new zo(n,n)),n=ur(e,t,!0,!0),c=-1;else{var u=_a(e,n,r.unit);a=r.extend?Jo(a,u.anchor,u.head,r.extend):u}r.addNew?-1==c?(c=s.length,ti(i,So(e,s.concat([a]),c),{scroll:!1,origin:"*mouse"})):s.length>1&&s[c].empty()&&"char"==r.unit&&!r.extend?(ti(i,So(e,s.slice(0,c).concat(s.slice(c+1)),0),{scroll:!1,origin:"*mouse"}),l=i.sel):Qo(i,c,a,U):(c=0,ti(i,new ko([a],0),U),l=i.sel);var d=n;function f(t){if(0!=nt(d,t))if(d=t,"rectangle"==r.unit){for(var o=[],s=e.options.tabSize,u=N(Ge(i,n.line).text,n.ch,s),f=N(Ge(i,t.line).text,t.ch,s),h=Math.min(u,f),p=Math.max(u,f),m=Math.min(n.line,t.line),v=Math.min(e.lastLine(),Math.max(n.line,t.line));m<=v;m++){var y=Ge(i,m).text,_=B(y,h,s);h==p?o.push(new zo(tt(m,_),tt(m,_))):y.length>_&&o.push(new zo(tt(m,_),tt(m,B(y,p,s))))}o.length||o.push(new zo(n,n)),ti(i,So(e,l.ranges.slice(0,c).concat(o),c),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var g,b=a,M=_a(e,t,r.unit),w=b.anchor;nt(M.anchor,w)>0?(g=M.head,w=at(b.from(),M.anchor)):(g=M.anchor,w=it(b.to(),M.head));var L=l.ranges.slice(0);L[c]=function(e,t){var n=t.anchor,r=t.head,o=Ge(e.doc,n.line);if(0==nt(n,r)&&n.sticky==r.sticky)return t;var i=ue(o);if(!i)return t;var a=le(i,n.ch,n.sticky),c=i[a];if(c.from!=n.ch&&c.to!=n.ch)return t;var l,s=a+(c.from==n.ch==(1!=c.level)?0:1);if(0==s||s==i.length)return t;if(r.line!=n.line)l=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=le(i,r.ch,r.sticky),d=u-a||(r.ch-n.ch)*(1==c.level?-1:1);l=u==s-1||u==s?d<0:d>0}var f=i[s+(l?-1:0)],h=l==(1==f.level),p=h?f.from:f.to,m=h?"after":"before";return n.ch==p&&n.sticky==m?t:new zo(new tt(n.line,p,m),r)}(e,new zo(lt(i,w),g)),ti(i,So(e,L,c),U)}}var h=o.wrapper.getBoundingClientRect(),p=0;function m(t){e.state.selectingText=!1,p=1/0,t&&(be(t),o.input.focus()),pe(o.wrapper.ownerDocument,"mousemove",v),pe(o.wrapper.ownerDocument,"mouseup",y),i.history.lastSelOrigin=null}var v=to(e,(function(t){0!==t.buttons&&ze(t)?function t(n){var a=++p,c=ur(e,n,!0,"rectangle"==r.unit);if(c)if(0!=nt(c,d)){e.curOp.focus=D(),f(c);var l=Cr(o,i);(c.line>=l.to||c.lineh.bottom?20:0;s&&setTimeout(to(e,(function(){p==a&&(o.scroller.scrollTop+=s,t(n))})),50)}}(t):m(t)})),y=to(e,m);e.state.selectingText=y,fe(o.wrapper.ownerDocument,"mousemove",v),fe(o.wrapper.ownerDocument,"mouseup",y)}(e,r,t,i)}(t,r,i,e):ke(e)==n.scroller&&be(e):2==o?(r&&$o(t.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==o&&(L?t.display.input.onContextMenu(e):kr(t)))}}function _a(e,t,n){if("char"==n)return new zo(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new zo(tt(t.line,0),lt(e.doc,tt(t.line+1,0)));var r=n(e,t);return new zo(r.from,r.to)}function ga(e,t,n,r){var o,i;if(t.touches)o=t.touches[0].clientX,i=t.touches[0].clientY;else try{o=t.clientX,i=t.clientY}catch(t){return!1}if(o>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&be(t);var a=e.display,c=a.lineDiv.getBoundingClientRect();if(i>c.bottom||!_e(e,n))return we(t);i-=c.top-a.viewOffset;for(var l=0;l=o)return me(e,n,e,Qe(e.doc,i),e.display.gutterSpecs[l].className,t),we(t)}}function ba(e,t){return ga(e,t,"gutterClick",!0)}function Ma(e,t){Ln(e.display,t)||function(e,t){return!!_e(e,"gutterContextMenu")&&ga(e,t,"gutterContextMenu",!1)}(e,t)||ve(e,t,"contextmenu")||L||e.display.input.onContextMenu(t)}function wa(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),In(e)}va.prototype.compare=function(e,t,n){return this.time+400>e&&0==nt(t,this.pos)&&n==this.button};var La={toString:function(){return"CodeMirror.Init"}},ka={},za={};function Sa(e,t,n){if(!t!=!(n&&n!=La)){var r=e.display.dragFunctions,o=t?fe:pe;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 Oa(e){e.options.lineWrapping?(E(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(S(e.display.wrapper,"CodeMirror-wrap"),Bt(e)),sr(e),fr(e),In(e),setTimeout((function(){return Wr(e)}),100)}function Ta(e,t){var n=this;if(!(this instanceof Ta))return new Ta(e,t);this.options=t=t?V(t):{},V(ka,t,!1);var r=t.value;"string"==typeof r?r=new Di(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var o=new Ta.inputStyles[t.inputStyle](this),i=this.display=new _o(e,r,o,t);for(var s in i.wrapper.CodeMirror=this,wa(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Kr(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 A,keySeq:null,specialChars:null},t.autofocus&&!y&&i.input.focus(),a&&c<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),function(e){var t=e.display;fe(t.scroller,"mousedown",to(e,ya)),fe(t.scroller,"dblclick",a&&c<11?to(e,(function(t){if(!ve(e,t)){var n=ur(e,t);if(n&&!ba(e,t)&&!Ln(e.display,t)){be(t);var r=e.findWordAt(n);$o(e.doc,r.anchor,r.head)}}})):function(t){return ve(e,t)||be(t)}),fe(t.scroller,"contextmenu",(function(t){return Ma(e,t)}));var n,r={end:0};function o(){t.activeTouch&&(n=setTimeout((function(){return t.activeTouch=null}),1e3),(r=t.activeTouch).end=+new Date)}function i(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}fe(t.scroller,"touchstart",(function(o){if(!ve(e,o)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(o)&&!ba(e,o)){t.input.ensurePolled(),clearTimeout(n);var i=+new Date;t.activeTouch={start:i,moved:!1,prev:i-r.end<=300?r:null},1==o.touches.length&&(t.activeTouch.left=o.touches[0].pageX,t.activeTouch.top=o.touches[0].pageY)}})),fe(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),fe(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!Ln(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var a,c=e.coordsChar(t.activeTouch,"page");a=!r.prev||i(r,r.prev)?new zo(c,c):!r.prev.prev||i(r,r.prev.prev)?e.findWordAt(c):new zo(tt(c.line,0),lt(e.doc,tt(c.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),be(n)}o()})),fe(t.scroller,"touchcancel",o),fe(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(jr(e,t.scroller.scrollTop),Nr(e,t.scroller.scrollLeft,!0),me(e,"scroll",e))})),fe(t.scroller,"mousewheel",(function(t){return Lo(e,t)})),fe(t.scroller,"DOMMouseScroll",(function(t){return Lo(e,t)})),fe(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){ve(e,t)||Le(t)},over:function(t){ve(e,t)||(function(e,t){var n=ur(e,t);if(n){var r=document.createDocumentFragment();gr(e,n,r),e.display.dragCursor||(e.display.dragCursor=C("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),T(e.display.dragCursor,r)}}(e,t),Le(t))},start:function(t){return function(e,t){if(a&&(!e.state.draggingText||+new Date-Ei<100))Le(t);else if(!ve(e,t)&&!Ln(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!f)){var n=C("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),d&&n.parentNode.removeChild(n)}}(e,t)},drop:to(e,Pi),leave:function(t){ve(e,t)||Yi(e)}};var l=t.input.getField();fe(l,"keyup",(function(t){return fa.call(e,t)})),fe(l,"keydown",to(e,da)),fe(l,"keypress",to(e,ha)),fe(l,"focus",(function(t){return zr(e,t)})),fe(l,"blur",(function(t){return Sr(e,t)}))}(this),Ni(),Gr(this),this.curOp.forceUpdate=!0,Vo(this,r),t.autofocus&&!y||this.hasFocus()?setTimeout(j(zr,this),20):Sr(this),za)za.hasOwnProperty(s)&&za[s](n,t[s],La);po(this),t.finishInit&&t.finishInit(this);for(var u=0;u150)){if(!r)return;n="prev"}}else s=0,n="not";"prev"==n?s=t>i.first?N(Ge(i,t-1).text,null,a):0:"add"==n?s=l+e.options.indentUnit:"subtract"==n?s=l-e.options.indentUnit:"number"==typeof n&&(s=l+n),s=Math.max(0,s);var d="",f=0;if(e.options.indentWithTabs)for(var h=Math.floor(s/a);h;--h)f+=a,d+="\t";if(fa,l=De(t),s=null;if(c&&r.ranges.length>1)if(Ha&&Ha.text.join("\n")==t){if(r.ranges.length%Ha.text.length==0){s=[];for(var u=0;u=0;f--){var h=r.ranges[f],p=h.from(),m=h.to();h.empty()&&(n&&n>0?p=tt(p.line,p.ch-n):e.state.overwrite&&!c?m=tt(m.line,Math.min(Ge(i,m.line).text.length,m.ch+J(l).length)):c&&Ha&&Ha.lineWise&&Ha.text.join("\n")==t&&(p=m=tt(p.line,0)));var v={from:p,to:m,text:s?s[f%s.length]:l,origin:o||(c?"paste":e.state.cutIncoming>a?"cut":"+input")};di(e.doc,v),sn(e,"inputRead",e,v)}t&&!c&&Ya(e,t),Dr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Pa(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||eo(t,(function(){return Ea(t,n,0,null,"paste")})),!0}function Ya(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var o=n.ranges[r];if(!(o.head.ch>100||r&&n.ranges[r-1].head.line==o.head.line)){var i=e.getModeAt(o.head),a=!1;if(i.electricChars){for(var c=0;c-1){a=xa(e,o.head.line,"smart");break}}else i.electricInput&&i.electricInput.test(Ge(e.doc,o.head.line).text.slice(0,o.head.ch))&&(a=xa(e,o.head.line,"smart"));a&&sn(e,"electricInput",e,o.head.line)}}}function ja(e){for(var t=[],n=[],r=0;r=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var i=le(o,n.ch,n.sticky),a=o[i];if("ltr"==e.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from=a.from&&f>=u.begin)){var h=d?"before":"after";return new tt(n.line,f,h)}}var p=function(e,t,r){for(var i=function(e,t){return t?new tt(n.line,l(e,1),"before"):new tt(n.line,e,"after")};e>=0&&e0==(1!=a.level),s=c?r.begin:l(r.end,-1);if(a.from<=s&&s0?u.end:l(u.begin,-1);return null==v||r>0&&v==t.text.length||!(m=p(r>0?0:o.length-1,r,s(v)))?null:m}(e.cm,c,t,n):ea(c,t,n))){if(r||(a=t.line+n)=e.first+e.size||(t=new tt(a,t.ch,t.sticky),!(c=Ge(e,a))))return!1;t=ta(o,e.cm,c,t.line,n)}else t=i;return!0}if("char"==r)l();else if("column"==r)l(!0);else if("word"==r||"group"==r)for(var s=null,u="group"==r,d=e.cm&&e.cm.getHelper(t,"wordChars"),f=!0;!(n<0)||l(!f);f=!1){var h=c.text.charAt(t.ch)||"\n",p=te(h,d)?"w":u&&"\n"==h?"n":!u||/\s/.test(h)?null:"p";if(!u||f||p||(p="s"),s&&s!=p){n<0&&(n=1,l(),t.sticky="after");break}if(p&&(s=p),n>0&&!l(!f))break}var m=ci(e,t,i,a,!0);return rt(i,m)&&(m.hitSide=!0),m}function Fa(e,t,n,r){var o,i,a=e.doc,c=t.left;if("page"==r){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),s=Math.max(l-.5*or(e.display),3);o=(n>0?t.bottom:t.top)+n*s}else"line"==r&&(o=n>0?t.bottom+3:t.top-3);for(;(i=Xn(e,c,o)).outside;){if(n<0?o<=0:o>=a.height){i.hitSide=!0;break}o+=5*n}return i}var Ia=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new A,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Wa(e,t){var n=Dn(e,t.line);if(!n||n.hidden)return null;var r=Ge(e.doc,t.line),o=xn(n,r,t.line),i=ue(r,e.doc.direction),a="left";i&&(a=le(i,t.ch)%2?"right":"left");var c=Vn(o.map,t.ch,a);return c.offset="right"==c.collapse?c.end:c.start,c}function Ra(e,t){return t&&(e.bad=!0),e}function Ua(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return Ra(e.clipPos(tt(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var o=0;o=t.display.viewTo||i.line=t.display.viewFrom&&Wa(t,o)||{node:l[0].measure.map[2],offset:0},u=i.liner.firstLine()&&(a=tt(a.line-1,Ge(r.doc,a.line-1).length)),c.ch==Ge(r.doc,c.line).text.length&&c.lineo.viewTo-1)return!1;a.line==o.viewFrom||0==(e=dr(r,a.line))?(t=Xe(o.view[0].line),n=o.view[0].node):(t=Xe(o.view[e].line),n=o.view[e-1].node.nextSibling);var l,s,u=dr(r,c.line);if(u==o.view.length-1?(l=o.viewTo-1,s=o.lineDiv.lastChild):(l=Xe(o.view[u+1].line)-1,s=o.view[u+1].node.previousSibling),!n)return!1;for(var d=r.doc.splitLines(function(e,t,n,r,o){var i="",a=!1,c=e.doc.lineSeparator(),l=!1;function s(){a&&(i+=c,l&&(i+=c),a=l=!1)}function u(e){e&&(s(),i+=e)}function d(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void u(n);var i,f=t.getAttribute("cm-marker");if(f){var h=e.findMarks(tt(r,0),tt(o+1,0),(v=+f,function(e){return e.id==v}));return void(h.length&&(i=h[0].find(0))&&u(qe(e.doc,i.from,i.to).join(c)))}if("false"==t.getAttribute("contenteditable"))return;var p=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;p&&s();for(var m=0;m1&&f.length>1;)if(J(d)==J(f))d.pop(),f.pop(),l--;else{if(d[0]!=f[0])break;d.shift(),f.shift(),t++}for(var h=0,p=0,m=d[0],v=f[0],y=Math.min(m.length,v.length);ha.ch&&_.charCodeAt(_.length-p-1)==g.charCodeAt(g.length-p-1);)h--,p++;d[d.length-1]=_.slice(0,_.length-p).replace(/^\u200b+/,""),d[0]=d[0].slice(h).replace(/\u200b+$/,"");var M=tt(t,h),w=tt(l,f.length?J(f).length-p:0);return d.length>1||d[0]||nt(M,w)?(vi(r.doc,d,M,w,"+input"),!0):void 0},Ia.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ia.prototype.reset=function(){this.forceCompositionEnd()},Ia.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ia.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},Ia.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||eo(this.cm,(function(){return fr(e.cm)}))},Ia.prototype.setUneditable=function(e){e.contentEditable="false"},Ia.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||to(this.cm,Ea)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Ia.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Ia.prototype.onContextMenu=function(){},Ia.prototype.resetPosition=function(){},Ia.prototype.needsContentAttribute=!0;var Ba=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new A,this.hasSelection=!1,this.composing=null};Ba.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var o=this.textarea;function i(e){if(!ve(r,e)){if(r.somethingSelected())Da({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=ja(r);Da({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,R):(n.prevInput="",o.value=t.text.join("\n"),Y(o))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),m&&(o.style.width="0px"),fe(o,"input",(function(){a&&c>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),fe(o,"paste",(function(e){ve(r,e)||Pa(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),fe(o,"cut",i),fe(o,"copy",i),fe(e.scroller,"paste",(function(t){if(!Ln(e,t)&&!ve(r,t)){if(!o.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var i=new Event("paste");i.clipboardData=t.clipboardData,o.dispatchEvent(i)}})),fe(e.lineSpace,"selectstart",(function(t){Ln(e,t)||be(t)})),fe(o,"compositionstart",(function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}})),fe(o,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},Ba.prototype.createField=function(e){this.wrapper=Na(),this.textarea=this.wrapper.firstChild},Ba.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=_r(e);if(e.options.moveInputWithCursor){var o=qn(e,n.sel.primary().head,"div"),i=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,o.top+a.top-i.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,o.left+a.left-i.left))}return r},Ba.prototype.showSelection=function(e){var t=this.cm.display;T(t.cursorDiv,e.cursors),T(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Ba.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&Y(this.textarea),a&&c>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",a&&c>=9&&(this.hasSelection=null))}},Ba.prototype.getField=function(){return this.textarea},Ba.prototype.supportsTouch=function(){return!1},Ba.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!y||D()!=this.textarea))try{this.textarea.focus()}catch(e){}},Ba.prototype.blur=function(){this.textarea.blur()},Ba.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ba.prototype.receivedFocus=function(){this.slowPoll()},Ba.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},Ba.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,(function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}))},Ba.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Ee(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var o=n.value;if(o==r&&!t.somethingSelected())return!1;if(a&&c>=9&&this.hasSelection===o||_&&/[\uf700-\uf7ff]/.test(o))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var i=o.charCodeAt(0);if(8203!=i||r||(r="\u200b"),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var l=0,s=Math.min(r.length,o.length);l1e3||o.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=o,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},Ba.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ba.prototype.onKeyPress=function(){a&&c>=9&&(this.hasSelection=null),this.fastPoll()},Ba.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,o=t.textarea;t.contextMenuPending&&t.contextMenuPending();var i=ur(n,e),s=r.scroller.scrollTop;if(i&&!d){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(i)&&to(n,ti)(n.doc,Oo(i),R);var u,f=o.style.cssText,h=t.wrapper.style.cssText,p=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",o.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-p.top-5)+"px; left: "+(e.clientX-p.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(u=window.scrollY),r.input.focus(),l&&window.scrollTo(null,u),r.input.reset(),n.somethingSelected()||(o.value=t.prevInput=" "),t.contextMenuPending=y,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),a&&c>=9&&v(),L){Le(e);var m=function(){pe(window,"mouseup",m),setTimeout(y,20)};fe(window,"mouseup",m)}else setTimeout(y,50)}function v(){if(null!=o.selectionStart){var e=n.somethingSelected(),i="\u200b"+(e?o.value:"");o.value="\u21da",o.value=i,t.prevInput=e?"":"\u200b",o.selectionStart=1,o.selectionEnd=i.length,r.selForContextMenu=n.doc.sel}}function y(){if(t.contextMenuPending==y&&(t.contextMenuPending=!1,t.wrapper.style.cssText=h,o.style.cssText=f,a&&c<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=s),null!=o.selectionStart)){(!a||a&&c<9)&&v();var e=0,i=function(){r.selForContextMenu==n.doc.sel&&0==o.selectionStart&&o.selectionEnd>0&&"\u200b"==t.prevInput?to(n,si)(n):e++<10?r.detectingSelectAll=setTimeout(i,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(i,200)}}},Ba.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},Ba.prototype.setUneditable=function(){},Ba.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function n(n,r,o,i){e.defaults[n]=r,o&&(t[n]=i?function(e,t,n){n!=La&&o(e,t,n)}:o)}e.defineOption=n,e.Init=La,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,Do(e)}),!0),n("indentUnit",2,Do,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){Eo(e),In(e),fr(e)}),!0),n("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter((function(e){for(var o=0;;){var i=e.text.indexOf(t,o);if(-1==i)break;o=i+t.length,n.push(tt(r,i))}r++}));for(var o=n.length-1;o>=0;o--)vi(e.doc,t,n[o],tt(n[o].line,n[o].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=La&&e.refresh()})),n("specialCharPlaceholder",Zt,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",y?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!b),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){wa(e),yo(e)}),!0),n("keyMap","default",(function(e,t,n){var r=Xi(t),o=n!=La&&Xi(n);o&&o.detach&&o.detach(e,r),r.attach&&r.attach(e,o||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Oa,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=mo(t,e.options.lineNumbers),yo(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?cr(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return Wr(e)}),!0),n("scrollbarStyle","native",(function(e){Kr(e),Wr(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=mo(e.options.gutters,t),yo(e)}),!0),n("firstLineNumber",1,yo,!0),n("lineNumberFormatter",(function(e){return e}),yo,!0),n("showCursorWhenSelecting",!1,yr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(Sr(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,Sa),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,yr,!0),n("singleCursorHeightPerLine",!0,yr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Eo,!0),n("addModeClass",!1,Eo,!0),n("pollInterval",100),n("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),n("historyEventDelay",1250),n("viewportMargin",10,(function(e){return e.refresh()}),!0),n("maxHighlightLength",1e4,Eo,!0),n("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),n("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),n("autofocus",null),n("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),n("phrases",null)}(Ta),function(e){var t=e.optionHandlers,n=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)&&to(this,t[e])(this,n,o),me(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"](Xi(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;nn&&(xa(this,o.head.line,e,!0),n=o.head.line,r==this.doc.sel.primIndex&&Dr(this));else{var i=o.from(),a=o.to(),c=Math.max(n,i.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=c;l0&&Qo(this.doc,r,new zo(i,s[r].to()),R)}}})),getTokenAt:function(e,t){return gt(this,e,t)},getLineTokens:function(e,t){return gt(this,tt(e),t,!0)},getTokenTypeAt:function(e){e=lt(this.doc,e);var t,n=ht(this,Ge(this.doc,e.line)),r=0,o=(n.length-1)/2,i=e.ch;if(0==i)t=n[2];else for(;;){var a=r+o>>1;if((a?n[2*a-1]:0)>=i)o=a;else{if(!(n[2*a+1]i&&(e=i,o=!0),r=Ge(this.doc,e)}else r=e;return Kn(this,r,{top:0,left:0},t||"page",n||o).top+(o?this.doc.height-Ut(r):0)},defaultTextHeight:function(){return or(this.display)},defaultCharWidth:function(){return ir(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,o){var i,a,c,l=this.display,s=(e=qn(this,lt(this.doc,e))).bottom,u=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),l.sizer.appendChild(t),"over"==r)s=e.top;else if("above"==r||"near"==r){var d=Math.max(l.wrapper.clientHeight,this.doc.height),f=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>d)&&e.top>t.offsetHeight?s=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=d&&(s=e.bottom),u+t.offsetWidth>f&&(u=f-t.offsetWidth)}t.style.top=s+"px",t.style.left=t.style.right="","right"==o?(u=l.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==o?u=0:"middle"==o&&(u=(l.sizer.clientWidth-t.offsetWidth)/2),t.style.left=u+"px"),n&&(i=this,a={left:u,top:s,right:u+t.offsetWidth,bottom:s+t.offsetHeight},null!=(c=xr(i,a)).scrollTop&&jr(i,c.scrollTop),null!=c.scrollLeft&&Nr(i,c.scrollLeft))},triggerOnKeyDown:no(da),triggerOnKeyPress:no(ha),triggerOnKeyUp:fa,triggerOnMouseDown:no(ya),execCommand:function(e){if(na.hasOwnProperty(e))return na[e].call(null,this)},triggerElectric:no((function(e){Ya(this,e)})),findPosH:function(e,t,n,r){var o=1;t<0&&(o=-1,t=-t);for(var i=lt(this.doc,e),a=0;a0&&a(t.charAt(n-1));)--n;for(;r.5)&&sr(this),me(this,"refresh",this)})),swapDoc:no((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),Vo(this,e),In(this),this.display.input.reset(),Er(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,sn(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},ge(e),e.registerHelper=function(t,r,o){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=o},e.registerGlobalHelper=function(t,r,o,i){e.registerHelper(t,r,i),n[t]._global.push({pred:o,val:i})}}(Ta);var Ga="iter insert remove copy getEditor constructor".split(" ");for(var qa in Di.prototype)Di.prototype.hasOwnProperty(qa)&&F(Ga,qa)<0&&(Ta.prototype[qa]=function(e){return function(){return e.apply(this.doc,arguments)}}(Di.prototype[qa]));return ge(Di),Ta.inputStyles={textarea:Ba,contenteditable:Ia},Ta.defineMode=function(e){Ta.defaults.mode||"null"==e||(Ta.defaults.mode=e),Ne.apply(this,arguments)},Ta.defineMIME=function(e,t){Ve[e]=t},Ta.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Ta.defineMIME("text/plain","null"),Ta.defineExtension=function(e,t){Ta.prototype[e]=t},Ta.defineDocExtension=function(e,t){Di.prototype[e]=t},Ta.fromTextArea=function(e,t){if((t=t?V(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=D();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=c.getValue()}var o;if(e.form&&(fe(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var i=e.form;o=i.submit;try{var a=i.submit=function(){r(),i.submit=o,i.submit(),i.submit=a}}catch(e){}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(pe(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=o))}},e.style.display="none";var c=Ta((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return c},function(e){e.off=pe,e.on=fe,e.wheelEventPixels=wo,e.Doc=Di,e.splitLines=De,e.countColumn=N,e.findColumn=B,e.isWordChar=ee,e.Pass=W,e.signal=me,e.Line=Gt,e.changeEnd=To,e.scrollbarModel=Ur,e.Pos=tt,e.cmpPos=nt,e.modes=je,e.mimeModes=Ve,e.resolveMode=Ae,e.getMode=Fe,e.modeExtensions=Ie,e.extendMode=We,e.copyState=Re,e.startState=Ke,e.innerMode=Ue,e.commands=na,e.keyMap=Ui,e.keyName=$i,e.isModifierKey=qi,e.lookupKey=Gi,e.normalizeKeyMap=Bi,e.StringStream=Be,e.SharedTextMarker=Ti,e.TextMarker=Si,e.LineWidget=Li,e.e_preventDefault=be,e.e_stopPropagation=Me,e.e_stop=Le,e.addClass=E,e.contains=H,e.rmClass=S,e.keyNames=Fi}(Ta),Ta.version="5.49.2",Ta}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(n(9));t.toArray=a,t.getActiveIndex=function(e,t){for(var n=a(e),r=0;r2&&void 0!==arguments[2]?arguments[2]:"ltr",r=l(t)?"translateY":"translateX";if(!l(t)&&"rtl"===n)return r+"("+100*e+"%) translateZ(0)";return r+"("+100*-e+"%) translateZ(0)"},t.getMarginStyle=function(e,t){var n=l(t)?"marginTop":"marginLeft";return(0,r.default)({},n,100*-e+"%")},t.getStyle=s,t.setPxStyle=function(e,t,n){t=n?"0px, "+t+"px, 0px":t+"px, 0px, 0px",c(e.style,"translate3d("+t+")")},t.getDataAttr=function(e){return Object.keys(e).reduce((function(t,n){return"aria-"!==n.substr(0,5)&&"data-"!==n.substr(0,5)&&"role"!==n||(t[n]=e[n]),t}),{})},t.getLeft=function(e,t){return d("left","offsetWidth","right",e,t)},t.getTop=function(e,t){return d("top","offsetHeight","bottom",e,t)};var o=i(n(1));function i(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=[];return o.default.Children.forEach(e,(function(e){e&&t.push(e)})),t}function c(e,t){e.transform=t,e.webkitTransform=t,e.mozTransform=t}function l(e){return"left"===e||"right"===e}function s(e,t){return+window.getComputedStyle(e).getPropertyValue(t).replace("px","")}function u(e,t){return+e.getPropertyValue(t).replace("px","")}function d(e,t,n,r,o){var i=s(o,"padding-"+e);if(!r||!r.parentNode)return i;var a=r.parentNode.childNodes;return Array.prototype.some.call(a,(function(o){var a=window.getComputedStyle(o);return o!==r?(i+=u(a,"margin-"+e),i+=o[t],i+=u(a,"margin-"+n),"content-box"===a.boxSizing&&(i+=u(a,"border-"+e+"-width")+u(a,"border-"+n+"-width")),!1):(i+=u(a,"margin-"+e),!0)})),i}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reg=void 0;var r,o=(r=n(11))&&r.__esModule?r:{default:r};const i=n(452);t.reg=e=>{i.keys().map(t=>{let r=t.match(/^\.\/([\w\-]+)\.js$/),i=r?r[1]:null;i&&"index"!==i&&o.default.on(i,(...t)=>{n(453)(`./${i}`)(e,...t)})})}},function(e,t,n){"use strict";var r,o=(r=n(11))&&r.__esModule?r:{default:r};const i=n(32);e.exports=(e,t,n=null,r=!1)=>o.default.pact("saveHosts",t).then(t=>{r||i(e,t,n)}).catch(e=>{console.log(e)})},function(e,t,n){try{var r=n(113)}catch(e){r=n(113)}var o=/\s+/,i=Object.prototype.toString;function a(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}e.exports=function(e){return new a(e)},a.prototype.add=function(e){if(this.list)return this.list.add(e),this;var t=this.array();return~r(t,e)||t.push(e),this.el.className=t.join(" "),this},a.prototype.remove=function(e){if("[object RegExp]"==i.call(e))return this.removeMatching(e);if(this.list)return this.list.remove(e),this;var t=this.array(),n=r(t,e);return~n&&t.splice(n,1),this.el.className=t.join(" "),this},a.prototype.removeMatching=function(e){for(var t=this.array(),n=0;n{this.onCancel()})}onOK(){this.props.onOK()}onCancel(){this.props.onCancel()}renderFootButtons(){let e=[],{lang:t}=this.props;return e.push(i.default.createElement("div",{className:"button btn-cancel",key:"btn-cancel",onClick:this.onCancel.bind(this)},this.props.cancel_title||t.cancel)),e.push(i.default.createElement("div",{className:"button btn-ok btn-default",key:"btn-ok",onClick:this.onOK.bind(this)},this.props.ok_title||t.ok)),e}render(){if(!this.props.show)return null;let{show:e,title:t,body:n,lang:a,width:c,okText:l,cancelText:s}=this.props;return i.default.createElement(r.default,{visible:e,title:i.default.createElement("h3",null,t),onOk:this.onOK.bind(this),onCancel:this.onCancel.bind(this),wrapClassName:"frame",width:c,footer:[i.default.createElement(o.default,{key:"back",size:"large",onClick:this.onCancel.bind(this)},s||a.cancel),i.default.createElement(o.default,{key:"submit",type:"primary",size:"large",loading:!1,onClick:this.onOK.bind(this)},l||a.ok)]},i.default.createElement("div",{className:"prompt-body"},n))}}t.default=l},function(e,t,n){"use strict";t.__esModule=!0;var r=a(n(289)),o=a(n(301)),i="function"==typeof o.default&&"symbol"==typeof r.default?function(e){return typeof e}:function(e){return e&&"function"==typeof o.default&&e.constructor===o.default&&e!==o.default.prototype?"symbol":typeof e};function a(e){return e&&e.__esModule?e:{default:e}}t.default="function"==typeof o.default&&"symbol"===i(r.default)?function(e){return void 0===e?"undefined":i(e)}:function(e){return e&&"function"==typeof o.default&&e.constructor===o.default&&e!==o.default.prototype?"symbol":void 0===e?"undefined":i(e)}},function(e,t,n){"use strict";n.r(t),function(e){var n=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return(function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n0},e.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),s?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;l.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),d=function(e,t){for(var n=0,r=Object.keys(t);n0},e}(),L="undefined"!=typeof WeakMap?new WeakMap:new n,k=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=u.getInstance(),r=new w(t,n,this);L.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){k.prototype[e]=function(){var t;return(t=L.get(this))[e].apply(t,arguments)}}));var z=void 0!==o.ResizeObserver?o.ResizeObserver:k;t.default=z}.call(this,n(31))},function(e,t,n){"use strict";function r(){var e=[].slice.call(arguments,0);return 1===e.length?e[0]:function(){for(var t=0;t0?r:n)(e)}},function(e,t,n){var r=n(71)("keys"),o=n(56);e.exports=function(e){return r[e]||(r[e]=o(e))}},function(e,t,n){var r=n(25),o=n(24),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(55)?"pure":"global",copyright:"\xa9 2019 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(68);e.exports=function(e){return Object(r(e))}},function(e,t){e.exports={}},function(e,t,n){var r=n(42),o=n(294),i=n(72),a=n(70)("IE_PROTO"),c=function(){},l=function(){var e,t=n(105)("iframe"),r=i.length;for(t.style.display="none",n(295).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("