@hippovideo/video-sdk 0.0.0-experimental-3a2c73cd7ded-20230626 → 0.0.0-experimental-99cc6dbe6a64-20230626
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/{150-bundle-hippo-za8po4rbidi-537cde06c66b50f51052.js → 150-bundle-hippo-2f474y2qh5c-325d3cf4c204c50ea96a.js} +1 -1
- package/app/{245-bundle-hippo-za8po4rbidi-f17a2de08006bb341af4.js → 245-bundle-hippo-2f474y2qh5c-d18347af1944bd01a283.js} +1 -1
- package/app/{520-bundle-hippo-za8po4rbidi-2c8a7d2c1aa2a76fc548.js → 520-bundle-hippo-2f474y2qh5c-585ddf046c7f1ea72797.js} +1 -1
- package/app/{72-bundle-hippo-za8po4rbidi-f271899ea29038ad26b0.js → 72-bundle-hippo-2f474y2qh5c-1091418c807143ba804e.js} +1 -1
- package/app/hv_recorder.js +1 -1
- package/app/webpack-common-manifest.json +7 -7
- package/package.json +1 -1
- /package/app/{150-bundle-hippo-za8po4rbidi-537cde06c66b50f51052.js.LICENSE.txt → 150-bundle-hippo-2f474y2qh5c-325d3cf4c204c50ea96a.js.LICENSE.txt} +0 -0
- /package/app/{188-bundle-hippo-za8po4rbidi-1036786bf949fd672026.js → 188-bundle-hippo-2f474y2qh5c-1036786bf949fd672026.js} +0 -0
- /package/app/{245-bundle-hippo-za8po4rbidi-f17a2de08006bb341af4.js.LICENSE.txt → 245-bundle-hippo-2f474y2qh5c-d18347af1944bd01a283.js.LICENSE.txt} +0 -0
- /package/app/{307-bundle-hippo-za8po4rbidi-df96d02d7be681b608e1.js → 307-bundle-hippo-2f474y2qh5c-df96d02d7be681b608e1.js} +0 -0
- /package/app/{520-bundle-hippo-za8po4rbidi-2c8a7d2c1aa2a76fc548.js.LICENSE.txt → 520-bundle-hippo-2f474y2qh5c-585ddf046c7f1ea72797.js.LICENSE.txt} +0 -0
- /package/app/{72-bundle-hippo-za8po4rbidi-f271899ea29038ad26b0.js.LICENSE.txt → 72-bundle-hippo-2f474y2qh5c-1091418c807143ba804e.js.LICENSE.txt} +0 -0
- /package/app/{881-bundle-hippo-za8po4rbidi-1e41c84326fac8446b66.js → 881-bundle-hippo-2f474y2qh5c-1e41c84326fac8446b66.js} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! For license information please see 150-bundle-hippo-
|
|
1
|
+
/*! For license information please see 150-bundle-hippo-2f474y2qh5c-325d3cf4c204c50ea96a.js.LICENSE.txt */
|
|
2
2
|
(self.webpackChunkHVRecorder=self.webpackChunkHVRecorder||[]).push([[150],{62125:function(t,e,n){"use strict";n.d(e,{SQ:function(){return l},gp:function(){return c},mF:function(){return s}});class r extends Date{static parseDateTime(t,e="YYYY-MM-DD",n="en-US"){if(!t)return new Date((new Date).setHours(0,0,0,0));if(t instanceof r)return t.toJSDate();if(t instanceof Date)return t;if(/^-?\d{10,}$/.test(String(t)))return new Date(Number(t));if("string"==typeof t){const i=[];let o=null;for(;null!=(o=r.regex.exec(e));)"\\"!==o[1]&&i.push(o);if(i.length){const e={year:null,month:null,shortMonth:null,longMonth:null,day:null,hour:0,minute:0,second:0,ampm:null,value:""};i[0].index>0&&(e.value+=".*?");for(const[t,o]of Object.entries(i)){const i=Number(t),{group:a,pattern:s}=r.formatPatterns(o[0],n);e[a]=i+1,e.value+=s,e.value+=".*?"}const o=new RegExp(`^${e.value}$`);if(o.test(t)){const i=o.exec(t),a=Number(i[e.year]);let s=null;e.month?s=Number(i[e.month])-1:e.shortMonth?s=r.shortMonths(n).indexOf(i[e.shortMonth]):e.longMonth&&(s=r.longMonths(n).indexOf(i[e.longMonth]));const u=Number(i[e.day])||1,l=Number(i[e.hour]);let c=Number.isNaN(l)?0:l;const f=Number(i[e.minute]),h=Number.isNaN(f)?0:f,d=Number(i[e.second]),p=Number.isNaN(d)?0:d,m=i[e.ampm];return m&&"PM"===m&&(c+=12,24===c&&(c=0)),new Date(a,s,u,c,h,p,0)}}}return new Date((new Date).setHours(0,0,0,0))}static regex=/(\\)?(Y{2,4}|M{1,4}|D{1,2}|H{1,2}|h{1,2}|m{1,2}|s{1,2}|A|a)/g;static MONTH_JS=[0,1,2,3,4,5,6,7,8,9,10,11];static shortMonths(t){return r.MONTH_JS.map((e=>new Date(2019,e).toLocaleString(t,{month:"short"})))}static longMonths(t){return r.MONTH_JS.map((e=>new Date(2019,e).toLocaleString(t,{month:"long"})))}static formatPatterns(t,e){switch(t){case"YY":case"YYYY":return{group:"year",pattern:`(\\d{${t.length}})`};case"M":return{group:"month",pattern:"(\\d{1,2})"};case"MM":return{group:"month",pattern:"(\\d{2})"};case"MMM":return{group:"shortMonth",pattern:`(${r.shortMonths(e).join("|")})`};case"MMMM":return{group:"longMonth",pattern:`(${r.longMonths(e).join("|")})`};case"D":return{group:"day",pattern:"(\\d{1,2})"};case"DD":return{group:"day",pattern:"(\\d{2})"};case"h":case"H":return{group:"hour",pattern:"(\\d{1,2})"};case"hh":case"HH":return{group:"hour",pattern:"(\\d{2})"};case"m":return{group:"minute",pattern:"(\\d{1,2})"};case"mm":return{group:"minute",pattern:"(\\d{2})"};case"s":return{group:"second",pattern:"(\\d{1,2})"};case"ss":return{group:"second",pattern:"(\\d{2})"};case"a":case"A":return{group:"ampm",pattern:"(AM|PM|am|pm)"}}}lang;constructor(t=null,e="YYYY-MM-DD",n="en-US"){super(r.parseDateTime(t,e,n)),this.lang=n}getWeek(t){const e=new Date(this.midnight_ts(this)),n=(this.getDay()+(7-t))%7;e.setDate(e.getDate()-n);const r=e.getTime();return e.setMonth(0,1),e.getDay()!==t&&e.setMonth(0,1+(4-e.getDay()+7)%7),1+Math.ceil((r-e.getTime())/6048e5)}clone(){return new r(this)}toJSDate(){return new Date(this)}inArray(t,e="[]"){return t.some((t=>t instanceof Array?this.isBetween(t[0],t[1],e):this.isSame(t,"day")))}isBetween(t,e,n="()"){switch(n){default:case"()":return this.midnight_ts(this)>this.midnight_ts(t)&&this.midnight_ts(this)<this.midnight_ts(e);case"[)":return this.midnight_ts(this)>=this.midnight_ts(t)&&this.midnight_ts(this)<this.midnight_ts(e);case"(]":return this.midnight_ts(this)>this.midnight_ts(t)&&this.midnight_ts(this)<=this.midnight_ts(e);case"[]":return this.midnight_ts()>=this.midnight_ts(t)&&this.midnight_ts()<=this.midnight_ts(e)}}isBefore(t,e="days"){switch(e){case"day":case"days":return new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()>new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime();case"month":case"months":return new Date(t.getFullYear(),t.getMonth(),1).getTime()>new Date(this.getFullYear(),this.getMonth(),1).getTime();case"year":case"years":return t.getFullYear()>this.getFullYear()}throw new Error("isBefore: Invalid unit!")}isSameOrBefore(t,e="days"){switch(e){case"day":case"days":return new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()>=new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime();case"month":case"months":return new Date(t.getFullYear(),t.getMonth(),1).getTime()>=new Date(this.getFullYear(),this.getMonth(),1).getTime()}throw new Error("isSameOrBefore: Invalid unit!")}isAfter(t,e="days"){switch(e){case"day":case"days":return new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime()>new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime();case"month":case"months":return new Date(this.getFullYear(),this.getMonth(),1).getTime()>new Date(t.getFullYear(),t.getMonth(),1).getTime();case"year":case"years":return this.getFullYear()>t.getFullYear()}throw new Error("isAfter: Invalid unit!")}isSameOrAfter(t,e="days"){switch(e){case"day":case"days":return new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime()>=new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime();case"month":case"months":return new Date(this.getFullYear(),this.getMonth(),1).getTime()>=new Date(t.getFullYear(),t.getMonth(),1).getTime()}throw new Error("isSameOrAfter: Invalid unit!")}isSame(t,e="days"){switch(e){case"day":case"days":return new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime()===new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime();case"month":case"months":return new Date(this.getFullYear(),this.getMonth(),1).getTime()===new Date(t.getFullYear(),t.getMonth(),1).getTime()}throw new Error("isSame: Invalid unit!")}add(t,e="days"){switch(e){case"day":case"days":this.setDate(this.getDate()+t);break;case"month":case"months":this.setMonth(this.getMonth()+t)}return this}subtract(t,e="days"){switch(e){case"day":case"days":this.setDate(this.getDate()-t);break;case"month":case"months":this.setMonth(this.getMonth()-t)}return this}diff(t,e="days"){switch(e){default:case"day":case"days":return Math.round((this.midnight_ts()-this.midnight_ts(t))/864e5);case"month":case"months":let e=12*(t.getFullYear()-this.getFullYear());return e-=t.getMonth(),e+=this.getMonth(),e}}format(t,e="en-US"){let n="";const i=[];let o=null;for(;null!=(o=r.regex.exec(t));)"\\"!==o[1]&&i.push(o);if(i.length){i[0].index>0&&(n+=t.substring(0,i[0].index));for(const[r,o]of Object.entries(i)){const a=Number(r);n+=this.formatTokens(o[0],e),i[a+1]&&(n+=t.substring(o.index+o[0].length,i[a+1].index)),a===i.length-1&&(n+=t.substring(o.index+o[0].length))}}return n.replace(/\\/g,"")}midnight_ts(t){return t?new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0).getTime():new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0,0).getTime()}formatTokens(t,e){switch(t){case"YY":return String(this.getFullYear()).slice(-2);case"YYYY":return String(this.getFullYear());case"M":return String(this.getMonth()+1);case"MM":return`0${this.getMonth()+1}`.slice(-2);case"MMM":return r.shortMonths(e)[this.getMonth()];case"MMMM":return r.longMonths(e)[this.getMonth()];case"D":return String(this.getDate());case"DD":return`0${this.getDate()}`.slice(-2);case"H":return String(this.getHours());case"HH":return`0${this.getHours()}`.slice(-2);case"h":return String(this.getHours()%12||12);case"hh":return`0${this.getHours()%12||12}`.slice(-2);case"m":return String(this.getMinutes());case"mm":return`0${this.getMinutes()}`.slice(-2);case"s":return String(this.getSeconds());case"ss":return`0${this.getSeconds()}`.slice(-2);case"a":return this.getHours()<12||24===this.getHours()?"am":"pm";case"A":return this.getHours()<12||24===this.getHours()?"AM":"PM";default:return""}}}class i{picker;constructor(t){this.picker=t}render(t,e){t||(t=new r),t.setDate(1),t.setHours(0,0,0,0),"function"==typeof this[`get${e}View`]&&this[`get${e}View`](t)}getContainerView(t){this.picker.ui.container.innerHTML="",this.picker.options.header&&this.picker.trigger("render",{date:t.clone(),view:"Header"}),this.picker.trigger("render",{date:t.clone(),view:"Main"}),this.picker.options.autoApply||this.picker.trigger("render",{date:t.clone(),view:"Footer"})}getHeaderView(t){const e=document.createElement("header");this.picker.options.header instanceof HTMLElement&&e.appendChild(this.picker.options.header),"string"==typeof this.picker.options.header&&(e.innerHTML=this.picker.options.header),this.picker.ui.container.appendChild(e),this.picker.trigger("view",{target:e,date:t.clone(),view:"Header"})}getMainView(t){const e=document.createElement("main");this.picker.ui.container.appendChild(e);const n=document.createElement("div");n.className=`calendars grid-${this.picker.options.grid}`;for(let e=0;e<this.picker.options.calendars;e++){const r=document.createElement("div");r.className="calendar",n.appendChild(r);const i=this.getCalendarHeaderView(t.clone());r.appendChild(i),this.picker.trigger("view",{date:t.clone(),view:"CalendarHeader",index:e,target:i});const o=this.getCalendarDayNamesView();r.appendChild(o),this.picker.trigger("view",{date:t.clone(),view:"CalendarDayNames",index:e,target:o});const a=this.getCalendarDaysView(t.clone());r.appendChild(a),this.picker.trigger("view",{date:t.clone(),view:"CalendarDays",index:e,target:a});const s=this.getCalendarFooterView(this.picker.options.lang,t.clone());r.appendChild(s),this.picker.trigger("view",{date:t.clone(),view:"CalendarFooter",index:e,target:s}),this.picker.trigger("view",{date:t.clone(),view:"CalendarItem",index:e,target:r}),t.add(1,"month")}e.appendChild(n),this.picker.trigger("view",{date:t.clone(),view:"Calendars",target:n}),this.picker.trigger("view",{date:t.clone(),view:"Main",target:e})}getFooterView(t){const e=document.createElement("footer"),n=document.createElement("div");n.className="footer-buttons";const r=document.createElement("button");r.className="cancel-button unit",r.innerHTML=this.picker.options.locale.cancel,n.appendChild(r);const i=document.createElement("button");i.className="apply-button unit",i.innerHTML=this.picker.options.locale.apply,i.disabled=!0,n.appendChild(i),e.appendChild(n),this.picker.ui.container.appendChild(e),this.picker.trigger("view",{date:t,target:e,view:"Footer"})}getCalendarHeaderView(t){const e=document.createElement("div");e.className="header";const n=document.createElement("div");n.className="month-name",n.innerHTML=`<span>${t.toLocaleString(this.picker.options.lang,{month:"long"})}</span> ${t.format("YYYY")}`,e.appendChild(n);const r=document.createElement("button");r.className="previous-button unit",r.innerHTML=this.picker.options.locale.previousMonth,e.appendChild(r);const i=document.createElement("button");return i.className="next-button unit",i.innerHTML=this.picker.options.locale.nextMonth,e.appendChild(i),e}getCalendarDayNamesView(){const t=document.createElement("div");t.className="daynames-row";for(let e=1;e<=7;e++){const n=3+this.picker.options.firstDay+e,r=document.createElement("div");r.className="dayname",r.innerHTML=new Date(1970,0,n,12,0,0,0).toLocaleString(this.picker.options.lang,{weekday:"short"}),r.title=new Date(1970,0,n,12,0,0,0).toLocaleString(this.picker.options.lang,{weekday:"long"}),t.appendChild(r),this.picker.trigger("view",{dayIdx:n,view:"CalendarDayName",target:r})}return t}getCalendarDaysView(t){const e=document.createElement("div");e.className="days-grid";const n=this.calcOffsetDays(t,this.picker.options.firstDay),r=32-new Date(t.getFullYear(),t.getMonth(),32).getDate();for(let t=0;t<n;t++){const t=document.createElement("div");t.className="offset",e.appendChild(t)}for(let n=1;n<=r;n++){t.setDate(n);const r=this.getCalendarDayView(t);e.appendChild(r),this.picker.trigger("view",{date:t,view:"CalendarDay",target:r})}return e}getCalendarDayView(t){const e=this.picker.options.date?new r(this.picker.options.date):null,n=new r,i=document.createElement("div");return i.className="day unit",i.innerHTML=t.format("D"),i.dataset.time=String(t.getTime()),t.isSame(n,"day")&&i.classList.add("today"),[0,6].includes(t.getDay())&&i.classList.add("weekend"),this.picker.datePicked.length?this.picker.datePicked[0].isSame(t,"day")&&i.classList.add("selected"):e&&t.isSame(e,"day")&&i.classList.add("selected"),this.picker.trigger("view",{date:t,view:"CalendarDay",target:i}),i}getCalendarFooterView(t,e){const n=document.createElement("div");return n.className="footer",n}calcOffsetDays(t,e){let n=t.getDay()-e;return n<0&&(n+=7),n}}class o{picker;instances={};constructor(t){this.picker=t}initialize(){const t=[];this.picker.options.plugins.forEach((e=>{"function"==typeof e?t.push(new e):"string"==typeof e&&"undefined"!=typeof easepick&&Object.prototype.hasOwnProperty.call(easepick,e)?t.push(new easepick[e]):console.warn(`easepick: ${e} not found.`)})),t.sort(((t,e)=>t.priority>e.priority?-1:t.priority<e.priority||t.dependencies.length>e.dependencies.length?1:t.dependencies.length<e.dependencies.length?-1:0)),t.forEach((t=>{t.attach(this.picker),this.instances[t.getName()]=t}))}getInstance(t){return this.instances[t]}addInstance(t){if(Object.prototype.hasOwnProperty.call(this.instances,t))console.warn(`easepick: ${t} already added.`);else{if("undefined"!=typeof easepick&&Object.prototype.hasOwnProperty.call(easepick,t)){const e=new easepick[t];return e.attach(this.picker),this.instances[e.getName()]=e,e}if("undefined"!==this.getPluginFn(t)){const e=new(this.getPluginFn(t));return e.attach(this.picker),this.instances[e.getName()]=e,e}console.warn(`easepick: ${t} not found.`)}return null}removeInstance(t){return t in this.instances&&this.instances[t].detach(),delete this.instances[t]}reloadInstance(t){return this.removeInstance(t),this.addInstance(t)}getPluginFn(t){return[...this.picker.options.plugins].filter((e=>"function"==typeof e&&(new e).getName()===t)).shift()}}class a{Calendar=new i(this);PluginManager=new o(this);calendars=[];datePicked=[];cssLoaded=0;binds={hidePicker:this.hidePicker.bind(this),show:this.show.bind(this)};options={doc:document,css:[],element:null,firstDay:1,grid:1,calendars:1,lang:"en-US",date:null,format:"YYYY-MM-DD",readonly:!0,autoApply:!0,header:!1,inline:!1,scrollToDate:!0,locale:{nextMonth:'<svg width="11" height="16" xmlns="http://www.w3.org/2000/svg"><path d="M2.748 16L0 13.333 5.333 8 0 2.667 2.748 0l7.919 8z" fill-rule="nonzero"/></svg>',previousMonth:'<svg width="11" height="16" xmlns="http://www.w3.org/2000/svg"><path d="M7.919 0l2.748 2.667L5.333 8l5.334 5.333L7.919 16 0 8z" fill-rule="nonzero"/></svg>',cancel:"Cancel",apply:"Apply"},documentClick:this.binds.hidePicker,plugins:[]};ui={container:null,shadowRoot:null,wrapper:null};version="1.2.1";constructor(t){const e={...this.options.locale,...t.locale};this.options={...this.options,...t},this.options.locale=e,this.handleOptions(),this.ui.wrapper=document.createElement("span"),this.ui.wrapper.style.display="none",this.ui.wrapper.style.position="absolute",this.ui.wrapper.style.pointerEvents="none",this.ui.wrapper.className="easepick-wrapper",this.ui.wrapper.attachShadow({mode:"open"}),this.ui.shadowRoot=this.ui.wrapper.shadowRoot,this.ui.container=document.createElement("div"),this.ui.container.className="container",this.options.zIndex&&(this.ui.container.style.zIndex=String(this.options.zIndex)),this.options.inline&&(this.ui.wrapper.style.position="relative",this.ui.container.classList.add("inline")),this.ui.shadowRoot.appendChild(this.ui.container),this.options.element.after(this.ui.wrapper),this.handleCSS(),this.options.element.addEventListener("click",this.binds.show),this.on("view",this.onView.bind(this)),this.on("render",this.onRender.bind(this)),this.PluginManager.initialize(),this.parseValues(),"function"==typeof this.options.setup&&this.options.setup(this),this.on("click",this.onClick.bind(this));const n=this.options.scrollToDate?this.getDate():null;this.renderAll(n)}on(t,e,n={}){this.ui.container.addEventListener(t,e,n)}off(t,e,n={}){this.ui.container.removeEventListener(t,e,n)}trigger(t,e={}){return this.ui.container.dispatchEvent(new CustomEvent(t,{detail:e}))}destroy(){this.options.element.removeEventListener("click",this.binds.show),"function"==typeof this.options.documentClick&&document.removeEventListener("click",this.options.documentClick,!0),Object.keys(this.PluginManager.instances).forEach((t=>{this.PluginManager.removeInstance(t)})),this.ui.wrapper.remove()}onRender(t){const{view:e,date:n}=t.detail;this.Calendar.render(n,e)}onView(t){const{view:e,target:n}=t.detail;"Footer"===e&&this.datePicked.length&&(n.querySelector(".apply-button").disabled=!1)}onClickHeaderButton(t){this.isCalendarHeaderButton(t)&&(t.classList.contains("next-button")?this.calendars[0].add(1,"month"):this.calendars[0].subtract(1,"month"),this.renderAll(this.calendars[0]))}onClickCalendarDay(t){if(this.isCalendarDay(t)){const e=new r(t.dataset.time);this.options.autoApply?(this.setDate(e),this.trigger("select",{date:this.getDate()}),this.hide()):(this.datePicked[0]=e,this.trigger("preselect",{date:this.getDate()}),this.renderAll())}}onClickApplyButton(t){if(this.isApplyButton(t)){if(this.datePicked[0]instanceof Date){const t=this.datePicked[0].clone();this.setDate(t)}this.hide(),this.trigger("select",{date:this.getDate()})}}onClickCancelButton(t){this.isCancelButton(t)&&this.hide()}onClick(t){const e=t.target;if(e instanceof HTMLElement){const t=e.closest(".unit");if(!(t instanceof HTMLElement))return;this.onClickHeaderButton(t),this.onClickCalendarDay(t),this.onClickApplyButton(t),this.onClickCancelButton(t)}}isShown(){return this.ui.container.classList.contains("inline")||this.ui.container.classList.contains("show")}show(t){if(this.isShown())return;const e=t&&"target"in t?t.target:this.options.element,{top:n,left:r}=this.adjustPosition(e);this.ui.container.style.top=`${n}px`,this.ui.container.style.left=`${r}px`,this.ui.container.classList.add("show"),this.trigger("show",{target:e})}hide(){this.ui.container.classList.remove("show"),this.datePicked.length=0,this.renderAll(),this.trigger("hide")}setDate(t){const e=new r(t,this.options.format);this.options.date=e.clone(),this.updateValues(),this.calendars.length&&this.renderAll()}getDate(){return this.options.date instanceof r?this.options.date.clone():null}parseValues(){this.options.date?this.setDate(this.options.date):this.options.element instanceof HTMLInputElement&&this.options.element.value.length&&this.setDate(this.options.element.value),this.options.date instanceof Date||(this.options.date=null)}updateValues(){const t=this.getDate(),e=t instanceof Date?t.format(this.options.format,this.options.lang):"",n=this.options.element;n instanceof HTMLInputElement?n.value=e:n instanceof HTMLElement&&(n.innerText=e)}hidePicker(t){let e=t.target,n=null;e.shadowRoot&&(e=t.composedPath()[0],n=e.getRootNode().host),this.isShown()&&n!==this.ui.wrapper&&e!==this.options.element&&this.hide()}renderAll(t){this.trigger("render",{view:"Container",date:(t||this.calendars[0]).clone()})}isCalendarHeaderButton(t){return["previous-button","next-button"].some((e=>t.classList.contains(e)))}isCalendarDay(t){return t.classList.contains("day")}isApplyButton(t){return t.classList.contains("apply-button")}isCancelButton(t){return t.classList.contains("cancel-button")}gotoDate(t){const e=new r(t,this.options.format);e.setDate(1),this.calendars[0]=e.clone(),this.renderAll()}clear(){this.options.date=null,this.datePicked.length=0,this.updateValues(),this.renderAll(),this.trigger("clear")}handleOptions(){this.options.element instanceof HTMLElement||(this.options.element=this.options.doc.querySelector(this.options.element)),"function"==typeof this.options.documentClick&&document.addEventListener("click",this.options.documentClick,!0),this.options.element instanceof HTMLInputElement&&(this.options.element.readOnly=this.options.readonly),this.options.date?this.calendars[0]=new r(this.options.date,this.options.format):this.calendars[0]=new r}handleCSS(){if(Array.isArray(this.options.css))this.options.css.forEach((t=>{const e=document.createElement("link");e.href=t,e.rel="stylesheet";const n=()=>{this.cssLoaded++,this.cssLoaded===this.options.css.length&&(this.ui.wrapper.style.display="")};e.addEventListener("load",n),e.addEventListener("error",n),this.ui.shadowRoot.append(e)}));else if("string"==typeof this.options.css){const t=document.createElement("style"),e=document.createTextNode(this.options.css);t.appendChild(e),this.ui.shadowRoot.append(t),this.ui.wrapper.style.display=""}else"function"==typeof this.options.css&&(this.options.css.call(this,this),this.ui.wrapper.style.display="")}adjustPosition(t){const e=t.getBoundingClientRect(),n=this.ui.wrapper.getBoundingClientRect();this.ui.container.classList.add("calc");const r=this.ui.container.getBoundingClientRect();this.ui.container.classList.remove("calc");let i=e.bottom-n.bottom,o=e.left-n.left;return"undefined"!=typeof window&&(window.innerHeight<i+r.height&&i-r.height>=0&&(i=e.top-n.top-r.height),window.innerWidth<o+r.width&&e.right-r.width>=0&&(o=e.right-n.right-r.width)),{left:o,top:i}}}var s=Object.freeze({__proto__:null,Core:a,create:a});class u{picker;options;priority=0;dependencies=[];attach(t){const e=this.getName(),n={...this.options};this.options={...this.options,...t.options[e]||{}};for(const r of Object.keys(n))if(null!==n[r]&&"object"==typeof n[r]&&Object.keys(n[r]).length&&e in t.options&&r in t.options[e]){const i={...t.options[e][r]};null!==i&&"object"==typeof i&&Object.keys(i).length&&Object.keys(i).every((t=>Object.keys(n[r]).includes(t)))&&(this.options[r]={...n[r],...i})}if(this.picker=t,this.dependenciesNotFound()){const t=this.dependencies.filter((t=>!this.pluginsAsStringArray().includes(t)));return void console.warn(`${this.getName()}: required dependencies (${t.join(", ")}).`)}const r=this.camelCaseToKebab(this.getName());this.picker.ui.container.classList.add(r),this.onAttach()}detach(){const t=this.camelCaseToKebab(this.getName());this.picker.ui.container.classList.remove(t),"function"==typeof this.onDetach&&this.onDetach()}dependenciesNotFound(){return this.dependencies.length&&!this.dependencies.every((t=>this.pluginsAsStringArray().includes(t)))}pluginsAsStringArray(){return this.picker.options.plugins.map((t=>"function"==typeof t?(new t).getName():t))}camelCaseToKebab(t){return t.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()}}class l extends u{priority=1;binds={onView:this.onView.bind(this)};options={minDate:null,maxDate:null,minDays:null,maxDays:null,selectForward:null,selectBackward:null,presets:!0,inseparable:!1,filter:null};getName(){return"LockPlugin"}onAttach(){if(this.options.minDate&&(this.options.minDate=new r(this.options.minDate,this.picker.options.format,this.picker.options.lang)),this.options.maxDate&&(this.options.maxDate=new r(this.options.maxDate,this.picker.options.format,this.picker.options.lang),this.options.maxDate instanceof r&&this.picker.options.calendars>1&&this.picker.calendars[0].isSame(this.options.maxDate,"month"))){const t=this.picker.calendars[0].clone().subtract(1,"month");this.picker.gotoDate(t)}if((this.options.minDays||this.options.maxDays||this.options.selectForward||this.options.selectBackward)&&!this.picker.options.plugins.includes("RangePlugin")){const t=["minDays","maxDays","selectForward","selectBackward"];console.warn(`${this.getName()}: options ${t.join(", ")} required RangePlugin.`)}this.picker.on("view",this.binds.onView)}onDetach(){this.picker.off("view",this.binds.onView)}onView(t){const{view:e,target:n,date:i}=t.detail;if("CalendarHeader"===e&&(this.options.minDate instanceof r&&i.isSameOrBefore(this.options.minDate,"month")&&n.classList.add("no-previous-month"),this.options.maxDate instanceof r&&i.isSameOrAfter(this.options.maxDate,"month")&&n.classList.add("no-next-month")),"CalendarDay"===e){const t=this.picker.datePicked.length?this.picker.datePicked[0]:null;if(this.testFilter(i))return void n.classList.add("locked");if(this.options.inseparable){if(this.options.minDays){const t=i.clone().subtract(this.options.minDays-1,"day"),e=i.clone().add(this.options.minDays-1,"day");let r=!1,o=!1;for(;t.isBefore(i,"day");){if(this.testFilter(t)){r=!0;break}t.add(1,"day")}for(;e.isAfter(i,"day");){if(this.testFilter(e)){o=!0;break}e.subtract(1,"day")}r&&o&&n.classList.add("not-available")}this.rangeIsNotAvailable(i,t)&&n.classList.add("not-available")}this.dateIsNotAvailable(i,t)&&n.classList.add("not-available")}if(this.options.presets&&"PresetPluginButton"===e){const t=new r(Number(n.dataset.start)),e=new r(Number(n.dataset.end)),i=e.diff(t,"day"),o=this.options.minDays&&i<this.options.minDays,a=this.options.maxDays&&i>this.options.maxDays;(o||a||this.lockMinDate(t)||this.lockMaxDate(t)||this.lockMinDate(e)||this.lockMaxDate(e)||this.rangeIsNotAvailable(t,e))&&n.setAttribute("disabled","disabled")}}dateIsNotAvailable(t,e){return this.lockMinDate(t)||this.lockMaxDate(t)||this.lockMinDays(t,e)||this.lockMaxDays(t,e)||this.lockSelectForward(t)||this.lockSelectBackward(t)}rangeIsNotAvailable(t,e){if(!t||!e)return!1;const n=(t.isSameOrBefore(e,"day")?t:e).clone(),r=(e.isSameOrAfter(t,"day")?e:t).clone();for(;n.isSameOrBefore(r,"day");){if(this.testFilter(n))return!0;n.add(1,"day")}return!1}lockMinDate(t){return this.options.minDate instanceof r&&t.isBefore(this.options.minDate,"day")}lockMaxDate(t){return this.options.maxDate instanceof r&&t.isAfter(this.options.maxDate,"day")}lockMinDays(t,e){if(this.options.minDays&&e){const n=e.clone().subtract(this.options.minDays-1,"day"),r=e.clone().add(this.options.minDays-1,"day");return t.isBetween(n,r)}return!1}lockMaxDays(t,e){if(this.options.maxDays&&e){const n=e.clone().subtract(this.options.maxDays,"day"),r=e.clone().add(this.options.maxDays,"day");return!t.isBetween(n,r)}return!1}lockSelectForward(t){if(1===this.picker.datePicked.length&&this.options.selectForward){const e=this.picker.datePicked[0].clone();return t.isBefore(e,"day")}return!1}lockSelectBackward(t){if(1===this.picker.datePicked.length&&this.options.selectBackward){const e=this.picker.datePicked[0].clone();return t.isAfter(e,"day")}return!1}testFilter(t){return"function"==typeof this.options.filter&&this.options.filter(t,this.picker.datePicked)}}class c extends u{tooltipElement;triggerElement;binds={setStartDate:this.setStartDate.bind(this),setEndDate:this.setEndDate.bind(this),setDateRange:this.setDateRange.bind(this),getStartDate:this.getStartDate.bind(this),getEndDate:this.getEndDate.bind(this),onView:this.onView.bind(this),onShow:this.onShow.bind(this),onMouseEnter:this.onMouseEnter.bind(this),onMouseLeave:this.onMouseLeave.bind(this),onClickCalendarDay:this.onClickCalendarDay.bind(this),onClickApplyButton:this.onClickApplyButton.bind(this),parseValues:this.parseValues.bind(this),updateValues:this.updateValues.bind(this),clear:this.clear.bind(this)};options={elementEnd:null,startDate:null,endDate:null,repick:!1,strict:!0,delimiter:" - ",tooltip:!0,tooltipNumber:t=>t,locale:{zero:"",one:"day",two:"",few:"",many:"",other:"days"},documentClick:this.hidePicker.bind(this)};getName(){return"RangePlugin"}onAttach(){this.binds._setStartDate=this.picker.setStartDate,this.binds._setEndDate=this.picker.setEndDate,this.binds._setDateRange=this.picker.setDateRange,this.binds._getStartDate=this.picker.getStartDate,this.binds._getEndDate=this.picker.getEndDate,this.binds._parseValues=this.picker.parseValues,this.binds._updateValues=this.picker.updateValues,this.binds._clear=this.picker.clear,this.binds._onClickCalendarDay=this.picker.onClickCalendarDay,this.binds._onClickApplyButton=this.picker.onClickApplyButton,Object.defineProperties(this.picker,{setStartDate:{configurable:!0,value:this.binds.setStartDate},setEndDate:{configurable:!0,value:this.binds.setEndDate},setDateRange:{configurable:!0,value:this.binds.setDateRange},getStartDate:{configurable:!0,value:this.binds.getStartDate},getEndDate:{configurable:!0,value:this.binds.getEndDate},parseValues:{configurable:!0,value:this.binds.parseValues},updateValues:{configurable:!0,value:this.binds.updateValues},clear:{configurable:!0,value:this.binds.clear},onClickCalendarDay:{configurable:!0,value:this.binds.onClickCalendarDay},onClickApplyButton:{configurable:!0,value:this.binds.onClickApplyButton}}),this.options.elementEnd&&(this.options.elementEnd instanceof HTMLElement||(this.options.elementEnd=this.picker.options.doc.querySelector(this.options.elementEnd)),this.options.elementEnd instanceof HTMLInputElement&&(this.options.elementEnd.readOnly=this.picker.options.readonly),"function"==typeof this.picker.options.documentClick&&(document.removeEventListener("click",this.picker.options.documentClick,!0),"function"==typeof this.options.documentClick&&document.addEventListener("click",this.options.documentClick,!0)),this.options.elementEnd.addEventListener("click",this.picker.show.bind(this.picker))),this.options.repick=this.options.repick&&this.options.elementEnd instanceof HTMLElement,this.picker.options.date=null,this.picker.on("view",this.binds.onView),this.picker.on("show",this.binds.onShow),this.picker.on("mouseenter",this.binds.onMouseEnter,!0),this.picker.on("mouseleave",this.binds.onMouseLeave,!0),this.checkIntlPluralLocales()}onDetach(){Object.defineProperties(this.picker,{setStartDate:{configurable:!0,value:this.binds._setStartDate},setEndDate:{configurable:!0,value:this.binds._setEndDate},setDateRange:{configurable:!0,value:this.binds._setDateRange},getStartDate:{configurable:!0,value:this.binds._getStartDate},getEndDate:{configurable:!0,value:this.binds._getEndDate},parseValues:{configurable:!0,value:this.binds._parseValues},updateValues:{configurable:!0,value:this.binds._updateValues},clear:{configurable:!0,value:this.binds._clear},onClickCalendarDay:{configurable:!0,value:this.binds._onClickCalendarDay},onClickApplyButton:{configurable:!0,value:this.binds._onClickApplyButton}}),this.picker.off("view",this.binds.onView),this.picker.off("show",this.binds.onShow),this.picker.off("mouseenter",this.binds.onMouseEnter,!0),this.picker.off("mouseleave",this.binds.onMouseLeave,!0)}parseValues(){if(this.options.startDate||this.options.endDate)this.options.strict?this.options.startDate&&this.options.endDate?this.setDateRange(this.options.startDate,this.options.endDate):(this.options.startDate=null,this.options.endDate=null):(this.options.startDate&&this.setStartDate(this.options.startDate),this.options.endDate&&this.setEndDate(this.options.endDate));else if(this.options.elementEnd)this.options.strict?this.picker.options.element instanceof HTMLInputElement&&this.picker.options.element.value.length&&this.options.elementEnd instanceof HTMLInputElement&&this.options.elementEnd.value.length&&this.setDateRange(this.picker.options.element.value,this.options.elementEnd.value):(this.picker.options.element instanceof HTMLInputElement&&this.picker.options.element.value.length&&this.setStartDate(this.picker.options.element.value),this.options.elementEnd instanceof HTMLInputElement&&this.options.elementEnd.value.length&&this.setEndDate(this.options.elementEnd.value));else if(this.picker.options.element instanceof HTMLInputElement&&this.picker.options.element.value.length){const[t,e]=this.picker.options.element.value.split(this.options.delimiter);this.options.strict?t&&e&&this.setDateRange(t,e):(t&&this.setStartDate(t),e&&this.setEndDate(e))}}updateValues(){const t=this.picker.options.element,e=this.options.elementEnd,n=this.picker.getStartDate(),r=this.picker.getEndDate(),i=n instanceof Date?n.format(this.picker.options.format,this.picker.options.lang):"",o=r instanceof Date?r.format(this.picker.options.format,this.picker.options.lang):"";if(e)t instanceof HTMLInputElement?t.value=i:t instanceof HTMLElement&&(t.innerText=i),e instanceof HTMLInputElement?e.value=o:e instanceof HTMLElement&&(e.innerText=o);else{const e=`${i}${i||o?this.options.delimiter:""}${o}`;t instanceof HTMLInputElement?t.value=e:t instanceof HTMLElement&&(t.innerText=e)}}clear(){this.options.startDate=null,this.options.endDate=null,this.picker.datePicked.length=0,this.updateValues(),this.picker.renderAll(),this.picker.trigger("clear")}onShow(t){const{target:e}=t.detail;this.triggerElement=e,this.picker.options.scrollToDate&&this.getStartDate()instanceof Date&&this.picker.gotoDate(this.getStartDate()),this.initializeRepick()}onView(t){const{view:e,target:n}=t.detail;if("Main"===e&&(this.tooltipElement=document.createElement("span"),this.tooltipElement.className="range-plugin-tooltip",n.appendChild(this.tooltipElement)),"CalendarDay"===e){const t=new r(n.dataset.time),e=this.picker.datePicked,i=e.length?this.picker.datePicked[0]:this.getStartDate(),o=e.length?this.picker.datePicked[1]:this.getEndDate();i&&i.isSame(t,"day")&&n.classList.add("start"),i&&o&&(o.isSame(t,"day")&&n.classList.add("end"),t.isBetween(i,o)&&n.classList.add("in-range"))}if("Footer"===e){const t=1===this.picker.datePicked.length&&!this.options.strict||2===this.picker.datePicked.length;n.querySelector(".apply-button").disabled=!t}}hidePicker(t){let e=t.target,n=null;e.shadowRoot&&(e=t.composedPath()[0],n=e.getRootNode().host),this.picker.isShown()&&n!==this.picker.ui.wrapper&&e!==this.picker.options.element&&e!==this.options.elementEnd&&this.picker.hide()}setStartDate(t){const e=new r(t,this.picker.options.format);this.options.startDate=e?e.clone():null,this.updateValues(),this.picker.renderAll()}setEndDate(t){const e=new r(t,this.picker.options.format);this.options.endDate=e?e.clone():null,this.updateValues(),this.picker.renderAll()}setDateRange(t,e){const n=new r(t,this.picker.options.format),i=new r(e,this.picker.options.format);this.options.startDate=n?n.clone():null,this.options.endDate=i?i.clone():null,this.updateValues(),this.picker.renderAll()}getStartDate(){return this.options.startDate instanceof Date?this.options.startDate.clone():null}getEndDate(){return this.options.endDate instanceof Date?this.options.endDate.clone():null}onMouseEnter(t){const e=t.target;if(e instanceof HTMLElement){this.isContainer(e)&&this.initializeRepick();const t=e.closest(".unit");if(!(t instanceof HTMLElement))return;if(this.picker.isCalendarDay(t)){if(1!==this.picker.datePicked.length)return;let e=this.picker.datePicked[0].clone(),n=new r(t.dataset.time),i=!1;if(e.isAfter(n,"day")){const t=e.clone();e=n.clone(),n=t.clone(),i=!0}if([...this.picker.ui.container.querySelectorAll(".day")].forEach((o=>{const a=new r(o.dataset.time),s=this.picker.Calendar.getCalendarDayView(a);a.isBetween(e,n)&&s.classList.add("in-range"),a.isSame(this.picker.datePicked[0],"day")&&(s.classList.add("start"),s.classList.toggle("flipped",i)),o===t&&(s.classList.add("end"),s.classList.toggle("flipped",i)),o.className=s.className})),this.options.tooltip){const r=this.options.tooltipNumber(n.diff(e,"day")+1);if(r>0){const e=new Intl.PluralRules(this.picker.options.lang).select(r),n=`${r} ${this.options.locale[e]}`;this.showTooltip(t,n)}else this.hideTooltip()}}}}onMouseLeave(t){if(this.isContainer(t.target)&&this.options.repick){const t=this.getStartDate(),e=this.getEndDate();t&&e&&(this.picker.datePicked.length=0,this.picker.renderAll())}}onClickCalendarDay(t){if(this.picker.isCalendarDay(t)){2===this.picker.datePicked.length&&(this.picker.datePicked.length=0);const e=new r(t.dataset.time);if(this.picker.datePicked[this.picker.datePicked.length]=e,2===this.picker.datePicked.length&&this.picker.datePicked[0].isAfter(this.picker.datePicked[1])){const t=this.picker.datePicked[1].clone();this.picker.datePicked[1]=this.picker.datePicked[0].clone(),this.picker.datePicked[0]=t.clone()}1!==this.picker.datePicked.length&&this.picker.options.autoApply||this.picker.trigger("preselect",{start:this.picker.datePicked[0]instanceof Date?this.picker.datePicked[0].clone():null,end:this.picker.datePicked[1]instanceof Date?this.picker.datePicked[1].clone():null}),1===this.picker.datePicked.length&&(!this.options.strict&&this.picker.options.autoApply&&(this.picker.options.element===this.triggerElement&&this.setStartDate(this.picker.datePicked[0]),this.options.elementEnd===this.triggerElement&&this.setEndDate(this.picker.datePicked[0]),this.picker.trigger("select",{start:this.picker.getStartDate(),end:this.picker.getEndDate()})),this.picker.renderAll()),2===this.picker.datePicked.length&&(this.picker.options.autoApply?(this.setDateRange(this.picker.datePicked[0],this.picker.datePicked[1]),this.picker.trigger("select",{start:this.picker.getStartDate(),end:this.picker.getEndDate()}),this.picker.hide()):(this.hideTooltip(),this.picker.renderAll()))}}onClickApplyButton(t){this.picker.isApplyButton(t)&&(1!==this.picker.datePicked.length||this.options.strict||(this.picker.options.element===this.triggerElement&&(this.options.endDate=null,this.setStartDate(this.picker.datePicked[0])),this.options.elementEnd===this.triggerElement&&(this.options.startDate=null,this.setEndDate(this.picker.datePicked[0]))),2===this.picker.datePicked.length&&this.setDateRange(this.picker.datePicked[0],this.picker.datePicked[1]),this.picker.trigger("select",{start:this.picker.getStartDate(),end:this.picker.getEndDate()}),this.picker.hide())}showTooltip(t,e){this.tooltipElement.style.visibility="visible",this.tooltipElement.innerHTML=e;const n=this.picker.ui.container.getBoundingClientRect(),r=this.tooltipElement.getBoundingClientRect(),i=t.getBoundingClientRect();let o=i.top,a=i.left;o-=n.top,a-=n.left,o-=r.height,a-=r.width/2,a+=i.width/2,this.tooltipElement.style.top=`${o}px`,this.tooltipElement.style.left=`${a}px`}hideTooltip(){this.tooltipElement.style.visibility="hidden"}checkIntlPluralLocales(){if(!this.options.tooltip)return;const t=[...new Set([new Intl.PluralRules(this.picker.options.lang).select(0),new Intl.PluralRules(this.picker.options.lang).select(1),new Intl.PluralRules(this.picker.options.lang).select(2),new Intl.PluralRules(this.picker.options.lang).select(6),new Intl.PluralRules(this.picker.options.lang).select(18)])],e=Object.keys(this.options.locale);t.every((t=>e.includes(t)))||console.warn(`${this.getName()}: provide locales (${t.join(", ")}) for correct tooltip text.`)}initializeRepick(){if(!this.options.repick)return;const t=this.getStartDate(),e=this.getEndDate();e&&this.triggerElement===this.picker.options.element&&(this.picker.datePicked[0]=e),t&&this.triggerElement===this.options.elementEnd&&(this.picker.datePicked[0]=t)}isContainer(t){return t===this.picker.ui.container}}},25755:function(t,e,n){"use strict";var r=n(79664),i=n(48285),o="/*|*/",a=o+"}";function s(t){t&&u.current.insert(t+"}")}var u={current:null},l=function(t,e,n,r,i,l,c,f,h,d){switch(t){case 1:switch(e.charCodeAt(0)){case 64:return u.current.insert(e+";"),"";case 108:if(98===e.charCodeAt(2))return""}break;case 2:if(0===f)return e+o;break;case 3:switch(f){case 102:case 112:return u.current.insert(n[0]+e),"";default:return e+(0===d?o:"")}case-2:e.split(a).forEach(s)}};e.Z=function(t){void 0===t&&(t={});var e,n=t.key||"css";void 0!==t.prefix&&(e={prefix:t.prefix});var o,a=new i.Z(e),s={};o=t.container||document.head;var c,f=document.querySelectorAll("style[data-emotion-"+n+"]");Array.prototype.forEach.call(f,(function(t){t.getAttribute("data-emotion-"+n).split(" ").forEach((function(t){s[t]=!0})),t.parentNode!==o&&o.appendChild(t)})),a.use(t.stylisPlugins)(l),c=function(t,e,n,r){var i=e.name;u.current=n,a(t,e.styles),r&&(h.inserted[i]=!0)};var h={key:n,sheet:new r.m({key:n,container:o,nonce:t.nonce,speedy:t.speedy}),nonce:t.nonce,inserted:s,registered:{},insert:c};return h}},34412:function(t,e,n){"use strict";n.d(e,{nq:function(){return f},ms:function(){return _},tZ:function(){return y},F4:function(){return b}});n(94578);var r=n(67294),i=n(25755);function o(t,e,n){var r="";return n.split(" ").forEach((function(n){void 0!==t[n]?e.push(t[n]):r+=n+" "})),r}var a=function(t,e,n){var r=t.key+"-"+e.name;if(!1===n&&void 0===t.registered[r]&&(t.registered[r]=e.styles),void 0===t.inserted[e.name]){var i=e;do{t.insert("."+r,i,t.sheet,!0),i=i.next}while(void 0!==i)}},s=n(74449),u=Object.prototype.hasOwnProperty,l=(0,r.createContext)("undefined"!=typeof HTMLElement?(0,i.Z)():null),c=(0,r.createContext)({}),f=l.Provider,h=function(t){var e=function(e,n){return(0,r.createElement)(l.Consumer,null,(function(r){return t(e,r,n)}))};return(0,r.forwardRef)(e)},d="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",p=function(){return null},m=function(t,e,n,i){var l=null===n?e.css:e.css(n);"string"==typeof l&&void 0!==t.registered[l]&&(l=t.registered[l]);var c=e[d],f=[l],h="";"string"==typeof e.className?h=o(t.registered,f,e.className):null!=e.className&&(h=e.className+" ");var m=(0,s.O)(f);a(t,m,"string"==typeof c),h+=t.key+"-"+m.name;var g={};for(var v in e)u.call(e,v)&&"css"!==v&&v!==d&&(g[v]=e[v]);g.ref=i,g.className=h;var y=(0,r.createElement)(c,g),b=(0,r.createElement)(p,null);return(0,r.createElement)(r.Fragment,null,b,y)},g=h((function(t,e,n){return"function"==typeof t.css?(0,r.createElement)(c.Consumer,null,(function(r){return m(e,t,r,n)})):m(e,t,null,n)})),v=(n(79664),n(93998)),y=function(t,e){var n=arguments;if(null==e||!u.call(e,"css"))return r.createElement.apply(void 0,n);var i=n.length,o=new Array(i);o[0]=g,o[1]=function(t,e){var n={};for(var r in e)u.call(e,r)&&(n[r]=e[r]);return n[d]=t,n}(t,e);for(var a=2;a<i;a++)o[a]=n[a];return r.createElement.apply(null,o)},b=(r.Component,function(){var t=v.Z.apply(void 0,arguments),e="animation-"+t.name;return{name:e,styles:"@keyframes "+e+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}),x=function t(e){for(var n=e.length,r=0,i="";r<n;r++){var o=e[r];if(null!=o){var a=void 0;switch(typeof o){case"boolean":break;case"object":if(Array.isArray(o))a=t(o);else for(var s in a="",o)o[s]&&s&&(a&&(a+=" "),a+=s);break;default:a=o}a&&(i&&(i+=" "),i+=a)}}return i},w=function(){return null},_=h((function(t,e){return(0,r.createElement)(c.Consumer,null,(function(n){var i=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=(0,s.O)(n,e.registered);return a(e,i,!1),e.key+"-"+i.name},u={css:i,cx:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(t,e,n){var r=[],i=o(t,r,n);return r.length<2?n:i+e(r)}(e.registered,i,x(n))},theme:n},l=t.children(u),c=(0,r.createElement)(w,null);return(0,r.createElement)(r.Fragment,null,c,l)}))}))},93998:function(t,e,n){"use strict";var r=n(74449);e.Z=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return(0,r.O)(e)}},74449:function(t,e,n){"use strict";n.d(e,{O:function(){return m}});var r,i=function(t){for(var e,n=0,r=0,i=t.length;i>=4;++r,i-=4)e=1540483477*(65535&(e=255&t.charCodeAt(r)|(255&t.charCodeAt(++r))<<8|(255&t.charCodeAt(++r))<<16|(255&t.charCodeAt(++r))<<24))+(59797*(e>>>16)<<16),n=1540483477*(65535&(e^=e>>>24))+(59797*(e>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&t.charCodeAt(r+2))<<16;case 2:n^=(255&t.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&t.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},o=n(40351),a=/[A-Z]|^ms/g,s=/_EMO_([^_]+?)_([^]*?)_EMO_/g,u=function(t){return 45===t.charCodeAt(1)},l=function(t){return null!=t&&"boolean"!=typeof t},c=(r={},function(t){return void 0===r[t]&&(r[t]=u(e=t)?e:e.replace(a,"-$&").toLowerCase()),r[t];var e}),f=function(t,e){switch(t){case"animation":case"animationName":if("string"==typeof e)return e.replace(s,(function(t,e,n){return d={name:e,styles:n,next:d},e}))}return 1===o.Z[t]||u(t)||"number"!=typeof e||0===e?e:e+"px"};function h(t,e,n,r){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return d={name:n.name,styles:n.styles,next:d},n.name;if(void 0!==n.styles){var i=n.next;if(void 0!==i)for(;void 0!==i;)d={name:i.name,styles:i.styles,next:d},i=i.next;return n.styles+";"}return function(t,e,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=h(t,e,n[i],!1);else for(var o in n){var a=n[o];if("object"!=typeof a)null!=e&&void 0!==e[a]?r+=o+"{"+e[a]+"}":l(a)&&(r+=c(o)+":"+f(o,a)+";");else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=e&&void 0!==e[a[0]]){var s=h(t,e,a,!1);switch(o){case"animation":case"animationName":r+=c(o)+":"+s+";";break;default:r+=o+"{"+s+"}"}}else for(var u=0;u<a.length;u++)l(a[u])&&(r+=c(o)+":"+f(o,a[u])+";")}return r}(t,e,n);case"function":if(void 0!==t){var o=d,a=n(t);return d=o,h(t,e,a,r)}}if(null==e)return n;var s=e[n];return void 0===s||r?n:s}var d,p=/label:\s*([^\s;\n{]+)\s*;/g,m=function(t,e,n){if(1===t.length&&"object"==typeof t[0]&&null!==t[0]&&void 0!==t[0].styles)return t[0];var r=!0,o="";d=void 0;var a=t[0];null==a||void 0===a.raw?(r=!1,o+=h(n,e,a,!1)):o+=a[0];for(var s=1;s<t.length;s++)o+=h(n,e,t[s],46===o.charCodeAt(o.length-1)),r&&(o+=a[s]);p.lastIndex=0;for(var u,l="";null!==(u=p.exec(o));)l+="-"+u[1];return{name:i(o)+l,styles:o,next:d}}},79664:function(t,e,n){"use strict";n.d(e,{m:function(){return r}});var r=function(){function t(t){this.isSpeedy=void 0===t.speedy||t.speedy,this.tags=[],this.ctr=0,this.nonce=t.nonce,this.key=t.key,this.container=t.container,this.before=null}var e=t.prototype;return e.insert=function(t){if(this.ctr%(this.isSpeedy?65e3:1)==0){var e,n=function(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),void 0!==t.nonce&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e}(this);e=0===this.tags.length?this.before:this.tags[this.tags.length-1].nextSibling,this.container.insertBefore(n,e),this.tags.push(n)}var r=this.tags[this.tags.length-1];if(this.isSpeedy){var i=function(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}(r);try{var o=105===t.charCodeAt(1)&&64===t.charCodeAt(0);i.insertRule(t,o?0:i.cssRules.length)}catch(t){}}else r.appendChild(document.createTextNode(t));this.ctr++},e.flush=function(){this.tags.forEach((function(t){return t.parentNode.removeChild(t)})),this.tags=[],this.ctr=0},t}()},5752:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i,o=n(70655),a=n(31313),s=n(79730),u=n(14594),l=((r={})["no-app"]="No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()",r["bad-app-name"]="Illegal App name: '{$appName}",r["duplicate-app"]="Firebase App named '{$appName}' already exists",r["app-deleted"]="Firebase App named '{$appName}' already deleted",r["invalid-app-argument"]="firebase.{$appName}() takes either no argument or a Firebase App instance.",r["invalid-log-argument"]="First argument to `onLog` must be null or a function.",r),c=new a.ErrorFactory("app","Firebase",l),f="@firebase/app",h="[DEFAULT]",d=((i={})[f]="fire-core",i["@firebase/analytics"]="fire-analytics",i["@firebase/auth"]="fire-auth",i["@firebase/database"]="fire-rtdb",i["@firebase/functions"]="fire-fn",i["@firebase/installations"]="fire-iid",i["@firebase/messaging"]="fire-fcm",i["@firebase/performance"]="fire-perf",i["@firebase/remote-config"]="fire-rc",i["@firebase/storage"]="fire-gcs",i["@firebase/firestore"]="fire-fst",i["fire-js"]="fire-js",i["firebase-wrapper"]="fire-js-all",i),p=new u.Logger("@firebase/app"),m=function(){function t(t,e,n){var r,i,u=this;this.firebase_=n,this.isDeleted_=!1,this.name_=e.name,this.automaticDataCollectionEnabled_=e.automaticDataCollectionEnabled||!1,this.options_=a.deepCopy(t),this.container=new s.ComponentContainer(e.name),this._addComponent(new s.Component("app",(function(){return u}),"PUBLIC"));try{for(var l=o.__values(this.firebase_.INTERNAL.components.values()),c=l.next();!c.done;c=l.next()){var f=c.value;this._addComponent(f)}}catch(t){r={error:t}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}}return Object.defineProperty(t.prototype,"automaticDataCollectionEnabled",{get:function(){return this.checkDestroyed_(),this.automaticDataCollectionEnabled_},set:function(t){this.checkDestroyed_(),this.automaticDataCollectionEnabled_=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.checkDestroyed_(),this.name_},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"options",{get:function(){return this.checkDestroyed_(),this.options_},enumerable:!0,configurable:!0}),t.prototype.delete=function(){var t=this;return new Promise((function(e){t.checkDestroyed_(),e()})).then((function(){return t.firebase_.INTERNAL.removeApp(t.name_),Promise.all(t.container.getProviders().map((function(t){return t.delete()})))})).then((function(){t.isDeleted_=!0}))},t.prototype._getService=function(t,e){return void 0===e&&(e=h),this.checkDestroyed_(),this.container.getProvider(t).getImmediate({identifier:e})},t.prototype._removeServiceInstance=function(t,e){void 0===e&&(e=h),this.container.getProvider(t).clearInstance(e)},t.prototype._addComponent=function(t){try{this.container.addComponent(t)}catch(e){p.debug("Component "+t.name+" failed to register with FirebaseApp "+this.name,e)}},t.prototype._addOrOverwriteComponent=function(t){this.container.addOrOverwriteComponent(t)},t.prototype.checkDestroyed_=function(){if(this.isDeleted_)throw c.create("app-deleted",{appName:this.name_})},t}();m.prototype.name&&m.prototype.options||m.prototype.delete||console.log("dc");var g=function t(){var e=function(t){var e={},n=new Map,r={__esModule:!0,initializeApp:function(n,i){void 0===i&&(i={}),"object"==typeof i&&null!==i||(i={name:i});var o=i;void 0===o.name&&(o.name=h);var s=o.name;if("string"!=typeof s||!s)throw c.create("bad-app-name",{appName:String(s)});if(a.contains(e,s))throw c.create("duplicate-app",{appName:s});var u=new t(n,o,r);return e[s]=u,u},app:i,registerVersion:function(t,e,n){var r,i=null!==(r=d[t])&&void 0!==r?r:t;n&&(i+="-"+n);var o=i.match(/\s|\//),a=e.match(/\s|\//);if(o||a){var u=['Unable to register library "'+i+'" with version "'+e+'":'];return o&&u.push('library name "'+i+'" contains illegal characters (whitespace or "/")'),o&&a&&u.push("and"),a&&u.push('version name "'+e+'" contains illegal characters (whitespace or "/")'),void p.warn(u.join(" "))}l(new s.Component(i+"-version",(function(){return{library:i,version:e}}),"VERSION"))},setLogLevel:u.setLogLevel,onLog:function(t,e){if(null!==t&&"function"!=typeof t)throw c.create("invalid-log-argument",{appName:name});u.setUserLogHandler(t,e)},apps:null,SDK_VERSION:"7.13.2",INTERNAL:{registerComponent:l,removeApp:function(t){delete e[t]},components:n,useAsService:function(t,e){return"serverAuth"===e?null:e}}};function i(t){if(t=t||h,!a.contains(e,t))throw c.create("no-app",{appName:t});return e[t]}function l(s){var u,l,f=s.name;if(n.has(f))return p.debug("There were multiple attempts to register component "+f+"."),"PUBLIC"===s.type?r[f]:null;if(n.set(f,s),"PUBLIC"===s.type){var h=function(t){if(void 0===t&&(t=i()),"function"!=typeof t[f])throw c.create("invalid-app-argument",{appName:f});return t[f]()};void 0!==s.serviceProps&&a.deepExtend(h,s.serviceProps),r[f]=h,t.prototype[f]=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._getService.bind(this,f).apply(this,s.multipleInstances?t:[])}}try{for(var d=o.__values(Object.keys(e)),m=d.next();!m.done;m=d.next()){var g=m.value;e[g]._addComponent(s)}}catch(t){u={error:t}}finally{try{m&&!m.done&&(l=d.return)&&l.call(d)}finally{if(u)throw u.error}}return"PUBLIC"===s.type?r[f]:null}return r.default=r,Object.defineProperty(r,"apps",{get:function(){return Object.keys(e).map((function(t){return e[t]}))}}),i.App=t,r}(m);return e.INTERNAL=o.__assign(o.__assign({},e.INTERNAL),{createFirebaseNamespace:t,extendNamespace:function(t){a.deepExtend(e,t)},createSubscribe:a.createSubscribe,ErrorFactory:a.ErrorFactory,deepExtend:a.deepExtend}),e}(),v=function(){function t(t){this.container=t}return t.prototype.getPlatformInfoString=function(){return this.container.getProviders().map((function(t){if(function(t){var e=t.getComponent();return"VERSION"===(null==e?void 0:e.type)}(t)){var e=t.getImmediate();return e.library+"/"+e.version}return null})).filter((function(t){return t})).join(" ")},t}();if(a.isBrowser()&&void 0!==self.firebase){p.warn("\n Warning: Firebase is already defined in the global scope. Please make sure\n Firebase library is only loaded once.\n ");var y=self.firebase.SDK_VERSION;y&&y.indexOf("LITE")>=0&&p.warn("\n Warning: You are trying to load Firebase while using Firebase Performance standalone script.\n You should load Firebase Performance with this instance of Firebase to avoid loading duplicate code.\n ")}var b=g.initializeApp;g.initializeApp=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return a.isNode()&&p.warn('\n Warning: This is a browser-targeted Firebase bundle but it appears it is being\n run in a Node environment. If running in a Node environment, make sure you\n are using the bundle specified by the "main" field in package.json.\n \n If you are using Webpack, you can specify "main" as the first item in\n "resolve.mainFields":\n https://webpack.js.org/configuration/resolve/#resolvemainfields\n \n If using Rollup, use the rollup-plugin-node-resolve plugin and specify "main"\n as the first item in "mainFields", e.g. [\'main\', \'module\'].\n https://github.com/rollup/rollup-plugin-node-resolve\n '),b.apply(void 0,t)};var x=g;!function(t,e){t.INTERNAL.registerComponent(new s.Component("platform-logger",(function(t){return new v(t)}),"PRIVATE")),t.registerVersion(f,"0.6.1",void 0),t.registerVersion("fire-js","")}(x),e.default=x,e.firebase=x},79730:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(70655),i=n(31313),o=function(){function t(t,e,n){this.name=t,this.instanceFactory=e,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY"}return t.prototype.setInstantiationMode=function(t){return this.instantiationMode=t,this},t.prototype.setMultipleInstances=function(t){return this.multipleInstances=t,this},t.prototype.setServiceProps=function(t){return this.serviceProps=t,this},t}(),a="[DEFAULT]",s=function(){function t(t,e){this.name=t,this.container=e,this.component=null,this.instances=new Map,this.instancesDeferred=new Map}return t.prototype.get=function(t){void 0===t&&(t=a);var e=this.normalizeInstanceIdentifier(t);if(!this.instancesDeferred.has(e)){var n=new i.Deferred;this.instancesDeferred.set(e,n);try{var r=this.getOrInitializeService(e);r&&n.resolve(r)}catch(t){}}return this.instancesDeferred.get(e).promise},t.prototype.getImmediate=function(t){var e=r.__assign({identifier:a,optional:!1},t),n=e.identifier,i=e.optional,o=this.normalizeInstanceIdentifier(n);try{var s=this.getOrInitializeService(o);if(!s){if(i)return null;throw Error("Service "+this.name+" is not available")}return s}catch(t){if(i)return null;throw t}},t.prototype.getComponent=function(){return this.component},t.prototype.setComponent=function(t){var e,n;if(t.name!==this.name)throw Error("Mismatching Component "+t.name+" for Provider "+this.name+".");if(this.component)throw Error("Component for "+this.name+" has already been provided");if(this.component=t,function(t){return"EAGER"===t.instantiationMode}(t))try{this.getOrInitializeService(a)}catch(t){}try{for(var i=r.__values(this.instancesDeferred.entries()),o=i.next();!o.done;o=i.next()){var s=r.__read(o.value,2),u=s[0],l=s[1],c=this.normalizeInstanceIdentifier(u);try{var f=this.getOrInitializeService(c);l.resolve(f)}catch(t){}}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}},t.prototype.clearInstance=function(t){void 0===t&&(t=a),this.instancesDeferred.delete(t),this.instances.delete(t)},t.prototype.delete=function(){return r.__awaiter(this,void 0,void 0,(function(){var t;return r.__generator(this,(function(e){switch(e.label){case 0:return t=Array.from(this.instances.values()),[4,Promise.all(t.filter((function(t){return"INTERNAL"in t})).map((function(t){return t.INTERNAL.delete()})))];case 1:return e.sent(),[2]}}))}))},t.prototype.isComponentSet=function(){return null!=this.component},t.prototype.getOrInitializeService=function(t){var e=this.instances.get(t);return!e&&this.component&&(e=this.component.instanceFactory(this.container,function(t){return t===a?void 0:t}(t)),this.instances.set(t,e)),e||null},t.prototype.normalizeInstanceIdentifier=function(t){return this.component?this.component.multipleInstances?t:a:t},t}(),u=function(){function t(t){this.name=t,this.providers=new Map}return t.prototype.addComponent=function(t){var e=this.getProvider(t.name);if(e.isComponentSet())throw new Error("Component "+t.name+" has already been registered with "+this.name);e.setComponent(t)},t.prototype.addOrOverwriteComponent=function(t){this.getProvider(t.name).isComponentSet()&&this.providers.delete(t.name),this.addComponent(t)},t.prototype.getProvider=function(t){if(this.providers.has(t))return this.providers.get(t);var e=new s(t,this);return this.providers.set(t,e),e},t.prototype.getProviders=function(){return Array.from(this.providers.values())},t}();e.Component=o,e.ComponentContainer=u,e.Provider=s},78005:function(t,e){!function(t){"use strict";function e(t){return new Promise((function(e,n){t.onsuccess=function(){e(t.result)},t.onerror=function(){n(t.error)}}))}function n(t,n,r){var i,o=new Promise((function(o,a){e(i=t[n].apply(t,r)).then(o,a)}));return o.request=i,o}function r(t,e,n){n.forEach((function(n){Object.defineProperty(t.prototype,n,{get:function(){return this[e][n]},set:function(t){this[e][n]=t}})}))}function i(t,e,r,i){i.forEach((function(i){i in r.prototype&&(t.prototype[i]=function(){return n(this[e],i,arguments)})}))}function o(t,e,n,r){r.forEach((function(r){r in n.prototype&&(t.prototype[r]=function(){return this[e][r].apply(this[e],arguments)})}))}function a(t,e,r,i){i.forEach((function(i){i in r.prototype&&(t.prototype[i]=function(){return t=this[e],(r=n(t,i,arguments)).then((function(t){if(t)return new u(t,r.request)}));var t,r})}))}function s(t){this._index=t}function u(t,e){this._cursor=t,this._request=e}function l(t){this._store=t}function c(t){this._tx=t,this.complete=new Promise((function(e,n){t.oncomplete=function(){e()},t.onerror=function(){n(t.error)},t.onabort=function(){n(t.error)}}))}function f(t,e,n){this._db=t,this.oldVersion=e,this.transaction=new c(n)}function h(t){this._db=t}r(s,"_index",["name","keyPath","multiEntry","unique"]),i(s,"_index",IDBIndex,["get","getKey","getAll","getAllKeys","count"]),a(s,"_index",IDBIndex,["openCursor","openKeyCursor"]),r(u,"_cursor",["direction","key","primaryKey","value"]),i(u,"_cursor",IDBCursor,["update","delete"]),["advance","continue","continuePrimaryKey"].forEach((function(t){t in IDBCursor.prototype&&(u.prototype[t]=function(){var n=this,r=arguments;return Promise.resolve().then((function(){return n._cursor[t].apply(n._cursor,r),e(n._request).then((function(t){if(t)return new u(t,n._request)}))}))})})),l.prototype.createIndex=function(){return new s(this._store.createIndex.apply(this._store,arguments))},l.prototype.index=function(){return new s(this._store.index.apply(this._store,arguments))},r(l,"_store",["name","keyPath","indexNames","autoIncrement"]),i(l,"_store",IDBObjectStore,["put","add","delete","clear","get","getAll","getKey","getAllKeys","count"]),a(l,"_store",IDBObjectStore,["openCursor","openKeyCursor"]),o(l,"_store",IDBObjectStore,["deleteIndex"]),c.prototype.objectStore=function(){return new l(this._tx.objectStore.apply(this._tx,arguments))},r(c,"_tx",["objectStoreNames","mode"]),o(c,"_tx",IDBTransaction,["abort"]),f.prototype.createObjectStore=function(){return new l(this._db.createObjectStore.apply(this._db,arguments))},r(f,"_db",["name","version","objectStoreNames"]),o(f,"_db",IDBDatabase,["deleteObjectStore","close"]),h.prototype.transaction=function(){return new c(this._db.transaction.apply(this._db,arguments))},r(h,"_db",["name","version","objectStoreNames"]),o(h,"_db",IDBDatabase,["close"]),["openCursor","openKeyCursor"].forEach((function(t){[l,s].forEach((function(e){t in e.prototype&&(e.prototype[t.replace("open","iterate")]=function(){var e,n=(e=arguments,Array.prototype.slice.call(e)),r=n[n.length-1],i=this._store||this._index,o=i[t].apply(i,n.slice(0,-1));o.onsuccess=function(){r(o.result)}})}))})),[s,l].forEach((function(t){t.prototype.getAll||(t.prototype.getAll=function(t,e){var n=this,r=[];return new Promise((function(i){n.iterateCursor(t,(function(t){t?(r.push(t.value),void 0===e||r.length!=e?t.continue():i(r)):i(r)}))}))})})),t.openDb=function(t,e,r){var i=n(indexedDB,"open",[t,e]),o=i.request;return o&&(o.onupgradeneeded=function(t){r&&r(new f(o.result,t.oldVersion,o.transaction))}),i.then((function(t){return new h(t)}))},t.deleteDb=function(t){return n(indexedDB,"deleteDatabase",[t])},Object.defineProperty(t,"__esModule",{value:!0})}(e)},14594:function(t,e,n){"use strict";function r(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}var i;n.r(e),n.d(e,{LogLevel:function(){return o},Logger:function(){return f},setLogLevel:function(){return h},setUserLogHandler:function(){return d}});var o,a=[];!function(t){t[t.DEBUG=0]="DEBUG",t[t.VERBOSE=1]="VERBOSE",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.SILENT=5]="SILENT"}(o||(o={}));var s={debug:o.DEBUG,verbose:o.VERBOSE,info:o.INFO,warn:o.WARN,error:o.ERROR,silent:o.SILENT},u=o.INFO,l=((i={})[o.DEBUG]="log",i[o.VERBOSE]="log",i[o.INFO]="info",i[o.WARN]="warn",i[o.ERROR]="error",i),c=function(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];if(!(e<t.logLevel)){var o=(new Date).toISOString(),a=l[e];if(!a)throw new Error("Attempted to log a message with an invalid logType (value: "+e+")");console[a].apply(console,r(["["+o+"] "+t.name+":"],n))}},f=function(){function t(t){this.name=t,this._logLevel=u,this._logHandler=c,this._userLogHandler=null,a.push(this)}return Object.defineProperty(t.prototype,"logLevel",{get:function(){return this._logLevel},set:function(t){if(!(t in o))throw new TypeError("Invalid value assigned to `logLevel`");this._logLevel=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"logHandler",{get:function(){return this._logHandler},set:function(t){if("function"!=typeof t)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"userLogHandler",{get:function(){return this._userLogHandler},set:function(t){this._userLogHandler=t},enumerable:!0,configurable:!0}),t.prototype.debug=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._userLogHandler&&this._userLogHandler.apply(this,r([this,o.DEBUG],t)),this._logHandler.apply(this,r([this,o.DEBUG],t))},t.prototype.log=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._userLogHandler&&this._userLogHandler.apply(this,r([this,o.VERBOSE],t)),this._logHandler.apply(this,r([this,o.VERBOSE],t))},t.prototype.info=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._userLogHandler&&this._userLogHandler.apply(this,r([this,o.INFO],t)),this._logHandler.apply(this,r([this,o.INFO],t))},t.prototype.warn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._userLogHandler&&this._userLogHandler.apply(this,r([this,o.WARN],t)),this._logHandler.apply(this,r([this,o.WARN],t))},t.prototype.error=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._userLogHandler&&this._userLogHandler.apply(this,r([this,o.ERROR],t)),this._logHandler.apply(this,r([this,o.ERROR],t))},t}();function h(t){var e="string"==typeof t?s[t]:t;a.forEach((function(t){t.logLevel=e}))}function d(t,e){for(var n=function(n){var r=null;e&&e.level&&(r=s[e.level]),n.userLogHandler=null===t?null:function(e,n){for(var i=[],a=2;a<arguments.length;a++)i[a-2]=arguments[a];var s=i.map((function(t){if(null==t)return null;if("string"==typeof t)return t;if("number"==typeof t||"boolean"==typeof t)return t.toString();if(t instanceof Error)return t.message;try{return JSON.stringify(t)}catch(t){return null}})).filter((function(t){return t})).join(" ");n>=(null!=r?r:e.logLevel)&&t({level:o[n].toLowerCase(),message:s,args:i,type:e.name})}},r=0,i=a;r<i.length;r++)n(i[r])}},15086:function(t,e){!function(t){"use strict";function e(t){return new Promise((function(e,n){t.onsuccess=function(){e(t.result)},t.onerror=function(){n(t.error)}}))}function n(t,n,r){var i,o=new Promise((function(o,a){e(i=t[n].apply(t,r)).then(o,a)}));return o.request=i,o}function r(t,e,n){n.forEach((function(n){Object.defineProperty(t.prototype,n,{get:function(){return this[e][n]},set:function(t){this[e][n]=t}})}))}function i(t,e,r,i){i.forEach((function(i){i in r.prototype&&(t.prototype[i]=function(){return n(this[e],i,arguments)})}))}function o(t,e,n,r){r.forEach((function(r){r in n.prototype&&(t.prototype[r]=function(){return this[e][r].apply(this[e],arguments)})}))}function a(t,e,r,i){i.forEach((function(i){i in r.prototype&&(t.prototype[i]=function(){return t=this[e],(r=n(t,i,arguments)).then((function(t){if(t)return new u(t,r.request)}));var t,r})}))}function s(t){this._index=t}function u(t,e){this._cursor=t,this._request=e}function l(t){this._store=t}function c(t){this._tx=t,this.complete=new Promise((function(e,n){t.oncomplete=function(){e()},t.onerror=function(){n(t.error)},t.onabort=function(){n(t.error)}}))}function f(t,e,n){this._db=t,this.oldVersion=e,this.transaction=new c(n)}function h(t){this._db=t}r(s,"_index",["name","keyPath","multiEntry","unique"]),i(s,"_index",IDBIndex,["get","getKey","getAll","getAllKeys","count"]),a(s,"_index",IDBIndex,["openCursor","openKeyCursor"]),r(u,"_cursor",["direction","key","primaryKey","value"]),i(u,"_cursor",IDBCursor,["update","delete"]),["advance","continue","continuePrimaryKey"].forEach((function(t){t in IDBCursor.prototype&&(u.prototype[t]=function(){var n=this,r=arguments;return Promise.resolve().then((function(){return n._cursor[t].apply(n._cursor,r),e(n._request).then((function(t){if(t)return new u(t,n._request)}))}))})})),l.prototype.createIndex=function(){return new s(this._store.createIndex.apply(this._store,arguments))},l.prototype.index=function(){return new s(this._store.index.apply(this._store,arguments))},r(l,"_store",["name","keyPath","indexNames","autoIncrement"]),i(l,"_store",IDBObjectStore,["put","add","delete","clear","get","getAll","getKey","getAllKeys","count"]),a(l,"_store",IDBObjectStore,["openCursor","openKeyCursor"]),o(l,"_store",IDBObjectStore,["deleteIndex"]),c.prototype.objectStore=function(){return new l(this._tx.objectStore.apply(this._tx,arguments))},r(c,"_tx",["objectStoreNames","mode"]),o(c,"_tx",IDBTransaction,["abort"]),f.prototype.createObjectStore=function(){return new l(this._db.createObjectStore.apply(this._db,arguments))},r(f,"_db",["name","version","objectStoreNames"]),o(f,"_db",IDBDatabase,["deleteObjectStore","close"]),h.prototype.transaction=function(){return new c(this._db.transaction.apply(this._db,arguments))},r(h,"_db",["name","version","objectStoreNames"]),o(h,"_db",IDBDatabase,["close"]),["openCursor","openKeyCursor"].forEach((function(t){[l,s].forEach((function(e){t in e.prototype&&(e.prototype[t.replace("open","iterate")]=function(){var e,n=(e=arguments,Array.prototype.slice.call(e)),r=n[n.length-1],i=this._store||this._index,o=i[t].apply(i,n.slice(0,-1));o.onsuccess=function(){r(o.result)}})}))})),[s,l].forEach((function(t){t.prototype.getAll||(t.prototype.getAll=function(t,e){var n=this,r=[];return new Promise((function(i){n.iterateCursor(t,(function(t){t?(r.push(t.value),void 0===e||r.length!=e?t.continue():i(r)):i(r)}))}))})})),t.openDb=function(t,e,r){var i=n(indexedDB,"open",[t,e]),o=i.request;return o&&(o.onupgradeneeded=function(t){r&&r(new f(o.result,t.oldVersion,o.transaction))}),i.then((function(t){return new h(t)}))},t.deleteDb=function(t){return n(indexedDB,"deleteDatabase",[t])},Object.defineProperty(t,"__esModule",{value:!0})}(e)},31313:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(70655),i={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"},o=function(t,e){if(!t)throw a(e)},a=function(t){return new Error("Firebase Database ("+i.SDK_VERSION+") INTERNAL ASSERT FAILED: "+t)},s=function(t){for(var e=[],n=0,r=0;r<t.length;r++){var i=t.charCodeAt(r);i<128?e[n++]=i:i<2048?(e[n++]=i>>6|192,e[n++]=63&i|128):55296==(64512&i)&&r+1<t.length&&56320==(64512&t.charCodeAt(r+1))?(i=65536+((1023&i)<<10)+(1023&t.charCodeAt(++r)),e[n++]=i>>18|240,e[n++]=i>>12&63|128,e[n++]=i>>6&63|128,e[n++]=63&i|128):(e[n++]=i>>12|224,e[n++]=i>>6&63|128,e[n++]=63&i|128)}return e},u={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray:function(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();for(var n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[],i=0;i<t.length;i+=3){var o=t[i],a=i+1<t.length,s=a?t[i+1]:0,u=i+2<t.length,l=u?t[i+2]:0,c=o>>2,f=(3&o)<<4|s>>4,h=(15&s)<<2|l>>6,d=63&l;u||(d=64,a||(h=64)),r.push(n[c],n[f],n[h],n[d])}return r.join("")},encodeString:function(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(s(t),e)},decodeString:function(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):function(t){for(var e=[],n=0,r=0;n<t.length;){var i=t[n++];if(i<128)e[r++]=String.fromCharCode(i);else if(i>191&&i<224){var o=t[n++];e[r++]=String.fromCharCode((31&i)<<6|63&o)}else if(i>239&&i<365){var a=((7&i)<<18|(63&(o=t[n++]))<<12|(63&(s=t[n++]))<<6|63&t[n++])-65536;e[r++]=String.fromCharCode(55296+(a>>10)),e[r++]=String.fromCharCode(56320+(1023&a))}else{o=t[n++];var s=t[n++];e[r++]=String.fromCharCode((15&i)<<12|(63&o)<<6|63&s)}}return e.join("")}(this.decodeStringToByteArray(t,e))},decodeStringToByteArray:function(t,e){this.init_();for(var n=e?this.charToByteMapWebSafe_:this.charToByteMap_,r=[],i=0;i<t.length;){var o=n[t.charAt(i++)],a=i<t.length?n[t.charAt(i)]:0,s=++i<t.length?n[t.charAt(i)]:64,u=++i<t.length?n[t.charAt(i)]:64;if(++i,null==o||null==a||null==s||null==u)throw Error();var l=o<<2|a>>4;if(r.push(l),64!==s){var c=a<<4&240|s>>2;if(r.push(c),64!==u){var f=s<<6&192|u;r.push(f)}}}return r},init_:function(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(var t=0;t<this.ENCODED_VALS.length;t++)this.byteToCharMap_[t]=this.ENCODED_VALS.charAt(t),this.charToByteMap_[this.byteToCharMap_[t]]=t,this.byteToCharMapWebSafe_[t]=this.ENCODED_VALS_WEBSAFE.charAt(t),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[t]]=t,t>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}},l=function(t){try{return u.decodeString(t,!0)}catch(t){console.error("base64Decode failed: ",t)}return null};function c(t,e){if(!(e instanceof Object))return e;switch(e.constructor){case Date:return new Date(e.getTime());case Object:void 0===t&&(t={});break;case Array:t=[];break;default:return e}for(var n in e)e.hasOwnProperty(n)&&(t[n]=c(t[n],e[n]));return t}var f=function(){function t(){var t=this;this.reject=function(){},this.resolve=function(){},this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))}return t.prototype.wrapCallback=function(t){var e=this;return function(n,r){n?e.reject(n):e.resolve(r),"function"==typeof t&&(e.promise.catch((function(){})),1===t.length?t(n):t(n,r))}},t}();function h(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""}var d=function(t){function e(n,r){var i=t.call(this,r)||this;return i.code=n,i.name="FirebaseError",Object.setPrototypeOf(i,e.prototype),Error.captureStackTrace&&Error.captureStackTrace(i,p.prototype.create),i}return r.__extends(e,t),e}(Error),p=function(){function t(t,e,n){this.service=t,this.serviceName=e,this.errors=n}return t.prototype.create=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=e[0]||{},i=this.service+"/"+t,o=this.errors[t],a=o?function(t,e){return t.replace(m,(function(t,n){var r=e[n];return null!=r?r.toString():"<"+n+"?>"}))}(o,r):"Error",s=this.serviceName+": "+a+" ("+i+").",u=new d(i,s),l=0,c=Object.keys(r);l<c.length;l++){var f=c[l];"_"!==f.slice(-1)&&(f in u&&console.warn('Overwriting FirebaseError base field "'+f+'" can cause unexpected behavior.'),u[f]=r[f])}return u},t}(),m=/\{\$([^}]+)}/g;function g(t){return JSON.parse(t)}var v=function(t){var e={},n={},r={},i="";try{var o=t.split(".");e=g(l(o[0])||""),n=g(l(o[1])||""),i=o[2],r=n.d||{},delete n.d}catch(t){}return{header:e,claims:n,data:r,signature:i}},y=function(){function t(){this.chain_=[],this.buf_=[],this.W_=[],this.pad_=[],this.inbuf_=0,this.total_=0,this.blockSize=64,this.pad_[0]=128;for(var t=1;t<this.blockSize;++t)this.pad_[t]=0;this.reset()}return t.prototype.reset=function(){this.chain_[0]=1732584193,this.chain_[1]=4023233417,this.chain_[2]=2562383102,this.chain_[3]=271733878,this.chain_[4]=3285377520,this.inbuf_=0,this.total_=0},t.prototype.compress_=function(t,e){e||(e=0);var n=this.W_;if("string"==typeof t)for(var r=0;r<16;r++)n[r]=t.charCodeAt(e)<<24|t.charCodeAt(e+1)<<16|t.charCodeAt(e+2)<<8|t.charCodeAt(e+3),e+=4;else for(r=0;r<16;r++)n[r]=t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3],e+=4;for(r=16;r<80;r++){var i=n[r-3]^n[r-8]^n[r-14]^n[r-16];n[r]=4294967295&(i<<1|i>>>31)}var o,a,s=this.chain_[0],u=this.chain_[1],l=this.chain_[2],c=this.chain_[3],f=this.chain_[4];for(r=0;r<80;r++)r<40?r<20?(o=c^u&(l^c),a=1518500249):(o=u^l^c,a=1859775393):r<60?(o=u&l|c&(u|l),a=2400959708):(o=u^l^c,a=3395469782),i=(s<<5|s>>>27)+o+f+a+n[r]&4294967295,f=c,c=l,l=4294967295&(u<<30|u>>>2),u=s,s=i;this.chain_[0]=this.chain_[0]+s&4294967295,this.chain_[1]=this.chain_[1]+u&4294967295,this.chain_[2]=this.chain_[2]+l&4294967295,this.chain_[3]=this.chain_[3]+c&4294967295,this.chain_[4]=this.chain_[4]+f&4294967295},t.prototype.update=function(t,e){if(null!=t){void 0===e&&(e=t.length);for(var n=e-this.blockSize,r=0,i=this.buf_,o=this.inbuf_;r<e;){if(0===o)for(;r<=n;)this.compress_(t,r),r+=this.blockSize;if("string"==typeof t){for(;r<e;)if(i[o]=t.charCodeAt(r),++r,++o===this.blockSize){this.compress_(i),o=0;break}}else for(;r<e;)if(i[o]=t[r],++r,++o===this.blockSize){this.compress_(i),o=0;break}}this.inbuf_=o,this.total_+=e}},t.prototype.digest=function(){var t=[],e=8*this.total_;this.inbuf_<56?this.update(this.pad_,56-this.inbuf_):this.update(this.pad_,this.blockSize-(this.inbuf_-56));for(var n=this.blockSize-1;n>=56;n--)this.buf_[n]=255&e,e/=256;this.compress_(this.buf_);var r=0;for(n=0;n<5;n++)for(var i=24;i>=0;i-=8)t[r]=this.chain_[n]>>i&255,++r;return t},t}(),b=function(){function t(t,e){var n=this;this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=e,this.task.then((function(){t(n)})).catch((function(t){n.error(t)}))}return t.prototype.next=function(t){this.forEachObserver((function(e){e.next(t)}))},t.prototype.error=function(t){this.forEachObserver((function(e){e.error(t)})),this.close(t)},t.prototype.complete=function(){this.forEachObserver((function(t){t.complete()})),this.close()},t.prototype.subscribe=function(t,e,n){var r,i=this;if(void 0===t&&void 0===e&&void 0===n)throw new Error("Missing Observer.");void 0===(r=function(t,e){if("object"!=typeof t||null===t)return!1;for(var n=0,r=["next","error","complete"];n<r.length;n++){var i=r[n];if(i in t&&"function"==typeof t[i])return!0}return!1}(t)?t:{next:t,error:e,complete:n}).next&&(r.next=x),void 0===r.error&&(r.error=x),void 0===r.complete&&(r.complete=x);var o=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then((function(){try{i.finalError?r.error(i.finalError):r.complete()}catch(t){}})),this.observers.push(r),o},t.prototype.unsubscribeOne=function(t){void 0!==this.observers&&void 0!==this.observers[t]&&(delete this.observers[t],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))},t.prototype.forEachObserver=function(t){if(!this.finalized)for(var e=0;e<this.observers.length;e++)this.sendOne(e,t)},t.prototype.sendOne=function(t,e){var n=this;this.task.then((function(){if(void 0!==n.observers&&void 0!==n.observers[t])try{e(n.observers[t])}catch(t){"undefined"!=typeof console&&console.error&&console.error(t)}}))},t.prototype.close=function(t){var e=this;this.finalized||(this.finalized=!0,void 0!==t&&(this.finalError=t),this.task.then((function(){e.observers=void 0,e.onNoObservers=void 0})))},t}();function x(){}function w(t,e,n){var r="";switch(e){case 1:r=n?"first":"First";break;case 2:r=n?"second":"Second";break;case 3:r=n?"third":"Third";break;case 4:r=n?"fourth":"Fourth";break;default:throw new Error("errorPrefix called with argumentNumber > 4. Need to update it?")}return t+" failed: "+(r+" argument ")}e.CONSTANTS=i,e.Deferred=f,e.ErrorFactory=p,e.FirebaseError=d,e.Sha1=y,e.assert=o,e.assertionError=a,e.async=function(t,e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];Promise.resolve(!0).then((function(){t.apply(void 0,n)})).catch((function(t){e&&e(t)}))}},e.base64=u,e.base64Decode=l,e.base64Encode=function(t){var e=s(t);return u.encodeByteArray(e,!0)},e.contains=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.createSubscribe=function(t,e){var n=new b(t,e);return n.subscribe.bind(n)},e.decode=v,e.deepCopy=function(t){return c(void 0,t)},e.deepExtend=c,e.errorPrefix=w,e.getUA=h,e.isAdmin=function(t){var e=v(t).claims;return"object"==typeof e&&!0===e.admin},e.isBrowser=function(){return"object"==typeof self&&self.self===self},e.isBrowserExtension=function(){var t="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0;return"object"==typeof t&&void 0!==t.id},e.isElectron=function(){return h().indexOf("Electron/")>=0},e.isEmpty=function(t){for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0},e.isIE=function(){var t=h();return t.indexOf("MSIE ")>=0||t.indexOf("Trident/")>=0},e.isMobileCordova=function(){return"undefined"!=typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(h())},e.isNode=function(){try{return"[object process]"===Object.prototype.toString.call(n.g.process)}catch(t){return!1}},e.isNodeSdk=function(){return!0===i.NODE_CLIENT||!0===i.NODE_ADMIN},e.isReactNative=function(){return"object"==typeof navigator&&"ReactNative"===navigator.product},e.isUWP=function(){return h().indexOf("MSAppHost/")>=0},e.isValidFormat=function(t){var e=v(t).claims;return!!e&&"object"==typeof e&&e.hasOwnProperty("iat")},e.isValidTimestamp=function(t){var e=v(t).claims,n=Math.floor((new Date).getTime()/1e3),r=0,i=0;return"object"==typeof e&&(e.hasOwnProperty("nbf")?r=e.nbf:e.hasOwnProperty("iat")&&(r=e.iat),i=e.hasOwnProperty("exp")?e.exp:r+86400),!!n&&!!r&&!!i&&n>=r&&n<=i},e.issuedAtTime=function(t){var e=v(t).claims;return"object"==typeof e&&e.hasOwnProperty("iat")?e.iat:null},e.jsonEval=g,e.map=function(t,e,n){var r={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=e.call(n,t[i],i,t));return r},e.querystring=function(t){for(var e=[],n=function(t,n){Array.isArray(n)?n.forEach((function(n){e.push(encodeURIComponent(t)+"="+encodeURIComponent(n))})):e.push(encodeURIComponent(t)+"="+encodeURIComponent(n))},r=0,i=Object.entries(t);r<i.length;r++){var o=i[r];n(o[0],o[1])}return e.length?"&"+e.join("&"):""},e.querystringDecode=function(t){var e={};return t.replace(/^\?/,"").split("&").forEach((function(t){if(t){var n=t.split("=");e[n[0]]=n[1]}})),e},e.safeGet=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0},e.stringLength=function(t){for(var e=0,n=0;n<t.length;n++){var r=t.charCodeAt(n);r<128?e++:r<2048?e+=2:r>=55296&&r<=56319?(e+=4,n++):e+=3}return e},e.stringToByteArray=function(t){for(var e=[],n=0,r=0;r<t.length;r++){var i=t.charCodeAt(r);if(i>=55296&&i<=56319){var a=i-55296;r++,o(r<t.length,"Surrogate pair missing trail surrogate."),i=65536+(a<<10)+(t.charCodeAt(r)-56320)}i<128?e[n++]=i:i<2048?(e[n++]=i>>6|192,e[n++]=63&i|128):i<65536?(e[n++]=i>>12|224,e[n++]=i>>6&63|128,e[n++]=63&i|128):(e[n++]=i>>18|240,e[n++]=i>>12&63|128,e[n++]=i>>6&63|128,e[n++]=63&i|128)}return e},e.stringify=function(t){return JSON.stringify(t)},e.validateArgCount=function(t,e,n,r){var i;if(r<e?i="at least "+e:r>n&&(i=0===n?"none":"no more than "+n),i)throw new Error(t+" failed: Was called with "+r+(1===r?" argument.":" arguments.")+" Expects "+i+".")},e.validateCallback=function(t,e,n,r){if((!r||n)&&"function"!=typeof n)throw new Error(w(t,e,r)+"must be a valid function.")},e.validateContextObject=function(t,e,n,r){if((!r||n)&&("object"!=typeof n||null===n))throw new Error(w(t,e,r)+"must be a valid context object.")},e.validateNamespace=function(t,e,n,r){if((!r||n)&&"string"!=typeof n)throw new Error(w(t,e,r)+"must be a valid firebase namespace.")}},21434:function(t,e,n){"use strict";n.d(e,{Z:function(){return d}});var r=n(67294),i=n(45697),o=n.n(i),a=n(37723),s=n(8317),u=n(99754),l="hv-alertbox",c=n(61233).ZP.div.withConfig({displayName:"styles",componentId:"RC__sc-1ad06i4-0"})(["font-family:var(--asset-font-opensans-name);display:flex;justify-content:center;.hv-alertbox-backdrop{width:100vw;height:100vh;content:'';background-color:#000;opacity:0.6;position:absolute;top:0;left:0;z-index:99999;transition:opacity 0.3s ease-in;}.hv-alertbox-inner{position:absolute;height:max-content;width:max-content;transition:transform 0.3s ease-in;padding:20px;background:#fff;z-index:99999;overflow:auto;&__header{}&__close-icon{float:right;cursor:pointer;}&__body{margin:30px 0;font-size:1rem;color:#616161;padding-top:1.25rem;letter-spacing:0.025rem;word-spacing:0.0625rem;}&__footer{display:flex;gap:10px;justify-content:center;}}&.","-enter{.hv-alertbox-inner{transform:translateY(-100%);}.hv-alertbox-backdrop{opacity:0;pointer-events:none;}}&.","-enter-active{.hv-alertbox-inner{transform:translateY(0);}.hv-alertbox-backdrop{opacity:0.75;pointer-events:all;}}&.","-exit{.hv-alertbox-inner{transform:translateY(0);}.hv-alertbox-backdrop{opacity:0.75;pointer-events:all;}}&.","-exit-active{.hv-alertbox-inner{transform:translateY(-100%);}.hv-alertbox-backdrop{opacity:0;pointer-events:none;}}"],l,l,l,l),f=function(t){return r.createElement("svg",t,r.createElement("path",{d:"M4.33 3.499l2.5-2.5a.586.586 0 1 0-.828-.828l-2.5 2.5-2.5-2.5a.586.586 0 1 0-.828.828l2.5 2.5-2.5 2.5a.586.586 0 0 0 .828.828l2.5-2.5 2.5 2.5a.586.586 0 0 0 .828-.828z",fill:"#30546f"}))};f.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"7",height:"6.998",viewBox:"0 0 7 6.998"};var h=function(t){var e=t.isShown,n=t.onCloseComplete,i=t.body,o=t.yesText,l=t.noText,h=t.okText,d=t.onYes,p=t.onNo,m=(t.size,t.shouldCloseOnOverlayClick),g=t.shouldCloseOnEscapePress,v=t.isOk,y=t.isYesDisabled,b=(0,r.useCallback)((function(t){n(t)}),[n]),x=(0,r.useCallback)((function(t){m&&b(t)}),[b,m]),w=(0,r.useCallback)((function(t,e){g&&"Escape"===t.key&&b(e)}),[b,g]),_=(0,r.useCallback)((function(){d(),b()}),[b,d]),S=(0,r.useCallback)((function(){p(),b()}),[b,p]);return(0,r.useEffect)((function(){return e&&document.body.addEventListener("keydown",w,!1),function(){document.body.removeEventListener("keydown",w,!1)}}),[w,e]),r.createElement(s.Z,null,r.createElement(a.Z,{in:e,timeout:300,classNames:"hv-alertbox",onExited:b,unmountOnExit:!0},r.createElement(c,{className:"hv-alertbox"},r.createElement("div",{className:"hv-alertbox-backdrop",onClick:x,onKeyDown:w,role:"button","aria-label":"Close sidebar",tabIndex:-1}),r.createElement("div",{className:"hv-alertbox-inner"},r.createElement("div",{className:"hv-alertbox-inner__header"},r.createElement("span",{className:"hv-alertbox-inner__close-icon",onClick:function(){x("close")},onKeyDown:function(t){w(t,"close")},role:"button","aria-label":"Close alertBox",tabIndex:0},r.createElement(f,{className:"hv-arrow",width:"1em",height:"1em"}))),r.createElement("p",{className:"hv-alertbox-inner__body"},i),r.createElement("div",{className:"hv-alertbox-inner__footer"},r.createElement(u.Z,{appearance:"primary",onClick:_,disabled:y},v?h:o),!v&&r.createElement(u.Z,{appearance:"secondary",onClick:S},l))))))};h.propTypes={isShown:o().bool.isRequired,onCloseComplete:o().func,yesText:o().string,noText:o().string,okText:o().string,onYes:o().func,onNo:o().func,isOk:o().bool,body:o().string.isRequired,size:o().string,shouldCloseOnOverlayClick:o().bool,shouldCloseOnEscapePress:o().bool,isYesDisabled:o().bool},h.defaultProps={onCloseComplete:function(){},yesText:"YES",noText:"NO",okText:"OK",onYes:function(){},onNo:function(){},isOk:!1,size:"small",shouldCloseOnOverlayClick:!0,shouldCloseOnEscapePress:!0,isYesDisabled:!1};var d=h},39844:function(t,e,n){"use strict";n.d(e,{Z:function(){return b}});var r=n(67294),i=n(73935),o=n(45697),a=n.n(o),s=n(37723),u=n(8317),l=n(61233),c="hv-sidebar",f=l.ZP.div.withConfig({displayName:"styles",componentId:"RC__sc-12i0x5f-0"})(["font-family:var(--asset-font-opensans-name);.sidebar-backdrop{width:100vw;height:100vh;content:'';background-color:#000;opacity:0.6;position:absolute;top:0;left:0;z-index:99999;transition:opacity 0.3s ease-in;overflow:hidden;}.sidebar-inner{position:absolute;right:0;top:0;transition:transform 0.3s ease-in;background-color:#fff;content:' ';z-index:99999;width:",";height:",";overflow:hidden;&__header{padding:19px 16px;border-bottom:1px solid #cbcbcb;position:sticky;top:0;width:",";background:white;}&__footer{padding:10px 16px;border-top:1px solid #cbcbcb;text-align:right;position:fixed;bottom:0;width:",";background:white;","}&__back-icon{cursor:pointer;margin-right:20px;vertical-align:middle;}&__title{text-transform:uppercase;font-weight:600;color:var(--color-font-base);padding:0;margin:0;font-size:14px;margin-top:6px;display:inline-block;}&__close-icon{float:right;cursor:pointer;}&__body{"," height:100%;overflow:scroll;&::-webkit-scrollbar{display:none;}}}&.","-enter{.sidebar-inner{transform:translateX(100%);}.sidebar-backdrop{opacity:0;pointer-events:none;}}&.","-enter-active{.sidebar-inner{transform:translateX(0);}.sidebar-backdrop{opacity:0.75;pointer-events:all;}}&.","-exit{.sidebar-inner{transform:translateX(0);}.sidebar-backdrop{opacity:0.75;pointer-events:all;}}&.","-exit-active{.sidebar-inner{transform:translateX(100%);}.sidebar-backdrop{opacity:0;pointer-events:none;}}"],(function(t){return t.sidebarWidth}),(function(t){return t.isLocalSidebar?"100%":"100vh"}),(function(t){return t.sidebarWidth}),(function(t){return t.sidebarWidth}),(function(t){return t.isLocalSidebar&&(0,l.iv)(["transform:translateY(-100%);"])}),(function(t){return t.isFooterPresent&&(0,l.iv)(["padding-bottom:20vh;"])}),c,c,c,c);function h(t){return function(t){if(Array.isArray(t))return m(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||p(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,l=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){l=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(t,e)||p(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(t,e){if(t){if("string"==typeof t)return m(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(t,e):void 0}}function m(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var g=function(t){return r.createElement("svg",t,r.createElement("path",{"'data-name'":"Icon ionic-ios-arrow-round-back",d:"M7.334.258a.919.919 0 0 1 .007 1.294L3.073 5.834h16.263a.914.914 0 0 1 0 1.828H3.073l4.275 4.286a.925.925 0 0 1-.007 1.294.91.91 0 0 1-1.287-.007L.26 7.395a1.026 1.026 0 0 1-.19-.288.872.872 0 0 1-.07-.352.916.916 0 0 1 .26-.64L6.054.279a.9.9 0 0 1 1.28-.021z",fill:"#5b6872"}))};g.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"20.243",height:"13.501",viewBox:"0 0 20.243 13.501"};var v=function(t){return r.createElement("svg",t,r.createElement("path",{d:"M4.33 3.499l2.5-2.5a.586.586 0 1 0-.828-.828l-2.5 2.5-2.5-2.5a.586.586 0 1 0-.828.828l2.5 2.5-2.5 2.5a.586.586 0 0 0 .828.828l2.5-2.5 2.5 2.5a.586.586 0 0 0 .828-.828z",fill:"#30546f"}))};v.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"7",height:"6.998",viewBox:"0 0 7 6.998"};var y=function(t){var e=t.children,n=t.isShown,o=t.onCloseComplete,a=t.title,l=t.footer,c=t.size,p=t.shouldCloseOnOverlayClick,m=t.shouldCloseOnEscapePress,y=t.localContainerId,b=d((0,r.useState)([]),2),x=b[0],w=b[1],_=d((0,r.useState)(!0),2),S=_[0],O=_[1],N=(0,r.useCallback)((function(t){var e=t.name,n=t.title,r=t.footer;w((function(t){var i=h(t);return i.push({name:e,title:n,footer:r}),i}))}),[]),M=(0,r.useCallback)((function(){w((function(t){var e=h(t);return e.pop(),e}))}),[]),E=(0,r.useCallback)((function(){o(),w([])}),[o]),k=(0,r.useCallback)((function(){p&&E()}),[E,p]),C=(0,r.useCallback)((function(t){m&&"Escape"===t.key&&E()}),[E,m]),T=(0,r.useMemo)((function(){return"small"===c?"45vw":"medium"===c?"60vw":"80vw"}),[c]),D=(0,r.useMemo)((function(){return x.length<1?{name:"MAIN"}:x[x.length-1]}),[x]);(0,r.useEffect)((function(){n?(document.body.style.height="100%",document.body.style.overflowY="hidden"):(document.body.style.height="unset",document.body.style.overflowY="auto")}),[n]),(0,r.useEffect)((function(){return n&&document.body.addEventListener("keydown",C,!1),function(){document.body.removeEventListener("click",C,!1)}}),[C,n]),(0,r.useEffect)((function(){return function(){document.body.removeEventListener("keydown",C,!1)}}),[]),(0,r.useEffect)((function(){S&&n&&O(!1)}),[n,S]);var A=(0,r.useCallback)((function(){return r.createElement(s.Z,{in:n,timeout:300,classNames:"hv-sidebar",onExited:E,unmountOnExit:!0},r.createElement(f,{sidebarWidth:T,isFooterPresent:l||(null==D?void 0:D.footer),isLocalSidebar:!!y},r.createElement("div",{className:"sidebar-backdrop",onClick:k,onKeyDown:C,role:"button","aria-label":"Close sidebar",tabIndex:-1}),r.createElement("div",{className:"sidebar-inner"},(a||(null==D?void 0:D.title))&&r.createElement("div",{className:"sidebar-inner__header"},"MAIN"!==D.name&&r.createElement("span",{className:"sidebar-inner__back-icon",onClick:function(){M()},onKeyDown:function(){M()},role:"button","aria-label":"Close sub sidebar",tabIndex:0},r.createElement(g,{className:"hv-arrow",width:"1em",height:"1em"})),r.createElement("h2",{className:"sidebar-inner__title"},(null==D?void 0:D.title)||a),"MAIN"===D.name&&r.createElement("span",{className:"sidebar-inner__close-icon",onClick:k,onKeyDown:C,role:"button","aria-label":"Close sidebar",tabIndex:0},r.createElement(v,{className:"hv-arrow",width:"1em",height:"1em"}))),r.createElement("div",{className:"sidebar-inner__body"},"function"==typeof e?e({pushSubSidebar:N,popSubSidebar:M,presentView:D}):e),((null==D?void 0:D.footer)||l)&&r.createElement("div",{className:"sidebar-inner__footer"},(null==D?void 0:D.footer)||l))))}),[e,l,k,C,E,n,y,M,D,N,a,T]);return y?!n&&S?null:i.createPortal(A(),document.getElementById(y)):r.createElement(u.Z,null,A())};y.propTypes={children:a().oneOfType([a().node,a().func]).isRequired,isShown:a().bool.isRequired,onCloseComplete:a().func,title:a().string,footer:a().oneOfType([a().node,a().string]),size:a().string.isRequired,shouldCloseOnOverlayClick:a().bool,shouldCloseOnEscapePress:a().bool,localContainerId:a().string},y.defaultProps={onCloseComplete:function(){},title:null,shouldCloseOnOverlayClick:!0,shouldCloseOnEscapePress:!0,footer:null,localContainerId:null};var b=y},58307:function(t,e){var n;!function(r){"use strict";var i=":not(:disabled):not(.ajs-reset)",o={autoReset:!0,basic:!1,closable:!0,closableByDimmer:!0,invokeOnCloseOff:!1,frameless:!1,defaultFocusOff:!1,maintainFocus:!0,maximizable:!0,modal:!0,movable:!0,moveBounded:!1,overflow:!0,padding:!0,pinnable:!0,pinned:!0,preventBodyShift:!1,resizable:!0,startMaximized:!1,transition:"pulse",transitionOff:!1,tabbable:["button","[href]","input","select","textarea",'[tabindex]:not([tabindex^="-"])'+i].join(i+","),notifier:{delay:5,position:"bottom-right",closeButton:!1,classes:{base:"alertify-notifier",prefix:"ajs-",message:"ajs-message",top:"ajs-top",right:"ajs-right",bottom:"ajs-bottom",left:"ajs-left",center:"ajs-center",visible:"ajs-visible",hidden:"ajs-hidden",close:"ajs-close"}},glossary:{title:"AlertifyJS",ok:"OK",cancel:"Cancel",acccpt:"Accept",deny:"Deny",confirm:"Confirm",decline:"Decline",close:"Close",maximize:"Maximize",restore:"Restore"},theme:{input:"ajs-input",ok:"ajs-ok",cancel:"ajs-cancel"},hooks:{preinit:function(){},postinit:function(){}}},a=[];function s(t,e){t.className+=" "+e}function u(t,e){for(var n=t.className.split(" "),r=e.split(" "),i=0;i<r.length;i+=1){var o=n.indexOf(r[i]);o>-1&&n.splice(o,1)}t.className=n.join(" ")}function l(){return"rtl"===r.getComputedStyle(document.body).direction}function c(){return document.documentElement&&document.documentElement.scrollTop||document.body.scrollTop}function f(){return document.documentElement&&document.documentElement.scrollLeft||document.body.scrollLeft}function h(t){for(;t.lastChild;)t.removeChild(t.lastChild)}function d(t){if(null===t)return t;var e;if(Array.isArray(t)){e=[];for(var n=0;n<t.length;n+=1)e.push(d(t[n]));return e}if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp)return(e=new RegExp(t.source)).global=t.global,e.ignoreCase=t.ignoreCase,e.multiline=t.multiline,e.lastIndex=t.lastIndex,e;if("object"==typeof t){for(var r in e={},t)t.hasOwnProperty(r)&&(e[r]=d(t[r]));return e}return t}function p(t,e){if(t.elements){var n=t.elements.root;n.parentNode.removeChild(n),delete t.elements,t.settings=d(t.__settings),t.__init=e,delete t.__internal}}var m=!1;try{var g=Object.defineProperty({},"passive",{get:function(){m=!0}});r.addEventListener("test",g,g),r.removeEventListener("test",g,g)}catch(t){}var v=function(t,e,n,r,i){t.addEventListener(e,n,m?{capture:r,passive:i}:!0===r)},y=function(t,e,n,r,i){t.removeEventListener(e,n,m?{capture:r,passive:i}:!0===r)},b=function(){var t,e,n=!1,r={animation:"animationend",OAnimation:"oAnimationEnd oanimationend",msAnimation:"MSAnimationEnd",MozAnimation:"animationend",WebkitAnimation:"webkitAnimationEnd"};for(t in r)if(void 0!==document.documentElement.style[t]){e=r[t],n=!0;break}return{type:e,supported:n}}();function x(t,e){return function(){if(arguments.length>0){for(var n=[],r=0;r<arguments.length;r+=1)n.push(arguments[r]);return n.push(t),e.apply(t,n)}return e.apply(t,[null,t])}}function w(t,e){return{index:t,button:e,cancel:!1}}function _(t,e){if("function"==typeof e.get(t))return e.get(t).call(e)}var S=function(){var t,e,n=[],i=!1,m=r.navigator.userAgent.indexOf("Safari")>-1&&r.navigator.userAgent.indexOf("Chrome")<0,g='<button class="ajs-reset"></button>',S='<div class="ajs-primary ajs-buttons"></div>',O='<div class="ajs-auxiliary ajs-buttons"></div>',M={animationIn:"ajs-in",animationOut:"ajs-out",base:"alertify",basic:"ajs-basic",capture:"ajs-capture",closable:"ajs-closable",fixed:"ajs-fixed",frameless:"ajs-frameless",hidden:"ajs-hidden",maximize:"ajs-maximize",maximized:"ajs-maximized",maximizable:"ajs-maximizable",modeless:"ajs-modeless",movable:"ajs-movable",noSelection:"ajs-no-selection",noOverflow:"ajs-no-overflow",noPadding:"ajs-no-padding",pin:"ajs-pin",pinnable:"ajs-pinnable",prefix:"ajs-",resizable:"ajs-resizable",restore:"ajs-restore",shake:"ajs-shake",unpinned:"ajs-unpinned",noTransition:"ajs-no-transition"};function E(t){if(!t.__internal){var e;N.defaults.hooks.preinit(t),delete t.__init,t.__settings||(t.__settings=d(t.settings)),"function"==typeof t.setup?((e=t.setup()).options=e.options||{},e.focus=e.focus||{}):e={buttons:[],focus:{element:null,select:!1},options:{}},"object"!=typeof t.hooks&&(t.hooks={});var r=[];if(Array.isArray(e.buttons))for(var i=0;i<e.buttons.length;i+=1){var o=e.buttons[i],a={};for(var u in o)o.hasOwnProperty(u)&&(a[u]=o[u]);r.push(a)}var l=t.__internal={isOpen:!1,activeElement:document.body,timerIn:void 0,timerOut:void 0,buttons:r,focus:e.focus,options:{title:void 0,modal:void 0,basic:void 0,frameless:void 0,defaultFocusOff:void 0,pinned:void 0,movable:void 0,moveBounded:void 0,resizable:void 0,autoReset:void 0,closable:void 0,closableByDimmer:void 0,invokeOnCloseOff:void 0,maximizable:void 0,startMaximized:void 0,pinnable:void 0,transition:void 0,transitionOff:void 0,padding:void 0,overflow:void 0,onshow:void 0,onclosing:void 0,onclose:void 0,onfocus:void 0,onmove:void 0,onmoved:void 0,onresize:void 0,onresized:void 0,onmaximize:void 0,onmaximized:void 0,onrestore:void 0,onrestored:void 0},resetHandler:void 0,beginMoveHandler:void 0,beginResizeHandler:void 0,bringToFrontHandler:void 0,modalClickHandler:void 0,buttonsClickHandler:void 0,commandsClickHandler:void 0,transitionInHandler:void 0,transitionOutHandler:void 0,destroy:void 0},c={};c.root=document.createElement("div"),c.root.style.display="none",c.root.className=M.base+" "+M.hidden+" ",c.root.innerHTML='<div class="ajs-dimmer"></div><div class="ajs-modal" tabindex="0"></div>',c.dimmer=c.root.firstChild,c.modal=c.root.lastChild,c.modal.innerHTML='<div class="ajs-dialog" tabindex="0"></div>',c.dialog=c.modal.firstChild,c.dialog.innerHTML=g+'<div class="ajs-commands"><button class="ajs-pin"></button><button class="ajs-maximize"></button><button class="ajs-close"></button></div><div class="ajs-header"></div><div class="ajs-body"></div><div class="ajs-footer"></div><div class="ajs-handle"></div>'+g,c.reset=[],c.reset.push(c.dialog.firstChild),c.reset.push(c.dialog.lastChild),c.commands={},c.commands.container=c.reset[0].nextSibling,c.commands.pin=c.commands.container.firstChild,c.commands.maximize=c.commands.pin.nextSibling,c.commands.close=c.commands.maximize.nextSibling,c.header=c.commands.container.nextSibling,c.body=c.header.nextSibling,c.body.innerHTML='<div class="ajs-content"></div>',c.content=c.body.firstChild,c.footer=c.body.nextSibling,c.footer.innerHTML=O+S,c.resizeHandle=c.footer.nextSibling,c.buttons={},c.buttons.auxiliary=c.footer.firstChild,c.buttons.primary=c.buttons.auxiliary.nextSibling,c.buttons.primary.innerHTML='<button class="ajs-button"></button>',c.buttonTemplate=c.buttons.primary.firstChild,c.buttons.primary.removeChild(c.buttonTemplate);for(var f=0;f<t.__internal.buttons.length;f+=1){var h=t.__internal.buttons[f];for(var p in n.indexOf(h.key)<0&&n.push(h.key),h.element=c.buttonTemplate.cloneNode(),h.element.innerHTML=h.text,"string"==typeof h.className&&""!==h.className&&s(h.element,h.className),h.attrs)"className"!==p&&h.attrs.hasOwnProperty(p)&&h.element.setAttribute(p,h.attrs[p]);"auxiliary"===h.scope?c.buttons.auxiliary.appendChild(h.element):c.buttons.primary.appendChild(h.element)}for(var m in t.elements=c,l.resetHandler=x(t,tt),l.beginMoveHandler=x(t,mt),l.beginResizeHandler=x(t,Ot),l.bringToFrontHandler=x(t,j),l.modalClickHandler=x(t,$),l.buttonsClickHandler=x(t,K),l.commandsClickHandler=x(t,R),l.transitionInHandler=x(t,rt),l.transitionOutHandler=x(t,it),l.options)void 0!==e.options[m]?t.set(m,e.options[m]):N.defaults.hasOwnProperty(m)?t.set(m,N.defaults[m]):"title"===m&&t.set(m,N.defaults.glossary[m]);"function"==typeof t.build&&t.build(),N.defaults.hooks.postinit(t)}document.body.appendChild(t.elements.root)}function k(){r.scrollTo(t,e)}function C(){for(var t=0,e=0;e<a.length;e+=1){var n=a[e];(n.isModal()||n.isMaximized())&&(t+=1)}0===t&&document.body.className.indexOf(M.noOverflow)>=0?(u(document.body,M.noOverflow),A(!1)):t>0&&document.body.className.indexOf(M.noOverflow)<0&&(A(!0),s(document.body,M.noOverflow))}var T="",D=0;function A(t){N.defaults.preventBodyShift&&(t&&document.documentElement.scrollHeight>document.documentElement.clientHeight?(D=e,T=r.getComputedStyle(document.body).top,s(document.body,M.fixed),document.body.style.top=-e+"px"):t||(e=D,document.body.style.top=T,u(document.body,M.fixed),k()))}function j(t,e){for(var n=a.indexOf(e)+1;n<a.length;n+=1)if(a[n].isModal())return;return document.body.lastChild!==e.elements.root&&(document.body.appendChild(e.elements.root),a.splice(a.indexOf(e),1),a.push(e),Q(e)),!1}function P(t,e,n,r,i){var o,a={op:void 0,items:[]};if(void 0===i&&"string"==typeof r)a.op="get",e.hasOwnProperty(r)?(a.found=!0,a.value=e[r]):(a.found=!1,a.value=void 0);else if(a.op="set","object"==typeof r){var s=r;for(var u in s)e.hasOwnProperty(u)?(e[u]!==s[u]&&(o=e[u],e[u]=s[u],n.call(t,u,o,s[u])),a.items.push({key:u,value:s[u],found:!0})):a.items.push({key:u,value:s[u],found:!1})}else{if("string"!=typeof r)throw new Error("args must be a string or object");e.hasOwnProperty(r)?(e[r]!==i&&(o=e[r],e[r]=i,n.call(t,r,o,i)),a.items.push({key:r,value:i,found:!0})):a.items.push({key:r,value:i,found:!1})}return a}function I(t){var e;G(t,(function(n){return e=!0!==t.get("invokeOnCloseOff")&&!0===n.invokeOnClose})),!e&&t.isOpen()&&t.close()}function R(t,e){switch(t.srcElement||t.target){case e.elements.commands.pin:e.isPinned()?F(e):L(e);break;case e.elements.commands.maximize:e.isMaximized()?B(e):q(e);break;case e.elements.commands.close:I(e)}return!1}function L(t){t.set("pinned",!0)}function F(t){t.set("pinned",!1)}function q(t){_("onmaximize",t),s(t.elements.root,M.maximized),t.isOpen()&&C(),_("onmaximized",t)}function B(t){_("onrestore",t),u(t.elements.root,M.maximized),t.isOpen()&&C(),_("onrestored",t)}function z(t){var e=f();t.elements.modal.style.marginTop=c()+"px",t.elements.modal.style.marginLeft=e+"px",t.elements.modal.style.marginRight=-e+"px"}function H(t){var e=parseInt(t.elements.modal.style.marginTop,10),n=parseInt(t.elements.modal.style.marginLeft,10);if(t.elements.modal.style.marginTop="",t.elements.modal.style.marginLeft="",t.elements.modal.style.marginRight="",t.isOpen()){var r=0,i=0;""!==t.elements.dialog.style.top&&(r=parseInt(t.elements.dialog.style.top,10)),t.elements.dialog.style.top=r+(e-c())+"px",""!==t.elements.dialog.style.left&&(i=parseInt(t.elements.dialog.style.left,10)),t.elements.dialog.style.left=i+(n-f())+"px"}}function U(t){t.get("modal")||t.get("pinned")?H(t):z(t)}var W=!1,V=0;function $(t,e){if(t.timeStamp-V>200&&(V=t.timeStamp)&&!W){var n=t.srcElement||t.target;!0===e.get("closableByDimmer")&&n===e.elements.modal&&I(e)}W=!1}var Y=0,Z=!1;function G(t,e){if(Date.now()-Y>200&&(Y=Date.now()))for(var n=0;n<t.__internal.buttons.length;n+=1){var r=t.__internal.buttons[n];if(!r.element.disabled&&e(r)){var i=w(n,r);"function"==typeof t.callback&&t.callback.apply(t,[i]),!1===i.cancel&&t.close();break}}}function K(t,e){var n=t.srcElement||t.target;G(e,(function(t){return t.element===n&&(Z=!0)}))}function X(t){if(!Z){var e=a[a.length-1],r=t.keyCode;return 0===e.__internal.buttons.length&&27===r&&!0===e.get("closable")?(I(e),!1):n.indexOf(r)>-1?(G(e,(function(t){return t.key===r})),!1):void 0}Z=!1}function J(t){var e=a[a.length-1],r=t.keyCode;if(37===r||39===r){for(var i=e.__internal.buttons,o=0;o<i.length;o+=1)if(document.activeElement===i[o].element)switch(r){case 37:return void i[(o||i.length)-1].element.focus();case 39:return void i[(o+1)%i.length].element.focus()}}else if(r<124&&r>111&&n.indexOf(r)>-1)return t.preventDefault(),t.stopPropagation(),G(e,(function(t){return t.key===r})),!1}function Q(t,e){if(e)e.focus();else{var n=t.__internal.focus,r=n.element;switch(typeof n.element){case"number":t.__internal.buttons.length>n.element&&(r=!0===t.get("basic")?t.elements.reset[0]:t.__internal.buttons[n.element].element);break;case"string":r=t.elements.body.querySelector(n.element);break;case"function":r=n.element.call(t)}(!0===t.get("defaultFocusOff")||null==r&&0===t.__internal.buttons.length)&&(r=t.elements.reset[0]),r&&r.focus&&(r.focus(),n.select&&r.select&&r.select())}}function tt(t,e){if(!e)for(var n=a.length-1;n>-1;n-=1)if(a[n].isModal()){e=a[n];break}if(e&&e.isModal()){var r,i=e.elements.reset[0],o=e.elements.reset[1],s=t.relatedTarget,u=e.elements.root.contains(s),l=t.srcElement||t.target;if(l===i&&!u||l===o&&s===i)return;l===o||l===document.body?r=i:l===i&&s===o?r=et(e):l===i&&u&&(r=et(e,!0)),Q(e,r)}}function et(t,e){var n=[].slice.call(t.elements.dialog.querySelectorAll(o.tabbable));e&&n.reverse();for(var r=0;r<n.length;r+=1){var i=n[r];if(i.offsetParent||i.offsetWidth||i.offsetHeight||i.getClientRects().length)return i}}function nt(t){var e=a[a.length-1];e&&t.shiftKey&&9===t.keyCode&&e.elements.reset[1].focus()}function rt(t,e){clearTimeout(e.__internal.timerIn),Q(e),Z=!1,_("onfocus",e),y(e.elements.dialog,b.type,e.__internal.transitionInHandler),u(e.elements.root,M.animationIn)}function it(t,e){clearTimeout(e.__internal.timerOut),y(e.elements.dialog,b.type,e.__internal.transitionOutHandler),yt(e),Et(e),e.isMaximized()&&!e.get("startMaximized")&&B(e),"function"==typeof e.__internal.destroy&&e.__internal.destroy.apply(e)}var ot=null,at=0,st=0,ut="pageX",lt="pageY",ct=null,ft=!1,ht=null;function dt(t,e){var n=t[ut]-at,r=t[lt]-st;ft&&(r-=document.body.scrollTop),e.style.left=n+"px",e.style.top=r+"px"}function pt(t,e){var n=t[ut]-at,r=t[lt]-st;ft&&(r-=document.body.scrollTop),e.style.left=Math.min(ct.maxLeft,Math.max(ct.minLeft,n))+"px",e.style.top=ft?Math.min(ct.maxTop,Math.max(ct.minTop,r))+"px":Math.max(ct.minTop,r)+"px"}function mt(t,e){if(null===bt&&!e.isMaximized()&&e.get("movable")){var n,r=0,i=0;if("touchstart"===t.type?(t.preventDefault(),n=t.targetTouches[0],ut="clientX",lt="clientY"):0===t.button&&(n=t),n){var o=e.elements.dialog;if(s(o,M.capture),o.style.left&&(r=parseInt(o.style.left,10)),o.style.top&&(i=parseInt(o.style.top,10)),at=n[ut]-r,st=n[lt]-i,e.isModal()?st+=e.elements.modal.scrollTop:e.isPinned()&&(st-=document.body.scrollTop),e.get("moveBounded")){var a=o,u=-r,l=-i;do{u+=a.offsetLeft,l+=a.offsetTop}while(a=a.offsetParent);ct={maxLeft:u,minLeft:-u,maxTop:document.documentElement.clientHeight-o.clientHeight-l,minTop:-l},ht=pt}else ct=null,ht=dt;return _("onmove",e),ft=!e.isModal()&&e.isPinned(),ot=e,ht(n,o),s(document.body,M.noSelection),!1}}}function gt(t){var e;ot&&("touchmove"===t.type?(t.preventDefault(),e=t.targetTouches[0]):0===t.button&&(e=t),e&&ht(e,ot.elements.dialog))}function vt(){if(ot){var t=ot;ot=ct=null,u(document.body,M.noSelection),u(t.elements.dialog,M.capture),_("onmoved",t)}}function yt(t){ot=null;var e=t.elements.dialog;e.style.left=e.style.top=""}var bt=null,xt=Number.Nan,wt=0,_t=0,St=0;function Ot(t,e){var n;if(!e.isMaximized()&&("touchstart"===t.type?(t.preventDefault(),n=t.targetTouches[0]):0===t.button&&(n=t),n)){_("onresize",e),bt=e,St=e.elements.resizeHandle.offsetHeight/2;var r=e.elements.dialog;return s(r,M.capture),xt=parseInt(r.style.left,10),r.style.height=r.offsetHeight+"px",r.style.minHeight=e.elements.header.offsetHeight+e.elements.footer.offsetHeight+"px",r.style.width=(wt=r.offsetWidth)+"px","none"!==r.style.maxWidth&&(r.style.minWidth=(_t=r.offsetWidth)+"px"),r.style.maxWidth="none",s(document.body,M.noSelection),!1}}function Nt(t){var e;bt&&("touchmove"===t.type?(t.preventDefault(),e=t.targetTouches[0]):0===t.button&&(e=t),e&&function(t,e,n){var r,i,o=e,a=0,s=0;do{a+=o.offsetLeft,s+=o.offsetTop}while(o=o.offsetParent);!0===n?(r=t.pageX,i=t.pageY):(r=t.clientX,i=t.clientY);var u=l();if(u&&(r=document.body.offsetWidth-r,isNaN(xt)||(a=document.body.offsetWidth-a-e.offsetWidth)),e.style.height=i-s+St+"px",e.style.width=r-a+St+"px",!isNaN(xt)){var c=.5*Math.abs(e.offsetWidth-wt);u&&(c*=-1),e.offsetWidth>wt?e.style.left=xt+c+"px":e.offsetWidth>=_t&&(e.style.left=xt-c+"px")}}(e,bt.elements.dialog,!bt.get("modal")&&!bt.get("pinned")))}function Mt(){if(bt){var t=bt;bt=null,u(document.body,M.noSelection),u(t.elements.dialog,M.capture),W=!0,_("onresized",t)}}function Et(t){bt=null;var e=t.elements.dialog;"none"===e.style.maxWidth&&(e.style.maxWidth=e.style.minWidth=e.style.width=e.style.height=e.style.minHeight=e.style.left="",xt=Number.Nan,wt=_t=St=0)}function kt(){for(var t=0;t<a.length;t+=1){var e=a[t];e.get("autoReset")&&(yt(e),Et(e))}}function Ct(t){v(t.elements.dialog,"focus",t.__internal.bringToFrontHandler,!0)}function Tt(t){y(t.elements.dialog,"focus",t.__internal.bringToFrontHandler,!0)}function Dt(t){v(t.elements.header,"mousedown",t.__internal.beginMoveHandler),v(t.elements.header,"touchstart",t.__internal.beginMoveHandler,!1,!1)}function At(t){y(t.elements.header,"mousedown",t.__internal.beginMoveHandler),y(t.elements.header,"touchstart",t.__internal.beginMoveHandler,!1,!1)}function jt(t){v(t.elements.resizeHandle,"mousedown",t.__internal.beginResizeHandler),v(t.elements.resizeHandle,"touchstart",t.__internal.beginResizeHandler,!1,!1)}function Pt(t){y(t.elements.resizeHandle,"mousedown",t.__internal.beginResizeHandler),y(t.elements.resizeHandle,"touchstart",t.__internal.beginResizeHandler,!1,!1)}return{__init:E,isOpen:function(){return this.__internal.isOpen},isModal:function(){return this.elements.root.className.indexOf(M.modeless)<0},isMaximized:function(){return this.elements.root.className.indexOf(M.maximized)>-1},isPinned:function(){return this.elements.root.className.indexOf(M.unpinned)<0},maximize:function(){return this.isMaximized()||q(this),this},restore:function(){return this.isMaximized()&&B(this),this},pin:function(){return this.isPinned()||L(this),this},unpin:function(){return this.isPinned()&&F(this),this},bringToFront:function(){return j(0,this),this},moveTo:function(t,e){if(!isNaN(t)&&!isNaN(e)){_("onmove",this);var n=this.elements.dialog,r=n,i=0,o=0;n.style.left&&(i-=parseInt(n.style.left,10)),n.style.top&&(o-=parseInt(n.style.top,10));do{i+=r.offsetLeft,o+=r.offsetTop}while(r=r.offsetParent);var a=t-i,s=e-o;l()&&(a*=-1),n.style.left=a+"px",n.style.top=s+"px",_("onmoved",this)}return this},resizeTo:function(t,e){var n=parseFloat(t),r=parseFloat(e),i=/(\d*\.\d+|\d+)%/;if(!isNaN(n)&&!isNaN(r)&&!0===this.get("resizable")){_("onresize",this),(""+t).match(i)&&(n=n/100*document.documentElement.clientWidth),(""+e).match(i)&&(r=r/100*document.documentElement.clientHeight);var o=this.elements.dialog;"none"!==o.style.maxWidth&&(o.style.minWidth=(_t=o.offsetWidth)+"px"),o.style.maxWidth="none",o.style.minHeight=this.elements.header.offsetHeight+this.elements.footer.offsetHeight+"px",o.style.width=n+"px",o.style.height=r+"px",_("onresized",this)}return this},setting:function(t,e){var n=this,r=P(this,this.__internal.options,(function(t,e,r){!function(t,e,n,r){switch(e){case"title":t.setHeader(r);break;case"modal":!function(t){t.get("modal")?(u(t.elements.root,M.modeless),t.isOpen()&&(Tt(t),U(t),C())):(s(t.elements.root,M.modeless),t.isOpen()&&(Ct(t),U(t),C()))}(t);break;case"basic":!function(t){t.get("basic")?s(t.elements.root,M.basic):u(t.elements.root,M.basic)}(t);break;case"frameless":!function(t){t.get("frameless")?s(t.elements.root,M.frameless):u(t.elements.root,M.frameless)}(t);break;case"pinned":!function(t){t.get("pinned")?(u(t.elements.root,M.unpinned),t.isOpen()&&H(t)):(s(t.elements.root,M.unpinned),t.isOpen()&&!t.isModal()&&z(t))}(t);break;case"closable":!function(t){t.get("closable")?(s(t.elements.root,M.closable),function(t){v(t.elements.modal,"click",t.__internal.modalClickHandler)}(t)):(u(t.elements.root,M.closable),function(t){y(t.elements.modal,"click",t.__internal.modalClickHandler)}(t))}(t);break;case"maximizable":!function(t){t.get("maximizable")?s(t.elements.root,M.maximizable):u(t.elements.root,M.maximizable)}(t);break;case"pinnable":!function(t){t.get("pinnable")?s(t.elements.root,M.pinnable):u(t.elements.root,M.pinnable)}(t);break;case"movable":!function(t){t.get("movable")?(s(t.elements.root,M.movable),t.isOpen()&&Dt(t)):(yt(t),u(t.elements.root,M.movable),t.isOpen()&&At(t))}(t);break;case"resizable":!function(t){t.get("resizable")?(s(t.elements.root,M.resizable),t.isOpen()&&jt(t)):(Et(t),u(t.elements.root,M.resizable),t.isOpen()&&Pt(t))}(t);break;case"padding":r?u(t.elements.root,M.noPadding):t.elements.root.className.indexOf(M.noPadding)<0&&s(t.elements.root,M.noPadding);break;case"overflow":r?u(t.elements.root,M.noOverflow):t.elements.root.className.indexOf(M.noOverflow)<0&&s(t.elements.root,M.noOverflow);break;case"transition":!function(t,e,n){"string"==typeof n&&u(t.elements.root,M.prefix+n),s(t.elements.root,M.prefix+e),t.elements.root.offsetWidth}(t,r,n);break;case"transitionOff":!function(t){t.get("transitionOff")?s(t.elements.root,M.noTransition):u(t.elements.root,M.noTransition)}(t)}"function"==typeof t.hooks.onupdate&&t.hooks.onupdate.call(t,e,n,r)}(n,t,e,r)}),t,e);if("get"===r.op)return r.found?r.value:void 0!==this.settings?P(this,this.settings,this.settingUpdated||function(){},t,e).value:void 0;if("set"===r.op){if(r.items.length>0)for(var i=this.settingUpdated||function(){},o=0;o<r.items.length;o+=1){var a=r.items[o];a.found||void 0===this.settings||P(this,this.settings,i,a.key,a.value)}return this}},set:function(t,e){return this.setting(t,e),this},get:function(t){return this.setting(t)},setHeader:function(t){return"string"==typeof t?(h(this.elements.header),this.elements.header.innerHTML=t):t instanceof r.HTMLElement&&this.elements.header.firstChild!==t&&(h(this.elements.header),this.elements.header.appendChild(t)),this},setContent:function(t){return"string"==typeof t?(h(this.elements.content),this.elements.content.innerHTML=t):t instanceof r.HTMLElement&&this.elements.content.firstChild!==t&&(h(this.elements.content),this.elements.content.appendChild(t)),this},showModal:function(t){return this.show(!0,t)},show:function(n,o){if(E(this),this.__internal.isOpen){yt(this),Et(this),s(this.elements.dialog,M.shake);var l=this;setTimeout((function(){u(l.elements.dialog,M.shake)}),200)}else{if(this.__internal.isOpen=!0,a.push(this),N.defaults.maintainFocus&&(this.__internal.activeElement=document.activeElement),document.body.hasAttribute("tabindex")||document.body.setAttribute("tabindex",i="0"),"function"==typeof this.prepare&&this.prepare(),d=this,1===a.length&&(v(r,"resize",kt),v(document.body,"keyup",X),v(document.body,"keydown",J),v(document.body,"focus",tt),v(document.documentElement,"mousemove",gt),v(document.documentElement,"touchmove",gt,!1,!1),v(document.documentElement,"mouseup",vt),v(document.documentElement,"touchend",vt),v(document.documentElement,"mousemove",Nt),v(document.documentElement,"touchmove",Nt,!1,!1),v(document.documentElement,"mouseup",Mt),v(document.documentElement,"touchend",Mt)),v(d.elements.commands.container,"click",d.__internal.commandsClickHandler),v(d.elements.footer,"click",d.__internal.buttonsClickHandler),v(d.elements.reset[0],"focusin",d.__internal.resetHandler),v(d.elements.reset[0],"keydown",nt),v(d.elements.reset[1],"focusin",d.__internal.resetHandler),Z=!0,v(d.elements.dialog,b.type,d.__internal.transitionInHandler),d.get("modal")||Ct(d),d.get("resizable")&&jt(d),d.get("movable")&&Dt(d),void 0!==n&&this.set("modal",n),t=f(),e=c(),C(),"string"==typeof o&&""!==o&&(this.__internal.className=o,s(this.elements.root,o)),this.get("startMaximized")?this.maximize():this.isMaximized()&&B(this),U(this),this.elements.root.removeAttribute("style"),u(this.elements.root,M.animationOut),s(this.elements.root,M.animationIn),clearTimeout(this.__internal.timerIn),this.__internal.timerIn=setTimeout(this.__internal.transitionInHandler,b.supported?1e3:100),m){var h=this.elements.root;h.style.display="none",setTimeout((function(){h.style.display="block"}),0)}this.elements.root.offsetWidth,u(this.elements.root,M.hidden),k(),"function"==typeof this.hooks.onshow&&this.hooks.onshow.call(this),_("onshow",this)}var d;return this},close:function(){var t;return this.__internal.isOpen&&!1!==_("onclosing",this)&&(t=this,1===a.length&&(y(r,"resize",kt),y(document.body,"keyup",X),y(document.body,"keydown",J),y(document.body,"focus",tt),y(document.documentElement,"mousemove",gt),y(document.documentElement,"mouseup",vt),y(document.documentElement,"mousemove",Nt),y(document.documentElement,"mouseup",Mt)),y(t.elements.commands.container,"click",t.__internal.commandsClickHandler),y(t.elements.footer,"click",t.__internal.buttonsClickHandler),y(t.elements.reset[0],"focusin",t.__internal.resetHandler),y(t.elements.reset[0],"keydown",nt),y(t.elements.reset[1],"focusin",t.__internal.resetHandler),v(t.elements.dialog,b.type,t.__internal.transitionOutHandler),t.get("modal")||Tt(t),t.get("movable")&&At(t),t.get("resizable")&&Pt(t),u(this.elements.root,M.animationIn),s(this.elements.root,M.animationOut),clearTimeout(this.__internal.timerOut),this.__internal.timerOut=setTimeout(this.__internal.transitionOutHandler,b.supported?1e3:100),s(this.elements.root,M.hidden),this.elements.modal.offsetWidth,N.defaults.maintainFocus&&this.__internal.activeElement&&(this.__internal.activeElement.focus(),this.__internal.activeElement=null),void 0!==this.__internal.className&&""!==this.__internal.className&&u(this.elements.root,this.__internal.className),"function"==typeof this.hooks.onclose&&this.hooks.onclose.call(this),_("onclose",this),a.splice(a.indexOf(this),1),this.__internal.isOpen=!1,C()),a.length||"0"!==i||document.body.removeAttribute("tabindex"),this},closeOthers:function(){return N.closeAll(this),this},destroy:function(){return this.__internal&&(this.__internal.isOpen?(this.__internal.destroy=function(){p(this,E)},this.close()):this.__internal.destroy||p(this,E)),this}}}(),O=function(){var t,e=[],n=o.notifier.classes,i=n.base;function a(e){e.__internal||(e.__internal={position:N.defaults.notifier.position,delay:N.defaults.notifier.delay},t=document.createElement("DIV"),("transitionOff"in o.notifier?o.notifier.transitionOff:o.transitionOff)&&(i=n.base+" ajs-no-transition"),l(e)),t.parentNode!==document.body&&document.body.appendChild(t)}function l(e){switch(t.className=i,e.__internal.position){case"top-right":s(t,n.top+" "+n.right);break;case"top-left":s(t,n.top+" "+n.left);break;case"top-center":s(t,n.top+" "+n.center);break;case"bottom-left":s(t,n.bottom+" "+n.left);break;case"bottom-center":s(t,n.bottom+" "+n.center);break;default:s(t,n.bottom+" "+n.right)}}return{setting:function(t,e){if(a(this),void 0===e)return this.__internal[t];switch(t){case"position":this.__internal.position=e,l(this);break;case"delay":this.__internal.delay=e}return this},set:function(t,e){return this.setting(t,e),this},get:function(t){return this.setting(t)},create:function(i,o){a(this);var l=document.createElement("div");return l.className=n.message+("string"==typeof i&&""!==i?" "+n.prefix+i:""),function(i,o){function a(t){clearTimeout(t.__internal.timer),clearTimeout(t.__internal.transitionTimeout)}return l={element:i,push:function(r,i){if(!this.__internal.pushed){var o,u;switch((l=this).__internal.pushed=!0,e.push(l),a(this),arguments.length){case 0:u=this.__internal.delay;break;case 1:"number"==typeof r?u=r:(o=r,u=this.__internal.delay);break;case 2:o=r,u=i}return this.__internal.closeButton=N.defaults.notifier.closeButton,void 0!==o&&this.setContent(o),O.__internal.position.indexOf("top")<0?t.appendChild(this.element):t.insertBefore(this.element,t.firstChild),this.element.offsetWidth,s(this.element,n.visible),v(this.element,"click",this.__internal.clickHandler),this.delay(u)}var l;return this},ondismiss:function(){},callback:o,dismiss:function(r){return this.__internal.pushed&&(a(this),"function"==typeof this.ondismiss&&!1===this.ondismiss.call(this)||(y(this.element,"click",this.__internal.clickHandler),void 0!==this.element&&this.element.parentNode===t&&(this.__internal.transitionTimeout=setTimeout(this.__internal.transitionEndHandler,b.supported?1e3:100),u(this.element,n.visible),"function"==typeof this.callback&&this.callback.call(this,r)),e.splice(e.indexOf(this),1),this.__internal.pushed=!1)),this},delay:function(t){if(a(this),this.__internal.delay=void 0===t||isNaN(+t)?O.__internal.delay:+t,this.__internal.delay>0){var e=this;this.__internal.timer=setTimeout((function(){e.dismiss()}),1e3*this.__internal.delay)}return this},setContent:function(t){if("string"==typeof t?(h(this.element),this.element.innerHTML=t):t instanceof r.HTMLElement&&this.element.firstChild!==t&&(h(this.element),this.element.appendChild(t)),this.__internal.closeButton){var e=document.createElement("span");s(e,n.close),e.setAttribute("data-close",!0),this.element.appendChild(e)}return this},dismissOthers:function(){return O.dismissAll(this),this}},l.__internal||(l.__internal={pushed:!1,delay:void 0,timer:void 0,clickHandler:void 0,transitionEndHandler:void 0,transitionTimeout:void 0},l.__internal.clickHandler=x(l,(function(t,e){e.__internal.closeButton&&"true"!==t.target.getAttribute("data-close")||e.dismiss(!0)})),l.__internal.transitionEndHandler=x(l,(function e(n,r){y(r.element,b.type,e),t.removeChild(r.element)}))),l;var l}(l,o)},dismissAll:function(t){for(var n=e.slice(0),r=0;r<n.length;r+=1){var i=n[r];void 0!==t&&t===i||i.dismiss()}}}}(),N=new function(){var t={};function e(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function n(e){var n=t[e].dialog;return n&&"function"==typeof n.__init&&n.__init(n),n}return{defaults:o,dialog:function(r,i,o,a){if("function"!=typeof i)return n(r);if(this.hasOwnProperty(r))throw new Error("alertify.dialog: name already exists");var s=function(n,r,i,o){var a={dialog:null,factory:r};return void 0!==o&&(a.factory=function(){return e(new t[o].factory,new r)}),i||(a.dialog=e(new a.factory,S)),t[n]=a}(r,i,o,a);this[r]=o?function(){if(0===arguments.length)return s.dialog;var t=e(new s.factory,S);return t&&"function"==typeof t.__init&&t.__init(t),t.main.apply(t,arguments),t.show.apply(t)}:function(){if(s.dialog&&"function"==typeof s.dialog.__init&&s.dialog.__init(s.dialog),0===arguments.length)return s.dialog;var t=s.dialog;return t.main.apply(s.dialog,arguments),t.show.apply(s.dialog)}},closeAll:function(t){for(var e=a.slice(0),n=0;n<e.length;n+=1){var r=e[n];void 0!==t&&t===r||r.close()}},setting:function(t,e,r){if("notifier"===t)return O.setting(e,r);var i=n(t);return i?i.setting(e,r):void 0},set:function(t,e,n){return this.setting(t,e,n)},get:function(t,e){return this.setting(t,e)},notify:function(t,e,n,r){return O.create(e,r).push(t,n)},message:function(t,e,n){return O.create(null,n).push(t,e)},success:function(t,e,n){return O.create("success",n).push(t,e)},error:function(t,e,n){return O.create("error",n).push(t,e)},warning:function(t,e,n){return O.create("warning",n).push(t,e)},dismissAll:function(){O.dismissAll()}}};N.dialog("alert",(function(){return{main:function(t,e,n){var r,i,o;switch(arguments.length){case 1:i=t;break;case 2:"function"==typeof e?(i=t,o=e):(r=t,i=e);break;case 3:r=t,i=e,o=n}return this.set("title",r),this.set("message",i),this.set("onok",o),this},setup:function(){return{buttons:[{text:N.defaults.glossary.ok,key:27,invokeOnClose:!0,className:N.defaults.theme.ok}],focus:{element:0,select:!1},options:{maximizable:!1,resizable:!1}}},build:function(){},prepare:function(){},setMessage:function(t){this.setContent(t)},settings:{message:void 0,onok:void 0,label:void 0},settingUpdated:function(t,e,n){switch(t){case"message":this.setMessage(n);break;case"label":this.__internal.buttons[0].element&&(this.__internal.buttons[0].element.innerHTML=n)}},callback:function(t){if("function"==typeof this.get("onok")){var e=this.get("onok").call(this,t);void 0!==e&&(t.cancel=!e)}}}})),N.dialog("confirm",(function(){var t={timer:null,index:null,text:null,duration:null,task:function(n,r){if(r.isOpen()){if(r.__internal.buttons[t.index].element.innerHTML=t.text+" (‏"+t.duration+"‏) ",t.duration-=1,-1===t.duration){e(r);var i=r.__internal.buttons[t.index],o=w(t.index,i);"function"==typeof r.callback&&r.callback.apply(r,[o]),!1!==o.close&&r.close()}}else e(r)}};function e(e){null!==t.timer&&(clearInterval(t.timer),t.timer=null,e.__internal.buttons[t.index].element.innerHTML=t.text)}function n(n,r,i){e(n),t.duration=i,t.index=r,t.text=n.__internal.buttons[r].element.innerHTML,t.timer=setInterval(x(n,t.task),1e3),t.task(null,n)}return{main:function(t,e,n,r){var i,o,a,s;switch(arguments.length){case 1:o=t;break;case 2:o=t,a=e;break;case 3:o=t,a=e,s=n;break;case 4:i=t,o=e,a=n,s=r}return this.set("title",i),this.set("message",o),this.set("onok",a),this.set("oncancel",s),this},setup:function(){return{buttons:[{text:N.defaults.glossary.ok,key:13,className:N.defaults.theme.ok},{text:N.defaults.glossary.cancel,key:27,invokeOnClose:!0,className:N.defaults.theme.cancel}],focus:{element:0,select:!1},options:{maximizable:!1,resizable:!1}}},build:function(){},prepare:function(){},setMessage:function(t){this.setContent(t)},settings:{message:null,labels:null,onok:null,oncancel:null,defaultFocus:null,reverseButtons:null},settingUpdated:function(t,e,n){switch(t){case"message":this.setMessage(n);break;case"labels":"ok"in n&&this.__internal.buttons[0].element&&(this.__internal.buttons[0].text=n.ok,this.__internal.buttons[0].element.innerHTML=n.ok),"cancel"in n&&this.__internal.buttons[1].element&&(this.__internal.buttons[1].text=n.cancel,this.__internal.buttons[1].element.innerHTML=n.cancel);break;case"reverseButtons":!0===n?this.elements.buttons.primary.appendChild(this.__internal.buttons[0].element):this.elements.buttons.primary.appendChild(this.__internal.buttons[1].element);break;case"defaultFocus":this.__internal.focus.element="ok"===n?0:1}},callback:function(t){var n;switch(e(this),t.index){case 0:"function"==typeof this.get("onok")&&void 0!==(n=this.get("onok").call(this,t))&&(t.cancel=!n);break;case 1:"function"==typeof this.get("oncancel")&&void 0!==(n=this.get("oncancel").call(this,t))&&(t.cancel=!n)}},autoOk:function(t){return n(this,0,t),this},autoCancel:function(t){return n(this,1,t),this}}})),N.dialog("prompt",(function(){var t=document.createElement("INPUT"),e=document.createElement("P");return{main:function(t,e,n,r,i){var o,a,s,u,l;switch(arguments.length){case 1:a=t;break;case 2:a=t,s=e;break;case 3:a=t,s=e,u=n;break;case 4:a=t,s=e,u=n,l=r;break;case 5:o=t,a=e,s=n,u=r,l=i}return this.set("title",o),this.set("message",a),this.set("value",s),this.set("onok",u),this.set("oncancel",l),this},setup:function(){return{buttons:[{text:N.defaults.glossary.ok,key:13,className:N.defaults.theme.ok},{text:N.defaults.glossary.cancel,key:27,invokeOnClose:!0,className:N.defaults.theme.cancel}],focus:{element:t,select:!0},options:{maximizable:!1,resizable:!1}}},build:function(){t.className=N.defaults.theme.input,t.setAttribute("type","text"),t.value=this.get("value"),this.elements.content.appendChild(e),this.elements.content.appendChild(t)},prepare:function(){},setMessage:function(t){"string"==typeof t?(h(e),e.innerHTML=t):t instanceof r.HTMLElement&&e.firstChild!==t&&(h(e),e.appendChild(t))},settings:{message:void 0,labels:void 0,onok:void 0,oncancel:void 0,value:"",type:"text",reverseButtons:void 0},settingUpdated:function(e,n,r){switch(e){case"message":this.setMessage(r);break;case"value":t.value=r;break;case"type":switch(r){case"text":case"color":case"date":case"datetime-local":case"email":case"month":case"number":case"password":case"search":case"tel":case"time":case"week":t.type=r;break;default:t.type="text"}break;case"labels":r.ok&&this.__internal.buttons[0].element&&(this.__internal.buttons[0].element.innerHTML=r.ok),r.cancel&&this.__internal.buttons[1].element&&(this.__internal.buttons[1].element.innerHTML=r.cancel);break;case"reverseButtons":!0===r?this.elements.buttons.primary.appendChild(this.__internal.buttons[0].element):this.elements.buttons.primary.appendChild(this.__internal.buttons[1].element)}},callback:function(e){var n;switch(e.index){case 0:this.settings.value=t.value,"function"==typeof this.get("onok")&&void 0!==(n=this.get("onok").call(this,e,this.settings.value))&&(e.cancel=!n);break;case 1:"function"==typeof this.get("oncancel")&&void 0!==(n=this.get("oncancel").call(this,e))&&(e.cancel=!n),e.cancel||(t.value=this.settings.value)}}}})),"object"==typeof t.exports?t.exports=N:void 0===(n=function(){return N}.apply(e,[]))||(t.exports=n)}("undefined"!=typeof window?window:this)},96814:function(t,e,n){n(17321);var r=n(79614),i=r.Service,o=r.apiLoader;o.services.kinesis={},r.Kinesis=i.defineService("kinesis",["2013-12-02"]),Object.defineProperty(o.services.kinesis,"2013-12-02",{get:function(){var t=n(648);return t.paginators=n(10424).o,t.waiters=n(54059).V,t},enumerable:!0,configurable:!0}),t.exports=r.Kinesis},94184:function(t,e){var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var t=[],e=0;e<arguments.length;e++){var n=arguments[e];if(n){var o=typeof n;if("string"===o||"number"===o)t.push(n);else if(Array.isArray(n)){if(n.length){var a=i.apply(null,n);a&&t.push(a)}}else if("object"===o){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){t.push(n.toString());continue}for(var s in n)r.call(n,s)&&n[s]&&t.push(s)}}}return t.join(" ")}t.exports?(i.default=i,t.exports=i):void 0===(n=function(){return i}.apply(e,[]))||(t.exports=n)}()},95631:function(t,e,n){"use strict";var r=n(70030),i=n(47045),o=n(89190),a=n(49974),s=n(25787),u=n(68554),l=n(20408),c=n(51656),f=n(76178),h=n(96340),d=n(19781),p=n(62423).fastKey,m=n(29909),g=m.set,v=m.getterFor;t.exports={getConstructor:function(t,e,n,c){var f=t((function(t,i){s(t,h),g(t,{type:e,index:r(null),first:void 0,last:void 0,size:0}),d||(t.size=0),u(i)||l(i,t[c],{that:t,AS_ENTRIES:n})})),h=f.prototype,m=v(e),y=function(t,e,n){var r,i,o=m(t),a=b(t,e);return a?a.value=n:(o.last=a={index:i=p(e,!0),key:e,value:n,previous:r=o.last,next:void 0,removed:!1},o.first||(o.first=a),r&&(r.next=a),d?o.size++:t.size++,"F"!==i&&(o.index[i]=a)),t},b=function(t,e){var n,r=m(t),i=p(e);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==e)return n};return o(h,{clear:function(){for(var t=m(this),e=t.index,n=t.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete e[n.index],n=n.next;t.first=t.last=void 0,d?t.size=0:this.size=0},delete:function(t){var e=this,n=m(e),r=b(e,t);if(r){var i=r.next,o=r.previous;delete n.index[r.index],r.removed=!0,o&&(o.next=i),i&&(i.previous=o),n.first==r&&(n.first=i),n.last==r&&(n.last=o),d?n.size--:e.size--}return!!r},forEach:function(t){for(var e,n=m(this),r=a(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:n.first;)for(r(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!b(this,t)}}),o(h,n?{get:function(t){var e=b(this,t);return e&&e.value},set:function(t,e){return y(this,0===t?0:t,e)}}:{add:function(t){return y(this,t=0===t?0:t,t)}}),d&&i(h,"size",{configurable:!0,get:function(){return m(this).size}}),f},setStrong:function(t,e,n){var r=e+" Iterator",i=v(e),o=v(r);c(t,e,(function(t,e){g(this,{type:r,target:t,state:i(t),kind:e,last:void 0})}),(function(){for(var t=o(this),e=t.kind,n=t.last;n&&n.removed;)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?f("keys"==e?n.key:"values"==e?n.value:[n.key,n.value],!1):(t.target=void 0,f(void 0,!0))}),n?"entries":"values",!n,!0),h(e)}}},69098:function(t,e,n){"use strict";n(77710)("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),n(95631))},51532:function(t,e,n){n(69098)},17727:function(t,e,n){"use strict";var r=n(82109),i=n(31913),o=n(2492),a=n(47293),s=n(35005),u=n(60614),l=n(36707),c=n(69478),f=n(98052),h=o&&o.prototype;if(r({target:"Promise",proto:!0,real:!0,forced:!!o&&a((function(){h.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=l(this,s("Promise")),n=u(t);return this.then(n?function(n){return c(e,t()).then((function(){return n}))}:t,n?function(n){return c(e,t()).then((function(){throw n}))}:t)}}),!i&&u(o)){var d=s("Promise").prototype.finally;h.finally!==d&&f(h,"finally",d,{unsafe:!0})}},37227:function(t,e,n){"use strict";n(77710)("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),n(95631))},70189:function(t,e,n){n(37227)},68757:function(t,e,n){"use strict";var r=n(82109),i=n(46916),o=n(1702),a=n(84488),s=n(60614),u=n(68554),l=n(47850),c=n(41340),f=n(58173),h=n(34706),d=n(10647),p=n(5112),m=n(31913),g=p("replace"),v=TypeError,y=o("".indexOf),b=o("".replace),x=o("".slice),w=Math.max,_=function(t,e,n){return n>t.length?-1:""===e?n:y(t,e,n)};r({target:"String",proto:!0},{replaceAll:function(t,e){var n,r,o,p,S,O,N,M,E,k=a(this),C=0,T=0,D="";if(!u(t)){if((n=l(t))&&(r=c(a(h(t))),!~y(r,"g")))throw v("`.replaceAll` does not allow non-global regexes");if(o=f(t,g))return i(o,t,k,e);if(m&&n)return b(c(k),t,e)}for(p=c(k),S=c(t),(O=s(e))||(e=c(e)),N=S.length,M=w(1,N),C=_(p,S,0);-1!==C;)E=O?c(e(S,C,p)):d(S,p,C,[],void 0,e),D+=x(p,T,C)+E,T=C+N,C=_(p,S,C+M);return T<p.length&&(D+=x(p,T)),D}})},27207:function(t,e,n){n(68757)},36511:function(t,e,n){"use strict";var r=n(27418),i={};function o(t,e,n,r,i,o,a,s){if(!t){var u;if(void 0===e)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,o,a,s],c=0;(u=new Error(e.replace(/%s/g,(function(){return l[c++]})))).name="Invariant Violation"}throw u.framesToPop=1,u}}var a="mixins";t.exports=function(t,e,n){var s=[],u={mixins:"DEFINE_MANY",statics:"DEFINE_MANY",propTypes:"DEFINE_MANY",contextTypes:"DEFINE_MANY",childContextTypes:"DEFINE_MANY",getDefaultProps:"DEFINE_MANY_MERGED",getInitialState:"DEFINE_MANY_MERGED",getChildContext:"DEFINE_MANY_MERGED",render:"DEFINE_ONCE",componentWillMount:"DEFINE_MANY",componentDidMount:"DEFINE_MANY",componentWillReceiveProps:"DEFINE_MANY",shouldComponentUpdate:"DEFINE_ONCE",componentWillUpdate:"DEFINE_MANY",componentDidUpdate:"DEFINE_MANY",componentWillUnmount:"DEFINE_MANY",UNSAFE_componentWillMount:"DEFINE_MANY",UNSAFE_componentWillReceiveProps:"DEFINE_MANY",UNSAFE_componentWillUpdate:"DEFINE_MANY",updateComponent:"OVERRIDE_BASE"},l={getDerivedStateFromProps:"DEFINE_MANY_MERGED"},c={displayName:function(t,e){t.displayName=e},mixins:function(t,e){if(e)for(var n=0;n<e.length;n++)h(t,e[n])},childContextTypes:function(t,e){t.childContextTypes=r({},t.childContextTypes,e)},contextTypes:function(t,e){t.contextTypes=r({},t.contextTypes,e)},getDefaultProps:function(t,e){t.getDefaultProps?t.getDefaultProps=p(t.getDefaultProps,e):t.getDefaultProps=e},propTypes:function(t,e){t.propTypes=r({},t.propTypes,e)},statics:function(t,e){!function(t,e){if(e)for(var n in e){var r=e[n];if(e.hasOwnProperty(n)){if(o(!(n in c),'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.',n),n in t)return o("DEFINE_MANY_MERGED"===(l.hasOwnProperty(n)?l[n]:null),"ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",n),void(t[n]=p(t[n],r));t[n]=r}}}(t,e)},autobind:function(){}};function f(t,e){var n=u.hasOwnProperty(e)?u[e]:null;b.hasOwnProperty(e)&&o("OVERRIDE_BASE"===n,"ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",e),t&&o("DEFINE_MANY"===n||"DEFINE_MANY_MERGED"===n,"ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",e)}function h(t,n){if(n){o("function"!=typeof n,"ReactClass: You're attempting to use a component class or function as a mixin. Instead, just use a regular object."),o(!e(n),"ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object.");var r=t.prototype,i=r.__reactAutoBindPairs;for(var s in n.hasOwnProperty(a)&&c.mixins(t,n.mixins),n)if(n.hasOwnProperty(s)&&s!==a){var l=n[s],h=r.hasOwnProperty(s);if(f(h,s),c.hasOwnProperty(s))c[s](t,l);else{var d=u.hasOwnProperty(s);if("function"!=typeof l||d||h||!1===n.autobind)if(h){var g=u[s];o(d&&("DEFINE_MANY_MERGED"===g||"DEFINE_MANY"===g),"ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.",g,s),"DEFINE_MANY_MERGED"===g?r[s]=p(r[s],l):"DEFINE_MANY"===g&&(r[s]=m(r[s],l))}else r[s]=l;else i.push(s,l),r[s]=l}}}}function d(t,e){for(var n in o(t&&e&&"object"==typeof t&&"object"==typeof e,"mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects."),e)e.hasOwnProperty(n)&&(o(void 0===t[n],"mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.",n),t[n]=e[n]);return t}function p(t,e){return function(){var n=t.apply(this,arguments),r=e.apply(this,arguments);if(null==n)return r;if(null==r)return n;var i={};return d(i,n),d(i,r),i}}function m(t,e){return function(){t.apply(this,arguments),e.apply(this,arguments)}}function g(t,e){return e.bind(t)}var v={componentDidMount:function(){this.__isMounted=!0}},y={componentWillUnmount:function(){this.__isMounted=!1}},b={replaceState:function(t,e){this.updater.enqueueReplaceState(this,t,e)},isMounted:function(){return!!this.__isMounted}},x=function(){};return r(x.prototype,t.prototype,b),function(t){var e=function(t,r,a){this.__reactAutoBindPairs.length&&function(t){for(var e=t.__reactAutoBindPairs,n=0;n<e.length;n+=2){var r=e[n],i=e[n+1];t[r]=g(t,i)}}(this),this.props=t,this.context=r,this.refs=i,this.updater=a||n,this.state=null;var s=this.getInitialState?this.getInitialState():null;o("object"==typeof s&&!Array.isArray(s),"%s.getInitialState(): must return an object or null",e.displayName||"ReactCompositeComponent"),this.state=s};for(var r in e.prototype=new x,e.prototype.constructor=e,e.prototype.__reactAutoBindPairs=[],s.forEach(h.bind(null,e)),h(e,v),h(e,t),h(e,y),e.getDefaultProps&&(e.defaultProps=e.getDefaultProps()),o(e.prototype.render,"createClass(...): Class specification must implement a `render` method."),u)e.prototype[r]||(e.prototype[r]=null);return e}}},72555:function(t,e,n){"use strict";var r=n(67294),i=n(36511);if(void 0===r)throw Error("create-react-class could not find the React object. If you are using script tags, make sure that React is being loaded before create-react-class.");var o=(new r.Component).updater;t.exports=i(r.Component,r.isValidElement,o)},40452:function(t,e,n){var r;t.exports=(r=n(78249),n(98269),n(68214),n(90888),n(75109),function(){var t=r,e=t.lib.BlockCipher,n=t.algo,i=[],o=[],a=[],s=[],u=[],l=[],c=[],f=[],h=[],d=[];!function(){for(var t=[],e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;var n=0,r=0;for(e=0;e<256;e++){var p=r^r<<1^r<<2^r<<3^r<<4;p=p>>>8^255&p^99,i[n]=p,o[p]=n;var m=t[n],g=t[m],v=t[g],y=257*t[p]^16843008*p;a[n]=y<<24|y>>>8,s[n]=y<<16|y>>>16,u[n]=y<<8|y>>>24,l[n]=y,y=16843009*v^65537*g^257*m^16843008*n,c[p]=y<<24|y>>>8,f[p]=y<<16|y>>>16,h[p]=y<<8|y>>>24,d[p]=y,n?(n=m^t[t[t[v^m]]],r^=t[t[r]]):n=r=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],m=n.AES=e.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var t=this._keyPriorReset=this._key,e=t.words,n=t.sigBytes/4,r=4*((this._nRounds=n+6)+1),o=this._keySchedule=[],a=0;a<r;a++)if(a<n)o[a]=e[a];else{var s=o[a-1];a%n?n>6&&a%n==4&&(s=i[s>>>24]<<24|i[s>>>16&255]<<16|i[s>>>8&255]<<8|i[255&s]):(s=i[(s=s<<8|s>>>24)>>>24]<<24|i[s>>>16&255]<<16|i[s>>>8&255]<<8|i[255&s],s^=p[a/n|0]<<24),o[a]=o[a-n]^s}for(var u=this._invKeySchedule=[],l=0;l<r;l++)a=r-l,s=l%4?o[a]:o[a-4],u[l]=l<4||a<=4?s:c[i[s>>>24]]^f[i[s>>>16&255]]^h[i[s>>>8&255]]^d[i[255&s]]}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,a,s,u,l,i)},decryptBlock:function(t,e){var n=t[e+1];t[e+1]=t[e+3],t[e+3]=n,this._doCryptBlock(t,e,this._invKeySchedule,c,f,h,d,o),n=t[e+1],t[e+1]=t[e+3],t[e+3]=n},_doCryptBlock:function(t,e,n,r,i,o,a,s){for(var u=this._nRounds,l=t[e]^n[0],c=t[e+1]^n[1],f=t[e+2]^n[2],h=t[e+3]^n[3],d=4,p=1;p<u;p++){var m=r[l>>>24]^i[c>>>16&255]^o[f>>>8&255]^a[255&h]^n[d++],g=r[c>>>24]^i[f>>>16&255]^o[h>>>8&255]^a[255&l]^n[d++],v=r[f>>>24]^i[h>>>16&255]^o[l>>>8&255]^a[255&c]^n[d++],y=r[h>>>24]^i[l>>>16&255]^o[c>>>8&255]^a[255&f]^n[d++];l=m,c=g,f=v,h=y}m=(s[l>>>24]<<24|s[c>>>16&255]<<16|s[f>>>8&255]<<8|s[255&h])^n[d++],g=(s[c>>>24]<<24|s[f>>>16&255]<<16|s[h>>>8&255]<<8|s[255&l])^n[d++],v=(s[f>>>24]<<24|s[h>>>16&255]<<16|s[l>>>8&255]<<8|s[255&c])^n[d++],y=(s[h>>>24]<<24|s[l>>>16&255]<<16|s[c>>>8&255]<<8|s[255&f])^n[d++],t[e]=m,t[e+1]=g,t[e+2]=v,t[e+3]=y},keySize:8});t.AES=e._createHelper(m)}(),r.AES)},75109:function(t,e,n){var r,i,o,a,s,u,l,c,f,h,d,p,m,g,v,y,b,x,w;t.exports=(r=n(78249),n(90888),void(r.lib.Cipher||(i=r,o=i.lib,a=o.Base,s=o.WordArray,u=o.BufferedBlockAlgorithm,l=i.enc,l.Utf8,c=l.Base64,f=i.algo.EvpKDF,h=o.Cipher=u.extend({cfg:a.extend(),createEncryptor:function(t,e){return this.create(this._ENC_XFORM_MODE,t,e)},createDecryptor:function(t,e){return this.create(this._DEC_XFORM_MODE,t,e)},init:function(t,e,n){this.cfg=this.cfg.extend(n),this._xformMode=t,this._key=e,this.reset()},reset:function(){u.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){return t&&this._append(t),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function t(t){return"string"==typeof t?w:b}return function(e){return{encrypt:function(n,r,i){return t(r).encrypt(e,n,r,i)},decrypt:function(n,r,i){return t(r).decrypt(e,n,r,i)}}}}()}),o.StreamCipher=h.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),d=i.mode={},p=o.BlockCipherMode=a.extend({createEncryptor:function(t,e){return this.Encryptor.create(t,e)},createDecryptor:function(t,e){return this.Decryptor.create(t,e)},init:function(t,e){this._cipher=t,this._iv=e}}),m=d.CBC=function(){var t=p.extend();function e(t,e,n){var r=this._iv;if(r){var i=r;this._iv=void 0}else i=this._prevBlock;for(var o=0;o<n;o++)t[e+o]^=i[o]}return t.Encryptor=t.extend({processBlock:function(t,n){var r=this._cipher,i=r.blockSize;e.call(this,t,n,i),r.encryptBlock(t,n),this._prevBlock=t.slice(n,n+i)}}),t.Decryptor=t.extend({processBlock:function(t,n){var r=this._cipher,i=r.blockSize,o=t.slice(n,n+i);r.decryptBlock(t,n),e.call(this,t,n,i),this._prevBlock=o}}),t}(),g=(i.pad={}).Pkcs7={pad:function(t,e){for(var n=4*e,r=n-t.sigBytes%n,i=r<<24|r<<16|r<<8|r,o=[],a=0;a<r;a+=4)o.push(i);var u=s.create(o,r);t.concat(u)},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},o.BlockCipher=h.extend({cfg:h.cfg.extend({mode:m,padding:g}),reset:function(){h.reset.call(this);var t=this.cfg,e=t.iv,n=t.mode;if(this._xformMode==this._ENC_XFORM_MODE)var r=n.createEncryptor;else r=n.createDecryptor,this._minBufferSize=1;this._mode&&this._mode.__creator==r?this._mode.init(this,e&&e.words):(this._mode=r.call(n,this,e&&e.words),this._mode.__creator=r)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){t.pad(this._data,this.blockSize);var e=this._process(!0)}else e=this._process(!0),t.unpad(e);return e},blockSize:4}),v=o.CipherParams=a.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}}),y=(i.format={}).OpenSSL={stringify:function(t){var e=t.ciphertext,n=t.salt;if(n)var r=s.create([1398893684,1701076831]).concat(n).concat(e);else r=e;return r.toString(c)},parse:function(t){var e=c.parse(t),n=e.words;if(1398893684==n[0]&&1701076831==n[1]){var r=s.create(n.slice(2,4));n.splice(0,4),e.sigBytes-=16}return v.create({ciphertext:e,salt:r})}},b=o.SerializableCipher=a.extend({cfg:a.extend({format:y}),encrypt:function(t,e,n,r){r=this.cfg.extend(r);var i=t.createEncryptor(n,r),o=i.finalize(e),a=i.cfg;return v.create({ciphertext:o,key:n,iv:a.iv,algorithm:t,mode:a.mode,padding:a.padding,blockSize:t.blockSize,formatter:r.format})},decrypt:function(t,e,n,r){return r=this.cfg.extend(r),e=this._parse(e,r.format),t.createDecryptor(n,r).finalize(e.ciphertext)},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),x=(i.kdf={}).OpenSSL={execute:function(t,e,n,r){r||(r=s.random(8));var i=f.create({keySize:e+n}).compute(t,r),o=s.create(i.words.slice(e),4*n);return i.sigBytes=4*e,v.create({key:i,iv:o,salt:r})}},w=o.PasswordBasedCipher=b.extend({cfg:b.cfg.extend({kdf:x}),encrypt:function(t,e,n,r){var i=(r=this.cfg.extend(r)).kdf.execute(n,t.keySize,t.ivSize);r.iv=i.iv;var o=b.encrypt.call(this,t,e,i.key,r);return o.mixIn(i),o},decrypt:function(t,e,n,r){r=this.cfg.extend(r),e=this._parse(e,r.format);var i=r.kdf.execute(n,t.keySize,t.ivSize,e.salt);return r.iv=i.iv,b.decrypt.call(this,t,e,i.key,r)}}))))},78249:function(t,e){var n;t.exports=(n=n||function(t,e){var n=Object.create||function(){function t(){}return function(e){var n;return t.prototype=e,n=new t,t.prototype=null,n}}(),r={},i=r.lib={},o=i.Base={extend:function(t){var e=n(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},a=i.WordArray=o.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:4*t.length},toString:function(t){return(t||u).stringify(this)},concat:function(t){var e=this.words,n=t.words,r=this.sigBytes,i=t.sigBytes;if(this.clamp(),r%4)for(var o=0;o<i;o++){var a=n[o>>>2]>>>24-o%4*8&255;e[r+o>>>2]|=a<<24-(r+o)%4*8}else for(o=0;o<i;o+=4)e[r+o>>>2]=n[o>>>2];return this.sigBytes+=i,this},clamp:function(){var e=this.words,n=this.sigBytes;e[n>>>2]&=4294967295<<32-n%4*8,e.length=t.ceil(n/4)},clone:function(){var t=o.clone.call(this);return t.words=this.words.slice(0),t},random:function(e){for(var n,r=[],i=function(e){var n=987654321,r=4294967295;return function(){var i=((n=36969*(65535&n)+(n>>16)&r)<<16)+(e=18e3*(65535&e)+(e>>16)&r)&r;return i/=4294967296,(i+=.5)*(t.random()>.5?1:-1)}},o=0;o<e;o+=4){var s=i(4294967296*(n||t.random()));n=987654071*s(),r.push(4294967296*s()|0)}return new a.init(r,e)}}),s=r.enc={},u=s.Hex={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;i<n;i++){var o=e[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r+=2)n[r>>>3]|=parseInt(t.substr(r,2),16)<<24-r%8*4;return new a.init(n,e/2)}},l=s.Latin1={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;i<n;i++){var o=e[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r++)n[r>>>2]|=(255&t.charCodeAt(r))<<24-r%4*8;return new a.init(n,e)}},c=s.Utf8={stringify:function(t){try{return decodeURIComponent(escape(l.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return l.parse(unescape(encodeURIComponent(t)))}},f=i.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=c.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var n=this._data,r=n.words,i=n.sigBytes,o=this.blockSize,s=i/(4*o),u=(s=e?t.ceil(s):t.max((0|s)-this._minBufferSize,0))*o,l=t.min(4*u,i);if(u){for(var c=0;c<u;c+=o)this._doProcessBlock(r,c);var f=r.splice(0,u);n.sigBytes-=l}return new a.init(f,l)},clone:function(){var t=o.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),h=(i.Hasher=f.extend({cfg:o.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){f.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(t){return function(e,n){return new t.init(n).finalize(e)}},_createHmacHelper:function(t){return function(e,n){return new h.HMAC.init(t,n).finalize(e)}}}),r.algo={});return r}(Math),n)},98269:function(t,e,n){var r,i,o;t.exports=(r=n(78249),o=(i=r).lib.WordArray,i.enc.Base64={stringify:function(t){var e=t.words,n=t.sigBytes,r=this._map;t.clamp();for(var i=[],o=0;o<n;o+=3)for(var a=(e[o>>>2]>>>24-o%4*8&255)<<16|(e[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|e[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s<n;s++)i.push(r.charAt(a>>>6*(3-s)&63));var u=r.charAt(64);if(u)for(;i.length%4;)i.push(u);return i.join("")},parse:function(t){var e=t.length,n=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var i=0;i<n.length;i++)r[n.charCodeAt(i)]=i}var a=n.charAt(64);if(a){var s=t.indexOf(a);-1!==s&&(e=s)}return function(t,e,n){for(var r=[],i=0,a=0;a<e;a++)if(a%4){var s=n[t.charCodeAt(a-1)]<<a%4*2,u=n[t.charCodeAt(a)]>>>6-a%4*2;r[i>>>2]|=(s|u)<<24-i%4*8,i++}return o.create(r,i)}(t,e,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},r.enc.Base64)},50298:function(t,e,n){var r;t.exports=(r=n(78249),function(){var t=r,e=t.lib.WordArray,n=t.enc;function i(t){return t<<8&4278255360|t>>>8&16711935}n.Utf16=n.Utf16BE={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;i<n;i+=2){var o=e[i>>>2]>>>16-i%4*8&65535;r.push(String.fromCharCode(o))}return r.join("")},parse:function(t){for(var n=t.length,r=[],i=0;i<n;i++)r[i>>>1]|=t.charCodeAt(i)<<16-i%2*16;return e.create(r,2*n)}},n.Utf16LE={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],o=0;o<n;o+=2){var a=i(e[o>>>2]>>>16-o%4*8&65535);r.push(String.fromCharCode(a))}return r.join("")},parse:function(t){for(var n=t.length,r=[],o=0;o<n;o++)r[o>>>1]|=i(t.charCodeAt(o)<<16-o%2*16);return e.create(r,2*n)}}}(),r.enc.Utf16)},90888:function(t,e,n){var r,i,o,a,s,u,l,c;t.exports=(c=n(78249),n(62783),n(89824),o=(i=(r=c).lib).Base,a=i.WordArray,u=(s=r.algo).MD5,l=s.EvpKDF=o.extend({cfg:o.extend({keySize:4,hasher:u,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var n=this.cfg,r=n.hasher.create(),i=a.create(),o=i.words,s=n.keySize,u=n.iterations;o.length<s;){l&&r.update(l);var l=r.update(t).finalize(e);r.reset();for(var c=1;c<u;c++)l=r.finalize(l),r.reset();i.concat(l)}return i.sigBytes=4*s,i}}),r.EvpKDF=function(t,e,n){return l.create(n).compute(t,e)},c.EvpKDF)},42209:function(t,e,n){var r,i,o,a;t.exports=(a=n(78249),n(75109),i=(r=a).lib.CipherParams,o=r.enc.Hex,r.format.Hex={stringify:function(t){return t.ciphertext.toString(o)},parse:function(t){var e=o.parse(t);return i.create({ciphertext:e})}},a.format.Hex)},89824:function(t,e,n){var r,i,o;t.exports=(i=(r=n(78249)).lib.Base,o=r.enc.Utf8,void(r.algo.HMAC=i.extend({init:function(t,e){t=this._hasher=new t.init,"string"==typeof e&&(e=o.parse(e));var n=t.blockSize,r=4*n;e.sigBytes>r&&(e=t.finalize(e)),e.clamp();for(var i=this._oKey=e.clone(),a=this._iKey=e.clone(),s=i.words,u=a.words,l=0;l<n;l++)s[l]^=1549556828,u[l]^=909522486;i.sigBytes=a.sigBytes=r,this.reset()},reset:function(){var t=this._hasher;t.reset(),t.update(this._iKey)},update:function(t){return this._hasher.update(t),this},finalize:function(t){var e=this._hasher,n=e.finalize(t);return e.reset(),e.finalize(this._oKey.clone().concat(n))}})))},81354:function(t,e,n){var r;t.exports=(r=n(78249),n(64938),n(4433),n(50298),n(98269),n(68214),n(62783),n(52153),n(87792),n(70034),n(17460),n(13327),n(30706),n(89824),n(2112),n(90888),n(75109),n(8568),n(74242),n(59968),n(27660),n(31148),n(43615),n(92807),n(71077),n(56475),n(16991),n(42209),n(40452),n(94253),n(51857),n(84454),n(93974),r)},4433:function(t,e,n){var r;t.exports=(r=n(78249),function(){if("function"==typeof ArrayBuffer){var t=r.lib.WordArray,e=t.init,n=t.init=function(t){if(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),(t instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)),t instanceof Uint8Array){for(var n=t.byteLength,r=[],i=0;i<n;i++)r[i>>>2]|=t[i]<<24-i%4*8;e.call(this,r,n)}else e.apply(this,arguments)};n.prototype=t}}(),r.lib.WordArray)},68214:function(t,e,n){var r;t.exports=(r=n(78249),function(t){var e=r,n=e.lib,i=n.WordArray,o=n.Hasher,a=e.algo,s=[];!function(){for(var e=0;e<64;e++)s[e]=4294967296*t.abs(t.sin(e+1))|0}();var u=a.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var n=0;n<16;n++){var r=e+n,i=t[r];t[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,a=t[e+0],u=t[e+1],d=t[e+2],p=t[e+3],m=t[e+4],g=t[e+5],v=t[e+6],y=t[e+7],b=t[e+8],x=t[e+9],w=t[e+10],_=t[e+11],S=t[e+12],O=t[e+13],N=t[e+14],M=t[e+15],E=o[0],k=o[1],C=o[2],T=o[3];E=l(E,k,C,T,a,7,s[0]),T=l(T,E,k,C,u,12,s[1]),C=l(C,T,E,k,d,17,s[2]),k=l(k,C,T,E,p,22,s[3]),E=l(E,k,C,T,m,7,s[4]),T=l(T,E,k,C,g,12,s[5]),C=l(C,T,E,k,v,17,s[6]),k=l(k,C,T,E,y,22,s[7]),E=l(E,k,C,T,b,7,s[8]),T=l(T,E,k,C,x,12,s[9]),C=l(C,T,E,k,w,17,s[10]),k=l(k,C,T,E,_,22,s[11]),E=l(E,k,C,T,S,7,s[12]),T=l(T,E,k,C,O,12,s[13]),C=l(C,T,E,k,N,17,s[14]),E=c(E,k=l(k,C,T,E,M,22,s[15]),C,T,u,5,s[16]),T=c(T,E,k,C,v,9,s[17]),C=c(C,T,E,k,_,14,s[18]),k=c(k,C,T,E,a,20,s[19]),E=c(E,k,C,T,g,5,s[20]),T=c(T,E,k,C,w,9,s[21]),C=c(C,T,E,k,M,14,s[22]),k=c(k,C,T,E,m,20,s[23]),E=c(E,k,C,T,x,5,s[24]),T=c(T,E,k,C,N,9,s[25]),C=c(C,T,E,k,p,14,s[26]),k=c(k,C,T,E,b,20,s[27]),E=c(E,k,C,T,O,5,s[28]),T=c(T,E,k,C,d,9,s[29]),C=c(C,T,E,k,y,14,s[30]),E=f(E,k=c(k,C,T,E,S,20,s[31]),C,T,g,4,s[32]),T=f(T,E,k,C,b,11,s[33]),C=f(C,T,E,k,_,16,s[34]),k=f(k,C,T,E,N,23,s[35]),E=f(E,k,C,T,u,4,s[36]),T=f(T,E,k,C,m,11,s[37]),C=f(C,T,E,k,y,16,s[38]),k=f(k,C,T,E,w,23,s[39]),E=f(E,k,C,T,O,4,s[40]),T=f(T,E,k,C,a,11,s[41]),C=f(C,T,E,k,p,16,s[42]),k=f(k,C,T,E,v,23,s[43]),E=f(E,k,C,T,x,4,s[44]),T=f(T,E,k,C,S,11,s[45]),C=f(C,T,E,k,M,16,s[46]),E=h(E,k=f(k,C,T,E,d,23,s[47]),C,T,a,6,s[48]),T=h(T,E,k,C,y,10,s[49]),C=h(C,T,E,k,N,15,s[50]),k=h(k,C,T,E,g,21,s[51]),E=h(E,k,C,T,S,6,s[52]),T=h(T,E,k,C,p,10,s[53]),C=h(C,T,E,k,w,15,s[54]),k=h(k,C,T,E,u,21,s[55]),E=h(E,k,C,T,b,6,s[56]),T=h(T,E,k,C,M,10,s[57]),C=h(C,T,E,k,v,15,s[58]),k=h(k,C,T,E,O,21,s[59]),E=h(E,k,C,T,m,6,s[60]),T=h(T,E,k,C,_,10,s[61]),C=h(C,T,E,k,d,15,s[62]),k=h(k,C,T,E,x,21,s[63]),o[0]=o[0]+E|0,o[1]=o[1]+k|0,o[2]=o[2]+C|0,o[3]=o[3]+T|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;n[i>>>5]|=128<<24-i%32;var o=t.floor(r/4294967296),a=r;n[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),e.sigBytes=4*(n.length+1),this._process();for(var s=this._hash,u=s.words,l=0;l<4;l++){var c=u[l];u[l]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8)}return s},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});function l(t,e,n,r,i,o,a){var s=t+(e&n|~e&r)+i+a;return(s<<o|s>>>32-o)+e}function c(t,e,n,r,i,o,a){var s=t+(e&r|n&~r)+i+a;return(s<<o|s>>>32-o)+e}function f(t,e,n,r,i,o,a){var s=t+(e^n^r)+i+a;return(s<<o|s>>>32-o)+e}function h(t,e,n,r,i,o,a){var s=t+(n^(e|~r))+i+a;return(s<<o|s>>>32-o)+e}e.MD5=o._createHelper(u),e.HmacMD5=o._createHmacHelper(u)}(Math),r.MD5)},8568:function(t,e,n){var r;t.exports=(r=n(78249),n(75109),r.mode.CFB=function(){var t=r.lib.BlockCipherMode.extend();function e(t,e,n,r){var i=this._iv;if(i){var o=i.slice(0);this._iv=void 0}else o=this._prevBlock;r.encryptBlock(o,0);for(var a=0;a<n;a++)t[e+a]^=o[a]}return t.Encryptor=t.extend({processBlock:function(t,n){var r=this._cipher,i=r.blockSize;e.call(this,t,n,i,r),this._prevBlock=t.slice(n,n+i)}}),t.Decryptor=t.extend({processBlock:function(t,n){var r=this._cipher,i=r.blockSize,o=t.slice(n,n+i);e.call(this,t,n,i,r),this._prevBlock=o}}),t}(),r.mode.CFB)},59968:function(t,e,n){var r;t.exports=(r=n(78249),n(75109),r.mode.CTRGladman=function(){var t=r.lib.BlockCipherMode.extend();function e(t){if(255==(t>>24&255)){var e=t>>16&255,n=t>>8&255,r=255&t;255===e?(e=0,255===n?(n=0,255===r?r=0:++r):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=r}else t+=1<<24;return t}var n=t.Encryptor=t.extend({processBlock:function(t,n){var r=this._cipher,i=r.blockSize,o=this._iv,a=this._counter;o&&(a=this._counter=o.slice(0),this._iv=void 0),function(t){0===(t[0]=e(t[0]))&&(t[1]=e(t[1]))}(a);var s=a.slice(0);r.encryptBlock(s,0);for(var u=0;u<i;u++)t[n+u]^=s[u]}});return t.Decryptor=n,t}(),r.mode.CTRGladman)},74242:function(t,e,n){var r,i,o;t.exports=(o=n(78249),n(75109),o.mode.CTR=(i=(r=o.lib.BlockCipherMode.extend()).Encryptor=r.extend({processBlock:function(t,e){var n=this._cipher,r=n.blockSize,i=this._iv,o=this._counter;i&&(o=this._counter=i.slice(0),this._iv=void 0);var a=o.slice(0);n.encryptBlock(a,0),o[r-1]=o[r-1]+1|0;for(var s=0;s<r;s++)t[e+s]^=a[s]}}),r.Decryptor=i,r),o.mode.CTR)},31148:function(t,e,n){var r,i;t.exports=(i=n(78249),n(75109),i.mode.ECB=((r=i.lib.BlockCipherMode.extend()).Encryptor=r.extend({processBlock:function(t,e){this._cipher.encryptBlock(t,e)}}),r.Decryptor=r.extend({processBlock:function(t,e){this._cipher.decryptBlock(t,e)}}),r),i.mode.ECB)},27660:function(t,e,n){var r,i,o;t.exports=(o=n(78249),n(75109),o.mode.OFB=(i=(r=o.lib.BlockCipherMode.extend()).Encryptor=r.extend({processBlock:function(t,e){var n=this._cipher,r=n.blockSize,i=this._iv,o=this._keystream;i&&(o=this._keystream=i.slice(0),this._iv=void 0),n.encryptBlock(o,0);for(var a=0;a<r;a++)t[e+a]^=o[a]}}),r.Decryptor=i,r),o.mode.OFB)},43615:function(t,e,n){var r;t.exports=(r=n(78249),n(75109),r.pad.AnsiX923={pad:function(t,e){var n=t.sigBytes,r=4*e,i=r-n%r,o=n+i-1;t.clamp(),t.words[o>>>2]|=i<<24-o%4*8,t.sigBytes+=i},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},r.pad.Ansix923)},92807:function(t,e,n){var r;t.exports=(r=n(78249),n(75109),r.pad.Iso10126={pad:function(t,e){var n=4*e,i=n-t.sigBytes%n;t.concat(r.lib.WordArray.random(i-1)).concat(r.lib.WordArray.create([i<<24],1))},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},r.pad.Iso10126)},71077:function(t,e,n){var r;t.exports=(r=n(78249),n(75109),r.pad.Iso97971={pad:function(t,e){t.concat(r.lib.WordArray.create([2147483648],1)),r.pad.ZeroPadding.pad(t,e)},unpad:function(t){r.pad.ZeroPadding.unpad(t),t.sigBytes--}},r.pad.Iso97971)},16991:function(t,e,n){var r;t.exports=(r=n(78249),n(75109),r.pad.NoPadding={pad:function(){},unpad:function(){}},r.pad.NoPadding)},56475:function(t,e,n){var r;t.exports=(r=n(78249),n(75109),r.pad.ZeroPadding={pad:function(t,e){var n=4*e;t.clamp(),t.sigBytes+=n-(t.sigBytes%n||n)},unpad:function(t){for(var e=t.words,n=t.sigBytes-1;!(e[n>>>2]>>>24-n%4*8&255);)n--;t.sigBytes=n+1}},r.pad.ZeroPadding)},2112:function(t,e,n){var r,i,o,a,s,u,l,c,f;t.exports=(f=n(78249),n(62783),n(89824),o=(i=(r=f).lib).Base,a=i.WordArray,u=(s=r.algo).SHA1,l=s.HMAC,c=s.PBKDF2=o.extend({cfg:o.extend({keySize:4,hasher:u,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var n=this.cfg,r=l.create(n.hasher,t),i=a.create(),o=a.create([1]),s=i.words,u=o.words,c=n.keySize,f=n.iterations;s.length<c;){var h=r.update(e).finalize(o);r.reset();for(var d=h.words,p=d.length,m=h,g=1;g<f;g++){m=r.finalize(m),r.reset();for(var v=m.words,y=0;y<p;y++)d[y]^=v[y]}i.concat(h),u[0]++}return i.sigBytes=4*c,i}}),r.PBKDF2=function(t,e,n){return c.create(n).compute(t,e)},f.PBKDF2)},93974:function(t,e,n){var r;t.exports=(r=n(78249),n(98269),n(68214),n(90888),n(75109),function(){var t=r,e=t.lib.StreamCipher,n=t.algo,i=[],o=[],a=[],s=n.RabbitLegacy=e.extend({_doReset:function(){var t=this._key.words,e=this.cfg.iv,n=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],r=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];this._b=0;for(var i=0;i<4;i++)u.call(this);for(i=0;i<8;i++)r[i]^=n[i+4&7];if(e){var o=e.words,a=o[0],s=o[1],l=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),c=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),f=l>>>16|4294901760&c,h=c<<16|65535&l;for(r[0]^=l,r[1]^=f,r[2]^=c,r[3]^=h,r[4]^=l,r[5]^=f,r[6]^=c,r[7]^=h,i=0;i<4;i++)u.call(this)}},_doProcessBlock:function(t,e){var n=this._X;u.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),t[e+r]^=i[r]},blockSize:4,ivSize:2});function u(){for(var t=this._X,e=this._C,n=0;n<8;n++)o[n]=e[n];for(e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0<o[0]>>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0<o[1]>>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0<o[2]>>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0<o[3]>>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0<o[4]>>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0<o[5]>>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0<o[6]>>>0?1:0)|0,this._b=e[7]>>>0<o[7]>>>0?1:0,n=0;n<8;n++){var r=t[n]+e[n],i=65535&r,s=r>>>16,u=((i*i>>>17)+i*s>>>15)+s*s,l=((4294901760&r)*r|0)+((65535&r)*r|0);a[n]=u^l}t[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,t[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,t[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,t[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,t[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,t[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,t[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,t[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.RabbitLegacy=e._createHelper(s)}(),r.RabbitLegacy)},84454:function(t,e,n){var r;t.exports=(r=n(78249),n(98269),n(68214),n(90888),n(75109),function(){var t=r,e=t.lib.StreamCipher,n=t.algo,i=[],o=[],a=[],s=n.Rabbit=e.extend({_doReset:function(){for(var t=this._key.words,e=this.cfg.iv,n=0;n<4;n++)t[n]=16711935&(t[n]<<8|t[n]>>>24)|4278255360&(t[n]<<24|t[n]>>>8);var r=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],i=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];for(this._b=0,n=0;n<4;n++)u.call(this);for(n=0;n<8;n++)i[n]^=r[n+4&7];if(e){var o=e.words,a=o[0],s=o[1],l=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),c=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),f=l>>>16|4294901760&c,h=c<<16|65535&l;for(i[0]^=l,i[1]^=f,i[2]^=c,i[3]^=h,i[4]^=l,i[5]^=f,i[6]^=c,i[7]^=h,n=0;n<4;n++)u.call(this)}},_doProcessBlock:function(t,e){var n=this._X;u.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),t[e+r]^=i[r]},blockSize:4,ivSize:2});function u(){for(var t=this._X,e=this._C,n=0;n<8;n++)o[n]=e[n];for(e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0<o[0]>>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0<o[1]>>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0<o[2]>>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0<o[3]>>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0<o[4]>>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0<o[5]>>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0<o[6]>>>0?1:0)|0,this._b=e[7]>>>0<o[7]>>>0?1:0,n=0;n<8;n++){var r=t[n]+e[n],i=65535&r,s=r>>>16,u=((i*i>>>17)+i*s>>>15)+s*s,l=((4294901760&r)*r|0)+((65535&r)*r|0);a[n]=u^l}t[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,t[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,t[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,t[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,t[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,t[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,t[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,t[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.Rabbit=e._createHelper(s)}(),r.Rabbit)},51857:function(t,e,n){var r;t.exports=(r=n(78249),n(98269),n(68214),n(90888),n(75109),function(){var t=r,e=t.lib.StreamCipher,n=t.algo,i=n.RC4=e.extend({_doReset:function(){for(var t=this._key,e=t.words,n=t.sigBytes,r=this._S=[],i=0;i<256;i++)r[i]=i;i=0;for(var o=0;i<256;i++){var a=i%n,s=e[a>>>2]>>>24-a%4*8&255;o=(o+r[i]+s)%256;var u=r[i];r[i]=r[o],r[o]=u}this._i=this._j=0},_doProcessBlock:function(t,e){t[e]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var t=this._S,e=this._i,n=this._j,r=0,i=0;i<4;i++){n=(n+t[e=(e+1)%256])%256;var o=t[e];t[e]=t[n],t[n]=o,r|=t[(t[e]+t[n])%256]<<24-8*i}return this._i=e,this._j=n,r}t.RC4=e._createHelper(i);var a=n.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var t=this.cfg.drop;t>0;t--)o.call(this)}});t.RC4Drop=e._createHelper(a)}(),r.RC4)},30706:function(t,e,n){var r;t.exports=(r=n(78249),function(t){var e=r,n=e.lib,i=n.WordArray,o=n.Hasher,a=e.algo,s=i.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),u=i.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),l=i.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),c=i.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),f=i.create([0,1518500249,1859775393,2400959708,2840853838]),h=i.create([1352829926,1548603684,1836072691,2053994217,0]),d=a.RIPEMD160=o.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var n=0;n<16;n++){var r=e+n,i=t[r];t[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o,a,d,x,w,_,S,O,N,M,E,k=this._hash.words,C=f.words,T=h.words,D=s.words,A=u.words,j=l.words,P=c.words;for(_=o=k[0],S=a=k[1],O=d=k[2],N=x=k[3],M=w=k[4],n=0;n<80;n+=1)E=o+t[e+D[n]]|0,E+=n<16?p(a,d,x)+C[0]:n<32?m(a,d,x)+C[1]:n<48?g(a,d,x)+C[2]:n<64?v(a,d,x)+C[3]:y(a,d,x)+C[4],E=(E=b(E|=0,j[n]))+w|0,o=w,w=x,x=b(d,10),d=a,a=E,E=_+t[e+A[n]]|0,E+=n<16?y(S,O,N)+T[0]:n<32?v(S,O,N)+T[1]:n<48?g(S,O,N)+T[2]:n<64?m(S,O,N)+T[3]:p(S,O,N)+T[4],E=(E=b(E|=0,P[n]))+M|0,_=M,M=N,N=b(O,10),O=S,S=E;E=k[1]+d+N|0,k[1]=k[2]+x+M|0,k[2]=k[3]+w+_|0,k[3]=k[4]+o+S|0,k[4]=k[0]+a+O|0,k[0]=E},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;e[r>>>5]|=128<<24-r%32,e[14+(r+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),t.sigBytes=4*(e.length+1),this._process();for(var i=this._hash,o=i.words,a=0;a<5;a++){var s=o[a];o[a]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return i},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});function p(t,e,n){return t^e^n}function m(t,e,n){return t&e|~t&n}function g(t,e,n){return(t|~e)^n}function v(t,e,n){return t&n|e&~n}function y(t,e,n){return t^(e|~n)}function b(t,e){return t<<e|t>>>32-e}e.RIPEMD160=o._createHelper(d),e.HmacRIPEMD160=o._createHmacHelper(d)}(Math),r.RIPEMD160)},62783:function(t,e,n){var r,i,o,a,s,u,l,c;t.exports=(i=(r=c=n(78249)).lib,o=i.WordArray,a=i.Hasher,s=r.algo,u=[],l=s.SHA1=a.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],l=0;l<80;l++){if(l<16)u[l]=0|t[e+l];else{var c=u[l-3]^u[l-8]^u[l-14]^u[l-16];u[l]=c<<1|c>>>31}var f=(r<<5|r>>>27)+s+u[l];f+=l<20?1518500249+(i&o|~i&a):l<40?1859775393+(i^o^a):l<60?(i&o|i&a|o&a)-1894007588:(i^o^a)-899497514,s=a,a=o,o=i<<30|i>>>2,i=r,r=f}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;return e[r>>>5]|=128<<24-r%32,e[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),e[15+(r+64>>>9<<4)]=n,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=a.clone.call(this);return t._hash=this._hash.clone(),t}}),r.SHA1=a._createHelper(l),r.HmacSHA1=a._createHmacHelper(l),c.SHA1)},87792:function(t,e,n){var r,i,o,a,s,u;t.exports=(u=n(78249),n(52153),i=(r=u).lib.WordArray,o=r.algo,a=o.SHA256,s=o.SHA224=a.extend({_doReset:function(){this._hash=new i.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var t=a._doFinalize.call(this);return t.sigBytes-=4,t}}),r.SHA224=a._createHelper(s),r.HmacSHA224=a._createHmacHelper(s),u.SHA224)},52153:function(t,e,n){var r;t.exports=(r=n(78249),function(t){var e=r,n=e.lib,i=n.WordArray,o=n.Hasher,a=e.algo,s=[],u=[];!function(){function e(e){for(var n=t.sqrt(e),r=2;r<=n;r++)if(!(e%r))return!1;return!0}function n(t){return 4294967296*(t-(0|t))|0}for(var r=2,i=0;i<64;)e(r)&&(i<8&&(s[i]=n(t.pow(r,.5))),u[i]=n(t.pow(r,1/3)),i++),r++}();var l=[],c=a.SHA256=o.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],c=n[5],f=n[6],h=n[7],d=0;d<64;d++){if(d<16)l[d]=0|t[e+d];else{var p=l[d-15],m=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,g=l[d-2],v=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;l[d]=m+l[d-7]+v+l[d-16]}var y=r&i^r&o^i&o,b=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),x=h+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&c^~s&f)+u[d]+l[d];h=f,f=c,c=s,s=a+x|0,a=o,o=i,i=r,r=x+(b+y)|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0,n[5]=n[5]+c|0,n[6]=n[6]+f|0,n[7]=n[7]+h|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;return n[i>>>5]|=128<<24-i%32,n[14+(i+64>>>9<<4)]=t.floor(r/4294967296),n[15+(i+64>>>9<<4)]=r,e.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA256=o._createHelper(c),e.HmacSHA256=o._createHmacHelper(c)}(Math),r.SHA256)},13327:function(t,e,n){var r;t.exports=(r=n(78249),n(64938),function(t){var e=r,n=e.lib,i=n.WordArray,o=n.Hasher,a=e.x64.Word,s=e.algo,u=[],l=[],c=[];!function(){for(var t=1,e=0,n=0;n<24;n++){u[t+5*e]=(n+1)*(n+2)/2%64;var r=(2*t+3*e)%5;t=e%5,e=r}for(t=0;t<5;t++)for(e=0;e<5;e++)l[t+5*e]=e+(2*t+3*e)%5*5;for(var i=1,o=0;o<24;o++){for(var s=0,f=0,h=0;h<7;h++){if(1&i){var d=(1<<h)-1;d<32?f^=1<<d:s^=1<<d-32}128&i?i=i<<1^113:i<<=1}c[o]=a.create(s,f)}}();var f=[];!function(){for(var t=0;t<25;t++)f[t]=a.create()}();var h=s.SHA3=o.extend({cfg:o.cfg.extend({outputLength:512}),_doReset:function(){for(var t=this._state=[],e=0;e<25;e++)t[e]=new a.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(t,e){for(var n=this._state,r=this.blockSize/2,i=0;i<r;i++){var o=t[e+2*i],a=t[e+2*i+1];o=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),(k=n[i]).high^=a,k.low^=o}for(var s=0;s<24;s++){for(var h=0;h<5;h++){for(var d=0,p=0,m=0;m<5;m++)d^=(k=n[h+5*m]).high,p^=k.low;var g=f[h];g.high=d,g.low=p}for(h=0;h<5;h++){var v=f[(h+4)%5],y=f[(h+1)%5],b=y.high,x=y.low;for(d=v.high^(b<<1|x>>>31),p=v.low^(x<<1|b>>>31),m=0;m<5;m++)(k=n[h+5*m]).high^=d,k.low^=p}for(var w=1;w<25;w++){var _=(k=n[w]).high,S=k.low,O=u[w];O<32?(d=_<<O|S>>>32-O,p=S<<O|_>>>32-O):(d=S<<O-32|_>>>64-O,p=_<<O-32|S>>>64-O);var N=f[l[w]];N.high=d,N.low=p}var M=f[0],E=n[0];for(M.high=E.high,M.low=E.low,h=0;h<5;h++)for(m=0;m<5;m++){var k=n[w=h+5*m],C=f[w],T=f[(h+1)%5+5*m],D=f[(h+2)%5+5*m];k.high=C.high^~T.high&D.high,k.low=C.low^~T.low&D.low}k=n[0];var A=c[s];k.high^=A.high,k.low^=A.low}},_doFinalize:function(){var e=this._data,n=e.words,r=(this._nDataBytes,8*e.sigBytes),o=32*this.blockSize;n[r>>>5]|=1<<24-r%32,n[(t.ceil((r+1)/o)*o>>>5)-1]|=128,e.sigBytes=4*n.length,this._process();for(var a=this._state,s=this.cfg.outputLength/8,u=s/8,l=[],c=0;c<u;c++){var f=a[c],h=f.high,d=f.low;h=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8),d=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),l.push(d),l.push(h)}return new i.init(l,s)},clone:function(){for(var t=o.clone.call(this),e=t._state=this._state.slice(0),n=0;n<25;n++)e[n]=e[n].clone();return t}});e.SHA3=o._createHelper(h),e.HmacSHA3=o._createHmacHelper(h)}(Math),r.SHA3)},17460:function(t,e,n){var r,i,o,a,s,u,l,c;t.exports=(c=n(78249),n(64938),n(70034),i=(r=c).x64,o=i.Word,a=i.WordArray,s=r.algo,u=s.SHA512,l=s.SHA384=u.extend({_doReset:function(){this._hash=new a.init([new o.init(3418070365,3238371032),new o.init(1654270250,914150663),new o.init(2438529370,812702999),new o.init(355462360,4144912697),new o.init(1731405415,4290775857),new o.init(2394180231,1750603025),new o.init(3675008525,1694076839),new o.init(1203062813,3204075428)])},_doFinalize:function(){var t=u._doFinalize.call(this);return t.sigBytes-=16,t}}),r.SHA384=u._createHelper(l),r.HmacSHA384=u._createHmacHelper(l),c.SHA384)},70034:function(t,e,n){var r;t.exports=(r=n(78249),n(64938),function(){var t=r,e=t.lib.Hasher,n=t.x64,i=n.Word,o=n.WordArray,a=t.algo;function s(){return i.create.apply(i,arguments)}var u=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],l=[];!function(){for(var t=0;t<80;t++)l[t]=s()}();var c=a.SHA512=e.extend({_doReset:function(){this._hash=new o.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],c=n[5],f=n[6],h=n[7],d=r.high,p=r.low,m=i.high,g=i.low,v=o.high,y=o.low,b=a.high,x=a.low,w=s.high,_=s.low,S=c.high,O=c.low,N=f.high,M=f.low,E=h.high,k=h.low,C=d,T=p,D=m,A=g,j=v,P=y,I=b,R=x,L=w,F=_,q=S,B=O,z=N,H=M,U=E,W=k,V=0;V<80;V++){var $=l[V];if(V<16)var Y=$.high=0|t[e+2*V],Z=$.low=0|t[e+2*V+1];else{var G=l[V-15],K=G.high,X=G.low,J=(K>>>1|X<<31)^(K>>>8|X<<24)^K>>>7,Q=(X>>>1|K<<31)^(X>>>8|K<<24)^(X>>>7|K<<25),tt=l[V-2],et=tt.high,nt=tt.low,rt=(et>>>19|nt<<13)^(et<<3|nt>>>29)^et>>>6,it=(nt>>>19|et<<13)^(nt<<3|et>>>29)^(nt>>>6|et<<26),ot=l[V-7],at=ot.high,st=ot.low,ut=l[V-16],lt=ut.high,ct=ut.low;Y=(Y=(Y=J+at+((Z=Q+st)>>>0<Q>>>0?1:0))+rt+((Z+=it)>>>0<it>>>0?1:0))+lt+((Z+=ct)>>>0<ct>>>0?1:0),$.high=Y,$.low=Z}var ft,ht=L&q^~L&z,dt=F&B^~F&H,pt=C&D^C&j^D&j,mt=T&A^T&P^A&P,gt=(C>>>28|T<<4)^(C<<30|T>>>2)^(C<<25|T>>>7),vt=(T>>>28|C<<4)^(T<<30|C>>>2)^(T<<25|C>>>7),yt=(L>>>14|F<<18)^(L>>>18|F<<14)^(L<<23|F>>>9),bt=(F>>>14|L<<18)^(F>>>18|L<<14)^(F<<23|L>>>9),xt=u[V],wt=xt.high,_t=xt.low,St=U+yt+((ft=W+bt)>>>0<W>>>0?1:0),Ot=vt+mt;U=z,W=H,z=q,H=B,q=L,B=F,L=I+(St=(St=(St=St+ht+((ft+=dt)>>>0<dt>>>0?1:0))+wt+((ft+=_t)>>>0<_t>>>0?1:0))+Y+((ft+=Z)>>>0<Z>>>0?1:0))+((F=R+ft|0)>>>0<R>>>0?1:0)|0,I=j,R=P,j=D,P=A,D=C,A=T,C=St+(gt+pt+(Ot>>>0<vt>>>0?1:0))+((T=ft+Ot|0)>>>0<ft>>>0?1:0)|0}p=r.low=p+T,r.high=d+C+(p>>>0<T>>>0?1:0),g=i.low=g+A,i.high=m+D+(g>>>0<A>>>0?1:0),y=o.low=y+P,o.high=v+j+(y>>>0<P>>>0?1:0),x=a.low=x+R,a.high=b+I+(x>>>0<R>>>0?1:0),_=s.low=_+F,s.high=w+L+(_>>>0<F>>>0?1:0),O=c.low=O+B,c.high=S+q+(O>>>0<B>>>0?1:0),M=f.low=M+H,f.high=N+z+(M>>>0<H>>>0?1:0),k=h.low=k+W,h.high=E+U+(k>>>0<W>>>0?1:0)},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;return e[r>>>5]|=128<<24-r%32,e[30+(r+128>>>10<<5)]=Math.floor(n/4294967296),e[31+(r+128>>>10<<5)]=n,t.sigBytes=4*e.length,this._process(),this._hash.toX32()},clone:function(){var t=e.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32});t.SHA512=e._createHelper(c),t.HmacSHA512=e._createHmacHelper(c)}(),r.SHA512)},94253:function(t,e,n){var r;t.exports=(r=n(78249),n(98269),n(68214),n(90888),n(75109),function(){var t=r,e=t.lib,n=e.WordArray,i=e.BlockCipher,o=t.algo,a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],u=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],l=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],c=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],f=o.DES=i.extend({_doReset:function(){for(var t=this._key.words,e=[],n=0;n<56;n++){var r=a[n]-1;e[n]=t[r>>>5]>>>31-r%32&1}for(var i=this._subKeys=[],o=0;o<16;o++){var l=i[o]=[],c=u[o];for(n=0;n<24;n++)l[n/6|0]|=e[(s[n]-1+c)%28]<<31-n%6,l[4+(n/6|0)]|=e[28+(s[n+24]-1+c)%28]<<31-n%6;for(l[0]=l[0]<<1|l[0]>>>31,n=1;n<7;n++)l[n]=l[n]>>>4*(n-1)+3;l[7]=l[7]<<5|l[7]>>>27}var f=this._invSubKeys=[];for(n=0;n<16;n++)f[n]=i[15-n]},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._subKeys)},decryptBlock:function(t,e){this._doCryptBlock(t,e,this._invSubKeys)},_doCryptBlock:function(t,e,n){this._lBlock=t[e],this._rBlock=t[e+1],h.call(this,4,252645135),h.call(this,16,65535),d.call(this,2,858993459),d.call(this,8,16711935),h.call(this,1,1431655765);for(var r=0;r<16;r++){for(var i=n[r],o=this._lBlock,a=this._rBlock,s=0,u=0;u<8;u++)s|=l[u][((a^i[u])&c[u])>>>0];this._lBlock=a,this._rBlock=o^s}var f=this._lBlock;this._lBlock=this._rBlock,this._rBlock=f,h.call(this,1,1431655765),d.call(this,8,16711935),d.call(this,2,858993459),h.call(this,16,65535),h.call(this,4,252645135),t[e]=this._lBlock,t[e+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function h(t,e){var n=(this._lBlock>>>t^this._rBlock)&e;this._rBlock^=n,this._lBlock^=n<<t}function d(t,e){var n=(this._rBlock>>>t^this._lBlock)&e;this._lBlock^=n,this._rBlock^=n<<t}t.DES=i._createHelper(f);var p=o.TripleDES=i.extend({_doReset:function(){var t=this._key.words;this._des1=f.createEncryptor(n.create(t.slice(0,2))),this._des2=f.createEncryptor(n.create(t.slice(2,4))),this._des3=f.createEncryptor(n.create(t.slice(4,6)))},encryptBlock:function(t,e){this._des1.encryptBlock(t,e),this._des2.decryptBlock(t,e),this._des3.encryptBlock(t,e)},decryptBlock:function(t,e){this._des3.decryptBlock(t,e),this._des2.encryptBlock(t,e),this._des1.decryptBlock(t,e)},keySize:6,ivSize:2,blockSize:2});t.TripleDES=i._createHelper(p)}(),r.TripleDES)},64938:function(t,e,n){var r,i,o,a,s,u;t.exports=(r=n(78249),o=(i=r).lib,a=o.Base,s=o.WordArray,(u=i.x64={}).Word=a.extend({init:function(t,e){this.high=t,this.low=e}}),u.WordArray=a.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:8*t.length},toX32:function(){for(var t=this.words,e=t.length,n=[],r=0;r<e;r++){var i=t[r];n.push(i.high),n.push(i.low)}return s.create(n,this.sigBytes)},clone:function(){for(var t=a.clone.call(this),e=t.words=this.words.slice(0),n=e.length,r=0;r<n;r++)e[r]=e[r].clone();return t}}),r)},52942:function(t,e,n){var r,i;!function(){function o(t){return t&&(t.ownerDocument||t.document||t).documentElement}function a(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}function s(t,e){return e>t?-1:t>e?1:t>=e?0:NaN}function u(t){return null===t?NaN:+t}function l(t){return!isNaN(t)}function c(t){return{left:function(e,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=e.length);i>r;){var o=r+i>>>1;t(e[o],n)<0?r=o+1:i=o}return r},right:function(e,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=e.length);i>r;){var o=r+i>>>1;t(e[o],n)>0?i=o:r=o+1}return r}}}function f(t){return t.length}function h(t,e){for(var n in e)Object.defineProperty(t.prototype,n,{value:e[n],enumerable:!1})}function d(){this._=Object.create(null)}function p(t){return(t+="")===ko||t[0]===Co?Co+t:t}function m(t){return(t+="")[0]===Co?t.slice(1):t}function g(t){return p(t)in this._}function v(t){return(t=p(t))in this._&&delete this._[t]}function y(){var t=[];for(var e in this._)t.push(m(e));return t}function b(){var t=0;for(var e in this._)++t;return t}function x(){for(var t in this._)return!1;return!0}function w(){this._=Object.create(null)}function _(t){return t}function S(t,e,n){return function(){var r=n.apply(e,arguments);return r===e?t:r}}function O(t,e){if(e in t)return e;e=e.charAt(0).toUpperCase()+e.slice(1);for(var n=0,r=To.length;r>n;++n){var i=To[n]+e;if(i in t)return i}}function N(){}function M(){}function E(t){function e(){for(var e,r=n,i=-1,o=r.length;++i<o;)(e=r[i].on)&&e.apply(this,arguments);return t}var n=[],r=new d;return e.on=function(e,i){var o,a=r.get(e);return arguments.length<2?a&&a.on:(a&&(a.on=null,n=n.slice(0,o=n.indexOf(a)).concat(n.slice(o+1)),r.remove(e)),i&&n.push(r.set(e,{on:i})),t)},e}function k(){vo.event.preventDefault()}function C(){for(var t,e=vo.event;t=e.sourceEvent;)e=t;return e}function T(t){for(var e=new M,n=0,r=arguments.length;++n<r;)e[arguments[n]]=E(e);return e.of=function(n,r){return function(i){try{var o=i.sourceEvent=vo.event;i.target=t,vo.event=i,e[i.type].apply(n,r)}finally{vo.event=o}}},e}function D(t){return Ao(t,Ro),t}function A(t){return"function"==typeof t?t:function(){return jo(t,this)}}function j(t){return"function"==typeof t?t:function(){return Po(t,this)}}function P(t,e){return t=vo.ns.qualify(t),null==e?t.local?function(){this.removeAttributeNS(t.space,t.local)}:function(){this.removeAttribute(t)}:"function"==typeof e?t.local?function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}:function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}:t.local?function(){this.setAttributeNS(t.space,t.local,e)}:function(){this.setAttribute(t,e)}}function I(t){return t.trim().replace(/\s+/g," ")}function R(t){return new RegExp("(?:^|\\s+)"+vo.requote(t)+"(?:\\s+|$)","g")}function L(t){return(t+"").trim().split(/^|\s+/)}function F(t,e){var n=(t=L(t).map(q)).length;return"function"==typeof e?function(){for(var r=-1,i=e.apply(this,arguments);++r<n;)t[r](this,i)}:function(){for(var r=-1;++r<n;)t[r](this,e)}}function q(t){var e=R(t);return function(n,r){if(i=n.classList)return r?i.add(t):i.remove(t);var i=n.getAttribute("class")||"";r?(e.lastIndex=0,e.test(i)||n.setAttribute("class",I(i+" "+t))):n.setAttribute("class",I(i.replace(e," ")))}}function B(t,e,n){return null==e?function(){this.style.removeProperty(t)}:"function"==typeof e?function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}:function(){this.style.setProperty(t,e,n)}}function z(t,e){return null==e?function(){delete this[t]}:"function"==typeof e?function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}:function(){this[t]=e}}function H(t){return"function"==typeof t?t:(t=vo.ns.qualify(t)).local?function(){return this.ownerDocument.createElementNS(t.space,t.local)}:function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Lo&&e.documentElement.namespaceURI===Lo?e.createElement(t):e.createElementNS(n,t)}}function U(){var t=this.parentNode;t&&t.removeChild(this)}function W(t){return{__data__:t}}function V(t){return function(){return Io(this,t)}}function $(t){return arguments.length||(t=s),function(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}}function Y(t,e){for(var n=0,r=t.length;r>n;n++)for(var i,o=t[n],a=0,s=o.length;s>a;a++)(i=o[a])&&e(i,a,n);return t}function Z(t){return Ao(t,qo),t}function G(t,e,n){function r(){var e=this[i];e&&(this.removeEventListener(t,e,e.$),delete this[i])}var i="__on"+t,o=t.indexOf("."),a=K;o>0&&(t=t.slice(0,o));var s=Bo.get(t);return s&&(t=s,a=X),o?e?function(){var o=a(e,bo(arguments));r.call(this),this.addEventListener(t,this[i]=o,o.$=n),o._=e}:r:e?N:function(){var e,n=new RegExp("^__on([^.]+)"+vo.requote(t)+"$");for(var r in this)if(e=r.match(n)){var i=this[r];this.removeEventListener(e[1],i,i.$),delete this[r]}}}function K(t,e){return function(n){var r=vo.event;vo.event=n,e[0]=this.__data__;try{t.apply(this,e)}finally{vo.event=r}}}function X(t,e){var n=K(t,e);return function(t){var e=this,r=t.relatedTarget;r&&(r===e||8&r.compareDocumentPosition(e))||n.call(e,t)}}function J(t){var e=".dragsuppress-"+ ++Ho,n="click"+e,r=vo.select(a(t)).on("touchmove"+e,k).on("dragstart"+e,k).on("selectstart"+e,k);if(null==zo&&(zo=!("onselectstart"in t)&&O(t.style,"userSelect")),zo){var i=o(t).style,s=i[zo];i[zo]="none"}return function(t){if(r.on(e,null),zo&&(i[zo]=s),t){var o=function(){r.on(n,null)};r.on(n,(function(){k(),o()}),!0),setTimeout(o,0)}}}function Q(t,e){e.changedTouches&&(e=e.changedTouches[0]);var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();if(0>Uo){var i=a(t);if(i.scrollX||i.scrollY){var o=(n=vo.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important"))[0][0].getScreenCTM();Uo=!(o.f||o.e),n.remove()}}return Uo?(r.x=e.pageX,r.y=e.pageY):(r.x=e.clientX,r.y=e.clientY),[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var s=t.getBoundingClientRect();return[e.clientX-s.left-t.clientLeft,e.clientY-s.top-t.clientTop]}function tt(){return vo.event.changedTouches[0].identifier}function et(t){return t>0?1:0>t?-1:0}function nt(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function rt(t){return t>1?0:-1>t?$o:Math.acos(t)}function it(t){return t>1?Go:-1>t?-Go:Math.asin(t)}function ot(t){return((t=Math.exp(t))+1/t)/2}function at(t){return(t=Math.sin(t/2))*t}function st(){}function ut(t,e,n){return this instanceof ut?(this.h=+t,this.s=+e,void(this.l=+n)):arguments.length<2?t instanceof ut?new ut(t.h,t.s,t.l):wt(""+t,_t,ut):new ut(t,e,n)}function lt(t,e,n){function r(t){return Math.round(255*function(t){return t>360?t-=360:0>t&&(t+=360),60>t?i+(o-i)*t/60:180>t?o:240>t?i+(o-i)*(240-t)/60:i}(t))}var i,o;return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)||0>e?0:e>1?1:e,i=2*(n=0>n?0:n>1?1:n)-(o=.5>=n?n*(1+e):n+e-n*e),new vt(r(t+120),r(t),r(t-120))}function ct(t,e,n){return this instanceof ct?(this.h=+t,this.c=+e,void(this.l=+n)):arguments.length<2?t instanceof ct?new ct(t.h,t.c,t.l):function(t,e,n){return t>0?new ct(Math.atan2(n,e)*Xo,Math.sqrt(e*e+n*n),t):new ct(NaN,NaN,t)}(t instanceof ht?t.l:(t=St((t=vo.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new ct(t,e,n)}function ft(t,e,n){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new ht(n,Math.cos(t*=Ko)*e,Math.sin(t)*e)}function ht(t,e,n){return this instanceof ht?(this.l=+t,this.a=+e,void(this.b=+n)):arguments.length<2?t instanceof ht?new ht(t.l,t.a,t.b):t instanceof ct?ft(t.h,t.c,t.l):St((t=vt(t)).r,t.g,t.b):new ht(t,e,n)}function dt(t,e,n){var r=(t+16)/116,i=r+e/500,o=r-n/200;return new vt(gt(3.2404542*(i=pt(i)*oa)-1.5371385*(r=pt(r)*aa)-.4985314*(o=pt(o)*sa)),gt(-.969266*i+1.8760108*r+.041556*o),gt(.0556434*i-.2040259*r+1.0572252*o))}function pt(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function mt(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function gt(t){return Math.round(255*(.00304>=t?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function vt(t,e,n){return this instanceof vt?(this.r=~~t,this.g=~~e,void(this.b=~~n)):arguments.length<2?t instanceof vt?new vt(t.r,t.g,t.b):wt(""+t,vt,lt):new vt(t,e,n)}function yt(t){return new vt(t>>16,t>>8&255,255&t)}function bt(t){return yt(t)+""}function xt(t){return 16>t?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function wt(t,e,n){var r,i,o,a=0,s=0,u=0;if(r=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(i=r[2].split(","),r[1]){case"hsl":return n(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return e(Nt(i[0]),Nt(i[1]),Nt(i[2]))}return(o=ca.get(t))?e(o.r,o.g,o.b):(null==t||"#"!==t.charAt(0)||isNaN(o=parseInt(t.slice(1),16))||(4===t.length?(a=(3840&o)>>4,a|=a>>4,s=240&o,s|=s>>4,u=15&o,u|=u<<4):7===t.length&&(a=(16711680&o)>>16,s=(65280&o)>>8,u=255&o)),e(a,s,u))}function _t(t,e,n){var r,i,o=Math.min(t/=255,e/=255,n/=255),a=Math.max(t,e,n),s=a-o,u=(a+o)/2;return s?(i=.5>u?s/(a+o):s/(2-a-o),r=t==a?(e-n)/s+(n>e?6:0):e==a?(n-t)/s+2:(t-e)/s+4,r*=60):(r=NaN,i=u>0&&1>u?0:r),new ut(r,i,u)}function St(t,e,n){var r=mt((.4124564*(t=Ot(t))+.3575761*(e=Ot(e))+.1804375*(n=Ot(n)))/oa),i=mt((.2126729*t+.7151522*e+.072175*n)/aa);return ht(116*i-16,500*(r-i),200*(i-mt((.0193339*t+.119192*e+.9503041*n)/sa)))}function Ot(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Nt(t){var e=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*e):e}function Mt(t){return"function"==typeof t?t:function(){return t}}function Et(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=null),kt(e,n,t,r)}}function kt(t,e,n,r){function i(){var t,e=u.status;if(!e&&function(t){var e=t.responseType;return e&&"text"!==e?t.response:t.responseText}(u)||e>=200&&300>e||304===e){try{t=n.call(o,u)}catch(t){return void a.error.call(o,t)}a.load.call(o,t)}else a.error.call(o,u)}var o={},a=vo.dispatch("beforesend","progress","load","error"),s={},u=new XMLHttpRequest,l=null;return!this.XDomainRequest||"withCredentials"in u||!/^(http(s)?:)?\/\//.test(t)||(u=new XDomainRequest),"onload"in u?u.onload=u.onerror=i:u.onreadystatechange=function(){u.readyState>3&&i()},u.onprogress=function(t){var e=vo.event;vo.event=t;try{a.progress.call(o,u)}finally{vo.event=e}},o.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?s[t]:(null==e?delete s[t]:s[t]=e+"",o)},o.mimeType=function(t){return arguments.length?(e=null==t?null:t+"",o):e},o.responseType=function(t){return arguments.length?(l=t,o):l},o.response=function(t){return n=t,o},["get","post"].forEach((function(t){o[t]=function(){return o.send.apply(o,[t].concat(bo(arguments)))}})),o.send=function(n,r,i){if(2===arguments.length&&"function"==typeof r&&(i=r,r=null),u.open(n,t,!0),null==e||"accept"in s||(s.accept=e+",*/*"),u.setRequestHeader)for(var c in s)u.setRequestHeader(c,s[c]);return null!=e&&u.overrideMimeType&&u.overrideMimeType(e),null!=l&&(u.responseType=l),null!=i&&o.on("error",i).on("load",(function(t){i(null,t)})),a.beforesend.call(o,u),u.send(null==r?null:r),o},o.abort=function(){return u.abort(),o},vo.rebind(o,a,"on"),null==r?o:o.get(function(t){return 1===t.length?function(e,n){t(null==e?n:null)}:t}(r))}function Ct(t,e,n){var r=arguments.length;2>r&&(e=0),3>r&&(n=Date.now());var i={c:t,t:n+e,n:null};return ha?ha.n=i:fa=i,ha=i,da||(pa=clearTimeout(pa),da=1,ma(Tt)),i}function Tt(){var t=Dt(),e=At()-t;e>24?(isFinite(e)&&(clearTimeout(pa),pa=setTimeout(Tt,e)),da=0):(da=1,ma(Tt))}function Dt(){for(var t=Date.now(),e=fa;e;)t>=e.t&&e.c(t-e.t)&&(e.c=null),e=e.n;return t}function At(){for(var t,e=fa,n=1/0;e;)e.c?(e.t<n&&(n=e.t),e=(t=e).n):e=t?t.n=e.n:fa=e.n;return ha=t,n}function jt(t,e){return e-(t?Math.ceil(Math.log(t)/Math.LN10):1)}function Pt(t){var e=t.decimal,n=t.thousands,r=t.grouping,i=t.currency,o=r&&n?function(t,e){for(var i=t.length,o=[],a=0,s=r[0],u=0;i>0&&s>0&&(u+s+1>e&&(s=Math.max(1,e-u)),o.push(t.substring(i-=s,i+s)),!((u+=s+1)>e));)s=r[a=(a+1)%r.length];return o.reverse().join(n)}:_;return function(t){var n=va.exec(t),r=n[1]||" ",a=n[2]||">",s=n[3]||"-",u=n[4]||"",l=n[5],c=+n[6],f=n[7],h=n[8],d=n[9],p=1,m="",g="",v=!1,y=!0;switch(h&&(h=+h.substring(1)),(l||"0"===r&&"="===a)&&(l=r="0",a="="),d){case"n":f=!0,d="g";break;case"%":p=100,g="%",d="f";break;case"p":p=100,g="%",d="r";break;case"b":case"o":case"x":case"X":"#"===u&&(m="0"+d.toLowerCase());case"c":y=!1;case"d":v=!0,h=0;break;case"s":p=-1,d="r"}"$"===u&&(m=i[0],g=i[1]),"r"!=d||h||(d="g"),null!=h&&("g"==d?h=Math.max(1,Math.min(21,h)):"e"!=d&&"f"!=d||(h=Math.max(0,Math.min(20,h)))),d=ya.get(d)||It;var b=l&&f;return function(t){var n=g;if(v&&t%1)return"";var i=0>t||0===t&&0>1/t?(t=-t,"-"):"-"===s?"":s;if(0>p){var u=vo.formatPrefix(t,h);t=u.scale(t),n=u.symbol+g}else t*=p;var x,w,_=(t=d(t,h)).lastIndexOf(".");if(0>_){var S=y?t.lastIndexOf("e"):-1;0>S?(x=t,w=""):(x=t.substring(0,S),w=t.substring(S))}else x=t.substring(0,_),w=e+t.substring(_+1);!l&&f&&(x=o(x,1/0));var O=m.length+x.length+w.length+(b?0:i.length),N=c>O?new Array(O=c-O+1).join(r):"";return b&&(x=o(N+x,N.length?c-w.length:1/0)),i+=m,t=x+w,("<"===a?i+t+N:">"===a?N+i+t:"^"===a?N.substring(0,O>>=1)+i+t+N.substring(O):i+(b?t:N+t))+n}}}function It(t){return t+""}function Rt(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Lt(t,e,n){function r(e){var n=t(e),r=o(n,1);return r-e>e-n?n:r}function i(n){return e(n=t(new xa(n-1)),1),n}function o(t,n){return e(t=new xa(+t),n),t}function a(t,r,o){var a=i(t),s=[];if(o>1)for(;r>a;)n(a)%o||s.push(new Date(+a)),e(a,1);else for(;r>a;)s.push(new Date(+a)),e(a,1);return s}t.floor=t,t.round=r,t.ceil=i,t.offset=o,t.range=a;var s=t.utc=Ft(t);return s.floor=s,s.round=Ft(r),s.ceil=Ft(i),s.offset=Ft(o),s.range=function(t,e,n){try{xa=Rt;var r=new Rt;return r._=t,a(r,e,n)}finally{xa=Date}},t}function Ft(t){return function(e,n){try{xa=Rt;var r=new Rt;return r._=e,t(r,n)._}finally{xa=Date}}}function qt(t){function e(t){function e(e){for(var n,i,o,a=[],s=-1,u=0;++s<r;)37===t.charCodeAt(s)&&(a.push(t.slice(u,s)),null!=(i=_a[n=t.charAt(++s)])&&(n=t.charAt(++s)),(o=x[n])&&(n=o(e,null==i?"e"===n?" ":"0":i)),a.push(n),u=s+1);return a.push(t.slice(u,s)),a.join("")}var r=t.length;return e.parse=function(e){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null};if(n(r,t,e,0)!=e.length)return null;"p"in r&&(r.H=r.H%12+12*r.p);var i=null!=r.Z&&xa!==Rt,o=new(i?Rt:xa);return"j"in r?o.setFullYear(r.y,0,r.j):"W"in r||"U"in r?("w"in r||(r.w="W"in r?1:0),o.setFullYear(r.y,0,1),o.setFullYear(r.y,0,"W"in r?(r.w+6)%7+7*r.W-(o.getDay()+5)%7:r.w+7*r.U-(o.getDay()+6)%7)):o.setFullYear(r.y,r.m,r.d),o.setHours(r.H+(r.Z/100|0),r.M+r.Z%100,r.S,r.L),i?o._:o},e.toString=function(){return t},e}function n(t,e,n,r){for(var i,o,a,s=0,u=e.length,l=n.length;u>s;){if(r>=l)return-1;if(37===(i=e.charCodeAt(s++))){if(a=e.charAt(s++),!(o=w[a in _a?e.charAt(s++):a])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}var r=t.dateTime,i=t.date,o=t.time,a=t.periods,s=t.days,u=t.shortDays,l=t.months,c=t.shortMonths;e.utc=function(t){function n(t){try{var e=new(xa=Rt);return e._=t,r(e)}finally{xa=Date}}var r=e(t);return n.parse=function(t){try{xa=Rt;var e=r.parse(t);return e&&e._}finally{xa=Date}},n.toString=r.toString,n},e.multi=e.utc.multi=ie;var f=vo.map(),h=zt(s),d=Ht(s),p=zt(u),m=Ht(u),g=zt(l),v=Ht(l),y=zt(c),b=Ht(c);a.forEach((function(t,e){f.set(t.toLowerCase(),e)}));var x={a:function(t){return u[t.getDay()]},A:function(t){return s[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return l[t.getMonth()]},c:e(r),d:function(t,e){return Bt(t.getDate(),e,2)},e:function(t,e){return Bt(t.getDate(),e,2)},H:function(t,e){return Bt(t.getHours(),e,2)},I:function(t,e){return Bt(t.getHours()%12||12,e,2)},j:function(t,e){return Bt(1+ba.dayOfYear(t),e,3)},L:function(t,e){return Bt(t.getMilliseconds(),e,3)},m:function(t,e){return Bt(t.getMonth()+1,e,2)},M:function(t,e){return Bt(t.getMinutes(),e,2)},p:function(t){return a[+(t.getHours()>=12)]},S:function(t,e){return Bt(t.getSeconds(),e,2)},U:function(t,e){return Bt(ba.sundayOfYear(t),e,2)},w:function(t){return t.getDay()},W:function(t,e){return Bt(ba.mondayOfYear(t),e,2)},x:e(i),X:e(o),y:function(t,e){return Bt(t.getFullYear()%100,e,2)},Y:function(t,e){return Bt(t.getFullYear()%1e4,e,4)},Z:ne,"%":function(){return"%"}},w={a:function(t,e,n){p.lastIndex=0;var r=p.exec(e.slice(n));return r?(t.w=m.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(t,e,n){h.lastIndex=0;var r=h.exec(e.slice(n));return r?(t.w=d.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(t,e,n){y.lastIndex=0;var r=y.exec(e.slice(n));return r?(t.m=b.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(t,e,n){g.lastIndex=0;var r=g.exec(e.slice(n));return r?(t.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(t,e,r){return n(t,x.c.toString(),e,r)},d:Kt,e:Kt,H:Jt,I:Jt,j:Xt,L:ee,m:Gt,M:Qt,p:function(t,e,n){var r=f.get(e.slice(n,n+=2).toLowerCase());return null==r?-1:(t.p=r,n)},S:te,U:Wt,w:Ut,W:Vt,x:function(t,e,r){return n(t,x.x.toString(),e,r)},X:function(t,e,r){return n(t,x.X.toString(),e,r)},y:Yt,Y:$t,Z:Zt,"%":re};return e}function Bt(t,e,n){var r=0>t?"-":"",i=(r?-t:t)+"",o=i.length;return r+(n>o?new Array(n-o+1).join(e)+i:i)}function zt(t){return new RegExp("^(?:"+t.map(vo.requote).join("|")+")","i")}function Ht(t){for(var e=new d,n=-1,r=t.length;++n<r;)e.set(t[n].toLowerCase(),n);return e}function Ut(t,e,n){Sa.lastIndex=0;var r=Sa.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Wt(t,e,n){Sa.lastIndex=0;var r=Sa.exec(e.slice(n));return r?(t.U=+r[0],n+r[0].length):-1}function Vt(t,e,n){Sa.lastIndex=0;var r=Sa.exec(e.slice(n));return r?(t.W=+r[0],n+r[0].length):-1}function $t(t,e,n){Sa.lastIndex=0;var r=Sa.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Yt(t,e,n){Sa.lastIndex=0;var r=Sa.exec(e.slice(n,n+2));return r?(t.y=function(t){return t+(t>68?1900:2e3)}(+r[0]),n+r[0].length):-1}function Zt(t,e,n){return/^[+-]\d{4}$/.test(e=e.slice(n,n+5))?(t.Z=-e,n+5):-1}function Gt(t,e,n){Sa.lastIndex=0;var r=Sa.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Kt(t,e,n){Sa.lastIndex=0;var r=Sa.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Xt(t,e,n){Sa.lastIndex=0;var r=Sa.exec(e.slice(n,n+3));return r?(t.j=+r[0],n+r[0].length):-1}function Jt(t,e,n){Sa.lastIndex=0;var r=Sa.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Qt(t,e,n){Sa.lastIndex=0;var r=Sa.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function te(t,e,n){Sa.lastIndex=0;var r=Sa.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function ee(t,e,n){Sa.lastIndex=0;var r=Sa.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function ne(t){var e=t.getTimezoneOffset(),n=e>0?"-":"+",r=Eo(e)/60|0,i=Eo(e)%60;return n+Bt(r,"0",2)+Bt(i,"0",2)}function re(t,e,n){Oa.lastIndex=0;var r=Oa.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function ie(t){for(var e=t.length,n=-1;++n<e;)t[n][0]=this(t[n][0]);return function(e){for(var n=0,r=t[n];!r[1](e);)r=t[++n];return r[0](e)}}function oe(){}function ae(t,e,n){var r=n.s=t+e,i=r-t,o=r-i;n.t=t-o+(e-i)}function se(t,e){t&&ka.hasOwnProperty(t.type)&&ka[t.type](t,e)}function ue(t,e,n){var r,i=-1,o=t.length-n;for(e.lineStart();++i<o;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function le(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)ue(t[n],e,1);e.polygonEnd()}function ce(){function t(t,e){e=e*Ko/2+$o/4;var n=(t*=Ko)-r,a=n>=0?1:-1,s=a*n,u=Math.cos(e),l=Math.sin(e),c=o*l,f=i*u+c*Math.cos(s),h=c*a*Math.sin(s);Ta.add(Math.atan2(h,f)),r=t,i=u,o=l}var e,n,r,i,o;Da.point=function(a,s){Da.point=t,r=(e=a)*Ko,i=Math.cos(s=(n=s)*Ko/2+$o/4),o=Math.sin(s)},Da.lineEnd=function(){t(e,n)}}function fe(t){var e=t[0],n=t[1],r=Math.cos(n);return[r*Math.cos(e),r*Math.sin(e),Math.sin(n)]}function he(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function de(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function pe(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function me(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function ge(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function ve(t){return[Math.atan2(t[1],t[0]),it(t[2])]}function ye(t,e){return Eo(t[0]-e[0])<Wo&&Eo(t[1]-e[1])<Wo}function be(t,e){t*=Ko;var n=Math.cos(e*=Ko);xe(n*Math.cos(t),n*Math.sin(t),Math.sin(e))}function xe(t,e,n){++Aa,Pa+=(t-Pa)/Aa,Ia+=(e-Ia)/Aa,Ra+=(n-Ra)/Aa}function we(){function t(t,i){t*=Ko;var o=Math.cos(i*=Ko),a=o*Math.cos(t),s=o*Math.sin(t),u=Math.sin(i),l=Math.atan2(Math.sqrt((l=n*u-r*s)*l+(l=r*a-e*u)*l+(l=e*s-n*a)*l),e*a+n*s+r*u);ja+=l,La+=l*(e+(e=a)),Fa+=l*(n+(n=s)),qa+=l*(r+(r=u)),xe(e,n,r)}var e,n,r;Ua.point=function(i,o){i*=Ko;var a=Math.cos(o*=Ko);e=a*Math.cos(i),n=a*Math.sin(i),r=Math.sin(o),Ua.point=t,xe(e,n,r)}}function _e(){Ua.point=be}function Se(){function t(t,e){t*=Ko;var n=Math.cos(e*=Ko),a=n*Math.cos(t),s=n*Math.sin(t),u=Math.sin(e),l=i*u-o*s,c=o*a-r*u,f=r*s-i*a,h=Math.sqrt(l*l+c*c+f*f),d=r*a+i*s+o*u,p=h&&-rt(d)/h,m=Math.atan2(h,d);Ba+=p*l,za+=p*c,Ha+=p*f,ja+=m,La+=m*(r+(r=a)),Fa+=m*(i+(i=s)),qa+=m*(o+(o=u)),xe(r,i,o)}var e,n,r,i,o;Ua.point=function(a,s){e=a,n=s,Ua.point=t,a*=Ko;var u=Math.cos(s*=Ko);r=u*Math.cos(a),i=u*Math.sin(a),o=Math.sin(s),xe(r,i,o)},Ua.lineEnd=function(){t(e,n),Ua.lineEnd=_e,Ua.point=be}}function Oe(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n}function Ne(){return!0}function Me(t,e,n,r,i){var o=[],a=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n=t[0],r=t[e];if(ye(n,r)){i.lineStart();for(var s=0;e>s;++s)i.point((n=t[s])[0],n[1]);return void i.lineEnd()}var u=new ke(n,t,null,!0),l=new ke(n,null,u,!1);u.o=l,o.push(u),a.push(l),u=new ke(r,t,null,!1),l=new ke(r,null,u,!0),u.o=l,o.push(u),a.push(l)}})),a.sort(e),Ee(o),Ee(a),o.length){for(var s=0,u=n,l=a.length;l>s;++s)a[s].e=u=!u;for(var c,f,h=o[0];;){for(var d=h,p=!0;d.v;)if((d=d.n)===h)return;c=d.z,i.lineStart();do{if(d.v=d.o.v=!0,d.e){if(p)for(s=0,l=c.length;l>s;++s)i.point((f=c[s])[0],f[1]);else r(d.x,d.n.x,1,i);d=d.n}else{if(p)for(s=(c=d.p.z).length-1;s>=0;--s)i.point((f=c[s])[0],f[1]);else r(d.x,d.p.x,-1,i);d=d.p}c=(d=d.o).z,p=!p}while(!d.v);i.lineEnd()}}}function Ee(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}function ke(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function Ce(t,e,n,r){return function(i,o){function a(e,n){var r=i(e,n);t(e=r[0],n=r[1])&&o.point(e,n)}function s(t,e){var n=i(t,e);g.point(n[0],n[1])}function u(){y.point=s,g.lineStart()}function l(){y.point=a,g.lineEnd()}function c(t,e){m.push([t,e]);var n=i(t,e);x.point(n[0],n[1])}function f(){x.lineStart(),m=[]}function h(){c(m[0][0],m[0][1]),x.lineEnd();var t,e=x.clean(),n=b.buffer(),r=n.length;if(m.pop(),p.push(m),m=null,r)if(1&e){var i,a=-1;if((r=(t=n[0]).length-1)>0){for(w||(o.polygonStart(),w=!0),o.lineStart();++a<r;)o.point((i=t[a])[0],i[1]);o.lineEnd()}}else r>1&&2&e&&n.push(n.pop().concat(n.shift())),d.push(n.filter(Te))}var d,p,m,g=e(o),v=i.invert(r[0],r[1]),y={point:a,lineStart:u,lineEnd:l,polygonStart:function(){y.point=c,y.lineStart=f,y.lineEnd=h,d=[],p=[]},polygonEnd:function(){y.point=a,y.lineStart=u,y.lineEnd=l,d=vo.merge(d);var t=function(t,e){var n=t[0],r=t[1],i=[Math.sin(n),-Math.cos(n),0],o=0,a=0;Ta.reset();for(var s=0,u=e.length;u>s;++s){var l=e[s],c=l.length;if(c)for(var f=l[0],h=f[0],d=f[1]/2+$o/4,p=Math.sin(d),m=Math.cos(d),g=1;;){g===c&&(g=0);var v=(t=l[g])[0],y=t[1]/2+$o/4,b=Math.sin(y),x=Math.cos(y),w=v-h,_=w>=0?1:-1,S=_*w,O=S>$o,N=p*b;if(Ta.add(Math.atan2(N*_*Math.sin(S),m*x+N*Math.cos(S))),o+=O?w+_*Yo:w,O^h>=n^v>=n){var M=de(fe(f),fe(t));ge(M);var E=de(i,M);ge(E);var k=(O^w>=0?-1:1)*it(E[2]);(r>k||r===k&&(M[0]||M[1]))&&(a+=O^w>=0?1:-1)}if(!g++)break;h=v,p=b,m=x,f=t}}return(-Wo>o||Wo>o&&-Wo>Ta)^1&a}(v,p);d.length?(w||(o.polygonStart(),w=!0),Me(d,Ae,t,n,o)):t&&(w||(o.polygonStart(),w=!0),o.lineStart(),n(null,null,1,o),o.lineEnd()),w&&(o.polygonEnd(),w=!1),d=p=null},sphere:function(){o.polygonStart(),o.lineStart(),n(null,null,1,o),o.lineEnd(),o.polygonEnd()}},b=De(),x=e(b),w=!1;return y}}function Te(t){return t.length>1}function De(){var t,e=[];return{lineStart:function(){e.push(t=[])},point:function(e,n){t.push([e,n])},lineEnd:N,buffer:function(){var n=e;return e=[],t=null,n},rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))}}}function Ae(t,e){return((t=t.x)[0]<0?t[1]-Go-Wo:Go-t[1])-((e=e.x)[0]<0?e[1]-Go-Wo:Go-e[1])}function je(t,e,n,r){return function(i){var o,a=i.a,s=i.b,u=a.x,l=a.y,c=0,f=1,h=s.x-u,d=s.y-l;if(o=t-u,h||!(o>0)){if(o/=h,0>h){if(c>o)return;f>o&&(f=o)}else if(h>0){if(o>f)return;o>c&&(c=o)}if(o=n-u,h||!(0>o)){if(o/=h,0>h){if(o>f)return;o>c&&(c=o)}else if(h>0){if(c>o)return;f>o&&(f=o)}if(o=e-l,d||!(o>0)){if(o/=d,0>d){if(c>o)return;f>o&&(f=o)}else if(d>0){if(o>f)return;o>c&&(c=o)}if(o=r-l,d||!(0>o)){if(o/=d,0>d){if(o>f)return;o>c&&(c=o)}else if(d>0){if(c>o)return;f>o&&(f=o)}return c>0&&(i.a={x:u+c*h,y:l+c*d}),1>f&&(i.b={x:u+f*h,y:l+f*d}),i}}}}}}function Pe(t,e,n,r){function i(r,i){return Eo(r[0]-t)<Wo?i>0?0:3:Eo(r[0]-n)<Wo?i>0?2:1:Eo(r[1]-e)<Wo?i>0?1:0:i>0?3:2}function o(t,e){return a(t.x,e.x)}function a(t,e){var n=i(t,1),r=i(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(s){function u(o,s,u,l){var c=0,f=0;if(null==o||(c=i(o,u))!==(f=i(s,u))||a(o,s)<0^u>0)do{l.point(0===c||3===c?t:n,c>1?r:e)}while((c=(c+u+4)%4)!==f);else l.point(s[0],s[1])}function l(i,o){return i>=t&&n>=i&&o>=e&&r>=o}function c(t,e){l(t,e)&&s.point(t,e)}function f(t,e){var n=l(t=Math.max(-Va,Math.min(Va,t)),e=Math.max(-Va,Math.min(Va,e)));if(d&&p.push([t,e]),w)m=t,g=e,v=n,w=!1,n&&(s.lineStart(),s.point(t,e));else if(n&&x)s.point(t,e);else{var r={a:{x:y,y:b},b:{x:t,y:e}};N(r)?(x||(s.lineStart(),s.point(r.a.x,r.a.y)),s.point(r.b.x,r.b.y),n||s.lineEnd(),_=!1):n&&(s.lineStart(),s.point(t,e),_=!1)}y=t,b=e,x=n}var h,d,p,m,g,v,y,b,x,w,_,S=s,O=De(),N=je(t,e,n,r),M={point:c,lineStart:function(){M.point=f,d&&d.push(p=[]),w=!0,x=!1,y=b=NaN},lineEnd:function(){h&&(f(m,g),v&&x&&O.rejoin(),h.push(O.buffer())),M.point=c,x&&s.lineEnd()},polygonStart:function(){s=O,h=[],d=[],_=!0},polygonEnd:function(){s=S,h=vo.merge(h);var e=function(t){for(var e=0,n=d.length,r=t[1],i=0;n>i;++i)for(var o,a=1,s=d[i],u=s.length,l=s[0];u>a;++a)o=s[a],l[1]<=r?o[1]>r&&nt(l,o,t)>0&&++e:o[1]<=r&&nt(l,o,t)<0&&--e,l=o;return 0!==e}([t,r]),n=_&&e,i=h.length;(n||i)&&(s.polygonStart(),n&&(s.lineStart(),u(null,null,1,s),s.lineEnd()),i&&Me(h,o,e,u,s),s.polygonEnd()),h=d=p=null}};return M}}function Ie(t){var e=0,n=$o/3,r=Ge(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*$o/180,n=t[1]*$o/180):[e/$o*180,n/$o*180]},i}function Re(t,e){function n(t,e){var n=Math.sqrt(o-2*i*Math.sin(e))/i;return[n*Math.sin(t*=i),a-n*Math.cos(t)]}var r=Math.sin(t),i=(r+Math.sin(e))/2,o=1+r*(2*i-r),a=Math.sqrt(o)/i;return n.invert=function(t,e){var n=a-e;return[Math.atan2(t,n)/i,it((o-(t*t+n*n)*i*i)/(2*i))]},n}function Le(){function t(t,e){Ya+=i*t-r*e,r=t,i=e}var e,n,r,i;Ja.point=function(o,a){Ja.point=t,e=r=o,n=i=a},Ja.lineEnd=function(){t(e,n)}}function Fe(){function t(t,e){a.push("M",t,",",e,o)}function e(t,e){a.push("M",t,",",e),s.point=n}function n(t,e){a.push("L",t,",",e)}function r(){s.point=t}function i(){a.push("Z")}var o=qe(4.5),a=[],s={point:t,lineStart:function(){s.point=e},lineEnd:r,polygonStart:function(){s.lineEnd=i},polygonEnd:function(){s.lineEnd=r,s.point=t},pointRadius:function(t){return o=qe(t),s},result:function(){if(a.length){var t=a.join("");return a=[],t}}};return s}function qe(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function Be(t,e){Pa+=t,Ia+=e,++Ra}function ze(){function t(t,r){var i=t-e,o=r-n,a=Math.sqrt(i*i+o*o);La+=a*(e+t)/2,Fa+=a*(n+r)/2,qa+=a,Be(e=t,n=r)}var e,n;ts.point=function(r,i){ts.point=t,Be(e=r,n=i)}}function He(){ts.point=Be}function Ue(){function t(t,e){var n=t-r,o=e-i,a=Math.sqrt(n*n+o*o);La+=a*(r+t)/2,Fa+=a*(i+e)/2,qa+=a,Ba+=(a=i*t-r*e)*(r+t),za+=a*(i+e),Ha+=3*a,Be(r=t,i=e)}var e,n,r,i;ts.point=function(o,a){ts.point=t,Be(e=r=o,n=i=a)},ts.lineEnd=function(){t(e,n)}}function We(t){function e(e,n){t.moveTo(e+a,n),t.arc(e,n,a,0,Yo)}function n(e,n){t.moveTo(e,n),s.point=r}function r(e,n){t.lineTo(e,n)}function i(){s.point=e}function o(){t.closePath()}var a=4.5,s={point:e,lineStart:function(){s.point=n},lineEnd:i,polygonStart:function(){s.lineEnd=o},polygonEnd:function(){s.lineEnd=i,s.point=e},pointRadius:function(t){return a=t,s},result:N};return s}function Ve(t){function e(t){return(s?r:n)(t)}function n(e){return Ye(e,(function(n,r){n=t(n,r),e.point(n[0],n[1])}))}function r(e){function n(n,r){n=t(n,r),e.point(n[0],n[1])}function r(){y=NaN,S.point=o,e.lineStart()}function o(n,r){var o=fe([n,r]),a=t(n,r);i(y,b,v,x,w,_,y=a[0],b=a[1],v=n,x=o[0],w=o[1],_=o[2],s,e),e.point(y,b)}function a(){S.point=n,e.lineEnd()}function u(){r(),S.point=l,S.lineEnd=c}function l(t,e){o(f=t,e),h=y,d=b,p=x,m=w,g=_,S.point=o}function c(){i(y,b,v,x,w,_,h,d,f,p,m,g,s,e),S.lineEnd=a,a()}var f,h,d,p,m,g,v,y,b,x,w,_,S={point:n,lineStart:r,lineEnd:a,polygonStart:function(){e.polygonStart(),S.lineStart=u},polygonEnd:function(){e.polygonEnd(),S.lineStart=r}};return S}function i(e,n,r,s,u,l,c,f,h,d,p,m,g,v){var y=c-e,b=f-n,x=y*y+b*b;if(x>4*o&&g--){var w=s+d,_=u+p,S=l+m,O=Math.sqrt(w*w+_*_+S*S),N=Math.asin(S/=O),M=Eo(Eo(S)-1)<Wo||Eo(r-h)<Wo?(r+h)/2:Math.atan2(_,w),E=t(M,N),k=E[0],C=E[1],T=k-e,D=C-n,A=b*T-y*D;(A*A/x>o||Eo((y*T+b*D)/x-.5)>.3||a>s*d+u*p+l*m)&&(i(e,n,r,s,u,l,k,C,M,w/=O,_/=O,S,g,v),v.point(k,C),i(k,C,M,w,_,S,c,f,h,d,p,m,g,v))}}var o=.5,a=Math.cos(30*Ko),s=16;return e.precision=function(t){return arguments.length?(s=(o=t*t)>0&&16,e):Math.sqrt(o)},e}function $e(t){this.stream=t}function Ye(t,e){return{point:e,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function Ze(t){return Ge((function(){return t}))()}function Ge(t){function e(t){return[(t=s(t[0]*Ko,t[1]*Ko))[0]*h+u,l-t[1]*h]}function n(t){return(t=s.invert((t[0]-u)/h,(l-t[1])/h))&&[t[0]*Xo,t[1]*Xo]}function r(){s=Oe(a=Qe(v,y,b),o);var t=o(m,g);return u=d-t[0]*h,l=p+t[1]*h,i()}function i(){return c&&(c.valid=!1,c=null),e}var o,a,s,u,l,c,f=Ve((function(t,e){return[(t=o(t,e))[0]*h+u,l-t[1]*h]})),h=150,d=480,p=250,m=0,g=0,v=0,y=0,b=0,x=Wa,w=_,S=null,O=null;return e.stream=function(t){return c&&(c.valid=!1),(c=Ke(x(a,f(w(t))))).valid=!0,c},e.clipAngle=function(t){return arguments.length?(x=null==t?(S=t,Wa):function(t){function e(t,e){return Math.cos(t)*Math.cos(e)>i}function n(t,e,n){var r=[1,0,0],o=de(fe(t),fe(e)),a=he(o,o),s=o[0],u=a-s*s;if(!u)return!n&&t;var l=i*a/u,c=-i*s/u,f=de(r,o),h=me(r,l);pe(h,me(o,c));var d=f,p=he(h,d),m=he(d,d),g=p*p-m*(he(h,h)-1);if(!(0>g)){var v=Math.sqrt(g),y=me(d,(-p-v)/m);if(pe(y,h),y=ve(y),!n)return y;var b,x=t[0],w=e[0],_=t[1],S=e[1];x>w&&(b=x,x=w,w=b);var O=w-x,N=Eo(O-$o)<Wo;if(!N&&_>S&&(b=_,_=S,S=b),N||Wo>O?N?_+S>0^y[1]<(Eo(y[0]-x)<Wo?_:S):_<=y[1]&&y[1]<=S:O>$o^(x<=y[0]&&y[0]<=w)){var M=me(d,(-p+v)/m);return pe(M,h),[y,ve(M)]}}}function r(e,n){var r=o?t:$o-t,i=0;return-r>e?i|=1:e>r&&(i|=2),-r>n?i|=4:n>r&&(i|=8),i}var i=Math.cos(t),o=i>0,a=Eo(i)>Wo;return Ce(e,(function(t){var i,s,u,l,c;return{lineStart:function(){l=u=!1,c=1},point:function(f,h){var d,p=[f,h],m=e(f,h),g=o?m?0:r(f,h):m?r(f+(0>f?$o:-$o),h):0;if(!i&&(l=u=m)&&t.lineStart(),m!==u&&(d=n(i,p),(ye(i,d)||ye(p,d))&&(p[0]+=Wo,p[1]+=Wo,m=e(p[0],p[1]))),m!==u)c=0,m?(t.lineStart(),d=n(p,i),t.point(d[0],d[1])):(d=n(i,p),t.point(d[0],d[1]),t.lineEnd()),i=d;else if(a&&i&&o^m){var v;g&s||!(v=n(p,i,!0))||(c=0,o?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1])))}!m||i&&ye(i,p)||t.point(p[0],p[1]),i=p,u=m,s=g},lineEnd:function(){u&&t.lineEnd(),i=null},clean:function(){return c|(l&&u)<<1}}}),rn(t,6*Ko),o?[0,-t]:[-$o,t-$o])}((S=+t)*Ko),i()):S},e.clipExtent=function(t){return arguments.length?(O=t,w=t?Pe(t[0][0],t[0][1],t[1][0],t[1][1]):_,i()):O},e.scale=function(t){return arguments.length?(h=+t,r()):h},e.translate=function(t){return arguments.length?(d=+t[0],p=+t[1],r()):[d,p]},e.center=function(t){return arguments.length?(m=t[0]%360*Ko,g=t[1]%360*Ko,r()):[m*Xo,g*Xo]},e.rotate=function(t){return arguments.length?(v=t[0]%360*Ko,y=t[1]%360*Ko,b=t.length>2?t[2]%360*Ko:0,r()):[v*Xo,y*Xo,b*Xo]},vo.rebind(e,f,"precision"),function(){return o=t.apply(this,arguments),e.invert=o.invert&&n,r()}}function Ke(t){return Ye(t,(function(e,n){t.point(e*Ko,n*Ko)}))}function Xe(t,e){return[t,e]}function Je(t,e){return[t>$o?t-Yo:-$o>t?t+Yo:t,e]}function Qe(t,e,n){return t?e||n?Oe(en(t),nn(e,n)):en(t):e||n?nn(e,n):Je}function tn(t){return function(e,n){return[(e+=t)>$o?e-Yo:-$o>e?e+Yo:e,n]}}function en(t){var e=tn(t);return e.invert=tn(-t),e}function nn(t,e){function n(t,e){var n=Math.cos(e),s=Math.cos(t)*n,u=Math.sin(t)*n,l=Math.sin(e),c=l*r+s*i;return[Math.atan2(u*o-c*a,s*r-l*i),it(c*o+u*a)]}var r=Math.cos(t),i=Math.sin(t),o=Math.cos(e),a=Math.sin(e);return n.invert=function(t,e){var n=Math.cos(e),s=Math.cos(t)*n,u=Math.sin(t)*n,l=Math.sin(e),c=l*o-u*a;return[Math.atan2(u*o+l*a,s*r+c*i),it(c*r-s*i)]},n}function rn(t,e){var n=Math.cos(t),r=Math.sin(t);return function(i,o,a,s){var u=a*e;null!=i?(i=on(n,i),o=on(n,o),(a>0?o>i:i>o)&&(i+=a*Yo)):(i=t+a*Yo,o=t-.5*u);for(var l,c=i;a>0?c>o:o>c;c-=u)s.point((l=ve([n,-r*Math.cos(c),-r*Math.sin(c)]))[0],l[1])}}function on(t,e){var n=fe(e);n[0]-=t,ge(n);var r=rt(-n[1]);return((-n[2]<0?-r:r)+2*Math.PI-Wo)%(2*Math.PI)}function an(t,e,n){var r=vo.range(t,e-Wo,n).concat(e);return function(t){return r.map((function(e){return[t,e]}))}}function sn(t,e,n){var r=vo.range(t,e-Wo,n).concat(e);return function(t){return r.map((function(e){return[e,t]}))}}function un(t){return t.source}function ln(t){return t.target}function cn(t,e){function n(e,n){var r=Math.cos(e),i=Math.cos(n),o=t(r*i);return[o*i*Math.sin(e),o*Math.sin(n)]}return n.invert=function(t,n){var r=Math.sqrt(t*t+n*n),i=e(r),o=Math.sin(i),a=Math.cos(i);return[Math.atan2(t*o,r*a),Math.asin(r&&n*o/r)]},n}function fn(t,e){function n(t,e){a>0?-Go+Wo>e&&(e=-Go+Wo):e>Go-Wo&&(e=Go-Wo);var n=a/Math.pow(i(e),o);return[n*Math.sin(o*t),a-n*Math.cos(o*t)]}var r=Math.cos(t),i=function(t){return Math.tan($o/4+t/2)},o=t===e?Math.sin(t):Math.log(r/Math.cos(e))/Math.log(i(e)/i(t)),a=r*Math.pow(i(t),o)/o;return o?(n.invert=function(t,e){var n=a-e,r=et(o)*Math.sqrt(t*t+n*n);return[Math.atan2(t,n)/o,2*Math.atan(Math.pow(a/r,1/o))-Go]},n):dn}function hn(t,e){function n(t,e){var n=o-e;return[n*Math.sin(i*t),o-n*Math.cos(i*t)]}var r=Math.cos(t),i=t===e?Math.sin(t):(r-Math.cos(e))/(e-t),o=r/i+t;return Eo(i)<Wo?Xe:(n.invert=function(t,e){var n=o-e;return[Math.atan2(t,n)/i,o-et(i)*Math.sqrt(t*t+n*n)]},n)}function dn(t,e){return[t,Math.log(Math.tan($o/4+e/2))]}function pn(t){var e,n=Ze(t),r=n.scale,i=n.translate,o=n.clipExtent;return n.scale=function(){var t=r.apply(n,arguments);return t===n?e?n.clipExtent(null):n:t},n.translate=function(){var t=i.apply(n,arguments);return t===n?e?n.clipExtent(null):n:t},n.clipExtent=function(t){var a=o.apply(n,arguments);if(a===n){if(e=null==t){var s=$o*r(),u=i();o([[u[0]-s,u[1]-s],[u[0]+s,u[1]+s]])}}else e&&(a=null);return a},n.clipExtent(null)}function mn(t,e){return[Math.log(Math.tan($o/4+e/2)),-t]}function gn(t){return t[0]}function vn(t){return t[1]}function yn(t){for(var e=t.length,n=[0,1],r=2,i=2;e>i;i++){for(;r>1&&nt(t[n[r-2]],t[n[r-1]],t[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function bn(t,e){return t[0]-e[0]||t[1]-e[1]}function xn(t,e,n){return(n[0]-e[0])*(t[1]-e[1])<(n[1]-e[1])*(t[0]-e[0])}function wn(t,e,n,r){var i=t[0],o=n[0],a=e[0]-i,s=r[0]-o,u=t[1],l=n[1],c=e[1]-u,f=r[1]-l,h=(s*(u-l)-f*(i-o))/(f*a-s*c);return[i+h*a,u+h*c]}function _n(t){var e=t[0],n=t[t.length-1];return!(e[0]-n[0]||e[1]-n[1])}function Sn(){Hn(this),this.edge=this.site=this.circle=null}function On(t){var e=ps.pop()||new Sn;return e.site=t,e}function Nn(t){Pn(t),fs.remove(t),ps.push(t),Hn(t)}function Mn(t){var e=t.circle,n=e.x,r=e.cy,i={x:n,y:r},o=t.P,a=t.N,s=[t];Nn(t);for(var u=o;u.circle&&Eo(n-u.circle.x)<Wo&&Eo(r-u.circle.cy)<Wo;)o=u.P,s.unshift(u),Nn(u),u=o;s.unshift(u),Pn(u);for(var l=a;l.circle&&Eo(n-l.circle.x)<Wo&&Eo(r-l.circle.cy)<Wo;)a=l.N,s.push(l),Nn(l),l=a;s.push(l),Pn(l);var c,f=s.length;for(c=1;f>c;++c)l=s[c],u=s[c-1],qn(l.edge,u.site,l.site,i);u=s[0],(l=s[f-1]).edge=Ln(u.site,l.site,null,i),jn(u),jn(l)}function En(t){for(var e,n,r,i,o=t.x,a=t.y,s=fs._;s;)if((r=kn(s,a)-o)>Wo)s=s.L;else{if(!((i=o-Cn(s,a))>Wo)){r>-Wo?(e=s.P,n=s):i>-Wo?(e=s,n=s.N):e=n=s;break}if(!s.R){e=s;break}s=s.R}var u=On(t);if(fs.insert(e,u),e||n){if(e===n)return Pn(e),n=On(e.site),fs.insert(u,n),u.edge=n.edge=Ln(e.site,u.site),jn(e),void jn(n);if(!n)return void(u.edge=Ln(e.site,u.site));Pn(e),Pn(n);var l=e.site,c=l.x,f=l.y,h=t.x-c,d=t.y-f,p=n.site,m=p.x-c,g=p.y-f,v=2*(h*g-d*m),y=h*h+d*d,b=m*m+g*g,x={x:(g*y-d*b)/v+c,y:(h*b-m*y)/v+f};qn(n.edge,l,p,x),u.edge=Ln(l,t,null,x),n.edge=Ln(t,p,null,x),jn(e),jn(n)}}function kn(t,e){var n=t.site,r=n.x,i=n.y,o=i-e;if(!o)return r;var a=t.P;if(!a)return-1/0;var s=(n=a.site).x,u=n.y,l=u-e;if(!l)return s;var c=s-r,f=1/o-1/l,h=c/l;return f?(-h+Math.sqrt(h*h-2*f*(c*c/(-2*l)-u+l/2+i-o/2)))/f+r:(r+s)/2}function Cn(t,e){var n=t.N;if(n)return kn(n,e);var r=t.site;return r.y===e?r.x:1/0}function Tn(t){this.site=t,this.edges=[]}function Dn(t,e){return e.angle-t.angle}function An(){Hn(this),this.x=this.y=this.arc=this.site=this.cy=null}function jn(t){var e=t.P,n=t.N;if(e&&n){var r=e.site,i=t.site,o=n.site;if(r!==o){var a=i.x,s=i.y,u=r.x-a,l=r.y-s,c=o.x-a,f=2*(u*(g=o.y-s)-l*c);if(!(f>=-Vo)){var h=u*u+l*l,d=c*c+g*g,p=(g*h-l*d)/f,m=(u*d-c*h)/f,g=m+s,v=ms.pop()||new An;v.arc=t,v.site=i,v.x=p+a,v.y=g+Math.sqrt(p*p+m*m),v.cy=g,t.circle=v;for(var y=null,b=ds._;b;)if(v.y<b.y||v.y===b.y&&v.x<=b.x){if(!b.L){y=b.P;break}b=b.L}else{if(!b.R){y=b;break}b=b.R}ds.insert(y,v),y||(hs=v)}}}}function Pn(t){var e=t.circle;e&&(e.P||(hs=e.N),ds.remove(e),ms.push(e),Hn(e),t.circle=null)}function In(t,e){var n=t.b;if(n)return!0;var r,i,o=t.a,a=e[0][0],s=e[1][0],u=e[0][1],l=e[1][1],c=t.l,f=t.r,h=c.x,d=c.y,p=f.x,m=f.y,g=(h+p)/2,v=(d+m)/2;if(m===d){if(a>g||g>=s)return;if(h>p){if(o){if(o.y>=l)return}else o={x:g,y:u};n={x:g,y:l}}else{if(o){if(o.y<u)return}else o={x:g,y:l};n={x:g,y:u}}}else if(i=v-(r=(h-p)/(m-d))*g,-1>r||r>1)if(h>p){if(o){if(o.y>=l)return}else o={x:(u-i)/r,y:u};n={x:(l-i)/r,y:l}}else{if(o){if(o.y<u)return}else o={x:(l-i)/r,y:l};n={x:(u-i)/r,y:u}}else if(m>d){if(o){if(o.x>=s)return}else o={x:a,y:r*a+i};n={x:s,y:r*s+i}}else{if(o){if(o.x<a)return}else o={x:s,y:r*s+i};n={x:a,y:r*a+i}}return t.a=o,t.b=n,!0}function Rn(t,e){this.l=t,this.r=e,this.a=this.b=null}function Ln(t,e,n,r){var i=new Rn(t,e);return ls.push(i),n&&qn(i,t,e,n),r&&qn(i,e,t,r),cs[t.i].edges.push(new Bn(i,t,e)),cs[e.i].edges.push(new Bn(i,e,t)),i}function Fn(t,e,n){var r=new Rn(t,null);return r.a=e,r.b=n,ls.push(r),r}function qn(t,e,n,r){t.a||t.b?t.l===n?t.b=r:t.a=r:(t.a=r,t.l=e,t.r=n)}function Bn(t,e,n){var r=t.a,i=t.b;this.edge=t,this.site=e,this.angle=n?Math.atan2(n.y-e.y,n.x-e.x):t.l===e?Math.atan2(i.x-r.x,r.y-i.y):Math.atan2(r.x-i.x,i.y-r.y)}function zn(){this._=null}function Hn(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function Un(t,e){var n=e,r=e.R,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function Wn(t,e){var n=e,r=e.L,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function Vn(t){for(;t.L;)t=t.L;return t}function $n(t,e){var n,r,i,o=t.sort(Yn).pop();for(ls=[],cs=new Array(t.length),fs=new zn,ds=new zn;;)if(i=hs,o&&(!i||o.y<i.y||o.y===i.y&&o.x<i.x))o.x===n&&o.y===r||(cs[o.i]=new Tn(o),En(o),n=o.x,r=o.y),o=t.pop();else{if(!i)break;Mn(i.arc)}e&&(function(t){for(var e,n=ls,r=je(t[0][0],t[0][1],t[1][0],t[1][1]),i=n.length;i--;)(!In(e=n[i],t)||!r(e)||Eo(e.a.x-e.b.x)<Wo&&Eo(e.a.y-e.b.y)<Wo)&&(e.a=e.b=null,n.splice(i,1))}(e),function(t){for(var e,n,r,i,o,a,s,u,l,c,f=t[0][0],h=t[1][0],d=t[0][1],p=t[1][1],m=cs,g=m.length;g--;)if((o=m[g])&&o.prepare())for(u=(s=o.edges).length,a=0;u>a;)r=(c=s[a].end()).x,i=c.y,e=(l=s[++a%u].start()).x,n=l.y,(Eo(r-e)>Wo||Eo(i-n)>Wo)&&(s.splice(a,0,new Bn(Fn(o.site,c,Eo(r-f)<Wo&&p-i>Wo?{x:f,y:Eo(e-f)<Wo?n:p}:Eo(i-p)<Wo&&h-r>Wo?{x:Eo(n-p)<Wo?e:h,y:p}:Eo(r-h)<Wo&&i-d>Wo?{x:h,y:Eo(e-h)<Wo?n:d}:Eo(i-d)<Wo&&r-f>Wo?{x:Eo(n-d)<Wo?e:f,y:d}:null),o.site,null)),++u)}(e));var a={cells:cs,edges:ls};return fs=ds=ls=cs=null,a}function Yn(t,e){return e.y-t.y||e.x-t.x}function Zn(t,e,n){return(t.x-n.x)*(e.y-t.y)-(t.x-e.x)*(n.y-t.y)}function Gn(t){return t.x}function Kn(t){return t.y}function Xn(t,e,n,r,i,o){if(!t(e,n,r,i,o)){var a=.5*(n+i),s=.5*(r+o),u=e.nodes;u[0]&&Xn(t,u[0],n,r,a,s),u[1]&&Xn(t,u[1],a,r,i,s),u[2]&&Xn(t,u[2],n,s,a,o),u[3]&&Xn(t,u[3],a,s,i,o)}}function Jn(t,e){t=vo.rgb(t),e=vo.rgb(e);var n=t.r,r=t.g,i=t.b,o=e.r-n,a=e.g-r,s=e.b-i;return function(t){return"#"+xt(Math.round(n+o*t))+xt(Math.round(r+a*t))+xt(Math.round(i+s*t))}}function Qn(t,e){var n,r={},i={};for(n in t)n in e?r[n]=nr(t[n],e[n]):i[n]=t[n];for(n in e)n in t||(i[n]=e[n]);return function(t){for(n in r)i[n]=r[n](t);return i}}function tr(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function er(t,e){var n,r,i,o=vs.lastIndex=ys.lastIndex=0,a=-1,s=[],u=[];for(t+="",e+="";(n=vs.exec(t))&&(r=ys.exec(e));)(i=r.index)>o&&(i=e.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,u.push({i:a,x:tr(n,r)})),o=ys.lastIndex;return o<e.length&&(i=e.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?u[0]?(e=u[0].x,function(t){return e(t)+""}):function(){return e}:(e=u.length,function(t){for(var n,r=0;e>r;++r)s[(n=u[r]).i]=n.x(t);return s.join("")})}function nr(t,e){for(var n,r=vo.interpolators.length;--r>=0&&!(n=vo.interpolators[r](t,e)););return n}function rr(t,e){var n,r=[],i=[],o=t.length,a=e.length,s=Math.min(t.length,e.length);for(n=0;s>n;++n)r.push(nr(t[n],e[n]));for(;o>n;++n)i[n]=t[n];for(;a>n;++n)i[n]=e[n];return function(t){for(n=0;s>n;++n)i[n]=r[n](t);return i}}function ir(t){return function(e){return 1-t(1-e)}}function or(t){return function(e){return.5*(.5>e?t(2*e):2-t(2-2*e))}}function ar(t){return t*t}function sr(t){return t*t*t}function ur(t){if(0>=t)return 0;if(t>=1)return 1;var e=t*t,n=e*t;return 4*(.5>t?n:3*(t-e)+n-.75)}function lr(t){return 1-Math.cos(t*Go)}function cr(t){return Math.pow(2,10*(t-1))}function fr(t){return 1-Math.sqrt(1-t*t)}function hr(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function dr(t,e){return e-=t,function(n){return Math.round(t+e*n)}}function pr(t){var e=[t.a,t.b],n=[t.c,t.d],r=gr(e),i=mr(e,n),o=gr(function(t,e,n){return t[0]+=n*e[0],t[1]+=n*e[1],t}(n,e,-i))||0;e[0]*n[1]<n[0]*e[1]&&(e[0]*=-1,e[1]*=-1,r*=-1,i*=-1),this.rotate=(r?Math.atan2(e[1],e[0]):Math.atan2(-n[0],n[1]))*Xo,this.translate=[t.e,t.f],this.scale=[r,o],this.skew=o?Math.atan2(i,o)*Xo:0}function mr(t,e){return t[0]*e[0]+t[1]*e[1]}function gr(t){var e=Math.sqrt(mr(t,t));return e&&(t[0]/=e,t[1]/=e),e}function vr(t){return t.length?t.pop()+",":""}function yr(t,e){var n=[],r=[];return t=vo.transform(t),e=vo.transform(e),function(t,e,n,r){if(t[0]!==e[0]||t[1]!==e[1]){var i=n.push("translate(",null,",",null,")");r.push({i:i-4,x:tr(t[0],e[0])},{i:i-2,x:tr(t[1],e[1])})}else(e[0]||e[1])&&n.push("translate("+e+")")}(t.translate,e.translate,n,r),function(t,e,n,r){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),r.push({i:n.push(vr(n)+"rotate(",null,")")-2,x:tr(t,e)})):e&&n.push(vr(n)+"rotate("+e+")")}(t.rotate,e.rotate,n,r),function(t,e,n,r){t!==e?r.push({i:n.push(vr(n)+"skewX(",null,")")-2,x:tr(t,e)}):e&&n.push(vr(n)+"skewX("+e+")")}(t.skew,e.skew,n,r),function(t,e,n,r){if(t[0]!==e[0]||t[1]!==e[1]){var i=n.push(vr(n)+"scale(",null,",",null,")");r.push({i:i-4,x:tr(t[0],e[0])},{i:i-2,x:tr(t[1],e[1])})}else 1===e[0]&&1===e[1]||n.push(vr(n)+"scale("+e+")")}(t.scale,e.scale,n,r),t=e=null,function(t){for(var e,i=-1,o=r.length;++i<o;)n[(e=r[i]).i]=e.x(t);return n.join("")}}function br(t,e){return e=(e-=t=+t)||1/e,function(n){return(n-t)/e}}function xr(t,e){return e=(e-=t=+t)||1/e,function(n){return Math.max(0,Math.min(1,(n-t)/e))}}function wr(t){for(var e=t.source,n=t.target,r=function(t,e){if(t===e)return t;for(var n=_r(t),r=_r(e),i=n.pop(),o=r.pop(),a=null;i===o;)a=i,i=n.pop(),o=r.pop();return a}(e,n),i=[e];e!==r;)e=e.parent,i.push(e);for(var o=i.length;n!==r;)i.splice(o,0,n),n=n.parent;return i}function _r(t){for(var e=[],n=t.parent;null!=n;)e.push(t),t=n,n=n.parent;return e.push(t),e}function Sr(t){t.fixed|=2}function Or(t){t.fixed&=-7}function Nr(t){t.fixed|=4,t.px=t.x,t.py=t.y}function Mr(t){t.fixed&=-5}function Er(t,e,n){var r=0,i=0;if(t.charge=0,!t.leaf)for(var o,a=t.nodes,s=a.length,u=-1;++u<s;)null!=(o=a[u])&&(Er(o,e,n),t.charge+=o.charge,r+=o.charge*o.cx,i+=o.charge*o.cy);if(t.point){t.leaf||(t.point.x+=Math.random()-.5,t.point.y+=Math.random()-.5);var l=e*n[t.point.index];t.charge+=t.pointCharge=l,r+=l*t.point.x,i+=l*t.point.y}t.cx=r/t.charge,t.cy=i/t.charge}function kr(t,e){return vo.rebind(t,e,"sort","children","value"),t.nodes=t,t.links=Pr,t}function Cr(t,e){for(var n=[t];null!=(t=n.pop());)if(e(t),(i=t.children)&&(r=i.length))for(var r,i;--r>=0;)n.push(i[r])}function Tr(t,e){for(var n=[t],r=[];null!=(t=n.pop());)if(r.push(t),(o=t.children)&&(i=o.length))for(var i,o,a=-1;++a<i;)n.push(o[a]);for(;null!=(t=r.pop());)e(t)}function Dr(t){return t.children}function Ar(t){return t.value}function jr(t,e){return e.value-t.value}function Pr(t){return vo.merge(t.map((function(t){return(t.children||[]).map((function(e){return{source:t,target:e}}))})))}function Ir(t){return t.x}function Rr(t){return t.y}function Lr(t,e,n){t.y0=e,t.y=n}function Fr(t){return vo.range(t.length)}function qr(t){for(var e=-1,n=t[0].length,r=[];++e<n;)r[e]=0;return r}function Br(t){for(var e,n=1,r=0,i=t[0][1],o=t.length;o>n;++n)(e=t[n][1])>i&&(r=n,i=e);return r}function zr(t){return t.reduce(Hr,0)}function Hr(t,e){return t+e[1]}function Ur(t,e){return Wr(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function Wr(t,e){for(var n=-1,r=+t[0],i=(t[1]-r)/e,o=[];++n<=e;)o[n]=i*n+r;return o}function Vr(t){return[vo.min(t),vo.max(t)]}function $r(t,e){return t.value-e.value}function Yr(t,e){var n=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=n,n._pack_prev=e}function Zr(t,e){t._pack_next=e,e._pack_prev=t}function Gr(t,e){var n=e.x-t.x,r=e.y-t.y,i=t.r+e.r;return.999*i*i>n*n+r*r}function Kr(t){function e(t){c=Math.min(t.x-t.r,c),f=Math.max(t.x+t.r,f),h=Math.min(t.y-t.r,h),d=Math.max(t.y+t.r,d)}if((n=t.children)&&(l=n.length)){var n,r,i,o,a,s,u,l,c=1/0,f=-1/0,h=1/0,d=-1/0;if(n.forEach(Xr),(r=n[0]).x=-r.r,r.y=0,e(r),l>1&&((i=n[1]).x=i.r,i.y=0,e(i),l>2))for(ti(r,i,o=n[2]),e(o),Yr(r,o),r._pack_prev=o,Yr(o,i),i=r._pack_next,a=3;l>a;a++){ti(r,i,o=n[a]);var p=0,m=1,g=1;for(s=i._pack_next;s!==i;s=s._pack_next,m++)if(Gr(s,o)){p=1;break}if(1==p)for(u=r._pack_prev;u!==s._pack_prev&&!Gr(u,o);u=u._pack_prev,g++);p?(g>m||m==g&&i.r<r.r?Zr(r,i=s):Zr(r=u,i),a--):(Yr(r,o),i=o,e(o))}var v=(c+f)/2,y=(h+d)/2,b=0;for(a=0;l>a;a++)(o=n[a]).x-=v,o.y-=y,b=Math.max(b,o.r+Math.sqrt(o.x*o.x+o.y*o.y));t.r=b,n.forEach(Jr)}}function Xr(t){t._pack_next=t._pack_prev=t}function Jr(t){delete t._pack_next,delete t._pack_prev}function Qr(t,e,n,r){var i=t.children;if(t.x=e+=r*t.x,t.y=n+=r*t.y,t.r*=r,i)for(var o=-1,a=i.length;++o<a;)Qr(i[o],e,n,r)}function ti(t,e,n){var r=t.r+n.r,i=e.x-t.x,o=e.y-t.y;if(r&&(i||o)){var a=e.r+n.r,s=i*i+o*o,u=.5+((r*=r)-(a*=a))/(2*s),l=Math.sqrt(Math.max(0,2*a*(r+s)-(r-=s)*r-a*a))/(2*s);n.x=t.x+u*i+l*o,n.y=t.y+u*o-l*i}else n.x=t.x+r,n.y=t.y}function ei(t,e){return t.parent==e.parent?1:2}function ni(t){var e=t.children;return e.length?e[0]:t.t}function ri(t){var e,n=t.children;return(e=n.length)?n[e-1]:t.t}function ii(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function oi(t,e,n){return t.a.parent===e.parent?t.a:n}function ai(t){var e=t.children;return e&&e.length?ai(e[0]):t}function si(t){var e,n=t.children;return n&&(e=n.length)?si(n[e-1]):t}function ui(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function li(t,e){var n=t.x+e[3],r=t.y+e[0],i=t.dx-e[1]-e[3],o=t.dy-e[0]-e[2];return 0>i&&(n+=i/2,i=0),0>o&&(r+=o/2,o=0),{x:n,y:r,dx:i,dy:o}}function ci(t){var e=t[0],n=t[t.length-1];return n>e?[e,n]:[n,e]}function fi(t){return t.rangeExtent?t.rangeExtent():ci(t.range())}function hi(t,e,n,r){var i=n(t[0],t[1]),o=r(e[0],e[1]);return function(t){return o(i(t))}}function di(t,e){var n,r=0,i=t.length-1,o=t[r],a=t[i];return o>a&&(n=r,r=i,i=n,n=o,o=a,a=n),t[r]=e.floor(o),t[i]=e.ceil(a),t}function pi(t){return t?{floor:function(e){return Math.floor(e/t)*t},ceil:function(e){return Math.ceil(e/t)*t}}:Cs}function mi(t,e,n,r){var i=[],o=[],a=0,s=Math.min(t.length,e.length)-1;for(t[s]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<=s;)i.push(n(t[a-1],t[a])),o.push(r(e[a-1],e[a]));return function(e){var n=vo.bisect(t,e,1,s)-1;return o[n](i[n](e))}}function gi(t,e,n,r){function i(){var i=Math.min(t.length,e.length)>2?mi:hi,u=r?xr:br;return a=i(t,e,u,n),s=i(e,t,u,nr),o}function o(t){return a(t)}var a,s;return o.invert=function(t){return s(t)},o.domain=function(e){return arguments.length?(t=e.map(Number),i()):t},o.range=function(t){return arguments.length?(e=t,i()):e},o.rangeRound=function(t){return o.range(t).interpolate(dr)},o.clamp=function(t){return arguments.length?(r=t,i()):r},o.interpolate=function(t){return arguments.length?(n=t,i()):n},o.ticks=function(e){return xi(t,e)},o.tickFormat=function(e,n){return wi(t,e,n)},o.nice=function(e){return yi(t,e),i()},o.copy=function(){return gi(t,e,n,r)},i()}function vi(t,e){return vo.rebind(t,e,"range","rangeRound","interpolate","clamp")}function yi(t,e){return di(t,pi(bi(t,e)[2])),di(t,pi(bi(t,e)[2])),t}function bi(t,e){null==e&&(e=10);var n=ci(t),r=n[1]-n[0],i=Math.pow(10,Math.floor(Math.log(r/e)/Math.LN10)),o=e/r*i;return.15>=o?i*=10:.35>=o?i*=5:.75>=o&&(i*=2),n[0]=Math.ceil(n[0]/i)*i,n[1]=Math.floor(n[1]/i)*i+.5*i,n[2]=i,n}function xi(t,e){return vo.range.apply(vo,bi(t,e))}function wi(t,e,n){var r=bi(t,e);if(n){var i=va.exec(n);if(i.shift(),"s"===i[8]){var o=vo.formatPrefix(Math.max(Eo(r[0]),Eo(r[1])));return i[7]||(i[7]="."+_i(o.scale(r[2]))),i[8]="f",n=vo.format(i.join("")),function(t){return n(o.scale(t))+o.symbol}}i[7]||(i[7]="."+function(t,e){var n=_i(e[2]);return t in Ts?Math.abs(n-_i(Math.max(Eo(e[0]),Eo(e[1]))))+ +("e"!==t):n-2*("%"===t)}(i[8],r)),n=i.join("")}else n=",."+_i(r[2])+"f";return vo.format(n)}function _i(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}function Si(t,e,n,r){function i(t){return(n?Math.log(0>t?0:t):-Math.log(t>0?0:-t))/Math.log(e)}function o(t){return n?Math.pow(e,t):-Math.pow(e,-t)}function a(e){return t(i(e))}return a.invert=function(e){return o(t.invert(e))},a.domain=function(e){return arguments.length?(n=e[0]>=0,t.domain((r=e.map(Number)).map(i)),a):r},a.base=function(n){return arguments.length?(e=+n,t.domain(r.map(i)),a):e},a.nice=function(){var e=di(r.map(i),n?Math:As);return t.domain(e),r=e.map(o),a},a.ticks=function(){var t=ci(r),a=[],s=t[0],u=t[1],l=Math.floor(i(s)),c=Math.ceil(i(u)),f=e%1?2:e;if(isFinite(c-l)){if(n){for(;c>l;l++)for(var h=1;f>h;h++)a.push(o(l)*h);a.push(o(l))}else for(a.push(o(l));l++<c;)for(h=f-1;h>0;h--)a.push(o(l)*h);for(l=0;a[l]<s;l++);for(c=a.length;a[c-1]>u;c--);a=a.slice(l,c)}return a},a.tickFormat=function(t,n){if(!arguments.length)return Ds;arguments.length<2?n=Ds:"function"!=typeof n&&(n=vo.format(n));var r=Math.max(1,e*t/a.ticks().length);return function(t){var a=t/o(Math.round(i(t)));return e-.5>a*e&&(a*=e),r>=a?n(t):""}},a.copy=function(){return Si(t.copy(),e,n,r)},vi(a,t)}function Oi(t,e,n){function r(e){return t(i(e))}var i=Ni(e),o=Ni(1/e);return r.invert=function(e){return o(t.invert(e))},r.domain=function(e){return arguments.length?(t.domain((n=e.map(Number)).map(i)),r):n},r.ticks=function(t){return xi(n,t)},r.tickFormat=function(t,e){return wi(n,t,e)},r.nice=function(t){return r.domain(yi(n,t))},r.exponent=function(a){return arguments.length?(i=Ni(e=a),o=Ni(1/e),t.domain(n.map(i)),r):e},r.copy=function(){return Oi(t.copy(),e,n)},vi(r,t)}function Ni(t){return function(e){return 0>e?-Math.pow(-e,t):Math.pow(e,t)}}function Mi(t,e){function n(n){return o[((i.get(n)||("range"===e.t?i.set(n,t.push(n)):NaN))-1)%o.length]}function r(e,n){return vo.range(t.length).map((function(t){return e+n*t}))}var i,o,a;return n.domain=function(r){if(!arguments.length)return t;t=[],i=new d;for(var o,a=-1,s=r.length;++a<s;)i.has(o=r[a])||i.set(o,t.push(o));return n[e.t].apply(n,e.a)},n.range=function(t){return arguments.length?(o=t,a=0,e={t:"range",a:arguments},n):o},n.rangePoints=function(i,s){arguments.length<2&&(s=0);var u=i[0],l=i[1],c=t.length<2?(u=(u+l)/2,0):(l-u)/(t.length-1+s);return o=r(u+c*s/2,c),a=0,e={t:"rangePoints",a:arguments},n},n.rangeRoundPoints=function(i,s){arguments.length<2&&(s=0);var u=i[0],l=i[1],c=t.length<2?(u=l=Math.round((u+l)/2),0):(l-u)/(t.length-1+s)|0;return o=r(u+Math.round(c*s/2+(l-u-(t.length-1+s)*c)/2),c),a=0,e={t:"rangeRoundPoints",a:arguments},n},n.rangeBands=function(i,s,u){arguments.length<2&&(s=0),arguments.length<3&&(u=s);var l=i[1]<i[0],c=i[l-0],f=(i[1-l]-c)/(t.length-s+2*u);return o=r(c+f*u,f),l&&o.reverse(),a=f*(1-s),e={t:"rangeBands",a:arguments},n},n.rangeRoundBands=function(i,s,u){arguments.length<2&&(s=0),arguments.length<3&&(u=s);var l=i[1]<i[0],c=i[l-0],f=i[1-l],h=Math.floor((f-c)/(t.length-s+2*u));return o=r(c+Math.round((f-c-(t.length-s)*h)/2),h),l&&o.reverse(),a=Math.round(h*(1-s)),e={t:"rangeRoundBands",a:arguments},n},n.rangeBand=function(){return a},n.rangeExtent=function(){return ci(e.a[0])},n.copy=function(){return Mi(t,e)},n.domain(t)}function Ei(t,e){function n(){var n=0,o=e.length;for(i=[];++n<o;)i[n-1]=vo.quantile(t,n/o);return r}function r(t){return isNaN(t=+t)?void 0:e[vo.bisect(i,t)]}var i;return r.domain=function(e){return arguments.length?(t=e.map(u).filter(l).sort(s),n()):t},r.range=function(t){return arguments.length?(e=t,n()):e},r.quantiles=function(){return i},r.invertExtent=function(n){return 0>(n=e.indexOf(n))?[NaN,NaN]:[n>0?i[n-1]:t[0],n<i.length?i[n]:t[t.length-1]]},r.copy=function(){return Ei(t,e)},n()}function ki(t,e,n){function r(e){return n[Math.max(0,Math.min(a,Math.floor(o*(e-t))))]}function i(){return o=n.length/(e-t),a=n.length-1,r}var o,a;return r.domain=function(n){return arguments.length?(t=+n[0],e=+n[n.length-1],i()):[t,e]},r.range=function(t){return arguments.length?(n=t,i()):n},r.invertExtent=function(e){return[e=0>(e=n.indexOf(e))?NaN:e/o+t,e+1/o]},r.copy=function(){return ki(t,e,n)},i()}function Ci(t,e){function n(n){return n>=n?e[vo.bisect(t,n)]:void 0}return n.domain=function(e){return arguments.length?(t=e,n):t},n.range=function(t){return arguments.length?(e=t,n):e},n.invertExtent=function(n){return n=e.indexOf(n),[t[n-1],t[n]]},n.copy=function(){return Ci(t,e)},n}function Ti(t){function e(t){return+t}return e.invert=e,e.domain=e.range=function(n){return arguments.length?(t=n.map(e),e):t},e.ticks=function(e){return xi(t,e)},e.tickFormat=function(e,n){return wi(t,e,n)},e.copy=function(){return Ti(t)},e}function Di(){return 0}function Ai(t){return t.innerRadius}function ji(t){return t.outerRadius}function Pi(t){return t.startAngle}function Ii(t){return t.endAngle}function Ri(t){return t&&t.padAngle}function Li(t,e,n,r){return(t-n)*e-(e-r)*t>0?0:1}function Fi(t,e,n,r,i){var o=t[0]-e[0],a=t[1]-e[1],s=(i?r:-r)/Math.sqrt(o*o+a*a),u=s*a,l=-s*o,c=t[0]+u,f=t[1]+l,h=e[0]+u,d=e[1]+l,p=(c+h)/2,m=(f+d)/2,g=h-c,v=d-f,y=g*g+v*v,b=n-r,x=c*d-h*f,w=(0>v?-1:1)*Math.sqrt(Math.max(0,b*b*y-x*x)),_=(x*v-g*w)/y,S=(-x*g-v*w)/y,O=(x*v+g*w)/y,N=(-x*g+v*w)/y,M=_-p,E=S-m,k=O-p,C=N-m;return M*M+E*E>k*k+C*C&&(_=O,S=N),[[_-u,S-l],[_*n/b,S*n/b]]}function qi(t){function e(e){function a(){l.push("M",o(t(c),s))}for(var u,l=[],c=[],f=-1,h=e.length,d=Mt(n),p=Mt(r);++f<h;)i.call(this,u=e[f],f)?c.push([+d.call(this,u,f),+p.call(this,u,f)]):c.length&&(a(),c=[]);return c.length&&a(),l.length?l.join(""):null}var n=gn,r=vn,i=Ne,o=Bi,a=o.key,s=.7;return e.x=function(t){return arguments.length?(n=t,e):n},e.y=function(t){return arguments.length?(r=t,e):r},e.defined=function(t){return arguments.length?(i=t,e):i},e.interpolate=function(t){return arguments.length?(a="function"==typeof t?o=t:(o=Fs.get(t)||Bi).key,e):a},e.tension=function(t){return arguments.length?(s=t,e):s},e}function Bi(t){return t.length>1?t.join("L"):t+"Z"}function zi(t){return t.join("L")+"Z"}function Hi(t){for(var e=0,n=t.length,r=t[0],i=[r[0],",",r[1]];++e<n;)i.push("V",(r=t[e])[1],"H",r[0]);return i.join("")}function Ui(t){for(var e=0,n=t.length,r=t[0],i=[r[0],",",r[1]];++e<n;)i.push("H",(r=t[e])[0],"V",r[1]);return i.join("")}function Wi(t,e){if(e.length<1||t.length!=e.length&&t.length!=e.length+2)return Bi(t);var n=t.length!=e.length,r="",i=t[0],o=t[1],a=e[0],s=a,u=1;if(n&&(r+="Q"+(o[0]-2*a[0]/3)+","+(o[1]-2*a[1]/3)+","+o[0]+","+o[1],i=t[1],u=2),e.length>1){s=e[1],o=t[u],u++,r+="C"+(i[0]+a[0])+","+(i[1]+a[1])+","+(o[0]-s[0])+","+(o[1]-s[1])+","+o[0]+","+o[1];for(var l=2;l<e.length;l++,u++)o=t[u],s=e[l],r+="S"+(o[0]-s[0])+","+(o[1]-s[1])+","+o[0]+","+o[1]}if(n){var c=t[u];r+="Q"+(o[0]+2*s[0]/3)+","+(o[1]+2*s[1]/3)+","+c[0]+","+c[1]}return r}function Vi(t,e){for(var n,r=[],i=(1-e)/2,o=t[0],a=t[1],s=1,u=t.length;++s<u;)n=o,o=a,a=t[s],r.push([i*(a[0]-n[0]),i*(a[1]-n[1])]);return r}function $i(t){if(t.length<3)return Bi(t);var e=1,n=t.length,r=t[0],i=r[0],o=r[1],a=[i,i,i,(r=t[1])[0]],s=[o,o,o,r[1]],u=[i,",",o,"L",Yi(zs,a),",",Yi(zs,s)];for(t.push(t[n-1]);++e<=n;)r=t[e],a.shift(),a.push(r[0]),s.shift(),s.push(r[1]),Zi(u,a,s);return t.pop(),u.push("L",r),u.join("")}function Yi(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function Zi(t,e,n){t.push("C",Yi(qs,e),",",Yi(qs,n),",",Yi(Bs,e),",",Yi(Bs,n),",",Yi(zs,e),",",Yi(zs,n))}function Gi(t,e){return(e[1]-t[1])/(e[0]-t[0])}function Ki(t){for(var e,n,r,i=-1,o=t.length;++i<o;)n=(e=t[i])[0],r=e[1]-Go,e[0]=n*Math.cos(r),e[1]=n*Math.sin(r);return t}function Xi(t){function e(e){function u(){m.push("M",s(t(v),f),c,l(t(g.reverse()),f),"Z")}for(var h,d,p,m=[],g=[],v=[],y=-1,b=e.length,x=Mt(n),w=Mt(i),_=n===r?function(){return d}:Mt(r),S=i===o?function(){return p}:Mt(o);++y<b;)a.call(this,h=e[y],y)?(g.push([d=+x.call(this,h,y),p=+w.call(this,h,y)]),v.push([+_.call(this,h,y),+S.call(this,h,y)])):g.length&&(u(),g=[],v=[]);return g.length&&u(),m.length?m.join(""):null}var n=gn,r=gn,i=0,o=vn,a=Ne,s=Bi,u=s.key,l=s,c="L",f=.7;return e.x=function(t){return arguments.length?(n=r=t,e):r},e.x0=function(t){return arguments.length?(n=t,e):n},e.x1=function(t){return arguments.length?(r=t,e):r},e.y=function(t){return arguments.length?(i=o=t,e):o},e.y0=function(t){return arguments.length?(i=t,e):i},e.y1=function(t){return arguments.length?(o=t,e):o},e.defined=function(t){return arguments.length?(a=t,e):a},e.interpolate=function(t){return arguments.length?(u="function"==typeof t?s=t:(s=Fs.get(t)||Bi).key,l=s.reverse||s,c=s.closed?"M":"L",e):u},e.tension=function(t){return arguments.length?(f=t,e):f},e}function Ji(t){return t.radius}function Qi(t){return[t.x,t.y]}function to(){return 64}function eo(){return"circle"}function no(t){var e=Math.sqrt(t/$o);return"M0,"+e+"A"+e+","+e+" 0 1,1 0,"+-e+"A"+e+","+e+" 0 1,1 0,"+e+"Z"}function ro(t){return function(){var e,n,r;(e=this[t])&&(r=e[n=e.active])&&(r.timer.c=null,r.timer.t=NaN,--e.count?delete e[n]:delete this[t],e.active+=.5,r.event&&r.event.interrupt.call(this,this.__data__,r.index))}}function io(t,e,n){return Ao(t,Zs),t.namespace=e,t.id=n,t}function oo(t,e,n,r){var i=t.id,o=t.namespace;return Y(t,"function"==typeof n?function(t,a,s){t[o][i].tween.set(e,r(n.call(t,t.__data__,a,s)))}:(n=r(n),function(t){t[o][i].tween.set(e,n)}))}function ao(t){return null==t&&(t=""),function(){this.textContent=t}}function so(t){return null==t?"__transition__":"__transition_"+t+"__"}function uo(t,e,n,r,i){function o(n){var i=h.active,o=h[i];for(var d in o&&(o.timer.c=null,o.timer.t=NaN,--h.count,delete h[i],o.event&&o.event.interrupt.call(t,t.__data__,o.index)),h)if(r>+d){var m=h[d];m.timer.c=null,m.timer.t=NaN,--h.count,delete h[d]}u.c=a,Ct((function(){return u.c&&a(n||1)&&(u.c=null,u.t=NaN),1}),0,s),h.active=r,p.event&&p.event.start.call(t,t.__data__,e),f=[],p.tween.forEach((function(n,r){(r=r.call(t,t.__data__,e))&&f.push(r)})),c=p.ease,l=p.duration}function a(i){for(var o=i/l,a=c(o),s=f.length;s>0;)f[--s].call(t,a);return o>=1?(p.event&&p.event.end.call(t,t.__data__,e),--h.count?delete h[r]:delete t[n],1):void 0}var s,u,l,c,f,h=t[n]||(t[n]={active:0,count:0}),p=h[r];p||(s=i.time,u=Ct((function(t){var e=p.delay;return u.t=e+s,t>=e?o(t-e):void(u.c=o)}),0,s),p=h[r]={tween:new d,time:s,timer:u,delay:i.delay,duration:i.duration,ease:i.ease,index:e},i=null,++h.count)}function lo(t,e,n){t.attr("transform",(function(t){var r=e(t);return"translate("+(isFinite(r)?r:n(t))+",0)"}))}function co(t,e,n){t.attr("transform",(function(t){var r=e(t);return"translate(0,"+(isFinite(r)?r:n(t))+")"}))}function fo(t){return t.toISOString()}function ho(t,e,n){function r(e){return t(e)}function i(t,n){var r=(t[1]-t[0])/n,i=vo.bisect(ru,r);return i==ru.length?[e.year,bi(t.map((function(t){return t/31536e6})),n)[2]]:i?e[r/ru[i-1]<ru[i]/r?i-1:i]:[au,bi(t,n)[2]]}return r.invert=function(e){return po(t.invert(e))},r.domain=function(e){return arguments.length?(t.domain(e),r):t.domain().map(po)},r.nice=function(t,e){function n(n){return!isNaN(n)&&!t.range(n,po(+n+1),e).length}var o=r.domain(),a=ci(o),s=null==t?i(a,10):"number"==typeof t&&i(a,t);return s&&(t=s[0],e=s[1]),r.domain(di(o,e>1?{floor:function(e){for(;n(e=t.floor(e));)e=po(e-1);return e},ceil:function(e){for(;n(e=t.ceil(e));)e=po(+e+1);return e}}:t))},r.ticks=function(t,e){var n=ci(r.domain()),o=null==t?i(n,10):"number"==typeof t?i(n,t):!t.range&&[{range:t},e];return o&&(t=o[0],e=o[1]),t.range(n[0],po(+n[1]+1),1>e?1:e)},r.tickFormat=function(){return n},r.copy=function(){return ho(t.copy(),e,n)},vi(r,t)}function po(t){return new Date(t)}function mo(t){return JSON.parse(t.responseText)}function go(t){var e=xo.createRange();return e.selectNode(xo.body),e.createContextualFragment(t.responseText)}var vo={version:"3.5.17"},yo=[].slice,bo=function(t){return yo.call(t)},xo=this.document;if(xo)try{bo(xo.documentElement.childNodes)[0].nodeType}catch(t){bo=function(t){for(var e=t.length,n=new Array(e);e--;)n[e]=t[e];return n}}if(Date.now||(Date.now=function(){return+new Date}),xo)try{xo.createElement("DIV").style.setProperty("opacity",0,"")}catch(t){var wo=this.Element.prototype,_o=wo.setAttribute,So=wo.setAttributeNS,Oo=this.CSSStyleDeclaration.prototype,No=Oo.setProperty;wo.setAttribute=function(t,e){_o.call(this,t,e+"")},wo.setAttributeNS=function(t,e,n){So.call(this,t,e,n+"")},Oo.setProperty=function(t,e,n){No.call(this,t,e+"",n)}}vo.ascending=s,vo.descending=function(t,e){return t>e?-1:e>t?1:e>=t?0:NaN},vo.min=function(t,e){var n,r,i=-1,o=t.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=t[i])&&r>=r){n=r;break}for(;++i<o;)null!=(r=t[i])&&n>r&&(n=r)}else{for(;++i<o;)if(null!=(r=e.call(t,t[i],i))&&r>=r){n=r;break}for(;++i<o;)null!=(r=e.call(t,t[i],i))&&n>r&&(n=r)}return n},vo.max=function(t,e){var n,r,i=-1,o=t.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=t[i])&&r>=r){n=r;break}for(;++i<o;)null!=(r=t[i])&&r>n&&(n=r)}else{for(;++i<o;)if(null!=(r=e.call(t,t[i],i))&&r>=r){n=r;break}for(;++i<o;)null!=(r=e.call(t,t[i],i))&&r>n&&(n=r)}return n},vo.extent=function(t,e){var n,r,i,o=-1,a=t.length;if(1===arguments.length){for(;++o<a;)if(null!=(r=t[o])&&r>=r){n=i=r;break}for(;++o<a;)null!=(r=t[o])&&(n>r&&(n=r),r>i&&(i=r))}else{for(;++o<a;)if(null!=(r=e.call(t,t[o],o))&&r>=r){n=i=r;break}for(;++o<a;)null!=(r=e.call(t,t[o],o))&&(n>r&&(n=r),r>i&&(i=r))}return[n,i]},vo.sum=function(t,e){var n,r=0,i=t.length,o=-1;if(1===arguments.length)for(;++o<i;)l(n=+t[o])&&(r+=n);else for(;++o<i;)l(n=+e.call(t,t[o],o))&&(r+=n);return r},vo.mean=function(t,e){var n,r=0,i=t.length,o=-1,a=i;if(1===arguments.length)for(;++o<i;)l(n=u(t[o]))?r+=n:--a;else for(;++o<i;)l(n=u(e.call(t,t[o],o)))?r+=n:--a;return a?r/a:void 0},vo.quantile=function(t,e){var n=(t.length-1)*e+1,r=Math.floor(n),i=+t[r-1],o=n-r;return o?i+o*(t[r]-i):i},vo.median=function(t,e){var n,r=[],i=t.length,o=-1;if(1===arguments.length)for(;++o<i;)l(n=u(t[o]))&&r.push(n);else for(;++o<i;)l(n=u(e.call(t,t[o],o)))&&r.push(n);return r.length?vo.quantile(r.sort(s),.5):void 0},vo.variance=function(t,e){var n,r,i=t.length,o=0,a=0,s=-1,c=0;if(1===arguments.length)for(;++s<i;)l(n=u(t[s]))&&(a+=(r=n-o)*(n-(o+=r/++c)));else for(;++s<i;)l(n=u(e.call(t,t[s],s)))&&(a+=(r=n-o)*(n-(o+=r/++c)));return c>1?a/(c-1):void 0},vo.deviation=function(){var t=vo.variance.apply(this,arguments);return t?Math.sqrt(t):t};var Mo=c(s);vo.bisectLeft=Mo.left,vo.bisect=vo.bisectRight=Mo.right,vo.bisector=function(t){return c(1===t.length?function(e,n){return s(t(e),n)}:t)},vo.shuffle=function(t,e,n){(o=arguments.length)<3&&(n=t.length,2>o&&(e=0));for(var r,i,o=n-e;o;)i=Math.random()*o--|0,r=t[o+e],t[o+e]=t[i+e],t[i+e]=r;return t},vo.permute=function(t,e){for(var n=e.length,r=new Array(n);n--;)r[n]=t[e[n]];return r},vo.pairs=function(t){for(var e=0,n=t.length-1,r=t[0],i=new Array(0>n?0:n);n>e;)i[e]=[r,r=t[++e]];return i},vo.transpose=function(t){if(!(i=t.length))return[];for(var e=-1,n=vo.min(t,f),r=new Array(n);++e<n;)for(var i,o=-1,a=r[e]=new Array(i);++o<i;)a[o]=t[o][e];return r},vo.zip=function(){return vo.transpose(arguments)},vo.keys=function(t){var e=[];for(var n in t)e.push(n);return e},vo.values=function(t){var e=[];for(var n in t)e.push(t[n]);return e},vo.entries=function(t){var e=[];for(var n in t)e.push({key:n,value:t[n]});return e},vo.merge=function(t){for(var e,n,r,i=t.length,o=-1,a=0;++o<i;)a+=t[o].length;for(n=new Array(a);--i>=0;)for(e=(r=t[i]).length;--e>=0;)n[--a]=r[e];return n};var Eo=Math.abs;vo.range=function(t,e,n){if(arguments.length<3&&(n=1,arguments.length<2&&(e=t,t=0)),(e-t)/n==1/0)throw new Error("infinite range");var r,i=[],o=function(t){for(var e=1;t*e%1;)e*=10;return e}(Eo(n)),a=-1;if(t*=o,e*=o,0>(n*=o))for(;(r=t+n*++a)>e;)i.push(r/o);else for(;(r=t+n*++a)<e;)i.push(r/o);return i},vo.map=function(t,e){var n=new d;if(t instanceof d)t.forEach((function(t,e){n.set(t,e)}));else if(Array.isArray(t)){var r,i=-1,o=t.length;if(1===arguments.length)for(;++i<o;)n.set(i,t[i]);else for(;++i<o;)n.set(e.call(t,r=t[i],i),r)}else for(var a in t)n.set(a,t[a]);return n};var ko="__proto__",Co="\0";h(d,{has:g,get:function(t){return this._[p(t)]},set:function(t,e){return this._[p(t)]=e},remove:v,keys:y,values:function(){var t=[];for(var e in this._)t.push(this._[e]);return t},entries:function(){var t=[];for(var e in this._)t.push({key:m(e),value:this._[e]});return t},size:b,empty:x,forEach:function(t){for(var e in this._)t.call(this,m(e),this._[e])}}),vo.nest=function(){function t(e,a,s){if(s>=o.length)return r?r.call(i,a):n?a.sort(n):a;for(var u,l,c,f,h=-1,p=a.length,m=o[s++],g=new d;++h<p;)(f=g.get(u=m(l=a[h])))?f.push(l):g.set(u,[l]);return e?(l=e(),c=function(n,r){l.set(n,t(e,r,s))}):(l={},c=function(n,r){l[n]=t(e,r,s)}),g.forEach(c),l}function e(t,n){if(n>=o.length)return t;var r=[],i=a[n++];return t.forEach((function(t,i){r.push({key:t,values:e(i,n)})})),i?r.sort((function(t,e){return i(t.key,e.key)})):r}var n,r,i={},o=[],a=[];return i.map=function(e,n){return t(n,e,0)},i.entries=function(n){return e(t(vo.map,n,0),0)},i.key=function(t){return o.push(t),i},i.sortKeys=function(t){return a[o.length-1]=t,i},i.sortValues=function(t){return n=t,i},i.rollup=function(t){return r=t,i},i},vo.set=function(t){var e=new w;if(t)for(var n=0,r=t.length;r>n;++n)e.add(t[n]);return e},h(w,{has:g,add:function(t){return this._[p(t+="")]=!0,t},remove:v,values:y,size:b,empty:x,forEach:function(t){for(var e in this._)t.call(this,m(e))}}),vo.behavior={},vo.rebind=function(t,e){for(var n,r=1,i=arguments.length;++r<i;)t[n=arguments[r]]=S(t,e,e[n]);return t};var To=["webkit","ms","moz","Moz","o","O"];vo.dispatch=function(){for(var t=new M,e=-1,n=arguments.length;++e<n;)t[arguments[e]]=E(t);return t},M.prototype.on=function(t,e){var n=t.indexOf("."),r="";if(n>=0&&(r=t.slice(n+1),t=t.slice(0,n)),t)return arguments.length<2?this[t].on(r):this[t].on(r,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(r,null);return this}},vo.event=null,vo.requote=function(t){return t.replace(Do,"\\$&")};var Do=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,Ao={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)t[n]=e[n]},jo=function(t,e){return e.querySelector(t)},Po=function(t,e){return e.querySelectorAll(t)},Io=function(t,e){var n=t.matches||t[O(t,"matchesSelector")];return(Io=function(t,e){return n.call(t,e)})(t,e)};"function"==typeof Sizzle&&(jo=function(t,e){return Sizzle(t,e)[0]||null},Po=Sizzle,Io=Sizzle.matchesSelector),vo.selection=function(){return vo.select(xo.documentElement)};var Ro=vo.selection.prototype=[];Ro.select=function(t){var e,n,r,i,o=[];t=A(t);for(var a=-1,s=this.length;++a<s;){o.push(e=[]),e.parentNode=(r=this[a]).parentNode;for(var u=-1,l=r.length;++u<l;)(i=r[u])?(e.push(n=t.call(i,i.__data__,u,a)),n&&"__data__"in i&&(n.__data__=i.__data__)):e.push(null)}return D(o)},Ro.selectAll=function(t){var e,n,r=[];t=j(t);for(var i=-1,o=this.length;++i<o;)for(var a=this[i],s=-1,u=a.length;++s<u;)(n=a[s])&&(r.push(e=bo(t.call(n,n.__data__,s,i))),e.parentNode=n);return D(r)};var Lo="http://www.w3.org/1999/xhtml",Fo={svg:"http://www.w3.org/2000/svg",xhtml:Lo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};vo.ns={prefix:Fo,qualify:function(t){var e=t.indexOf(":"),n=t;return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),Fo.hasOwnProperty(n)?{space:Fo[n],local:t}:t}},Ro.attr=function(t,e){if(arguments.length<2){if("string"==typeof t){var n=this.node();return(t=vo.ns.qualify(t)).local?n.getAttributeNS(t.space,t.local):n.getAttribute(t)}for(e in t)this.each(P(e,t[e]));return this}return this.each(P(t,e))},Ro.classed=function(t,e){if(arguments.length<2){if("string"==typeof t){var n=this.node(),r=(t=L(t)).length,i=-1;if(e=n.classList){for(;++i<r;)if(!e.contains(t[i]))return!1}else for(e=n.getAttribute("class");++i<r;)if(!R(t[i]).test(e))return!1;return!0}for(e in t)this.each(F(e,t[e]));return this}return this.each(F(t,e))},Ro.style=function(t,e,n){var r=arguments.length;if(3>r){if("string"!=typeof t){for(n in 2>r&&(e=""),t)this.each(B(n,t[n],e));return this}if(2>r){var i=this.node();return a(i).getComputedStyle(i,null).getPropertyValue(t)}n=""}return this.each(B(t,e,n))},Ro.property=function(t,e){if(arguments.length<2){if("string"==typeof t)return this.node()[t];for(e in t)this.each(z(e,t[e]));return this}return this.each(z(t,e))},Ro.text=function(t){return arguments.length?this.each("function"==typeof t?function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}:null==t?function(){this.textContent=""}:function(){this.textContent=t}):this.node().textContent},Ro.html=function(t){return arguments.length?this.each("function"==typeof t?function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}:null==t?function(){this.innerHTML=""}:function(){this.innerHTML=t}):this.node().innerHTML},Ro.append=function(t){return t=H(t),this.select((function(){return this.appendChild(t.apply(this,arguments))}))},Ro.insert=function(t,e){return t=H(t),e=A(e),this.select((function(){return this.insertBefore(t.apply(this,arguments),e.apply(this,arguments)||null)}))},Ro.remove=function(){return this.each(U)},Ro.data=function(t,e){function n(t,n){var r,i,o,a=t.length,c=n.length,f=Math.min(a,c),h=new Array(c),p=new Array(c),m=new Array(a);if(e){var g,v=new d,y=new Array(a);for(r=-1;++r<a;)(i=t[r])&&(v.has(g=e.call(i,i.__data__,r))?m[r]=i:v.set(g,i),y[r]=g);for(r=-1;++r<c;)(i=v.get(g=e.call(n,o=n[r],r)))?!0!==i&&(h[r]=i,i.__data__=o):p[r]=W(o),v.set(g,!0);for(r=-1;++r<a;)r in y&&!0!==v.get(y[r])&&(m[r]=t[r])}else{for(r=-1;++r<f;)i=t[r],o=n[r],i?(i.__data__=o,h[r]=i):p[r]=W(o);for(;c>r;++r)p[r]=W(n[r]);for(;a>r;++r)m[r]=t[r]}p.update=h,p.parentNode=h.parentNode=m.parentNode=t.parentNode,s.push(p),u.push(h),l.push(m)}var r,i,o=-1,a=this.length;if(!arguments.length){for(t=new Array(a=(r=this[0]).length);++o<a;)(i=r[o])&&(t[o]=i.__data__);return t}var s=Z([]),u=D([]),l=D([]);if("function"==typeof t)for(;++o<a;)n(r=this[o],t.call(r,r.parentNode.__data__,o));else for(;++o<a;)n(r=this[o],t);return u.enter=function(){return s},u.exit=function(){return l},u},Ro.datum=function(t){return arguments.length?this.property("__data__",t):this.property("__data__")},Ro.filter=function(t){var e,n,r,i=[];"function"!=typeof t&&(t=V(t));for(var o=0,a=this.length;a>o;o++){i.push(e=[]),e.parentNode=(n=this[o]).parentNode;for(var s=0,u=n.length;u>s;s++)(r=n[s])&&t.call(r,r.__data__,s,o)&&e.push(r)}return D(i)},Ro.order=function(){for(var t=-1,e=this.length;++t<e;)for(var n,r=this[t],i=r.length-1,o=r[i];--i>=0;)(n=r[i])&&(o&&o!==n.nextSibling&&o.parentNode.insertBefore(n,o),o=n);return this},Ro.sort=function(t){t=$.apply(this,arguments);for(var e=-1,n=this.length;++e<n;)this[e].sort(t);return this.order()},Ro.each=function(t){return Y(this,(function(e,n,r){t.call(e,e.__data__,n,r)}))},Ro.call=function(t){var e=bo(arguments);return t.apply(e[0]=this,e),this},Ro.empty=function(){return!this.node()},Ro.node=function(){for(var t=0,e=this.length;e>t;t++)for(var n=this[t],r=0,i=n.length;i>r;r++){var o=n[r];if(o)return o}return null},Ro.size=function(){var t=0;return Y(this,(function(){++t})),t};var qo=[];vo.selection.enter=Z,vo.selection.enter.prototype=qo,qo.append=Ro.append,qo.empty=Ro.empty,qo.node=Ro.node,qo.call=Ro.call,qo.size=Ro.size,qo.select=function(t){for(var e,n,r,i,o,a=[],s=-1,u=this.length;++s<u;){r=(i=this[s]).update,a.push(e=[]),e.parentNode=i.parentNode;for(var l=-1,c=i.length;++l<c;)(o=i[l])?(e.push(r[l]=n=t.call(i.parentNode,o.__data__,l,s)),n.__data__=o.__data__):e.push(null)}return D(a)},qo.insert=function(t,e){return arguments.length<2&&(e=function(t){var e,n;return function(r,i,o){var a,s=t[o].update,u=s.length;for(o!=n&&(n=o,e=0),i>=e&&(e=i+1);!(a=s[e])&&++e<u;);return a}}(this)),Ro.insert.call(this,t,e)},vo.select=function(t){var e;return"string"==typeof t?(e=[jo(t,xo)]).parentNode=xo.documentElement:(e=[t]).parentNode=o(t),D([e])},vo.selectAll=function(t){var e;return"string"==typeof t?(e=bo(Po(t,xo))).parentNode=xo.documentElement:(e=bo(t)).parentNode=null,D([e])},Ro.on=function(t,e,n){var r=arguments.length;if(3>r){if("string"!=typeof t){for(n in 2>r&&(e=!1),t)this.each(G(n,t[n],e));return this}if(2>r)return(r=this.node()["__on"+t])&&r._;n=!1}return this.each(G(t,e,n))};var Bo=vo.map({mouseenter:"mouseover",mouseleave:"mouseout"});xo&&Bo.forEach((function(t){"on"+t in xo&&Bo.remove(t)}));var zo,Ho=0;vo.mouse=function(t){return Q(t,C())};var Uo=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;vo.touch=function(t,e,n){if(arguments.length<3&&(n=e,e=C().changedTouches),e)for(var r,i=0,o=e.length;o>i;++i)if((r=e[i]).identifier===n)return Q(t,r)},vo.behavior.drag=function(){function t(){this.on("mousedown.drag",i).on("touchstart.drag",o)}function e(t,e,i,o,a){return function(){var s,u=this,l=vo.event.target.correspondingElement||vo.event.target,c=u.parentNode,f=n.of(u,arguments),h=0,d=t(),p=".drag"+(null==d?"":"-"+d),m=vo.select(i(l)).on(o+p,(function(){var t,n,r=e(c,d);r&&(t=r[0]-v[0],n=r[1]-v[1],h|=t|n,v=r,f({type:"drag",x:r[0]+s[0],y:r[1]+s[1],dx:t,dy:n}))})).on(a+p,(function(){e(c,d)&&(m.on(o+p,null).on(a+p,null),g(h),f({type:"dragend"}))})),g=J(l),v=e(c,d);s=r?[(s=r.apply(u,arguments)).x-v[0],s.y-v[1]]:[0,0],f({type:"dragstart"})}}var n=T(t,"drag","dragstart","dragend"),r=null,i=e(N,vo.mouse,a,"mousemove","mouseup"),o=e(tt,vo.touch,_,"touchmove","touchend");return t.origin=function(e){return arguments.length?(r=e,t):r},vo.rebind(t,n,"on")},vo.touches=function(t,e){return arguments.length<2&&(e=C().touches),e?bo(e).map((function(e){var n=Q(t,e);return n.identifier=e.identifier,n})):[]};var Wo=1e-6,Vo=Wo*Wo,$o=Math.PI,Yo=2*$o,Zo=Yo-Wo,Go=$o/2,Ko=$o/180,Xo=180/$o,Jo=Math.SQRT2;vo.interpolateZoom=function(t,e){var n,r,i=t[0],o=t[1],a=t[2],s=e[0],u=e[1],l=e[2],c=s-i,f=u-o,h=c*c+f*f;if(Vo>h)r=Math.log(l/a)/Jo,n=function(t){return[i+t*c,o+t*f,a*Math.exp(Jo*t*r)]};else{var d=Math.sqrt(h),p=(l*l-a*a+4*h)/(2*a*2*d),m=(l*l-a*a-4*h)/(2*l*2*d),g=Math.log(Math.sqrt(p*p+1)-p),v=Math.log(Math.sqrt(m*m+1)-m);r=(v-g)/Jo,n=function(t){var e=t*r,n=ot(g),s=a/(2*d)*(n*function(t){return((t=Math.exp(2*t))-1)/(t+1)}(Jo*e+g)-function(t){return((t=Math.exp(t))-1/t)/2}(g));return[i+s*c,o+s*f,a*n/ot(Jo*e+g)]}}return n.duration=1e3*r,n},vo.behavior.zoom=function(){function t(t){t.on(C,c).on(ta+".zoom",h).on("dblclick.zoom",d).on(j,f)}function e(t){return[(t[0]-S.x)/S.k,(t[1]-S.y)/S.k]}function n(t){S.k=Math.max(N[0],Math.min(N[1],t))}function r(t,e){e=function(t){return[t[0]*S.k+S.x,t[1]*S.k+S.y]}(e),S.x+=t[0]-e[0],S.y+=t[1]-e[1]}function i(e,i,o,a){e.__chart__={x:S.x,y:S.y,k:S.k},n(Math.pow(2,a)),r(m=i,o),e=vo.select(e),M>0&&(e=e.transition().duration(M)),e.call(t.event)}function o(){x&&x.domain(b.range().map((function(t){return(t-S.x)/S.k})).map(b.invert)),_&&_.domain(w.range().map((function(t){return(t-S.y)/S.k})).map(w.invert))}function s(t){E++||t({type:"zoomstart"})}function u(t){o(),t({type:"zoom",scale:S.k,translate:[S.x,S.y]})}function l(t){--E||(t({type:"zoomend"}),m=null)}function c(){var t=this,n=P.of(t,arguments),i=0,o=vo.select(a(t)).on(D,(function(){i=1,r(vo.mouse(t),c),u(n)})).on(A,(function(){o.on(D,null).on(A,null),f(i),l(n)})),c=e(vo.mouse(t)),f=J(t);Ys.call(t),s(n)}function f(){function t(){var t=vo.touches(p);return d=S.k,t.forEach((function(t){t.identifier in g&&(g[t.identifier]=e(t))})),t}function o(){var e=vo.event.target;vo.select(e).on(x,a).on(w,h),_.push(e);for(var n=vo.event.changedTouches,r=0,o=n.length;o>r;++r)g[n[r].identifier]=null;var s=t(),u=Date.now();if(1===s.length){if(500>u-y){var l=s[0];i(p,l,g[l.identifier],Math.floor(Math.log(S.k)/Math.LN2)+1),k()}y=u}else if(s.length>1){l=s[0];var c=s[1],f=l[0]-c[0],d=l[1]-c[1];v=f*f+d*d}}function a(){var t,e,i,o,a=vo.touches(p);Ys.call(p);for(var s=0,l=a.length;l>s;++s,o=null)if(i=a[s],o=g[i.identifier]){if(e)break;t=i,e=o}if(o){var c=(c=i[0]-t[0])*c+(c=i[1]-t[1])*c,f=v&&Math.sqrt(c/v);t=[(t[0]+i[0])/2,(t[1]+i[1])/2],e=[(e[0]+o[0])/2,(e[1]+o[1])/2],n(f*d)}y=null,r(t,e),u(m)}function h(){if(vo.event.touches.length){for(var e=vo.event.changedTouches,n=0,r=e.length;r>n;++n)delete g[e[n].identifier];for(var i in g)return void t()}vo.selectAll(_).on(b,null),O.on(C,c).on(j,f),N(),l(m)}var d,p=this,m=P.of(p,arguments),g={},v=0,b=".zoom-"+vo.event.changedTouches[0].identifier,x="touchmove"+b,w="touchend"+b,_=[],O=vo.select(p),N=J(p);o(),s(m),O.on(C,null).on(j,o)}function h(){var t=P.of(this,arguments);v?clearTimeout(v):(Ys.call(this),p=e(m=g||vo.mouse(this)),s(t)),v=setTimeout((function(){v=null,l(t)}),50),k(),n(Math.pow(2,.002*Qo())*S.k),r(m,p),u(t)}function d(){var t=vo.mouse(this),n=Math.log(S.k)/Math.LN2;i(this,t,e(t),vo.event.shiftKey?Math.ceil(n)-1:Math.floor(n)+1)}var p,m,g,v,y,b,x,w,_,S={x:0,y:0,k:1},O=[960,500],N=ea,M=250,E=0,C="mousedown.zoom",D="mousemove.zoom",A="mouseup.zoom",j="touchstart.zoom",P=T(t,"zoomstart","zoom","zoomend");return ta||(ta="onwheel"in xo?(Qo=function(){return-vo.event.deltaY*(vo.event.deltaMode?120:1)},"wheel"):"onmousewheel"in xo?(Qo=function(){return vo.event.wheelDelta},"mousewheel"):(Qo=function(){return-vo.event.detail},"MozMousePixelScroll")),t.event=function(t){t.each((function(){var t=P.of(this,arguments),e=S;Vs?vo.select(this).transition().each("start.zoom",(function(){S=this.__chart__||{x:0,y:0,k:1},s(t)})).tween("zoom:zoom",(function(){var n=O[0],r=O[1],i=m?m[0]:n/2,o=m?m[1]:r/2,a=vo.interpolateZoom([(i-S.x)/S.k,(o-S.y)/S.k,n/S.k],[(i-e.x)/e.k,(o-e.y)/e.k,n/e.k]);return function(e){var r=a(e),s=n/r[2];this.__chart__=S={x:i-r[0]*s,y:o-r[1]*s,k:s},u(t)}})).each("interrupt.zoom",(function(){l(t)})).each("end.zoom",(function(){l(t)})):(this.__chart__=S,s(t),u(t),l(t))}))},t.translate=function(e){return arguments.length?(S={x:+e[0],y:+e[1],k:S.k},o(),t):[S.x,S.y]},t.scale=function(e){return arguments.length?(S={x:S.x,y:S.y,k:null},n(+e),o(),t):S.k},t.scaleExtent=function(e){return arguments.length?(N=null==e?ea:[+e[0],+e[1]],t):N},t.center=function(e){return arguments.length?(g=e&&[+e[0],+e[1]],t):g},t.size=function(e){return arguments.length?(O=e&&[+e[0],+e[1]],t):O},t.duration=function(e){return arguments.length?(M=+e,t):M},t.x=function(e){return arguments.length?(x=e,b=e.copy(),S={x:0,y:0,k:1},t):x},t.y=function(e){return arguments.length?(_=e,w=e.copy(),S={x:0,y:0,k:1},t):_},vo.rebind(t,P,"on")};var Qo,ta,ea=[0,1/0];vo.color=st,st.prototype.toString=function(){return this.rgb()+""},vo.hsl=ut;var na=ut.prototype=new st;na.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new ut(this.h,this.s,this.l/t)},na.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new ut(this.h,this.s,t*this.l)},na.rgb=function(){return lt(this.h,this.s,this.l)},vo.hcl=ct;var ra=ct.prototype=new st;ra.brighter=function(t){return new ct(this.h,this.c,Math.min(100,this.l+ia*(arguments.length?t:1)))},ra.darker=function(t){return new ct(this.h,this.c,Math.max(0,this.l-ia*(arguments.length?t:1)))},ra.rgb=function(){return ft(this.h,this.c,this.l).rgb()},vo.lab=ht;var ia=18,oa=.95047,aa=1,sa=1.08883,ua=ht.prototype=new st;ua.brighter=function(t){return new ht(Math.min(100,this.l+ia*(arguments.length?t:1)),this.a,this.b)},ua.darker=function(t){return new ht(Math.max(0,this.l-ia*(arguments.length?t:1)),this.a,this.b)},ua.rgb=function(){return dt(this.l,this.a,this.b)},vo.rgb=vt;var la=vt.prototype=new st;la.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var e=this.r,n=this.g,r=this.b,i=30;return e||n||r?(e&&i>e&&(e=i),n&&i>n&&(n=i),r&&i>r&&(r=i),new vt(Math.min(255,e/t),Math.min(255,n/t),Math.min(255,r/t))):new vt(i,i,i)},la.darker=function(t){return new vt((t=Math.pow(.7,arguments.length?t:1))*this.r,t*this.g,t*this.b)},la.hsl=function(){return _t(this.r,this.g,this.b)},la.toString=function(){return"#"+xt(this.r)+xt(this.g)+xt(this.b)};var ca=vo.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});ca.forEach((function(t,e){ca.set(t,yt(e))})),vo.functor=Mt,vo.xhr=Et(_),vo.dsv=function(t,e){function n(t,n,o){arguments.length<3&&(o=n,n=null);var a=kt(t,e,null==n?r:i(n),o);return a.row=function(t){return arguments.length?a.response(null==(n=t)?r:i(t)):n},a}function r(t){return n.parse(t.responseText)}function i(t){return function(e){return n.parse(e.responseText,t)}}function o(e){return e.map(a).join(t)}function a(t){return s.test(t)?'"'+t.replace(/\"/g,'""')+'"':t}var s=new RegExp('["'+t+"\n]"),u=t.charCodeAt(0);return n.parse=function(t,e){var r;return n.parseRows(t,(function(t,n){if(r)return r(t,n-1);var i=new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+"]"})).join(",")+"}");r=e?function(t,n){return e(i(t),n)}:i}))},n.parseRows=function(t,e){function n(){if(c>=l)return a;if(i)return i=!1,o;var e=c;if(34===t.charCodeAt(e)){for(var n=e;n++<l;)if(34===t.charCodeAt(n)){if(34!==t.charCodeAt(n+1))break;++n}return c=n+2,13===(r=t.charCodeAt(n+1))?(i=!0,10===t.charCodeAt(n+2)&&++c):10===r&&(i=!0),t.slice(e+1,n).replace(/""/g,'"')}for(;l>c;){var r,s=1;if(10===(r=t.charCodeAt(c++)))i=!0;else if(13===r)i=!0,10===t.charCodeAt(c)&&(++c,++s);else if(r!==u)continue;return t.slice(e,c-s)}return t.slice(e)}for(var r,i,o={},a={},s=[],l=t.length,c=0,f=0;(r=n())!==a;){for(var h=[];r!==o&&r!==a;)h.push(r),r=n();e&&null==(h=e(h,f++))||s.push(h)}return s},n.format=function(e){if(Array.isArray(e[0]))return n.formatRows(e);var r=new w,i=[];return e.forEach((function(t){for(var e in t)r.has(e)||i.push(r.add(e))})),[i.map(a).join(t)].concat(e.map((function(e){return i.map((function(t){return a(e[t])})).join(t)}))).join("\n")},n.formatRows=function(t){return t.map(o).join("\n")},n},vo.csv=vo.dsv(",","text/csv"),vo.tsv=vo.dsv("\t","text/tab-separated-values");var fa,ha,da,pa,ma=this[O(this,"requestAnimationFrame")]||function(t){setTimeout(t,17)};vo.timer=function(){Ct.apply(this,arguments)},vo.timer.flush=function(){Dt(),At()},vo.round=function(t,e){return e?Math.round(t*(e=Math.pow(10,e)))/e:Math.round(t)};var ga=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map((function(t,e){var n=Math.pow(10,3*Eo(8-e));return{scale:e>8?function(t){return t/n}:function(t){return t*n},symbol:t}}));vo.formatPrefix=function(t,e){var n=0;return(t=+t)&&(0>t&&(t*=-1),e&&(t=vo.round(t,jt(t,e))),n=1+Math.floor(1e-12+Math.log(t)/Math.LN10),n=Math.max(-24,Math.min(24,3*Math.floor((n-1)/3)))),ga[8+n/3]};var va=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,ya=vo.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,e){return t.toPrecision(e)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},r:function(t,e){return(t=vo.round(t,jt(t,e))).toFixed(Math.max(0,Math.min(20,jt(t*(1+1e-15),e))))}}),ba=vo.time={},xa=Date;Rt.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){wa.setUTCDate.apply(this._,arguments)},setDay:function(){wa.setUTCDay.apply(this._,arguments)},setFullYear:function(){wa.setUTCFullYear.apply(this._,arguments)},setHours:function(){wa.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){wa.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){wa.setUTCMinutes.apply(this._,arguments)},setMonth:function(){wa.setUTCMonth.apply(this._,arguments)},setSeconds:function(){wa.setUTCSeconds.apply(this._,arguments)},setTime:function(){wa.setTime.apply(this._,arguments)}};var wa=Date.prototype;ba.year=Lt((function(t){return(t=ba.day(t)).setMonth(0,1),t}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t){return t.getFullYear()})),ba.years=ba.year.range,ba.years.utc=ba.year.utc.range,ba.day=Lt((function(t){var e=new xa(2e3,0);return e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),e}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t){return t.getDate()-1})),ba.days=ba.day.range,ba.days.utc=ba.day.utc.range,ba.dayOfYear=function(t){var e=ba.year(t);return Math.floor((t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach((function(t,e){e=7-e;var n=ba[t]=Lt((function(t){return(t=ba.day(t)).setDate(t.getDate()-(t.getDay()+e)%7),t}),(function(t,e){t.setDate(t.getDate()+7*Math.floor(e))}),(function(t){var n=ba.year(t).getDay();return Math.floor((ba.dayOfYear(t)+(n+e)%7)/7)-(n!==e)}));ba[t+"s"]=n.range,ba[t+"s"].utc=n.utc.range,ba[t+"OfYear"]=function(t){var n=ba.year(t).getDay();return Math.floor((ba.dayOfYear(t)+(n+e)%7)/7)}})),ba.week=ba.sunday,ba.weeks=ba.sunday.range,ba.weeks.utc=ba.sunday.utc.range,ba.weekOfYear=ba.sundayOfYear;var _a={"-":"",_:" ",0:"0"},Sa=/^\s*\d+/,Oa=/^%/;vo.locale=function(t){return{numberFormat:Pt(t),timeFormat:qt(t)}};var Na=vo.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});vo.format=Na.numberFormat,vo.geo={},oe.prototype={s:0,t:0,add:function(t){ae(t,this.t,Ma),ae(Ma.s,this.s,this),this.s?this.t+=Ma.t:this.s=Ma.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var Ma=new oe;vo.geo.stream=function(t,e){t&&Ea.hasOwnProperty(t.type)?Ea[t.type](t,e):se(t,e)};var Ea={Feature:function(t,e){se(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)se(n[r].geometry,e)}},ka={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){ue(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)ue(n[r],e,0)},Polygon:function(t,e){le(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)le(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)se(n[r],e)}};vo.geo.area=function(t){return Ca=0,vo.geo.stream(t,Da),Ca};var Ca,Ta=new oe,Da={sphere:function(){Ca+=4*$o},point:N,lineStart:N,lineEnd:N,polygonStart:function(){Ta.reset(),Da.lineStart=ce},polygonEnd:function(){var t=2*Ta;Ca+=0>t?4*$o+t:t,Da.lineStart=Da.lineEnd=Da.point=N}};vo.geo.bounds=function(){function t(t,e){b.push(x=[c=t,h=t]),f>e&&(f=e),e>d&&(d=e)}function e(e,n){var r=fe([e*Ko,n*Ko]);if(v){var i=de(v,r),o=de([i[1],-i[0],0],i);ge(o),o=ve(o);var a=e-p,u=a>0?1:-1,l=o[0]*Xo*u,m=Eo(a)>180;if(m^(l>u*p&&u*e>l))(g=o[1]*Xo)>d&&(d=g);else if(m^((l=(l+360)%360-180)>u*p&&u*e>l)){var g=-o[1]*Xo;f>g&&(f=g)}else f>n&&(f=n),n>d&&(d=n);m?p>e?s(c,e)>s(c,h)&&(h=e):s(e,h)>s(c,h)&&(c=e):h>=c?(c>e&&(c=e),e>h&&(h=e)):e>p?s(c,e)>s(c,h)&&(h=e):s(e,h)>s(c,h)&&(c=e)}else t(e,n);v=r,p=e}function n(){w.point=e}function r(){x[0]=c,x[1]=h,w.point=t,v=null}function i(t,n){if(v){var r=t-p;y+=Eo(r)>180?r+(r>0?360:-360):r}else m=t,g=n;Da.point(t,n),e(t,n)}function o(){Da.lineStart()}function a(){i(m,g),Da.lineEnd(),Eo(y)>Wo&&(c=-(h=180)),x[0]=c,x[1]=h,v=null}function s(t,e){return(e-=t)<0?e+360:e}function u(t,e){return t[0]-e[0]}function l(t,e){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t<e[0]||e[1]<t}var c,f,h,d,p,m,g,v,y,b,x,w={point:t,lineStart:n,lineEnd:r,polygonStart:function(){w.point=i,w.lineStart=o,w.lineEnd=a,y=0,Da.polygonStart()},polygonEnd:function(){Da.polygonEnd(),w.point=t,w.lineStart=n,w.lineEnd=r,0>Ta?(c=-(h=180),f=-(d=90)):y>Wo?d=90:-Wo>y&&(f=-90),x[0]=c,x[1]=h}};return function(t){if(d=h=-(c=f=1/0),b=[],vo.geo.stream(t,w),o=b.length){b.sort(u);for(var e=1,n=[p=b[0]];o>e;++e)l((i=b[e])[0],p)||l(i[1],p)?(s(p[0],i[1])>s(p[0],p[1])&&(p[1]=i[1]),s(i[0],p[1])>s(p[0],p[1])&&(p[0]=i[0])):n.push(p=i);for(var r,i,o,a=-1/0,p=(e=0,n[o=n.length-1]);o>=e;p=i,++e)i=n[e],(r=s(p[1],i[0]))>a&&(a=r,c=i[0],h=p[1])}return b=x=null,c===1/0||f===1/0?[[NaN,NaN],[NaN,NaN]]:[[c,f],[h,d]]}}(),vo.geo.centroid=function(t){Aa=ja=Pa=Ia=Ra=La=Fa=qa=Ba=za=Ha=0,vo.geo.stream(t,Ua);var e=Ba,n=za,r=Ha,i=e*e+n*n+r*r;return Vo>i&&(e=La,n=Fa,r=qa,Wo>ja&&(e=Pa,n=Ia,r=Ra),Vo>(i=e*e+n*n+r*r))?[NaN,NaN]:[Math.atan2(n,e)*Xo,it(r/Math.sqrt(i))*Xo]};var Aa,ja,Pa,Ia,Ra,La,Fa,qa,Ba,za,Ha,Ua={sphere:N,point:be,lineStart:we,lineEnd:_e,polygonStart:function(){Ua.lineStart=Se},polygonEnd:function(){Ua.lineStart=we}},Wa=Ce(Ne,(function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,a){var s=o>0?$o:-$o,u=Eo(o-n);Eo(u-$o)<Wo?(t.point(n,r=(r+a)/2>0?Go:-Go),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),t.point(o,r),e=0):i!==s&&u>=$o&&(Eo(n-i)<Wo&&(n-=i*Wo),Eo(o-s)<Wo&&(o-=s*Wo),r=function(t,e,n,r){var i,o,a=Math.sin(t-n);return Eo(a)>Wo?Math.atan((Math.sin(e)*(o=Math.cos(r))*Math.sin(n)-Math.sin(r)*(i=Math.cos(e))*Math.sin(t))/(i*o*a)):(e+r)/2}(n,r,o,a),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),e=0),t.point(n=o,r=a),i=s},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}),(function(t,e,n,r){var i;if(null==t)i=n*Go,r.point(-$o,i),r.point(0,i),r.point($o,i),r.point($o,0),r.point($o,-i),r.point(0,-i),r.point(-$o,-i),r.point(-$o,0),r.point(-$o,i);else if(Eo(t[0]-e[0])>Wo){var o=t[0]<e[0]?$o:-$o;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])}),[-$o,-$o/2]),Va=1e9;vo.geo.clipExtent=function(){var t,e,n,r,i,o,a={stream:function(t){return i&&(i.valid=!1),(i=o(t)).valid=!0,i},extent:function(s){return arguments.length?(o=Pe(t=+s[0][0],e=+s[0][1],n=+s[1][0],r=+s[1][1]),i&&(i.valid=!1,i=null),a):[[t,e],[n,r]]}};return a.extent([[0,0],[960,500]])},(vo.geo.conicEqualArea=function(){return Ie(Re)}).raw=Re,vo.geo.albers=function(){return vo.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},vo.geo.albersUsa=function(){function t(t){var o=t[0],a=t[1];return e=null,n(o,a),e||(r(o,a),e)||i(o,a),e}var e,n,r,i,o=vo.geo.albers(),a=vo.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=vo.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,n){e=[t,n]}};return t.invert=function(t){var e=o.scale(),n=o.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&.234>i&&r>=-.425&&-.214>r?a:i>=.166&&.234>i&&r>=-.214&&-.115>r?s:o).invert(t)},t.stream=function(t){var e=o.stream(t),n=a.stream(t),r=s.stream(t);return{point:function(t,i){e.point(t,i),n.point(t,i),r.point(t,i)},sphere:function(){e.sphere(),n.sphere(),r.sphere()},lineStart:function(){e.lineStart(),n.lineStart(),r.lineStart()},lineEnd:function(){e.lineEnd(),n.lineEnd(),r.lineEnd()},polygonStart:function(){e.polygonStart(),n.polygonStart(),r.polygonStart()},polygonEnd:function(){e.polygonEnd(),n.polygonEnd(),r.polygonEnd()}}},t.precision=function(e){return arguments.length?(o.precision(e),a.precision(e),s.precision(e),t):o.precision()},t.scale=function(e){return arguments.length?(o.scale(e),a.scale(.35*e),s.scale(e),t.translate(o.translate())):o.scale()},t.translate=function(e){if(!arguments.length)return o.translate();var l=o.scale(),c=+e[0],f=+e[1];return n=o.translate(e).clipExtent([[c-.455*l,f-.238*l],[c+.455*l,f+.238*l]]).stream(u).point,r=a.translate([c-.307*l,f+.201*l]).clipExtent([[c-.425*l+Wo,f+.12*l+Wo],[c-.214*l-Wo,f+.234*l-Wo]]).stream(u).point,i=s.translate([c-.205*l,f+.212*l]).clipExtent([[c-.214*l+Wo,f+.166*l+Wo],[c-.115*l-Wo,f+.234*l-Wo]]).stream(u).point,t},t.scale(1070)};var $a,Ya,Za,Ga,Ka,Xa,Ja={point:N,lineStart:N,lineEnd:N,polygonStart:function(){Ya=0,Ja.lineStart=Le},polygonEnd:function(){Ja.lineStart=Ja.lineEnd=Ja.point=N,$a+=Eo(Ya/2)}},Qa={point:function(t,e){Za>t&&(Za=t),t>Ka&&(Ka=t),Ga>e&&(Ga=e),e>Xa&&(Xa=e)},lineStart:N,lineEnd:N,polygonStart:N,polygonEnd:N},ts={point:Be,lineStart:ze,lineEnd:He,polygonStart:function(){ts.lineStart=Ue},polygonEnd:function(){ts.point=Be,ts.lineStart=ze,ts.lineEnd=He}};vo.geo.path=function(){function t(t){return t&&("function"==typeof s&&o.pointRadius(+s.apply(this,arguments)),a&&a.valid||(a=i(o)),vo.geo.stream(t,a)),o.result()}function e(){return a=null,t}var n,r,i,o,a,s=4.5;return t.area=function(t){return $a=0,vo.geo.stream(t,i(Ja)),$a},t.centroid=function(t){return Pa=Ia=Ra=La=Fa=qa=Ba=za=Ha=0,vo.geo.stream(t,i(ts)),Ha?[Ba/Ha,za/Ha]:qa?[La/qa,Fa/qa]:Ra?[Pa/Ra,Ia/Ra]:[NaN,NaN]},t.bounds=function(t){return Ka=Xa=-(Za=Ga=1/0),vo.geo.stream(t,i(Qa)),[[Za,Ga],[Ka,Xa]]},t.projection=function(t){return arguments.length?(i=(n=t)?t.stream||function(t){var e=Ve((function(e,n){return t([e*Xo,n*Xo])}));return function(t){return Ke(e(t))}}(t):_,e()):n},t.context=function(t){return arguments.length?(o=null==(r=t)?new Fe:new We(t),"function"!=typeof s&&o.pointRadius(s),e()):r},t.pointRadius=function(e){return arguments.length?(s="function"==typeof e?e:(o.pointRadius(+e),+e),t):s},t.projection(vo.geo.albersUsa()).context(null)},vo.geo.transform=function(t){return{stream:function(e){var n=new $e(e);for(var r in t)n[r]=t[r];return n}}},$e.prototype={point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},vo.geo.projection=Ze,vo.geo.projectionMutator=Ge,(vo.geo.equirectangular=function(){return Ze(Xe)}).raw=Xe.invert=Xe,vo.geo.rotation=function(t){function e(e){return(e=t(e[0]*Ko,e[1]*Ko))[0]*=Xo,e[1]*=Xo,e}return t=Qe(t[0]%360*Ko,t[1]*Ko,t.length>2?t[2]*Ko:0),e.invert=function(e){return(e=t.invert(e[0]*Ko,e[1]*Ko))[0]*=Xo,e[1]*=Xo,e},e},Je.invert=Xe,vo.geo.circle=function(){function t(){var t="function"==typeof r?r.apply(this,arguments):r,e=Qe(-t[0]*Ko,-t[1]*Ko,0).invert,i=[];return n(null,null,1,{point:function(t,n){i.push(t=e(t,n)),t[0]*=Xo,t[1]*=Xo}}),{type:"Polygon",coordinates:[i]}}var e,n,r=[0,0],i=6;return t.origin=function(e){return arguments.length?(r=e,t):r},t.angle=function(r){return arguments.length?(n=rn((e=+r)*Ko,i*Ko),t):e},t.precision=function(r){return arguments.length?(n=rn(e*Ko,(i=+r)*Ko),t):i},t.angle(90)},vo.geo.distance=function(t,e){var n,r=(e[0]-t[0])*Ko,i=t[1]*Ko,o=e[1]*Ko,a=Math.sin(r),s=Math.cos(r),u=Math.sin(i),l=Math.cos(i),c=Math.sin(o),f=Math.cos(o);return Math.atan2(Math.sqrt((n=f*a)*n+(n=l*c-u*f*s)*n),u*c+l*f*s)},vo.geo.graticule=function(){function t(){return{type:"MultiLineString",coordinates:e()}}function e(){return vo.range(Math.ceil(o/g)*g,i,g).map(h).concat(vo.range(Math.ceil(l/v)*v,u,v).map(d)).concat(vo.range(Math.ceil(r/p)*p,n,p).filter((function(t){return Eo(t%g)>Wo})).map(c)).concat(vo.range(Math.ceil(s/m)*m,a,m).filter((function(t){return Eo(t%v)>Wo})).map(f))}var n,r,i,o,a,s,u,l,c,f,h,d,p=10,m=p,g=90,v=360,y=2.5;return t.lines=function(){return e().map((function(t){return{type:"LineString",coordinates:t}}))},t.outline=function(){return{type:"Polygon",coordinates:[h(o).concat(d(u).slice(1),h(i).reverse().slice(1),d(l).reverse().slice(1))]}},t.extent=function(e){return arguments.length?t.majorExtent(e).minorExtent(e):t.minorExtent()},t.majorExtent=function(e){return arguments.length?(o=+e[0][0],i=+e[1][0],l=+e[0][1],u=+e[1][1],o>i&&(e=o,o=i,i=e),l>u&&(e=l,l=u,u=e),t.precision(y)):[[o,l],[i,u]]},t.minorExtent=function(e){return arguments.length?(r=+e[0][0],n=+e[1][0],s=+e[0][1],a=+e[1][1],r>n&&(e=r,r=n,n=e),s>a&&(e=s,s=a,a=e),t.precision(y)):[[r,s],[n,a]]},t.step=function(e){return arguments.length?t.majorStep(e).minorStep(e):t.minorStep()},t.majorStep=function(e){return arguments.length?(g=+e[0],v=+e[1],t):[g,v]},t.minorStep=function(e){return arguments.length?(p=+e[0],m=+e[1],t):[p,m]},t.precision=function(e){return arguments.length?(y=+e,c=an(s,a,90),f=sn(r,n,y),h=an(l,u,90),d=sn(o,i,y),t):y},t.majorExtent([[-180,-90+Wo],[180,90-Wo]]).minorExtent([[-180,-80-Wo],[180,80+Wo]])},vo.geo.greatArc=function(){function t(){return{type:"LineString",coordinates:[e||r.apply(this,arguments),n||i.apply(this,arguments)]}}var e,n,r=un,i=ln;return t.distance=function(){return vo.geo.distance(e||r.apply(this,arguments),n||i.apply(this,arguments))},t.source=function(n){return arguments.length?(r=n,e="function"==typeof n?null:n,t):r},t.target=function(e){return arguments.length?(i=e,n="function"==typeof e?null:e,t):i},t.precision=function(){return arguments.length?t:0},t},vo.geo.interpolate=function(t,e){return function(t,e,n,r){var i=Math.cos(e),o=Math.sin(e),a=Math.cos(r),s=Math.sin(r),u=i*Math.cos(t),l=i*Math.sin(t),c=a*Math.cos(n),f=a*Math.sin(n),h=2*Math.asin(Math.sqrt(at(r-e)+i*a*at(n-t))),d=1/Math.sin(h),p=h?function(t){var e=Math.sin(t*=h)*d,n=Math.sin(h-t)*d,r=n*u+e*c,i=n*l+e*f,a=n*o+e*s;return[Math.atan2(i,r)*Xo,Math.atan2(a,Math.sqrt(r*r+i*i))*Xo]}:function(){return[t*Xo,e*Xo]};return p.distance=h,p}(t[0]*Ko,t[1]*Ko,e[0]*Ko,e[1]*Ko)},vo.geo.length=function(t){return es=0,vo.geo.stream(t,ns),es};var es,ns={sphere:N,point:N,lineStart:function(){function t(t,i){var o=Math.sin(i*=Ko),a=Math.cos(i),s=Eo((t*=Ko)-e),u=Math.cos(s);es+=Math.atan2(Math.sqrt((s=a*Math.sin(s))*s+(s=r*o-n*a*u)*s),n*o+r*a*u),e=t,n=o,r=a}var e,n,r;ns.point=function(i,o){e=i*Ko,n=Math.sin(o*=Ko),r=Math.cos(o),ns.point=t},ns.lineEnd=function(){ns.point=ns.lineEnd=N}},lineEnd:N,polygonStart:N,polygonEnd:N},rs=cn((function(t){return Math.sqrt(2/(1+t))}),(function(t){return 2*Math.asin(t/2)}));(vo.geo.azimuthalEqualArea=function(){return Ze(rs)}).raw=rs;var is=cn((function(t){var e=Math.acos(t);return e&&e/Math.sin(e)}),_);(vo.geo.azimuthalEquidistant=function(){return Ze(is)}).raw=is,(vo.geo.conicConformal=function(){return Ie(fn)}).raw=fn,(vo.geo.conicEquidistant=function(){return Ie(hn)}).raw=hn;var os=cn((function(t){return 1/t}),Math.atan);(vo.geo.gnomonic=function(){return Ze(os)}).raw=os,dn.invert=function(t,e){return[t,2*Math.atan(Math.exp(e))-Go]},(vo.geo.mercator=function(){return pn(dn)}).raw=dn;var as=cn((function(){return 1}),Math.asin);(vo.geo.orthographic=function(){return Ze(as)}).raw=as;var ss=cn((function(t){return 1/(1+t)}),(function(t){return 2*Math.atan(t)}));(vo.geo.stereographic=function(){return Ze(ss)}).raw=ss,mn.invert=function(t,e){return[-e,2*Math.atan(Math.exp(t))-Go]},(vo.geo.transverseMercator=function(){var t=pn(mn),e=t.center,n=t.rotate;return t.center=function(t){return t?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return t?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90])}).raw=mn,vo.geom={},vo.geom.hull=function(t){function e(t){if(t.length<3)return[];var e,i=Mt(n),o=Mt(r),a=t.length,s=[],u=[];for(e=0;a>e;e++)s.push([+i.call(this,t[e],e),+o.call(this,t[e],e),e]);for(s.sort(bn),e=0;a>e;e++)u.push([s[e][0],-s[e][1]]);var l=yn(s),c=yn(u),f=c[0]===l[0],h=c[c.length-1]===l[l.length-1],d=[];for(e=l.length-1;e>=0;--e)d.push(t[s[l[e]][2]]);for(e=+f;e<c.length-h;++e)d.push(t[s[c[e]][2]]);return d}var n=gn,r=vn;return arguments.length?e(t):(e.x=function(t){return arguments.length?(n=t,e):n},e.y=function(t){return arguments.length?(r=t,e):r},e)},vo.geom.polygon=function(t){return Ao(t,us),t};var us=vo.geom.polygon.prototype=[];us.area=function(){for(var t,e=-1,n=this.length,r=this[n-1],i=0;++e<n;)t=r,r=this[e],i+=t[1]*r[0]-t[0]*r[1];return.5*i},us.centroid=function(t){var e,n,r=-1,i=this.length,o=0,a=0,s=this[i-1];for(arguments.length||(t=-1/(6*this.area()));++r<i;)e=s,s=this[r],n=e[0]*s[1]-s[0]*e[1],o+=(e[0]+s[0])*n,a+=(e[1]+s[1])*n;return[o*t,a*t]},us.clip=function(t){for(var e,n,r,i,o,a,s=_n(t),u=-1,l=this.length-_n(this),c=this[l-1];++u<l;){for(e=t.slice(),t.length=0,i=this[u],o=e[(r=e.length-s)-1],n=-1;++n<r;)xn(a=e[n],c,i)?(xn(o,c,i)||t.push(wn(o,a,c,i)),t.push(a)):xn(o,c,i)&&t.push(wn(o,a,c,i)),o=a;s&&t.push(t[0]),c=i}return t};var ls,cs,fs,hs,ds,ps=[],ms=[];Tn.prototype.prepare=function(){for(var t,e=this.edges,n=e.length;n--;)(t=e[n].edge).b&&t.a||e.splice(n,1);return e.sort(Dn),e.length},Bn.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},zn.prototype={insert:function(t,e){var n,r,i;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;n=t}else this._?(t=Vn(this._),e.P=null,e.N=t,t.P=t.L=e,n=t):(e.P=e.N=null,this._=e,n=null);for(e.L=e.R=null,e.U=n,e.C=!0,t=e;n&&n.C;)n===(r=n.U).L?(i=r.R)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.R&&(Un(this,n),n=(t=n).U),n.C=!1,r.C=!0,Wn(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.L&&(Wn(this,n),n=(t=n).U),n.C=!1,r.C=!0,Un(this,r)),n=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,n,r,i=t.U,o=t.L,a=t.R;if(n=o?a?Vn(a):o:a,i?i.L===t?i.L=n:i.R=n:this._=n,o&&a?(r=n.C,n.C=t.C,n.L=o,o.U=n,n!==a?(i=n.U,n.U=t.U,t=n.R,i.L=t,n.R=a,a.U=n):(n.U=i,i=n,t=n.R)):(r=t.C,t=n),t&&(t.U=i),!r){if(t&&t.C)return void(t.C=!1);do{if(t===this._)break;if(t===i.L){if((e=i.R).C&&(e.C=!1,i.C=!0,Un(this,i),e=i.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,Wn(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,Un(this,i),t=this._;break}}else if((e=i.L).C&&(e.C=!1,i.C=!0,Wn(this,i),e=i.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,Un(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,Wn(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}},vo.geom.voronoi=function(t){function e(t){var e=new Array(t.length),r=s[0][0],i=s[0][1],o=s[1][0],a=s[1][1];return $n(n(t),s).cells.forEach((function(n,s){var u=n.edges,l=n.site,c=e[s]=u.length?u.map((function(t){var e=t.start();return[e.x,e.y]})):l.x>=r&&l.x<=o&&l.y>=i&&l.y<=a?[[r,a],[o,a],[o,i],[r,i]]:[];c.point=t[s]})),e}function n(t){return t.map((function(t,e){return{x:Math.round(o(t,e)/Wo)*Wo,y:Math.round(a(t,e)/Wo)*Wo,i:e}}))}var r=gn,i=vn,o=r,a=i,s=gs;return t?e(t):(e.links=function(t){return $n(n(t)).edges.filter((function(t){return t.l&&t.r})).map((function(e){return{source:t[e.l.i],target:t[e.r.i]}}))},e.triangles=function(t){var e=[];return $n(n(t)).cells.forEach((function(n,r){for(var i,o=n.site,a=n.edges.sort(Dn),s=-1,u=a.length,l=a[u-1].edge,c=l.l===o?l.r:l.l;++s<u;)i=c,c=(l=a[s].edge).l===o?l.r:l.l,r<i.i&&r<c.i&&Zn(o,i,c)<0&&e.push([t[r],t[i.i],t[c.i]])})),e},e.x=function(t){return arguments.length?(o=Mt(r=t),e):r},e.y=function(t){return arguments.length?(a=Mt(i=t),e):i},e.clipExtent=function(t){return arguments.length?(s=null==t?gs:t,e):s===gs?null:s},e.size=function(t){return arguments.length?e.clipExtent(t&&[[0,0],t]):s===gs?null:s&&s[1]},e)};var gs=[[-1e6,-1e6],[1e6,1e6]];vo.geom.delaunay=function(t){return vo.geom.voronoi().triangles(t)},vo.geom.quadtree=function(t,e,n,r,i){function o(t){function o(t,e,n,r,i,o,a,s){if(!isNaN(n)&&!isNaN(r))if(t.leaf){var u=t.x,c=t.y;if(null!=u)if(Eo(u-n)+Eo(c-r)<.01)l(t,e,n,r,i,o,a,s);else{var f=t.point;t.x=t.y=t.point=null,l(t,f,u,c,i,o,a,s),l(t,e,n,r,i,o,a,s)}else t.x=n,t.y=r,t.point=e}else l(t,e,n,r,i,o,a,s)}function l(t,e,n,r,i,a,s,u){var l=.5*(i+s),c=.5*(a+u),f=n>=l,h=r>=c,d=h<<1|f;t.leaf=!1,f?i=l:s=l,h?a=c:u=c,o(t=t.nodes[d]||(t.nodes[d]={leaf:!0,nodes:[],point:null,x:null,y:null}),e,n,r,i,a,s,u)}var c,f,h,d,p,m,g,v,y,b=Mt(s),x=Mt(u);if(null!=e)m=e,g=n,v=r,y=i;else if(v=y=-(m=g=1/0),f=[],h=[],p=t.length,a)for(d=0;p>d;++d)(c=t[d]).x<m&&(m=c.x),c.y<g&&(g=c.y),c.x>v&&(v=c.x),c.y>y&&(y=c.y),f.push(c.x),h.push(c.y);else for(d=0;p>d;++d){var w=+b(c=t[d],d),_=+x(c,d);m>w&&(m=w),g>_&&(g=_),w>v&&(v=w),_>y&&(y=_),f.push(w),h.push(_)}var S=v-m,O=y-g;S>O?y=g+S:v=m+O;var N={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(t){o(N,t,+b(t,++d),+x(t,d),m,g,v,y)}};if(N.visit=function(t){Xn(t,N,m,g,v,y)},N.find=function(t){return function(t,e,n,r,i,o,a){var s,u=1/0;return function t(l,c,f,h,d){if(!(c>o||f>a||r>h||i>d)){if(p=l.point){var p,m=e-l.x,g=n-l.y,v=m*m+g*g;if(u>v){var y=Math.sqrt(u=v);r=e-y,i=n-y,o=e+y,a=n+y,s=p}}for(var b=l.nodes,x=.5*(c+h),w=.5*(f+d),_=(n>=w)<<1|e>=x,S=_+4;S>_;++_)if(l=b[3&_])switch(3&_){case 0:t(l,c,f,x,w);break;case 1:t(l,x,f,h,w);break;case 2:t(l,c,w,x,d);break;case 3:t(l,x,w,h,d)}}}(t,r,i,o,a),s}(N,t[0],t[1],m,g,v,y)},d=-1,null==e){for(;++d<p;)o(N,t[d],f[d],h[d],m,g,v,y);--d}else t.forEach(N.add);return f=h=t=c=null,N}var a,s=gn,u=vn;return(a=arguments.length)?(s=Gn,u=Kn,3===a&&(i=n,r=e,n=e=0),o(t)):(o.x=function(t){return arguments.length?(s=t,o):s},o.y=function(t){return arguments.length?(u=t,o):u},o.extent=function(t){return arguments.length?(null==t?e=n=r=i=null:(e=+t[0][0],n=+t[0][1],r=+t[1][0],i=+t[1][1]),o):null==e?null:[[e,n],[r,i]]},o.size=function(t){return arguments.length?(null==t?e=n=r=i=null:(e=n=0,r=+t[0],i=+t[1]),o):null==e?null:[r-e,i-n]},o)},vo.interpolateRgb=Jn,vo.interpolateObject=Qn,vo.interpolateNumber=tr,vo.interpolateString=er;var vs=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ys=new RegExp(vs.source,"g");vo.interpolate=nr,vo.interpolators=[function(t,e){var n=typeof e;return("string"===n?ca.has(e.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(e)?Jn:er:e instanceof st?Jn:Array.isArray(e)?rr:"object"===n&&isNaN(e)?Qn:tr)(t,e)}],vo.interpolateArray=rr;var bs=function(){return _},xs=vo.map({linear:bs,poly:function(t){return function(e){return Math.pow(e,t)}},quad:function(){return ar},cubic:function(){return sr},sin:function(){return lr},exp:function(){return cr},circle:function(){return fr},elastic:function(t,e){var n;return arguments.length<2&&(e=.45),arguments.length?n=e/Yo*Math.asin(1/t):(t=1,n=e/4),function(r){return 1+t*Math.pow(2,-10*r)*Math.sin((r-n)*Yo/e)}},back:function(t){return t||(t=1.70158),function(e){return e*e*((t+1)*e-t)}},bounce:function(){return hr}}),ws=vo.map({in:_,out:ir,"in-out":or,"out-in":function(t){return or(ir(t))}});vo.ease=function(t){var e=t.indexOf("-"),n=e>=0?t.slice(0,e):t,r=e>=0?t.slice(e+1):"in";return n=xs.get(n)||bs,function(t){return function(e){return 0>=e?0:e>=1?1:t(e)}}((r=ws.get(r)||_)(n.apply(null,yo.call(arguments,1))))},vo.interpolateHcl=function(t,e){t=vo.hcl(t),e=vo.hcl(e);var n=t.h,r=t.c,i=t.l,o=e.h-n,a=e.c-r,s=e.l-i;return isNaN(a)&&(a=0,r=isNaN(r)?e.c:r),isNaN(o)?(o=0,n=isNaN(n)?e.h:n):o>180?o-=360:-180>o&&(o+=360),function(t){return ft(n+o*t,r+a*t,i+s*t)+""}},vo.interpolateHsl=function(t,e){t=vo.hsl(t),e=vo.hsl(e);var n=t.h,r=t.s,i=t.l,o=e.h-n,a=e.s-r,s=e.l-i;return isNaN(a)&&(a=0,r=isNaN(r)?e.s:r),isNaN(o)?(o=0,n=isNaN(n)?e.h:n):o>180?o-=360:-180>o&&(o+=360),function(t){return lt(n+o*t,r+a*t,i+s*t)+""}},vo.interpolateLab=function(t,e){t=vo.lab(t),e=vo.lab(e);var n=t.l,r=t.a,i=t.b,o=e.l-n,a=e.a-r,s=e.b-i;return function(t){return dt(n+o*t,r+a*t,i+s*t)+""}},vo.interpolateRound=dr,vo.transform=function(t){var e=xo.createElementNS(vo.ns.prefix.svg,"g");return(vo.transform=function(t){if(null!=t){e.setAttribute("transform",t);var n=e.transform.baseVal.consolidate()}return new pr(n?n.matrix:_s)})(t)},pr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var _s={a:1,b:0,c:0,d:1,e:0,f:0};vo.interpolateTransform=yr,vo.layout={},vo.layout.bundle=function(){return function(t){for(var e=[],n=-1,r=t.length;++n<r;)e.push(wr(t[n]));return e}},vo.layout.chord=function(){function t(){var t,l,f,h,d,p={},m=[],g=vo.range(o),v=[];for(n=[],r=[],t=0,h=-1;++h<o;){for(l=0,d=-1;++d<o;)l+=i[h][d];m.push(l),v.push(vo.range(o)),t+=l}for(a&&g.sort((function(t,e){return a(m[t],m[e])})),s&&v.forEach((function(t,e){t.sort((function(t,n){return s(i[e][t],i[e][n])}))})),t=(Yo-c*o)/t,l=0,h=-1;++h<o;){for(f=l,d=-1;++d<o;){var y=g[h],b=v[y][d],x=i[y][b],w=l,_=l+=x*t;p[y+"-"+b]={index:y,subindex:b,startAngle:w,endAngle:_,value:x}}r[y]={index:y,startAngle:f,endAngle:l,value:m[y]},l+=c}for(h=-1;++h<o;)for(d=h-1;++d<o;){var S=p[h+"-"+d],O=p[d+"-"+h];(S.value||O.value)&&n.push(S.value<O.value?{source:O,target:S}:{source:S,target:O})}u&&e()}function e(){n.sort((function(t,e){return u((t.source.value+t.target.value)/2,(e.source.value+e.target.value)/2)}))}var n,r,i,o,a,s,u,l={},c=0;return l.matrix=function(t){return arguments.length?(o=(i=t)&&i.length,n=r=null,l):i},l.padding=function(t){return arguments.length?(c=t,n=r=null,l):c},l.sortGroups=function(t){return arguments.length?(a=t,n=r=null,l):a},l.sortSubgroups=function(t){return arguments.length?(s=t,n=null,l):s},l.sortChords=function(t){return arguments.length?(u=t,n&&e(),l):u},l.chords=function(){return n||t(),n},l.groups=function(){return r||t(),r},l},vo.layout.force=function(){function t(t){return function(e,n,r,i){if(e.point!==t){var o=e.cx-t.x,a=e.cy-t.y,s=i-n,u=o*o+a*a;if(u>s*s/v){if(m>u){var l=e.charge/u;t.px-=o*l,t.py-=a*l}return!0}e.point&&u&&m>u&&(l=e.pointCharge/u,t.px-=o*l,t.py-=a*l)}return!e.charge}}function e(t){t.px=vo.event.x,t.py=vo.event.y,u.resume()}var n,r,i,o,a,s,u={},l=vo.dispatch("start","tick","end"),c=[1,1],f=.9,h=Ss,d=Os,p=-30,m=Ns,g=.1,v=.64,y=[],b=[];return u.tick=function(){if((i*=.99)<.005)return n=null,l.end({type:"end",alpha:i=0}),!0;var e,r,u,h,d,m,v,x,w,_=y.length,S=b.length;for(r=0;S>r;++r)h=(u=b[r]).source,(m=(x=(d=u.target).x-h.x)*x+(w=d.y-h.y)*w)&&(x*=m=i*a[r]*((m=Math.sqrt(m))-o[r])/m,w*=m,d.x-=x*(v=h.weight+d.weight?h.weight/(h.weight+d.weight):.5),d.y-=w*v,h.x+=x*(v=1-v),h.y+=w*v);if((v=i*g)&&(x=c[0]/2,w=c[1]/2,r=-1,v))for(;++r<_;)(u=y[r]).x+=(x-u.x)*v,u.y+=(w-u.y)*v;if(p)for(Er(e=vo.geom.quadtree(y),i,s),r=-1;++r<_;)(u=y[r]).fixed||e.visit(t(u));for(r=-1;++r<_;)(u=y[r]).fixed?(u.x=u.px,u.y=u.py):(u.x-=(u.px-(u.px=u.x))*f,u.y-=(u.py-(u.py=u.y))*f);l.tick({type:"tick",alpha:i})},u.nodes=function(t){return arguments.length?(y=t,u):y},u.links=function(t){return arguments.length?(b=t,u):b},u.size=function(t){return arguments.length?(c=t,u):c},u.linkDistance=function(t){return arguments.length?(h="function"==typeof t?t:+t,u):h},u.distance=u.linkDistance,u.linkStrength=function(t){return arguments.length?(d="function"==typeof t?t:+t,u):d},u.friction=function(t){return arguments.length?(f=+t,u):f},u.charge=function(t){return arguments.length?(p="function"==typeof t?t:+t,u):p},u.chargeDistance=function(t){return arguments.length?(m=t*t,u):Math.sqrt(m)},u.gravity=function(t){return arguments.length?(g=+t,u):g},u.theta=function(t){return arguments.length?(v=t*t,u):Math.sqrt(v)},u.alpha=function(t){return arguments.length?(t=+t,i?t>0?i=t:(n.c=null,n.t=NaN,n=null,l.end({type:"end",alpha:i=0})):t>0&&(l.start({type:"start",alpha:i=t}),n=Ct(u.tick)),u):i},u.start=function(){function t(t,r){if(!n){for(n=new Array(i),u=0;i>u;++u)n[u]=[];for(u=0;l>u;++u){var o=b[u];n[o.source.index].push(o.target),n[o.target.index].push(o.source)}}for(var a,s=n[e],u=-1,c=s.length;++u<c;)if(!isNaN(a=s[u][t]))return a;return Math.random()*r}var e,n,r,i=y.length,l=b.length,f=c[0],m=c[1];for(e=0;i>e;++e)(r=y[e]).index=e,r.weight=0;for(e=0;l>e;++e)"number"==typeof(r=b[e]).source&&(r.source=y[r.source]),"number"==typeof r.target&&(r.target=y[r.target]),++r.source.weight,++r.target.weight;for(e=0;i>e;++e)r=y[e],isNaN(r.x)&&(r.x=t("x",f)),isNaN(r.y)&&(r.y=t("y",m)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(o=[],"function"==typeof h)for(e=0;l>e;++e)o[e]=+h.call(this,b[e],e);else for(e=0;l>e;++e)o[e]=h;if(a=[],"function"==typeof d)for(e=0;l>e;++e)a[e]=+d.call(this,b[e],e);else for(e=0;l>e;++e)a[e]=d;if(s=[],"function"==typeof p)for(e=0;i>e;++e)s[e]=+p.call(this,y[e],e);else for(e=0;i>e;++e)s[e]=p;return u.resume()},u.resume=function(){return u.alpha(.1)},u.stop=function(){return u.alpha(0)},u.drag=function(){return r||(r=vo.behavior.drag().origin(_).on("dragstart.force",Sr).on("drag.force",e).on("dragend.force",Or)),arguments.length?void this.on("mouseover.force",Nr).on("mouseout.force",Mr).call(r):r},vo.rebind(u,l,"on")};var Ss=20,Os=1,Ns=1/0;vo.layout.hierarchy=function(){function t(i){var o,a=[i],s=[];for(i.depth=0;null!=(o=a.pop());)if(s.push(o),(l=n.call(t,o,o.depth))&&(u=l.length)){for(var u,l,c;--u>=0;)a.push(c=l[u]),c.parent=o,c.depth=o.depth+1;r&&(o.value=0),o.children=l}else r&&(o.value=+r.call(t,o,o.depth)||0),delete o.children;return Tr(i,(function(t){var n,i;e&&(n=t.children)&&n.sort(e),r&&(i=t.parent)&&(i.value+=t.value)})),s}var e=jr,n=Dr,r=Ar;return t.sort=function(n){return arguments.length?(e=n,t):e},t.children=function(e){return arguments.length?(n=e,t):n},t.value=function(e){return arguments.length?(r=e,t):r},t.revalue=function(e){return r&&(Cr(e,(function(t){t.children&&(t.value=0)})),Tr(e,(function(e){var n;e.children||(e.value=+r.call(t,e,e.depth)||0),(n=e.parent)&&(n.value+=e.value)}))),e},t},vo.layout.partition=function(){function t(e,n,r,i){var o=e.children;if(e.x=n,e.y=e.depth*i,e.dx=r,e.dy=i,o&&(a=o.length)){var a,s,u,l=-1;for(r=e.value?r/e.value:0;++l<a;)t(s=o[l],n,u=s.value*r,i),n+=u}}function e(t){var n=t.children,r=0;if(n&&(i=n.length))for(var i,o=-1;++o<i;)r=Math.max(r,e(n[o]));return 1+r}function n(n,o){var a=r.call(this,n,o);return t(a[0],0,i[0],i[1]/e(a[0])),a}var r=vo.layout.hierarchy(),i=[1,1];return n.size=function(t){return arguments.length?(i=t,n):i},kr(n,r)},vo.layout.pie=function(){function t(a){var s,u=a.length,l=a.map((function(n,r){return+e.call(t,n,r)})),c=+("function"==typeof r?r.apply(this,arguments):r),f=("function"==typeof i?i.apply(this,arguments):i)-c,h=Math.min(Math.abs(f)/u,+("function"==typeof o?o.apply(this,arguments):o)),d=h*(0>f?-1:1),p=vo.sum(l),m=p?(f-u*d)/p:0,g=vo.range(u),v=[];return null!=n&&g.sort(n===Ms?function(t,e){return l[e]-l[t]}:function(t,e){return n(a[t],a[e])}),g.forEach((function(t){v[t]={data:a[t],value:s=l[t],startAngle:c,endAngle:c+=s*m+d,padAngle:h}})),v}var e=Number,n=Ms,r=0,i=Yo,o=0;return t.value=function(n){return arguments.length?(e=n,t):e},t.sort=function(e){return arguments.length?(n=e,t):n},t.startAngle=function(e){return arguments.length?(r=e,t):r},t.endAngle=function(e){return arguments.length?(i=e,t):i},t.padAngle=function(e){return arguments.length?(o=e,t):o},t};var Ms={};vo.layout.stack=function(){function t(s,u){if(!(h=s.length))return s;var l=s.map((function(n,r){return e.call(t,n,r)})),c=l.map((function(e){return e.map((function(e,n){return[o.call(t,e,n),a.call(t,e,n)]}))})),f=n.call(t,c,u);l=vo.permute(l,f),c=vo.permute(c,f);var h,d,p,m,g=r.call(t,c,u),v=l[0].length;for(p=0;v>p;++p)for(i.call(t,l[0][p],m=g[p],c[0][p][1]),d=1;h>d;++d)i.call(t,l[d][p],m+=c[d-1][p][1],c[d][p][1]);return s}var e=_,n=Fr,r=qr,i=Lr,o=Ir,a=Rr;return t.values=function(n){return arguments.length?(e=n,t):e},t.order=function(e){return arguments.length?(n="function"==typeof e?e:Es.get(e)||Fr,t):n},t.offset=function(e){return arguments.length?(r="function"==typeof e?e:ks.get(e)||qr,t):r},t.x=function(e){return arguments.length?(o=e,t):o},t.y=function(e){return arguments.length?(a=e,t):a},t.out=function(e){return arguments.length?(i=e,t):i},t};var Es=vo.map({"inside-out":function(t){var e,n,r=t.length,i=t.map(Br),o=t.map(zr),a=vo.range(r).sort((function(t,e){return i[t]-i[e]})),s=0,u=0,l=[],c=[];for(e=0;r>e;++e)n=a[e],u>s?(s+=o[n],l.push(n)):(u+=o[n],c.push(n));return c.reverse().concat(l)},reverse:function(t){return vo.range(t.length).reverse()},default:Fr}),ks=vo.map({silhouette:function(t){var e,n,r,i=t.length,o=t[0].length,a=[],s=0,u=[];for(n=0;o>n;++n){for(e=0,r=0;i>e;e++)r+=t[e][n][1];r>s&&(s=r),a.push(r)}for(n=0;o>n;++n)u[n]=(s-a[n])/2;return u},wiggle:function(t){var e,n,r,i,o,a,s,u,l,c=t.length,f=t[0],h=f.length,d=[];for(d[0]=u=l=0,n=1;h>n;++n){for(e=0,i=0;c>e;++e)i+=t[e][n][1];for(e=0,o=0,s=f[n][0]-f[n-1][0];c>e;++e){for(r=0,a=(t[e][n][1]-t[e][n-1][1])/(2*s);e>r;++r)a+=(t[r][n][1]-t[r][n-1][1])/s;o+=a*t[e][n][1]}d[n]=u-=i?o/i*s:0,l>u&&(l=u)}for(n=0;h>n;++n)d[n]-=l;return d},expand:function(t){var e,n,r,i=t.length,o=t[0].length,a=1/i,s=[];for(n=0;o>n;++n){for(e=0,r=0;i>e;e++)r+=t[e][n][1];if(r)for(e=0;i>e;e++)t[e][n][1]/=r;else for(e=0;i>e;e++)t[e][n][1]=a}for(n=0;o>n;++n)s[n]=0;return s},zero:qr});vo.layout.histogram=function(){function t(t,o){for(var a,s,u=[],l=t.map(n,this),c=r.call(this,l,o),f=i.call(this,c,l,o),h=(o=-1,l.length),d=f.length-1,p=e?1:1/h;++o<d;)(a=u[o]=[]).dx=f[o+1]-(a.x=f[o]),a.y=0;if(d>0)for(o=-1;++o<h;)(s=l[o])>=c[0]&&s<=c[1]&&((a=u[vo.bisect(f,s,1,d)-1]).y+=p,a.push(t[o]));return u}var e=!0,n=Number,r=Vr,i=Ur;return t.value=function(e){return arguments.length?(n=e,t):n},t.range=function(e){return arguments.length?(r=Mt(e),t):r},t.bins=function(e){return arguments.length?(i="number"==typeof e?function(t){return Wr(t,e)}:Mt(e),t):i},t.frequency=function(n){return arguments.length?(e=!!n,t):e},t},vo.layout.pack=function(){function t(t,o){var a=n.call(this,t,o),s=a[0],u=i[0],l=i[1],c=null==e?Math.sqrt:"function"==typeof e?e:function(){return e};if(s.x=s.y=0,Tr(s,(function(t){t.r=+c(t.value)})),Tr(s,Kr),r){var f=r*(e?1:Math.max(2*s.r/u,2*s.r/l))/2;Tr(s,(function(t){t.r+=f})),Tr(s,Kr),Tr(s,(function(t){t.r-=f}))}return Qr(s,u/2,l/2,e?1:1/Math.max(2*s.r/u,2*s.r/l)),a}var e,n=vo.layout.hierarchy().sort($r),r=0,i=[1,1];return t.size=function(e){return arguments.length?(i=e,t):i},t.radius=function(n){return arguments.length?(e=null==n||"function"==typeof n?n:+n,t):e},t.padding=function(e){return arguments.length?(r=+e,t):r},kr(t,n)},vo.layout.tree=function(){function t(t,u){var l=i.call(this,t,u),c=l[0],f=function(t){for(var e,n={A:null,children:[t]},r=[n];null!=(e=r.pop());)for(var i,o=e.children,a=0,s=o.length;s>a;++a)r.push((o[a]=i={_:o[a],parent:e,children:(i=o[a].children)&&i.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:a}).a=i);return n.children[0]}(c);if(Tr(f,e),f.parent.m=-f.z,Cr(f,n),s)Cr(c,r);else{var h=c,d=c,p=c;Cr(c,(function(t){t.x<h.x&&(h=t),t.x>d.x&&(d=t),t.depth>p.depth&&(p=t)}));var m=o(h,d)/2-h.x,g=a[0]/(d.x+o(d,h)/2+m),v=a[1]/(p.depth||1);Cr(c,(function(t){t.x=(t.x+m)*g,t.y=t.depth*v}))}return l}function e(t){var e=t.children,n=t.parent.children,r=t.i?n[t.i-1]:null;if(e.length){!function(t){for(var e,n=0,r=0,i=t.children,o=i.length;--o>=0;)(e=i[o]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}(t);var i=(e[0].z+e[e.length-1].z)/2;r?(t.z=r.z+o(t._,r._),t.m=t.z-i):t.z=i}else r&&(t.z=r.z+o(t._,r._));t.parent.A=function(t,e,n){if(e){for(var r,i=t,a=t,s=e,u=i.parent.children[0],l=i.m,c=a.m,f=s.m,h=u.m;s=ri(s),i=ni(i),s&&i;)u=ni(u),(a=ri(a)).a=t,(r=s.z+f-i.z-l+o(s._,i._))>0&&(ii(oi(s,t,n),t,r),l+=r,c+=r),f+=s.m,l+=i.m,h+=u.m,c+=a.m;s&&!ri(a)&&(a.t=s,a.m+=f-c),i&&!ni(u)&&(u.t=i,u.m+=l-h,n=t)}return n}(t,r,t.parent.A||n[0])}function n(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function r(t){t.x*=a[0],t.y=t.depth*a[1]}var i=vo.layout.hierarchy().sort(null).value(null),o=ei,a=[1,1],s=null;return t.separation=function(e){return arguments.length?(o=e,t):o},t.size=function(e){return arguments.length?(s=null==(a=e)?r:null,t):s?null:a},t.nodeSize=function(e){return arguments.length?(s=null==(a=e)?null:r,t):s?a:null},kr(t,i)},vo.layout.cluster=function(){function t(t,o){var a,s=e.call(this,t,o),u=s[0],l=0;Tr(u,(function(t){var e=t.children;e&&e.length?(t.x=function(t){return t.reduce((function(t,e){return t+e.x}),0)/t.length}(e),t.y=function(t){return 1+vo.max(t,(function(t){return t.y}))}(e)):(t.x=a?l+=n(t,a):0,t.y=0,a=t)}));var c=ai(u),f=si(u),h=c.x-n(c,f)/2,d=f.x+n(f,c)/2;return Tr(u,i?function(t){t.x=(t.x-u.x)*r[0],t.y=(u.y-t.y)*r[1]}:function(t){t.x=(t.x-h)/(d-h)*r[0],t.y=(1-(u.y?t.y/u.y:1))*r[1]}),s}var e=vo.layout.hierarchy().sort(null).value(null),n=ei,r=[1,1],i=!1;return t.separation=function(e){return arguments.length?(n=e,t):n},t.size=function(e){return arguments.length?(i=null==(r=e),t):i?null:r},t.nodeSize=function(e){return arguments.length?(i=null!=(r=e),t):i?r:null},kr(t,e)},vo.layout.treemap=function(){function t(t,e){for(var n,r,i=-1,o=t.length;++i<o;)r=(n=t[i]).value*(0>e?0:e),n.area=isNaN(r)||0>=r?0:r}function e(n){var o=n.children;if(o&&o.length){var a,s,u,l=f(n),c=[],h=o.slice(),p=1/0,m="slice"===d?l.dx:"dice"===d?l.dy:"slice-dice"===d?1&n.depth?l.dy:l.dx:Math.min(l.dx,l.dy);for(t(h,l.dx*l.dy/n.value),c.area=0;(u=h.length)>0;)c.push(a=h[u-1]),c.area+=a.area,"squarify"!==d||(s=r(c,m))<=p?(h.pop(),p=s):(c.area-=c.pop().area,i(c,m,l,!1),m=Math.min(l.dx,l.dy),c.length=c.area=0,p=1/0);c.length&&(i(c,m,l,!0),c.length=c.area=0),o.forEach(e)}}function n(e){var r=e.children;if(r&&r.length){var o,a=f(e),s=r.slice(),u=[];for(t(s,a.dx*a.dy/e.value),u.area=0;o=s.pop();)u.push(o),u.area+=o.area,null!=o.z&&(i(u,o.z?a.dx:a.dy,a,!s.length),u.length=u.area=0);r.forEach(n)}}function r(t,e){for(var n,r=t.area,i=0,o=1/0,a=-1,s=t.length;++a<s;)(n=t[a].area)&&(o>n&&(o=n),n>i&&(i=n));return e*=e,(r*=r)?Math.max(e*i*p/r,r/(e*o*p)):1/0}function i(t,e,n,r){var i,o=-1,a=t.length,s=n.x,l=n.y,c=e?u(t.area/e):0;if(e==n.dx){for((r||c>n.dy)&&(c=n.dy);++o<a;)(i=t[o]).x=s,i.y=l,i.dy=c,s+=i.dx=Math.min(n.x+n.dx-s,c?u(i.area/c):0);i.z=!0,i.dx+=n.x+n.dx-s,n.y+=c,n.dy-=c}else{for((r||c>n.dx)&&(c=n.dx);++o<a;)(i=t[o]).x=s,i.y=l,i.dx=c,l+=i.dy=Math.min(n.y+n.dy-l,c?u(i.area/c):0);i.z=!1,i.dy+=n.y+n.dy-l,n.x+=c,n.dx-=c}}function o(r){var i=a||s(r),o=i[0];return o.x=o.y=0,o.value?(o.dx=l[0],o.dy=l[1]):o.dx=o.dy=0,a&&s.revalue(o),t([o],o.dx*o.dy/o.value),(a?n:e)(o),h&&(a=i),i}var a,s=vo.layout.hierarchy(),u=Math.round,l=[1,1],c=null,f=ui,h=!1,d="squarify",p=.5*(1+Math.sqrt(5));return o.size=function(t){return arguments.length?(l=t,o):l},o.padding=function(t){function e(e){return li(e,t)}return arguments.length?(f=null==(c=t)?ui:"function"==(n=typeof t)?function(e){var n=t.call(o,e,e.depth);return null==n?ui(e):li(e,"number"==typeof n?[n,n,n,n]:n)}:"number"===n?(t=[t,t,t,t],e):e,o):c;var n},o.round=function(t){return arguments.length?(u=t?Math.round:Number,o):u!=Number},o.sticky=function(t){return arguments.length?(h=t,a=null,o):h},o.ratio=function(t){return arguments.length?(p=t,o):p},o.mode=function(t){return arguments.length?(d=t+"",o):d},kr(o,s)},vo.random={normal:function(t,e){var n=arguments.length;return 2>n&&(e=1),1>n&&(t=0),function(){var n,r,i;do{i=(n=2*Math.random()-1)*n+(r=2*Math.random()-1)*r}while(!i||i>1);return t+e*n*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var t=vo.random.normal.apply(vo,arguments);return function(){return Math.exp(t())}},bates:function(t){var e=vo.random.irwinHall(t);return function(){return e()/t}},irwinHall:function(t){return function(){for(var e=0,n=0;t>n;n++)e+=Math.random();return e}}},vo.scale={};var Cs={floor:_,ceil:_};vo.scale.linear=function(){return gi([0,1],[0,1],nr,!1)};var Ts={s:1,g:1,p:1,r:1,e:1};vo.scale.log=function(){return Si(vo.scale.linear().domain([0,1]),10,!0,[1,10])};var Ds=vo.format(".0e"),As={floor:function(t){return-Math.ceil(-t)},ceil:function(t){return-Math.floor(-t)}};vo.scale.pow=function(){return Oi(vo.scale.linear(),1,[0,1])},vo.scale.sqrt=function(){return vo.scale.pow().exponent(.5)},vo.scale.ordinal=function(){return Mi([],{t:"range",a:[[]]})},vo.scale.category10=function(){return vo.scale.ordinal().range(js)},vo.scale.category20=function(){return vo.scale.ordinal().range(Ps)},vo.scale.category20b=function(){return vo.scale.ordinal().range(Is)},vo.scale.category20c=function(){return vo.scale.ordinal().range(Rs)};var js=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(bt),Ps=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(bt),Is=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(bt),Rs=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(bt);vo.scale.quantile=function(){return Ei([],[])},vo.scale.quantize=function(){return ki(0,1,[0,1])},vo.scale.threshold=function(){return Ci([.5],[0,1])},vo.scale.identity=function(){return Ti([0,1])},vo.svg={},vo.svg.arc=function(){function t(){var t=Math.max(0,+n.apply(this,arguments)),l=Math.max(0,+r.apply(this,arguments)),c=a.apply(this,arguments)-Go,f=s.apply(this,arguments)-Go,h=Math.abs(f-c),d=c>f?0:1;if(t>l&&(p=l,l=t,t=p),h>=Zo)return e(l,d)+(t?e(t,1-d):"")+"Z";var p,m,g,v,y,b,x,w,_,S,O,N,M=0,E=0,k=[];if((v=(+u.apply(this,arguments)||0)/2)&&(g=o===Ls?Math.sqrt(t*t+l*l):+o.apply(this,arguments),d||(E*=-1),l&&(E=it(g/l*Math.sin(v))),t&&(M=it(g/t*Math.sin(v)))),l){y=l*Math.cos(c+E),b=l*Math.sin(c+E),x=l*Math.cos(f-E),w=l*Math.sin(f-E);var C=Math.abs(f-c-2*E)<=$o?0:1;if(E&&Li(y,b,x,w)===d^C){var T=(c+f)/2;y=l*Math.cos(T),b=l*Math.sin(T),x=w=null}}else y=b=0;if(t){_=t*Math.cos(f-M),S=t*Math.sin(f-M),O=t*Math.cos(c+M),N=t*Math.sin(c+M);var D=Math.abs(c-f+2*M)<=$o?0:1;if(M&&Li(_,S,O,N)===1-d^D){var A=(c+f)/2;_=t*Math.cos(A),S=t*Math.sin(A),O=N=null}}else _=S=0;if(h>Wo&&(p=Math.min(Math.abs(l-t)/2,+i.apply(this,arguments)))>.001){m=l>t^d?0:1;var j=p,P=p;if($o>h){var I=null==O?[_,S]:null==x?[y,b]:wn([y,b],[O,N],[x,w],[_,S]),R=y-I[0],L=b-I[1],F=x-I[0],q=w-I[1],B=1/Math.sin(Math.acos((R*F+L*q)/(Math.sqrt(R*R+L*L)*Math.sqrt(F*F+q*q)))/2),z=Math.sqrt(I[0]*I[0]+I[1]*I[1]);P=Math.min(p,(t-z)/(B-1)),j=Math.min(p,(l-z)/(B+1))}if(null!=x){var H=Fi(null==O?[_,S]:[O,N],[y,b],l,j,d),U=Fi([x,w],[_,S],l,j,d);p===j?k.push("M",H[0],"A",j,",",j," 0 0,",m," ",H[1],"A",l,",",l," 0 ",1-d^Li(H[1][0],H[1][1],U[1][0],U[1][1]),",",d," ",U[1],"A",j,",",j," 0 0,",m," ",U[0]):k.push("M",H[0],"A",j,",",j," 0 1,",m," ",U[0])}else k.push("M",y,",",b);if(null!=O){var W=Fi([y,b],[O,N],t,-P,d),V=Fi([_,S],null==x?[y,b]:[x,w],t,-P,d);p===P?k.push("L",V[0],"A",P,",",P," 0 0,",m," ",V[1],"A",t,",",t," 0 ",d^Li(V[1][0],V[1][1],W[1][0],W[1][1]),",",1-d," ",W[1],"A",P,",",P," 0 0,",m," ",W[0]):k.push("L",V[0],"A",P,",",P," 0 0,",m," ",W[0])}else k.push("L",_,",",S)}else k.push("M",y,",",b),null!=x&&k.push("A",l,",",l," 0 ",C,",",d," ",x,",",w),k.push("L",_,",",S),null!=O&&k.push("A",t,",",t," 0 ",D,",",1-d," ",O,",",N);return k.push("Z"),k.join("")}function e(t,e){return"M0,"+t+"A"+t+","+t+" 0 1,"+e+" 0,"+-t+"A"+t+","+t+" 0 1,"+e+" 0,"+t}var n=Ai,r=ji,i=Di,o=Ls,a=Pi,s=Ii,u=Ri;return t.innerRadius=function(e){return arguments.length?(n=Mt(e),t):n},t.outerRadius=function(e){return arguments.length?(r=Mt(e),t):r},t.cornerRadius=function(e){return arguments.length?(i=Mt(e),t):i},t.padRadius=function(e){return arguments.length?(o=e==Ls?Ls:Mt(e),t):o},t.startAngle=function(e){return arguments.length?(a=Mt(e),t):a},t.endAngle=function(e){return arguments.length?(s=Mt(e),t):s},t.padAngle=function(e){return arguments.length?(u=Mt(e),t):u},t.centroid=function(){var t=(+n.apply(this,arguments)+ +r.apply(this,arguments))/2,e=(+a.apply(this,arguments)+ +s.apply(this,arguments))/2-Go;return[Math.cos(e)*t,Math.sin(e)*t]},t};var Ls="auto";vo.svg.line=function(){return qi(_)};var Fs=vo.map({linear:Bi,"linear-closed":zi,step:function(t){for(var e=0,n=t.length,r=t[0],i=[r[0],",",r[1]];++e<n;)i.push("H",(r[0]+(r=t[e])[0])/2,"V",r[1]);return n>1&&i.push("H",r[0]),i.join("")},"step-before":Hi,"step-after":Ui,basis:$i,"basis-open":function(t){if(t.length<4)return Bi(t);for(var e,n=[],r=-1,i=t.length,o=[0],a=[0];++r<3;)e=t[r],o.push(e[0]),a.push(e[1]);for(n.push(Yi(zs,o)+","+Yi(zs,a)),--r;++r<i;)e=t[r],o.shift(),o.push(e[0]),a.shift(),a.push(e[1]),Zi(n,o,a);return n.join("")},"basis-closed":function(t){for(var e,n,r=-1,i=t.length,o=i+4,a=[],s=[];++r<4;)n=t[r%i],a.push(n[0]),s.push(n[1]);for(e=[Yi(zs,a),",",Yi(zs,s)],--r;++r<o;)n=t[r%i],a.shift(),a.push(n[0]),s.shift(),s.push(n[1]),Zi(e,a,s);return e.join("")},bundle:function(t,e){var n=t.length-1;if(n)for(var r,i,o=t[0][0],a=t[0][1],s=t[n][0]-o,u=t[n][1]-a,l=-1;++l<=n;)i=l/n,(r=t[l])[0]=e*r[0]+(1-e)*(o+i*s),r[1]=e*r[1]+(1-e)*(a+i*u);return $i(t)},cardinal:function(t,e){return t.length<3?Bi(t):t[0]+Wi(t,Vi(t,e))},"cardinal-open":function(t,e){return t.length<4?Bi(t):t[1]+Wi(t.slice(1,-1),Vi(t,e))},"cardinal-closed":function(t,e){return t.length<3?zi(t):t[0]+Wi((t.push(t[0]),t),Vi([t[t.length-2]].concat(t,[t[1]]),e))},monotone:function(t){return t.length<3?Bi(t):t[0]+Wi(t,function(t){for(var e,n,r,i,o=[],a=function(t){for(var e=0,n=t.length-1,r=[],i=t[0],o=t[1],a=r[0]=Gi(i,o);++e<n;)r[e]=(a+(a=Gi(i=o,o=t[e+1])))/2;return r[e]=a,r}(t),s=-1,u=t.length-1;++s<u;)e=Gi(t[s],t[s+1]),Eo(e)<Wo?a[s]=a[s+1]=0:(i=(n=a[s]/e)*n+(r=a[s+1]/e)*r)>9&&(i=3*e/Math.sqrt(i),a[s]=i*n,a[s+1]=i*r);for(s=-1;++s<=u;)i=(t[Math.min(u,s+1)][0]-t[Math.max(0,s-1)][0])/(6*(1+a[s]*a[s])),o.push([i||0,a[s]*i||0]);return o}(t))}});Fs.forEach((function(t,e){e.key=t,e.closed=/-closed$/.test(t)}));var qs=[0,2/3,1/3,0],Bs=[0,1/3,2/3,0],zs=[0,1/6,2/3,1/6];vo.svg.line.radial=function(){var t=qi(Ki);return t.radius=t.x,delete t.x,t.angle=t.y,delete t.y,t},Hi.reverse=Ui,Ui.reverse=Hi,vo.svg.area=function(){return Xi(_)},vo.svg.area.radial=function(){var t=Xi(Ki);return t.radius=t.x,delete t.x,t.innerRadius=t.x0,delete t.x0,t.outerRadius=t.x1,delete t.x1,t.angle=t.y,delete t.y,t.startAngle=t.y0,delete t.y0,t.endAngle=t.y1,delete t.y1,t},vo.svg.chord=function(){function t(t,a){var s=e(this,i,t,a),u=e(this,o,t,a);return"M"+s.p0+n(s.r,s.p1,s.a1-s.a0)+(function(t,e){return t.a0==e.a0&&t.a1==e.a1}(s,u)?r(s.r,s.p1,s.r,s.p0):r(s.r,s.p1,u.r,u.p0)+n(u.r,u.p1,u.a1-u.a0)+r(u.r,u.p1,s.r,s.p0))+"Z"}function e(t,e,n,r){var i=e.call(t,n,r),o=a.call(t,i,r),l=s.call(t,i,r)-Go,c=u.call(t,i,r)-Go;return{r:o,a0:l,a1:c,p0:[o*Math.cos(l),o*Math.sin(l)],p1:[o*Math.cos(c),o*Math.sin(c)]}}function n(t,e,n){return"A"+t+","+t+" 0 "+ +(n>$o)+",1 "+e}function r(t,e,n,r){return"Q 0,0 "+r}var i=un,o=ln,a=Ji,s=Pi,u=Ii;return t.radius=function(e){return arguments.length?(a=Mt(e),t):a},t.source=function(e){return arguments.length?(i=Mt(e),t):i},t.target=function(e){return arguments.length?(o=Mt(e),t):o},t.startAngle=function(e){return arguments.length?(s=Mt(e),t):s},t.endAngle=function(e){return arguments.length?(u=Mt(e),t):u},t},vo.svg.diagonal=function(){function t(t,i){var o=e.call(this,t,i),a=n.call(this,t,i),s=(o.y+a.y)/2,u=[o,{x:o.x,y:s},{x:a.x,y:s},a];return"M"+(u=u.map(r))[0]+"C"+u[1]+" "+u[2]+" "+u[3]}var e=un,n=ln,r=Qi;return t.source=function(n){return arguments.length?(e=Mt(n),t):e},t.target=function(e){return arguments.length?(n=Mt(e),t):n},t.projection=function(e){return arguments.length?(r=e,t):r},t},vo.svg.diagonal.radial=function(){var t=vo.svg.diagonal(),e=Qi,n=t.projection;return t.projection=function(t){return arguments.length?n(function(t){return function(){var e=t.apply(this,arguments),n=e[0],r=e[1]-Go;return[n*Math.cos(r),n*Math.sin(r)]}}(e=t)):e},t},vo.svg.symbol=function(){function t(t,r){return(Hs.get(e.call(this,t,r))||no)(n.call(this,t,r))}var e=eo,n=to;return t.type=function(n){return arguments.length?(e=Mt(n),t):e},t.size=function(e){return arguments.length?(n=Mt(e),t):n},t};var Hs=vo.map({circle:no,cross:function(t){var e=Math.sqrt(t/5)/2;return"M"+-3*e+","+-e+"H"+-e+"V"+-3*e+"H"+e+"V"+-e+"H"+3*e+"V"+e+"H"+e+"V"+3*e+"H"+-e+"V"+e+"H"+-3*e+"Z"},diamond:function(t){var e=Math.sqrt(t/(2*Ws)),n=e*Ws;return"M0,"+-e+"L"+n+",0 0,"+e+" "+-n+",0Z"},square:function(t){var e=Math.sqrt(t)/2;return"M"+-e+","+-e+"L"+e+","+-e+" "+e+","+e+" "+-e+","+e+"Z"},"triangle-down":function(t){var e=Math.sqrt(t/Us),n=e*Us/2;return"M0,"+n+"L"+e+","+-n+" "+-e+","+-n+"Z"},"triangle-up":function(t){var e=Math.sqrt(t/Us),n=e*Us/2;return"M0,"+-n+"L"+e+","+n+" "+-e+","+n+"Z"}});vo.svg.symbolTypes=Hs.keys();var Us=Math.sqrt(3),Ws=Math.tan(30*Ko);Ro.transition=function(t){for(var e,n,r=Vs||++Gs,i=so(t),o=[],a=$s||{time:Date.now(),ease:ur,delay:0,duration:250},s=-1,u=this.length;++s<u;){o.push(e=[]);for(var l=this[s],c=-1,f=l.length;++c<f;)(n=l[c])&&uo(n,c,i,r,a),e.push(n)}return io(o,i,r)},Ro.interrupt=function(t){return this.each(null==t?Ys:ro(so(t)))};var Vs,$s,Ys=ro(so()),Zs=[],Gs=0;Zs.call=Ro.call,Zs.empty=Ro.empty,Zs.node=Ro.node,Zs.size=Ro.size,vo.transition=function(t,e){return t&&t.transition?Vs?t.transition(e):t:vo.selection().transition(t)},vo.transition.prototype=Zs,Zs.select=function(t){var e,n,r,i=this.id,o=this.namespace,a=[];t=A(t);for(var s=-1,u=this.length;++s<u;){a.push(e=[]);for(var l=this[s],c=-1,f=l.length;++c<f;)(r=l[c])&&(n=t.call(r,r.__data__,c,s))?("__data__"in r&&(n.__data__=r.__data__),uo(n,c,o,i,r[o][i]),e.push(n)):e.push(null)}return io(a,o,i)},Zs.selectAll=function(t){var e,n,r,i,o,a=this.id,s=this.namespace,u=[];t=j(t);for(var l=-1,c=this.length;++l<c;)for(var f=this[l],h=-1,d=f.length;++h<d;)if(r=f[h]){o=r[s][a],n=t.call(r,r.__data__,h,l),u.push(e=[]);for(var p=-1,m=n.length;++p<m;)(i=n[p])&&uo(i,p,s,a,o),e.push(i)}return io(u,s,a)},Zs.filter=function(t){var e,n,r=[];"function"!=typeof t&&(t=V(t));for(var i=0,o=this.length;o>i;i++){r.push(e=[]);for(var a,s=0,u=(a=this[i]).length;u>s;s++)(n=a[s])&&t.call(n,n.__data__,s,i)&&e.push(n)}return io(r,this.namespace,this.id)},Zs.tween=function(t,e){var n=this.id,r=this.namespace;return arguments.length<2?this.node()[r][n].tween.get(t):Y(this,null==e?function(e){e[r][n].tween.remove(t)}:function(i){i[r][n].tween.set(t,e)})},Zs.attr=function(t,e){function n(){this.removeAttribute(o)}function r(){this.removeAttributeNS(o.space,o.local)}if(arguments.length<2){for(e in t)this.attr(e,t[e]);return this}var i="transform"==t?yr:nr,o=vo.ns.qualify(t);return oo(this,"attr."+t,e,o.local?function(t){return null==t?r:(t+="",function(){var e,n=this.getAttributeNS(o.space,o.local);return n!==t&&(e=i(n,t),function(t){this.setAttributeNS(o.space,o.local,e(t))})})}:function(t){return null==t?n:(t+="",function(){var e,n=this.getAttribute(o);return n!==t&&(e=i(n,t),function(t){this.setAttribute(o,e(t))})})})},Zs.attrTween=function(t,e){var n=vo.ns.qualify(t);return this.tween("attr."+t,n.local?function(t,r){var i=e.call(this,t,r,this.getAttributeNS(n.space,n.local));return i&&function(t){this.setAttributeNS(n.space,n.local,i(t))}}:function(t,r){var i=e.call(this,t,r,this.getAttribute(n));return i&&function(t){this.setAttribute(n,i(t))}})},Zs.style=function(t,e,n){function r(){this.style.removeProperty(t)}var i=arguments.length;if(3>i){if("string"!=typeof t){for(n in 2>i&&(e=""),t)this.style(n,t[n],e);return this}n=""}return oo(this,"style."+t,e,(function(e){return null==e?r:(e+="",function(){var r,i=a(this).getComputedStyle(this,null).getPropertyValue(t);return i!==e&&(r=nr(i,e),function(e){this.style.setProperty(t,r(e),n)})})}))},Zs.styleTween=function(t,e,n){return arguments.length<3&&(n=""),this.tween("style."+t,(function(r,i){var o=e.call(this,r,i,a(this).getComputedStyle(this,null).getPropertyValue(t));return o&&function(e){this.style.setProperty(t,o(e),n)}}))},Zs.text=function(t){return oo(this,"text",t,ao)},Zs.remove=function(){var t=this.namespace;return this.each("end.transition",(function(){var e;this[t].count<2&&(e=this.parentNode)&&e.removeChild(this)}))},Zs.ease=function(t){var e=this.id,n=this.namespace;return arguments.length<1?this.node()[n][e].ease:("function"!=typeof t&&(t=vo.ease.apply(vo,arguments)),Y(this,(function(r){r[n][e].ease=t})))},Zs.delay=function(t){var e=this.id,n=this.namespace;return arguments.length<1?this.node()[n][e].delay:Y(this,"function"==typeof t?function(r,i,o){r[n][e].delay=+t.call(r,r.__data__,i,o)}:(t=+t,function(r){r[n][e].delay=t}))},Zs.duration=function(t){var e=this.id,n=this.namespace;return arguments.length<1?this.node()[n][e].duration:Y(this,"function"==typeof t?function(r,i,o){r[n][e].duration=Math.max(1,t.call(r,r.__data__,i,o))}:(t=Math.max(1,t),function(r){r[n][e].duration=t}))},Zs.each=function(t,e){var n=this.id,r=this.namespace;if(arguments.length<2){var i=$s,o=Vs;try{Vs=n,Y(this,(function(e,i,o){$s=e[r][n],t.call(e,e.__data__,i,o)}))}finally{$s=i,Vs=o}}else Y(this,(function(i){var o=i[r][n];(o.event||(o.event=vo.dispatch("start","end","interrupt"))).on(t,e)}));return this},Zs.transition=function(){for(var t,e,n,r=this.id,i=++Gs,o=this.namespace,a=[],s=0,u=this.length;u>s;s++){a.push(t=[]);for(var l,c=0,f=(l=this[s]).length;f>c;c++)(e=l[c])&&uo(e,c,o,i,{time:(n=e[o][r]).time,ease:n.ease,delay:n.delay+n.duration,duration:n.duration}),t.push(e)}return io(a,o,i)},vo.svg.axis=function(){function t(t){t.each((function(){var t,l=vo.select(this),c=this.__chart__||n,f=this.__chart__=n.copy(),h=null==u?f.ticks?f.ticks.apply(f,s):f.domain():u,d=null==e?f.tickFormat?f.tickFormat.apply(f,s):_:e,p=l.selectAll(".tick").data(h,f),m=p.enter().insert("g",".domain").attr("class","tick").style("opacity",Wo),g=vo.transition(p.exit()).style("opacity",Wo).remove(),v=vo.transition(p.order()).style("opacity",1),y=Math.max(i,0)+a,b=fi(f),x=l.selectAll(".domain").data([0]),w=(x.enter().append("path").attr("class","domain"),vo.transition(x));m.append("line"),m.append("text");var S,O,N,M,E=m.select("line"),k=v.select("line"),C=p.select("text").text(d),T=m.select("text"),D=v.select("text"),A="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(t=lo,S="x",N="y",O="x2",M="y2",C.attr("dy",0>A?"0em":".71em").style("text-anchor","middle"),w.attr("d","M"+b[0]+","+A*o+"V0H"+b[1]+"V"+A*o)):(t=co,S="y",N="x",O="y2",M="x2",C.attr("dy",".32em").style("text-anchor",0>A?"end":"start"),w.attr("d","M"+A*o+","+b[0]+"H0V"+b[1]+"H"+A*o)),E.attr(M,A*i),T.attr(N,A*y),k.attr(O,0).attr(M,A*i),D.attr(S,0).attr(N,A*y),f.rangeBand){var j=f,P=j.rangeBand()/2;c=f=function(t){return j(t)+P}}else c.rangeBand?c=f:g.call(t,f,c);m.call(t,c,f),v.call(t,f,f)}))}var e,n=vo.scale.linear(),r=Ks,i=6,o=6,a=3,s=[10],u=null;return t.scale=function(e){return arguments.length?(n=e,t):n},t.orient=function(e){return arguments.length?(r=e in Xs?e+"":Ks,t):r},t.ticks=function(){return arguments.length?(s=bo(arguments),t):s},t.tickValues=function(e){return arguments.length?(u=e,t):u},t.tickFormat=function(n){return arguments.length?(e=n,t):e},t.tickSize=function(e){var n=arguments.length;return n?(i=+e,o=+arguments[n-1],t):i},t.innerTickSize=function(e){return arguments.length?(i=+e,t):i},t.outerTickSize=function(e){return arguments.length?(o=+e,t):o},t.tickPadding=function(e){return arguments.length?(a=+e,t):a},t.tickSubdivide=function(){return arguments.length&&t},t};var Ks="bottom",Xs={top:1,right:1,bottom:1,left:1};vo.svg.brush=function(){function t(o){o.each((function(){var o=vo.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",i).on("touchstart.brush",i),a=o.selectAll(".background").data([0]);a.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),o.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var s=o.selectAll(".resize").data(m,_);s.exit().remove(),s.enter().append("g").attr("class",(function(t){return"resize "+t})).style("cursor",(function(t){return Js[t]})).append("rect").attr("x",(function(t){return/[ew]$/.test(t)?-3:null})).attr("y",(function(t){return/^[ns]/.test(t)?-3:null})).attr("width",6).attr("height",6).style("visibility","hidden"),s.style("display",t.empty()?"none":null);var u,f=vo.transition(o),h=vo.transition(a);l&&(u=fi(l),h.attr("x",u[0]).attr("width",u[1]-u[0]),n(f)),c&&(u=fi(c),h.attr("y",u[0]).attr("height",u[1]-u[0]),r(f)),e(f)}))}function e(t){t.selectAll(".resize").attr("transform",(function(t){return"translate("+f[+/e$/.test(t)]+","+h[+/^s/.test(t)]+")"}))}function n(t){t.select(".extent").attr("x",f[0]),t.selectAll(".extent,.n>rect,.s>rect").attr("width",f[1]-f[0])}function r(t){t.select(".extent").attr("y",h[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function i(){function i(){var t=vo.mouse(b),i=!1;y&&(t[0]+=y[0],t[1]+=y[1]),M||(vo.event.altKey?(v||(v=[(f[0]+f[1])/2,(h[0]+h[1])/2]),C[0]=f[+(t[0]<v[0])],C[1]=h[+(t[1]<v[1])]):v=null),O&&m(t,l,0)&&(n(_),i=!0),N&&m(t,c,1)&&(r(_),i=!0),i&&(e(_),w({type:"brush",mode:M?"move":"resize"}))}function m(t,e,n){var r,i,a=fi(e),u=a[0],l=a[1],c=C[n],m=n?h:f,g=m[1]-m[0];return M&&(u-=c,l-=g+c),r=(n?p:d)?Math.max(u,Math.min(l,t[n])):t[n],M?i=(r+=c)+g:(v&&(c=Math.max(u,Math.min(l,2*v[n]-r))),r>c?(i=r,r=c):i=c),m[0]!=r||m[1]!=i?(n?s=null:o=null,m[0]=r,m[1]=i,!0):void 0}function g(){i(),_.style("pointer-events","all").selectAll(".resize").style("display",t.empty()?"none":null),vo.select("body").style("cursor",null),T.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),E(),w({type:"brushend"})}var v,y,b=this,x=vo.select(vo.event.target),w=u.of(b,arguments),_=vo.select(b),S=x.datum(),O=!/^(n|s)$/.test(S)&&l,N=!/^(e|w)$/.test(S)&&c,M=x.classed("extent"),E=J(b),C=vo.mouse(b),T=vo.select(a(b)).on("keydown.brush",(function(){32==vo.event.keyCode&&(M||(v=null,C[0]-=f[1],C[1]-=h[1],M=2),k())})).on("keyup.brush",(function(){32==vo.event.keyCode&&2==M&&(C[0]+=f[1],C[1]+=h[1],M=0,k())}));if(vo.event.changedTouches?T.on("touchmove.brush",i).on("touchend.brush",g):T.on("mousemove.brush",i).on("mouseup.brush",g),_.interrupt().selectAll("*").interrupt(),M)C[0]=f[0]-C[0],C[1]=h[0]-C[1];else if(S){var D=+/w$/.test(S),A=+/^n/.test(S);y=[f[1-D]-C[0],h[1-A]-C[1]],C[0]=f[D],C[1]=h[A]}else vo.event.altKey&&(v=C.slice());_.style("pointer-events","none").selectAll(".resize").style("display",null),vo.select("body").style("cursor",x.style("cursor")),w({type:"brushstart"}),i()}var o,s,u=T(t,"brushstart","brush","brushend"),l=null,c=null,f=[0,0],h=[0,0],d=!0,p=!0,m=Qs[0];return t.event=function(t){t.each((function(){var t=u.of(this,arguments),e={x:f,y:h,i:o,j:s},n=this.__chart__||e;this.__chart__=e,Vs?vo.select(this).transition().each("start.brush",(function(){o=n.i,s=n.j,f=n.x,h=n.y,t({type:"brushstart"})})).tween("brush:brush",(function(){var n=rr(f,e.x),r=rr(h,e.y);return o=s=null,function(i){f=e.x=n(i),h=e.y=r(i),t({type:"brush",mode:"resize"})}})).each("end.brush",(function(){o=e.i,s=e.j,t({type:"brush",mode:"resize"}),t({type:"brushend"})})):(t({type:"brushstart"}),t({type:"brush",mode:"resize"}),t({type:"brushend"}))}))},t.x=function(e){return arguments.length?(m=Qs[!(l=e)<<1|!c],t):l},t.y=function(e){return arguments.length?(m=Qs[!l<<1|!(c=e)],t):c},t.clamp=function(e){return arguments.length?(l&&c?(d=!!e[0],p=!!e[1]):l?d=!!e:c&&(p=!!e),t):l&&c?[d,p]:l?d:c?p:null},t.extent=function(e){var n,r,i,a,u;return arguments.length?(l&&(n=e[0],r=e[1],c&&(n=n[0],r=r[0]),o=[n,r],l.invert&&(n=l(n),r=l(r)),n>r&&(u=n,n=r,r=u),n==f[0]&&r==f[1]||(f=[n,r])),c&&(i=e[0],a=e[1],l&&(i=i[1],a=a[1]),s=[i,a],c.invert&&(i=c(i),a=c(a)),i>a&&(u=i,i=a,a=u),i==h[0]&&a==h[1]||(h=[i,a])),t):(l&&(o?(n=o[0],r=o[1]):(n=f[0],r=f[1],l.invert&&(n=l.invert(n),r=l.invert(r)),n>r&&(u=n,n=r,r=u))),c&&(s?(i=s[0],a=s[1]):(i=h[0],a=h[1],c.invert&&(i=c.invert(i),a=c.invert(a)),i>a&&(u=i,i=a,a=u))),l&&c?[[n,i],[r,a]]:l?[n,r]:c&&[i,a])},t.clear=function(){return t.empty()||(f=[0,0],h=[0,0],o=s=null),t},t.empty=function(){return!!l&&f[0]==f[1]||!!c&&h[0]==h[1]},vo.rebind(t,u,"on")};var Js={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Qs=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],tu=ba.format=Na.timeFormat,eu=tu.utc,nu=eu("%Y-%m-%dT%H:%M:%S.%LZ");tu.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?fo:nu,fo.parse=function(t){var e=new Date(t);return isNaN(e)?null:e},fo.toString=nu.toString,ba.second=Lt((function(t){return new xa(1e3*Math.floor(t/1e3))}),(function(t,e){t.setTime(t.getTime()+1e3*Math.floor(e))}),(function(t){return t.getSeconds()})),ba.seconds=ba.second.range,ba.seconds.utc=ba.second.utc.range,ba.minute=Lt((function(t){return new xa(6e4*Math.floor(t/6e4))}),(function(t,e){t.setTime(t.getTime()+6e4*Math.floor(e))}),(function(t){return t.getMinutes()})),ba.minutes=ba.minute.range,ba.minutes.utc=ba.minute.utc.range,ba.hour=Lt((function(t){var e=t.getTimezoneOffset()/60;return new xa(36e5*(Math.floor(t/36e5-e)+e))}),(function(t,e){t.setTime(t.getTime()+36e5*Math.floor(e))}),(function(t){return t.getHours()})),ba.hours=ba.hour.range,ba.hours.utc=ba.hour.utc.range,ba.month=Lt((function(t){return(t=ba.day(t)).setDate(1),t}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t){return t.getMonth()})),ba.months=ba.month.range,ba.months.utc=ba.month.utc.range;var ru=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],iu=[[ba.second,1],[ba.second,5],[ba.second,15],[ba.second,30],[ba.minute,1],[ba.minute,5],[ba.minute,15],[ba.minute,30],[ba.hour,1],[ba.hour,3],[ba.hour,6],[ba.hour,12],[ba.day,1],[ba.day,2],[ba.week,1],[ba.month,1],[ba.month,3],[ba.year,1]],ou=tu.multi([[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["%I:%M",function(t){return t.getMinutes()}],["%I %p",function(t){return t.getHours()}],["%a %d",function(t){return t.getDay()&&1!=t.getDate()}],["%b %d",function(t){return 1!=t.getDate()}],["%B",function(t){return t.getMonth()}],["%Y",Ne]]),au={range:function(t,e,n){return vo.range(Math.ceil(t/n)*n,+e,n).map(po)},floor:_,ceil:_};iu.year=ba.year,ba.scale=function(){return ho(vo.scale.linear(),iu,ou)};var su=iu.map((function(t){return[t[0].utc,t[1]]})),uu=eu.multi([[".%L",function(t){return t.getUTCMilliseconds()}],[":%S",function(t){return t.getUTCSeconds()}],["%I:%M",function(t){return t.getUTCMinutes()}],["%I %p",function(t){return t.getUTCHours()}],["%a %d",function(t){return t.getUTCDay()&&1!=t.getUTCDate()}],["%b %d",function(t){return 1!=t.getUTCDate()}],["%B",function(t){return t.getUTCMonth()}],["%Y",Ne]]);su.year=ba.year.utc,ba.scale.utc=function(){return ho(vo.scale.linear(),su,uu)},vo.text=Et((function(t){return t.responseText})),vo.json=function(t,e){return kt(t,"application/json",mo,e)},vo.html=function(t,e){return kt(t,"text/html",go,e)},vo.xml=Et((function(t){return t.responseXML})),this.d3=vo,void 0===(i="function"==typeof(r=vo)?r.call(e,n,e,t):r)||(t.exports=i)}()},81920:function(t,e,n){var r,i;!function(o){"use strict";r=[n(19755)],i=function(t){return function(t,e,n,r){var i,o,a,s,u=function(e,n){if(this instanceof u)return t(e).DataTable(n);n=e,this.$=function(t,e){return this.api(!0).$(t,e)},this._=function(t,e){return this.api(!0).rows(t,e).data()},this.api=function(t){return new o(t?ue(this[i.iApiIndex]):this)},this.fnAddData=function(e,n){var i=this.api(!0),o=Array.isArray(e)&&(Array.isArray(e[0])||t.isPlainObject(e[0]))?i.rows.add(e):i.row.add(e);return(n===r||n)&&i.draw(),o.flatten().toArray()},this.fnAdjustColumnSizing=function(t){var e=this.api(!0).columns.adjust(),n=e.settings()[0],i=n.oScroll;t===r||t?e.draw(!1):""===i.sX&&""===i.sY||Ut(n)},this.fnClearTable=function(t){var e=this.api(!0).clear();(t===r||t)&&e.draw()},this.fnClose=function(t){this.api(!0).row(t).child.hide()},this.fnDeleteRow=function(t,e,n){var i=this.api(!0),o=i.rows(t),a=o.settings()[0],s=a.aoData[o[0][0]];return o.remove(),e&&e.call(this,a,s),(n===r||n)&&i.draw(),s},this.fnDestroy=function(t){this.api(!0).destroy(t)},this.fnDraw=function(t){this.api(!0).draw(t)},this.fnFilter=function(t,e,n,i,o,a){var s=this.api(!0);null===e||e===r?s.search(t,n,i,a):s.column(e).search(t,n,i,a),s.draw()},this.fnGetData=function(t,e){var n=this.api(!0);if(t!==r){var i=t.nodeName?t.nodeName.toLowerCase():"";return e!==r||"td"==i||"th"==i?n.cell(t,e).data():n.row(t).data()||null}return n.data().toArray()},this.fnGetNodes=function(t){var e=this.api(!0);return t!==r?e.row(t).node():e.rows().nodes().flatten().toArray()},this.fnGetPosition=function(t){var e=this.api(!0),n=t.nodeName.toUpperCase();if("TR"==n)return e.row(t).index();if("TD"==n||"TH"==n){var r=e.cell(t).index();return[r.row,r.columnVisible,r.column]}return null},this.fnIsOpen=function(t){return this.api(!0).row(t).child.isShown()},this.fnOpen=function(t,e,n){return this.api(!0).row(t).child(e,n).show().child()[0]},this.fnPageChange=function(t,e){var n=this.api(!0).page(t);(e===r||e)&&n.draw(!1)},this.fnSetColumnVis=function(t,e,n){var i=this.api(!0).column(t).visible(e);(n===r||n)&&i.columns.adjust().draw()},this.fnSettings=function(){return ue(this[i.iApiIndex])},this.fnSort=function(t){this.api(!0).order(t).draw()},this.fnSortListener=function(t,e,n){this.api(!0).order.listener(t,e,n)},this.fnUpdate=function(t,e,n,i,o){var a=this.api(!0);return n===r||null===n?a.row(e).data(t):a.cell(e,n).data(t),(o===r||o)&&a.columns.adjust(),(i===r||i)&&a.draw(),0},this.fnVersionCheck=i.fnVersionCheck;var a=this,s=n===r,l=this.length;for(var c in s&&(n={}),this.oApi=this.internal=i.internal,u.ext.internal)c&&(this[c]=Fe(c));return this.each((function(){var e,i=l>1?fe({},n,!0):n,o=0,c=this.getAttribute("id"),f=!1,h=u.defaults,d=t(this);if("table"==this.nodeName.toLowerCase()){A(h),j(h.column),C(h,h,!0),C(h.column,h.column,!0),C(h,t.extend(i,d.data()),!0);var p=u.settings;for(o=0,e=p.length;o<e;o++){var m=p[o];if(m.nTable==this||m.nTHead&&m.nTHead.parentNode==this||m.nTFoot&&m.nTFoot.parentNode==this){var g=i.bRetrieve!==r?i.bRetrieve:h.bRetrieve,v=i.bDestroy!==r?i.bDestroy:h.bDestroy;if(s||g)return m.oInstance;if(v){m.oInstance.fnDestroy();break}return void le(m,0,"Cannot reinitialise DataTable",3)}if(m.sTableId==this.id){p.splice(o,1);break}}null!==c&&""!==c||(c="DataTables_Table_"+u.ext._unique++,this.id=c);var y=t.extend(!0,{},u.models.oSettings,{sDestroyWidth:d[0].style.width,sInstance:c,sTableId:c});y.nTable=this,y.oApi=a.internal,y.oInit=i,p.push(y),y.oInstance=1===a.length?a:d.dataTable(),A(i),T(i.oLanguage),i.aLengthMenu&&!i.iDisplayLength&&(i.iDisplayLength=Array.isArray(i.aLengthMenu[0])?i.aLengthMenu[0][0]:i.aLengthMenu[0]),i=fe(t.extend(!0,{},h),i),ce(y.oFeatures,i,["bPaginate","bLengthChange","bFilter","bSort","bSortMulti","bInfo","bProcessing","bAutoWidth","bSortClasses","bServerSide","bDeferRender"]),ce(y,i,["asStripeClasses","ajax","fnServerData","fnFormatNumber","sServerMethod","aaSorting","aaSortingFixed","aLengthMenu","sPaginationType","sAjaxSource","sAjaxDataProp","iStateDuration","sDom","bSortCellsTop","iTabIndex","fnStateLoadCallback","fnStateSaveCallback","renderer","searchDelay","rowId",["iCookieDuration","iStateDuration"],["oSearch","oPreviousSearch"],["aoSearchCols","aoPreSearchCols"],["iDisplayLength","_iDisplayLength"]]),ce(y.oScroll,i,[["sScrollX","sX"],["sScrollXInner","sXInner"],["sScrollY","sY"],["bScrollCollapse","bCollapse"]]),ce(y.oLanguage,i,"fnInfoCallback"),de(y,"aoDrawCallback",i.fnDrawCallback,"user"),de(y,"aoServerParams",i.fnServerParams,"user"),de(y,"aoStateSaveParams",i.fnStateSaveParams,"user"),de(y,"aoStateLoadParams",i.fnStateLoadParams,"user"),de(y,"aoStateLoaded",i.fnStateLoaded,"user"),de(y,"aoRowCallback",i.fnRowCallback,"user"),de(y,"aoRowCreatedCallback",i.fnCreatedRow,"user"),de(y,"aoHeaderCallback",i.fnHeaderCallback,"user"),de(y,"aoFooterCallback",i.fnFooterCallback,"user"),de(y,"aoInitComplete",i.fnInitComplete,"user"),de(y,"aoPreDrawCallback",i.fnPreDrawCallback,"user"),y.rowIdFn=J(i.rowId),P(y);var b=y.oClasses;if(t.extend(b,u.ext.classes,i.oClasses),d.addClass(b.sTable),y.iInitDisplayStart===r&&(y.iInitDisplayStart=i.iDisplayStart,y._iDisplayStart=i.iDisplayStart),null!==i.iDeferLoading){y.bDeferLoading=!0;var x=Array.isArray(i.iDeferLoading);y._iRecordsDisplay=x?i.iDeferLoading[0]:i.iDeferLoading,y._iRecordsTotal=x?i.iDeferLoading[1]:i.iDeferLoading}var w=y.oLanguage;t.extend(!0,w,i.oLanguage),w.sUrl?(t.ajax({dataType:"json",url:w.sUrl,success:function(e){C(h.oLanguage,e),T(e),t.extend(!0,w,e),pe(y,null,"i18n",[y]),Pt(y)},error:function(){Pt(y)}}),f=!0):pe(y,null,"i18n",[y]),null===i.asStripeClasses&&(y.asStripeClasses=[b.sStripeOdd,b.sStripeEven]);var _=y.asStripeClasses,S=d.children("tbody").find("tr").eq(0);-1!==t.inArray(!0,t.map(_,(function(t,e){return S.hasClass(t)})))&&(t("tbody tr",this).removeClass(_.join(" ")),y.asDestroyStripes=_.slice());var O,N=[],M=this.getElementsByTagName("thead");if(0!==M.length&&(ht(y.aoHeader,M[0]),N=dt(y)),null===i.aoColumns)for(O=[],o=0,e=N.length;o<e;o++)O.push(null);else O=i.aoColumns;for(o=0,e=O.length;o<e;o++)R(y,N?N[o]:null);if(W(y,i.aoColumnDefs,O,(function(t,e){L(y,t,e)})),S.length){var E=function(t,e){return null!==t.getAttribute("data-"+e)?e:null};t(S[0]).children("th, td").each((function(t,e){var n=y.aoColumns[t];if(n.mData===t){var i=E(e,"sort")||E(e,"order"),o=E(e,"filter")||E(e,"search");null===i&&null===o||(n.mData={_:t+".display",sort:null!==i?t+".@data-"+i:r,type:null!==i?t+".@data-"+i:r,filter:null!==o?t+".@data-"+o:r},L(y,t))}}))}var k=y.oFeatures,D=function(){if(i.aaSorting===r){var n=y.aaSorting;for(o=0,e=n.length;o<e;o++)n[o][1]=y.aoColumns[o].asSorting[0]}re(y),k.bSort&&de(y,"aoDrawCallback",(function(){if(y.bSorted){var e=Jt(y),n={};t.each(e,(function(t,e){n[e.src]=e.dir})),pe(y,null,"order",[y,e,n]),te(y)}})),de(y,"aoDrawCallback",(function(){(y.bSorted||"ssp"===ve(y)||k.bDeferRender)&&re(y)}),"sc");var a=d.children("caption").each((function(){this._captionSide=t(this).css("caption-side")})),s=d.children("thead");0===s.length&&(s=t("<thead/>").appendTo(d)),y.nTHead=s[0];var u=d.children("tbody");0===u.length&&(u=t("<tbody/>").insertAfter(s)),y.nTBody=u[0];var l=d.children("tfoot");if(0===l.length&&a.length>0&&(""!==y.oScroll.sX||""!==y.oScroll.sY)&&(l=t("<tfoot/>").appendTo(d)),0===l.length||0===l.children().length?d.addClass(b.sNoFooter):l.length>0&&(y.nTFoot=l[0],ht(y.aoFooter,y.nTFoot)),i.aaData)for(o=0;o<i.aaData.length;o++)V(y,i.aaData[o]);else(y.bDeferLoading||"dom"==ve(y))&&$(y,t(y.nTBody).children("tr"));y.aiDisplay=y.aiDisplayMaster.slice(),y.bInitialised=!0,!1===f&&Pt(y)};de(y,"aoDrawCallback",oe,"state_save"),i.bStateSave?(k.bStateSave=!0,ae(y,0,D)):D()}else le(null,0,"Non-table node initialisation ("+this.nodeName+")",2)})),a=null,this},l={},c=/[\r\n\u2028]/g,f=/<.*?>/g,h=/^\d{2,4}[\.\/\-]\d{1,2}[\.\/\-]\d{1,2}([T ]{1}\d{1,2}[:\.]\d{2}([\.:]\d{2})?)?$/,d=new RegExp("(\\"+["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^","-"].join("|\\")+")","g"),p=/['\u00A0,$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfkɃΞ]/gi,m=function(t){return!t||!0===t||"-"===t},g=function(t){var e=parseInt(t,10);return!isNaN(e)&&isFinite(t)?e:null},v=function(t,e){return l[e]||(l[e]=new RegExp(Nt(e),"g")),"string"==typeof t&&"."!==e?t.replace(/\./g,"").replace(l[e],"."):t},y=function(t,e,n){var r="string"==typeof t;return!!m(t)||(e&&r&&(t=v(t,e)),n&&r&&(t=t.replace(p,"")),!isNaN(parseFloat(t))&&isFinite(t))},b=function(t,e,n){return!!m(t)||function(t){return m(t)||"string"==typeof t}(t)&&!!y(O(t),e,n)||null},x=function(t,e,n){var i=[],o=0,a=t.length;if(n!==r)for(;o<a;o++)t[o]&&t[o][e]&&i.push(t[o][e][n]);else for(;o<a;o++)t[o]&&i.push(t[o][e]);return i},w=function(t,e,n,i){var o=[],a=0,s=e.length;if(i!==r)for(;a<s;a++)t[e[a]][n]&&o.push(t[e[a]][n][i]);else for(;a<s;a++)o.push(t[e[a]][n]);return o},_=function(t,e){var n,i=[];e===r?(e=0,n=t):(n=e,e=t);for(var o=e;o<n;o++)i.push(o);return i},S=function(t){for(var e=[],n=0,r=t.length;n<r;n++)t[n]&&e.push(t[n]);return e},O=function(t){return t.replace(f,"")},N=function(t){if(function(t){if(t.length<2)return!0;for(var e=t.slice().sort(),n=e[0],r=1,i=e.length;r<i;r++){if(e[r]===n)return!1;n=e[r]}return!0}(t))return t.slice();var e,n,r,i=[],o=t.length,a=0;t:for(n=0;n<o;n++){for(e=t[n],r=0;r<a;r++)if(i[r]===e)continue t;i.push(e),a++}return i},M=function(t,e){if(Array.isArray(e))for(var n=0;n<e.length;n++)M(t,e[n]);else t.push(e);return t},E=function(t,e){return e===r&&(e=0),-1!==this.indexOf(t,e)};function k(e){var n,r,i={};t.each(e,(function(t,o){(n=t.match(/^([^A-Z]+?)([A-Z])/))&&-1!=="a aa ai ao as b fn i m o s ".indexOf(n[1]+" ")&&(r=t.replace(n[0],n[2].toLowerCase()),i[r]=t,"o"===n[1]&&k(e[t]))})),e._hungarianMap=i}function C(e,n,i){var o;e._hungarianMap||k(e),t.each(n,(function(a,s){(o=e._hungarianMap[a])===r||!i&&n[o]!==r||("o"===o.charAt(0)?(n[o]||(n[o]={}),t.extend(!0,n[o],n[a]),C(e[o],n[o],i)):n[o]=n[a])}))}function T(t){var e=u.defaults.oLanguage,n=e.sDecimal;if(n&&Re(n),t){var r=t.sZeroRecords;!t.sEmptyTable&&r&&"No data available in table"===e.sEmptyTable&&ce(t,t,"sZeroRecords","sEmptyTable"),!t.sLoadingRecords&&r&&"Loading..."===e.sLoadingRecords&&ce(t,t,"sZeroRecords","sLoadingRecords"),t.sInfoThousands&&(t.sThousands=t.sInfoThousands);var i=t.sDecimal;i&&n!==i&&Re(i)}}Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),Array.prototype.includes||(Array.prototype.includes=E),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}),String.prototype.includes||(String.prototype.includes=E),u.util={throttle:function(t,e){var n,i,o=e!==r?e:200;return function(){var e=this,a=+new Date,s=arguments;n&&a<n+o?(clearTimeout(i),i=setTimeout((function(){n=r,t.apply(e,s)}),o)):(n=a,t.apply(e,s))}},escapeRegex:function(t){return t.replace(d,"\\$1")},set:function(e){if(t.isPlainObject(e))return u.util.set(e._);if(null===e)return function(){};if("function"==typeof e)return function(t,n,r){e(t,"set",n,r)};if("string"!=typeof e||-1===e.indexOf(".")&&-1===e.indexOf("[")&&-1===e.indexOf("("))return function(t,n){t[e]=n};var n=function(t,e,i){for(var o,a,s,u,l,c=X(i),f=c[c.length-1],h=0,d=c.length-1;h<d;h++){if("__proto__"===c[h]||"constructor"===c[h])throw new Error("Cannot set prototype values");if(a=c[h].match(G),s=c[h].match(K),a){if(c[h]=c[h].replace(G,""),t[c[h]]=[],(o=c.slice()).splice(0,h+1),l=o.join("."),Array.isArray(e))for(var p=0,m=e.length;p<m;p++)n(u={},e[p],l),t[c[h]].push(u);else t[c[h]]=e;return}s&&(c[h]=c[h].replace(K,""),t=t[c[h]](e)),null!==t[c[h]]&&t[c[h]]!==r||(t[c[h]]={}),t=t[c[h]]}f.match(K)?t=t[f.replace(K,"")](e):t[f.replace(G,"")]=e};return function(t,r){return n(t,r,e)}},get:function(e){if(t.isPlainObject(e)){var n={};return t.each(e,(function(t,e){e&&(n[t]=u.util.get(e))})),function(t,e,i,o){var a=n[e]||n._;return a!==r?a(t,e,i,o):t}}if(null===e)return function(t){return t};if("function"==typeof e)return function(t,n,r,i){return e(t,n,r,i)};if("string"!=typeof e||-1===e.indexOf(".")&&-1===e.indexOf("[")&&-1===e.indexOf("("))return function(t,n){return t[e]};var i=function(t,e,n){var o,a,s,u;if(""!==n)for(var l=X(n),c=0,f=l.length;c<f;c++){if(o=l[c].match(G),a=l[c].match(K),o){if(l[c]=l[c].replace(G,""),""!==l[c]&&(t=t[l[c]]),s=[],l.splice(0,c+1),u=l.join("."),Array.isArray(t))for(var h=0,d=t.length;h<d;h++)s.push(i(t[h],e,u));var p=o[0].substring(1,o[0].length-1);t=""===p?s:s.join(p);break}if(a)l[c]=l[c].replace(K,""),t=t[l[c]]();else{if(null===t||t[l[c]]===r)return r;t=t[l[c]]}}return t};return function(t,n){return i(t,n,e)}}};var D=function(t,e,n){t[e]!==r&&(t[n]=t[e])};function A(t){D(t,"ordering","bSort"),D(t,"orderMulti","bSortMulti"),D(t,"orderClasses","bSortClasses"),D(t,"orderCellsTop","bSortCellsTop"),D(t,"order","aaSorting"),D(t,"orderFixed","aaSortingFixed"),D(t,"paging","bPaginate"),D(t,"pagingType","sPaginationType"),D(t,"pageLength","iDisplayLength"),D(t,"searching","bFilter"),"boolean"==typeof t.sScrollX&&(t.sScrollX=t.sScrollX?"100%":""),"boolean"==typeof t.scrollX&&(t.scrollX=t.scrollX?"100%":"");var e=t.aoSearchCols;if(e)for(var n=0,r=e.length;n<r;n++)e[n]&&C(u.models.oSearch,e[n])}function j(t){D(t,"orderable","bSortable"),D(t,"orderData","aDataSort"),D(t,"orderSequence","asSorting"),D(t,"orderDataType","sortDataType");var e=t.aDataSort;"number"!=typeof e||Array.isArray(e)||(t.aDataSort=[e])}function P(n){if(!u.__browser){var r={};u.__browser=r;var i=t("<div/>").css({position:"fixed",top:0,left:-1*t(e).scrollLeft(),height:1,width:1,overflow:"hidden"}).append(t("<div/>").css({position:"absolute",top:1,left:1,width:100,overflow:"scroll"}).append(t("<div/>").css({width:"100%",height:10}))).appendTo("body"),o=i.children(),a=o.children();r.barWidth=o[0].offsetWidth-o[0].clientWidth,r.bScrollOversize=100===a[0].offsetWidth&&100!==o[0].clientWidth,r.bScrollbarLeft=1!==Math.round(a.offset().left),r.bBounding=!!i[0].getBoundingClientRect().width,i.remove()}t.extend(n.oBrowser,u.__browser),n.oScroll.iBarWidth=u.__browser.barWidth}function I(t,e,n,i,o,a){var s,u=i,l=!1;for(n!==r&&(s=n,l=!0);u!==o;)t.hasOwnProperty(u)&&(s=l?e(s,t[u],u,t):t[u],l=!0,u+=a);return s}function R(e,r){var i=u.defaults.column,o=e.aoColumns.length,a=t.extend({},u.models.oColumn,i,{nTh:r||n.createElement("th"),sTitle:i.sTitle?i.sTitle:r?r.innerHTML:"",aDataSort:i.aDataSort?i.aDataSort:[o],mData:i.mData?i.mData:o,idx:o});e.aoColumns.push(a);var s=e.aoPreSearchCols;s[o]=t.extend({},u.models.oSearch,s[o]),L(e,o,t(r).data())}function L(e,n,i){var o=e.aoColumns[n],a=e.oClasses,s=t(o.nTh);if(!o.sWidthOrig){o.sWidthOrig=s.attr("width")||null;var l=(s.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);l&&(o.sWidthOrig=l[1])}i!==r&&null!==i&&(j(i),C(u.defaults.column,i,!0),i.mDataProp===r||i.mData||(i.mData=i.mDataProp),i.sType&&(o._sManualType=i.sType),i.className&&!i.sClass&&(i.sClass=i.className),i.sClass&&s.addClass(i.sClass),t.extend(o,i),ce(o,i,"sWidth","sWidthOrig"),i.iDataSort!==r&&(o.aDataSort=[i.iDataSort]),ce(o,i,"aDataSort"));var c=o.mData,f=J(c),h=o.mRender?J(o.mRender):null,d=function(t){return"string"==typeof t&&-1!==t.indexOf("@")};o._bAttrSrc=t.isPlainObject(c)&&(d(c.sort)||d(c.type)||d(c.filter)),o._setter=null,o.fnGetData=function(t,e,n){var i=f(t,e,r,n);return h&&e?h(i,e,t,n):i},o.fnSetData=function(t,e,n){return Q(c)(t,e,n)},"number"!=typeof c&&(e._rowReadObject=!0),e.oFeatures.bSort||(o.bSortable=!1,s.addClass(a.sSortableNone));var p=-1!==t.inArray("asc",o.asSorting),m=-1!==t.inArray("desc",o.asSorting);o.bSortable&&(p||m)?p&&!m?(o.sSortingClass=a.sSortableAsc,o.sSortingClassJUI=a.sSortJUIAscAllowed):!p&&m?(o.sSortingClass=a.sSortableDesc,o.sSortingClassJUI=a.sSortJUIDescAllowed):(o.sSortingClass=a.sSortable,o.sSortingClassJUI=a.sSortJUI):(o.sSortingClass=a.sSortableNone,o.sSortingClassJUI="")}function F(t){if(!1!==t.oFeatures.bAutoWidth){var e=t.aoColumns;$t(t);for(var n=0,r=e.length;n<r;n++)e[n].nTh.style.width=e[n].sWidth}var i=t.oScroll;""===i.sY&&""===i.sX||Ut(t),pe(t,null,"column-sizing",[t])}function q(t,e){var n=H(t,"bVisible");return"number"==typeof n[e]?n[e]:null}function B(e,n){var r=H(e,"bVisible"),i=t.inArray(n,r);return-1!==i?i:null}function z(e){var n=0;return t.each(e.aoColumns,(function(e,r){r.bVisible&&"none"!==t(r.nTh).css("display")&&n++})),n}function H(e,n){var r=[];return t.map(e.aoColumns,(function(t,e){t[n]&&r.push(e)})),r}function U(t){var e,n,i,o,a,s,l,c,f,h=t.aoColumns,d=t.aoData,p=u.ext.type.detect;for(e=0,n=h.length;e<n;e++)if(f=[],!(l=h[e]).sType&&l._sManualType)l.sType=l._sManualType;else if(!l.sType){for(i=0,o=p.length;i<o;i++){for(a=0,s=d.length;a<s&&(f[a]===r&&(f[a]=Y(t,a,e,"type")),(c=p[i](f[a],t))||i===p.length-1)&&("html"!==c||m(f[a]));a++);if(c){l.sType=c;break}}l.sType||(l.sType="string")}}function W(e,n,i,o){var a,s,u,l,c,f,h,d=e.aoColumns;if(n)for(a=n.length-1;a>=0;a--){var p=(h=n[a]).targets!==r?h.targets:h.aTargets;for(Array.isArray(p)||(p=[p]),u=0,l=p.length;u<l;u++)if("number"==typeof p[u]&&p[u]>=0){for(;d.length<=p[u];)R(e);o(p[u],h)}else if("number"==typeof p[u]&&p[u]<0)o(d.length+p[u],h);else if("string"==typeof p[u])for(c=0,f=d.length;c<f;c++)("_all"==p[u]||t(d[c].nTh).hasClass(p[u]))&&o(c,h)}if(i)for(a=0,s=i.length;a<s;a++)o(a,i[a])}function V(e,n,i,o){var a=e.aoData.length,s=t.extend(!0,{},u.models.oRow,{src:i?"dom":"data",idx:a});s._aData=n,e.aoData.push(s);for(var l=e.aoColumns,c=0,f=l.length;c<f;c++)l[c].sType=null;e.aiDisplayMaster.push(a);var h=e.rowIdFn(n);return h!==r&&(e.aIds[h]=s),!i&&e.oFeatures.bDeferRender||ot(e,a,i,o),a}function $(e,n){var r;return n instanceof t||(n=t(n)),n.map((function(t,n){return r=it(e,n),V(e,r.data,n,r.cells)}))}function Y(t,e,n,i){"search"===i?i="filter":"order"===i&&(i="sort");var o=t.iDraw,a=t.aoColumns[n],s=t.aoData[e]._aData,l=a.sDefaultContent,c=a.fnGetData(s,i,{settings:t,row:e,col:n});if(c===r)return t.iDrawError!=o&&null===l&&(le(t,0,"Requested unknown parameter "+("function"==typeof a.mData?"{function}":"'"+a.mData+"'")+" for row "+e+", column "+n,4),t.iDrawError=o),l;if(c!==s&&null!==c||null===l||i===r){if("function"==typeof c)return c.call(s)}else c=l;if(null===c&&"display"===i)return"";if("filter"===i){var f=u.ext.type.search;f[a.sType]&&(c=f[a.sType](c))}return c}function Z(t,e,n,r){var i=t.aoColumns[n],o=t.aoData[e]._aData;i.fnSetData(o,r,{settings:t,row:e,col:n})}var G=/\[.*?\]$/,K=/\(\)$/;function X(e){return t.map(e.match(/(\\.|[^\.])+/g)||[""],(function(t){return t.replace(/\\\./g,".")}))}var J=u.util.get,Q=u.util.set;function tt(t){return x(t.aoData,"_aData")}function et(t){t.aoData.length=0,t.aiDisplayMaster.length=0,t.aiDisplay.length=0,t.aIds={}}function nt(t,e,n){for(var i=-1,o=0,a=t.length;o<a;o++)t[o]==e?i=o:t[o]>e&&t[o]--;-1!=i&&n===r&&t.splice(i,1)}function rt(t,e,n,i){var o,a,s=t.aoData[e],u=function(n,r){for(;n.childNodes.length;)n.removeChild(n.firstChild);n.innerHTML=Y(t,e,r,"display")};if("dom"!==n&&(n&&"auto"!==n||"dom"!==s.src)){var l=s.anCells;if(l)if(i!==r)u(l[i],i);else for(o=0,a=l.length;o<a;o++)u(l[o],o)}else s._aData=it(t,s,i,i===r?r:s._aData).data;s._aSortData=null,s._aFilterData=null;var c=t.aoColumns;if(i!==r)c[i].sType=null;else{for(o=0,a=c.length;o<a;o++)c[o].sType=null;at(t,s)}}function it(t,e,n,i){var o,a,s,u=[],l=e.firstChild,c=0,f=t.aoColumns,h=t._rowReadObject;i=i!==r?i:h?{}:[];var d=function(t,e){if("string"==typeof t){var n=t.indexOf("@");if(-1!==n){var r=t.substring(n+1);Q(t)(i,e.getAttribute(r))}}},p=function(t){n!==r&&n!==c||(a=f[c],s=t.innerHTML.trim(),a&&a._bAttrSrc?(Q(a.mData._)(i,s),d(a.mData.sort,t),d(a.mData.type,t),d(a.mData.filter,t)):h?(a._setter||(a._setter=Q(a.mData)),a._setter(i,s)):i[c]=s),c++};if(l)for(;l;)"TD"!=(o=l.nodeName.toUpperCase())&&"TH"!=o||(p(l),u.push(l)),l=l.nextSibling;else for(var m=0,g=(u=e.anCells).length;m<g;m++)p(u[m]);var v=e.firstChild?e:e.nTr;if(v){var y=v.getAttribute("id");y&&Q(t.rowId)(i,y)}return{data:i,cells:u}}function ot(e,r,i,o){var a,s,u,l,c,f,h=e.aoData[r],d=h._aData,p=[];if(null===h.nTr){for(a=i||n.createElement("tr"),h.nTr=a,h.anCells=p,a._DT_RowIndex=r,at(e,h),l=0,c=e.aoColumns.length;l<c;l++)u=e.aoColumns[l],(s=(f=!i)?n.createElement(u.sCellType):o[l])._DT_CellIndex={row:r,column:l},p.push(s),!f&&(!u.mRender&&u.mData===l||t.isPlainObject(u.mData)&&u.mData._===l+".display")||(s.innerHTML=Y(e,r,l,"display")),u.sClass&&(s.className+=" "+u.sClass),u.bVisible&&!i?a.appendChild(s):!u.bVisible&&i&&s.parentNode.removeChild(s),u.fnCreatedCell&&u.fnCreatedCell.call(e.oInstance,s,Y(e,r,l),d,r,l);pe(e,"aoRowCreatedCallback",null,[a,d,r,p])}}function at(e,n){var r=n.nTr,i=n._aData;if(r){var o=e.rowIdFn(i);if(o&&(r.id=o),i.DT_RowClass){var a=i.DT_RowClass.split(" ");n.__rowc=n.__rowc?N(n.__rowc.concat(a)):a,t(r).removeClass(n.__rowc.join(" ")).addClass(i.DT_RowClass)}i.DT_RowAttr&&t(r).attr(i.DT_RowAttr),i.DT_RowData&&t(r).data(i.DT_RowData)}}function st(e){var n,r,i,o,a,s=e.nTHead,u=e.nTFoot,l=0===t("th, td",s).length,c=e.oClasses,f=e.aoColumns;for(l&&(o=t("<tr/>").appendTo(s)),n=0,r=f.length;n<r;n++)a=f[n],i=t(a.nTh).addClass(a.sClass),l&&i.appendTo(o),e.oFeatures.bSort&&(i.addClass(a.sSortingClass),!1!==a.bSortable&&(i.attr("tabindex",e.iTabIndex).attr("aria-controls",e.sTableId),ne(e,a.nTh,n))),a.sTitle!=i[0].innerHTML&&i.html(a.sTitle),ge(e,"header")(e,i,a,c);if(l&&ht(e.aoHeader,s),t(s).children("tr").children("th, td").addClass(c.sHeaderTH),t(u).children("tr").children("th, td").addClass(c.sFooterTH),null!==u){var h=e.aoFooter[0];for(n=0,r=h.length;n<r;n++)(a=f[n]).nTf=h[n].cell,a.sClass&&t(a.nTf).addClass(a.sClass)}}function ut(e,n,i){var o,a,s,u,l,c,f,h,d,p=[],m=[],g=e.aoColumns.length;if(n){for(i===r&&(i=!1),o=0,a=n.length;o<a;o++){for(p[o]=n[o].slice(),p[o].nTr=n[o].nTr,s=g-1;s>=0;s--)e.aoColumns[s].bVisible||i||p[o].splice(s,1);m.push([])}for(o=0,a=p.length;o<a;o++){if(f=p[o].nTr)for(;c=f.firstChild;)f.removeChild(c);for(s=0,u=p[o].length;s<u;s++)if(h=1,d=1,m[o][s]===r){for(f.appendChild(p[o][s].cell),m[o][s]=1;p[o+h]!==r&&p[o][s].cell==p[o+h][s].cell;)m[o+h][s]=1,h++;for(;p[o][s+d]!==r&&p[o][s].cell==p[o][s+d].cell;){for(l=0;l<h;l++)m[o+l][s+d]=1;d++}t(p[o][s].cell).attr("rowspan",h).attr("colspan",d)}}}}function lt(e,n){var i=pe(e,"aoPreDrawCallback","preDraw",[e]);if(-1===t.inArray(!1,i)){var o=[],a=0,s=e.asStripeClasses,u=s.length,l=(e.aoOpenRows.length,e.oLanguage),c=e.iInitDisplayStart,f="ssp"==ve(e),h=e.aiDisplay;e.bDrawing=!0,c!==r&&-1!==c&&(e._iDisplayStart=f?c:c>=e.fnRecordsDisplay()?0:c,e.iInitDisplayStart=-1);var d=e._iDisplayStart,p=e.fnDisplayEnd();if(e.bDeferLoading)e.bDeferLoading=!1,e.iDraw++,zt(e,!1);else if(f){if(!e.bDestroying&&!n)return void mt(e)}else e.iDraw++;if(0!==h.length)for(var m=f?0:d,g=f?e.aoData.length:p,v=m;v<g;v++){var y=h[v],b=e.aoData[y];null===b.nTr&&ot(e,y);var x=b.nTr;if(0!==u){var w=s[a%u];b._sRowStripe!=w&&(t(x).removeClass(b._sRowStripe).addClass(w),b._sRowStripe=w)}pe(e,"aoRowCallback",null,[x,b._aData,a,v,y]),o.push(x),a++}else{var _=l.sZeroRecords;1==e.iDraw&&"ajax"==ve(e)?_=l.sLoadingRecords:l.sEmptyTable&&0===e.fnRecordsTotal()&&(_=l.sEmptyTable),o[0]=t("<tr/>",{class:u?s[0]:""}).append(t("<td />",{valign:"top",colSpan:z(e),class:e.oClasses.sRowEmpty}).html(_))[0]}pe(e,"aoHeaderCallback","header",[t(e.nTHead).children("tr")[0],tt(e),d,p,h]),pe(e,"aoFooterCallback","footer",[t(e.nTFoot).children("tr")[0],tt(e),d,p,h]);var S=t(e.nTBody);S.children().detach(),S.append(t(o)),pe(e,"aoDrawCallback","draw",[e]),e.bSorted=!1,e.bFiltered=!1,e.bDrawing=!1}else zt(e,!1)}function ct(t,e){var n=t.oFeatures,r=n.bSort,i=n.bFilter;r&&Qt(t),i?xt(t,t.oPreviousSearch):t.aiDisplay=t.aiDisplayMaster.slice(),!0!==e&&(t._iDisplayStart=0),t._drawHold=e,lt(t),t._drawHold=!1}function ft(e){var n=e.oClasses,r=t(e.nTable),i=t("<div/>").insertBefore(r),o=e.oFeatures,a=t("<div/>",{id:e.sTableId+"_wrapper",class:n.sWrapper+(e.nTFoot?"":" "+n.sNoFooter)});e.nHolding=i[0],e.nTableWrapper=a[0],e.nTableReinsertBefore=e.nTable.nextSibling;for(var s,l,c,f,h,d,p=e.sDom.split(""),m=0;m<p.length;m++){if(s=null,"<"==(l=p[m])){if(c=t("<div/>")[0],"'"==(f=p[m+1])||'"'==f){for(h="",d=2;p[m+d]!=f;)h+=p[m+d],d++;if("H"==h?h=n.sJUIHeader:"F"==h&&(h=n.sJUIFooter),-1!=h.indexOf(".")){var g=h.split(".");c.id=g[0].substr(1,g[0].length-1),c.className=g[1]}else"#"==h.charAt(0)?c.id=h.substr(1,h.length-1):c.className=h;m+=d}a.append(c),a=t(c)}else if(">"==l)a=a.parent();else if("l"==l&&o.bPaginate&&o.bLengthChange)s=Lt(e);else if("f"==l&&o.bFilter)s=bt(e);else if("r"==l&&o.bProcessing)s=Bt(e);else if("t"==l)s=Ht(e);else if("i"==l&&o.bInfo)s=Dt(e);else if("p"==l&&o.bPaginate)s=Ft(e);else if(0!==u.ext.feature.length)for(var v=u.ext.feature,y=0,b=v.length;y<b;y++)if(l==v[y].cFeature){s=v[y].fnInit(e);break}if(s){var x=e.aanFeatures;x[l]||(x[l]=[]),x[l].push(s),a.append(s)}}i.replaceWith(a),e.nHolding=null}function ht(e,n){var r,i,o,a,s,u,l,c,f,h,d=t(n).children("tr"),p=function(t,e,n){for(var r=t[e];r[n];)n++;return n};for(e.splice(0,e.length),o=0,u=d.length;o<u;o++)e.push([]);for(o=0,u=d.length;o<u;o++)for(0,i=(r=d[o]).firstChild;i;){if("TD"==i.nodeName.toUpperCase()||"TH"==i.nodeName.toUpperCase())for(c=(c=1*i.getAttribute("colspan"))&&0!==c&&1!==c?c:1,f=(f=1*i.getAttribute("rowspan"))&&0!==f&&1!==f?f:1,l=p(e,o,0),h=1===c,s=0;s<c;s++)for(a=0;a<f;a++)e[o+a][l+s]={cell:i,unique:h},e[o+a].nTr=r;i=i.nextSibling}}function dt(t,e,n){var r=[];n||(n=t.aoHeader,e&&ht(n=[],e));for(var i=0,o=n.length;i<o;i++)for(var a=0,s=n[i].length;a<s;a++)!n[i][a].unique||r[a]&&t.bSortCellsTop||(r[a]=n[i][a].cell);return r}function pt(e,n,r){if(pe(e,"aoServerParams","serverParams",[n]),n&&Array.isArray(n)){var i={},o=/(.*?)\[\]$/;t.each(n,(function(t,e){var n=e.name.match(o);if(n){var r=n[0];i[r]||(i[r]=[]),i[r].push(e.value)}else i[e.name]=e.value})),n=i}var a,s=e.ajax,u=e.oInstance,l=function(t){var n=e.jqXhr?e.jqXhr.status:null;(null===t||"number"==typeof n&&204==n)&&yt(e,t={},[]);var i=t.error||t.sError;i&&le(e,0,i),e.json=t,pe(e,null,"xhr",[e,t,e.jqXHR]),r(t)};if(t.isPlainObject(s)&&s.data){var c="function"==typeof(a=s.data)?a(n,e):a;n="function"==typeof a&&c?c:t.extend(!0,n,c),delete s.data}var f={data:n,success:l,dataType:"json",cache:!1,type:e.sServerMethod,error:function(n,r,i){var o=pe(e,null,"xhr",[e,null,e.jqXHR]);-1===t.inArray(!0,o)&&("parsererror"==r?le(e,0,"Invalid JSON response",1):4===n.readyState&&le(e,0,"Ajax error",7)),zt(e,!1)}};e.oAjaxData=n,pe(e,null,"preXhr",[e,n]),e.fnServerData?e.fnServerData.call(u,e.sAjaxSource,t.map(n,(function(t,e){return{name:e,value:t}})),l,e):e.sAjaxSource||"string"==typeof s?e.jqXHR=t.ajax(t.extend(f,{url:s||e.sAjaxSource})):"function"==typeof s?e.jqXHR=s.call(u,n,l,e):(e.jqXHR=t.ajax(t.extend(f,s)),s.data=a)}function mt(t){t.iDraw++,zt(t,!0),pt(t,gt(t),(function(e){vt(t,e)}))}function gt(e){var n,r,i,o,a=e.aoColumns,s=a.length,l=e.oFeatures,c=e.oPreviousSearch,f=e.aoPreSearchCols,h=[],d=Jt(e),p=e._iDisplayStart,m=!1!==l.bPaginate?e._iDisplayLength:-1,g=function(t,e){h.push({name:t,value:e})};g("sEcho",e.iDraw),g("iColumns",s),g("sColumns",x(a,"sName").join(",")),g("iDisplayStart",p),g("iDisplayLength",m);var v={draw:e.iDraw,columns:[],order:[],start:p,length:m,search:{value:c.sSearch,regex:c.bRegex}};for(n=0;n<s;n++)i=a[n],o=f[n],r="function"==typeof i.mData?"function":i.mData,v.columns.push({data:r,name:i.sName,searchable:i.bSearchable,orderable:i.bSortable,search:{value:o.sSearch,regex:o.bRegex}}),g("mDataProp_"+n,r),l.bFilter&&(g("sSearch_"+n,o.sSearch),g("bRegex_"+n,o.bRegex),g("bSearchable_"+n,i.bSearchable)),l.bSort&&g("bSortable_"+n,i.bSortable);l.bFilter&&(g("sSearch",c.sSearch),g("bRegex",c.bRegex)),l.bSort&&(t.each(d,(function(t,e){v.order.push({column:e.col,dir:e.dir}),g("iSortCol_"+t,e.col),g("sSortDir_"+t,e.dir)})),g("iSortingCols",d.length));var y=u.ext.legacy.ajax;return null===y?e.sAjaxSource?h:v:y?h:v}function vt(t,e){var n=function(t,n){return e[t]!==r?e[t]:e[n]},i=yt(t,e),o=n("sEcho","draw"),a=n("iTotalRecords","recordsTotal"),s=n("iTotalDisplayRecords","recordsFiltered");if(o!==r){if(1*o<t.iDraw)return;t.iDraw=1*o}i||(i=[]),et(t),t._iRecordsTotal=parseInt(a,10),t._iRecordsDisplay=parseInt(s,10);for(var u=0,l=i.length;u<l;u++)V(t,i[u]);t.aiDisplay=t.aiDisplayMaster.slice(),lt(t,!0),t._bInitComplete||It(t,e),zt(t,!1)}function yt(e,n,i){var o=t.isPlainObject(e.ajax)&&e.ajax.dataSrc!==r?e.ajax.dataSrc:e.sAjaxDataProp;if(!i)return"data"===o?n.aaData||n[o]:""!==o?J(o)(n):n;Q(o)(n,i)}function bt(e){var r=e.oClasses,i=e.sTableId,o=e.oLanguage,a=e.oPreviousSearch,s=e.aanFeatures,u='<input type="search" class="'+r.sFilterInput+'"/>',l=o.sSearch;l=l.match(/_INPUT_/)?l.replace("_INPUT_",u):l+u;var c=t("<div/>",{id:s.f?null:i+"_filter",class:r.sFilter}).append(t("<label/>").append(l)),f=function(t){s.f;var n=this.value?this.value:"";a.return&&"Enter"!==t.key||n!=a.sSearch&&(xt(e,{sSearch:n,bRegex:a.bRegex,bSmart:a.bSmart,bCaseInsensitive:a.bCaseInsensitive,return:a.return}),e._iDisplayStart=0,lt(e))},h=null!==e.searchDelay?e.searchDelay:"ssp"===ve(e)?400:0,d=t("input",c).val(a.sSearch).attr("placeholder",o.sSearchPlaceholder).on("keyup.DT search.DT input.DT paste.DT cut.DT",h?Yt(f,h):f).on("mouseup",(function(t){setTimeout((function(){f.call(d[0],t)}),10)})).on("keypress.DT",(function(t){if(13==t.keyCode)return!1})).attr("aria-controls",i);return t(e.nTable).on("search.dt.DT",(function(t,r){if(e===r)try{d[0]!==n.activeElement&&d.val(a.sSearch)}catch(t){}})),c[0]}function xt(t,e,n){var i=t.oPreviousSearch,o=t.aoPreSearchCols,a=function(t){i.sSearch=t.sSearch,i.bRegex=t.bRegex,i.bSmart=t.bSmart,i.bCaseInsensitive=t.bCaseInsensitive,i.return=t.return},s=function(t){return t.bEscapeRegex!==r?!t.bEscapeRegex:t.bRegex};if(U(t),"ssp"!=ve(t)){St(t,e.sSearch,n,s(e),e.bSmart,e.bCaseInsensitive,e.return),a(e);for(var u=0;u<o.length;u++)_t(t,o[u].sSearch,u,s(o[u]),o[u].bSmart,o[u].bCaseInsensitive);wt(t)}else a(e);t.bFiltered=!0,pe(t,null,"search",[t])}function wt(e){for(var n,r,i=u.ext.search,o=e.aiDisplay,a=0,s=i.length;a<s;a++){for(var l=[],c=0,f=o.length;c<f;c++)r=o[c],n=e.aoData[r],i[a](e,n._aFilterData,r,n._aData,c)&&l.push(r);o.length=0,t.merge(o,l)}}function _t(t,e,n,r,i,o){if(""!==e){for(var a,s=[],u=t.aiDisplay,l=Ot(e,r,i,o),c=0;c<u.length;c++)a=t.aoData[u[c]]._aFilterData[n],l.test(a)&&s.push(u[c]);t.aiDisplay=s}}function St(t,e,n,r,i,o){var a,s,l,c=Ot(e,r,i,o),f=t.oPreviousSearch.sSearch,h=t.aiDisplayMaster,d=[];if(0!==u.ext.search.length&&(n=!0),s=kt(t),e.length<=0)t.aiDisplay=h.slice();else{for((s||n||r||f.length>e.length||0!==e.indexOf(f)||t.bSorted)&&(t.aiDisplay=h.slice()),a=t.aiDisplay,l=0;l<a.length;l++)c.test(t.aoData[a[l]]._sFilterRow)&&d.push(a[l]);t.aiDisplay=d}}function Ot(e,n,r,i){if(e=n?e:Nt(e),r){var o=t.map(e.match(/"[^"]+"|[^ ]+/g)||[""],(function(t){if('"'===t.charAt(0)){var e=t.match(/^"(.*)"$/);t=e?e[1]:t}return t.replace('"',"")}));e="^(?=.*?"+o.join(")(?=.*?")+").*$"}return new RegExp(e,i?"i":"")}var Nt=u.util.escapeRegex,Mt=t("<div>")[0],Et=Mt.textContent!==r;function kt(t){var e,n,r,i,o,a,s,u=t.aoColumns,l=!1;for(e=0,r=t.aoData.length;e<r;e++)if(!(s=t.aoData[e])._aFilterData){for(o=[],n=0,i=u.length;n<i;n++)u[n].bSearchable?(null===(a=Y(t,e,n,"filter"))&&(a=""),"string"!=typeof a&&a.toString&&(a=a.toString())):a="",a.indexOf&&-1!==a.indexOf("&")&&(Mt.innerHTML=a,a=Et?Mt.textContent:Mt.innerText),a.replace&&(a=a.replace(/[\r\n\u2028]/g,"")),o.push(a);s._aFilterData=o,s._sFilterRow=o.join(" "),l=!0}return l}function Ct(t){return{search:t.sSearch,smart:t.bSmart,regex:t.bRegex,caseInsensitive:t.bCaseInsensitive}}function Tt(t){return{sSearch:t.search,bSmart:t.smart,bRegex:t.regex,bCaseInsensitive:t.caseInsensitive}}function Dt(e){var n=e.sTableId,r=e.aanFeatures.i,i=t("<div/>",{class:e.oClasses.sInfo,id:r?null:n+"_info"});return r||(e.aoDrawCallback.push({fn:At,sName:"information"}),i.attr("role","status").attr("aria-live","polite"),t(e.nTable).attr("aria-describedby",n+"_info")),i[0]}function At(e){var n=e.aanFeatures.i;if(0!==n.length){var r=e.oLanguage,i=e._iDisplayStart+1,o=e.fnDisplayEnd(),a=e.fnRecordsTotal(),s=e.fnRecordsDisplay(),u=s?r.sInfo:r.sInfoEmpty;s!==a&&(u+=" "+r.sInfoFiltered),u=jt(e,u+=r.sInfoPostFix);var l=r.fnInfoCallback;null!==l&&(u=l.call(e.oInstance,e,i,o,a,s,u)),t(n).html(u)}}function jt(t,e){var n=t.fnFormatNumber,r=t._iDisplayStart+1,i=t._iDisplayLength,o=t.fnRecordsDisplay(),a=-1===i;return e.replace(/_START_/g,n.call(t,r)).replace(/_END_/g,n.call(t,t.fnDisplayEnd())).replace(/_MAX_/g,n.call(t,t.fnRecordsTotal())).replace(/_TOTAL_/g,n.call(t,o)).replace(/_PAGE_/g,n.call(t,a?1:Math.ceil(r/i))).replace(/_PAGES_/g,n.call(t,a?1:Math.ceil(o/i)))}function Pt(t){var e,n,r,i=t.iInitDisplayStart,o=t.aoColumns,a=t.oFeatures,s=t.bDeferLoading;if(t.bInitialised){for(ft(t),st(t),ut(t,t.aoHeader),ut(t,t.aoFooter),zt(t,!0),a.bAutoWidth&&$t(t),e=0,n=o.length;e<n;e++)(r=o[e]).sWidth&&(r.nTh.style.width=Xt(r.sWidth));pe(t,null,"preInit",[t]),ct(t);var u=ve(t);("ssp"!=u||s)&&("ajax"==u?pt(t,[],(function(n){var r=yt(t,n);for(e=0;e<r.length;e++)V(t,r[e]);t.iInitDisplayStart=i,ct(t),zt(t,!1),It(t,n)})):(zt(t,!1),It(t)))}else setTimeout((function(){Pt(t)}),200)}function It(t,e){t._bInitComplete=!0,(e||t.oInit.aaData)&&F(t),pe(t,null,"plugin-init",[t,e]),pe(t,"aoInitComplete","init",[t,e])}function Rt(t,e){var n=parseInt(e,10);t._iDisplayLength=n,me(t),pe(t,null,"length",[t,n])}function Lt(e){for(var n=e.oClasses,r=e.sTableId,i=e.aLengthMenu,o=Array.isArray(i[0]),a=o?i[0]:i,s=o?i[1]:i,u=t("<select/>",{name:r+"_length","aria-controls":r,class:n.sLengthSelect}),l=0,c=a.length;l<c;l++)u[0][l]=new Option("number"==typeof s[l]?e.fnFormatNumber(s[l]):s[l],a[l]);var f=t("<div><label/></div>").addClass(n.sLength);return e.aanFeatures.l||(f[0].id=r+"_length"),f.children().append(e.oLanguage.sLengthMenu.replace("_MENU_",u[0].outerHTML)),t("select",f).val(e._iDisplayLength).on("change.DT",(function(n){Rt(e,t(this).val()),lt(e)})),t(e.nTable).on("length.dt.DT",(function(n,r,i){e===r&&t("select",f).val(i)})),f[0]}function Ft(e){var n=e.sPaginationType,r=u.ext.pager[n],i="function"==typeof r,o=function(t){lt(t)},a=t("<div/>").addClass(e.oClasses.sPaging+n)[0],s=e.aanFeatures;return i||r.fnInit(e,a,o),s.p||(a.id=e.sTableId+"_paginate",e.aoDrawCallback.push({fn:function(t){if(i){var e,n,a=t._iDisplayStart,u=t._iDisplayLength,l=t.fnRecordsDisplay(),c=-1===u,f=c?0:Math.ceil(a/u),h=c?1:Math.ceil(l/u),d=r(f,h);for(e=0,n=s.p.length;e<n;e++)ge(t,"pageButton")(t,s.p[e],e,d,f,h)}else r.fnUpdate(t,o)},sName:"pagination"})),a}function qt(t,e,n){var r=t._iDisplayStart,i=t._iDisplayLength,o=t.fnRecordsDisplay();0===o||-1===i?r=0:"number"==typeof e?(r=e*i)>o&&(r=0):"first"==e?r=0:"previous"==e?(r=i>=0?r-i:0)<0&&(r=0):"next"==e?r+i<o&&(r+=i):"last"==e?r=Math.floor((o-1)/i)*i:le(t,0,"Unknown paging action: "+e,5);var a=t._iDisplayStart!==r;return t._iDisplayStart=r,a&&(pe(t,null,"page",[t]),n&<(t)),a}function Bt(e){return t("<div/>",{id:e.aanFeatures.r?null:e.sTableId+"_processing",class:e.oClasses.sProcessing}).html(e.oLanguage.sProcessing).insertBefore(e.nTable)[0]}function zt(e,n){e.oFeatures.bProcessing&&t(e.aanFeatures.r).css("display",n?"block":"none"),pe(e,null,"processing",[e,n])}function Ht(e){var n=t(e.nTable),r=e.oScroll;if(""===r.sX&&""===r.sY)return e.nTable;var i=r.sX,o=r.sY,a=e.oClasses,s=n.children("caption"),u=s.length?s[0]._captionSide:null,l=t(n[0].cloneNode(!1)),c=t(n[0].cloneNode(!1)),f=n.children("tfoot"),h="<div/>",d=function(t){return t?Xt(t):null};f.length||(f=null);var p=t(h,{class:a.sScrollWrapper}).append(t(h,{class:a.sScrollHead}).css({overflow:"hidden",position:"relative",border:0,width:i?d(i):"100%"}).append(t(h,{class:a.sScrollHeadInner}).css({"box-sizing":"content-box",width:r.sXInner||"100%"}).append(l.removeAttr("id").css("margin-left",0).append("top"===u?s:null).append(n.children("thead"))))).append(t(h,{class:a.sScrollBody}).css({position:"relative",overflow:"auto",width:d(i)}).append(n));f&&p.append(t(h,{class:a.sScrollFoot}).css({overflow:"hidden",border:0,width:i?d(i):"100%"}).append(t(h,{class:a.sScrollFootInner}).append(c.removeAttr("id").css("margin-left",0).append("bottom"===u?s:null).append(n.children("tfoot")))));var m=p.children(),g=m[0],v=m[1],y=f?m[2]:null;return i&&t(v).on("scroll.DT",(function(t){var e=this.scrollLeft;g.scrollLeft=e,f&&(y.scrollLeft=e)})),t(v).css("max-height",o),r.bCollapse||t(v).css("height",o),e.nScrollHead=g,e.nScrollBody=v,e.nScrollFoot=y,e.aoDrawCallback.push({fn:Ut,sName:"scrolling"}),p[0]}function Ut(n){var i,o,a,s,u,l,c,f,h,d=n.oScroll,p=d.sX,m=d.sXInner,g=d.sY,v=d.iBarWidth,y=t(n.nScrollHead),b=y[0].style,w=y.children("div"),_=w[0].style,S=w.children("table"),O=n.nScrollBody,N=t(O),M=O.style,E=t(n.nScrollFoot).children("div"),k=E.children("table"),C=t(n.nTHead),T=t(n.nTable),D=T[0],A=D.style,j=n.nTFoot?t(n.nTFoot):null,P=n.oBrowser,I=P.bScrollOversize,R=(x(n.aoColumns,"nTh"),[]),L=[],B=[],z=[],H=function(t){var e=t.style;e.paddingTop="0",e.paddingBottom="0",e.borderTopWidth="0",e.borderBottomWidth="0",e.height=0},U=O.scrollHeight>O.clientHeight;if(n.scrollBarVis!==U&&n.scrollBarVis!==r)return n.scrollBarVis=U,void F(n);n.scrollBarVis=U,T.children("thead, tfoot").remove(),j&&(l=j.clone().prependTo(T),o=j.find("tr"),s=l.find("tr")),u=C.clone().prependTo(T),i=C.find("tr"),a=u.find("tr"),u.find("th, td").removeAttr("tabindex"),p||(M.width="100%",y[0].style.width="100%"),t.each(dt(n,u),(function(t,e){c=q(n,t),e.style.width=n.aoColumns[c].sWidth})),j&&Wt((function(t){t.style.width=""}),s),h=T.outerWidth(),""===p?(A.width="100%",I&&(T.find("tbody").height()>O.offsetHeight||"scroll"==N.css("overflow-y"))&&(A.width=Xt(T.outerWidth()-v)),h=T.outerWidth()):""!==m&&(A.width=Xt(m),h=T.outerWidth()),Wt(H,a),Wt((function(n){var r=e.getComputedStyle?e.getComputedStyle(n).width:Xt(t(n).width());B.push(n.innerHTML),R.push(r)}),a),Wt((function(t,e){t.style.width=R[e]}),i),t(a).height(0),j&&(Wt(H,s),Wt((function(e){z.push(e.innerHTML),L.push(Xt(t(e).css("width")))}),s),Wt((function(t,e){t.style.width=L[e]}),o),t(s).height(0)),Wt((function(t,e){t.innerHTML='<div class="dataTables_sizing">'+B[e]+"</div>",t.childNodes[0].style.height="0",t.childNodes[0].style.overflow="hidden",t.style.width=R[e]}),a),j&&Wt((function(t,e){t.innerHTML='<div class="dataTables_sizing">'+z[e]+"</div>",t.childNodes[0].style.height="0",t.childNodes[0].style.overflow="hidden",t.style.width=L[e]}),s),T.outerWidth()<h?(f=O.scrollHeight>O.offsetHeight||"scroll"==N.css("overflow-y")?h+v:h,I&&(O.scrollHeight>O.offsetHeight||"scroll"==N.css("overflow-y"))&&(A.width=Xt(f-v)),""!==p&&""===m||le(n,1,"Possible column misalignment",6)):f="100%",M.width=Xt(f),b.width=Xt(f),j&&(n.nScrollFoot.style.width=Xt(f)),g||I&&(M.height=Xt(D.offsetHeight+v));var W=T.outerWidth();S[0].style.width=Xt(W),_.width=Xt(W);var V=T.height()>O.clientHeight||"scroll"==N.css("overflow-y"),$="padding"+(P.bScrollbarLeft?"Left":"Right");_[$]=V?v+"px":"0px",j&&(k[0].style.width=Xt(W),E[0].style.width=Xt(W),E[0].style[$]=V?v+"px":"0px"),T.children("colgroup").insertBefore(T.children("thead")),N.trigger("scroll"),!n.bSorted&&!n.bFiltered||n._drawHold||(O.scrollTop=0)}function Wt(t,e,n){for(var r,i,o=0,a=0,s=e.length;a<s;){for(r=e[a].firstChild,i=n?n[a].firstChild:null;r;)1===r.nodeType&&(n?t(r,i,o):t(r,o),o++),r=r.nextSibling,i=n?i.nextSibling:null;a++}}var Vt=/<.*?>/g;function $t(n){var r,i,o,a=n.nTable,s=n.aoColumns,u=n.oScroll,l=u.sY,c=u.sX,f=u.sXInner,h=s.length,d=H(n,"bVisible"),p=t("th",n.nTHead),m=a.getAttribute("width"),g=a.parentNode,v=!1,y=n.oBrowser,b=y.bScrollOversize,x=a.style.width;for(x&&-1!==x.indexOf("%")&&(m=x),r=0;r<d.length;r++)null!==(i=s[d[r]]).sWidth&&(i.sWidth=Zt(i.sWidthOrig,g),v=!0);if(b||!v&&!c&&!l&&h==z(n)&&h==p.length)for(r=0;r<h;r++){var w=q(n,r);null!==w&&(s[w].sWidth=Xt(p.eq(r).width()))}else{var _=t(a).clone().css("visibility","hidden").removeAttr("id");_.find("tbody tr").remove();var S=t("<tr/>").appendTo(_.find("tbody"));for(_.find("thead, tfoot").remove(),_.append(t(n.nTHead).clone()).append(t(n.nTFoot).clone()),_.find("tfoot th, tfoot td").css("width",""),p=dt(n,_.find("thead")[0]),r=0;r<d.length;r++)i=s[d[r]],p[r].style.width=null!==i.sWidthOrig&&""!==i.sWidthOrig?Xt(i.sWidthOrig):"",i.sWidthOrig&&c&&t(p[r]).append(t("<div/>").css({width:i.sWidthOrig,margin:0,padding:0,border:0,height:1}));if(n.aoData.length)for(r=0;r<d.length;r++)i=s[o=d[r]],t(Gt(n,o)).clone(!1).append(i.sContentPadding).appendTo(S);t("[name]",_).removeAttr("name");var O=t("<div/>").css(c||l?{position:"absolute",top:0,left:0,height:1,right:0,overflow:"hidden"}:{}).append(_).appendTo(g);c&&f?_.width(f):c?(_.css("width","auto"),_.removeAttr("width"),_.width()<g.clientWidth&&m&&_.width(g.clientWidth)):l?_.width(g.clientWidth):m&&_.width(m);var N=0;for(r=0;r<d.length;r++){var M=t(p[r]),E=M.outerWidth()-M.width(),k=y.bBounding?Math.ceil(p[r].getBoundingClientRect().width):M.outerWidth();N+=k,s[d[r]].sWidth=Xt(k-E)}a.style.width=Xt(N),O.remove()}if(m&&(a.style.width=Xt(m)),(m||c)&&!n._reszEvt){var C=function(){t(e).on("resize.DT-"+n.sInstance,Yt((function(){F(n)})))};b?setTimeout(C,1e3):C(),n._reszEvt=!0}}var Yt=u.util.throttle;function Zt(e,r){if(!e)return 0;var i=t("<div/>").css("width",Xt(e)).appendTo(r||n.body),o=i[0].offsetWidth;return i.remove(),o}function Gt(e,n){var r=Kt(e,n);if(r<0)return null;var i=e.aoData[r];return i.nTr?i.anCells[n]:t("<td/>").html(Y(e,r,n,"display"))[0]}function Kt(t,e){for(var n,r=-1,i=-1,o=0,a=t.aoData.length;o<a;o++)(n=(n=(n=Y(t,o,e,"display")+"").replace(Vt,"")).replace(/ /g," ")).length>r&&(r=n.length,i=o);return i}function Xt(t){return null===t?"0px":"number"==typeof t?t<0?"0px":t+"px":t.match(/\d$/)?t+"px":t}function Jt(e){var n,i,o,a,s,l,c,f=[],h=e.aoColumns,d=e.aaSortingFixed,p=t.isPlainObject(d),m=[],g=function(e){e.length&&!Array.isArray(e[0])?m.push(e):t.merge(m,e)};for(Array.isArray(d)&&g(d),p&&d.pre&&g(d.pre),g(e.aaSorting),p&&d.post&&g(d.post),n=0;n<m.length;n++)for(i=0,o=(a=h[c=m[n][0]].aDataSort).length;i<o;i++)l=h[s=a[i]].sType||"string",m[n]._idx===r&&(m[n]._idx=t.inArray(m[n][1],h[s].asSorting)),f.push({src:c,col:s,dir:m[n][1],index:m[n]._idx,type:l,formatter:u.ext.type.order[l+"-pre"]});return f}function Qt(t){var e,n,r,i,o,a=[],s=u.ext.type.order,l=t.aoData,c=(t.aoColumns,0),f=t.aiDisplayMaster;for(U(t),e=0,n=(o=Jt(t)).length;e<n;e++)(i=o[e]).formatter&&c++,ie(t,i.col);if("ssp"!=ve(t)&&0!==o.length){for(e=0,r=f.length;e<r;e++)a[f[e]]=e;c===o.length?f.sort((function(t,e){var n,r,i,s,u,c=o.length,f=l[t]._aSortData,h=l[e]._aSortData;for(i=0;i<c;i++)if(0!=(s=(n=f[(u=o[i]).col])<(r=h[u.col])?-1:n>r?1:0))return"asc"===u.dir?s:-s;return(n=a[t])<(r=a[e])?-1:n>r?1:0})):f.sort((function(t,e){var n,r,i,u,c,f=o.length,h=l[t]._aSortData,d=l[e]._aSortData;for(i=0;i<f;i++)if(n=h[(c=o[i]).col],r=d[c.col],0!==(u=(s[c.type+"-"+c.dir]||s["string-"+c.dir])(n,r)))return u;return(n=a[t])<(r=a[e])?-1:n>r?1:0}))}t.bSorted=!0}function te(t){for(var e,n,r=t.aoColumns,i=Jt(t),o=t.oLanguage.oAria,a=0,s=r.length;a<s;a++){var u=r[a],l=u.asSorting,c=u.ariaTitle||u.sTitle.replace(/<.*?>/g,""),f=u.nTh;f.removeAttribute("aria-sort"),u.bSortable?(i.length>0&&i[0].col==a?(f.setAttribute("aria-sort","asc"==i[0].dir?"ascending":"descending"),n=l[i[0].index+1]||l[0]):n=l[0],e=c+("asc"===n?o.sSortAscending:o.sSortDescending)):e=c,f.setAttribute("aria-label",e)}}function ee(e,n,i,o){var a,s=e.aoColumns[n],u=e.aaSorting,l=s.asSorting,c=function(e,n){var i=e._idx;return i===r&&(i=t.inArray(e[1],l)),i+1<l.length?i+1:n?null:0};if("number"==typeof u[0]&&(u=e.aaSorting=[u]),i&&e.oFeatures.bSortMulti){var f=t.inArray(n,x(u,"0"));-1!==f?(null===(a=c(u[f],!0))&&1===u.length&&(a=0),null===a?u.splice(f,1):(u[f][1]=l[a],u[f]._idx=a)):(u.push([n,l[0],0]),u[u.length-1]._idx=0)}else u.length&&u[0][0]==n?(a=c(u[0]),u.length=1,u[0][1]=l[a],u[0]._idx=a):(u.length=0,u.push([n,l[0]]),u[0]._idx=0);ct(e),"function"==typeof o&&o(e)}function ne(t,e,n,r){var i=t.aoColumns[n];he(e,{},(function(e){!1!==i.bSortable&&(t.oFeatures.bProcessing?(zt(t,!0),setTimeout((function(){ee(t,n,e.shiftKey,r),"ssp"!==ve(t)&&zt(t,!1)}),0)):ee(t,n,e.shiftKey,r))}))}function re(e){var n,r,i,o=e.aLastSort,a=e.oClasses.sSortColumn,s=Jt(e),u=e.oFeatures;if(u.bSort&&u.bSortClasses){for(n=0,r=o.length;n<r;n++)i=o[n].src,t(x(e.aoData,"anCells",i)).removeClass(a+(n<2?n+1:3));for(n=0,r=s.length;n<r;n++)i=s[n].src,t(x(e.aoData,"anCells",i)).addClass(a+(n<2?n+1:3))}e.aLastSort=s}function ie(t,e){var n,r,i,o=t.aoColumns[e],a=u.ext.order[o.sSortDataType];a&&(n=a.call(t.oInstance,t,e,B(t,e)));for(var s=u.ext.type.order[o.sType+"-pre"],l=0,c=t.aoData.length;l<c;l++)(r=t.aoData[l])._aSortData||(r._aSortData=[]),r._aSortData[e]&&!a||(i=a?n[l]:Y(t,l,e,"sort"),r._aSortData[e]=s?s(i):i)}function oe(e){if(!e._bLoadingState){var n={time:+new Date,start:e._iDisplayStart,length:e._iDisplayLength,order:t.extend(!0,[],e.aaSorting),search:Ct(e.oPreviousSearch),columns:t.map(e.aoColumns,(function(t,n){return{visible:t.bVisible,search:Ct(e.aoPreSearchCols[n])}}))};e.oSavedState=n,pe(e,"aoStateSaveParams","stateSaveParams",[e,n]),e.oFeatures.bStateSave&&!e.bDestroying&&e.fnStateSaveCallback.call(e.oInstance,e,n)}}function ae(t,e,n){if(t.oFeatures.bStateSave){var i=t.fnStateLoadCallback.call(t.oInstance,t,(function(e){se(t,e,n)}));return i!==r&&se(t,i,n),!0}n()}function se(e,n,i){var o,a,s=e.aoColumns;e._bLoadingState=!0;var l=e._bInitComplete?new u.Api(e):null;if(!n||!n.time)return e._bLoadingState=!1,void i();var c=pe(e,"aoStateLoadParams","stateLoadParams",[e,n]);if(-1!==t.inArray(!1,c))return e._bLoadingState=!1,void i();var f=e.iStateDuration;if(f>0&&n.time<+new Date-1e3*f)return e._bLoadingState=!1,void i();if(n.columns&&s.length!==n.columns.length)return e._bLoadingState=!1,void i();if(e.oLoadedState=t.extend(!0,{},n),n.start!==r&&(e._iDisplayStart=n.start,null===l&&(e.iInitDisplayStart=n.start)),n.length!==r&&(e._iDisplayLength=n.length),n.order!==r&&(e.aaSorting=[],t.each(n.order,(function(t,n){e.aaSorting.push(n[0]>=s.length?[0,n[1]]:n)}))),n.search!==r&&t.extend(e.oPreviousSearch,Tt(n.search)),n.columns){for(o=0,a=n.columns.length;o<a;o++){var h=n.columns[o];h.visible!==r&&(l?l.column(o).visible(h.visible,!1):s[o].bVisible=h.visible),h.search!==r&&t.extend(e.aoPreSearchCols[o],Tt(h.search))}l&&l.columns.adjust()}e._bLoadingState=!1,pe(e,"aoStateLoaded","stateLoaded",[e,n]),i()}function ue(e){var n=u.settings,r=t.inArray(e,x(n,"nTable"));return-1!==r?n[r]:null}function le(t,n,r,i){if(r="DataTables warning: "+(t?"table id="+t.sTableId+" - ":"")+r,i&&(r+=". For more information about this error, please see http://datatables.net/tn/"+i),n)e.console&&console.log&&console.log(r);else{var o=u.ext,a=o.sErrMode||o.errMode;if(t&&pe(t,null,"error",[t,i,r]),"alert"==a)alert(r);else{if("throw"==a)throw new Error(r);"function"==typeof a&&a(t,i,r)}}}function ce(e,n,i,o){Array.isArray(i)?t.each(i,(function(t,r){Array.isArray(r)?ce(e,n,r[0],r[1]):ce(e,n,r)})):(o===r&&(o=i),n[i]!==r&&(e[o]=n[i]))}function fe(e,n,r){var i;for(var o in n)n.hasOwnProperty(o)&&(i=n[o],t.isPlainObject(i)?(t.isPlainObject(e[o])||(e[o]={}),t.extend(!0,e[o],i)):r&&"data"!==o&&"aaData"!==o&&Array.isArray(i)?e[o]=i.slice():e[o]=i);return e}function he(e,n,r){t(e).on("click.DT",n,(function(n){t(e).trigger("blur"),r(n)})).on("keypress.DT",n,(function(t){13===t.which&&(t.preventDefault(),r(t))})).on("selectstart.DT",(function(){return!1}))}function de(t,e,n,r){n&&t[e].push({fn:n,sName:r})}function pe(e,n,r,i){var o=[];if(n&&(o=t.map(e[n].slice().reverse(),(function(t,n){return t.fn.apply(e.oInstance,i)}))),null!==r){var a=t.Event(r+".dt");t(e.nTable).trigger(a,i),o.push(a.result)}return o}function me(t){var e=t._iDisplayStart,n=t.fnDisplayEnd(),r=t._iDisplayLength;e>=n&&(e=n-r),e-=e%r,(-1===r||e<0)&&(e=0),t._iDisplayStart=e}function ge(e,n){var r=e.renderer,i=u.ext.renderer[n];return t.isPlainObject(r)&&r[n]?i[r[n]]||i._:"string"==typeof r&&i[r]||i._}function ve(t){return t.oFeatures.bServerSide?"ssp":t.ajax||t.sAjaxSource?"ajax":"dom"}var ye=[],be=Array.prototype;o=function(e,n){if(!(this instanceof o))return new o(e,n);var r=[],i=function(e){var n=function(e){var n,r,i=u.settings,o=t.map(i,(function(t,e){return t.nTable}));return e?e.nTable&&e.oApi?[e]:e.nodeName&&"table"===e.nodeName.toLowerCase()?-1!==(n=t.inArray(e,o))?[i[n]]:null:e&&"function"==typeof e.settings?e.settings().toArray():("string"==typeof e?r=t(e):e instanceof t&&(r=e),r?r.map((function(e){return-1!==(n=t.inArray(this,o))?i[n]:null})).toArray():void 0):[]}(e);n&&r.push.apply(r,n)};if(Array.isArray(e))for(var a=0,s=e.length;a<s;a++)i(e[a]);else i(e);this.context=N(r),n&&t.merge(this,n),this.selector={rows:null,cols:null,opts:null},o.extend(this,this,ye)},u.Api=o,t.extend(o.prototype,{any:function(){return 0!==this.count()},concat:be.concat,context:[],count:function(){return this.flatten().length},each:function(t){for(var e=0,n=this.length;e<n;e++)t.call(this,this[e],e,this);return this},eq:function(t){var e=this.context;return e.length>t?new o(e[t],this[t]):null},filter:function(t){var e=[];if(be.filter)e=be.filter.call(this,t,this);else for(var n=0,r=this.length;n<r;n++)t.call(this,this[n],n,this)&&e.push(this[n]);return new o(this.context,e)},flatten:function(){var t=[];return new o(this.context,t.concat.apply(t,this.toArray()))},join:be.join,indexOf:be.indexOf||function(t,e){for(var n=e||0,r=this.length;n<r;n++)if(this[n]===t)return n;return-1},iterator:function(t,e,n,i){var a,s,u,l,c,f,h,d,p=[],m=this.context,g=this.selector;for("string"==typeof t&&(i=n,n=e,e=t,t=!1),s=0,u=m.length;s<u;s++){var v=new o(m[s]);if("table"===e)(a=n.call(v,m[s],s))!==r&&p.push(a);else if("columns"===e||"rows"===e)(a=n.call(v,m[s],this[s],s))!==r&&p.push(a);else if("column"===e||"column-rows"===e||"row"===e||"cell"===e)for(h=this[s],"column-rows"===e&&(f=Ne(m[s],g.opts)),l=0,c=h.length;l<c;l++)d=h[l],(a="cell"===e?n.call(v,m[s],d.row,d.column,s,l):n.call(v,m[s],d,s,l,f))!==r&&p.push(a)}if(p.length||i){var y=new o(m,t?p.concat.apply([],p):p),b=y.selector;return b.rows=g.rows,b.cols=g.cols,b.opts=g.opts,y}return this},lastIndexOf:be.lastIndexOf||function(t,e){return this.indexOf.apply(this.toArray.reverse(),arguments)},length:0,map:function(t){var e=[];if(be.map)e=be.map.call(this,t,this);else for(var n=0,r=this.length;n<r;n++)e.push(t.call(this,this[n],n));return new o(this.context,e)},pluck:function(t){return this.map((function(e){return e[t]}))},pop:be.pop,push:be.push,reduce:be.reduce||function(t,e){return I(this,t,e,0,this.length,1)},reduceRight:be.reduceRight||function(t,e){return I(this,t,e,this.length-1,-1,-1)},reverse:be.reverse,selector:null,shift:be.shift,slice:function(){return new o(this.context,this)},sort:be.sort,splice:be.splice,toArray:function(){return be.slice.call(this)},to$:function(){return t(this)},toJQuery:function(){return t(this)},unique:function(){return new o(this.context,N(this))},unshift:be.unshift}),o.extend=function(t,e,n){if(n.length&&e&&(e instanceof o||e.__dt_wrapper)){var r,i,a,s=function(t,e,n){return function(){var r=e.apply(t,arguments);return o.extend(r,r,n.methodExt),r}};for(r=0,i=n.length;r<i;r++)e[(a=n[r]).name]="function"===a.type?s(t,a.val,a):"object"===a.type?{}:a.val,e[a.name].__dt_wrapper=!0,o.extend(t,e[a.name],a.propExt)}},o.register=a=function(e,n){if(Array.isArray(e))for(var r=0,i=e.length;r<i;r++)o.register(e[r],n);else{var a,s,u,l,c=e.split("."),f=ye,h=function(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n].name===e)return t[n];return null};for(a=0,s=c.length;a<s;a++){var d=h(f,u=(l=-1!==c[a].indexOf("()"))?c[a].replace("()",""):c[a]);d||(d={name:u,val:{},methodExt:[],propExt:[],type:"object"},f.push(d)),a===s-1?(d.val=n,d.type="function"==typeof n?"function":t.isPlainObject(n)?"object":"other"):f=l?d.methodExt:d.propExt}}},o.registerPlural=s=function(t,e,n){o.register(t,n),o.register(e,(function(){var t=n.apply(this,arguments);return t===this?this:t instanceof o?t.length?Array.isArray(t[0])?new o(t.context,t[0]):t[0]:r:t}))};var xe=function(e,n){if(Array.isArray(e))return t.map(e,(function(t){return xe(t,n)}));if("number"==typeof e)return[n[e]];var r=t.map(n,(function(t,e){return t.nTable}));return t(r).filter(e).map((function(e){var i=t.inArray(this,r);return n[i]})).toArray()};a("tables()",(function(t){return t!==r&&null!==t?new o(xe(t,this.context)):this})),a("table()",(function(t){var e=this.tables(t),n=e.context;return n.length?new o(n[0]):e})),s("tables().nodes()","table().node()",(function(){return this.iterator("table",(function(t){return t.nTable}),1)})),s("tables().body()","table().body()",(function(){return this.iterator("table",(function(t){return t.nTBody}),1)})),s("tables().header()","table().header()",(function(){return this.iterator("table",(function(t){return t.nTHead}),1)})),s("tables().footer()","table().footer()",(function(){return this.iterator("table",(function(t){return t.nTFoot}),1)})),s("tables().containers()","table().container()",(function(){return this.iterator("table",(function(t){return t.nTableWrapper}),1)})),a("draw()",(function(t){return this.iterator("table",(function(e){"page"===t?lt(e):("string"==typeof t&&(t="full-hold"!==t),ct(e,!1===t))}))})),a("page()",(function(t){return t===r?this.page.info().page:this.iterator("table",(function(e){qt(e,t)}))})),a("page.info()",(function(t){if(0===this.context.length)return r;var e=this.context[0],n=e._iDisplayStart,i=e.oFeatures.bPaginate?e._iDisplayLength:-1,o=e.fnRecordsDisplay(),a=-1===i;return{page:a?0:Math.floor(n/i),pages:a?1:Math.ceil(o/i),start:n,end:e.fnDisplayEnd(),length:i,recordsTotal:e.fnRecordsTotal(),recordsDisplay:o,serverSide:"ssp"===ve(e)}})),a("page.len()",(function(t){return t===r?0!==this.context.length?this.context[0]._iDisplayLength:r:this.iterator("table",(function(e){Rt(e,t)}))}));var we=function(t,e,n){if(n){var r=new o(t);r.one("draw",(function(){n(r.ajax.json())}))}if("ssp"==ve(t))ct(t,e);else{zt(t,!0);var i=t.jqXHR;i&&4!==i.readyState&&i.abort(),pt(t,[],(function(n){et(t);for(var r=yt(t,n),i=0,o=r.length;i<o;i++)V(t,r[i]);ct(t,e),zt(t,!1)}))}};a("ajax.json()",(function(){var t=this.context;if(t.length>0)return t[0].json})),a("ajax.params()",(function(){var t=this.context;if(t.length>0)return t[0].oAjaxData})),a("ajax.reload()",(function(t,e){return this.iterator("table",(function(n){we(n,!1===e,t)}))})),a("ajax.url()",(function(e){var n=this.context;return e===r?0===n.length?r:(n=n[0]).ajax?t.isPlainObject(n.ajax)?n.ajax.url:n.ajax:n.sAjaxSource:this.iterator("table",(function(n){t.isPlainObject(n.ajax)?n.ajax.url=e:n.ajax=e}))})),a("ajax.url().load()",(function(t,e){return this.iterator("table",(function(n){we(n,!1===e,t)}))}));var _e=function(t,e,n,o,a){var s,u,l,c,f,h,d=[],p=typeof e;for(e&&"string"!==p&&"function"!==p&&e.length!==r||(e=[e]),l=0,c=e.length;l<c;l++)for(f=0,h=(u=e[l]&&e[l].split&&!e[l].match(/[\[\(:]/)?e[l].split(","):[e[l]]).length;f<h;f++)(s=n("string"==typeof u[f]?u[f].trim():u[f]))&&s.length&&(d=d.concat(s));var m=i.selector[t];if(m.length)for(l=0,c=m.length;l<c;l++)d=m[l](o,a,d);return N(d)},Se=function(e){return e||(e={}),e.filter&&e.search===r&&(e.search=e.filter),t.extend({search:"none",order:"current",page:"all"},e)},Oe=function(t){for(var e=0,n=t.length;e<n;e++)if(t[e].length>0)return t[0]=t[e],t[0].length=1,t.length=1,t.context=[t.context[e]],t;return t.length=0,t},Ne=function(e,n){var r,i=[],o=e.aiDisplay,a=e.aiDisplayMaster,s=n.search,u=n.order,l=n.page;if("ssp"==ve(e))return"removed"===s?[]:_(0,a.length);if("current"==l)for(f=e._iDisplayStart,h=e.fnDisplayEnd();f<h;f++)i.push(o[f]);else if("current"==u||"applied"==u){if("none"==s)i=a.slice();else if("applied"==s)i=o.slice();else if("removed"==s){for(var c={},f=0,h=o.length;f<h;f++)c[o[f]]=null;i=t.map(a,(function(t){return c.hasOwnProperty(t)?null:t}))}}else if("index"==u||"original"==u)for(f=0,h=e.aoData.length;f<h;f++)("none"==s||-1===(r=t.inArray(f,o))&&"removed"==s||r>=0&&"applied"==s)&&i.push(f);return i};a("rows()",(function(e,n){e===r?e="":t.isPlainObject(e)&&(n=e,e=""),n=Se(n);var i=this.iterator("table",(function(i){return function(e,n,i){var o;return _e("row",n,(function(n){var a=g(n),s=e.aoData;if(null!==a&&!i)return[a];if(o||(o=Ne(e,i)),null!==a&&-1!==t.inArray(a,o))return[a];if(null===n||n===r||""===n)return o;if("function"==typeof n)return t.map(o,(function(t){var e=s[t];return n(t,e._aData,e.nTr)?t:null}));if(n.nodeName){var u=n._DT_RowIndex,l=n._DT_CellIndex;if(u!==r)return s[u]&&s[u].nTr===n?[u]:[];if(l)return s[l.row]&&s[l.row].nTr===n.parentNode?[l.row]:[];var c=t(n).closest("*[data-dt-row]");return c.length?[c.data("dt-row")]:[]}if("string"==typeof n&&"#"===n.charAt(0)){var f=e.aIds[n.replace(/^#/,"")];if(f!==r)return[f.idx]}var h=S(w(e.aoData,o,"nTr"));return t(h).filter(n).map((function(){return this._DT_RowIndex})).toArray()}),e,i)}(i,e,n)}),1);return i.selector.rows=e,i.selector.opts=n,i})),a("rows().nodes()",(function(){return this.iterator("row",(function(t,e){return t.aoData[e].nTr||r}),1)})),a("rows().data()",(function(){return this.iterator(!0,"rows",(function(t,e){return w(t.aoData,e,"_aData")}),1)})),s("rows().cache()","row().cache()",(function(t){return this.iterator("row",(function(e,n){var r=e.aoData[n];return"search"===t?r._aFilterData:r._aSortData}),1)})),s("rows().invalidate()","row().invalidate()",(function(t){return this.iterator("row",(function(e,n){rt(e,n,t)}))})),s("rows().indexes()","row().index()",(function(){return this.iterator("row",(function(t,e){return e}),1)})),s("rows().ids()","row().id()",(function(t){for(var e=[],n=this.context,r=0,i=n.length;r<i;r++)for(var a=0,s=this[r].length;a<s;a++){var u=n[r].rowIdFn(n[r].aoData[this[r][a]]._aData);e.push((!0===t?"#":"")+u)}return new o(n,e)})),s("rows().remove()","row().remove()",(function(){var t=this;return this.iterator("row",(function(e,n,i){var o,a,s,u,l,c,f=e.aoData,h=f[n];for(f.splice(n,1),o=0,a=f.length;o<a;o++)if(c=(l=f[o]).anCells,null!==l.nTr&&(l.nTr._DT_RowIndex=o),null!==c)for(s=0,u=c.length;s<u;s++)c[s]._DT_CellIndex.row=o;nt(e.aiDisplayMaster,n),nt(e.aiDisplay,n),nt(t[i],n,!1),e._iRecordsDisplay>0&&e._iRecordsDisplay--,me(e);var d=e.rowIdFn(h._aData);d!==r&&delete e.aIds[d]})),this.iterator("table",(function(t){for(var e=0,n=t.aoData.length;e<n;e++)t.aoData[e].idx=e})),this})),a("rows.add()",(function(e){var n=this.iterator("table",(function(t){var n,r,i,o=[];for(r=0,i=e.length;r<i;r++)(n=e[r]).nodeName&&"TR"===n.nodeName.toUpperCase()?o.push($(t,n)[0]):o.push(V(t,n));return o}),1),r=this.rows(-1);return r.pop(),t.merge(r,n),r})),a("row()",(function(t,e){return Oe(this.rows(t,e))})),a("row().data()",(function(t){var e=this.context;if(t===r)return e.length&&this.length?e[0].aoData[this[0]]._aData:r;var n=e[0].aoData[this[0]];return n._aData=t,Array.isArray(t)&&n.nTr&&n.nTr.id&&Q(e[0].rowId)(t,n.nTr.id),rt(e[0],this[0],"data"),this})),a("row().node()",(function(){var t=this.context;return t.length&&this.length&&t[0].aoData[this[0]].nTr||null})),a("row.add()",(function(e){e instanceof t&&e.length&&(e=e[0]);var n=this.iterator("table",(function(t){return e.nodeName&&"TR"===e.nodeName.toUpperCase()?$(t,e)[0]:V(t,e)}));return this.row(n[0])})),t(n).on("plugin-init.dt",(function(t,e){var n=new o(e);n.on("stateSaveParams",(function(t,e,i){var o=n.rows().iterator("row",(function(t,e){return t.aoData[e]._detailsShow?e:r}));i.childRows=n.rows(o).ids(!0).toArray()}));var i=n.state.loaded();i&&i.childRows&&n.rows(i.childRows).every((function(){pe(e,null,"requestChild",[this])}))}));var Me=function(e,n){var i=e.context;if(i.length){var o=i[0].aoData[n!==r?n:e[0]];o&&o._details&&(o._details.remove(),o._detailsShow=r,o._details=r,t(o.nTr).removeClass("dt-hasChild"),oe(i[0]))}},Ee=function(e,n){var r=e.context;if(r.length&&e.length){var i=r[0].aoData[e[0]];i._details&&(i._detailsShow=n,n?(i._details.insertAfter(i.nTr),t(i.nTr).addClass("dt-hasChild")):(i._details.detach(),t(i.nTr).removeClass("dt-hasChild")),pe(r[0],null,"childRow",[n,e.row(e[0])]),ke(r[0]),oe(r[0]))}},ke=function(t){var e=new o(t),n=".dt.DT_details",r="draw"+n,i="column-visibility"+n,a="destroy"+n,s=t.aoData;e.off(r+" "+i+" "+a),x(s,"_details").length>0&&(e.on(r,(function(n,r){t===r&&e.rows({page:"current"}).eq(0).each((function(t){var e=s[t];e._detailsShow&&e._details.insertAfter(e.nTr)}))})),e.on(i,(function(e,n,r,i){if(t===n)for(var o,a=z(n),u=0,l=s.length;u<l;u++)(o=s[u])._details&&o._details.children("td[colspan]").attr("colspan",a)})),e.on(a,(function(n,r){if(t===r)for(var i=0,o=s.length;i<o;i++)s[i]._details&&Me(e,i)})))},Ce="row().child",Te=Ce+"()";a(Te,(function(e,n){var i=this.context;return e===r?i.length&&this.length?i[0].aoData[this[0]]._details:r:(!0===e?this.child.show():!1===e?Me(this):i.length&&this.length&&function(e,n,r,i){var o=[],a=function(n,r){if(Array.isArray(n)||n instanceof t)for(var i=0,s=n.length;i<s;i++)a(n[i],r);else if(n.nodeName&&"tr"===n.nodeName.toLowerCase())o.push(n);else{var u=t("<tr><td></td></tr>").addClass(r);t("td",u).addClass(r).html(n)[0].colSpan=z(e),o.push(u[0])}};a(r,i),n._details&&n._details.detach(),n._details=t(o),n._detailsShow&&n._details.insertAfter(n.nTr)}(i[0],i[0].aoData[this[0]],e,n),this)})),a([Ce+".show()",Te+".show()"],(function(t){return Ee(this,!0),this})),a([Ce+".hide()",Te+".hide()"],(function(){return Ee(this,!1),this})),a([Ce+".remove()",Te+".remove()"],(function(){return Me(this),this})),a(Ce+".isShown()",(function(){var t=this.context;return t.length&&this.length&&t[0].aoData[this[0]]._detailsShow||!1}));var De=/^([^:]+):(name|visIdx|visible)$/,Ae=function(t,e,n,r,i){for(var o=[],a=0,s=i.length;a<s;a++)o.push(Y(t,i[a],e));return o};a("columns()",(function(e,n){e===r?e="":t.isPlainObject(e)&&(n=e,e=""),n=Se(n);var i=this.iterator("table",(function(r){return function(e,n,r){var i=e.aoColumns,o=x(i,"sName"),a=x(i,"nTh");return _e("column",n,(function(n){var s=g(n);if(""===n)return _(i.length);if(null!==s)return[s>=0?s:i.length+s];if("function"==typeof n){var u=Ne(e,r);return t.map(i,(function(t,r){return n(r,Ae(e,r,0,0,u),a[r])?r:null}))}var l="string"==typeof n?n.match(De):"";if(l)switch(l[2]){case"visIdx":case"visible":var c=parseInt(l[1],10);if(c<0){var f=t.map(i,(function(t,e){return t.bVisible?e:null}));return[f[f.length+c]]}return[q(e,c)];case"name":return t.map(o,(function(t,e){return t===l[1]?e:null}));default:return[]}if(n.nodeName&&n._DT_CellIndex)return[n._DT_CellIndex.column];var h=t(a).filter(n).map((function(){return t.inArray(this,a)})).toArray();if(h.length||!n.nodeName)return h;var d=t(n).closest("*[data-dt-column]");return d.length?[d.data("dt-column")]:[]}),e,r)}(r,e,n)}),1);return i.selector.cols=e,i.selector.opts=n,i})),s("columns().header()","column().header()",(function(t,e){return this.iterator("column",(function(t,e){return t.aoColumns[e].nTh}),1)})),s("columns().footer()","column().footer()",(function(t,e){return this.iterator("column",(function(t,e){return t.aoColumns[e].nTf}),1)})),s("columns().data()","column().data()",(function(){return this.iterator("column-rows",Ae,1)})),s("columns().dataSrc()","column().dataSrc()",(function(){return this.iterator("column",(function(t,e){return t.aoColumns[e].mData}),1)})),s("columns().cache()","column().cache()",(function(t){return this.iterator("column-rows",(function(e,n,r,i,o){return w(e.aoData,o,"search"===t?"_aFilterData":"_aSortData",n)}),1)})),s("columns().nodes()","column().nodes()",(function(){return this.iterator("column-rows",(function(t,e,n,r,i){return w(t.aoData,i,"anCells",e)}),1)})),s("columns().visible()","column().visible()",(function(e,n){var i=this,o=this.iterator("column",(function(n,i){if(e===r)return n.aoColumns[i].bVisible;!function(e,n,i){var o,a,s,u,l=e.aoColumns,c=l[n],f=e.aoData;if(i===r)return c.bVisible;if(c.bVisible!==i){if(i){var h=t.inArray(!0,x(l,"bVisible"),n+1);for(a=0,s=f.length;a<s;a++)u=f[a].nTr,o=f[a].anCells,u&&u.insertBefore(o[n],o[h]||null)}else t(x(e.aoData,"anCells",n)).detach();c.bVisible=i}}(n,i,e)}));return e!==r&&this.iterator("table",(function(o){ut(o,o.aoHeader),ut(o,o.aoFooter),o.aiDisplay.length||t(o.nTBody).find("td[colspan]").attr("colspan",z(o)),oe(o),i.iterator("column",(function(t,r){pe(t,null,"column-visibility",[t,r,e,n])})),(n===r||n)&&i.columns.adjust()})),o})),s("columns().indexes()","column().index()",(function(t){return this.iterator("column",(function(e,n){return"visible"===t?B(e,n):n}),1)})),a("columns.adjust()",(function(){return this.iterator("table",(function(t){F(t)}),1)})),a("column.index()",(function(t,e){if(0!==this.context.length){var n=this.context[0];if("fromVisible"===t||"toData"===t)return q(n,e);if("fromData"===t||"toVisible"===t)return B(n,e)}})),a("column()",(function(t,e){return Oe(this.columns(t,e))}));a("cells()",(function(e,n,i){if(t.isPlainObject(e)&&(e.row===r?(i=e,e=null):(i=n,n=null)),t.isPlainObject(n)&&(i=n,n=null),null===n||n===r)return this.iterator("table",(function(n){return function(e,n,i){var o,a,s,u,l,c,f,h=e.aoData,d=Ne(e,i),p=S(w(h,d,"anCells")),m=t(M([],p)),g=e.aoColumns.length;return _e("cell",n,(function(n){var i="function"==typeof n;if(null===n||n===r||i){for(a=[],s=0,u=d.length;s<u;s++)for(o=d[s],l=0;l<g;l++)c={row:o,column:l},i?(f=h[o],n(c,Y(e,o,l),f.anCells?f.anCells[l]:null)&&a.push(c)):a.push(c);return a}if(t.isPlainObject(n))return n.column!==r&&n.row!==r&&-1!==t.inArray(n.row,d)?[n]:[];var p=m.filter(n).map((function(t,e){return{row:e._DT_CellIndex.row,column:e._DT_CellIndex.column}})).toArray();return p.length||!n.nodeName?p:(f=t(n).closest("*[data-dt-row]")).length?[{row:f.data("dt-row"),column:f.data("dt-column")}]:[]}),e,i)}(n,e,Se(i))}));var o,a,s,u,l=i?{page:i.page,order:i.order,search:i.search}:{},c=this.columns(n,l),f=this.rows(e,l),h=this.iterator("table",(function(t,e){var n=[];for(o=0,a=f[e].length;o<a;o++)for(s=0,u=c[e].length;s<u;s++)n.push({row:f[e][o],column:c[e][s]});return n}),1),d=i&&i.selected?this.cells(h,i):h;return t.extend(d.selector,{cols:n,rows:e,opts:i}),d})),s("cells().nodes()","cell().node()",(function(){return this.iterator("cell",(function(t,e,n){var i=t.aoData[e];return i&&i.anCells?i.anCells[n]:r}),1)})),a("cells().data()",(function(){return this.iterator("cell",(function(t,e,n){return Y(t,e,n)}),1)})),s("cells().cache()","cell().cache()",(function(t){return t="search"===t?"_aFilterData":"_aSortData",this.iterator("cell",(function(e,n,r){return e.aoData[n][t][r]}),1)})),s("cells().render()","cell().render()",(function(t){return this.iterator("cell",(function(e,n,r){return Y(e,n,r,t)}),1)})),s("cells().indexes()","cell().index()",(function(){return this.iterator("cell",(function(t,e,n){return{row:e,column:n,columnVisible:B(t,n)}}),1)})),s("cells().invalidate()","cell().invalidate()",(function(t){return this.iterator("cell",(function(e,n,r){rt(e,n,t,r)}))})),a("cell()",(function(t,e,n){return Oe(this.cells(t,e,n))})),a("cell().data()",(function(t){var e=this.context,n=this[0];return t===r?e.length&&n.length?Y(e[0],n[0].row,n[0].column):r:(Z(e[0],n[0].row,n[0].column,t),rt(e[0],n[0].row,"data",n[0].column),this)})),a("order()",(function(t,e){var n=this.context;return t===r?0!==n.length?n[0].aaSorting:r:("number"==typeof t?t=[[t,e]]:t.length&&!Array.isArray(t[0])&&(t=Array.prototype.slice.call(arguments)),this.iterator("table",(function(e){e.aaSorting=t.slice()})))})),a("order.listener()",(function(t,e,n){return this.iterator("table",(function(r){ne(r,t,e,n)}))})),a("order.fixed()",(function(e){if(!e){var n=this.context,i=n.length?n[0].aaSortingFixed:r;return Array.isArray(i)?{pre:i}:i}return this.iterator("table",(function(n){n.aaSortingFixed=t.extend(!0,{},e)}))})),a(["columns().order()","column().order()"],(function(e){var n=this;return this.iterator("table",(function(r,i){var o=[];t.each(n[i],(function(t,n){o.push([n,e])})),r.aaSorting=o}))})),a("search()",(function(e,n,i,o){var a=this.context;return e===r?0!==a.length?a[0].oPreviousSearch.sSearch:r:this.iterator("table",(function(r){r.oFeatures.bFilter&&xt(r,t.extend({},r.oPreviousSearch,{sSearch:e+"",bRegex:null!==n&&n,bSmart:null===i||i,bCaseInsensitive:null===o||o}),1)}))})),s("columns().search()","column().search()",(function(e,n,i,o){return this.iterator("column",(function(a,s){var u=a.aoPreSearchCols;if(e===r)return u[s].sSearch;a.oFeatures.bFilter&&(t.extend(u[s],{sSearch:e+"",bRegex:null!==n&&n,bSmart:null===i||i,bCaseInsensitive:null===o||o}),xt(a,a.oPreviousSearch,1))}))})),a("state()",(function(){return this.context.length?this.context[0].oSavedState:null})),a("state.clear()",(function(){return this.iterator("table",(function(t){t.fnStateSaveCallback.call(t.oInstance,t,{})}))})),a("state.loaded()",(function(){return this.context.length?this.context[0].oLoadedState:null})),a("state.save()",(function(){return this.iterator("table",(function(t){oe(t)}))})),u.versionCheck=u.fnVersionCheck=function(t){for(var e,n,r=u.version.split("."),i=t.split("."),o=0,a=i.length;o<a;o++)if((e=parseInt(r[o],10)||0)!==(n=parseInt(i[o],10)||0))return e>n;return!0},u.isDataTable=u.fnIsDataTable=function(e){var n=t(e).get(0),r=!1;return e instanceof u.Api||(t.each(u.settings,(function(e,i){var o=i.nScrollHead?t("table",i.nScrollHead)[0]:null,a=i.nScrollFoot?t("table",i.nScrollFoot)[0]:null;i.nTable!==n&&o!==n&&a!==n||(r=!0)})),r)},u.tables=u.fnTables=function(e){var n=!1;t.isPlainObject(e)&&(n=e.api,e=e.visible);var r=t.map(u.settings,(function(n){if(!e||e&&t(n.nTable).is(":visible"))return n.nTable}));return n?new o(r):r},u.camelToHungarian=C,a("$()",(function(e,n){var r=this.rows(n).nodes(),i=t(r);return t([].concat(i.filter(e).toArray(),i.find(e).toArray()))})),t.each(["on","one","off"],(function(e,n){a(n+"()",(function(){var e=Array.prototype.slice.call(arguments);e[0]=t.map(e[0].split(/\s/),(function(t){return t.match(/\.dt\b/)?t:t+".dt"})).join(" ");var r=t(this.tables().nodes());return r[n].apply(r,e),this}))})),a("clear()",(function(){return this.iterator("table",(function(t){et(t)}))})),a("settings()",(function(){return new o(this.context,this.context)})),a("init()",(function(){var t=this.context;return t.length?t[0].oInit:null})),a("data()",(function(){return this.iterator("table",(function(t){return x(t.aoData,"_aData")})).flatten()})),a("destroy()",(function(n){return n=n||!1,this.iterator("table",(function(r){var i,a=r.nTableWrapper.parentNode,s=r.oClasses,l=r.nTable,c=r.nTBody,f=r.nTHead,h=r.nTFoot,d=t(l),p=t(c),m=t(r.nTableWrapper),g=t.map(r.aoData,(function(t){return t.nTr}));r.bDestroying=!0,pe(r,"aoDestroyCallback","destroy",[r]),n||new o(r).columns().visible(!0),m.off(".DT").find(":not(tbody *)").off(".DT"),t(e).off(".DT-"+r.sInstance),l!=f.parentNode&&(d.children("thead").detach(),d.append(f)),h&&l!=h.parentNode&&(d.children("tfoot").detach(),d.append(h)),r.aaSorting=[],r.aaSortingFixed=[],re(r),t(g).removeClass(r.asStripeClasses.join(" ")),t("th, td",f).removeClass(s.sSortable+" "+s.sSortableAsc+" "+s.sSortableDesc+" "+s.sSortableNone),p.children().detach(),p.append(g);var v=n?"remove":"detach";d[v](),m[v](),!n&&a&&(a.insertBefore(l,r.nTableReinsertBefore),d.css("width",r.sDestroyWidth).removeClass(s.sTable),(i=r.asDestroyStripes.length)&&p.children().each((function(e){t(this).addClass(r.asDestroyStripes[e%i])})));var y=t.inArray(r,u.settings);-1!==y&&u.settings.splice(y,1)}))})),t.each(["column","row","cell"],(function(t,e){a(e+"s().every()",(function(t){var n=this.selector.opts,i=this;return this.iterator(e,(function(o,a,s,u,l){t.call(i[e](a,"cell"===e?s:n,"cell"===e?n:r),a,s,u,l)}))}))})),a("i18n()",(function(e,n,i){var o=this.context[0],a=J(e)(o.oLanguage);return a===r&&(a=n),i!==r&&t.isPlainObject(a)&&(a=a[i]!==r?a[i]:a._),a.replace("%d",i)})),u.version="1.11.3",u.settings=[],u.models={},u.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0,return:!1},u.models.oRow={nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null,idx:-1},u.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null},u.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(t){return t.toString().replace(/\B(?=(\d{3})+(?!\d))/g,this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(t){try{return JSON.parse((-1===t.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+t.sInstance+"_"+location.pathname))}catch(t){return{}}},fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(t,e){try{(-1===t.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+t.sInstance+"_"+location.pathname,JSON.stringify(e))}catch(t){}},fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:t.extend({},u.models.oSearch),sAjaxDataProp:"data",sAjaxSource:null,sDom:"lfrtip",searchDelay:null,sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null,rowId:"DT_RowId"},k(u.defaults),u.defaults.column={aDataSort:null,iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null},k(u.defaults.column),u.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null,bSortClasses:null,bStateSave:null},oScroll:{bCollapse:null,iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1,bBounding:!1,barWidth:0},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aIds:{},aoColumns:[],aoHeader:[],aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,searchDelay:null,sPaginationType:"two_button",iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,jqXHR:null,json:r,oAjaxData:r,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==ve(this)?1*this._iRecordsTotal:this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==ve(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var t=this._iDisplayLength,e=this._iDisplayStart,n=e+t,r=this.aiDisplay.length,i=this.oFeatures,o=i.bPaginate;return i.bServerSide?!1===o||-1===t?e+r:Math.min(e+t,this._iRecordsDisplay):!o||n>r||-1===t?r:n},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{},rowIdFn:null,rowId:null},u.ext=i={buttons:{},classes:{},builder:"-source-",errMode:"alert",feature:[],search:[],selector:{cell:[],column:[],row:[]},internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},header:{}},order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:u.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:u.version},t.extend(i,{afnFiltering:i.search,aTypes:i.type.detect,ofnSearch:i.type.search,oSort:i.type.order,afnSortData:i.order,aoFeatures:i.feature,oApi:i.internal,oStdClasses:i.classes,oPagination:i.pager}),t.extend(u.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_desc_disabled",sSortableDesc:"sorting_asc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sJUIHeader:"",sJUIFooter:""});var je=u.ext.pager;function Pe(t,e){var n=[],r=je.numbers_length,i=Math.floor(r/2);return e<=r?n=_(0,e):t<=i?((n=_(0,r-2)).push("ellipsis"),n.push(e-1)):t>=e-1-i?((n=_(e-(r-2),e)).splice(0,0,"ellipsis"),n.splice(0,0,0)):((n=_(t-i+2,t+i-1)).push("ellipsis"),n.push(e-1),n.splice(0,0,"ellipsis"),n.splice(0,0,0)),n.DT_el="span",n}t.extend(je,{simple:function(t,e){return["previous","next"]},full:function(t,e){return["first","previous","next","last"]},numbers:function(t,e){return[Pe(t,e)]},simple_numbers:function(t,e){return["previous",Pe(t,e),"next"]},full_numbers:function(t,e){return["first","previous",Pe(t,e),"next","last"]},first_last_numbers:function(t,e){return["first",Pe(t,e),"last"]},_numbers:Pe,numbers_length:7}),t.extend(!0,u.ext.renderer,{pageButton:{_:function(e,i,o,a,s,u){var l,c,f,h=e.oClasses,d=e.oLanguage.oPaginate,p=e.oLanguage.oAria.paginate||{},m=0,g=function(n,r){var i,a,f,v,y=h.sPageButtonDisabled,b=function(t){qt(e,t.data.action,!0)};for(i=0,a=r.length;i<a;i++)if(f=r[i],Array.isArray(f)){var x=t("<"+(f.DT_el||"div")+"/>").appendTo(n);g(x,f)}else{switch(l=null,c=f,v=e.iTabIndex,f){case"ellipsis":n.append('<span class="ellipsis">…</span>');break;case"first":l=d.sFirst,0===s&&(v=-1,c+=" "+y);break;case"previous":l=d.sPrevious,0===s&&(v=-1,c+=" "+y);break;case"next":l=d.sNext,0!==u&&s!==u-1||(v=-1,c+=" "+y);break;case"last":l=d.sLast,0!==u&&s!==u-1||(v=-1,c+=" "+y);break;default:l=e.fnFormatNumber(f+1),c=s===f?h.sPageButtonActive:""}null!==l&&(he(t("<a>",{class:h.sPageButton+" "+c,"aria-controls":e.sTableId,"aria-label":p[f],"data-dt-idx":m,tabindex:v,id:0===o&&"string"==typeof f?e.sTableId+"_"+f:null}).html(l).appendTo(n),{action:f},b),m++)}};try{f=t(i).find(n.activeElement).data("dt-idx")}catch(t){}g(t(i).empty(),a),f!==r&&t(i).find("[data-dt-idx="+f+"]").trigger("focus")}}}),t.extend(u.ext.type.detect,[function(t,e){var n=e.oLanguage.sDecimal;return y(t,n)?"num"+n:null},function(t,e){if(t&&!(t instanceof Date)&&!h.test(t))return null;var n=Date.parse(t);return null!==n&&!isNaN(n)||m(t)?"date":null},function(t,e){var n=e.oLanguage.sDecimal;return y(t,n,!0)?"num-fmt"+n:null},function(t,e){var n=e.oLanguage.sDecimal;return b(t,n)?"html-num"+n:null},function(t,e){var n=e.oLanguage.sDecimal;return b(t,n,!0)?"html-num-fmt"+n:null},function(t,e){return m(t)||"string"==typeof t&&-1!==t.indexOf("<")?"html":null}]),t.extend(u.ext.type.search,{html:function(t){return m(t)?t:"string"==typeof t?t.replace(c," ").replace(f,""):""},string:function(t){return m(t)?t:"string"==typeof t?t.replace(c," "):t}});var Ie=function(t,e,n,r){return 0===t||t&&"-"!==t?(e&&(t=v(t,e)),t.replace&&(n&&(t=t.replace(n,"")),r&&(t=t.replace(r,""))),1*t):-1/0};function Re(e){t.each({num:function(t){return Ie(t,e)},"num-fmt":function(t){return Ie(t,e,p)},"html-num":function(t){return Ie(t,e,f)},"html-num-fmt":function(t){return Ie(t,e,f,p)}},(function(t,n){i.type.order[t+e+"-pre"]=n,t.match(/^html\-/)&&(i.type.search[t+e]=i.type.search.html)}))}t.extend(i.type.order,{"date-pre":function(t){var e=Date.parse(t);return isNaN(e)?-1/0:e},"html-pre":function(t){return m(t)?"":t.replace?t.replace(/<.*?>/g,"").toLowerCase():t+""},"string-pre":function(t){return m(t)?"":"string"==typeof t?t.toLowerCase():t.toString?t.toString():""},"string-asc":function(t,e){return t<e?-1:t>e?1:0},"string-desc":function(t,e){return t<e?1:t>e?-1:0}}),Re(""),t.extend(!0,u.ext.renderer,{header:{_:function(e,n,r,i){t(e.nTable).on("order.dt.DT",(function(t,o,a,s){if(e===o){var u=r.idx;n.removeClass(i.sSortAsc+" "+i.sSortDesc).addClass("asc"==s[u]?i.sSortAsc:"desc"==s[u]?i.sSortDesc:r.sSortingClass)}}))},jqueryui:function(e,n,r,i){t("<div/>").addClass(i.sSortJUIWrapper).append(n.contents()).append(t("<span/>").addClass(i.sSortIcon+" "+r.sSortingClassJUI)).appendTo(n),t(e.nTable).on("order.dt.DT",(function(t,o,a,s){if(e===o){var u=r.idx;n.removeClass(i.sSortAsc+" "+i.sSortDesc).addClass("asc"==s[u]?i.sSortAsc:"desc"==s[u]?i.sSortDesc:r.sSortingClass),n.find("span."+i.sSortIcon).removeClass(i.sSortJUIAsc+" "+i.sSortJUIDesc+" "+i.sSortJUI+" "+i.sSortJUIAscAllowed+" "+i.sSortJUIDescAllowed).addClass("asc"==s[u]?i.sSortJUIAsc:"desc"==s[u]?i.sSortJUIDesc:r.sSortingClassJUI)}}))}}});var Le=function(t){return Array.isArray(t)&&(t=t.join(",")),"string"==typeof t?t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""):t};function Fe(t){return function(){var e=[ue(this[u.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return u.ext.internal[t].apply(this,e)}}return u.render={number:function(t,e,n,r,i){return{display:function(o){if("number"!=typeof o&&"string"!=typeof o)return o;var a=o<0?"-":"",s=parseFloat(o);if(isNaN(s))return Le(o);s=s.toFixed(n),o=Math.abs(s);var u=parseInt(o,10),l=n?e+(o-u).toFixed(n).substring(2):"";return 0===u&&0===parseFloat(l)&&(a=""),a+(r||"")+u.toString().replace(/\B(?=(\d{3})+(?!\d))/g,t)+l+(i||"")}}},text:function(){return{display:Le,filter:Le}}},t.extend(u.ext.internal,{_fnExternApiFunc:Fe,_fnBuildAjax:pt,_fnAjaxUpdate:mt,_fnAjaxParameters:gt,_fnAjaxUpdateDraw:vt,_fnAjaxDataSrc:yt,_fnAddColumn:R,_fnColumnOptions:L,_fnAdjustColumnSizing:F,_fnVisibleToColumnIndex:q,_fnColumnIndexToVisible:B,_fnVisbleColumns:z,_fnGetColumns:H,_fnColumnTypes:U,_fnApplyColumnDefs:W,_fnHungarianMap:k,_fnCamelToHungarian:C,_fnLanguageCompat:T,_fnBrowserDetect:P,_fnAddData:V,_fnAddTr:$,_fnNodeToDataIndex:function(t,e){return e._DT_RowIndex!==r?e._DT_RowIndex:null},_fnNodeToColumnIndex:function(e,n,r){return t.inArray(r,e.aoData[n].anCells)},_fnGetCellData:Y,_fnSetCellData:Z,_fnSplitObjNotation:X,_fnGetObjectDataFn:J,_fnSetObjectDataFn:Q,_fnGetDataMaster:tt,_fnClearTable:et,_fnDeleteIndex:nt,_fnInvalidate:rt,_fnGetRowElements:it,_fnCreateTr:ot,_fnBuildHead:st,_fnDrawHead:ut,_fnDraw:lt,_fnReDraw:ct,_fnAddOptionsHtml:ft,_fnDetectHeader:ht,_fnGetUniqueThs:dt,_fnFeatureHtmlFilter:bt,_fnFilterComplete:xt,_fnFilterCustom:wt,_fnFilterColumn:_t,_fnFilter:St,_fnFilterCreateSearch:Ot,_fnEscapeRegex:Nt,_fnFilterData:kt,_fnFeatureHtmlInfo:Dt,_fnUpdateInfo:At,_fnInfoMacros:jt,_fnInitialise:Pt,_fnInitComplete:It,_fnLengthChange:Rt,_fnFeatureHtmlLength:Lt,_fnFeatureHtmlPaginate:Ft,_fnPageChange:qt,_fnFeatureHtmlProcessing:Bt,_fnProcessingDisplay:zt,_fnFeatureHtmlTable:Ht,_fnScrollDraw:Ut,_fnApplyToChildren:Wt,_fnCalculateColumnWidths:$t,_fnThrottle:Yt,_fnConvertToWidth:Zt,_fnGetWidestNode:Gt,_fnGetMaxLenString:Kt,_fnStringToCss:Xt,_fnSortFlatten:Jt,_fnSort:Qt,_fnSortAria:te,_fnSortListener:ee,_fnSortAttachListener:ne,_fnSortingClasses:re,_fnSortData:ie,_fnSaveState:oe,_fnLoadState:ae,_fnImplementState:se,_fnSettingsFromNode:ue,_fnLog:le,_fnMap:ce,_fnBindAction:he,_fnCallbackReg:de,_fnCallbackFire:pe,_fnLengthOverflow:me,_fnRenderer:ge,_fnDataSource:ve,_fnRowAttributes:at,_fnExtend:fe,_fnCalculateEnd:function(){}}),t.fn.dataTable=u,u.$=t,t.fn.dataTableSettings=u.settings,t.fn.dataTableExt=u.ext,t.fn.DataTable=function(e){return t(this).dataTable(e).api()},t.each(u,(function(e,n){t.fn.DataTable[e]=n})),u}(t,window,document)}.apply(e,r),void 0===i||(t.exports=i)}()},82083:function(t,e,n){var r,i;!function(o){"use strict";r=[n(19755)],i=function(t){return function(t,e,n,r){var i,o,a,s,u=function(e){this.$=function(t,e){return this.api(!0).$(t,e)},this._=function(t,e){return this.api(!0).rows(t,e).data()},this.api=function(t){return new o(t?oe(this[i.iApiIndex]):this)},this.fnAddData=function(e,n){var i=this.api(!0),o=t.isArray(e)&&(t.isArray(e[0])||t.isPlainObject(e[0]))?i.rows.add(e):i.row.add(e);return(n===r||n)&&i.draw(),o.flatten().toArray()},this.fnAdjustColumnSizing=function(t){var e=this.api(!0).columns.adjust(),n=e.settings()[0],i=n.oScroll;t===r||t?e.draw(!1):""===i.sX&&""===i.sY||zt(n)},this.fnClearTable=function(t){var e=this.api(!0).clear();(t===r||t)&&e.draw()},this.fnClose=function(t){this.api(!0).row(t).child.hide()},this.fnDeleteRow=function(t,e,n){var i=this.api(!0),o=i.rows(t),a=o.settings()[0],s=a.aoData[o[0][0]];return o.remove(),e&&e.call(this,a,s),(n===r||n)&&i.draw(),s},this.fnDestroy=function(t){this.api(!0).destroy(t)},this.fnDraw=function(t){this.api(!0).draw(t)},this.fnFilter=function(t,e,n,i,o,a){var s=this.api(!0);null===e||e===r?s.search(t,n,i,a):s.column(e).search(t,n,i,a),s.draw()},this.fnGetData=function(t,e){var n=this.api(!0);if(t!==r){var i=t.nodeName?t.nodeName.toLowerCase():"";return e!==r||"td"==i||"th"==i?n.cell(t,e).data():n.row(t).data()||null}return n.data().toArray()},this.fnGetNodes=function(t){var e=this.api(!0);return t!==r?e.row(t).node():e.rows().nodes().flatten().toArray()},this.fnGetPosition=function(t){var e=this.api(!0),n=t.nodeName.toUpperCase();if("TR"==n)return e.row(t).index();if("TD"==n||"TH"==n){var r=e.cell(t).index();return[r.row,r.columnVisible,r.column]}return null},this.fnIsOpen=function(t){return this.api(!0).row(t).child.isShown()},this.fnOpen=function(t,e,n){return this.api(!0).row(t).child(e,n).show().child()[0]},this.fnPageChange=function(t,e){var n=this.api(!0).page(t);(e===r||e)&&n.draw(!1)},this.fnSetColumnVis=function(t,e,n){var i=this.api(!0).column(t).visible(e);(n===r||n)&&i.columns.adjust().draw()},this.fnSettings=function(){return oe(this[i.iApiIndex])},this.fnSort=function(t){this.api(!0).order(t).draw()},this.fnSortListener=function(t,e,n){this.api(!0).order.listener(t,e,n)},this.fnUpdate=function(t,e,n,i,o){var a=this.api(!0);return n===r||null===n?a.row(e).data(t):a.cell(e,n).data(t),(o===r||o)&&a.columns.adjust(),(i===r||i)&&a.draw(),0},this.fnVersionCheck=i.fnVersionCheck;var n=this,a=e===r,s=this.length;for(var l in a&&(e={}),this.oApi=this.internal=i.internal,u.ext.internal)l&&(this[l]=Pe(l));return this.each((function(){var i,o=s>1?ue({},e,!0):e,l=0,c=this.getAttribute("id"),f=!1,h=u.defaults,d=t(this);if("table"==this.nodeName.toLowerCase()){T(h),D(h.column),E(h,h,!0),E(h.column,h.column,!0),E(h,t.extend(o,d.data()));var p=u.settings;for(l=0,i=p.length;l<i;l++){var m=p[l];if(m.nTable==this||m.nTHead&&m.nTHead.parentNode==this||m.nTFoot&&m.nTFoot.parentNode==this){var g=o.bRetrieve!==r?o.bRetrieve:h.bRetrieve,v=o.bDestroy!==r?o.bDestroy:h.bDestroy;if(a||g)return m.oInstance;if(v){m.oInstance.fnDestroy();break}return void ae(m,0,"Cannot reinitialise DataTable",3)}if(m.sTableId==this.id){p.splice(l,1);break}}null!==c&&""!==c||(c="DataTables_Table_"+u.ext._unique++,this.id=c);var y=t.extend(!0,{},u.models.oSettings,{sDestroyWidth:d[0].style.width,sInstance:c,sTableId:c});y.nTable=this,y.oApi=n.internal,y.oInit=o,p.push(y),y.oInstance=1===n.length?n:d.dataTable(),T(o),k(o.oLanguage),o.aLengthMenu&&!o.iDisplayLength&&(o.iDisplayLength=t.isArray(o.aLengthMenu[0])?o.aLengthMenu[0][0]:o.aLengthMenu[0]),o=ue(t.extend(!0,{},h),o),se(y.oFeatures,o,["bPaginate","bLengthChange","bFilter","bSort","bSortMulti","bInfo","bProcessing","bAutoWidth","bSortClasses","bServerSide","bDeferRender"]),se(y,o,["asStripeClasses","ajax","fnServerData","fnFormatNumber","sServerMethod","aaSorting","aaSortingFixed","aLengthMenu","sPaginationType","sAjaxSource","sAjaxDataProp","iStateDuration","sDom","bSortCellsTop","iTabIndex","fnStateLoadCallback","fnStateSaveCallback","renderer","searchDelay","rowId",["iCookieDuration","iStateDuration"],["oSearch","oPreviousSearch"],["aoSearchCols","aoPreSearchCols"],["iDisplayLength","_iDisplayLength"]]),se(y.oScroll,o,[["sScrollX","sX"],["sScrollXInner","sXInner"],["sScrollY","sY"],["bScrollCollapse","bCollapse"]]),se(y.oLanguage,o,"fnInfoCallback"),ce(y,"aoDrawCallback",o.fnDrawCallback,"user"),ce(y,"aoServerParams",o.fnServerParams,"user"),ce(y,"aoStateSaveParams",o.fnStateSaveParams,"user"),ce(y,"aoStateLoadParams",o.fnStateLoadParams,"user"),ce(y,"aoStateLoaded",o.fnStateLoaded,"user"),ce(y,"aoRowCallback",o.fnRowCallback,"user"),ce(y,"aoRowCreatedCallback",o.fnCreatedRow,"user"),ce(y,"aoHeaderCallback",o.fnHeaderCallback,"user"),ce(y,"aoFooterCallback",o.fnFooterCallback,"user"),ce(y,"aoInitComplete",o.fnInitComplete,"user"),ce(y,"aoPreDrawCallback",o.fnPreDrawCallback,"user"),y.rowIdFn=K(o.rowId),A(y);var b=y.oClasses;if(t.extend(b,u.ext.classes,o.oClasses),d.addClass(b.sTable),y.iInitDisplayStart===r&&(y.iInitDisplayStart=o.iDisplayStart,y._iDisplayStart=o.iDisplayStart),null!==o.iDeferLoading){y.bDeferLoading=!0;var x=t.isArray(o.iDeferLoading);y._iRecordsDisplay=x?o.iDeferLoading[0]:o.iDeferLoading,y._iRecordsTotal=x?o.iDeferLoading[1]:o.iDeferLoading}var w=y.oLanguage;t.extend(!0,w,o.oLanguage),w.sUrl&&(t.ajax({dataType:"json",url:w.sUrl,success:function(e){k(e),E(h.oLanguage,e),t.extend(!0,w,e),At(y)},error:function(){At(y)}}),f=!0),null===o.asStripeClasses&&(y.asStripeClasses=[b.sStripeOdd,b.sStripeEven]);var _=y.asStripeClasses,S=d.children("tbody").find("tr").eq(0);-1!==t.inArray(!0,t.map(_,(function(t,e){return S.hasClass(t)})))&&(t("tbody tr",this).removeClass(_.join(" ")),y.asDestroyStripes=_.slice());var O,N=[],M=this.getElementsByTagName("thead");if(0!==M.length&&(ct(y.aoHeader,M[0]),N=ft(y)),null===o.aoColumns)for(O=[],l=0,i=N.length;l<i;l++)O.push(null);else O=o.aoColumns;for(l=0,i=O.length;l<i;l++)P(y,N?N[l]:null);if(H(y,o.aoColumnDefs,O,(function(t,e){I(y,t,e)})),S.length){var C=function(t,e){return null!==t.getAttribute("data-"+e)?e:null};t(S[0]).children("th, td").each((function(t,e){var n=y.aoColumns[t];if(n.mData===t){var i=C(e,"sort")||C(e,"order"),o=C(e,"filter")||C(e,"search");null===i&&null===o||(n.mData={_:t+".display",sort:null!==i?t+".@data-"+i:r,type:null!==i?t+".@data-"+i:r,filter:null!==o?t+".@data-"+o:r},I(y,t))}}))}var j=y.oFeatures,R=function(){if(o.aaSorting===r){var e=y.aaSorting;for(l=0,i=e.length;l<i;l++)e[l][1]=y.aoColumns[l].asSorting[0]}ee(y),j.bSort&&ce(y,"aoDrawCallback",(function(){if(y.bSorted){var e=Kt(y),n={};t.each(e,(function(t,e){n[e.src]=e.dir})),fe(y,null,"order",[y,e,n]),Jt(y)}})),ce(y,"aoDrawCallback",(function(){(y.bSorted||"ssp"===pe(y)||j.bDeferRender)&&ee(y)}),"sc");var n=d.children("caption").each((function(){this._captionSide=t(this).css("caption-side")})),a=d.children("thead");0===a.length&&(a=t("<thead/>").appendTo(d)),y.nTHead=a[0];var s=d.children("tbody");0===s.length&&(s=t("<tbody/>").appendTo(d)),y.nTBody=s[0];var u=d.children("tfoot");if(0===u.length&&n.length>0&&(""!==y.oScroll.sX||""!==y.oScroll.sY)&&(u=t("<tfoot/>").appendTo(d)),0===u.length||0===u.children().length?d.addClass(b.sNoFooter):u.length>0&&(y.nTFoot=u[0],ct(y.aoFooter,y.nTFoot)),o.aaData)for(l=0;l<o.aaData.length;l++)U(y,o.aaData[l]);else(y.bDeferLoading||"dom"==pe(y))&&W(y,t(y.nTBody).children("tr"));y.aiDisplay=y.aiDisplayMaster.slice(),y.bInitialised=!0,!1===f&&At(y)};o.bStateSave?(j.bStateSave=!0,ce(y,"aoDrawCallback",re,"state_save"),ie(y,0,R)):R()}else ae(null,0,"Non-table node initialisation ("+this.nodeName+")",2)})),n=null,this},l={},c=/[\r\n]/g,f=/<.*?>/g,h=/^\d{2,4}[\.\/\-]\d{1,2}[\.\/\-]\d{1,2}([T ]{1}\d{1,2}[:\.]\d{2}([\.:]\d{2})?)?$/,d=new RegExp("(\\"+["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^","-"].join("|\\")+")","g"),p=/[',$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfkɃΞ]/gi,m=function(t){return!t||!0===t||"-"===t},g=function(t){var e=parseInt(t,10);return!isNaN(e)&&isFinite(t)?e:null},v=function(t,e){return l[e]||(l[e]=new RegExp(St(e),"g")),"string"==typeof t&&"."!==e?t.replace(/\./g,"").replace(l[e],"."):t},y=function(t,e,n){var r="string"==typeof t;return!!m(t)||(e&&r&&(t=v(t,e)),n&&r&&(t=t.replace(p,"")),!isNaN(parseFloat(t))&&isFinite(t))},b=function(t,e,n){return!!m(t)||function(t){return m(t)||"string"==typeof t}(t)&&!!y(O(t),e,n)||null},x=function(t,e,n){var i=[],o=0,a=t.length;if(n!==r)for(;o<a;o++)t[o]&&t[o][e]&&i.push(t[o][e][n]);else for(;o<a;o++)t[o]&&i.push(t[o][e]);return i},w=function(t,e,n,i){var o=[],a=0,s=e.length;if(i!==r)for(;a<s;a++)t[e[a]][n]&&o.push(t[e[a]][n][i]);else for(;a<s;a++)o.push(t[e[a]][n]);return o},_=function(t,e){var n,i=[];e===r?(e=0,n=t):(n=e,e=t);for(var o=e;o<n;o++)i.push(o);return i},S=function(t){for(var e=[],n=0,r=t.length;n<r;n++)t[n]&&e.push(t[n]);return e},O=function(t){return t.replace(f,"")},N=function(t){if(function(t){if(t.length<2)return!0;for(var e=t.slice().sort(),n=e[0],r=1,i=e.length;r<i;r++){if(e[r]===n)return!1;n=e[r]}return!0}(t))return t.slice();var e,n,r,i=[],o=t.length,a=0;t:for(n=0;n<o;n++){for(e=t[n],r=0;r<a;r++)if(i[r]===e)continue t;i.push(e),a++}return i};function M(e){var n,r,i={};t.each(e,(function(t,o){(n=t.match(/^([^A-Z]+?)([A-Z])/))&&-1!=="a aa ai ao as b fn i m o s ".indexOf(n[1]+" ")&&(r=t.replace(n[0],n[2].toLowerCase()),i[r]=t,"o"===n[1]&&M(e[t]))})),e._hungarianMap=i}function E(e,n,i){var o;e._hungarianMap||M(e),t.each(n,(function(a,s){(o=e._hungarianMap[a])===r||!i&&n[o]!==r||("o"===o.charAt(0)?(n[o]||(n[o]={}),t.extend(!0,n[o],n[a]),E(e[o],n[o],i)):n[o]=n[a])}))}function k(t){var e=u.defaults.oLanguage,n=e.sDecimal;if(n&&Ae(n),t){var r=t.sZeroRecords;!t.sEmptyTable&&r&&"No data available in table"===e.sEmptyTable&&se(t,t,"sZeroRecords","sEmptyTable"),!t.sLoadingRecords&&r&&"Loading..."===e.sLoadingRecords&&se(t,t,"sZeroRecords","sLoadingRecords"),t.sInfoThousands&&(t.sThousands=t.sInfoThousands);var i=t.sDecimal;i&&n!==i&&Ae(i)}}u.util={throttle:function(t,e){var n,i,o=e!==r?e:200;return function(){var e=this,a=+new Date,s=arguments;n&&a<n+o?(clearTimeout(i),i=setTimeout((function(){n=r,t.apply(e,s)}),o)):(n=a,t.apply(e,s))}},escapeRegex:function(t){return t.replace(d,"\\$1")}};var C=function(t,e,n){t[e]!==r&&(t[n]=t[e])};function T(t){C(t,"ordering","bSort"),C(t,"orderMulti","bSortMulti"),C(t,"orderClasses","bSortClasses"),C(t,"orderCellsTop","bSortCellsTop"),C(t,"order","aaSorting"),C(t,"orderFixed","aaSortingFixed"),C(t,"paging","bPaginate"),C(t,"pagingType","sPaginationType"),C(t,"pageLength","iDisplayLength"),C(t,"searching","bFilter"),"boolean"==typeof t.sScrollX&&(t.sScrollX=t.sScrollX?"100%":""),"boolean"==typeof t.scrollX&&(t.scrollX=t.scrollX?"100%":"");var e=t.aoSearchCols;if(e)for(var n=0,r=e.length;n<r;n++)e[n]&&E(u.models.oSearch,e[n])}function D(e){C(e,"orderable","bSortable"),C(e,"orderData","aDataSort"),C(e,"orderSequence","asSorting"),C(e,"orderDataType","sortDataType");var n=e.aDataSort;"number"!=typeof n||t.isArray(n)||(e.aDataSort=[n])}function A(n){if(!u.__browser){var r={};u.__browser=r;var i=t("<div/>").css({position:"fixed",top:0,left:-1*t(e).scrollLeft(),height:1,width:1,overflow:"hidden"}).append(t("<div/>").css({position:"absolute",top:1,left:1,width:100,overflow:"scroll"}).append(t("<div/>").css({width:"100%",height:10}))).appendTo("body"),o=i.children(),a=o.children();r.barWidth=o[0].offsetWidth-o[0].clientWidth,r.bScrollOversize=100===a[0].offsetWidth&&100!==o[0].clientWidth,r.bScrollbarLeft=1!==Math.round(a.offset().left),r.bBounding=!!i[0].getBoundingClientRect().width,i.remove()}t.extend(n.oBrowser,u.__browser),n.oScroll.iBarWidth=u.__browser.barWidth}function j(t,e,n,i,o,a){var s,u=i,l=!1;for(n!==r&&(s=n,l=!0);u!==o;)t.hasOwnProperty(u)&&(s=l?e(s,t[u],u,t):t[u],l=!0,u+=a);return s}function P(e,r){var i=u.defaults.column,o=e.aoColumns.length,a=t.extend({},u.models.oColumn,i,{nTh:r||n.createElement("th"),sTitle:i.sTitle?i.sTitle:r?r.innerHTML:"",aDataSort:i.aDataSort?i.aDataSort:[o],mData:i.mData?i.mData:o,idx:o});e.aoColumns.push(a);var s=e.aoPreSearchCols;s[o]=t.extend({},u.models.oSearch,s[o]),I(e,o,t(r).data())}function I(e,n,i){var o=e.aoColumns[n],a=e.oClasses,s=t(o.nTh);if(!o.sWidthOrig){o.sWidthOrig=s.attr("width")||null;var l=(s.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);l&&(o.sWidthOrig=l[1])}i!==r&&null!==i&&(D(i),E(u.defaults.column,i),i.mDataProp===r||i.mData||(i.mData=i.mDataProp),i.sType&&(o._sManualType=i.sType),i.className&&!i.sClass&&(i.sClass=i.className),i.sClass&&s.addClass(i.sClass),t.extend(o,i),se(o,i,"sWidth","sWidthOrig"),i.iDataSort!==r&&(o.aDataSort=[i.iDataSort]),se(o,i,"aDataSort"));var c=o.mData,f=K(c),h=o.mRender?K(o.mRender):null,d=function(t){return"string"==typeof t&&-1!==t.indexOf("@")};o._bAttrSrc=t.isPlainObject(c)&&(d(c.sort)||d(c.type)||d(c.filter)),o._setter=null,o.fnGetData=function(t,e,n){var i=f(t,e,r,n);return h&&e?h(i,e,t,n):i},o.fnSetData=function(t,e,n){return X(c)(t,e,n)},"number"!=typeof c&&(e._rowReadObject=!0),e.oFeatures.bSort||(o.bSortable=!1,s.addClass(a.sSortableNone));var p=-1!==t.inArray("asc",o.asSorting),m=-1!==t.inArray("desc",o.asSorting);o.bSortable&&(p||m)?p&&!m?(o.sSortingClass=a.sSortableAsc,o.sSortingClassJUI=a.sSortJUIAscAllowed):!p&&m?(o.sSortingClass=a.sSortableDesc,o.sSortingClassJUI=a.sSortJUIDescAllowed):(o.sSortingClass=a.sSortable,o.sSortingClassJUI=a.sSortJUI):(o.sSortingClass=a.sSortableNone,o.sSortingClassJUI="")}function R(t){if(!1!==t.oFeatures.bAutoWidth){var e=t.aoColumns;Wt(t);for(var n=0,r=e.length;n<r;n++)e[n].nTh.style.width=e[n].sWidth}var i=t.oScroll;""===i.sY&&""===i.sX||zt(t),fe(t,null,"column-sizing",[t])}function L(t,e){var n=B(t,"bVisible");return"number"==typeof n[e]?n[e]:null}function F(e,n){var r=B(e,"bVisible"),i=t.inArray(n,r);return-1!==i?i:null}function q(e){var n=0;return t.each(e.aoColumns,(function(e,r){r.bVisible&&"none"!==t(r.nTh).css("display")&&n++})),n}function B(e,n){var r=[];return t.map(e.aoColumns,(function(t,e){t[n]&&r.push(e)})),r}function z(t){var e,n,i,o,a,s,l,c,f,h=t.aoColumns,d=t.aoData,p=u.ext.type.detect;for(e=0,n=h.length;e<n;e++)if(f=[],!(l=h[e]).sType&&l._sManualType)l.sType=l._sManualType;else if(!l.sType){for(i=0,o=p.length;i<o;i++){for(a=0,s=d.length;a<s&&(f[a]===r&&(f[a]=V(t,a,e,"type")),(c=p[i](f[a],t))||i===p.length-1)&&"html"!==c;a++);if(c){l.sType=c;break}}l.sType||(l.sType="string")}}function H(e,n,i,o){var a,s,u,l,c,f,h,d=e.aoColumns;if(n)for(a=n.length-1;a>=0;a--){var p=(h=n[a]).targets!==r?h.targets:h.aTargets;for(t.isArray(p)||(p=[p]),u=0,l=p.length;u<l;u++)if("number"==typeof p[u]&&p[u]>=0){for(;d.length<=p[u];)P(e);o(p[u],h)}else if("number"==typeof p[u]&&p[u]<0)o(d.length+p[u],h);else if("string"==typeof p[u])for(c=0,f=d.length;c<f;c++)("_all"==p[u]||t(d[c].nTh).hasClass(p[u]))&&o(c,h)}if(i)for(a=0,s=i.length;a<s;a++)o(a,i[a])}function U(e,n,i,o){var a=e.aoData.length,s=t.extend(!0,{},u.models.oRow,{src:i?"dom":"data",idx:a});s._aData=n,e.aoData.push(s);for(var l=e.aoColumns,c=0,f=l.length;c<f;c++)l[c].sType=null;e.aiDisplayMaster.push(a);var h=e.rowIdFn(n);return h!==r&&(e.aIds[h]=s),!i&&e.oFeatures.bDeferRender||rt(e,a,i,o),a}function W(e,n){var r;return n instanceof t||(n=t(n)),n.map((function(t,n){return r=nt(e,n),U(e,r.data,n,r.cells)}))}function V(t,e,n,i){var o=t.iDraw,a=t.aoColumns[n],s=t.aoData[e]._aData,u=a.sDefaultContent,l=a.fnGetData(s,i,{settings:t,row:e,col:n});if(l===r)return t.iDrawError!=o&&null===u&&(ae(t,0,"Requested unknown parameter "+("function"==typeof a.mData?"{function}":"'"+a.mData+"'")+" for row "+e+", column "+n,4),t.iDrawError=o),u;if(l!==s&&null!==l||null===u||i===r){if("function"==typeof l)return l.call(s)}else l=u;return null===l&&"display"==i?"":l}function $(t,e,n,r){var i=t.aoColumns[n],o=t.aoData[e]._aData;i.fnSetData(o,r,{settings:t,row:e,col:n})}var Y=/\[.*?\]$/,Z=/\(\)$/;function G(e){return t.map(e.match(/(\\.|[^\.])+/g)||[""],(function(t){return t.replace(/\\\./g,".")}))}function K(e){if(t.isPlainObject(e)){var n={};return t.each(e,(function(t,e){e&&(n[t]=K(e))})),function(t,e,i,o){var a=n[e]||n._;return a!==r?a(t,e,i,o):t}}if(null===e)return function(t){return t};if("function"==typeof e)return function(t,n,r,i){return e(t,n,r,i)};if("string"!=typeof e||-1===e.indexOf(".")&&-1===e.indexOf("[")&&-1===e.indexOf("("))return function(t,n){return t[e]};var i=function(e,n,o){var a,s,u,l;if(""!==o)for(var c=G(o),f=0,h=c.length;f<h;f++){if(a=c[f].match(Y),s=c[f].match(Z),a){if(c[f]=c[f].replace(Y,""),""!==c[f]&&(e=e[c[f]]),u=[],c.splice(0,f+1),l=c.join("."),t.isArray(e))for(var d=0,p=e.length;d<p;d++)u.push(i(e[d],n,l));var m=a[0].substring(1,a[0].length-1);e=""===m?u:u.join(m);break}if(s)c[f]=c[f].replace(Z,""),e=e[c[f]]();else{if(null===e||e[c[f]]===r)return r;e=e[c[f]]}}return e};return function(t,n){return i(t,n,e)}}function X(e){if(t.isPlainObject(e))return X(e._);if(null===e)return function(){};if("function"==typeof e)return function(t,n,r){e(t,"set",n,r)};if("string"!=typeof e||-1===e.indexOf(".")&&-1===e.indexOf("[")&&-1===e.indexOf("("))return function(t,n){t[e]=n};var n=function(e,i,o){for(var a,s,u,l,c,f=G(o),h=f[f.length-1],d=0,p=f.length-1;d<p;d++){if(s=f[d].match(Y),u=f[d].match(Z),s){if(f[d]=f[d].replace(Y,""),e[f[d]]=[],(a=f.slice()).splice(0,d+1),c=a.join("."),t.isArray(i))for(var m=0,g=i.length;m<g;m++)n(l={},i[m],c),e[f[d]].push(l);else e[f[d]]=i;return}u&&(f[d]=f[d].replace(Z,""),e=e[f[d]](i)),null!==e[f[d]]&&e[f[d]]!==r||(e[f[d]]={}),e=e[f[d]]}h.match(Z)?e=e[h.replace(Z,"")](i):e[h.replace(Y,"")]=i};return function(t,r){return n(t,r,e)}}function J(t){return x(t.aoData,"_aData")}function Q(t){t.aoData.length=0,t.aiDisplayMaster.length=0,t.aiDisplay.length=0,t.aIds={}}function tt(t,e,n){for(var i=-1,o=0,a=t.length;o<a;o++)t[o]==e?i=o:t[o]>e&&t[o]--;-1!=i&&n===r&&t.splice(i,1)}function et(t,e,n,i){var o,a,s=t.aoData[e],u=function(n,r){for(;n.childNodes.length;)n.removeChild(n.firstChild);n.innerHTML=V(t,e,r,"display")};if("dom"!==n&&(n&&"auto"!==n||"dom"!==s.src)){var l=s.anCells;if(l)if(i!==r)u(l[i],i);else for(o=0,a=l.length;o<a;o++)u(l[o],o)}else s._aData=nt(t,s,i,i===r?r:s._aData).data;s._aSortData=null,s._aFilterData=null;var c=t.aoColumns;if(i!==r)c[i].sType=null;else{for(o=0,a=c.length;o<a;o++)c[o].sType=null;it(t,s)}}function nt(e,n,i,o){var a,s,u,l=[],c=n.firstChild,f=0,h=e.aoColumns,d=e._rowReadObject;o=o!==r?o:d?{}:[];var p=function(t,e){if("string"==typeof t){var n=t.indexOf("@");if(-1!==n){var r=t.substring(n+1);X(t)(o,e.getAttribute(r))}}},m=function(e){i!==r&&i!==f||(s=h[f],u=t.trim(e.innerHTML),s&&s._bAttrSrc?(X(s.mData._)(o,u),p(s.mData.sort,e),p(s.mData.type,e),p(s.mData.filter,e)):d?(s._setter||(s._setter=X(s.mData)),s._setter(o,u)):o[f]=u),f++};if(c)for(;c;)"TD"!=(a=c.nodeName.toUpperCase())&&"TH"!=a||(m(c),l.push(c)),c=c.nextSibling;else for(var g=0,v=(l=n.anCells).length;g<v;g++)m(l[g]);var y=n.firstChild?n:n.nTr;if(y){var b=y.getAttribute("id");b&&X(e.rowId)(o,b)}return{data:o,cells:l}}function rt(e,r,i,o){var a,s,u,l,c,f=e.aoData[r],h=f._aData,d=[];if(null===f.nTr){for(a=i||n.createElement("tr"),f.nTr=a,f.anCells=d,a._DT_RowIndex=r,it(e,f),l=0,c=e.aoColumns.length;l<c;l++)u=e.aoColumns[l],(s=i?o[l]:n.createElement(u.sCellType))._DT_CellIndex={row:r,column:l},d.push(s),i&&!u.mRender&&u.mData===l||t.isPlainObject(u.mData)&&u.mData._===l+".display"||(s.innerHTML=V(e,r,l,"display")),u.sClass&&(s.className+=" "+u.sClass),u.bVisible&&!i?a.appendChild(s):!u.bVisible&&i&&s.parentNode.removeChild(s),u.fnCreatedCell&&u.fnCreatedCell.call(e.oInstance,s,V(e,r,l),h,r,l);fe(e,"aoRowCreatedCallback",null,[a,h,r,d])}f.nTr.setAttribute("role","row")}function it(e,n){var r=n.nTr,i=n._aData;if(r){var o=e.rowIdFn(i);if(o&&(r.id=o),i.DT_RowClass){var a=i.DT_RowClass.split(" ");n.__rowc=n.__rowc?N(n.__rowc.concat(a)):a,t(r).removeClass(n.__rowc.join(" ")).addClass(i.DT_RowClass)}i.DT_RowAttr&&t(r).attr(i.DT_RowAttr),i.DT_RowData&&t(r).data(i.DT_RowData)}}function ot(e){var n,r,i,o,a,s=e.nTHead,u=e.nTFoot,l=0===t("th, td",s).length,c=e.oClasses,f=e.aoColumns;for(l&&(o=t("<tr/>").appendTo(s)),n=0,r=f.length;n<r;n++)a=f[n],i=t(a.nTh).addClass(a.sClass),l&&i.appendTo(o),e.oFeatures.bSort&&(i.addClass(a.sSortingClass),!1!==a.bSortable&&(i.attr("tabindex",e.iTabIndex).attr("aria-controls",e.sTableId),te(e,a.nTh,n))),a.sTitle!=i[0].innerHTML&&i.html(a.sTitle),de(e,"header")(e,i,a,c);if(l&&ct(e.aoHeader,s),t(s).find(">tr").attr("role","row"),t(s).find(">tr>th, >tr>td").addClass(c.sHeaderTH),t(u).find(">tr>th, >tr>td").addClass(c.sFooterTH),null!==u){var h=e.aoFooter[0];for(n=0,r=h.length;n<r;n++)(a=f[n]).nTf=h[n].cell,a.sClass&&t(a.nTf).addClass(a.sClass)}}function at(e,n,i){var o,a,s,u,l,c,f,h,d,p=[],m=[],g=e.aoColumns.length;if(n){for(i===r&&(i=!1),o=0,a=n.length;o<a;o++){for(p[o]=n[o].slice(),p[o].nTr=n[o].nTr,s=g-1;s>=0;s--)e.aoColumns[s].bVisible||i||p[o].splice(s,1);m.push([])}for(o=0,a=p.length;o<a;o++){if(f=p[o].nTr)for(;c=f.firstChild;)f.removeChild(c);for(s=0,u=p[o].length;s<u;s++)if(h=1,d=1,m[o][s]===r){for(f.appendChild(p[o][s].cell),m[o][s]=1;p[o+h]!==r&&p[o][s].cell==p[o+h][s].cell;)m[o+h][s]=1,h++;for(;p[o][s+d]!==r&&p[o][s].cell==p[o][s+d].cell;){for(l=0;l<h;l++)m[o+l][s+d]=1;d++}t(p[o][s].cell).attr("rowspan",h).attr("colspan",d)}}}}function st(e){var n=fe(e,"aoPreDrawCallback","preDraw",[e]);if(-1===t.inArray(!1,n)){var i=[],o=0,a=e.asStripeClasses,s=a.length,u=(e.aoOpenRows.length,e.oLanguage),l=e.iInitDisplayStart,c="ssp"==pe(e),f=e.aiDisplay;e.bDrawing=!0,l!==r&&-1!==l&&(e._iDisplayStart=c?l:l>=e.fnRecordsDisplay()?0:l,e.iInitDisplayStart=-1);var h=e._iDisplayStart,d=e.fnDisplayEnd();if(e.bDeferLoading)e.bDeferLoading=!1,e.iDraw++,qt(e,!1);else if(c){if(!e.bDestroying&&!dt(e))return}else e.iDraw++;if(0!==f.length)for(var p=c?0:h,m=c?e.aoData.length:d,g=p;g<m;g++){var v=f[g],y=e.aoData[v];null===y.nTr&&rt(e,v);var b=y.nTr;if(0!==s){var x=a[o%s];y._sRowStripe!=x&&(t(b).removeClass(y._sRowStripe).addClass(x),y._sRowStripe=x)}fe(e,"aoRowCallback",null,[b,y._aData,o,g,v]),i.push(b),o++}else{var w=u.sZeroRecords;1==e.iDraw&&"ajax"==pe(e)?w=u.sLoadingRecords:u.sEmptyTable&&0===e.fnRecordsTotal()&&(w=u.sEmptyTable),i[0]=t("<tr/>",{class:s?a[0]:""}).append(t("<td />",{valign:"top",colSpan:q(e),class:e.oClasses.sRowEmpty}).html(w))[0]}fe(e,"aoHeaderCallback","header",[t(e.nTHead).children("tr")[0],J(e),h,d,f]),fe(e,"aoFooterCallback","footer",[t(e.nTFoot).children("tr")[0],J(e),h,d,f]);var _=t(e.nTBody);_.children().detach(),_.append(t(i)),fe(e,"aoDrawCallback","draw",[e]),e.bSorted=!1,e.bFiltered=!1,e.bDrawing=!1}else qt(e,!1)}function ut(t,e){var n=t.oFeatures,r=n.bSort,i=n.bFilter;r&&Xt(t),i?yt(t,t.oPreviousSearch):t.aiDisplay=t.aiDisplayMaster.slice(),!0!==e&&(t._iDisplayStart=0),t._drawHold=e,st(t),t._drawHold=!1}function lt(e){var n=e.oClasses,r=t(e.nTable),i=t("<div/>").insertBefore(r),o=e.oFeatures,a=t("<div/>",{id:e.sTableId+"_wrapper",class:n.sWrapper+(e.nTFoot?"":" "+n.sNoFooter)});e.nHolding=i[0],e.nTableWrapper=a[0],e.nTableReinsertBefore=e.nTable.nextSibling;for(var s,l,c,f,h,d,p=e.sDom.split(""),m=0;m<p.length;m++){if(s=null,"<"==(l=p[m])){if(c=t("<div/>")[0],"'"==(f=p[m+1])||'"'==f){for(h="",d=2;p[m+d]!=f;)h+=p[m+d],d++;if("H"==h?h=n.sJUIHeader:"F"==h&&(h=n.sJUIFooter),-1!=h.indexOf(".")){var g=h.split(".");c.id=g[0].substr(1,g[0].length-1),c.className=g[1]}else"#"==h.charAt(0)?c.id=h.substr(1,h.length-1):c.className=h;m+=d}a.append(c),a=t(c)}else if(">"==l)a=a.parent();else if("l"==l&&o.bPaginate&&o.bLengthChange)s=It(e);else if("f"==l&&o.bFilter)s=vt(e);else if("r"==l&&o.bProcessing)s=Ft(e);else if("t"==l)s=Bt(e);else if("i"==l&&o.bInfo)s=Ct(e);else if("p"==l&&o.bPaginate)s=Rt(e);else if(0!==u.ext.feature.length)for(var v=u.ext.feature,y=0,b=v.length;y<b;y++)if(l==v[y].cFeature){s=v[y].fnInit(e);break}if(s){var x=e.aanFeatures;x[l]||(x[l]=[]),x[l].push(s),a.append(s)}}i.replaceWith(a),e.nHolding=null}function ct(e,n){var r,i,o,a,s,u,l,c,f,h,d=t(n).children("tr"),p=function(t,e,n){for(var r=t[e];r[n];)n++;return n};for(e.splice(0,e.length),o=0,u=d.length;o<u;o++)e.push([]);for(o=0,u=d.length;o<u;o++)for(0,i=(r=d[o]).firstChild;i;){if("TD"==i.nodeName.toUpperCase()||"TH"==i.nodeName.toUpperCase())for(c=(c=1*i.getAttribute("colspan"))&&0!==c&&1!==c?c:1,f=(f=1*i.getAttribute("rowspan"))&&0!==f&&1!==f?f:1,l=p(e,o,0),h=1===c,s=0;s<c;s++)for(a=0;a<f;a++)e[o+a][l+s]={cell:i,unique:h},e[o+a].nTr=r;i=i.nextSibling}}function ft(t,e,n){var r=[];n||(n=t.aoHeader,e&&ct(n=[],e));for(var i=0,o=n.length;i<o;i++)for(var a=0,s=n[i].length;a<s;a++)!n[i][a].unique||r[a]&&t.bSortCellsTop||(r[a]=n[i][a].cell);return r}function ht(e,n,r){if(fe(e,"aoServerParams","serverParams",[n]),n&&t.isArray(n)){var i={},o=/(.*?)\[\]$/;t.each(n,(function(t,e){var n=e.name.match(o);if(n){var r=n[0];i[r]||(i[r]=[]),i[r].push(e.value)}else i[e.name]=e.value})),n=i}var a,s=e.ajax,u=e.oInstance,l=function(t){fe(e,null,"xhr",[e,t,e.jqXHR]),r(t)};if(t.isPlainObject(s)&&s.data){var c="function"==typeof(a=s.data)?a(n,e):a;n="function"==typeof a&&c?c:t.extend(!0,n,c),delete s.data}var f={data:n,success:function(t){var n=t.error||t.sError;n&&ae(e,0,n),e.json=t,l(t)},dataType:"json",cache:!1,type:e.sServerMethod,error:function(n,r,i){var o=fe(e,null,"xhr",[e,null,e.jqXHR]);-1===t.inArray(!0,o)&&("parsererror"==r?ae(e,0,"Invalid JSON response",1):4===n.readyState&&ae(e,0,"Ajax error",7)),qt(e,!1)}};e.oAjaxData=n,fe(e,null,"preXhr",[e,n]),e.fnServerData?e.fnServerData.call(u,e.sAjaxSource,t.map(n,(function(t,e){return{name:e,value:t}})),l,e):e.sAjaxSource||"string"==typeof s?e.jqXHR=t.ajax(t.extend(f,{url:s||e.sAjaxSource})):"function"==typeof s?e.jqXHR=s.call(u,n,l,e):(e.jqXHR=t.ajax(t.extend(f,s)),s.data=a)}function dt(t){return!t.bAjaxDataGet||(t.iDraw++,qt(t,!0),ht(t,pt(t),(function(e){mt(t,e)})),!1)}function pt(e){var n,r,i,o,a=e.aoColumns,s=a.length,l=e.oFeatures,c=e.oPreviousSearch,f=e.aoPreSearchCols,h=[],d=Kt(e),p=e._iDisplayStart,m=!1!==l.bPaginate?e._iDisplayLength:-1,g=function(t,e){h.push({name:t,value:e})};g("sEcho",e.iDraw),g("iColumns",s),g("sColumns",x(a,"sName").join(",")),g("iDisplayStart",p),g("iDisplayLength",m);var v={draw:e.iDraw,columns:[],order:[],start:p,length:m,search:{value:c.sSearch,regex:c.bRegex}};for(n=0;n<s;n++)i=a[n],o=f[n],r="function"==typeof i.mData?"function":i.mData,v.columns.push({data:r,name:i.sName,searchable:i.bSearchable,orderable:i.bSortable,search:{value:o.sSearch,regex:o.bRegex}}),g("mDataProp_"+n,r),l.bFilter&&(g("sSearch_"+n,o.sSearch),g("bRegex_"+n,o.bRegex),g("bSearchable_"+n,i.bSearchable)),l.bSort&&g("bSortable_"+n,i.bSortable);l.bFilter&&(g("sSearch",c.sSearch),g("bRegex",c.bRegex)),l.bSort&&(t.each(d,(function(t,e){v.order.push({column:e.col,dir:e.dir}),g("iSortCol_"+t,e.col),g("sSortDir_"+t,e.dir)})),g("iSortingCols",d.length));var y=u.ext.legacy.ajax;return null===y?e.sAjaxSource?h:v:y?h:v}function mt(t,e){var n=function(t,n){return e[t]!==r?e[t]:e[n]},i=gt(t,e),o=n("sEcho","draw"),a=n("iTotalRecords","recordsTotal"),s=n("iTotalDisplayRecords","recordsFiltered");if(o){if(1*o<t.iDraw)return;t.iDraw=1*o}Q(t),t._iRecordsTotal=parseInt(a,10),t._iRecordsDisplay=parseInt(s,10);for(var u=0,l=i.length;u<l;u++)U(t,i[u]);t.aiDisplay=t.aiDisplayMaster.slice(),t.bAjaxDataGet=!1,st(t),t._bInitComplete||jt(t,e),t.bAjaxDataGet=!0,qt(t,!1)}function gt(e,n){var i=t.isPlainObject(e.ajax)&&e.ajax.dataSrc!==r?e.ajax.dataSrc:e.sAjaxDataProp;return"data"===i?n.aaData||n[i]:""!==i?K(i)(n):n}function vt(e){var r=e.oClasses,i=e.sTableId,o=e.oLanguage,a=e.oPreviousSearch,s=e.aanFeatures,u='<input type="search" class="'+r.sFilterInput+'"/>',l=o.sSearch;l=l.match(/_INPUT_/)?l.replace("_INPUT_",u):l+u;var c=t("<div/>",{id:s.f?null:i+"_filter",class:r.sFilter}).append(t("<label/>").append(l)),f=function(){s.f;var t=this.value?this.value:"";t!=a.sSearch&&(yt(e,{sSearch:t,bRegex:a.bRegex,bSmart:a.bSmart,bCaseInsensitive:a.bCaseInsensitive}),e._iDisplayStart=0,st(e))},h=null!==e.searchDelay?e.searchDelay:"ssp"===pe(e)?400:0,d=t("input",c).val(a.sSearch).attr("placeholder",o.sSearchPlaceholder).on("keyup.DT search.DT input.DT paste.DT cut.DT",h?Vt(f,h):f).on("keypress.DT",(function(t){if(13==t.keyCode)return!1})).attr("aria-controls",i);return t(e.nTable).on("search.dt.DT",(function(t,r){if(e===r)try{d[0]!==n.activeElement&&d.val(a.sSearch)}catch(t){}})),c[0]}function yt(t,e,n){var i=t.oPreviousSearch,o=t.aoPreSearchCols,a=function(t){i.sSearch=t.sSearch,i.bRegex=t.bRegex,i.bSmart=t.bSmart,i.bCaseInsensitive=t.bCaseInsensitive},s=function(t){return t.bEscapeRegex!==r?!t.bEscapeRegex:t.bRegex};if(z(t),"ssp"!=pe(t)){wt(t,e.sSearch,n,s(e),e.bSmart,e.bCaseInsensitive),a(e);for(var u=0;u<o.length;u++)xt(t,o[u].sSearch,u,s(o[u]),o[u].bSmart,o[u].bCaseInsensitive);bt(t)}else a(e);t.bFiltered=!0,fe(t,null,"search",[t])}function bt(e){for(var n,r,i=u.ext.search,o=e.aiDisplay,a=0,s=i.length;a<s;a++){for(var l=[],c=0,f=o.length;c<f;c++)r=o[c],n=e.aoData[r],i[a](e,n._aFilterData,r,n._aData,c)&&l.push(r);o.length=0,t.merge(o,l)}}function xt(t,e,n,r,i,o){if(""!==e){for(var a,s=[],u=t.aiDisplay,l=_t(e,r,i,o),c=0;c<u.length;c++)a=t.aoData[u[c]]._aFilterData[n],l.test(a)&&s.push(u[c]);t.aiDisplay=s}}function wt(t,e,n,r,i,o){var a,s,l,c=_t(e,r,i,o),f=t.oPreviousSearch.sSearch,h=t.aiDisplayMaster,d=[];if(0!==u.ext.search.length&&(n=!0),s=Mt(t),e.length<=0)t.aiDisplay=h.slice();else{for((s||n||f.length>e.length||0!==e.indexOf(f)||t.bSorted)&&(t.aiDisplay=h.slice()),a=t.aiDisplay,l=0;l<a.length;l++)c.test(t.aoData[a[l]]._sFilterRow)&&d.push(a[l]);t.aiDisplay=d}}function _t(e,n,r,i){if(e=n?e:St(e),r){var o=t.map(e.match(/"[^"]+"|[^ ]+/g)||[""],(function(t){if('"'===t.charAt(0)){var e=t.match(/^"(.*)"$/);t=e?e[1]:t}return t.replace('"',"")}));e="^(?=.*?"+o.join(")(?=.*?")+").*$"}return new RegExp(e,i?"i":"")}var St=u.util.escapeRegex,Ot=t("<div>")[0],Nt=Ot.textContent!==r;function Mt(t){var e,n,r,i,o,a,s,l,c=t.aoColumns,f=u.ext.type.search,h=!1;for(n=0,i=t.aoData.length;n<i;n++)if(!(l=t.aoData[n])._aFilterData){for(a=[],r=0,o=c.length;r<o;r++)(e=c[r]).bSearchable?(s=V(t,n,r,"filter"),f[e.sType]&&(s=f[e.sType](s)),null===s&&(s=""),"string"!=typeof s&&s.toString&&(s=s.toString())):s="",s.indexOf&&-1!==s.indexOf("&")&&(Ot.innerHTML=s,s=Nt?Ot.textContent:Ot.innerText),s.replace&&(s=s.replace(/[\r\n]/g,"")),a.push(s);l._aFilterData=a,l._sFilterRow=a.join(" "),h=!0}return h}function Et(t){return{search:t.sSearch,smart:t.bSmart,regex:t.bRegex,caseInsensitive:t.bCaseInsensitive}}function kt(t){return{sSearch:t.search,bSmart:t.smart,bRegex:t.regex,bCaseInsensitive:t.caseInsensitive}}function Ct(e){var n=e.sTableId,r=e.aanFeatures.i,i=t("<div/>",{class:e.oClasses.sInfo,id:r?null:n+"_info"});return r||(e.aoDrawCallback.push({fn:Tt,sName:"information"}),i.attr("role","status").attr("aria-live","polite"),t(e.nTable).attr("aria-describedby",n+"_info")),i[0]}function Tt(e){var n=e.aanFeatures.i;if(0!==n.length){var r=e.oLanguage,i=e._iDisplayStart+1,o=e.fnDisplayEnd(),a=e.fnRecordsTotal(),s=e.fnRecordsDisplay(),u=s?r.sInfo:r.sInfoEmpty;s!==a&&(u+=" "+r.sInfoFiltered),u=Dt(e,u+=r.sInfoPostFix);var l=r.fnInfoCallback;null!==l&&(u=l.call(e.oInstance,e,i,o,a,s,u)),t(n).html(u)}}function Dt(t,e){var n=t.fnFormatNumber,r=t._iDisplayStart+1,i=t._iDisplayLength,o=t.fnRecordsDisplay(),a=-1===i;return e.replace(/_START_/g,n.call(t,r)).replace(/_END_/g,n.call(t,t.fnDisplayEnd())).replace(/_MAX_/g,n.call(t,t.fnRecordsTotal())).replace(/_TOTAL_/g,n.call(t,o)).replace(/_PAGE_/g,n.call(t,a?1:Math.ceil(r/i))).replace(/_PAGES_/g,n.call(t,a?1:Math.ceil(o/i)))}function At(t){var e,n,r,i=t.iInitDisplayStart,o=t.aoColumns,a=t.oFeatures,s=t.bDeferLoading;if(t.bInitialised){for(lt(t),ot(t),at(t,t.aoHeader),at(t,t.aoFooter),qt(t,!0),a.bAutoWidth&&Wt(t),e=0,n=o.length;e<n;e++)(r=o[e]).sWidth&&(r.nTh.style.width=Gt(r.sWidth));fe(t,null,"preInit",[t]),ut(t);var u=pe(t);("ssp"!=u||s)&&("ajax"==u?ht(t,[],(function(n){var r=gt(t,n);for(e=0;e<r.length;e++)U(t,r[e]);t.iInitDisplayStart=i,ut(t),qt(t,!1),jt(t,n)})):(qt(t,!1),jt(t)))}else setTimeout((function(){At(t)}),200)}function jt(t,e){t._bInitComplete=!0,(e||t.oInit.aaData)&&R(t),fe(t,null,"plugin-init",[t,e]),fe(t,"aoInitComplete","init",[t,e])}function Pt(t,e){var n=parseInt(e,10);t._iDisplayLength=n,he(t),fe(t,null,"length",[t,n])}function It(e){for(var n=e.oClasses,r=e.sTableId,i=e.aLengthMenu,o=t.isArray(i[0]),a=o?i[0]:i,s=o?i[1]:i,u=t("<select/>",{name:r+"_length","aria-controls":r,class:n.sLengthSelect}),l=0,c=a.length;l<c;l++)u[0][l]=new Option("number"==typeof s[l]?e.fnFormatNumber(s[l]):s[l],a[l]);var f=t("<div><label/></div>").addClass(n.sLength);return e.aanFeatures.l||(f[0].id=r+"_length"),f.children().append(e.oLanguage.sLengthMenu.replace("_MENU_",u[0].outerHTML)),t("select",f).val(e._iDisplayLength).on("change.DT",(function(n){Pt(e,t(this).val()),st(e)})),t(e.nTable).on("length.dt.DT",(function(n,r,i){e===r&&t("select",f).val(i)})),f[0]}function Rt(e){var n=e.sPaginationType,r=u.ext.pager[n],i="function"==typeof r,o=function(t){st(t)},a=t("<div/>").addClass(e.oClasses.sPaging+n)[0],s=e.aanFeatures;return i||r.fnInit(e,a,o),s.p||(a.id=e.sTableId+"_paginate",e.aoDrawCallback.push({fn:function(t){if(i){var e,n,a=t._iDisplayStart,u=t._iDisplayLength,l=t.fnRecordsDisplay(),c=-1===u,f=c?0:Math.ceil(a/u),h=c?1:Math.ceil(l/u),d=r(f,h);for(e=0,n=s.p.length;e<n;e++)de(t,"pageButton")(t,s.p[e],e,d,f,h)}else r.fnUpdate(t,o)},sName:"pagination"})),a}function Lt(t,e,n){var r=t._iDisplayStart,i=t._iDisplayLength,o=t.fnRecordsDisplay();0===o||-1===i?r=0:"number"==typeof e?(r=e*i)>o&&(r=0):"first"==e?r=0:"previous"==e?(r=i>=0?r-i:0)<0&&(r=0):"next"==e?r+i<o&&(r+=i):"last"==e?r=Math.floor((o-1)/i)*i:ae(t,0,"Unknown paging action: "+e,5);var a=t._iDisplayStart!==r;return t._iDisplayStart=r,a&&(fe(t,null,"page",[t]),n&&st(t)),a}function Ft(e){return t("<div/>",{id:e.aanFeatures.r?null:e.sTableId+"_processing",class:e.oClasses.sProcessing}).html(e.oLanguage.sProcessing).insertBefore(e.nTable)[0]}function qt(e,n){e.oFeatures.bProcessing&&t(e.aanFeatures.r).css("display",n?"block":"none"),fe(e,null,"processing",[e,n])}function Bt(e){var n=t(e.nTable);n.attr("role","grid");var r=e.oScroll;if(""===r.sX&&""===r.sY)return e.nTable;var i=r.sX,o=r.sY,a=e.oClasses,s=n.children("caption"),u=s.length?s[0]._captionSide:null,l=t(n[0].cloneNode(!1)),c=t(n[0].cloneNode(!1)),f=n.children("tfoot"),h="<div/>",d=function(t){return t?Gt(t):null};f.length||(f=null);var p=t(h,{class:a.sScrollWrapper}).append(t(h,{class:a.sScrollHead}).css({overflow:"hidden",position:"relative",border:0,width:i?d(i):"100%"}).append(t(h,{class:a.sScrollHeadInner}).css({"box-sizing":"content-box",width:r.sXInner||"100%"}).append(l.removeAttr("id").css("margin-left",0).append("top"===u?s:null).append(n.children("thead"))))).append(t(h,{class:a.sScrollBody}).css({position:"relative",overflow:"auto",width:d(i)}).append(n));f&&p.append(t(h,{class:a.sScrollFoot}).css({overflow:"hidden",border:0,width:i?d(i):"100%"}).append(t(h,{class:a.sScrollFootInner}).append(c.removeAttr("id").css("margin-left",0).append("bottom"===u?s:null).append(n.children("tfoot")))));var m=p.children(),g=m[0],v=m[1],y=f?m[2]:null;return i&&t(v).on("scroll.DT",(function(t){var e=this.scrollLeft;g.scrollLeft=e,f&&(y.scrollLeft=e)})),t(v).css(o&&r.bCollapse?"max-height":"height",o),e.nScrollHead=g,e.nScrollBody=v,e.nScrollFoot=y,e.aoDrawCallback.push({fn:zt,sName:"scrolling"}),p[0]}function zt(e){var n,i,o,a,s,u,l,c,f,h=e.oScroll,d=h.sX,p=h.sXInner,m=h.sY,g=h.iBarWidth,v=t(e.nScrollHead),y=v[0].style,b=v.children("div"),w=b[0].style,_=b.children("table"),S=e.nScrollBody,O=t(S),N=S.style,M=t(e.nScrollFoot).children("div"),E=M.children("table"),k=t(e.nTHead),C=t(e.nTable),T=C[0],D=T.style,A=e.nTFoot?t(e.nTFoot):null,j=e.oBrowser,P=j.bScrollOversize,I=x(e.aoColumns,"nTh"),F=[],q=[],B=[],z=[],H=function(t){var e=t.style;e.paddingTop="0",e.paddingBottom="0",e.borderTopWidth="0",e.borderBottomWidth="0",e.height=0},U=S.scrollHeight>S.clientHeight;if(e.scrollBarVis!==U&&e.scrollBarVis!==r)return e.scrollBarVis=U,void R(e);e.scrollBarVis=U,C.children("thead, tfoot").remove(),A&&(u=A.clone().prependTo(C),i=A.find("tr"),a=u.find("tr")),s=k.clone().prependTo(C),n=k.find("tr"),o=s.find("tr"),s.find("th, td").removeAttr("tabindex"),d||(N.width="100%",v[0].style.width="100%"),t.each(ft(e,s),(function(t,n){l=L(e,t),n.style.width=e.aoColumns[l].sWidth})),A&&Ht((function(t){t.style.width=""}),a),f=C.outerWidth(),""===d?(D.width="100%",P&&(C.find("tbody").height()>S.offsetHeight||"scroll"==O.css("overflow-y"))&&(D.width=Gt(C.outerWidth()-g)),f=C.outerWidth()):""!==p&&(D.width=Gt(p),f=C.outerWidth()),Ht(H,o),Ht((function(e){B.push(e.innerHTML),F.push(Gt(t(e).css("width")))}),o),Ht((function(e,n){-1!==t.inArray(e,I)&&(e.style.width=F[n])}),n),t(o).height(0),A&&(Ht(H,a),Ht((function(e){z.push(e.innerHTML),q.push(Gt(t(e).css("width")))}),a),Ht((function(t,e){t.style.width=q[e]}),i),t(a).height(0)),Ht((function(t,e){t.innerHTML='<div class="dataTables_sizing">'+B[e]+"</div>",t.childNodes[0].style.height="0",t.childNodes[0].style.overflow="hidden",t.style.width=F[e]}),o),A&&Ht((function(t,e){t.innerHTML='<div class="dataTables_sizing">'+z[e]+"</div>",t.childNodes[0].style.height="0",t.childNodes[0].style.overflow="hidden",t.style.width=q[e]}),a),C.outerWidth()<f?(c=S.scrollHeight>S.offsetHeight||"scroll"==O.css("overflow-y")?f+g:f,P&&(S.scrollHeight>S.offsetHeight||"scroll"==O.css("overflow-y"))&&(D.width=Gt(c-g)),""!==d&&""===p||ae(e,1,"Possible column misalignment",6)):c="100%",N.width=Gt(c),y.width=Gt(c),A&&(e.nScrollFoot.style.width=Gt(c)),m||P&&(N.height=Gt(T.offsetHeight+g));var W=C.outerWidth();_[0].style.width=Gt(W),w.width=Gt(W);var V=C.height()>S.clientHeight||"scroll"==O.css("overflow-y"),$="padding"+(j.bScrollbarLeft?"Left":"Right");w[$]=V?g+"px":"0px",A&&(E[0].style.width=Gt(W),M[0].style.width=Gt(W),M[0].style[$]=V?g+"px":"0px"),C.children("colgroup").insertBefore(C.children("thead")),O.scroll(),!e.bSorted&&!e.bFiltered||e._drawHold||(S.scrollTop=0)}function Ht(t,e,n){for(var r,i,o=0,a=0,s=e.length;a<s;){for(r=e[a].firstChild,i=n?n[a].firstChild:null;r;)1===r.nodeType&&(n?t(r,i,o):t(r,o),o++),r=r.nextSibling,i=n?i.nextSibling:null;a++}}var Ut=/<.*?>/g;function Wt(n){var r,i,o,a=n.nTable,s=n.aoColumns,u=n.oScroll,l=u.sY,c=u.sX,f=u.sXInner,h=s.length,d=B(n,"bVisible"),p=t("th",n.nTHead),m=a.getAttribute("width"),g=a.parentNode,v=!1,y=n.oBrowser,b=y.bScrollOversize,x=a.style.width;for(x&&-1!==x.indexOf("%")&&(m=x),r=0;r<d.length;r++)null!==(i=s[d[r]]).sWidth&&(i.sWidth=$t(i.sWidthOrig,g),v=!0);if(b||!v&&!c&&!l&&h==q(n)&&h==p.length)for(r=0;r<h;r++){var w=L(n,r);null!==w&&(s[w].sWidth=Gt(p.eq(r).width()))}else{var _=t(a).clone().css("visibility","hidden").removeAttr("id");_.find("tbody tr").remove();var S=t("<tr/>").appendTo(_.find("tbody"));for(_.find("thead, tfoot").remove(),_.append(t(n.nTHead).clone()).append(t(n.nTFoot).clone()),_.find("tfoot th, tfoot td").css("width",""),p=ft(n,_.find("thead")[0]),r=0;r<d.length;r++)i=s[d[r]],p[r].style.width=null!==i.sWidthOrig&&""!==i.sWidthOrig?Gt(i.sWidthOrig):"",i.sWidthOrig&&c&&t(p[r]).append(t("<div/>").css({width:i.sWidthOrig,margin:0,padding:0,border:0,height:1}));if(n.aoData.length)for(r=0;r<d.length;r++)i=s[o=d[r]],t(Yt(n,o)).clone(!1).append(i.sContentPadding).appendTo(S);t("[name]",_).removeAttr("name");var O=t("<div/>").css(c||l?{position:"absolute",top:0,left:0,height:1,right:0,overflow:"hidden"}:{}).append(_).appendTo(g);c&&f?_.width(f):c?(_.css("width","auto"),_.removeAttr("width"),_.width()<g.clientWidth&&m&&_.width(g.clientWidth)):l?_.width(g.clientWidth):m&&_.width(m);var N=0;for(r=0;r<d.length;r++){var M=t(p[r]),E=M.outerWidth()-M.width(),k=y.bBounding?Math.ceil(p[r].getBoundingClientRect().width):M.outerWidth();N+=k,s[d[r]].sWidth=Gt(k-E)}a.style.width=Gt(N),O.remove()}if(m&&(a.style.width=Gt(m)),(m||c)&&!n._reszEvt){var C=function(){t(e).on("resize.DT-"+n.sInstance,Vt((function(){R(n)})))};b?setTimeout(C,1e3):C(),n._reszEvt=!0}}var Vt=u.util.throttle;function $t(e,r){if(!e)return 0;var i=t("<div/>").css("width",Gt(e)).appendTo(r||n.body),o=i[0].offsetWidth;return i.remove(),o}function Yt(e,n){var r=Zt(e,n);if(r<0)return null;var i=e.aoData[r];return i.nTr?i.anCells[n]:t("<td/>").html(V(e,r,n,"display"))[0]}function Zt(t,e){for(var n,r=-1,i=-1,o=0,a=t.aoData.length;o<a;o++)(n=(n=(n=V(t,o,e,"display")+"").replace(Ut,"")).replace(/ /g," ")).length>r&&(r=n.length,i=o);return i}function Gt(t){return null===t?"0px":"number"==typeof t?t<0?"0px":t+"px":t.match(/\d$/)?t+"px":t}function Kt(e){var n,i,o,a,s,l,c,f=[],h=e.aoColumns,d=e.aaSortingFixed,p=t.isPlainObject(d),m=[],g=function(e){e.length&&!t.isArray(e[0])?m.push(e):t.merge(m,e)};for(t.isArray(d)&&g(d),p&&d.pre&&g(d.pre),g(e.aaSorting),p&&d.post&&g(d.post),n=0;n<m.length;n++)for(i=0,o=(a=h[c=m[n][0]].aDataSort).length;i<o;i++)l=h[s=a[i]].sType||"string",m[n]._idx===r&&(m[n]._idx=t.inArray(m[n][1],h[s].asSorting)),f.push({src:c,col:s,dir:m[n][1],index:m[n]._idx,type:l,formatter:u.ext.type.order[l+"-pre"]});return f}function Xt(t){var e,n,r,i,o,a=[],s=u.ext.type.order,l=t.aoData,c=(t.aoColumns,0),f=t.aiDisplayMaster;for(z(t),e=0,n=(o=Kt(t)).length;e<n;e++)(i=o[e]).formatter&&c++,ne(t,i.col);if("ssp"!=pe(t)&&0!==o.length){for(e=0,r=f.length;e<r;e++)a[f[e]]=e;c===o.length?f.sort((function(t,e){var n,r,i,s,u,c=o.length,f=l[t]._aSortData,h=l[e]._aSortData;for(i=0;i<c;i++)if(0!=(s=(n=f[(u=o[i]).col])<(r=h[u.col])?-1:n>r?1:0))return"asc"===u.dir?s:-s;return(n=a[t])<(r=a[e])?-1:n>r?1:0})):f.sort((function(t,e){var n,r,i,u,c,f=o.length,h=l[t]._aSortData,d=l[e]._aSortData;for(i=0;i<f;i++)if(n=h[(c=o[i]).col],r=d[c.col],0!==(u=(s[c.type+"-"+c.dir]||s["string-"+c.dir])(n,r)))return u;return(n=a[t])<(r=a[e])?-1:n>r?1:0}))}t.bSorted=!0}function Jt(t){for(var e,n,r=t.aoColumns,i=Kt(t),o=t.oLanguage.oAria,a=0,s=r.length;a<s;a++){var u=r[a],l=u.asSorting,c=u.sTitle.replace(/<.*?>/g,""),f=u.nTh;f.removeAttribute("aria-sort"),u.bSortable?(i.length>0&&i[0].col==a?(f.setAttribute("aria-sort","asc"==i[0].dir?"ascending":"descending"),n=l[i[0].index+1]||l[0]):n=l[0],e=c+("asc"===n?o.sSortAscending:o.sSortDescending)):e=c,f.setAttribute("aria-label",e)}}function Qt(e,n,i,o){var a,s=e.aoColumns[n],u=e.aaSorting,l=s.asSorting,c=function(e,n){var i=e._idx;return i===r&&(i=t.inArray(e[1],l)),i+1<l.length?i+1:n?null:0};if("number"==typeof u[0]&&(u=e.aaSorting=[u]),i&&e.oFeatures.bSortMulti){var f=t.inArray(n,x(u,"0"));-1!==f?(null===(a=c(u[f],!0))&&1===u.length&&(a=0),null===a?u.splice(f,1):(u[f][1]=l[a],u[f]._idx=a)):(u.push([n,l[0],0]),u[u.length-1]._idx=0)}else u.length&&u[0][0]==n?(a=c(u[0]),u.length=1,u[0][1]=l[a],u[0]._idx=a):(u.length=0,u.push([n,l[0]]),u[0]._idx=0);ut(e),"function"==typeof o&&o(e)}function te(t,e,n,r){var i=t.aoColumns[n];le(e,{},(function(e){!1!==i.bSortable&&(t.oFeatures.bProcessing?(qt(t,!0),setTimeout((function(){Qt(t,n,e.shiftKey,r),"ssp"!==pe(t)&&qt(t,!1)}),0)):Qt(t,n,e.shiftKey,r))}))}function ee(e){var n,r,i,o=e.aLastSort,a=e.oClasses.sSortColumn,s=Kt(e),u=e.oFeatures;if(u.bSort&&u.bSortClasses){for(n=0,r=o.length;n<r;n++)i=o[n].src,t(x(e.aoData,"anCells",i)).removeClass(a+(n<2?n+1:3));for(n=0,r=s.length;n<r;n++)i=s[n].src,t(x(e.aoData,"anCells",i)).addClass(a+(n<2?n+1:3))}e.aLastSort=s}function ne(t,e){var n,r,i,o=t.aoColumns[e],a=u.ext.order[o.sSortDataType];a&&(n=a.call(t.oInstance,t,e,F(t,e)));for(var s=u.ext.type.order[o.sType+"-pre"],l=0,c=t.aoData.length;l<c;l++)(r=t.aoData[l])._aSortData||(r._aSortData=[]),r._aSortData[e]&&!a||(i=a?n[l]:V(t,l,e,"sort"),r._aSortData[e]=s?s(i):i)}function re(e){if(e.oFeatures.bStateSave&&!e.bDestroying){var n={time:+new Date,start:e._iDisplayStart,length:e._iDisplayLength,order:t.extend(!0,[],e.aaSorting),search:Et(e.oPreviousSearch),columns:t.map(e.aoColumns,(function(t,n){return{visible:t.bVisible,search:Et(e.aoPreSearchCols[n])}}))};fe(e,"aoStateSaveParams","stateSaveParams",[e,n]),e.oSavedState=n,e.fnStateSaveCallback.call(e.oInstance,e,n)}}function ie(e,n,i){var o,a,s=e.aoColumns,u=function(n){if(n&&n.time){var u=fe(e,"aoStateLoadParams","stateLoadParams",[e,n]);if(-1===t.inArray(!1,u)){var l=e.iStateDuration;if(l>0&&n.time<+new Date-1e3*l)i();else if(n.columns&&s.length!==n.columns.length)i();else{if(e.oLoadedState=t.extend(!0,{},n),n.start!==r&&(e._iDisplayStart=n.start,e.iInitDisplayStart=n.start),n.length!==r&&(e._iDisplayLength=n.length),n.order!==r&&(e.aaSorting=[],t.each(n.order,(function(t,n){e.aaSorting.push(n[0]>=s.length?[0,n[1]]:n)}))),n.search!==r&&t.extend(e.oPreviousSearch,kt(n.search)),n.columns)for(o=0,a=n.columns.length;o<a;o++){var c=n.columns[o];c.visible!==r&&(s[o].bVisible=c.visible),c.search!==r&&t.extend(e.aoPreSearchCols[o],kt(c.search))}fe(e,"aoStateLoaded","stateLoaded",[e,n]),i()}}else i()}else i()};if(e.oFeatures.bStateSave){var l=e.fnStateLoadCallback.call(e.oInstance,e,u);l!==r&&u(l)}else i()}function oe(e){var n=u.settings,r=t.inArray(e,x(n,"nTable"));return-1!==r?n[r]:null}function ae(t,n,r,i){if(r="DataTables warning: "+(t?"table id="+t.sTableId+" - ":"")+r,i&&(r+=". For more information about this error, please see http://datatables.net/tn/"+i),n)e.console&&console.log&&console.log(r);else{var o=u.ext,a=o.sErrMode||o.errMode;if(t&&fe(t,null,"error",[t,i,r]),"alert"==a)alert(r);else{if("throw"==a)throw new Error(r);"function"==typeof a&&a(t,i,r)}}}function se(e,n,i,o){t.isArray(i)?t.each(i,(function(r,i){t.isArray(i)?se(e,n,i[0],i[1]):se(e,n,i)})):(o===r&&(o=i),n[i]!==r&&(e[o]=n[i]))}function ue(e,n,r){var i;for(var o in n)n.hasOwnProperty(o)&&(i=n[o],t.isPlainObject(i)?(t.isPlainObject(e[o])||(e[o]={}),t.extend(!0,e[o],i)):r&&"data"!==o&&"aaData"!==o&&t.isArray(i)?e[o]=i.slice():e[o]=i);return e}function le(e,n,r){t(e).on("click.DT",n,(function(n){t(e).blur(),r(n)})).on("keypress.DT",n,(function(t){13===t.which&&(t.preventDefault(),r(t))})).on("selectstart.DT",(function(){return!1}))}function ce(t,e,n,r){n&&t[e].push({fn:n,sName:r})}function fe(e,n,r,i){var o=[];if(n&&(o=t.map(e[n].slice().reverse(),(function(t,n){return t.fn.apply(e.oInstance,i)}))),null!==r){var a=t.Event(r+".dt");t(e.nTable).trigger(a,i),o.push(a.result)}return o}function he(t){var e=t._iDisplayStart,n=t.fnDisplayEnd(),r=t._iDisplayLength;e>=n&&(e=n-r),e-=e%r,(-1===r||e<0)&&(e=0),t._iDisplayStart=e}function de(e,n){var r=e.renderer,i=u.ext.renderer[n];return t.isPlainObject(r)&&r[n]?i[r[n]]||i._:"string"==typeof r&&i[r]||i._}function pe(t){return t.oFeatures.bServerSide?"ssp":t.ajax||t.sAjaxSource?"ajax":"dom"}var me=[],ge=Array.prototype;o=function(e,n){if(!(this instanceof o))return new o(e,n);var r=[],i=function(e){var n=function(e){var n,r,i=u.settings,o=t.map(i,(function(t,e){return t.nTable}));return e?e.nTable&&e.oApi?[e]:e.nodeName&&"table"===e.nodeName.toLowerCase()?-1!==(n=t.inArray(e,o))?[i[n]]:null:e&&"function"==typeof e.settings?e.settings().toArray():("string"==typeof e?r=t(e):e instanceof t&&(r=e),r?r.map((function(e){return-1!==(n=t.inArray(this,o))?i[n]:null})).toArray():void 0):[]}(e);n&&(r=r.concat(n))};if(t.isArray(e))for(var a=0,s=e.length;a<s;a++)i(e[a]);else i(e);this.context=N(r),n&&t.merge(this,n),this.selector={rows:null,cols:null,opts:null},o.extend(this,this,me)},u.Api=o,t.extend(o.prototype,{any:function(){return 0!==this.count()},concat:ge.concat,context:[],count:function(){return this.flatten().length},each:function(t){for(var e=0,n=this.length;e<n;e++)t.call(this,this[e],e,this);return this},eq:function(t){var e=this.context;return e.length>t?new o(e[t],this[t]):null},filter:function(t){var e=[];if(ge.filter)e=ge.filter.call(this,t,this);else for(var n=0,r=this.length;n<r;n++)t.call(this,this[n],n,this)&&e.push(this[n]);return new o(this.context,e)},flatten:function(){var t=[];return new o(this.context,t.concat.apply(t,this.toArray()))},join:ge.join,indexOf:ge.indexOf||function(t,e){for(var n=e||0,r=this.length;n<r;n++)if(this[n]===t)return n;return-1},iterator:function(t,e,n,i){var a,s,u,l,c,f,h,d,p=[],m=this.context,g=this.selector;for("string"==typeof t&&(i=n,n=e,e=t,t=!1),s=0,u=m.length;s<u;s++){var v=new o(m[s]);if("table"===e)(a=n.call(v,m[s],s))!==r&&p.push(a);else if("columns"===e||"rows"===e)(a=n.call(v,m[s],this[s],s))!==r&&p.push(a);else if("column"===e||"column-rows"===e||"row"===e||"cell"===e)for(h=this[s],"column-rows"===e&&(f=we(m[s],g.opts)),l=0,c=h.length;l<c;l++)d=h[l],(a="cell"===e?n.call(v,m[s],d.row,d.column,s,l):n.call(v,m[s],d,s,l,f))!==r&&p.push(a)}if(p.length||i){var y=new o(m,t?p.concat.apply([],p):p),b=y.selector;return b.rows=g.rows,b.cols=g.cols,b.opts=g.opts,y}return this},lastIndexOf:ge.lastIndexOf||function(t,e){return this.indexOf.apply(this.toArray.reverse(),arguments)},length:0,map:function(t){var e=[];if(ge.map)e=ge.map.call(this,t,this);else for(var n=0,r=this.length;n<r;n++)e.push(t.call(this,this[n],n));return new o(this.context,e)},pluck:function(t){return this.map((function(e){return e[t]}))},pop:ge.pop,push:ge.push,reduce:ge.reduce||function(t,e){return j(this,t,e,0,this.length,1)},reduceRight:ge.reduceRight||function(t,e){return j(this,t,e,this.length-1,-1,-1)},reverse:ge.reverse,selector:null,shift:ge.shift,slice:function(){return new o(this.context,this)},sort:ge.sort,splice:ge.splice,toArray:function(){return ge.slice.call(this)},to$:function(){return t(this)},toJQuery:function(){return t(this)},unique:function(){return new o(this.context,N(this))},unshift:ge.unshift}),o.extend=function(e,n,r){if(r.length&&n&&(n instanceof o||n.__dt_wrapper)){var i,a,s,u=function(t,e,n){return function(){var r=e.apply(t,arguments);return o.extend(r,r,n.methodExt),r}};for(i=0,a=r.length;i<a;i++)n[(s=r[i]).name]="function"==typeof s.val?u(e,s.val,s):t.isPlainObject(s.val)?{}:s.val,n[s.name].__dt_wrapper=!0,o.extend(e,n[s.name],s.propExt)}},o.register=a=function(e,n){if(t.isArray(e))for(var r=0,i=e.length;r<i;r++)o.register(e[r],n);else{var a,s,u,l,c=e.split("."),f=me,h=function(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n].name===e)return t[n];return null};for(a=0,s=c.length;a<s;a++){var d=h(f,u=(l=-1!==c[a].indexOf("()"))?c[a].replace("()",""):c[a]);d||(d={name:u,val:{},methodExt:[],propExt:[]},f.push(d)),a===s-1?d.val=n:f=l?d.methodExt:d.propExt}}},o.registerPlural=s=function(e,n,i){o.register(e,i),o.register(n,(function(){var e=i.apply(this,arguments);return e===this?this:e instanceof o?e.length?t.isArray(e[0])?new o(e.context,e[0]):e[0]:r:e}))};a("tables()",(function(e){return e?new o(function(e,n){if("number"==typeof e)return[n[e]];var r=t.map(n,(function(t,e){return t.nTable}));return t(r).filter(e).map((function(e){var i=t.inArray(this,r);return n[i]})).toArray()}(e,this.context)):this})),a("table()",(function(t){var e=this.tables(t),n=e.context;return n.length?new o(n[0]):e})),s("tables().nodes()","table().node()",(function(){return this.iterator("table",(function(t){return t.nTable}),1)})),s("tables().body()","table().body()",(function(){return this.iterator("table",(function(t){return t.nTBody}),1)})),s("tables().header()","table().header()",(function(){return this.iterator("table",(function(t){return t.nTHead}),1)})),s("tables().footer()","table().footer()",(function(){return this.iterator("table",(function(t){return t.nTFoot}),1)})),s("tables().containers()","table().container()",(function(){return this.iterator("table",(function(t){return t.nTableWrapper}),1)})),a("draw()",(function(t){return this.iterator("table",(function(e){"page"===t?st(e):("string"==typeof t&&(t="full-hold"!==t),ut(e,!1===t))}))})),a("page()",(function(t){return t===r?this.page.info().page:this.iterator("table",(function(e){Lt(e,t)}))})),a("page.info()",(function(t){if(0===this.context.length)return r;var e=this.context[0],n=e._iDisplayStart,i=e.oFeatures.bPaginate?e._iDisplayLength:-1,o=e.fnRecordsDisplay(),a=-1===i;return{page:a?0:Math.floor(n/i),pages:a?1:Math.ceil(o/i),start:n,end:e.fnDisplayEnd(),length:i,recordsTotal:e.fnRecordsTotal(),recordsDisplay:o,serverSide:"ssp"===pe(e)}})),a("page.len()",(function(t){return t===r?0!==this.context.length?this.context[0]._iDisplayLength:r:this.iterator("table",(function(e){Pt(e,t)}))}));var ve=function(t,e,n){if(n){var r=new o(t);r.one("draw",(function(){n(r.ajax.json())}))}if("ssp"==pe(t))ut(t,e);else{qt(t,!0);var i=t.jqXHR;i&&4!==i.readyState&&i.abort(),ht(t,[],(function(n){Q(t);for(var r=gt(t,n),i=0,o=r.length;i<o;i++)U(t,r[i]);ut(t,e),qt(t,!1)}))}};a("ajax.json()",(function(){var t=this.context;if(t.length>0)return t[0].json})),a("ajax.params()",(function(){var t=this.context;if(t.length>0)return t[0].oAjaxData})),a("ajax.reload()",(function(t,e){return this.iterator("table",(function(n){ve(n,!1===e,t)}))})),a("ajax.url()",(function(e){var n=this.context;return e===r?0===n.length?r:(n=n[0]).ajax?t.isPlainObject(n.ajax)?n.ajax.url:n.ajax:n.sAjaxSource:this.iterator("table",(function(n){t.isPlainObject(n.ajax)?n.ajax.url=e:n.ajax=e}))})),a("ajax.url().load()",(function(t,e){return this.iterator("table",(function(n){ve(n,!1===e,t)}))}));var ye=function(e,n,o,a,s){var u,l,c,f,h,d,p=[],m=typeof n;for(n&&"string"!==m&&"function"!==m&&n.length!==r||(n=[n]),c=0,f=n.length;c<f;c++)for(h=0,d=(l=n[c]&&n[c].split&&!n[c].match(/[\[\(:]/)?n[c].split(","):[n[c]]).length;h<d;h++)(u=o("string"==typeof l[h]?t.trim(l[h]):l[h]))&&u.length&&(p=p.concat(u));var g=i.selector[e];if(g.length)for(c=0,f=g.length;c<f;c++)p=g[c](a,s,p);return N(p)},be=function(e){return e||(e={}),e.filter&&e.search===r&&(e.search=e.filter),t.extend({search:"none",order:"current",page:"all"},e)},xe=function(t){for(var e=0,n=t.length;e<n;e++)if(t[e].length>0)return t[0]=t[e],t[0].length=1,t.length=1,t.context=[t.context[e]],t;return t.length=0,t},we=function(e,n){var r,i=[],o=e.aiDisplay,a=e.aiDisplayMaster,s=n.search,u=n.order,l=n.page;if("ssp"==pe(e))return"removed"===s?[]:_(0,a.length);if("current"==l)for(f=e._iDisplayStart,h=e.fnDisplayEnd();f<h;f++)i.push(o[f]);else if("current"==u||"applied"==u){if("none"==s)i=a.slice();else if("applied"==s)i=o.slice();else if("removed"==s){for(var c={},f=0,h=o.length;f<h;f++)c[o[f]]=null;i=t.map(a,(function(t){return c.hasOwnProperty(t)?null:t}))}}else if("index"==u||"original"==u)for(f=0,h=e.aoData.length;f<h;f++)("none"==s||-1===(r=t.inArray(f,o))&&"removed"==s||r>=0&&"applied"==s)&&i.push(f);return i};a("rows()",(function(e,n){e===r?e="":t.isPlainObject(e)&&(n=e,e=""),n=be(n);var i=this.iterator("table",(function(i){return function(e,n,i){var o;return ye("row",n,(function(n){var a=g(n),s=e.aoData;if(null!==a&&!i)return[a];if(o||(o=we(e,i)),null!==a&&-1!==t.inArray(a,o))return[a];if(null===n||n===r||""===n)return o;if("function"==typeof n)return t.map(o,(function(t){var e=s[t];return n(t,e._aData,e.nTr)?t:null}));if(n.nodeName){var u=n._DT_RowIndex,l=n._DT_CellIndex;if(u!==r)return s[u]&&s[u].nTr===n?[u]:[];if(l)return s[l.row]&&s[l.row].nTr===n?[l.row]:[];var c=t(n).closest("*[data-dt-row]");return c.length?[c.data("dt-row")]:[]}if("string"==typeof n&&"#"===n.charAt(0)){var f=e.aIds[n.replace(/^#/,"")];if(f!==r)return[f.idx]}var h=S(w(e.aoData,o,"nTr"));return t(h).filter(n).map((function(){return this._DT_RowIndex})).toArray()}),e,i)}(i,e,n)}),1);return i.selector.rows=e,i.selector.opts=n,i})),a("rows().nodes()",(function(){return this.iterator("row",(function(t,e){return t.aoData[e].nTr||r}),1)})),a("rows().data()",(function(){return this.iterator(!0,"rows",(function(t,e){return w(t.aoData,e,"_aData")}),1)})),s("rows().cache()","row().cache()",(function(t){return this.iterator("row",(function(e,n){var r=e.aoData[n];return"search"===t?r._aFilterData:r._aSortData}),1)})),s("rows().invalidate()","row().invalidate()",(function(t){return this.iterator("row",(function(e,n){et(e,n,t)}))})),s("rows().indexes()","row().index()",(function(){return this.iterator("row",(function(t,e){return e}),1)})),s("rows().ids()","row().id()",(function(t){for(var e=[],n=this.context,r=0,i=n.length;r<i;r++)for(var a=0,s=this[r].length;a<s;a++){var u=n[r].rowIdFn(n[r].aoData[this[r][a]]._aData);e.push((!0===t?"#":"")+u)}return new o(n,e)})),s("rows().remove()","row().remove()",(function(){var t=this;return this.iterator("row",(function(e,n,i){var o,a,s,u,l,c,f=e.aoData,h=f[n];for(f.splice(n,1),o=0,a=f.length;o<a;o++)if(c=(l=f[o]).anCells,null!==l.nTr&&(l.nTr._DT_RowIndex=o),null!==c)for(s=0,u=c.length;s<u;s++)c[s]._DT_CellIndex.row=o;tt(e.aiDisplayMaster,n),tt(e.aiDisplay,n),tt(t[i],n,!1),e._iRecordsDisplay>0&&e._iRecordsDisplay--,he(e);var d=e.rowIdFn(h._aData);d!==r&&delete e.aIds[d]})),this.iterator("table",(function(t){for(var e=0,n=t.aoData.length;e<n;e++)t.aoData[e].idx=e})),this})),a("rows.add()",(function(e){var n=this.iterator("table",(function(t){var n,r,i,o=[];for(r=0,i=e.length;r<i;r++)(n=e[r]).nodeName&&"TR"===n.nodeName.toUpperCase()?o.push(W(t,n)[0]):o.push(U(t,n));return o}),1),r=this.rows(-1);return r.pop(),t.merge(r,n),r})),a("row()",(function(t,e){return xe(this.rows(t,e))})),a("row().data()",(function(e){var n=this.context;if(e===r)return n.length&&this.length?n[0].aoData[this[0]]._aData:r;var i=n[0].aoData[this[0]];return i._aData=e,t.isArray(e)&&i.nTr.id&&X(n[0].rowId)(e,i.nTr.id),et(n[0],this[0],"data"),this})),a("row().node()",(function(){var t=this.context;return t.length&&this.length&&t[0].aoData[this[0]].nTr||null})),a("row.add()",(function(e){e instanceof t&&e.length&&(e=e[0]);var n=this.iterator("table",(function(t){return e.nodeName&&"TR"===e.nodeName.toUpperCase()?W(t,e)[0]:U(t,e)}));return this.row(n[0])}));var _e=function(t,e){var n=t.context;if(n.length){var i=n[0].aoData[e!==r?e:t[0]];i&&i._details&&(i._details.remove(),i._detailsShow=r,i._details=r)}},Se=function(t,e){var n=t.context;if(n.length&&t.length){var r=n[0].aoData[t[0]];r._details&&(r._detailsShow=e,e?r._details.insertAfter(r.nTr):r._details.detach(),Oe(n[0]))}},Oe=function(t){var e=new o(t),n=".dt.DT_details",r="draw"+n,i="column-visibility"+n,a="destroy"+n,s=t.aoData;e.off(r+" "+i+" "+a),x(s,"_details").length>0&&(e.on(r,(function(n,r){t===r&&e.rows({page:"current"}).eq(0).each((function(t){var e=s[t];e._detailsShow&&e._details.insertAfter(e.nTr)}))})),e.on(i,(function(e,n,r,i){if(t===n)for(var o,a=q(n),u=0,l=s.length;u<l;u++)(o=s[u])._details&&o._details.children("td[colspan]").attr("colspan",a)})),e.on(a,(function(n,r){if(t===r)for(var i=0,o=s.length;i<o;i++)s[i]._details&&_e(e,i)})))},Ne="row().child",Me=Ne+"()";a(Me,(function(e,n){var i=this.context;return e===r?i.length&&this.length?i[0].aoData[this[0]]._details:r:(!0===e?this.child.show():!1===e?_e(this):i.length&&this.length&&function(e,n,r,i){var o=[],a=function(n,r){if(t.isArray(n)||n instanceof t)for(var i=0,s=n.length;i<s;i++)a(n[i],r);else if(n.nodeName&&"tr"===n.nodeName.toLowerCase())o.push(n);else{var u=t("<tr><td/></tr>").addClass(r);t("td",u).addClass(r).html(n)[0].colSpan=q(e),o.push(u[0])}};a(r,i),n._details&&n._details.detach(),n._details=t(o),n._detailsShow&&n._details.insertAfter(n.nTr)}(i[0],i[0].aoData[this[0]],e,n),this)})),a([Ne+".show()",Me+".show()"],(function(t){return Se(this,!0),this})),a([Ne+".hide()",Me+".hide()"],(function(){return Se(this,!1),this})),a([Ne+".remove()",Me+".remove()"],(function(){return _e(this),this})),a(Ne+".isShown()",(function(){var t=this.context;return t.length&&this.length&&t[0].aoData[this[0]]._detailsShow||!1}));var Ee=/^([^:]+):(name|visIdx|visible)$/,ke=function(t,e,n,r,i){for(var o=[],a=0,s=i.length;a<s;a++)o.push(V(t,i[a],e));return o};a("columns()",(function(e,n){e===r?e="":t.isPlainObject(e)&&(n=e,e=""),n=be(n);var i=this.iterator("table",(function(r){return function(e,n,r){var i=e.aoColumns,o=x(i,"sName"),a=x(i,"nTh");return ye("column",n,(function(n){var s=g(n);if(""===n)return _(i.length);if(null!==s)return[s>=0?s:i.length+s];if("function"==typeof n){var u=we(e,r);return t.map(i,(function(t,r){return n(r,ke(e,r,0,0,u),a[r])?r:null}))}var l="string"==typeof n?n.match(Ee):"";if(l)switch(l[2]){case"visIdx":case"visible":var c=parseInt(l[1],10);if(c<0){var f=t.map(i,(function(t,e){return t.bVisible?e:null}));return[f[f.length+c]]}return[L(e,c)];case"name":return t.map(o,(function(t,e){return t===l[1]?e:null}));default:return[]}if(n.nodeName&&n._DT_CellIndex)return[n._DT_CellIndex.column];var h=t(a).filter(n).map((function(){return t.inArray(this,a)})).toArray();if(h.length||!n.nodeName)return h;var d=t(n).closest("*[data-dt-column]");return d.length?[d.data("dt-column")]:[]}),e,r)}(r,e,n)}),1);return i.selector.cols=e,i.selector.opts=n,i})),s("columns().header()","column().header()",(function(t,e){return this.iterator("column",(function(t,e){return t.aoColumns[e].nTh}),1)})),s("columns().footer()","column().footer()",(function(t,e){return this.iterator("column",(function(t,e){return t.aoColumns[e].nTf}),1)})),s("columns().data()","column().data()",(function(){return this.iterator("column-rows",ke,1)})),s("columns().dataSrc()","column().dataSrc()",(function(){return this.iterator("column",(function(t,e){return t.aoColumns[e].mData}),1)})),s("columns().cache()","column().cache()",(function(t){return this.iterator("column-rows",(function(e,n,r,i,o){return w(e.aoData,o,"search"===t?"_aFilterData":"_aSortData",n)}),1)})),s("columns().nodes()","column().nodes()",(function(){return this.iterator("column-rows",(function(t,e,n,r,i){return w(t.aoData,i,"anCells",e)}),1)})),s("columns().visible()","column().visible()",(function(e,n){var i=this.iterator("column",(function(n,i){if(e===r)return n.aoColumns[i].bVisible;!function(e,n,i){var o,a,s,u,l=e.aoColumns,c=l[n],f=e.aoData;if(i===r)return c.bVisible;if(c.bVisible!==i){if(i){var h=t.inArray(!0,x(l,"bVisible"),n+1);for(a=0,s=f.length;a<s;a++)u=f[a].nTr,o=f[a].anCells,u&&u.insertBefore(o[n],o[h]||null)}else t(x(e.aoData,"anCells",n)).detach();c.bVisible=i,at(e,e.aoHeader),at(e,e.aoFooter),e.aiDisplay.length||t(e.nTBody).find("td[colspan]").attr("colspan",q(e)),re(e)}}(n,i,e)}));return e!==r&&(this.iterator("column",(function(t,r){fe(t,null,"column-visibility",[t,r,e,n])})),(n===r||n)&&this.columns.adjust()),i})),s("columns().indexes()","column().index()",(function(t){return this.iterator("column",(function(e,n){return"visible"===t?F(e,n):n}),1)})),a("columns.adjust()",(function(){return this.iterator("table",(function(t){R(t)}),1)})),a("column.index()",(function(t,e){if(0!==this.context.length){var n=this.context[0];if("fromVisible"===t||"toData"===t)return L(n,e);if("fromData"===t||"toVisible"===t)return F(n,e)}})),a("column()",(function(t,e){return xe(this.columns(t,e))}));a("cells()",(function(e,n,i){if(t.isPlainObject(e)&&(e.row===r?(i=e,e=null):(i=n,n=null)),t.isPlainObject(n)&&(i=n,n=null),null===n||n===r)return this.iterator("table",(function(n){return function(e,n,i){var o,a,s,u,l,c,f,h=e.aoData,d=we(e,i),p=S(w(h,d,"anCells")),m=t([].concat.apply([],p)),g=e.aoColumns.length;return ye("cell",n,(function(n){var i="function"==typeof n;if(null===n||n===r||i){for(a=[],s=0,u=d.length;s<u;s++)for(o=d[s],l=0;l<g;l++)c={row:o,column:l},i?(f=h[o],n(c,V(e,o,l),f.anCells?f.anCells[l]:null)&&a.push(c)):a.push(c);return a}if(t.isPlainObject(n))return n.column!==r&&n.row!==r&&-1!==t.inArray(n.row,d)?[n]:[];var p=m.filter(n).map((function(t,e){return{row:e._DT_CellIndex.row,column:e._DT_CellIndex.column}})).toArray();return p.length||!n.nodeName?p:(f=t(n).closest("*[data-dt-row]")).length?[{row:f.data("dt-row"),column:f.data("dt-column")}]:[]}),e,i)}(n,e,be(i))}));var o,a,s,u,l,c=this.columns(n),f=this.rows(e);this.iterator("table",(function(t,e){for(o=[],a=0,s=f[e].length;a<s;a++)for(u=0,l=c[e].length;u<l;u++)o.push({row:f[e][a],column:c[e][u]})}),1);var h=this.cells(o,i);return t.extend(h.selector,{cols:n,rows:e,opts:i}),h})),s("cells().nodes()","cell().node()",(function(){return this.iterator("cell",(function(t,e,n){var i=t.aoData[e];return i&&i.anCells?i.anCells[n]:r}),1)})),a("cells().data()",(function(){return this.iterator("cell",(function(t,e,n){return V(t,e,n)}),1)})),s("cells().cache()","cell().cache()",(function(t){return t="search"===t?"_aFilterData":"_aSortData",this.iterator("cell",(function(e,n,r){return e.aoData[n][t][r]}),1)})),s("cells().render()","cell().render()",(function(t){return this.iterator("cell",(function(e,n,r){return V(e,n,r,t)}),1)})),s("cells().indexes()","cell().index()",(function(){return this.iterator("cell",(function(t,e,n){return{row:e,column:n,columnVisible:F(t,n)}}),1)})),s("cells().invalidate()","cell().invalidate()",(function(t){return this.iterator("cell",(function(e,n,r){et(e,n,t,r)}))})),a("cell()",(function(t,e,n){return xe(this.cells(t,e,n))})),a("cell().data()",(function(t){var e=this.context,n=this[0];return t===r?e.length&&n.length?V(e[0],n[0].row,n[0].column):r:($(e[0],n[0].row,n[0].column,t),et(e[0],n[0].row,"data",n[0].column),this)})),a("order()",(function(e,n){var i=this.context;return e===r?0!==i.length?i[0].aaSorting:r:("number"==typeof e?e=[[e,n]]:e.length&&!t.isArray(e[0])&&(e=Array.prototype.slice.call(arguments)),this.iterator("table",(function(t){t.aaSorting=e.slice()})))})),a("order.listener()",(function(t,e,n){return this.iterator("table",(function(r){te(r,t,e,n)}))})),a("order.fixed()",(function(e){if(!e){var n=this.context,i=n.length?n[0].aaSortingFixed:r;return t.isArray(i)?{pre:i}:i}return this.iterator("table",(function(n){n.aaSortingFixed=t.extend(!0,{},e)}))})),a(["columns().order()","column().order()"],(function(e){var n=this;return this.iterator("table",(function(r,i){var o=[];t.each(n[i],(function(t,n){o.push([n,e])})),r.aaSorting=o}))})),a("search()",(function(e,n,i,o){var a=this.context;return e===r?0!==a.length?a[0].oPreviousSearch.sSearch:r:this.iterator("table",(function(r){r.oFeatures.bFilter&&yt(r,t.extend({},r.oPreviousSearch,{sSearch:e+"",bRegex:null!==n&&n,bSmart:null===i||i,bCaseInsensitive:null===o||o}),1)}))})),s("columns().search()","column().search()",(function(e,n,i,o){return this.iterator("column",(function(a,s){var u=a.aoPreSearchCols;if(e===r)return u[s].sSearch;a.oFeatures.bFilter&&(t.extend(u[s],{sSearch:e+"",bRegex:null!==n&&n,bSmart:null===i||i,bCaseInsensitive:null===o||o}),yt(a,a.oPreviousSearch,1))}))})),a("state()",(function(){return this.context.length?this.context[0].oSavedState:null})),a("state.clear()",(function(){return this.iterator("table",(function(t){t.fnStateSaveCallback.call(t.oInstance,t,{})}))})),a("state.loaded()",(function(){return this.context.length?this.context[0].oLoadedState:null})),a("state.save()",(function(){return this.iterator("table",(function(t){re(t)}))})),u.versionCheck=u.fnVersionCheck=function(t){for(var e,n,r=u.version.split("."),i=t.split("."),o=0,a=i.length;o<a;o++)if((e=parseInt(r[o],10)||0)!==(n=parseInt(i[o],10)||0))return e>n;return!0},u.isDataTable=u.fnIsDataTable=function(e){var n=t(e).get(0),r=!1;return e instanceof u.Api||(t.each(u.settings,(function(e,i){var o=i.nScrollHead?t("table",i.nScrollHead)[0]:null,a=i.nScrollFoot?t("table",i.nScrollFoot)[0]:null;i.nTable!==n&&o!==n&&a!==n||(r=!0)})),r)},u.tables=u.fnTables=function(e){var n=!1;t.isPlainObject(e)&&(n=e.api,e=e.visible);var r=t.map(u.settings,(function(n){if(!e||e&&t(n.nTable).is(":visible"))return n.nTable}));return n?new o(r):r},u.camelToHungarian=E,a("$()",(function(e,n){var r=this.rows(n).nodes(),i=t(r);return t([].concat(i.filter(e).toArray(),i.find(e).toArray()))})),t.each(["on","one","off"],(function(e,n){a(n+"()",(function(){var e=Array.prototype.slice.call(arguments);e[0]=t.map(e[0].split(/\s/),(function(t){return t.match(/\.dt\b/)?t:t+".dt"})).join(" ");var r=t(this.tables().nodes());return r[n].apply(r,e),this}))})),a("clear()",(function(){return this.iterator("table",(function(t){Q(t)}))})),a("settings()",(function(){return new o(this.context,this.context)})),a("init()",(function(){var t=this.context;return t.length?t[0].oInit:null})),a("data()",(function(){return this.iterator("table",(function(t){return x(t.aoData,"_aData")})).flatten()})),a("destroy()",(function(n){return n=n||!1,this.iterator("table",(function(r){var i,a=r.nTableWrapper.parentNode,s=r.oClasses,l=r.nTable,c=r.nTBody,f=r.nTHead,h=r.nTFoot,d=t(l),p=t(c),m=t(r.nTableWrapper),g=t.map(r.aoData,(function(t){return t.nTr}));r.bDestroying=!0,fe(r,"aoDestroyCallback","destroy",[r]),n||new o(r).columns().visible(!0),m.off(".DT").find(":not(tbody *)").off(".DT"),t(e).off(".DT-"+r.sInstance),l!=f.parentNode&&(d.children("thead").detach(),d.append(f)),h&&l!=h.parentNode&&(d.children("tfoot").detach(),d.append(h)),r.aaSorting=[],r.aaSortingFixed=[],ee(r),t(g).removeClass(r.asStripeClasses.join(" ")),t("th, td",f).removeClass(s.sSortable+" "+s.sSortableAsc+" "+s.sSortableDesc+" "+s.sSortableNone),p.children().detach(),p.append(g);var v=n?"remove":"detach";d[v](),m[v](),!n&&a&&(a.insertBefore(l,r.nTableReinsertBefore),d.css("width",r.sDestroyWidth).removeClass(s.sTable),(i=r.asDestroyStripes.length)&&p.children().each((function(e){t(this).addClass(r.asDestroyStripes[e%i])})));var y=t.inArray(r,u.settings);-1!==y&&u.settings.splice(y,1)}))})),t.each(["column","row","cell"],(function(t,e){a(e+"s().every()",(function(t){var n=this.selector.opts,i=this;return this.iterator(e,(function(o,a,s,u,l){t.call(i[e](a,"cell"===e?s:n,"cell"===e?n:r),a,s,u,l)}))}))})),a("i18n()",(function(e,n,i){var o=this.context[0],a=K(e)(o.oLanguage);return a===r&&(a=n),i!==r&&t.isPlainObject(a)&&(a=a[i]!==r?a[i]:a._),a.replace("%d",i)})),u.version="1.10.18",u.settings=[],u.models={},u.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0},u.models.oRow={nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null,idx:-1},u.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null},u.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(t){return t.toString().replace(/\B(?=(\d{3})+(?!\d))/g,this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(t){try{return JSON.parse((-1===t.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+t.sInstance+"_"+location.pathname))}catch(t){}},fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(t,e){try{(-1===t.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+t.sInstance+"_"+location.pathname,JSON.stringify(e))}catch(t){}},fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:t.extend({},u.models.oSearch),sAjaxDataProp:"data",sAjaxSource:null,sDom:"lfrtip",searchDelay:null,sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null,rowId:"DT_RowId"},M(u.defaults),u.defaults.column={aDataSort:null,iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null},M(u.defaults.column),u.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null,bSortClasses:null,bStateSave:null},oScroll:{bCollapse:null,iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1,bBounding:!1,barWidth:0},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aIds:{},aoColumns:[],aoHeader:[],aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,searchDelay:null,sPaginationType:"two_button",iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,json:r,oAjaxData:r,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==pe(this)?1*this._iRecordsTotal:this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==pe(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var t=this._iDisplayLength,e=this._iDisplayStart,n=e+t,r=this.aiDisplay.length,i=this.oFeatures,o=i.bPaginate;return i.bServerSide?!1===o||-1===t?e+r:Math.min(e+t,this._iRecordsDisplay):!o||n>r||-1===t?r:n},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{},rowIdFn:null,rowId:null},u.ext=i={buttons:{},classes:{},builder:"-source-",errMode:"alert",feature:[],search:[],selector:{cell:[],column:[],row:[]},internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},header:{}},order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:u.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:u.version},t.extend(i,{afnFiltering:i.search,aTypes:i.type.detect,ofnSearch:i.type.search,oSort:i.type.order,afnSortData:i.order,aoFeatures:i.feature,oApi:i.internal,oStdClasses:i.classes,oPagination:i.pager}),t.extend(u.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sJUIHeader:"",sJUIFooter:""});var Ce=u.ext.pager;function Te(t,e){var n=[],r=Ce.numbers_length,i=Math.floor(r/2);return e<=r?n=_(0,e):t<=i?((n=_(0,r-2)).push("ellipsis"),n.push(e-1)):t>=e-1-i?((n=_(e-(r-2),e)).splice(0,0,"ellipsis"),n.splice(0,0,0)):((n=_(t-i+2,t+i-1)).push("ellipsis"),n.push(e-1),n.splice(0,0,"ellipsis"),n.splice(0,0,0)),n.DT_el="span",n}t.extend(Ce,{simple:function(t,e){return["previous","next"]},full:function(t,e){return["first","previous","next","last"]},numbers:function(t,e){return[Te(t,e)]},simple_numbers:function(t,e){return["previous",Te(t,e),"next"]},full_numbers:function(t,e){return["first","previous",Te(t,e),"next","last"]},first_last_numbers:function(t,e){return["first",Te(t,e),"last"]},_numbers:Te,numbers_length:7}),t.extend(!0,u.ext.renderer,{pageButton:{_:function(e,i,o,a,s,u){var l,c,f,h=e.oClasses,d=e.oLanguage.oPaginate,p=e.oLanguage.oAria.paginate||{},m=0,g=function(n,r){var i,a,f,v=function(t){Lt(e,t.data.action,!0)};for(i=0,a=r.length;i<a;i++)if(f=r[i],t.isArray(f)){var y=t("<"+(f.DT_el||"div")+"/>").appendTo(n);g(y,f)}else{switch(l=null,c="",f){case"ellipsis":n.append('<span class="ellipsis">…</span>');break;case"first":l=d.sFirst,c=f+(s>0?"":" "+h.sPageButtonDisabled);break;case"previous":l=d.sPrevious,c=f+(s>0?"":" "+h.sPageButtonDisabled);break;case"next":l=d.sNext,c=f+(s<u-1?"":" "+h.sPageButtonDisabled);break;case"last":l=d.sLast,c=f+(s<u-1?"":" "+h.sPageButtonDisabled);break;default:l=f+1,c=s===f?h.sPageButtonActive:""}null!==l&&(le(t("<a>",{class:h.sPageButton+" "+c,"aria-controls":e.sTableId,"aria-label":p[f],"data-dt-idx":m,tabindex:e.iTabIndex,id:0===o&&"string"==typeof f?e.sTableId+"_"+f:null}).html(l).appendTo(n),{action:f},v),m++)}};try{f=t(i).find(n.activeElement).data("dt-idx")}catch(t){}g(t(i).empty(),a),f!==r&&t(i).find("[data-dt-idx="+f+"]").focus()}}}),t.extend(u.ext.type.detect,[function(t,e){var n=e.oLanguage.sDecimal;return y(t,n)?"num"+n:null},function(t,e){if(t&&!(t instanceof Date)&&!h.test(t))return null;var n=Date.parse(t);return null!==n&&!isNaN(n)||m(t)?"date":null},function(t,e){var n=e.oLanguage.sDecimal;return y(t,n,!0)?"num-fmt"+n:null},function(t,e){var n=e.oLanguage.sDecimal;return b(t,n)?"html-num"+n:null},function(t,e){var n=e.oLanguage.sDecimal;return b(t,n,!0)?"html-num-fmt"+n:null},function(t,e){return m(t)||"string"==typeof t&&-1!==t.indexOf("<")?"html":null}]),t.extend(u.ext.type.search,{html:function(t){return m(t)?t:"string"==typeof t?t.replace(c," ").replace(f,""):""},string:function(t){return m(t)?t:"string"==typeof t?t.replace(c," "):t}});var De=function(t,e,n,r){return 0===t||t&&"-"!==t?(e&&(t=v(t,e)),t.replace&&(n&&(t=t.replace(n,"")),r&&(t=t.replace(r,""))),1*t):-1/0};function Ae(e){t.each({num:function(t){return De(t,e)},"num-fmt":function(t){return De(t,e,p)},"html-num":function(t){return De(t,e,f)},"html-num-fmt":function(t){return De(t,e,f,p)}},(function(t,n){i.type.order[t+e+"-pre"]=n,t.match(/^html\-/)&&(i.type.search[t+e]=i.type.search.html)}))}t.extend(i.type.order,{"date-pre":function(t){var e=Date.parse(t);return isNaN(e)?-1/0:e},"html-pre":function(t){return m(t)?"":t.replace?t.replace(/<.*?>/g,"").toLowerCase():t+""},"string-pre":function(t){return m(t)?"":"string"==typeof t?t.toLowerCase():t.toString?t.toString():""},"string-asc":function(t,e){return t<e?-1:t>e?1:0},"string-desc":function(t,e){return t<e?1:t>e?-1:0}}),Ae(""),t.extend(!0,u.ext.renderer,{header:{_:function(e,n,r,i){t(e.nTable).on("order.dt.DT",(function(t,o,a,s){if(e===o){var u=r.idx;n.removeClass(r.sSortingClass+" "+i.sSortAsc+" "+i.sSortDesc).addClass("asc"==s[u]?i.sSortAsc:"desc"==s[u]?i.sSortDesc:r.sSortingClass)}}))},jqueryui:function(e,n,r,i){t("<div/>").addClass(i.sSortJUIWrapper).append(n.contents()).append(t("<span/>").addClass(i.sSortIcon+" "+r.sSortingClassJUI)).appendTo(n),t(e.nTable).on("order.dt.DT",(function(t,o,a,s){if(e===o){var u=r.idx;n.removeClass(i.sSortAsc+" "+i.sSortDesc).addClass("asc"==s[u]?i.sSortAsc:"desc"==s[u]?i.sSortDesc:r.sSortingClass),n.find("span."+i.sSortIcon).removeClass(i.sSortJUIAsc+" "+i.sSortJUIDesc+" "+i.sSortJUI+" "+i.sSortJUIAscAllowed+" "+i.sSortJUIDescAllowed).addClass("asc"==s[u]?i.sSortJUIAsc:"desc"==s[u]?i.sSortJUIDesc:r.sSortingClassJUI)}}))}}});var je=function(t){return"string"==typeof t?t.replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""):t};function Pe(t){return function(){var e=[oe(this[u.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return u.ext.internal[t].apply(this,e)}}return u.render={number:function(t,e,n,r,i){return{display:function(o){if("number"!=typeof o&&"string"!=typeof o)return o;var a=o<0?"-":"",s=parseFloat(o);if(isNaN(s))return je(o);s=s.toFixed(n),o=Math.abs(s);var u=parseInt(o,10),l=n?e+(o-u).toFixed(n).substring(2):"";return a+(r||"")+u.toString().replace(/\B(?=(\d{3})+(?!\d))/g,t)+l+(i||"")}}},text:function(){return{display:je}}},t.extend(u.ext.internal,{_fnExternApiFunc:Pe,_fnBuildAjax:ht,_fnAjaxUpdate:dt,_fnAjaxParameters:pt,_fnAjaxUpdateDraw:mt,_fnAjaxDataSrc:gt,_fnAddColumn:P,_fnColumnOptions:I,_fnAdjustColumnSizing:R,_fnVisibleToColumnIndex:L,_fnColumnIndexToVisible:F,_fnVisbleColumns:q,_fnGetColumns:B,_fnColumnTypes:z,_fnApplyColumnDefs:H,_fnHungarianMap:M,_fnCamelToHungarian:E,_fnLanguageCompat:k,_fnBrowserDetect:A,_fnAddData:U,_fnAddTr:W,_fnNodeToDataIndex:function(t,e){return e._DT_RowIndex!==r?e._DT_RowIndex:null},_fnNodeToColumnIndex:function(e,n,r){return t.inArray(r,e.aoData[n].anCells)},_fnGetCellData:V,_fnSetCellData:$,_fnSplitObjNotation:G,_fnGetObjectDataFn:K,_fnSetObjectDataFn:X,_fnGetDataMaster:J,_fnClearTable:Q,_fnDeleteIndex:tt,_fnInvalidate:et,_fnGetRowElements:nt,_fnCreateTr:rt,_fnBuildHead:ot,_fnDrawHead:at,_fnDraw:st,_fnReDraw:ut,_fnAddOptionsHtml:lt,_fnDetectHeader:ct,_fnGetUniqueThs:ft,_fnFeatureHtmlFilter:vt,_fnFilterComplete:yt,_fnFilterCustom:bt,_fnFilterColumn:xt,_fnFilter:wt,_fnFilterCreateSearch:_t,_fnEscapeRegex:St,_fnFilterData:Mt,_fnFeatureHtmlInfo:Ct,_fnUpdateInfo:Tt,_fnInfoMacros:Dt,_fnInitialise:At,_fnInitComplete:jt,_fnLengthChange:Pt,_fnFeatureHtmlLength:It,_fnFeatureHtmlPaginate:Rt,_fnPageChange:Lt,_fnFeatureHtmlProcessing:Ft,_fnProcessingDisplay:qt,_fnFeatureHtmlTable:Bt,_fnScrollDraw:zt,_fnApplyToChildren:Ht,_fnCalculateColumnWidths:Wt,_fnThrottle:Vt,_fnConvertToWidth:$t,_fnGetWidestNode:Yt,_fnGetMaxLenString:Zt,_fnStringToCss:Gt,_fnSortFlatten:Kt,_fnSort:Xt,_fnSortAria:Jt,_fnSortListener:Qt,_fnSortAttachListener:te,_fnSortingClasses:ee,_fnSortData:ne,_fnSaveState:re,_fnLoadState:ie,_fnSettingsFromNode:oe,_fnLog:ae,_fnMap:se,_fnBindAction:le,_fnCallbackReg:ce,_fnCallbackFire:fe,_fnLengthOverflow:he,_fnRenderer:de,_fnDataSource:pe,_fnRowAttributes:it,_fnExtend:ue,_fnCalculateEnd:function(){}}),t.fn.dataTable=u,u.$=t,t.fn.dataTableSettings=u.settings,t.fn.dataTableExt=u.ext,t.fn.DataTable=function(e){return t(this).dataTable(e).api()},t.each(u,(function(e,n){t.fn.DataTable[e]=n})),t.fn.dataTable}(t,window,document)}.apply(e,r),void 0===i||(t.exports=i)}()},27856:function(t){t.exports=function(){"use strict";var t=Object.freeze||function(t){return t},e=t(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),n=t(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","audio","canvas","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","video","view","vkern"]),r=t(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),i=t(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),o=t(["#text"]),a=Object.freeze||function(t){return t},s=a(["accept","action","align","alt","autocomplete","background","bgcolor","border","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","coords","crossorigin","datetime","default","dir","disabled","download","enctype","face","for","headers","height","hidden","high","href","hreflang","id","integrity","ismap","label","lang","list","loop","low","max","maxlength","media","method","min","multiple","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","type","usemap","valign","value","width","xmlns"]),u=a(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),l=a(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),c=a(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),f=Object.hasOwnProperty,h=Object.setPrototypeOf,d=("undefined"!=typeof Reflect&&Reflect).apply;function p(t,e){h&&h(t,null);for(var n=e.length;n--;){var r=e[n];if("string"==typeof r){var i=r.toLowerCase();i!==r&&(Object.isFrozen(e)||(e[n]=i),r=i)}t[r]=!0}return t}function m(t){var e={},n=void 0;for(n in t)d(f,t,[n])&&(e[n]=t[n]);return e}d||(d=function(t,e,n){return t.apply(e,n)});var g=Object.seal||function(t){return t},v=g(/\{\{[\s\S]*|[\s\S]*\}\}/gm),y=g(/<%[\s\S]*|[\s\S]*%>/gm),b=g(/^data-[\-\w.\u00B7-\uFFFF]/),x=g(/^aria-[\-\w]+$/),w=g(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),_=g(/^(?:\w+script|data):/i),S=g(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g),O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function N(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}var M=("undefined"!=typeof Reflect&&Reflect).apply,E=Array.prototype.slice,k=Object.freeze,C=function(){return"undefined"==typeof window?null:window};M||(M=function(t,e,n){return t.apply(e,n)});return function t(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:C(),f=function(e){return t(e)};if(f.version="1.0.11",f.removed=[],!a||!a.document||9!==a.document.nodeType)return f.isSupported=!1,f;var h=a.document,d=!1,g=!1,T=a.document,D=a.DocumentFragment,A=a.HTMLTemplateElement,j=a.Node,P=a.NodeFilter,I=a.NamedNodeMap,R=void 0===I?a.NamedNodeMap||a.MozNamedAttrMap:I,L=a.Text,F=a.Comment,q=a.DOMParser,B=a.TrustedTypes;if("function"==typeof A){var z=T.createElement("template");z.content&&z.content.ownerDocument&&(T=z.content.ownerDocument)}var H=function(t,e){if("object"!==(void 0===t?"undefined":O(t))||"function"!=typeof t.createPolicy)return null;var n=null,r="data-tt-policy-suffix";e.currentScript&&e.currentScript.hasAttribute(r)&&(n=e.currentScript.getAttribute(r));var i="dompurify"+(n?"#"+n:"");try{return t.createPolicy(i,{createHTML:function(t){return t}})}catch(t){return console.warn("TrustedTypes policy "+i+" could not be created."),null}}(B,h),U=H?H.createHTML(""):"",W=T,V=W.implementation,$=W.createNodeIterator,Y=W.getElementsByTagName,Z=W.createDocumentFragment,G=h.importNode,K={};f.isSupported=V&&void 0!==V.createHTMLDocument&&9!==T.documentMode;var X=v,J=y,Q=b,tt=x,et=_,nt=S,rt=w,it=null,ot=p({},[].concat(N(e),N(n),N(r),N(i),N(o))),at=null,st=p({},[].concat(N(s),N(u),N(l),N(c))),ut=null,lt=null,ct=!0,ft=!0,ht=!1,dt=!1,pt=!1,mt=!1,gt=!1,vt=!1,yt=!1,bt=!1,xt=!1,wt=!0,_t=!0,St=!1,Ot={},Nt=p({},["audio","head","math","script","style","template","svg","video"]),Mt=p({},["audio","video","img","source","image"]),Et=null,kt=p({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),Ct=null,Tt=T.createElement("form"),Dt=function(t){Ct&&Ct===t||(t&&"object"===(void 0===t?"undefined":O(t))||(t={}),it="ALLOWED_TAGS"in t?p({},t.ALLOWED_TAGS):ot,at="ALLOWED_ATTR"in t?p({},t.ALLOWED_ATTR):st,Et="ADD_URI_SAFE_ATTR"in t?p({},t.ADD_URI_SAFE_ATTR):kt,ut="FORBID_TAGS"in t?p({},t.FORBID_TAGS):{},lt="FORBID_ATTR"in t?p({},t.FORBID_ATTR):{},Ot="USE_PROFILES"in t&&t.USE_PROFILES,ct=!1!==t.ALLOW_ARIA_ATTR,ft=!1!==t.ALLOW_DATA_ATTR,ht=t.ALLOW_UNKNOWN_PROTOCOLS||!1,dt=t.SAFE_FOR_JQUERY||!1,pt=t.SAFE_FOR_TEMPLATES||!1,mt=t.WHOLE_DOCUMENT||!1,yt=t.RETURN_DOM||!1,bt=t.RETURN_DOM_FRAGMENT||!1,xt=t.RETURN_DOM_IMPORT||!1,vt=t.FORCE_BODY||!1,wt=!1!==t.SANITIZE_DOM,_t=!1!==t.KEEP_CONTENT,St=t.IN_PLACE||!1,rt=t.ALLOWED_URI_REGEXP||rt,pt&&(ft=!1),bt&&(yt=!0),Ot&&(it=p({},[].concat(N(o))),at=[],!0===Ot.html&&(p(it,e),p(at,s)),!0===Ot.svg&&(p(it,n),p(at,u),p(at,c)),!0===Ot.svgFilters&&(p(it,r),p(at,u),p(at,c)),!0===Ot.mathMl&&(p(it,i),p(at,l),p(at,c))),t.ADD_TAGS&&(it===ot&&(it=m(it)),p(it,t.ADD_TAGS)),t.ADD_ATTR&&(at===st&&(at=m(at)),p(at,t.ADD_ATTR)),t.ADD_URI_SAFE_ATTR&&p(Et,t.ADD_URI_SAFE_ATTR),_t&&(it["#text"]=!0),mt&&p(it,["html","head","body"]),it.table&&p(it,["tbody"]),k&&k(t),Ct=t)},At=function(t){f.removed.push({element:t});try{t.parentNode.removeChild(t)}catch(e){t.outerHTML=U}},jt=function(t,e){try{f.removed.push({attribute:e.getAttributeNode(t),from:e})}catch(t){f.removed.push({attribute:null,from:e})}e.removeAttribute(t)},Pt=function(t){var e=void 0,n=void 0;if(vt)t="<remove></remove>"+t;else{var r=t.match(/^[\s]+/);(n=r&&r[0])&&(t=t.slice(n.length))}if(d)try{e=(new q).parseFromString(t,"text/html")}catch(t){}if(g&&p(ut,["title"]),!e||!e.documentElement){var i=(e=V.createHTMLDocument("")).body;i.parentNode.removeChild(i.parentNode.firstElementChild),i.outerHTML=H?H.createHTML(t):t}return n&&e.body.insertBefore(T.createTextNode(n),e.body.childNodes[0]||null),Y.call(e,mt?"html":"body")[0]};f.isSupported&&(function(){try{Pt('<svg><p><style><img src="</style><img src=x onerror=1//">').querySelector("svg img")&&(d=!0)}catch(t){}}(),function(){try{Pt("<x/><title></title><img>").querySelector("title").innerHTML.match(/<\/title/)&&(g=!0)}catch(t){}}());var It=function(t){return $.call(t.ownerDocument||t,t,P.SHOW_ELEMENT|P.SHOW_COMMENT|P.SHOW_TEXT,(function(){return P.FILTER_ACCEPT}),!1)},Rt=function(t){return"object"===(void 0===j?"undefined":O(j))?t instanceof j:t&&"object"===(void 0===t?"undefined":O(t))&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName},Lt=function(t,e,n){K[t]&&K[t].forEach((function(t){t.call(f,e,n,Ct)}))},Ft=function(t){var e,n=void 0;if(Lt("beforeSanitizeElements",t,null),!((e=t)instanceof L||e instanceof F||"string"==typeof e.nodeName&&"string"==typeof e.textContent&&"function"==typeof e.removeChild&&e.attributes instanceof R&&"function"==typeof e.removeAttribute&&"function"==typeof e.setAttribute))return At(t),!0;var r=t.nodeName.toLowerCase();if(Lt("uponSanitizeElement",t,{tagName:r,allowedTags:it}),!it[r]||ut[r]){if(_t&&!Nt[r]&&"function"==typeof t.insertAdjacentHTML)try{var i=t.innerHTML;t.insertAdjacentHTML("AfterEnd",H?H.createHTML(i):i)}catch(t){}return At(t),!0}return"noscript"===r&&t.innerHTML.match(/<\/noscript/i)||"noembed"===r&&t.innerHTML.match(/<\/noembed/i)?(At(t),!0):(!dt||t.firstElementChild||t.content&&t.content.firstElementChild||!/</g.test(t.textContent)||(f.removed.push({element:t.cloneNode()}),t.innerHTML?t.innerHTML=t.innerHTML.replace(/</g,"<"):t.innerHTML=t.textContent.replace(/</g,"<")),pt&&3===t.nodeType&&(n=(n=(n=t.textContent).replace(X," ")).replace(J," "),t.textContent!==n&&(f.removed.push({element:t.cloneNode()}),t.textContent=n)),Lt("afterSanitizeElements",t,null),!1)},qt=function(t,e,n){if(wt&&("id"===e||"name"===e)&&(n in T||n in Tt))return!1;if(ft&&Q.test(e));else if(ct&&tt.test(e));else{if(!at[e]||lt[e])return!1;if(Et[e]);else if(rt.test(n.replace(nt,"")));else if("src"!==e&&"xlink:href"!==e||"script"===t||0!==n.indexOf("data:")||!Mt[t])if(ht&&!et.test(n.replace(nt,"")));else if(n)return!1}return!0},Bt=function(t){var e=void 0,n=void 0,r=void 0,i=void 0,o=void 0;Lt("beforeSanitizeAttributes",t,null);var a=t.attributes;if(a){var s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:at};for(o=a.length;o--;){var u=e=a[o],l=u.name,c=u.namespaceURI;if(n=e.value.trim(),r=l.toLowerCase(),s.attrName=r,s.attrValue=n,s.keepAttr=!0,Lt("uponSanitizeAttribute",t,s),n=s.attrValue,"name"===r&&"IMG"===t.nodeName&&a.id)i=a.id,a=M(E,a,[]),jt("id",t),jt(l,t),a.indexOf(i)>o&&t.setAttribute("id",i.value);else{if("INPUT"===t.nodeName&&"type"===r&&"file"===n&&s.keepAttr&&(at[r]||!lt[r]))continue;"id"===l&&t.setAttribute(l,""),jt(l,t)}if(s.keepAttr){pt&&(n=(n=n.replace(X," ")).replace(J," "));var h=t.nodeName.toLowerCase();if(qt(h,r,n))try{c?t.setAttributeNS(c,l,n):t.setAttribute(l,n),f.removed.pop()}catch(t){}}}Lt("afterSanitizeAttributes",t,null)}},zt=function t(e){var n=void 0,r=It(e);for(Lt("beforeSanitizeShadowDOM",e,null);n=r.nextNode();)Lt("uponSanitizeShadowNode",n,null),Ft(n)||(n.content instanceof D&&t(n.content),Bt(n));Lt("afterSanitizeShadowDOM",e,null)};return f.sanitize=function(t,e){var n=void 0,r=void 0,i=void 0,o=void 0,s=void 0;if(t||(t="\x3c!--\x3e"),"string"!=typeof t&&!Rt(t)){if("function"!=typeof t.toString)throw new TypeError("toString is not a function");if("string"!=typeof(t=t.toString()))throw new TypeError("dirty is not a string, aborting")}if(!f.isSupported){if("object"===O(a.toStaticHTML)||"function"==typeof a.toStaticHTML){if("string"==typeof t)return a.toStaticHTML(t);if(Rt(t))return a.toStaticHTML(t.outerHTML)}return t}if(gt||Dt(e),f.removed=[],St);else if(t instanceof j)1===(r=(n=Pt("\x3c!--\x3e")).ownerDocument.importNode(t,!0)).nodeType&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!yt&&!pt&&!mt&&-1===t.indexOf("<"))return H?H.createHTML(t):t;if(!(n=Pt(t)))return yt?null:U}n&&vt&&At(n.firstChild);for(var u=It(St?t:n);i=u.nextNode();)3===i.nodeType&&i===o||Ft(i)||(i.content instanceof D&&zt(i.content),Bt(i),o=i);if(o=null,St)return t;if(yt){if(bt)for(s=Z.call(n.ownerDocument);n.firstChild;)s.appendChild(n.firstChild);else s=n;return xt&&(s=G.call(h,s,!0)),s}var l=mt?n.outerHTML:n.innerHTML;return pt&&(l=(l=l.replace(X," ")).replace(J," ")),H?H.createHTML(l):l},f.setConfig=function(t){Dt(t),gt=!0},f.clearConfig=function(){Ct=null,gt=!1},f.isValidAttribute=function(t,e,n){Ct||Dt({});var r=t.toLowerCase(),i=e.toLowerCase();return qt(r,i,n)},f.addHook=function(t,e){"function"==typeof e&&(K[t]=K[t]||[],K[t].push(e))},f.removeHook=function(t){K[t]&&K[t].pop()},f.removeHooks=function(t){K[t]&&(K[t]=[])},f.removeAllHooks=function(){K={}},f}()}()},81923:function(t,e,n){"use strict";var r,i=(r=n(5752))&&"object"==typeof r&&"default"in r?r.default:r;i.registerVersion("firebase","7.14.0","app"),t.exports=i},42567:function(t,e,n){"use strict";var r,i=n(5752),o=n(79730),a=n(70655),s=n(31313),u=n(78005),l="0.4.7",c=1e4,f="w:"+l,h="FIS_v2",d="https://firebaseinstallations.googleapis.com/v1",p=((r={})["missing-app-config-values"]='Missing App configuration value: "{$valueName}"',r["not-registered"]="Firebase Installation is not registered.",r["installation-not-found"]="Firebase Installation not found.",r["request-failed"]='{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',r["app-offline"]="Could not process request. Application offline.",r["delete-pending-registration"]="Can't delete installation while there is a pending registration request.",r),m=new s.ErrorFactory("installations","Installations",p);function g(t){return t instanceof s.FirebaseError&&t.code.includes("request-failed")}function v(t){var e=t.projectId;return d+"/projects/"+e+"/installations"}function y(t){return{token:t.token,requestStatus:2,expiresIn:(e=t.expiresIn,Number(e.replace("s","000"))),creationTime:Date.now()};var e}function b(t,e){return(0,a.__awaiter)(this,void 0,void 0,(function(){var n,r;return(0,a.__generator)(this,(function(i){switch(i.label){case 0:return[4,e.json()];case 1:return n=i.sent(),r=n.error,[2,m.create("request-failed",{requestName:t,serverCode:r.code,serverMessage:r.message,serverStatus:r.status})]}}))}))}function x(t){var e=t.apiKey;return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e})}function w(t,e){var n=e.refreshToken,r=x(t);return r.append("Authorization",function(t){return h+" "+t}(n)),r}function _(t){return(0,a.__awaiter)(this,void 0,void 0,(function(){var e;return(0,a.__generator)(this,(function(n){switch(n.label){case 0:return[4,t()];case 1:return(e=n.sent()).status>=500&&e.status<600?[2,t()]:[2,e]}}))}))}function S(t,e){var n=e.fid;return(0,a.__awaiter)(this,void 0,void 0,(function(){var e,r,i,o,s,u;return(0,a.__generator)(this,(function(a){switch(a.label){case 0:return e=v(t),r=x(t),i={fid:n,authVersion:h,appId:t.appId,sdkVersion:f},o={method:"POST",headers:r,body:JSON.stringify(i)},[4,_((function(){return fetch(e,o)}))];case 1:return(s=a.sent()).ok?[4,s.json()]:[3,3];case 2:return[2,{fid:(u=a.sent()).fid||n,registrationStatus:2,refreshToken:u.refreshToken,authToken:y(u.authToken)}];case 3:return[4,b("Create Installation",s)];case 4:throw a.sent()}}))}))}function O(t){return new Promise((function(e){setTimeout(e,t)}))}var N=/^[cdef][\w-]{21}$/,M="";function E(){try{var t=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(t),t[0]=112+t[0]%16;var e=function(t){var e;return(e=t,btoa(String.fromCharCode.apply(String,(0,a.__spread)(e))).replace(/\+/g,"-").replace(/\//g,"_")).substr(0,22)}(t);return N.test(e)?e:M}catch(t){return M}}function k(t){return t.appName+"!"+t.appId}var C=new Map;function T(t,e){var n=k(t);D(n,e),function(t,e){var n=j();n&&n.postMessage({key:t,fid:e}),P()}(n,e)}function D(t,e){var n,r,i=C.get(t);if(i)try{for(var o=(0,a.__values)(i),s=o.next();!s.done;s=o.next())(0,s.value)(e)}catch(t){n={error:t}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}var A=null;function j(){return!A&&"BroadcastChannel"in self&&((A=new BroadcastChannel("[Firebase] FID Change")).onmessage=function(t){D(t.data.key,t.data.fid)}),A}function P(){0===C.size&&A&&(A.close(),A=null)}var I,R="firebase-installations-database",L=1,F="firebase-installations-store",q=null;function B(){return q||(q=(0,u.openDb)(R,L,(function(t){0===t.oldVersion&&t.createObjectStore(F)}))),q}function z(t,e){return(0,a.__awaiter)(this,void 0,void 0,(function(){var n,r,i,o,s;return(0,a.__generator)(this,(function(a){switch(a.label){case 0:return n=k(t),[4,B()];case 1:return r=a.sent(),i=r.transaction(F,"readwrite"),[4,(o=i.objectStore(F)).get(n)];case 2:return s=a.sent(),[4,o.put(e,n)];case 3:return a.sent(),[4,i.complete];case 4:return a.sent(),s&&s.fid===e.fid||T(t,e.fid),[2,e]}}))}))}function H(t){return(0,a.__awaiter)(this,void 0,void 0,(function(){var e,n,r;return(0,a.__generator)(this,(function(i){switch(i.label){case 0:return e=k(t),[4,B()];case 1:return n=i.sent(),[4,(r=n.transaction(F,"readwrite")).objectStore(F).delete(e)];case 2:return i.sent(),[4,r.complete];case 3:return i.sent(),[2]}}))}))}function U(t,e){return(0,a.__awaiter)(this,void 0,void 0,(function(){var n,r,i,o,s,u;return(0,a.__generator)(this,(function(a){switch(a.label){case 0:return n=k(t),[4,B()];case 1:return r=a.sent(),i=r.transaction(F,"readwrite"),[4,(o=i.objectStore(F)).get(n)];case 2:return s=a.sent(),void 0!==(u=e(s))?[3,4]:[4,o.delete(n)];case 3:return a.sent(),[3,6];case 4:return[4,o.put(u,n)];case 5:a.sent(),a.label=6;case 6:return[4,i.complete];case 7:return a.sent(),!u||s&&s.fid===u.fid||T(t,u.fid),[2,u]}}))}))}function W(t){return(0,a.__awaiter)(this,void 0,void 0,(function(){var e,n,r;return(0,a.__generator)(this,(function(i){switch(i.label){case 0:return[4,U(t,(function(n){var r=function(t){return Y(t||{fid:E(),registrationStatus:0})}(n),i=function(t,e){if(0===e.registrationStatus){if(!navigator.onLine)return{installationEntry:e,registrationPromise:Promise.reject(m.create("app-offline"))};var n={fid:e.fid,registrationStatus:1,registrationTime:Date.now()},r=function(t,e){return(0,a.__awaiter)(this,void 0,void 0,(function(){var n,r;return(0,a.__generator)(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,7]),[4,S(t,e)];case 1:return n=i.sent(),[2,z(t,n)];case 2:return g(r=i.sent())&&409===r.serverCode?[4,H(t)]:[3,4];case 3:return i.sent(),[3,6];case 4:return[4,z(t,{fid:e.fid,registrationStatus:0})];case 5:i.sent(),i.label=6;case 6:throw r;case 7:return[2]}}))}))}(t,n);return{installationEntry:n,registrationPromise:r}}return 1===e.registrationStatus?{installationEntry:e,registrationPromise:V(t)}:{installationEntry:e}}(t,r);return e=i.registrationPromise,i.installationEntry}))];case 1:return(n=i.sent()).fid!==M?[3,3]:(r={},[4,e]);case 2:return[2,(r.installationEntry=i.sent(),r)];case 3:return[2,{installationEntry:n,registrationPromise:e}]}}))}))}function V(t){return(0,a.__awaiter)(this,void 0,void 0,(function(){var e,n,r,i;return(0,a.__generator)(this,(function(o){switch(o.label){case 0:return[4,$(t)];case 1:e=o.sent(),o.label=2;case 2:return 1!==e.registrationStatus?[3,5]:[4,O(100)];case 3:return o.sent(),[4,$(t)];case 4:return e=o.sent(),[3,2];case 5:return 0!==e.registrationStatus?[3,7]:[4,W(t)];case 6:return n=o.sent(),r=n.installationEntry,(i=n.registrationPromise)?[2,i]:[2,r];case 7:return[2,e]}}))}))}function $(t){return U(t,(function(t){if(!t)throw m.create("installation-not-found");return Y(t)}))}function Y(t){return 1===(e=t).registrationStatus&&e.registrationTime+c<Date.now()?{fid:t.fid,registrationStatus:0}:t;var e}function Z(t,e){var n=t.appConfig,r=t.platformLoggerProvider;return(0,a.__awaiter)(this,void 0,void 0,(function(){var t,i,o,s,u,l;return(0,a.__generator)(this,(function(a){switch(a.label){case 0:return t=function(t,e){var n=e.fid;return v(t)+"/"+n+"/authTokens:generate"}(n,e),i=w(n,e),(o=r.getImmediate({optional:!0}))&&i.append("x-firebase-client",o.getPlatformInfoString()),s={installation:{sdkVersion:f}},u={method:"POST",headers:i,body:JSON.stringify(s)},[4,_((function(){return fetch(t,u)}))];case 1:return(l=a.sent()).ok?[4,l.json()]:[3,3];case 2:return[2,y(a.sent())];case 3:return[4,b("Generate Auth Token",l)];case 4:throw a.sent()}}))}))}function G(t,e){return void 0===e&&(e=!1),(0,a.__awaiter)(this,void 0,void 0,(function(){var n,r,i;return(0,a.__generator)(this,(function(o){switch(o.label){case 0:return[4,U(t.appConfig,(function(r){if(!X(r))throw m.create("not-registered");var i,o=r.authToken;if(!e&&(2===(i=o).requestStatus&&!function(t){var e=Date.now();return e<t.creationTime||t.creationTime+t.expiresIn<e+36e5}(i)))return r;if(1===o.requestStatus)return n=function(t,e){return(0,a.__awaiter)(this,void 0,void 0,(function(){var n,r;return(0,a.__generator)(this,(function(i){switch(i.label){case 0:return[4,K(t.appConfig)];case 1:n=i.sent(),i.label=2;case 2:return 1!==n.authToken.requestStatus?[3,5]:[4,O(100)];case 3:return i.sent(),[4,K(t.appConfig)];case 4:return n=i.sent(),[3,2];case 5:return 0===(r=n.authToken).requestStatus?[2,G(t,e)]:[2,r]}}))}))}(t,e),r;if(!navigator.onLine)throw m.create("app-offline");var s=function(t){var e={requestStatus:1,requestTime:Date.now()};return(0,a.__assign)((0,a.__assign)({},t),{authToken:e})}(r);return n=function(t,e){return(0,a.__awaiter)(this,void 0,void 0,(function(){var n,r,i;return(0,a.__generator)(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,8]),[4,Z(t,e)];case 1:return n=o.sent(),i=(0,a.__assign)((0,a.__assign)({},e),{authToken:n}),[4,z(t.appConfig,i)];case 2:return o.sent(),[2,n];case 3:return!g(r=o.sent())||401!==r.serverCode&&404!==r.serverCode?[3,5]:[4,H(t.appConfig)];case 4:return o.sent(),[3,7];case 5:return i=(0,a.__assign)((0,a.__assign)({},e),{authToken:{requestStatus:0}}),[4,z(t.appConfig,i)];case 6:o.sent(),o.label=7;case 7:throw r;case 8:return[2]}}))}))}(t,s),s}))];case 1:return r=o.sent(),n?[4,n]:[3,3];case 2:return i=o.sent(),[3,4];case 3:i=r.authToken,o.label=4;case 4:return[2,i]}}))}))}function K(t){return U(t,(function(t){if(!X(t))throw m.create("not-registered");var e;return 1===(e=t.authToken).requestStatus&&e.requestTime+c<Date.now()?(0,a.__assign)((0,a.__assign)({},t),{authToken:{requestStatus:0}}):t}))}function X(t){return void 0!==t&&2===t.registrationStatus}function J(t){return(0,a.__awaiter)(this,void 0,void 0,(function(){var e;return(0,a.__generator)(this,(function(n){switch(n.label){case 0:return[4,W(t)];case 1:return(e=n.sent().registrationPromise)?[4,e]:[3,3];case 2:n.sent(),n.label=3;case 3:return[2]}}))}))}function Q(t,e){return(0,a.__awaiter)(this,void 0,void 0,(function(){var n,r,i,o;return(0,a.__generator)(this,(function(a){switch(a.label){case 0:return n=function(t,e){var n=e.fid;return v(t)+"/"+n}(t,e),r=w(t,e),i={method:"DELETE",headers:r},[4,_((function(){return fetch(n,i)}))];case 1:return(o=a.sent()).ok?[3,3]:[4,b("Delete Installation",o)];case 2:throw a.sent();case 3:return[2]}}))}))}function tt(t){return m.create("missing-app-config-values",{valueName:t})}(I=i.default).INTERNAL.registerComponent(new o.Component("installations",(function(t){var e=t.getProvider("app").getImmediate(),n=function(t){var e,n;if(!t||!t.options)throw tt("App Configuration");if(!t.name)throw tt("App Name");try{for(var r=(0,a.__values)(["projectId","apiKey","appId"]),i=r.next();!i.done;i=r.next()){var o=i.value;if(!t.options[o])throw tt(o)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}return{appName:t.name,projectId:t.options.projectId,apiKey:t.options.apiKey,appId:t.options.appId}}(e),r={appConfig:n,platformLoggerProvider:t.getProvider("platform-logger")},i={app:e,getId:function(){return function(t){return(0,a.__awaiter)(this,void 0,void 0,(function(){var e,n,r;return(0,a.__generator)(this,(function(i){switch(i.label){case 0:return[4,W(t.appConfig)];case 1:return e=i.sent(),n=e.installationEntry,(r=e.registrationPromise)?r.catch(console.error):G(t).catch(console.error),[2,n.fid]}}))}))}(r)},getToken:function(t){return function(t,e){return void 0===e&&(e=!1),(0,a.__awaiter)(this,void 0,void 0,(function(){return(0,a.__generator)(this,(function(n){switch(n.label){case 0:return[4,J(t.appConfig)];case 1:return n.sent(),[4,G(t,e)];case 2:return[2,n.sent().token]}}))}))}(r,t)},delete:function(){return function(t){return(0,a.__awaiter)(this,void 0,void 0,(function(){var e,n;return(0,a.__generator)(this,(function(r){switch(r.label){case 0:return[4,U(e=t.appConfig,(function(t){if(!t||0!==t.registrationStatus)return t}))];case 1:if(!(n=r.sent()))return[3,6];if(1!==n.registrationStatus)return[3,2];throw m.create("delete-pending-registration");case 2:if(2!==n.registrationStatus)return[3,6];if(navigator.onLine)return[3,3];throw m.create("app-offline");case 3:return[4,Q(e,n)];case 4:return r.sent(),[4,H(e)];case 5:r.sent(),r.label=6;case 6:return[2]}}))}))}(r)},onIdChange:function(t){return function(t,e){var n=t.appConfig;return function(t,e){j();var n=k(t),r=C.get(n);r||(r=new Set,C.set(n,r)),r.add(e)}(n,e),function(){!function(t,e){var n=k(t),r=C.get(n);r&&(r.delete(e),0===r.size&&C.delete(n),P())}(n,e)}}(r,t)}};return i}),"PUBLIC")),I.registerVersion("@firebase/installations",l);var et,nt=n(15086),rt=((et={})["missing-app-config-values"]='Missing App configuration value: "{$valueName}"',et["only-available-in-window"]="This method is available in a Window context.",et["only-available-in-sw"]="This method is available in a service worker context.",et["permission-default"]="The notification permission was not granted and dismissed instead.",et["permission-blocked"]="The notification permission was not granted and blocked instead.",et["unsupported-browser"]="This browser doesn't support the API's required to use the firebase SDK.",et["failed-service-worker-registration"]="We are unable to register the default service worker. {$browserErrorMessage}",et["token-subscribe-failed"]="A problem occured while subscribing the user to FCM: {$errorInfo}",et["token-subscribe-no-token"]="FCM returned no token when subscribing the user to push.",et["token-unsubscribe-failed"]="A problem occured while unsubscribing the user from FCM: {$errorInfo}",et["token-update-failed"]="A problem occured while updating the user from FCM: {$errorInfo}",et["token-update-no-token"]="FCM returned no token when updating the user to push.",et["use-sw-after-get-token"]="The useServiceWorker() method may only be called once and must be called before calling getToken() to ensure your service worker is used.",et["invalid-sw-registration"]="The input to useServiceWorker() must be a ServiceWorkerRegistration.",et["invalid-bg-handler"]="The input to setBackgroundMessageHandler() must be a function.",et["invalid-vapid-key"]="The public VAPID key must be a string.",et["use-vapid-key-after-get-token"]="The usePublicVapidKey() method may only be called once and must be called before calling getToken() to ensure your VAPID key is used.",et),it=new s.ErrorFactory("messaging","Messaging",rt);function ot(t){return it.create("missing-app-config-values",{valueName:t})}function at(t){var e=new Uint8Array(t);return btoa(String.fromCharCode.apply(String,(0,a.__spread)(e))).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function st(t){for(var e=(t+"=".repeat((4-t.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),n=atob(e),r=new Uint8Array(n.length),i=0;i<n.length;++i)r[i]=n.charCodeAt(i);return r}var ut="fcm_token_details_db",lt=5,ct="fcm_token_object_Store";function ft(t){return(0,a.__awaiter)(this,void 0,void 0,(function(){var e,n,r=this;return(0,a.__generator)(this,(function(i){switch(i.label){case 0:return"databases"in indexedDB?[4,indexedDB.databases()]:[3,2];case 1:if(e=i.sent(),!e.map((function(t){return t.name})).includes(ut))return[2,null];i.label=2;case 2:return n=null,[4,(0,nt.openDb)(ut,lt,(function(e){return(0,a.__awaiter)(r,void 0,void 0,(function(){var r,i,o,s;return(0,a.__generator)(this,(function(a){switch(a.label){case 0:return e.oldVersion<2?[2]:e.objectStoreNames.contains(ct)?[4,(r=e.transaction.objectStore(ct)).index("fcmSenderId").get(t)]:[2];case 1:return i=a.sent(),[4,r.clear()];case 2:if(a.sent(),!i)return[2];if(2===e.oldVersion){if(!(o=i).auth||!o.p256dh||!o.endpoint)return[2];n={token:o.fcmToken,createTime:null!==(s=o.createTime)&&void 0!==s?s:Date.now(),subscriptionOptions:{auth:o.auth,p256dh:o.p256dh,endpoint:o.endpoint,swScope:o.swScope,vapidKey:"string"==typeof o.vapidKey?o.vapidKey:at(o.vapidKey)}}}else(3===e.oldVersion||4===e.oldVersion)&&(n={token:(o=i).fcmToken,createTime:o.createTime,subscriptionOptions:{auth:at(o.auth),p256dh:at(o.p256dh),endpoint:o.endpoint,swScope:o.swScope,vapidKey:at(o.vapidKey)}});return[2]}}))}))}))];case 3:return i.sent().close(),[4,(0,nt.deleteDb)(ut)];case 4:return i.sent(),[4,(0,nt.deleteDb)("fcm_vapid_details_db")];case 5:return i.sent(),[4,(0,nt.deleteDb)("undefined")];case 6:return i.sent(),[2,ht(n)?n:null]}}))}))}function ht(t){if(!t||!t.subscriptionOptions)return!1;var e=t.subscriptionOptions;return"number"==typeof t.createTime&&t.createTime>0&&"string"==typeof t.token&&t.token.length>0&&"string"==typeof e.auth&&e.auth.length>0&&"string"==typeof e.p256dh&&e.p256dh.length>0&&"string"==typeof e.endpoint&&e.endpoint.length>0&&"string"==typeof e.swScope&&e.swScope.length>0&&"string"==typeof e.vapidKey&&e.vapidKey.length>0}var dt="firebase-messaging-database",pt=1,mt="firebase-messaging-store",gt=null;function vt(){return gt||(gt=(0,nt.openDb)(dt,pt,(function(t){0===t.oldVersion&&t.createObjectStore(mt)}))),gt}function yt(t){return(0,a.__awaiter)(this,void 0,void 0,(function(){var e,n,r;return(0,a.__generator)(this,(function(i){switch(i.label){case 0:return e=wt(t),[4,vt()];case 1:return[4,i.sent().transaction(mt).objectStore(mt).get(e)];case 2:return(n=i.sent())?[2,n]:[3,3];case 3:return[4,ft(t.appConfig.senderId)];case 4:return(r=i.sent())?[4,bt(t,r)]:[3,6];case 5:return i.sent(),[2,r];case 6:return[2]}}))}))}function bt(t,e){return(0,a.__awaiter)(this,void 0,void 0,(function(){var n,r,i;return(0,a.__generator)(this,(function(o){switch(o.label){case 0:return n=wt(t),[4,vt()];case 1:return r=o.sent(),[4,(i=r.transaction(mt,"readwrite")).objectStore(mt).put(e,n)];case 2:return o.sent(),[4,i.complete];case 3:return o.sent(),[2,e]}}))}))}function xt(t){return(0,a.__awaiter)(this,void 0,void 0,(function(){var e,n,r;return(0,a.__generator)(this,(function(i){switch(i.label){case 0:return e=wt(t),[4,vt()];case 1:return n=i.sent(),[4,(r=n.transaction(mt,"readwrite")).objectStore(mt).delete(e)];case 2:return i.sent(),[4,r.complete];case 3:return i.sent(),[2]}}))}))}function wt(t){return t.appConfig.appId}var _t,St="BDOU99-h67HcA6JeFXHbSNMu7e2yNNu3RzoMj8TM4W88jITfq7ZmPvIM1Iv-4_l2LxQcYwhqby2xGpWwzjfAnG4",Ot="https://fcmregistrations.googleapis.com/v1",Nt="FCM_MSG",Mt="google.c.a.c_id";function Et(t,e){return(0,a.__awaiter)(this,void 0,void 0,(function(){var n,r,i,o,s,u;return(0,a.__generator)(this,(function(a){switch(a.label){case 0:return[4,Dt(t)];case 1:n=a.sent(),r=At(e),i={method:"POST",headers:n,body:JSON.stringify(r)},a.label=2;case 2:return a.trys.push([2,5,,6]),[4,fetch(Tt(t.appConfig),i)];case 3:return[4,a.sent().json()];case 4:return o=a.sent(),[3,6];case 5:throw s=a.sent(),it.create("token-subscribe-failed",{errorInfo:s});case 6:if(o.error)throw u=o.error.message,it.create("token-subscribe-failed",{errorInfo:u});if(!o.token)throw it.create("token-subscribe-no-token");return[2,o.token]}}))}))}function kt(t,e){return(0,a.__awaiter)(this,void 0,void 0,(function(){var n,r,i,o,s,u;return(0,a.__generator)(this,(function(a){switch(a.label){case 0:return[4,Dt(t)];case 1:n=a.sent(),r=At(e.subscriptionOptions),i={method:"PATCH",headers:n,body:JSON.stringify(r)},a.label=2;case 2:return a.trys.push([2,5,,6]),[4,fetch(Tt(t.appConfig)+"/"+e.token,i)];case 3:return[4,a.sent().json()];case 4:return o=a.sent(),[3,6];case 5:throw s=a.sent(),it.create("token-update-failed",{errorInfo:s});case 6:if(o.error)throw u=o.error.message,it.create("token-update-failed",{errorInfo:u});if(!o.token)throw it.create("token-update-no-token");return[2,o.token]}}))}))}function Ct(t,e){return(0,a.__awaiter)(this,void 0,void 0,(function(){var n,r,i,o,s;return(0,a.__generator)(this,(function(a){switch(a.label){case 0:return[4,Dt(t)];case 1:n=a.sent(),r={method:"DELETE",headers:n},a.label=2;case 2:return a.trys.push([2,5,,6]),[4,fetch(Tt(t.appConfig)+"/"+e,r)];case 3:return[4,a.sent().json()];case 4:if((i=a.sent()).error)throw o=i.error.message,it.create("token-unsubscribe-failed",{errorInfo:o});return[3,6];case 5:throw s=a.sent(),it.create("token-unsubscribe-failed",{errorInfo:s});case 6:return[2]}}))}))}function Tt(t){var e=t.projectId;return Ot+"/projects/"+e+"/registrations"}function Dt(t){var e=t.appConfig,n=t.installations;return(0,a.__awaiter)(this,void 0,void 0,(function(){var t;return(0,a.__generator)(this,(function(r){switch(r.label){case 0:return[4,n.getToken()];case 1:return t=r.sent(),[2,new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e.apiKey,"x-goog-firebase-installations-auth":"FIS "+t})]}}))}))}function At(t){var e=t.p256dh,n=t.auth,r=t.endpoint,i=t.vapidKey,o={web:{endpoint:r,auth:n,p256dh:e}};return i!==St&&(o.web.applicationPubKey=i),o}function jt(t,e,n){return(0,a.__awaiter)(this,void 0,void 0,(function(){var r,i,o,s;return(0,a.__generator)(this,(function(a){switch(a.label){case 0:if("granted"!==Notification.permission)throw it.create("permission-blocked");return[4,Lt(e,n)];case 1:return r=a.sent(),[4,yt(t)];case 2:return i=a.sent(),o={vapidKey:n,swScope:e.scope,endpoint:r.endpoint,auth:at(r.getKey("auth")),p256dh:at(r.getKey("p256dh"))},i?[3,3]:[2,Rt(t,o)];case 3:if(u=i.subscriptionOptions,c=(l=o).vapidKey===u.vapidKey,f=l.endpoint===u.endpoint,h=l.auth===u.auth,d=l.p256dh===u.p256dh,c&&f&&h&&d)return[3,8];a.label=4;case 4:return a.trys.push([4,6,,7]),[4,Ct(t,i.token)];case 5:return a.sent(),[3,7];case 6:return s=a.sent(),console.warn(s),[3,7];case 7:return[2,Rt(t,o)];case 8:return Date.now()>=i.createTime+6048e5?[2,It({token:i.token,createTime:Date.now(),subscriptionOptions:o},t,e)]:[2,i.token];case 9:return[2]}var u,l,c,f,h,d}))}))}function Pt(t,e){return(0,a.__awaiter)(this,void 0,void 0,(function(){var n,r;return(0,a.__generator)(this,(function(i){switch(i.label){case 0:return[4,yt(t)];case 1:return(n=i.sent())?[4,Ct(t,n.token)]:[3,4];case 2:return i.sent(),[4,xt(t)];case 3:i.sent(),i.label=4;case 4:return[4,e.pushManager.getSubscription()];case 5:return(r=i.sent())?[2,r.unsubscribe()]:[2,!0]}}))}))}function It(t,e,n){return(0,a.__awaiter)(this,void 0,void 0,(function(){var r,i,o;return(0,a.__generator)(this,(function(s){switch(s.label){case 0:return s.trys.push([0,3,,5]),[4,kt(e,t)];case 1:return r=s.sent(),i=(0,a.__assign)({token:r,createTime:Date.now()},t),[4,bt(e,i)];case 2:return s.sent(),[2,r];case 3:return o=s.sent(),[4,Pt(e,n)];case 4:throw s.sent(),o;case 5:return[2]}}))}))}function Rt(t,e){return(0,a.__awaiter)(this,void 0,void 0,(function(){var n,r;return(0,a.__generator)(this,(function(i){switch(i.label){case 0:return[4,Et(t,e)];case 1:return n=i.sent(),r={token:n,createTime:Date.now(),subscriptionOptions:e},[4,bt(t,r)];case 2:return i.sent(),[2,r.token]}}))}))}function Lt(t,e){return(0,a.__awaiter)(this,void 0,void 0,(function(){var n;return(0,a.__generator)(this,(function(r){switch(r.label){case 0:return[4,t.pushManager.getSubscription()];case 1:return(n=r.sent())?[2,n]:[2,t.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:st(e)})]}}))}))}function Ft(t){return"object"==typeof t&&!!t&&Mt in t}!function(t){t.PUSH_RECEIVED="push-received",t.NOTIFICATION_CLICKED="notification-clicked"}(_t||(_t={}));var qt=function(){function t(t){var e=this;this.firebaseDependencies=t,this.vapidKey=null,this.onMessageCallback=null,navigator.serviceWorker.addEventListener("message",(function(t){return e.messageEventListener(t)}))}return Object.defineProperty(t.prototype,"app",{get:function(){return this.firebaseDependencies.app},enumerable:!0,configurable:!0}),t.prototype.getToken=function(){return(0,a.__awaiter)(this,void 0,void 0,(function(){var t;return(0,a.__generator)(this,(function(e){switch(e.label){case 0:return this.vapidKey||(this.vapidKey=St),[4,this.getServiceWorkerRegistration()];case 1:return t=e.sent(),"default"!==Notification.permission?[3,3]:[4,Notification.requestPermission()];case 2:e.sent(),e.label=3;case 3:if("granted"!==Notification.permission)throw it.create("permission-blocked");return[2,jt(this.firebaseDependencies,t,this.vapidKey)]}}))}))},t.prototype.deleteToken=function(){return(0,a.__awaiter)(this,void 0,void 0,(function(){var t;return(0,a.__generator)(this,(function(e){switch(e.label){case 0:return[4,this.getServiceWorkerRegistration()];case 1:return t=e.sent(),[2,Pt(this.firebaseDependencies,t)]}}))}))},t.prototype.requestPermission=function(){return(0,a.__awaiter)(this,void 0,void 0,(function(){var t;return(0,a.__generator)(this,(function(e){switch(e.label){case 0:return"granted"===Notification.permission?[2]:[4,Notification.requestPermission()];case 1:if("granted"===(t=e.sent()))return[2];throw"denied"===t?it.create("permission-blocked"):it.create("permission-default")}}))}))},t.prototype.usePublicVapidKey=function(t){if(null!==this.vapidKey)throw it.create("use-vapid-key-after-get-token");if("string"!=typeof t||0===t.length)throw it.create("invalid-vapid-key");this.vapidKey=t},t.prototype.useServiceWorker=function(t){if(!(t instanceof ServiceWorkerRegistration))throw it.create("invalid-sw-registration");if(this.swRegistration)throw it.create("use-sw-after-get-token");this.swRegistration=t},t.prototype.onMessage=function(t){var e=this;return this.onMessageCallback="function"==typeof t?t:t.next,function(){e.onMessageCallback=null}},t.prototype.setBackgroundMessageHandler=function(){throw it.create("only-available-in-sw")},t.prototype.onTokenRefresh=function(){return function(){}},t.prototype.getServiceWorkerRegistration=function(){return(0,a.__awaiter)(this,void 0,void 0,(function(){var t,e;return(0,a.__generator)(this,(function(n){switch(n.label){case 0:if(this.swRegistration)return[3,4];n.label=1;case 1:return n.trys.push([1,3,,4]),t=this,[4,navigator.serviceWorker.register("/firebase-messaging-sw.js",{scope:"/firebase-cloud-messaging-push-scope"})];case 2:return t.swRegistration=n.sent(),this.swRegistration.update().catch((function(){})),[3,4];case 3:throw e=n.sent(),it.create("failed-service-worker-registration",{browserErrorMessage:e.message});case 4:return[2,this.swRegistration]}}))}))},t.prototype.messageEventListener=function(t){var e;return(0,a.__awaiter)(this,void 0,void 0,(function(){var n,r,i,o;return(0,a.__generator)(this,(function(a){switch(a.label){case 0:return(null===(e=t.data)||void 0===e?void 0:e.firebaseMessaging)?(n=t.data.firebaseMessaging,r=n.type,i=n.payload,this.onMessageCallback&&r===_t.PUSH_RECEIVED&&this.onMessageCallback(i),Ft(o=i.data)&&"1"===o["google.c.a.e"]?[4,this.logEvent(r,o)]:[3,2]):[2];case 1:a.sent(),a.label=2;case 2:return[2]}}))}))},t.prototype.logEvent=function(t,e){return(0,a.__awaiter)(this,void 0,void 0,(function(){var n;return(0,a.__generator)(this,(function(r){switch(r.label){case 0:return n=function(t){switch(t){case _t.NOTIFICATION_CLICKED:return"notification_open";case _t.PUSH_RECEIVED:return"notification_foreground";default:throw new Error}}(t),[4,this.firebaseDependencies.analyticsProvider.get()];case 1:return r.sent().logEvent(n,{message_id:e[Mt],message_name:e["google.c.a.c_l"],message_time:e["google.c.a.ts"],message_device_time:Math.floor(Date.now()/1e3)}),[2]}}))}))},t}(),Bt=function(){function t(t){var e=this;this.firebaseDependencies=t,this.vapidKey=null,this.bgMessageHandler=null,self.addEventListener("push",(function(t){t.waitUntil(e.onPush(t))})),self.addEventListener("pushsubscriptionchange",(function(t){t.waitUntil(e.onSubChange(t))})),self.addEventListener("notificationclick",(function(t){t.waitUntil(e.onNotificationClick(t))}))}return Object.defineProperty(t.prototype,"app",{get:function(){return this.firebaseDependencies.app},enumerable:!0,configurable:!0}),t.prototype.setBackgroundMessageHandler=function(t){if(!t||"function"!=typeof t)throw it.create("invalid-bg-handler");this.bgMessageHandler=t},t.prototype.getToken=function(){var t,e;return(0,a.__awaiter)(this,void 0,void 0,(function(){var n;return(0,a.__generator)(this,(function(r){switch(r.label){case 0:return this.vapidKey?[3,2]:[4,yt(this.firebaseDependencies)];case 1:n=r.sent(),this.vapidKey=null!==(e=null===(t=null==n?void 0:n.subscriptionOptions)||void 0===t?void 0:t.vapidKey)&&void 0!==e?e:St,r.label=2;case 2:return[2,jt(this.firebaseDependencies,self.registration,this.vapidKey)]}}))}))},t.prototype.deleteToken=function(){return Pt(this.firebaseDependencies,self.registration)},t.prototype.requestPermission=function(){throw it.create("only-available-in-window")},t.prototype.usePublicVapidKey=function(t){if(null!==this.vapidKey)throw it.create("use-vapid-key-after-get-token");if("string"!=typeof t||0===t.length)throw it.create("invalid-vapid-key");this.vapidKey=t},t.prototype.useServiceWorker=function(){throw it.create("only-available-in-window")},t.prototype.onMessage=function(){throw it.create("only-available-in-window")},t.prototype.onTokenRefresh=function(){throw it.create("only-available-in-window")},t.prototype.onPush=function(t){return(0,a.__awaiter)(this,void 0,void 0,(function(){var e,n,r;return(0,a.__generator)(this,(function(i){switch(i.label){case 0:return e=function(t){var e=t.data;if(!e)return null;try{return e.json()}catch(t){return null}}(t),e?[4,Ut()]:[2];case 1:return function(t){return t.some((function(t){return"visible"===t.visibilityState&&!t.url.startsWith("chrome-extension://")}))}(n=i.sent())?[2,Ht(n,e)]:(r=function(t){var e;if(t&&"object"==typeof t.notification){var n=(0,a.__assign)({},t.notification);return n.data=(0,a.__assign)((0,a.__assign)({},t.notification.data),((e={})[Nt]=t,e)),n}}(e),r?[4,Vt(r)]:[3,3]);case 2:return i.sent(),[3,5];case 3:return this.bgMessageHandler?[4,this.bgMessageHandler(e)]:[3,5];case 4:i.sent(),i.label=5;case 5:return[2]}}))}))},t.prototype.onSubChange=function(t){var e,n;return(0,a.__awaiter)(this,void 0,void 0,(function(){var r;return(0,a.__generator)(this,(function(i){switch(i.label){case 0:return t.newSubscription?[3,2]:[4,Pt(this.firebaseDependencies,self.registration)];case 1:case 5:return i.sent(),[2];case 2:return[4,yt(this.firebaseDependencies)];case 3:return r=i.sent(),[4,Pt(this.firebaseDependencies,self.registration)];case 4:return i.sent(),[4,jt(this.firebaseDependencies,self.registration,null!==(n=null===(e=null==r?void 0:r.subscriptionOptions)||void 0===e?void 0:e.vapidKey)&&void 0!==n?n:St)]}}))}))},t.prototype.onNotificationClick=function(t){var e,n;return(0,a.__awaiter)(this,void 0,void 0,(function(){var r,i,o,s;return(0,a.__generator)(this,(function(a){switch(a.label){case 0:return(r=null===(n=null===(e=t.notification)||void 0===e?void 0:e.data)||void 0===n?void 0:n[Nt])?t.action?[2]:(t.stopImmediatePropagation(),t.notification.close(),i=function(t){var e,n,r,i=null!==(n=null===(e=t.fcmOptions)||void 0===e?void 0:e.link)&&void 0!==n?n:null===(r=t.notification)||void 0===r?void 0:r.click_action;return i||(Ft(t.data)?self.location.origin:null)}(r),i?[4,zt(i)]:[2]):[2];case 1:return(o=a.sent())?[3,4]:[4,self.clients.openWindow(i)];case 2:return o=a.sent(),[4,(3e3,new Promise((function(t){setTimeout(t,3e3)})))];case 3:return a.sent(),[3,6];case 4:return[4,o.focus()];case 5:o=a.sent(),a.label=6;case 6:return o?(s=Wt(_t.NOTIFICATION_CLICKED,r),[2,o.postMessage(s)]):[2]}}))}))},t}();function zt(t){return(0,a.__awaiter)(this,void 0,void 0,(function(){var e,n,r,i,o,s,u;return(0,a.__generator)(this,(function(l){switch(l.label){case 0:return e=new URL(t,self.location.href).href,[4,Ut()];case 1:n=l.sent();try{for(r=(0,a.__values)(n),i=r.next();!i.done;i=r.next())if(o=i.value,new URL(o.url,self.location.href).href===e)return[2,o]}catch(t){s={error:t}}finally{try{i&&!i.done&&(u=r.return)&&u.call(r)}finally{if(s)throw s.error}}return[2,null]}}))}))}function Ht(t,e){var n,r,i=Wt(_t.PUSH_RECEIVED,e);try{for(var o=(0,a.__values)(t),s=o.next();!s.done;s=o.next())s.value.postMessage(i)}catch(t){n={error:t}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}function Ut(){return self.clients.matchAll({type:"window",includeUncontrolled:!0})}function Wt(t,e){return{firebaseMessaging:{type:t,payload:e}}}function Vt(t){var e,n=null!==(e=t.title)&&void 0!==e?e:"",r=t.actions,i=Notification.maxActions;return r&&i&&r.length>i&&console.warn("This browser only supports "+i+" actions. The remaining actions will not be displayed."),self.registration.showNotification(n,t)}var $t={isSupported:Yt};function Yt(){return self&&"ServiceWorkerGlobalScope"in self?"indexedDB"in self&&null!==indexedDB&&"PushManager"in self&&"Notification"in self&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey"):"indexedDB"in window&&null!==indexedDB&&navigator.cookieEnabled&&"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window&&"fetch"in window&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")}i.default.INTERNAL.registerComponent(new o.Component("messaging",(function(t){var e=t.getProvider("app").getImmediate(),n=function(t){var e,n;if(!t||!t.options)throw ot("App Configuration Object");if(!t.name)throw ot("App Name");var r=t.options;try{for(var i=(0,a.__values)(["projectId","apiKey","appId","messagingSenderId"]),o=i.next();!o.done;o=i.next()){var s=o.value;if(!r[s])throw ot(s)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return{appName:t.name,projectId:r.projectId,apiKey:r.apiKey,appId:r.appId,senderId:r.messagingSenderId}}(e),r={app:e,appConfig:n,installations:t.getProvider("installations").getImmediate(),analyticsProvider:t.getProvider("analytics-internal")};if(!Yt())throw it.create("unsupported-browser");return self&&"ServiceWorkerGlobalScope"in self?new Bt(r):new qt(r)}),"PUBLIC").setServiceProps($t))},54483:function(t,e,n){"use strict";var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(67294),o=n(63172),a=["active","paused","tag","focusTrapOptions","_createFocusTrap"],s=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.setNode=function(t){n.node=t},"undefined"!=typeof document&&(n.previouslyFocusedElement=document.activeElement),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"componentDidMount",value:function(){var t=this.props.focusTrapOptions,e={returnFocusOnDeactivate:!1};for(var n in t)t.hasOwnProperty(n)&&"returnFocusOnDeactivate"!==n&&(e[n]=t[n]);this.focusTrap=this.props._createFocusTrap(this.node,e),this.props.active&&this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause()}},{key:"componentDidUpdate",value:function(t){if(t.active&&!this.props.active){var e={returnFocus:this.props.focusTrapOptions.returnFocusOnDeactivate||!1};this.focusTrap.deactivate(e)}else!t.active&&this.props.active&&this.focusTrap.activate();t.paused&&!this.props.paused?this.focusTrap.unpause():!t.paused&&this.props.paused&&this.focusTrap.pause()}},{key:"componentWillUnmount",value:function(){this.focusTrap.deactivate(),!1!==this.props.focusTrapOptions.returnFocusOnDeactivate&&this.previouslyFocusedElement&&this.previouslyFocusedElement.focus&&this.previouslyFocusedElement.focus()}},{key:"render",value:function(){var t={ref:this.setNode};for(var e in this.props)this.props.hasOwnProperty(e)&&-1===a.indexOf(e)&&(t[e]=this.props[e]);return i.createElement(this.props.tag,t,this.props.children)}}]),e}(i.Component);s.defaultProps={active:!0,tag:"div",paused:!1,focusTrapOptions:{},_createFocusTrap:o},t.exports=s},63172:function(t,e,n){var r=n(34760),i=n(47529),o=null;function a(t){return setTimeout(t,0)}t.exports=function(t,e){var n=document,s="string"==typeof t?n.querySelector(t):t,u=i({returnFocusOnDeactivate:!0,escapeDeactivates:!0},e),l={firstTabbableNode:null,lastTabbableNode:null,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1},c={activate:function(t){if(!l.active){x(),l.active=!0,l.paused=!1,l.nodeFocusedBeforeActivation=n.activeElement;var e=t&&t.onActivate?t.onActivate:u.onActivate;return e&&e(),h(),c}},deactivate:f,pause:function(){!l.paused&&l.active&&(l.paused=!0,d())},unpause:function(){l.paused&&l.active&&(l.paused=!1,h())}};return c;function f(t){if(l.active){d(),l.active=!1,l.paused=!1;var e=t&&void 0!==t.onDeactivate?t.onDeactivate:u.onDeactivate;return e&&e(),(t&&void 0!==t.returnFocus?t.returnFocus:u.returnFocusOnDeactivate)&&a((function(){w(l.nodeFocusedBeforeActivation)})),c}}function h(){if(l.active)return o&&o.pause(),o=c,x(),a((function(){w(m())})),n.addEventListener("focusin",v,!0),n.addEventListener("mousedown",g,!0),n.addEventListener("touchstart",g,!0),n.addEventListener("click",b,!0),n.addEventListener("keydown",y,!0),c}function d(){if(l.active&&o===c)return n.removeEventListener("focusin",v,!0),n.removeEventListener("mousedown",g,!0),n.removeEventListener("touchstart",g,!0),n.removeEventListener("click",b,!0),n.removeEventListener("keydown",y,!0),o=null,c}function p(t){var e=u[t],r=e;if(!e)return null;if("string"==typeof e&&!(r=n.querySelector(e)))throw new Error("`"+t+"` refers to no known node");if("function"==typeof e&&!(r=e()))throw new Error("`"+t+"` did not return a node");return r}function m(){var t;if(!(t=null!==p("initialFocus")?p("initialFocus"):s.contains(n.activeElement)?n.activeElement:l.firstTabbableNode||p("fallbackFocus")))throw new Error("You can't have a focus-trap without at least one focusable element");return t}function g(t){s.contains(t.target)||(u.clickOutsideDeactivates?f({returnFocus:!r.isFocusable(t.target)}):t.preventDefault())}function v(t){s.contains(t.target)||t.target instanceof Document||(t.stopImmediatePropagation(),w(l.mostRecentlyFocusedNode||m()))}function y(t){if(!1!==u.escapeDeactivates&&function(t){return"Escape"===t.key||"Esc"===t.key||27===t.keyCode}(t))return t.preventDefault(),void f();(function(t){return"Tab"===t.key||9===t.keyCode})(t)&&function(t){if(x(),t.shiftKey&&t.target===l.firstTabbableNode)return t.preventDefault(),void w(l.lastTabbableNode);t.shiftKey||t.target!==l.lastTabbableNode||(t.preventDefault(),w(l.firstTabbableNode))}(t)}function b(t){u.clickOutsideDeactivates||s.contains(t.target)||(t.preventDefault(),t.stopImmediatePropagation())}function x(){var t=r(s);l.firstTabbableNode=t[0]||m(),l.lastTabbableNode=t[t.length-1]||m()}function w(t){t!==n.activeElement&&(t&&t.focus?(t.focus(),l.mostRecentlyFocusedNode=t,function(t){return t.tagName&&"input"===t.tagName.toLowerCase()&&"function"==typeof t.select}(t)&&t.select()):w(m()))}}},82414:function(t,e,n){!function(t,e,n,r){"use strict";Foundation.libs.accordion={name:"accordion",version:"5.5.3",settings:{content_class:"content",active_class:"active",multi_expand:!1,toggleable:!0,callback:function(){}},init:function(t,e,n){this.bindings(e,n)},events:function(e){var n=this,r=this.S;n.create(this.S(e)),r(this.scope).off(".fndtn.accordion").on("click.fndtn.accordion","["+this.attr_name()+"] > dd > a, ["+this.attr_name()+"] > li > a",(function(e){var i=r(this).closest("["+n.attr_name()+"]"),o=n.attr_name()+"="+i.attr(n.attr_name()),a=i.data(n.attr_name(!0)+"-init")||n.settings,s=r("#"+this.href.split("#")[1]),u=t("> dd, > li",i),l=u.children("."+a.content_class),c=l.filter("."+a.active_class);if(e.preventDefault(),i.attr(n.attr_name())&&(l=l.add("["+o+"] dd > ."+a.content_class+", ["+o+"] li > ."+a.content_class),u=u.add("["+o+"] dd, ["+o+"] li")),a.toggleable&&s.is(c))return s.parent("dd, li").toggleClass(a.active_class,!1),s.toggleClass(a.active_class,!1),r(this).attr("aria-expanded",(function(t,e){return"true"===e?"false":"true"})),a.callback(s),s.triggerHandler("toggled",[i]),void i.triggerHandler("toggled",[s]);a.multi_expand||(l.removeClass(a.active_class),u.removeClass(a.active_class),u.children("a").attr("aria-expanded","false")),s.addClass(a.active_class).parent().addClass(a.active_class),a.callback(s),s.triggerHandler("toggled",[i]),i.triggerHandler("toggled",[s]),r(this).attr("aria-expanded","true")}))},create:function(e){var n=e,r=t("> .accordion-navigation",n),i=n.data(this.attr_name(!0)+"-init")||this.settings;r.children("a").attr("aria-expanded","false"),r.has("."+i.content_class+"."+i.active_class).addClass(i.active_class).children("a").attr("aria-expanded","true"),i.multi_expand&&e.attr("aria-multiselectable","true")},toggle:function(t){var n=void 0!==(t=void 0!==t?t:{}).selector?t.selector:"",r=void 0!==t.toggle_state?t.toggle_state:"",i=(void 0!==t.$accordion?t.$accordion:this.S(this.scope).closest("["+this.attr_name()+"]")).find("> dd"+n+", > li"+n);if(i.length<1)return e.console&&console.error("Selection not found.",n),!1;var o=this.S,a=this.settings.active_class;i.each((function(){var t=o(this),e=t.hasClass(a);(e&&"close"===r||!e&&"open"===r||""===r)&&t.find("> a").trigger("click.fndtn.accordion")}))},open:function(t){(t=void 0!==t?t:{}).toggle_state="open",this.toggle(t)},close:function(t){(t=void 0!==t?t:{}).toggle_state="close",this.toggle(t)},off:function(){},reflow:function(){}}}(n(19755),window,window.document)},13832:function(t,e,n){!function(t,e,n,r){"use strict";Foundation.libs.dropdown={name:"dropdown",version:"5.5.3",settings:{active_class:"open",disabled_class:"disabled",mega_class:"mega",align:"bottom",is_hover:!1,hover_timeout:150,opened:function(){},closed:function(){}},init:function(e,n,r){Foundation.inherit(this,"throttle"),t.extend(!0,this.settings,n,r),this.bindings(n,r)},events:function(r){var i=this,o=i.S;o(this.scope).off(".dropdown").on("click.fndtn.dropdown","["+this.attr_name()+"]",(function(e){(o(this).data(i.attr_name(!0)+"-init")||i.settings).is_hover&&!Modernizr.touch||(e.preventDefault(),o(this).parent("[data-reveal-id]").length&&e.stopPropagation(),i.toggle(t(this)))})).on("mouseenter.fndtn.dropdown","["+this.attr_name()+"], ["+this.attr_name()+"-content]",(function(t){var e,n,r=o(this);clearTimeout(i.timeout),r.data(i.data_attr())?(e=o("#"+r.data(i.data_attr())),n=r):(e=r,n=o("["+i.attr_name()+'="'+e.attr("id")+'"]'));var a=n.data(i.attr_name(!0)+"-init")||i.settings;o(t.currentTarget).data(i.data_attr())&&a.is_hover&&i.closeall.call(i),a.is_hover&&i.open.apply(i,[e,n])})).on("mouseleave.fndtn.dropdown","["+this.attr_name()+"], ["+this.attr_name()+"-content]",(function(t){var e=o(this);if(e.data(i.data_attr()))n=e.data(i.data_attr(!0)+"-init")||i.settings;else var n=o("["+i.attr_name()+'="'+o(this).attr("id")+'"]').data(i.attr_name(!0)+"-init")||i.settings;i.timeout=setTimeout(function(){e.data(i.data_attr())?n.is_hover&&i.close.call(i,o("#"+e.data(i.data_attr()))):n.is_hover&&i.close.call(i,e)}.bind(this),n.hover_timeout)})).on("click.fndtn.dropdown",(function(e){var r=o(e.target).closest("["+i.attr_name()+"-content]");r.find("a").length>0&&"false"!==r.attr("aria-autoclose")&&i.close.call(i,o("["+i.attr_name()+"-content]")),(e.target===n||t.contains(n.documentElement,e.target))&&(o(e.target).closest("["+i.attr_name()+"]").length>0||(!o(e.target).data("revealId")&&r.length>0&&(o(e.target).is("["+i.attr_name()+"-content]")||t.contains(r.first()[0],e.target))?e.stopPropagation():i.close.call(i,o("["+i.attr_name()+"-content]"))))})).on("opened.fndtn.dropdown","["+i.attr_name()+"-content]",(function(){i.settings.opened.call(this)})).on("closed.fndtn.dropdown","["+i.attr_name()+"-content]",(function(){i.settings.closed.call(this)})),o(e).off(".dropdown").on("resize.fndtn.dropdown",i.throttle((function(){i.resize.call(i)}),50)),this.resize()},close:function(e){var n=this;e.each((function(r){(t("["+n.attr_name()+"="+e[r].id+"]")||t("aria-controls="+e[r].id+"]")).attr("aria-expanded","false"),n.S(this).hasClass(n.settings.active_class)&&(n.S(this).css(Foundation.rtl?"right":"left","-99999px").attr("aria-hidden","true").removeClass(n.settings.active_class).prev("["+n.attr_name()+"]").removeClass(n.settings.active_class).removeData("target"),n.S(this).trigger("closed.fndtn.dropdown",[e]))})),e.removeClass("f-open-"+this.attr_name(!0))},closeall:function(){var e=this;t.each(e.S(".f-open-"+this.attr_name(!0)),(function(){e.close.call(e,e.S(this))}))},open:function(t,e){this.css(t.addClass(this.settings.active_class),e),t.prev("["+this.attr_name()+"]").addClass(this.settings.active_class),t.data("target",e.get(0)).trigger("opened.fndtn.dropdown",[t,e]),t.attr("aria-hidden","false"),e.attr("aria-expanded","true"),t.focus(),t.addClass("f-open-"+this.attr_name(!0))},data_attr:function(){return this.namespace.length>0?this.namespace+"-"+this.name:this.name},toggle:function(t){if(!t.hasClass(this.settings.disabled_class)){var e=this.S("#"+t.data(this.data_attr()));0!==e.length&&(this.close.call(this,this.S("["+this.attr_name()+"-content]").not(e)),e.hasClass(this.settings.active_class)?(this.close.call(this,e),e.data("target")!==t.get(0)&&this.open.call(this,e,t)):this.open.call(this,e,t))}},resize:function(){var e=this.S("["+this.attr_name()+"-content].open"),n=t(e.data("target"));e.length&&n.length&&this.css(e,n)},css:function(t,e){var n=Math.max((e.width()-t.width())/2,8),r=e.data(this.attr_name(!0)+"-init")||this.settings,i=t.parent().css("overflow-y")||t.parent().css("overflow");if(this.clear_idx(),this.small()){var o=this.dirs.bottom.call(t,e,r);t.attr("style","").removeClass("drop-left drop-right drop-top").css({position:"absolute",width:"95%","max-width":"none",top:o.top}),t.css(Foundation.rtl?"right":"left",n)}else if("visible"!==i){var a=e[0].offsetTop+e[0].offsetHeight;t.attr("style","").css({position:"absolute",top:a}),t.css(Foundation.rtl?"right":"left",n)}else this.style(t,e,r);return t},style:function(e,n,r){var i=t.extend({position:"absolute"},this.dirs[r.align].call(e,n,r));e.attr("style","").css(i)},dirs:{_base:function(t,r){var i=this.offsetParent().offset(),o=t.offset();o.top-=i.top,o.left-=i.left,o.missRight=!1,o.missTop=!1,o.missLeft=!1,o.leftRightFlag=!1;var a=e.innerWidth,s=(a-(n.getElementsByClassName("row")[0]?n.getElementsByClassName("row")[0].clientWidth:a))/2;if(!this.hasClass("mega")&&!r.ignore_repositioning){var u=this.outerWidth(),l=t.offset().left;t.offset().top<=this.outerHeight()&&(o.missTop=!0,o.leftRightFlag=!0),l+u>l+s&&l-s>u&&(o.missRight=!0,o.missLeft=!1),l-u<=0&&(o.missLeft=!0,o.missRight=!1)}return o},top:function(t,e){var n=Foundation.libs.dropdown,r=n.dirs._base.call(this,t,e);return this.addClass("drop-top"),1==r.missTop&&(r.top=r.top+t.outerHeight()+this.outerHeight(),this.removeClass("drop-top")),1==r.missRight&&(r.left=r.left-this.outerWidth()+t.outerWidth()),(t.outerWidth()<this.outerWidth()||n.small()||this.hasClass(e.mega_menu))&&n.adjust_pip(this,t,e,r),Foundation.rtl?{left:r.left-this.outerWidth()+t.outerWidth(),top:r.top-this.outerHeight()}:{left:r.left,top:r.top-this.outerHeight()}},bottom:function(t,e){var n=Foundation.libs.dropdown,r=n.dirs._base.call(this,t,e);return 1==r.missRight&&(r.left=r.left-this.outerWidth()+t.outerWidth()),(t.outerWidth()<this.outerWidth()||n.small()||this.hasClass(e.mega_menu))&&n.adjust_pip(this,t,e,r),n.rtl?{left:r.left-this.outerWidth()+t.outerWidth(),top:r.top+t.outerHeight()}:{left:r.left,top:r.top+t.outerHeight()}},left:function(t,e){var n=Foundation.libs.dropdown.dirs._base.call(this,t,e);return this.addClass("drop-left"),1==n.missLeft&&(n.left=n.left+this.outerWidth(),n.top=n.top+t.outerHeight(),this.removeClass("drop-left")),{left:n.left-this.outerWidth(),top:n.top}},right:function(t,e){var n=Foundation.libs.dropdown.dirs._base.call(this,t,e);this.addClass("drop-right"),1==n.missRight?(n.left=n.left-this.outerWidth(),n.top=n.top+t.outerHeight(),this.removeClass("drop-right")):n.triggeredRight=!0;var r=Foundation.libs.dropdown;return(t.outerWidth()<this.outerWidth()||r.small()||this.hasClass(e.mega_menu))&&r.adjust_pip(this,t,e,n),{left:n.left+t.outerWidth(),top:n.top}}},adjust_pip:function(t,e,n,r){var i=Foundation.stylesheet,o=8;t.hasClass(n.mega_class)?o=r.left+e.outerWidth()/2-8:this.small()&&(o+=r.left-8),this.rule_idx=i.cssRules.length;var a=".f-dropdown.open:before",s=".f-dropdown.open:after",u="left: "+o+"px;",l="left: "+(o-1)+"px;";1==r.missRight&&(a=".f-dropdown.open:before",s=".f-dropdown.open:after",u="left: "+(o=t.outerWidth()-23)+"px;",l="left: "+(o-1)+"px;"),1==r.triggeredRight&&(a=".f-dropdown.open:before",s=".f-dropdown.open:after",u="left:-12px;",l="left:-14px;"),i.insertRule?(i.insertRule([a,"{",u,"}"].join(" "),this.rule_idx),i.insertRule([s,"{",l,"}"].join(" "),this.rule_idx+1)):(i.addRule(a,u,this.rule_idx),i.addRule(s,l,this.rule_idx+1))},clear_idx:function(){var t=Foundation.stylesheet;void 0!==this.rule_idx&&(t.deleteRule(this.rule_idx),t.deleteRule(this.rule_idx),delete this.rule_idx)},small:function(){return matchMedia(Foundation.media_queries.small).matches&&!matchMedia(Foundation.media_queries.medium).matches},off:function(){this.S(this.scope).off(".fndtn.dropdown"),this.S("html, body").off(".fndtn.dropdown"),this.S(e).off(".fndtn.dropdown"),this.S("[data-dropdown-content]").off(".fndtn.dropdown")},reflow:function(){}}}(n(19755),window,window.document)},56071:function(t,e,n){!function(t,e,n,r){"use strict";Foundation.libs.offcanvas={name:"offcanvas",version:"5.5.3",settings:{open_method:"move",close_on_click:!1},init:function(t,e,n){this.bindings(e,n)},events:function(){var e=this,n=e.S,r="",i="",o="",a="",s="";"move"===this.settings.open_method?(r="move-",i="right",o="left",a="top",s="bottom"):"overlap_single"===this.settings.open_method?(r="offcanvas-overlap-",i="right",o="left",a="top",s="bottom"):"overlap"===this.settings.open_method&&(r="offcanvas-overlap"),n(this.scope).off(".offcanvas").on("click.fndtn.offcanvas",".left-off-canvas-toggle",(function(o){e.click_toggle_class(o,r+i),"overlap"!==e.settings.open_method&&n(".left-submenu").removeClass(r+i),t(".left-off-canvas-toggle").attr("aria-expanded","true")})).on("click.fndtn.offcanvas",".left-off-canvas-menu a",(function(o){var a=e.get_settings(o),s=n(this).parent();!a.close_on_click||s.hasClass("has-submenu")||s.hasClass("back")?n(this).parent().hasClass("has-submenu")?(o.preventDefault(),n(this).siblings(".left-submenu").toggleClass(r+i)):s.hasClass("back")&&(o.preventDefault(),s.parent().removeClass(r+i)):(e.hide.call(e,r+i,e.get_wrapper(o)),s.parent().removeClass(r+i)),t(".left-off-canvas-toggle").attr("aria-expanded","true")})).on("click.fndtn.offcanvas",".right-off-canvas-toggle",(function(i){e.click_toggle_class(i,r+o),"overlap"!==e.settings.open_method&&n(".right-submenu").removeClass(r+o),t(".right-off-canvas-toggle").attr("aria-expanded","true")})).on("click.fndtn.offcanvas",".right-off-canvas-menu a",(function(i){var a=e.get_settings(i),s=n(this).parent();!a.close_on_click||s.hasClass("has-submenu")||s.hasClass("back")?n(this).parent().hasClass("has-submenu")?(i.preventDefault(),n(this).siblings(".right-submenu").toggleClass(r+o)):s.hasClass("back")&&(i.preventDefault(),s.parent().removeClass(r+o)):(e.hide.call(e,r+o,e.get_wrapper(i)),s.parent().removeClass(r+o)),t(".right-off-canvas-toggle").attr("aria-expanded","true")})).on("click.fndtn.offcanvas",".top-off-canvas-toggle",(function(i){e.click_toggle_class(i,r+s),"overlap"!==e.settings.open_method&&n(".top-submenu").removeClass(r+s),t(".top-off-canvas-toggle").attr("aria-expanded","true")})).on("click.fndtn.offcanvas",".top-off-canvas-menu a",(function(i){var o=e.get_settings(i),a=n(this).parent();!o.close_on_click||a.hasClass("has-submenu")||a.hasClass("back")?n(this).parent().hasClass("has-submenu")?(i.preventDefault(),n(this).siblings(".top-submenu").toggleClass(r+s)):a.hasClass("back")&&(i.preventDefault(),a.parent().removeClass(r+s)):(e.hide.call(e,r+s,e.get_wrapper(i)),a.parent().removeClass(r+s)),t(".top-off-canvas-toggle").attr("aria-expanded","true")})).on("click.fndtn.offcanvas",".bottom-off-canvas-toggle",(function(i){e.click_toggle_class(i,r+a),"overlap"!==e.settings.open_method&&n(".bottom-submenu").removeClass(r+a),t(".bottom-off-canvas-toggle").attr("aria-expanded","true")})).on("click.fndtn.offcanvas",".bottom-off-canvas-menu a",(function(i){var o=e.get_settings(i),s=n(this).parent();!o.close_on_click||s.hasClass("has-submenu")||s.hasClass("back")?n(this).parent().hasClass("has-submenu")?(i.preventDefault(),n(this).siblings(".bottom-submenu").toggleClass(r+a)):s.hasClass("back")&&(i.preventDefault(),s.parent().removeClass(r+a)):(e.hide.call(e,r+a,e.get_wrapper(i)),s.parent().removeClass(r+a)),t(".bottom-off-canvas-toggle").attr("aria-expanded","true")})).on("click.fndtn.offcanvas",".exit-off-canvas",(function(a){e.click_remove_class(a,r+o),n(".right-submenu").removeClass(r+o),i&&(e.click_remove_class(a,r+i),n(".left-submenu").removeClass(r+o)),t(".right-off-canvas-toggle").attr("aria-expanded","true")})).on("click.fndtn.offcanvas",".exit-off-canvas",(function(n){e.click_remove_class(n,r+o),t(".left-off-canvas-toggle").attr("aria-expanded","false"),i&&(e.click_remove_class(n,r+i),t(".right-off-canvas-toggle").attr("aria-expanded","false"))})).on("click.fndtn.offcanvas",".exit-off-canvas",(function(i){e.click_remove_class(i,r+a),n(".bottom-submenu").removeClass(r+a),s&&(e.click_remove_class(i,r+s),n(".top-submenu").removeClass(r+a)),t(".bottom-off-canvas-toggle").attr("aria-expanded","true")})).on("click.fndtn.offcanvas",".exit-off-canvas",(function(n){e.click_remove_class(n,r+a),t(".top-off-canvas-toggle").attr("aria-expanded","false"),s&&(e.click_remove_class(n,r+s),t(".bottom-off-canvas-toggle").attr("aria-expanded","false"))}))},toggle:function(t,e){(e=e||this.get_wrapper()).is("."+t)?this.hide(t,e):this.show(t,e)},show:function(t,e){(e=e||this.get_wrapper()).trigger("open.fndtn.offcanvas"),e.addClass(t)},hide:function(t,e){(e=e||this.get_wrapper()).trigger("close.fndtn.offcanvas"),e.removeClass(t)},click_toggle_class:function(t,e){t.preventDefault();var n=this.get_wrapper(t);this.toggle(e,n)},click_remove_class:function(t,e){t.preventDefault();var n=this.get_wrapper(t);this.hide(e,n)},get_settings:function(t){return this.S(t.target).closest("["+this.attr_name()+"]").data(this.attr_name(!0)+"-init")||this.settings},get_wrapper:function(t){var e=this.S(t?t.target:this.scope).closest(".off-canvas-wrap");return 0===e.length&&(e=this.S(".off-canvas-wrap")),e},reflow:function(){}}}(n(19755),window,window.document)},31564:function(t,e,n){!function(t,e,n,r){"use strict";Foundation.libs.tab={name:"tab",version:"5.5.3",settings:{active_class:"active",callback:function(){},deep_linking:!1,scroll_to_content:!0,is_hover:!1},default_tab_hashes:[],init:function(t,e,n){var r=this;(0,this.S)("["+this.attr_name()+"] > .active > a",this.scope).each((function(){r.default_tab_hashes.push(this.hash)})),this.bindings(e,n),this.handle_location_hash_change()},events:function(){var t=this,n=this.S,r=function(e,r){n(r).closest("["+t.attr_name()+"]").data(t.attr_name(!0)+"-init").is_hover&&!Modernizr.touch||(9!==(e.keyCode||e.which)&&(e.preventDefault(),e.stopPropagation()),t.toggle_active_tab(n(r).parent()))};n(this.scope).off(".tab").on("keydown.fndtn.tab","["+this.attr_name()+"] > * > a",(function(t){var e=t.keyCode||t.which;13!==e&&32!==e||r(t,this)})).on("click.fndtn.tab","["+this.attr_name()+"] > * > a",(function(t){r(t,this)})).on("mouseenter.fndtn.tab","["+this.attr_name()+"] > * > a",(function(e){n(this).closest("["+t.attr_name()+"]").data(t.attr_name(!0)+"-init").is_hover&&t.toggle_active_tab(n(this).parent())})),n(e).on("hashchange.fndtn.tab",(function(e){e.preventDefault(),t.handle_location_hash_change()}))},handle_location_hash_change:function(){var e=this,n=this.S;n("["+this.attr_name()+"]",this.scope).each((function(){var i,o=n(this).data(e.attr_name(!0)+"-init");if(o.deep_linking)if(""!=(i=o.scroll_to_content?e.scope.location.hash:e.scope.location.hash.replace("fndtn-",""))){var a=n(i);if(a.hasClass("content")&&a.parent().hasClass("tabs-content"))e.toggle_active_tab(t("["+e.attr_name()+"] > * > a[href="+i+"]").parent());else{var s=a.closest(".content").attr("id");s!=r&&e.toggle_active_tab(t("["+e.attr_name()+"] > * > a[href=#"+s+"]").parent(),i)}}else for(var u=0;u<e.default_tab_hashes.length;u++)e.toggle_active_tab(t("["+e.attr_name()+"] > * > a[href="+e.default_tab_hashes[u]+"]").parent())}))},toggle_active_tab:function(i,o){var a=this,s=a.S,u=i.closest("["+this.attr_name()+"]"),l=i.find("a"),c=i.children("a").first(),f="#"+c.attr("href").split("#")[1],h=s(f),d=i.siblings(),p=u.data(this.attr_name(!0)+"-init"),m=function(t){(t!==(p.scroll_to_content?a.default_tab_hashes[0]:"fndtn-"+a.default_tab_hashes[0].replace("#",""))||e.location.hash)&&(e.location.hash=t)};c.data("tab-content")&&(h=s(f="#"+c.data("tab-content").split("#")[1])),p.deep_linking&&(p.scroll_to_content?(m(o||f),o==r||o==f?i.parent()[0].scrollIntoView():s(f)[0].scrollIntoView()):m(o!=r?"fndtn-"+o.replace("#",""):"fndtn-"+f.replace("#",""))),i.addClass(p.active_class).triggerHandler("opened"),l.attr({"aria-selected":"true",tabindex:0}),d.removeClass(p.active_class),d.find("a").attr({"aria-selected":"false"}),h.siblings().removeClass(p.active_class).attr({"aria-hidden":"true"}),h.addClass(p.active_class).attr("aria-hidden","false").removeAttr("tabindex"),p.callback(i),h.triggerHandler("toggled",[h]),u.triggerHandler("toggled",[i]),l.off("keydown").on("keydown",(function(e){var r,i=t(this),o=t(this).parents("li").prev().children('[role="tab"]'),a=t(this).parents("li").next().children('[role="tab"]');switch(e.keyCode){case 37:r=o;break;case 39:r=a;break;default:r=!1}r.length&&(i.attr({tabindex:"-1","aria-selected":null}),r.attr({tabindex:"0","aria-selected":!0}).focus()),t('[role="tabpanel"]').attr("aria-hidden","true"),t("#"+t(n.activeElement).attr("href").substring(1)).attr("aria-hidden",null)}))},data_attr:function(t){return this.namespace.length>0?this.namespace+"-"+t:t},off:function(){},reflow:function(){}}}(n(19755),window,window.document)},59172:function(t,e,n){!function(t,e,n,r){"use strict";Foundation.libs.tooltip={name:"tooltip",version:"5.5.3",settings:{additional_inheritable_classes:[],tooltip_class:".tooltip",append_to:"body",touch_close_text:"Tap To Close",disable_for_touch:!1,hover_delay:200,fade_in_duration:150,fade_out_duration:150,show_on:"all",tip_template:function(t,e){return'<span data-selector="'+t+'" id="'+t+'" class="'+Foundation.libs.tooltip.settings.tooltip_class.substring(1)+'" role="tooltip">'+e+'<span class="nub"></span></span>'}},cache:{},init:function(t,e,n){Foundation.inherit(this,"random_str"),this.bindings(e,n)},should_show:function(e,n){var r=t.extend({},this.settings,this.data_options(e));return"all"===r.show_on||!(!this.small()||"small"!==r.show_on)||!(!this.medium()||"medium"!==r.show_on)||!(!this.large()||"large"!==r.show_on)},medium:function(){return matchMedia(Foundation.media_queries.medium).matches},large:function(){return matchMedia(Foundation.media_queries.large).matches},events:function(e){var n=this,r=n.S;function i(t,e,r){t.timer||(r?(t.timer=null,n.showTip(e)):t.timer=setTimeout(function(){t.timer=null,n.showTip(e)}.bind(t),n.settings.hover_delay))}function o(t,e){t.timer&&(clearTimeout(t.timer),t.timer=null),n.hide(e)}n.create(this.S(e)),t(this.scope).off(".tooltip").on("mouseenter.fndtn.tooltip mouseleave.fndtn.tooltip touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip","["+this.attr_name()+"]",(function(e){var a=r(this),s=t.extend({},n.settings,n.data_options(a));if(Modernizr.touch&&/touchstart|MSPointerDown/i.test(e.type)&&r(e.target).is("a"))return!1;if(/mouse/i.test(e.type)&&n.ie_touch(e))return!1;if(a.hasClass("open"))Modernizr.touch&&/touchstart|MSPointerDown/i.test(e.type)&&e.preventDefault(),n.hide(a);else{if(s.disable_for_touch&&Modernizr.touch&&/touchstart|MSPointerDown/i.test(e.type))return;if(!s.disable_for_touch&&Modernizr.touch&&/touchstart|MSPointerDown/i.test(e.type)&&(e.preventDefault(),r(s.tooltip_class+".open").hide(),t(".open["+n.attr_name()+"]").length>0)){var u=r(t(".open["+n.attr_name()+"]")[0]);n.hide(u)}/enter|over/i.test(e.type)?i(this,a):"mouseout"===e.type||"mouseleave"===e.type?o(this,a):i(this,a,!0)}})).on("mouseleave.fndtn.tooltip touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip","["+this.attr_name()+"].open",(function(e){if(/mouse/i.test(e.type)&&n.ie_touch(e))return!1;"touch"==t(this).data("tooltip-open-event-type")&&"mouseleave"==e.type||("mouse"==t(this).data("tooltip-open-event-type")&&/MSPointerDown|touchstart/i.test(e.type)?n.convert_to_touch(t(this)):o(this,t(this)))})).on("DOMNodeRemoved DOMAttrModified","["+this.attr_name()+"]:not(a)",(function(t){o(this,r(this))}))},ie_touch:function(t){return!1},showTip:function(t){var e=this.getTip(t);if(this.should_show(t,e))return this.show(t)},getTip:function(e){var n=this.selector(e),r=t.extend({},this.settings,this.data_options(e)),i=null;return n&&(i=this.S('span[data-selector="'+n+'"]'+r.tooltip_class)),"object"==typeof i&&i},selector:function(t){var e=t.attr(this.attr_name())||t.attr("data-selector");return"string"!=typeof e&&(e=this.random_str(6),t.attr("data-selector",e).attr("aria-describedby",e)),e},create:function(n){var r=this,i=t.extend({},this.settings,this.data_options(n)),o=this.settings.tip_template;"string"==typeof i.tip_template&&e.hasOwnProperty(i.tip_template)&&(o=e[i.tip_template]);var a=t(o(this.selector(n),t("<div></div>").html(n.attr("title")).html())),s=this.inheritable_classes(n);a.addClass(s).appendTo(i.append_to),Modernizr.touch&&(a.append('<span class="tap-to-close">'+i.touch_close_text+"</span>"),a.on("touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip",(function(t){r.hide(n)}))),n.removeAttr("title").attr("title","")},reposition:function(e,n,r){var i,o,a,s;n.css("visibility","hidden").show(),i=e.data("width"),a=(o=n.children(".nub")).outerHeight(),o.outerWidth(),this.small()?n.css({width:"100%"}):n.css({width:i||"auto"}),s=function(t,e,n,r,i,o){return t.css({top:e||"auto",bottom:r||"auto",left:i||"auto",right:n||"auto"}).end()};var u=e.offset().top,l=e.offset().left,c=e.outerHeight();if(s(n,u+c+10,"auto","auto",l),this.small())s(n,u+c+10,"auto","auto",12.5,t(this.scope).width()),n.addClass("tip-override"),s(o,-a,"auto","auto",l);else{Foundation.rtl&&(o.addClass("rtl"),l=l+e.outerWidth()-n.outerWidth()),s(n,u+c+10,"auto","auto",l),o.attr("style")&&o.removeAttr("style"),n.removeClass("tip-override");var f=n.outerHeight();r&&r.indexOf("tip-top")>-1?(Foundation.rtl&&o.addClass("rtl"),s(n,u-f,"auto","auto",l).removeClass("tip-override")):r&&r.indexOf("tip-left")>-1?(s(n,u+c/2-f/2,"auto","auto",l-n.outerWidth()-a).removeClass("tip-override"),o.removeClass("rtl")):r&&r.indexOf("tip-right")>-1&&(s(n,u+c/2-f/2,"auto","auto",l+e.outerWidth()+a).removeClass("tip-override"),o.removeClass("rtl"))}n.css("visibility","visible").hide()},small:function(){return matchMedia(Foundation.media_queries.small).matches&&!matchMedia(Foundation.media_queries.medium).matches},inheritable_classes:function(e){var n=t.extend({},this.settings,this.data_options(e)),r=["tip-top","tip-left","tip-bottom","tip-right","radius","round"].concat(n.additional_inheritable_classes),i=e.attr("class"),o=i?t.map(i.split(" "),(function(e,n){if(-1!==t.inArray(e,r))return e})).join(" "):"";return t.trim(o)},convert_to_touch:function(e){var n=this,r=n.getTip(e),i=t.extend({},n.settings,n.data_options(e));0===r.find(".tap-to-close").length&&(r.append('<span class="tap-to-close">'+i.touch_close_text+"</span>"),r.on("click.fndtn.tooltip.tapclose touchstart.fndtn.tooltip.tapclose MSPointerDown.fndtn.tooltip.tapclose",(function(t){n.hide(e)}))),e.data("tooltip-open-event-type","touch")},show:function(t){var e=this.getTip(t);"touch"==t.data("tooltip-open-event-type")&&this.convert_to_touch(t),this.reposition(t,e,t.attr("class")),t.addClass("open"),e.fadeIn(this.settings.fade_in_duration)},hide:function(t){var e=this.getTip(t);e.fadeOut(this.settings.fade_out_duration,(function(){e.find(".tap-to-close").remove(),e.off("click.fndtn.tooltip.tapclose MSPointerDown.fndtn.tapclose"),t.removeClass("open")}))},off:function(){var e=this;this.S(this.scope).off(".fndtn.tooltip"),this.S(this.settings.tooltip_class).each((function(n){t("["+e.attr_name()+"]").eq(n).attr("title",t(this).text())})).remove()},reflow:function(){}}}(n(19755),window,window.document)},93294:function(t,e,n){!function(t,e,n,r){"use strict";Foundation.libs.topbar={name:"topbar",version:"5.5.3",settings:{index:0,start_offset:0,sticky_class:"sticky",custom_back_text:!0,back_text:"Back",mobile_show_parent_link:!0,is_hover:!0,scrolltop:!0,sticky_on:"all",dropdown_autoclose:!0},init:function(e,n,r){Foundation.inherit(this,"add_custom_rule register_media throttle");var i=this;i.register_media("topbar","foundation-mq-topbar"),this.bindings(n,r),i.S("["+this.attr_name()+"]",this.scope).each((function(){var e=t(this),n=e.data(i.attr_name(!0)+"-init");i.S("section, .top-bar-section",this),e.data("index",0);var r=e.parent();r.hasClass("fixed")||i.is_sticky(e,r,n)?(i.settings.sticky_class=n.sticky_class,i.settings.sticky_topbar=e,e.data("height",r.outerHeight()),e.data("stickyoffset",r.offset().top)):e.data("height",e.outerHeight()),n.assembled||i.assemble(e),n.is_hover?i.S(".has-dropdown",e).addClass("not-click"):i.S(".has-dropdown",e).removeClass("not-click"),i.add_custom_rule(".f-topbar-fixed { padding-top: "+e.data("height")+"px }"),r.hasClass("fixed")&&i.S("body").addClass("f-topbar-fixed")}))},is_sticky:function(t,e,n){var r=e.hasClass(n.sticky_class),i=matchMedia(Foundation.media_queries.small).matches,o=matchMedia(Foundation.media_queries.medium).matches,a=matchMedia(Foundation.media_queries.large).matches;return!((!r||"all"!==n.sticky_on)&&(!(r&&this.small()&&-1!==n.sticky_on.indexOf("small")&&i)||o||a)&&(!(r&&this.medium()&&-1!==n.sticky_on.indexOf("medium")&&i&&o)||a)&&!(r&&this.large()&&-1!==n.sticky_on.indexOf("large")&&i&&o&&a))},toggle:function(n){var r,i=this,o=(r=n?i.S(n).closest("["+this.attr_name()+"]"):i.S("["+this.attr_name()+"]")).data(this.attr_name(!0)+"-init"),a=i.S("section, .top-bar-section",r);i.breakpoint()&&(i.rtl?(a.css({right:"0%"}),t(">.name",a).css({right:"100%"})):(a.css({left:"0%"}),t(">.name",a).css({left:"100%"})),i.S("li.moved",a).removeClass("moved"),r.data("index",0),r.toggleClass("expanded").css("height","")),o.scrolltop?r.hasClass("expanded")?r.parent().hasClass("fixed")&&(o.scrolltop?(r.parent().removeClass("fixed"),r.addClass("fixed"),i.S("body").removeClass("f-topbar-fixed"),e.scrollTo(0,0)):r.parent().removeClass("expanded")):r.hasClass("fixed")&&(r.parent().addClass("fixed"),r.removeClass("fixed"),i.S("body").addClass("f-topbar-fixed")):(i.is_sticky(r,r.parent(),o)&&r.parent().addClass("fixed"),r.parent().hasClass("fixed")&&(r.hasClass("expanded")?(r.addClass("fixed"),r.parent().addClass("expanded"),i.S("body").addClass("f-topbar-fixed")):(r.removeClass("fixed"),r.parent().removeClass("expanded"),i.update_sticky_positioning())))},timer:null,events:function(n){var r=this,i=this.S;i(this.scope).off(".topbar").on("click.fndtn.topbar","["+this.attr_name()+"] .toggle-topbar",(function(t){t.preventDefault(),r.toggle(this)})).on("click.fndtn.topbar contextmenu.fndtn.topbar",'.top-bar .top-bar-section li a[href^="#"],['+this.attr_name()+'] .top-bar-section li a[href^="#"]',(function(e){var n=t(this).closest("li"),i=n.closest("["+r.attr_name()+"]").data(r.attr_name(!0)+"-init");i.dropdown_autoclose&&i.is_hover&&t(this).closest(".hover").removeClass("hover"),!r.breakpoint()||n.hasClass("back")||n.hasClass("has-dropdown")||r.toggle()})).on("click.fndtn.topbar","["+this.attr_name()+"] li.has-dropdown",(function(e){var n=i(this),o=i(e.target),a=n.closest("["+r.attr_name()+"]").data(r.attr_name(!0)+"-init");o.data("revealId")?r.toggle():r.breakpoint()||a.is_hover&&!Modernizr.touch||(e.stopImmediatePropagation(),n.hasClass("hover")?(n.removeClass("hover").find("li").removeClass("hover"),n.parents("li.hover").removeClass("hover")):(n.addClass("hover"),t(n).siblings().removeClass("hover"),"A"===o[0].nodeName&&o.parent().hasClass("has-dropdown")&&e.preventDefault()))})).on("click.fndtn.topbar","["+this.attr_name()+"] .has-dropdown>a",(function(t){if(r.breakpoint()){t.preventDefault();var e=i(this),n=e.closest("["+r.attr_name()+"]"),o=n.find("section, .top-bar-section"),a=(e.next(".dropdown").outerHeight(),e.closest("li"));n.data("index",n.data("index")+1),a.addClass("moved"),r.rtl?(o.css({right:-100*n.data("index")+"%"}),o.find(">.name").css({right:100*n.data("index")+"%"})):(o.css({left:-100*n.data("index")+"%"}),o.find(">.name").css({left:100*n.data("index")+"%"})),n.css("height",e.siblings("ul").outerHeight(!0)+n.data("height"))}})),i(e).off(".topbar").on("resize.fndtn.topbar",r.throttle((function(){r.resize.call(r)}),50)).trigger("resize.fndtn.topbar").load((function(){i(this).trigger("resize.fndtn.topbar")})),i("body").off(".topbar").on("click.fndtn.topbar",(function(t){i(t.target).closest("li").closest("li.hover").length>0||i("["+r.attr_name()+"] li.hover").removeClass("hover")})),i(this.scope).on("click.fndtn.topbar","["+this.attr_name()+"] .has-dropdown .back",(function(t){t.preventDefault();var e=i(this),n=e.closest("["+r.attr_name()+"]"),o=n.find("section, .top-bar-section"),a=(n.data(r.attr_name(!0)+"-init"),e.closest("li.moved")),s=a.parent();n.data("index",n.data("index")-1),r.rtl?(o.css({right:-100*n.data("index")+"%"}),o.find(">.name").css({right:100*n.data("index")+"%"})):(o.css({left:-100*n.data("index")+"%"}),o.find(">.name").css({left:100*n.data("index")+"%"})),0===n.data("index")?n.css("height",""):n.css("height",s.outerHeight(!0)+n.data("height")),setTimeout((function(){a.removeClass("moved")}),300)})),i(this.scope).find(".dropdown a").focus((function(){t(this).parents(".has-dropdown").addClass("hover")})).blur((function(){t(this).parents(".has-dropdown").removeClass("hover")}))},resize:function(){var t=this;t.S("["+this.attr_name()+"]").each((function(){var e,r=t.S(this),i=r.data(t.attr_name(!0)+"-init"),o=r.parent("."+t.settings.sticky_class);if(!t.breakpoint()){var a=r.hasClass("expanded");r.css("height","").removeClass("expanded").find("li").removeClass("hover"),a&&t.toggle(r)}t.is_sticky(r,o,i)&&(o.hasClass("fixed")?(o.removeClass("fixed"),e=o.offset().top,t.S(n.body).hasClass("f-topbar-fixed")&&(e-=r.data("height")),r.data("stickyoffset",e),o.addClass("fixed")):(e=o.offset().top,r.data("stickyoffset",e)))}))},breakpoint:function(){return!matchMedia(Foundation.media_queries.topbar).matches},small:function(){return matchMedia(Foundation.media_queries.small).matches},medium:function(){return matchMedia(Foundation.media_queries.medium).matches},large:function(){return matchMedia(Foundation.media_queries.large).matches},assemble:function(e){var n=this,r=e.data(this.attr_name(!0)+"-init"),i=n.S("section, .top-bar-section",e);i.detach(),n.S(".has-dropdown>a",i).each((function(){var e,i=n.S(this),o=i.siblings(".dropdown"),a=i.attr("href");o.find(".title.back").length||(e=1==r.mobile_show_parent_link&&a?t('<li class="title back js-generated"><h5><a href="javascript:void(0)"></a></h5></li><li class="parent-link hide-for-medium-up"><a class="parent-link js-generated" href="'+a+'">'+i.html()+"</a></li>"):t('<li class="title back js-generated"><h5><a href="javascript:void(0)"></a></h5>'),1==r.custom_back_text?t("h5>a",e).html(r.back_text):t("h5>a",e).html("« "+i.html()),o.prepend(e))})),i.appendTo(e),this.sticky(),this.assembled(e)},assembled:function(e){e.data(this.attr_name(!0),t.extend({},e.data(this.attr_name(!0)),{assembled:!0}))},height:function(e){var n=0,r=this;return t("> li",e).each((function(){n+=r.S(this).outerHeight(!0)})),n},sticky:function(){var t=this;this.S(e).on("scroll",(function(){t.update_sticky_positioning()}))},update_sticky_positioning:function(){var t="."+this.settings.sticky_class,n=this.S(e),r=this;if(r.settings.sticky_topbar&&r.is_sticky(this.settings.sticky_topbar,this.settings.sticky_topbar.parent(),this.settings)){var i=this.settings.sticky_topbar.data("stickyoffset")+this.settings.start_offset;r.S(t).hasClass("expanded")||(n.scrollTop()>i?r.S(t).hasClass("fixed")||(r.S(t).addClass("fixed"),r.S("body").addClass("f-topbar-fixed")):n.scrollTop()<=i&&r.S(t).hasClass("fixed")&&(r.S(t).removeClass("fixed"),r.S("body").removeClass("f-topbar-fixed")))}},off:function(){this.S(this.scope).off(".fndtn.topbar"),this.S(e).off(".fndtn.topbar")},reflow:function(){}}}(n(19755),window,window.document)},44962:function(t,e,n){"use strict";n(19755),t=n.hmd(t);var r,i=n(19755);r=function(t){t.extend(t.fn,{validate:function(e){if(this.length){var n=t.data(this[0],"validator");return n||(this.attr("novalidate","novalidate"),n=new t.validator(e,this[0]),t.data(this[0],"validator",n),n.settings.onsubmit&&(this.on("click.validate",":submit",(function(e){n.submitButton=e.currentTarget,t(this).hasClass("cancel")&&(n.cancelSubmit=!0),void 0!==t(this).attr("formnovalidate")&&(n.cancelSubmit=!0)})),this.on("submit.validate",(function(e){function r(){var r,i;return n.submitButton&&(n.settings.submitHandler||n.formSubmitted)&&(r=t("<input type='hidden'/>").attr("name",n.submitButton.name).val(t(n.submitButton).val()).appendTo(n.currentForm)),!(n.settings.submitHandler&&!n.settings.debug)||(i=n.settings.submitHandler.call(n,n.currentForm,e),r&&r.remove(),void 0!==i&&i)}return n.settings.debug&&e.preventDefault(),n.cancelSubmit?(n.cancelSubmit=!1,r()):n.form()?n.pendingRequest?(n.formSubmitted=!0,!1):r():(n.focusInvalid(),!1)}))),n)}e&&e.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing.")},valid:function(){var e,n,r;return t(this[0]).is("form")?e=this.validate().form():(r=[],e=!0,n=t(this[0].form).validate(),this.each((function(){(e=n.element(this)&&e)||(r=r.concat(n.errorList))})),n.errorList=r),e},rules:function(e,n){var r,i,o,a,s,u,l=this[0],c=void 0!==this.attr("contenteditable")&&"false"!==this.attr("contenteditable");if(null!=l&&(!l.form&&c&&(l.form=this.closest("form")[0],l.name=this.attr("name")),null!=l.form)){if(e)switch(i=(r=t.data(l.form,"validator").settings).rules,o=t.validator.staticRules(l),e){case"add":t.extend(o,t.validator.normalizeRule(n)),delete o.messages,i[l.name]=o,n.messages&&(r.messages[l.name]=t.extend(r.messages[l.name],n.messages));break;case"remove":return n?(u={},t.each(n.split(/\s/),(function(t,e){u[e]=o[e],delete o[e]})),u):(delete i[l.name],o)}return(a=t.validator.normalizeRules(t.extend({},t.validator.classRules(l),t.validator.attributeRules(l),t.validator.dataRules(l),t.validator.staticRules(l)),l)).required&&(s=a.required,delete a.required,a=t.extend({required:s},a)),a.remote&&(s=a.remote,delete a.remote,a=t.extend(a,{remote:s})),a}}});var e,n=function(t){return t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};t.extend(t.expr.pseudos||t.expr[":"],{blank:function(e){return!n(""+t(e).val())},filled:function(e){var r=t(e).val();return null!==r&&!!n(""+r)},unchecked:function(e){return!t(e).prop("checked")}}),t.validator=function(e,n){this.settings=t.extend(!0,{},t.validator.defaults,e),this.currentForm=n,this.init()},t.validator.format=function(e,n){return 1===arguments.length?function(){var n=t.makeArray(arguments);return n.unshift(e),t.validator.format.apply(this,n)}:(void 0===n||(arguments.length>2&&n.constructor!==Array&&(n=t.makeArray(arguments).slice(1)),n.constructor!==Array&&(n=[n]),t.each(n,(function(t,n){e=e.replace(new RegExp("\\{"+t+"\\}","g"),(function(){return n}))}))),e)},t.extend(t.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:t([]),errorLabelContainer:t([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(t){this.lastActive=t,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,t,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(t)))},onfocusout:function(t){this.checkable(t)||!(t.name in this.submitted)&&this.optional(t)||this.element(t)},onkeyup:function(e,n){9===n.which&&""===this.elementValue(e)||-1!==t.inArray(n.keyCode,[16,17,18,20,35,36,37,38,39,40,45,144,225])||(e.name in this.submitted||e.name in this.invalid)&&this.element(e)},onclick:function(t){t.name in this.submitted?this.element(t):t.parentNode.name in this.submitted&&this.element(t.parentNode)},highlight:function(e,n,r){"radio"===e.type?this.findByName(e.name).addClass(n).removeClass(r):t(e).addClass(n).removeClass(r)},unhighlight:function(e,n,r){"radio"===e.type?this.findByName(e.name).removeClass(n).addClass(r):t(e).removeClass(n).addClass(r)}},setDefaults:function(e){t.extend(t.validator.defaults,e)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:t.validator.format("Please enter no more than {0} characters."),minlength:t.validator.format("Please enter at least {0} characters."),rangelength:t.validator.format("Please enter a value between {0} and {1} characters long."),range:t.validator.format("Please enter a value between {0} and {1}."),max:t.validator.format("Please enter a value less than or equal to {0}."),min:t.validator.format("Please enter a value greater than or equal to {0}."),step:t.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){this.labelContainer=t(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||t(this.currentForm),this.containers=t(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var e,n=this.currentForm,r=this.groups={};function i(e){var r=void 0!==t(this).attr("contenteditable")&&"false"!==t(this).attr("contenteditable");if(!this.form&&r&&(this.form=t(this).closest("form")[0],this.name=t(this).attr("name")),n===this.form){var i=t.data(this.form,"validator"),o="on"+e.type.replace(/^validate/,""),a=i.settings;a[o]&&!t(this).is(a.ignore)&&a[o].call(i,this,e)}}t.each(this.settings.groups,(function(e,n){"string"==typeof n&&(n=n.split(/\s/)),t.each(n,(function(t,n){r[n]=e}))})),e=this.settings.rules,t.each(e,(function(n,r){e[n]=t.validator.normalizeRule(r)})),t(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",i).on("click.validate","select, option, [type='radio'], [type='checkbox']",i),this.settings.invalidHandler&&t(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),t.extend(this.submitted,this.errorMap),this.invalid=t.extend({},this.errorMap),this.valid()||t(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var t=0,e=this.currentElements=this.elements();e[t];t++)this.check(e[t]);return this.valid()},element:function(e){var n,r,i=this.clean(e),o=this.validationTargetFor(i),a=this,s=!0;return void 0===o?delete this.invalid[i.name]:(this.prepareElement(o),this.currentElements=t(o),(r=this.groups[o.name])&&t.each(this.groups,(function(t,e){e===r&&t!==o.name&&(i=a.validationTargetFor(a.clean(a.findByName(t))))&&i.name in a.invalid&&(a.currentElements.push(i),s=a.check(i)&&s)})),n=!1!==this.check(o),s=s&&n,this.invalid[o.name]=!n,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),t(e).attr("aria-invalid",!n)),s},showErrors:function(e){if(e){var n=this;t.extend(this.errorMap,e),this.errorList=t.map(this.errorMap,(function(t,e){return{message:t,element:n.findByName(e)[0]}})),this.successList=t.grep(this.successList,(function(t){return!(t.name in e)}))}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){t.fn.resetForm&&t(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var e=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(e)},resetElements:function(t){var e;if(this.settings.unhighlight)for(e=0;t[e];e++)this.settings.unhighlight.call(this,t[e],this.settings.errorClass,""),this.findByName(t[e].name).removeClass(this.settings.validClass);else t.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(t){var e,n=0;for(e in t)void 0!==t[e]&&null!==t[e]&&!1!==t[e]&&n++;return n},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(t){t.not(this.containers).text(""),this.addWrapper(t).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{t(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").trigger("focus").trigger("focusin")}catch(t){}},findLastActive:function(){var e=this.lastActive;return e&&1===t.grep(this.errorList,(function(t){return t.element.name===e.name})).length&&e},elements:function(){var e=this,n={};return t(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter((function(){var r=this.name||t(this).attr("name"),i=void 0!==t(this).attr("contenteditable")&&"false"!==t(this).attr("contenteditable");return!r&&e.settings.debug&&window.console&&console.error("%o has no name assigned",this),i&&(this.form=t(this).closest("form")[0],this.name=r),!(this.form!==e.currentForm||r in n||!e.objectLength(t(this).rules())||(n[r]=!0,0))}))},clean:function(e){return t(e)[0]},errors:function(){var e=this.settings.errorClass.split(" ").join(".");return t(this.settings.errorElement+"."+e,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=t([]),this.toHide=t([])},reset:function(){this.resetInternals(),this.currentElements=t([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(t){this.reset(),this.toHide=this.errorsFor(t)},elementValue:function(e){var n,r,i=t(e),o=e.type,a=void 0!==i.attr("contenteditable")&&"false"!==i.attr("contenteditable");return"radio"===o||"checkbox"===o?this.findByName(e.name).filter(":checked").val():"number"===o&&void 0!==e.validity?e.validity.badInput?"NaN":i.val():(n=a?i.text():i.val(),"file"===o?"C:\\fakepath\\"===n.substr(0,12)?n.substr(12):(r=n.lastIndexOf("/"))>=0||(r=n.lastIndexOf("\\"))>=0?n.substr(r+1):n:"string"==typeof n?n.replace(/\r/g,""):n)},check:function(e){e=this.validationTargetFor(this.clean(e));var n,r,i,o,a=t(e).rules(),s=t.map(a,(function(t,e){return e})).length,u=!1,l=this.elementValue(e);for(r in"function"==typeof a.normalizer?o=a.normalizer:"function"==typeof this.settings.normalizer&&(o=this.settings.normalizer),o&&(l=o.call(e,l),delete a.normalizer),a){i={method:r,parameters:a[r]};try{if("dependency-mismatch"===(n=t.validator.methods[r].call(this,l,e,i.parameters))&&1===s){u=!0;continue}if(u=!1,"pending"===n)return void(this.toHide=this.toHide.not(this.errorsFor(e)));if(!n)return this.formatAndAdd(e,i),!1}catch(t){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+e.id+", check the '"+i.method+"' method.",t),t instanceof TypeError&&(t.message+=". Exception occurred when checking element "+e.id+", check the '"+i.method+"' method."),t}}if(!u)return this.objectLength(a)&&this.successList.push(e),!0},customDataMessage:function(e,n){return t(e).data("msg"+n.charAt(0).toUpperCase()+n.substring(1).toLowerCase())||t(e).data("msg")},customMessage:function(t,e){var n=this.settings.messages[t];return n&&(n.constructor===String?n:n[e])},findDefined:function(){for(var t=0;t<arguments.length;t++)if(void 0!==arguments[t])return arguments[t]},defaultMessage:function(e,n){"string"==typeof n&&(n={method:n});var r=this.findDefined(this.customMessage(e.name,n.method),this.customDataMessage(e,n.method),!this.settings.ignoreTitle&&e.title||void 0,t.validator.messages[n.method],"<strong>Warning: No message defined for "+e.name+"</strong>"),i=/\$?\{(\d+)\}/g;return"function"==typeof r?r=r.call(this,n.parameters,e):i.test(r)&&(r=t.validator.format(r.replace(i,"{$1}"),n.parameters)),r},formatAndAdd:function(t,e){var n=this.defaultMessage(t,e);this.errorList.push({message:n,element:t,method:e.method}),this.errorMap[t.name]=n,this.submitted[t.name]=n},addWrapper:function(t){return this.settings.wrapper&&(t=t.add(t.parent(this.settings.wrapper))),t},defaultShowErrors:function(){var t,e,n;for(t=0;this.errorList[t];t++)n=this.errorList[t],this.settings.highlight&&this.settings.highlight.call(this,n.element,this.settings.errorClass,this.settings.validClass),this.showLabel(n.element,n.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(t=0;this.successList[t];t++)this.showLabel(this.successList[t]);if(this.settings.unhighlight)for(t=0,e=this.validElements();e[t];t++)this.settings.unhighlight.call(this,e[t],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return t(this.errorList).map((function(){return this.element}))},showLabel:function(e,n){var r,i,o,a,s=this.errorsFor(e),u=this.idOrName(e),l=t(e).attr("aria-describedby");s.length?(s.removeClass(this.settings.validClass).addClass(this.settings.errorClass),s.html(n)):(r=s=t("<"+this.settings.errorElement+">").attr("id",u+"-error").addClass(this.settings.errorClass).html(n||""),this.settings.wrapper&&(r=s.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(r):this.settings.errorPlacement?this.settings.errorPlacement.call(this,r,t(e)):r.insertAfter(e),s.is("label")?s.attr("for",u):0===s.parents("label[for='"+this.escapeCssMeta(u)+"']").length&&(o=s.attr("id"),l?l.match(new RegExp("\\b"+this.escapeCssMeta(o)+"\\b"))||(l+=" "+o):l=o,t(e).attr("aria-describedby",l),(i=this.groups[e.name])&&(a=this,t.each(a.groups,(function(e,n){n===i&&t("[name='"+a.escapeCssMeta(e)+"']",a.currentForm).attr("aria-describedby",s.attr("id"))}))))),!n&&this.settings.success&&(s.text(""),"string"==typeof this.settings.success?s.addClass(this.settings.success):this.settings.success(s,e)),this.toShow=this.toShow.add(s)},errorsFor:function(e){var n=this.escapeCssMeta(this.idOrName(e)),r=t(e).attr("aria-describedby"),i="label[for='"+n+"'], label[for='"+n+"'] *";return r&&(i=i+", #"+this.escapeCssMeta(r).replace(/\s+/g,", #")),this.errors().filter(i)},escapeCssMeta:function(t){return void 0===t?"":t.replace(/([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(t){return this.groups[t.name]||(this.checkable(t)?t.name:t.id||t.name)},validationTargetFor:function(e){return this.checkable(e)&&(e=this.findByName(e.name)),t(e).not(this.settings.ignore)[0]},checkable:function(t){return/radio|checkbox/i.test(t.type)},findByName:function(e){return t(this.currentForm).find("[name='"+this.escapeCssMeta(e)+"']")},getLength:function(e,n){switch(n.nodeName.toLowerCase()){case"select":return t("option:selected",n).length;case"input":if(this.checkable(n))return this.findByName(n.name).filter(":checked").length}return e.length},depend:function(t,e){return!this.dependTypes[typeof t]||this.dependTypes[typeof t](t,e)},dependTypes:{boolean:function(t){return t},string:function(e,n){return!!t(e,n.form).length},function:function(t,e){return t(e)}},optional:function(e){var n=this.elementValue(e);return!t.validator.methods.required.call(this,n,e)&&"dependency-mismatch"},startRequest:function(e){this.pending[e.name]||(this.pendingRequest++,t(e).addClass(this.settings.pendingClass),this.pending[e.name]=!0)},stopRequest:function(e,n){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[e.name],t(e).removeClass(this.settings.pendingClass),n&&0===this.pendingRequest&&this.formSubmitted&&this.form()&&0===this.pendingRequest?(t(this.currentForm).trigger("submit"),this.submitButton&&t("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!n&&0===this.pendingRequest&&this.formSubmitted&&(t(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(e,n){return n="string"==typeof n&&n||"remote",t.data(e,"previousValue")||t.data(e,"previousValue",{old:null,valid:!0,message:this.defaultMessage(e,{method:n})})},destroy:function(){this.resetForm(),t(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur").find(".validate-lessThan-blur").off(".validate-lessThan").removeClass("validate-lessThan-blur").find(".validate-lessThanEqual-blur").off(".validate-lessThanEqual").removeClass("validate-lessThanEqual-blur").find(".validate-greaterThanEqual-blur").off(".validate-greaterThanEqual").removeClass("validate-greaterThanEqual-blur").find(".validate-greaterThan-blur").off(".validate-greaterThan").removeClass("validate-greaterThan-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(e,n){e.constructor===String?this.classRuleSettings[e]=n:t.extend(this.classRuleSettings,e)},classRules:function(e){var n={},r=t(e).attr("class");return r&&t.each(r.split(" "),(function(){this in t.validator.classRuleSettings&&t.extend(n,t.validator.classRuleSettings[this])})),n},normalizeAttributeRule:function(t,e,n,r){/min|max|step/.test(n)&&(null===e||/number|range|text/.test(e))&&(r=Number(r),isNaN(r)&&(r=void 0)),r||0===r?t[n]=r:e===n&&"range"!==e&&(t["date"===e?"dateISO":n]=!0)},attributeRules:function(e){var n,r,i={},o=t(e),a=e.getAttribute("type");for(n in t.validator.methods)"required"===n?(""===(r=e.getAttribute(n))&&(r=!0),r=!!r):r=o.attr(n),this.normalizeAttributeRule(i,a,n,r);return i.maxlength&&/-1|2147483647|524288/.test(i.maxlength)&&delete i.maxlength,i},dataRules:function(e){var n,r,i={},o=t(e),a=e.getAttribute("type");for(n in t.validator.methods)""===(r=o.data("rule"+n.charAt(0).toUpperCase()+n.substring(1).toLowerCase()))&&(r=!0),this.normalizeAttributeRule(i,a,n,r);return i},staticRules:function(e){var n={},r=t.data(e.form,"validator");return r.settings.rules&&(n=t.validator.normalizeRule(r.settings.rules[e.name])||{}),n},normalizeRules:function(e,n){return t.each(e,(function(r,i){if(!1!==i){if(i.param||i.depends){var o=!0;switch(typeof i.depends){case"string":o=!!t(i.depends,n.form).length;break;case"function":o=i.depends.call(n,n)}o?e[r]=void 0===i.param||i.param:(t.data(n.form,"validator").resetElements(t(n)),delete e[r])}}else delete e[r]})),t.each(e,(function(t,r){e[t]="function"==typeof r&&"normalizer"!==t?r(n):r})),t.each(["minlength","maxlength"],(function(){e[this]&&(e[this]=Number(e[this]))})),t.each(["rangelength","range"],(function(){var t;e[this]&&(Array.isArray(e[this])?e[this]=[Number(e[this][0]),Number(e[this][1])]:"string"==typeof e[this]&&(t=e[this].replace(/[\[\]]/g,"").split(/[\s,]+/),e[this]=[Number(t[0]),Number(t[1])]))})),t.validator.autoCreateRanges&&(null!=e.min&&null!=e.max&&(e.range=[e.min,e.max],delete e.min,delete e.max),null!=e.minlength&&null!=e.maxlength&&(e.rangelength=[e.minlength,e.maxlength],delete e.minlength,delete e.maxlength)),e},normalizeRule:function(e){if("string"==typeof e){var n={};t.each(e.split(/\s/),(function(){n[this]=!0})),e=n}return e},addMethod:function(e,n,r){t.validator.methods[e]=n,t.validator.messages[e]=void 0!==r?r:t.validator.messages[e],n.length<3&&t.validator.addClassRules(e,t.validator.normalizeRule(e))},methods:{required:function(e,n,r){if(!this.depend(r,n))return"dependency-mismatch";if("select"===n.nodeName.toLowerCase()){var i=t(n).val();return i&&i.length>0}return this.checkable(n)?this.getLength(e,n)>0:null!=e&&e.length>0},email:function(t,e){return this.optional(e)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(t)},url:function(t,e){return this.optional(e)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(t)},date:(e=!1,function(t,n){return e||(e=!0,this.settings.debug&&window.console&&console.warn("The `date` method is deprecated and will be removed in version '2.0.0'.\nPlease don't use it, since it relies on the Date constructor, which\nbehaves very differently across browsers and locales. Use `dateISO`\ninstead or one of the locale specific methods in `localizations/`\nand `additional-methods.js`.")),this.optional(n)||!/Invalid|NaN/.test(new Date(t).toString())}),dateISO:function(t,e){return this.optional(e)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(t)},number:function(t,e){return this.optional(e)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(t)},digits:function(t,e){return this.optional(e)||/^\d+$/.test(t)},minlength:function(t,e,n){var r=Array.isArray(t)?t.length:this.getLength(t,e);return this.optional(e)||r>=n},maxlength:function(t,e,n){var r=Array.isArray(t)?t.length:this.getLength(t,e);return this.optional(e)||r<=n},rangelength:function(t,e,n){var r=Array.isArray(t)?t.length:this.getLength(t,e);return this.optional(e)||r>=n[0]&&r<=n[1]},min:function(t,e,n){return this.optional(e)||t>=n},max:function(t,e,n){return this.optional(e)||t<=n},range:function(t,e,n){return this.optional(e)||t>=n[0]&&t<=n[1]},step:function(e,n,r){var i,o=t(n).attr("type"),a="Step attribute on input type "+o+" is not supported.",s=new RegExp("\\b"+o+"\\b"),u=function(t){var e=(""+t).match(/(?:\.(\d+))?$/);return e&&e[1]?e[1].length:0},l=function(t){return Math.round(t*Math.pow(10,i))},c=!0;if(o&&!s.test(["text","number","range"].join()))throw new Error(a);return i=u(r),(u(e)>i||l(e)%l(r)!=0)&&(c=!1),this.optional(n)||c},equalTo:function(e,n,r){var i=t(r);return this.settings.onfocusout&&i.not(".validate-equalTo-blur").length&&i.addClass("validate-equalTo-blur").on("blur.validate-equalTo",(function(){t(n).valid()})),e===i.val()},remote:function(e,n,r,i){if(this.optional(n))return"dependency-mismatch";i="string"==typeof i&&i||"remote";var o,a,s,u=this.previousValue(n,i);return this.settings.messages[n.name]||(this.settings.messages[n.name]={}),u.originalMessage=u.originalMessage||this.settings.messages[n.name][i],this.settings.messages[n.name][i]=u.message,r="string"==typeof r&&{url:r}||r,s=t.param(t.extend({data:e},r.data)),u.old===s?u.valid:(u.old=s,o=this,this.startRequest(n),(a={})[n.name]=e,t.ajax(t.extend(!0,{mode:"abort",port:"validate"+n.name,dataType:"json",data:a,context:o.currentForm,success:function(t){var r,a,s,l=!0===t||"true"===t;o.settings.messages[n.name][i]=u.originalMessage,l?(s=o.formSubmitted,o.resetInternals(),o.toHide=o.errorsFor(n),o.formSubmitted=s,o.successList.push(n),o.invalid[n.name]=!1,o.showErrors()):(r={},a=t||o.defaultMessage(n,{method:i,parameters:e}),r[n.name]=u.message=a,o.invalid[n.name]=!0,o.showErrors(r)),u.valid=l,o.stopRequest(n,l)}},r)),"pending")}}});var r,i={};return t.ajaxPrefilter?t.ajaxPrefilter((function(t,e,n){var r=t.port;"abort"===t.mode&&(i[r]&&i[r].abort(),i[r]=n)})):(r=t.ajax,t.ajax=function(e){var n=("mode"in e?e:t.ajaxSettings).mode,o=("port"in e?e:t.ajaxSettings).port;return"abort"===n?(i[o]&&i[o].abort(),i[o]=r.apply(this,arguments),i[o]):r.apply(this,arguments)}),t},"function"==typeof define&&n.amdO?define(["jquery"],r):t.exports?t.exports=r(n(19755)):r(i)},7899:function(t,e,n){"use strict";n(82083),t=n.hmd(t);var r,i=n(19755);r=function(t,e,n,r){var i=t.fn.dataTable,o=t('<meta class="foundation-mq"/>').appendTo("head");return i.ext.foundationVersion=o.css("font-family").match(/small|medium|large/)?6:5,o.remove(),t.extend(i.ext.classes,{sWrapper:"dataTables_wrapper dt-foundation",sProcessing:"dataTables_processing panel callout"}),t.extend(!0,i.defaults,{dom:"<'row grid-x'<'small-6 columns cell'l><'small-6 columns cell'f>r>t<'row grid-x'<'small-6 columns cell'i><'small-6 columns cell'p>>",renderer:"foundation"}),i.ext.renderer.pageButton.foundation=function(e,n,r,o,a,s){var u,l,c,f=new i.Api(e),h=e.oClasses,d=e.oLanguage.oPaginate,p=e.oLanguage.oAria.paginate||{},m=5===i.ext.foundationVersion,g=function(n,i){var o,v,y,b,x=function(e){e.preventDefault(),t(e.currentTarget).hasClass("unavailable")||f.page()==e.data.action||f.page(e.data.action).draw("page")};for(o=0,v=i.length;o<v;o++)if(b=i[o],Array.isArray(b))g(n,b);else{switch(u="",l="",c=null,b){case"ellipsis":u="…",l="unavailable disabled",c=null;break;case"first":u=d.sFirst,l=b+(a>0?"":" unavailable disabled"),c=a>0?"a":null;break;case"previous":u=d.sPrevious,l=b+(a>0?"":" unavailable disabled"),c=a>0?"a":null;break;case"next":u=d.sNext,l=b+(a<s-1?"":" unavailable disabled"),c=a<s-1?"a":null;break;case"last":u=d.sLast,l=b+(a<s-1?"":" unavailable disabled"),c=a<s-1?"a":null;break;default:u=b+1,l=a===b?"current":"",c=a===b?null:"a"}m&&(c="a"),u&&(y=t("<li>",{class:h.sPageButton+" "+l,"aria-controls":e.sTableId,"aria-label":p[b],tabindex:e.iTabIndex,id:0===r&&"string"==typeof b?e.sTableId+"_"+b:null}).append(c?t("<"+c+"/>",{href:"#"}).html(u):u).appendTo(n),e.oApi._fnBindAction(y,{action:b},x))}};g(t(n).empty().html('<ul class="pagination"/>').children("ul"),o)},i},"function"==typeof define&&n.amdO?define(["jquery","datatables.net"],(function(t){return r(t,window,document)})):"object"==typeof exports?t.exports=function(t,e){return t||(t=window),e&&e.fn.dataTable||(e=n(81920)(t,e).$),r(e,0,t.document)}:r(i,window,document)},99459:function(t,e,n){var r,i,o,a=n(19755);o=function(t,e,n,r,i){"use strict";var o,a,s=0,u=(a=/msie\s\d+/i,0<(o=r.userAgent).search(a)&&a.exec(o).toString().split(" ")[1]<9&&(t("html").addClass("lt-ie9"),!0));function l(r,o,a){this.VERSION="2.3.1",this.input=r,this.plugin_count=a,this.current_plugin=0,this.calc_count=0,this.update_tm=0,this.old_from=0,this.old_to=0,this.old_min_interval=null,this.raf_id=null,this.dragging=!1,this.force_redraw=!1,this.no_diapason=!1,this.has_tab_index=!0,this.is_key=!1,this.is_update=!1,this.is_start=!0,this.is_finish=!1,this.is_active=!1,this.is_resize=!1,this.is_click=!1,o=o||{},this.$cache={win:t(n),body:t(e.body),input:t(r),cont:null,rs:null,min:null,max:null,from:null,to:null,single:null,bar:null,line:null,s_single:null,s_from:null,s_to:null,shad_single:null,shad_from:null,shad_to:null,edge:null,grid:null,grid_labels:[]},this.coords={x_gap:0,x_pointer:0,w_rs:0,w_rs_old:0,w_handle:0,p_gap:0,p_gap_left:0,p_gap_right:0,p_step:0,p_pointer:0,p_handle:0,p_single_fake:0,p_single_real:0,p_from_fake:0,p_from_real:0,p_to_fake:0,p_to_real:0,p_bar_x:0,p_bar_w:0,grid_gap:0,big_num:0,big:[],big_w:[],big_p:[],big_x:[]},this.labels={w_min:0,w_max:0,w_from:0,w_to:0,w_single:0,p_min:0,p_max:0,p_from_fake:0,p_from_left:0,p_to_fake:0,p_to_left:0,p_single_fake:0,p_single_left:0};var s,u,l,c=this.$cache.input,f=c.prop("value");for(l in s={skin:"flat",type:"single",min:10,max:100,from:null,to:null,step:1,min_interval:0,max_interval:0,drag_interval:!1,values:[],p_values:[],from_fixed:!1,from_min:null,from_max:null,from_shadow:!1,to_fixed:!1,to_min:null,to_max:null,to_shadow:!1,prettify_enabled:!0,prettify_separator:" ",prettify:null,force_edges:!1,keyboard:!0,grid:!1,grid_margin:!0,grid_num:4,grid_snap:!1,hide_min_max:!1,hide_from_to:!1,prefix:"",postfix:"",max_postfix:"",decorate_both:!0,values_separator:" — ",input_values_separator:";",disable:!1,block:!1,extra_classes:"",scope:null,onStart:null,onChange:null,onFinish:null,onUpdate:null},"INPUT"!==c[0].nodeName&&console&&console.warn&&console.warn("Base element should be <input>!",c[0]),(u={skin:c.data("skin"),type:c.data("type"),min:c.data("min"),max:c.data("max"),from:c.data("from"),to:c.data("to"),step:c.data("step"),min_interval:c.data("minInterval"),max_interval:c.data("maxInterval"),drag_interval:c.data("dragInterval"),values:c.data("values"),from_fixed:c.data("fromFixed"),from_min:c.data("fromMin"),from_max:c.data("fromMax"),from_shadow:c.data("fromShadow"),to_fixed:c.data("toFixed"),to_min:c.data("toMin"),to_max:c.data("toMax"),to_shadow:c.data("toShadow"),prettify_enabled:c.data("prettifyEnabled"),prettify_separator:c.data("prettifySeparator"),force_edges:c.data("forceEdges"),keyboard:c.data("keyboard"),grid:c.data("grid"),grid_margin:c.data("gridMargin"),grid_num:c.data("gridNum"),grid_snap:c.data("gridSnap"),hide_min_max:c.data("hideMinMax"),hide_from_to:c.data("hideFromTo"),prefix:c.data("prefix"),postfix:c.data("postfix"),max_postfix:c.data("maxPostfix"),decorate_both:c.data("decorateBoth"),values_separator:c.data("valuesSeparator"),input_values_separator:c.data("inputValuesSeparator"),disable:c.data("disable"),block:c.data("block"),extra_classes:c.data("extraClasses")}).values=u.values&&u.values.split(","),u)u.hasOwnProperty(l)&&(u[l]!==i&&""!==u[l]||delete u[l]);f!==i&&""!==f&&((f=f.split(u.input_values_separator||o.input_values_separator||";"))[0]&&f[0]==+f[0]&&(f[0]=+f[0]),f[1]&&f[1]==+f[1]&&(f[1]=+f[1]),o&&o.values&&o.values.length?(s.from=f[0]&&o.values.indexOf(f[0]),s.to=f[1]&&o.values.indexOf(f[1])):(s.from=f[0]&&+f[0],s.to=f[1]&&+f[1])),t.extend(s,o),t.extend(s,u),this.options=s,this.update_check={},this.validate(),this.result={input:this.$cache.input,slider:null,min:this.options.min,max:this.options.max,from:this.options.from,from_percent:0,from_value:null,to:this.options.to,to_percent:0,to_value:null},this.init()}Function.prototype.bind||(Function.prototype.bind=function(t){var e=this,n=[].slice;if("function"!=typeof e)throw new TypeError;var r=n.call(arguments,1),i=function(){if(this instanceof i){var o=function(){};o.prototype=e.prototype;var a=new o,s=e.apply(a,r.concat(n.call(arguments)));return Object(s)===s?s:a}return e.apply(t,r.concat(n.call(arguments)))};return i}),Array.prototype.indexOf||(Array.prototype.indexOf=function(t,e){var n;if(null==this)throw new TypeError('"this" is null or not defined');var r=Object(this),i=r.length>>>0;if(0==i)return-1;var o=+e||0;if(Math.abs(o)===1/0&&(o=0),i<=o)return-1;for(n=Math.max(0<=o?o:i-Math.abs(o),0);n<i;){if(n in r&&r[n]===t)return n;n++}return-1}),l.prototype={init:function(t){this.no_diapason=!1,this.coords.p_step=this.convertToPercent(this.options.step,!0),this.target="base",this.toggleInput(),this.append(),this.setMinMax(),t?(this.force_redraw=!0,this.calc(!0),this.callOnUpdate()):(this.force_redraw=!0,this.calc(!0),this.callOnStart()),this.updateScene()},append:function(){var t='<span class="irs irs--'+this.options.skin+" js-irs-"+this.plugin_count+" "+this.options.extra_classes+'"></span>';this.$cache.input.before(t),this.$cache.input.prop("readonly",!0),this.$cache.cont=this.$cache.input.prev(),this.result.slider=this.$cache.cont,this.$cache.cont.html('<span class="irs"><span class="irs-line" tabindex="0"></span><span class="irs-min">0</span><span class="irs-max">1</span><span class="irs-from">0</span><span class="irs-to">0</span><span class="irs-single">0</span></span><span class="irs-grid"></span>'),this.$cache.rs=this.$cache.cont.find(".irs"),this.$cache.min=this.$cache.cont.find(".irs-min"),this.$cache.max=this.$cache.cont.find(".irs-max"),this.$cache.from=this.$cache.cont.find(".irs-from"),this.$cache.to=this.$cache.cont.find(".irs-to"),this.$cache.single=this.$cache.cont.find(".irs-single"),this.$cache.line=this.$cache.cont.find(".irs-line"),this.$cache.grid=this.$cache.cont.find(".irs-grid"),"single"===this.options.type?(this.$cache.cont.append('<span class="irs-bar irs-bar--single"></span><span class="irs-shadow shadow-single"></span><span class="irs-handle single"><i></i><i></i><i></i></span>'),this.$cache.bar=this.$cache.cont.find(".irs-bar"),this.$cache.edge=this.$cache.cont.find(".irs-bar-edge"),this.$cache.s_single=this.$cache.cont.find(".single"),this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.shad_single=this.$cache.cont.find(".shadow-single")):(this.$cache.cont.append('<span class="irs-bar"></span><span class="irs-shadow shadow-from"></span><span class="irs-shadow shadow-to"></span><span class="irs-handle from"><i></i><i></i><i></i></span><span class="irs-handle to"><i></i><i></i><i></i></span>'),this.$cache.bar=this.$cache.cont.find(".irs-bar"),this.$cache.s_from=this.$cache.cont.find(".from"),this.$cache.s_to=this.$cache.cont.find(".to"),this.$cache.shad_from=this.$cache.cont.find(".shadow-from"),this.$cache.shad_to=this.$cache.cont.find(".shadow-to"),this.setTopHandler()),this.options.hide_from_to&&(this.$cache.from[0].style.display="none",this.$cache.to[0].style.display="none",this.$cache.single[0].style.display="none"),this.appendGrid(),this.options.disable?(this.appendDisableMask(),this.$cache.input[0].disabled=!0):(this.$cache.input[0].disabled=!1,this.removeDisableMask(),this.bindEvents()),this.options.disable||(this.options.block?this.appendDisableMask():this.removeDisableMask()),this.options.drag_interval&&(this.$cache.bar[0].style.cursor="ew-resize")},setTopHandler:function(){var t=this.options.min,e=this.options.max,n=this.options.from,r=this.options.to;t<n&&r===e?this.$cache.s_from.addClass("type_last"):r<e&&this.$cache.s_to.addClass("type_last")},changeLevel:function(t){switch(t){case"single":this.coords.p_gap=this.toFixed(this.coords.p_pointer-this.coords.p_single_fake),this.$cache.s_single.addClass("state_hover");break;case"from":this.coords.p_gap=this.toFixed(this.coords.p_pointer-this.coords.p_from_fake),this.$cache.s_from.addClass("state_hover"),this.$cache.s_from.addClass("type_last"),this.$cache.s_to.removeClass("type_last");break;case"to":this.coords.p_gap=this.toFixed(this.coords.p_pointer-this.coords.p_to_fake),this.$cache.s_to.addClass("state_hover"),this.$cache.s_to.addClass("type_last"),this.$cache.s_from.removeClass("type_last");break;case"both":this.coords.p_gap_left=this.toFixed(this.coords.p_pointer-this.coords.p_from_fake),this.coords.p_gap_right=this.toFixed(this.coords.p_to_fake-this.coords.p_pointer),this.$cache.s_to.removeClass("type_last"),this.$cache.s_from.removeClass("type_last")}},appendDisableMask:function(){this.$cache.cont.append('<span class="irs-disable-mask"></span>'),this.$cache.cont.addClass("irs-disabled")},removeDisableMask:function(){this.$cache.cont.remove(".irs-disable-mask"),this.$cache.cont.removeClass("irs-disabled")},remove:function(){this.$cache.cont.remove(),this.$cache.cont=null,this.$cache.line.off("keydown.irs_"+this.plugin_count),this.$cache.body.off("touchmove.irs_"+this.plugin_count),this.$cache.body.off("mousemove.irs_"+this.plugin_count),this.$cache.win.off("touchend.irs_"+this.plugin_count),this.$cache.win.off("mouseup.irs_"+this.plugin_count),u&&(this.$cache.body.off("mouseup.irs_"+this.plugin_count),this.$cache.body.off("mouseleave.irs_"+this.plugin_count)),this.$cache.grid_labels=[],this.coords.big=[],this.coords.big_w=[],this.coords.big_p=[],this.coords.big_x=[],cancelAnimationFrame(this.raf_id)},bindEvents:function(){this.no_diapason||(this.$cache.body.on("touchmove.irs_"+this.plugin_count,this.pointerMove.bind(this)),this.$cache.body.on("mousemove.irs_"+this.plugin_count,this.pointerMove.bind(this)),this.$cache.win.on("touchend.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.win.on("mouseup.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.line.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.line.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.line.on("focus.irs_"+this.plugin_count,this.pointerFocus.bind(this)),this.options.drag_interval&&"double"===this.options.type?(this.$cache.bar.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"both")),this.$cache.bar.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"both"))):(this.$cache.bar.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.bar.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))),"single"===this.options.type?(this.$cache.single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.s_single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.shad_single.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.s_single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.edge.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_single.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))):(this.$cache.single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,null)),this.$cache.single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,null)),this.$cache.from.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.s_from.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.to.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.s_to.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.shad_from.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_to.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.from.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.s_from.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.to.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.s_to.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.shad_from.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_to.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))),this.options.keyboard&&this.$cache.line.on("keydown.irs_"+this.plugin_count,this.key.bind(this,"keyboard")),u&&(this.$cache.body.on("mouseup.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.body.on("mouseleave.irs_"+this.plugin_count,this.pointerUp.bind(this))))},pointerFocus:function(t){var e,n;this.target||(e=(n="single"===this.options.type?this.$cache.single:this.$cache.from).offset().left,e+=n.width()/2-1,this.pointerClick("single",{preventDefault:function(){},pageX:e}))},pointerMove:function(t){if(this.dragging){var e=t.pageX||t.originalEvent.touches&&t.originalEvent.touches[0].pageX;this.coords.x_pointer=e-this.coords.x_gap,this.calc()}},pointerUp:function(e){this.current_plugin===this.plugin_count&&this.is_active&&(this.is_active=!1,this.$cache.cont.find(".state_hover").removeClass("state_hover"),this.force_redraw=!0,u&&t("*").prop("unselectable",!1),this.updateScene(),this.restoreOriginalMinInterval(),(t.contains(this.$cache.cont[0],e.target)||this.dragging)&&this.callOnFinish(),this.dragging=!1)},pointerDown:function(e,n){n.preventDefault();var r=n.pageX||n.originalEvent.touches&&n.originalEvent.touches[0].pageX;2!==n.button&&("both"===e&&this.setTempMinInterval(),e=e||this.target||"from",this.current_plugin=this.plugin_count,this.target=e,this.is_active=!0,this.dragging=!0,this.coords.x_gap=this.$cache.rs.offset().left,this.coords.x_pointer=r-this.coords.x_gap,this.calcPointerPercent(),this.changeLevel(e),u&&t("*").prop("unselectable",!0),this.$cache.line.trigger("focus"),this.updateScene())},pointerClick:function(t,e){e.preventDefault();var n=e.pageX||e.originalEvent.touches&&e.originalEvent.touches[0].pageX;2!==e.button&&(this.current_plugin=this.plugin_count,this.target=t,this.is_click=!0,this.coords.x_gap=this.$cache.rs.offset().left,this.coords.x_pointer=+(n-this.coords.x_gap).toFixed(),this.force_redraw=!0,this.calc(),this.$cache.line.trigger("focus"))},key:function(t,e){if(!(this.current_plugin!==this.plugin_count||e.altKey||e.ctrlKey||e.shiftKey||e.metaKey)){switch(e.which){case 83:case 65:case 40:case 37:e.preventDefault(),this.moveByKey(!1);break;case 87:case 68:case 38:case 39:e.preventDefault(),this.moveByKey(!0)}return!0}},moveByKey:function(t){var e=this.coords.p_pointer,n=(this.options.max-this.options.min)/100;n=this.options.step/n,t?e+=n:e-=n,this.coords.x_pointer=this.toFixed(this.coords.w_rs/100*e),this.is_key=!0,this.calc()},setMinMax:function(){if(this.options){if(this.options.hide_min_max)return this.$cache.min[0].style.display="none",void(this.$cache.max[0].style.display="none");if(this.options.values.length)this.$cache.min.html(this.decorate(this.options.p_values[this.options.min])),this.$cache.max.html(this.decorate(this.options.p_values[this.options.max]));else{var t=this._prettify(this.options.min),e=this._prettify(this.options.max);this.result.min_pretty=t,this.result.max_pretty=e,this.$cache.min.html(this.decorate(t,this.options.min)),this.$cache.max.html(this.decorate(e,this.options.max))}this.labels.w_min=this.$cache.min.outerWidth(!1),this.labels.w_max=this.$cache.max.outerWidth(!1)}},setTempMinInterval:function(){var t=this.result.to-this.result.from;null===this.old_min_interval&&(this.old_min_interval=this.options.min_interval),this.options.min_interval=t},restoreOriginalMinInterval:function(){null!==this.old_min_interval&&(this.options.min_interval=this.old_min_interval,this.old_min_interval=null)},calc:function(t){if(this.options&&(this.calc_count++,10!==this.calc_count&&!t||(this.calc_count=0,this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.calcHandlePercent()),this.coords.w_rs)){this.calcPointerPercent();var e=this.getHandleX();switch("both"===this.target&&(this.coords.p_gap=0,e=this.getHandleX()),"click"===this.target&&(this.coords.p_gap=this.coords.p_handle/2,e=this.getHandleX(),this.options.drag_interval?this.target="both_one":this.target=this.chooseHandle(e)),this.target){case"base":var n=(this.options.max-this.options.min)/100,r=(this.result.from-this.options.min)/n,i=(this.result.to-this.options.min)/n;this.coords.p_single_real=this.toFixed(r),this.coords.p_from_real=this.toFixed(r),this.coords.p_to_real=this.toFixed(i),this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max),this.coords.p_single_fake=this.convertToFakePercent(this.coords.p_single_real),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real),this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real),this.target=null;break;case"single":if(this.options.from_fixed)break;this.coords.p_single_real=this.convertToRealPercent(e),this.coords.p_single_real=this.calcWithStep(this.coords.p_single_real),this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max),this.coords.p_single_fake=this.convertToFakePercent(this.coords.p_single_real);break;case"from":if(this.options.from_fixed)break;this.coords.p_from_real=this.convertToRealPercent(e),this.coords.p_from_real=this.calcWithStep(this.coords.p_from_real),this.coords.p_from_real>this.coords.p_to_real&&(this.coords.p_from_real=this.coords.p_to_real),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_from_real=this.checkMinInterval(this.coords.p_from_real,this.coords.p_to_real,"from"),this.coords.p_from_real=this.checkMaxInterval(this.coords.p_from_real,this.coords.p_to_real,"from"),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real);break;case"to":if(this.options.to_fixed)break;this.coords.p_to_real=this.convertToRealPercent(e),this.coords.p_to_real=this.calcWithStep(this.coords.p_to_real),this.coords.p_to_real<this.coords.p_from_real&&(this.coords.p_to_real=this.coords.p_from_real),this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max),this.coords.p_to_real=this.checkMinInterval(this.coords.p_to_real,this.coords.p_from_real,"to"),this.coords.p_to_real=this.checkMaxInterval(this.coords.p_to_real,this.coords.p_from_real,"to"),this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real);break;case"both":if(this.options.from_fixed||this.options.to_fixed)break;e=this.toFixed(e+.001*this.coords.p_handle),this.coords.p_from_real=this.convertToRealPercent(e)-this.coords.p_gap_left,this.coords.p_from_real=this.calcWithStep(this.coords.p_from_real),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_from_real=this.checkMinInterval(this.coords.p_from_real,this.coords.p_to_real,"from"),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real),this.coords.p_to_real=this.convertToRealPercent(e)+this.coords.p_gap_right,this.coords.p_to_real=this.calcWithStep(this.coords.p_to_real),this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max),this.coords.p_to_real=this.checkMinInterval(this.coords.p_to_real,this.coords.p_from_real,"to"),this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real);break;case"both_one":if(this.options.from_fixed||this.options.to_fixed)break;var o=this.convertToRealPercent(e),a=this.result.from_percent,s=this.result.to_percent-a,u=s/2,l=o-u,c=o+u;l<0&&(c=(l=0)+s),100<c&&(l=(c=100)-s),this.coords.p_from_real=this.calcWithStep(l),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real),this.coords.p_to_real=this.calcWithStep(c),this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max),this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real)}"single"===this.options.type?(this.coords.p_bar_x=this.coords.p_handle/2,this.coords.p_bar_w=this.coords.p_single_fake,this.result.from_percent=this.coords.p_single_real,this.result.from=this.convertToValue(this.coords.p_single_real),this.result.from_pretty=this._prettify(this.result.from),this.options.values.length&&(this.result.from_value=this.options.values[this.result.from])):(this.coords.p_bar_x=this.toFixed(this.coords.p_from_fake+this.coords.p_handle/2),this.coords.p_bar_w=this.toFixed(this.coords.p_to_fake-this.coords.p_from_fake),this.result.from_percent=this.coords.p_from_real,this.result.from=this.convertToValue(this.coords.p_from_real),this.result.from_pretty=this._prettify(this.result.from),this.result.to_percent=this.coords.p_to_real,this.result.to=this.convertToValue(this.coords.p_to_real),this.result.to_pretty=this._prettify(this.result.to),this.options.values.length&&(this.result.from_value=this.options.values[this.result.from],this.result.to_value=this.options.values[this.result.to])),this.calcMinMax(),this.calcLabels()}},calcPointerPercent:function(){this.coords.w_rs?(this.coords.x_pointer<0||isNaN(this.coords.x_pointer)?this.coords.x_pointer=0:this.coords.x_pointer>this.coords.w_rs&&(this.coords.x_pointer=this.coords.w_rs),this.coords.p_pointer=this.toFixed(this.coords.x_pointer/this.coords.w_rs*100)):this.coords.p_pointer=0},convertToRealPercent:function(t){return t/(100-this.coords.p_handle)*100},convertToFakePercent:function(t){return t/100*(100-this.coords.p_handle)},getHandleX:function(){var t=100-this.coords.p_handle,e=this.toFixed(this.coords.p_pointer-this.coords.p_gap);return e<0?e=0:t<e&&(e=t),e},calcHandlePercent:function(){"single"===this.options.type?this.coords.w_handle=this.$cache.s_single.outerWidth(!1):this.coords.w_handle=this.$cache.s_from.outerWidth(!1),this.coords.p_handle=this.toFixed(this.coords.w_handle/this.coords.w_rs*100)},chooseHandle:function(t){return"single"===this.options.type?"single":this.coords.p_from_real+(this.coords.p_to_real-this.coords.p_from_real)/2<=t?this.options.to_fixed?"from":"to":this.options.from_fixed?"to":"from"},calcMinMax:function(){this.coords.w_rs&&(this.labels.p_min=this.labels.w_min/this.coords.w_rs*100,this.labels.p_max=this.labels.w_max/this.coords.w_rs*100)},calcLabels:function(){this.coords.w_rs&&!this.options.hide_from_to&&("single"===this.options.type?(this.labels.w_single=this.$cache.single.outerWidth(!1),this.labels.p_single_fake=this.labels.w_single/this.coords.w_rs*100,this.labels.p_single_left=this.coords.p_single_fake+this.coords.p_handle/2-this.labels.p_single_fake/2):(this.labels.w_from=this.$cache.from.outerWidth(!1),this.labels.p_from_fake=this.labels.w_from/this.coords.w_rs*100,this.labels.p_from_left=this.coords.p_from_fake+this.coords.p_handle/2-this.labels.p_from_fake/2,this.labels.p_from_left=this.toFixed(this.labels.p_from_left),this.labels.p_from_left=this.checkEdges(this.labels.p_from_left,this.labels.p_from_fake),this.labels.w_to=this.$cache.to.outerWidth(!1),this.labels.p_to_fake=this.labels.w_to/this.coords.w_rs*100,this.labels.p_to_left=this.coords.p_to_fake+this.coords.p_handle/2-this.labels.p_to_fake/2,this.labels.p_to_left=this.toFixed(this.labels.p_to_left),this.labels.p_to_left=this.checkEdges(this.labels.p_to_left,this.labels.p_to_fake),this.labels.w_single=this.$cache.single.outerWidth(!1),this.labels.p_single_fake=this.labels.w_single/this.coords.w_rs*100,this.labels.p_single_left=(this.labels.p_from_left+this.labels.p_to_left+this.labels.p_to_fake)/2-this.labels.p_single_fake/2,this.labels.p_single_left=this.toFixed(this.labels.p_single_left)),this.labels.p_single_left=this.checkEdges(this.labels.p_single_left,this.labels.p_single_fake))},updateScene:function(){this.raf_id&&(cancelAnimationFrame(this.raf_id),this.raf_id=null),clearTimeout(this.update_tm),this.update_tm=null,this.options&&(this.drawHandles(),this.is_active?this.raf_id=requestAnimationFrame(this.updateScene.bind(this)):this.update_tm=setTimeout(this.updateScene.bind(this),300))},drawHandles:function(){this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.coords.w_rs&&(this.coords.w_rs!==this.coords.w_rs_old&&(this.target="base",this.is_resize=!0),this.coords.w_rs===this.coords.w_rs_old&&!this.force_redraw||(this.setMinMax(),this.calc(!0),this.drawLabels(),this.options.grid&&(this.calcGridMargin(),this.calcGridLabels()),this.force_redraw=!0,this.coords.w_rs_old=this.coords.w_rs,this.drawShadow()),this.coords.w_rs&&(this.dragging||this.force_redraw||this.is_key)&&((this.old_from!==this.result.from||this.old_to!==this.result.to||this.force_redraw||this.is_key)&&(this.drawLabels(),this.$cache.bar[0].style.left=this.coords.p_bar_x+"%",this.$cache.bar[0].style.width=this.coords.p_bar_w+"%","single"===this.options.type?(this.$cache.bar[0].style.left=0,this.$cache.bar[0].style.width=this.coords.p_bar_w+this.coords.p_bar_x+"%",this.$cache.s_single[0].style.left=this.coords.p_single_fake+"%"):(this.$cache.s_from[0].style.left=this.coords.p_from_fake+"%",this.$cache.s_to[0].style.left=this.coords.p_to_fake+"%",this.old_from===this.result.from&&!this.force_redraw||(this.$cache.from[0].style.left=this.labels.p_from_left+"%"),this.old_to===this.result.to&&!this.force_redraw||(this.$cache.to[0].style.left=this.labels.p_to_left+"%")),this.$cache.single[0].style.left=this.labels.p_single_left+"%",this.writeToInput(),this.old_from===this.result.from&&this.old_to===this.result.to||this.is_start||(this.$cache.input.trigger("change"),this.$cache.input.trigger("input")),this.old_from=this.result.from,this.old_to=this.result.to,this.is_resize||this.is_update||this.is_start||this.is_finish||this.callOnChange(),(this.is_key||this.is_click)&&(this.is_key=!1,this.is_click=!1,this.callOnFinish()),this.is_update=!1,this.is_resize=!1,this.is_finish=!1),this.is_start=!1,this.is_key=!1,this.is_click=!1,this.force_redraw=!1))},drawLabels:function(){if(this.options){var t,e,n,r,i,o=this.options.values.length,a=this.options.p_values;if(!this.options.hide_from_to)if("single"===this.options.type)t=o?this.decorate(a[this.result.from]):(r=this._prettify(this.result.from),this.decorate(r,this.result.from)),this.$cache.single.html(t),this.calcLabels(),this.labels.p_single_left<this.labels.p_min+1?this.$cache.min[0].style.visibility="hidden":this.$cache.min[0].style.visibility="visible",this.labels.p_single_left+this.labels.p_single_fake>100-this.labels.p_max-1?this.$cache.max[0].style.visibility="hidden":this.$cache.max[0].style.visibility="visible";else{n=o?(this.options.decorate_both?(t=this.decorate(a[this.result.from]),t+=this.options.values_separator,t+=this.decorate(a[this.result.to])):t=this.decorate(a[this.result.from]+this.options.values_separator+a[this.result.to]),e=this.decorate(a[this.result.from]),this.decorate(a[this.result.to])):(r=this._prettify(this.result.from),i=this._prettify(this.result.to),this.options.decorate_both?(t=this.decorate(r,this.result.from),t+=this.options.values_separator,t+=this.decorate(i,this.result.to)):t=this.decorate(r+this.options.values_separator+i,this.result.to),e=this.decorate(r,this.result.from),this.decorate(i,this.result.to)),this.$cache.single.html(t),this.$cache.from.html(e),this.$cache.to.html(n),this.calcLabels();var s=Math.min(this.labels.p_single_left,this.labels.p_from_left),u=this.labels.p_single_left+this.labels.p_single_fake,l=this.labels.p_to_left+this.labels.p_to_fake,c=Math.max(u,l);this.labels.p_from_left+this.labels.p_from_fake>=this.labels.p_to_left?(this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.single[0].style.visibility="visible",c=this.result.from===this.result.to?("from"===this.target?this.$cache.from[0].style.visibility="visible":"to"===this.target?this.$cache.to[0].style.visibility="visible":this.target||(this.$cache.from[0].style.visibility="visible"),this.$cache.single[0].style.visibility="hidden",l):(this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.single[0].style.visibility="visible",Math.max(u,l))):(this.$cache.from[0].style.visibility="visible",this.$cache.to[0].style.visibility="visible",this.$cache.single[0].style.visibility="hidden"),s<this.labels.p_min+1?this.$cache.min[0].style.visibility="hidden":this.$cache.min[0].style.visibility="visible",c>100-this.labels.p_max-1?this.$cache.max[0].style.visibility="hidden":this.$cache.max[0].style.visibility="visible"}}},drawShadow:function(){var t,e,n,r,i=this.options,o=this.$cache,a="number"==typeof i.from_min&&!isNaN(i.from_min),s="number"==typeof i.from_max&&!isNaN(i.from_max),u="number"==typeof i.to_min&&!isNaN(i.to_min),l="number"==typeof i.to_max&&!isNaN(i.to_max);"single"===i.type?i.from_shadow&&(a||s)?(t=this.convertToPercent(a?i.from_min:i.min),e=this.convertToPercent(s?i.from_max:i.max)-t,t=this.toFixed(t-this.coords.p_handle/100*t),e=this.toFixed(e-this.coords.p_handle/100*e),t+=this.coords.p_handle/2,o.shad_single[0].style.display="block",o.shad_single[0].style.left=t+"%",o.shad_single[0].style.width=e+"%"):o.shad_single[0].style.display="none":(i.from_shadow&&(a||s)?(t=this.convertToPercent(a?i.from_min:i.min),e=this.convertToPercent(s?i.from_max:i.max)-t,t=this.toFixed(t-this.coords.p_handle/100*t),e=this.toFixed(e-this.coords.p_handle/100*e),t+=this.coords.p_handle/2,o.shad_from[0].style.display="block",o.shad_from[0].style.left=t+"%",o.shad_from[0].style.width=e+"%"):o.shad_from[0].style.display="none",i.to_shadow&&(u||l)?(n=this.convertToPercent(u?i.to_min:i.min),r=this.convertToPercent(l?i.to_max:i.max)-n,n=this.toFixed(n-this.coords.p_handle/100*n),r=this.toFixed(r-this.coords.p_handle/100*r),n+=this.coords.p_handle/2,o.shad_to[0].style.display="block",o.shad_to[0].style.left=n+"%",o.shad_to[0].style.width=r+"%"):o.shad_to[0].style.display="none")},writeToInput:function(){"single"===this.options.type?(this.options.values.length?this.$cache.input.prop("value",this.result.from_value):this.$cache.input.prop("value",this.result.from),this.$cache.input.data("from",this.result.from)):(this.options.values.length?this.$cache.input.prop("value",this.result.from_value+this.options.input_values_separator+this.result.to_value):this.$cache.input.prop("value",this.result.from+this.options.input_values_separator+this.result.to),this.$cache.input.data("from",this.result.from),this.$cache.input.data("to",this.result.to))},callOnStart:function(){this.writeToInput(),this.options.onStart&&"function"==typeof this.options.onStart&&(this.options.scope?this.options.onStart.call(this.options.scope,this.result):this.options.onStart(this.result))},callOnChange:function(){this.writeToInput(),this.options.onChange&&"function"==typeof this.options.onChange&&(this.options.scope?this.options.onChange.call(this.options.scope,this.result):this.options.onChange(this.result))},callOnFinish:function(){this.writeToInput(),this.options.onFinish&&"function"==typeof this.options.onFinish&&(this.options.scope?this.options.onFinish.call(this.options.scope,this.result):this.options.onFinish(this.result))},callOnUpdate:function(){this.writeToInput(),this.options.onUpdate&&"function"==typeof this.options.onUpdate&&(this.options.scope?this.options.onUpdate.call(this.options.scope,this.result):this.options.onUpdate(this.result))},toggleInput:function(){this.$cache.input.toggleClass("irs-hidden-input"),this.has_tab_index?this.$cache.input.prop("tabindex",-1):this.$cache.input.removeProp("tabindex"),this.has_tab_index=!this.has_tab_index},convertToPercent:function(t,e){var n,r=this.options.max-this.options.min,i=r/100;return r?(n=(e?t:t-this.options.min)/i,this.toFixed(n)):(this.no_diapason=!0,0)},convertToValue:function(t){var e,n,r=this.options.min,i=this.options.max,o=r.toString().split(".")[1],a=i.toString().split(".")[1],s=0,u=0;if(0===t)return this.options.min;if(100===t)return this.options.max;o&&(s=e=o.length),a&&(s=n=a.length),e&&n&&(s=n<=e?e:n),r<0&&(r=+(r+(u=Math.abs(r))).toFixed(s),i=+(i+u).toFixed(s));var l,c=(i-r)/100*t+r,f=this.options.step.toString().split(".")[1];return c=f?+c.toFixed(f.length):(c/=this.options.step,+(c*=this.options.step).toFixed(0)),u&&(c-=u),(l=f?+c.toFixed(f.length):this.toFixed(c))<this.options.min?l=this.options.min:l>this.options.max&&(l=this.options.max),l},calcWithStep:function(t){var e=Math.round(t/this.coords.p_step)*this.coords.p_step;return 100<e&&(e=100),100===t&&(e=100),this.toFixed(e)},checkMinInterval:function(t,e,n){var r,i,o=this.options;return o.min_interval?(r=this.convertToValue(t),i=this.convertToValue(e),"from"===n?i-r<o.min_interval&&(r=i-o.min_interval):r-i<o.min_interval&&(r=i+o.min_interval),this.convertToPercent(r)):t},checkMaxInterval:function(t,e,n){var r,i,o=this.options;return o.max_interval?(r=this.convertToValue(t),i=this.convertToValue(e),"from"===n?i-r>o.max_interval&&(r=i-o.max_interval):r-i>o.max_interval&&(r=i+o.max_interval),this.convertToPercent(r)):t},checkDiapason:function(t,e,n){var r=this.convertToValue(t),i=this.options;return"number"!=typeof e&&(e=i.min),"number"!=typeof n&&(n=i.max),r<e&&(r=e),n<r&&(r=n),this.convertToPercent(r)},toFixed:function(t){return+(t=t.toFixed(20))},_prettify:function(t){return this.options.prettify_enabled?this.options.prettify&&"function"==typeof this.options.prettify?this.options.prettify(t):this.prettify(t):t},prettify:function(t){return t.toString().replace(/(\d{1,3}(?=(?:\d\d\d)+(?!\d)))/g,"$1"+this.options.prettify_separator)},checkEdges:function(t,e){return this.options.force_edges&&(t<0?t=0:100-e<t&&(t=100-e)),this.toFixed(t)},validate:function(){var t,e,n=this.options,r=this.result,i=n.values,o=i.length;if("string"==typeof n.min&&(n.min=+n.min),"string"==typeof n.max&&(n.max=+n.max),"string"==typeof n.from&&(n.from=+n.from),"string"==typeof n.to&&(n.to=+n.to),"string"==typeof n.step&&(n.step=+n.step),"string"==typeof n.from_min&&(n.from_min=+n.from_min),"string"==typeof n.from_max&&(n.from_max=+n.from_max),"string"==typeof n.to_min&&(n.to_min=+n.to_min),"string"==typeof n.to_max&&(n.to_max=+n.to_max),"string"==typeof n.grid_num&&(n.grid_num=+n.grid_num),n.max<n.min&&(n.max=n.min),o)for(n.p_values=[],n.min=0,n.max=o-1,n.step=1,n.grid_num=n.max,n.grid_snap=!0,e=0;e<o;e++)t=+i[e],t=isNaN(t)?i[e]:(i[e]=t,this._prettify(t)),n.p_values.push(t);"number"==typeof n.from&&!isNaN(n.from)||(n.from=n.min),"number"==typeof n.to&&!isNaN(n.to)||(n.to=n.max),"single"===n.type?(n.from<n.min&&(n.from=n.min),n.from>n.max&&(n.from=n.max)):(n.from<n.min&&(n.from=n.min),n.from>n.max&&(n.from=n.max),n.to<n.min&&(n.to=n.min),n.to>n.max&&(n.to=n.max),this.update_check.from&&(this.update_check.from!==n.from&&n.from>n.to&&(n.from=n.to),this.update_check.to!==n.to&&n.to<n.from&&(n.to=n.from)),n.from>n.to&&(n.from=n.to),n.to<n.from&&(n.to=n.from)),("number"!=typeof n.step||isNaN(n.step)||!n.step||n.step<0)&&(n.step=1),"number"==typeof n.from_min&&n.from<n.from_min&&(n.from=n.from_min),"number"==typeof n.from_max&&n.from>n.from_max&&(n.from=n.from_max),"number"==typeof n.to_min&&n.to<n.to_min&&(n.to=n.to_min),"number"==typeof n.to_max&&n.from>n.to_max&&(n.to=n.to_max),r&&(r.min!==n.min&&(r.min=n.min),r.max!==n.max&&(r.max=n.max),(r.from<r.min||r.from>r.max)&&(r.from=n.from),(r.to<r.min||r.to>r.max)&&(r.to=n.to)),("number"!=typeof n.min_interval||isNaN(n.min_interval)||!n.min_interval||n.min_interval<0)&&(n.min_interval=0),("number"!=typeof n.max_interval||isNaN(n.max_interval)||!n.max_interval||n.max_interval<0)&&(n.max_interval=0),n.min_interval&&n.min_interval>n.max-n.min&&(n.min_interval=n.max-n.min),n.max_interval&&n.max_interval>n.max-n.min&&(n.max_interval=n.max-n.min)},decorate:function(t,e){var n="",r=this.options;return r.prefix&&(n+=r.prefix),n+=t,r.max_postfix&&(r.values.length&&t===r.p_values[r.max]||e===r.max)&&(n+=r.max_postfix,r.postfix&&(n+=" ")),r.postfix&&(n+=r.postfix),n},updateFrom:function(){this.result.from=this.options.from,this.result.from_percent=this.convertToPercent(this.result.from),this.result.from_pretty=this._prettify(this.result.from),this.options.values&&(this.result.from_value=this.options.values[this.result.from])},updateTo:function(){this.result.to=this.options.to,this.result.to_percent=this.convertToPercent(this.result.to),this.result.to_pretty=this._prettify(this.result.to),this.options.values&&(this.result.to_value=this.options.values[this.result.to])},updateResult:function(){this.result.min=this.options.min,this.result.max=this.options.max,this.updateFrom(),this.updateTo()},appendGrid:function(){if(this.options.grid){var t,e,n,r,i,o,a=this.options,s=a.max-a.min,u=a.grid_num,l=0,c=4,f="";for(this.calcGridMargin(),a.grid_snap&&(u=s/a.step),50<u&&(u=50),n=this.toFixed(100/u),4<u&&(c=3),7<u&&(c=2),14<u&&(c=1),28<u&&(c=0),t=0;t<u+1;t++){for(r=c,100<(l=this.toFixed(n*t))&&(l=100),i=((this.coords.big[t]=l)-n*(t-1))/(r+1),e=1;e<=r&&0!==l;e++)f+='<span class="irs-grid-pol small" style="left: '+this.toFixed(l-i*e)+'%"></span>';f+='<span class="irs-grid-pol" style="left: '+l+'%"></span>',o=this.convertToValue(l),f+='<span class="irs-grid-text js-grid-text-'+t+'" style="left: '+l+'%">'+(o=a.values.length?a.p_values[o]:this._prettify(o))+"</span>"}this.coords.big_num=Math.ceil(u+1),this.$cache.cont.addClass("irs-with-grid"),this.$cache.grid.html(f),this.cacheGridLabels()}},cacheGridLabels:function(){var t,e,n=this.coords.big_num;for(e=0;e<n;e++)t=this.$cache.grid.find(".js-grid-text-"+e),this.$cache.grid_labels.push(t);this.calcGridLabels()},calcGridLabels:function(){var t,e,n=[],r=[],i=this.coords.big_num;for(t=0;t<i;t++)this.coords.big_w[t]=this.$cache.grid_labels[t].outerWidth(!1),this.coords.big_p[t]=this.toFixed(this.coords.big_w[t]/this.coords.w_rs*100),this.coords.big_x[t]=this.toFixed(this.coords.big_p[t]/2),n[t]=this.toFixed(this.coords.big[t]-this.coords.big_x[t]),r[t]=this.toFixed(n[t]+this.coords.big_p[t]);for(this.options.force_edges&&(n[0]<-this.coords.grid_gap&&(n[0]=-this.coords.grid_gap,r[0]=this.toFixed(n[0]+this.coords.big_p[0]),this.coords.big_x[0]=this.coords.grid_gap),r[i-1]>100+this.coords.grid_gap&&(r[i-1]=100+this.coords.grid_gap,n[i-1]=this.toFixed(r[i-1]-this.coords.big_p[i-1]),this.coords.big_x[i-1]=this.toFixed(this.coords.big_p[i-1]-this.coords.grid_gap))),this.calcGridCollision(2,n,r),this.calcGridCollision(4,n,r),t=0;t<i;t++)e=this.$cache.grid_labels[t][0],this.coords.big_x[t]!==Number.POSITIVE_INFINITY&&(e.style.marginLeft=-this.coords.big_x[t]+"%")},calcGridCollision:function(t,e,n){var r,i,o,a=this.coords.big_num;for(r=0;r<a&&!(a<=(i=r+t/2));r+=t)o=this.$cache.grid_labels[i][0],n[r]<=e[i]?o.style.visibility="visible":o.style.visibility="hidden"},calcGridMargin:function(){this.options.grid_margin&&(this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.coords.w_rs&&("single"===this.options.type?this.coords.w_handle=this.$cache.s_single.outerWidth(!1):this.coords.w_handle=this.$cache.s_from.outerWidth(!1),this.coords.p_handle=this.toFixed(this.coords.w_handle/this.coords.w_rs*100),this.coords.grid_gap=this.toFixed(this.coords.p_handle/2-.1),this.$cache.grid[0].style.width=this.toFixed(100-this.coords.p_handle)+"%",this.$cache.grid[0].style.left=this.coords.grid_gap+"%"))},update:function(e){this.input&&(this.is_update=!0,this.options.from=this.result.from,this.options.to=this.result.to,this.update_check.from=this.result.from,this.update_check.to=this.result.to,this.options=t.extend(this.options,e),this.validate(),this.updateResult(e),this.toggleInput(),this.remove(),this.init(!0))},reset:function(){this.input&&(this.updateResult(),this.update())},destroy:function(){this.input&&(this.toggleInput(),this.$cache.input.prop("readonly",!1),t.data(this.input,"ionRangeSlider",null),this.remove(),this.input=null,this.options=null)}},t.fn.ionRangeSlider=function(e){return this.each((function(){t.data(this,"ionRangeSlider")||t.data(this,"ionRangeSlider",new l(this,e,s++))}))},function(){for(var t=0,e=["ms","moz","webkit","o"],r=0;r<e.length&&!n.requestAnimationFrame;++r)n.requestAnimationFrame=n[e[r]+"RequestAnimationFrame"],n.cancelAnimationFrame=n[e[r]+"CancelAnimationFrame"]||n[e[r]+"CancelRequestAnimationFrame"];n.requestAnimationFrame||(n.requestAnimationFrame=function(e,r){var i=(new Date).getTime(),o=Math.max(0,16-(i-t)),a=n.setTimeout((function(){e(i+o)}),o);return t=i+o,a}),n.cancelAnimationFrame||(n.cancelAnimationFrame=function(t){clearTimeout(t)})}()},void 0!==a&&a||!n.amdO?o(void 0!==a&&a||"object"!=typeof e?a:n(19755),document,window,navigator):(r=[n(19755)],void 0===(i=function(t){return o(t,document,window,navigator)}.apply(e,r))||(t.exports=i))},62813:function(t,e,n){var r,i,o,a,s;!function(){"use strict";var t,e,n,r,i,o;o=864e5,t=function(t,e){return"string"==typeof t&&"string"==typeof e&&t.toLowerCase()===e.toLowerCase()},e=function(t,n,r){var i=r||"0",o=t.toString();return o.length<n?e(i+o,n):o},n=function(t){var e,r;for(t=t||{},e=1;e<arguments.length;e++)if(r=arguments[e])for(var i in r)r.hasOwnProperty(i)&&("object"==typeof r[i]?n(t[i],r[i]):t[i]=r[i]);return t},r=function(t,e){for(var n=0;n<e.length;n++)if(e[n].toLowerCase()===t.toLowerCase())return n;return-1},i={dateSettings:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],meridiem:["AM","PM"],ordinal:function(t){var e=t%10,n={1:"st",2:"nd",3:"rd"};return 1!==Math.floor(t%100/10)&&n[e]?n[e]:"th"}},separators:/[ \-+\/\.T:@]/g,validParts:/[dDjlNSwzWFmMntLoYyaABgGhHisueTIOPZcrU]/g,intParts:/[djwNzmnyYhHgGis]/g,tzParts:/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,tzClip:/[^-+\dA-Z]/g},a=function(t){var e=this,r=n(i,t);e.dateSettings=r.dateSettings,e.separators=r.separators,e.validParts=r.validParts,e.intParts=r.intParts,e.tzParts=r.tzParts,e.tzClip=r.tzClip},a.prototype={constructor:a,getMonth:function(t){var e;return 0===(e=r(t,this.dateSettings.monthsShort)+1)&&(e=r(t,this.dateSettings.months)+1),e},parseDate:function(e,n){var r,i,o,a,s,u,l,c,f,h,d=this,p=!1,m=!1,g=d.dateSettings,v={date:null,year:null,month:null,day:null,hour:0,min:0,sec:0};if(!e)return null;if(e instanceof Date)return e;if("U"===n)return(o=parseInt(e))?new Date(1e3*o):e;switch(typeof e){case"number":return new Date(e);case"string":break;default:return null}if(!(r=n.match(d.validParts))||0===r.length)throw new Error("Invalid date format definition.");for(i=e.replace(d.separators,"\0").split("\0"),o=0;o<i.length;o++)switch(a=i[o],s=parseInt(a),r[o]){case"y":case"Y":if(!s)return null;f=a.length,v.year=2===f?parseInt((70>s?"20":"19")+a):s,p=!0;break;case"m":case"n":case"M":case"F":if(isNaN(s)){if(!((u=d.getMonth(a))>0))return null;v.month=u}else{if(!(s>=1&&12>=s))return null;v.month=s}p=!0;break;case"d":case"j":if(!(s>=1&&31>=s))return null;v.day=s,p=!0;break;case"g":case"h":if(h=i[l=r.indexOf("a")>-1?r.indexOf("a"):r.indexOf("A")>-1?r.indexOf("A"):-1],l>-1)c=t(h,g.meridiem[0])?0:t(h,g.meridiem[1])?12:-1,s>=1&&12>=s&&c>-1?v.hour=s+c-1:s>=0&&23>=s&&(v.hour=s);else{if(!(s>=0&&23>=s))return null;v.hour=s}m=!0;break;case"G":case"H":if(!(s>=0&&23>=s))return null;v.hour=s,m=!0;break;case"i":if(!(s>=0&&59>=s))return null;v.min=s,m=!0;break;case"s":if(!(s>=0&&59>=s))return null;v.sec=s,m=!0}if(!0===p&&v.year&&v.month&&v.day)v.date=new Date(v.year,v.month-1,v.day,v.hour,v.min,v.sec,0);else{if(!0!==m)return null;v.date=new Date(0,0,0,v.hour,v.min,v.sec,0)}return v.date},guessDate:function(t,e){if("string"!=typeof t)return t;var n,r,i,o,a,s,u=t.replace(this.separators,"\0").split("\0"),l=e.match(this.validParts),c=new Date,f=0;if(!/^[djmn]/g.test(l[0]))return t;for(i=0;i<u.length;i++){if(f=2,a=u[i],s=parseInt(a.substr(0,2)),isNaN(s))return null;switch(i){case 0:"m"===l[0]||"n"===l[0]?c.setMonth(s-1):c.setDate(s);break;case 1:"m"===l[0]||"n"===l[0]?c.setDate(s):c.setMonth(s-1);break;case 2:if(r=c.getFullYear(),f=4>(n=a.length)?n:4,!(r=parseInt(4>n?r.toString().substr(0,4-n)+a:a.substr(0,4))))return null;c.setFullYear(r);break;case 3:c.setHours(s);break;case 4:c.setMinutes(s);break;case 5:c.setSeconds(s)}(o=a.substr(f)).length>0&&u.splice(i+1,0,o)}return c},parseFormat:function(t,n){var r,i=this,a=i.dateSettings,s=/\\?(.?)/gi,u=function(t,e){return r[t]?r[t]():e};return r={d:function(){return e(r.j(),2)},D:function(){return a.daysShort[r.w()]},j:function(){return n.getDate()},l:function(){return a.days[r.w()]},N:function(){return r.w()||7},w:function(){return n.getDay()},z:function(){var t=new Date(r.Y(),r.n()-1,r.j()),e=new Date(r.Y(),0,1);return Math.round((t-e)/o)},W:function(){var t=new Date(r.Y(),r.n()-1,r.j()-r.N()+3),n=new Date(t.getFullYear(),0,4);return e(1+Math.round((t-n)/o/7),2)},F:function(){return a.months[n.getMonth()]},m:function(){return e(r.n(),2)},M:function(){return a.monthsShort[n.getMonth()]},n:function(){return n.getMonth()+1},t:function(){return new Date(r.Y(),r.n(),0).getDate()},L:function(){var t=r.Y();return t%4==0&&t%100!=0||t%400==0?1:0},o:function(){var t=r.n(),e=r.W();return r.Y()+(12===t&&9>e?1:1===t&&e>9?-1:0)},Y:function(){return n.getFullYear()},y:function(){return r.Y().toString().slice(-2)},a:function(){return r.A().toLowerCase()},A:function(){var t=r.G()<12?0:1;return a.meridiem[t]},B:function(){var t=3600*n.getUTCHours(),r=60*n.getUTCMinutes(),i=n.getUTCSeconds();return e(Math.floor((t+r+i+3600)/86.4)%1e3,3)},g:function(){return r.G()%12||12},G:function(){return n.getHours()},h:function(){return e(r.g(),2)},H:function(){return e(r.G(),2)},i:function(){return e(n.getMinutes(),2)},s:function(){return e(n.getSeconds(),2)},u:function(){return e(1e3*n.getMilliseconds(),6)},e:function(){return/\((.*)\)/.exec(String(n))[1]||"Coordinated Universal Time"},I:function(){return new Date(r.Y(),0)-Date.UTC(r.Y(),0)!=new Date(r.Y(),6)-Date.UTC(r.Y(),6)?1:0},O:function(){var t=n.getTimezoneOffset(),r=Math.abs(t);return(t>0?"-":"+")+e(100*Math.floor(r/60)+r%60,4)},P:function(){var t=r.O();return t.substr(0,3)+":"+t.substr(3,2)},T:function(){return(String(n).match(i.tzParts)||[""]).pop().replace(i.tzClip,"")||"UTC"},Z:function(){return 60*-n.getTimezoneOffset()},c:function(){return"Y-m-d\\TH:i:sP".replace(s,u)},r:function(){return"D, d M Y H:i:s O".replace(s,u)},U:function(){return n.getTime()/1e3||0}},u(t,t)},formatDate:function(t,e){var n,r,i,o,a,s=this,u="";if("string"==typeof t&&!(t=s.parseDate(t,e)))return null;if(t instanceof Date){for(i=e.length,n=0;i>n;n++)"S"!==(a=e.charAt(n))&&"\\"!==a&&(n>0&&"\\"===e.charAt(n-1)?u+=a:(o=s.parseFormat(a,t),n!==i-1&&s.intParts.test(a)&&"S"===e.charAt(n+1)&&(r=parseInt(o)||0,o+=s.dateSettings.ordinal(r)),u+=o));return u}return""}}}(),s=function(t){"use strict";var e={i18n:{ar:{months:["كانون الثاني","شباط","آذار","نيسان","مايو","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول"],dayOfWeekShort:["ن","ث","ع","خ","ج","س","ح"],dayOfWeek:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت","الأحد"]},ro:{months:["Ianuarie","Februarie","Martie","Aprilie","Mai","Iunie","Iulie","August","Septembrie","Octombrie","Noiembrie","Decembrie"],dayOfWeekShort:["Du","Lu","Ma","Mi","Jo","Vi","Sâ"],dayOfWeek:["Duminică","Luni","Marţi","Miercuri","Joi","Vineri","Sâmbătă"]},id:{months:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"],dayOfWeekShort:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],dayOfWeek:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"]},is:{months:["Janúar","Febrúar","Mars","Apríl","Maí","Júní","Júlí","Ágúst","September","Október","Nóvember","Desember"],dayOfWeekShort:["Sun","Mán","Þrið","Mið","Fim","Fös","Lau"],dayOfWeek:["Sunnudagur","Mánudagur","Þriðjudagur","Miðvikudagur","Fimmtudagur","Föstudagur","Laugardagur"]},bg:{months:["Януари","Февруари","Март","Април","Май","Юни","Юли","Август","Септември","Октомври","Ноември","Декември"],dayOfWeekShort:["Нд","Пн","Вт","Ср","Чт","Пт","Сб"],dayOfWeek:["Неделя","Понеделник","Вторник","Сряда","Четвъртък","Петък","Събота"]},fa:{months:["فروردین","اردیبهشت","خرداد","تیر","مرداد","شهریور","مهر","آبان","آذر","دی","بهمن","اسفند"],dayOfWeekShort:["یکشنبه","دوشنبه","سه شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"],dayOfWeek:["یکشنبه","دوشنبه","سهشنبه","چهارشنبه","پنجشنبه","جمعه","شنبه","یکشنبه"]},ru:{months:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],dayOfWeekShort:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],dayOfWeek:["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота"]},uk:{months:["Січень","Лютий","Березень","Квітень","Травень","Червень","Липень","Серпень","Вересень","Жовтень","Листопад","Грудень"],dayOfWeekShort:["Ндл","Пнд","Втр","Срд","Чтв","Птн","Сбт"],dayOfWeek:["Неділя","Понеділок","Вівторок","Середа","Четвер","П'ятниця","Субота"]},en:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],dayOfWeekShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},el:{months:["Ιανουάριος","Φεβρουάριος","Μάρτιος","Απρίλιος","Μάιος","Ιούνιος","Ιούλιος","Αύγουστος","Σεπτέμβριος","Οκτώβριος","Νοέμβριος","Δεκέμβριος"],dayOfWeekShort:["Κυρ","Δευ","Τρι","Τετ","Πεμ","Παρ","Σαβ"],dayOfWeek:["Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Σάββατο"]},de:{months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],dayOfWeekShort:["So","Mo","Di","Mi","Do","Fr","Sa"],dayOfWeek:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},nl:{months:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],dayOfWeekShort:["zo","ma","di","wo","do","vr","za"],dayOfWeek:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"]},tr:{months:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],dayOfWeekShort:["Paz","Pts","Sal","Çar","Per","Cum","Cts"],dayOfWeek:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"]},fr:{months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],dayOfWeekShort:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],dayOfWeek:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},es:{months:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],dayOfWeekShort:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb"],dayOfWeek:["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"]},th:{months:["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"],dayOfWeekShort:["อา.","จ.","อ.","พ.","พฤ.","ศ.","ส."],dayOfWeek:["อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัส","ศุกร์","เสาร์","อาทิตย์"]},pl:{months:["styczeń","luty","marzec","kwiecień","maj","czerwiec","lipiec","sierpień","wrzesień","październik","listopad","grudzień"],dayOfWeekShort:["nd","pn","wt","śr","cz","pt","sb"],dayOfWeek:["niedziela","poniedziałek","wtorek","środa","czwartek","piątek","sobota"]},pt:{months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],dayOfWeekShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sab"],dayOfWeek:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"]},ch:{months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],dayOfWeekShort:["日","一","二","三","四","五","六"]},se:{months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],dayOfWeekShort:["Sön","Mån","Tis","Ons","Tor","Fre","Lör"]},km:{months:["មករា","កុម្ភៈ","មិនា","មេសា","ឧសភា","មិថុនា","កក្កដា","សីហា","កញ្ញា","តុលា","វិច្ឆិកា","ធ្នូ"],dayOfWeekShort:["អាទិ","ច័ន្ទ","អង្គារ","ពុធ","ព្រហ","សុក្រ","សៅរ៍"],dayOfWeek:["អាទិត្យ","ច័ន្ទ","អង្គារ","ពុធ","ព្រហស្បតិ៍","សុក្រ","សៅរ៍"]},kr:{months:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],dayOfWeekShort:["일","월","화","수","목","금","토"],dayOfWeek:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"]},it:{months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],dayOfWeekShort:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"],dayOfWeek:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato"]},da:{months:["Januar","Februar","Marts","April","Maj","Juni","Juli","August","September","Oktober","November","December"],dayOfWeekShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør"],dayOfWeek:["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"]},no:{months:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],dayOfWeekShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør"],dayOfWeek:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag"]},ja:{months:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeekShort:["日","月","火","水","木","金","土"],dayOfWeek:["日曜","月曜","火曜","水曜","木曜","金曜","土曜"]},vi:{months:["Tháng 1","Tháng 2","Tháng 3","Tháng 4","Tháng 5","Tháng 6","Tháng 7","Tháng 8","Tháng 9","Tháng 10","Tháng 11","Tháng 12"],dayOfWeekShort:["CN","T2","T3","T4","T5","T6","T7"],dayOfWeek:["Chủ nhật","Thứ hai","Thứ ba","Thứ tư","Thứ năm","Thứ sáu","Thứ bảy"]},sl:{months:["Januar","Februar","Marec","April","Maj","Junij","Julij","Avgust","September","Oktober","November","December"],dayOfWeekShort:["Ned","Pon","Tor","Sre","Čet","Pet","Sob"],dayOfWeek:["Nedelja","Ponedeljek","Torek","Sreda","Četrtek","Petek","Sobota"]},cs:{months:["Leden","Únor","Březen","Duben","Květen","Červen","Červenec","Srpen","Září","Říjen","Listopad","Prosinec"],dayOfWeekShort:["Ne","Po","Út","St","Čt","Pá","So"]},hu:{months:["Január","Február","Március","Április","Május","Június","Július","Augusztus","Szeptember","Október","November","December"],dayOfWeekShort:["Va","Hé","Ke","Sze","Cs","Pé","Szo"],dayOfWeek:["vasárnap","hétfő","kedd","szerda","csütörtök","péntek","szombat"]},az:{months:["Yanvar","Fevral","Mart","Aprel","May","Iyun","Iyul","Avqust","Sentyabr","Oktyabr","Noyabr","Dekabr"],dayOfWeekShort:["B","Be","Ça","Ç","Ca","C","Ş"],dayOfWeek:["Bazar","Bazar ertəsi","Çərşənbə axşamı","Çərşənbə","Cümə axşamı","Cümə","Şənbə"]},bs:{months:["Januar","Februar","Mart","April","Maj","Jun","Jul","Avgust","Septembar","Oktobar","Novembar","Decembar"],dayOfWeekShort:["Ned","Pon","Uto","Sri","Čet","Pet","Sub"],dayOfWeek:["Nedjelja","Ponedjeljak","Utorak","Srijeda","Četvrtak","Petak","Subota"]},ca:{months:["Gener","Febrer","Març","Abril","Maig","Juny","Juliol","Agost","Setembre","Octubre","Novembre","Desembre"],dayOfWeekShort:["Dg","Dl","Dt","Dc","Dj","Dv","Ds"],dayOfWeek:["Diumenge","Dilluns","Dimarts","Dimecres","Dijous","Divendres","Dissabte"]},"en-GB":{months:["January","February","March","April","May","June","July","August","September","October","November","December"],dayOfWeekShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},et:{months:["Jaanuar","Veebruar","Märts","Aprill","Mai","Juuni","Juuli","August","September","Oktoober","November","Detsember"],dayOfWeekShort:["P","E","T","K","N","R","L"],dayOfWeek:["Pühapäev","Esmaspäev","Teisipäev","Kolmapäev","Neljapäev","Reede","Laupäev"]},eu:{months:["Urtarrila","Otsaila","Martxoa","Apirila","Maiatza","Ekaina","Uztaila","Abuztua","Iraila","Urria","Azaroa","Abendua"],dayOfWeekShort:["Ig.","Al.","Ar.","Az.","Og.","Or.","La."],dayOfWeek:["Igandea","Astelehena","Asteartea","Asteazkena","Osteguna","Ostirala","Larunbata"]},fi:{months:["Tammikuu","Helmikuu","Maaliskuu","Huhtikuu","Toukokuu","Kesäkuu","Heinäkuu","Elokuu","Syyskuu","Lokakuu","Marraskuu","Joulukuu"],dayOfWeekShort:["Su","Ma","Ti","Ke","To","Pe","La"],dayOfWeek:["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai"]},gl:{months:["Xan","Feb","Maz","Abr","Mai","Xun","Xul","Ago","Set","Out","Nov","Dec"],dayOfWeekShort:["Dom","Lun","Mar","Mer","Xov","Ven","Sab"],dayOfWeek:["Domingo","Luns","Martes","Mércores","Xoves","Venres","Sábado"]},hr:{months:["Siječanj","Veljača","Ožujak","Travanj","Svibanj","Lipanj","Srpanj","Kolovoz","Rujan","Listopad","Studeni","Prosinac"],dayOfWeekShort:["Ned","Pon","Uto","Sri","Čet","Pet","Sub"],dayOfWeek:["Nedjelja","Ponedjeljak","Utorak","Srijeda","Četvrtak","Petak","Subota"]},ko:{months:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],dayOfWeekShort:["일","월","화","수","목","금","토"],dayOfWeek:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"]},lt:{months:["Sausio","Vasario","Kovo","Balandžio","Gegužės","Birželio","Liepos","Rugpjūčio","Rugsėjo","Spalio","Lapkričio","Gruodžio"],dayOfWeekShort:["Sek","Pir","Ant","Tre","Ket","Pen","Šeš"],dayOfWeek:["Sekmadienis","Pirmadienis","Antradienis","Trečiadienis","Ketvirtadienis","Penktadienis","Šeštadienis"]},lv:{months:["Janvāris","Februāris","Marts","Aprīlis ","Maijs","Jūnijs","Jūlijs","Augusts","Septembris","Oktobris","Novembris","Decembris"],dayOfWeekShort:["Sv","Pr","Ot","Tr","Ct","Pk","St"],dayOfWeek:["Svētdiena","Pirmdiena","Otrdiena","Trešdiena","Ceturtdiena","Piektdiena","Sestdiena"]},mk:{months:["јануари","февруари","март","април","мај","јуни","јули","август","септември","октомври","ноември","декември"],dayOfWeekShort:["нед","пон","вто","сре","чет","пет","саб"],dayOfWeek:["Недела","Понеделник","Вторник","Среда","Четврток","Петок","Сабота"]},mn:{months:["1-р сар","2-р сар","3-р сар","4-р сар","5-р сар","6-р сар","7-р сар","8-р сар","9-р сар","10-р сар","11-р сар","12-р сар"],dayOfWeekShort:["Дав","Мяг","Лха","Пүр","Бсн","Бям","Ням"],dayOfWeek:["Даваа","Мягмар","Лхагва","Пүрэв","Баасан","Бямба","Ням"]},"pt-BR":{months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],dayOfWeekShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],dayOfWeek:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"]},sk:{months:["Január","Február","Marec","Apríl","Máj","Jún","Júl","August","September","Október","November","December"],dayOfWeekShort:["Ne","Po","Ut","St","Št","Pi","So"],dayOfWeek:["Nedeľa","Pondelok","Utorok","Streda","Štvrtok","Piatok","Sobota"]},sq:{months:["Janar","Shkurt","Mars","Prill","Maj","Qershor","Korrik","Gusht","Shtator","Tetor","Nëntor","Dhjetor"],dayOfWeekShort:["Die","Hën","Mar","Mër","Enj","Pre","Shtu"],dayOfWeek:["E Diel","E Hënë","E Martē","E Mërkurë","E Enjte","E Premte","E Shtunë"]},"sr-YU":{months:["Januar","Februar","Mart","April","Maj","Jun","Jul","Avgust","Septembar","Oktobar","Novembar","Decembar"],dayOfWeekShort:["Ned","Pon","Uto","Sre","čet","Pet","Sub"],dayOfWeek:["Nedelja","Ponedeljak","Utorak","Sreda","Četvrtak","Petak","Subota"]},sr:{months:["јануар","фебруар","март","април","мај","јун","јул","август","септембар","октобар","новембар","децембар"],dayOfWeekShort:["нед","пон","уто","сре","чет","пет","суб"],dayOfWeek:["Недеља","Понедељак","Уторак","Среда","Четвртак","Петак","Субота"]},sv:{months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],dayOfWeekShort:["Sön","Mån","Tis","Ons","Tor","Fre","Lör"],dayOfWeek:["Söndag","Måndag","Tisdag","Onsdag","Torsdag","Fredag","Lördag"]},"zh-TW":{months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],dayOfWeekShort:["日","一","二","三","四","五","六"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},zh:{months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],dayOfWeekShort:["日","一","二","三","四","五","六"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},ug:{months:["1-ئاي","2-ئاي","3-ئاي","4-ئاي","5-ئاي","6-ئاي","7-ئاي","8-ئاي","9-ئاي","10-ئاي","11-ئاي","12-ئاي"],dayOfWeek:["يەكشەنبە","دۈشەنبە","سەيشەنبە","چارشەنبە","پەيشەنبە","جۈمە","شەنبە"]},he:{months:["ינואר","פברואר","מרץ","אפריל","מאי","יוני","יולי","אוגוסט","ספטמבר","אוקטובר","נובמבר","דצמבר"],dayOfWeekShort:["א'","ב'","ג'","ד'","ה'","ו'","שבת"],dayOfWeek:["ראשון","שני","שלישי","רביעי","חמישי","שישי","שבת","ראשון"]},hy:{months:["Հունվար","Փետրվար","Մարտ","Ապրիլ","Մայիս","Հունիս","Հուլիս","Օգոստոս","Սեպտեմբեր","Հոկտեմբեր","Նոյեմբեր","Դեկտեմբեր"],dayOfWeekShort:["Կի","Երկ","Երք","Չոր","Հնգ","Ուրբ","Շբթ"],dayOfWeek:["Կիրակի","Երկուշաբթի","Երեքշաբթի","Չորեքշաբթի","Հինգշաբթի","Ուրբաթ","Շաբաթ"]},kg:{months:["Үчтүн айы","Бирдин айы","Жалган Куран","Чын Куран","Бугу","Кулжа","Теке","Баш Оона","Аяк Оона","Тогуздун айы","Жетинин айы","Бештин айы"],dayOfWeekShort:["Жек","Дүй","Шей","Шар","Бей","Жум","Ише"],dayOfWeek:["Жекшемб","Дүйшөмб","Шейшемб","Шаршемб","Бейшемби","Жума","Ишенб"]},rm:{months:["Schaner","Favrer","Mars","Avrigl","Matg","Zercladur","Fanadur","Avust","Settember","October","November","December"],dayOfWeekShort:["Du","Gli","Ma","Me","Gie","Ve","So"],dayOfWeek:["Dumengia","Glindesdi","Mardi","Mesemna","Gievgia","Venderdi","Sonda"]},ka:{months:["იანვარი","თებერვალი","მარტი","აპრილი","მაისი","ივნისი","ივლისი","აგვისტო","სექტემბერი","ოქტომბერი","ნოემბერი","დეკემბერი"],dayOfWeekShort:["კვ","ორშ","სამშ","ოთხ","ხუთ","პარ","შაბ"],dayOfWeek:["კვირა","ორშაბათი","სამშაბათი","ოთხშაბათი","ხუთშაბათი","პარასკევი","შაბათი"]}},ownerDocument:document,contentWindow:window,value:"",rtl:!1,format:"Y/m/d H:i",formatTime:"H:i",formatDate:"Y/m/d",startDate:!1,step:60,monthChangeSpinner:!0,closeOnDateSelect:!1,closeOnTimeSelect:!0,closeOnWithoutClick:!0,closeOnInputClick:!0,openOnFocus:!0,timepicker:!0,datepicker:!0,weeks:!1,defaultTime:!1,defaultDate:!1,minDate:!1,maxDate:!1,minTime:!1,maxTime:!1,minDateTime:!1,maxDateTime:!1,allowTimes:[],opened:!1,initTime:!0,inline:!1,theme:"",touchMovedThreshold:5,onSelectDate:function(){},onSelectTime:function(){},onChangeMonth:function(){},onGetWeekOfYear:function(){},onChangeYear:function(){},onChangeDateTime:function(){},onShow:function(){},onClose:function(){},onGenerate:function(){},withoutCopyright:!0,inverseButton:!1,hours12:!1,next:"xdsoft_next",prev:"xdsoft_prev",dayOfWeekStart:0,parentID:"body",timeHeightInTimePicker:25,timepickerScrollbar:!0,todayButton:!0,prevButton:!0,nextButton:!0,defaultSelect:!0,scrollMonth:!0,scrollTime:!0,scrollInput:!0,lazyInit:!1,mask:!1,validateOnBlur:!0,allowBlank:!0,yearStart:1950,yearEnd:2050,monthStart:0,monthEnd:11,style:"",id:"",fixed:!1,roundTime:"round",className:"",weekends:[],highlightedDates:[],highlightedPeriods:[],allowDates:[],allowDateRe:null,disabledDates:[],disabledWeekDays:[],yearOffset:0,beforeShowDay:null,enterLikeTab:!0,showApplyButton:!1,insideParent:!1},n=null,r=null,i="en",o={meridiem:["AM","PM"]},s=function(){var s=e.i18n[i],u={days:s.dayOfWeek,daysShort:s.dayOfWeekShort,months:s.months,monthsShort:t.map(s.months,(function(t){return t.substring(0,3)}))};"function"==typeof a&&(n=r=new a({dateSettings:t.extend({},o,u)}))},u={moment:{default_options:{format:"YYYY/MM/DD HH:mm",formatDate:"YYYY/MM/DD",formatTime:"HH:mm"},formatter:{parseDate:function(t,e){if(c(e))return r.parseDate(t,e);var n=moment(t,e);return!!n.isValid()&&n.toDate()},formatDate:function(t,e){return c(e)?r.formatDate(t,e):moment(t).format(e)},formatMask:function(t){return t.replace(/Y{4}/g,"9999").replace(/Y{2}/g,"99").replace(/M{2}/g,"19").replace(/D{2}/g,"39").replace(/H{2}/g,"29").replace(/m{2}/g,"59").replace(/s{2}/g,"59")}}}};t.datetimepicker={setLocale:function(t){var n=e.i18n[t]?t:"en";i!==n&&(i=n,s())},setDateFormatter:function(r){if("string"==typeof r&&u.hasOwnProperty(r)){var i=u[r];t.extend(e,i.default_options),n=i.formatter}else n=r}};var l={RFC_2822:"D, d M Y H:i:s O",ATOM:"Y-m-dTH:i:sP",ISO_8601:"Y-m-dTH:i:sO",RFC_822:"D, d M y H:i:s O",RFC_850:"l, d-M-y H:i:s T",RFC_1036:"D, d M y H:i:s O",RFC_1123:"D, d M Y H:i:s O",RSS:"D, d M Y H:i:s O",W3C:"Y-m-dTH:i:sP"},c=function(t){return-1!==Object.values(l).indexOf(t)};function f(t,e,n){this.date=t,this.desc=e,this.style=n}t.extend(t.datetimepicker,l),s(),window.getComputedStyle||(window.getComputedStyle=function(t){return this.el=t,this.getPropertyValue=function(e){var n=/(-([a-z]))/g;return"float"===e&&(e="styleFloat"),n.test(e)&&(e=e.replace(n,(function(t,e,n){return n.toUpperCase()}))),t.currentStyle[e]||null},this}),Array.prototype.indexOf||(Array.prototype.indexOf=function(t,e){var n,r;for(n=e||0,r=this.length;n<r;n+=1)if(this[n]===t)return n;return-1}),Date.prototype.countDaysInMonth=function(){return new Date(this.getFullYear(),this.getMonth()+1,0).getDate()},t.fn.xdsoftScroller=function(e,n){return this.each((function(){var r,i,o,a,s,u=t(this),l=function(t){var e,n={x:0,y:0};return"touchstart"===t.type||"touchmove"===t.type||"touchend"===t.type||"touchcancel"===t.type?(e=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0],n.x=e.clientX,n.y=e.clientY):"mousedown"!==t.type&&"mouseup"!==t.type&&"mousemove"!==t.type&&"mouseover"!==t.type&&"mouseout"!==t.type&&"mouseenter"!==t.type&&"mouseleave"!==t.type||(n.x=t.clientX,n.y=t.clientY),n},c=100,f=!1,h=0,d=0,p=0,m=!1,g=0,v=function(){};"hide"!==n?(t(this).hasClass("xdsoft_scroller_box")||(r=u.children().eq(0),i=u[0].clientHeight,o=r[0].offsetHeight,a=t('<div class="xdsoft_scrollbar"></div>'),s=t('<div class="xdsoft_scroller"></div>'),a.append(s),u.addClass("xdsoft_scroller_box").append(a),v=function(t){var e=l(t).y-h+g;e<0&&(e=0),e+s[0].offsetHeight>p&&(e=p-s[0].offsetHeight),u.trigger("scroll_element.xdsoft_scroller",[c?e/c:0])},s.on("touchstart.xdsoft_scroller mousedown.xdsoft_scroller",(function(r){i||u.trigger("resize_scroll.xdsoft_scroller",[n]),h=l(r).y,g=parseInt(s.css("margin-top"),10),p=a[0].offsetHeight,"mousedown"===r.type||"touchstart"===r.type?(e.ownerDocument&&t(e.ownerDocument.body).addClass("xdsoft_noselect"),t([e.ownerDocument.body,e.contentWindow]).on("touchend mouseup.xdsoft_scroller",(function n(){t([e.ownerDocument.body,e.contentWindow]).off("touchend mouseup.xdsoft_scroller",n).off("mousemove.xdsoft_scroller",v).removeClass("xdsoft_noselect")})),t(e.ownerDocument.body).on("mousemove.xdsoft_scroller",v)):(m=!0,r.stopPropagation(),r.preventDefault())})).on("touchmove",(function(t){m&&(t.preventDefault(),v(t))})).on("touchend touchcancel",(function(){m=!1,g=0})),u.on("scroll_element.xdsoft_scroller",(function(t,e){i||u.trigger("resize_scroll.xdsoft_scroller",[e,!0]),e=e>1?1:e<0||isNaN(e)?0:e,s.css("margin-top",c*e),setTimeout((function(){r.css("marginTop",-parseInt((r[0].offsetHeight-i)*e,10))}),10)})).on("resize_scroll.xdsoft_scroller",(function(t,e,n){var l,f;i=u[0].clientHeight,o=r[0].offsetHeight,f=(l=i/o)*a[0].offsetHeight,l>1?s.hide():(s.show(),s.css("height",parseInt(f>10?f:10,10)),c=a[0].offsetHeight-s[0].offsetHeight,!0!==n&&u.trigger("scroll_element.xdsoft_scroller",[e||Math.abs(parseInt(r.css("marginTop"),10))/(o-i)]))})),u.on("mousewheel",(function(t){var e=Math.abs(parseInt(r.css("marginTop"),10));return(e-=20*t.deltaY)<0&&(e=0),u.trigger("scroll_element.xdsoft_scroller",[e/(o-i)]),t.stopPropagation(),!1})),u.on("touchstart",(function(t){f=l(t),d=Math.abs(parseInt(r.css("marginTop"),10))})),u.on("touchmove",(function(t){if(f){t.preventDefault();var e=l(t);u.trigger("scroll_element.xdsoft_scroller",[(d-(e.y-f.y))/(o-i)])}})),u.on("touchend touchcancel",(function(){f=!1,d=0}))),u.trigger("resize_scroll.xdsoft_scroller",[n])):u.find(".xdsoft_scrollbar").hide()}))},t.fn.datetimepicker=function(r,o){var a,s,u=this,l=17,c=13,h=27,d=37,p=38,m=39,g=40,v=9,y=116,b=65,x=67,w=86,_=90,S=89,O=!1,N=t.isPlainObject(r)||!r?t.extend(!0,{},e,r):t.extend(!0,{},e),M=0;return a=function(e){var o,a,s,u,M,E,k=t('<div class="xdsoft_datetimepicker xdsoft_noselect"></div>'),C=t('<div class="xdsoft_copyright"><a target="_blank" href="http://xdsoft.net/jqplugins/datetimepicker/">xdsoft.net</a></div>'),T=t('<div class="xdsoft_datepicker active"></div>'),D=t('<div class="xdsoft_monthpicker"><button type="button" class="xdsoft_prev"></button><button type="button" class="xdsoft_today_button"></button><div class="xdsoft_label xdsoft_month"><span></span><i></i></div><div class="xdsoft_label xdsoft_year"><span></span><i></i></div><button type="button" class="xdsoft_next"></button></div>'),A=t('<div class="xdsoft_calendar"></div>'),j=t('<div class="xdsoft_timepicker active"><button type="button" class="xdsoft_prev"></button><div class="xdsoft_time_box"></div><button type="button" class="xdsoft_next"></button></div>'),P=j.find(".xdsoft_time_box").eq(0),I=t('<div class="xdsoft_time_variant"></div>'),R=t('<button type="button" class="xdsoft_save_selected blue-gradient-button">Save Selected</button>'),L=t('<div class="xdsoft_select xdsoft_monthselect"><div></div></div>'),F=t('<div class="xdsoft_select xdsoft_yearselect"><div></div></div>'),q=!1,B=0;N.id&&k.attr("id",N.id),N.style&&k.attr("style",N.style),N.weeks&&k.addClass("xdsoft_showweeks"),N.rtl&&k.addClass("xdsoft_rtl"),k.addClass("xdsoft_"+N.theme),k.addClass(N.className),D.find(".xdsoft_month span").after(L),D.find(".xdsoft_year span").after(F),D.find(".xdsoft_month,.xdsoft_year").on("touchstart mousedown.xdsoft",(function(e){var n,r,i=t(this).find(".xdsoft_select").eq(0),o=0,a=0,s=i.is(":visible");for(D.find(".xdsoft_select").hide(),M.currentTime&&(o=M.currentTime[t(this).hasClass("xdsoft_month")?"getMonth":"getFullYear"]()),i[s?"hide":"show"](),n=i.find("div.xdsoft_option"),r=0;r<n.length&&n.eq(r).data("value")!==o;r+=1)a+=n[0].offsetHeight;return i.xdsoftScroller(N,a/(i.children()[0].offsetHeight-i[0].clientHeight)),e.stopPropagation(),!1}));var z=function(t){var e=t.originalEvent,n=e.touches?e.touches[0]:e;this.touchStartPosition=this.touchStartPosition||n;var r=Math.abs(this.touchStartPosition.clientX-n.clientX),i=Math.abs(this.touchStartPosition.clientY-n.clientY);Math.sqrt(r*r+i*i)>N.touchMovedThreshold&&(this.touchMoved=!0)};function H(){var t,n=!1;return N.startDate?n=M.strToDate(N.startDate):(n=N.value||(e&&e.val&&e.val()?e.val():""))?(n=M.strToDateTime(n),N.yearOffset&&(n=new Date(n.getFullYear()-N.yearOffset,n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()))):N.defaultDate&&(n=M.strToDateTime(N.defaultDate),N.defaultTime&&(t=M.strtotime(N.defaultTime),n.setHours(t.getHours()),n.setMinutes(t.getMinutes()))),n&&M.isValidDate(n)?k.data("changed",!0):n="",n||0}function U(r){var i=function(t,e){var n=t.replace(/([\[\]\/\{\}\(\)\-\.\+]{1})/g,"\\$1").replace(/_/g,"{digit+}").replace(/([0-9]{1})/g,"{digit$1}").replace(/\{digit([0-9]{1})\}/g,"[0-$1_]{1}").replace(/\{digit[\+]\}/g,"[0-9_]{1}");return new RegExp(n).test(e)},o=function(t,e){if(!(t="string"==typeof t||t instanceof String?r.ownerDocument.getElementById(t):t))return!1;if(t.createTextRange){var n=t.createTextRange();return n.collapse(!0),n.moveEnd("character",e),n.moveStart("character",e),n.select(),!0}return!!t.setSelectionRange&&(t.setSelectionRange(e,e),!0)};r.mask&&e.off("keydown.xdsoft"),!0===r.mask&&(n.formatMask?r.mask=n.formatMask(r.format):r.mask=r.format.replace(/Y/g,"9999").replace(/F/g,"9999").replace(/m/g,"19").replace(/d/g,"39").replace(/H/g,"29").replace(/i/g,"59").replace(/s/g,"59")),"string"===t.type(r.mask)&&(i(r.mask,e.val())||(e.val(r.mask.replace(/[0-9]/g,"_")),o(e[0],0)),e.on("paste.xdsoft",(function(n){var a=(n.clipboardData||n.originalEvent.clipboardData||window.clipboardData).getData("text"),s=this.value,u=this.selectionStart,l=s.substr(0,u),c=s.substr(u+a.length);return s=l+a+c,u+=a.length,i(r.mask,s)?(this.value=s,o(this,u)):""===t.trim(s)?this.value=r.mask.replace(/[0-9]/g,"_"):e.trigger("error_input.xdsoft"),n.preventDefault(),!1})),e.on("keydown.xdsoft",(function(n){var a,s=this.value,u=n.which,f=this.selectionStart,N=this.selectionEnd,M=f!==N;if(u>=48&&u<=57||u>=96&&u<=105||8===u||46===u){for(a=8===u||46===u?"_":String.fromCharCode(96<=u&&u<=105?u-48:u),8===u&&f&&!M&&(f-=1);;){var E=r.mask.substr(f,1),k=f<r.mask.length,C=f>0;if(!(/[^0-9_]/.test(E)&&k&&C))break;f+=8!==u||M?1:-1}if(n.metaKey&&(f=0,M=!0),M){var T=N-f,D=r.mask.replace(/[0-9]/g,"_"),A=D.substr(f,T).substr(1),j=s.substr(0,f),P=a+A,I=s.substr(f+T);s=j+P+I}else{var R=s.substr(0,f),L=a,F=s.substr(f+1);s=R+L+F}if(""===t.trim(s))s=D;else if(f===r.mask.length)return n.preventDefault(),!1;for(f+=8===u?0:1;/[^0-9_]/.test(r.mask.substr(f,1))&&f<r.mask.length&&f>0;)f+=8===u?0:1;i(r.mask,s)?(this.value=s,o(this,f)):""===t.trim(s)?this.value=r.mask.replace(/[0-9]/g,"_"):e.trigger("error_input.xdsoft")}else if(-1!==[b,x,w,_,S].indexOf(u)&&O||-1!==[h,p,g,d,m,y,l,v,c].indexOf(u))return!0;return n.preventDefault(),!1})))}D.find(".xdsoft_select").xdsoftScroller(N).on("touchstart mousedown.xdsoft",(function(t){var e=t.originalEvent;this.touchMoved=!1,this.touchStartPosition=e.touches?e.touches[0]:e,t.stopPropagation(),t.preventDefault()})).on("touchmove",".xdsoft_option",z).on("touchend mousedown.xdsoft",".xdsoft_option",(function(){if(!this.touchMoved){void 0!==M.currentTime&&null!==M.currentTime||(M.currentTime=M.now());var e=M.currentTime.getFullYear();M&&M.currentTime&&M.currentTime[t(this).parent().parent().hasClass("xdsoft_monthselect")?"setMonth":"setFullYear"](t(this).data("value")),t(this).parent().parent().hide(),k.trigger("xchange.xdsoft"),N.onChangeMonth&&t.isFunction(N.onChangeMonth)&&N.onChangeMonth.call(k,M.currentTime,k.data("input")),e!==M.currentTime.getFullYear()&&t.isFunction(N.onChangeYear)&&N.onChangeYear.call(k,M.currentTime,k.data("input"))}})),k.getValue=function(){return M.getCurrentTime()},k.setOptions=function(r){var i={};N=t.extend(!0,{},N,r),r.allowTimes&&t.isArray(r.allowTimes)&&r.allowTimes.length&&(N.allowTimes=t.extend(!0,[],r.allowTimes)),r.weekends&&t.isArray(r.weekends)&&r.weekends.length&&(N.weekends=t.extend(!0,[],r.weekends)),r.allowDates&&t.isArray(r.allowDates)&&r.allowDates.length&&(N.allowDates=t.extend(!0,[],r.allowDates)),r.allowDateRe&&"[object String]"===Object.prototype.toString.call(r.allowDateRe)&&(N.allowDateRe=new RegExp(r.allowDateRe)),r.highlightedDates&&t.isArray(r.highlightedDates)&&r.highlightedDates.length&&(t.each(r.highlightedDates,(function(e,r){var o,a=t.map(r.split(","),t.trim),s=new f(n.parseDate(a[0],N.formatDate),a[1],a[2]),u=n.formatDate(s.date,N.formatDate);void 0!==i[u]?(o=i[u].desc)&&o.length&&s.desc&&s.desc.length&&(i[u].desc=o+"\n"+s.desc):i[u]=s})),N.highlightedDates=t.extend(!0,[],i)),r.highlightedPeriods&&t.isArray(r.highlightedPeriods)&&r.highlightedPeriods.length&&(i=t.extend(!0,[],N.highlightedDates),t.each(r.highlightedPeriods,(function(e,r){var o,a,s,u,l,c,h;if(t.isArray(r))o=r[0],a=r[1],s=r[2],h=r[3];else{var d=t.map(r.split(","),t.trim);o=n.parseDate(d[0],N.formatDate),a=n.parseDate(d[1],N.formatDate),s=d[2],h=d[3]}for(;o<=a;)u=new f(o,s,h),l=n.formatDate(o,N.formatDate),o.setDate(o.getDate()+1),void 0!==i[l]?(c=i[l].desc)&&c.length&&u.desc&&u.desc.length&&(i[l].desc=c+"\n"+u.desc):i[l]=u})),N.highlightedDates=t.extend(!0,[],i)),r.disabledDates&&t.isArray(r.disabledDates)&&r.disabledDates.length&&(N.disabledDates=t.extend(!0,[],r.disabledDates)),r.disabledWeekDays&&t.isArray(r.disabledWeekDays)&&r.disabledWeekDays.length&&(N.disabledWeekDays=t.extend(!0,[],r.disabledWeekDays)),!N.open&&!N.opened||N.inline||e.trigger("open.xdsoft"),N.inline&&(q=!0,k.addClass("xdsoft_inline"),e.after(k).hide()),N.inverseButton&&(N.next="xdsoft_prev",N.prev="xdsoft_next"),N.datepicker?T.addClass("active"):T.removeClass("active"),N.timepicker?j.addClass("active"):j.removeClass("active"),N.value&&(M.setCurrentTime(N.value),e&&e.val&&e.val(M.str)),isNaN(N.dayOfWeekStart)?N.dayOfWeekStart=0:N.dayOfWeekStart=parseInt(N.dayOfWeekStart,10)%7,N.timepickerScrollbar||P.xdsoftScroller(N,"hide"),N.minDate&&/^[\+\-](.*)$/.test(N.minDate)&&(N.minDate=n.formatDate(M.strToDateTime(N.minDate),N.formatDate)),N.maxDate&&/^[\+\-](.*)$/.test(N.maxDate)&&(N.maxDate=n.formatDate(M.strToDateTime(N.maxDate),N.formatDate)),N.minDateTime&&/^\+(.*)$/.test(N.minDateTime)&&(N.minDateTime=M.strToDateTime(N.minDateTime).dateFormat(N.formatDate)),N.maxDateTime&&/^\+(.*)$/.test(N.maxDateTime)&&(N.maxDateTime=M.strToDateTime(N.maxDateTime).dateFormat(N.formatDate)),R.toggle(N.showApplyButton),D.find(".xdsoft_today_button").css("visibility",N.todayButton?"visible":"hidden"),D.find("."+N.prev).css("visibility",N.prevButton?"visible":"hidden"),D.find("."+N.next).css("visibility",N.nextButton?"visible":"hidden"),U(N),N.validateOnBlur&&e.off("blur.xdsoft").on("blur.xdsoft",(function(){if(N.allowBlank&&(!t.trim(t(this).val()).length||"string"==typeof N.mask&&t.trim(t(this).val())===N.mask.replace(/[0-9]/g,"_")))t(this).val(null),k.data("xdsoft_datetime").empty();else{var e=n.parseDate(t(this).val(),N.format);if(e)t(this).val(n.formatDate(e,N.format));else{var r=+[t(this).val()[0],t(this).val()[1]].join(""),i=+[t(this).val()[2],t(this).val()[3]].join("");!N.datepicker&&N.timepicker&&r>=0&&r<24&&i>=0&&i<60?t(this).val([r,i].map((function(t){return t>9?t:"0"+t})).join(":")):t(this).val(n.formatDate(M.now(),N.format))}k.data("xdsoft_datetime").setCurrentTime(t(this).val())}k.trigger("changedatetime.xdsoft"),k.trigger("close.xdsoft")})),N.dayOfWeekStartPrev=0===N.dayOfWeekStart?6:N.dayOfWeekStart-1,k.trigger("xchange.xdsoft").trigger("afterOpen.xdsoft")},k.data("options",N).on("touchstart mousedown.xdsoft",(function(t){return t.stopPropagation(),t.preventDefault(),F.hide(),L.hide(),!1})),P.append(I),P.xdsoftScroller(N),k.on("afterOpen.xdsoft",(function(){P.xdsoftScroller(N)})),k.append(T).append(j),!0!==N.withoutCopyright&&k.append(C),T.append(D).append(A).append(R),N.insideParent?t(e).parent().append(k):t(N.parentID).append(k),M=new function(){var e=this;e.now=function(t){var n,r,i=new Date;return!t&&N.defaultDate&&(n=e.strToDateTime(N.defaultDate),i.setFullYear(n.getFullYear()),i.setMonth(n.getMonth()),i.setDate(n.getDate())),i.setFullYear(i.getFullYear()),!t&&N.defaultTime&&(r=e.strtotime(N.defaultTime),i.setHours(r.getHours()),i.setMinutes(r.getMinutes()),i.setSeconds(r.getSeconds()),i.setMilliseconds(r.getMilliseconds())),i},e.isValidDate=function(t){return"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(t.getTime())},e.setCurrentTime=function(t,n){"string"==typeof t?e.currentTime=e.strToDateTime(t):e.isValidDate(t)?e.currentTime=t:t||n||!N.allowBlank||N.inline?e.currentTime=e.now():e.currentTime=null,k.trigger("xchange.xdsoft")},e.empty=function(){e.currentTime=null},e.getCurrentTime=function(){return e.currentTime},e.nextMonth=function(){void 0!==e.currentTime&&null!==e.currentTime||(e.currentTime=e.now());var n,r=e.currentTime.getMonth()+1;return 12===r&&(e.currentTime.setFullYear(e.currentTime.getFullYear()+1),r=0),n=e.currentTime.getFullYear(),e.currentTime.setDate(Math.min(new Date(e.currentTime.getFullYear(),r+1,0).getDate(),e.currentTime.getDate())),e.currentTime.setMonth(r),N.onChangeMonth&&t.isFunction(N.onChangeMonth)&&N.onChangeMonth.call(k,M.currentTime,k.data("input")),n!==e.currentTime.getFullYear()&&t.isFunction(N.onChangeYear)&&N.onChangeYear.call(k,M.currentTime,k.data("input")),k.trigger("xchange.xdsoft"),r},e.prevMonth=function(){void 0!==e.currentTime&&null!==e.currentTime||(e.currentTime=e.now());var n=e.currentTime.getMonth()-1;return-1===n&&(e.currentTime.setFullYear(e.currentTime.getFullYear()-1),n=11),e.currentTime.setDate(Math.min(new Date(e.currentTime.getFullYear(),n+1,0).getDate(),e.currentTime.getDate())),e.currentTime.setMonth(n),N.onChangeMonth&&t.isFunction(N.onChangeMonth)&&N.onChangeMonth.call(k,M.currentTime,k.data("input")),k.trigger("xchange.xdsoft"),n},e.getWeekOfYear=function(e){if(N.onGetWeekOfYear&&t.isFunction(N.onGetWeekOfYear)){var n=N.onGetWeekOfYear.call(k,e);if(void 0!==n)return n}var r=new Date(e.getFullYear(),0,1);return 4!==r.getDay()&&r.setMonth(0,1+(4-r.getDay()+7)%7),Math.ceil(((e-r)/864e5+r.getDay()+1)/7)},e.strToDateTime=function(t){var r,i,o=[];return t&&t instanceof Date&&e.isValidDate(t)?t:((o=/^([+-]{1})(.*)$/.exec(t))&&(o[2]=n.parseDate(o[2],N.formatDate)),o&&o[2]?(r=o[2].getTime()-6e4*o[2].getTimezoneOffset(),i=new Date(e.now(!0).getTime()+parseInt(o[1]+"1",10)*r)):i=t?n.parseDate(t,N.format):e.now(),e.isValidDate(i)||(i=e.now()),i)},e.strToDate=function(t){if(t&&t instanceof Date&&e.isValidDate(t))return t;var r=t?n.parseDate(t,N.formatDate):e.now(!0);return e.isValidDate(r)||(r=e.now(!0)),r},e.strtotime=function(t){if(t&&t instanceof Date&&e.isValidDate(t))return t;var r=t?n.parseDate(t,N.formatTime):e.now(!0);return e.isValidDate(r)||(r=e.now(!0)),r},e.str=function(){var t=N.format;return N.yearOffset&&(t=(t=t.replace("Y",e.currentTime.getFullYear()+N.yearOffset)).replace("y",String(e.currentTime.getFullYear()+N.yearOffset).substring(2,4))),n.formatDate(e.currentTime,t)},e.currentTime=this.now()},R.on("touchend click",(function(t){t.preventDefault(),k.data("changed",!0),M.setCurrentTime(H()),e.val(M.str()),k.trigger("close.xdsoft")})),D.find(".xdsoft_today_button").on("touchend mousedown.xdsoft",(function(){k.data("changed",!0),M.setCurrentTime(0,!0),k.trigger("afterOpen.xdsoft")})).on("dblclick.xdsoft",(function(){var t,n,r=M.getCurrentTime();r=new Date(r.getFullYear(),r.getMonth(),r.getDate()),t=M.strToDate(N.minDate),r<(t=new Date(t.getFullYear(),t.getMonth(),t.getDate()))||(n=M.strToDate(N.maxDate),r>(n=new Date(n.getFullYear(),n.getMonth(),n.getDate()))||(e.val(M.str()),e.trigger("change"),k.trigger("close.xdsoft")))})),D.find(".xdsoft_prev,.xdsoft_next").on("touchend mousedown.xdsoft",(function(){var e=t(this),n=0,r=!1;!function t(i){e.hasClass(N.next)?M.nextMonth():e.hasClass(N.prev)&&M.prevMonth(),N.monthChangeSpinner&&(r||(n=setTimeout(t,i||100)))}(500),t([N.ownerDocument.body,N.contentWindow]).on("touchend mouseup.xdsoft",(function e(){clearTimeout(n),r=!0,t([N.ownerDocument.body,N.contentWindow]).off("touchend mouseup.xdsoft",e)}))})),j.find(".xdsoft_prev,.xdsoft_next").on("touchend mousedown.xdsoft",(function(){var e=t(this),n=0,r=!1,i=110;!function t(o){var a=P[0].clientHeight,s=I[0].offsetHeight,u=Math.abs(parseInt(I.css("marginTop"),10));e.hasClass(N.next)&&s-a-N.timeHeightInTimePicker>=u?I.css("marginTop","-"+(u+N.timeHeightInTimePicker)+"px"):e.hasClass(N.prev)&&u-N.timeHeightInTimePicker>=0&&I.css("marginTop","-"+(u-N.timeHeightInTimePicker)+"px"),P.trigger("scroll_element.xdsoft_scroller",[Math.abs(parseInt(I[0].style.marginTop,10)/(s-a))]),i=i>10?10:i-10,r||(n=setTimeout(t,o||i))}(500),t([N.ownerDocument.body,N.contentWindow]).on("touchend mouseup.xdsoft",(function e(){clearTimeout(n),r=!0,t([N.ownerDocument.body,N.contentWindow]).off("touchend mouseup.xdsoft",e)}))})),o=0,k.on("xchange.xdsoft",(function(a){clearTimeout(o),o=setTimeout((function(){void 0!==M.currentTime&&null!==M.currentTime||(M.currentTime=M.now());for(var o,a,s,u,l,c,f,h,d,p,m="",g=new Date(M.currentTime.getFullYear(),M.currentTime.getMonth(),1,12,0,0),v=0,y=M.now(),b=!1,x=!1,w=!1,_=!1,S=[],O=!0,E="";g.getDay()!==N.dayOfWeekStart;)g.setDate(g.getDate()-1);for(m+="<table><thead><tr>",N.weeks&&(m+="<th></th>"),o=0;o<7;o+=1)m+="<th>"+N.i18n[i].dayOfWeekShort[(o+N.dayOfWeekStart)%7]+"</th>";for(m+="</tr></thead>",m+="<tbody>",!1!==N.maxDate&&(b=M.strToDate(N.maxDate),b=new Date(b.getFullYear(),b.getMonth(),b.getDate(),23,59,59,999)),!1!==N.minDate&&(x=M.strToDate(N.minDate),x=new Date(x.getFullYear(),x.getMonth(),x.getDate())),!1!==N.minDateTime&&(w=M.strToDate(N.minDateTime),w=new Date(w.getFullYear(),w.getMonth(),w.getDate(),w.getHours(),w.getMinutes(),w.getSeconds())),!1!==N.maxDateTime&&(_=M.strToDate(N.maxDateTime),_=new Date(_.getFullYear(),_.getMonth(),_.getDate(),_.getHours(),_.getMinutes(),_.getSeconds())),!1!==_&&(p=31*(12*_.getFullYear()+_.getMonth())+_.getDate());v<M.currentTime.countDaysInMonth()||g.getDay()!==N.dayOfWeekStart||M.currentTime.getMonth()===g.getMonth();){S=[],v+=1,s=g.getDay(),u=g.getDate(),l=g.getFullYear(),P=g.getMonth(),c=M.getWeekOfYear(g),d="",S.push("xdsoft_date"),f=N.beforeShowDay&&t.isFunction(N.beforeShowDay.call)?N.beforeShowDay.call(k,g):null,N.allowDateRe&&"[object RegExp]"===Object.prototype.toString.call(N.allowDateRe)&&(N.allowDateRe.test(n.formatDate(g,N.formatDate))||S.push("xdsoft_disabled")),N.allowDates&&N.allowDates.length>0&&-1===N.allowDates.indexOf(n.formatDate(g,N.formatDate))&&S.push("xdsoft_disabled");var C=31*(12*g.getFullYear()+g.getMonth())+g.getDate();(!1!==b&&g>b||!1!==w&&g<w||!1!==x&&g<x||!1!==_&&C>p||f&&!1===f[0])&&S.push("xdsoft_disabled"),-1!==N.disabledDates.indexOf(n.formatDate(g,N.formatDate))&&S.push("xdsoft_disabled"),-1!==N.disabledWeekDays.indexOf(s)&&S.push("xdsoft_disabled"),e.is("[disabled]")&&S.push("xdsoft_disabled"),f&&""!==f[1]&&S.push(f[1]),M.currentTime.getMonth()!==P&&S.push("xdsoft_other_month"),(N.defaultSelect||k.data("changed"))&&n.formatDate(M.currentTime,N.formatDate)===n.formatDate(g,N.formatDate)&&S.push("xdsoft_current"),n.formatDate(y,N.formatDate)===n.formatDate(g,N.formatDate)&&S.push("xdsoft_today"),0!==g.getDay()&&6!==g.getDay()&&-1===N.weekends.indexOf(n.formatDate(g,N.formatDate))||S.push("xdsoft_weekend"),void 0!==N.highlightedDates[n.formatDate(g,N.formatDate)]&&(a=N.highlightedDates[n.formatDate(g,N.formatDate)],S.push(void 0===a.style?"xdsoft_highlighted_default":a.style),d=void 0===a.desc?"":a.desc),N.beforeShowDay&&t.isFunction(N.beforeShowDay)&&S.push(N.beforeShowDay(g)),O&&(m+="<tr>",O=!1,N.weeks&&(m+="<th>"+c+"</th>")),m+='<td data-date="'+u+'" data-month="'+P+'" data-year="'+l+'" class="xdsoft_date xdsoft_day_of_week'+g.getDay()+" "+S.join(" ")+'" title="'+d+'"><div>'+u+"</div></td>",g.getDay()===N.dayOfWeekStartPrev&&(m+="</tr>",O=!0),g.setDate(u+1)}m+="</tbody></table>",A.html(m),D.find(".xdsoft_label span").eq(0).text(N.i18n[i].months[M.currentTime.getMonth()]),D.find(".xdsoft_label span").eq(1).text(M.currentTime.getFullYear()+N.yearOffset),E="",P="";var T=0;if(!1!==N.minTime){var j=M.strtotime(N.minTime);T=60*j.getHours()+j.getMinutes()}var P,R=1440;if(!1!==N.maxTime&&(j=M.strtotime(N.maxTime),R=60*j.getHours()+j.getMinutes()),!1!==N.minDateTime&&(j=M.strToDateTime(N.minDateTime),n.formatDate(M.currentTime,N.formatDate)===n.formatDate(j,N.formatDate)&&(P=60*j.getHours()+j.getMinutes())>T&&(T=P)),!1!==N.maxDateTime&&(j=M.strToDateTime(N.maxDateTime),n.formatDate(M.currentTime,N.formatDate)===n.formatDate(j,N.formatDate)&&(P=60*j.getHours()+j.getMinutes())<R&&(R=P)),h=function(r,i){var o,a=M.now(),s=N.allowTimes&&t.isArray(N.allowTimes)&&N.allowTimes.length;a.setHours(r),r=parseInt(a.getHours(),10),a.setMinutes(i),i=parseInt(a.getMinutes(),10),S=[];var u=60*r+i;(e.is("[disabled]")||u>=R||u<T)&&S.push("xdsoft_disabled"),(o=new Date(M.currentTime)).setHours(parseInt(M.currentTime.getHours(),10)),s||o.setMinutes(Math[N.roundTime](M.currentTime.getMinutes()/N.step)*N.step),(N.initTime||N.defaultSelect||k.data("changed"))&&o.getHours()===parseInt(r,10)&&(!s&&N.step>59||o.getMinutes()===parseInt(i,10))&&(N.defaultSelect||k.data("changed")?S.push("xdsoft_current"):N.initTime&&S.push("xdsoft_init_time")),parseInt(y.getHours(),10)===parseInt(r,10)&&parseInt(y.getMinutes(),10)===parseInt(i,10)&&S.push("xdsoft_today"),E+='<div class="xdsoft_time '+S.join(" ")+'" data-hour="'+r+'" data-minute="'+i+'">'+n.formatDate(a,N.formatTime)+"</div>"},N.allowTimes&&t.isArray(N.allowTimes)&&N.allowTimes.length)for(v=0;v<N.allowTimes.length;v+=1)h(M.strtotime(N.allowTimes[v]).getHours(),P=M.strtotime(N.allowTimes[v]).getMinutes());else for(v=0,o=0;v<(N.hours12?12:24);v+=1)for(o=0;o<60;o+=N.step){var q=60*v+o;q<T||q>=R||h((v<10?"0":"")+v,P=(o<10?"0":"")+o)}for(I.html(E),r="",v=parseInt(N.yearStart,10);v<=parseInt(N.yearEnd,10);v+=1)r+='<div class="xdsoft_option '+(M.currentTime.getFullYear()===v?"xdsoft_current":"")+'" data-value="'+v+'">'+(v+N.yearOffset)+"</div>";for(F.children().eq(0).html(r),v=parseInt(N.monthStart,10),r="";v<=parseInt(N.monthEnd,10);v+=1)r+='<div class="xdsoft_option '+(M.currentTime.getMonth()===v?"xdsoft_current":"")+'" data-value="'+v+'">'+N.i18n[i].months[v]+"</div>";L.children().eq(0).html(r),t(k).trigger("generate.xdsoft")}),10),a.stopPropagation()})).on("afterOpen.xdsoft",(function(){var t,e,n,r;N.timepicker&&(I.find(".xdsoft_current").length?t=".xdsoft_current":I.find(".xdsoft_init_time").length&&(t=".xdsoft_init_time"),t?(e=P[0].clientHeight,(n=I[0].offsetHeight)-e<(r=I.find(t).index()*N.timeHeightInTimePicker+1)&&(r=n-e),P.trigger("scroll_element.xdsoft_scroller",[parseInt(r,10)/(n-e)])):P.trigger("scroll_element.xdsoft_scroller",[0]))})),a=0,A.on("touchend click.xdsoft","td",(function(n){n.stopPropagation(),a+=1;var r=t(this),i=M.currentTime;if(null==i&&(M.currentTime=M.now(),i=M.currentTime),r.hasClass("xdsoft_disabled"))return!1;i.setDate(1),i.setFullYear(r.data("year")),i.setMonth(r.data("month")),i.setDate(r.data("date")),k.trigger("select.xdsoft",[i]),e.val(M.str()),N.onSelectDate&&t.isFunction(N.onSelectDate)&&N.onSelectDate.call(k,M.currentTime,k.data("input"),n),k.data("changed",!0),k.trigger("xchange.xdsoft"),k.trigger("changedatetime.xdsoft"),(a>1||!0===N.closeOnDateSelect||!1===N.closeOnDateSelect&&!N.timepicker)&&!N.inline&&k.trigger("close.xdsoft"),setTimeout((function(){a=0}),200)})),I.on("touchstart","div",(function(t){this.touchMoved=!1})).on("touchmove","div",z).on("touchend click.xdsoft","div",(function(e){if(!this.touchMoved){e.stopPropagation();var n=t(this),r=M.currentTime;if(null==r&&(M.currentTime=M.now(),r=M.currentTime),n.hasClass("xdsoft_disabled"))return!1;r.setHours(n.data("hour")),r.setMinutes(n.data("minute")),k.trigger("select.xdsoft",[r]),k.data("input").val(M.str()),N.onSelectTime&&t.isFunction(N.onSelectTime)&&N.onSelectTime.call(k,M.currentTime,k.data("input"),e),k.data("changed",!0),k.trigger("xchange.xdsoft"),k.trigger("changedatetime.xdsoft"),!0!==N.inline&&!0===N.closeOnTimeSelect&&k.trigger("close.xdsoft")}})),T.on("mousewheel.xdsoft",(function(t){return!N.scrollMonth||(t.deltaY<0?M.nextMonth():M.prevMonth(),!1)})),e.on("mousewheel.xdsoft",(function(t){return!N.scrollInput||(!N.datepicker&&N.timepicker?((s=I.find(".xdsoft_current").length?I.find(".xdsoft_current").eq(0).index():0)+t.deltaY>=0&&s+t.deltaY<I.children().length&&(s+=t.deltaY),I.children().eq(s).length&&I.children().eq(s).trigger("mousedown"),!1):N.datepicker&&!N.timepicker?(T.trigger(t,[t.deltaY,t.deltaX,t.deltaY]),e.val&&e.val(M.str()),k.trigger("changedatetime.xdsoft"),!1):void 0)})),k.on("changedatetime.xdsoft",(function(e){if(N.onChangeDateTime&&t.isFunction(N.onChangeDateTime)){var n=k.data("input");N.onChangeDateTime.call(k,M.currentTime,n,e),delete N.value,n.trigger("change")}})).on("generate.xdsoft",(function(){N.onGenerate&&t.isFunction(N.onGenerate)&&N.onGenerate.call(k,M.currentTime,k.data("input")),q&&(k.trigger("afterOpen.xdsoft"),q=!1)})).on("click.xdsoft",(function(t){t.stopPropagation()})),s=0,E=function(t,e){do{if(!(t=t.parentNode)||!1===e(t))break}while("HTML"!==t.nodeName)},u=function(){var e,n,r,i,o,a,s,u,l,c,f,h,d;if(e=(u=k.data("input")).offset(),n=u[0],c="top",r=e.top+n.offsetHeight-1,i=e.left,o="absolute",l=t(N.contentWindow).width(),h=t(N.contentWindow).height(),d=t(N.contentWindow).scrollTop(),N.ownerDocument.documentElement.clientWidth-e.left<T.parent().outerWidth(!0)){var p=T.parent().outerWidth(!0)-n.offsetWidth;i-=p}"rtl"===u.parent().css("direction")&&(i-=k.outerWidth()-u.outerWidth()),N.fixed?(r-=d,i-=t(N.contentWindow).scrollLeft(),o="fixed"):(s=!1,E(n,(function(t){return null!==t&&("fixed"===N.contentWindow.getComputedStyle(t).getPropertyValue("position")?(s=!0,!1):void 0)})),s&&!N.insideParent?(o="fixed",r+k.outerHeight()>h+d?(c="bottom",r=h+d-e.top):r-=d):r+k[0].offsetHeight>h+d&&(r=e.top-k[0].offsetHeight+1),r<0&&(r=0),i+n.offsetWidth>l&&(i=l-n.offsetWidth)),a=k[0],E(a,(function(t){if("relative"===N.contentWindow.getComputedStyle(t).getPropertyValue("position")&&l>=t.offsetWidth)return i-=(l-t.offsetWidth)/2,!1})),f={position:o,left:N.insideParent?n.offsetLeft:i,top:"",bottom:""},N.insideParent?f[c]=n.offsetTop+n.offsetHeight:f[c]=r,k.css(f)},k.on("open.xdsoft",(function(e){var n=!0;N.onShow&&t.isFunction(N.onShow)&&(n=N.onShow.call(k,M.currentTime,k.data("input"),e)),!1!==n&&(k.show(),u(),t(N.contentWindow).off("resize.xdsoft",u).on("resize.xdsoft",u),N.closeOnWithoutClick&&t([N.ownerDocument.body,N.contentWindow]).on("touchstart mousedown.xdsoft",(function e(){k.trigger("close.xdsoft"),t([N.ownerDocument.body,N.contentWindow]).off("touchstart mousedown.xdsoft",e)})))})).on("close.xdsoft",(function(e){var n=!0;D.find(".xdsoft_month,.xdsoft_year").find(".xdsoft_select").hide(),N.onClose&&t.isFunction(N.onClose)&&(n=N.onClose.call(k,M.currentTime,k.data("input"),e)),!1===n||N.opened||N.inline||k.hide(),e.stopPropagation()})).on("toggle.xdsoft",(function(){k.is(":visible")?k.trigger("close.xdsoft"):k.trigger("open.xdsoft")})).data("input",e),B=0,k.data("xdsoft_datetime",M),k.setOptions(N),M.setCurrentTime(H()),e.data("xdsoft_datetimepicker",k).on("open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart",(function(){e.is(":disabled")||e.data("xdsoft_datetimepicker").is(":visible")&&N.closeOnInputClick||N.openOnFocus&&(clearTimeout(B),B=setTimeout((function(){e.is(":disabled")||(q=!0,M.setCurrentTime(H(),!0),N.mask&&U(N),k.trigger("open.xdsoft"))}),100))})).on("keydown.xdsoft",(function(e){var n,r=e.which;return-1!==[c].indexOf(r)&&N.enterLikeTab?(n=t("input:visible,textarea:visible,button:visible,a:visible"),k.trigger("close.xdsoft"),n.eq(n.index(this)+1).focus(),!1):-1!==[v].indexOf(r)?(k.trigger("close.xdsoft"),!0):void 0})).on("blur.xdsoft",(function(){k.trigger("close.xdsoft")}))},s=function(e){var n=e.data("xdsoft_datetimepicker");n&&(n.data("xdsoft_datetime",null),n.remove(),e.data("xdsoft_datetimepicker",null).off(".xdsoft"),t(N.contentWindow).off("resize.xdsoft"),t([N.contentWindow,N.ownerDocument.body]).off("mousedown.xdsoft touchstart"),e.unmousewheel&&e.unmousewheel())},t(N.ownerDocument).off("keydown.xdsoftctrl keyup.xdsoftctrl").off("keydown.xdsoftcmd keyup.xdsoftcmd").on("keydown.xdsoftctrl",(function(t){t.keyCode===l&&(O=!0)})).on("keyup.xdsoftctrl",(function(t){t.keyCode===l&&(O=!1)})).on("keydown.xdsoftcmd",(function(t){t.keyCode})).on("keyup.xdsoftcmd",(function(t){t.keyCode})),this.each((function(){var e,i=t(this).data("xdsoft_datetimepicker");if(i){if("string"===t.type(r))switch(r){case"show":t(this).select().focus(),i.trigger("open.xdsoft");break;case"hide":i.trigger("close.xdsoft");break;case"toggle":i.trigger("toggle.xdsoft");break;case"destroy":s(t(this));break;case"reset":this.value=this.defaultValue,this.value&&i.data("xdsoft_datetime").isValidDate(n.parseDate(this.value,N.format))||i.data("changed",!1),i.data("xdsoft_datetime").setCurrentTime(this.value);break;case"validate":i.data("input").trigger("blur.xdsoft");break;default:i[r]&&t.isFunction(i[r])&&(u=i[r](o))}else i.setOptions(r);return 0}"string"!==t.type(r)&&(!N.lazyInit||N.open||N.inline?a(t(this)):(e=t(this)).on("open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart",(function t(){e.is(":disabled")||e.data("xdsoft_datetimepicker")||(clearTimeout(M),M=setTimeout((function(){e.data("xdsoft_datetimepicker")||a(e),e.off("open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart",t).trigger("open.xdsoft")}),100))})))})),u},t.fn.datetimepicker.defaults=e},i=[n(19755),n(50450)],void 0===(o="function"==typeof(r=s)?r.apply(e,i):r)||(t.exports=o),i=[n(19755)],r=function(t){var e,n,r=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],i="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],o=Array.prototype.slice;if(t.event.fixHooks)for(var a=r.length;a;)t.event.fixHooks[r[--a]]=t.event.mouseHooks;var s=t.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var e=i.length;e;)this.addEventListener(i[--e],u,!1);else this.onmousewheel=u;t.data(this,"mousewheel-line-height",s.getLineHeight(this)),t.data(this,"mousewheel-page-height",s.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var e=i.length;e;)this.removeEventListener(i[--e],u,!1);else this.onmousewheel=null;t.removeData(this,"mousewheel-line-height"),t.removeData(this,"mousewheel-page-height")},getLineHeight:function(e){var n=t(e),r=n["offsetParent"in t.fn?"offsetParent":"parent"]();return r.length||(r=t("body")),parseInt(r.css("fontSize"),10)||parseInt(n.css("fontSize"),10)||16},getPageHeight:function(e){return t(e).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};function u(r){var i=r||window.event,a=o.call(arguments,1),u=0,f=0,h=0,d=0,p=0,m=0;if((r=t.event.fix(i)).type="mousewheel","detail"in i&&(h=-1*i.detail),"wheelDelta"in i&&(h=i.wheelDelta),"wheelDeltaY"in i&&(h=i.wheelDeltaY),"wheelDeltaX"in i&&(f=-1*i.wheelDeltaX),"axis"in i&&i.axis===i.HORIZONTAL_AXIS&&(f=-1*h,h=0),u=0===h?f:h,"deltaY"in i&&(u=h=-1*i.deltaY),"deltaX"in i&&(f=i.deltaX,0===h&&(u=-1*f)),0!==h||0!==f){if(1===i.deltaMode){var g=t.data(this,"mousewheel-line-height");u*=g,h*=g,f*=g}else if(2===i.deltaMode){var v=t.data(this,"mousewheel-page-height");u*=v,h*=v,f*=v}if(d=Math.max(Math.abs(h),Math.abs(f)),(!n||d<n)&&(n=d,c(i,d)&&(n/=40)),c(i,d)&&(u/=40,f/=40,h/=40),u=Math[u>=1?"floor":"ceil"](u/n),f=Math[f>=1?"floor":"ceil"](f/n),h=Math[h>=1?"floor":"ceil"](h/n),s.settings.normalizeOffset&&this.getBoundingClientRect){var y=this.getBoundingClientRect();p=r.clientX-y.left,m=r.clientY-y.top}return r.deltaX=f,r.deltaY=h,r.deltaFactor=n,r.offsetX=p,r.offsetY=m,r.deltaMode=0,a.unshift(r,u,f,h),e&&clearTimeout(e),e=setTimeout(l,200),(t.event.dispatch||t.event.handle).apply(this,a)}}function l(){n=null}function c(t,e){return s.settings.adjustOldDeltas&&"mousewheel"===t.type&&e%120==0}t.fn.extend({mousewheel:function(t){return t?this.bind("mousewheel",t):this.trigger("mousewheel")},unmousewheel:function(t){return this.unbind("mousewheel",t)}})},void 0===(o="function"==typeof r?r.apply(e,i):r)||(t.exports=o)},50450:function(t,e,n){var r,i,o;i=[n(19755)],r=function(t){var e,n,r=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],i="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],o=Array.prototype.slice;if(t.event.fixHooks)for(var a=r.length;a;)t.event.fixHooks[r[--a]]=t.event.mouseHooks;var s=t.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var e=i.length;e;)this.addEventListener(i[--e],u,!1);else this.onmousewheel=u;t.data(this,"mousewheel-line-height",s.getLineHeight(this)),t.data(this,"mousewheel-page-height",s.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var e=i.length;e;)this.removeEventListener(i[--e],u,!1);else this.onmousewheel=null;t.removeData(this,"mousewheel-line-height"),t.removeData(this,"mousewheel-page-height")},getLineHeight:function(e){var n=t(e),r=n["offsetParent"in t.fn?"offsetParent":"parent"]();return r.length||(r=t("body")),parseInt(r.css("fontSize"),10)||parseInt(n.css("fontSize"),10)||16},getPageHeight:function(e){return t(e).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};function u(r){var i=r||window.event,a=o.call(arguments,1),u=0,f=0,h=0,d=0,p=0,m=0;if((r=t.event.fix(i)).type="mousewheel","detail"in i&&(h=-1*i.detail),"wheelDelta"in i&&(h=i.wheelDelta),"wheelDeltaY"in i&&(h=i.wheelDeltaY),"wheelDeltaX"in i&&(f=-1*i.wheelDeltaX),"axis"in i&&i.axis===i.HORIZONTAL_AXIS&&(f=-1*h,h=0),u=0===h?f:h,"deltaY"in i&&(u=h=-1*i.deltaY),"deltaX"in i&&(f=i.deltaX,0===h&&(u=-1*f)),0!==h||0!==f){if(1===i.deltaMode){var g=t.data(this,"mousewheel-line-height");u*=g,h*=g,f*=g}else if(2===i.deltaMode){var v=t.data(this,"mousewheel-page-height");u*=v,h*=v,f*=v}if(d=Math.max(Math.abs(h),Math.abs(f)),(!n||d<n)&&(n=d,c(i,d)&&(n/=40)),c(i,d)&&(u/=40,f/=40,h/=40),u=Math[u>=1?"floor":"ceil"](u/n),f=Math[f>=1?"floor":"ceil"](f/n),h=Math[h>=1?"floor":"ceil"](h/n),s.settings.normalizeOffset&&this.getBoundingClientRect){var y=this.getBoundingClientRect();p=r.clientX-y.left,m=r.clientY-y.top}return r.deltaX=f,r.deltaY=h,r.deltaFactor=n,r.offsetX=p,r.offsetY=m,r.deltaMode=0,a.unshift(r,u,f,h),e&&clearTimeout(e),e=setTimeout(l,200),(t.event.dispatch||t.event.handle).apply(this,a)}}function l(){n=null}function c(t,e){return s.settings.adjustOldDeltas&&"mousewheel"===t.type&&e%120==0}t.fn.extend({mousewheel:function(t){return t?this.bind("mousewheel",t):this.trigger("mousewheel")},unmousewheel:function(t){return this.unbind("mousewheel",t)}})},void 0===(o=r.apply(e,i))||(t.exports=o)},59786:function(t,e,n){var r,i,o;!function(a){"use strict";i=[n(19755),n(85592),n(63762)],void 0===(o="function"==typeof(r=function(t){return t.effects.define("blind","hide",(function(e,n){var r={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},i=t(this),o=e.direction||"up",a=i.cssClip(),s={clip:t.extend({},a)},u=t.effects.createPlaceholder(i);s.clip[r[o][0]]=s.clip[r[o][1]],"show"===e.mode&&(i.cssClip(s.clip),u&&u.css(t.effects.clipToBox(s)),s.clip=a),u&&u.animate(t.effects.clipToBox(s),e.duration,e.easing),i.animate(s,{queue:!1,duration:e.duration,easing:e.easing,complete:n})}))})?r.apply(e,i):r)||(t.exports=o)}()},10057:function(t,e,n){var r,i,o;!function(a){"use strict";i=[n(19755),n(85592),n(63762)],void 0===(o="function"==typeof(r=function(t){return t.effects.define("slide","show",(function(e,n){var r,i,o=t(this),a={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},s=e.mode,u=e.direction||"left",l="up"===u||"down"===u?"top":"left",c="up"===u||"left"===u,f=e.distance||o["top"===l?"outerHeight":"outerWidth"](!0),h={};t.effects.createPlaceholder(o),r=o.cssClip(),i=o.position()[l],h[l]=(c?-1:1)*f+i,h.clip=o.cssClip(),h.clip[a[u][1]]=h.clip[a[u][0]],"show"===s&&(o.cssClip(h.clip),o.css(l,h[l]),h.clip=r,h[l]=i),o.animate(h,{queue:!1,duration:e.duration,easing:e.easing,complete:n})}))})?r.apply(e,i):r)||(t.exports=o)}()},19804:function(t){t.exports=function(){return n={},t.m=e=[function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return a})),n(2);var r=n(3);function i(t,e,n,i){function o(i){var o=Object(r.j)(i,e.map(a));return function(t,e,n){if(!e.filter((function(t){return!((e=t)&&"?"===e[0]);var e})).every((function(t){return void 0!==n[t]}))){var r=e.filter((function(t){return void 0===n[t]}));throw new Error('Cannot create function "'.concat(t,'", ')+"some dependencies are missing: ".concat(r.map((function(t){return'"'.concat(t,'"')})).join(", "),"."))}}(t,e,i),n(o)}return o.isFactory=!0,o.fn=t,o.dependencies=e.slice().sort(),i&&(o.meta=i),o}function o(t){return"function"==typeof t&&"string"==typeof t.fn&&Array.isArray(t.dependencies)}function a(t){return t&&"?"===t[0]?t.slice(1):t}},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t){return"number"==typeof t}function o(t){return t&&!0===t.constructor.prototype.isBigNumber||!1}function a(t){return t&&"object"===r(t)&&!0===Object.getPrototypeOf(t).isComplex||!1}function s(t){return t&&"object"===r(t)&&!0===Object.getPrototypeOf(t).isFraction||!1}function u(t){return t&&!0===t.constructor.prototype.isUnit||!1}function l(t){return"string"==typeof t}n.d(e,"y",(function(){return i})),n.d(e,"e",(function(){return o})),n.d(e,"j",(function(){return a})),n.d(e,"o",(function(){return s})),n.d(e,"L",(function(){return u})),n.d(e,"I",(function(){return l})),n.d(e,"b",(function(){return c})),n.d(e,"v",(function(){return f})),n.d(e,"i",(function(){return h})),n.d(e,"n",(function(){return d})),n.d(e,"H",(function(){return p})),n.d(e,"D",(function(){return m})),n.d(e,"t",(function(){return g})),n.d(e,"g",(function(){return v})),n.d(e,"G",(function(){return y})),n.d(e,"s",(function(){return b})),n.d(e,"p",(function(){return x})),n.d(e,"m",(function(){return w})),n.d(e,"F",(function(){return _})),n.d(e,"z",(function(){return S})),n.d(e,"x",(function(){return O})),n.d(e,"K",(function(){return N})),n.d(e,"a",(function(){return M})),n.d(e,"c",(function(){return E})),n.d(e,"d",(function(){return k})),n.d(e,"f",(function(){return C})),n.d(e,"k",(function(){return T})),n.d(e,"l",(function(){return D})),n.d(e,"q",(function(){return A})),n.d(e,"r",(function(){return j})),n.d(e,"u",(function(){return P})),n.d(e,"w",(function(){return I})),n.d(e,"A",(function(){return R})),n.d(e,"B",(function(){return L})),n.d(e,"C",(function(){return F})),n.d(e,"E",(function(){return q})),n.d(e,"J",(function(){return B})),n.d(e,"h",(function(){return z})),n.d(e,"M",(function(){return H}));var c=Array.isArray;function f(t){return t&&!0===t.constructor.prototype.isMatrix||!1}function h(t){return Array.isArray(t)||f(t)}function d(t){return t&&t.isDenseMatrix&&!0===t.constructor.prototype.isMatrix||!1}function p(t){return t&&t.isSparseMatrix&&!0===t.constructor.prototype.isMatrix||!1}function m(t){return t&&!0===t.constructor.prototype.isRange||!1}function g(t){return t&&!0===t.constructor.prototype.isIndex||!1}function v(t){return"boolean"==typeof t}function y(t){return t&&!0===t.constructor.prototype.isResultSet||!1}function b(t){return t&&!0===t.constructor.prototype.isHelp||!1}function x(t){return"function"==typeof t}function w(t){return t instanceof Date}function _(t){return t instanceof RegExp}function S(t){return!(!t||"object"!==r(t)||t.constructor!==Object||a(t)||s(t))}function O(t){return null===t}function N(t){return void 0===t}function M(t){return t&&!0===t.isAccessorNode&&!0===t.constructor.prototype.isNode||!1}function E(t){return t&&!0===t.isArrayNode&&!0===t.constructor.prototype.isNode||!1}function k(t){return t&&!0===t.isAssignmentNode&&!0===t.constructor.prototype.isNode||!1}function C(t){return t&&!0===t.isBlockNode&&!0===t.constructor.prototype.isNode||!1}function T(t){return t&&!0===t.isConditionalNode&&!0===t.constructor.prototype.isNode||!1}function D(t){return t&&!0===t.isConstantNode&&!0===t.constructor.prototype.isNode||!1}function A(t){return t&&!0===t.isFunctionAssignmentNode&&!0===t.constructor.prototype.isNode||!1}function j(t){return t&&!0===t.isFunctionNode&&!0===t.constructor.prototype.isNode||!1}function P(t){return t&&!0===t.isIndexNode&&!0===t.constructor.prototype.isNode||!1}function I(t){return t&&!0===t.isNode&&!0===t.constructor.prototype.isNode||!1}function R(t){return t&&!0===t.isObjectNode&&!0===t.constructor.prototype.isNode||!1}function L(t){return t&&!0===t.isOperatorNode&&!0===t.constructor.prototype.isNode||!1}function F(t){return t&&!0===t.isParenthesisNode&&!0===t.constructor.prototype.isNode||!1}function q(t){return t&&!0===t.isRangeNode&&!0===t.constructor.prototype.isNode||!1}function B(t){return t&&!0===t.isSymbolNode&&!0===t.constructor.prototype.isNode||!1}function z(t){return t&&!0===t.constructor.prototype.isChain||!1}function H(t){var e=r(t);return"object"===e?null===t?"null":Array.isArray(t)?"Array":t instanceof Date?"Date":t instanceof RegExp?"RegExp":o(t)?"BigNumber":a(t)?"Complex":s(t)?"Fraction":f(t)?"Matrix":u(t)?"Unit":g(t)?"Index":m(t)?"Range":y(t)?"ResultSet":I(t)?t.type:z(t)?"Chain":b(t)?"Help":"Object":"function"===e?"Function":e}},function(t,e,n){"use strict";n.d(e,"a",(function(){return u})),n.d(e,"p",(function(){return l})),n.d(e,"q",(function(){return c})),n.d(e,"m",(function(){return f})),n.d(e,"l",(function(){return h})),n.d(e,"n",(function(){return d})),n.d(e,"o",(function(){return p})),n.d(e,"e",(function(){return m})),n.d(e,"k",(function(){return g})),n.d(e,"f",(function(){return v})),n.d(e,"c",(function(){return y})),n.d(e,"d",(function(){return b})),n.d(e,"j",(function(){return x})),n.d(e,"i",(function(){return w})),n.d(e,"g",(function(){return _})),n.d(e,"h",(function(){return S})),n.d(e,"b",(function(){return O}));var r=n(4),i=n(1),o=n(5),a=n(6),s=n(9);function u(t){for(var e=[];Array.isArray(t);)e.push(t.length),t=t[0];return e}function l(t,e){if(0===e.length){if(Array.isArray(t))throw new a.a(t.length,0)}else!function t(e,n,r){var i=e.length;if(i!==n[r])throw new a.a(i,n[r]);if(r<n.length-1)for(var o=r+1,s=0;s<i;s++){var u=e[s];if(!Array.isArray(u))throw new a.a(n.length-1,n.length,"<");t(e[s],n,o)}else for(s=0;s<i;s++)if(Array.isArray(e[s]))throw new a.a(n.length+1,n.length,">")}(t,e,0)}function c(t,e){if(!Object(i.y)(t)||!Object(r.i)(t))throw new TypeError("Index must be an integer (value: "+t+")");if(t<0||"number"==typeof e&&e<=t)throw new s.a(t,e)}function f(t,e,n){if(!Array.isArray(t)||!Array.isArray(e))throw new TypeError("Array expected");if(0===e.length)throw new Error("Resizing to scalar is not supported");return e.forEach((function(t){if(!Object(i.y)(t)||!Object(r.i)(t)||t<0)throw new TypeError("Invalid size, must contain positive integers (size: "+Object(o.d)(e)+")")})),function t(e,n,r,i){var o,a,s=e.length,u=n[r],l=Math.min(s,u);if(e.length=u,r<n.length-1){var c=r+1;for(o=0;o<l;o++)a=e[o],Array.isArray(a)||(a=[a],e[o]=a),t(a,n,c,i);for(o=l;o<u;o++)a=[],e[o]=a,t(a,n,c,i)}else{for(o=0;o<l;o++)for(;Array.isArray(e[o]);)e[o]=e[o][0];for(o=l;o<u;o++)e[o]=i}}(t,e,0,void 0!==n?n:0),t}function h(t,e){var n,r=m(t);function i(t){return t.reduce((function(t,e){return t*e}))}if(!Array.isArray(t)||!Array.isArray(e))throw new TypeError("Array expected");if(0===e.length)throw new a.a(0,i(u(t)),"!=");for(var o=1,s=0;s<e.length;s++)o*=e[s];if(r.length!==o)throw new a.a(i(e),i(u(t)),"!=");try{n=function(t,e){for(var n,r=t,i=e.length-1;0<i;i--){var o=e[i];n=[];for(var a=r.length/o,s=0;s<a;s++)n.push(r.slice(s*o,(s+1)*o));r=n}return r}(r,e)}catch(n){if(n instanceof a.a)throw new a.a(i(e),i(u(t)),"!=");throw n}return n}function d(t,e){for(var n=e||u(t);Array.isArray(t)&&1===t.length;)t=t[0],n.shift();for(var r=n.length;1===n[r-1];)r--;return r<n.length&&(t=function t(e,n,r){var i,o;if(r<n){var a=r+1;for(i=0,o=e.length;i<o;i++)e[i]=t(e[i],n,a)}else for(;Array.isArray(e);)e=e[0];return e}(t,r,0),n.length=r),t}function p(t,e,n,r){var i=r||u(t);if(n)for(var o=0;o<n;o++)t=[t],i.unshift(1);for(t=function t(e,n,r){var i,o;if(Array.isArray(e)){var a=r+1;for(i=0,o=e.length;i<o;i++)e[i]=t(e[i],n,a)}else for(var s=r;s<n;s++)e=[e];return e}(t,e,0);i.length<e;)i.push(1);return t}function m(t){if(!Array.isArray(t))return t;var e=[];return t.forEach((function t(n){Array.isArray(n)?n.forEach(t):e.push(n)})),e}function g(t,e){return Array.prototype.map.call(t,e)}function v(t,e){Array.prototype.forEach.call(t,e)}function y(t,e){if(1!==u(t).length)throw new Error("Only one dimensional matrices supported");return Array.prototype.filter.call(t,e)}function b(t,e){if(1!==u(t).length)throw new Error("Only one dimensional matrices supported");return Array.prototype.filter.call(t,(function(t){return e.test(t)}))}function x(t,e){return Array.prototype.join.call(t,e)}function w(t){if(!Array.isArray(t))throw new TypeError("Array input expected");if(0===t.length)return t;var e=[],n=0;e[0]={value:t[0],identifier:0};for(var r=1;r<t.length;r++)t[r]===t[r-1]?n++:n=0,e.push({value:t[r],identifier:n});return e}function _(t){if(!Array.isArray(t))throw new TypeError("Array input expected");if(0===t.length)return t;for(var e=[],n=0;n<t.length;n++)e.push(t[n].value);return e}function S(t,e){for(var n,r=0,i=0;i<t.length;i++){var o=t[i],a=Array.isArray(o);if(0===i&&a&&(r=o.length),a&&o.length!==r)return;var s=a?S(o,e):e(o);if(void 0===n)n=s;else if(n!==s)return"mixed"}return n}function O(t,e){return-1!==t.indexOf(e)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"i",(function(){return a})),n.d(e,"e",(function(){return s})),n.d(e,"b",(function(){return u})),n.d(e,"d",(function(){return l})),n.d(e,"c",(function(){return c})),n.d(e,"h",(function(){return f})),n.d(e,"f",(function(){return h})),n.d(e,"g",(function(){return d})),n.d(e,"j",(function(){return p})),n.d(e,"k",(function(){return m}));var r=n(1);function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t){var e=i(t);if("number"===e||"string"===e||"boolean"===e||null==t)return t;if("function"==typeof t.clone)return t.clone();if(Array.isArray(t))return t.map(o);if(t instanceof Date)return new Date(t.valueOf());if(Object(r.e)(t))return t;if(t instanceof RegExp)throw new TypeError("Cannot clone "+t);return a(t,o)}function a(t,e){var n={};for(var r in t)h(t,r)&&(n[r]=e(t[r]));return n}function s(t,e){for(var n in e)h(e,n)&&(t[n]=e[n]);return t}function u(t,e){if(Array.isArray(e))throw new TypeError("Arrays are not supported by deepExtend");for(var n in e)if(h(e,n))if(e[n]&&e[n].constructor===Object)void 0===t[n]&&(t[n]={}),t[n]&&t[n].constructor===Object?u(t[n],e[n]):t[n]=e[n];else{if(Array.isArray(e[n]))throw new TypeError("Arrays are not supported by deepExtend");t[n]=e[n]}return t}function l(t,e){var n,r,i;if(Array.isArray(t)){if(!Array.isArray(e))return!1;if(t.length!==e.length)return!1;for(r=0,i=t.length;r<i;r++)if(!l(t[r],e[r]))return!1;return!0}if("function"==typeof t)return t===e;if(t instanceof Object){if(Array.isArray(e)||!(e instanceof Object))return!1;for(n in t)if(!(n in e)||!l(t[n],e[n]))return!1;for(n in e)if(!(n in t)||!l(t[n],e[n]))return!1;return!0}return t===e}function c(t){var e={};return function t(e,n){for(var r in e){var o;h(e,r)&&("object"===i(o=e[r])&&null!==o?t(o,n):n[r]=o)}}(t,e),e}function f(t,e,n){var r,i=!0;Object.defineProperty(t,e,{get:function(){return i&&(r=n(),i=!1),r},set:function(t){r=t,i=!1},configurable:!0,enumerable:!0})}function h(t,e){return t&&Object.hasOwnProperty.call(t,e)}function d(t){return t&&"function"==typeof t.factory}function p(t,e){for(var n={},r=0;r<e.length;r++){var i=e[r],o=t[i];void 0!==o&&(n[i]=o)}return n}function m(t){return Object.keys(t).map((function(e){return t[e]}))}},function(t,e,n){"use strict";n.d(e,"i",(function(){return i})),n.d(e,"n",(function(){return o})),n.d(e,"l",(function(){return a})),n.d(e,"j",(function(){return s})),n.d(e,"k",(function(){return u})),n.d(e,"d",(function(){return l})),n.d(e,"g",(function(){return c})),n.d(e,"h",(function(){return f})),n.d(e,"q",(function(){return d})),n.d(e,"f",(function(){return v})),n.d(e,"m",(function(){return b})),n.d(e,"a",(function(){return x})),n.d(e,"b",(function(){return w})),n.d(e,"c",(function(){return _})),n.d(e,"e",(function(){return S})),n.d(e,"o",(function(){return O})),n.d(e,"p",(function(){return N}));var r=n(1);function i(t){return"boolean"==typeof t||!!isFinite(t)&&t===Math.round(t)}var o=Math.sign||function(t){return 0<t?1:t<0?-1:0},a=Math.log2||function(t){return Math.log(t)/Math.LN2},s=Math.log10||function(t){return Math.log(t)/Math.LN10},u=Math.log1p||function(t){return Math.log(t+1)},l=Math.cbrt||function(t){if(0===t)return t;var e,n=t<0;return n&&(t=-t),e=isFinite(t)?(t/((e=Math.exp(Math.log(t)/3))*e)+2*e)/3:t,n?-e:e},c=Math.expm1||function(t){return 2e-4<=t||t<=-2e-4?Math.exp(t)-1:t+t*t/2+t*t*t/6};function f(t,e){if("function"==typeof e)return e(t);if(t===1/0)return"Infinity";if(t===-1/0)return"-Infinity";if(isNaN(t))return"NaN";var n,i="auto";switch(e&&(e.notation&&(i=e.notation),Object(r.y)(e)?n=e:Object(r.y)(e.precision)&&(n=e.precision)),i){case"fixed":return d(t,n);case"exponential":return p(t,n);case"engineering":return function(t,e){if(isNaN(t)||!isFinite(t))return String(t);var n=m(h(t),e),i=n.exponent,o=n.coefficients,a=i%3==0?i:i<0?i-3-i%3:i-i%3;if(Object(r.y)(e))for(;e>o.length||i-a+1>o.length;)o.push(0);else for(var s=Math.abs(i-a)-(o.length-1),u=0;u<s;u++)o.push(0);for(var l=Math.abs(i-a),c=1;0<l;)c++,l--;var f=o.slice(c).join(""),d=Object(r.y)(e)&&f.length||f.match(/[1-9]/)?"."+f:"",p=o.slice(0,c).join("")+d+"e"+(0<=i?"+":"")+a.toString();return n.sign+p}(t,n);case"auto":return function(t,e,n){if(isNaN(t)||!isFinite(t))return String(t);var r=n&&void 0!==n.lowerExp?n.lowerExp:-3,i=n&&void 0!==n.upperExp?n.upperExp:5,o=h(t),a=e?m(o,e):o;if(a.exponent<r||a.exponent>=i)return p(t,e);var s=a.coefficients,u=a.exponent;s.length<e&&(s=s.concat(g(e-s.length))),s=s.concat(g(u-s.length+1+(s.length<e?e-s.length:0)));var l=0<u?u:0;return l<(s=g(-u).concat(s)).length-1&&s.splice(l+1,0,"."),a.sign+s.join("")}(t,n,e&&e).replace(/((\.\d*?)(0+))($|e)/,(function(){var t=arguments[2],e=arguments[4];return"."!==t?t+e:e}));default:throw new Error('Unknown notation "'+i+'". Choose "auto", "exponential", or "fixed".')}}function h(t){var e=String(t).toLowerCase().match(/^0*?(-?)(\d+\.?\d*)(e([+-]?\d+))?$/);if(!e)throw new SyntaxError("Invalid number "+t);var n=e[1],r=e[2],i=parseFloat(e[4]||"0"),o=r.indexOf(".");i+=-1!==o?o-1:r.length-1;var a=r.replace(".","").replace(/^0*/,(function(t){return i-=t.length,""})).replace(/0*$/,"").split("").map((function(t){return parseInt(t)}));return 0===a.length&&(a.push(0),i++),{sign:n,coefficients:a,exponent:i}}function d(t,e){if(isNaN(t)||!isFinite(t))return String(t);var n=h(t),r="number"==typeof e?m(n,n.exponent+1+e):n,i=r.coefficients,o=r.exponent+1,a=o+(e||0);return i.length<a&&(i=i.concat(g(a-i.length))),o<0&&(i=g(1-o).concat(i),o=1),o<i.length&&i.splice(o,0,0===o?"0.":"."),r.sign+i.join("")}function p(t,e){if(isNaN(t)||!isFinite(t))return String(t);var n=h(t),r=e?m(n,e):n,i=r.coefficients,o=r.exponent;i.length<e&&(i=i.concat(g(e-i.length)));var a=i.shift();return r.sign+a+(0<i.length?"."+i.join(""):"")+"e"+(0<=o?"+":"")+o}function m(t,e){for(var n={sign:t.sign,coefficients:t.coefficients,exponent:t.exponent},r=n.coefficients;e<=0;)r.unshift(0),n.exponent++,e++;if(r.length>e&&5<=r.splice(e,r.length-e)[0]){var i=e-1;for(r[i]++;10===r[i];)r.pop(),0===i&&(r.unshift(0),n.exponent++,i++),r[--i]++}return n}function g(t){for(var e=[],n=0;n<t;n++)e.push(0);return e}function v(t){return t.toExponential().replace(/e.*$/,"").replace(/^0\.?0*|\./,"").length}var y=Number.EPSILON||2220446049250313e-31;function b(t,e,n){if(null==n)return t===e;if(t===e)return!0;if(isNaN(t)||isNaN(e))return!1;if(isFinite(t)&&isFinite(e)){var r=Math.abs(t-e);return r<y||r<=Math.max(Math.abs(t),Math.abs(e))*n}return!1}var x=Math.acosh||function(t){return Math.log(Math.sqrt(t*t-1)+t)},w=Math.asinh||function(t){return Math.log(Math.sqrt(t*t+1)+t)},_=Math.atanh||function(t){return Math.log((1+t)/(1-t))/2},S=Math.cosh||function(t){return(Math.exp(t)+Math.exp(-t))/2},O=Math.sinh||function(t){return(Math.exp(t)-Math.exp(-t))/2},N=Math.tanh||function(t){var e=Math.exp(2*t);return(e-1)/(e+1)}},function(t,e,n){"use strict";n.d(e,"b",(function(){return s})),n.d(e,"d",(function(){return u})),n.d(e,"e",(function(){return l})),n.d(e,"c",(function(){return c})),n.d(e,"a",(function(){return f}));var r=n(1),i=n(4);function o(t,e){return void 0!==e?t.toExponential(e-1):t.toExponential()}function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t,e){var n=t.length-e.length,r=t.length;return t.substring(n,r)===e}function u(t,e){return"number"==typeof t?Object(i.h)(t,e):Object(r.e)(t)?function(t,e){if("function"==typeof e)return e(t);if(!t.isFinite())return t.isNaN()?"NaN":t.gt(0)?"Infinity":"-Infinity";var n,r,i="auto";switch(void 0!==e&&(e.notation&&(i=e.notation),"number"==typeof e?n=e:e.precision&&(n=e.precision)),i){case"fixed":return r=n,t.toFixed(r);case"exponential":return o(t,n);case"engineering":return function(t,e){var n=t.e,r=n%3==0?n:n<0?n-3-n%3:n-n%3,i=t.mul(Math.pow(10,-r)),o=i.toPrecision(e);return-1!==o.indexOf("e")&&(o=i.toString()),o+"e"+(0<=n?"+":"")+r.toString()}(t,n);case"auto":var a=e&&void 0!==e.lowerExp?e.lowerExp:-3,s=e&&void 0!==e.upperExp?e.upperExp:5;if(t.isZero())return"0";var u=t.toSignificantDigits(n),l=u.e;return(a<=l&&l<s?u.toFixed():o(t,n)).replace(/((\.\d*?)(0+))($|e)/,(function(){var t=arguments[2],e=arguments[4];return"."!==t?t+e:e}));default:throw new Error('Unknown notation "'+i+'". Choose "auto", "exponential", or "fixed".')}}(t,e):(n=t)&&"object"===a(n)&&"number"==typeof n.s&&"number"==typeof n.n&&"number"==typeof n.d?e&&"decimal"===e.fraction?t.toString():t.s*t.n+"/"+t.d:Array.isArray(t)?function t(e,n){if(Array.isArray(e)){for(var r="[",i=e.length,o=0;o<i;o++)0!==o&&(r+=", "),r+=t(e[o],n);return r+"]"}return u(e,n)}(t,e):Object(r.I)(t)?'"'+t+'"':"function"==typeof t?t.syntax?String(t.syntax):"function":t&&"object"===a(t)?"function"==typeof t.format?t.format(e):t&&t.toString(e)!=={}.toString()?t.toString(e):"{"+Object.keys(t).map((function(n){return'"'+n+'": '+u(t[n],e)})).join(", ")+"}":String(t);var n}function l(t){for(var e=String(t),n="",r=0;r<e.length;){var i=e.charAt(r);"\\"===i?(n+=i,r++,""!==(i=e.charAt(r))&&-1!=='"\\/bfnrtu'.indexOf(i)||(n+="\\"),n+=i):n+='"'===i?'\\"':i,r++}return'"'+n+'"'}function c(t){return String(t).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function f(t,e){if(!Object(r.I)(t))throw new TypeError("Unexpected type of argument in function compareText (expected: string or Array or Matrix, actual: "+Object(r.M)(t)+", index: 0)");if(!Object(r.I)(e))throw new TypeError("Unexpected type of argument in function compareText (expected: string or Array or Matrix, actual: "+Object(r.M)(e)+", index: 1)");return t===e?0:e<t?1:-1}},function(t,e,n){"use strict";function r(t,e,n){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");this.actual=t,this.expected=e,this.relation=n,this.message="Dimension mismatch ("+(Array.isArray(t)?"["+t.join(", ")+"]":t)+" "+(this.relation||"!=")+" "+(Array.isArray(e)?"["+e.join(", ")+"]":e)+")",this.stack=(new Error).stack}n.d(e,"a",(function(){return r})),(r.prototype=new RangeError).constructor=RangeError,r.prototype.name="DimensionError",r.prototype.isDimensionError=!0},,function(t,e,n){var r;!function(){"use strict";function n(t){return.5*(Math.exp(t)+Math.exp(-t))}function i(t){return.5*(Math.exp(t)-Math.exp(-t))}function o(){throw SyntaxError("Invalid Param")}function a(t,e){var n=Math.abs(t),r=Math.abs(e);return 0===t?Math.log(r):0===e?Math.log(n):n<3e3&&r<3e3?.5*Math.log(t*t+e*e):Math.log(t/Math.cos(Math.atan2(e,t)))}function s(t,e){if(!(this instanceof s))return new s(t,e);var n=function(t,e){var n={re:0,im:0};if(null==t)n.re=n.im=0;else if(void 0!==e)n.re=t,n.im=e;else switch(typeof t){case"object":if("im"in t&&"re"in t)n.re=t.re,n.im=t.im;else if("abs"in t&&"arg"in t){if(!Number.isFinite(t.abs)&&Number.isFinite(t.arg))return s.INFINITY;n.re=t.abs*Math.cos(t.arg),n.im=t.abs*Math.sin(t.arg)}else if("r"in t&&"phi"in t){if(!Number.isFinite(t.r)&&Number.isFinite(t.phi))return s.INFINITY;n.re=t.r*Math.cos(t.phi),n.im=t.r*Math.sin(t.phi)}else 2===t.length?(n.re=t[0],n.im=t[1]):o();break;case"string":n.im=n.re=0;var r=t.match(/\d+\.?\d*e[+-]?\d+|\d+\.?\d*|\.\d+|./g),i=1,a=0;null===r&&o();for(var u=0;u<r.length;u++){var l=r[u];" "===l||"\t"===l||"\n"===l||("+"===l?i++:"-"===l?a++:("i"===l||"I"===l?(i+a===0&&o()," "===r[u+1]||isNaN(r[u+1])?n.im+=parseFloat((a%2?"-":"")+"1"):(n.im+=parseFloat((a%2?"-":"")+r[u+1]),u++)):(i+a!==0&&!isNaN(l)||o(),"i"===r[u+1]||"I"===r[u+1]?(n.im+=parseFloat((a%2?"-":"")+l),u++):n.re+=parseFloat((a%2?"-":"")+l)),i=a=0))}0<i+a&&o();break;case"number":n.im=0,n.re=t;break;default:o()}return isNaN(n.re)||isNaN(n.im),n}(t,e);this.re=n.re,this.im=n.im}s.prototype={re:0,im:0,sign:function(){var t=this.abs();return new s(this.re/t,this.im/t)},add:function(t,e){var n=new s(t,e);return this.isInfinite()&&n.isInfinite()?s.NAN:this.isInfinite()||n.isInfinite()?s.INFINITY:new s(this.re+n.re,this.im+n.im)},sub:function(t,e){var n=new s(t,e);return this.isInfinite()&&n.isInfinite()?s.NAN:this.isInfinite()||n.isInfinite()?s.INFINITY:new s(this.re-n.re,this.im-n.im)},mul:function(t,e){var n=new s(t,e);return this.isInfinite()&&n.isZero()||this.isZero()&&n.isInfinite()?s.NAN:this.isInfinite()||n.isInfinite()?s.INFINITY:0===n.im&&0===this.im?new s(this.re*n.re,0):new s(this.re*n.re-this.im*n.im,this.re*n.im+this.im*n.re)},div:function(t,e){var n=new s(t,e);if(this.isZero()&&n.isZero()||this.isInfinite()&&n.isInfinite())return s.NAN;if(this.isInfinite()||n.isZero())return s.INFINITY;if(this.isZero()||n.isInfinite())return s.ZERO;t=this.re,e=this.im;var r,i,o=n.re,a=n.im;return 0===a?new s(t/o,e/o):Math.abs(o)<Math.abs(a)?new s((t*(i=o/a)+e)/(r=o*i+a),(e*i-t)/r):new s((t+e*(i=a/o))/(r=a*i+o),(e-t*i)/r)},pow:function(t,e){var n=new s(t,e);if(t=this.re,e=this.im,n.isZero())return s.ONE;if(0===n.im){if(0===e&&0<=t)return new s(Math.pow(t,n.re),0);if(0===t)switch((n.re%4+4)%4){case 0:return new s(Math.pow(e,n.re),0);case 1:return new s(0,Math.pow(e,n.re));case 2:return new s(-Math.pow(e,n.re),0);case 3:return new s(0,-Math.pow(e,n.re))}}if(0===t&&0===e&&0<n.re&&0<=n.im)return s.ZERO;var r=Math.atan2(e,t),i=a(t,e);return t=Math.exp(n.re*i-n.im*r),e=n.im*i+n.re*r,new s(t*Math.cos(e),t*Math.sin(e))},sqrt:function(){var t,e,n=this.re,r=this.im,i=this.abs();if(0<=n){if(0===r)return new s(Math.sqrt(n),0);t=.5*Math.sqrt(2*(i+n))}else t=Math.abs(r)/Math.sqrt(2*(i-n));return e=n<=0?.5*Math.sqrt(2*(i-n)):Math.abs(r)/Math.sqrt(2*(i+n)),new s(t,r<0?-e:e)},exp:function(){var t=Math.exp(this.re);return this.im,new s(t*Math.cos(this.im),t*Math.sin(this.im))},expm1:function(){var t=this.re,e=this.im;return new s(Math.expm1(t)*Math.cos(e)+function(t){var e=Math.PI/4;if(t<-e||e<t)return Math.cos(t)-1;var n=t*t;return n*(n*(1/24+n*(-1/720+n*(1/40320+n*(-1/3628800+n*(1/4790014600+n*(-1/87178291200+1/20922789888e3*n))))))-.5)}(e),Math.exp(t)*Math.sin(e))},log:function(){var t=this.re,e=this.im;return new s(a(t,e),Math.atan2(e,t))},abs:function(){return t=this.re,e=this.im,n=Math.abs(t),r=Math.abs(e),n<3e3&&r<3e3?Math.sqrt(n*n+r*r):(r=n<r?(n=r,t/e):e/t,n*Math.sqrt(1+r*r));var t,e,n,r},arg:function(){return Math.atan2(this.im,this.re)},sin:function(){var t=this.re,e=this.im;return new s(Math.sin(t)*n(e),Math.cos(t)*i(e))},cos:function(){var t=this.re,e=this.im;return new s(Math.cos(t)*n(e),-Math.sin(t)*i(e))},tan:function(){var t=2*this.re,e=2*this.im,r=Math.cos(t)+n(e);return new s(Math.sin(t)/r,i(e)/r)},cot:function(){var t=2*this.re,e=2*this.im,r=Math.cos(t)-n(e);return new s(-Math.sin(t)/r,i(e)/r)},sec:function(){var t=this.re,e=this.im,r=.5*n(2*e)+.5*Math.cos(2*t);return new s(Math.cos(t)*n(e)/r,Math.sin(t)*i(e)/r)},csc:function(){var t=this.re,e=this.im,r=.5*n(2*e)-.5*Math.cos(2*t);return new s(Math.sin(t)*n(e)/r,-Math.cos(t)*i(e)/r)},asin:function(){var t=this.re,e=this.im,n=new s(e*e-t*t+1,-2*t*e).sqrt(),r=new s(n.re-e,n.im+t).log();return new s(r.im,-r.re)},acos:function(){var t=this.re,e=this.im,n=new s(e*e-t*t+1,-2*t*e).sqrt(),r=new s(n.re-e,n.im+t).log();return new s(Math.PI/2-r.im,r.re)},atan:function(){var t=this.re,e=this.im;if(0===t){if(1===e)return new s(0,1/0);if(-1===e)return new s(0,-1/0)}var n=t*t+(1-e)*(1-e),r=new s((1-e*e-t*t)/n,-2*t/n).log();return new s(-.5*r.im,.5*r.re)},acot:function(){var t=this.re,e=this.im;if(0===e)return new s(Math.atan2(1,t),0);var n=t*t+e*e;return 0!=n?new s(t/n,-e/n).atan():new s(0!==t?t/0:0,0!==e?-e/0:0).atan()},asec:function(){var t=this.re,e=this.im;if(0===t&&0===e)return new s(0,1/0);var n=t*t+e*e;return 0!=n?new s(t/n,-e/n).acos():new s(0!==t?t/0:0,0!==e?-e/0:0).acos()},acsc:function(){var t=this.re,e=this.im;if(0===t&&0===e)return new s(Math.PI/2,1/0);var n=t*t+e*e;return 0!=n?new s(t/n,-e/n).asin():new s(0!==t?t/0:0,0!==e?-e/0:0).asin()},sinh:function(){var t=this.re,e=this.im;return new s(i(t)*Math.cos(e),n(t)*Math.sin(e))},cosh:function(){var t=this.re,e=this.im;return new s(n(t)*Math.cos(e),i(t)*Math.sin(e))},tanh:function(){var t=2*this.re,e=2*this.im,r=n(t)+Math.cos(e);return new s(i(t)/r,Math.sin(e)/r)},coth:function(){var t=2*this.re,e=2*this.im,r=n(t)-Math.cos(e);return new s(i(t)/r,-Math.sin(e)/r)},csch:function(){var t=this.re,e=this.im,r=Math.cos(2*e)-n(2*t);return new s(-2*i(t)*Math.cos(e)/r,2*n(t)*Math.sin(e)/r)},sech:function(){var t=this.re,e=this.im,r=Math.cos(2*e)+n(2*t);return new s(2*n(t)*Math.cos(e)/r,-2*i(t)*Math.sin(e)/r)},asinh:function(){var t=this.im;this.im=-this.re,this.re=t;var e=this.asin();return this.re=-this.im,this.im=t,t=e.re,e.re=-e.im,e.im=t,e},acosh:function(){var t,e=this.acos();return e.im<=0?(t=e.re,e.re=-e.im,e.im=t):(t=e.im,e.im=-e.re,e.re=t),e},atanh:function(){var t=this.re,e=this.im,n=1<t&&0===e,r=1-t,i=1+t,o=r*r+e*e,u=0!=o?new s((i*r-e*e)/o,(e*r+i*e)/o):new s(-1!==t?t/0:0,0!==e?e/0:0),l=u.re;return u.re=a(u.re,u.im)/2,u.im=Math.atan2(u.im,l)/2,n&&(u.im=-u.im),u},acoth:function(){var t=this.re,e=this.im;if(0===t&&0===e)return new s(0,Math.PI/2);var n=t*t+e*e;return 0!=n?new s(t/n,-e/n).atanh():new s(0!==t?t/0:0,0!==e?-e/0:0).atanh()},acsch:function(){var t=this.re,e=this.im;if(0===e)return new s(0!==t?Math.log(t+Math.sqrt(t*t+1)):1/0,0);var n=t*t+e*e;return 0!=n?new s(t/n,-e/n).asinh():new s(0!==t?t/0:0,0!==e?-e/0:0).asinh()},asech:function(){var t=this.re,e=this.im;if(this.isZero())return s.INFINITY;var n=t*t+e*e;return 0!=n?new s(t/n,-e/n).acosh():new s(0!==t?t/0:0,0!==e?-e/0:0).acosh()},inverse:function(){if(this.isZero())return s.INFINITY;if(this.isInfinite())return s.ZERO;var t=this.re,e=this.im,n=t*t+e*e;return new s(t/n,-e/n)},conjugate:function(){return new s(this.re,-this.im)},neg:function(){return new s(-this.re,-this.im)},ceil:function(t){return t=Math.pow(10,t||0),new s(Math.ceil(this.re*t)/t,Math.ceil(this.im*t)/t)},floor:function(t){return t=Math.pow(10,t||0),new s(Math.floor(this.re*t)/t,Math.floor(this.im*t)/t)},round:function(t){return t=Math.pow(10,t||0),new s(Math.round(this.re*t)/t,Math.round(this.im*t)/t)},equals:function(t,e){var n=new s(t,e);return Math.abs(n.re-this.re)<=s.EPSILON&&Math.abs(n.im-this.im)<=s.EPSILON},clone:function(){return new s(this.re,this.im)},toString:function(){var t=this.re,e=this.im,n="";return this.isNaN()?"NaN":this.isZero()?"0":this.isInfinite()?"Infinity":(0!==t&&(n+=t),0!==e&&(0!==t?n+=e<0?" - ":" + ":e<0&&(n+="-"),1!==(e=Math.abs(e))&&(n+=e),n+="i"),n||"0")},toVector:function(){return[this.re,this.im]},valueOf:function(){return 0===this.im?this.re:null},isNaN:function(){return isNaN(this.re)||isNaN(this.im)},isZero:function(){return!(0!==this.re&&-0!==this.re||0!==this.im&&-0!==this.im)},isFinite:function(){return isFinite(this.re)&&isFinite(this.im)},isInfinite:function(){return!(this.isNaN()||this.isFinite())}},s.ZERO=new s(0,0),s.ONE=new s(1,0),s.I=new s(0,1),s.PI=new s(Math.PI,0),s.E=new s(Math.E,0),s.INFINITY=new s(1/0,1/0),s.NAN=new s(NaN,NaN),s.EPSILON=1e-16,void 0===(r=function(){return s}.apply(e,[]))||(t.exports=r)}()},function(t,e,n){"use strict";function r(t,e,n){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");this.index=t,arguments.length<3?(this.min=0,this.max=e):(this.min=e,this.max=n),void 0!==this.min&&this.index<this.min?this.message="Index out of range ("+this.index+" < "+this.min+")":void 0!==this.max&&this.index>=this.max?this.message="Index out of range ("+this.index+" > "+(this.max-1)+")":this.message="Index out of range ("+this.index+")",this.stack=(new Error).stack}n.d(e,"a",(function(){return r})),(r.prototype=new RangeError).constructor=RangeError,r.prototype.name="IndexError",r.prototype.isIndexError=!0},function(t,e,n){var r;!function(){"use strict";var n={s:1,n:0,d:1};function i(t){function e(){var e=Error.apply(this,arguments);e.name=this.name=t,this.stack=e.stack,this.message=e.message}function n(){}return n.prototype=Error.prototype,e.prototype=new n,e}var o=f.DivisionByZero=i("DivisionByZero"),a=f.InvalidParameter=i("InvalidParameter");function s(t,e){return isNaN(t=parseInt(t,10))&&u(),t*e}function u(){throw new a}var l=function(t,e){var r,i=0,a=1,l=1,c=0,f=0,h=0,d=1,p=1,m=0,g=1,v=1,y=1;if(null!=t)if(void 0!==e)l=(i=t)*(a=e);else switch(typeof t){case"object":"d"in t&&"n"in t?(i=t.n,a=t.d,"s"in t&&(i*=t.s)):0 in t?(i=t[0],1 in t&&(a=t[1])):u(),l=i*a;break;case"number":if(t<0&&(t=-(l=t)),t%1==0)i=t;else if(0<t){for(1<=t&&(t/=p=Math.pow(10,Math.floor(1+Math.log(t)/Math.LN10)));g<=1e7&&y<=1e7;){if(t===(r=(m+v)/(g+y))){a=g+y<=1e7?(i=m+v,g+y):g<y?(i=v,y):(i=m,g);break}r<t?(m+=v,g+=y):(v+=m,y+=g),a=1e7<g?(i=v,y):(i=m,g)}i*=p}else(isNaN(t)||isNaN(e))&&(a=i=NaN);break;case"string":if(null===(g=t.match(/\d+|./g))&&u(),"-"===g[m]?(l=-1,m++):"+"===g[m]&&m++,g.length===m+1?f=s(g[m++],l):"."===g[m+1]||"."===g[m]?("."!==g[m]&&(c=s(g[m++],l)),(1+ ++m===g.length||"("===g[m+1]&&")"===g[m+3]||"'"===g[m+1]&&"'"===g[m+3])&&(f=s(g[m],l),d=Math.pow(10,g[m].length),m++),("("===g[m]&&")"===g[m+2]||"'"===g[m]&&"'"===g[m+2])&&(h=s(g[m+1],l),p=Math.pow(10,g[m+1].length)-1,m+=3)):"/"===g[m+1]||":"===g[m+1]?(f=s(g[m],l),d=s(g[m+2],1),m+=3):"/"===g[m+3]&&" "===g[m+1]&&(c=s(g[m],l),f=s(g[m+2],l),d=s(g[m+4],1),m+=5),g.length<=m){l=i=h+(a=d*p)*c+p*f;break}default:u()}if(0===a)throw new o;n.s=l<0?-1:1,n.n=Math.abs(i),n.d=Math.abs(a)};function c(t,e){if(!t)return e;if(!e)return t;for(;;){if(!(t%=e))return e;if(!(e%=t))return t}}function f(t,e){if(!(this instanceof f))return new f(t,e);l(t,e),t=f.REDUCE?c(n.d,n.n):1,this.s=n.s,this.n=n.n/t,this.d=n.d/t}f.REDUCE=1,f.prototype={s:1,n:0,d:1,abs:function(){return new f(this.n,this.d)},neg:function(){return new f(-this.s*this.n,this.d)},add:function(t,e){return l(t,e),new f(this.s*this.n*n.d+n.s*this.d*n.n,this.d*n.d)},sub:function(t,e){return l(t,e),new f(this.s*this.n*n.d-n.s*this.d*n.n,this.d*n.d)},mul:function(t,e){return l(t,e),new f(this.s*n.s*this.n*n.n,this.d*n.d)},div:function(t,e){return l(t,e),new f(this.s*n.s*this.n*n.d,this.d*n.n)},clone:function(){return new f(this)},mod:function(t,e){return isNaN(this.n)||isNaN(this.d)?new f(NaN):void 0===t?new f(this.s*this.n%this.d,1):(l(t,e),0===n.n&&0===this.d&&f(0,0),new f(this.s*(n.d*this.n)%(n.n*this.d),n.d*this.d))},gcd:function(t,e){return l(t,e),new f(c(n.n,this.n)*c(n.d,this.d),n.d*this.d)},lcm:function(t,e){return l(t,e),0===n.n&&0===this.n?new f:new f(n.n*this.n,c(n.n,this.n)*c(n.d,this.d))},ceil:function(t){return t=Math.pow(10,t||0),isNaN(this.n)||isNaN(this.d)?new f(NaN):new f(Math.ceil(t*this.s*this.n/this.d),t)},floor:function(t){return t=Math.pow(10,t||0),isNaN(this.n)||isNaN(this.d)?new f(NaN):new f(Math.floor(t*this.s*this.n/this.d),t)},round:function(t){return t=Math.pow(10,t||0),isNaN(this.n)||isNaN(this.d)?new f(NaN):new f(Math.round(t*this.s*this.n/this.d),t)},inverse:function(){return new f(this.s*this.d,this.n)},pow:function(t){return t<0?new f(Math.pow(this.s*this.d,-t),Math.pow(this.n,-t)):new f(Math.pow(this.s*this.n,t),Math.pow(this.d,t))},equals:function(t,e){return l(t,e),this.s*this.n*n.d==n.s*n.n*this.d},compare:function(t,e){l(t,e);var r=this.s*this.n*n.d-n.s*n.n*this.d;return(0<r)-(r<0)},simplify:function(t){if(isNaN(this.n)||isNaN(this.d))return this;var e=this.abs().toContinued();t=t||.001;for(var n=0;n<e.length;n++){var r=function t(e){return 1===e.length?new f(e[0]):t(e.slice(1)).inverse().add(e[0])}(e.slice(0,n+1));if(r.sub(this.abs()).abs().valueOf()<t)return r.mul(this.s)}return this},divisible:function(t,e){return l(t,e),!(!(n.n*this.d)||this.n*n.d%(n.n*this.d))},valueOf:function(){return this.s*this.n/this.d},toFraction:function(t){var e,n="",r=this.n,i=this.d;return this.s<0&&(n+="-"),1===i?n+=r:(t&&0<(e=Math.floor(r/i))&&(n+=e,n+=" ",r%=i),n+=r,n+="/",n+=i),n},toLatex:function(t){var e,n="",r=this.n,i=this.d;return this.s<0&&(n+="-"),1===i?n+=r:(t&&0<(e=Math.floor(r/i))&&(n+=e,r%=i),n+="\\frac{",n+=r,n+="}{",n+=i,n+="}"),n},toContinued:function(){var t,e=this.n,n=this.d,r=[];if(isNaN(this.n)||isNaN(this.d))return r;for(;r.push(Math.floor(e/n)),t=e%n,e=n,n=t,1!==e;);return r},toString:function(t){var e,n=this.n,r=this.d;if(isNaN(n)||isNaN(r))return"NaN";f.REDUCE||(n/=e=c(n,r),r/=e),t=t||15;var i=function(t){for(;t%2==0;t/=2);for(;t%5==0;t/=5);if(1===t)return 0;for(var e=10%t,n=1;1!==e;n++)if(e=10*e%t,2e3<n)return 0;return n}(r),o=function(t,e,n){for(var r=1,i=function(t,e,n){for(var r=1;0<e;t=t*t%n,e>>=1)1&e&&(r=r*t%n);return r}(10,n,e),o=0;o<300;o++){if(r===i)return o;r=10*r%e,i=10*i%e}return 0}(0,r,i),a=-1===this.s?"-":"";if(a+=n/r|0,n%=r,(n*=10)&&(a+="."),i){for(var s=o;s--;)a+=n/r|0,n%=r,n*=10;for(a+="(",s=i;s--;)a+=n/r|0,n%=r,n*=10;a+=")"}else for(s=t;n&&s--;)a+=n/r|0,n%=r,n*=10;return a}},void 0===(r=function(){return f}.apply(e,[]))||(t.exports=r)}()},function(t,e){t.exports=function t(e,n){"use strict";function r(e){return t.insensitive&&(""+e).toLowerCase()||""+e}var i,o,a=/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,s=/(^[ ]*|[ ]*$)/g,u=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,l=/^0x[0-9a-f]+$/i,c=/^0/,f=r(e).replace(s,"")||"",h=r(n).replace(s,"")||"",d=f.replace(a,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),p=h.replace(a,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),m=parseInt(f.match(l),16)||1!==d.length&&f.match(u)&&Date.parse(f),g=parseInt(h.match(l),16)||m&&h.match(u)&&Date.parse(h)||null;if(g){if(m<g)return-1;if(g<m)return 1}for(var v=0,y=Math.max(d.length,p.length);v<y;v++){if(i=!(d[v]||"").match(c)&&parseFloat(d[v])||d[v]||0,o=!(p[v]||"").match(c)&&parseFloat(p[v])||p[v]||0,isNaN(i)!==isNaN(o))return isNaN(i)?1:-1;if(typeof i!=typeof o&&(i+="",o+=""),i<o)return-1;if(o<i)return 1}return 0}},function(t,e,n){"use strict";function r(t,e,n,i){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");this.fn=t,this.count=e,this.min=n,this.max=i,this.message="Wrong number of arguments in function "+t+" ("+e+" provided, "+n+(null!=i?"-"+i:"")+" expected)",this.stack=(new Error).stack}n.d(e,"a",(function(){return r})),(r.prototype=new Error).constructor=Error,r.prototype.name="ArgumentsError",r.prototype.isArgumentsError=!0},function(t,e,n){"use strict";var r,i;void 0===(i="function"==typeof(r=function(){function t(){return!0}function e(){return!1}function n(){}return function r(){var i=[{name:"number",test:function(t){return"number"==typeof t}},{name:"string",test:function(t){return"string"==typeof t}},{name:"boolean",test:function(t){return"boolean"==typeof t}},{name:"Function",test:function(t){return"function"==typeof t}},{name:"Array",test:Array.isArray},{name:"Date",test:function(t){return t instanceof Date}},{name:"RegExp",test:function(t){return t instanceof RegExp}},{name:"Object",test:function(t){return"object"==typeof t&&null!==t&&t.constructor===Object}},{name:"null",test:function(t){return null===t}},{name:"undefined",test:function(t){return void 0===t}}],o={name:"any",test:t},a=[],s=[],u={types:i,conversions:s,ignore:a};function l(t){var e=W(u.types,(function(e){return e.name===t}));if(e)return e;if("any"===t)return o;var n=W(u.types,(function(e){return e.name.toLowerCase()===t.toLowerCase()}));throw new TypeError('Unknown type "'+t+'"'+(n?'. Did you mean "'+n.name+'"?':""))}function c(t){return t===o?999:u.types.indexOf(t)}function f(t){var e=W(u.types,(function(e){return e.test(t)}));if(e)return e.name;throw new TypeError("Value has unknown type. Value: "+t)}function h(t){return t.map((function(t){var e=t.types.map(w);return(t.restParam?"...":"")+e.join("|")})).join(",")}function d(t,e){var n=0===t.indexOf("..."),r=(n?t.length>3?t.slice(3):"any":t).split("|").map(R).filter(L).filter(I),i=function(t,e){var n={};return t.forEach((function(t){-1!==e.indexOf(t.from)||-1===e.indexOf(t.to)||n[t.from]||(n[t.from]=t)})),Object.keys(n).map((function(t){return n[t]}))}(e,r),o=r.map((function(t){var e=l(t);return{name:t,typeIndex:c(e),test:e.test,conversion:null,conversionIndex:-1}})),a=i.map((function(t){var n=l(t.from);return{name:t.from,typeIndex:c(n),test:n.test,conversion:t,conversionIndex:e.indexOf(t)}}));return{types:o.concat(a),restParam:n}}function p(t,e,n){var r=[];return""!==t.trim()&&(r=t.split(",").map(R).map((function(t,e,r){var i=d(t,n);if(i.restParam&&e!==r.length-1)throw new SyntaxError('Unexpected rest parameter "'+t+'": only allowed for the last parameter');return i}))),r.some(q)?null:{params:r,fn:e}}function m(t){var e=B(t);return!!e&&e.restParam}function g(t){return t.types.some((function(t){return null!=t.conversion}))}function v(e){if(e&&0!==e.types.length){if(1===e.types.length)return l(e.types[0].name).test;if(2===e.types.length){var n=l(e.types[0].name).test,r=l(e.types[1].name).test;return function(t){return n(t)||r(t)}}var i=e.types.map((function(t){return l(t.name).test}));return function(t){for(var e=0;e<i.length;e++)if(i[e](t))return!0;return!1}}return t}function y(t){var e,n,r;if(m(t)){var i=(e=function(t){return t.slice(0,t.length-1)}(t).map(v)).length,o=v(B(t));return function(t){for(var n=0;n<e.length;n++)if(!e[n](t[n]))return!1;return function(t){for(var e=i;e<t.length;e++)if(!o(t[e]))return!1;return!0}(t)&&t.length>=i+1}}return 0===t.length?function(t){return 0===t.length}:1===t.length?(n=v(t[0]),function(t){return n(t[0])&&1===t.length}):2===t.length?(n=v(t[0]),r=v(t[1]),function(t){return n(t[0])&&r(t[1])&&2===t.length}):(e=t.map(v),function(t){for(var n=0;n<e.length;n++)if(!e[n](t[n]))return!1;return t.length===e.length})}function b(t,e){return e<t.params.length?t.params[e]:m(t.params)?B(t.params):null}function x(t,e,n){var r=b(t,e);return(r?n?r.types.filter(_):r.types:[]).map(w)}function w(t){return t.name}function _(t){return null===t.conversion||void 0===t.conversion}function S(t,e){var n=function(t){for(var e={},n=0;n<t.length;n++)e[t[n]]=!0;return Object.keys(e)}(V(t,(function(t){return x(t,e,!1)})));return-1!==n.indexOf("any")?["any"]:n}function O(t,e,n){var r,i,o,a=t||"unnamed",s=n;for(o=0;o<e.length;o++){var u=s.filter((function(t){var n=v(b(t,o));return(o<t.params.length||m(t.params))&&n(e[o])}));if(0===u.length){if((i=S(s,o)).length>0){var l=f(e[o]);return(r=new TypeError("Unexpected type of argument in function "+a+" (expected: "+i.join(" or ")+", actual: "+l+", index: "+o+")")).data={category:"wrongType",fn:a,index:o,actual:l,expected:i},r}}else s=u}var c=s.map((function(t){return m(t.params)?1/0:t.params.length}));if(e.length<Math.min.apply(null,c))return i=S(s,o),(r=new TypeError("Too few arguments in function "+a+" (expected: "+i.join(" or ")+", index: "+e.length+")")).data={category:"tooFewArgs",fn:a,index:e.length,expected:i},r;var h=Math.max.apply(null,c);return e.length>h?((r=new TypeError("Too many arguments in function "+a+" (expected: "+h+", actual: "+e.length+")")).data={category:"tooManyArgs",fn:a,index:e.length,expectedLength:h},r):((r=new TypeError('Arguments of type "'+e.join(", ")+'" do not match any of the defined signatures of function '+a+".")).data={category:"mismatch",actual:e.map(f)},r)}function N(t){for(var e=999,n=0;n<t.types.length;n++)_(t.types[n])&&(e=Math.min(e,t.types[n].typeIndex));return e}function M(t){for(var e=999,n=0;n<t.types.length;n++)_(t.types[n])||(e=Math.min(e,t.types[n].conversionIndex));return e}function E(t,e){var n;return 0!=(n=t.restParam-e.restParam)||0!=(n=g(t)-g(e))||0!=(n=N(t)-N(e))?n:M(t)-M(e)}function k(t,e){var n,r,i=Math.min(t.params.length,e.params.length);if(0!=(r=t.params.some(g)-e.params.some(g)))return r;for(n=0;n<i;n++)if(0!=(r=g(t.params[n])-g(e.params[n])))return r;for(n=0;n<i;n++)if(0!==(r=E(t.params[n],e.params[n])))return r;return t.params.length-e.params.length}function C(t,e){var n=e;if(t.some(g)){var r=m(t),i=t.map(T);n=function(){for(var t=[],n=r?arguments.length-1:arguments.length,o=0;o<n;o++)t[o]=i[o](arguments[o]);return r&&(t[n]=arguments[n].map(i[n])),e.apply(this,t)}}var o=n;if(m(t)){var a=t.length-1;o=function(){return n.apply(this,z(arguments,0,a).concat([z(arguments,a)]))}}return o}function T(t){var e,n,r,i,o=[],a=[];switch(t.types.forEach((function(t){t.conversion&&(o.push(l(t.conversion.from).test),a.push(t.conversion.convert))})),a.length){case 0:return function(t){return t};case 1:return e=o[0],r=a[0],function(t){return e(t)?r(t):t};case 2:return e=o[0],n=o[1],r=a[0],i=a[1],function(t){return e(t)?r(t):n(t)?i(t):t};default:return function(t){for(var e=0;e<a.length;e++)if(o[e](t))return a[e](t);return t}}}function D(t){var e={};return t.forEach((function(t){t.params.some(g)||A(t.params,!0).forEach((function(n){e[h(n)]=t.fn}))})),e}function A(t,e){return function t(n,r,i){if(r<n.length){var o,a=n[r],s=e?a.types.filter(_):a.types;if(a.restParam){var u=s.filter(_);o=u.length<s.length?[u,s]:[s]}else o=s.map((function(t){return[t]}));return V(o,(function(e){return t(n,r+1,i.concat([e]))}))}var l=i.map((function(t,e){return{types:t,restParam:e===n.length-1&&m(n)}}));return[l]}(t,0,[])}function j(t,e){for(var n=Math.max(t.params.length,e.params.length),r=0;r<n;r++)if(!U(x(t,r,!0),x(e,r,!0)))return!1;var i=t.params.length,o=e.params.length,a=m(t.params),s=m(e.params);return a?s?i===o:o>=i:s?i>=o:i===o}function P(t,r){if(0===Object.keys(r).length)throw new SyntaxError("No signatures provided");var i=[];Object.keys(r).map((function(t){return p(t,r[t],u.conversions)})).filter(F).forEach((function(t){var e=W(i,(function(e){return j(e,t)}));if(e)throw new TypeError('Conflicting signatures "'+h(e.params)+'" and "'+h(t.params)+'".');i.push(t)}));var o=V(i,(function(t){return(t?A(t.params,!1):[]).map((function(e){return{params:e,fn:t.fn}}))})).filter(F);o.sort(k);var a=o[0]&&o[0].params.length<=2&&!m(o[0].params),s=o[1]&&o[1].params.length<=2&&!m(o[1].params),l=o[2]&&o[2].params.length<=2&&!m(o[2].params),c=o[3]&&o[3].params.length<=2&&!m(o[3].params),f=o[4]&&o[4].params.length<=2&&!m(o[4].params),d=o[5]&&o[5].params.length<=2&&!m(o[5].params),g=a&&s&&l&&c&&f&&d,b=o.map((function(t){return y(t.params)})),x=a?v(o[0].params[0]):e,w=s?v(o[1].params[0]):e,_=l?v(o[2].params[0]):e,S=c?v(o[3].params[0]):e,N=f?v(o[4].params[0]):e,M=d?v(o[5].params[0]):e,E=a?v(o[0].params[1]):e,T=s?v(o[1].params[1]):e,P=l?v(o[2].params[1]):e,I=c?v(o[3].params[1]):e,R=f?v(o[4].params[1]):e,L=d?v(o[5].params[1]):e,q=o.map((function(t){return C(t.params,t.fn)})),B=a?q[0]:n,z=s?q[1]:n,H=l?q[2]:n,U=c?q[3]:n,$=f?q[4]:n,Y=d?q[5]:n,Z=a?o[0].params.length:-1,G=s?o[1].params.length:-1,K=l?o[2].params.length:-1,X=c?o[3].params.length:-1,J=f?o[4].params.length:-1,Q=d?o[5].params.length:-1,tt=g?6:0,et=o.length,nt=function(){for(var e=tt;e<et;e++)if(b[e](arguments))return q[e].apply(this,arguments);throw O(t,arguments,o)},rt=function t(e,n){return arguments.length===Z&&x(e)&&E(n)?B.apply(t,arguments):arguments.length===G&&w(e)&&T(n)?z.apply(t,arguments):arguments.length===K&&_(e)&&P(n)?H.apply(t,arguments):arguments.length===X&&S(e)&&I(n)?U.apply(t,arguments):arguments.length===J&&N(e)&&R(n)?$.apply(t,arguments):arguments.length===Q&&M(e)&&L(n)?Y.apply(t,arguments):nt.apply(t,arguments)};try{Object.defineProperty(rt,"name",{value:t})}catch(a){}return rt.signatures=D(o),rt}function I(t){return-1===u.ignore.indexOf(t)}function R(t){return t.trim()}function L(t){return!!t}function F(t){return null!==t}function q(t){return 0===t.types.length}function B(t){return t[t.length-1]}function z(t,e,n){return Array.prototype.slice.call(t,e,n)}function H(t,e){return-1!==t.indexOf(e)}function U(t,e){for(var n=0;n<t.length;n++)if(H(e,t[n]))return!0;return!1}function W(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return t[n]}function V(t,e){return Array.prototype.concat.apply([],t.map(e))}function $(t){for(var e="",n=0;n<t.length;n++){var r=t[n];if(("object"==typeof r.signatures||"string"==typeof r.signature)&&""!==r.name)if(""===e)e=r.name;else if(e!==r.name){var i=new Error("Function names do not match (expected: "+e+", actual: "+r.name+")");throw i.data={actual:r.name,expected:e},i}}return e}function Y(t){var e,n={};function r(t,r){if(n.hasOwnProperty(t)&&r!==n[t])throw(e=new Error('Signature "'+t+'" is defined twice')).data={signature:t},e}for(var i=0;i<t.length;i++){var o=t[i];if("object"==typeof o.signatures)for(var a in o.signatures)o.signatures.hasOwnProperty(a)&&(r(a,o.signatures[a]),n[a]=o.signatures[a]);else{if("string"!=typeof o.signature)throw(e=new TypeError("Function is no typed-function (index: "+i+")")).data={index:i},e;r(o.signature,o),n[o.signature]=o}}return n}return u=P("typed",{"string, Object":P,Object:function(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(t[n]);return P($(e),t)},"...Function":function(t){return P($(t),Y(t))},"string, ...Function":function(t,e){return P(t,Y(e))}}),u.create=r,u.types=i,u.conversions=s,u.ignore=a,u.convert=function(t,e){var n=f(t);if(e===n)return t;for(var r=0;r<u.conversions.length;r++){var i=u.conversions[r];if(i.from===n&&i.to===e)return i.convert(t)}throw new Error("Cannot convert from "+n+" to "+e)},u.find=function(t,e){if(!t.signatures)throw new TypeError("Function is no typed-function");var n;if("string"==typeof e){n=e.split(",");for(var r=0;r<n.length;r++)n[r]=n[r].trim()}else{if(!Array.isArray(e))throw new TypeError("String array or a comma separated string expected");n=e}var i=n.join(","),o=t.signatures[i];if(o)return o;throw new TypeError("Signature not found (signature: "+(t.name||"unnamed")+"("+n.join(", ")+"))")},u.addType=function(t,e){if(!t||"string"!=typeof t.name||"function"!=typeof t.test)throw new TypeError("Object with properties {name: string, test: function} expected");if(!1!==e)for(var n=0;n<u.types.length;n++)if("Object"===u.types[n].name)return void u.types.splice(n,0,t);u.types.push(t)},u.addConversion=function(t){if(!t||"string"!=typeof t.from||"string"!=typeof t.to||"function"!=typeof t.convert)throw new TypeError("Object with properties {from: string, to: string, convert: function} expected");u.conversions.push(t)},u}()})?r.apply(e,[]):r)||(t.exports=i)},function(t,e,n){"use strict";(function(e){var n=256,r=[],i=void 0===e?window:e,o=Math.pow(n,6),a=Math.pow(2,52),s=2*a,u=Math.random;function l(t){var e,r=t.length,i=this,o=0,a=i.i=i.j=0,s=i.S=[];for(r||(t=[r++]);o<n;)s[o]=o++;for(o=0;o<n;o++)s[o]=s[a=255&a+t[o%r]+(e=s[o])],s[a]=e;(i.g=function(t){for(var e,r=0,o=i.i,a=i.j,s=i.S;t--;)e=s[o=255&o+1],r=r*n+s[255&(s[o]=s[a=255&a+e])+(s[a]=e)];return i.i=o,i.j=a,r})(n)}function c(t,e){for(var n,r=t+"",i=0;i<r.length;)e[255&i]=255&(n^=19*e[255&i])+r.charCodeAt(i++);return f(e)}function f(t){return String.fromCharCode.apply(0,t)}t.exports=function(e,u){if(u&&!0===u.global)return u.global=!1,Math.random=t.exports(e,u),u.global=!0,Math.random;var h=[],d=(c(function t(e,n){var r,i=[],o=(typeof e)[0];if(n&&"o"==o)for(r in e)try{i.push(t(e[r],n-1))}catch(t){}return i.length?i:"s"==o?e:e+"\0"}(u&&u.entropy?[e,f(r)]:0 in arguments?e:function(t){try{return i.crypto.getRandomValues(t=new Uint8Array(n)),f(t)}catch(t){return[+new Date,i,i.navigator&&i.navigator.plugins,i.screen,f(r)]}}(),3),h),new l(h));return c(f(d.S),r),function(){for(var t=d.g(6),e=o,r=0;t<a;)t=(t+r)*n,e*=n,r=d.g(1);for(;s<=t;)t/=2,e/=2,r>>>=1;return(t+r)/e}},t.exports.resetGlobal=function(){Math.random=u},c(Math.random(),r)}).call(this,n(19))},function(t,e,n){var r;!function(){"use strict";var i,o,a,s=9e15,u=1e9,l="0123456789abcdef",c="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",f="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",h={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-s,maxE:s,crypto:!1},d=!0,p="[DecimalError] ",m=p+"Invalid argument: ",g=p+"Precision limit exceeded",v=p+"crypto unavailable",y=Math.floor,b=Math.pow,x=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,w=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,_=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,S=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,O=1e7,N=7,M=c.length-1,E=f.length-1,k={name:"[object Decimal]"};function C(t){var e,n,r,i=t.length-1,o="",a=t[0];if(0<i){for(o+=a,e=1;e<i;e++)r=t[e]+"",(n=N-r.length)&&(o+=U(n)),o+=r;a=t[e],(n=N-(r=a+"").length)&&(o+=U(n))}else if(0===a)return"0";for(;a%10==0;)a/=10;return o+a}function T(t,e,n){if(t!==~~t||t<e||n<t)throw Error(m+t)}function D(t,e,n,r){for(var i,o,a=t[0];10<=a;a/=10)--e;return--e<0?(e+=N,i=0):(i=Math.ceil((e+1)/N),e%=N),a=b(10,N-e),o=t[i]%a|0,null==r?e<3?(0==e?o=o/100|0:1==e&&(o=o/10|0),n<4&&99999==o||3<n&&49999==o||5e4==o||0==o):(n<4&&o+1==a||3<n&&o+1==a/2)&&(t[i+1]/a/100|0)==b(10,e-2)-1||(o==a/2||0==o)&&0==(t[i+1]/a/100|0):e<4?(0==e?o=o/1e3|0:1==e?o=o/100|0:2==e&&(o=o/10|0),(r||n<4)&&9999==o||!r&&3<n&&4999==o):((r||n<4)&&o+1==a||!r&&3<n&&o+1==a/2)&&(t[i+1]/a/1e3|0)==b(10,e-3)-1}function A(t,e,n){for(var r,i,o=[0],a=0,s=t.length;a<s;){for(i=o.length;i--;)o[i]*=e;for(o[0]+=l.indexOf(t.charAt(a++)),r=0;r<o.length;r++)o[r]>n-1&&(void 0===o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}k.absoluteValue=k.abs=function(){var t=new this.constructor(this);return t.s<0&&(t.s=1),L(t)},k.ceil=function(){return L(new this.constructor(this),this.e+1,2)},k.comparedTo=k.cmp=function(t){var e,n,r,i,o=this,a=o.d,s=(t=new o.constructor(t)).d,u=o.s,l=t.s;if(!a||!s)return u&&l?u!==l?u:a===s?0:!a^u<0?1:-1:NaN;if(!a[0]||!s[0])return a[0]?u:s[0]?-l:0;if(u!==l)return u;if(o.e!==t.e)return o.e>t.e^u<0?1:-1;for(e=0,n=(r=a.length)<(i=s.length)?r:i;e<n;++e)if(a[e]!==s[e])return a[e]>s[e]^u<0?1:-1;return r===i?0:i<r^u<0?1:-1},k.cosine=k.cos=function(){var t,e,n=this,r=n.constructor;return n.d?n.d[0]?(t=r.precision,e=r.rounding,r.precision=t+Math.max(n.e,n.sd())+N,r.rounding=1,n=function(t,e){var n,r,i=e.d.length;r=i<32?(1/J(4,n=Math.ceil(i/3))).toString():(n=16,"2.3283064365386962890625e-10"),t.precision+=n,e=X(t,1,e.times(r),new t(1));for(var o=n;o--;){var a=e.times(e);e=a.times(a).minus(a).times(8).plus(1)}return t.precision-=n,e}(r,Q(r,n)),r.precision=t,r.rounding=e,L(2==a||3==a?n.neg():n,t,e,!0)):new r(1):new r(NaN)},k.cubeRoot=k.cbrt=function(){var t,e,n,r,i,o,a,s,u,l,c=this,f=c.constructor;if(!c.isFinite()||c.isZero())return new f(c);for(d=!1,(o=c.s*b(c.s*c,1/3))&&Math.abs(o)!=1/0?r=new f(o.toString()):(n=C(c.d),(o=((t=c.e)-n.length+1)%3)&&(n+=1==o||-2==o?"0":"00"),o=b(n,1/3),t=y((t+1)/3)-(t%3==(t<0?-1:2)),(r=new f(n=o==1/0?"5e"+t:(n=o.toExponential()).slice(0,n.indexOf("e")+1)+t)).s=c.s),a=(t=f.precision)+3;;)if(l=(u=(s=r).times(s).times(s)).plus(c),r=j(l.plus(c).times(s),l.plus(u),a+2,1),C(s.d).slice(0,a)===(n=C(r.d)).slice(0,a)){if("9999"!=(n=n.slice(a-3,a+1))&&(i||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(L(r,t+1,1),e=!r.times(r).times(r).eq(c));break}if(!i&&(L(s,t+1,0),s.times(s).times(s).eq(c))){r=s;break}a+=4,i=1}return d=!0,L(r,t,f.rounding,e)},k.decimalPlaces=k.dp=function(){var t,e=this.d,n=NaN;if(e){if(n=((t=e.length-1)-y(this.e/N))*N,t=e[t])for(;t%10==0;t/=10)n--;n<0&&(n=0)}return n},k.dividedBy=k.div=function(t){return j(this,new this.constructor(t))},k.dividedToIntegerBy=k.divToInt=function(t){var e=this.constructor;return L(j(this,new e(t),0,1,1),e.precision,e.rounding)},k.equals=k.eq=function(t){return 0===this.cmp(t)},k.floor=function(){return L(new this.constructor(this),this.e+1,3)},k.greaterThan=k.gt=function(t){return 0<this.cmp(t)},k.greaterThanOrEqualTo=k.gte=function(t){var e=this.cmp(t);return 1==e||0===e},k.hyperbolicCosine=k.cosh=function(){var t,e,n,r,i,o=this,a=o.constructor,s=new a(1);if(!o.isFinite())return new a(o.s?1/0:NaN);if(o.isZero())return s;n=a.precision,r=a.rounding,a.precision=n+Math.max(o.e,o.sd())+4,a.rounding=1,e=(i=o.d.length)<32?(1/J(4,t=Math.ceil(i/3))).toString():(t=16,"2.3283064365386962890625e-10"),o=X(a,1,o.times(e),new a(1),!0);for(var u,l=t,c=new a(8);l--;)u=o.times(o),o=s.minus(u.times(c.minus(u.times(c))));return L(o,a.precision=n,a.rounding=r,!0)},k.hyperbolicSine=k.sinh=function(){var t,e,n,r,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(e=o.precision,n=o.rounding,o.precision=e+Math.max(i.e,i.sd())+4,o.rounding=1,(r=i.d.length)<3)i=X(o,2,i,i,!0);else{t=16<(t=1.4*Math.sqrt(r))?16:0|t,i=X(o,2,i=i.times(1/J(5,t)),i,!0);for(var a,s=new o(5),u=new o(16),l=new o(20);t--;)a=i.times(i),i=i.times(s.plus(a.times(u.times(a).plus(l))))}return L(i,o.precision=e,o.rounding=n,!0)},k.hyperbolicTangent=k.tanh=function(){var t,e,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+7,r.rounding=1,j(n.sinh(),n.cosh(),r.precision=t,r.rounding=e)):new r(n.s)},k.inverseCosine=k.acos=function(){var t,e=this,n=e.constructor,r=e.abs().cmp(1),i=n.precision,o=n.rounding;return-1!==r?0===r?e.isNeg()?z(n,i,o):new n(0):new n(NaN):e.isZero()?z(n,i+4,o).times(.5):(n.precision=i+6,n.rounding=1,e=e.asin(),t=z(n,i+4,o).times(.5),n.precision=i,n.rounding=o,t.minus(e))},k.inverseHyperbolicCosine=k.acosh=function(){var t,e,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:NaN):n.isFinite()?(t=r.precision,e=r.rounding,r.precision=t+Math.max(Math.abs(n.e),n.sd())+4,r.rounding=1,d=!1,n=n.times(n).minus(1).sqrt().plus(n),d=!0,r.precision=t,r.rounding=e,n.ln()):new r(n)},k.inverseHyperbolicSine=k.asinh=function(){var t,e,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+2*Math.max(Math.abs(n.e),n.sd())+6,r.rounding=1,d=!1,n=n.times(n).plus(1).sqrt().plus(n),d=!0,r.precision=t,r.rounding=e,n.ln())},k.inverseHyperbolicTangent=k.atanh=function(){var t,e,n,r,i=this,o=i.constructor;return i.isFinite()?0<=i.e?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(t=o.precision,e=o.rounding,r=i.sd(),Math.max(r,t)<2*-i.e-1?L(new o(i),t,e,!0):(o.precision=n=r-i.e,i=j(i.plus(1),new o(1).minus(i),n+t,1),o.precision=t+4,o.rounding=1,i=i.ln(),o.precision=t,o.rounding=e,i.times(.5))):new o(NaN)},k.inverseSine=k.asin=function(){var t,e,n,r,i=this,o=i.constructor;return i.isZero()?new o(i):(e=i.abs().cmp(1),n=o.precision,r=o.rounding,-1!==e?0===e?((t=z(o,n+4,r).times(.5)).s=i.s,t):new o(NaN):(o.precision=n+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=n,o.rounding=r,i.times(2)))},k.inverseTangent=k.atan=function(){var t,e,n,r,i,o,a,s,u,l=this,c=l.constructor,f=c.precision,h=c.rounding;if(l.isFinite()){if(l.isZero())return new c(l);if(l.abs().eq(1)&&f+4<=E)return(a=z(c,f+4,h).times(.25)).s=l.s,a}else{if(!l.s)return new c(NaN);if(f+4<=E)return(a=z(c,f+4,h).times(.5)).s=l.s,a}for(c.precision=s=f+10,c.rounding=1,t=n=Math.min(28,s/N+2|0);t;--t)l=l.div(l.times(l).plus(1).sqrt().plus(1));for(d=!1,e=Math.ceil(s/N),r=1,u=l.times(l),a=new c(l),i=l;-1!==t;)if(i=i.times(u),o=a.minus(i.div(r+=2)),i=i.times(u),void 0!==(a=o.plus(i.div(r+=2))).d[e])for(t=e;a.d[t]===o.d[t]&&t--;);return n&&(a=a.times(2<<n-1)),d=!0,L(a,c.precision=f,c.rounding=h,!0)},k.isFinite=function(){return!!this.d},k.isInteger=k.isInt=function(){return!!this.d&&y(this.e/N)>this.d.length-2},k.isNaN=function(){return!this.s},k.isNegative=k.isNeg=function(){return this.s<0},k.isPositive=k.isPos=function(){return 0<this.s},k.isZero=function(){return!!this.d&&0===this.d[0]},k.lessThan=k.lt=function(t){return this.cmp(t)<0},k.lessThanOrEqualTo=k.lte=function(t){return this.cmp(t)<1},k.logarithm=k.log=function(t){var e,n,r,i,o,a,s,u,l=this,c=l.constructor,f=c.precision,h=c.rounding;if(null==t)t=new c(10),e=!0;else{if(n=(t=new c(t)).d,t.s<0||!n||!n[0]||t.eq(1))return new c(NaN);e=t.eq(10)}if(n=l.d,l.s<0||!n||!n[0]||l.eq(1))return new c(n&&!n[0]?-1/0:1!=l.s?NaN:n?0:1/0);if(e)if(1<n.length)o=!0;else{for(i=n[0];i%10==0;)i/=10;o=1!==i}if(d=!1,a=Z(l,s=f+5),r=e?B(c,s+10):Z(t,s),D((u=j(a,r,s,1)).d,i=f,h))do{if(a=Z(l,s+=10),r=e?B(c,s+10):Z(t,s),u=j(a,r,s,1),!o){+C(u.d).slice(i+1,i+15)+1==1e14&&(u=L(u,f+1,0));break}}while(D(u.d,i+=10,h));return d=!0,L(u,f,h)},k.minus=k.sub=function(t){var e,n,r,i,o,a,s,u,l,c,f,h,p=this,m=p.constructor;if(t=new m(t),!p.d||!t.d)return p.s&&t.s?p.d?t.s=-t.s:t=new m(t.d||p.s!==t.s?p:NaN):t=new m(NaN),t;if(p.s!=t.s)return t.s=-t.s,p.plus(t);if(l=p.d,h=t.d,s=m.precision,u=m.rounding,!l[0]||!h[0]){if(h[0])t.s=-t.s;else{if(!l[0])return new m(3===u?-0:0);t=new m(p)}return d?L(t,s,u):t}if(n=y(t.e/N),c=y(p.e/N),l=l.slice(),o=c-n){for(a=(f=o<0)?(e=l,o=-o,h.length):(e=h,n=c,l.length),(r=Math.max(Math.ceil(s/N),a)+2)<o&&(o=r,e.length=1),e.reverse(),r=o;r--;)e.push(0);e.reverse()}else{for((f=(r=l.length)<(a=h.length))&&(a=r),r=0;r<a;r++)if(l[r]!=h[r]){f=l[r]<h[r];break}o=0}for(f&&(e=l,l=h,h=e,t.s=-t.s),a=l.length,r=h.length-a;0<r;--r)l[a++]=0;for(r=h.length;o<r;){if(l[--r]<h[r]){for(i=r;i&&0===l[--i];)l[i]=O-1;--l[i],l[r]+=O}l[r]-=h[r]}for(;0===l[--a];)l.pop();for(;0===l[0];l.shift())--n;return l[0]?(t.d=l,t.e=q(l,n),d?L(t,s,u):t):new m(3===u?-0:0)},k.modulo=k.mod=function(t){var e,n=this,r=n.constructor;return t=new r(t),!n.d||!t.s||t.d&&!t.d[0]?new r(NaN):!t.d||n.d&&!n.d[0]?L(new r(n),r.precision,r.rounding):(d=!1,9==r.modulo?(e=j(n,t.abs(),0,3,1)).s*=t.s:e=j(n,t,0,r.modulo,1),e=e.times(t),d=!0,n.minus(e))},k.naturalExponential=k.exp=function(){return Y(this)},k.naturalLogarithm=k.ln=function(){return Z(this)},k.negated=k.neg=function(){var t=new this.constructor(this);return t.s=-t.s,L(t)},k.plus=k.add=function(t){var e,n,r,i,o,a,s,u,l,c,f=this,h=f.constructor;if(t=new h(t),!f.d||!t.d)return f.s&&t.s?f.d||(t=new h(t.d||f.s===t.s?f:NaN)):t=new h(NaN),t;if(f.s!=t.s)return t.s=-t.s,f.minus(t);if(l=f.d,c=t.d,s=h.precision,u=h.rounding,!l[0]||!c[0])return c[0]||(t=new h(f)),d?L(t,s,u):t;if(o=y(f.e/N),r=y(t.e/N),l=l.slice(),i=o-r){for((a=(a=i<0?(n=l,i=-i,c.length):(n=c,r=o,l.length))<(o=Math.ceil(s/N))?o+1:a+1)<i&&(i=a,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for((a=l.length)-(i=c.length)<0&&(i=a,n=c,c=l,l=n),e=0;i;)e=(l[--i]=l[i]+c[i]+e)/O|0,l[i]%=O;for(e&&(l.unshift(e),++r),a=l.length;0==l[--a];)l.pop();return t.d=l,t.e=q(l,r),d?L(t,s,u):t},k.precision=k.sd=function(t){var e;if(void 0!==t&&t!==!!t&&1!==t&&0!==t)throw Error(m+t);return this.d?(e=H(this.d),t&&this.e+1>e&&(e=this.e+1)):e=NaN,e},k.round=function(){var t=this.constructor;return L(new t(this),this.e+1,t.rounding)},k.sine=k.sin=function(){var t,e,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+Math.max(n.e,n.sd())+N,r.rounding=1,n=function(t,e){var n,r=e.d.length;if(r<3)return X(t,2,e,e);n=16<(n=1.4*Math.sqrt(r))?16:0|n,e=X(t,2,e=e.times(1/J(5,n)),e);for(var i,o=new t(5),a=new t(16),s=new t(20);n--;)i=e.times(e),e=e.times(o.plus(i.times(a.times(i).minus(s))));return e}(r,Q(r,n)),r.precision=t,r.rounding=e,L(2<a?n.neg():n,t,e,!0)):new r(NaN)},k.squareRoot=k.sqrt=function(){var t,e,n,r,i,o,a=this,s=a.d,u=a.e,l=a.s,c=a.constructor;if(1!==l||!s||!s[0])return new c(!l||l<0&&(!s||s[0])?NaN:s?a:1/0);for(d=!1,r=0==(l=Math.sqrt(+a))||l==1/0?(((e=C(s)).length+u)%2==0&&(e+="0"),l=Math.sqrt(e),u=y((u+1)/2)-(u<0||u%2),new c(e=l==1/0?"1e"+u:(e=l.toExponential()).slice(0,e.indexOf("e")+1)+u)):new c(l.toString()),n=(u=c.precision)+3;;)if(r=(o=r).plus(j(a,o,n+2,1)).times(.5),C(o.d).slice(0,n)===(e=C(r.d)).slice(0,n)){if("9999"!=(e=e.slice(n-3,n+1))&&(i||"4999"!=e)){+e&&(+e.slice(1)||"5"!=e.charAt(0))||(L(r,u+1,1),t=!r.times(r).eq(a));break}if(!i&&(L(o,u+1,0),o.times(o).eq(a))){r=o;break}n+=4,i=1}return d=!0,L(r,u,c.rounding,t)},k.tangent=k.tan=function(){var t,e,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+10,r.rounding=1,(n=n.sin()).s=1,n=j(n,new r(1).minus(n.times(n)).sqrt(),t+10,0),r.precision=t,r.rounding=e,L(2==a||4==a?n.neg():n,t,e,!0)):new r(NaN)},k.times=k.mul=function(t){var e,n,r,i,o,a,s,u,l,c=this.constructor,f=this.d,h=(t=new c(t)).d;if(t.s*=this.s,!(f&&f[0]&&h&&h[0]))return new c(!t.s||f&&!f[0]&&!h||h&&!h[0]&&!f?NaN:f&&h?0*t.s:t.s/0);for(n=y(this.e/N)+y(t.e/N),(u=f.length)<(l=h.length)&&(o=f,f=h,h=o,a=u,u=l,l=a),o=[],r=a=u+l;r--;)o.push(0);for(r=l;0<=--r;){for(e=0,i=u+r;r<i;)s=o[i]+h[r]*f[i-r-1]+e,o[i--]=s%O|0,e=s/O|0;o[i]=(o[i]+e)%O|0}for(;!o[--a];)o.pop();return e?++n:o.shift(),t.d=o,t.e=q(o,n),d?L(t,c.precision,c.rounding):t},k.toBinary=function(t,e){return tt(this,2,t,e)},k.toDecimalPlaces=k.toDP=function(t,e){var n=this.constructor,r=new n(this);return void 0===t?r:(T(t,0,u),void 0===e?e=n.rounding:T(e,0,8),L(r,t+r.e+1,e))},k.toExponential=function(t,e){var n=this,r=n.constructor,i=void 0===t?F(n,!0):(T(t,0,u),void 0===e?e=r.rounding:T(e,0,8),F(n=L(new r(n),t+1,e),!0,t+1));return n.isNeg()&&!n.isZero()?"-"+i:i},k.toFixed=function(t,e){var n,r=this,i=r.constructor,o=void 0===t?F(r):(T(t,0,u),void 0===e?e=i.rounding:T(e,0,8),F(n=L(new i(r),t+r.e+1,e),!1,t+n.e+1));return r.isNeg()&&!r.isZero()?"-"+o:o},k.toFraction=function(t){var e,n,r,i,o,a,s,u,l,c,f,h,p=this,g=p.d,v=p.constructor;if(!g)return new v(p);if(l=n=new v(1),r=u=new v(0),a=(o=(e=new v(r)).e=H(g)-p.e-1)%N,e.d[0]=b(10,a<0?N+a:a),null==t)t=0<o?e:l;else{if(!(s=new v(t)).isInt()||s.lt(l))throw Error(m+s);t=s.gt(e)?0<o?e:l:s}for(d=!1,s=new v(C(g)),c=v.precision,v.precision=o=g.length*N*2;f=j(s,e,0,1,1),1!=(i=n.plus(f.times(r))).cmp(t);)n=r,r=i,i=l,l=u.plus(f.times(i)),u=i,i=e,e=s.minus(f.times(i)),s=i;return i=j(t.minus(n),r,0,1,1),u=u.plus(i.times(l)),n=n.plus(i.times(r)),u.s=l.s=p.s,h=j(l,r,o,1).minus(p).abs().cmp(j(u,n,o,1).minus(p).abs())<1?[l,r]:[u,n],v.precision=c,d=!0,h},k.toHexadecimal=k.toHex=function(t,e){return tt(this,16,t,e)},k.toNearest=function(t,e){var n=(r=this).constructor,r=new n(r);if(null==t){if(!r.d)return r;t=new n(1),e=n.rounding}else{if(t=new n(t),void 0===e?e=n.rounding:T(e,0,8),!r.d)return t.s?r:t;if(!t.d)return t.s&&(t.s=r.s),t}return t.d[0]?(d=!1,r=j(r,t,0,e,1).times(t),d=!0,L(r)):(t.s=r.s,r=t),r},k.toNumber=function(){return+this},k.toOctal=function(t,e){return tt(this,8,t,e)},k.toPower=k.pow=function(t){var e,n,r,i,o,a,s=this,u=s.constructor,l=+(t=new u(t));if(!(s.d&&t.d&&s.d[0]&&t.d[0]))return new u(b(+s,l));if((s=new u(s)).eq(1))return s;if(r=u.precision,o=u.rounding,t.eq(1))return L(s,r,o);if((e=y(t.e/N))>=t.d.length-1&&(n=l<0?-l:l)<=9007199254740991)return i=W(u,s,n,r),t.s<0?new u(1).div(i):L(i,r,o);if((a=s.s)<0){if(e<t.d.length-1)return new u(NaN);if(0==(1&t.d[e])&&(a=1),0==s.e&&1==s.d[0]&&1==s.d.length)return s.s=a,s}return(e=0!=(n=b(+s,l))&&isFinite(n)?new u(n+"").e:y(l*(Math.log("0."+C(s.d))/Math.LN10+s.e+1)))>u.maxE+1||e<u.minE-1?new u(0<e?a/0:0):(d=!1,u.rounding=s.s=1,n=Math.min(12,(e+"").length),(i=Y(t.times(Z(s,r+n)),r)).d&&D((i=L(i,r+5,1)).d,r,o)&&(e=r+10,+C((i=L(Y(t.times(Z(s,e+n)),e),e+5,1)).d).slice(r+1,r+15)+1==1e14&&(i=L(i,r+1,0))),i.s=a,d=!0,L(i,r,u.rounding=o))},k.toPrecision=function(t,e){var n=this,r=n.constructor,i=void 0===t?F(n,n.e<=r.toExpNeg||n.e>=r.toExpPos):(T(t,1,u),void 0===e?e=r.rounding:T(e,0,8),F(n=L(new r(n),t,e),t<=n.e||n.e<=r.toExpNeg,t));return n.isNeg()&&!n.isZero()?"-"+i:i},k.toSignificantDigits=k.toSD=function(t,e){var n=this.constructor;return void 0===t?(t=n.precision,e=n.rounding):(T(t,1,u),void 0===e?e=n.rounding:T(e,0,8)),L(new n(this),t,e)},k.toString=function(){var t=this,e=t.constructor,n=F(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()&&!t.isZero()?"-"+n:n},k.truncated=k.trunc=function(){return L(new this.constructor(this),this.e+1,1)},k.valueOf=k.toJSON=function(){var t=this,e=t.constructor,n=F(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()?"-"+n:n};var j=function(t,e,n,r,i,a){var s,u,l,c,f,h,d,p,m,g,v,b,x,w,_,S,M,E,k,C,T=t.constructor,D=t.s==e.s?1:-1,A=t.d,j=e.d;if(!(A&&A[0]&&j&&j[0]))return new T(t.s&&e.s&&(A?!j||A[0]!=j[0]:j)?A&&0==A[0]||!j?0*D:D/0:NaN);for(u=a?(f=1,t.e-e.e):(a=O,f=N,y(t.e/f)-y(e.e/f)),k=j.length,M=A.length,g=(m=new T(D)).d=[],l=0;j[l]==(A[l]||0);l++);if(j[l]>(A[l]||0)&&u--,null==n?(w=n=T.precision,r=T.rounding):w=i?n+(t.e-e.e)+1:n,w<0)g.push(1),h=!0;else{if(w=w/f+2|0,l=0,1==k){for(j=j[c=0],w++;(l<M||c)&&w--;l++)_=c*a+(A[l]||0),g[l]=_/j|0,c=_%j|0;h=c||l<M}else{for(1<(c=a/(j[0]+1)|0)&&(j=P(j,c,a),A=P(A,c,a),k=j.length,M=A.length),S=k,b=(v=A.slice(0,k)).length;b<k;)v[b++]=0;for((C=j.slice()).unshift(0),E=j[0],j[1]>=a/2&&++E;c=0,(s=I(j,v,k,b))<0?(x=v[0],k!=b&&(x=x*a+(v[1]||0)),1<(c=x/E|0)?(a<=c&&(c=a-1),1==(s=I(d=P(j,c,a),v,p=d.length,b=v.length))&&(c--,R(d,k<p?C:j,p,a))):(0==c&&(s=c=1),d=j.slice()),(p=d.length)<b&&d.unshift(0),R(v,d,b,a),-1==s&&(s=I(j,v,k,b=v.length))<1&&(c++,R(v,k<b?C:j,b,a)),b=v.length):0===s&&(c++,v=[0]),g[l++]=c,s&&v[0]?v[b++]=A[S]||0:(v=[A[S]],b=1),(S++<M||void 0!==v[0])&&w--;);h=void 0!==v[0]}g[0]||g.shift()}if(1==f)m.e=u,o=h;else{for(l=1,c=g[0];10<=c;c/=10)l++;m.e=l+u*f-1,L(m,i?n+m.e+1:n,r,h)}return m};function P(t,e,n){var r,i=0,o=t.length;for(t=t.slice();o--;)r=t[o]*e+i,t[o]=r%n|0,i=r/n|0;return i&&t.unshift(i),t}function I(t,e,n,r){var i,o;if(n!=r)o=r<n?1:-1;else for(i=o=0;i<n;i++)if(t[i]!=e[i]){o=t[i]>e[i]?1:-1;break}return o}function R(t,e,n,r){for(var i=0;n--;)t[n]-=i,i=t[n]<e[n]?1:0,t[n]=i*r+t[n]-e[n];for(;!t[0]&&1<t.length;)t.shift()}function L(t,e,n,r){var i,o,a,s,u,l,c,f,h,p=t.constructor;t:if(null!=e){if(!(f=t.d))return t;for(i=1,s=f[0];10<=s;s/=10)i++;if((o=e-i)<0)o+=N,a=e,u=(c=f[h=0])/b(10,i-a-1)%10|0;else if(h=Math.ceil((o+1)/N),(s=f.length)<=h){if(!r)break t;for(;s++<=h;)f.push(0);c=u=0,a=(o%=N)-N+(i=1)}else{for(c=s=f[h],i=1;10<=s;s/=10)i++;u=(a=(o%=N)-N+i)<0?0:c/b(10,i-a-1)%10|0}if(r=r||e<0||void 0!==f[h+1]||(a<0?c:c%b(10,i-a-1)),l=n<4?(u||r)&&(0==n||n==(t.s<0?3:2)):5<u||5==u&&(4==n||r||6==n&&(0<o?0<a?c/b(10,i-a):0:f[h-1])%10&1||n==(t.s<0?8:7)),e<1||!f[0])return f.length=0,l?(e-=t.e+1,f[0]=b(10,(N-e%N)%N),t.e=-e||0):f[0]=t.e=0,t;if(0==o?(f.length=h,s=1,h--):(f.length=h+1,s=b(10,N-o),f[h]=0<a?(c/b(10,i-a)%b(10,a)|0)*s:0),l)for(;;){if(0==h){for(o=1,a=f[0];10<=a;a/=10)o++;for(a=f[0]+=s,s=1;10<=a;a/=10)s++;o!=s&&(t.e++,f[0]==O&&(f[0]=1));break}if(f[h]+=s,f[h]!=O)break;f[h--]=0,s=1}for(o=f.length;0===f[--o];)f.pop()}return d&&(t.e>p.maxE?(t.d=null,t.e=NaN):t.e<p.minE&&(t.e=0,t.d=[0])),t}function F(t,e,n){if(!t.isFinite())return G(t);var r,i=t.e,o=C(t.d),a=o.length;return e?(n&&0<(r=n-a)?o=o.charAt(0)+"."+o.slice(1)+U(r):1<a&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(t.e<0?"e":"e+")+t.e):i<0?(o="0."+U(-i-1)+o,n&&0<(r=n-a)&&(o+=U(r))):a<=i?(o+=U(i+1-a),n&&0<(r=n-i-1)&&(o=o+"."+U(r))):((r=i+1)<a&&(o=o.slice(0,r)+"."+o.slice(r)),n&&0<(r=n-a)&&(i+1===a&&(o+="."),o+=U(r))),o}function q(t,e){var n=t[0];for(e*=N;10<=n;n/=10)e++;return e}function B(t,e,n){if(M<e)throw d=!0,n&&(t.precision=n),Error(g);return L(new t(c),e,1,!0)}function z(t,e,n){if(E<e)throw Error(g);return L(new t(f),e,n,!0)}function H(t){var e=t.length-1,n=e*N+1;if(e=t[e]){for(;e%10==0;e/=10)n--;for(e=t[0];10<=e;e/=10)n++}return n}function U(t){for(var e="";t--;)e+="0";return e}function W(t,e,n,r){var i,o=new t(1),a=Math.ceil(r/N+4);for(d=!1;;){if(n%2&&et((o=o.times(e)).d,a)&&(i=!0),0===(n=y(n/2))){n=o.d.length-1,i&&0===o.d[n]&&++o.d[n];break}et((e=e.times(e)).d,a)}return d=!0,o}function V(t){return 1&t.d[t.d.length-1]}function $(t,e,n){for(var r,i=new t(e[0]),o=0;++o<e.length;){if(!(r=new t(e[o])).s){i=r;break}i[n](r)&&(i=r)}return i}function Y(t,e){var n,r,i,o,a,s,u,l=0,c=0,f=0,h=t.constructor,p=h.rounding,m=h.precision;if(!t.d||!t.d[0]||17<t.e)return new h(t.d?t.d[0]?t.s<0?0:1/0:1:t.s?t.s<0?0:t:NaN);for(u=null==e?(d=!1,m):e,s=new h(.03125);-2<t.e;)t=t.times(s),f+=5;for(u+=r=Math.log(b(2,f))/Math.LN10*2+5|0,n=o=a=new h(1),h.precision=u;;){if(o=L(o.times(t),u,1),n=n.times(++c),C((s=a.plus(j(o,n,u,1))).d).slice(0,u)===C(a.d).slice(0,u)){for(i=f;i--;)a=L(a.times(a),u,1);if(null!=e)return h.precision=m,a;if(!(l<3&&D(a.d,u-r,p,l)))return L(a,h.precision=m,p,d=!0);h.precision=u+=10,n=o=s=new h(1),c=0,l++}a=s}}function Z(t,e){var n,r,i,o,a,s,u,l,c,f,h,p=1,m=t,g=m.d,v=m.constructor,y=v.rounding,b=v.precision;if(m.s<0||!g||!g[0]||!m.e&&1==g[0]&&1==g.length)return new v(g&&!g[0]?-1/0:1!=m.s?NaN:g?0:m);if(c=null==e?(d=!1,b):e,v.precision=c+=10,r=(n=C(g)).charAt(0),!(Math.abs(o=m.e)<15e14))return l=B(v,c+2,b).times(o+""),m=Z(new v(r+"."+n.slice(1)),c-10).plus(l),v.precision=b,null==e?L(m,b,y,d=!0):m;for(;r<7&&1!=r||1==r&&3<n.charAt(1);)r=(n=C((m=m.times(t)).d)).charAt(0),p++;for(o=m.e,1<r?(m=new v("0."+n),o++):m=new v(r+"."+n.slice(1)),u=a=m=j((f=m).minus(1),m.plus(1),c,1),h=L(m.times(m),c,1),i=3;;){if(a=L(a.times(h),c,1),C((l=u.plus(j(a,new v(i),c,1))).d).slice(0,c)===C(u.d).slice(0,c)){if(u=u.times(2),0!==o&&(u=u.plus(B(v,c+2,b).times(o+""))),u=j(u,new v(p),c,1),null!=e)return v.precision=b,u;if(!D(u.d,c-10,y,s))return L(u,v.precision=b,y,d=!0);v.precision=c+=10,l=a=m=j(f.minus(1),f.plus(1),c,1),h=L(m.times(m),c,1),i=s=1}u=l,i+=2}}function G(t){return String(t.s*t.s/0)}function K(t,e){var n,r,i;for(-1<(n=e.indexOf("."))&&(e=e.replace(".","")),0<(r=e.search(/e/i))?(n<0&&(n=r),n+=+e.slice(r+1),e=e.substring(0,r)):n<0&&(n=e.length),r=0;48===e.charCodeAt(r);r++);for(i=e.length;48===e.charCodeAt(i-1);--i);if(e=e.slice(r,i)){if(i-=r,t.e=n=n-r-1,t.d=[],r=(n+1)%N,n<0&&(r+=N),r<i){for(r&&t.d.push(+e.slice(0,r)),i-=N;r<i;)t.d.push(+e.slice(r,r+=N));e=e.slice(r),r=N-e.length}else r-=i;for(;r--;)e+="0";t.d.push(+e),d&&(t.e>t.constructor.maxE?(t.d=null,t.e=NaN):t.e<t.constructor.minE&&(t.e=0,t.d=[0]))}else t.e=0,t.d=[0];return t}function X(t,e,n,r,i){var o,a,s,u,l=t.precision,c=Math.ceil(l/N);for(d=!1,u=n.times(n),s=new t(r);;){if(a=j(s.times(u),new t(e++*e++),l,1),s=i?r.plus(a):r.minus(a),r=j(a.times(u),new t(e++*e++),l,1),void 0!==(a=s.plus(r)).d[c]){for(o=c;a.d[o]===s.d[o]&&o--;);if(-1==o)break}o=s,s=r,r=a,a=o}return d=!0,a.d.length=c+1,a}function J(t,e){for(var n=t;--e;)n*=t;return n}function Q(t,e){var n,r=e.s<0,i=z(t,t.precision,1),o=i.times(.5);if((e=e.abs()).lte(o))return a=r?4:1,e;if((n=e.divToInt(i)).isZero())a=r?3:2;else{if((e=e.minus(n.times(i))).lte(o))return a=V(n)?r?2:3:r?4:1,e;a=V(n)?r?1:4:r?3:2}return e.minus(i).abs()}function tt(t,e,n,r){var i,a,s,c,f,h,d,p,m,g=t.constructor,v=void 0!==n;if(v?(T(n,1,u),void 0===r?r=g.rounding:T(r,0,8)):(n=g.precision,r=g.rounding),t.isFinite()){for(v?(i=2,16==e?n=4*n-3:8==e&&(n=3*n-2)):i=e,0<=(s=(d=F(t)).indexOf("."))&&(d=d.replace(".",""),(m=new g(1)).e=d.length-s,m.d=A(F(m),10,i),m.e=m.d.length),a=f=(p=A(d,10,i)).length;0==p[--f];)p.pop();if(p[0]){if(s<0?a--:((t=new g(t)).d=p,t.e=a,p=(t=j(t,m,n,r,0,i)).d,a=t.e,h=o),s=p[n],c=i/2,h=h||void 0!==p[n+1],h=r<4?(void 0!==s||h)&&(0===r||r===(t.s<0?3:2)):c<s||s===c&&(4===r||h||6===r&&1&p[n-1]||r===(t.s<0?8:7)),p.length=n,h)for(;++p[--n]>i-1;)p[n]=0,n||(++a,p.unshift(1));for(f=p.length;!p[f-1];--f);for(s=0,d="";s<f;s++)d+=l.charAt(p[s]);if(v){if(1<f)if(16==e||8==e){for(s=16==e?4:3,--f;f%s;f++)d+="0";for(f=(p=A(d,i,e)).length;!p[f-1];--f);for(s=1,d="1.";s<f;s++)d+=l.charAt(p[s])}else d=d.charAt(0)+"."+d.slice(1);d=d+(a<0?"p":"p+")+a}else if(a<0){for(;++a;)d="0"+d;d="0."+d}else if(++a>f)for(a-=f;a--;)d+="0";else a<f&&(d=d.slice(0,a)+"."+d.slice(a))}else d=v?"0p+0":"0";d=(16==e?"0x":2==e?"0b":8==e?"0o":"")+d}else d=G(t);return t.s<0?"-"+d:d}function et(t,e){return t.length>e&&(t.length=e,1)}function nt(t){return new this(t).abs()}function rt(t){return new this(t).acos()}function it(t){return new this(t).acosh()}function ot(t,e){return new this(t).plus(e)}function at(t){return new this(t).asin()}function st(t){return new this(t).asinh()}function ut(t){return new this(t).atan()}function lt(t){return new this(t).atanh()}function ct(t,e){t=new this(t),e=new this(e);var n,r=this.precision,i=this.rounding,o=r+4;return t.s&&e.s?t.d||e.d?!e.d||t.isZero()?(n=e.s<0?z(this,r,i):new this(0)).s=t.s:!t.d||e.isZero()?(n=z(this,o,1).times(.5)).s=t.s:n=e.s<0?(this.precision=o,this.rounding=1,n=this.atan(j(t,e,o,1)),e=z(this,o,1),this.precision=r,this.rounding=i,t.s<0?n.minus(e):n.plus(e)):this.atan(j(t,e,o,1)):(n=z(this,o,1).times(0<e.s?.25:.75)).s=t.s:n=new this(NaN),n}function ft(t){return new this(t).cbrt()}function ht(t){return L(t=new this(t),t.e+1,2)}function dt(t){if(!t||"object"!=typeof t)throw Error(p+"Object expected");for(var e,n,r=!0===t.defaults,i=["precision",1,u,"rounding",0,8,"toExpNeg",-s,0,"toExpPos",0,s,"maxE",0,s,"minE",-s,0,"modulo",0,9],o=0;o<i.length;o+=3)if(e=i[o],r&&(this[e]=h[e]),void 0!==(n=t[e])){if(!(y(n)===n&&i[o+1]<=n&&n<=i[o+2]))throw Error(m+e+": "+n);this[e]=n}if(e="crypto",r&&(this[e]=h[e]),void 0!==(n=t[e])){if(!0!==n&&!1!==n&&0!==n&&1!==n)throw Error(m+e+": "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(v);this[e]=!0}else this[e]=!1}return this}function pt(t){return new this(t).cos()}function mt(t){return new this(t).cosh()}function gt(t,e){return new this(t).div(e)}function vt(t){return new this(t).exp()}function yt(t){return L(t=new this(t),t.e+1,3)}function bt(){var t,e,n=new this(0);for(d=!1,t=0;t<arguments.length;)if((e=new this(arguments[t++])).d)n.d&&(n=n.plus(e.times(e)));else{if(e.s)return d=!0,new this(1/0);n=e}return d=!0,n.sqrt()}function xt(t){return t instanceof i||t&&"[object Decimal]"===t.name||!1}function wt(t){return new this(t).ln()}function _t(t,e){return new this(t).log(e)}function St(t){return new this(t).log(2)}function Ot(t){return new this(t).log(10)}function Nt(){return $(this,arguments,"lt")}function Mt(){return $(this,arguments,"gt")}function Et(t,e){return new this(t).mod(e)}function kt(t,e){return new this(t).mul(e)}function Ct(t,e){return new this(t).pow(e)}function Tt(t){var e,n,r,i,o=0,a=new this(1),s=[];if(void 0===t?t=this.precision:T(t,1,u),r=Math.ceil(t/N),this.crypto)if(crypto.getRandomValues)for(e=crypto.getRandomValues(new Uint32Array(r));o<r;)429e7<=(i=e[o])?e[o]=crypto.getRandomValues(new Uint32Array(1))[0]:s[o++]=i%1e7;else{if(!crypto.randomBytes)throw Error(v);for(e=crypto.randomBytes(r*=4);o<r;)214e7<=(i=e[o]+(e[o+1]<<8)+(e[o+2]<<16)+((127&e[o+3])<<24))?crypto.randomBytes(4).copy(e,o):(s.push(i%1e7),o+=4);o=r/4}else for(;o<r;)s[o++]=1e7*Math.random()|0;for(r=s[--o],t%=N,r&&t&&(i=b(10,N-t),s[o]=(r/i|0)*i);0===s[o];o--)s.pop();if(o<0)s=[n=0];else{for(n=-1;0===s[0];n-=N)s.shift();for(r=1,i=s[0];10<=i;i/=10)r++;r<N&&(n-=N-r)}return a.e=n,a.d=s,a}function Dt(t){return L(t=new this(t),t.e+1,this.rounding)}function At(t){return(t=new this(t)).d?t.d[0]?t.s:0*t.s:t.s||NaN}function jt(t){return new this(t).sin()}function Pt(t){return new this(t).sinh()}function It(t){return new this(t).sqrt()}function Rt(t,e){return new this(t).sub(e)}function Lt(t){return new this(t).tan()}function Ft(t){return new this(t).tanh()}function qt(t){return L(t=new this(t),t.e+1,1)}(i=function t(e){var n,r,o;function a(t){var e,n,r,o=this;if(!(o instanceof a))return new a(t);if(t instanceof(o.constructor=a))return o.s=t.s,void(d?!t.d||t.e>a.maxE?(o.e=NaN,o.d=null):t.e<a.minE?(o.e=0,o.d=[0]):(o.e=t.e,o.d=t.d.slice()):(o.e=t.e,o.d=t.d?t.d.slice():t.d));if("number"==(r=typeof t)){if(0===t)return o.s=1/t<0?-1:1,o.e=0,void(o.d=[0]);if(t<0?(t=-t,o.s=-1):o.s=1,t===~~t&&t<1e7){for(e=0,n=t;10<=n;n/=10)e++;return void(d?a.maxE<e?(o.e=NaN,o.d=null):e<a.minE?(o.e=0,o.d=[0]):(o.e=e,o.d=[t]):(o.e=e,o.d=[t]))}return 0*t!=0?(t||(o.s=NaN),o.e=NaN,void(o.d=null)):K(o,t.toString())}if("string"!=r)throw Error(m+t);return 45===(n=t.charCodeAt(0))?(t=t.slice(1),o.s=-1):(43===n&&(t=t.slice(1)),o.s=1),(S.test(t)?K:function(t,e){var n,r,o,a,s,u,l,c,f;if("Infinity"===e||"NaN"===e)return+e||(t.s=NaN),t.e=NaN,t.d=null,t;if(w.test(e))n=16,e=e.toLowerCase();else if(x.test(e))n=2;else{if(!_.test(e))throw Error(m+e);n=8}for(s=0<=(a=(e=0<(a=e.search(/p/i))?(l=+e.slice(a+1),e.substring(2,a)):e.slice(2)).indexOf(".")),r=t.constructor,s&&(a=(u=(e=e.replace(".","")).length)-a,o=W(r,new r(n),a,2*a)),a=f=(c=A(e,n,O)).length-1;0===c[a];--a)c.pop();return a<0?new r(0*t.s):(t.e=q(c,f),t.d=c,d=!1,s&&(t=j(t,o,4*u)),l&&(t=t.times(Math.abs(l)<54?b(2,l):i.pow(2,l))),d=!0,t)})(o,t)}if(a.prototype=k,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.EUCLID=9,a.config=a.set=dt,a.clone=t,a.isDecimal=xt,a.abs=nt,a.acos=rt,a.acosh=it,a.add=ot,a.asin=at,a.asinh=st,a.atan=ut,a.atanh=lt,a.atan2=ct,a.cbrt=ft,a.ceil=ht,a.cos=pt,a.cosh=mt,a.div=gt,a.exp=vt,a.floor=yt,a.hypot=bt,a.ln=wt,a.log=_t,a.log10=Ot,a.log2=St,a.max=Nt,a.min=Mt,a.mod=Et,a.mul=kt,a.pow=Ct,a.random=Tt,a.round=Dt,a.sign=At,a.sin=jt,a.sinh=Pt,a.sqrt=It,a.sub=Rt,a.tan=Lt,a.tanh=Ft,a.trunc=qt,void 0===e&&(e={}),e&&!0!==e.defaults)for(o=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],n=0;n<o.length;)e.hasOwnProperty(r=o[n++])||(e[r]=this[r]);return a.config(e),a}(h)).default=i.Decimal=i,c=new i(c),f=new i(f),void 0===(r=function(){return i}.call(e,n,e,t))||(t.exports=r)}()},function(t,e,n){"use strict";function r(t,e){return i({},t,e)}var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},o={"{":"\\{","}":"\\}","\\":"\\textbackslash{}","#":"\\#",$:"\\$","%":"\\%","&":"\\&","^":"\\textasciicircum{}",_:"\\_","~":"\\textasciitilde{}"},a={"–":"\\--","—":"\\---"," ":"~","\t":"\\qquad{}","\r\n":"\\newline{}","\n":"\\newline{}"};t.exports=function(t){for(var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=e.preserveFormatting,s=void 0!==n&&n,u=e.escapeMapFn,l=void 0===u?r:u,c=String(t),f="",h=l(i({},o),s?i({},a):{}),d=Object.keys(h);c;)!function(){var t=!1;d.forEach((function(e,n){t||c.length>=e.length&&c.slice(0,e.length)===e&&(f+=h[d[n]],c=c.slice(e.length,c.length),t=!0)})),t||(f+=c.slice(0,1),c=c.slice(1,c.length))}();return f}},function(t,e){function n(){}n.prototype={on:function(t,e,n){var r=this.e||(this.e={});return(r[t]||(r[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var r=this;function i(){r.off(t,i),e.apply(n,arguments)}return i._=e,this.on(t,i,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),r=0,i=n.length;r<i;r++)n[r].fn.apply(n[r].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),r=n[t],i=[];if(r&&e)for(var o=0,a=r.length;o<a;o++)r[o].fn!==e&&r[o].fn._!==e&&i.push(r[o]);return i.length?n[t]=i:delete n[t],this}},t.exports=n,t.exports.TinyEmitter=n},function(t,e,n){var r=n(20),i=(0,n(21).create)(r);t.exports=i},function(t,e){var n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";n.r(e),n.d(e,"createTyped",(function(){return l})),n.d(e,"createResultSet",(function(){return d})),n.d(e,"createBigNumberClass",(function(){return g})),n.d(e,"createComplexClass",(function(){return x})),n.d(e,"createFractionClass",(function(){return S})),n.d(e,"createRangeClass",(function(){return O})),n.d(e,"createMatrixClass",(function(){return N})),n.d(e,"createDenseMatrixClass",(function(){return T})),n.d(e,"createClone",(function(){return D})),n.d(e,"createIsInteger",(function(){return B})),n.d(e,"createIsNegative",(function(){return $})),n.d(e,"createIsNumeric",(function(){return Z})),n.d(e,"createHasNumericValue",(function(){return K})),n.d(e,"createIsPositive",(function(){return J})),n.d(e,"createIsZero",(function(){return Q})),n.d(e,"createIsNaN",(function(){return tt})),n.d(e,"createTypeOf",(function(){return et})),n.d(e,"createEqualScalar",(function(){return it})),n.d(e,"createSparseMatrixClass",(function(){return at})),n.d(e,"createNumber",(function(){return st})),n.d(e,"createString",(function(){return ut})),n.d(e,"createBoolean",(function(){return ct})),n.d(e,"createBignumber",(function(){return ft})),n.d(e,"createComplex",(function(){return ht})),n.d(e,"createFraction",(function(){return dt})),n.d(e,"createMatrix",(function(){return pt})),n.d(e,"createSplitUnit",(function(){return gt})),n.d(e,"createUnaryMinus",(function(){return Ht})),n.d(e,"createUnaryPlus",(function(){return Wt})),n.d(e,"createAbs",(function(){return Vt})),n.d(e,"createApply",(function(){return $t})),n.d(e,"createAddScalar",(function(){return Gt})),n.d(e,"createCbrt",(function(){return Kt})),n.d(e,"createCeil",(function(){return Xt})),n.d(e,"createCube",(function(){return Jt})),n.d(e,"createExp",(function(){return Qt})),n.d(e,"createExpm1",(function(){return te})),n.d(e,"createFix",(function(){return ee})),n.d(e,"createFloor",(function(){return ne})),n.d(e,"createGcd",(function(){return ue})),n.d(e,"createLcm",(function(){return he})),n.d(e,"createLog10",(function(){return de})),n.d(e,"createLog2",(function(){return pe})),n.d(e,"createMod",(function(){return ye})),n.d(e,"createMultiplyScalar",(function(){return be})),n.d(e,"createMultiply",(function(){return we})),n.d(e,"createNthRoot",(function(){return Se})),n.d(e,"createSign",(function(){return Oe})),n.d(e,"createSqrt",(function(){return Ne})),n.d(e,"createSquare",(function(){return Me})),n.d(e,"createSubtract",(function(){return ke})),n.d(e,"createXgcd",(function(){return Te})),n.d(e,"createDotMultiply",(function(){return je})),n.d(e,"createBitAnd",(function(){return Ke})),n.d(e,"createBitNot",(function(){return Xe})),n.d(e,"createBitOr",(function(){return Je})),n.d(e,"createBitXor",(function(){return tn})),n.d(e,"createArg",(function(){return en})),n.d(e,"createConj",(function(){return nn})),n.d(e,"createIm",(function(){return rn})),n.d(e,"createRe",(function(){return on})),n.d(e,"createNot",(function(){return cn})),n.d(e,"createOr",(function(){return fn})),n.d(e,"createXor",(function(){return hn})),n.d(e,"createConcat",(function(){return dn})),n.d(e,"createColumn",(function(){return pn})),n.d(e,"createCross",(function(){return mn})),n.d(e,"createDiag",(function(){return gn})),n.d(e,"createFilter",(function(){return xn})),n.d(e,"createFlatten",(function(){return Sn})),n.d(e,"createForEach",(function(){return Nn})),n.d(e,"createGetMatrixDataType",(function(){return kn})),n.d(e,"createIdentity",(function(){return Tn})),n.d(e,"createKron",(function(){return Dn})),n.d(e,"createMap",(function(){return An})),n.d(e,"createOnes",(function(){return Pn})),n.d(e,"createRange",(function(){return Fn})),n.d(e,"createReshape",(function(){return Bn})),n.d(e,"createResize",(function(){return Hn})),n.d(e,"createRow",(function(){return Un})),n.d(e,"createSize",(function(){return Wn})),n.d(e,"createSqueeze",(function(){return $n})),n.d(e,"createSubset",(function(){return er})),n.d(e,"createTranspose",(function(){return ar})),n.d(e,"createCtranspose",(function(){return ur})),n.d(e,"createZeros",(function(){return lr})),n.d(e,"createErf",(function(){return cr})),n.d(e,"createMode",(function(){return gr})),n.d(e,"createProd",(function(){return yr})),n.d(e,"createFormat",(function(){return br})),n.d(e,"createPrint",(function(){return xr})),n.d(e,"createTo",(function(){return _r})),n.d(e,"createIsPrime",(function(){return Or})),n.d(e,"createNumeric",(function(){return Nr})),n.d(e,"createDivideScalar",(function(){return Er})),n.d(e,"createPow",(function(){return kr})),n.d(e,"createRound",(function(){return jr})),n.d(e,"createLog",(function(){return Ir})),n.d(e,"createLog1p",(function(){return Rr})),n.d(e,"createNthRoots",(function(){return Fr})),n.d(e,"createDotPow",(function(){return qr})),n.d(e,"createDotDivide",(function(){return zr})),n.d(e,"createLsolve",(function(){return Ur})),n.d(e,"createUsolve",(function(){return Wr})),n.d(e,"createLeftShift",(function(){return Yr})),n.d(e,"createRightArithShift",(function(){return Gr})),n.d(e,"createRightLogShift",(function(){return Xr})),n.d(e,"createAnd",(function(){return Jr})),n.d(e,"createCompare",(function(){return ti})),n.d(e,"createCompareNatural",(function(){return ii})),n.d(e,"createCompareText",(function(){return ai})),n.d(e,"createEqual",(function(){return ui})),n.d(e,"createEqualText",(function(){return ci})),n.d(e,"createSmaller",(function(){return hi})),n.d(e,"createSmallerEq",(function(){return pi})),n.d(e,"createLarger",(function(){return gi})),n.d(e,"createLargerEq",(function(){return yi})),n.d(e,"createDeepEqual",(function(){return xi})),n.d(e,"createUnequal",(function(){return _i})),n.d(e,"createPartitionSelect",(function(){return Oi})),n.d(e,"createSort",(function(){return Ni})),n.d(e,"createMax",(function(){return Mi})),n.d(e,"createMin",(function(){return Ei})),n.d(e,"createImmutableDenseMatrixClass",(function(){return ki})),n.d(e,"createIndexClass",(function(){return Ci})),n.d(e,"createFibonacciHeapClass",(function(){return Ti})),n.d(e,"createSpaClass",(function(){return Di})),n.d(e,"createUnitClass",(function(){return zi})),n.d(e,"createUnitFunction",(function(){return Hi})),n.d(e,"createSparse",(function(){return Ui})),n.d(e,"createCreateUnit",(function(){return Vi})),n.d(e,"createAcos",(function(){return $i})),n.d(e,"createAcosh",(function(){return lo})),n.d(e,"createAcot",(function(){return co})),n.d(e,"createAcoth",(function(){return fo})),n.d(e,"createAcsc",(function(){return ho})),n.d(e,"createAcsch",(function(){return po})),n.d(e,"createAsec",(function(){return mo})),n.d(e,"createAsech",(function(){return go})),n.d(e,"createAsin",(function(){return vo})),n.d(e,"createAsinh",(function(){return yo})),n.d(e,"createAtan",(function(){return bo})),n.d(e,"createAtan2",(function(){return xo})),n.d(e,"createAtanh",(function(){return wo})),n.d(e,"createCos",(function(){return _o})),n.d(e,"createCosh",(function(){return So})),n.d(e,"createCot",(function(){return Oo})),n.d(e,"createCoth",(function(){return No})),n.d(e,"createCsc",(function(){return Mo})),n.d(e,"createCsch",(function(){return Eo})),n.d(e,"createSec",(function(){return ko})),n.d(e,"createSech",(function(){return Co})),n.d(e,"createSin",(function(){return To})),n.d(e,"createSinh",(function(){return Do})),n.d(e,"createTan",(function(){return Ao})),n.d(e,"createTanh",(function(){return jo})),n.d(e,"createSetCartesian",(function(){return Io})),n.d(e,"createSetDifference",(function(){return Lo})),n.d(e,"createSetDistinct",(function(){return qo})),n.d(e,"createSetIntersect",(function(){return zo})),n.d(e,"createSetIsSubset",(function(){return Uo})),n.d(e,"createSetMultiplicity",(function(){return Vo})),n.d(e,"createSetPowerset",(function(){return Yo})),n.d(e,"createSetSize",(function(){return Go})),n.d(e,"createSetSymDifference",(function(){return Xo})),n.d(e,"createSetUnion",(function(){return Qo})),n.d(e,"createAdd",(function(){return ta})),n.d(e,"createHypot",(function(){return ea})),n.d(e,"createNorm",(function(){return na})),n.d(e,"createDot",(function(){return ra})),n.d(e,"createTrace",(function(){return ia})),n.d(e,"createIndex",(function(){return oa})),n.d(e,"createNode",(function(){return ua})),n.d(e,"createAccessorNode",(function(){return ha})),n.d(e,"createArrayNode",(function(){return da})),n.d(e,"createAssignmentNode",(function(){return ba})),n.d(e,"createBlockNode",(function(){return xa})),n.d(e,"createConditionalNode",(function(){return wa})),n.d(e,"createConstantNode",(function(){return Ta})),n.d(e,"createFunctionAssignmentNode",(function(){return Da})),n.d(e,"createIndexNode",(function(){return ja})),n.d(e,"createObjectNode",(function(){return Ia})),n.d(e,"createOperatorNode",(function(){return Ra})),n.d(e,"createParenthesisNode",(function(){return La})),n.d(e,"createRangeNode",(function(){return Fa})),n.d(e,"createRelationalNode",(function(){return qa})),n.d(e,"createSymbolNode",(function(){return Ba})),n.d(e,"createFunctionNode",(function(){return Ua})),n.d(e,"createParse",(function(){return Va})),n.d(e,"createCompile",(function(){return Ya})),n.d(e,"createEvaluate",(function(){return Ga})),n.d(e,"createParserClass",(function(){return Ka})),n.d(e,"createParser",(function(){return Xa})),n.d(e,"createLup",(function(){return Ja})),n.d(e,"createQr",(function(){return ts})),n.d(e,"createSlu",(function(){return ls})),n.d(e,"createLusolve",(function(){return hs})),n.d(e,"createHelpClass",(function(){return ds})),n.d(e,"createChainClass",(function(){return ps})),n.d(e,"createHelp",(function(){return ys})),n.d(e,"createChain",(function(){return bs})),n.d(e,"createDet",(function(){return xs})),n.d(e,"createInv",(function(){return ws})),n.d(e,"createEigs",(function(){return _s})),n.d(e,"createExpm",(function(){return Ss})),n.d(e,"createSqrtm",(function(){return Os})),n.d(e,"createDivide",(function(){return Ns})),n.d(e,"createDistance",(function(){return Es})),n.d(e,"createIntersect",(function(){return ks})),n.d(e,"createSum",(function(){return Cs})),n.d(e,"createMean",(function(){return Ts})),n.d(e,"createMedian",(function(){return Ds})),n.d(e,"createMad",(function(){return As})),n.d(e,"createVariance",(function(){return Is})),n.d(e,"createQuantileSeq",(function(){return Rs})),n.d(e,"createStd",(function(){return Ls})),n.d(e,"createCombinations",(function(){return zs})),n.d(e,"createCombinationsWithRep",(function(){return Ws})),n.d(e,"createGamma",(function(){return Gs})),n.d(e,"createFactorial",(function(){return Xs})),n.d(e,"createKldivergence",(function(){return Qs})),n.d(e,"createMultinomial",(function(){return eu})),n.d(e,"createPermutations",(function(){return ru})),n.d(e,"createPickRandom",(function(){return lu})),n.d(e,"createRandom",(function(){return hu})),n.d(e,"createRandomInt",(function(){return pu})),n.d(e,"createStirlingS2",(function(){return gu})),n.d(e,"createBellNumbers",(function(){return yu})),n.d(e,"createCatalan",(function(){return xu})),n.d(e,"createComposition",(function(){return _u})),n.d(e,"createSimplify",(function(){return ku})),n.d(e,"createDerivative",(function(){return Cu})),n.d(e,"createRationalize",(function(){return Du})),n.d(e,"createReviver",(function(){return Au})),n.d(e,"createReplacer",(function(){return ju})),n.d(e,"createE",(function(){return Wu})),n.d(e,"createUppercaseE",(function(){return tl})),n.d(e,"createFalse",(function(){return Fu})),n.d(e,"createI",(function(){return Ju})),n.d(e,"createInfinity",(function(){return Bu})),n.d(e,"createLN10",(function(){return Yu})),n.d(e,"createLN2",(function(){return $u})),n.d(e,"createLOG10E",(function(){return Gu})),n.d(e,"createLOG2E",(function(){return Zu})),n.d(e,"createNaN",(function(){return zu})),n.d(e,"createNull",(function(){return qu})),n.d(e,"createPhi",(function(){return Vu})),n.d(e,"createPi",(function(){return Hu})),n.d(e,"createUppercasePi",(function(){return Qu})),n.d(e,"createSQRT1_2",(function(){return Ku})),n.d(e,"createSQRT2",(function(){return Xu})),n.d(e,"createTau",(function(){return Uu})),n.d(e,"createTrue",(function(){return Lu})),n.d(e,"createVersion",(function(){return el})),n.d(e,"createAtomicMass",(function(){return Al})),n.d(e,"createAvogadro",(function(){return jl})),n.d(e,"createBohrMagneton",(function(){return hl})),n.d(e,"createBohrRadius",(function(){return yl})),n.d(e,"createBoltzmann",(function(){return Pl})),n.d(e,"createClassicalElectronRadius",(function(){return bl})),n.d(e,"createConductanceQuantum",(function(){return dl})),n.d(e,"createCoulomb",(function(){return cl})),n.d(e,"createDeuteronMass",(function(){return Nl})),n.d(e,"createEfimovFactor",(function(){return Dl})),n.d(e,"createElectricConstant",(function(){return ul})),n.d(e,"createElectronMass",(function(){return xl})),n.d(e,"createElementaryCharge",(function(){return fl})),n.d(e,"createFaraday",(function(){return Il})),n.d(e,"createFermiCoupling",(function(){return wl})),n.d(e,"createFineStructure",(function(){return _l})),n.d(e,"createFirstRadiation",(function(){return Rl})),n.d(e,"createGasConstant",(function(){return Fl})),n.d(e,"createGravitationConstant",(function(){return il})),n.d(e,"createGravity",(function(){return Yl})),n.d(e,"createHartreeEnergy",(function(){return Sl})),n.d(e,"createInverseConductanceQuantum",(function(){return pl})),n.d(e,"createKlitzing",(function(){return vl})),n.d(e,"createLoschmidt",(function(){return Ll})),n.d(e,"createMagneticConstant",(function(){return sl})),n.d(e,"createMagneticFluxQuantum",(function(){return ml})),n.d(e,"createMolarMass",(function(){return Vl})),n.d(e,"createMolarMassC12",(function(){return $l})),n.d(e,"createMolarPlanckConstant",(function(){return ql})),n.d(e,"createMolarVolume",(function(){return Bl})),n.d(e,"createNeutronMass",(function(){return Ml})),n.d(e,"createNuclearMagneton",(function(){return gl})),n.d(e,"createPlanckCharge",(function(){return Xl})),n.d(e,"createPlanckConstant",(function(){return ol})),n.d(e,"createPlanckLength",(function(){return Zl})),n.d(e,"createPlanckMass",(function(){return Gl})),n.d(e,"createPlanckTemperature",(function(){return Jl})),n.d(e,"createPlanckTime",(function(){return Kl})),n.d(e,"createProtonMass",(function(){return Ol})),n.d(e,"createQuantumOfCirculation",(function(){return El})),n.d(e,"createReducedPlanckConstant",(function(){return al})),n.d(e,"createRydberg",(function(){return kl})),n.d(e,"createSackurTetrode",(function(){return zl})),n.d(e,"createSecondRadiation",(function(){return Hl})),n.d(e,"createSpeedOfLight",(function(){return rl})),n.d(e,"createStefanBoltzmann",(function(){return Ul})),n.d(e,"createThomsonCrossSection",(function(){return Cl})),n.d(e,"createVacuumImpedance",(function(){return ll})),n.d(e,"createWeakMixingAngle",(function(){return Tl})),n.d(e,"createWienDisplacement",(function(){return Wl})),n.d(e,"createApplyTransform",(function(){return ec})),n.d(e,"createColumnTransform",(function(){return nc})),n.d(e,"createFilterTransform",(function(){return ic})),n.d(e,"createForEachTransform",(function(){return ac})),n.d(e,"createIndexTransform",(function(){return sc})),n.d(e,"createMapTransform",(function(){return uc})),n.d(e,"createMaxTransform",(function(){return cc})),n.d(e,"createMeanTransform",(function(){return fc})),n.d(e,"createMinTransform",(function(){return hc})),n.d(e,"createRangeTransform",(function(){return dc})),n.d(e,"createRowTransform",(function(){return pc})),n.d(e,"createSubsetTransform",(function(){return mc})),n.d(e,"createConcatTransform",(function(){return gc})),n.d(e,"createStdTransform",(function(){return vc})),n.d(e,"createSumTransform",(function(){return yc})),n.d(e,"createVarianceTransform",(function(){return xc}));var r=n(1),i=n(13),o=n.n(i),a=n(4),s=n(0),u=function(){return u=o.a.create,o.a},l=Object(s.a)("typed",["?BigNumber","?Complex","?DenseMatrix","?Fraction"],(function(t){var e=t.BigNumber,n=t.Complex,i=t.DenseMatrix,o=t.Fraction,s=u();return s.types=[{name:"number",test:r.y},{name:"Complex",test:r.j},{name:"BigNumber",test:r.e},{name:"Fraction",test:r.o},{name:"Unit",test:r.L},{name:"string",test:r.I},{name:"Chain",test:r.h},{name:"Array",test:r.b},{name:"Matrix",test:r.v},{name:"DenseMatrix",test:r.n},{name:"SparseMatrix",test:r.H},{name:"Range",test:r.D},{name:"Index",test:r.t},{name:"boolean",test:r.g},{name:"ResultSet",test:r.G},{name:"Help",test:r.s},{name:"function",test:r.p},{name:"Date",test:r.m},{name:"RegExp",test:r.F},{name:"null",test:r.x},{name:"undefined",test:r.K},{name:"AccessorNode",test:r.a},{name:"ArrayNode",test:r.c},{name:"AssignmentNode",test:r.d},{name:"BlockNode",test:r.f},{name:"ConditionalNode",test:r.k},{name:"ConstantNode",test:r.l},{name:"FunctionNode",test:r.r},{name:"FunctionAssignmentNode",test:r.q},{name:"IndexNode",test:r.u},{name:"Node",test:r.w},{name:"ObjectNode",test:r.A},{name:"OperatorNode",test:r.B},{name:"ParenthesisNode",test:r.C},{name:"RangeNode",test:r.E},{name:"SymbolNode",test:r.J},{name:"Object",test:r.z}],s.conversions=[{from:"number",to:"BigNumber",convert:function(t){if(e||c(t),15<Object(a.f)(t))throw new TypeError("Cannot implicitly convert a number with >15 significant digits to BigNumber (value: "+t+"). Use function bignumber(x) to convert to BigNumber.");return new e(t)}},{from:"number",to:"Complex",convert:function(t){return n||f(t),new n(t,0)}},{from:"number",to:"string",convert:function(t){return t+""}},{from:"BigNumber",to:"Complex",convert:function(t){return n||f(t),new n(t.toNumber(),0)}},{from:"Fraction",to:"BigNumber",convert:function(){throw new TypeError("Cannot implicitly convert a Fraction to BigNumber or vice versa. Use function bignumber(x) to convert to BigNumber or fraction(x) to convert to Fraction.")}},{from:"Fraction",to:"Complex",convert:function(t){return n||f(t),new n(t.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(t){o||h(t);var e=new o(t);if(e.valueOf()!==t)throw new TypeError("Cannot implicitly convert a number to a Fraction when there will be a loss of precision (value: "+t+"). Use function fraction(x) to convert to Fraction.");return e}},{from:"string",to:"number",convert:function(t){var e=Number(t);if(isNaN(e))throw new Error('Cannot convert "'+t+'" to a number');return e}},{from:"string",to:"BigNumber",convert:function(t){e||c(t);try{return new e(t)}catch(e){throw new Error('Cannot convert "'+t+'" to BigNumber')}}},{from:"string",to:"Fraction",convert:function(t){o||h(t);try{return new o(t)}catch(e){throw new Error('Cannot convert "'+t+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(t){n||f(t);try{return new n(t)}catch(e){throw new Error('Cannot convert "'+t+'" to Complex')}}},{from:"boolean",to:"number",convert:function(t){return+t}},{from:"boolean",to:"BigNumber",convert:function(t){return e||c(t),new e(+t)}},{from:"boolean",to:"Fraction",convert:function(t){return o||h(t),new o(+t)}},{from:"boolean",to:"string",convert:function(t){return String(t)}},{from:"Array",to:"Matrix",convert:function(t){return i||function(){throw new Error("Cannot convert array into a Matrix: no class 'DenseMatrix' provided")}(),new i(t)}},{from:"Matrix",to:"Array",convert:function(t){return t.valueOf()}}],s}));function c(t){throw new Error("Cannot convert value ".concat(t," into a BigNumber: no class 'BigNumber' provided"))}function f(t){throw new Error("Cannot convert value ".concat(t," into a Complex number: no class 'Complex' provided"))}function h(t){throw new Error("Cannot convert value ".concat(t," into a Fraction, no class 'Fraction' provided."))}var d=Object(s.a)("ResultSet",[],(function(){function t(e){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");this.entries=e||[]}return t.prototype.type="ResultSet",t.prototype.isResultSet=!0,t.prototype.valueOf=function(){return this.entries},t.prototype.toString=function(){return"["+this.entries.join(", ")+"]"},t.prototype.toJSON=function(){return{mathjs:"ResultSet",entries:this.entries}},t.fromJSON=function(e){return new t(e.entries)},t}),{isClass:!0}),p=n(15),m=n.n(p),g=Object(s.a)("BigNumber",["?on","config"],(function(t){var e=t.on,n=t.config,r=m.a.clone({precision:n.precision});return r.prototype.type="BigNumber",r.prototype.isBigNumber=!0,r.prototype.toJSON=function(){return{mathjs:"BigNumber",value:this.toString()}},r.fromJSON=function(t){return new r(t.value)},e&&e("config",(function(t,e){t.precision!==e.precision&&r.config({precision:t.precision})})),r}),{isClass:!0}),v=n(8),y=n.n(v);function b(t){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var x=Object(s.a)("Complex",[],(function(){return y.a.prototype.type="Complex",y.a.prototype.isComplex=!0,y.a.prototype.toJSON=function(){return{mathjs:"Complex",re:this.re,im:this.im}},y.a.prototype.toPolar=function(){return{r:this.abs(),phi:this.arg()}},y.a.prototype.format=function(t){var e,n=this.im,i=this.re,o=Object(a.h)(this.re,t),s=Object(a.h)(this.im,t),u=Object(r.y)(t)?t:t?t.precision:null;return null!==u&&(e=Math.pow(10,-u),Math.abs(i/n)<e&&(i=0),Math.abs(n/i)<e&&(n=0)),0===n?o:0===i?1===n?"i":-1===n?"-i":s+"i":n<0?-1===n?o+" - i":o+" - "+s.substring(1)+"i":1===n?o+" + i":o+" + "+s+"i"},y.a.fromPolar=function(t){switch(arguments.length){case 1:var e=t;if("object"===b(e))return y()(e);throw new TypeError("Input has to be an object with r and phi keys.");case 2:var n=t,i=arguments[1];if(Object(r.y)(n)){if(Object(r.L)(i)&&i.hasBase("ANGLE")&&(i=i.toNumber("rad")),Object(r.y)(i))return new y.a({r:n,phi:i});throw new TypeError("Phi is not a number nor an angle unit.")}throw new TypeError("Radius r is not a number.");default:throw new SyntaxError("Wrong number of arguments in function fromPolar")}},y.a.prototype.valueOf=y.a.prototype.toString,y.a.fromJSON=function(t){return new y.a(t)},y.a.compare=function(t,e){return t.re>e.re?1:t.re<e.re?-1:t.im>e.im?1:t.im<e.im?-1:0},y.a}),{isClass:!0}),w=n(10),_=n.n(w),S=Object(s.a)("Fraction",[],(function(){return _.a.prototype.type="Fraction",_.a.prototype.isFraction=!0,_.a.prototype.toJSON=function(){return{mathjs:"Fraction",n:this.s*this.n,d:this.d}},_.a.fromJSON=function(t){return new _.a(t)},_.a}),{isClass:!0}),O=Object(s.a)("Range",[],(function(){function t(e,n,i){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");var o=null!=e,a=null!=n,s=null!=i;if(o)if(Object(r.e)(e))e=e.toNumber();else if("number"!=typeof e)throw new TypeError("Parameter start must be a number");if(a)if(Object(r.e)(n))n=n.toNumber();else if("number"!=typeof n)throw new TypeError("Parameter end must be a number");if(s)if(Object(r.e)(i))i=i.toNumber();else if("number"!=typeof i)throw new TypeError("Parameter step must be a number");this.start=o?parseFloat(e):0,this.end=a?parseFloat(n):0,this.step=s?parseFloat(i):1}return t.prototype.type="Range",t.prototype.isRange=!0,t.parse=function(e){if("string"!=typeof e)return null;var n=e.split(":").map((function(t){return parseFloat(t)}));if(n.some((function(t){return isNaN(t)})))return null;switch(n.length){case 2:return new t(n[0],n[1]);case 3:return new t(n[0],n[2],n[1]);default:return null}},t.prototype.clone=function(){return new t(this.start,this.end,this.step)},t.prototype.size=function(){var t=0,e=this.start,n=this.step,r=this.end-e;return Object(a.n)(n)===Object(a.n)(r)?t=Math.ceil(r/n):0==r&&(t=0),isNaN(t)&&(t=0),[t]},t.prototype.min=function(){var t=this.size()[0];return 0<t?0<this.step?this.start:this.start+(t-1)*this.step:void 0},t.prototype.max=function(){var t=this.size()[0];return 0<t?0<this.step?this.start+(t-1)*this.step:this.start:void 0},t.prototype.forEach=function(t){var e=this.start,n=this.step,r=this.end,i=0;if(0<n)for(;e<r;)t(e,[i],this),e+=n,i++;else if(n<0)for(;r<e;)t(e,[i],this),e+=n,i++},t.prototype.map=function(t){var e=[];return this.forEach((function(n,r,i){e[r[0]]=t(n,r,i)})),e},t.prototype.toArray=function(){var t=[];return this.forEach((function(e,n){t[n[0]]=e})),t},t.prototype.valueOf=function(){return this.toArray()},t.prototype.format=function(t){var e=Object(a.h)(this.start,t);return 1!==this.step&&(e+=":"+Object(a.h)(this.step,t)),e+":"+Object(a.h)(this.end,t)},t.prototype.toString=function(){return this.format()},t.prototype.toJSON=function(){return{mathjs:"Range",start:this.start,end:this.end,step:this.step}},t.fromJSON=function(e){return new t(e.start,e.end,e.step)},t}),{isClass:!0}),N=Object(s.a)("Matrix",[],(function(){function t(){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator")}return t.prototype.type="Matrix",t.prototype.isMatrix=!0,t.prototype.storage=function(){throw new Error("Cannot invoke storage on a Matrix interface")},t.prototype.datatype=function(){throw new Error("Cannot invoke datatype on a Matrix interface")},t.prototype.create=function(t,e){throw new Error("Cannot invoke create on a Matrix interface")},t.prototype.subset=function(t,e,n){throw new Error("Cannot invoke subset on a Matrix interface")},t.prototype.get=function(t){throw new Error("Cannot invoke get on a Matrix interface")},t.prototype.set=function(t,e,n){throw new Error("Cannot invoke set on a Matrix interface")},t.prototype.resize=function(t,e){throw new Error("Cannot invoke resize on a Matrix interface")},t.prototype.reshape=function(t,e){throw new Error("Cannot invoke reshape on a Matrix interface")},t.prototype.clone=function(){throw new Error("Cannot invoke clone on a Matrix interface")},t.prototype.size=function(){throw new Error("Cannot invoke size on a Matrix interface")},t.prototype.map=function(t,e){throw new Error("Cannot invoke map on a Matrix interface")},t.prototype.forEach=function(t){throw new Error("Cannot invoke forEach on a Matrix interface")},t.prototype.toArray=function(){throw new Error("Cannot invoke toArray on a Matrix interface")},t.prototype.valueOf=function(){throw new Error("Cannot invoke valueOf on a Matrix interface")},t.prototype.format=function(t){throw new Error("Cannot invoke format on a Matrix interface")},t.prototype.toString=function(){throw new Error("Cannot invoke toString on a Matrix interface")},t}),{isClass:!0}),M=n(2),E=n(5),k=n(3),C=n(6),T=Object(s.a)("DenseMatrix",["Matrix"],(function(t){var e=t.Matrix;function n(t,e){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(e&&!Object(r.I)(e))throw new Error("Invalid datatype: "+e);if(Object(r.v)(t))"DenseMatrix"===t.type?(this._data=Object(k.a)(t._data),this._size=Object(k.a)(t._size)):(this._data=t.toArray(),this._size=t.size()),this._datatype=e||t._datatype;else if(t&&Object(r.b)(t.data)&&Object(r.b)(t.size))this._data=t.data,this._size=t.size,Object(M.p)(this._data,this._size),this._datatype=e||t.datatype;else if(Object(r.b)(t))this._data=function t(e){for(var n=0,i=e.length;n<i;n++){var o=e[n];Object(r.b)(o)?e[n]=t(o):o&&!0===o.isMatrix&&(e[n]=t(o.valueOf()))}return e}(t),this._size=Object(M.a)(this._data),Object(M.p)(this._data,this._size),this._datatype=e;else{if(t)throw new TypeError("Unsupported type of data ("+Object(r.M)(t)+")");this._data=[],this._size=[0],this._datatype=e}}function i(t,e,n){if(0!==e.length)return t._size=e.slice(0),t._data=Object(M.m)(t._data,t._size,n),t;for(var i=t._data;Object(r.b)(i);)i=i[0];return i}function o(t,e,n){for(var r=t._size.slice(0),o=!1;r.length<e.length;)r.push(0),o=!0;for(var a=0,s=e.length;a<s;a++)e[a]>r[a]&&(r[a]=e[a],o=!0);o&&i(t,r,n)}return(n.prototype=new e).createDenseMatrix=function(t,e){return new n(t,e)},n.prototype.type="DenseMatrix",n.prototype.isDenseMatrix=!0,n.prototype.getDataType=function(){return Object(M.h)(this._data,r.M)},n.prototype.storage=function(){return"dense"},n.prototype.datatype=function(){return this._datatype},n.prototype.create=function(t,e){return new n(t,e)},n.prototype.subset=function(t,e,i){switch(arguments.length){case 1:return function(t,e){if(!Object(r.t)(e))throw new TypeError("Invalid index");if(e.isScalar())return t.get(e.min());var i=e.size();if(i.length!==t._size.length)throw new C.a(i.length,t._size.length);for(var o=e.min(),a=e.max(),s=0,u=t._size.length;s<u;s++)Object(M.q)(o[s],t._size[s]),Object(M.q)(a[s],t._size[s]);return new n(function t(e,n,r,i){var o=i===r-1,a=n.dimension(i);return o?a.map((function(t){return Object(M.q)(t,e.length),e[t]})).valueOf():a.map((function(o){Object(M.q)(o,e.length);var a=e[o];return t(a,n,r,i+1)})).valueOf()}(t._data,e,i.length,0),t._datatype)}(this,t);case 2:case 3:return function(t,e,n,i){if(!e||!0!==e.isIndex)throw new TypeError("Invalid index");var a,s=e.size(),u=e.isScalar();if(Object(r.v)(n)?(a=n.size(),n=n.valueOf()):a=Object(M.a)(n),u){if(0!==a.length)throw new TypeError("Scalar expected");t.set(e.min(),n,i)}else{if(s.length<t._size.length)throw new C.a(s.length,t._size.length,"<");if(a.length<s.length){for(var l=0,c=0;1===s[l]&&1===a[l];)l++;for(;1===s[l];)c++,l++;n=Object(M.o)(n,s.length,c,a)}if(!Object(k.d)(s,a))throw new C.a(s,a,">");var f=e.max().map((function(t){return t+1}));o(t,f,i);var h=s.length;!function t(e,n,r,i,o){var a=o===i-1,s=n.dimension(o);a?s.forEach((function(t,n){Object(M.q)(t),e[t]=r[n[0]]})):s.forEach((function(a,s){Object(M.q)(a),t(e[a],n,r[s[0]],i,o+1)}))}(t._data,e,n,h,0)}return t}(this,t,e,i);default:throw new SyntaxError("Wrong number of arguments")}},n.prototype.get=function(t){if(!Object(r.b)(t))throw new TypeError("Array expected");if(t.length!==this._size.length)throw new C.a(t.length,this._size.length);for(var e=0;e<t.length;e++)Object(M.q)(t[e],this._size[e]);for(var n=this._data,i=0,o=t.length;i<o;i++){var a=t[i];Object(M.q)(a,n.length),n=n[a]}return n},n.prototype.set=function(t,e,n){if(!Object(r.b)(t))throw new TypeError("Array expected");if(t.length<this._size.length)throw new C.a(t.length,this._size.length,"<");var i;o(this,t.map((function(t){return t+1})),n);for(var a=this._data,s=0,u=t.length-1;s<u;s++)i=t[s],Object(M.q)(i,a.length),a=a[i];return i=t[t.length-1],Object(M.q)(i,a.length),a[i]=e,this},n.prototype.resize=function(t,e,n){if(!Object(r.i)(t))throw new TypeError("Array or Matrix expected");var o=t.valueOf().map((function(t){return Array.isArray(t)&&1===t.length?t[0]:t}));return i(n?this.clone():this,o,e)},n.prototype.reshape=function(t,e){var n=e?this.clone():this;return n._data=Object(M.l)(n._data,t),n._size=t.slice(0),n},n.prototype.clone=function(){return new n({data:Object(k.a)(this._data),size:Object(k.a)(this._size),datatype:this._datatype})},n.prototype.size=function(){return this._size.slice(0)},n.prototype.map=function(t){var e=this,i=function n(i,o){return Object(r.b)(i)?i.map((function(t,e){return n(t,o.concat(e))})):t(i,o,e)}(this._data,[]);return new n(i,void 0!==this._datatype?Object(M.h)(i,r.M):void 0)},n.prototype.forEach=function(t){var e=this;!function n(i,o){Object(r.b)(i)?i.forEach((function(t,e){n(t,o.concat(e))})):t(i,o,e)}(this._data,[])},n.prototype.toArray=function(){return Object(k.a)(this._data)},n.prototype.valueOf=function(){return this._data},n.prototype.format=function(t){return Object(E.d)(this._data,t)},n.prototype.toString=function(){return Object(E.d)(this._data)},n.prototype.toJSON=function(){return{mathjs:"DenseMatrix",data:this._data,size:this._size,datatype:this._datatype}},n.prototype.diagonal=function(t){if(t){if(Object(r.e)(t)&&(t=t.toNumber()),!Object(r.y)(t)||!Object(a.i)(t))throw new TypeError("The parameter k must be an integer number")}else t=0;for(var e=0<t?t:0,i=t<0?-t:0,o=this._size[0],s=this._size[1],u=Math.min(o-i,s-e),l=[],c=0;c<u;c++)l[c]=this._data[c+i][c+e];return new n({data:l,size:[u],datatype:this._datatype})},n.diagonal=function(t,e,i,o){if(!Object(r.b)(t))throw new TypeError("Array expected, size parameter");if(2!==t.length)throw new Error("Only two dimensions matrix are supported");if(t=t.map((function(t){if(Object(r.e)(t)&&(t=t.toNumber()),!Object(r.y)(t)||!Object(a.i)(t)||t<1)throw new Error("Size values must be positive integers");return t})),i){if(Object(r.e)(i)&&(i=i.toNumber()),!Object(r.y)(i)||!Object(a.i)(i))throw new TypeError("The parameter k must be an integer number")}else i=0;var s,u=0<i?i:0,l=i<0?-i:0,c=t[0],f=t[1],h=Math.min(c-l,f-u);if(Object(r.b)(e)){if(e.length!==h)throw new Error("Invalid value array length");s=function(t){return e[t]}}else if(Object(r.v)(e)){var d=e.size();if(1!==d.length||d[0]!==h)throw new Error("Invalid matrix length");s=function(t){return e.get([t])}}else s=function(){return e};o=o||(Object(r.e)(s(0))?s(0).mul(0):0);var p=[];if(0<t.length){p=Object(M.m)(p,t,o);for(var m=0;m<h;m++)p[m+l][m+u]=s(m)}return new n({data:p,size:[c,f]})},n.fromJSON=function(t){return new n(t)},n.prototype.swapRows=function(t,e){if(!(Object(r.y)(t)&&Object(a.i)(t)&&Object(r.y)(e)&&Object(a.i)(e)))throw new Error("Row index must be positive integers");if(2!==this._size.length)throw new Error("Only two dimensional matrix is supported");return Object(M.q)(t,this._size[0]),Object(M.q)(e,this._size[0]),n._swapRows(t,e,this._data),this},n._swapRows=function(t,e,n){var r=n[t];n[t]=n[e],n[e]=r},n}),{isClass:!0}),D=Object(s.a)("clone",["typed"],(function(t){return(0,t.typed)("clone",{any:k.a})})),A=n(9);function j(t){for(var e=0;e<t.length;e++)if(Object(r.i)(t[e]))return 1}function P(t,e){Object(r.v)(t)&&(t=t.valueOf());for(var n=0,i=t.length;n<i;n++){var o=t[n];Array.isArray(o)?P(o,e):e(o)}}function I(t,e,n){return t&&"function"==typeof t.map?t.map((function(t){return I(t,e,n)})):e(t)}function R(t,e,n){var i=Array.isArray(t)?Object(M.a)(t):t.size();if(e<0||e>=i.length)throw new A.a(e,i.length);return Object(r.v)(t)?t.create(L(t.valueOf(),e,n)):L(t,e,n)}function L(t,e,n){var r,i,o,a;if(e<=0){if(Array.isArray(t[0])){for(a=function(t){var e,n,r=t.length,i=t[0].length,o=[];for(n=0;n<i;n++){var a=[];for(e=0;e<r;e++)a.push(t[e][n]);o.push(a)}return o}(t),i=[],r=0;r<a.length;r++)i[r]=L(a[r],e-1,n);return i}for(o=t[0],r=1;r<t.length;r++)o=n(o,t[r]);return o}for(i=[],r=0;r<t.length;r++)i[r]=L(t[r],e-1,n);return i}function F(t,e,n,r,i,o,a,s,u,l,c){var f,h,d,p,m=t._values,g=t._index,v=t._ptr;if(r)for(h=v[e],d=v[e+1],f=h;f<d;f++)n[p=g[f]]!==o?(n[p]=o,a.push(p),l?(r[p]=u?s(m[f],c):s(c,m[f]),i[p]=o):r[p]=m[f]):(r[p]=u?s(m[f],r[p]):s(r[p],m[f]),i[p]=o);else for(h=v[e],d=v[e+1],f=h;f<d;f++)n[p=g[f]]!==o?(n[p]=o,a.push(p)):i[p]=o}var q="isInteger",B=Object(s.a)(q,["typed"],(function(t){return(0,t.typed)(q,{number:a.i,BigNumber:function(t){return t.isInt()},Fraction:function(t){return 1===t.d&&isFinite(t.n)},"Array | Matrix":function(t){return I(t,this)}})}));function z(t){return t<0}function H(t){return 0<t}function U(t){return 0===t}function W(t){return Number.isNaN(t)}W.signature=U.signature=H.signature=z.signature="number";var V="isNegative",$=Object(s.a)(V,["typed"],(function(t){return(0,t.typed)(V,{number:z,BigNumber:function(t){return t.isNeg()&&!t.isZero()&&!t.isNaN()},Fraction:function(t){return t.s<0},Unit:function(t){return this(t.value)},"Array | Matrix":function(t){return I(t,this)}})})),Y="isNumeric",Z=Object(s.a)(Y,["typed"],(function(t){return(0,t.typed)(Y,{"number | BigNumber | Fraction | boolean":function(){return!0},"Complex | Unit | string | null | undefined | Node":function(){return!1},"Array | Matrix":function(t){return I(t,this)}})})),G="hasNumericValue",K=Object(s.a)(G,["typed","isNumeric"],(function(t){var e=t.typed,n=t.isNumeric;return e(G,{string:function(t){return 0<t.trim().length&&!isNaN(Number(t))},any:function(t){return n(t)}})})),X="isPositive",J=Object(s.a)(X,["typed"],(function(t){return(0,t.typed)(X,{number:H,BigNumber:function(t){return!t.isNeg()&&!t.isZero()&&!t.isNaN()},Fraction:function(t){return 0<t.s&&0<t.n},Unit:function(t){return this(t.value)},"Array | Matrix":function(t){return I(t,this)}})})),Q=Object(s.a)("isZero",["typed"],(function(t){return(0,t.typed)("isZero",{number:U,BigNumber:function(t){return t.isZero()},Complex:function(t){return 0===t.re&&0===t.im},Fraction:function(t){return 1===t.d&&0===t.n},Unit:function(t){return this(t.value)},"Array | Matrix":function(t){return I(t,this)}})})),tt=Object(s.a)("isNaN",["typed"],(function(t){return(0,t.typed)("isNaN",{number:W,BigNumber:function(t){return t.isNaN()},Fraction:function(){return!1},Complex:function(t){return t.isNaN()},Unit:function(t){return Number.isNaN(t.value)},"Array | Matrix":function(t){return I(t,Number.isNaN)}})})),et=Object(s.a)("typeOf",["typed"],(function(t){return(0,t.typed)("typeOf",{any:r.M})}));function nt(t,e,n){if(null==n)return t.eq(e);if(t.eq(e))return!0;if(t.isNaN()||e.isNaN())return!1;if(t.isFinite()&&e.isFinite()){var r=t.minus(e).abs();if(r.isZero())return!0;var i=t.constructor.max(t.abs(),e.abs());return r.lte(i.times(n))}return!1}var rt="equalScalar",it=Object(s.a)(rt,["typed","config"],(function(t){var e=t.typed,n=t.config;return e(rt,{"boolean, boolean":function(t,e){return t===e},"number, number":function(t,e){return Object(a.m)(t,e,n.epsilon)},"BigNumber, BigNumber":function(t,e){return t.eq(e)||nt(t,e,n.epsilon)},"Fraction, Fraction":function(t,e){return t.equals(e)},"Complex, Complex":function(t,e){return r=t,i=e,o=n.epsilon,Object(a.m)(r.re,i.re,o)&&Object(a.m)(r.im,i.im,o);var r,i,o},"Unit, Unit":function(t,e){if(!t.equalBase(e))throw new Error("Cannot compare units with different base");return this(t.value,e.value)}})})),ot=(Object(s.a)(rt,["typed","config"],(function(t){var e=t.typed,n=t.config;return e(rt,{"number, number":function(t,e){return Object(a.m)(t,e,n.epsilon)}})})),["typed","equalScalar","Matrix"]),at=Object(s.a)("SparseMatrix",ot,(function(t){var e=t.typed,n=t.equalScalar,i=t.Matrix;function o(t,e){if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");if(e&&!Object(r.I)(e))throw new Error("Invalid datatype: "+e);if(Object(r.v)(t))n=this,a=e,"SparseMatrix"===(i=t).type?(n._values=i._values?Object(k.a)(i._values):void 0,n._index=Object(k.a)(i._index),n._ptr=Object(k.a)(i._ptr),n._size=Object(k.a)(i._size),n._datatype=a||i._datatype):s(n,i.valueOf(),a||i._datatype);else if(t&&Object(r.b)(t.index)&&Object(r.b)(t.ptr)&&Object(r.b)(t.size))this._values=t.values,this._index=t.index,this._ptr=t.ptr,this._size=t.size,this._datatype=e||t.datatype;else if(Object(r.b)(t))s(this,t,e);else{if(t)throw new TypeError("Unsupported type of data ("+Object(r.M)(t)+")");this._values=[],this._index=[],this._ptr=[0],this._size=[0,0],this._datatype=e}var n,i,a}function s(t,i,o){t._values=[],t._index=[],t._ptr=[],t._datatype=o;var a=i.length,s=0,u=n,l=0;if(Object(r.I)(o)&&(u=e.find(n,[o,o])||n,l=e.convert(0,o)),0<a){var c=0;do{t._ptr.push(t._index.length);for(var f=0;f<a;f++){var h,d=i[f];Object(r.b)(d)?(0===c&&s<d.length&&(s=d.length),c<d.length&&(u(h=d[c],l)||(t._values.push(h),t._index.push(f)))):(0===c&&s<1&&(s=1),u(d,l)||(t._values.push(d),t._index.push(f)))}c++}while(c<s)}t._ptr.push(t._index.length),t._size=[a,s]}function u(t,e,n,r){if(n-e==0)return n;for(var i=e;i<n;i++)if(r[i]===t)return i;return e}function l(t,e,n,r,i,o,a){i.splice(t,0,r),o.splice(t,0,e);for(var s=n+1;s<a.length;s++)a[s]++}function c(t,i,o,a){var s=a||0,u=n,l=0;Object(r.I)(t._datatype)&&(u=e.find(n,[t._datatype,t._datatype])||n,l=e.convert(0,t._datatype),s=e.convert(s,t._datatype));var c=!u(s,l),f=t._size[0],h=t._size[1];if(h<o){for(p=h;p<o;p++)if(t._ptr[p]=t._values.length,c)for(g=0;g<f;g++)t._values.push(s),t._index.push(g);t._ptr[o]=t._values.length}else o<h&&(t._ptr.splice(o+1,h-o),t._values.splice(t._ptr[o],t._values.length),t._index.splice(t._ptr[o],t._index.length));if(h=o,f<i){if(c){for(var d=0,p=0;p<h;p++){t._ptr[p]=t._ptr[p]+d,x=t._ptr[p+1]+d;for(var m=0,g=f;g<i;g++,m++)t._values.splice(x+m,0,s),t._index.splice(x+m,0,g),d++}t._ptr[h]=t._values.length}}else if(i<f){var v=0;for(p=0;p<h;p++){t._ptr[p]=t._ptr[p]-v;for(var y=t._ptr[p],b=t._ptr[p+1]-v,x=y;x<b;x++)i-1<(g=t._index[x])&&(t._values.splice(x,1),t._index.splice(x,1),v++)}t._ptr[p]=t._values.length}return t._size[0]=i,t._size[1]=o,t}function f(t,e,n,r,i){for(var o,a=r[0],s=r[1],u=[],l=0;l<a;l++)for(u[l]=[],o=0;o<s;o++)u[l][o]=0;for(o=0;o<s;o++)for(var c=n[o],f=n[o+1],h=c;h<f;h++)u[l=e[h]][o]=t?i?Object(k.a)(t[h]):t[h]:1;return u}return(o.prototype=new i).createSparseMatrix=function(t,e){return new o(t,e)},o.prototype.type="SparseMatrix",o.prototype.isSparseMatrix=!0,o.prototype.getDataType=function(){return Object(M.h)(this._values,r.M)},o.prototype.storage=function(){return"sparse"},o.prototype.datatype=function(){return this._datatype},o.prototype.create=function(t,e){return new o(t,e)},o.prototype.density=function(){var t=this._size[0],e=this._size[1];return 0!==t&&0!==e?this._index.length/(t*e):0},o.prototype.subset=function(t,e,n){if(!this._values)throw new Error("Cannot invoke subset on a Pattern only matrix");switch(arguments.length){case 1:return function(t,e){if(!Object(r.t)(e))throw new TypeError("Invalid index");if(e.isScalar())return t.get(e.min());var n,i,a,s,u=e.size();if(u.length!==t._size.length)throw new C.a(u.length,t._size.length);var l=e.min(),c=e.max();for(n=0,i=t._size.length;n<i;n++)Object(M.q)(l[n],t._size[n]),Object(M.q)(c[n],t._size[n]);var f=t._values,h=t._index,d=t._ptr,p=e.dimension(0),m=e.dimension(1),g=[],v=[];p.forEach((function(t,e){v[t]=e[0],g[t]=!0}));var y=f?[]:void 0,b=[],x=[];return m.forEach((function(t){for(x.push(b.length),a=d[t],s=d[t+1];a<s;a++)n=h[a],!0===g[n]&&(b.push(v[n]),y&&y.push(f[a]))})),x.push(b.length),new o({values:y,index:b,ptr:x,size:u,datatype:t._datatype})}(this,t);case 2:case 3:return function(t,e,n,i){if(!e||!0!==e.isIndex)throw new TypeError("Invalid index");var o,a=e.size(),s=e.isScalar();if(Object(r.v)(n)?(o=n.size(),n=n.toArray()):o=Object(M.a)(n),s){if(0!==o.length)throw new TypeError("Scalar expected");t.set(e.min(),n,i)}else{if(1!==a.length&&2!==a.length)throw new C.a(a.length,t._size.length,"<");if(o.length<a.length){for(var u=0,l=0;1===a[u]&&1===o[u];)u++;for(;1===a[u];)l++,u++;n=Object(M.o)(n,a.length,l,o)}if(!Object(k.d)(a,o))throw new C.a(a,o,">");for(var c=e.min()[0],f=e.min()[1],h=o[0],d=o[1],p=0;p<h;p++)for(var m=0;m<d;m++){var g=n[p][m];t.set([p+c,m+f],g,i)}}return t}(this,t,e,n);default:throw new SyntaxError("Wrong number of arguments")}},o.prototype.get=function(t){if(!Object(r.b)(t))throw new TypeError("Array expected");if(t.length!==this._size.length)throw new C.a(t.length,this._size.length);if(!this._values)throw new Error("Cannot invoke get on a Pattern only matrix");var e=t[0],n=t[1];Object(M.q)(e,this._size[0]),Object(M.q)(n,this._size[1]);var i=u(e,this._ptr[n],this._ptr[n+1],this._index);return i<this._ptr[n+1]&&this._index[i]===e?this._values[i]:0},o.prototype.set=function(t,i,o){if(!Object(r.b)(t))throw new TypeError("Array expected");if(t.length!==this._size.length)throw new C.a(t.length,this._size.length);if(!this._values)throw new Error("Cannot invoke set on a Pattern only matrix");var a=t[0],s=t[1],f=this._size[0],h=this._size[1],d=n,p=0;Object(r.I)(this._datatype)&&(d=e.find(n,[this._datatype,this._datatype])||n,p=e.convert(0,this._datatype)),(f-1<a||h-1<s)&&(c(this,Math.max(a+1,f),Math.max(s+1,h),o),f=this._size[0],h=this._size[1]),Object(M.q)(a,f),Object(M.q)(s,h);var m=u(a,this._ptr[s],this._ptr[s+1],this._index);return m<this._ptr[s+1]&&this._index[m]===a?d(i,p)?function(t,e,n,r,i){n.splice(t,1),r.splice(t,1);for(var o=e+1;o<i.length;o++)i[o]--}(m,s,this._values,this._index,this._ptr):this._values[m]=i:l(m,a,s,i,this._values,this._index,this._ptr),this},o.prototype.resize=function(t,e,n){if(!Object(r.i)(t))throw new TypeError("Array or Matrix expected");var i=t.valueOf().map((function(t){return Array.isArray(t)&&1===t.length?t[0]:t}));if(2!==i.length)throw new Error("Only two dimensions matrix are supported");return i.forEach((function(t){if(!Object(r.y)(t)||!Object(a.i)(t)||t<0)throw new TypeError("Invalid size, must contain positive integers (size: "+Object(E.d)(i)+")")})),c(n?this.clone():this,i[0],i[1],e)},o.prototype.reshape=function(t,e){if(!Object(r.b)(t))throw new TypeError("Array expected");if(2!==t.length)throw new Error("Sparse matrices can only be reshaped in two dimensions");if(t.forEach((function(e){if(!Object(r.y)(e)||!Object(a.i)(e)||e<0)throw new TypeError("Invalid size, must contain positive integers (size: "+Object(E.d)(t)+")")})),this._size[0]*this._size[1]!=t[0]*t[1])throw new Error("Reshaping sparse matrix will result in the wrong number of elements");var n=e?this.clone():this;if(this._size[0]===t[0]&&this._size[1]===t[1])return n;for(var i=[],o=0;o<n._ptr.length;o++)for(var s=0;s<n._ptr[o+1]-n._ptr[o];s++)i.push(o);for(var c=n._values.slice(),f=n._index.slice(),h=0;h<n._index.length;h++){var d=f[h],p=i[h],m=d*n._size[1]+p;i[h]=m%t[1],f[h]=Math.floor(m/t[1])}n._values.length=0,n._index.length=0,n._ptr.length=t[1]+1,n._size=t.slice();for(var g=0;g<n._ptr.length;g++)n._ptr[g]=0;for(var v=0;v<c.length;v++){var y=f[v],b=i[v],x=c[v];l(u(y,n._ptr[b],n._ptr[b+1],n._index),y,b,x,n._values,n._index,n._ptr)}return n},o.prototype.clone=function(){return new o({values:this._values?Object(k.a)(this._values):void 0,index:Object(k.a)(this._index),ptr:Object(k.a)(this._ptr),size:Object(k.a)(this._size),datatype:this._datatype})},o.prototype.size=function(){return this._size.slice(0)},o.prototype.map=function(t,i){if(!this._values)throw new Error("Cannot invoke map on a Pattern only matrix");var a=this;return function(t,i,a,s,u,l,c){var f=[],h=[],d=[],p=n,m=0;Object(r.I)(t._datatype)&&(p=e.find(n,[t._datatype,t._datatype])||n,m=e.convert(0,t._datatype));for(var g=function(t,e,n){t=l(t,e,n),p(t,m)||(f.push(t),h.push(e))},v=0;v<=u;v++){d.push(f.length);var y=t._ptr[v],b=t._ptr[v+1];if(c)for(var x=y;x<b;x++){var w=t._index[x];0<=w&&w<=a&&g(t._values[x],w-0,v-0)}else{for(var _={},S=y;S<b;S++)_[t._index[S]]=t._values[S];for(var O=0;O<=a;O++)g(O in _?_[O]:0,O-0,v-0)}}return d.push(f.length),new o({values:f,index:h,ptr:d,size:[a-0+1,u-0+1]})}(this,0,this._size[0]-1,0,this._size[1]-1,(function(e,n,r){return t(e,[n,r],a)}),i)},o.prototype.forEach=function(t,e){if(!this._values)throw new Error("Cannot invoke forEach on a Pattern only matrix");for(var n=this._size[0],r=this._size[1],i=0;i<r;i++){var o=this._ptr[i],a=this._ptr[i+1];if(e)for(var s=o;s<a;s++){var u=this._index[s];t(this._values[s],[u,i],this)}else{for(var l={},c=o;c<a;c++)l[this._index[c]]=this._values[c];for(var f=0;f<n;f++)t(f in l?l[f]:0,[f,i],this)}}},o.prototype.toArray=function(){return f(this._values,this._index,this._ptr,this._size,!0)},o.prototype.valueOf=function(){return f(this._values,this._index,this._ptr,this._size,!1)},o.prototype.format=function(t){for(var e=this._size[0],n=this._size[1],r=this.density(),i="Sparse Matrix ["+Object(E.d)(e,t)+" x "+Object(E.d)(n,t)+"] density: "+Object(E.d)(r,t)+"\n",o=0;o<n;o++)for(var a=this._ptr[o],s=this._ptr[o+1],u=a;u<s;u++){var l=this._index[u];i+="\n ("+Object(E.d)(l,t)+", "+Object(E.d)(o,t)+") ==> "+(this._values?Object(E.d)(this._values[u],t):"X")}return i},o.prototype.toString=function(){return Object(E.d)(this.toArray())},o.prototype.toJSON=function(){return{mathjs:"SparseMatrix",values:this._values,index:this._index,ptr:this._ptr,size:this._size,datatype:this._datatype}},o.prototype.diagonal=function(t){if(t){if(Object(r.e)(t)&&(t=t.toNumber()),!Object(r.y)(t)||!Object(a.i)(t))throw new TypeError("The parameter k must be an integer number")}else t=0;var e=0<t?t:0,n=t<0?-t:0,i=this._size[0],s=this._size[1],u=Math.min(i-n,s-e),l=[],c=[],f=[];f[0]=0;for(var h=e;h<s&&l.length<u;h++)for(var d=this._ptr[h],p=this._ptr[h+1],m=d;m<p;m++){var g=this._index[m];if(g===h-e+n){l.push(this._values[m]),c[l.length-1]=g-n;break}}return f.push(l.length),new o({values:l,index:c,ptr:f,size:[u,1]})},o.fromJSON=function(t){return new o(t)},o.diagonal=function(t,i,s,u,l){if(!Object(r.b)(t))throw new TypeError("Array expected, size parameter");if(2!==t.length)throw new Error("Only two dimensions matrix are supported");if(t=t.map((function(t){if(Object(r.e)(t)&&(t=t.toNumber()),!Object(r.y)(t)||!Object(a.i)(t)||t<1)throw new Error("Size values must be positive integers");return t})),s){if(Object(r.e)(s)&&(s=s.toNumber()),!Object(r.y)(s)||!Object(a.i)(s))throw new TypeError("The parameter k must be an integer number")}else s=0;var c=n,f=0;Object(r.I)(l)&&(c=e.find(n,[l,l])||n,f=e.convert(0,l));var h,d=0<s?s:0,p=s<0?-s:0,m=t[0],g=t[1],v=Math.min(m-p,g-d);if(Object(r.b)(i)){if(i.length!==v)throw new Error("Invalid value array length");h=function(t){return i[t]}}else if(Object(r.v)(i)){var y=i.size();if(1!==y.length||y[0]!==v)throw new Error("Invalid matrix length");h=function(t){return i.get([t])}}else h=function(){return i};for(var b=[],x=[],w=[],_=0;_<g;_++){w.push(b.length);var S,O=_-d;0<=O&&O<v&&(c(S=h(O),f)||(x.push(O+p),b.push(S)))}return w.push(b.length),new o({values:b,index:x,ptr:w,size:[m,g]})},o.prototype.swapRows=function(t,e){if(!(Object(r.y)(t)&&Object(a.i)(t)&&Object(r.y)(e)&&Object(a.i)(e)))throw new Error("Row index must be positive integers");if(2!==this._size.length)throw new Error("Only two dimensional matrix is supported");return Object(M.q)(t,this._size[0]),Object(M.q)(e,this._size[0]),o._swapRows(t,e,this._size[1],this._values,this._index,this._ptr),this},o._forEachRow=function(t,e,n,r,i){for(var o=r[t],a=r[t+1],s=o;s<a;s++)i(n[s],e[s])},o._swapRows=function(t,e,n,r,i,o){for(var a=0;a<n;a++){var s,l,c,f=o[a],h=o[a+1],d=u(t,f,h,i),p=u(e,f,h,i);d<h&&p<h&&i[d]===t&&i[p]===e?r&&(s=r[d],r[d]=r[p],r[p]=s):d<h&&i[d]===t&&(h<=p||i[p]!==e)?(l=r?r[d]:void 0,i.splice(p,0,e),r&&r.splice(p,0,l),i.splice(p<=d?d+1:d,1),r&&r.splice(p<=d?d+1:d,1)):p<h&&i[p]===e&&(h<=d||i[d]!==t)&&(c=r?r[p]:void 0,i.splice(d,0,t),r&&r.splice(d,0,c),i.splice(d<=p?p+1:p,1),r&&r.splice(d<=p?p+1:p,1))}},o}),{isClass:!0}),st=Object(s.a)("number",["typed"],(function(t){var e=(0,t.typed)("number",{"":function(){return 0},number:function(t){return t},string:function(t){if("NaN"===t)return NaN;var e=Number(t);if(isNaN(e))throw new SyntaxError('String "'+t+'" is no valid number');return e},BigNumber:function(t){return t.toNumber()},Fraction:function(t){return t.valueOf()},Unit:function(){throw new Error("Second argument with valueless unit expected")},null:function(){return 0},"Unit, string | Unit":function(t,e){return t.toNumber(e)},"Array | Matrix":function(t){return I(t,this)}});return e.fromJSON=function(t){return parseFloat(t.value)},e})),ut=Object(s.a)("string",["typed"],(function(t){return(0,t.typed)("string",{"":function(){return""},number:a.h,null:function(){return"null"},boolean:function(t){return t+""},string:function(t){return t},"Array | Matrix":function(t){return I(t,this)},any:function(t){return String(t)}})})),lt="boolean",ct=Object(s.a)(lt,["typed"],(function(t){return(0,t.typed)(lt,{"":function(){return!1},boolean:function(t){return t},number:function(t){return!!t},null:function(){return!1},BigNumber:function(t){return!t.isZero()},string:function(t){var e=t.toLowerCase();if("true"===e)return!0;if("false"===e)return!1;var n=Number(t);if(""!==t&&!isNaN(n))return!!n;throw new Error('Cannot convert "'+t+'" to a boolean')},"Array | Matrix":function(t){return I(t,this)}})})),ft=Object(s.a)("bignumber",["typed","BigNumber"],(function(t){var e=t.typed,n=t.BigNumber;return e("bignumber",{"":function(){return new n(0)},number:function(t){return new n(t+"")},string:function(t){return new n(t)},BigNumber:function(t){return t},Fraction:function(t){return new n(t.n).div(t.d).times(t.s)},null:function(){return new n(0)},"Array | Matrix":function(t){return I(t,this)}})})),ht=Object(s.a)("complex",["typed","Complex"],(function(t){var e=t.typed,n=t.Complex;return e("complex",{"":function(){return n.ZERO},number:function(t){return new n(t,0)},"number, number":function(t,e){return new n(t,e)},"BigNumber, BigNumber":function(t,e){return new n(t.toNumber(),e.toNumber())},Fraction:function(t){return new n(t.valueOf(),0)},Complex:function(t){return t.clone()},string:function(t){return n(t)},null:function(){return n(0)},Object:function(t){if("re"in t&&"im"in t)return new n(t.re,t.im);if("r"in t&&"phi"in t||"abs"in t&&"arg"in t)return new n(t);throw new Error("Expected object with properties (re and im) or (r and phi) or (abs and arg)")},"Array | Matrix":function(t){return I(t,this)}})})),dt=Object(s.a)("fraction",["typed","Fraction"],(function(t){var e=t.typed,n=t.Fraction;return e("fraction",{number:function(t){if(!isFinite(t)||isNaN(t))throw new Error(t+" cannot be represented as a fraction");return new n(t)},string:function(t){return new n(t)},"number, number":function(t,e){return new n(t,e)},null:function(){return new n(0)},BigNumber:function(t){return new n(t.toString())},Fraction:function(t){return t},Object:function(t){return new n(t)},"Array | Matrix":function(t){return I(t,this)}})})),pt=Object(s.a)("matrix",["typed","Matrix","DenseMatrix","SparseMatrix"],(function(t){var e=t.typed,n=(t.Matrix,t.DenseMatrix),r=t.SparseMatrix;return e("matrix",{"":function(){return i([])},string:function(t){return i([],t)},"string, string":function(t,e){return i([],t,e)},Array:function(t){return i(t)},Matrix:function(t){return i(t,t.storage())},"Array | Matrix, string":i,"Array | Matrix, string, string":i});function i(t,e,i){if("dense"===e||"default"===e||void 0===e)return new n(t,i);if("sparse"===e)return new r(t,i);throw new TypeError("Unknown matrix type "+JSON.stringify(e)+".")}})),mt="splitUnit",gt=Object(s.a)(mt,["typed"],(function(t){return(0,t.typed)(mt,{"Unit, Array":function(t,e){return t.splitUnit(e)}})})),vt="number",yt="number, number";function bt(t){return Math.abs(t)}function xt(t,e){return t+e}function wt(t,e){return t*e}function _t(t){return-t}function St(t){return t}function Ot(t){return Object(a.d)(t)}function Nt(t){return Math.ceil(t)}function Mt(t){return t*t*t}function Et(t){return Math.exp(t)}function kt(t){return Object(a.g)(t)}function Ct(t,e){if(!Object(a.i)(t)||!Object(a.i)(e))throw new Error("Parameters in function gcd must be integer numbers");for(var n;0!==e;)n=t%e,t=e,e=n;return t<0?-t:t}function Tt(t,e){if(!Object(a.i)(t)||!Object(a.i)(e))throw new Error("Parameters in function lcm must be integer numbers");if(0===t||0===e)return 0;for(var n,r=t*e;0!==e;)e=t%(n=e),t=n;return Math.abs(r/t)}function Dt(t){return Math.log(t)}function At(t){return Object(a.j)(t)}function jt(t){return Object(a.l)(t)}function Pt(t,e){if(0<e)return t-e*Math.floor(t/e);if(0===e)return t;throw new Error("Cannot calculate mod for a negative divisor")}function It(t,e){var n=e<0;if(n&&(e=-e),0===e)throw new Error("Root must be non-zero");if(t<0&&Math.abs(e)%2!=1)throw new Error("Root must be odd when a is negative.");if(0===t)return n?1/0:0;if(!isFinite(t))return n?0:t;var r=Math.pow(Math.abs(t),1/e);return r=t<0?-r:r,n?1/r:r}function Rt(t){return Object(a.n)(t)}function Lt(t){return t*t}function Ft(t,e){var n,r,i,o=0,s=1,u=1,l=0;if(!Object(a.i)(t)||!Object(a.i)(e))throw new Error("Parameters in function xgcd must be integer numbers");for(;e;)i=t-(r=Math.floor(t/e))*e,o=s-r*(n=o),s=n,u=l-r*(n=u),l=n,t=e,e=i;return t<0?[-t,-s,-l]:[t,t?s:0,l]}function qt(t,e){return t*t<1&&e===1/0||1<t*t&&e===-1/0?0:Math.pow(t,e)}function Bt(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;return parseFloat(Object(a.q)(t,e))}bt.signature=vt,wt.signature=xt.signature=yt,kt.signature=Et.signature=Mt.signature=Nt.signature=Ot.signature=St.signature=_t.signature=vt,Tt.signature=Ct.signature=yt,jt.signature=At.signature=Dt.signature=vt,It.signature=Pt.signature=yt,Lt.signature=Rt.signature=vt,Bt.signature=qt.signature=Ft.signature=yt;var zt="unaryMinus",Ht=Object(s.a)(zt,["typed"],(function(t){return(0,t.typed)(zt,{number:_t,Complex:function(t){return t.neg()},BigNumber:function(t){return t.neg()},Fraction:function(t){return t.neg()},Unit:function(t){var e=t.clone();return e.value=this(t.value),e},"Array | Matrix":function(t){return I(t,this,!0)}})})),Ut="unaryPlus",Wt=Object(s.a)(Ut,["typed","config","BigNumber"],(function(t){var e=t.typed,n=t.config,r=t.BigNumber;return e(Ut,{number:St,Complex:function(t){return t},BigNumber:function(t){return t},Fraction:function(t){return t},Unit:function(t){return t.clone()},"Array | Matrix":function(t){return I(t,this,!0)},"boolean | string":function(t){return"BigNumber"===n.number?new r(+t):+t}})})),Vt=Object(s.a)("abs",["typed"],(function(t){return(0,t.typed)("abs",{number:bt,Complex:function(t){return t.abs()},BigNumber:function(t){return t.abs()},Fraction:function(t){return t.abs()},"Array | Matrix":function(t){return I(t,this,!0)},Unit:function(t){return t.abs()}})})),$t=Object(s.a)("apply",["typed","isInteger"],(function(t){var e=t.typed,n=t.isInteger;return e("apply",{"Array | Matrix, number | BigNumber, function":function(t,e,i){if(!n(e))throw new TypeError("Integer number expected for dimension");var o=Array.isArray(t)?Object(M.a)(t):t.size();if(e<0||e>=o.length)throw new A.a(e,o.length);return Object(r.v)(t)?t.create(Yt(t.valueOf(),e,i)):Yt(t,e,i)}})}));function Yt(t,e,n){var r,i,o;if(e<=0){if(Array.isArray(t[0])){for(o=function(t){var e,n,r=t.length,i=t[0].length,o=[];for(n=0;n<i;n++){var a=[];for(e=0;e<r;e++)a.push(t[e][n]);o.push(a)}return o}(t),i=[],r=0;r<o.length;r++)i[r]=Yt(o[r],e-1,n);return i}return n(t)}for(i=[],r=0;r<t.length;r++)i[r]=Yt(t[r],e-1,n);return i}var Zt="addScalar",Gt=Object(s.a)(Zt,["typed"],(function(t){return(0,t.typed)(Zt,{"number, number":xt,"Complex, Complex":function(t,e){return t.add(e)},"BigNumber, BigNumber":function(t,e){return t.plus(e)},"Fraction, Fraction":function(t,e){return t.add(e)},"Unit, Unit":function(t,e){if(null===t.value||void 0===t.value)throw new Error("Parameter x contains a unit with undefined value");if(null===e.value||void 0===e.value)throw new Error("Parameter y contains a unit with undefined value");if(!t.equalBase(e))throw new Error("Units do not match");var n=t.clone();return n.value=this(n.value,e.value),n.fixPrefix=!1,n}})})),Kt=Object(s.a)("cbrt",["config","typed","isNegative","unaryMinus","matrix","Complex","BigNumber","Fraction"],(function(t){var e=t.config,n=t.typed,i=t.isNegative,o=t.unaryMinus,a=t.matrix,s=t.Complex,u=t.BigNumber,l=t.Fraction;return n("cbrt",{number:Ot,Complex:c,"Complex, boolean":c,BigNumber:function(t){return t.cbrt()},Unit:function(t){if(t.value&&Object(r.j)(t.value)){var e=t.clone();return e.value=1,(e=e.pow(1/3)).value=c(t.value),e}var n,a=i(t.value);a&&(t.value=o(t.value)),n=Object(r.e)(t.value)?new u(1).div(3):Object(r.o)(t.value)?new l(1,3):1/3;var s=t.pow(n);return a&&(s.value=o(s.value)),s},"Array | Matrix":function(t){return I(t,this,!0)}});function c(t,n){var r=t.arg()/3,i=t.abs(),o=new s(Ot(i),0).mul(new s(0,r).exp());if(n){var u=[o,new s(Ot(i),0).mul(new s(0,r+2*Math.PI/3).exp()),new s(Ot(i),0).mul(new s(0,r-2*Math.PI/3).exp())];return"Array"===e.matrix?u:a(u)}return o}})),Xt=Object(s.a)("ceil",["typed","config","round"],(function(t){var e=t.typed,n=t.config,r=t.round;return e("ceil",{number:function(t){return(Object(a.m)(t,r(t),n.epsilon)?r:Nt)(t)},Complex:function(t){return t.ceil()},BigNumber:function(t){return nt(t,r(t),n.epsilon)?r(t):t.ceil()},Fraction:function(t){return t.ceil()},"Array | Matrix":function(t){return I(t,this,!0)}})})),Jt=Object(s.a)("cube",["typed"],(function(t){return(0,t.typed)("cube",{number:Mt,Complex:function(t){return t.mul(t).mul(t)},BigNumber:function(t){return t.times(t).times(t)},Fraction:function(t){return t.pow(3)},"Array | Matrix":function(t){return I(t,this,!0)},Unit:function(t){return t.pow(3)}})})),Qt=Object(s.a)("exp",["typed"],(function(t){return(0,t.typed)("exp",{number:Et,Complex:function(t){return t.exp()},BigNumber:function(t){return t.exp()},"Array | Matrix":function(t){return I(t,this)}})})),te=Object(s.a)("expm1",["typed","Complex"],(function(t){var e=t.typed,n=t.Complex;return e("expm1",{number:kt,Complex:function(t){var e=Math.exp(t.re);return new n(e*Math.cos(t.im)-1,e*Math.sin(t.im))},BigNumber:function(t){return t.exp().minus(1)},"Array | Matrix":function(t){return I(t,this)}})})),ee=Object(s.a)("fix",["typed","Complex","ceil","floor"],(function(t){var e=t.typed,n=t.Complex,r=t.ceil,i=t.floor;return e("fix",{number:function(t){return(0<t?i:r)(t)},Complex:function(t){return new n(0<t.re?Math.floor(t.re):Math.ceil(t.re),0<t.im?Math.floor(t.im):Math.ceil(t.im))},BigNumber:function(t){return(t.isNegative()?r:i)(t)},Fraction:function(t){return t.s<0?t.ceil():t.floor()},"Array | Matrix":function(t){return I(t,this,!0)}})})),ne=Object(s.a)("floor",["typed","config","round"],(function(t){var e=t.typed,n=t.config,r=t.round;return e("floor",{number:function(t){return Object(a.m)(t,r(t),n.epsilon)?r(t):Math.floor(t)},Complex:function(t){return t.floor()},BigNumber:function(t){return nt(t,r(t),n.epsilon)?r(t):t.floor()},Fraction:function(t){return t.floor()},"Array | Matrix":function(t){return I(t,this,!0)}})})),re=Object(s.a)("algorithm01",["typed"],(function(t){var e=t.typed;return function(t,n,r,i){var o=t._data,a=t._size,s=t._datatype,u=n._values,l=n._index,c=n._ptr,f=n._size,h=n._datatype;if(a.length!==f.length)throw new C.a(a.length,f.length);if(a[0]!==f[0]||a[1]!==f[1])throw new RangeError("Dimension mismatch. Matrix A ("+a+") must match Matrix B ("+f+")");if(!u)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");for(var d=a[0],p=a[1],m="string"==typeof s&&s===h?s:void 0,g=m?e.find(r,[m,m]):r,v=[],y=0;y<d;y++)v[y]=[];for(var b=[],x=[],w=0;w<p;w++){for(var _=w+1,S=c[w],O=c[w+1],N=S;N<O;N++)b[y=l[N]]=i?g(u[N],o[y][w]):g(o[y][w],u[N]),x[y]=_;for(y=0;y<d;y++)x[y]===_?v[y][w]=b[y]:v[y][w]=o[y][w]}return t.createDenseMatrix({data:v,size:[d,p],datatype:m})}})),ie=Object(s.a)("algorithm04",["typed","equalScalar"],(function(t){var e=t.typed,n=t.equalScalar;return function(t,r,i){var o=t._values,a=t._index,s=t._ptr,u=t._size,l=t._datatype,c=r._values,f=r._index,h=r._ptr,d=r._size,p=r._datatype;if(u.length!==d.length)throw new C.a(u.length,d.length);if(u[0]!==d[0]||u[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+d+")");var m,g=u[0],v=u[1],y=n,b=0,x=i;"string"==typeof l&&l===p&&(m=l,y=e.find(n,[m,m]),b=e.convert(0,m),x=e.find(i,[m,m]));for(var w=o&&c?[]:void 0,_=[],S=[],O=o&&c?[]:void 0,N=o&&c?[]:void 0,M=[],E=[],k=0;k<v;k++){S[k]=_.length;for(var T,D,A=k+1,j=s[k],P=s[k+1],I=j;I<P;I++)D=a[I],_.push(D),M[D]=A,O&&(O[D]=o[I]);for(j=h[k],P=h[k+1],I=j;I<P;I++)M[D=f[I]]===A?O&&(y(T=x(O[D],c[I]),b)?M[D]=null:O[D]=T):(_.push(D),E[D]=A,N&&(N[D]=c[I]));if(O&&N)for(I=S[k];I<_.length;)M[D=_[I]]===A?(w[I]=O[D],I++):E[D]===A?(w[I]=N[D],I++):_.splice(I,1)}return S[v]=_.length,t.createSparseMatrix({values:w,index:_,ptr:S,size:[g,v],datatype:m})}})),oe=Object(s.a)("algorithm10",["typed","DenseMatrix"],(function(t){var e=t.typed,n=t.DenseMatrix;return function(t,r,i,o){var a=t._values,s=t._index,u=t._ptr,l=t._size,c=t._datatype;if(!a)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var f,h=l[0],d=l[1],p=i;"string"==typeof c&&(f=c,r=e.convert(r,f),p=e.find(i,[f,f]));for(var m=[],g=[],v=[],y=0;y<d;y++){for(var b=y+1,x=u[y],w=u[y+1],_=x;_<w;_++){var S=s[_];g[S]=a[_],v[S]=b}for(var O=0;O<h;O++)0===y&&(m[O]=[]),v[O]===b?m[O][y]=o?p(r,g[O]):p(g[O],r):m[O][y]=r}return new n({data:m,size:[h,d],datatype:f})}})),ae=Object(s.a)("algorithm13",["typed"],(function(t){var e=t.typed;return function(t,n,r){var i=t._data,o=t._size,a=t._datatype,s=n._data,u=n._size,l=n._datatype,c=[];if(o.length!==u.length)throw new C.a(o.length,u.length);for(var f,h=0;h<o.length;h++){if(o[h]!==u[h])throw new RangeError("Dimension mismatch. Matrix A ("+o+") must match Matrix B ("+u+")");c[h]=o[h]}var d=r;"string"==typeof a&&a===l&&(f=a,d=e.find(r,[f,f]));var p=0<c.length?function t(e,n,r,i,o,a){var s=[];if(n===r.length-1)for(var u=0;u<i;u++)s[u]=e(o[u],a[u]);else for(var l=0;l<i;l++)s[l]=t(e,n+1,r,r[n+1],o[l],a[l]);return s}(d,0,c,c[0],i,s):[];return t.createDenseMatrix({data:p,size:c,datatype:f})}})),se=Object(s.a)("algorithm14",["typed"],(function(t){var e=t.typed;return function(t,n,r,i){var o,a=t._data,s=t._size,u=t._datatype,l=r;"string"==typeof u&&(o=u,n=e.convert(n,o),l=e.find(r,[o,o]));var c=0<s.length?function t(e,n,r,i,o,a,s){var u=[];if(n===r.length-1)for(var l=0;l<i;l++)u[l]=s?e(a,o[l]):e(o[l],a);else for(var c=0;c<i;c++)u[c]=t(e,n+1,r,r[n+1],o[c],a,s);return u}(l,0,s,s[0],a,n,i):[];return t.createDenseMatrix({data:c,size:Object(k.a)(s),datatype:o})}})),ue=Object(s.a)("gcd",["typed","matrix","equalScalar","BigNumber","DenseMatrix"],(function(t){var e=t.typed,n=t.matrix,r=t.equalScalar,i=t.BigNumber,o=t.DenseMatrix,a=re({typed:e}),s=ie({typed:e,equalScalar:r}),u=oe({typed:e,DenseMatrix:o}),l=ae({typed:e}),c=se({typed:e});return e("gcd",{"number, number":Ct,"BigNumber, BigNumber":function(t,e){if(!t.isInt()||!e.isInt())throw new Error("Parameters in function gcd must be integer numbers");for(var n=new i(0);!e.isZero();){var r=t.mod(e);t=e,e=r}return t.lt(n)?t.neg():t},"Fraction, Fraction":function(t,e){return t.gcd(e)},"SparseMatrix, SparseMatrix":function(t,e){return s(t,e,this)},"SparseMatrix, DenseMatrix":function(t,e){return a(e,t,this,!0)},"DenseMatrix, SparseMatrix":function(t,e){return a(t,e,this,!1)},"DenseMatrix, DenseMatrix":function(t,e){return l(t,e,this)},"Array, Array":function(t,e){return this(n(t),n(e)).valueOf()},"Array, Matrix":function(t,e){return this(n(t),e)},"Matrix, Array":function(t,e){return this(t,n(e))},"SparseMatrix, number | BigNumber":function(t,e){return u(t,e,this,!1)},"DenseMatrix, number | BigNumber":function(t,e){return c(t,e,this,!1)},"number | BigNumber, SparseMatrix":function(t,e){return u(e,t,this,!0)},"number | BigNumber, DenseMatrix":function(t,e){return c(e,t,this,!0)},"Array, number | BigNumber":function(t,e){return c(n(t),e,this,!1).valueOf()},"number | BigNumber, Array":function(t,e){return c(n(e),t,this,!0).valueOf()},"Array | Matrix | number | BigNumber, Array | Matrix | number | BigNumber, ...Array | Matrix | number | BigNumber":function(t,e,n){for(var r=this(t,e),i=0;i<n.length;i++)r=this(r,n[i]);return r}})})),le=Object(s.a)("algorithm02",["typed","equalScalar"],(function(t){var e=t.typed,n=t.equalScalar;return function(t,r,i,o){var a=t._data,s=t._size,u=t._datatype,l=r._values,c=r._index,f=r._ptr,h=r._size,d=r._datatype;if(s.length!==h.length)throw new C.a(s.length,h.length);if(s[0]!==h[0]||s[1]!==h[1])throw new RangeError("Dimension mismatch. Matrix A ("+s+") must match Matrix B ("+h+")");if(!l)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var p,m=s[0],g=s[1],v=n,y=0,b=i;"string"==typeof u&&u===d&&(p=u,v=e.find(n,[p,p]),y=e.convert(0,p),b=e.find(i,[p,p]));for(var x=[],w=[],_=[],S=0;S<g;S++){_[S]=w.length;for(var O=f[S],N=f[S+1],M=O;M<N;M++){var E=c[M],k=o?b(l[M],a[E][S]):b(a[E][S],l[M]);v(k,y)||(w.push(E),x.push(k))}}return _[g]=w.length,r.createSparseMatrix({values:x,index:w,ptr:_,size:[m,g],datatype:p})}})),ce=Object(s.a)("algorithm06",["typed","equalScalar"],(function(t){var e=t.typed,n=t.equalScalar;return function(t,r,i){var o=t._values,a=t._size,s=t._datatype,u=r._values,l=r._size,c=r._datatype;if(a.length!==l.length)throw new C.a(a.length,l.length);if(a[0]!==l[0]||a[1]!==l[1])throw new RangeError("Dimension mismatch. Matrix A ("+a+") must match Matrix B ("+l+")");var f,h=a[0],d=a[1],p=n,m=0,g=i;"string"==typeof s&&s===c&&(f=s,p=e.find(n,[f,f]),m=e.convert(0,f),g=e.find(i,[f,f]));for(var v=o&&u?[]:void 0,y=[],b=[],x=v?[]:void 0,w=[],_=[],S=0;S<d;S++){b[S]=y.length;var O=S+1;if(F(t,S,w,x,_,O,y,g),F(r,S,w,x,_,O,y,g),x)for(var N=b[S];N<y.length;){var M,E=y[N];_[E]!==O||p(M=x[E],m)?y.splice(N,1):(v.push(M),N++)}else for(var k=b[S];k<y.length;)_[y[k]]!==O?y.splice(k,1):k++}return b[d]=y.length,t.createSparseMatrix({values:v,index:y,ptr:b,size:[h,d],datatype:f})}})),fe=Object(s.a)("algorithm11",["typed","equalScalar"],(function(t){var e=t.typed,n=t.equalScalar;return function(t,r,i,o){var a=t._values,s=t._index,u=t._ptr,l=t._size,c=t._datatype;if(!a)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var f,h=l[0],d=l[1],p=n,m=0,g=i;"string"==typeof c&&(f=c,p=e.find(n,[f,f]),m=e.convert(0,f),r=e.convert(r,f),g=e.find(i,[f,f]));for(var v=[],y=[],b=[],x=0;x<d;x++){b[x]=y.length;for(var w=u[x],_=u[x+1],S=w;S<_;S++){var O=s[S],N=o?g(r,a[S]):g(a[S],r);p(N,m)||(y.push(O),v.push(N))}}return b[d]=y.length,t.createSparseMatrix({values:v,index:y,ptr:b,size:[h,d],datatype:f})}})),he=Object(s.a)("lcm",["typed","matrix","equalScalar"],(function(t){var e=t.typed,n=t.matrix,r=t.equalScalar,i=le({typed:e,equalScalar:r}),o=ce({typed:e,equalScalar:r}),a=fe({typed:e,equalScalar:r}),s=ae({typed:e}),u=se({typed:e});return e("lcm",{"number, number":Tt,"BigNumber, BigNumber":function(t,e){if(!t.isInt()||!e.isInt())throw new Error("Parameters in function lcm must be integer numbers");if(t.isZero())return t;if(e.isZero())return e;for(var n=t.times(e);!e.isZero();){var r=e;e=t.mod(r),t=r}return n.div(t).abs()},"Fraction, Fraction":function(t,e){return t.lcm(e)},"SparseMatrix, SparseMatrix":function(t,e){return o(t,e,this)},"SparseMatrix, DenseMatrix":function(t,e){return i(e,t,this,!0)},"DenseMatrix, SparseMatrix":function(t,e){return i(t,e,this,!1)},"DenseMatrix, DenseMatrix":function(t,e){return s(t,e,this)},"Array, Array":function(t,e){return this(n(t),n(e)).valueOf()},"Array, Matrix":function(t,e){return this(n(t),e)},"Matrix, Array":function(t,e){return this(t,n(e))},"SparseMatrix, number | BigNumber":function(t,e){return a(t,e,this,!1)},"DenseMatrix, number | BigNumber":function(t,e){return u(t,e,this,!1)},"number | BigNumber, SparseMatrix":function(t,e){return a(e,t,this,!0)},"number | BigNumber, DenseMatrix":function(t,e){return u(e,t,this,!0)},"Array, number | BigNumber":function(t,e){return u(n(t),e,this,!1).valueOf()},"number | BigNumber, Array":function(t,e){return u(n(e),t,this,!0).valueOf()},"Array | Matrix | number | BigNumber, Array | Matrix | number | BigNumber, ...Array | Matrix | number | BigNumber":function(t,e,n){for(var r=this(t,e),i=0;i<n.length;i++)r=this(r,n[i]);return r}})})),de=Object(s.a)("log10",["typed","config","Complex"],(function(t){var e=t.typed,n=t.config,r=t.Complex;return e("log10",{number:function(t){return 0<=t||n.predictable?At(t):new r(t,0).log().div(Math.LN10)},Complex:function(t){return new r(t).log().div(Math.LN10)},BigNumber:function(t){return!t.isNegative()||n.predictable?t.log():new r(t.toNumber(),0).log().div(Math.LN10)},"Array | Matrix":function(t){return I(t,this)}})})),pe=Object(s.a)("log2",["typed","config","Complex"],(function(t){var e=t.typed,n=t.config,r=t.Complex;return e("log2",{number:function(t){return 0<=t||n.predictable?jt(t):i(new r(t,0))},Complex:i,BigNumber:function(t){return!t.isNegative()||n.predictable?t.log(2):i(new r(t.toNumber(),0))},"Array | Matrix":function(t){return I(t,this)}});function i(t){var e=Math.sqrt(t.re*t.re+t.im*t.im);return new r(Math.log2?Math.log2(e):Math.log(e)/Math.LN2,Math.atan2(t.im,t.re)/Math.LN2)}})),me=Object(s.a)("algorithm03",["typed"],(function(t){var e=t.typed;return function(t,n,r,i){var o=t._data,a=t._size,s=t._datatype,u=n._values,l=n._index,c=n._ptr,f=n._size,h=n._datatype;if(a.length!==f.length)throw new C.a(a.length,f.length);if(a[0]!==f[0]||a[1]!==f[1])throw new RangeError("Dimension mismatch. Matrix A ("+a+") must match Matrix B ("+f+")");if(!u)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var d,p=a[0],m=a[1],g=0,v=r;"string"==typeof s&&s===h&&(d=s,g=e.convert(0,d),v=e.find(r,[d,d]));for(var y=[],b=0;b<p;b++)y[b]=[];for(var x=[],w=[],_=0;_<m;_++){for(var S=_+1,O=c[_],N=c[_+1],M=O;M<N;M++){var E=l[M];x[E]=i?v(u[M],o[E][_]):v(o[E][_],u[M]),w[E]=S}for(var k=0;k<p;k++)w[k]===S?y[k][_]=x[k]:y[k][_]=i?v(g,o[k][_]):v(o[k][_],g)}return t.createDenseMatrix({data:y,size:[p,m],datatype:d})}})),ge=Object(s.a)("algorithm05",["typed","equalScalar"],(function(t){var e=t.typed,n=t.equalScalar;return function(t,r,i){var o=t._values,a=t._index,s=t._ptr,u=t._size,l=t._datatype,c=r._values,f=r._index,h=r._ptr,d=r._size,p=r._datatype;if(u.length!==d.length)throw new C.a(u.length,d.length);if(u[0]!==d[0]||u[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+d+")");var m,g=u[0],v=u[1],y=n,b=0,x=i;"string"==typeof l&&l===p&&(m=l,y=e.find(n,[m,m]),b=e.convert(0,m),x=e.find(i,[m,m]));for(var w,_=o&&c?[]:void 0,S=[],O=[],N=_?[]:void 0,M=_?[]:void 0,E=[],k=[],T=0;T<v;T++){O[T]=S.length;for(var D=T+1,A=s[T],j=s[T+1];A<j;A++)w=a[A],S.push(w),E[w]=D,N&&(N[w]=o[A]);for(A=h[T],j=h[T+1];A<j;A++)E[w=f[A]]!==D&&S.push(w),k[w]=D,M&&(M[w]=c[A]);if(_)for(A=O[T];A<S.length;){var P,I=E[w=S[A]],R=k[w];I!==D&&R!==D||(y(P=x(I===D?N[w]:b,R===D?M[w]:b),b)?S.splice(A,1):(_.push(P),A++))}}return O[v]=S.length,t.createSparseMatrix({values:_,index:S,ptr:O,size:[g,v],datatype:m})}})),ve=Object(s.a)("algorithm12",["typed","DenseMatrix"],(function(t){var e=t.typed,n=t.DenseMatrix;return function(t,r,i,o){var a=t._values,s=t._index,u=t._ptr,l=t._size,c=t._datatype;if(!a)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var f,h=l[0],d=l[1],p=i;"string"==typeof c&&(f=c,r=e.convert(r,f),p=e.find(i,[f,f]));for(var m=[],g=[],v=[],y=0;y<d;y++){for(var b=y+1,x=u[y],w=u[y+1],_=x;_<w;_++){var S=s[_];g[S]=a[_],v[S]=b}for(var O=0;O<h;O++)0===y&&(m[O]=[]),v[O]===b?m[O][y]=o?p(r,g[O]):p(g[O],r):m[O][y]=o?p(r,0):p(0,r)}return new n({data:m,size:[h,d],datatype:f})}})),ye=Object(s.a)("mod",["typed","matrix","equalScalar","DenseMatrix"],(function(t){var e=t.typed,n=t.matrix,r=t.equalScalar,i=t.DenseMatrix,o=le({typed:e,equalScalar:r}),a=me({typed:e}),s=ge({typed:e,equalScalar:r}),u=fe({typed:e,equalScalar:r}),l=ve({typed:e,DenseMatrix:i}),c=ae({typed:e}),f=se({typed:e});return e("mod",{"number, number":Pt,"BigNumber, BigNumber":function(t,e){return e.isZero()?t:t.mod(e)},"Fraction, Fraction":function(t,e){return t.mod(e)},"SparseMatrix, SparseMatrix":function(t,e){return s(t,e,this,!1)},"SparseMatrix, DenseMatrix":function(t,e){return o(e,t,this,!0)},"DenseMatrix, SparseMatrix":function(t,e){return a(t,e,this,!1)},"DenseMatrix, DenseMatrix":function(t,e){return c(t,e,this)},"Array, Array":function(t,e){return this(n(t),n(e)).valueOf()},"Array, Matrix":function(t,e){return this(n(t),e)},"Matrix, Array":function(t,e){return this(t,n(e))},"SparseMatrix, any":function(t,e){return u(t,e,this,!1)},"DenseMatrix, any":function(t,e){return f(t,e,this,!1)},"any, SparseMatrix":function(t,e){return l(e,t,this,!0)},"any, DenseMatrix":function(t,e){return f(e,t,this,!0)},"Array, any":function(t,e){return f(n(t),e,this,!1).valueOf()},"any, Array":function(t,e){return f(n(e),t,this,!0).valueOf()}})})),be=Object(s.a)("multiplyScalar",["typed"],(function(t){return(0,t.typed)("multiplyScalar",{"number, number":wt,"Complex, Complex":function(t,e){return t.mul(e)},"BigNumber, BigNumber":function(t,e){return t.times(e)},"Fraction, Fraction":function(t,e){return t.mul(e)},"number | Fraction | BigNumber | Complex, Unit":function(t,e){var n=e.clone();return n.value=null===n.value?n._normalize(t):this(n.value,t),n},"Unit, number | Fraction | BigNumber | Complex":function(t,e){var n=t.clone();return n.value=null===n.value?n._normalize(e):this(n.value,e),n},"Unit, Unit":function(t,e){return t.multiply(e)}})})),xe="multiply",we=Object(s.a)(xe,["typed","matrix","addScalar","multiplyScalar","equalScalar","dot"],(function(t){var e=t.typed,n=t.matrix,i=t.addScalar,o=t.multiplyScalar,a=t.equalScalar,s=t.dot,u=fe({typed:e,equalScalar:a}),l=se({typed:e});function c(t,e){switch(t.length){case 1:switch(e.length){case 1:if(t[0]!==e[0])throw new RangeError("Dimension mismatch in multiplication. Vectors must have the same length");break;case 2:if(t[0]!==e[0])throw new RangeError("Dimension mismatch in multiplication. Vector length ("+t[0]+") must match Matrix rows ("+e[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+e.length+" dimensions)")}break;case 2:switch(e.length){case 1:if(t[1]!==e[0])throw new RangeError("Dimension mismatch in multiplication. Matrix columns ("+t[1]+") must match Vector length ("+e[0]+")");break;case 2:if(t[1]!==e[0])throw new RangeError("Dimension mismatch in multiplication. Matrix A columns ("+t[1]+") must match Matrix B rows ("+e[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+e.length+" dimensions)")}break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix A has "+t.length+" dimensions)")}}var f=e("_multiplyMatrixVector",{"DenseMatrix, any":function(t,n){var r,a=t._data,s=t._size,u=t._datatype,l=n._data,c=n._datatype,f=s[0],h=s[1],d=i,p=o;u&&c&&u===c&&"string"==typeof u&&(r=u,d=e.find(i,[r,r]),p=e.find(o,[r,r]));for(var m=[],g=0;g<f;g++){for(var v=a[g],y=p(v[0],l[0]),b=1;b<h;b++)y=d(y,p(v[b],l[b]));m[g]=y}return t.createDenseMatrix({data:m,size:[f],datatype:r})},"SparseMatrix, any":function(t,n){var r=t._values,s=t._index,u=t._ptr,l=t._datatype;if(!r)throw new Error("Cannot multiply Pattern only Matrix times Dense Matrix");var c,f=n._data,h=n._datatype,d=t._size[0],p=n._size[0],m=[],g=[],v=[],y=i,b=o,x=a,w=0;l&&h&&l===h&&"string"==typeof l&&(c=l,y=e.find(i,[c,c]),b=e.find(o,[c,c]),x=e.find(a,[c,c]),w=e.convert(0,c));for(var _=[],S=[],O=v[0]=0;O<p;O++){var N=f[O];if(!x(N,w))for(var M=u[O],E=u[O+1],k=M;k<E;k++){var C=s[k];S[C]?_[C]=y(_[C],b(N,r[k])):(S[C]=!0,g.push(C),_[C]=b(N,r[k]))}}for(var T=g.length,D=0;D<T;D++){var A=g[D];m[D]=_[A]}return v[1]=g.length,t.createSparseMatrix({values:m,index:g,ptr:v,size:[d,1],datatype:c})}}),h=e("_multiplyMatrixMatrix",{"DenseMatrix, DenseMatrix":function(t,n){var r,a=t._data,s=t._size,u=t._datatype,l=n._data,c=n._size,f=n._datatype,h=s[0],d=s[1],p=c[1],m=i,g=o;u&&f&&u===f&&"string"==typeof u&&(r=u,m=e.find(i,[r,r]),g=e.find(o,[r,r]));for(var v=[],y=0;y<h;y++){var b=a[y];v[y]=[];for(var x=0;x<p;x++){for(var w=g(b[0],l[0][x]),_=1;_<d;_++)w=m(w,g(b[_],l[_][x]));v[y][x]=w}}return t.createDenseMatrix({data:v,size:[h,p],datatype:r})},"DenseMatrix, SparseMatrix":function(t,n){var r=t._data,s=t._size,u=t._datatype,l=n._values,c=n._index,f=n._ptr,h=n._size,d=n._datatype;if(!l)throw new Error("Cannot multiply Dense Matrix times Pattern only Matrix");var p,m=s[0],g=h[1],v=i,y=o,b=a,x=0;u&&d&&u===d&&"string"==typeof u&&(p=u,v=e.find(i,[p,p]),y=e.find(o,[p,p]),b=e.find(a,[p,p]),x=e.convert(0,p));for(var w=[],_=[],S=[],O=n.createSparseMatrix({values:w,index:_,ptr:S,size:[m,g],datatype:p}),N=0;N<g;N++){S[N]=_.length;var M=f[N],E=f[N+1];if(M<E)for(var k=0,C=0;C<m;C++){for(var T=C+1,D=void 0,A=M;A<E;A++){var j=c[A];k!==T?(D=y(r[C][j],l[A]),k=T):D=v(D,y(r[C][j],l[A]))}k!==T||b(D,x)||(_.push(C),w.push(D))}}return S[g]=_.length,O},"SparseMatrix, DenseMatrix":function(t,n){var r=t._values,s=t._index,u=t._ptr,l=t._datatype;if(!r)throw new Error("Cannot multiply Pattern only Matrix times Dense Matrix");var c,f=n._data,h=n._datatype,d=t._size[0],p=n._size[0],m=n._size[1],g=i,v=o,y=a,b=0;l&&h&&l===h&&"string"==typeof l&&(c=l,g=e.find(i,[c,c]),v=e.find(o,[c,c]),y=e.find(a,[c,c]),b=e.convert(0,c));for(var x=[],w=[],_=[],S=t.createSparseMatrix({values:x,index:w,ptr:_,size:[d,m],datatype:c}),O=[],N=[],M=0;M<m;M++){_[M]=w.length;for(var E=M+1,k=0;k<p;k++){var C=f[k][M];if(!y(C,b))for(var T=u[k],D=u[k+1],A=T;A<D;A++){var j=s[A];N[j]!==E?(N[j]=E,w.push(j),O[j]=v(C,r[A])):O[j]=g(O[j],v(C,r[A]))}}for(var P=_[M],I=w.length,R=P;R<I;R++){var L=w[R];x[R]=O[L]}}return _[m]=w.length,S},"SparseMatrix, SparseMatrix":function(t,n){var r,a=t._values,s=t._index,u=t._ptr,l=t._datatype,c=n._values,f=n._index,h=n._ptr,d=n._datatype,p=t._size[0],m=n._size[1],g=a&&c,v=i,y=o;l&&d&&l===d&&"string"==typeof l&&(r=l,v=e.find(i,[r,r]),y=e.find(o,[r,r]));for(var b,x,w,_,S,O,N,M,E=g?[]:void 0,k=[],C=[],T=t.createSparseMatrix({values:E,index:k,ptr:C,size:[p,m],datatype:r}),D=g?[]:void 0,A=[],j=0;j<m;j++){C[j]=k.length;var P=j+1;for(S=h[j],O=h[j+1],_=S;_<O;_++)if(M=f[_],g)for(x=u[M],w=u[M+1],b=x;b<w;b++)A[N=s[b]]!==P?(A[N]=P,k.push(N),D[N]=y(c[_],a[b])):D[N]=v(D[N],y(c[_],a[b]));else for(x=u[M],w=u[M+1],b=x;b<w;b++)A[N=s[b]]!==P&&(A[N]=P,k.push(N));if(g)for(var I=C[j],R=k.length,L=I;L<R;L++){var F=k[L];E[L]=D[F]}}return C[m]=k.length,T}});return e(xe,Object(k.e)({"Array, Array":function(t,e){c(Object(M.a)(t),Object(M.a)(e));var i=this(n(t),n(e));return Object(r.v)(i)?i.valueOf():i},"Matrix, Matrix":function(t,n){var r=t.size(),a=n.size();return c(r,a),1===r.length?1===a.length?function(t,e,n){if(0===n)throw new Error("Cannot multiply two empty vectors");return s(t,e)}(t,n,r[0]):function(t,n){if("dense"!==n.storage())throw new Error("Support for SparseMatrix not implemented");return function(t,n){var r,a=t._data,s=t._size,u=t._datatype,l=n._data,c=n._size,f=n._datatype,h=s[0],d=c[1],p=i,m=o;u&&f&&u===f&&"string"==typeof u&&(r=u,p=e.find(i,[r,r]),m=e.find(o,[r,r]));for(var g=[],v=0;v<d;v++){for(var y=m(a[0],l[0][v]),b=1;b<h;b++)y=p(y,m(a[b],l[b][v]));g[v]=y}return t.createDenseMatrix({data:g,size:[d],datatype:r})}(t,n)}(t,n):(1===a.length?f:h)(t,n)},"Matrix, Array":function(t,e){return this(t,n(e))},"Array, Matrix":function(t,e){return this(n(t,e.storage()),e)},"SparseMatrix, any":function(t,e){return u(t,e,o,!1)},"DenseMatrix, any":function(t,e){return l(t,e,o,!1)},"any, SparseMatrix":function(t,e){return u(e,t,o,!0)},"any, DenseMatrix":function(t,e){return l(e,t,o,!0)},"Array, any":function(t,e){return l(n(t),e,o,!1).valueOf()},"any, Array":function(t,e){return l(n(e),t,o,!0).valueOf()},"any, any":o,"any, any, ...any":function(t,e,n){for(var r=this(t,e),i=0;i<n.length;i++)r=this(r,n[i]);return r}},o.signatures))})),_e="nthRoot",Se=Object(s.a)(_e,["typed","matrix","equalScalar","BigNumber"],(function(t){var e=t.typed,n=t.matrix,r=t.equalScalar,i=t.BigNumber,o=re({typed:e}),a=le({typed:e,equalScalar:r}),s=ce({typed:e,equalScalar:r}),u=fe({typed:e,equalScalar:r}),l=ae({typed:e}),c=se({typed:e}),f="Complex number not supported in function nthRoot. Use nthRoots instead.";return e(_e,{number:function(t){return It(t,2)},"number, number":It,BigNumber:function(t){return h(t,new i(2))},Complex:function(){throw new Error(f)},"Complex, number":function(){throw new Error(f)},"BigNumber, BigNumber":h,"Array | Matrix":function(t){return this(t,2)},"SparseMatrix, SparseMatrix":function(t,e){if(1===e.density())return s(t,e,this);throw new Error("Root must be non-zero")},"SparseMatrix, DenseMatrix":function(t,e){return a(e,t,this,!0)},"DenseMatrix, SparseMatrix":function(t,e){if(1===e.density())return o(t,e,this,!1);throw new Error("Root must be non-zero")},"DenseMatrix, DenseMatrix":function(t,e){return l(t,e,this)},"Array, Array":function(t,e){return this(n(t),n(e)).valueOf()},"Array, Matrix":function(t,e){return this(n(t),e)},"Matrix, Array":function(t,e){return this(t,n(e))},"SparseMatrix, number | BigNumber":function(t,e){return u(t,e,this,!1)},"DenseMatrix, number | BigNumber":function(t,e){return c(t,e,this,!1)},"number | BigNumber, SparseMatrix":function(t,e){if(1===e.density())return u(e,t,this,!0);throw new Error("Root must be non-zero")},"number | BigNumber, DenseMatrix":function(t,e){return c(e,t,this,!0)},"Array, number | BigNumber":function(t,e){return this(n(t),e).valueOf()},"number | BigNumber, Array":function(t,e){return this(t,n(e)).valueOf()}});function h(t,e){var n=i.precision,r=i.clone({precision:n+2}),o=new i(0),a=new r(1),s=e.isNegative();if(s&&(e=e.neg()),e.isZero())throw new Error("Root must be non-zero");if(t.isNegative()&&!e.abs().mod(2).equals(1))throw new Error("Root must be odd when a is negative.");if(t.isZero())return s?new r(1/0):0;if(!t.isFinite())return s?o:t;var u=t.abs().pow(a.div(e));return u=t.isNeg()?u.neg():u,new i((s?a.div(u):u).toPrecision(n))}})),Oe=Object(s.a)("sign",["typed","BigNumber","Fraction","complex"],(function(t){var e=t.typed,n=t.BigNumber,r=t.complex,i=t.Fraction;return e("sign",{number:Rt,Complex:function(t){return 0===t.im?r(Rt(t.re)):t.sign()},BigNumber:function(t){return new n(t.cmp(0))},Fraction:function(t){return new i(t.s,1)},"Array | Matrix":function(t){return I(t,this,!0)},Unit:function(t){return this(t.value)}})})),Ne=Object(s.a)("sqrt",["config","typed","Complex"],(function(t){var e=t.config,n=t.typed,r=t.Complex;return n("sqrt",{number:i,Complex:function(t){return t.sqrt()},BigNumber:function(t){return!t.isNegative()||e.predictable?t.sqrt():i(t.toNumber())},"Array | Matrix":function(t){return I(t,this,!0)},Unit:function(t){return t.pow(.5)}});function i(t){return isNaN(t)?NaN:0<=t||e.predictable?Math.sqrt(t):new r(t,0).sqrt()}})),Me=Object(s.a)("square",["typed"],(function(t){return(0,t.typed)("square",{number:Lt,Complex:function(t){return t.mul(t)},BigNumber:function(t){return t.times(t)},Fraction:function(t){return t.mul(t)},"Array | Matrix":function(t){return I(t,this,!0)},Unit:function(t){return t.pow(2)}})})),Ee="subtract",ke=Object(s.a)(Ee,["typed","matrix","equalScalar","addScalar","unaryMinus","DenseMatrix"],(function(t){var e=t.typed,n=t.matrix,r=t.equalScalar,i=t.addScalar,o=t.unaryMinus,a=t.DenseMatrix,s=re({typed:e}),u=me({typed:e}),l=ge({typed:e,equalScalar:r}),c=oe({typed:e,DenseMatrix:a}),f=ae({typed:e}),h=se({typed:e});return e(Ee,{"number, number":function(t,e){return t-e},"Complex, Complex":function(t,e){return t.sub(e)},"BigNumber, BigNumber":function(t,e){return t.minus(e)},"Fraction, Fraction":function(t,e){return t.sub(e)},"Unit, Unit":function(t,e){if(null===t.value)throw new Error("Parameter x contains a unit with undefined value");if(null===e.value)throw new Error("Parameter y contains a unit with undefined value");if(!t.equalBase(e))throw new Error("Units do not match");var n=t.clone();return n.value=this(n.value,e.value),n.fixPrefix=!1,n},"SparseMatrix, SparseMatrix":function(t,e){return Ce(t,e),l(t,e,this)},"SparseMatrix, DenseMatrix":function(t,e){return Ce(t,e),u(e,t,this,!0)},"DenseMatrix, SparseMatrix":function(t,e){return Ce(t,e),s(t,e,this,!1)},"DenseMatrix, DenseMatrix":function(t,e){return Ce(t,e),f(t,e,this)},"Array, Array":function(t,e){return this(n(t),n(e)).valueOf()},"Array, Matrix":function(t,e){return this(n(t),e)},"Matrix, Array":function(t,e){return this(t,n(e))},"SparseMatrix, any":function(t,e){return c(t,o(e),i)},"DenseMatrix, any":function(t,e){return h(t,e,this)},"any, SparseMatrix":function(t,e){return c(e,t,this,!0)},"any, DenseMatrix":function(t,e){return h(e,t,this,!0)},"Array, any":function(t,e){return h(n(t),e,this,!1).valueOf()},"any, Array":function(t,e){return h(n(e),t,this,!0).valueOf()}})}));function Ce(t,e){var n=t.size(),r=e.size();if(n.length!==r.length)throw new C.a(n.length,r.length)}var Te=Object(s.a)("xgcd",["typed","config","matrix","BigNumber"],(function(t){var e=t.typed,n=t.config,r=t.matrix,i=t.BigNumber;return e("xgcd",{"number, number":function(t,e){var i=Ft(t,e);return"Array"===n.matrix?i:r(i)},"BigNumber, BigNumber":function(t,e){var o,a,s,u,l=new i(0),c=new i(1),f=l,h=c,d=c,p=l;if(!t.isInt()||!e.isInt())throw new Error("Parameters in function xgcd must be integer numbers");for(;!e.isZero();)a=t.div(e).floor(),s=t.mod(e),o=f,f=h.minus(a.times(f)),h=o,o=d,d=p.minus(a.times(d)),p=o,t=e,e=s;return u=t.lt(l)?[t.neg(),h.neg(),p.neg()]:[t,t.isZero()?0:h,p],"Array"===n.matrix?u:r(u)}})})),De=Object(s.a)("algorithm09",["typed","equalScalar"],(function(t){var e=t.typed,n=t.equalScalar;return function(t,r,i){var o=t._values,a=t._index,s=t._ptr,u=t._size,l=t._datatype,c=r._values,f=r._index,h=r._ptr,d=r._size,p=r._datatype;if(u.length!==d.length)throw new C.a(u.length,d.length);if(u[0]!==d[0]||u[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+d+")");var m,g=u[0],v=u[1],y=n,b=0,x=i;"string"==typeof l&&l===p&&(m=l,y=e.find(n,[m,m]),b=e.convert(0,m),x=e.find(i,[m,m]));for(var w,_,S,O=o&&c?[]:void 0,N=[],M=[],E=O?[]:void 0,k=[],T=0;T<v;T++){M[T]=N.length;var D=T+1;if(E)for(_=h[T],S=h[T+1],w=_;w<S;w++)k[P=f[w]]=D,E[P]=c[w];for(_=s[T],S=s[T+1],w=_;w<S;w++){var A,j,P=a[w];E?(A=k[P]===D?E[P]:b,y(j=x(o[w],A),b)||(N.push(P),O.push(j))):N.push(P)}}return M[v]=N.length,t.createSparseMatrix({values:O,index:N,ptr:M,size:[g,v],datatype:m})}})),Ae="dotMultiply",je=Object(s.a)(Ae,["typed","matrix","equalScalar","multiplyScalar"],(function(t){var e=t.typed,n=t.matrix,r=t.equalScalar,i=t.multiplyScalar,o=le({typed:e,equalScalar:r}),a=De({typed:e,equalScalar:r}),s=fe({typed:e,equalScalar:r}),u=ae({typed:e}),l=se({typed:e});return e(Ae,{"any, any":i,"SparseMatrix, SparseMatrix":function(t,e){return a(t,e,i,!1)},"SparseMatrix, DenseMatrix":function(t,e){return o(e,t,i,!0)},"DenseMatrix, SparseMatrix":function(t,e){return o(t,e,i,!1)},"DenseMatrix, DenseMatrix":function(t,e){return u(t,e,i)},"Array, Array":function(t,e){return this(n(t),n(e)).valueOf()},"Array, Matrix":function(t,e){return this(n(t),e)},"Matrix, Array":function(t,e){return this(t,n(e))},"SparseMatrix, any":function(t,e){return s(t,e,i,!1)},"DenseMatrix, any":function(t,e){return l(t,e,i,!1)},"any, SparseMatrix":function(t,e){return s(e,t,i,!0)},"any, DenseMatrix":function(t,e){return l(e,t,i,!0)},"Array, any":function(t,e){return l(n(t),e,i,!1).valueOf()},"any, Array":function(t,e){return l(n(e),t,i,!0).valueOf()}})}));function Pe(t,e){if(t.isFinite()&&!t.isInteger()||e.isFinite()&&!e.isInteger())throw new Error("Integers expected in function bitAnd");var n=t.constructor;if(t.isNaN()||e.isNaN())return new n(NaN);if(t.isZero()||e.eq(-1)||t.eq(e))return t;if(e.isZero()||t.eq(-1))return e;if(!t.isFinite()||!e.isFinite()){if(!t.isFinite()&&!e.isFinite())return t.isNegative()===e.isNegative()?t:new n(0);if(!t.isFinite())return e.isNegative()?t:t.isNegative()?new n(0):e;if(!e.isFinite())return t.isNegative()?e:e.isNegative()?new n(0):t}return Le(t,e,(function(t,e){return t&e}))}function Ie(t){if(t.isFinite()&&!t.isInteger())throw new Error("Integer expected in function bitNot");var e=t.constructor,n=e.precision;e.config({precision:1e9});var r=t.plus(new e(1));return r.s=-r.s||null,e.config({precision:n}),r}function Re(t,e){if(t.isFinite()&&!t.isInteger()||e.isFinite()&&!e.isInteger())throw new Error("Integers expected in function bitOr");var n=t.constructor;if(t.isNaN()||e.isNaN())return new n(NaN);var r=new n(-1);return t.isZero()||e.eq(r)||t.eq(e)?e:e.isZero()||t.eq(r)?t:t.isFinite()&&e.isFinite()?Le(t,e,(function(t,e){return t|e})):!t.isFinite()&&!t.isNegative()&&e.isNegative()||t.isNegative()&&!e.isNegative()&&!e.isFinite()?r:t.isNegative()&&e.isNegative()?t.isFinite()?t:e:t.isFinite()?e:t}function Le(t,e,n){var r,i,o,a,s,u=t.constructor,l=+(t.s<0),c=+(e.s<0);if(l){r=Fe(Ie(t));for(var f=0;f<r.length;++f)r[f]^=1}else r=Fe(t);if(c){i=Fe(Ie(e));for(var h=0;h<i.length;++h)i[h]^=1}else i=Fe(e);s=r.length<=i.length?(o=r,a=i,l):(o=i,a=r,c);var d=o.length,p=a.length,m=1^n(l,c),g=new u(1^m),v=new u(1),y=new u(2),b=u.precision;for(u.config({precision:1e9});0<d;)n(o[--d],a[--p])===m&&(g=g.plus(v)),v=v.times(y);for(;0<p;)n(s,a[--p])===m&&(g=g.plus(v)),v=v.times(y);return u.config({precision:b}),0==m&&(g.s=-g.s),g}function Fe(t){for(var e=t.d,n=e[0]+"",r=1;r<e.length;++r){for(var i=e[r]+"",o=7-i.length;o--;)i="0"+i;n+=i}for(var a=n.length;"0"===n.charAt(a);)a--;var s=t.e,u=n.slice(0,a+1||1),l=u.length;if(0<s)if(++s>l)for(s-=l;s--;)u+="0";else s<l&&(u=u.slice(0,s)+"."+u.slice(s));for(var c=[0],f=0;f<u.length;){for(var h=c.length;h--;)c[h]*=10;c[0]+=parseInt(u.charAt(f++));for(var d=0;d<c.length;++d)1<c[d]&&(null!==c[d+1]&&void 0!==c[d+1]||(c[d+1]=0),c[d+1]+=c[d]>>1,c[d]&=1)}return c.reverse()}function qe(t,e){if(t.isFinite()&&!t.isInteger()||e.isFinite()&&!e.isInteger())throw new Error("Integers expected in function bitXor");var n=t.constructor;if(t.isNaN()||e.isNaN())return new n(NaN);if(t.isZero())return e;if(e.isZero())return t;if(t.eq(e))return new n(0);var r=new n(-1);return t.eq(r)?Ie(e):e.eq(r)?Ie(t):t.isFinite()&&e.isFinite()?Le(t,e,(function(t,e){return t^e})):t.isFinite()||e.isFinite()?new n(t.isNegative()===e.isNegative()?1/0:-1/0):r}function Be(t,e){if(t.isFinite()&&!t.isInteger()||e.isFinite()&&!e.isInteger())throw new Error("Integers expected in function leftShift");var n=t.constructor;return t.isNaN()||e.isNaN()||e.isNegative()&&!e.isZero()?new n(NaN):t.isZero()||e.isZero()?t:t.isFinite()||e.isFinite()?e.lt(55)?t.times(Math.pow(2,e.toNumber())+""):t.times(new n(2).pow(e)):new n(NaN)}function ze(t,e){if(t.isFinite()&&!t.isInteger()||e.isFinite()&&!e.isInteger())throw new Error("Integers expected in function rightArithShift");var n=t.constructor;return t.isNaN()||e.isNaN()||e.isNegative()&&!e.isZero()?new n(NaN):t.isZero()||e.isZero()?t:e.isFinite()?e.lt(55)?t.div(Math.pow(2,e.toNumber())+"").floor():t.div(new n(2).pow(e)).floor():t.isNegative()?new n(-1):t.isFinite()?new n(0):new n(NaN)}var He="number, number";function Ue(t,e){if(!Object(a.i)(t)||!Object(a.i)(e))throw new Error("Integers expected in function bitAnd");return t&e}function We(t){if(!Object(a.i)(t))throw new Error("Integer expected in function bitNot");return~t}function Ve(t,e){if(!Object(a.i)(t)||!Object(a.i)(e))throw new Error("Integers expected in function bitOr");return t|e}function $e(t,e){if(!Object(a.i)(t)||!Object(a.i)(e))throw new Error("Integers expected in function bitXor");return t^e}function Ye(t,e){if(!Object(a.i)(t)||!Object(a.i)(e))throw new Error("Integers expected in function leftShift");return t<<e}function Ze(t,e){if(!Object(a.i)(t)||!Object(a.i)(e))throw new Error("Integers expected in function rightArithShift");return t>>e}function Ge(t,e){if(!Object(a.i)(t)||!Object(a.i)(e))throw new Error("Integers expected in function rightLogShift");return t>>>e}Ue.signature=He,We.signature="number",Ge.signature=Ze.signature=Ye.signature=$e.signature=Ve.signature=He;var Ke=Object(s.a)("bitAnd",["typed","matrix","equalScalar"],(function(t){var e=t.typed,n=t.matrix,r=t.equalScalar,i=le({typed:e,equalScalar:r}),o=ce({typed:e,equalScalar:r}),a=fe({typed:e,equalScalar:r}),s=ae({typed:e}),u=se({typed:e});return e("bitAnd",{"number, number":Ue,"BigNumber, BigNumber":Pe,"SparseMatrix, SparseMatrix":function(t,e){return o(t,e,this,!1)},"SparseMatrix, DenseMatrix":function(t,e){return i(e,t,this,!0)},"DenseMatrix, SparseMatrix":function(t,e){return i(t,e,this,!1)},"DenseMatrix, DenseMatrix":function(t,e){return s(t,e,this)},"Array, Array":function(t,e){return this(n(t),n(e)).valueOf()},"Array, Matrix":function(t,e){return this(n(t),e)},"Matrix, Array":function(t,e){return this(t,n(e))},"SparseMatrix, any":function(t,e){return a(t,e,this,!1)},"DenseMatrix, any":function(t,e){return u(t,e,this,!1)},"any, SparseMatrix":function(t,e){return a(e,t,this,!0)},"any, DenseMatrix":function(t,e){return u(e,t,this,!0)},"Array, any":function(t,e){return u(n(t),e,this,!1).valueOf()},"any, Array":function(t,e){return u(n(e),t,this,!0).valueOf()}})})),Xe=Object(s.a)("bitNot",["typed"],(function(t){return(0,t.typed)("bitNot",{number:We,BigNumber:Ie,"Array | Matrix":function(t){return I(t,this)}})})),Je=Object(s.a)("bitOr",["typed","matrix","equalScalar","DenseMatrix"],(function(t){var e=t.typed,n=t.matrix,r=t.equalScalar,i=t.DenseMatrix,o=re({typed:e}),a=ie({typed:e,equalScalar:r}),s=oe({typed:e,DenseMatrix:i}),u=ae({typed:e}),l=se({typed:e});return e("bitOr",{"number, number":Ve,"BigNumber, BigNumber":Re,"SparseMatrix, SparseMatrix":function(t,e){return a(t,e,this)},"SparseMatrix, DenseMatrix":function(t,e){return o(e,t,this,!0)},"DenseMatrix, SparseMatrix":function(t,e){return o(t,e,this,!1)},"DenseMatrix, DenseMatrix":function(t,e){return u(t,e,this)},"Array, Array":function(t,e){return this(n(t),n(e)).valueOf()},"Array, Matrix":function(t,e){return this(n(t),e)},"Matrix, Array":function(t,e){return this(t,n(e))},"SparseMatrix, any":function(t,e){return s(t,e,this,!1)},"DenseMatrix, any":function(t,e){return l(t,e,this,!1)},"any, SparseMatrix":function(t,e){return s(e,t,this,!0)},"any, DenseMatrix":function(t,e){return l(e,t,this,!0)},"Array, any":function(t,e){return l(n(t),e,this,!1).valueOf()},"any, Array":function(t,e){return l(n(e),t,this,!0).valueOf()}})})),Qe=Object(s.a)("algorithm07",["typed","DenseMatrix"],(function(t){var e=t.typed,n=t.DenseMatrix;return function(t,i,o){var a=t._size,s=t._datatype,u=i._size,l=i._datatype;if(a.length!==u.length)throw new C.a(a.length,u.length);if(a[0]!==u[0]||a[1]!==u[1])throw new RangeError("Dimension mismatch. Matrix A ("+a+") must match Matrix B ("+u+")");var c,f=a[0],h=a[1],d=0,p=o;"string"==typeof s&&s===l&&(c=s,d=e.convert(0,c),p=e.find(o,[c,c]));for(var m=[],g=0;g<f;g++)m[g]=[];for(var v=[],y=[],b=[],x=[],w=0;w<h;w++){var _=w+1;for(r(t,w,b,v,_),r(i,w,x,y,_),g=0;g<f;g++){var S=b[g]===_?v[g]:d,O=x[g]===_?y[g]:d;m[g][w]=p(S,O)}}return new n({data:m,size:[f,h],datatype:c})};function r(t,e,n,r,i){for(var o=t._values,a=t._index,s=t._ptr,u=s[e],l=s[e+1];u<l;u++){var c=a[u];n[c]=i,r[c]=o[u]}}})),tn=Object(s.a)("bitXor",["typed","matrix","DenseMatrix"],(function(t){var e=t.typed,n=t.matrix,r=t.DenseMatrix,i=me({typed:e}),o=Qe({typed:e,DenseMatrix:r}),a=ve({typed:e,DenseMatrix:r}),s=ae({typed:e}),u=se({typed:e});return e("bitXor",{"number, number":$e,"BigNumber, BigNumber":qe,"SparseMatrix, SparseMatrix":function(t,e){return o(t,e,this)},"SparseMatrix, DenseMatrix":function(t,e){return i(e,t,this,!0)},"DenseMatrix, SparseMatrix":function(t,e){return i(t,e,this,!1)},"DenseMatrix, DenseMatrix":function(t,e){return s(t,e,this)},"Array, Array":function(t,e){return this(n(t),n(e)).valueOf()},"Array, Matrix":function(t,e){return this(n(t),e)},"Matrix, Array":function(t,e){return this(t,n(e))},"SparseMatrix, any":function(t,e){return a(t,e,this,!1)},"DenseMatrix, any":function(t,e){return u(t,e,this,!1)},"any, SparseMatrix":function(t,e){return a(e,t,this,!0)},"any, DenseMatrix":function(t,e){return u(e,t,this,!0)},"Array, any":function(t,e){return u(n(t),e,this,!1).valueOf()},"any, Array":function(t,e){return u(n(e),t,this,!0).valueOf()}})})),en=Object(s.a)("arg",["typed"],(function(t){return(0,t.typed)("arg",{number:function(t){return Math.atan2(0,t)},BigNumber:function(t){return t.constructor.atan2(0,t)},Complex:function(t){return t.arg()},"Array | Matrix":function(t){return I(t,this)}})})),nn=Object(s.a)("conj",["typed"],(function(t){return(0,t.typed)("conj",{number:function(t){return t},BigNumber:function(t){return t},Complex:function(t){return t.conjugate()},"Array | Matrix":function(t){return I(t,this)}})})),rn=Object(s.a)("im",["typed"],(function(t){return(0,t.typed)("im",{number:function(){return 0},BigNumber:function(t){return t.mul(0)},Complex:function(t){return t.im},"Array | Matrix":function(t){return I(t,this)}})})),on=Object(s.a)("re",["typed"],(function(t){return(0,t.typed)("re",{number:function(t){return t},BigNumber:function(t){return t},Complex:function(t){return t.re},"Array | Matrix":function(t){return I(t,this)}})}));function an(t){return!t}function sn(t,e){return!(!t&&!e)}function un(t,e){return!!t!=!!e}function ln(t,e){return!(!t||!e)}an.signature="number",ln.signature=un.signature=sn.signature="number, number";var cn=Object(s.a)("not",["typed"],(function(t){return(0,t.typed)("not",{number:an,Complex:function(t){return 0===t.re&&0===t.im},BigNumber:function(t){return t.isZero()||t.isNaN()},Unit:function(t){return null===t.value||this(t.value)},"Array | Matrix":function(t){return I(t,this)}})})),fn=Object(s.a)("or",["typed","matrix","equalScalar","DenseMatrix"],(function(t){var e=t.typed,n=t.matrix,r=t.equalScalar,i=t.DenseMatrix,o=me({typed:e}),a=ge({typed:e,equalScalar:r}),s=ve({typed:e,DenseMatrix:i}),u=ae({typed:e}),l=se({typed:e});return e("or",{"number, number":sn,"Complex, Complex":function(t,e){return 0!==t.re||0!==t.im||0!==e.re||0!==e.im},"BigNumber, BigNumber":function(t,e){return!t.isZero()&&!t.isNaN()||!e.isZero()&&!e.isNaN()},"Unit, Unit":function(t,e){return this(t.value||0,e.value||0)},"SparseMatrix, SparseMatrix":function(t,e){return a(t,e,this)},"SparseMatrix, DenseMatrix":function(t,e){return o(e,t,this,!0)},"DenseMatrix, SparseMatrix":function(t,e){return o(t,e,this,!1)},"DenseMatrix, DenseMatrix":function(t,e){return u(t,e,this)},"Array, Array":function(t,e){return this(n(t),n(e)).valueOf()},"Array, Matrix":function(t,e){return this(n(t),e)},"Matrix, Array":function(t,e){return this(t,n(e))},"SparseMatrix, any":function(t,e){return s(t,e,this,!1)},"DenseMatrix, any":function(t,e){return l(t,e,this,!1)},"any, SparseMatrix":function(t,e){return s(e,t,this,!0)},"any, DenseMatrix":function(t,e){return l(e,t,this,!0)},"Array, any":function(t,e){return l(n(t),e,this,!1).valueOf()},"any, Array":function(t,e){return l(n(e),t,this,!0).valueOf()}})})),hn=Object(s.a)("xor",["typed","matrix","DenseMatrix"],(function(t){var e=t.typed,n=t.matrix,r=t.DenseMatrix,i=me({typed:e}),o=Qe({typed:e,DenseMatrix:r}),a=ve({typed:e,DenseMatrix:r}),s=ae({typed:e}),u=se({typed:e});return e("xor",{"number, number":un,"Complex, Complex":function(t,e){return(0!==t.re||0!==t.im)!=(0!==e.re||0!==e.im)},"BigNumber, BigNumber":function(t,e){return(!t.isZero()&&!t.isNaN())!=(!e.isZero()&&!e.isNaN())},"Unit, Unit":function(t,e){return this(t.value||0,e.value||0)},"SparseMatrix, SparseMatrix":function(t,e){return o(t,e,this)},"SparseMatrix, DenseMatrix":function(t,e){return i(e,t,this,!0)},"DenseMatrix, SparseMatrix":function(t,e){return i(t,e,this,!1)},"DenseMatrix, DenseMatrix":function(t,e){return s(t,e,this)},"Array, Array":function(t,e){return this(n(t),n(e)).valueOf()},"Array, Matrix":function(t,e){return this(n(t),e)},"Matrix, Array":function(t,e){return this(t,n(e))},"SparseMatrix, any":function(t,e){return a(t,e,this,!1)},"DenseMatrix, any":function(t,e){return u(t,e,this,!1)},"any, SparseMatrix":function(t,e){return a(e,t,this,!0)},"any, DenseMatrix":function(t,e){return u(e,t,this,!0)},"Array, any":function(t,e){return u(n(t),e,this,!1).valueOf()},"any, Array":function(t,e){return u(n(e),t,this,!0).valueOf()}})})),dn=Object(s.a)("concat",["typed","matrix","isInteger"],(function(t){var e=t.typed,n=t.matrix,i=t.isInteger;return e("concat",{"...Array | Matrix | number | BigNumber":function(t){for(var e,o=t.length,a=-1,s=!1,u=[],l=0;l<o;l++){var c=t[l];if(Object(r.v)(c)&&(s=!0),Object(r.y)(c)||Object(r.e)(c)){if(l!==o-1)throw new Error("Dimension must be specified as last argument");if(e=a,a=c.valueOf(),!i(a))throw new TypeError("Integer number expected for dimension");if(a<0||0<l&&e<a)throw new A.a(a,e+1)}else{var f=Object(k.a)(c).valueOf(),h=Object(M.a)(f);if(u[l]=f,e=a,a=h.length-1,0<l&&a!==e)throw new C.a(e+1,a+1)}}if(0===u.length)throw new SyntaxError("At least one matrix expected");for(var d=u.shift();u.length;)d=function t(e,n,r,i){if(i<r){if(e.length!==n.length)throw new C.a(e.length,n.length);for(var o=[],a=0;a<e.length;a++)o[a]=t(e[a],n[a],r,i+1);return o}return e.concat(n)}(d,u.shift(),a,0);return s?n(d):d},"...string":function(t){return t.join("")}})})),pn=Object(s.a)("column",["typed","Index","matrix","range"],(function(t){var e=t.typed,n=t.Index,r=t.matrix,i=t.range;return e("column",{"Matrix, number":o,"Array, number":function(t,e){return o(r(Object(k.a)(t)),e).valueOf()}});function o(t,e){if(2!==t.size().length)throw new Error("Only two dimensional matrix is supported");Object(M.q)(e,t.size()[1]);var r=i(0,t.size()[0]),o=new n(r,e);return t.subset(o)}})),mn=Object(s.a)("cross",["typed","matrix","subtract","multiply"],(function(t){var e=t.typed,n=t.matrix,r=t.subtract,i=t.multiply;return e("cross",{"Matrix, Matrix":function(t,e){return n(o(t.toArray(),e.toArray()))},"Matrix, Array":function(t,e){return n(o(t.toArray(),e))},"Array, Matrix":function(t,e){return n(o(t,e.toArray()))},"Array, Array":o});function o(t,e){var n=Math.max(Object(M.a)(t).length,Object(M.a)(e).length);t=Object(M.n)(t),e=Object(M.n)(e);var o=Object(M.a)(t),a=Object(M.a)(e);if(1!==o.length||1!==a.length||3!==o[0]||3!==a[0])throw new RangeError("Vectors with length 3 expected (Size A = ["+o.join(", ")+"], B = ["+a.join(", ")+"])");var s=[r(i(t[1],e[2]),i(t[2],e[1])),r(i(t[2],e[0]),i(t[0],e[2])),r(i(t[0],e[1]),i(t[1],e[0]))];return 1<n?[s]:s}})),gn=Object(s.a)("diag",["typed","matrix","DenseMatrix","SparseMatrix"],(function(t){var e=t.typed,n=t.matrix,i=t.DenseMatrix,o=t.SparseMatrix;return e("diag",{Array:function(t){return s(t,0,Object(M.a)(t),null)},"Array, number":function(t,e){return s(t,e,Object(M.a)(t),null)},"Array, BigNumber":function(t,e){return s(t,e.toNumber(),Object(M.a)(t),null)},"Array, string":function(t,e){return s(t,0,Object(M.a)(t),e)},"Array, number, string":function(t,e,n){return s(t,e,Object(M.a)(t),n)},"Array, BigNumber, string":function(t,e,n){return s(t,e.toNumber(),Object(M.a)(t),n)},Matrix:function(t){return s(t,0,t.size(),t.storage())},"Matrix, number":function(t,e){return s(t,e,t.size(),t.storage())},"Matrix, BigNumber":function(t,e){return s(t,e.toNumber(),t.size(),t.storage())},"Matrix, string":function(t,e){return s(t,0,t.size(),e)},"Matrix, number, string":function(t,e,n){return s(t,e,t.size(),n)},"Matrix, BigNumber, string":function(t,e,n){return s(t,e.toNumber(),t.size(),n)}});function s(t,e,s,u){if(!Object(a.i)(e))throw new TypeError("Second parameter in function diag must be an integer");var l=0<e?e:0,c=e<0?-e:0;switch(s.length){case 1:return function(t,e,n,r,a,s){var u=[r+a,r+s];if(n&&"sparse"!==n&&"dense"!==n)throw new TypeError("Unknown matrix type ".concat(n,'"'));var l="sparse"===n?o.diagonal(u,t,e):i.diagonal(u,t,e);return null!==n?l:l.valueOf()}(t,e,u,s[0],c,l);case 2:return function(t,e,i,o,a,s){if(Object(r.v)(t)){var u=t.diagonal(e);return null!==i?i!==u.storage()?n(u,i):u:u.valueOf()}for(var l=Math.min(o[0]-a,o[1]-s),c=[],f=0;f<l;f++)c[f]=t[f+a][f+s];return null!==i?n(c):c}(t,e,u,s,c,l)}throw new RangeError("Matrix for function diag must be 2 dimensional")}}));function vn(t){return(vn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function yn(t,e){return function n(){"object"!==vn(n.cache)&&(n.cache={});for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=e?e(r):JSON.stringify(r);return o in n.cache||(n.cache[o]=t.apply(t,r)),n.cache[o]}}function bn(t){return Object.keys(t.signatures||{}).reduce((function(t,e){var n=(e.match(/,/g)||[]).length+1;return Math.max(t,n)}),-1)}var xn=Object(s.a)("filter",["typed"],(function(t){return(0,t.typed)("filter",{"Array, function":wn,"Matrix, function":function(t,e){return t.create(wn(t.toArray(),e))},"Array, RegExp":M.d,"Matrix, RegExp":function(t,e){return t.create(Object(M.d)(t.toArray(),e))}})}));function wn(t,e){var n=bn(e);return Object(M.c)(t,(function(t,r,i){return 1===n?e(t):2===n?e(t,[r]):e(t,[r],i)}))}var _n="flatten",Sn=Object(s.a)(_n,["typed","matrix"],(function(t){var e=t.typed,n=t.matrix;return e(_n,{Array:function(t){return Object(M.e)(Object(k.a)(t))},Matrix:function(t){var e=Object(M.e)(Object(k.a)(t.toArray()));return n(e)}})})),On="forEach",Nn=Object(s.a)(On,["typed"],(function(t){return(0,t.typed)(On,{"Array, function":Mn,"Matrix, function":function(t,e){return t.forEach(e)}})}));function Mn(t,e){var n=bn(e);!function r(i,o){Array.isArray(i)?Object(M.f)(i,(function(t,e){r(t,o.concat(e))})):1===n?e(i):2===n?e(i,o):e(i,o,t)}(t,[])}var En="getMatrixDataType",kn=Object(s.a)(En,["typed"],(function(t){return(0,t.typed)(En,{Array:function(t){return Object(M.h)(t,r.M)},Matrix:function(t){return t.getDataType()}})})),Cn="identity",Tn=Object(s.a)(Cn,["typed","config","matrix","BigNumber","DenseMatrix","SparseMatrix"],(function(t){var e=t.typed,n=t.config,i=t.matrix,o=t.BigNumber,s=t.DenseMatrix,u=t.SparseMatrix;return e(Cn,{"":function(){return"Matrix"===n.matrix?i([]):[]},string:function(t){return i(t)},"number | BigNumber":function(t){return c(t,t,"Matrix"===n.matrix?"dense":void 0)},"number | BigNumber, string":function(t,e){return c(t,t,e)},"number | BigNumber, number | BigNumber":function(t,e){return c(t,e,"Matrix"===n.matrix?"dense":void 0)},"number | BigNumber, number | BigNumber, string":c,Array:function(t){return l(t)},"Array, string":l,Matrix:function(t){return l(t.valueOf(),t.storage())},"Matrix, string":function(t,e){return l(t.valueOf(),e)}});function l(t,e){switch(t.length){case 0:return e?i(e):[];case 1:return c(t[0],t[0],e);case 2:return c(t[0],t[1],e);default:throw new Error("Vector containing two values expected")}}function c(t,e,n){var i=Object(r.e)(t)||Object(r.e)(e)?o:null;if(Object(r.e)(t)&&(t=t.toNumber()),Object(r.e)(e)&&(e=e.toNumber()),!Object(a.i)(t)||t<1)throw new Error("Parameters in function identity must be positive integers");if(!Object(a.i)(e)||e<1)throw new Error("Parameters in function identity must be positive integers");var l=i?new o(1):1,c=i?new i(0):0,f=[t,e];if(n){if("sparse"===n)return u.diagonal(f,l,0,c);if("dense"===n)return s.diagonal(f,l,0,c);throw new TypeError('Unknown matrix type "'.concat(n,'"'))}for(var h=Object(M.m)([],f,c),d=t<e?t:e,p=0;p<d;p++)h[p][p]=l;return h}})),Dn=Object(s.a)("kron",["typed","matrix","multiplyScalar"],(function(t){var e=t.typed,n=t.matrix,r=t.multiplyScalar;return e("kron",{"Matrix, Matrix":function(t,e){return n(i(t.toArray(),e.toArray()))},"Matrix, Array":function(t,e){return n(i(t.toArray(),e))},"Array, Matrix":function(t,e){return n(i(t,e.toArray()))},"Array, Array":i});function i(t,e){if(1===Object(M.a)(t).length&&(t=[t]),1===Object(M.a)(e).length&&(e=[e]),2<Object(M.a)(t).length||2<Object(M.a)(e).length)throw new RangeError("Vectors with dimensions greater then 2 are not supported expected (Size x = "+JSON.stringify(t.length)+", y = "+JSON.stringify(e.length)+")");var n=[],i=[];return t.map((function(t){return e.map((function(e){return i=[],n.push(i),t.map((function(t){return e.map((function(e){return i.push(r(t,e))}))}))}))}))&&n}})),An=Object(s.a)("map",["typed"],(function(t){return(0,t.typed)("map",{"Array, function":jn,"Matrix, function":function(t,e){return t.map(e)}})}));function jn(t,e){var n=bn(e);return function r(i,o){return Array.isArray(i)?i.map((function(t,e){return r(t,o.concat(e))})):1===n?e(i):2===n?e(i,o):e(i,o,t)}(t,[])}var Pn=Object(s.a)("ones",["typed","config","matrix","BigNumber"],(function(t){var e=t.typed,n=t.config,i=t.matrix,o=t.BigNumber;return e("ones",{"":function(){return"Array"===n.matrix?s([]):s([],"default")},"...number | BigNumber | string":function(t){if("string"!=typeof t[t.length-1])return"Array"===n.matrix?s(t):s(t,"default");var e=t.pop();return s(t,e)},Array:s,Matrix:function(t){var e=t.storage();return s(t.valueOf(),e)},"Array | Matrix, string":function(t,e){return s(t.valueOf(),e)}});function s(t,e){var n,s=(n=!1,t.forEach((function(t,e,i){Object(r.e)(t)&&(n=!0,i[e]=t.toNumber())})),n?new o(1):1);if(t.forEach((function(t){if("number"!=typeof t||!Object(a.i)(t)||t<0)throw new Error("Parameters in function ones must be positive integers")})),e){var u=i(e);return 0<t.length?u.resize(t,s):u}var l=[];return 0<t.length?Object(M.m)(l,t,s):l}}));function In(){throw new Error('No "bignumber" implementation available')}function Rn(){throw new Error('No "fraction" implementation available')}function Ln(){throw new Error('No "matrix" implementation available')}var Fn=Object(s.a)("range",["typed","config","?matrix","?bignumber","smaller","smallerEq","larger","largerEq"],(function(t){var e=t.typed,n=t.config,r=t.matrix,i=t.bignumber,o=t.smaller,a=t.smallerEq,s=t.larger,u=t.largerEq;return e("range",{string:c,"string, boolean":c,"number, number":function(t,e){return l(f(t,e,1))},"number, number, number":function(t,e,n){return l(f(t,e,n))},"number, number, boolean":function(t,e,n){return l((n?h:f)(t,e,1))},"number, number, number, boolean":function(t,e,n,r){return l((r?h:f)(t,e,n))},"BigNumber, BigNumber":function(t,e){return l(d(t,e,new t.constructor(1)))},"BigNumber, BigNumber, BigNumber":function(t,e,n){return l(d(t,e,n))},"BigNumber, BigNumber, boolean":function(t,e,n){return l((n?p:d)(t,e,new(0,t.constructor)(1)))},"BigNumber, BigNumber, BigNumber, boolean":function(t,e,n,r){return l((r?p:d)(t,e,n))}});function l(t){return"Matrix"===n.matrix?r?r(t):Ln():t}function c(t,e){var r=function(t){var e=t.split(":").map((function(t){return Number(t)}));if(e.some((function(t){return isNaN(t)})))return null;switch(e.length){case 2:return{start:e[0],end:e[1],step:1};case 3:return{start:e[0],end:e[2],step:e[1]};default:return null}}(t);if(!r)throw new SyntaxError('String "'+t+'" is no valid range');return"BigNumber"===n.number?(void 0===i&&In(),l((e?p:d)(i(r.start),i(r.end),i(r.step)))):l((e?h:f)(r.start,r.end,r.step))}function f(t,e,n){var r=[],i=t;if(0<n)for(;o(i,e);)r.push(i),i+=n;else if(n<0)for(;s(i,e);)r.push(i),i+=n;return r}function h(t,e,n){var r=[],i=t;if(0<n)for(;a(i,e);)r.push(i),i+=n;else if(n<0)for(;u(i,e);)r.push(i),i+=n;return r}function d(t,e,n){var r=i(0),a=[],u=t;if(n.gt(r))for(;o(u,e);)a.push(u),u=u.plus(n);else if(n.lt(r))for(;s(u,e);)a.push(u),u=u.plus(n);return a}function p(t,e,n){var r=i(0),o=[],s=t;if(n.gt(r))for(;a(s,e);)o.push(s),s=s.plus(n);else if(n.lt(r))for(;u(s,e);)o.push(s),s=s.plus(n);return o}})),qn="reshape",Bn=Object(s.a)(qn,["typed","isInteger","matrix"],(function(t){var e=t.typed,n=t.isInteger,r=t.matrix;return e(qn,{"Matrix, Array":function(t,e){return t.reshape?t.reshape(e):r(Object(M.l)(t.valueOf(),e))},"Array, Array":function(t,e){return e.forEach((function(t){if(!n(t))throw new TypeError("Invalid size for dimension: "+t)})),Object(M.l)(t,e)}})})),zn=n(12),Hn=Object(s.a)("resize",["config","matrix"],(function(t){var e=t.config,n=t.matrix;return function(t,i,o){if(2!==arguments.length&&3!==arguments.length)throw new zn.a("resize",arguments.length,2,3);if(Object(r.v)(i)&&(i=i.valueOf()),Object(r.e)(i[0])&&(i=i.map((function(t){return Object(r.e)(t)?t.toNumber():t}))),Object(r.v)(t))return t.resize(i,o,!0);if("string"==typeof t)return function(t,e,n){if(void 0!==n){if("string"!=typeof n||1!==n.length)throw new TypeError("Single character expected as defaultValue")}else n=" ";if(1!==e.length)throw new C.a(e.length,1);var r=e[0];if("number"!=typeof r||!Object(a.i)(r))throw new TypeError("Invalid size, must contain positive integers (size: "+Object(E.d)(e)+")");if(t.length>r)return t.substring(0,r);if(t.length<r){for(var i=t,o=0,s=r-t.length;o<s;o++)i+=n;return i}return t}(t,i,o);var s=!Array.isArray(t)&&"Array"!==e.matrix;if(0===i.length){for(;Array.isArray(t);)t=t[0];return Object(k.a)(t)}Array.isArray(t)||(t=[t]),t=Object(k.a)(t);var u=Object(M.m)(t,i,o);return s?n(u):u}})),Un=Object(s.a)("row",["typed","Index","matrix","range"],(function(t){var e=t.typed,n=t.Index,r=t.matrix,i=t.range;return e("row",{"Matrix, number":o,"Array, number":function(t,e){return o(r(Object(k.a)(t)),e).valueOf()}});function o(t,e){if(2!==t.size().length)throw new Error("Only two dimensional matrix is supported");Object(M.q)(e,t.size()[0]);var r=i(0,t.size()[1]),o=new n(e,r);return t.subset(o)}})),Wn=Object(s.a)("size",["typed","config","?matrix"],(function(t){var e=t.typed,n=t.config,r=t.matrix;return e("size",{Matrix:function(t){return t.create(t.size())},Array:M.a,string:function(t){return"Array"===n.matrix?[t.length]:r([t.length])},"number | Complex | BigNumber | Unit | boolean | null":function(){return"Array"===n.matrix?[]:r?r([]):Ln()}})})),Vn="squeeze",$n=Object(s.a)(Vn,["typed","matrix"],(function(t){var e=t.typed,n=t.matrix;return e(Vn,{Array:function(t){return Object(M.n)(Object(k.a)(t))},Matrix:function(t){var e=Object(M.n)(t.toArray());return Array.isArray(e)?n(e):e},any:function(t){return Object(k.a)(t)}})}));function Yn(t){return(Yn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Zn(t,e){if(Jn(t)&&Kn(t,e))return t[e];if("function"==typeof t[e]&&Xn(t,e))throw new Error('Cannot access method "'+e+'" as a property');throw new Error('No access to property "'+e+'"')}function Gn(t,e,n){if(Jn(t)&&Kn(t,e))return t[e]=n;throw new Error('No access to property "'+e+'"')}function Kn(t,e){if(t&&"object"===Yn(t)){if(Object(k.f)(Qn,e))return 1;if(!(e in Object.prototype)&&!(e in Function.prototype))return 1}}function Xn(t,e){if(null!=t&&"function"==typeof t[e]&&!(Object(k.f)(t,e)&&Object.getPrototypeOf&&e in Object.getPrototypeOf(t))){if(Object(k.f)(tr,e))return 1;if(!(e in Object.prototype)&&!(e in Function.prototype))return 1}}function Jn(t){return"object"===Yn(t)&&t&&t.constructor===Object}var Qn={length:!0,name:!0},tr={toString:!0,valueOf:!0,toLocaleString:!0},er=Object(s.a)("subset",["typed","matrix"],(function(t){var e=t.typed,n=t.matrix;return e("subset",{"Array, Index":function(t,e){var r=n(t).subset(e);return e.isScalar()?r:r.valueOf()},"Matrix, Index":function(t,e){return t.subset(e)},"Object, Index":ir,"string, Index":nr,"Array, Index, any":function(t,e,r){return n(Object(k.a)(t)).subset(e,r,void 0).valueOf()},"Array, Index, any, any":function(t,e,r,i){return n(Object(k.a)(t)).subset(e,r,i).valueOf()},"Matrix, Index, any":function(t,e,n){return t.clone().subset(e,n)},"Matrix, Index, any, any":function(t,e,n,r){return t.clone().subset(e,n,r)},"string, Index, string":rr,"string, Index, string, string":rr,"Object, Index, any":or})}));function nr(t,e){if(!Object(r.t)(e))throw new TypeError("Index expected");if(1!==e.size().length)throw new C.a(e.size().length,1);var n=t.length;Object(M.q)(e.min()[0],n),Object(M.q)(e.max()[0],n);var i=e.dimension(0),o="";return i.forEach((function(e){o+=t.charAt(e)})),o}function rr(t,e,n,r){if(!e||!0!==e.isIndex)throw new TypeError("Index expected");if(1!==e.size().length)throw new C.a(e.size().length,1);if(void 0!==r){if("string"!=typeof r||1!==r.length)throw new TypeError("Single character expected as defaultValue")}else r=" ";var i=e.dimension(0);if(i.size()[0]!==n.length)throw new C.a(i.size()[0],n.length);var o=t.length;Object(M.q)(e.min()[0]),Object(M.q)(e.max()[0]);for(var a=[],s=0;s<o;s++)a[s]=t.charAt(s);if(i.forEach((function(t,e){a[t]=n.charAt(e[0])})),a.length>o)for(var u=o-1,l=a.length;u<l;u++)a[u]||(a[u]=r);return a.join("")}function ir(t,e){if(1!==e.size().length)throw new C.a(e.size(),1);var n=e.dimension(0);if("string"!=typeof n)throw new TypeError("String expected as index to retrieve an object property");return Zn(t,n)}function or(t,e,n){if(1!==e.size().length)throw new C.a(e.size(),1);var r=e.dimension(0);if("string"!=typeof r)throw new TypeError("String expected as index to retrieve an object property");var i=Object(k.a)(t);return Gn(i,r,n),i}var ar=Object(s.a)("transpose",["typed","matrix"],(function(t){var e=t.typed,n=t.matrix;return e("transpose",{Array:function(t){return this(n(t)).valueOf()},Matrix:function(t){var e,n=t.size();switch(n.length){case 1:e=t.clone();break;case 2:var r=n[0],i=n[1];if(0===i)throw new RangeError("Cannot transpose a 2D matrix with no columns (size: "+Object(E.d)(n)+")");switch(t.storage()){case"dense":e=function(t,e,n){for(var r,i=t._data,o=[],a=0;a<n;a++){r=o[a]=[];for(var s=0;s<e;s++)r[s]=Object(k.a)(i[s][a])}return t.createDenseMatrix({data:o,size:[n,e],datatype:t._datatype})}(t,r,i);break;case"sparse":e=function(t,e,n){for(var r,i,o,a=t._values,s=t._index,u=t._ptr,l=a?[]:void 0,c=[],f=[],h=[],d=0;d<e;d++)h[d]=0;for(r=0,i=s.length;r<i;r++)h[s[r]]++;for(var p=0,m=0;m<e;m++)f.push(p),p+=h[m],h[m]=f[m];for(f.push(p),o=0;o<n;o++)for(var g=u[o],v=u[o+1],y=g;y<v;y++){var b=h[s[y]]++;c[b]=o,a&&(l[b]=Object(k.a)(a[y]))}return t.createSparseMatrix({values:l,index:c,ptr:f,size:[n,e],datatype:t._datatype})}(t,r,i)}break;default:throw new RangeError("Matrix must be a vector or two dimensional (size: "+Object(E.d)(this._size)+")")}return e},any:function(t){return Object(k.a)(t)}})})),sr="ctranspose",ur=Object(s.a)(sr,["typed","transpose","conj"],(function(t){var e=t.typed,n=t.transpose,r=t.conj;return e(sr,{any:function(t){return r(n(t))}})})),lr=Object(s.a)("zeros",["typed","config","matrix","BigNumber"],(function(t){var e=t.typed,n=t.config,i=t.matrix,o=t.BigNumber;return e("zeros",{"":function(){return"Array"===n.matrix?s([]):s([],"default")},"...number | BigNumber | string":function(t){if("string"!=typeof t[t.length-1])return"Array"===n.matrix?s(t):s(t,"default");var e=t.pop();return s(t,e)},Array:s,Matrix:function(t){var e=t.storage();return s(t.valueOf(),e)},"Array | Matrix, string":function(t,e){return s(t.valueOf(),e)}});function s(t,e){var n,s=(n=!1,t.forEach((function(t,e,i){Object(r.e)(t)&&(n=!0,i[e]=t.toNumber())})),n?new o(0):0);if(t.forEach((function(t){if("number"!=typeof t||!Object(a.i)(t)||t<0)throw new Error("Parameters in function zeros must be positive integers")})),e){var u=i(e);return 0<t.length?u.resize(t,s):u}var l=[];return 0<t.length?Object(M.m)(l,t,s):l}})),cr=Object(s.a)("erf",["typed"],(function(t){return(0,t.typed)("name",{number:function(t){var e=Math.abs(t);return mr<=e?Object(a.n)(t):e<=fr?Object(a.n)(t)*function(t){var e,n=t*t,r=dr[0][4]*n,i=n;for(e=0;e<3;e+=1)r=(r+dr[0][e])*n,i=(i+pr[0][e])*n;return t*(r+dr[0][3])/(i+pr[0][3])}(e):e<=4?Object(a.n)(t)*(1-function(t){var e,n=dr[1][8]*t,r=t;for(e=0;e<7;e+=1)n=(n+dr[1][e])*t,r=(r+pr[1][e])*t;var i=(n+dr[1][7])/(r+pr[1][7]),o=parseInt(16*t)/16,a=(t-o)*(t+o);return Math.exp(-o*o)*Math.exp(-a)*i}(e)):Object(a.n)(t)*(1-function(t){var e,n=1/(t*t),r=dr[2][5]*n,i=n;for(e=0;e<4;e+=1)r=(r+dr[2][e])*n,i=(i+pr[2][e])*n;var o=n*(r+dr[2][4])/(i+pr[2][4]);o=(hr-o)/t;var a=(t-(n=parseInt(16*t)/16))*(t+n);return Math.exp(-n*n)*Math.exp(-a)*o}(e))},"Array | Matrix":function(t){return I(t,this)}})})),fr=.46875,hr=.5641895835477563,dr=[[3.1611237438705655,113.86415415105016,377.485237685302,3209.3775891384694,.18577770618460315],[.5641884969886701,8.883149794388377,66.11919063714163,298.6351381974001,881.952221241769,1712.0476126340707,2051.0783778260716,1230.3393547979972,2.1531153547440383e-8],[.30532663496123236,.36034489994980445,.12578172611122926,.016083785148742275,.0006587491615298378,.016315387137302097]],pr=[[23.601290952344122,244.02463793444417,1282.6165260773723,2844.236833439171],[15.744926110709835,117.6939508913125,537.1811018620099,1621.3895745666903,3290.7992357334597,4362.619090143247,3439.3676741437216,1230.3393548037495],[2.568520192289822,1.8729528499234604,.5279051029514285,.06051834131244132,.0023352049762686918]],mr=Math.pow(2,53),gr=Object(s.a)("mode",["typed","isNaN","isNumeric"],(function(t){var e=t.typed,n=t.isNaN,r=t.isNumeric;return e("mode",{"Array | Matrix":i,"...":i});function i(t){if(0===(t=Object(M.e)(t.valueOf())).length)throw new Error("Cannot calculate mode of an empty array");for(var e={},i=[],o=0,a=0;a<t.length;a++){var s=t[a];if(r(s)&&n(s))throw new Error("Cannot calculate mode of an array containing NaN values");s in e||(e[s]=0),e[s]++,e[s]===o?i.push(s):e[s]>o&&(o=e[s],i=[s])}return i}}));function vr(t,e,n){var i;return-1!==String(t).indexOf("Unexpected type")?(i=2<arguments.length?" (type: "+Object(r.M)(n)+", value: "+JSON.stringify(n)+")":" (type: "+t.data.actual+")",new TypeError("Cannot calculate "+e+", unexpected type of argument"+i)):-1!==String(t).indexOf("complex numbers")?(i=2<arguments.length?" (type: "+Object(r.M)(n)+", value: "+JSON.stringify(n)+")":"",new TypeError("Cannot calculate "+e+", no ordering relation is defined for complex numbers"+i)):t}var yr=Object(s.a)("prod",["typed","config","multiplyScalar","numeric"],(function(t){var e=t.typed,n=t.config,r=t.multiplyScalar,i=t.numeric;return e("prod",{"Array | Matrix":o,"Array | Matrix, number | BigNumber":function(){throw new Error("prod(A, dim) is not yet supported")},"...":o});function o(t){var e;if(P(t,(function(t){try{e=void 0===e?t:r(e,t)}catch(e){throw vr(e,"prod",t)}})),"string"==typeof e&&(e=i(e,n.number)),void 0===e)throw new Error("Cannot calculate prod of an empty array");return e}})),br=Object(s.a)("format",["typed"],(function(t){return(0,t.typed)("format",{any:E.d,"any, Object | function | number":E.d})})),xr=Object(s.a)("print",["typed"],(function(t){return(0,t.typed)("print",{"string, Object | Array":wr,"string, Object | Array, number | Object":wr})}));function wr(t,e,n){return t.replace(/\$([\w.]+)/g,(function(t,i){for(var o=i.split("."),a=e[o.shift()];o.length&&void 0!==a;){var s=o.shift();a=s?a[s]:a+"."}return void 0!==a?Object(r.I)(a)?a:Object(E.d)(a,n):t}))}var _r=Object(s.a)("to",["typed","matrix"],(function(t){var e=t.typed,n=t.matrix,r=ae({typed:e}),i=se({typed:e});return e("to",{"Unit, Unit | string":function(t,e){return t.to(e)},"Matrix, Matrix":function(t,e){return r(t,e,this)},"Array, Array":function(t,e){return this(n(t),n(e)).valueOf()},"Array, Matrix":function(t,e){return this(n(t),e)},"Matrix, Array":function(t,e){return this(t,n(e))},"Matrix, any":function(t,e){return i(t,e,this,!1)},"any, Matrix":function(t,e){return i(e,t,this,!0)},"Array, any":function(t,e){return i(n(t),e,this,!1).valueOf()},"any, Array":function(t,e){return i(n(e),t,this,!0).valueOf()}})})),Sr="isPrime",Or=Object(s.a)(Sr,["typed"],(function(t){return(0,t.typed)(Sr,{number:function(t){if(0*t!=0)return!1;if(t<=3)return 1<t;if(t%2==0||t%3==0)return!1;for(var e=5;e*e<=t;e+=6)if(t%e==0||t%(e+2)==0)return!1;return!0},BigNumber:function(t){if(0*t.toNumber()!=0)return!1;if(t.lte(3))return t.gt(1);if(t.mod(2).eq(0)||t.mod(3).eq(0))return!1;for(var e=5;t.gte(e*e);e+=6)if(t.mod(e).eq(0)||t.mod(e+2).eq(0))return!1;return!0},"Array | Matrix":function(t){return I(t,this)}})})),Nr=Object(s.a)("numeric",["number","?bignumber","?fraction"],(function(t){var e=t.number,n=t.bignumber,i=t.fraction,o={string:!0,number:!0,BigNumber:!0,Fraction:!0},a={number:function(t){return e(t)},BigNumber:n?function(t){return n(t)}:In,Fraction:i?function(t){return i(t)}:Rn};return function(t,e){var n=Object(r.M)(t);if(!(n in o))throw new TypeError("Cannot convert "+t+' of type "'+n+'"; valid input types are '+Object.keys(o).join(", "));if(!(e in a))throw new TypeError("Cannot convert "+t+' to type "'+e+'"; valid output types are '+Object.keys(a).join(", "));return e===n?t:a[e](t)}})),Mr="divideScalar",Er=Object(s.a)(Mr,["typed","numeric"],(function(t){var e=t.typed,n=t.numeric;return e(Mr,{"number, number":function(t,e){return t/e},"Complex, Complex":function(t,e){return t.div(e)},"BigNumber, BigNumber":function(t,e){return t.div(e)},"Fraction, Fraction":function(t,e){return t.div(e)},"Unit, number | Fraction | BigNumber":function(t,e){var i=t.clone(),o=n(1,Object(r.M)(e));return i.value=this(null===i.value?i._normalize(o):i.value,e),i},"number | Fraction | BigNumber, Unit":function(t,e){var i=(i=e.clone()).pow(-1),o=n(1,Object(r.M)(t));return i.value=this(t,null===e.value?e._normalize(o):e.value),i},"Unit, Unit":function(t,e){return t.divide(e)}})})),kr=Object(s.a)("pow",["typed","config","identity","multiply","matrix","fraction","number","Complex"],(function(t){var e=t.typed,n=t.config,r=t.identity,i=t.multiply,o=t.matrix,s=t.number,u=t.fraction,l=t.Complex;return e("pow",{"number, number":c,"Complex, Complex":function(t,e){return t.pow(e)},"BigNumber, BigNumber":function(t,e){return e.isInteger()||0<=t||n.predictable?t.pow(e):new l(t.toNumber(),0).pow(e.toNumber(),0)},"Fraction, Fraction":function(t,e){if(1===e.d)return t.pow(e);if(n.predictable)throw new Error("Function pow does not support non-integer exponents for fractions.");return c(t.valueOf(),e.valueOf())},"Array, number":f,"Array, BigNumber":function(t,e){return f(t,e.toNumber())},"Matrix, number":h,"Matrix, BigNumber":function(t,e){return h(t,e.toNumber())},"Unit, number | BigNumber":function(t,e){return t.pow(e)}});function c(t,e){if(n.predictable&&!Object(a.i)(e)&&t<0)try{var r=u(e),i=s(r);if((e===i||Math.abs((e-i)/e)<1e-14)&&r.d%2==1)return(r.n%2==0?1:-1)*Math.pow(-t,e)}catch(t){}return n.predictable&&(t<-1&&e===1/0||-1<t&&t<0&&e===-1/0)?NaN:Object(a.i)(e)||0<=t||n.predictable?qt(t,e):t*t<1&&e===1/0||1<t*t&&e===-1/0?0:new l(t,0).pow(e,0)}function f(t,e){if(!Object(a.i)(e)||e<0)throw new TypeError("For A^b, b must be a positive integer (value is "+e+")");var n=Object(M.a)(t);if(2!==n.length)throw new Error("For A^b, A must be 2 dimensional (A has "+n.length+" dimensions)");if(n[0]!==n[1])throw new Error("For A^b, A must be square (size is "+n[0]+"x"+n[1]+")");for(var o=r(n[0]).valueOf(),s=t;1<=e;)1==(1&e)&&(o=i(s,o)),e>>=1,s=i(s,s);return o}function h(t,e){return o(f(t.valueOf(),e))}}));function Cr(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)),r}function Tr(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Cr(Object(n),!0).forEach((function(e){var r,i,o;r=t,o=n[i=e],i in r?Object.defineProperty(r,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Cr(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var Dr="Number of decimals in function round must be an integer",Ar="round",jr=Object(s.a)(Ar,["typed","matrix","equalScalar","zeros","BigNumber","DenseMatrix"],(function(t){var e=t.typed,n=t.matrix,r=t.equalScalar,i=t.zeros,o=t.BigNumber,a=t.DenseMatrix,s=fe({typed:e,equalScalar:r}),u=ve({typed:e,DenseMatrix:a}),l=se({typed:e});return e(Ar,Tr(Tr({},Pr),{},{Complex:function(t){return t.round()},"Complex, number":function(t,e){if(e%1)throw new TypeError(Dr);return t.round(e)},"Complex, BigNumber":function(t,e){if(!e.isInteger())throw new TypeError(Dr);var n=e.toNumber();return t.round(n)},"number, BigNumber":function(t,e){if(!e.isInteger())throw new TypeError(Dr);return new o(t).toDecimalPlaces(e.toNumber())},BigNumber:function(t){return t.toDecimalPlaces(0)},"BigNumber, BigNumber":function(t,e){if(!e.isInteger())throw new TypeError(Dr);return t.toDecimalPlaces(e.toNumber())},Fraction:function(t){return t.round()},"Fraction, number":function(t,e){if(e%1)throw new TypeError(Dr);return t.round(e)},"Array | Matrix":function(t){return I(t,this,!0)},"SparseMatrix, number | BigNumber":function(t,e){return s(t,e,this,!1)},"DenseMatrix, number | BigNumber":function(t,e){return l(t,e,this,!1)},"number | Complex | BigNumber, SparseMatrix":function(t,e){return r(t,0)?i(e.size(),e.storage()):u(e,t,this,!0)},"number | Complex | BigNumber, DenseMatrix":function(t,e){return r(t,0)?i(e.size(),e.storage()):l(e,t,this,!0)},"Array, number | BigNumber":function(t,e){return l(n(t),e,this,!1).valueOf()},"number | Complex | BigNumber, Array":function(t,e){return l(n(e),t,this,!0).valueOf()}}))})),Pr={number:Bt,"number, number":function(t,e){if(!Object(a.i)(e))throw new TypeError(Dr);if(e<0||15<e)throw new Error("Number of decimals in function round must be in te range of 0-15");return Bt(t,e)}},Ir=Object(s.a)("log",["config","typed","divideScalar","Complex"],(function(t){var e=t.typed,n=t.config,r=t.divideScalar,i=t.Complex;return e("log",{number:function(t){return 0<=t||n.predictable?Dt(t):new i(t,0).log()},Complex:function(t){return t.log()},BigNumber:function(t){return!t.isNegative()||n.predictable?t.ln():new i(t.toNumber(),0).log()},"Array | Matrix":function(t){return I(t,this)},"any, any":function(t,e){return r(this(t),this(e))}})})),Rr=Object(s.a)("log1p",["typed","config","divideScalar","log","Complex"],(function(t){var e=t.typed,n=t.config,r=t.divideScalar,i=t.log,o=t.Complex;return e("log1p",{number:function(t){return-1<=t||n.predictable?Object(a.k)(t):s(new o(t,0))},Complex:s,BigNumber:function(t){var e=t.plus(1);return!e.isNegative()||n.predictable?e.ln():s(new o(t.toNumber(),0))},"Array | Matrix":function(t){return I(t,this)},"any, any":function(t,e){return r(this(t),i(e))}});function s(t){var e=t.re+1;return new o(Math.log(Math.sqrt(e*e+t.im*t.im)),Math.atan2(t.im,e))}})),Lr="nthRoots",Fr=Object(s.a)(Lr,["config","typed","divideScalar","Complex"],(function(t){var e=t.typed,n=(t.config,t.divideScalar,t.Complex),r=[function(t){return new n(t,0)},function(t){return new n(0,t)},function(t){return new n(-t,0)},function(t){return new n(0,-t)}];function i(t,e){if(e<0)throw new Error("Root must be greater than zero");if(0===e)throw new Error("Root must be non-zero");if(e%1!=0)throw new Error("Root must be an integer");if(0===t||0===t.abs())return[new n(0,0)];var i,o="number"==typeof t;!o&&0!==t.re&&0!==t.im||(i=o?2*(t<0):0===t.im?2*(t.re<0):2*(t.im<0)+1);for(var a=t.arg(),s=t.abs(),u=[],l=Math.pow(s,1/e),c=0;c<e;c++){var f=(i+4*c)/e;f!==Math.round(f)?u.push(new n({r:l,phi:(a+2*Math.PI*c)/e})):u.push(r[f%4](l))}return u}return e(Lr,{Complex:function(t){return i(t,2)},"Complex, number":i})})),qr=Object(s.a)("dotPow",["typed","equalScalar","matrix","pow","DenseMatrix"],(function(t){var e=t.typed,n=t.equalScalar,r=t.matrix,i=t.pow,o=t.DenseMatrix,a=me({typed:e}),s=Qe({typed:e,DenseMatrix:o}),u=fe({typed:e,equalScalar:n}),l=ve({typed:e,DenseMatrix:o}),c=ae({typed:e}),f=se({typed:e});return e("dotPow",{"any, any":i,"SparseMatrix, SparseMatrix":function(t,e){return s(t,e,i,!1)},"SparseMatrix, DenseMatrix":function(t,e){return a(e,t,i,!0)},"DenseMatrix, SparseMatrix":function(t,e){return a(t,e,i,!1)},"DenseMatrix, DenseMatrix":function(t,e){return c(t,e,i)},"Array, Array":function(t,e){return this(r(t),r(e)).valueOf()},"Array, Matrix":function(t,e){return this(r(t),e)},"Matrix, Array":function(t,e){return this(t,r(e))},"SparseMatrix, any":function(t,e){return u(t,e,this,!1)},"DenseMatrix, any":function(t,e){return f(t,e,this,!1)},"any, SparseMatrix":function(t,e){return l(e,t,this,!0)},"any, DenseMatrix":function(t,e){return f(e,t,this,!0)},"Array, any":function(t,e){return f(r(t),e,this,!1).valueOf()},"any, Array":function(t,e){return f(r(e),t,this,!0).valueOf()}})})),Br="dotDivide",zr=Object(s.a)(Br,["typed","matrix","equalScalar","divideScalar","DenseMatrix"],(function(t){var e=t.typed,n=t.matrix,r=t.equalScalar,i=t.divideScalar,o=t.DenseMatrix,a=le({typed:e,equalScalar:r}),s=me({typed:e}),u=Qe({typed:e,DenseMatrix:o}),l=fe({typed:e,equalScalar:r}),c=ve({typed:e,DenseMatrix:o}),f=ae({typed:e}),h=se({typed:e});return e(Br,{"any, any":i,"SparseMatrix, SparseMatrix":function(t,e){return u(t,e,i,!1)},"SparseMatrix, DenseMatrix":function(t,e){return a(e,t,i,!0)},"DenseMatrix, SparseMatrix":function(t,e){return s(t,e,i,!1)},"DenseMatrix, DenseMatrix":function(t,e){return f(t,e,i)},"Array, Array":function(t,e){return this(n(t),n(e)).valueOf()},"Array, Matrix":function(t,e){return this(n(t),e)},"Matrix, Array":function(t,e){return this(t,n(e))},"SparseMatrix, any":function(t,e){return l(t,e,i,!1)},"DenseMatrix, any":function(t,e){return h(t,e,i,!1)},"any, SparseMatrix":function(t,e){return c(e,t,i,!0)},"any, DenseMatrix":function(t,e){return h(e,t,i,!0)},"Array, any":function(t,e){return h(n(t),e,i,!1).valueOf()},"any, Array":function(t,e){return h(n(e),t,i,!0).valueOf()}})}));function Hr(t){var e=t.DenseMatrix;return function(t,n,i){var o=t.size();if(2!==o.length)throw new RangeError("Matrix must be two dimensional (size: "+Object(E.d)(o)+")");var a,s,u,l=o[0];if(l!==o[1])throw new RangeError("Matrix must be square (size: "+Object(E.d)(o)+")");if(Object(r.v)(n)){var c=n.size();if(1===c.length){if(c[0]!==l)throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");for(a=[],u=n._data,s=0;s<l;s++)a[s]=[u[s]];return new e({data:a,size:[l,1],datatype:n._datatype})}if(2!==c.length)throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");if(c[0]!==l||1!==c[1])throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");if(Object(r.n)(n)){if(i){for(a=[],u=n._data,s=0;s<l;s++)a[s]=[u[s][0]];return new e({data:a,size:[l,1],datatype:n._datatype})}return n}for(a=[],s=0;s<l;s++)a[s]=[0];for(var f=n._values,h=n._index,d=n._ptr,p=d[1],m=d[0];m<p;m++)a[s=h[m]][0]=f[m];return new e({data:a,size:[l,1],datatype:n._datatype})}if(Object(r.b)(n)){var g=Object(M.a)(n);if(1===g.length){if(g[0]!==l)throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");for(a=[],s=0;s<l;s++)a[s]=[n[s]];return new e({data:a,size:[l,1]})}if(2!==g.length)throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");if(g[0]!==l||1!==g[1])throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");for(a=[],s=0;s<l;s++)a[s]=[n[s][0]];return new e({data:a,size:[l,1]})}}}var Ur=Object(s.a)("lsolve",["typed","matrix","divideScalar","multiplyScalar","subtract","equalScalar","DenseMatrix"],(function(t){var e=t.typed,n=t.matrix,r=t.divideScalar,i=t.multiplyScalar,o=t.subtract,a=t.equalScalar,s=t.DenseMatrix,u=Hr({DenseMatrix:s});return e("lsolve",{"SparseMatrix, Array | Matrix":function(t,e){for(var n,l,c=(e=u(t,e,!0))._data,f=t._size[0],h=t._size[1],d=t._values,p=t._index,m=t._ptr,g=[],v=0;v<h;v++){var y=c[v][0]||0;if(a(y,0))g[v]=[0];else{var b=0,x=[],w=[],_=m[v+1];for(l=m[v];l<_;l++)(n=p[l])===v?b=d[l]:v<n&&(x.push(d[l]),w.push(n));if(a(b,0))throw new Error("Linear system cannot be solved since matrix is singular");var S=r(y,b);for(l=0,_=w.length;l<_;l++)c[n=w[l]]=[o(c[n][0]||0,i(S,x[l]))];g[v]=[S]}}return new s({data:g,size:[f,1]})},"DenseMatrix, Array | Matrix":l,"Array, Array | Matrix":function(t,e){return l(n(t),e).valueOf()}});function l(t,e){for(var n=(e=u(t,e,!0))._data,l=t._size[0],c=t._size[1],f=[],h=t._data,d=0;d<c;d++){var p=n[d][0]||0,m=void 0;if(a(p,0))m=0;else{var g=h[d][d];if(a(g,0))throw new Error("Linear system cannot be solved since matrix is singular");m=r(p,g);for(var v=d+1;v<l;v++)n[v]=[o(n[v][0]||0,i(m,h[v][d]))]}f[d]=[m]}return new s({data:f,size:[l,1]})}})),Wr=Object(s.a)("usolve",["typed","matrix","divideScalar","multiplyScalar","subtract","equalScalar","DenseMatrix"],(function(t){var e=t.typed,n=t.matrix,r=t.divideScalar,i=t.multiplyScalar,o=t.subtract,a=t.equalScalar,s=t.DenseMatrix,u=Hr({DenseMatrix:s});return e("usolve",{"SparseMatrix, Array | Matrix":function(t,e){for(var n,l,c=(e=u(t,e,!0))._data,f=t._size[0],h=t._size[1],d=t._values,p=t._index,m=t._ptr,g=[],v=h-1;0<=v;v--){var y=c[v][0]||0;if(a(y,0))g[v]=[0];else{var b=0,x=[],w=[],_=m[v],S=m[v+1];for(l=S-1;_<=l;l--)(n=p[l])===v?b=d[l]:n<v&&(x.push(d[l]),w.push(n));if(a(b,0))throw new Error("Linear system cannot be solved since matrix is singular");var O=r(y,b);for(l=0,S=w.length;l<S;l++)c[n=w[l]]=[o(c[n][0],i(O,x[l]))];g[v]=[O]}}return new s({data:g,size:[f,1]})},"DenseMatrix, Array | Matrix":l,"Array, Array | Matrix":function(t,e){return l(n(t),e).valueOf()}});function l(t,e){for(var n=(e=u(t,e,!0))._data,l=t._size[0],c=t._size[1],f=[],h=t._data,d=c-1;0<=d;d--){var p=n[d][0]||0,m=void 0;if(a(p,0))m=0;else{var g=h[d][d];if(a(g,0))throw new Error("Linear system cannot be solved since matrix is singular");m=r(p,g);for(var v=d-1;0<=v;v--)n[v]=[o(n[v][0]||0,i(m,h[v][d]))]}f[d]=[m]}return new s({data:f,size:[l,1]})}})),Vr=Object(s.a)("algorithm08",["typed","equalScalar"],(function(t){var e=t.typed,n=t.equalScalar;return function(t,r,i){var o=t._values,a=t._index,s=t._ptr,u=t._size,l=t._datatype,c=r._values,f=r._index,h=r._ptr,d=r._size,p=r._datatype;if(u.length!==d.length)throw new C.a(u.length,d.length);if(u[0]!==d[0]||u[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+d+")");if(!o||!c)throw new Error("Cannot perform operation on Pattern Sparse Matrices");var m,g=u[0],v=u[1],y=n,b=0,x=i;"string"==typeof l&&l===p&&(m=l,y=e.find(n,[m,m]),b=e.convert(0,m),x=e.find(i,[m,m]));for(var w,_=[],S=[],O=[],N=[],M=[],E=0;E<v;E++){O[E]=S.length;for(var k=E+1,T=s[E],D=s[E+1],A=T;A<D;A++)M[w=a[A]]=k,N[w]=o[A],S.push(w);for(T=h[E],D=h[E+1],A=T;A<D;A++)M[w=f[A]]===k&&(N[w]=x(N[w],c[A]));for(A=O[E];A<S.length;){var j=N[w=S[A]];y(j,b)?S.splice(A,1):(_.push(j),A++)}}return O[v]=S.length,t.createSparseMatrix({values:_,index:S,ptr:O,size:[g,v],datatype:m})}})),$r="leftShift",Yr=Object(s.a)($r,["typed","matrix","equalScalar","zeros","DenseMatrix"],(function(t){var e=t.typed,n=t.matrix,r=t.equalScalar,i=t.zeros,o=t.DenseMatrix,a=re({typed:e}),s=le({typed:e,equalScalar:r}),u=Vr({typed:e,equalScalar:r}),l=oe({typed:e,DenseMatrix:o}),c=fe({typed:e,equalScalar:r}),f=ae({typed:e}),h=se({typed:e});return e($r,{"number, number":Ye,"BigNumber, BigNumber":Be,"SparseMatrix, SparseMatrix":function(t,e){return u(t,e,this,!1)},"SparseMatrix, DenseMatrix":function(t,e){return s(e,t,this,!0)},"DenseMatrix, SparseMatrix":function(t,e){return a(t,e,this,!1)},"DenseMatrix, DenseMatrix":function(t,e){return f(t,e,this)},"Array, Array":function(t,e){return this(n(t),n(e)).valueOf()},"Array, Matrix":function(t,e){return this(n(t),e)},"Matrix, Array":function(t,e){return this(t,n(e))},"SparseMatrix, number | BigNumber":function(t,e){return r(e,0)?t.clone():c(t,e,this,!1)},"DenseMatrix, number | BigNumber":function(t,e){return r(e,0)?t.clone():h(t,e,this,!1)},"number | BigNumber, SparseMatrix":function(t,e){return r(t,0)?i(e.size(),e.storage()):l(e,t,this,!0)},"number | BigNumber, DenseMatrix":function(t,e){return r(t,0)?i(e.size(),e.storage()):h(e,t,this,!0)},"Array, number | BigNumber":function(t,e){return this(n(t),e).valueOf()},"number | BigNumber, Array":function(t,e){return this(t,n(e)).valueOf()}})})),Zr="rightArithShift",Gr=Object(s.a)(Zr,["typed","matrix","equalScalar","zeros","DenseMatrix"],(function(t){var e=t.typed,n=t.matrix,r=t.equalScalar,i=t.zeros,o=t.DenseMatrix,a=re({typed:e}),s=le({typed:e,equalScalar:r}),u=Vr({typed:e,equalScalar:r}),l=oe({typed:e,DenseMatrix:o}),c=fe({typed:e,equalScalar:r}),f=ae({typed:e}),h=se({typed:e});return e(Zr,{"number, number":Ze,"BigNumber, BigNumber":ze,"SparseMatrix, SparseMatrix":function(t,e){return u(t,e,this,!1)},"SparseMatrix, DenseMatrix":function(t,e){return s(e,t,this,!0)},"DenseMatrix, SparseMatrix":function(t,e){return a(t,e,this,!1)},"DenseMatrix, DenseMatrix":function(t,e){return f(t,e,this)},"Array, Array":function(t,e){return this(n(t),n(e)).valueOf()},"Array, Matrix":function(t,e){return this(n(t),e)},"Matrix, Array":function(t,e){return this(t,n(e))},"SparseMatrix, number | BigNumber":function(t,e){return r(e,0)?t.clone():c(t,e,this,!1)},"DenseMatrix, number | BigNumber":function(t,e){return r(e,0)?t.clone():h(t,e,this,!1)},"number | BigNumber, SparseMatrix":function(t,e){return r(t,0)?i(e.size(),e.storage()):l(e,t,this,!0)},"number | BigNumber, DenseMatrix":function(t,e){return r(t,0)?i(e.size(),e.storage()):h(e,t,this,!0)},"Array, number | BigNumber":function(t,e){return this(n(t),e).valueOf()},"number | BigNumber, Array":function(t,e){return this(t,n(e)).valueOf()}})})),Kr="rightLogShift",Xr=Object(s.a)(Kr,["typed","matrix","equalScalar","zeros","DenseMatrix"],(function(t){var e=t.typed,n=t.matrix,r=t.equalScalar,i=t.zeros,o=t.DenseMatrix,a=re({typed:e}),s=le({typed:e,equalScalar:r}),u=Vr({typed:e,equalScalar:r}),l=oe({typed:e,DenseMatrix:o}),c=fe({typed:e,equalScalar:r}),f=ae({typed:e}),h=se({typed:e});return e(Kr,{"number, number":Ge,"SparseMatrix, SparseMatrix":function(t,e){return u(t,e,this,!1)},"SparseMatrix, DenseMatrix":function(t,e){return s(e,t,this,!0)},"DenseMatrix, SparseMatrix":function(t,e){return a(t,e,this,!1)},"DenseMatrix, DenseMatrix":function(t,e){return f(t,e,this)},"Array, Array":function(t,e){return this(n(t),n(e)).valueOf()},"Array, Matrix":function(t,e){return this(n(t),e)},"Matrix, Array":function(t,e){return this(t,n(e))},"SparseMatrix, number | BigNumber":function(t,e){return r(e,0)?t.clone():c(t,e,this,!1)},"DenseMatrix, number | BigNumber":function(t,e){return r(e,0)?t.clone():h(t,e,this,!1)},"number | BigNumber, SparseMatrix":function(t,e){return r(t,0)?i(e.size(),e.storage()):l(e,t,this,!0)},"number | BigNumber, DenseMatrix":function(t,e){return r(t,0)?i(e.size(),e.storage()):h(e,t,this,!0)},"Array, number | BigNumber":function(t,e){return this(n(t),e).valueOf()},"number | BigNumber, Array":function(t,e){return this(t,n(e)).valueOf()}})})),Jr=Object(s.a)("and",["typed","matrix","equalScalar","zeros","not"],(function(t){var e=t.typed,n=t.matrix,r=t.equalScalar,i=t.zeros,o=t.not,a=le({typed:e,equalScalar:r}),s=ce({typed:e,equalScalar:r}),u=fe({typed:e,equalScalar:r}),l=ae({typed:e}),c=se({typed:e});return e("and",{"number, number":ln,"Complex, Complex":function(t,e){return!(0===t.re&&0===t.im||0===e.re&&0===e.im)},"BigNumber, BigNumber":function(t,e){return!(t.isZero()||e.isZero()||t.isNaN()||e.isNaN())},"Unit, Unit":function(t,e){return this(t.value||0,e.value||0)},"SparseMatrix, SparseMatrix":function(t,e){return s(t,e,this,!1)},"SparseMatrix, DenseMatrix":function(t,e){return a(e,t,this,!0)},"DenseMatrix, SparseMatrix":function(t,e){return a(t,e,this,!1)},"DenseMatrix, DenseMatrix":function(t,e){return l(t,e,this)},"Array, Array":function(t,e){return this(n(t),n(e)).valueOf()},"Array, Matrix":function(t,e){return this(n(t),e)},"Matrix, Array":function(t,e){return this(t,n(e))},"SparseMatrix, any":function(t,e){return o(e)?i(t.size(),t.storage()):u(t,e,this,!1)},"DenseMatrix, any":function(t,e){return o(e)?i(t.size(),t.storage()):c(t,e,this,!1)},"any, SparseMatrix":function(t,e){return o(t)?i(t.size(),t.storage()):u(e,t,this,!0)},"any, DenseMatrix":function(t,e){return o(t)?i(t.size(),t.storage()):c(e,t,this,!0)},"Array, any":function(t,e){return this(n(t),e).valueOf()},"any, Array":function(t,e){return this(t,n(e)).valueOf()}})})),Qr="compare",ti=Object(s.a)(Qr,["typed","config","matrix","equalScalar","BigNumber","Fraction","DenseMatrix"],(function(t){var e=t.typed,n=t.config,r=t.equalScalar,i=t.matrix,o=t.BigNumber,s=t.Fraction,u=t.DenseMatrix,l=me({typed:e}),c=ge({typed:e,equalScalar:r}),f=ve({typed:e,DenseMatrix:u}),h=ae({typed:e}),d=se({typed:e});return e(Qr,{"boolean, boolean":function(t,e){return t===e?0:e<t?1:-1},"number, number":function(t,e){return Object(a.m)(t,e,n.epsilon)?0:e<t?1:-1},"BigNumber, BigNumber":function(t,e){return nt(t,e,n.epsilon)?new o(0):new o(t.cmp(e))},"Fraction, Fraction":function(t,e){return new s(t.compare(e))},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")},"Unit, Unit":function(t,e){if(!t.equalBase(e))throw new Error("Cannot compare units with different base");return this(t.value,e.value)},"SparseMatrix, SparseMatrix":function(t,e){return c(t,e,this)},"SparseMatrix, DenseMatrix":function(t,e){return l(e,t,this,!0)},"DenseMatrix, SparseMatrix":function(t,e){return l(t,e,this,!1)},"DenseMatrix, DenseMatrix":function(t,e){return h(t,e,this)},"Array, Array":function(t,e){return this(i(t),i(e)).valueOf()},"Array, Matrix":function(t,e){return this(i(t),e)},"Matrix, Array":function(t,e){return this(t,i(e))},"SparseMatrix, any":function(t,e){return f(t,e,this,!1)},"DenseMatrix, any":function(t,e){return d(t,e,this,!1)},"any, SparseMatrix":function(t,e){return f(e,t,this,!0)},"any, DenseMatrix":function(t,e){return d(e,t,this,!0)},"Array, any":function(t,e){return d(i(t),e,this,!1).valueOf()},"any, Array":function(t,e){return d(i(e),t,this,!0).valueOf()}})})),ei=n(11),ni=n.n(ei),ri="compareNatural",ii=Object(s.a)(ri,["typed","compare"],(function(t){var e=t.typed,n=t.compare,i=n.signatures["boolean,boolean"];return e(ri,{"any, any":function(t,e){var a,s=Object(r.M)(t),u=Object(r.M)(e);if(!("number"!==s&&"BigNumber"!==s&&"Fraction"!==s||"number"!==u&&"BigNumber"!==u&&"Fraction"!==u))return"0"!==(a=n(t,e)).toString()?0<a?1:-1:ni()(s,u);if("Array"===s||"Matrix"===s||"Array"===u||"Matrix"===u)return 0!==(a=function t(e,n,i){return Object(r.H)(n)&&Object(r.H)(i)?o(e,n.toJSON().values,i.toJSON().values):Object(r.H)(n)?t(e,n.toArray(),i):Object(r.H)(i)?t(e,n,i.toArray()):Object(r.n)(n)?t(e,n.toJSON().data,i):Object(r.n)(i)?t(e,n,i.toJSON().data):Array.isArray(n)?Array.isArray(i)?o(e,n,i):t(e,n,[i]):t(e,[n],i)}(this,t,e))?a:ni()(s,u);if(s!==u)return ni()(s,u);if("Complex"===s)return function(t,e){return t.re>e.re?1:t.re<e.re?-1:t.im>e.im?1:t.im<e.im?-1:0}(t,e);if("Unit"===s)return t.equalBase(e)?this(t.value,e.value):o(this,t.formatUnits(),e.formatUnits());if("boolean"===s)return i(t,e);if("string"===s)return ni()(t,e);if("Object"===s)return function(t,e,n){var r=Object.keys(e),i=Object.keys(n);r.sort(ni.a),i.sort(ni.a);var a=o(t,r,i);if(0!==a)return a;for(var s=0;s<r.length;s++){var u=t(e[r[s]],n[i[s]]);if(0!==u)return u}return 0}(this,t,e);if("null"===s)return 0;if("undefined"===s)return 0;throw new TypeError('Unsupported type of value "'+s+'"')}});function o(t,e,n){for(var r=0,i=Math.min(e.length,n.length);r<i;r++){var o=t(e[r],n[r]);if(0!==o)return o}return e.length>n.length?1:e.length<n.length?-1:0}})),oi="compareText",ai=Object(s.a)(oi,["typed","matrix"],(function(t){var e=t.typed,n=t.matrix,r=ae({typed:e}),i=se({typed:e});return e(oi,{"any, any":E.a,"DenseMatrix, DenseMatrix":function(t,e){return r(t,e,E.a)},"Array, Array":function(t,e){return this(n(t),n(e)).valueOf()},"Array, Matrix":function(t,e){return this(n(t),e)},"Matrix, Array":function(t,e){return this(t,n(e))},"DenseMatrix, any":function(t,e){return i(t,e,E.a,!1)},"any, DenseMatrix":function(t,e){return i(e,t,E.a,!0)},"Array, any":function(t,e){return i(n(t),e,E.a,!1).valueOf()},"any, Array":function(t,e){return i(n(e),t,E.a,!0).valueOf()}})})),si="equal",ui=Object(s.a)(si,["typed","matrix","equalScalar","DenseMatrix"],(function(t){var e=t.typed,n=t.matrix,r=t.equalScalar,i=t.DenseMatrix,o=me({typed:e}),a=Qe({typed:e,DenseMatrix:i}),s=ve({typed:e,DenseMatrix:i}),u=ae({typed:e}),l=se({typed:e});return e(si,{"any, any":function(t,e){return null===t?null===e:null===e?null===t:void 0===t?void 0===e:void 0===e?void 0===t:r(t,e)},"SparseMatrix, SparseMatrix":function(t,e){return a(t,e,r)},"SparseMatrix, DenseMatrix":function(t,e){return o(e,t,r,!0)},"DenseMatrix, SparseMatrix":function(t,e){return o(t,e,r,!1)},"DenseMatrix, DenseMatrix":function(t,e){return u(t,e,r)},"Array, Array":function(t,e){return this(n(t),n(e)).valueOf()},"Array, Matrix":function(t,e){return this(n(t),e)},"Matrix, Array":function(t,e){return this(t,n(e))},"SparseMatrix, any":function(t,e){return s(t,e,r,!1)},"DenseMatrix, any":function(t,e){return l(t,e,r,!1)},"any, SparseMatrix":function(t,e){return s(e,t,r,!0)},"any, DenseMatrix":function(t,e){return l(e,t,r,!0)},"Array, any":function(t,e){return l(n(t),e,r,!1).valueOf()},"any, Array":function(t,e){return l(n(e),t,r,!0).valueOf()}})})),li=(Object(s.a)(si,["typed","equalScalar"],(function(t){var e=t.typed,n=t.equalScalar;return e(si,{"any, any":function(t,e){return null===t?null===e:null===e?null===t:void 0===t?void 0===e:void 0===e?void 0===t:n(t,e)}})})),"equalText"),ci=Object(s.a)(li,["typed","compareText","isZero"],(function(t){var e=t.typed,n=t.compareText,r=t.isZero;return e(li,{"any, any":function(t,e){return r(n(t,e))}})})),fi="smaller",hi=Object(s.a)(fi,["typed","config","matrix","DenseMatrix"],(function(t){var e=t.typed,n=t.config,r=t.matrix,i=t.DenseMatrix,o=me({typed:e}),s=Qe({typed:e,DenseMatrix:i}),u=ve({typed:e,DenseMatrix:i}),l=ae({typed:e}),c=se({typed:e});return e(fi,{"boolean, boolean":function(t,e){return t<e},"number, number":function(t,e){return t<e&&!Object(a.m)(t,e,n.epsilon)},"BigNumber, BigNumber":function(t,e){return t.lt(e)&&!nt(t,e,n.epsilon)},"Fraction, Fraction":function(t,e){return-1===t.compare(e)},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")},"Unit, Unit":function(t,e){if(!t.equalBase(e))throw new Error("Cannot compare units with different base");return this(t.value,e.value)},"SparseMatrix, SparseMatrix":function(t,e){return s(t,e,this)},"SparseMatrix, DenseMatrix":function(t,e){return o(e,t,this,!0)},"DenseMatrix, SparseMatrix":function(t,e){return o(t,e,this,!1)},"DenseMatrix, DenseMatrix":function(t,e){return l(t,e,this)},"Array, Array":function(t,e){return this(r(t),r(e)).valueOf()},"Array, Matrix":function(t,e){return this(r(t),e)},"Matrix, Array":function(t,e){return this(t,r(e))},"SparseMatrix, any":function(t,e){return u(t,e,this,!1)},"DenseMatrix, any":function(t,e){return c(t,e,this,!1)},"any, SparseMatrix":function(t,e){return u(e,t,this,!0)},"any, DenseMatrix":function(t,e){return c(e,t,this,!0)},"Array, any":function(t,e){return c(r(t),e,this,!1).valueOf()},"any, Array":function(t,e){return c(r(e),t,this,!0).valueOf()}})})),di="smallerEq",pi=Object(s.a)(di,["typed","config","matrix","DenseMatrix"],(function(t){var e=t.typed,n=t.config,r=t.matrix,i=t.DenseMatrix,o=me({typed:e}),s=Qe({typed:e,DenseMatrix:i}),u=ve({typed:e,DenseMatrix:i}),l=ae({typed:e}),c=se({typed:e});return e(di,{"boolean, boolean":function(t,e){return t<=e},"number, number":function(t,e){return t<=e||Object(a.m)(t,e,n.epsilon)},"BigNumber, BigNumber":function(t,e){return t.lte(e)||nt(t,e,n.epsilon)},"Fraction, Fraction":function(t,e){return 1!==t.compare(e)},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")},"Unit, Unit":function(t,e){if(!t.equalBase(e))throw new Error("Cannot compare units with different base");return this(t.value,e.value)},"SparseMatrix, SparseMatrix":function(t,e){return s(t,e,this)},"SparseMatrix, DenseMatrix":function(t,e){return o(e,t,this,!0)},"DenseMatrix, SparseMatrix":function(t,e){return o(t,e,this,!1)},"DenseMatrix, DenseMatrix":function(t,e){return l(t,e,this)},"Array, Array":function(t,e){return this(r(t),r(e)).valueOf()},"Array, Matrix":function(t,e){return this(r(t),e)},"Matrix, Array":function(t,e){return this(t,r(e))},"SparseMatrix, any":function(t,e){return u(t,e,this,!1)},"DenseMatrix, any":function(t,e){return c(t,e,this,!1)},"any, SparseMatrix":function(t,e){return u(e,t,this,!0)},"any, DenseMatrix":function(t,e){return c(e,t,this,!0)},"Array, any":function(t,e){return c(r(t),e,this,!1).valueOf()},"any, Array":function(t,e){return c(r(e),t,this,!0).valueOf()}})})),mi="larger",gi=Object(s.a)(mi,["typed","config","matrix","DenseMatrix"],(function(t){var e=t.typed,n=t.config,r=t.matrix,i=t.DenseMatrix,o=me({typed:e}),s=Qe({typed:e,DenseMatrix:i}),u=ve({typed:e,DenseMatrix:i}),l=ae({typed:e}),c=se({typed:e});return e(mi,{"boolean, boolean":function(t,e){return e<t},"number, number":function(t,e){return e<t&&!Object(a.m)(t,e,n.epsilon)},"BigNumber, BigNumber":function(t,e){return t.gt(e)&&!nt(t,e,n.epsilon)},"Fraction, Fraction":function(t,e){return 1===t.compare(e)},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")},"Unit, Unit":function(t,e){if(!t.equalBase(e))throw new Error("Cannot compare units with different base");return this(t.value,e.value)},"SparseMatrix, SparseMatrix":function(t,e){return s(t,e,this)},"SparseMatrix, DenseMatrix":function(t,e){return o(e,t,this,!0)},"DenseMatrix, SparseMatrix":function(t,e){return o(t,e,this,!1)},"DenseMatrix, DenseMatrix":function(t,e){return l(t,e,this)},"Array, Array":function(t,e){return this(r(t),r(e)).valueOf()},"Array, Matrix":function(t,e){return this(r(t),e)},"Matrix, Array":function(t,e){return this(t,r(e))},"SparseMatrix, any":function(t,e){return u(t,e,this,!1)},"DenseMatrix, any":function(t,e){return c(t,e,this,!1)},"any, SparseMatrix":function(t,e){return u(e,t,this,!0)},"any, DenseMatrix":function(t,e){return c(e,t,this,!0)},"Array, any":function(t,e){return c(r(t),e,this,!1).valueOf()},"any, Array":function(t,e){return c(r(e),t,this,!0).valueOf()}})})),vi="largerEq",yi=Object(s.a)(vi,["typed","config","matrix","DenseMatrix"],(function(t){var e=t.typed,n=t.config,r=t.matrix,i=t.DenseMatrix,o=me({typed:e}),s=Qe({typed:e,DenseMatrix:i}),u=ve({typed:e,DenseMatrix:i}),l=ae({typed:e}),c=se({typed:e});return e(vi,{"boolean, boolean":function(t,e){return e<=t},"number, number":function(t,e){return e<=t||Object(a.m)(t,e,n.epsilon)},"BigNumber, BigNumber":function(t,e){return t.gte(e)||nt(t,e,n.epsilon)},"Fraction, Fraction":function(t,e){return-1!==t.compare(e)},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")},"Unit, Unit":function(t,e){if(!t.equalBase(e))throw new Error("Cannot compare units with different base");return this(t.value,e.value)},"SparseMatrix, SparseMatrix":function(t,e){return s(t,e,this)},"SparseMatrix, DenseMatrix":function(t,e){return o(e,t,this,!0)},"DenseMatrix, SparseMatrix":function(t,e){return o(t,e,this,!1)},"DenseMatrix, DenseMatrix":function(t,e){return l(t,e,this)},"Array, Array":function(t,e){return this(r(t),r(e)).valueOf()},"Array, Matrix":function(t,e){return this(r(t),e)},"Matrix, Array":function(t,e){return this(t,r(e))},"SparseMatrix, any":function(t,e){return u(t,e,this,!1)},"DenseMatrix, any":function(t,e){return c(t,e,this,!1)},"any, SparseMatrix":function(t,e){return u(e,t,this,!0)},"any, DenseMatrix":function(t,e){return c(e,t,this,!0)},"Array, any":function(t,e){return c(r(t),e,this,!1).valueOf()},"any, Array":function(t,e){return c(r(e),t,this,!0).valueOf()}})})),bi="deepEqual",xi=Object(s.a)(bi,["typed","equal"],(function(t){var e=t.typed,n=t.equal;return e(bi,{"any, any":function(t,e){return function t(e,r){if(Array.isArray(e)){if(Array.isArray(r)){var i=e.length;if(i!==r.length)return!1;for(var o=0;o<i;o++)if(!t(e[o],r[o]))return!1;return!0}return!1}return!Array.isArray(r)&&n(e,r)}(t.valueOf(),e.valueOf())}})})),wi="unequal",_i=Object(s.a)(wi,["typed","config","equalScalar","matrix","DenseMatrix"],(function(t){var e=t.typed,n=(t.config,t.equalScalar),r=t.matrix,i=t.DenseMatrix,o=me({typed:e}),a=Qe({typed:e,DenseMatrix:i}),s=ve({typed:e,DenseMatrix:i}),u=ae({typed:e}),l=se({typed:e});return e("unequal",{"any, any":function(t,e){return null===t?null!==e:null===e?null!==t:void 0===t?void 0!==e:void 0===e?void 0!==t:c(t,e)},"SparseMatrix, SparseMatrix":function(t,e){return a(t,e,c)},"SparseMatrix, DenseMatrix":function(t,e){return o(e,t,c,!0)},"DenseMatrix, SparseMatrix":function(t,e){return o(t,e,c,!1)},"DenseMatrix, DenseMatrix":function(t,e){return u(t,e,c)},"Array, Array":function(t,e){return this(r(t),r(e)).valueOf()},"Array, Matrix":function(t,e){return this(r(t),e)},"Matrix, Array":function(t,e){return this(t,r(e))},"SparseMatrix, any":function(t,e){return s(t,e,c,!1)},"DenseMatrix, any":function(t,e){return l(t,e,c,!1)},"any, SparseMatrix":function(t,e){return s(e,t,c,!0)},"any, DenseMatrix":function(t,e){return l(e,t,c,!0)},"Array, any":function(t,e){return l(r(t),e,c,!1).valueOf()},"any, Array":function(t,e){return l(r(e),t,c,!0).valueOf()}});function c(t,e){return!n(t,e)}})),Si=(Object(s.a)(wi,["typed","equalScalar"],(function(t){var e=t.typed,n=t.equalScalar;return e(wi,{"any, any":function(t,e){return null===t?null!==e:null===e?null!==t:void 0===t?void 0!==e:void 0===e?void 0!==t:!n(t,e)}})})),"partitionSelect"),Oi=Object(s.a)(Si,["typed","isNumeric","isNaN","compare"],(function(t){function e(t,e){return-s(t,e)}var n=t.typed,i=t.isNumeric,o=t.isNaN,s=t.compare,u=s;return n(Si,{"Array | Matrix, number":function(t,e){return l(t,e,u)},"Array | Matrix, number, string":function(t,n,r){if("asc"===r)return l(t,n,u);if("desc"===r)return l(t,n,e);throw new Error('Compare string must be "asc" or "desc"')},"Array | Matrix, number, function":l});function l(t,e,n){if(!Object(a.i)(e)||e<0)throw new Error("k must be a non-negative integer");if(Object(r.v)(t)){if(1<t.size().length)throw new Error("Only one dimensional matrices supported");return c(t.valueOf(),e,n)}if(Array.isArray(t))return c(t,e,n)}function c(t,e,n){if(e>=t.length)throw new Error("k out of bounds");for(var r=0;r<t.length;r++)if(i(t[r])&&o(t[r]))return t[r];for(var a=0,s=t.length-1;a<s;){for(var u,l=a,c=s,f=t[Math.floor(Math.random()*(s-a+1))+a];l<c;)0<=n(t[l],f)?(u=t[c],t[c]=t[l],t[l]=u,--c):++l;0<n(t[l],f)&&--l,e<=l?s=l:a=l+1}return t[e]}})),Ni=Object(s.a)("sort",["typed","matrix","compare","compareNatural"],(function(t){function e(t,e){return-i(t,e)}var n=t.typed,r=t.matrix,i=t.compare,o=t.compareNatural,a=i;return n("sort",{Array:function(t){return u(t),t.sort(a)},Matrix:function(t){return l(t),r(t.toArray().sort(a),t.storage())},"Array, function":function(t,e){return u(t),t.sort(e)},"Matrix, function":function(t,e){return l(t),r(t.toArray().sort(e),t.storage())},"Array, string":function(t,e){return u(t),t.sort(s(e))},"Matrix, string":function(t,e){return l(t),r(t.toArray().sort(s(e)),t.storage())}});function s(t){if("asc"===t)return a;if("desc"===t)return e;if("natural"===t)return o;throw new Error('String "asc", "desc", or "natural" expected')}function u(t){if(1!==Object(M.a)(t).length)throw new Error("One dimensional array expected")}function l(t){if(1!==t.size().length)throw new Error("One dimensional matrix expected")}})),Mi=Object(s.a)("max",["typed","config","numeric","larger"],(function(t){var e=t.typed,n=t.config,r=t.numeric,i=t.larger;return e("max",{"Array | Matrix":a,"Array | Matrix, number | BigNumber":function(t,e){return R(t,e.valueOf(),o)},"...":function(t){if(j(t))throw new TypeError("Scalar values expected in function max");return a(t)}});function o(t,e){try{return i(t,e)?t:e}catch(t){throw vr(t,"max",e)}}function a(t){var e;if(P(t,(function(t){try{isNaN(t)&&"number"==typeof t?e=NaN:void 0!==e&&!i(t,e)||(e=t)}catch(e){throw vr(e,"max",t)}})),void 0===e)throw new Error("Cannot calculate max of an empty array");return"string"==typeof e&&(e=r(e,n.number)),e}})),Ei=Object(s.a)("min",["typed","config","numeric","smaller"],(function(t){var e=t.typed,n=t.config,r=t.numeric,i=t.smaller;return e("min",{"Array | Matrix":a,"Array | Matrix, number | BigNumber":function(t,e){return R(t,e.valueOf(),o)},"...":function(t){if(j(t))throw new TypeError("Scalar values expected in function min");return a(t)}});function o(t,e){try{return i(t,e)?t:e}catch(t){throw vr(t,"min",e)}}function a(t){var e;if(P(t,(function(t){try{isNaN(t)&&"number"==typeof t?e=NaN:void 0!==e&&!i(t,e)||(e=t)}catch(e){throw vr(e,"min",t)}})),void 0===e)throw new Error("Cannot calculate min of an empty array");return"string"==typeof e&&(e=r(e,n.number)),e}})),ki=Object(s.a)("ImmutableDenseMatrix",["smaller","DenseMatrix"],(function(t){var e=t.smaller,n=t.DenseMatrix;function i(t,e){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");if(e&&!Object(r.I)(e))throw new Error("Invalid datatype: "+e);if(Object(r.v)(t)||Object(r.b)(t)){var o=new n(t,e);this._data=o._data,this._size=o._size,this._datatype=o._datatype,this._min=null,this._max=null}else if(t&&Object(r.b)(t.data)&&Object(r.b)(t.size))this._data=t.data,this._size=t.size,this._datatype=t.datatype,this._min=void 0!==t.min?t.min:null,this._max=void 0!==t.max?t.max:null;else{if(t)throw new TypeError("Unsupported type of data ("+Object(r.M)(t)+")");this._data=[],this._size=[0],this._datatype=e,this._min=null,this._max=null}}return(i.prototype=new n).type="ImmutableDenseMatrix",i.prototype.isImmutableDenseMatrix=!0,i.prototype.subset=function(t){switch(arguments.length){case 1:var e=n.prototype.subset.call(this,t);return Object(r.v)(e)?new i({data:e._data,size:e._size,datatype:e._datatype}):e;case 2:case 3:throw new Error("Cannot invoke set subset on an Immutable Matrix instance");default:throw new SyntaxError("Wrong number of arguments")}},i.prototype.set=function(){throw new Error("Cannot invoke set on an Immutable Matrix instance")},i.prototype.resize=function(){throw new Error("Cannot invoke resize on an Immutable Matrix instance")},i.prototype.reshape=function(){throw new Error("Cannot invoke reshape on an Immutable Matrix instance")},i.prototype.clone=function(){return new i({data:Object(k.a)(this._data),size:Object(k.a)(this._size),datatype:this._datatype})},i.prototype.toJSON=function(){return{mathjs:"ImmutableDenseMatrix",data:this._data,size:this._size,datatype:this._datatype}},i.fromJSON=function(t){return new i(t)},i.prototype.swapRows=function(){throw new Error("Cannot invoke swapRows on an Immutable Matrix instance")},i.prototype.min=function(){var t;return null===this._min&&(t=null,this.forEach((function(n){null!==t&&!e(n,t)||(t=n)})),this._min=null!==t?t:void 0),this._min},i.prototype.max=function(){var t;return null===this._max&&(t=null,this.forEach((function(n){null!==t&&!e(t,n)||(t=n)})),this._max=null!==t?t:void 0),this._max},i}),{isClass:!0}),Ci=Object(s.a)("Index",["ImmutableDenseMatrix"],(function(t){var e=t.ImmutableDenseMatrix;function n(t){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");this._dimensions=[],this._isScalar=!0;for(var e=0,o=arguments.length;e<o;e++){var a=arguments[e];if(Object(r.D)(a))this._dimensions.push(a),this._isScalar=!1;else if(Array.isArray(a)||Object(r.v)(a)){var s=i(a.valueOf());this._dimensions.push(s);var u=s.size();1===u.length&&1===u[0]||(this._isScalar=!1)}else if("number"==typeof a)this._dimensions.push(i([a]));else{if("string"!=typeof a)throw new TypeError("Dimension must be an Array, Matrix, number, string, or Range");this._dimensions.push(a)}}}function i(t){for(var n=0,r=t.length;n<r;n++)if("number"!=typeof t[n]||!Object(a.i)(t[n]))throw new TypeError("Index parameters must be positive integer numbers");return new e(t)}return n.prototype.type="Index",n.prototype.isIndex=!0,n.prototype.clone=function(){var t=new n;return t._dimensions=Object(k.a)(this._dimensions),t._isScalar=this._isScalar,t},n.create=function(t){var e=new n;return n.apply(e,t),e},n.prototype.size=function(){for(var t=[],e=0,n=this._dimensions.length;e<n;e++){var r=this._dimensions[e];t[e]="string"==typeof r?1:r.size()[0]}return t},n.prototype.max=function(){for(var t=[],e=0,n=this._dimensions.length;e<n;e++){var r=this._dimensions[e];t[e]="string"==typeof r?r:r.max()}return t},n.prototype.min=function(){for(var t=[],e=0,n=this._dimensions.length;e<n;e++){var r=this._dimensions[e];t[e]="string"==typeof r?r:r.min()}return t},n.prototype.forEach=function(t){for(var e=0,n=this._dimensions.length;e<n;e++)t(this._dimensions[e],e,this)},n.prototype.dimension=function(t){return this._dimensions[t]||null},n.prototype.isObjectProperty=function(){return 1===this._dimensions.length&&"string"==typeof this._dimensions[0]},n.prototype.getObjectProperty=function(){return this.isObjectProperty()?this._dimensions[0]:null},n.prototype.isScalar=function(){return this._isScalar},n.prototype.valueOf=n.prototype.toArray=function(){for(var t=[],e=0,n=this._dimensions.length;e<n;e++){var r=this._dimensions[e];t.push("string"==typeof r?r:r.toArray())}return t},n.prototype.toString=function(){for(var t=[],e=0,n=this._dimensions.length;e<n;e++){var r=this._dimensions[e];"string"==typeof r?t.push(JSON.stringify(r)):t.push(r.toString())}return"["+t.join(", ")+"]"},n.prototype.toJSON=function(){return{mathjs:"Index",dimensions:this._dimensions}},n.fromJSON=function(t){return n.create(t.dimensions)},n}),{isClass:!0}),Ti=Object(s.a)("FibonacciHeap",["smaller","larger"],(function(t){var e=t.smaller,n=t.larger,r=1/Math.log((1+Math.sqrt(5))/2);function i(){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");this._minimum=null,this._size=0}function o(t,e,n){e.left.right=e.right,e.right.left=e.left,n.degree--,n.child===e&&(n.child=e.right),0===n.degree&&(n.child=null),e.left=t,e.right=t.right,((t.right=e).right.left=e).parent=null,e.mark=!1}i.prototype.type="FibonacciHeap",i.prototype.isFibonacciHeap=!0,i.prototype.insert=function(t,n){var r,i={key:t,value:n,degree:0};return this._minimum?(r=this._minimum,i.left=r,i.right=r.right,(r.right=i).right.left=i,e(t,r.key)&&(this._minimum=i)):((i.left=i).right=i,this._minimum=i),this._size++,i},i.prototype.size=function(){return this._size},i.prototype.clear=function(){this._minimum=null,this._size=0},i.prototype.isEmpty=function(){return 0===this._size},i.prototype.extractMinimum=function(){var t=this._minimum;if(null===t)return t;for(var i=this._minimum,o=t.degree,s=t.child;0<o;){var u=s.right;s.left.right=s.right,s.right.left=s.left,s.left=i,s.right=i.right,((i.right=s).right.left=s).parent=null,s=u,o--}return t.left.right=t.right,t.right.left=t.left,i=t===t.right?null:function(t,i){var o,s=Math.floor(Math.log(i)*r)+1,u=new Array(s),l=0,c=t;if(c)for(l++,c=c.right;c!==t;)l++,c=c.right;for(;0<l;){for(var f,h=c.degree,d=c.right;o=u[h];)n(c.key,o.key)&&(f=o,o=c,c=f),a(o,c),u[h]=null,h++;u[h]=c,c=d,l--}t=null;for(var p=0;p<s;p++)(o=u[p])&&(t?(o.left.right=o.right,o.right.left=o.left,o.left=t,o.right=t.right,(t.right=o).right.left=o,e(o.key,t.key)&&(t=o)):t=o);return t}(i=t.right,this._size),this._size--,this._minimum=i,t},i.prototype.remove=function(t){this._minimum=function(t,n,r){n.key=-1;var i=n.parent;return i&&e(n.key,i.key)&&(o(t,n,i),function t(e,n){var r=n.parent;r&&(n.mark?(o(e,n,r),t(r)):n.mark=!0)}(t,i)),e(n.key,t.key)&&(t=n),t}(this._minimum,t),this.extractMinimum()};var a=function(t,e){t.left.right=t.right,t.right.left=t.left,(t.parent=e).child?(t.left=e.child,t.right=e.child.right,(e.child.right=t).right.left=t):((e.child=t).right=t).left=t,e.degree++,t.mark=!1};return i}),{isClass:!0}),Di=Object(s.a)("Spa",["addScalar","equalScalar","FibonacciHeap"],(function(t){var e=t.addScalar,n=t.equalScalar,r=t.FibonacciHeap;function i(){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");this._values=[],this._heap=new r}return i.prototype.type="Spa",i.prototype.isSpa=!0,i.prototype.set=function(t,e){var n;this._values[t]?this._values[t].value=e:(n=this._heap.insert(t,e),this._values[t]=n)},i.prototype.get=function(t){var e=this._values[t];return e?e.value:0},i.prototype.accumulate=function(t,n){var r=this._values[t];r?r.value=e(r.value,n):(r=this._heap.insert(t,n),this._values[t]=r)},i.prototype.forEach=function(t,e,r){var i=this._heap,o=this._values,a=[];for((u=i.extractMinimum())&&a.push(u);u&&u.key<=e;)u.key>=t&&(n(u.value,0)||r(u.key,u.value,this)),(u=i.extractMinimum())&&a.push(u);for(var s=0;s<a.length;s++){var u,l=a[s];o[(u=i.insert(l.key,l.value)).key]=u}},i.prototype.swap=function(t,e){var n,r=this._values[t],i=this._values[e];!r&&i?(r=this._heap.insert(t,i.value),this._heap.remove(i),this._values[t]=r,this._values[e]=void 0):r&&!i?(i=this._heap.insert(e,r.value),this._heap.remove(r),this._values[e]=i,this._values[t]=void 0):r&&i&&(n=r.value,r.value=i.value,i.value=n)},i}),{isClass:!0}),Ai=yn((function(t){return new t(1).exp()}),Ri),ji=yn((function(t){return new t(1).plus(new t(5).sqrt()).div(2)}),Ri),Pi=yn((function(t){return t.acos(-1)}),Ri),Ii=yn((function(t){return Pi(t).times(2)}),Ri);function Ri(t){return t[0].precision}function Li(t){return(Li="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Fi(){return(Fi=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function qi(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)),r}function Bi(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?qi(Object(n),!0).forEach((function(e){var r,i,o;r=t,o=n[i=e],i in r?Object.defineProperty(r,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):qi(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var zi=Object(s.a)("Unit",["?on","config","addScalar","subtract","multiplyScalar","divideScalar","pow","abs","fix","round","equal","isNumeric","format","number","Complex","BigNumber","Fraction"],(function(t){var e,n,i,o=t.on,a=t.config,s=t.addScalar,u=t.subtract,l=t.multiplyScalar,c=t.divideScalar,f=t.pow,h=t.abs,d=t.fix,p=t.round,m=t.equal,g=t.isNumeric,v=t.format,y=t.number,b=t.Complex,x=t.BigNumber,w=t.Fraction,_=y;function S(t,e){if(!(this instanceof S))throw new Error("Constructor must be called with the new operator");if(null!=t&&!g(t)&&!Object(r.j)(t))throw new TypeError("First parameter in Unit constructor must be number, BigNumber, Fraction, Complex, or undefined");if(void 0!==e&&("string"!=typeof e||""===e))throw new TypeError("Second parameter in Unit constructor must be a string");if(void 0!==e){var n=S.parse(e);this.units=n.units,this.dimensions=n.dimensions}else{this.units=[{unit:F,prefix:P.NONE,power:0}],this.dimensions=[];for(var i=0;i<I.length;i++)this.dimensions[i]=0}this.value=null!=t?this._normalize(t):null,this.fixPrefix=!1,this.skipAutomaticSimplification=!0}function O(){for(;" "===i||"\t"===i;)M()}function N(t){return"0"<=t&&t<="9"}function M(){n++,i=e.charAt(n)}function C(t){n=t,i=e.charAt(n)}function T(){var t,e="",r=n;if("+"===i?M():"-"===i&&(e+=i,M()),!("0"<=(t=i)&&t<="9"||"."===t))return C(r),null;if("."===i){if(e+=i,M(),!N(i))return C(r),null}else{for(;N(i);)e+=i,M();"."===i&&(e+=i,M())}for(;N(i);)e+=i,M();if("E"===i||"e"===i){var o="",a=n;if(o+=i,M(),"+"!==i&&"-"!==i||(o+=i,M()),!N(i))return C(a),e;for(e+=o;N(i);)e+=i,M()}return e}function D(t){return i===t&&(M(),t)}function A(t){if(Object(k.f)(q,t)){var e=q[t];return{unit:e,prefix:e.prefixes[""]}}for(var n in q)if(Object(k.f)(q,n)&&Object(E.b)(t,n)){var r=q[n],i=t.length-n.length,o=t.substring(0,i),a=Object(k.f)(r.prefixes,o)?r.prefixes[o]:void 0;if(void 0!==a)return{unit:r,prefix:a}}return null}function j(t){return t.equalBase(R.NONE)&&null!==t.value&&!a.predictable?t.value:t}S.prototype.type="Unit",S.prototype.isUnit=!0,S.parse=function(t,r){if(r=r||{},n=-1,i="","string"!=typeof(e=t))throw new TypeError("Invalid argument in Unit.parse, string expected");var o=new S,s=1,u=!(o.units=[]);M(),O();var l=T(),c=null;if(l){if("BigNumber"===a.number)c=new x(l);else if("Fraction"===a.number)try{c=new w(l)}catch(t){c=parseFloat(l)}else c=parseFloat(l);O(),D("*")?(s=1,u=!0):D("/")&&(s=-1,u=!0)}for(var f=[],h=1;;){for(O();"("===i;)f.push(s),h*=s,s=1,M(),O();var d;if(!i)break;var p=i;if(null===(d=function(){for(var t="",r=e.charCodeAt(n);48<=r&&r<=57||65<=r&&r<=90||97<=r&&r<=122;)t+=i,M(),r=e.charCodeAt(n);return(65<=(r=t.charCodeAt(0))&&r<=90||97<=r&&r<=122)&&t||null}()))throw new SyntaxError('Unexpected "'+p+'" in "'+e+'" at index '+n.toString());var m=A(d);if(null===m)throw new SyntaxError('Unit "'+d+'" not found.');var g=s*h;if(O(),D("^")){O();var v=T();if(null===v)throw new SyntaxError('In "'+t+'", "^" must be followed by a floating-point number');g*=v}o.units.push({unit:m.unit,prefix:m.prefix,power:g});for(var y,b=0;b<I.length;b++)o.dimensions[b]+=(m.unit.dimensions[b]||0)*g;for(O();")"===i;){if(0===f.length)throw new SyntaxError('Unmatched ")" in "'+e+'" at index '+n.toString());h/=f.pop(),M(),O()}u=!1,D("*")?(s=1,u=!0):D("/")?(s=-1,u=!0):s=1,m.unit.base&&(y=m.unit.base.key,H.auto[y]={unit:m.unit,prefix:m.prefix})}if(O(),i)throw new SyntaxError('Could not parse: "'+t+'"');if(u)throw new SyntaxError('Trailing characters: "'+t+'"');if(0!==f.length)throw new SyntaxError('Unmatched "(" in "'+e+'"');if(0===o.units.length&&!r.allowNoUnits)throw new SyntaxError('"'+t+'" contains no units');return o.value=void 0!==c?o._normalize(c):null,o},S.prototype.clone=function(){var t=new S;t.fixPrefix=this.fixPrefix,t.skipAutomaticSimplification=this.skipAutomaticSimplification,t.value=Object(k.a)(this.value),t.dimensions=this.dimensions.slice(0),t.units=[];for(var e=0;e<this.units.length;e++)for(var n in t.units[e]={},this.units[e])Object(k.f)(this.units[e],n)&&(t.units[e][n]=this.units[e][n]);return t},S.prototype._isDerived=function(){return 0!==this.units.length&&(1<this.units.length||1e-15<Math.abs(this.units[0].power-1))},S.prototype._normalize=function(t){var e,n,i,o;if(null==t||0===this.units.length)return t;if(this._isDerived()){for(var a=t,u=S._getNumberConverter(Object(r.M)(t)),c=0;c<this.units.length;c++)e=u(this.units[c].unit.value),o=u(this.units[c].prefix.value),i=u(this.units[c].power),a=l(a,f(l(e,o),i));return a}return e=(u=S._getNumberConverter(Object(r.M)(t)))(this.units[0].unit.value),n=u(this.units[0].unit.offset),o=u(this.units[0].prefix.value),l(s(t,n),l(e,o))},S.prototype._denormalize=function(t,e){var n,i,o,a;if(null==t||0===this.units.length)return t;if(this._isDerived()){for(var s=t,h=S._getNumberConverter(Object(r.M)(t)),d=0;d<this.units.length;d++)n=h(this.units[d].unit.value),a=h(this.units[d].prefix.value),o=h(this.units[d].power),s=c(s,f(l(n,a),o));return s}return n=(h=S._getNumberConverter(Object(r.M)(t)))(this.units[0].unit.value),a=h(this.units[0].prefix.value),i=h(this.units[0].unit.offset),u(c(c(t,n),null==e?a:e),i)},S.isValuelessUnit=function(t){return null!==A(t)},S.prototype.hasBase=function(t){if("string"==typeof t&&(t=R[t]),!t)return!1;for(var e=0;e<I.length;e++)if(1e-12<Math.abs((this.dimensions[e]||0)-(t.dimensions[e]||0)))return!1;return!0},S.prototype.equalBase=function(t){for(var e=0;e<I.length;e++)if(1e-12<Math.abs((this.dimensions[e]||0)-(t.dimensions[e]||0)))return!1;return!0},S.prototype.equals=function(t){return this.equalBase(t)&&m(this.value,t.value)},S.prototype.multiply=function(t){for(var e=this.clone(),n=0;n<I.length;n++)e.dimensions[n]=(this.dimensions[n]||0)+(t.dimensions[n]||0);for(var r,i,o=0;o<t.units.length;o++){var a=Bi({},t.units[o]);e.units.push(a)}return null!==this.value||null!==t.value?(r=null===this.value?this._normalize(1):this.value,i=null===t.value?t._normalize(1):t.value,e.value=l(r,i)):e.value=null,e.skipAutomaticSimplification=!1,j(e)},S.prototype.divide=function(t){for(var e=this.clone(),n=0;n<I.length;n++)e.dimensions[n]=(this.dimensions[n]||0)-(t.dimensions[n]||0);for(var r,i,o=0;o<t.units.length;o++){var a=Bi(Bi({},t.units[o]),{},{power:-t.units[o].power});e.units.push(a)}return null!==this.value||null!==t.value?(r=null===this.value?this._normalize(1):this.value,i=null===t.value?t._normalize(1):t.value,e.value=c(r,i)):e.value=null,e.skipAutomaticSimplification=!1,j(e)},S.prototype.pow=function(t){for(var e=this.clone(),n=0;n<I.length;n++)e.dimensions[n]=(this.dimensions[n]||0)*t;for(var r=0;r<e.units.length;r++)e.units[r].power*=t;return null!==e.value?e.value=f(e.value,t):e.value=null,e.skipAutomaticSimplification=!1,j(e)},S.prototype.abs=function(){var t=this.clone();for(var e in t.value=null!==t.value?h(t.value):null,t.units)"VA"!==t.units[e].unit.name&&"VAR"!==t.units[e].unit.name||(t.units[e].unit=q.W);return t},S.prototype.to=function(t){var e,n=null===this.value?this._normalize(1):this.value;if("string"==typeof t){if(e=S.parse(t),!this.equalBase(e))throw new Error("Units do not match ('".concat(e.toString(),"' != '").concat(this.toString(),"')"));if(null!==e.value)throw new Error("Cannot convert to a unit with a value");return e.value=Object(k.a)(n),e.fixPrefix=!0,e.skipAutomaticSimplification=!0,e}if(Object(r.L)(t)){if(!this.equalBase(t))throw new Error("Units do not match ('".concat(t.toString(),"' != '").concat(this.toString(),"')"));if(null!==t.value)throw new Error("Cannot convert to a unit with a value");return(e=t.clone()).value=Object(k.a)(n),e.fixPrefix=!0,e.skipAutomaticSimplification=!0,e}throw new Error("String or Unit expected as parameter")},S.prototype.toNumber=function(t){return _(this.toNumeric(t))},S.prototype.toNumeric=function(t){var e=t?this.to(t):this.clone();return e._isDerived()||0===e.units.length?e._denormalize(e.value):e._denormalize(e.value,e.units[0].prefix.value)},S.prototype.toString=function(){return this.format()},S.prototype.toJSON=function(){return{mathjs:"Unit",value:this._denormalize(this.value),unit:this.formatUnits(),fixPrefix:this.fixPrefix}},S.fromJSON=function(t){var e=new S(t.value,t.unit);return e.fixPrefix=t.fixPrefix||!1,e},S.prototype.valueOf=S.prototype.toString,S.prototype.simplify=function(){var t,e,n=this.clone(),r=[];for(var i in W)if(Object(k.f)(W,i)&&n.hasBase(R[i])){t=i;break}if("NONE"===t)n.units=[];else if(t&&Object(k.f)(W,t)&&(e=W[t]),e)n.units=[{unit:e.unit,prefix:e.prefix,power:1}];else{for(var o=!1,a=0;a<I.length;a++){var s=I[a];1e-12<Math.abs(n.dimensions[a]||0)&&(Object(k.f)(W,s)?r.push({unit:W[s].unit,prefix:W[s].prefix,power:n.dimensions[a]||0}):o=!0)}r.length<n.units.length&&!o&&(n.units=r)}return n},S.prototype.toSI=function(){for(var t=this.clone(),e=[],n=0;n<I.length;n++){var r=I[n];if(1e-12<Math.abs(t.dimensions[n]||0)){if(!Object(k.f)(H.si,r))throw new Error("Cannot express custom unit "+r+" in SI units");e.push({unit:H.si[r].unit,prefix:H.si[r].prefix,power:t.dimensions[n]||0})}}return t.units=e,t.fixPrefix=!0,t.skipAutomaticSimplification=!0,t},S.prototype.formatUnits=function(){for(var t="",e="",n=0,r=0,i=0;i<this.units.length;i++)0<this.units[i].power?(n++,t+=" "+this.units[i].prefix.name+this.units[i].unit.name,1e-15<Math.abs(this.units[i].power-1)&&(t+="^"+this.units[i].power)):this.units[i].power<0&&r++;if(0<r)for(var o=0;o<this.units.length;o++)this.units[o].power<0&&(0<n?(e+=" "+this.units[o].prefix.name+this.units[o].unit.name,1e-15<Math.abs(this.units[o].power+1)&&(e+="^"+-this.units[o].power)):(e+=" "+this.units[o].prefix.name+this.units[o].unit.name,e+="^"+this.units[o].power));t=t.substr(1),e=e.substr(1),1<n&&0<r&&(t="("+t+")"),1<r&&0<n&&(e="("+e+")");var a=t;return 0<n&&0<r&&(a+=" / "),a+e},S.prototype.format=function(t){var e=this.skipAutomaticSimplification||null===this.value?this.clone():this.simplify(),n=!1;for(var i in void 0!==e.value&&null!==e.value&&Object(r.j)(e.value)&&(n=Math.abs(e.value.re)<1e-14),e.units)Object(k.f)(e.units,i)&&e.units[i].unit&&("VA"===e.units[i].unit.name&&n?e.units[i].unit=q.VAR:"VAR"!==e.units[i].unit.name||n||(e.units[i].unit=q.VA));1!==e.units.length||e.fixPrefix||Math.abs(e.units[0].power-Math.round(e.units[0].power))<1e-14&&(e.units[0].prefix=e._bestPrefix());var o=e._denormalize(e.value),a=null!==e.value?v(o,t||{}):"",s=e.formatUnits();return e.value&&Object(r.j)(e.value)&&(a="("+a+")"),0<s.length&&0<a.length&&(a+=" "),a+s},S.prototype._bestPrefix=function(){if(1!==this.units.length)throw new Error("Can only compute the best prefix for single units with integer powers, like kg, s^2, N^-1, and so forth!");if(1e-14<=Math.abs(this.units[0].power-Math.round(this.units[0].power)))throw new Error("Can only compute the best prefix for single units with integer powers, like kg, s^2, N^-1, and so forth!");var t=null!==this.value?h(this.value):0,e=h(this.units[0].unit.value),n=this.units[0].prefix;if(0===t)return n;var r=this.units[0].power,i=Math.log(t/Math.pow(n.value*e,r))/Math.LN10-1.2;if(-2.200001<i&&i<1.800001)return n;i=Math.abs(i);var o,a,s=this.units[0].unit.prefixes;for(var u in s)Object(k.f)(s,u)&&(!(o=s[u]).scientific||((a=Math.abs(Math.log(t/Math.pow(o.value*e,r))/Math.LN10-1.2))<i||a===i&&o.name.length<n.name.length)&&(n=o,i=a));return n};var P={NONE:{"":{name:"",value:1,scientific:!0}},SHORT:{"":{name:"",value:1,scientific:!0},da:{name:"da",value:10,scientific:!(S.prototype.splitUnit=function(t){for(var e=this.clone(),n=[],r=0;r<t.length&&(e=e.to(t[r]),r!==t.length-1);r++){var i=e.toNumeric(),o=p(i),a=new S(m(o,i)?o:d(e.toNumeric()),t[r].toString());n.push(a),e=u(e,a)}for(var l=0,c=0;c<n.length;c++)l=s(l,n[c].value);return m(l,this.value)&&(e.value=0),n.push(e),n})},h:{name:"h",value:100,scientific:!1},k:{name:"k",value:1e3,scientific:!0},M:{name:"M",value:1e6,scientific:!0},G:{name:"G",value:1e9,scientific:!0},T:{name:"T",value:1e12,scientific:!0},P:{name:"P",value:1e15,scientific:!0},E:{name:"E",value:1e18,scientific:!0},Z:{name:"Z",value:1e21,scientific:!0},Y:{name:"Y",value:1e24,scientific:!0},d:{name:"d",value:.1,scientific:!1},c:{name:"c",value:.01,scientific:!1},m:{name:"m",value:.001,scientific:!0},u:{name:"u",value:1e-6,scientific:!0},n:{name:"n",value:1e-9,scientific:!0},p:{name:"p",value:1e-12,scientific:!0},f:{name:"f",value:1e-15,scientific:!0},a:{name:"a",value:1e-18,scientific:!0},z:{name:"z",value:1e-21,scientific:!0},y:{name:"y",value:1e-24,scientific:!0}},LONG:{"":{name:"",value:1,scientific:!0},deca:{name:"deca",value:10,scientific:!1},hecto:{name:"hecto",value:100,scientific:!1},kilo:{name:"kilo",value:1e3,scientific:!0},mega:{name:"mega",value:1e6,scientific:!0},giga:{name:"giga",value:1e9,scientific:!0},tera:{name:"tera",value:1e12,scientific:!0},peta:{name:"peta",value:1e15,scientific:!0},exa:{name:"exa",value:1e18,scientific:!0},zetta:{name:"zetta",value:1e21,scientific:!0},yotta:{name:"yotta",value:1e24,scientific:!0},deci:{name:"deci",value:.1,scientific:!1},centi:{name:"centi",value:.01,scientific:!1},milli:{name:"milli",value:.001,scientific:!0},micro:{name:"micro",value:1e-6,scientific:!0},nano:{name:"nano",value:1e-9,scientific:!0},pico:{name:"pico",value:1e-12,scientific:!0},femto:{name:"femto",value:1e-15,scientific:!0},atto:{name:"atto",value:1e-18,scientific:!0},zepto:{name:"zepto",value:1e-21,scientific:!0},yocto:{name:"yocto",value:1e-24,scientific:!0}},SQUARED:{"":{name:"",value:1,scientific:!0},da:{name:"da",value:100,scientific:!1},h:{name:"h",value:1e4,scientific:!1},k:{name:"k",value:1e6,scientific:!0},M:{name:"M",value:1e12,scientific:!0},G:{name:"G",value:1e18,scientific:!0},T:{name:"T",value:1e24,scientific:!0},P:{name:"P",value:1e30,scientific:!0},E:{name:"E",value:1e36,scientific:!0},Z:{name:"Z",value:1e42,scientific:!0},Y:{name:"Y",value:1e48,scientific:!0},d:{name:"d",value:.01,scientific:!1},c:{name:"c",value:1e-4,scientific:!1},m:{name:"m",value:1e-6,scientific:!0},u:{name:"u",value:1e-12,scientific:!0},n:{name:"n",value:1e-18,scientific:!0},p:{name:"p",value:1e-24,scientific:!0},f:{name:"f",value:1e-30,scientific:!0},a:{name:"a",value:1e-36,scientific:!0},z:{name:"z",value:1e-42,scientific:!0},y:{name:"y",value:1e-48,scientific:!0}},CUBIC:{"":{name:"",value:1,scientific:!0},da:{name:"da",value:1e3,scientific:!1},h:{name:"h",value:1e6,scientific:!1},k:{name:"k",value:1e9,scientific:!0},M:{name:"M",value:1e18,scientific:!0},G:{name:"G",value:1e27,scientific:!0},T:{name:"T",value:1e36,scientific:!0},P:{name:"P",value:1e45,scientific:!0},E:{name:"E",value:1e54,scientific:!0},Z:{name:"Z",value:1e63,scientific:!0},Y:{name:"Y",value:1e72,scientific:!0},d:{name:"d",value:.001,scientific:!1},c:{name:"c",value:1e-6,scientific:!1},m:{name:"m",value:1e-9,scientific:!0},u:{name:"u",value:1e-18,scientific:!0},n:{name:"n",value:1e-27,scientific:!0},p:{name:"p",value:1e-36,scientific:!0},f:{name:"f",value:1e-45,scientific:!0},a:{name:"a",value:1e-54,scientific:!0},z:{name:"z",value:1e-63,scientific:!0},y:{name:"y",value:1e-72,scientific:!0}},BINARY_SHORT_SI:{"":{name:"",value:1,scientific:!0},k:{name:"k",value:1e3,scientific:!0},M:{name:"M",value:1e6,scientific:!0},G:{name:"G",value:1e9,scientific:!0},T:{name:"T",value:1e12,scientific:!0},P:{name:"P",value:1e15,scientific:!0},E:{name:"E",value:1e18,scientific:!0},Z:{name:"Z",value:1e21,scientific:!0},Y:{name:"Y",value:1e24,scientific:!0}},BINARY_SHORT_IEC:{"":{name:"",value:1,scientific:!0},Ki:{name:"Ki",value:1024,scientific:!0},Mi:{name:"Mi",value:Math.pow(1024,2),scientific:!0},Gi:{name:"Gi",value:Math.pow(1024,3),scientific:!0},Ti:{name:"Ti",value:Math.pow(1024,4),scientific:!0},Pi:{name:"Pi",value:Math.pow(1024,5),scientific:!0},Ei:{name:"Ei",value:Math.pow(1024,6),scientific:!0},Zi:{name:"Zi",value:Math.pow(1024,7),scientific:!0},Yi:{name:"Yi",value:Math.pow(1024,8),scientific:!0}},BINARY_LONG_SI:{"":{name:"",value:1,scientific:!0},kilo:{name:"kilo",value:1e3,scientific:!0},mega:{name:"mega",value:1e6,scientific:!0},giga:{name:"giga",value:1e9,scientific:!0},tera:{name:"tera",value:1e12,scientific:!0},peta:{name:"peta",value:1e15,scientific:!0},exa:{name:"exa",value:1e18,scientific:!0},zetta:{name:"zetta",value:1e21,scientific:!0},yotta:{name:"yotta",value:1e24,scientific:!0}},BINARY_LONG_IEC:{"":{name:"",value:1,scientific:!0},kibi:{name:"kibi",value:1024,scientific:!0},mebi:{name:"mebi",value:Math.pow(1024,2),scientific:!0},gibi:{name:"gibi",value:Math.pow(1024,3),scientific:!0},tebi:{name:"tebi",value:Math.pow(1024,4),scientific:!0},pebi:{name:"pebi",value:Math.pow(1024,5),scientific:!0},exi:{name:"exi",value:Math.pow(1024,6),scientific:!0},zebi:{name:"zebi",value:Math.pow(1024,7),scientific:!0},yobi:{name:"yobi",value:Math.pow(1024,8),scientific:!0}},BTU:{"":{name:"",value:1,scientific:!0},MM:{name:"MM",value:1e6,scientific:!0}}};P.SHORTLONG=Fi({},P.SHORT,P.LONG),P.BINARY_SHORT=Fi({},P.BINARY_SHORT_SI,P.BINARY_SHORT_IEC),P.BINARY_LONG=Fi({},P.BINARY_LONG_SI,P.BINARY_LONG_IEC);var I=["MASS","LENGTH","TIME","CURRENT","TEMPERATURE","LUMINOUS_INTENSITY","AMOUNT_OF_SUBSTANCE","ANGLE","BIT"],R={NONE:{dimensions:[0,0,0,0,0,0,0,0,0]},MASS:{dimensions:[1,0,0,0,0,0,0,0,0]},LENGTH:{dimensions:[0,1,0,0,0,0,0,0,0]},TIME:{dimensions:[0,0,1,0,0,0,0,0,0]},CURRENT:{dimensions:[0,0,0,1,0,0,0,0,0]},TEMPERATURE:{dimensions:[0,0,0,0,1,0,0,0,0]},LUMINOUS_INTENSITY:{dimensions:[0,0,0,0,0,1,0,0,0]},AMOUNT_OF_SUBSTANCE:{dimensions:[0,0,0,0,0,0,1,0,0]},FORCE:{dimensions:[1,1,-2,0,0,0,0,0,0]},SURFACE:{dimensions:[0,2,0,0,0,0,0,0,0]},VOLUME:{dimensions:[0,3,0,0,0,0,0,0,0]},ENERGY:{dimensions:[1,2,-2,0,0,0,0,0,0]},POWER:{dimensions:[1,2,-3,0,0,0,0,0,0]},PRESSURE:{dimensions:[1,-1,-2,0,0,0,0,0,0]},ELECTRIC_CHARGE:{dimensions:[0,0,1,1,0,0,0,0,0]},ELECTRIC_CAPACITANCE:{dimensions:[-1,-2,4,2,0,0,0,0,0]},ELECTRIC_POTENTIAL:{dimensions:[1,2,-3,-1,0,0,0,0,0]},ELECTRIC_RESISTANCE:{dimensions:[1,2,-3,-2,0,0,0,0,0]},ELECTRIC_INDUCTANCE:{dimensions:[1,2,-2,-2,0,0,0,0,0]},ELECTRIC_CONDUCTANCE:{dimensions:[-1,-2,3,2,0,0,0,0,0]},MAGNETIC_FLUX:{dimensions:[1,2,-2,-1,0,0,0,0,0]},MAGNETIC_FLUX_DENSITY:{dimensions:[1,0,-2,-1,0,0,0,0,0]},FREQUENCY:{dimensions:[0,0,-1,0,0,0,0,0,0]},ANGLE:{dimensions:[0,0,0,0,0,0,0,1,0]},BIT:{dimensions:[0,0,0,0,0,0,0,0,1]}};for(var L in R)Object(k.f)(R,L)&&(R[L].key=L);var F={name:"",base:{},value:1,offset:0,dimensions:I.map((function(t){return 0}))},q={meter:{name:"meter",base:R.LENGTH,prefixes:P.LONG,value:1,offset:0},inch:{name:"inch",base:R.LENGTH,prefixes:P.NONE,value:.0254,offset:0},foot:{name:"foot",base:R.LENGTH,prefixes:P.NONE,value:.3048,offset:0},yard:{name:"yard",base:R.LENGTH,prefixes:P.NONE,value:.9144,offset:0},mile:{name:"mile",base:R.LENGTH,prefixes:P.NONE,value:1609.344,offset:0},link:{name:"link",base:R.LENGTH,prefixes:P.NONE,value:.201168,offset:0},rod:{name:"rod",base:R.LENGTH,prefixes:P.NONE,value:5.0292,offset:0},chain:{name:"chain",base:R.LENGTH,prefixes:P.NONE,value:20.1168,offset:0},angstrom:{name:"angstrom",base:R.LENGTH,prefixes:P.NONE,value:1e-10,offset:0},m:{name:"m",base:R.LENGTH,prefixes:P.SHORT,value:1,offset:0},in:{name:"in",base:R.LENGTH,prefixes:P.NONE,value:.0254,offset:0},ft:{name:"ft",base:R.LENGTH,prefixes:P.NONE,value:.3048,offset:0},yd:{name:"yd",base:R.LENGTH,prefixes:P.NONE,value:.9144,offset:0},mi:{name:"mi",base:R.LENGTH,prefixes:P.NONE,value:1609.344,offset:0},li:{name:"li",base:R.LENGTH,prefixes:P.NONE,value:.201168,offset:0},rd:{name:"rd",base:R.LENGTH,prefixes:P.NONE,value:5.02921,offset:0},ch:{name:"ch",base:R.LENGTH,prefixes:P.NONE,value:20.1168,offset:0},mil:{name:"mil",base:R.LENGTH,prefixes:P.NONE,value:254e-7,offset:0},m2:{name:"m2",base:R.SURFACE,prefixes:P.SQUARED,value:1,offset:0},sqin:{name:"sqin",base:R.SURFACE,prefixes:P.NONE,value:64516e-8,offset:0},sqft:{name:"sqft",base:R.SURFACE,prefixes:P.NONE,value:.09290304,offset:0},sqyd:{name:"sqyd",base:R.SURFACE,prefixes:P.NONE,value:.83612736,offset:0},sqmi:{name:"sqmi",base:R.SURFACE,prefixes:P.NONE,value:2589988.110336,offset:0},sqrd:{name:"sqrd",base:R.SURFACE,prefixes:P.NONE,value:25.29295,offset:0},sqch:{name:"sqch",base:R.SURFACE,prefixes:P.NONE,value:404.6873,offset:0},sqmil:{name:"sqmil",base:R.SURFACE,prefixes:P.NONE,value:6.4516e-10,offset:0},acre:{name:"acre",base:R.SURFACE,prefixes:P.NONE,value:4046.86,offset:0},hectare:{name:"hectare",base:R.SURFACE,prefixes:P.NONE,value:1e4,offset:0},m3:{name:"m3",base:R.VOLUME,prefixes:P.CUBIC,value:1,offset:0},L:{name:"L",base:R.VOLUME,prefixes:P.SHORT,value:.001,offset:0},l:{name:"l",base:R.VOLUME,prefixes:P.SHORT,value:.001,offset:0},litre:{name:"litre",base:R.VOLUME,prefixes:P.LONG,value:.001,offset:0},cuin:{name:"cuin",base:R.VOLUME,prefixes:P.NONE,value:16387064e-12,offset:0},cuft:{name:"cuft",base:R.VOLUME,prefixes:P.NONE,value:.028316846592,offset:0},cuyd:{name:"cuyd",base:R.VOLUME,prefixes:P.NONE,value:.764554857984,offset:0},teaspoon:{name:"teaspoon",base:R.VOLUME,prefixes:P.NONE,value:5e-6,offset:0},tablespoon:{name:"tablespoon",base:R.VOLUME,prefixes:P.NONE,value:15e-6,offset:0},drop:{name:"drop",base:R.VOLUME,prefixes:P.NONE,value:5e-8,offset:0},gtt:{name:"gtt",base:R.VOLUME,prefixes:P.NONE,value:5e-8,offset:0},minim:{name:"minim",base:R.VOLUME,prefixes:P.NONE,value:6.161152e-8,offset:0},fluiddram:{name:"fluiddram",base:R.VOLUME,prefixes:P.NONE,value:36966911e-13,offset:0},fluidounce:{name:"fluidounce",base:R.VOLUME,prefixes:P.NONE,value:2957353e-11,offset:0},gill:{name:"gill",base:R.VOLUME,prefixes:P.NONE,value:.0001182941,offset:0},cc:{name:"cc",base:R.VOLUME,prefixes:P.NONE,value:1e-6,offset:0},cup:{name:"cup",base:R.VOLUME,prefixes:P.NONE,value:.0002365882,offset:0},pint:{name:"pint",base:R.VOLUME,prefixes:P.NONE,value:.0004731765,offset:0},quart:{name:"quart",base:R.VOLUME,prefixes:P.NONE,value:.0009463529,offset:0},gallon:{name:"gallon",base:R.VOLUME,prefixes:P.NONE,value:.003785412,offset:0},beerbarrel:{name:"beerbarrel",base:R.VOLUME,prefixes:P.NONE,value:.1173478,offset:0},oilbarrel:{name:"oilbarrel",base:R.VOLUME,prefixes:P.NONE,value:.1589873,offset:0},hogshead:{name:"hogshead",base:R.VOLUME,prefixes:P.NONE,value:.238481,offset:0},fldr:{name:"fldr",base:R.VOLUME,prefixes:P.NONE,value:36966911e-13,offset:0},floz:{name:"floz",base:R.VOLUME,prefixes:P.NONE,value:2957353e-11,offset:0},gi:{name:"gi",base:R.VOLUME,prefixes:P.NONE,value:.0001182941,offset:0},cp:{name:"cp",base:R.VOLUME,prefixes:P.NONE,value:.0002365882,offset:0},pt:{name:"pt",base:R.VOLUME,prefixes:P.NONE,value:.0004731765,offset:0},qt:{name:"qt",base:R.VOLUME,prefixes:P.NONE,value:.0009463529,offset:0},gal:{name:"gal",base:R.VOLUME,prefixes:P.NONE,value:.003785412,offset:0},bbl:{name:"bbl",base:R.VOLUME,prefixes:P.NONE,value:.1173478,offset:0},obl:{name:"obl",base:R.VOLUME,prefixes:P.NONE,value:.1589873,offset:0},g:{name:"g",base:R.MASS,prefixes:P.SHORT,value:.001,offset:0},gram:{name:"gram",base:R.MASS,prefixes:P.LONG,value:.001,offset:0},ton:{name:"ton",base:R.MASS,prefixes:P.SHORT,value:907.18474,offset:0},t:{name:"t",base:R.MASS,prefixes:P.SHORT,value:1e3,offset:0},tonne:{name:"tonne",base:R.MASS,prefixes:P.LONG,value:1e3,offset:0},grain:{name:"grain",base:R.MASS,prefixes:P.NONE,value:6479891e-11,offset:0},dram:{name:"dram",base:R.MASS,prefixes:P.NONE,value:.0017718451953125,offset:0},ounce:{name:"ounce",base:R.MASS,prefixes:P.NONE,value:.028349523125,offset:0},poundmass:{name:"poundmass",base:R.MASS,prefixes:P.NONE,value:.45359237,offset:0},hundredweight:{name:"hundredweight",base:R.MASS,prefixes:P.NONE,value:45.359237,offset:0},stick:{name:"stick",base:R.MASS,prefixes:P.NONE,value:.115,offset:0},stone:{name:"stone",base:R.MASS,prefixes:P.NONE,value:6.35029318,offset:0},gr:{name:"gr",base:R.MASS,prefixes:P.NONE,value:6479891e-11,offset:0},dr:{name:"dr",base:R.MASS,prefixes:P.NONE,value:.0017718451953125,offset:0},oz:{name:"oz",base:R.MASS,prefixes:P.NONE,value:.028349523125,offset:0},lbm:{name:"lbm",base:R.MASS,prefixes:P.NONE,value:.45359237,offset:0},cwt:{name:"cwt",base:R.MASS,prefixes:P.NONE,value:45.359237,offset:0},s:{name:"s",base:R.TIME,prefixes:P.SHORT,value:1,offset:0},min:{name:"min",base:R.TIME,prefixes:P.NONE,value:60,offset:0},h:{name:"h",base:R.TIME,prefixes:P.NONE,value:3600,offset:0},second:{name:"second",base:R.TIME,prefixes:P.LONG,value:1,offset:0},sec:{name:"sec",base:R.TIME,prefixes:P.LONG,value:1,offset:0},minute:{name:"minute",base:R.TIME,prefixes:P.NONE,value:60,offset:0},hour:{name:"hour",base:R.TIME,prefixes:P.NONE,value:3600,offset:0},day:{name:"day",base:R.TIME,prefixes:P.NONE,value:86400,offset:0},week:{name:"week",base:R.TIME,prefixes:P.NONE,value:604800,offset:0},month:{name:"month",base:R.TIME,prefixes:P.NONE,value:2629800,offset:0},year:{name:"year",base:R.TIME,prefixes:P.NONE,value:31557600,offset:0},decade:{name:"decade",base:R.TIME,prefixes:P.NONE,value:315576e3,offset:0},century:{name:"century",base:R.TIME,prefixes:P.NONE,value:315576e4,offset:0},millennium:{name:"millennium",base:R.TIME,prefixes:P.NONE,value:315576e5,offset:0},hertz:{name:"Hertz",base:R.FREQUENCY,prefixes:P.LONG,value:1,offset:0,reciprocal:!0},Hz:{name:"Hz",base:R.FREQUENCY,prefixes:P.SHORT,value:1,offset:0,reciprocal:!0},rad:{name:"rad",base:R.ANGLE,prefixes:P.SHORT,value:1,offset:0},radian:{name:"radian",base:R.ANGLE,prefixes:P.LONG,value:1,offset:0},deg:{name:"deg",base:R.ANGLE,prefixes:P.SHORT,value:null,offset:0},degree:{name:"degree",base:R.ANGLE,prefixes:P.LONG,value:null,offset:0},grad:{name:"grad",base:R.ANGLE,prefixes:P.SHORT,value:null,offset:0},gradian:{name:"gradian",base:R.ANGLE,prefixes:P.LONG,value:null,offset:0},cycle:{name:"cycle",base:R.ANGLE,prefixes:P.NONE,value:null,offset:0},arcsec:{name:"arcsec",base:R.ANGLE,prefixes:P.NONE,value:null,offset:0},arcmin:{name:"arcmin",base:R.ANGLE,prefixes:P.NONE,value:null,offset:0},A:{name:"A",base:R.CURRENT,prefixes:P.SHORT,value:1,offset:0},ampere:{name:"ampere",base:R.CURRENT,prefixes:P.LONG,value:1,offset:0},K:{name:"K",base:R.TEMPERATURE,prefixes:P.NONE,value:1,offset:0},degC:{name:"degC",base:R.TEMPERATURE,prefixes:P.NONE,value:1,offset:273.15},degF:{name:"degF",base:R.TEMPERATURE,prefixes:P.NONE,value:1/1.8,offset:459.67},degR:{name:"degR",base:R.TEMPERATURE,prefixes:P.NONE,value:1/1.8,offset:0},kelvin:{name:"kelvin",base:R.TEMPERATURE,prefixes:P.NONE,value:1,offset:0},celsius:{name:"celsius",base:R.TEMPERATURE,prefixes:P.NONE,value:1,offset:273.15},fahrenheit:{name:"fahrenheit",base:R.TEMPERATURE,prefixes:P.NONE,value:1/1.8,offset:459.67},rankine:{name:"rankine",base:R.TEMPERATURE,prefixes:P.NONE,value:1/1.8,offset:0},mol:{name:"mol",base:R.AMOUNT_OF_SUBSTANCE,prefixes:P.SHORT,value:1,offset:0},mole:{name:"mole",base:R.AMOUNT_OF_SUBSTANCE,prefixes:P.LONG,value:1,offset:0},cd:{name:"cd",base:R.LUMINOUS_INTENSITY,prefixes:P.SHORT,value:1,offset:0},candela:{name:"candela",base:R.LUMINOUS_INTENSITY,prefixes:P.LONG,value:1,offset:0},N:{name:"N",base:R.FORCE,prefixes:P.SHORT,value:1,offset:0},newton:{name:"newton",base:R.FORCE,prefixes:P.LONG,value:1,offset:0},dyn:{name:"dyn",base:R.FORCE,prefixes:P.SHORT,value:1e-5,offset:0},dyne:{name:"dyne",base:R.FORCE,prefixes:P.LONG,value:1e-5,offset:0},lbf:{name:"lbf",base:R.FORCE,prefixes:P.NONE,value:4.4482216152605,offset:0},poundforce:{name:"poundforce",base:R.FORCE,prefixes:P.NONE,value:4.4482216152605,offset:0},kip:{name:"kip",base:R.FORCE,prefixes:P.LONG,value:4448.2216,offset:0},J:{name:"J",base:R.ENERGY,prefixes:P.SHORT,value:1,offset:0},joule:{name:"joule",base:R.ENERGY,prefixes:P.SHORT,value:1,offset:0},erg:{name:"erg",base:R.ENERGY,prefixes:P.NONE,value:1e-7,offset:0},Wh:{name:"Wh",base:R.ENERGY,prefixes:P.SHORT,value:3600,offset:0},BTU:{name:"BTU",base:R.ENERGY,prefixes:P.BTU,value:1055.05585262,offset:0},eV:{name:"eV",base:R.ENERGY,prefixes:P.SHORT,value:1602176565e-28,offset:0},electronvolt:{name:"electronvolt",base:R.ENERGY,prefixes:P.LONG,value:1602176565e-28,offset:0},W:{name:"W",base:R.POWER,prefixes:P.SHORT,value:1,offset:0},watt:{name:"watt",base:R.POWER,prefixes:P.LONG,value:1,offset:0},hp:{name:"hp",base:R.POWER,prefixes:P.NONE,value:745.6998715386,offset:0},VAR:{name:"VAR",base:R.POWER,prefixes:P.SHORT,value:b.I,offset:0},VA:{name:"VA",base:R.POWER,prefixes:P.SHORT,value:1,offset:0},Pa:{name:"Pa",base:R.PRESSURE,prefixes:P.SHORT,value:1,offset:0},psi:{name:"psi",base:R.PRESSURE,prefixes:P.NONE,value:6894.75729276459,offset:0},atm:{name:"atm",base:R.PRESSURE,prefixes:P.NONE,value:101325,offset:0},bar:{name:"bar",base:R.PRESSURE,prefixes:P.SHORTLONG,value:1e5,offset:0},torr:{name:"torr",base:R.PRESSURE,prefixes:P.NONE,value:133.322,offset:0},mmHg:{name:"mmHg",base:R.PRESSURE,prefixes:P.NONE,value:133.322,offset:0},mmH2O:{name:"mmH2O",base:R.PRESSURE,prefixes:P.NONE,value:9.80665,offset:0},cmH2O:{name:"cmH2O",base:R.PRESSURE,prefixes:P.NONE,value:98.0665,offset:0},coulomb:{name:"coulomb",base:R.ELECTRIC_CHARGE,prefixes:P.LONG,value:1,offset:0},C:{name:"C",base:R.ELECTRIC_CHARGE,prefixes:P.SHORT,value:1,offset:0},farad:{name:"farad",base:R.ELECTRIC_CAPACITANCE,prefixes:P.LONG,value:1,offset:0},F:{name:"F",base:R.ELECTRIC_CAPACITANCE,prefixes:P.SHORT,value:1,offset:0},volt:{name:"volt",base:R.ELECTRIC_POTENTIAL,prefixes:P.LONG,value:1,offset:0},V:{name:"V",base:R.ELECTRIC_POTENTIAL,prefixes:P.SHORT,value:1,offset:0},ohm:{name:"ohm",base:R.ELECTRIC_RESISTANCE,prefixes:P.SHORTLONG,value:1,offset:0},henry:{name:"henry",base:R.ELECTRIC_INDUCTANCE,prefixes:P.LONG,value:1,offset:0},H:{name:"H",base:R.ELECTRIC_INDUCTANCE,prefixes:P.SHORT,value:1,offset:0},siemens:{name:"siemens",base:R.ELECTRIC_CONDUCTANCE,prefixes:P.LONG,value:1,offset:0},S:{name:"S",base:R.ELECTRIC_CONDUCTANCE,prefixes:P.SHORT,value:1,offset:0},weber:{name:"weber",base:R.MAGNETIC_FLUX,prefixes:P.LONG,value:1,offset:0},Wb:{name:"Wb",base:R.MAGNETIC_FLUX,prefixes:P.SHORT,value:1,offset:0},tesla:{name:"tesla",base:R.MAGNETIC_FLUX_DENSITY,prefixes:P.LONG,value:1,offset:0},T:{name:"T",base:R.MAGNETIC_FLUX_DENSITY,prefixes:P.SHORT,value:1,offset:0},b:{name:"b",base:R.BIT,prefixes:P.BINARY_SHORT,value:1,offset:0},bits:{name:"bits",base:R.BIT,prefixes:P.BINARY_LONG,value:1,offset:0},B:{name:"B",base:R.BIT,prefixes:P.BINARY_SHORT,value:8,offset:0},bytes:{name:"bytes",base:R.BIT,prefixes:P.BINARY_LONG,value:8,offset:0}},B={meters:"meter",inches:"inch",feet:"foot",yards:"yard",miles:"mile",links:"link",rods:"rod",chains:"chain",angstroms:"angstrom",lt:"l",litres:"litre",liter:"litre",liters:"litre",teaspoons:"teaspoon",tablespoons:"tablespoon",minims:"minim",fluiddrams:"fluiddram",fluidounces:"fluidounce",gills:"gill",cups:"cup",pints:"pint",quarts:"quart",gallons:"gallon",beerbarrels:"beerbarrel",oilbarrels:"oilbarrel",hogsheads:"hogshead",gtts:"gtt",grams:"gram",tons:"ton",tonnes:"tonne",grains:"grain",drams:"dram",ounces:"ounce",poundmasses:"poundmass",hundredweights:"hundredweight",sticks:"stick",lb:"lbm",lbs:"lbm",kips:"kip",acres:"acre",hectares:"hectare",sqfeet:"sqft",sqyard:"sqyd",sqmile:"sqmi",sqmiles:"sqmi",mmhg:"mmHg",mmh2o:"mmH2O",cmh2o:"cmH2O",seconds:"second",secs:"second",minutes:"minute",mins:"minute",hours:"hour",hr:"hour",hrs:"hour",days:"day",weeks:"week",months:"month",years:"year",decades:"decade",centuries:"century",millennia:"millennium",hertz:"hertz",radians:"radian",degrees:"degree",gradians:"gradian",cycles:"cycle",arcsecond:"arcsec",arcseconds:"arcsec",arcminute:"arcmin",arcminutes:"arcmin",BTUs:"BTU",watts:"watt",joules:"joule",amperes:"ampere",coulombs:"coulomb",volts:"volt",ohms:"ohm",farads:"farad",webers:"weber",teslas:"tesla",electronvolts:"electronvolt",moles:"mole",bit:"bits",byte:"bytes"};function z(t){var e;"BigNumber"===t.number?(e=Pi(x),q.rad.value=new x(1),q.deg.value=e.div(180),q.grad.value=e.div(200),q.cycle.value=e.times(2),q.arcsec.value=e.div(648e3),q.arcmin.value=e.div(10800)):(q.rad.value=1,q.deg.value=Math.PI/180,q.grad.value=Math.PI/200,q.cycle.value=2*Math.PI,q.arcsec.value=Math.PI/648e3,q.arcmin.value=Math.PI/10800),q.radian.value=q.rad.value,q.degree.value=q.deg.value,q.gradian.value=q.grad.value}z(a),o&&o("config",(function(t,e){t.number!==e.number&&z(t)}));var H={si:{NONE:{unit:F,prefix:P.NONE[""]},LENGTH:{unit:q.m,prefix:P.SHORT[""]},MASS:{unit:q.g,prefix:P.SHORT.k},TIME:{unit:q.s,prefix:P.SHORT[""]},CURRENT:{unit:q.A,prefix:P.SHORT[""]},TEMPERATURE:{unit:q.K,prefix:P.SHORT[""]},LUMINOUS_INTENSITY:{unit:q.cd,prefix:P.SHORT[""]},AMOUNT_OF_SUBSTANCE:{unit:q.mol,prefix:P.SHORT[""]},ANGLE:{unit:q.rad,prefix:P.SHORT[""]},BIT:{unit:q.bits,prefix:P.SHORT[""]},FORCE:{unit:q.N,prefix:P.SHORT[""]},ENERGY:{unit:q.J,prefix:P.SHORT[""]},POWER:{unit:q.W,prefix:P.SHORT[""]},PRESSURE:{unit:q.Pa,prefix:P.SHORT[""]},ELECTRIC_CHARGE:{unit:q.C,prefix:P.SHORT[""]},ELECTRIC_CAPACITANCE:{unit:q.F,prefix:P.SHORT[""]},ELECTRIC_POTENTIAL:{unit:q.V,prefix:P.SHORT[""]},ELECTRIC_RESISTANCE:{unit:q.ohm,prefix:P.SHORT[""]},ELECTRIC_INDUCTANCE:{unit:q.H,prefix:P.SHORT[""]},ELECTRIC_CONDUCTANCE:{unit:q.S,prefix:P.SHORT[""]},MAGNETIC_FLUX:{unit:q.Wb,prefix:P.SHORT[""]},MAGNETIC_FLUX_DENSITY:{unit:q.T,prefix:P.SHORT[""]},FREQUENCY:{unit:q.Hz,prefix:P.SHORT[""]}}};H.cgs=JSON.parse(JSON.stringify(H.si)),H.cgs.LENGTH={unit:q.m,prefix:P.SHORT.c},H.cgs.MASS={unit:q.g,prefix:P.SHORT[""]},H.cgs.FORCE={unit:q.dyn,prefix:P.SHORT[""]},H.cgs.ENERGY={unit:q.erg,prefix:P.NONE[""]},H.us=JSON.parse(JSON.stringify(H.si)),H.us.LENGTH={unit:q.ft,prefix:P.NONE[""]},H.us.MASS={unit:q.lbm,prefix:P.NONE[""]},H.us.TEMPERATURE={unit:q.degF,prefix:P.NONE[""]},H.us.FORCE={unit:q.lbf,prefix:P.NONE[""]},H.us.ENERGY={unit:q.BTU,prefix:P.BTU[""]},H.us.POWER={unit:q.hp,prefix:P.NONE[""]},H.us.PRESSURE={unit:q.psi,prefix:P.NONE[""]},H.auto=JSON.parse(JSON.stringify(H.si));var U,W=H.auto;for(var V in S.setUnitSystem=function(t){if(!Object(k.f)(H,t))throw new Error("Unit system "+t+" does not exist. Choices are: "+Object.keys(H).join(", "));W=H[t]},S.getUnitSystem=function(){for(var t in H)if(Object(k.f)(H,t)&&H[t]===W)return t},S.typeConverters={BigNumber:function(t){return new x(t+"")},Fraction:function(t){return new w(t)},Complex:function(t){return t},number:function(t){return t}},S._getNumberConverter=function(t){if(!S.typeConverters[t])throw new TypeError('Unsupported type "'+t+'"');return S.typeConverters[t]},q)Object(k.f)(q,V)&&((U=q[V]).dimensions=U.base.dimensions);for(var $ in B)if(Object(k.f)(B,$)){var Y=q[B[$]],Z={};for(var G in Y)Object(k.f)(Y,G)&&(Z[G]=Y[G]);Z.name=$,q[$]=Z}return S.createUnit=function(t,e){if("object"!==Li(t))throw new TypeError("createUnit expects first parameter to be of type 'Object'");if(e&&e.override)for(var n in t)if(Object(k.f)(t,n)&&S.deleteUnit(n),t[n].aliases)for(var r=0;r<t[n].aliases.length;r++)S.deleteUnit(t[n].aliases[r]);var i;for(var o in t)Object(k.f)(t,o)&&(i=S.createUnitSingle(o,t[o]));return i},S.createUnitSingle=function(t,e,n){if(null==e&&(e={}),"string"!=typeof t)throw new TypeError("createUnitSingle expects first parameter to be of type 'string'");if(Object(k.f)(q,t))throw new Error('Cannot create unit "'+t+'": a unit with that name already exists');!function(t){for(var e,n=0;n<t.length;n++){var r=t.charAt(n),i=function(t){return/^[a-zA-Z]$/.test(t)};if(0===n&&!i(r))throw new Error('Invalid unit name (must begin with alpha character): "'+t+'"');if(0<n&&!(i(r)||"0"<=(e=r)&&e<="9"))throw new Error('Invalid unit name (only alphanumeric characters are allowed): "'+t+'"')}}(t);var r,i,o,a=null,s=[],u=0;if(e&&"Unit"===e.type)a=e.clone();else if("string"==typeof e)""!==e&&(r=e);else{if("object"!==Li(e))throw new TypeError('Cannot create unit "'+t+'" from "'+e.toString()+'": expecting "string" or "Unit" or "Object"');r=e.definition,i=e.prefixes,u=e.offset,o=e.baseName,e.aliases&&(s=e.aliases.valueOf())}if(s)for(var l=0;l<s.length;l++)if(Object(k.f)(q,s[l]))throw new Error('Cannot create alias "'+s[l]+'": a unit with that name already exists');if(r&&"string"==typeof r&&!a)try{a=S.parse(r,{allowNoUnits:!0})}catch(e){throw e.message='Could not create unit "'+t+'" from "'+r+'": '+e.message,e}else r&&"Unit"===r.type&&(a=r.clone());s=s||[],u=u||0,i=i&&i.toUpperCase&&P[i.toUpperCase()]||P.NONE;var c={};if(a){var f,h=!(c={name:t,value:a.value,dimensions:a.dimensions.slice(0),prefixes:i,offset:u});for(var d in R)if(Object(k.f)(R,d)){for(var p=!0,m=0;m<I.length;m++)if(1e-12<Math.abs((c.dimensions[m]||0)-(R[d].dimensions[m]||0))){p=!1;break}if(p){h=!0,c.base=R[d];break}}h||(o=o||t+"_STUFF",(f={dimensions:a.dimensions.slice(0)}).key=o,R[o]=f,W[o]={unit:c,prefix:P.NONE[""]},c.base=R[o])}else{if(o=o||t+"_STUFF",0<=I.indexOf(o))throw new Error('Cannot create new base unit "'+t+'": a base unit with that name already exists (and cannot be overridden)');for(var g in I.push(o),R)Object(k.f)(R,g)&&(R[g].dimensions[I.length-1]=0);for(var v={dimensions:[]},y=0;y<I.length;y++)v.dimensions[y]=0;v.dimensions[I.length-1]=1,v.key=o,R[o]=v,c={name:t,value:1,dimensions:R[o].dimensions.slice(0),prefixes:i,offset:u,base:R[o]},W[o]={unit:c,prefix:P.NONE[""]}}S.UNITS[t]=c;for(var b=0;b<s.length;b++){var x=s[b],w={};for(var _ in c)Object(k.f)(c,_)&&(w[_]=c[_]);w.name=x,S.UNITS[x]=w}return new S(null,t)},S.deleteUnit=function(t){delete S.UNITS[t]},S.PREFIXES=P,S.BASE_DIMENSIONS=I,S.BASE_UNITS=R,S.UNIT_SYSTEMS=H,S.UNITS=q,S}),{isClass:!0}),Hi=Object(s.a)("unit",["typed","Unit"],(function(t){var e=t.typed,n=t.Unit;return e("unit",{Unit:function(t){return t.clone()},string:function(t){return n.isValuelessUnit(t)?new n(null,t):n.parse(t,{allowNoUnits:!0})},"number | BigNumber | Fraction | Complex, string":function(t,e){return new n(t,e)},"Array | Matrix":function(t){return I(t,this)}})})),Ui=Object(s.a)("sparse",["typed","SparseMatrix"],(function(t){var e=t.typed,n=t.SparseMatrix;return e("sparse",{"":function(){return new n([])},string:function(t){return new n([],t)},"Array | Matrix":function(t){return new n(t)},"Array | Matrix, string":function(t,e){return new n(t,e)}})})),Wi="createUnit",Vi=Object(s.a)(Wi,["typed","Unit"],(function(t){var e=t.typed,n=t.Unit;return e(Wi,{"Object, Object":function(t,e){return n.createUnit(t,e)},Object:function(t){return n.createUnit(t,{})},"string, Unit | string | Object, Object":function(t,e,r){var i={};return i[t]=e,n.createUnit(i,r)},"string, Unit | string | Object":function(t,e){var r={};return r[t]=e,n.createUnit(r,{})},string:function(t){var e={};return e[t]={},n.createUnit(e,{})}})})),$i=Object(s.a)("acos",["typed","config","Complex"],(function(t){var e=t.typed,n=t.config,r=t.Complex;return e("acos",{number:function(t){return-1<=t&&t<=1||n.predictable?Math.acos(t):new r(t,0).acos()},Complex:function(t){return t.acos()},BigNumber:function(t){return t.acos()},"Array | Matrix":function(t){return I(t,this)}})}));function Yi(t){return Object(a.a)(t)}function Zi(t){return Math.atan(1/t)}function Gi(t){return isFinite(t)?(Math.log((t+1)/t)+Math.log(t/(t-1)))/2:0}function Ki(t){return Math.asin(1/t)}function Xi(t){var e=1/t;return Math.log(e+Math.sqrt(e*e+1))}function Ji(t){return Math.acos(1/t)}function Qi(t){var e=1/t,n=Math.sqrt(e*e-1);return Math.log(n+e)}function to(t){return Object(a.b)(t)}function eo(t){return Object(a.c)(t)}function no(t){return 1/Math.tan(t)}function ro(t){var e=Math.exp(2*t);return(e+1)/(e-1)}function io(t){return 1/Math.sin(t)}function oo(t){return 0===t?Number.POSITIVE_INFINITY:Math.abs(2/(Math.exp(t)-Math.exp(-t)))*Object(a.n)(t)}function ao(t){return 1/Math.cos(t)}function so(t){return 2/(Math.exp(t)+Math.exp(-t))}function uo(t){return Object(a.o)(t)}uo.signature=so.signature=ao.signature=oo.signature=io.signature=ro.signature=no.signature=eo.signature=to.signature=Qi.signature=Ji.signature=Xi.signature=Ki.signature=Gi.signature=Zi.signature=Yi.signature="number";var lo=Object(s.a)("acosh",["typed","config","Complex"],(function(t){var e=t.typed,n=t.config,r=t.Complex;return e("acosh",{number:function(t){return 1<=t||n.predictable?Yi(t):t<=-1?new r(Math.log(Math.sqrt(t*t-1)-t),Math.PI):new r(t,0).acosh()},Complex:function(t){return t.acosh()},BigNumber:function(t){return t.acosh()},"Array | Matrix":function(t){return I(t,this)}})})),co=Object(s.a)("acot",["typed","BigNumber"],(function(t){var e=t.typed,n=t.BigNumber;return e("acot",{number:Zi,Complex:function(t){return t.acot()},BigNumber:function(t){return new n(1).div(t).atan()},"Array | Matrix":function(t){return I(t,this)}})})),fo=Object(s.a)("acoth",["typed","config","Complex","BigNumber"],(function(t){var e=t.typed,n=t.config,r=t.Complex,i=t.BigNumber;return e("acoth",{number:function(t){return 1<=t||t<=-1||n.predictable?Gi(t):new r(t,0).acoth()},Complex:function(t){return t.acoth()},BigNumber:function(t){return new i(1).div(t).atanh()},"Array | Matrix":function(t){return I(t,this)}})})),ho=Object(s.a)("acsc",["typed","config","Complex","BigNumber"],(function(t){var e=t.typed,n=t.config,r=t.Complex,i=t.BigNumber;return e("acsc",{number:function(t){return t<=-1||1<=t||n.predictable?Ki(t):new r(t,0).acsc()},Complex:function(t){return t.acsc()},BigNumber:function(t){return new i(1).div(t).asin()},"Array | Matrix":function(t){return I(t,this)}})})),po=Object(s.a)("acsch",["typed","BigNumber"],(function(t){var e=t.typed,n=t.BigNumber;return e("acsch",{number:Xi,Complex:function(t){return t.acsch()},BigNumber:function(t){return new n(1).div(t).asinh()},"Array | Matrix":function(t){return I(t,this)}})})),mo=Object(s.a)("asec",["typed","config","Complex","BigNumber"],(function(t){var e=t.typed,n=t.config,r=t.Complex,i=t.BigNumber;return e("asec",{number:function(t){return t<=-1||1<=t||n.predictable?Ji(t):new r(t,0).asec()},Complex:function(t){return t.asec()},BigNumber:function(t){return new i(1).div(t).acos()},"Array | Matrix":function(t){return I(t,this)}})})),go=Object(s.a)("asech",["typed","config","Complex","BigNumber"],(function(t){var e=t.typed,n=t.config,r=t.Complex,i=t.BigNumber;return e("asech",{number:function(t){if(t<=1&&-1<=t||n.predictable){var e=1/t;if(0<e||n.predictable)return Qi(t);var i=Math.sqrt(e*e-1);return new r(Math.log(i-e),Math.PI)}return new r(t,0).asech()},Complex:function(t){return t.asech()},BigNumber:function(t){return new i(1).div(t).acosh()},"Array | Matrix":function(t){return I(t,this)}})})),vo=Object(s.a)("asin",["typed","config","Complex"],(function(t){var e=t.typed,n=t.config,r=t.Complex;return e("asin",{number:function(t){return-1<=t&&t<=1||n.predictable?Math.asin(t):new r(t,0).asin()},Complex:function(t){return t.asin()},BigNumber:function(t){return t.asin()},"Array | Matrix":function(t){return I(t,this,!0)}})})),yo=Object(s.a)("asinh",["typed"],(function(t){return(0,t.typed)("asinh",{number:to,Complex:function(t){return t.asinh()},BigNumber:function(t){return t.asinh()},"Array | Matrix":function(t){return I(t,this,!0)}})})),bo=Object(s.a)("atan",["typed"],(function(t){return(0,t.typed)("atan",{number:function(t){return Math.atan(t)},Complex:function(t){return t.atan()},BigNumber:function(t){return t.atan()},"Array | Matrix":function(t){return I(t,this,!0)}})})),xo=Object(s.a)("atan2",["typed","matrix","equalScalar","BigNumber","DenseMatrix"],(function(t){var e=t.typed,n=t.matrix,r=t.equalScalar,i=t.BigNumber,o=t.DenseMatrix,a=le({typed:e,equalScalar:r}),s=me({typed:e}),u=De({typed:e,equalScalar:r}),l=fe({typed:e,equalScalar:r}),c=ve({typed:e,DenseMatrix:o}),f=ae({typed:e}),h=se({typed:e});return e("atan2",{"number, number":Math.atan2,"BigNumber, BigNumber":function(t,e){return i.atan2(t,e)},"SparseMatrix, SparseMatrix":function(t,e){return u(t,e,this,!1)},"SparseMatrix, DenseMatrix":function(t,e){return a(e,t,this,!0)},"DenseMatrix, SparseMatrix":function(t,e){return s(t,e,this,!1)},"DenseMatrix, DenseMatrix":function(t,e){return f(t,e,this)},"Array, Array":function(t,e){return this(n(t),n(e)).valueOf()},"Array, Matrix":function(t,e){return this(n(t),e)},"Matrix, Array":function(t,e){return this(t,n(e))},"SparseMatrix, number | BigNumber":function(t,e){return l(t,e,this,!1)},"DenseMatrix, number | BigNumber":function(t,e){return h(t,e,this,!1)},"number | BigNumber, SparseMatrix":function(t,e){return c(e,t,this,!0)},"number | BigNumber, DenseMatrix":function(t,e){return h(e,t,this,!0)},"Array, number | BigNumber":function(t,e){return h(n(t),e,this,!1).valueOf()},"number | BigNumber, Array":function(t,e){return h(n(e),t,this,!0).valueOf()}})})),wo=Object(s.a)("atanh",["typed","config","Complex"],(function(t){var e=t.typed,n=t.config,r=t.Complex;return e("atanh",{number:function(t){return t<=1&&-1<=t||n.predictable?eo(t):new r(t,0).atanh()},Complex:function(t){return t.atanh()},BigNumber:function(t){return t.atanh()},"Array | Matrix":function(t){return I(t,this,!0)}})})),_o=Object(s.a)("cos",["typed"],(function(t){return(0,t.typed)("cos",{number:Math.cos,Complex:function(t){return t.cos()},BigNumber:function(t){return t.cos()},Unit:function(t){if(!t.hasBase(t.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function cos is no angle");return this(t.value)},"Array | Matrix":function(t){return I(t,this)}})})),So=Object(s.a)("cosh",["typed"],(function(t){return(0,t.typed)("cosh",{number:a.e,Complex:function(t){return t.cosh()},BigNumber:function(t){return t.cosh()},Unit:function(t){if(!t.hasBase(t.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function cosh is no angle");return this(t.value)},"Array | Matrix":function(t){return I(t,this)}})})),Oo=Object(s.a)("cot",["typed","BigNumber"],(function(t){var e=t.typed,n=t.BigNumber;return e("cot",{number:no,Complex:function(t){return t.cot()},BigNumber:function(t){return new n(1).div(t.tan())},Unit:function(t){if(!t.hasBase(t.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function cot is no angle");return this(t.value)},"Array | Matrix":function(t){return I(t,this)}})})),No=Object(s.a)("coth",["typed","BigNumber"],(function(t){var e=t.typed,n=t.BigNumber;return e("coth",{number:ro,Complex:function(t){return t.coth()},BigNumber:function(t){return new n(1).div(t.tanh())},Unit:function(t){if(!t.hasBase(t.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function coth is no angle");return this(t.value)},"Array | Matrix":function(t){return I(t,this)}})})),Mo=Object(s.a)("csc",["typed","BigNumber"],(function(t){var e=t.typed,n=t.BigNumber;return e("csc",{number:io,Complex:function(t){return t.csc()},BigNumber:function(t){return new n(1).div(t.sin())},Unit:function(t){if(!t.hasBase(t.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function csc is no angle");return this(t.value)},"Array | Matrix":function(t){return I(t,this)}})})),Eo=Object(s.a)("csch",["typed","BigNumber"],(function(t){var e=t.typed,n=t.BigNumber;return e("csch",{number:oo,Complex:function(t){return t.csch()},BigNumber:function(t){return new n(1).div(t.sinh())},Unit:function(t){if(!t.hasBase(t.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function csch is no angle");return this(t.value)},"Array | Matrix":function(t){return I(t,this)}})})),ko=Object(s.a)("sec",["typed","BigNumber"],(function(t){var e=t.typed,n=t.BigNumber;return e("sec",{number:ao,Complex:function(t){return t.sec()},BigNumber:function(t){return new n(1).div(t.cos())},Unit:function(t){if(!t.hasBase(t.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function sec is no angle");return this(t.value)},"Array | Matrix":function(t){return I(t,this)}})})),Co=Object(s.a)("sech",["typed","BigNumber"],(function(t){var e=t.typed,n=t.BigNumber;return e("sech",{number:so,Complex:function(t){return t.sech()},BigNumber:function(t){return new n(1).div(t.cosh())},Unit:function(t){if(!t.hasBase(t.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function sech is no angle");return this(t.value)},"Array | Matrix":function(t){return I(t,this)}})})),To=Object(s.a)("sin",["typed"],(function(t){return(0,t.typed)("sin",{number:Math.sin,Complex:function(t){return t.sin()},BigNumber:function(t){return t.sin()},Unit:function(t){if(!t.hasBase(t.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function sin is no angle");return this(t.value)},"Array | Matrix":function(t){return I(t,this,!0)}})})),Do=Object(s.a)("sinh",["typed"],(function(t){return(0,t.typed)("sinh",{number:uo,Complex:function(t){return t.sinh()},BigNumber:function(t){return t.sinh()},Unit:function(t){if(!t.hasBase(t.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function sinh is no angle");return this(t.value)},"Array | Matrix":function(t){return I(t,this,!0)}})})),Ao=Object(s.a)("tan",["typed"],(function(t){return(0,t.typed)("tan",{number:Math.tan,Complex:function(t){return t.tan()},BigNumber:function(t){return t.tan()},Unit:function(t){if(!t.hasBase(t.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function tan is no angle");return this(t.value)},"Array | Matrix":function(t){return I(t,this,!0)}})})),jo=Object(s.a)("tanh",["typed"],(function(t){return(0,t.typed)("tanh",{number:a.p,Complex:function(t){return t.tanh()},BigNumber:function(t){return t.tanh()},Unit:function(t){if(!t.hasBase(t.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function tanh is no angle");return this(t.value)},"Array | Matrix":function(t){return I(t,this,!0)}})})),Po="setCartesian",Io=Object(s.a)(Po,["typed","size","subset","compareNatural","Index","DenseMatrix"],(function(t){var e=t.typed,n=t.size,r=t.subset,i=t.compareNatural,o=t.Index,a=t.DenseMatrix;return e(Po,{"Array | Matrix, Array | Matrix":function(t,e){var s=[];if(0!==r(n(t),new o(0))&&0!==r(n(e),new o(0)))for(var u=Object(M.e)(Array.isArray(t)?t:t.toArray()).sort(i),l=Object(M.e)(Array.isArray(e)?e:e.toArray()).sort(i),c=(s=[],0);c<u.length;c++)for(var f=0;f<l.length;f++)s.push([u[c],l[f]]);return Array.isArray(t)&&Array.isArray(e)?s:new a(s)}})})),Ro="setDifference",Lo=Object(s.a)(Ro,["typed","size","subset","compareNatural","Index","DenseMatrix"],(function(t){var e=t.typed,n=t.size,r=t.subset,i=t.compareNatural,o=t.Index,a=t.DenseMatrix;return e(Ro,{"Array | Matrix, Array | Matrix":function(t,e){if(0===r(n(t),new o(0)))c=[];else{if(0===r(n(e),new o(0)))return Object(M.e)(t.toArray());for(var s,u=Object(M.i)(Object(M.e)(Array.isArray(t)?t:t.toArray()).sort(i)),l=Object(M.i)(Object(M.e)(Array.isArray(e)?e:e.toArray()).sort(i)),c=[],f=0;f<u.length;f++){s=!1;for(var h=0;h<l.length;h++)if(0===i(u[f].value,l[h].value)&&u[f].identifier===l[h].identifier){s=!0;break}s||c.push(u[f])}}return Array.isArray(t)&&Array.isArray(e)?Object(M.g)(c):new a(Object(M.g)(c))}})})),Fo="setDistinct",qo=Object(s.a)(Fo,["typed","size","subset","compareNatural","Index","DenseMatrix"],(function(t){var e=t.typed,n=t.size,r=t.subset,i=t.compareNatural,o=t.Index,a=t.DenseMatrix;return e(Fo,{"Array | Matrix":function(t){if(0===r(n(t),new o(0)))e=[];else{var e,s=Object(M.e)(Array.isArray(t)?t:t.toArray()).sort(i);(e=[]).push(s[0]);for(var u=1;u<s.length;u++)0!==i(s[u],s[u-1])&&e.push(s[u])}return Array.isArray(t)?e:new a(e)}})})),Bo="setIntersect",zo=Object(s.a)(Bo,["typed","size","subset","compareNatural","Index","DenseMatrix"],(function(t){var e=t.typed,n=t.size,r=t.subset,i=t.compareNatural,o=t.Index,a=t.DenseMatrix;return e(Bo,{"Array | Matrix, Array | Matrix":function(t,e){if(0===r(n(t),new o(0))||0===r(n(e),new o(0)))l=[];else for(var s=Object(M.i)(Object(M.e)(Array.isArray(t)?t:t.toArray()).sort(i)),u=Object(M.i)(Object(M.e)(Array.isArray(e)?e:e.toArray()).sort(i)),l=[],c=0;c<s.length;c++)for(var f=0;f<u.length;f++)if(0===i(s[c].value,u[f].value)&&s[c].identifier===u[f].identifier){l.push(s[c]);break}return Array.isArray(t)&&Array.isArray(e)?Object(M.g)(l):new a(Object(M.g)(l))}})})),Ho="setIsSubset",Uo=Object(s.a)(Ho,["typed","size","subset","compareNatural","Index"],(function(t){var e=t.typed,n=t.size,r=t.subset,i=t.compareNatural,o=t.Index;return e(Ho,{"Array | Matrix, Array | Matrix":function(t,e){if(0===r(n(t),new o(0)))return!0;if(0===r(n(e),new o(0)))return!1;for(var a,s=Object(M.i)(Object(M.e)(Array.isArray(t)?t:t.toArray()).sort(i)),u=Object(M.i)(Object(M.e)(Array.isArray(e)?e:e.toArray()).sort(i)),l=0;l<s.length;l++){a=!1;for(var c=0;c<u.length;c++)if(0===i(s[l].value,u[c].value)&&s[l].identifier===u[c].identifier){a=!0;break}if(!1===a)return!1}return!0}})})),Wo="setMultiplicity",Vo=Object(s.a)(Wo,["typed","size","subset","compareNatural","Index"],(function(t){var e=t.typed,n=t.size,r=t.subset,i=t.compareNatural,o=t.Index;return e(Wo,{"number | BigNumber | Fraction | Complex, Array | Matrix":function(t,e){if(0===r(n(e),new o(0)))return 0;for(var a=Object(M.e)(Array.isArray(e)?e:e.toArray()),s=0,u=0;u<a.length;u++)0===i(a[u],t)&&s++;return s}})})),$o="setPowerset",Yo=Object(s.a)($o,["typed","size","subset","compareNatural","Index"],(function(t){var e=t.typed,n=t.size,r=t.subset,i=t.compareNatural,o=t.Index;return e($o,{"Array | Matrix":function(t){if(0===r(n(t),new o(0)))return[];for(var e=Object(M.e)(Array.isArray(t)?t:t.toArray()).sort(i),a=[],s=0;s.toString(2).length<=e.length;)a.push(function(t,e){for(var n=[],r=0;r<e.length;r++)"1"===e[r]&&n.push(t[r]);return n}(e,s.toString(2).split("").reverse())),s++;return function(t){for(var e=[],n=t.length-1;0<n;n--)for(var r=0;r<n;r++)t[r].length>t[r+1].length&&(e=t[r],t[r]=t[r+1],t[r+1]=e);return t}(a)}})})),Zo="setSize",Go=Object(s.a)(Zo,["typed","compareNatural"],(function(t){var e=t.typed,n=t.compareNatural;return e(Zo,{"Array | Matrix":function(t){return Array.isArray(t)?Object(M.e)(t).length:Object(M.e)(t.toArray()).length},"Array | Matrix, boolean":function(t,e){if(!1===e||0===t.length)return Array.isArray(t)?Object(M.e)(t).length:Object(M.e)(t.toArray()).length;for(var r=Object(M.e)(Array.isArray(t)?t:t.toArray()).sort(n),i=1,o=1;o<r.length;o++)0!==n(r[o],r[o-1])&&i++;return i}})})),Ko="setSymDifference",Xo=Object(s.a)(Ko,["typed","size","concat","subset","setDifference","Index"],(function(t){var e=t.typed,n=t.size,r=t.concat,i=t.subset,o=t.setDifference,a=t.Index;return e(Ko,{"Array | Matrix, Array | Matrix":function(t,e){if(0===i(n(t),new a(0)))return Object(M.e)(e);if(0===i(n(e),new a(0)))return Object(M.e)(t);var s=Object(M.e)(t),u=Object(M.e)(e);return r(o(s,u),o(u,s))}})})),Jo="setUnion",Qo=Object(s.a)(Jo,["typed","size","concat","subset","setIntersect","setSymDifference","Index"],(function(t){var e=t.typed,n=t.size,r=t.concat,i=t.subset,o=t.setIntersect,a=t.setSymDifference,s=t.Index;return e(Jo,{"Array | Matrix, Array | Matrix":function(t,e){if(0===i(n(t),new s(0)))return Object(M.e)(e);if(0===i(n(e),new s(0)))return Object(M.e)(t);var u=Object(M.e)(t),l=Object(M.e)(e);return r(a(u,l),o(u,l))}})})),ta=Object(s.a)("add",["typed","matrix","addScalar","equalScalar","DenseMatrix","SparseMatrix"],(function(t){var e=t.typed,n=t.matrix,r=t.addScalar,i=t.equalScalar,o=t.DenseMatrix,a=(t.SparseMatrix,re({typed:e})),s=ie({typed:e,equalScalar:i}),u=oe({typed:e,DenseMatrix:o}),l=ae({typed:e}),c=se({typed:e});return e("add",Object(k.e)({"DenseMatrix, DenseMatrix":function(t,e){return l(t,e,r)},"DenseMatrix, SparseMatrix":function(t,e){return a(t,e,r,!1)},"SparseMatrix, DenseMatrix":function(t,e){return a(e,t,r,!0)},"SparseMatrix, SparseMatrix":function(t,e){return s(t,e,r)},"Array, Array":function(t,e){return this(n(t),n(e)).valueOf()},"Array, Matrix":function(t,e){return this(n(t),e)},"Matrix, Array":function(t,e){return this(t,n(e))},"DenseMatrix, any":function(t,e){return c(t,e,r,!1)},"SparseMatrix, any":function(t,e){return u(t,e,r,!1)},"any, DenseMatrix":function(t,e){return c(e,t,r,!0)},"any, SparseMatrix":function(t,e){return u(e,t,r,!0)},"Array, any":function(t,e){return c(n(t),e,r,!1).valueOf()},"any, Array":function(t,e){return c(n(e),t,r,!0).valueOf()},"any, any":r,"any, any, ...any":function(t,e,n){for(var r=this(t,e),i=0;i<n.length;i++)r=this(r,n[i]);return r}},r.signatures))})),ea=Object(s.a)("hypot",["typed","abs","addScalar","divideScalar","multiplyScalar","sqrt","smaller","isPositive"],(function(t){var e=t.typed,n=t.abs,r=t.addScalar,i=t.divideScalar,o=t.multiplyScalar,a=t.sqrt,s=t.smaller,u=t.isPositive;return e("hypot",{"... number | BigNumber":function(t){for(var e=0,l=0,c=0;c<t.length;c++){var f=n(t[c]);s(l,f)?(e=o(e,o(i(l,f),i(l,f))),e=r(e,1),l=f):e=r(e,u(f)?o(i(f,l),i(f,l)):f)}return o(l,a(e))},Array:function(t){return this.apply(this,Object(M.e)(t))},Matrix:function(t){return this.apply(this,Object(M.e)(t.toArray()))}})})),na=Object(s.a)("norm",["typed","abs","add","pow","conj","sqrt","multiply","equalScalar","larger","smaller","matrix"],(function(t){var e=t.typed,n=t.abs,r=t.add,i=t.pow,o=t.conj,a=t.sqrt,s=t.multiply,u=t.equalScalar,l=t.larger,c=t.smaller,f=t.matrix;return e("norm",{number:Math.abs,Complex:function(t){return t.abs()},BigNumber:function(t){return t.abs()},boolean:function(t){return Math.abs(t)},Array:function(t){return h(f(t),2)},Matrix:function(t){return h(t,2)},"number | Complex | BigNumber | boolean, number | BigNumber | string":function(t){return this(t)},"Array, number | BigNumber | string":function(t,e){return h(f(t),e)},"Matrix, number | BigNumber | string":h});function h(t,e){var f,d=t.size();if(1===d.length){if(e===Number.POSITIVE_INFINITY||"inf"===e){var p=0;return t.forEach((function(t){var e=n(t);l(e,p)&&(p=e)}),!0),p}if(e===Number.NEGATIVE_INFINITY||"-inf"===e)return t.forEach((function(t){var e=n(t);f&&!c(e,f)||(f=e)}),!0),f||0;if("fro"===e)return h(t,2);if("number"!=typeof e||isNaN(e))throw new Error("Unsupported parameter value");if(u(e,0))return Number.POSITIVE_INFINITY;var m=0;return t.forEach((function(t){m=r(i(n(t),e),m)}),!0),i(m,1/e)}if(2===d.length){if(1===e){var g=[],v=0;return t.forEach((function(t,e){var i=e[1],o=r(g[i]||0,n(t));l(o,v)&&(v=o),g[i]=o}),!0),v}if(e===Number.POSITIVE_INFINITY||"inf"===e){var y=[],b=0;return t.forEach((function(t,e){var i=e[0],o=r(y[i]||0,n(t));l(o,b)&&(b=o),y[i]=o}),!0),b}if("fro"===e){var x=0;return t.forEach((function(t,e){x=r(x,s(t,o(t)))})),n(a(x))}if(2===e)throw new Error("Unsupported parameter value, missing implementation of matrix singular value decomposition");throw new Error("Unsupported parameter value")}}})),ra=Object(s.a)("dot",["typed","addScalar","multiplyScalar","conj","size"],(function(t){var e=t.typed,n=t.addScalar,i=t.multiplyScalar,o=t.conj,a=t.size;return e("dot",{"Array | DenseMatrix, Array | DenseMatrix":function(t,a){var l,c=s(t,a),f=Object(r.v)(t)?t._data:t,h=Object(r.v)(t)?t._datatype:void 0,d=Object(r.v)(a)?a._data:a,p=Object(r.v)(a)?a._datatype:void 0,m=2===u(t).length,g=2===u(a).length,v=n,y=i;if(h&&p&&h===p&&"string"==typeof h&&(l=h,v=e.find(n,[l,l]),y=e.find(i,[l,l])),!m&&!g){for(var b=y(o(f[0]),d[0]),x=1;x<c;x++)b=v(b,y(o(f[x]),d[x]));return b}if(!m&&g){for(var w=y(o(f[0]),d[0][0]),_=1;_<c;_++)w=v(w,y(o(f[_]),d[_][0]));return w}if(m&&!g){for(var S=y(o(f[0][0]),d[0]),O=1;O<c;O++)S=v(S,y(o(f[O][0]),d[O]));return S}if(m&&g){for(var N=y(o(f[0][0]),d[0][0]),M=1;M<c;M++)N=v(N,y(o(f[M][0]),d[M][0]));return N}},"SparseMatrix, SparseMatrix":function(t,e){s(t,e);for(var r=t._index,o=t._values,a=e._index,u=e._values,l=0,c=n,f=i,h=0,d=0;h<r.length&&d<a.length;){var p=r[h],m=a[d];p<m?h++:m<p?d++:p===m&&(l=c(l,f(o[h],u[d])),h++,d++)}return l}});function s(t,e){var n,r,i=u(t),o=u(e);if(1===i.length)n=i[0];else{if(2!==i.length||1!==i[1])throw new RangeError("Expected a column vector, instead got a matrix of size ("+i.join(", ")+")");n=i[0]}if(1===o.length)r=o[0];else{if(2!==o.length||1!==o[1])throw new RangeError("Expected a column vector, instead got a matrix of size ("+o.join(", ")+")");r=o[0]}if(n!==r)throw new RangeError("Vectors must have equal length ("+n+" != "+r+")");if(0===n)throw new RangeError("Cannot calculate the dot product of empty vectors");return n}function u(t){return Object(r.v)(t)?t.size():a(t)}})),ia=Object(s.a)("trace",["typed","matrix","add"],(function(t){var e=t.typed,n=t.matrix,r=t.add;return e("trace",{Array:function(t){return i(n(t))},SparseMatrix:function(t){var e=t._values,n=t._index,i=t._ptr,o=t._size,a=o[0],s=o[1];if(a!==s)throw new RangeError("Matrix must be square (size: "+Object(E.d)(o)+")");var u=0;if(0<e.length)for(var l=0;l<s;l++)for(var c=i[l],f=i[l+1],h=c;h<f;h++){var d=n[h];if(d===l){u=r(u,e[h]);break}if(l<d)break}return u},DenseMatrix:i,any:k.a});function i(t){var e=t._size,n=t._data;switch(e.length){case 1:if(1===e[0])return Object(k.a)(n[0]);throw new RangeError("Matrix must be square (size: "+Object(E.d)(e)+")");case 2:var i=e[0];if(i!==e[1])throw new RangeError("Matrix must be square (size: "+Object(E.d)(e)+")");for(var o=0,a=0;a<i;a++)o=r(o,n[a][a]);return o;default:throw new RangeError("Matrix must be two dimensional (size: "+Object(E.d)(e)+")")}}})),oa=Object(s.a)("index",["typed","Index"],(function(t){var e=t.typed,n=t.Index;return e("index",{"...number | string | BigNumber | Range | Array | Matrix":function(t){var e=t.map((function(t){return Object(r.e)(t)?t.toNumber():Array.isArray(t)||Object(r.v)(t)?t.map((function(t){return Object(r.e)(t)?t.toNumber():t})):t})),i=new n;return n.apply(i,e),i}})})),aa={end:!0};function sa(t){return(sa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var ua=Object(s.a)("Node",["mathWithTransform"],(function(t){var e=t.mathWithTransform;function n(){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator")}return n.prototype.evaluate=function(t){return this.compile().evaluate(t)},n.prototype.type="Node",n.prototype.isNode=!0,n.prototype.comment="",n.prototype.compile=function(){var t=this._compile(e,{}),n={};return{evaluate:function(e){var r=e||{};return function(t){for(var e in t)if(Object(k.f)(t,e)&&e in aa)throw new Error('Scope contains an illegal symbol, "'+e+'" is a reserved keyword')}(r),t(r,n,null)}}},n.prototype._compile=function(t,e){throw new Error("Method _compile should be implemented by type "+this.type)},n.prototype.forEach=function(t){throw new Error("Cannot run forEach on a Node interface")},n.prototype.map=function(t){throw new Error("Cannot run map on a Node interface")},n.prototype._ifNode=function(t){if(!Object(r.w)(t))throw new TypeError("Callback function must return a Node");return t},n.prototype.traverse=function(t){t(this,null,null),function t(e,n){e.forEach((function(e,r,i){n(e,r,i),t(e,n)}))}(this,t)},n.prototype.transform=function(t){return function e(n,r,i){var o=t(n,r,i);return o!==n?o:n.map(e)}(this,null,null)},n.prototype.filter=function(t){var e=[];return this.traverse((function(n,r,i){t(n,r,i)&&e.push(n)})),e},n.prototype.clone=function(){throw new Error("Cannot clone a Node interface")},n.prototype.cloneDeep=function(){return this.map((function(t){return t.cloneDeep()}))},n.prototype.equals=function(t){return!!t&&Object(k.d)(this,t)},n.prototype.toString=function(t){var e;if(t&&"object"===sa(t))switch(sa(t.handler)){case"object":case"undefined":break;case"function":e=t.handler(this,t);break;default:throw new TypeError("Object or function expected as callback")}return void 0!==e?e:this._toString(t)},n.prototype.toJSON=function(){throw new Error("Cannot serialize object: toJSON not implemented by "+this.type)},n.prototype.toHTML=function(t){var e;if(t&&"object"===sa(t))switch(sa(t.handler)){case"object":case"undefined":break;case"function":e=t.handler(this,t);break;default:throw new TypeError("Object or function expected as callback")}return void 0!==e?e:this.toHTML(t)},n.prototype._toString=function(){throw new Error("_toString not implemented for "+this.type)},n.prototype.toTex=function(t){var e;if(t&&"object"===sa(t))switch(sa(t.handler)){case"object":case"undefined":break;case"function":e=t.handler(this,t);break;default:throw new TypeError("Object or function expected as callback")}return void 0!==e?e:this._toTex(t)},n.prototype._toTex=function(t){throw new Error("_toTex not implemented for "+this.type)},n.prototype.getIdentifier=function(){return this.type},n.prototype.getContent=function(){return this},n}),{isClass:!0,isNode:!0});function la(t){return t&&t.isIndexError?new A.a(t.index+1,t.min+1,void 0!==t.max?t.max+1:void 0):t}function ca(t){return(ca="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function fa(t){var e=t.subset;return function(t,n){try{if(Array.isArray(t))return e(t,n);if(t&&"function"==typeof t.subset)return t.subset(n);if("string"==typeof t)return e(t,n);if("object"!==ca(t))throw new TypeError("Cannot apply index: unsupported type of object");if(!n.isObjectProperty())throw new TypeError("Cannot apply a numeric index as object property");return Zn(t,n.getObjectProperty())}catch(t){throw la(t)}}}var ha=Object(s.a)("AccessorNode",["subset","Node"],(function(t){var e=t.subset,n=t.Node,i=fa({subset:e});function o(t,e){if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");if(!Object(r.w)(t))throw new TypeError('Node expected for parameter "object"');if(!Object(r.u)(e))throw new TypeError('IndexNode expected for parameter "index"');this.object=t||null,this.index=e,Object.defineProperty(this,"name",{get:function(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():"":this.object.name||""}.bind(this),set:function(){throw new Error("Cannot assign a new name, name is read-only")}})}function a(t){return!(Object(r.a)(t)||Object(r.c)(t)||Object(r.l)(t)||Object(r.r)(t)||Object(r.A)(t)||Object(r.C)(t)||Object(r.J)(t))}return(o.prototype=new n).type="AccessorNode",o.prototype.isAccessorNode=!0,o.prototype._compile=function(t,e){var n=this.object._compile(t,e),r=this.index._compile(t,e);if(this.index.isObjectProperty()){var o=this.index.getObjectProperty();return function(t,e,r){return Zn(n(t,e,r),o)}}return function(t,e,o){var a=n(t,e,o),s=r(t,e,a);return i(a,s)}},o.prototype.forEach=function(t){t(this.object,"object",this),t(this.index,"index",this)},o.prototype.map=function(t){return new o(this._ifNode(t(this.object,"object",this)),this._ifNode(t(this.index,"index",this)))},o.prototype.clone=function(){return new o(this.object,this.index)},o.prototype._toString=function(t){var e=this.object.toString(t);return a(this.object)&&(e="("+e+")"),e+this.index.toString(t)},o.prototype.toHTML=function(t){var e=this.object.toHTML(t);return a(this.object)&&(e='<span class="math-parenthesis math-round-parenthesis">(</span>'+e+'<span class="math-parenthesis math-round-parenthesis">)</span>'),e+this.index.toHTML(t)},o.prototype._toTex=function(t){var e=this.object.toTex(t);return a(this.object)&&(e="\\left(' + object + '\\right)"),e+this.index.toTex(t)},o.prototype.toJSON=function(){return{mathjs:"AccessorNode",object:this.object,index:this.index}},o.fromJSON=function(t){return new o(t.object,t.index)},o}),{isClass:!0,isNode:!0}),da=Object(s.a)("ArrayNode",["Node"],(function(t){var e=t.Node;function n(t){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(this.items=t||[],!Array.isArray(this.items)||!this.items.every(r.w))throw new TypeError("Array containing Nodes expected")}return(n.prototype=new e).type="ArrayNode",n.prototype.isArrayNode=!0,n.prototype._compile=function(t,e){var n=Object(M.k)(this.items,(function(n){return n._compile(t,e)}));if("Array"===t.config.matrix)return function(t,e,r){return Object(M.k)(n,(function(n){return n(t,e,r)}))};var r=t.matrix;return function(t,e,i){return r(Object(M.k)(n,(function(n){return n(t,e,i)})))}},n.prototype.forEach=function(t){for(var e=0;e<this.items.length;e++)t(this.items[e],"items["+e+"]",this)},n.prototype.map=function(t){for(var e=[],r=0;r<this.items.length;r++)e[r]=this._ifNode(t(this.items[r],"items["+r+"]",this));return new n(e)},n.prototype.clone=function(){return new n(this.items.slice(0))},n.prototype._toString=function(t){return"["+this.items.map((function(e){return e.toString(t)})).join(", ")+"]"},n.prototype.toJSON=function(){return{mathjs:"ArrayNode",items:this.items}},n.fromJSON=function(t){return new n(t.items)},n.prototype.toHTML=function(t){return'<span class="math-parenthesis math-square-parenthesis">[</span>'+this.items.map((function(e){return e.toHTML(t)})).join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-square-parenthesis">]</span>'},n.prototype._toTex=function(t){var e="\\begin{bmatrix}";return this.items.forEach((function(n){n.items?e+=n.items.map((function(e){return e.toTex(t)})).join("&"):e+=n.toTex(t),e+="\\\\"})),e+="\\end{bmatrix}"},n}),{isClass:!0,isNode:!0});function pa(t){return(pa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var ma=[{AssignmentNode:{},FunctionAssignmentNode:{}},{ConditionalNode:{latexLeftParens:!1,latexRightParens:!1,latexParens:!1}},{"OperatorNode:or":{associativity:"left",associativeWith:[]}},{"OperatorNode:xor":{associativity:"left",associativeWith:[]}},{"OperatorNode:and":{associativity:"left",associativeWith:[]}},{"OperatorNode:bitOr":{associativity:"left",associativeWith:[]}},{"OperatorNode:bitXor":{associativity:"left",associativeWith:[]}},{"OperatorNode:bitAnd":{associativity:"left",associativeWith:[]}},{"OperatorNode:equal":{associativity:"left",associativeWith:[]},"OperatorNode:unequal":{associativity:"left",associativeWith:[]},"OperatorNode:smaller":{associativity:"left",associativeWith:[]},"OperatorNode:larger":{associativity:"left",associativeWith:[]},"OperatorNode:smallerEq":{associativity:"left",associativeWith:[]},"OperatorNode:largerEq":{associativity:"left",associativeWith:[]},RelationalNode:{associativity:"left",associativeWith:[]}},{"OperatorNode:leftShift":{associativity:"left",associativeWith:[]},"OperatorNode:rightArithShift":{associativity:"left",associativeWith:[]},"OperatorNode:rightLogShift":{associativity:"left",associativeWith:[]}},{"OperatorNode:to":{associativity:"left",associativeWith:[]}},{RangeNode:{}},{"OperatorNode:add":{associativity:"left",associativeWith:["OperatorNode:add","OperatorNode:subtract"]},"OperatorNode:subtract":{associativity:"left",associativeWith:[]}},{"OperatorNode:multiply":{associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","Operator:dotMultiply","Operator:dotDivide"]},"OperatorNode:divide":{associativity:"left",associativeWith:[],latexLeftParens:!1,latexRightParens:!1,latexParens:!1},"OperatorNode:dotMultiply":{associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","OperatorNode:dotMultiply","OperatorNode:doDivide"]},"OperatorNode:dotDivide":{associativity:"left",associativeWith:[]},"OperatorNode:mod":{associativity:"left",associativeWith:[]}},{"OperatorNode:unaryPlus":{associativity:"right"},"OperatorNode:unaryMinus":{associativity:"right"},"OperatorNode:bitNot":{associativity:"right"},"OperatorNode:not":{associativity:"right"}},{"OperatorNode:pow":{associativity:"right",associativeWith:[],latexRightParens:!1},"OperatorNode:dotPow":{associativity:"right",associativeWith:[]}},{"OperatorNode:factorial":{associativity:"left"}},{"OperatorNode:transpose":{associativity:"left"}}];function ga(t,e){var n=t;"keep"!==e&&(n=t.getContent());for(var r=n.getIdentifier(),i=0;i<ma.length;i++)if(r in ma[i])return i;return null}function va(t,e){var n=t;"keep"!==e&&(n=t.getContent());var r=n.getIdentifier(),i=ga(n,e);if(null===i)return null;var o=ma[i][r];if(Object(k.f)(o,"associativity")){if("left"===o.associativity)return"left";if("right"===o.associativity)return"right";throw Error("'"+r+"' has the invalid associativity '"+o.associativity+"'.")}return null}function ya(t,e,n){var r="keep"!==n?t.getContent():t,i="keep"!==n?t.getContent():e,o=r.getIdentifier(),a=i.getIdentifier(),s=ga(r,n);if(null===s)return null;var u=ma[s][o];if(Object(k.f)(u,"associativeWith")&&u.associativeWith instanceof Array){for(var l=0;l<u.associativeWith.length;l++)if(u.associativeWith[l]===a)return!0;return!1}return null}var ba=Object(s.a)("AssignmentNode",["subset","?matrix","Node"],(function(t){var e,n,i,o=t.subset,a=t.matrix,s=t.Node,u=fa({subset:o}),l=(n=(e={subset:o,matrix:a}).subset,i=e.matrix,function(t,e,r){try{if(Array.isArray(t))return i(t).subset(e,r).valueOf();if(t&&"function"==typeof t.subset)return t.subset(e,r);if("string"==typeof t)return n(t,e,r);if("object"!==pa(t))throw new TypeError("Cannot apply index: unsupported type of object");if(!e.isObjectProperty())throw TypeError("Cannot apply a numeric index as object property");return Gn(t,e.getObjectProperty(),r),t}catch(t){throw la(t)}});function c(t,e,n){if(!(this instanceof c))throw new SyntaxError("Constructor must be called with the new operator");if(this.object=t,this.index=n?e:null,this.value=n||e,!Object(r.J)(t)&&!Object(r.a)(t))throw new TypeError('SymbolNode or AccessorNode expected as "object"');if(Object(r.J)(t)&&"end"===t.name)throw new Error('Cannot assign to symbol "end"');if(this.index&&!Object(r.u)(this.index))throw new TypeError('IndexNode expected as "index"');if(!Object(r.w)(this.value))throw new TypeError('Node expected as "value"');Object.defineProperty(this,"name",{get:function(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():"":this.object.name||""}.bind(this),set:function(){throw new Error("Cannot assign a new name, name is read-only")}})}function f(t,e){var n=ga(t,e=e||"keep"),r=ga(t.value,e);return"all"===e||null!==r&&r<=n}return(c.prototype=new s).type="AssignmentNode",c.prototype.isAssignmentNode=!0,c.prototype._compile=function(t,e){var n=this.object._compile(t,e),i=this.index?this.index._compile(t,e):null,o=this.value._compile(t,e),a=this.object.name;if(this.index){if(this.index.isObjectProperty()){var s=this.index.getObjectProperty();return function(t,e,r){var i=n(t,e,r),a=o(t,e,r);return Gn(i,s,a)}}if(Object(r.J)(this.object))return function(t,e,r){var s=n(t,e,r),u=o(t,e,r),c=i(t,e,s);return Gn(t,a,l(s,c,u)),u};var c=this.object.object._compile(t,e);if(this.object.index.isObjectProperty()){var f=this.object.index.getObjectProperty();return function(t,e,n){var r=c(t,e,n),a=Zn(r,f),s=i(t,e,a),u=o(t,e,n);return Gn(r,f,l(a,s,u)),u}}var h=this.object.index._compile(t,e);return function(t,e,n){var r=c(t,e,n),a=h(t,e,r),s=u(r,a),f=i(t,e,s),d=o(t,e,n);return l(r,a,l(s,f,d)),d}}if(!Object(r.J)(this.object))throw new TypeError("SymbolNode expected as object");return function(t,e,n){return Gn(t,a,o(t,e,n))}},c.prototype.forEach=function(t){t(this.object,"object",this),this.index&&t(this.index,"index",this),t(this.value,"value",this)},c.prototype.map=function(t){return new c(this._ifNode(t(this.object,"object",this)),this.index?this._ifNode(t(this.index,"index",this)):null,this._ifNode(t(this.value,"value",this)))},c.prototype.clone=function(){return new c(this.object,this.index,this.value)},c.prototype._toString=function(t){var e=this.object.toString(t),n=this.index?this.index.toString(t):"",r=this.value.toString(t);return f(this,t&&t.parenthesis)&&(r="("+r+")"),e+n+" = "+r},c.prototype.toJSON=function(){return{mathjs:"AssignmentNode",object:this.object,index:this.index,value:this.value}},c.fromJSON=function(t){return new c(t.object,t.index,t.value)},c.prototype.toHTML=function(t){var e=this.object.toHTML(t),n=this.index?this.index.toHTML(t):"",r=this.value.toHTML(t);return f(this,t&&t.parenthesis)&&(r='<span class="math-paranthesis math-round-parenthesis">(</span>'+r+'<span class="math-paranthesis math-round-parenthesis">)</span>'),e+n+'<span class="math-operator math-assignment-operator math-variable-assignment-operator math-binary-operator">=</span>'+r},c.prototype._toTex=function(t){var e=this.object.toTex(t),n=this.index?this.index.toTex(t):"",r=this.value.toTex(t);return f(this,t&&t.parenthesis)&&(r="\\left(".concat(r,"\\right)")),e+n+":="+r},c}),{isClass:!0,isNode:!0}),xa=Object(s.a)("BlockNode",["ResultSet","Node"],(function(t){var e=t.ResultSet,n=t.Node;function i(t){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");if(!Array.isArray(t))throw new Error("Array expected");this.blocks=t.map((function(t){var e=t&&t.node,n=!t||void 0===t.visible||t.visible;if(!Object(r.w)(e))throw new TypeError('Property "node" must be a Node');if("boolean"!=typeof n)throw new TypeError('Property "visible" must be a boolean');return{node:e,visible:n}}))}return(i.prototype=new n).type="BlockNode",i.prototype.isBlockNode=!0,i.prototype._compile=function(t,n){var r=Object(M.k)(this.blocks,(function(e){return{evaluate:e.node._compile(t,n),visible:e.visible}}));return function(t,n,i){var o=[];return Object(M.f)(r,(function(e){var r=e.evaluate(t,n,i);e.visible&&o.push(r)})),new e(o)}},i.prototype.forEach=function(t){for(var e=0;e<this.blocks.length;e++)t(this.blocks[e].node,"blocks["+e+"].node",this)},i.prototype.map=function(t){for(var e=[],n=0;n<this.blocks.length;n++){var r=this.blocks[n],o=this._ifNode(t(r.node,"blocks["+n+"].node",this));e[n]={node:o,visible:r.visible}}return new i(e)},i.prototype.clone=function(){return new i(this.blocks.map((function(t){return{node:t.node,visible:t.visible}})))},i.prototype._toString=function(t){return this.blocks.map((function(e){return e.node.toString(t)+(e.visible?"":";")})).join("\n")},i.prototype.toJSON=function(){return{mathjs:"BlockNode",blocks:this.blocks}},i.fromJSON=function(t){return new i(t.blocks)},i.prototype.toHTML=function(t){return this.blocks.map((function(e){return e.node.toHTML(t)+(e.visible?"":'<span class="math-separator">;</span>')})).join('<span class="math-separator"><br /></span>')},i.prototype._toTex=function(t){return this.blocks.map((function(e){return e.node.toTex(t)+(e.visible?"":";")})).join("\\;\\;\n")},i}),{isClass:!0,isNode:!0}),wa=Object(s.a)("ConditionalNode",["Node"],(function(t){var e=t.Node;function n(t,e,i){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(!Object(r.w)(t))throw new TypeError("Parameter condition must be a Node");if(!Object(r.w)(e))throw new TypeError("Parameter trueExpr must be a Node");if(!Object(r.w)(i))throw new TypeError("Parameter falseExpr must be a Node");this.condition=t,this.trueExpr=e,this.falseExpr=i}return(n.prototype=new e).type="ConditionalNode",n.prototype.isConditionalNode=!0,n.prototype._compile=function(t,e){var n=this.condition._compile(t,e),i=this.trueExpr._compile(t,e),o=this.falseExpr._compile(t,e);return function(t,e,a){return(function(t){if("number"==typeof t||"boolean"==typeof t||"string"==typeof t)return!!t;if(t){if(Object(r.e)(t))return!t.isZero();if(Object(r.j)(t))return!(!t.re&&!t.im);if(Object(r.L)(t))return!!t.value}if(null!=t)throw new TypeError('Unsupported type of condition "'+Object(r.M)(t)+'"');return!1}(n(t,e,a))?i:o)(t,e,a)}},n.prototype.forEach=function(t){t(this.condition,"condition",this),t(this.trueExpr,"trueExpr",this),t(this.falseExpr,"falseExpr",this)},n.prototype.map=function(t){return new n(this._ifNode(t(this.condition,"condition",this)),this._ifNode(t(this.trueExpr,"trueExpr",this)),this._ifNode(t(this.falseExpr,"falseExpr",this)))},n.prototype.clone=function(){return new n(this.condition,this.trueExpr,this.falseExpr)},n.prototype._toString=function(t){var e=t&&t.parenthesis?t.parenthesis:"keep",n=ga(this,e),r=this.condition.toString(t),i=ga(this.condition,e);("all"===e||"OperatorNode"===this.condition.type||null!==i&&i<=n)&&(r="("+r+")");var o=this.trueExpr.toString(t),a=ga(this.trueExpr,e);("all"===e||"OperatorNode"===this.trueExpr.type||null!==a&&a<=n)&&(o="("+o+")");var s=this.falseExpr.toString(t),u=ga(this.falseExpr,e);return("all"===e||"OperatorNode"===this.falseExpr.type||null!==u&&u<=n)&&(s="("+s+")"),r+" ? "+o+" : "+s},n.prototype.toJSON=function(){return{mathjs:"ConditionalNode",condition:this.condition,trueExpr:this.trueExpr,falseExpr:this.falseExpr}},n.fromJSON=function(t){return new n(t.condition,t.trueExpr,t.falseExpr)},n.prototype.toHTML=function(t){var e=t&&t.parenthesis?t.parenthesis:"keep",n=ga(this,e),r=this.condition.toHTML(t),i=ga(this.condition,e);("all"===e||"OperatorNode"===this.condition.type||null!==i&&i<=n)&&(r='<span class="math-parenthesis math-round-parenthesis">(</span>'+r+'<span class="math-parenthesis math-round-parenthesis">)</span>');var o=this.trueExpr.toHTML(t),a=ga(this.trueExpr,e);("all"===e||"OperatorNode"===this.trueExpr.type||null!==a&&a<=n)&&(o='<span class="math-parenthesis math-round-parenthesis">(</span>'+o+'<span class="math-parenthesis math-round-parenthesis">)</span>');var s=this.falseExpr.toHTML(t),u=ga(this.falseExpr,e);return("all"===e||"OperatorNode"===this.falseExpr.type||null!==u&&u<=n)&&(s='<span class="math-parenthesis math-round-parenthesis">(</span>'+s+'<span class="math-parenthesis math-round-parenthesis">)</span>'),r+'<span class="math-operator math-conditional-operator">?</span>'+o+'<span class="math-operator math-conditional-operator">:</span>'+s},n.prototype._toTex=function(t){return"\\begin{cases} {"+this.trueExpr.toTex(t)+"}, &\\quad{\\text{if }\\;"+this.condition.toTex(t)+"}\\\\{"+this.falseExpr.toTex(t)+"}, &\\quad{\\text{otherwise}}\\end{cases}"},n}),{isClass:!0,isNode:!0}),_a=n(16),Sa=n.n(_a),Oa={Alpha:"A",alpha:"\\alpha",Beta:"B",beta:"\\beta",Gamma:"\\Gamma",gamma:"\\gamma",Delta:"\\Delta",delta:"\\delta",Epsilon:"E",epsilon:"\\epsilon",varepsilon:"\\varepsilon",Zeta:"Z",zeta:"\\zeta",Eta:"H",eta:"\\eta",Theta:"\\Theta",theta:"\\theta",vartheta:"\\vartheta",Iota:"I",iota:"\\iota",Kappa:"K",kappa:"\\kappa",varkappa:"\\varkappa",Lambda:"\\Lambda",lambda:"\\lambda",Mu:"M",mu:"\\mu",Nu:"N",nu:"\\nu",Xi:"\\Xi",xi:"\\xi",Omicron:"O",omicron:"o",Pi:"\\Pi",pi:"\\pi",varpi:"\\varpi",Rho:"P",rho:"\\rho",varrho:"\\varrho",Sigma:"\\Sigma",sigma:"\\sigma",varsigma:"\\varsigma",Tau:"T",tau:"\\tau",Upsilon:"\\Upsilon",upsilon:"\\upsilon",Phi:"\\Phi",phi:"\\phi",varphi:"\\varphi",Chi:"X",chi:"\\chi",Psi:"\\Psi",psi:"\\psi",Omega:"\\Omega",omega:"\\omega",true:"\\mathrm{True}",false:"\\mathrm{False}",i:"i",inf:"\\infty",Inf:"\\infty",infinity:"\\infty",Infinity:"\\infty",oo:"\\infty",lim:"\\lim",undefined:"\\mathbf{?}"},Na={transpose:"^\\top",ctranspose:"^H",factorial:"!",pow:"^",dotPow:".^\\wedge",unaryPlus:"+",unaryMinus:"-",bitNot:"\\~",not:"\\neg",multiply:"\\cdot",divide:"\\frac",dotMultiply:".\\cdot",dotDivide:".:",mod:"\\mod",add:"+",subtract:"-",to:"\\rightarrow",leftShift:"<<",rightArithShift:">>",rightLogShift:">>>",equal:"=",unequal:"\\neq",smaller:"<",larger:">",smallerEq:"\\leq",largerEq:"\\geq",bitAnd:"\\&",bitXor:"\\underline{|}",bitOr:"|",and:"\\wedge",xor:"\\veebar",or:"\\vee"},Ma={abs:{1:"\\left|${args[0]}\\right|"},add:{2:"\\left(${args[0]}".concat(Na.add,"${args[1]}\\right)")},cbrt:{1:"\\sqrt[3]{${args[0]}}"},ceil:{1:"\\left\\lceil${args[0]}\\right\\rceil"},cube:{1:"\\left(${args[0]}\\right)^3"},divide:{2:"\\frac{${args[0]}}{${args[1]}}"},dotDivide:{2:"\\left(${args[0]}".concat(Na.dotDivide,"${args[1]}\\right)")},dotMultiply:{2:"\\left(${args[0]}".concat(Na.dotMultiply,"${args[1]}\\right)")},dotPow:{2:"\\left(${args[0]}".concat(Na.dotPow,"${args[1]}\\right)")},exp:{1:"\\exp\\left(${args[0]}\\right)"},expm1:"\\left(e".concat(Na.pow,"{${args[0]}}-1\\right)"),fix:{1:"\\mathrm{${name}}\\left(${args[0]}\\right)"},floor:{1:"\\left\\lfloor${args[0]}\\right\\rfloor"},gcd:"\\gcd\\left(${args}\\right)",hypot:"\\hypot\\left(${args}\\right)",log:{1:"\\ln\\left(${args[0]}\\right)",2:"\\log_{${args[1]}}\\left(${args[0]}\\right)"},log10:{1:"\\log_{10}\\left(${args[0]}\\right)"},log1p:{1:"\\ln\\left(${args[0]}+1\\right)",2:"\\log_{${args[1]}}\\left(${args[0]}+1\\right)"},log2:"\\log_{2}\\left(${args[0]}\\right)",mod:{2:"\\left(${args[0]}".concat(Na.mod,"${args[1]}\\right)")},multiply:{2:"\\left(${args[0]}".concat(Na.multiply,"${args[1]}\\right)")},norm:{1:"\\left\\|${args[0]}\\right\\|",2:void 0},nthRoot:{2:"\\sqrt[${args[1]}]{${args[0]}}"},nthRoots:{2:"\\{y : $y^{args[1]} = {${args[0]}}\\}"},pow:{2:"\\left(${args[0]}\\right)".concat(Na.pow,"{${args[1]}}")},round:{1:"\\left\\lfloor${args[0]}\\right\\rceil",2:void 0},sign:{1:"\\mathrm{${name}}\\left(${args[0]}\\right)"},sqrt:{1:"\\sqrt{${args[0]}}"},square:{1:"\\left(${args[0]}\\right)^2"},subtract:{2:"\\left(${args[0]}".concat(Na.subtract,"${args[1]}\\right)")},unaryMinus:{1:"".concat(Na.unaryMinus,"\\left(${args[0]}\\right)")},unaryPlus:{1:"".concat(Na.unaryPlus,"\\left(${args[0]}\\right)")},bitAnd:{2:"\\left(${args[0]}".concat(Na.bitAnd,"${args[1]}\\right)")},bitNot:{1:Na.bitNot+"\\left(${args[0]}\\right)"},bitOr:{2:"\\left(${args[0]}".concat(Na.bitOr,"${args[1]}\\right)")},bitXor:{2:"\\left(${args[0]}".concat(Na.bitXor,"${args[1]}\\right)")},leftShift:{2:"\\left(${args[0]}".concat(Na.leftShift,"${args[1]}\\right)")},rightArithShift:{2:"\\left(${args[0]}".concat(Na.rightArithShift,"${args[1]}\\right)")},rightLogShift:{2:"\\left(${args[0]}".concat(Na.rightLogShift,"${args[1]}\\right)")},bellNumbers:{1:"\\mathrm{B}_{${args[0]}}"},catalan:{1:"\\mathrm{C}_{${args[0]}}"},stirlingS2:{2:"\\mathrm{S}\\left(${args}\\right)"},arg:{1:"\\arg\\left(${args[0]}\\right)"},conj:{1:"\\left(${args[0]}\\right)^*"},im:{1:"\\Im\\left\\lbrace${args[0]}\\right\\rbrace"},re:{1:"\\Re\\left\\lbrace${args[0]}\\right\\rbrace"},and:{2:"\\left(${args[0]}".concat(Na.and,"${args[1]}\\right)")},not:{1:Na.not+"\\left(${args[0]}\\right)"},or:{2:"\\left(${args[0]}".concat(Na.or,"${args[1]}\\right)")},xor:{2:"\\left(${args[0]}".concat(Na.xor,"${args[1]}\\right)")},cross:{2:"\\left(${args[0]}\\right)\\times\\left(${args[1]}\\right)"},ctranspose:{1:"\\left(${args[0]}\\right)".concat(Na.ctranspose)},det:{1:"\\det\\left(${args[0]}\\right)"},dot:{2:"\\left(${args[0]}\\cdot${args[1]}\\right)"},expm:{1:"\\exp\\left(${args[0]}\\right)"},inv:{1:"\\left(${args[0]}\\right)^{-1}"},sqrtm:{1:"{${args[0]}}".concat(Na.pow,"{\\frac{1}{2}}")},trace:{1:"\\mathrm{tr}\\left(${args[0]}\\right)"},transpose:{1:"\\left(${args[0]}\\right)".concat(Na.transpose)},combinations:{2:"\\binom{${args[0]}}{${args[1]}}"},combinationsWithRep:{2:"\\left(\\!\\!{\\binom{${args[0]}}{${args[1]}}}\\!\\!\\right)"},factorial:{1:"\\left(${args[0]}\\right)".concat(Na.factorial)},gamma:{1:"\\Gamma\\left(${args[0]}\\right)"},equal:{2:"\\left(${args[0]}".concat(Na.equal,"${args[1]}\\right)")},larger:{2:"\\left(${args[0]}".concat(Na.larger,"${args[1]}\\right)")},largerEq:{2:"\\left(${args[0]}".concat(Na.largerEq,"${args[1]}\\right)")},smaller:{2:"\\left(${args[0]}".concat(Na.smaller,"${args[1]}\\right)")},smallerEq:{2:"\\left(${args[0]}".concat(Na.smallerEq,"${args[1]}\\right)")},unequal:{2:"\\left(${args[0]}".concat(Na.unequal,"${args[1]}\\right)")},erf:{1:"erf\\left(${args[0]}\\right)"},max:"\\max\\left(${args}\\right)",min:"\\min\\left(${args}\\right)",variance:"\\mathrm{Var}\\left(${args}\\right)",acos:{1:"\\cos^{-1}\\left(${args[0]}\\right)"},acosh:{1:"\\cosh^{-1}\\left(${args[0]}\\right)"},acot:{1:"\\cot^{-1}\\left(${args[0]}\\right)"},acoth:{1:"\\coth^{-1}\\left(${args[0]}\\right)"},acsc:{1:"\\csc^{-1}\\left(${args[0]}\\right)"},acsch:{1:"\\mathrm{csch}^{-1}\\left(${args[0]}\\right)"},asec:{1:"\\sec^{-1}\\left(${args[0]}\\right)"},asech:{1:"\\mathrm{sech}^{-1}\\left(${args[0]}\\right)"},asin:{1:"\\sin^{-1}\\left(${args[0]}\\right)"},asinh:{1:"\\sinh^{-1}\\left(${args[0]}\\right)"},atan:{1:"\\tan^{-1}\\left(${args[0]}\\right)"},atan2:{2:"\\mathrm{atan2}\\left(${args}\\right)"},atanh:{1:"\\tanh^{-1}\\left(${args[0]}\\right)"},cos:{1:"\\cos\\left(${args[0]}\\right)"},cosh:{1:"\\cosh\\left(${args[0]}\\right)"},cot:{1:"\\cot\\left(${args[0]}\\right)"},coth:{1:"\\coth\\left(${args[0]}\\right)"},csc:{1:"\\csc\\left(${args[0]}\\right)"},csch:{1:"\\mathrm{csch}\\left(${args[0]}\\right)"},sec:{1:"\\sec\\left(${args[0]}\\right)"},sech:{1:"\\mathrm{sech}\\left(${args[0]}\\right)"},sin:{1:"\\sin\\left(${args[0]}\\right)"},sinh:{1:"\\sinh\\left(${args[0]}\\right)"},tan:{1:"\\tan\\left(${args[0]}\\right)"},tanh:{1:"\\tanh\\left(${args[0]}\\right)"},to:{2:"\\left(${args[0]}".concat(Na.to,"${args[1]}\\right)")},numeric:function(t){return t.args[0].toTex()},number:{0:"0",1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)${args[1]}\\right)"},string:{0:'\\mathtt{""}',1:"\\mathrm{string}\\left(${args[0]}\\right)"},bignumber:{0:"0",1:"\\left(${args[0]}\\right)"},complex:{0:"0",1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)+".concat(Oa.i,"\\cdot\\left(${args[1]}\\right)\\right)")},matrix:{0:"\\begin{bmatrix}\\end{bmatrix}",1:"\\left(${args[0]}\\right)",2:"\\left(${args[0]}\\right)"},sparse:{0:"\\begin{bsparse}\\end{bsparse}",1:"\\left(${args[0]}\\right)"},unit:{1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)${args[1]}\\right)"}},Ea={deg:"^\\circ"};function ka(t){return Sa()(t,{preserveFormatting:!0})}function Ca(t,e){return(e=void 0!==e&&e)?Object(k.f)(Ea,t)?Ea[t]:"\\mathrm{"+ka(t)+"}":Object(k.f)(Oa,t)?Oa[t]:ka(t)}var Ta=Object(s.a)("ConstantNode",["Node"],(function(t){var e=t.Node;function n(t){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");this.value=t}return(n.prototype=new e).type="ConstantNode",n.prototype.isConstantNode=!0,n.prototype._compile=function(t,e){var n=this.value;return function(){return n}},n.prototype.forEach=function(t){},n.prototype.map=function(t){return this.clone()},n.prototype.clone=function(){return new n(this.value)},n.prototype._toString=function(t){return Object(E.d)(this.value,t)},n.prototype.toHTML=function(t){var e=this._toString(t);switch(Object(r.M)(this.value)){case"number":case"BigNumber":case"Fraction":return'<span class="math-number">'+e+"</span>";case"string":return'<span class="math-string">'+e+"</span>";case"boolean":return'<span class="math-boolean">'+e+"</span>";case"null":return'<span class="math-null-symbol">'+e+"</span>";case"undefined":return'<span class="math-undefined">'+e+"</span>";default:return'<span class="math-symbol">'+e+"</span>"}},n.prototype.toJSON=function(){return{mathjs:"ConstantNode",value:this.value}},n.fromJSON=function(t){return new n(t.value)},n.prototype._toTex=function(t){var e=this._toString(t);switch(Object(r.M)(this.value)){case"string":return"\\mathtt{"+ka(e)+"}";case"number":case"BigNumber":if(!isFinite(this.value))return this.value.valueOf()<0?"-\\infty":"\\infty";var n=e.toLowerCase().indexOf("e");return-1!==n?e.substring(0,n)+"\\cdot10^{"+e.substring(n+1)+"}":e;case"Fraction":return this.value.toLatex();default:return e}},n}),{isClass:!0,isNode:!0}),Da=Object(s.a)("FunctionAssignmentNode",["typed","Node"],(function(t){var e=t.typed,n=t.Node;function i(t,e,n){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");if("string"!=typeof t)throw new TypeError('String expected for parameter "name"');if(!Array.isArray(e))throw new TypeError('Array containing strings or objects expected for parameter "params"');if(!Object(r.w)(n))throw new TypeError('Node expected for parameter "expr"');if(t in aa)throw new Error('Illegal function name, "'+t+'" is a reserved keyword');this.name=t,this.params=e.map((function(t){return t&&t.name||t})),this.types=e.map((function(t){return t&&t.type||"any"})),this.expr=n}function o(t,e){var n=ga(t,e),r=ga(t.expr,e);return"all"===e||null!==r&&r<=n}return(i.prototype=new n).type="FunctionAssignmentNode",i.prototype.isFunctionAssignmentNode=!0,i.prototype._compile=function(t,n){var r=Object.create(n);Object(M.f)(this.params,(function(t){r[t]=!0}));var i=this.expr._compile(t,r),o=this.name,a=this.params,s=Object(M.j)(this.types,","),u=o+"("+Object(M.j)(this.params,", ")+")";return function(t,n,r){var l={};l[s]=function(){for(var e=Object.create(n),o=0;o<a.length;o++)e[a[o]]=arguments[o];return i(t,e,r)};var c=e(o,l);return c.syntax=u,Gn(t,o,c),c}},i.prototype.forEach=function(t){t(this.expr,"expr",this)},i.prototype.map=function(t){var e=this._ifNode(t(this.expr,"expr",this));return new i(this.name,this.params.slice(0),e)},i.prototype.clone=function(){return new i(this.name,this.params.slice(0),this.expr)},i.prototype._toString=function(t){var e=t&&t.parenthesis?t.parenthesis:"keep",n=this.expr.toString(t);return o(this,e)&&(n="("+n+")"),this.name+"("+this.params.join(", ")+") = "+n},i.prototype.toJSON=function(){var t=this.types;return{mathjs:"FunctionAssignmentNode",name:this.name,params:this.params.map((function(e,n){return{name:e,type:t[n]}})),expr:this.expr}},i.fromJSON=function(t){return new i(t.name,t.params,t.expr)},i.prototype.toHTML=function(t){for(var e=t&&t.parenthesis?t.parenthesis:"keep",n=[],r=0;r<this.params.length;r++)n.push('<span class="math-symbol math-parameter">'+Object(E.c)(this.params[r])+"</span>");var i=this.expr.toHTML(t);return o(this,e)&&(i='<span class="math-parenthesis math-round-parenthesis">(</span>'+i+'<span class="math-parenthesis math-round-parenthesis">)</span>'),'<span class="math-function">'+Object(E.c)(this.name)+'</span><span class="math-parenthesis math-round-parenthesis">(</span>'+n.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-round-parenthesis">)</span><span class="math-operator math-assignment-operator math-variable-assignment-operator math-binary-operator">=</span>'+i},i.prototype._toTex=function(t){var e=t&&t.parenthesis?t.parenthesis:"keep",n=this.expr.toTex(t);return o(this,e)&&(n="\\left(".concat(n,"\\right)")),"\\mathrm{"+this.name+"}\\left("+this.params.map(Ca).join(",")+"\\right):="+n},i}),{isClass:!0,isNode:!0});function Aa(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var ja=Object(s.a)("IndexNode",["Range","Node","size"],(function(t){var e=t.Range,n=t.Node,i=t.size;function o(t,e){if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");if(this.dimensions=t,this.dotNotation=e||!1,!Array.isArray(t)||!t.every(r.w))throw new TypeError('Array containing Nodes expected for parameter "dimensions"');if(this.dotNotation&&!this.isObjectProperty())throw new Error("dotNotation only applicable for object properties")}function a(t,n,i){return new e(Object(r.e)(t)?t.toNumber():t,Object(r.e)(n)?n.toNumber():n,Object(r.e)(i)?i.toNumber():i)}return(o.prototype=new n).type="IndexNode",o.prototype.isIndexNode=!0,o.prototype._compile=function(t,e){var n=Object(M.k)(this.dimensions,(function(n,o){if(Object(r.E)(n)){if(n.needsEnd()){var s=Object.create(e);s.end=!0;var u=n.start._compile(t,s),l=n.end._compile(t,s),c=n.step?n.step._compile(t,s):function(){return 1};return function(t,e,n){var r=i(n).valueOf(),s=Object.create(e);return s.end=r[o],a(u(t,s,n),l(t,s,n),c(t,s,n))}}var f=n.start._compile(t,e),h=n.end._compile(t,e),d=n.step?n.step._compile(t,e):function(){return 1};return function(t,e,n){return a(f(t,e,n),h(t,e,n),d(t,e,n))}}if(Object(r.J)(n)&&"end"===n.name){var p=Object.create(e);p.end=!0;var m=n._compile(t,p);return function(t,e,n){var r=i(n).valueOf(),a=Object.create(e);return a.end=r[o],m(t,a,n)}}var g=n._compile(t,e);return function(t,e,n){return g(t,e,n)}})),o=Zn(t,"index");return function(t,e,r){var i=Object(M.k)(n,(function(n){return n(t,e,r)}));return o.apply(void 0,function(t){return function(t){if(Array.isArray(t))return Aa(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Aa(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Aa(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(i))}},o.prototype.forEach=function(t){for(var e=0;e<this.dimensions.length;e++)t(this.dimensions[e],"dimensions["+e+"]",this)},o.prototype.map=function(t){for(var e=[],n=0;n<this.dimensions.length;n++)e[n]=this._ifNode(t(this.dimensions[n],"dimensions["+n+"]",this));return new o(e,this.dotNotation)},o.prototype.clone=function(){return new o(this.dimensions.slice(0),this.dotNotation)},o.prototype.isObjectProperty=function(){return 1===this.dimensions.length&&Object(r.l)(this.dimensions[0])&&"string"==typeof this.dimensions[0].value},o.prototype.getObjectProperty=function(){return this.isObjectProperty()?this.dimensions[0].value:null},o.prototype._toString=function(t){return this.dotNotation?"."+this.getObjectProperty():"["+this.dimensions.join(", ")+"]"},o.prototype.toJSON=function(){return{mathjs:"IndexNode",dimensions:this.dimensions,dotNotation:this.dotNotation}},o.fromJSON=function(t){return new o(t.dimensions,t.dotNotation)},o.prototype.toHTML=function(t){for(var e=[],n=0;n<this.dimensions.length;n++)e[n]=this.dimensions[n].toHTML();return this.dotNotation?'<span class="math-operator math-accessor-operator">.</span><span class="math-symbol math-property">'+Object(E.c)(this.getObjectProperty())+"</span>":'<span class="math-parenthesis math-square-parenthesis">[</span>'+e.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-square-parenthesis">]</span>'},o.prototype._toTex=function(t){var e=this.dimensions.map((function(e){return e.toTex(t)}));return this.dotNotation?"."+this.getObjectProperty():"_{"+e.join(",")+"}"},o}),{isClass:!0,isNode:!0});function Pa(t){return(Pa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var Ia=Object(s.a)("ObjectNode",["Node"],(function(t){var e=t.Node;function n(t){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(this.properties=t||{},t&&("object"!==Pa(t)||!Object.keys(t).every((function(e){return Object(r.w)(t[e])}))))throw new TypeError("Object containing Nodes expected")}return(n.prototype=new e).type="ObjectNode",n.prototype.isObjectNode=!0,n.prototype._compile=function(t,e){var n={};for(var r in this.properties)if(Object(k.f)(this.properties,r)){var i=Object(E.e)(r),o=JSON.parse(i);if(!Kn(this.properties,o))throw new Error('No access to property "'+o+'"');n[o]=this.properties[r]._compile(t,e)}return function(t,e,r){var i={};for(var o in n)Object(k.f)(n,o)&&(i[o]=n[o](t,e,r));return i}},n.prototype.forEach=function(t){for(var e in this.properties)Object(k.f)(this.properties,e)&&t(this.properties[e],"properties["+Object(E.e)(e)+"]",this)},n.prototype.map=function(t){var e={};for(var r in this.properties)Object(k.f)(this.properties,r)&&(e[r]=this._ifNode(t(this.properties[r],"properties["+Object(E.e)(r)+"]",this)));return new n(e)},n.prototype.clone=function(){var t={};for(var e in this.properties)Object(k.f)(this.properties,e)&&(t[e]=this.properties[e]);return new n(t)},n.prototype._toString=function(t){var e=[];for(var n in this.properties)Object(k.f)(this.properties,n)&&e.push(Object(E.e)(n)+": "+this.properties[n].toString(t));return"{"+e.join(", ")+"}"},n.prototype.toJSON=function(){return{mathjs:"ObjectNode",properties:this.properties}},n.fromJSON=function(t){return new n(t.properties)},n.prototype.toHTML=function(t){var e=[];for(var n in this.properties)Object(k.f)(this.properties,n)&&e.push('<span class="math-symbol math-property">'+Object(E.c)(n)+'</span><span class="math-operator math-assignment-operator math-property-assignment-operator math-binary-operator">:</span>'+this.properties[n].toHTML(t));return'<span class="math-parenthesis math-curly-parenthesis">{</span>'+e.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-curly-parenthesis">}</span>'},n.prototype._toTex=function(t){var e=[];for(var n in this.properties)Object(k.f)(this.properties,n)&&e.push("\\mathbf{"+n+":} & "+this.properties[n].toTex(t)+"\\\\");return"\\left\\{\\begin{array}{ll}".concat(e.join("\n"),"\\end{array}\\right\\}")},n}),{isClass:!0,isNode:!0}),Ra=Object(s.a)("OperatorNode",["Node"],(function(t){var e=t.Node;function n(t,e,i,o){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if("string"!=typeof t)throw new TypeError('string expected for parameter "op"');if("string"!=typeof e)throw new TypeError('string expected for parameter "fn"');if(!Array.isArray(i)||!i.every(r.w))throw new TypeError('Array containing Nodes expected for parameter "args"');this.implicit=!0===o,this.op=t,this.fn=e,this.args=i||[]}function i(t,e,n,r,i){var o,a=ga(t,e),s=va(t,e);if("all"===e||2<r.length&&"OperatorNode:add"!==t.getIdentifier()&&"OperatorNode:multiply"!==t.getIdentifier())return r.map((function(t){switch(t.getContent().type){case"ArrayNode":case"ConstantNode":case"SymbolNode":case"ParenthesisNode":return!1;default:return!0}}));switch(r.length){case 0:o=[];break;case 1:var u=ga(r[0],e);if(i&&null!==u){var l,c="keep"===e?(l=r[0].getIdentifier(),t.getIdentifier()):(l=r[0].getContent().getIdentifier(),t.getContent().getIdentifier());if(!1===ma[a][c].latexLeftParens){o=[!1];break}if(!1===ma[u][l].latexParens){o=[!1];break}}if(null===u){o=[!1];break}if(u<=a){o=[!0];break}o=[!1];break;case 2:var f,h,d,p=ga(r[0],e),m=ya(t,r[0],e),g=null!==p&&(p===a&&"right"===s&&!m||p<a),v=ga(r[1],e),y=ya(t,r[1],e),b=null!==v&&(v===a&&"left"===s&&!y||v<a);i&&(d="keep"===e?(f=t.getIdentifier(),h=t.args[0].getIdentifier(),t.args[1].getIdentifier()):(f=t.getContent().getIdentifier(),h=t.args[0].getContent().getIdentifier(),t.args[1].getContent().getIdentifier()),null!==p&&(!1===ma[a][f].latexLeftParens&&(g=!1),!1===ma[p][h].latexParens&&(g=!1)),null!==v&&(!1===ma[a][f].latexRightParens&&(b=!1),!1===ma[v][d].latexParens&&(b=!1))),o=[g,b];break;default:"OperatorNode:add"!==t.getIdentifier()&&"OperatorNode:multiply"!==t.getIdentifier()||(o=r.map((function(n){var r=ga(n,e),i=ya(t,n,e),o=va(n,e);return null!==r&&(a===r&&s===o&&!i||r<a)})))}return 2<=r.length&&"OperatorNode:multiply"===t.getIdentifier()&&t.implicit&&"auto"===e&&"hide"===n&&(o=r.map((function(t,e){var n="ParenthesisNode"===t.getIdentifier();return!(!o[e]&&!n)}))),o}return(n.prototype=new e).type="OperatorNode",n.prototype.isOperatorNode=!0,n.prototype._compile=function(t,e){if("string"!=typeof this.fn||!Xn(t,this.fn))throw t[this.fn]?new Error('No access to function "'+this.fn+'"'):new Error("Function "+this.fn+' missing in provided namespace "math"');var n=Zn(t,this.fn),r=Object(M.k)(this.args,(function(n){return n._compile(t,e)}));if(1===r.length){var i=r[0];return function(t,e,r){return n(i(t,e,r))}}if(2!==r.length)return function(t,e,i){return n.apply(null,Object(M.k)(r,(function(n){return n(t,e,i)})))};var o=r[0],a=r[1];return function(t,e,r){return n(o(t,e,r),a(t,e,r))}},n.prototype.forEach=function(t){for(var e=0;e<this.args.length;e++)t(this.args[e],"args["+e+"]",this)},n.prototype.map=function(t){for(var e=[],r=0;r<this.args.length;r++)e[r]=this._ifNode(t(this.args[r],"args["+r+"]",this));return new n(this.op,this.fn,e,this.implicit)},n.prototype.clone=function(){return new n(this.op,this.fn,this.args.slice(0),this.implicit)},n.prototype.isUnary=function(){return 1===this.args.length},n.prototype.isBinary=function(){return 2===this.args.length},n.prototype._toString=function(t){var e=t&&t.parenthesis?t.parenthesis:"keep",n=t&&t.implicit?t.implicit:"hide",r=this.args,o=i(this,e,n,r,!1);if(1===r.length){var a=va(this,e),s=r[0].toString(t);o[0]&&(s="("+s+")");var u=/[a-zA-Z]+/.test(this.op);return"right"===a?this.op+(u?" ":"")+s:"left"===a?s+(u?" ":"")+this.op:s+this.op}if(2===r.length){var l=r[0].toString(t),c=r[1].toString(t);return o[0]&&(l="("+l+")"),o[1]&&(c="("+c+")"),this.implicit&&"OperatorNode:multiply"===this.getIdentifier()&&"hide"===n?l+" "+c:l+" "+this.op+" "+c}if(2<r.length&&("OperatorNode:add"===this.getIdentifier()||"OperatorNode:multiply"===this.getIdentifier())){var f=r.map((function(e,n){return e=e.toString(t),o[n]&&(e="("+e+")"),e}));return this.implicit&&"OperatorNode:multiply"===this.getIdentifier()&&"hide"===n?f.join(" "):f.join(" "+this.op+" ")}return this.fn+"("+this.args.join(", ")+")"},n.prototype.toJSON=function(){return{mathjs:"OperatorNode",op:this.op,fn:this.fn,args:this.args,implicit:this.implicit}},n.fromJSON=function(t){return new n(t.op,t.fn,t.args,t.implicit)},n.prototype.toHTML=function(t){var e=t&&t.parenthesis?t.parenthesis:"keep",n=t&&t.implicit?t.implicit:"hide",r=this.args,o=i(this,e,n,r,!1);if(1===r.length){var a=va(this,e),s=r[0].toHTML(t);return o[0]&&(s='<span class="math-parenthesis math-round-parenthesis">(</span>'+s+'<span class="math-parenthesis math-round-parenthesis">)</span>'),"right"===a?'<span class="math-operator math-unary-operator math-lefthand-unary-operator">'+Object(E.c)(this.op)+"</span>"+s:s+'<span class="math-operator math-unary-operator math-righthand-unary-operator">'+Object(E.c)(this.op)+"</span>"}if(2===r.length){var u=r[0].toHTML(t),l=r[1].toHTML(t);return o[0]&&(u='<span class="math-parenthesis math-round-parenthesis">(</span>'+u+'<span class="math-parenthesis math-round-parenthesis">)</span>'),o[1]&&(l='<span class="math-parenthesis math-round-parenthesis">(</span>'+l+'<span class="math-parenthesis math-round-parenthesis">)</span>'),this.implicit&&"OperatorNode:multiply"===this.getIdentifier()&&"hide"===n?u+'<span class="math-operator math-binary-operator math-implicit-binary-operator"></span>'+l:u+'<span class="math-operator math-binary-operator math-explicit-binary-operator">'+Object(E.c)(this.op)+"</span>"+l}var c=r.map((function(e,n){return e=e.toHTML(t),o[n]&&(e='<span class="math-parenthesis math-round-parenthesis">(</span>'+e+'<span class="math-parenthesis math-round-parenthesis">)</span>'),e}));return 2<r.length&&("OperatorNode:add"===this.getIdentifier()||"OperatorNode:multiply"===this.getIdentifier())?this.implicit&&"OperatorNode:multiply"===this.getIdentifier()&&"hide"===n?c.join('<span class="math-operator math-binary-operator math-implicit-binary-operator"></span>'):c.join('<span class="math-operator math-binary-operator math-explicit-binary-operator">'+Object(E.c)(this.op)+"</span>"):'<span class="math-function">'+Object(E.c)(this.fn)+'</span><span class="math-paranthesis math-round-parenthesis">(</span>'+c.join('<span class="math-separator">,</span>')+'<span class="math-paranthesis math-round-parenthesis">)</span>'},n.prototype._toTex=function(t){var e=t&&t.parenthesis?t.parenthesis:"keep",n=t&&t.implicit?t.implicit:"hide",r=this.args,o=i(this,e,n,r,!0),a=void 0===(a=Na[this.fn])?this.op:a;if(1===r.length){var s=va(this,e),u=r[0].toTex(t);return o[0]&&(u="\\left(".concat(u,"\\right)")),"right"===s?a+u:u+a}if(2===r.length){var l=r[0],c=l.toTex(t);o[0]&&(c="\\left(".concat(c,"\\right)"));var f,h=r[1].toTex(t);switch(o[1]&&(h="\\left(".concat(h,"\\right)")),f="keep"===e?l.getIdentifier():l.getContent().getIdentifier(),this.getIdentifier()){case"OperatorNode:divide":return a+"{"+c+"}{"+h+"}";case"OperatorNode:pow":switch(c="{"+c+"}",h="{"+h+"}",f){case"ConditionalNode":case"OperatorNode:divide":c="\\left(".concat(c,"\\right)")}break;case"OperatorNode:multiply":if(this.implicit&&"hide"===n)return c+"~"+h}return c+a+h}if(2<r.length&&("OperatorNode:add"===this.getIdentifier()||"OperatorNode:multiply"===this.getIdentifier())){var d=r.map((function(e,n){return e=e.toTex(t),o[n]&&(e="\\left(".concat(e,"\\right)")),e}));return"OperatorNode:multiply"===this.getIdentifier()&&this.implicit?d.join("~"):d.join(a)}return"\\mathrm{"+this.fn+"}\\left("+r.map((function(e){return e.toTex(t)})).join(",")+"\\right)"},n.prototype.getIdentifier=function(){return this.type+":"+this.fn},n}),{isClass:!0,isNode:!0}),La=Object(s.a)("ParenthesisNode",["Node"],(function(t){var e=t.Node;function n(t){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(!Object(r.w)(t))throw new TypeError('Node expected for parameter "content"');this.content=t}return(n.prototype=new e).type="ParenthesisNode",n.prototype.isParenthesisNode=!0,n.prototype._compile=function(t,e){return this.content._compile(t,e)},n.prototype.getContent=function(){return this.content.getContent()},n.prototype.forEach=function(t){t(this.content,"content",this)},n.prototype.map=function(t){return new n(t(this.content,"content",this))},n.prototype.clone=function(){return new n(this.content)},n.prototype._toString=function(t){return!t||t&&!t.parenthesis||t&&"keep"===t.parenthesis?"("+this.content.toString(t)+")":this.content.toString(t)},n.prototype.toJSON=function(){return{mathjs:"ParenthesisNode",content:this.content}},n.fromJSON=function(t){return new n(t.content)},n.prototype.toHTML=function(t){return!t||t&&!t.parenthesis||t&&"keep"===t.parenthesis?'<span class="math-parenthesis math-round-parenthesis">(</span>'+this.content.toHTML(t)+'<span class="math-parenthesis math-round-parenthesis">)</span>':this.content.toHTML(t)},n.prototype._toTex=function(t){return!t||t&&!t.parenthesis||t&&"keep"===t.parenthesis?"\\left(".concat(this.content.toTex(t),"\\right)"):this.content.toTex(t)},n}),{isClass:!0,isNode:!0}),Fa=Object(s.a)("RangeNode",["Node"],(function(t){var e=t.Node;function n(t,e,i){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(!Object(r.w)(t))throw new TypeError("Node expected");if(!Object(r.w)(e))throw new TypeError("Node expected");if(i&&!Object(r.w)(i))throw new TypeError("Node expected");if(3<arguments.length)throw new Error("Too many arguments");this.start=t,this.end=e,this.step=i||null}function i(t,e){var n,r=ga(t,e),i={},o=ga(t.start,e);i.start=null!==o&&o<=r||"all"===e,t.step&&(n=ga(t.step,e),i.step=null!==n&&n<=r||"all"===e);var a=ga(t.end,e);return i.end=null!==a&&a<=r||"all"===e,i}return(n.prototype=new e).type="RangeNode",n.prototype.isRangeNode=!0,n.prototype.needsEnd=function(){return 0<this.filter((function(t){return Object(r.J)(t)&&"end"===t.name})).length},n.prototype._compile=function(t,e){var n=t.range,r=this.start._compile(t,e),i=this.end._compile(t,e);if(this.step){var o=this.step._compile(t,e);return function(t,e,a){return n(r(t,e,a),i(t,e,a),o(t,e,a))}}return function(t,e,o){return n(r(t,e,o),i(t,e,o))}},n.prototype.forEach=function(t){t(this.start,"start",this),t(this.end,"end",this),this.step&&t(this.step,"step",this)},n.prototype.map=function(t){return new n(this._ifNode(t(this.start,"start",this)),this._ifNode(t(this.end,"end",this)),this.step&&this._ifNode(t(this.step,"step",this)))},n.prototype.clone=function(){return new n(this.start,this.end,this.step&&this.step)},n.prototype._toString=function(t){var e,n,r=i(this,t&&t.parenthesis?t.parenthesis:"keep"),o=this.start.toString(t);r.start&&(o="("+o+")"),e=o,this.step&&(n=this.step.toString(t),r.step&&(n="("+n+")"),e+=":"+n);var a=this.end.toString(t);return r.end&&(a="("+a+")"),e+":"+a},n.prototype.toJSON=function(){return{mathjs:"RangeNode",start:this.start,end:this.end,step:this.step}},n.fromJSON=function(t){return new n(t.start,t.end,t.step)},n.prototype.toHTML=function(t){var e,n,r=i(this,t&&t.parenthesis?t.parenthesis:"keep"),o=this.start.toHTML(t);r.start&&(o='<span class="math-parenthesis math-round-parenthesis">(</span>'+o+'<span class="math-parenthesis math-round-parenthesis">)</span>'),e=o,this.step&&(n=this.step.toHTML(t),r.step&&(n='<span class="math-parenthesis math-round-parenthesis">(</span>'+n+'<span class="math-parenthesis math-round-parenthesis">)</span>'),e+='<span class="math-operator math-range-operator">:</span>'+n);var a=this.end.toHTML(t);return r.end&&(a='<span class="math-parenthesis math-round-parenthesis">(</span>'+a+'<span class="math-parenthesis math-round-parenthesis">)</span>'),e+'<span class="math-operator math-range-operator">:</span>'+a},n.prototype._toTex=function(t){var e,n=i(this,t&&t.parenthesis?t.parenthesis:"keep"),r=this.start.toTex(t);n.start&&(r="\\left(".concat(r,"\\right)")),this.step&&(e=this.step.toTex(t),n.step&&(e="\\left(".concat(e,"\\right)")),r+=":"+e);var o=this.end.toTex(t);return n.end&&(o="\\left(".concat(o,"\\right)")),r+":"+o},n}),{isClass:!0,isNode:!0}),qa=Object(s.a)("RelationalNode",["Node"],(function(t){var e=t.Node;function n(t,e){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(!Array.isArray(t))throw new TypeError("Parameter conditionals must be an array");if(!Array.isArray(e))throw new TypeError("Parameter params must be an array");if(t.length!==e.length-1)throw new TypeError("Parameter params must contain exactly one more element than parameter conditionals");this.conditionals=t,this.params=e}return(n.prototype=new e).type="RelationalNode",n.prototype.isRelationalNode=!0,n.prototype._compile=function(t,e){var n=this,r=this.params.map((function(n){return n._compile(t,e)}));return function(e,i,o){for(var a=r[0](e,i,o),s=0;s<n.conditionals.length;s++){var u=a;if(a=r[s+1](e,i,o),!Zn(t,n.conditionals[s])(u,a))return!1}return!0}},n.prototype.forEach=function(t){var e=this;this.params.forEach((function(n,r){return t(n,"params["+r+"]",e)}),this)},n.prototype.map=function(t){var e=this;return new n(this.conditionals.slice(),this.params.map((function(n,r){return e._ifNode(t(n,"params["+r+"]",e))}),this))},n.prototype.clone=function(){return new n(this.conditionals,this.params)},n.prototype._toString=function(t){for(var e=t&&t.parenthesis?t.parenthesis:"keep",n=ga(this,e),r=this.params.map((function(r,i){var o=ga(r,e);return"all"===e||null!==o&&o<=n?"("+r.toString(t)+")":r.toString(t)})),i={equal:"==",unequal:"!=",smaller:"<",larger:">",smallerEq:"<=",largerEq:">="},o=r[0],a=0;a<this.conditionals.length;a++)o+=" "+i[this.conditionals[a]]+" "+r[a+1];return o},n.prototype.toJSON=function(){return{mathjs:"RelationalNode",conditionals:this.conditionals,params:this.params}},n.fromJSON=function(t){return new n(t.conditionals,t.params)},n.prototype.toHTML=function(t){for(var e=t&&t.parenthesis?t.parenthesis:"keep",n=ga(this,e),r=this.params.map((function(r,i){var o=ga(r,e);return"all"===e||null!==o&&o<=n?'<span class="math-parenthesis math-round-parenthesis">(</span>'+r.toHTML(t)+'<span class="math-parenthesis math-round-parenthesis">)</span>':r.toHTML(t)})),i={equal:"==",unequal:"!=",smaller:"<",larger:">",smallerEq:"<=",largerEq:">="},o=r[0],a=0;a<this.conditionals.length;a++)o+='<span class="math-operator math-binary-operator math-explicit-binary-operator">'+Object(E.c)(i[this.conditionals[a]])+"</span>"+r[a+1];return o},n.prototype._toTex=function(t){for(var e=t&&t.parenthesis?t.parenthesis:"keep",n=ga(this,e),r=this.params.map((function(r,i){var o=ga(r,e);return"all"===e||null!==o&&o<=n?"\\left("+r.toTex(t)+"\right)":r.toTex(t)})),i=r[0],o=0;o<this.conditionals.length;o++)i+=Na[this.conditionals[o]]+r[o+1];return i},n}),{isClass:!0,isNode:!0}),Ba=Object(s.a)("SymbolNode",["math","?Unit","Node"],(function(t){var e=t.math,n=t.Unit,r=t.Node;function i(t){return!!n&&n.isValuelessUnit(t)}function o(t){if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");if("string"!=typeof t)throw new TypeError('String expected for parameter "name"');this.name=t}return(o.prototype=new r).type="SymbolNode",o.prototype.isSymbolNode=!0,o.prototype._compile=function(t,e){var r=this.name;if(!0===e[r])return function(t,e,n){return e[r]};if(r in t)return function(e,n,i){return Zn(r in e?e:t,r)};var o=i(r);return function(t,e,i){return r in t?Zn(t,r):o?new n(null,r):function(t){throw new Error("Undefined symbol "+t)}(r)}},o.prototype.forEach=function(t){},o.prototype.map=function(t){return this.clone()},o.prototype.clone=function(){return new o(this.name)},o.prototype._toString=function(t){return this.name},o.prototype.toHTML=function(t){var e=Object(E.c)(this.name);return"true"===e||"false"===e?'<span class="math-symbol math-boolean">'+e+"</span>":"i"===e?'<span class="math-symbol math-imaginary-symbol">'+e+"</span>":"Infinity"===e?'<span class="math-symbol math-infinity-symbol">'+e+"</span>":"NaN"===e?'<span class="math-symbol math-nan-symbol">'+e+"</span>":"null"===e?'<span class="math-symbol math-null-symbol">'+e+"</span>":"undefined"===e?'<span class="math-symbol math-undefined-symbol">'+e+"</span>":'<span class="math-symbol">'+e+"</span>"},o.prototype.toJSON=function(){return{mathjs:"SymbolNode",name:this.name}},o.fromJSON=function(t){return new o(t.name)},o.prototype._toTex=function(t){var n=!1;void 0===e[this.name]&&i(this.name)&&(n=!0);var r=Ca(this.name,n);return"\\"===r[0]?r:" "+r},o}),{isClass:!0,isNode:!0});function za(t){return(za="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ha(){return(Ha=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}var Ua=Object(s.a)("FunctionNode",["math","Node","SymbolNode"],(function(t){var e=t.math,n=t.Node,i=t.SymbolNode;function o(t,e){if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");if("string"==typeof t&&(t=new i(t)),!Object(r.w)(t))throw new TypeError('Node expected as parameter "fn"');if(!Array.isArray(e)||!e.every(r.w))throw new TypeError('Array containing Nodes expected for parameter "args"');this.fn=t,this.args=e||[],Object.defineProperty(this,"name",{get:function(){return this.fn.name||""}.bind(this),set:function(){throw new Error("Cannot assign a new name, name is read-only")}})}(o.prototype=new n).type="FunctionNode",o.prototype.isFunctionNode=!0,o.prototype._compile=function(t,e){if(!(this instanceof o))throw new TypeError("No valid FunctionNode");var n=Object(M.k)(this.args,(function(n){return n._compile(t,e)}));if(Object(r.J)(this.fn)){var i=this.fn.name,a=i in t?Zn(t,i):void 0;if("function"==typeof a&&!0===a.rawArgs){var s=this.args;return function(e,n){return(i in e?Zn(e,i):a)(s,t,Ha({},e,n))}}if(1===n.length){var u=n[0];return function(t,e,n){return(i in t?Zn(t,i):a)(u(t,e,n))}}if(2!==n.length)return function(t,e,r){return(i in t?Zn(t,i):a).apply(null,Object(M.k)(n,(function(n){return n(t,e,r)})))};var l=n[0],c=n[1];return function(t,e,n){return(i in t?Zn(t,i):a)(l(t,e,n),c(t,e,n))}}if(Object(r.a)(this.fn)&&Object(r.u)(this.fn.index)&&this.fn.index.isObjectProperty()){var f=this.fn.object._compile(t,e),h=this.fn.index.getObjectProperty(),d=this.args;return function(e,r,i){var o=f(e,r,i);return function(t,e){if(!Xn(t,e))throw new Error('No access to method "'+e+'"')}(o,h),o[h]&&o[h].rawArgs?o[h](d,t,Ha({},e,r)):o[h].apply(o,Object(M.k)(n,(function(t){return t(e,r,i)})))}}var p=this.fn._compile(t,e),m=this.args;return function(e,r,i){var o=p(e,r,i);return o&&o.rawArgs?o(m,t,Ha({},e,r)):o.apply(o,Object(M.k)(n,(function(t){return t(e,r,i)})))}},o.prototype.forEach=function(t){t(this.fn,"fn",this);for(var e=0;e<this.args.length;e++)t(this.args[e],"args["+e+"]",this)},o.prototype.map=function(t){for(var e=this._ifNode(t(this.fn,"fn",this)),n=[],r=0;r<this.args.length;r++)n[r]=this._ifNode(t(this.args[r],"args["+r+"]",this));return new o(e,n)},o.prototype.clone=function(){return new o(this.fn,this.args.slice(0))};var a=o.prototype.toString;function s(t,e,n){for(var i,o="",a=new RegExp("\\$(?:\\{([a-z_][a-z_0-9]*)(?:\\[([0-9]+)\\])?\\}|\\$)","ig"),s=0;null!==(i=a.exec(t));)if(o+=t.substring(s,i.index),s=i.index,"$$"===i[0])o+="$",s++;else{s+=i[0].length;var u=e[i[1]];if(!u)throw new ReferenceError("Template: Property "+i[1]+" does not exist.");if(void 0===i[2])switch(za(u)){case"string":o+=u;break;case"object":if(Object(r.w)(u))o+=u.toTex(n);else{if(!Array.isArray(u))throw new TypeError("Template: "+i[1]+" has to be a Node, String or array of Nodes");o+=u.map((function(t,e){if(Object(r.w)(t))return t.toTex(n);throw new TypeError("Template: "+i[1]+"["+e+"] is not a Node.")})).join(",")}break;default:throw new TypeError("Template: "+i[1]+" has to be a Node, String or array of Nodes")}else{if(!Object(r.w)(u[i[2]]&&u[i[2]]))throw new TypeError("Template: "+i[1]+"["+i[2]+"] is not a Node.");o+=u[i[2]].toTex(n)}}return o+t.slice(s)}o.prototype.toString=function(t){var e,n=this.fn.toString(t);return t&&"object"===za(t.handler)&&Object(k.f)(t.handler,n)&&(e=t.handler[n](this,t)),void 0!==e?e:a.call(this,t)},o.prototype._toString=function(t){var e=this.args.map((function(e){return e.toString(t)}));return(Object(r.q)(this.fn)?"("+this.fn.toString(t)+")":this.fn.toString(t))+"("+e.join(", ")+")"},o.prototype.toJSON=function(){return{mathjs:"FunctionNode",fn:this.fn,args:this.args}},o.fromJSON=function(t){return new o(t.fn,t.args)},o.prototype.toHTML=function(t){var e=this.args.map((function(e){return e.toHTML(t)}));return'<span class="math-function">'+Object(E.c)(this.fn)+'</span><span class="math-paranthesis math-round-parenthesis">(</span>'+e.join('<span class="math-separator">,</span>')+'<span class="math-paranthesis math-round-parenthesis">)</span>'};var u=o.prototype.toTex;return o.prototype.toTex=function(t){var e;return t&&"object"===za(t.handler)&&Object(k.f)(t.handler,this.name)&&(e=t.handler[this.name](this,t)),void 0!==e?e:u.call(this,t)},o.prototype._toTex=function(t){var n,r,i=this.args.map((function(e){return e.toTex(t)}));switch(Ma[this.name]&&(n=Ma[this.name]),!e[this.name]||"function"!=typeof e[this.name].toTex&&"object"!==za(e[this.name].toTex)&&"string"!=typeof e[this.name].toTex||(n=e[this.name].toTex),za(n)){case"function":r=n(this,t);break;case"string":r=s(n,this,t);break;case"object":switch(za(n[i.length])){case"function":r=n[i.length](this,t);break;case"string":r=s(n[i.length],this,t)}}return void 0!==r?r:s("\\mathrm{${name}}\\left(${args}\\right)",this,t)},o.prototype.getIdentifier=function(){return this.type+":"+this.name},o}),{isClass:!0,isNode:!0});function Wa(){return(Wa=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}var Va=Object(s.a)("parse",["typed","numeric","config","AccessorNode","ArrayNode","AssignmentNode","BlockNode","ConditionalNode","ConstantNode","FunctionAssignmentNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","RangeNode","RelationalNode","SymbolNode"],(function(t){var e=t.typed,n=t.numeric,i=t.config,o=t.AccessorNode,a=t.ArrayNode,s=t.AssignmentNode,u=t.BlockNode,l=t.ConditionalNode,c=t.ConstantNode,f=t.FunctionAssignmentNode,h=t.FunctionNode,d=t.IndexNode,p=t.ObjectNode,m=t.OperatorNode,g=t.ParenthesisNode,v=t.RangeNode,y=t.RelationalNode,b=t.SymbolNode,x=e("parse",{string:function(t){return F(t,{})},"Array | Matrix":function(t){return w(t,{})},"string, Object":function(t,e){return F(t,void 0!==e.nodes?e.nodes:{})},"Array | Matrix, Object":w});function w(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=void 0!==e.nodes?e.nodes:{};return I(t,(function(t){if("string"!=typeof t)throw new TypeError("String expected");return F(t,n)}))}var _={NULL:0,DELIMITER:1,NUMBER:2,SYMBOL:3,UNKNOWN:4},S={",":!0,"(":!0,")":!0,"[":!0,"]":!0,"{":!0,"}":!0,'"':!0,"'":!0,";":!0,"+":!0,"-":!0,"*":!0,".*":!0,"/":!0,"./":!0,"%":!0,"^":!0,".^":!0,"~":!0,"!":!0,"&":!0,"|":!0,"^|":!0,"=":!0,":":!0,"?":!0,"==":!0,"!=":!0,"<":!0,">":!0,"<=":!0,">=":!0,"<<":!0,">>":!0,">>>":!0},O={mod:!0,to:!0,in:!0,and:!0,xor:!0,or:!0,not:!0},N={true:!0,false:!1,null:null,undefined:void 0},M=["NaN","Infinity"];function E(t,e){return t.expression.substr(t.index,e)}function C(t){return E(t,1)}function T(t){t.index++}function D(t){return t.expression.charAt(t.index-1)}function A(t){return t.expression.charAt(t.index+1)}function j(t){for(t.tokenType=_.NULL,t.token="",t.comment="";x.isWhitespace(C(t),t.nestingLevel);)T(t);if("#"===C(t))for(;"\n"!==C(t)&&""!==C(t);)t.comment+=C(t),T(t);if(""!==C(t)){if("\n"===C(t)&&!t.nestingLevel)return t.tokenType=_.DELIMITER,t.token=C(t),void T(t);var e=C(t),n=E(t,2),r=E(t,3);if(3===r.length&&S[r])return t.tokenType=_.DELIMITER,t.token=r,T(t),T(t),void T(t);if(2===n.length&&S[n])return t.tokenType=_.DELIMITER,t.token=n,T(t),void T(t);if(S[e])return t.tokenType=_.DELIMITER,t.token=e,void T(t);if(x.isDigitDot(e)){if(t.tokenType=_.NUMBER,"."===C(t))t.token+=C(t),T(t),x.isDigit(C(t))||(t.tokenType=_.DELIMITER);else{for(;x.isDigit(C(t));)t.token+=C(t),T(t);x.isDecimalMark(C(t),A(t))&&(t.token+=C(t),T(t))}for(;x.isDigit(C(t));)t.token+=C(t),T(t);if("E"===C(t)||"e"===C(t))if(x.isDigit(A(t))||"-"===A(t)||"+"===A(t)){if(t.token+=C(t),T(t),"+"!==C(t)&&"-"!==C(t)||(t.token+=C(t),T(t)),!x.isDigit(C(t)))throw ot(t,'Digit expected, got "'+C(t)+'"');for(;x.isDigit(C(t));)t.token+=C(t),T(t);if(x.isDecimalMark(C(t),A(t)))throw ot(t,'Digit expected, got "'+C(t)+'"')}else if("."===A(t))throw T(t),ot(t,'Digit expected, got "'+C(t)+'"')}else{if(!x.isAlpha(C(t),D(t),A(t))){for(t.tokenType=_.UNKNOWN;""!==C(t);)t.token+=C(t),T(t);throw ot(t,'Syntax error in part "'+t.token+'"')}for(;x.isAlpha(C(t),D(t),A(t))||x.isDigit(C(t));)t.token+=C(t),T(t);Object(k.f)(O,t.token)?t.tokenType=_.DELIMITER:t.tokenType=_.SYMBOL}}else t.tokenType=_.DELIMITER}function P(t){for(;j(t),"\n"===t.token;);}function R(t){t.nestingLevel++}function L(t){t.nestingLevel--}function F(t,e){var n={extraNodes:{},expression:"",comment:"",index:0,token:"",tokenType:_.NULL,nestingLevel:0,conditionalLevel:null};Wa(n,{expression:t,extraNodes:e}),j(n);var r=function(t){var e,n,r=[];for(""!==t.token&&"\n"!==t.token&&";"!==t.token&&((e=q(t)).comment=t.comment);"\n"===t.token||";"===t.token;)0===r.length&&e&&(n=";"!==t.token,r.push({node:e,visible:n})),j(t),"\n"!==t.token&&";"!==t.token&&""!==t.token&&((e=q(t)).comment=t.comment,n=";"!==t.token,r.push({node:e,visible:n}));return 0<r.length?new u(r):(e||((e=new c(void 0)).comment=t.comment),e)}(n);if(""!==n.token)throw n.tokenType===_.DELIMITER?at(n,"Unexpected operator "+n.token):ot(n,'Unexpected part "'+n.token+'"');return r}function q(t){var e,n,i,o,a=function(t){for(var e=function(t){for(var e=B(t);"or"===t.token;)P(t),e=new m("or","or",[e,B(t)]);return e}(t);"?"===t.token;){var n=t.conditionalLevel;t.conditionalLevel=t.nestingLevel,P(t);var r=e,i=q(t);if(":"!==t.token)throw ot(t,"False part of conditional expression expected");t.conditionalLevel=null,P(t);var o=q(t);e=new l(r,i,o),t.conditionalLevel=n}return e}(t);if("="!==t.token)return a;if(Object(r.J)(a))return e=a.name,P(t),i=q(t),new s(new b(e),i);if(Object(r.a)(a))return P(t),i=q(t),new s(a.object,a.index,i);if(Object(r.r)(a)&&Object(r.J)(a.fn)&&(o=!0,n=[],e=a.name,a.args.forEach((function(t,e){Object(r.J)(t)?n[e]=t.name:o=!1})),o))return P(t),i=q(t),new f(e,n,i);throw ot(t,"Invalid left hand side of assignment operator =")}function B(t){for(var e=z(t);"xor"===t.token;)P(t),e=new m("xor","xor",[e,z(t)]);return e}function z(t){for(var e=H(t);"and"===t.token;)P(t),e=new m("and","and",[e,H(t)]);return e}function H(t){for(var e=U(t);"|"===t.token;)P(t),e=new m("|","bitOr",[e,U(t)]);return e}function U(t){for(var e=W(t);"^|"===t.token;)P(t),e=new m("^|","bitXor",[e,W(t)]);return e}function W(t){for(var e=V(t);"&"===t.token;)P(t),e=new m("&","bitAnd",[e,V(t)]);return e}function V(t){for(var e=[$(t)],n=[],r={"==":"equal","!=":"unequal","<":"smaller",">":"larger","<=":"smallerEq",">=":"largerEq"};Object(k.f)(r,t.token);){var i={name:t.token,fn:r[t.token]};n.push(i),P(t),e.push($(t))}return 1===e.length?e[0]:2===e.length?new m(n[0].name,n[0].fn,e):new y(n.map((function(t){return t.fn})),e)}function $(t){for(var e,n,r,i=Y(t),o={"<<":"leftShift",">>":"rightArithShift",">>>":"rightLogShift"};Object(k.f)(o,t.token);)n=o[e=t.token],P(t),r=[i,Y(t)],i=new m(e,n,r);return i}function Y(t){for(var e,n,r,i=Z(t),o={to:"to",in:"to"};Object(k.f)(o,t.token);)n=o[e=t.token],P(t),i="in"===e&&""===t.token?new m("*","multiply",[i,new b("in")],!0):(r=[i,Z(t)],new m(e,n,r));return i}function Z(t){var e=[],n=":"===t.token?new c(1):G(t);if(":"===t.token&&t.conditionalLevel!==t.nestingLevel){for(e.push(n);":"===t.token&&e.length<3;)P(t),")"===t.token||"]"===t.token||","===t.token||""===t.token?e.push(new b("end")):e.push(G(t));n=3===e.length?new v(e[0],e[2],e[1]):new v(e[0],e[1])}return n}function G(t){for(var e,n,r,i=K(t),o={"+":"add","-":"subtract"};Object(k.f)(o,t.token);)n=o[e=t.token],P(t),r=[i,K(t)],i=new m(e,n,r);return i}function K(t){for(var e,n,r,i=X(t),o={"*":"multiply",".*":"dotMultiply","/":"divide","./":"dotDivide","%":"mod",mod:"mod"};Object(k.f)(o,t.token);)n=o[e=t.token],P(t),r=X(t),i=new m(e,n,[i,r]);return i}function X(t){for(var e=J(t),n=e;t.tokenType===_.SYMBOL||"in"===t.token&&Object(r.l)(e)||!(t.tokenType!==_.NUMBER||Object(r.l)(n)||Object(r.B)(n)&&"!"!==n.op)||"("===t.token;)n=J(t),e=new m("*","multiply",[e,n],!0);return e}function J(t){for(var e=Q(t),n=e,i=[];"/"===t.token&&Object(r.l)(n);){if(i.push(Wa({},t)),P(t),t.tokenType!==_.NUMBER){Wa(t,i.pop());break}if(i.push(Wa({},t)),P(t),t.tokenType!==_.SYMBOL&&"("!==t.token){i.pop(),Wa(t,i.pop());break}Wa(t,i.pop()),i.pop(),n=Q(t),e=new m("/","divide",[e,n])}return e}function Q(t){var e,r,o,s={"-":"unaryMinus","+":"unaryPlus","~":"bitNot",not:"not"};return Object(k.f)(s,t.token)?(o=s[t.token],e=t.token,P(t),r=[Q(t)],new m(e,o,r)):function(t){var e,r,o,s;return e=function(t){var e,r,o;e=function(t){var e=[];if(t.tokenType===_.SYMBOL&&Object(k.f)(t.extraNodes,t.token)){var r=t.extraNodes[t.token];if(j(t),"("===t.token){if(e=[],R(t),j(t),")"!==t.token)for(e.push(q(t));","===t.token;)j(t),e.push(q(t));if(")"!==t.token)throw ot(t,"Parenthesis ) expected");L(t),j(t)}return new r(e)}return function(t){var e;return t.tokenType===_.SYMBOL||t.tokenType===_.DELIMITER&&t.token in O?(e=t.token,j(t),tt(t,Object(k.f)(N,e)?new c(N[e]):-1!==M.indexOf(e)?new c(n(e,"number")):new b(e))):function(t){var e;return'"'!==t.token?function(t){var e;return"'"!==t.token?function(t){var e,r,o,s;if("["!==t.token)return function(t){if("{"!==t.token)return function(t){var e;return t.tokenType!==_.NUMBER?function(t){var e;if("("!==t.token)return function(t){throw""===t.token?ot(t,"Unexpected end of expression"):ot(t,"Value expected")}(t);if(R(t),j(t),e=q(t),")"===t.token)return L(t),j(t),tt(t,e=new g(e));throw ot(t,"Parenthesis ) expected")}(t):(e=t.token,j(t),new c(n(e,i.number)))}(t);var e;R(t);var r={};do{if(j(t),"}"!==t.token){if('"'===t.token)e=et(t);else if("'"===t.token)e=nt(t);else{if(!(t.tokenType===_.SYMBOL||t.tokenType===_.DELIMITER&&t.token in O))throw ot(t,"Symbol or string expected as object key");e=t.token,j(t)}if(":"!==t.token)throw ot(t,"Colon : expected after object key");j(t),r[e]=q(t)}}while(","===t.token);if("}"!==t.token)throw ot(t,"Comma , or bracket } expected after object value");return L(t),j(t),tt(t,new p(r))}(t);if(R(t),j(t),"]"!==t.token){var u=rt(t);if(";"===t.token){for(o=1,r=[u];";"===t.token;)j(t),r[o]=rt(t),o++;if("]"!==t.token)throw ot(t,"End of matrix ] expected");L(t),j(t),s=r[0].items.length;for(var l=1;l<o;l++)if(r[l].items.length!==s)throw at(t,"Column dimensions mismatch ("+r[l].items.length+" !== "+s+")");e=new a(r)}else{if("]"!==t.token)throw ot(t,"End of matrix ] expected");L(t),j(t),e=u}}else L(t),j(t),e=new a([]);return tt(t,e)}(t):(e=nt(t),tt(t,new c(e)))}(t):(e=et(t),tt(t,new c(e)))}(t)}(t)}(t);for(var s={"!":"factorial","'":"ctranspose"};Object(k.f)(s,t.token);)o=s[r=t.token],j(t),e=tt(t,e=new m(r,o,[e]));return e}(t),"^"!==t.token&&".^"!==t.token||(o="^"===(r=t.token)?"pow":"dotPow",P(t),s=[e,Q(t)],e=new m(r,o,s)),e}(t)}function tt(t,e,n){for(var i;!("("!==t.token&&"["!==t.token&&"."!==t.token||n&&-1===n.indexOf(t.token));)if(i=[],"("===t.token){if(!Object(r.J)(e)&&!Object(r.a)(e))return e;if(R(t),j(t),")"!==t.token)for(i.push(q(t));","===t.token;)j(t),i.push(q(t));if(")"!==t.token)throw ot(t,"Parenthesis ) expected");L(t),j(t),e=new h(e,i)}else if("["===t.token){if(R(t),j(t),"]"!==t.token)for(i.push(q(t));","===t.token;)j(t),i.push(q(t));if("]"!==t.token)throw ot(t,"Parenthesis ] expected");L(t),j(t),e=new o(e,new d(i))}else{if(j(t),t.tokenType!==_.SYMBOL)throw ot(t,"Property name expected after dot");i.push(new c(t.token)),j(t),e=new o(e,new d(i,!0))}return e}function et(t){for(var e="";""!==C(t)&&'"'!==C(t);)"\\"===C(t)&&(e+=C(t),T(t)),e+=C(t),T(t);if(j(t),'"'!==t.token)throw ot(t,'End of string " expected');return j(t),JSON.parse('"'+e+'"')}function nt(t){for(var e="";""!==C(t)&&"'"!==C(t);)"\\"===C(t)&&(e+=C(t),T(t)),e+=C(t),T(t);if(j(t),"'"!==t.token)throw ot(t,"End of string ' expected");return j(t),JSON.parse('"'+e+'"')}function rt(t){for(var e=[q(t)],n=1;","===t.token;)j(t),e[n]=q(t),n++;return new a(e)}function it(t){return t.index-t.token.length+1}function ot(t,e){var n=it(t),r=new SyntaxError(e+" (char "+n+")");return r.char=n,r}function at(t,e){var n=it(t),r=new SyntaxError(e+" (char "+n+")");return r.char=n,r}return x.isAlpha=function(t,e,n){return x.isValidLatinOrGreek(t)||x.isValidMathSymbol(t,n)||x.isValidMathSymbol(e,t)},x.isValidLatinOrGreek=function(t){return/^[a-zA-Z_$\u00C0-\u02AF\u0370-\u03FF\u2100-\u214F]$/.test(t)},x.isValidMathSymbol=function(t,e){return/^[\uD835]$/.test(t)&&/^[\uDC00-\uDFFF]$/.test(e)&&/^[^\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDFCC\uDFCD]$/.test(e)},x.isWhitespace=function(t,e){return" "===t||"\t"===t||"\n"===t&&0<e},x.isDecimalMark=function(t,e){return"."===t&&"/"!==e&&"*"!==e&&"^"!==e},x.isDigitDot=function(t){return"0"<=t&&t<="9"||"."===t},x.isDigit=function(t){return"0"<=t&&t<="9"},x})),$a="compile",Ya=Object(s.a)($a,["typed","parse"],(function(t){var e=t.typed,n=t.parse;return e($a,{string:function(t){return n(t).compile()},"Array | Matrix":function(t){return I(t,(function(t){return n(t).compile()}))}})})),Za="evaluate",Ga=Object(s.a)(Za,["typed","parse"],(function(t){var e=t.typed,n=t.parse;return e(Za,{string:function(t){return n(t).compile().evaluate({})},"string, Object":function(t,e){return n(t).compile().evaluate(e)},"Array | Matrix":function(t){var e={};return I(t,(function(t){return n(t).compile().evaluate(e)}))},"Array | Matrix, Object":function(t,e){return I(t,(function(t){return n(t).compile().evaluate(e)}))}})})),Ka=Object(s.a)("Parser",["parse"],(function(t){var e=t.parse;function n(){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");this.scope={}}return n.prototype.type="Parser",n.prototype.isParser=!0,n.prototype.evaluate=function(t){return e(t).compile().evaluate(this.scope)},n.prototype.get=function(t){return t in this.scope?Zn(this.scope,t):void 0},n.prototype.getAll=function(){return Object(k.e)({},this.scope)},n.prototype.set=function(t,e){return Gn(this.scope,t,e)},n.prototype.remove=function(t){delete this.scope[t]},n.prototype.clear=function(){for(var t in this.scope)Object(k.f)(this.scope,t)&&delete this.scope[t]},n}),{isClass:!0}),Xa=Object(s.a)("parser",["typed","Parser"],(function(t){var e=t.typed,n=t.Parser;return e("parser",{"":function(){return new n}})})),Ja=Object(s.a)("lup",["typed","matrix","abs","addScalar","divideScalar","multiplyScalar","subtract","larger","equalScalar","unaryMinus","DenseMatrix","SparseMatrix","Spa"],(function(t){var e=t.typed,n=t.matrix,r=t.abs,i=t.addScalar,o=t.divideScalar,a=t.multiplyScalar,s=t.subtract,u=t.larger,l=t.equalScalar,c=t.unaryMinus,f=t.DenseMatrix,h=t.SparseMatrix,d=t.Spa;return e("lup",{DenseMatrix:p,SparseMatrix:function(t){var e,n,i,s=t._size[0],f=t._size[1],p=Math.min(s,f),m=t._values,g=t._index,v=t._ptr,y=[],b=[],x=[],w=[s,p],_=[],S=[],O=[],N=[p,f],M=[],E=[];for(e=0;e<s;e++)M[e]=e,E[e]=e;function k(){var t=new d;n<s&&(x.push(y.length),y.push(1),b.push(n)),O.push(_.length);var f=v[n],p=v[n+1];for(i=f;i<p;i++)e=g[i],t.set(M[e],m[i]);0<n&&t.forEach(0,n-1,(function(e,n){h._forEachRow(e,y,b,x,(function(r,i){e<r&&t.accumulate(r,c(a(i,n)))}))}));var k,C,T,D,A=n,j=t.get(n),P=r(j);t.forEach(n+1,s-1,(function(t,e){var n=r(e);u(n,P)&&(A=t,P=n,j=e)})),n!==A&&(h._swapRows(n,A,w[1],y,b,x),h._swapRows(n,A,N[1],_,S,O),t.swap(n,A),C=A,T=E[k=n],D=E[C],M[T]=C,M[D]=k,E[k]=D,E[C]=T),t.forEach(0,s-1,(function(t,e){t<=n?(_.push(e),S.push(t)):(e=o(e,j),l(e,0)||(y.push(e),b.push(t)))}))}for(n=0;n<f;n++)k();return O.push(_.length),x.push(y.length),{L:new h({values:y,index:b,ptr:x,size:w}),U:new h({values:_,index:S,ptr:O,size:N}),p:M,toString:function(){return"L: "+this.L.toString()+"\nU: "+this.U.toString()+"\nP: "+this.p}}},Array:function(t){var e=p(n(t));return{L:e.L.valueOf(),U:e.U.valueOf(),p:e.p}}});function p(t){var e,n=t._size[0],c=t._size[1],h=Math.min(n,c),d=Object(k.a)(t._data),p=[],m=[n,h],g=[],v=[h,c],y=[];for(N=0;N<n;N++)y[N]=N;for(e=0;e<c;e++){if(0<e)for(N=0;N<n;N++){for(var b=Math.min(N,e),x=0,w=0;w<b;w++)x=i(x,a(d[N][w],d[w][e]));d[N][e]=s(d[N][e],x)}for(var _=e,S=0,O=0,N=e;N<n;N++){var M=d[N][e],E=r(M);u(E,S)&&(_=N,S=E,O=M)}if(e!==_&&(y[e]=[y[_],y[_]=y[e]][0],f._swapRows(e,_,d)),e<n)for(N=e+1;N<n;N++){var C=d[N][e];l(C,0)||(d[N][e]=o(d[N][e],O))}}for(e=0;e<c;e++)for(N=0;N<n;N++)0===e&&(N<c&&(g[N]=[]),p[N]=[]),N<e?(N<c&&(g[N][e]=d[N][e]),e<n&&(p[N][e]=0)):N!==e?(N<c&&(g[N][e]=0),e<n&&(p[N][e]=d[N][e])):(N<c&&(g[N][e]=d[N][e]),e<n&&(p[N][e]=1));var T=new f({data:p,size:m}),D=new f({data:g,size:v}),A=[];for(N=0,h=y.length;N<h;N++)A[y[N]]=N;return{L:T,U:D,p:A,toString:function(){return"L: "+this.L.toString()+"\nU: "+this.U.toString()+"\nP: "+this.p}}}}));function Qa(){return(Qa=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}var ts=Object(s.a)("qr",["typed","matrix","zeros","identity","isZero","equal","sign","sqrt","conj","unaryMinus","addScalar","divideScalar","multiplyScalar","subtract","complex"],(function(t){var e=t.typed,n=t.matrix,r=t.zeros,i=t.identity,o=t.isZero,a=t.equal,s=t.sign,u=t.sqrt,l=t.conj,c=t.unaryMinus,f=t.addScalar,h=t.divideScalar,d=t.multiplyScalar,p=t.subtract,m=t.complex;return Qa(e("qr",{DenseMatrix:v,SparseMatrix:function(){throw new Error("qr not implemented for sparse matrices yet")},Array:function(t){var e=v(n(t));return{Q:e.Q.valueOf(),R:e.R.valueOf()}}}),{_denseQRimpl:g});function g(t){for(var e=t._size[0],n=t._size[1],m=i([e],"dense"),g=m._data,v=t.clone(),y=v._data,b=r([e],""),x=0;x<Math.min(n,e);++x){var w=y[x][x],_=c(a(w,0)?1:s(w)),S=l(_),O=0;for(E=x;E<e;E++)O=f(O,d(y[E][x],l(y[E][x])));var N=d(_,u(O));if(!o(N)){for(var M=p(w,N),E=x+(b[x]=1);E<e;E++)b[E]=h(y[E][x],M);for(var k=c(l(h(M,N))),C=void 0,T=x;T<n;T++){for(C=0,E=x;E<e;E++)C=f(C,d(l(b[E]),y[E][T]));for(C=d(C,k),E=x;E<e;E++)y[E][T]=d(p(y[E][T],d(b[E],C)),S)}for(E=0;E<e;E++){for(C=0,T=x;T<e;T++)C=f(C,d(g[E][T],b[T]));for(C=d(C,k),T=x;T<e;++T)g[E][T]=h(p(g[E][T],d(C,l(b[T]))),S)}}}return{Q:m,R:v,toString:function(){return"Q: "+this.Q.toString()+"\nR: "+this.R.toString()}}}function v(t){var e=g(t),n=e.R._data;if(0<t._data.length)for(var r="Complex"===n[0][0].type?m(0):0,i=0;i<n.length;++i)for(var o=0;o<i&&o<(n[0]||[]).length;++o)n[i][o]=r;return e}}));function es(t,e,n,r,i,o,a){var s=0;for(n[a]=t;0<=s;){var u=n[a+s],l=n[r+u];-1===l?(s--,o[e++]=u):(n[r+u]=n[i+l],n[a+ ++s]=l)}return e}var ns=Object(s.a)("csAmd",["add","multiply","transpose"],(function(t){var e=t.add,n=t.multiply,r=t.transpose;return function(t,a){if(!a||t<=0||3<t)return null;var s=a._size,u=s[0],l=s[1],c=0,f=Math.max(16,10*Math.sqrt(l)),h=function(t,i,o,a,s){var u=r(i);if(1===t&&a===o)return e(i,u);if(2!==t)return n(u,i);for(var l=u._index,c=u._ptr,f=0,h=0;h<o;h++){var d=c[h];if(c[h]=f,!(c[h+1]-d>s))for(var p=c[h+1];d<p;d++)l[f++]=l[d]}return c[o]=f,i=r(u),n(u,i)}(t,a,u,l,f=Math.min(l-2,f));!function(t,e,n){for(var r=t._values,i=t._index,o=t._ptr,a=t._size[1],s=0,u=0;u<a;u++){var l=o[u];for(o[u]=s;l<o[u+1];l++)e(i[l],u,r?r[l]:1,null)&&(i[s]=i[l],r&&(r[s]=r[l]),s++)}o[a]=s,i.splice(s,i.length-s),r&&r.splice(s,r.length-s)}(h,o);for(var d,p,m,g,v,y,b,x,w,_,S,O,N=h._index,M=h._ptr,E=M[l],k=[],C=[],T=l+1,D=2*(l+1),A=3*(l+1),j=4*(l+1),P=5*(l+1),I=6*(l+1),R=7*(l+1),L=k,F=function(t,e,n,r,o,a,s,u,l,c,f,h){for(var d=0;d<t;d++)n[0+d]=e[d+1]-e[d];for(var p=n[0+t]=0;p<=t;p++)n[o+p]=-1,a[p]=-1,n[s+p]=-1,n[u+p]=-1,n[l+p]=1,n[c+p]=1,n[f+p]=0,n[h+p]=n[0+p];var m=i(0,0,n,c,t);return n[f+t]=-2,e[t]=-1,n[c+t]=0,m}(l,M,C,0,A,L,D,R,T,I,j,P),q=function(t,e,n,r,i,o,a,s,u,l,c){for(var f=0,h=0;h<t;h++){var d,p=n[r+h];0===p?(n[i+h]=-2,f++,e[h]=-1,n[o+h]=0):a<p?(n[s+h]=0,n[i+h]=-1,f++,e[h]=-t-2,n[s+t]++):(-1!==(d=n[u+p])&&(l[d]=h),n[c+h]=n[u+p],n[u+p]=h)}return f}(l,M,C,P,j,I,f,T,A,L,D),B=0;q<l;){for(p=-1;B<l&&-1===(p=C[A+B]);B++);-1!==C[D+p]&&(L[C[D+p]]=-1),C[A+B]=C[D+p];var z=C[j+p],H=C[T+p];q+=H;var U=0;C[T+p]=-H;for(var W,V,$=M[p],Y=0===z?$:E,Z=Y,G=1;G<=z+1;G++){for(v=z<G?(g=$,C[0+(V=p)]-z):(g=M[V=N[$++]],C[0+V]),m=1;m<=v;m++)(y=C[T+(d=N[g++])])<=0||(U+=y,C[T+d]=-y,-1!==C[D+(N[Z++]=d)]&&(L[C[D+d]]=L[d]),-1!==L[d]?C[D+L[d]]=C[D+d]:C[A+C[P+d]]=C[D+d]);V!==p&&(M[V]=-p-2,C[I+V]=0)}for(0!==z&&(E=Z),C[P+p]=U,M[p]=Y,C[0+p]=Z-Y,C[j+p]=-2,F=i(F,c,C,I,l),b=Y;b<Z;b++)if(!((x=C[j+(d=N[b])])<=0))for(var K=F-(y=-C[T+d]),X=($=M[d],M[d]+x-1);$<=X;$++)C[I+(V=N[$])]>=F?C[I+V]-=y:0!==C[I+V]&&(C[I+V]=C[P+V]+K);for(b=Y;b<Z;b++){for(w=(X=M[d=N[b]])+C[j+d]-1,O=S=0,$=_=X;$<=w;$++)0!==C[I+(V=N[$])]&&(0<(W=C[I+V]-F)?(O+=W,S+=N[_++]=V):(M[V]=-p-2,C[I+V]=0));C[j+d]=_-X+1;var J=_,Q=X+C[0+d];for($=1+w;$<Q;$++){var tt=C[T+(nt=N[$])];tt<=0||(O+=tt,S+=N[_++]=nt)}0===O?(M[d]=-p-2,U-=y=-C[T+d],H+=y,q+=y,C[T+d]=0,C[j+d]=-1):(C[P+d]=Math.min(C[P+d],O),N[_]=N[J],N[J]=N[X],N[X]=p,C[0+d]=_-X+1,S=(S<0?-S:S)%l,C[D+d]=C[R+S],L[C[R+S]=d]=S)}for(C[P+p]=U,F=i(F+(c=Math.max(c,U)),c,C,I,l),b=Y;b<Z;b++)if(!(0<=C[T+(d=N[b])]))for(d=C[R+(S=L[d])],C[R+S]=-1;-1!==d&&-1!==C[D+d];d=C[D+d],F++){for(v=C[0+d],x=C[j+d],$=M[d]+1;$<=M[d]+v-1;$++)C[I+N[$]]=F;for(var et=d,nt=C[D+d];-1!==nt;){var rt=C[0+nt]===v&&C[j+nt]===x;for($=M[nt]+1;rt&&$<=M[nt]+v-1;$++)C[I+N[$]]!==F&&(rt=0);rt?(M[nt]=-d-2,C[T+d]+=C[T+nt],C[T+nt]=0,C[j+nt]=-1,nt=C[D+nt],C[D+et]=nt):nt=C[D+(et=nt)]}}for(b=$=Y;b<Z;b++)(y=-C[T+(d=N[b])])<=0||(C[T+d]=y,O=C[P+d]+U-y,-1!==C[A+(O=Math.min(O,l-q-y))]&&(L[C[A+O]]=d),C[D+d]=C[A+O],L[d]=-1,C[A+O]=d,B=Math.min(B,O),C[P+d]=O,N[$++]=d);C[T+p]=H,0==(C[0+p]=$-Y)&&(M[p]=-1,C[I+p]=0),0!==z&&(E=$)}for(d=0;d<l;d++)M[d]=-M[d]-2;for(nt=0;nt<=l;nt++)C[A+nt]=-1;for(nt=l;0<=nt;nt--)0<C[T+nt]||(C[D+nt]=C[A+M[nt]],C[A+M[nt]]=nt);for(V=l;0<=V;V--)C[T+V]<=0||-1!==M[V]&&(C[D+V]=C[A+M[V]],C[A+M[V]]=V);for(d=p=0;d<=l;d++)-1===M[d]&&(p=es(d,p,C,A,D,k,I));return k.splice(k.length-1,1),k};function i(t,e,n,r,i){if(t<2||t+e<0){for(var o=0;o<i;o++)0!==n[r+o]&&(n[r+o]=1);t=2}return t}function o(t,e){return t!==e}})),rs=Object(s.a)("csCounts",["transpose"],(function(t){var e=t.transpose;return function(t,n,r,i){if(!t||!n||!r)return null;for(var o,a,s,u,l,c,f=t._size,h=f[0],d=f[1],p=4*d+(i?d+h+1:0),m=[],g=d,v=2*d,y=3*d,b=4*d,x=5*d+1,w=0;w<p;w++)m[w]=-1;var _=[],S=e(t),O=S._index,N=S._ptr;for(w=0;w<d;w++)for(_[a=r[w]]=-1===m[y+a]?1:0;-1!==a&&-1===m[y+a];a=n[a])m[y+a]=w;if(i){for(w=0;w<d;w++)m[r[w]]=w;for(o=0;o<h;o++){for(w=d,l=N[o],c=N[o+1],u=l;u<c;u++)w=Math.min(w,m[O[u]]);m[x+o]=m[b+w],m[b+w]=o}}for(o=0;o<d;o++)m[0+o]=o;for(w=0;w<d;w++){for(-1!==n[a=r[w]]&&_[n[a]]--,s=i?m[b+w]:a;-1!==s;s=i?m[x+s]:-1)for(u=N[s];u<N[s+1];u++){var M=function(t,e,n,r,i,o,a){var s,u,l,c=0;if(t<=e||n[r+e]<=n[i+t])return-1;n[i+t]=n[r+e];var f=n[o+t];if(n[o+t]=e,-1===f)c=1,l=t;else{for(c=2,l=f;l!==n[0+l];l=n[0+l]);for(s=f;s!==l;s=u)u=n[0+s],n[0+s]=l}return{jleaf:c,q:l}}(o=O[u],a,m,y,g,v);1<=M.jleaf&&_[a]++,2===M.jleaf&&_[M.q]--}-1!==n[a]&&(m[0+a]=n[a])}for(a=0;a<d;a++)-1!==n[a]&&(_[n[a]]+=_[a]);return _}})),is=Object(s.a)("csSqr",["add","multiply","transpose"],(function(t){var e=t.add,n=t.multiply,r=t.transpose,i=ns({add:e,multiply:n,transpose:r}),o=rs({transpose:r});return function(t,e,n){var r,a=e._ptr,s=e._size[1],u={};if(u.q=i(t,e),t&&!u.q)return null;if(n){var l=t?function(t,e,n,r){for(var i=t._values,o=t._index,a=t._ptr,s=t._size,u=t._datatype,l=s[0],c=s[1],f=null,h=[],d=[],p=0,m=0;m<c;m++){d[m]=p;for(var g=n?n[m]:m,v=a[g],y=a[g+1],b=v;b<y;b++){var x=o[b];h[p]=x,f&&(f[p]=i[b]),p++}}return d[c]=p,t.createSparseMatrix({values:f,index:h,ptr:d,size:[l,c],datatype:u})}(e,0,u.q):e;u.parent=function(t,e){if(!t)return null;var n,r=t._index,i=t._ptr,o=t._size,a=o[0],s=o[1],u=[],l=[],c=s;for(g=0;g<a;g++)l[c+g]=-1;for(var f=0;f<s;f++){u[f]=-1,l[0+f]=-1;for(var h=i[f],d=i[f+1],p=h;p<d;p++){for(var m=r[p],g=l[c+m];-1!==g&&g<f;g=n)n=l[0+g],l[0+g]=f,-1===n&&(u[g]=f);l[c+m]=f}}return u}(l);var c=function(t,e){if(!t)return null;for(var n=0,r=[],i=[],o=e,a=2*e,s=0;s<e;s++)i[0+s]=-1;for(s=e-1;0<=s;s--)-1!==t[s]&&(i[o+s]=i[0+t[s]],i[0+t[s]]=s);for(s=0;s<e;s++)-1===t[s]&&(n=es(s,n,i,0,o,r,a));return r}(u.parent,s);if(u.cp=o(l,u.parent,c,1),l&&u.parent&&u.cp&&function(t,e){var n=t._ptr,r=t._index,i=t._size,o=i[0],a=i[1];e.pinv=[],e.leftmost=[];var s,u,l,c,f,h=e.parent,d=e.pinv,p=e.leftmost,m=[],g=o,v=o+a,y=o+2*a;for(u=0;u<a;u++)m[g+u]=-1,m[v+u]=-1,m[y+u]=0;for(s=0;s<o;s++)p[s]=-1;for(u=a-1;0<=u;u--)for(c=n[u],f=n[u+1],l=c;l<f;l++)p[r[l]]=u;for(s=o-1;0<=s;s--)(d[s]=-1)!==(u=p[s])&&(0==m[y+u]++&&(m[v+u]=s),m[0+s]=m[g+u],m[g+u]=s);for(e.lnz=0,e.m2=o,u=0;u<a;u++){var b;s=m[g+u],e.lnz++,s<0&&(s=e.m2++),d[s]=u,--y[u]<=0||(e.lnz+=m[y+u],-1!==(b=h[u])&&(0===m[y+b]&&(m[v+b]=m[v+u]),m[0+m[v+u]]=m[g+b],m[g+b]=m[0+s],m[y+b]+=m[y+u]))}for(s=0;s<o;s++)d[s]<0&&(d[s]=u++);return!0}(l,u))for(r=u.unz=0;r<s;r++)u.unz+=u.cp[r]}else u.unz=4*a[s]+s,u.lnz=u.unz;return u}}));function os(t,e){t[e]=-t[e]-2}function as(t){return t<0?-t-2:t}var ss=Object(s.a)("csSpsolve",["divideScalar","multiply","subtract"],(function(t){var e=t.divideScalar,n=t.multiply,r=t.subtract;return function(t,i,o,a,s,u,l){for(var c,f,h,d=t._values,p=t._index,m=t._ptr,g=t._size[1],v=i._values,y=i._index,b=i._ptr,x=function(t,e,n,r,i){for(var o=t._ptr,a=t._size,s=e._index,u=e._ptr,l=a[1],c=l,f=u[n],h=u[n+1],d=f;d<h;d++){var p=s[d];o[p]<0||(c=function(t,e,n,r,i){var o,a=e._index,s=e._ptr,u=e._size[1],l=0;for(r[0]=t;0<=l;){t=r[l];var c=i?i[t]:t;s[t]<0||(os(s,t),r[u+l]=c<0?0:as(s[c]));for(var f=1,h=r[u+l],d=c<0?0:as(s[c+1]);h<d;h++)if(!(s[o=a[h]]<0)){r[u+l]=h,r[++l]=o,f=0;break}f&&(l--,r[--n]=t)}return n}(p,t,c,r,i))}for(d=c;d<l;d++)os(o,r[d]);return c}(t,i,o,a,u),w=x;w<g;w++)s[a[w]]=0;for(c=b[o],f=b[o+1],w=c;w<f;w++)s[y[w]]=v[w];for(var _=x;_<g;_++){var S=a[_],O=u?u[S]:S;if(!(O<0))for(c=m[O],f=m[O+1],s[S]=e(s[S],d[l?c:f-1]),w=l?c+1:c,h=l?f:f-1;w<h;w++){var N=p[w];s[N]=r(s[N],n(d[w],s[S]))}}return x}})),us=Object(s.a)("csLu",["abs","divideScalar","multiply","subtract","larger","largerEq","SparseMatrix"],(function(t){var e=t.abs,n=t.divideScalar,r=t.multiply,i=t.subtract,o=t.larger,a=t.largerEq,s=t.SparseMatrix,u=ss({divideScalar:n,multiply:r,subtract:i});return function(t,i,l){if(!t)return null;var c,f=t._size[1],h=100,d=100;i&&(c=i.q,h=i.lnz||h,d=i.unz||d);var p=[],m=[],g=[],v=new s({values:p,index:m,ptr:g,size:[f,f]}),y=[],b=[],x=[],w=new s({values:y,index:b,ptr:x,size:[f,f]}),_=[],S=[],O=[];for(E=0;E<f;E++)S[E]=0,_[E]=-1,g[E+1]=0;for(var N=d=h=0;N<f;N++){g[N]=h,x[N]=d;for(var M,E,k=c?c[N]:N,C=u(v,t,k,O,S,_,1),T=-1,D=-1,A=C;A<f;A++)_[E=O[A]]<0?(M=e(S[E]),o(M,D)&&(D=M,T=E)):(b[d]=_[E],y[d++]=S[E]);if(-1===T||D<=0)return null;_[k]<0&&a(e(S[k]),r(D,l))&&(T=k);var j=S[T];for(b[d]=N,y[d++]=j,_[T]=N,m[h]=T,p[h++]=1,A=C;A<f;A++)_[E=O[A]]<0&&(m[h]=E,p[h++]=n(S[E],j)),S[E]=0}for(g[f]=h,x[f]=d,A=0;A<h;A++)m[A]=_[m[A]];return p.splice(h,p.length-h),m.splice(h,m.length-h),y.splice(d,y.length-d),b.splice(d,b.length-d),{L:v,U:w,pinv:_}}})),ls=Object(s.a)("slu",["typed","abs","add","multiply","transpose","divideScalar","subtract","larger","largerEq","SparseMatrix"],(function(t){var e=t.typed,n=t.abs,r=t.add,i=t.multiply,o=t.transpose,s=t.divideScalar,u=t.subtract,l=t.larger,c=t.largerEq,f=t.SparseMatrix,h=is({add:r,multiply:i,transpose:o}),d=us({abs:n,divideScalar:s,multiply:i,subtract:u,larger:l,largerEq:c,SparseMatrix:f});return e("slu",{"SparseMatrix, number, number":function(t,e,n){if(!Object(a.i)(e)||e<0||3<e)throw new Error("Symbolic Ordering and Analysis order must be an integer number in the interval [0, 3]");if(n<0||1<n)throw new Error("Partial pivoting threshold must be a number from 0 to 1");var r=h(e,t,!1),i=d(t,r,n);return{L:i.L,U:i.U,p:i.pinv,q:r.q,toString:function(){return"L: "+this.L.toString()+"\nU: "+this.U.toString()+"\np: "+this.p.toString()+(this.q?"\nq: "+this.q.toString():"")+"\n"}}}})}));function cs(t,e){var n,r=e.length,i=[];if(t)for(n=0;n<r;n++)i[t[n]]=e[n];else for(n=0;n<r;n++)i[n]=e[n];return i}var fs="lusolve",hs=Object(s.a)(fs,["typed","matrix","lup","slu","usolve","lsolve","DenseMatrix"],(function(t){var e=t.typed,n=t.matrix,i=t.lup,o=t.slu,a=t.usolve,s=t.lsolve,u=Hr({DenseMatrix:t.DenseMatrix});return e(fs,{"Array, Array | Matrix":function(t,e){t=n(t);var r=i(t);return c(r.L,r.U,r.p,null,e).valueOf()},"DenseMatrix, Array | Matrix":function(t,e){var n=i(t);return c(n.L,n.U,n.p,null,e)},"SparseMatrix, Array | Matrix":function(t,e){var n=i(t);return c(n.L,n.U,n.p,null,e)},"SparseMatrix, Array | Matrix, number, number":function(t,e,n,r){var i=o(t,n,r);return c(i.L,i.U,i.p,i.q,e)},"Object, Array | Matrix":function(t,e){return c(t.L,t.U,t.p,t.q,e)}});function l(t){if(Object(r.v)(t))return t;if(Object(r.b)(t))return n(t);throw new TypeError("Invalid Matrix LU decomposition")}function c(t,e,n,r,i){t=l(t),e=l(e),i=u(t,i,!1),n&&(i._data=cs(n,i._data));var o=s(t,i),c=a(e,o);return r&&(c._data=cs(r,c._data)),c}})),ds=Object(s.a)("Help",["parse"],(function(t){var e=t.parse;function n(t){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(!t)throw new Error('Argument "doc" missing');this.doc=t}return n.prototype.type="Help",n.prototype.isHelp=!0,n.prototype.toString=function(){var t=this.doc||{},n="\n";if(t.name&&(n+="Name: "+t.name+"\n\n"),t.category&&(n+="Category: "+t.category+"\n\n"),t.description&&(n+="Description:\n "+t.description+"\n\n"),t.syntax&&(n+="Syntax:\n "+t.syntax.join("\n ")+"\n\n"),t.examples){n+="Examples:\n";for(var i={},o=0;o<t.examples.length;o++){var a=t.examples[o];n+=" "+a+"\n";var s=void 0;try{s=e(a).compile().evaluate(i)}catch(t){s=t}void 0===s||Object(r.s)(s)||(n+=" "+Object(E.d)(s,{precision:14})+"\n")}n+="\n"}return t.seealso&&t.seealso.length&&(n+="See also: "+t.seealso.join(", ")+"\n"),n},n.prototype.toJSON=function(){var t=Object(k.a)(this.doc);return t.mathjs="Help",t},n.fromJSON=function(t){var e={};return Object.keys(t).filter((function(t){return"mathjs"!==t})).forEach((function(n){e[n]=t[n]})),new n(e)},n.prototype.valueOf=n.prototype.toString,n}),{isClass:!0}),ps=Object(s.a)("Chain",["?on","math"],(function(t){var e=t.on,n=t.math;function i(t){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");Object(r.h)(t)?this.value=t.value:this.value=t}function o(t,e){Object(k.h)(i.prototype,t,(function(){var t=e();if("function"==typeof t)return a(t)}))}function a(t){return function(){for(var e=[this.value],n=0;n<arguments.length;n++)e[n+1]=arguments[n];return new i(t.apply(t,e))}}i.prototype.type="Chain",i.prototype.isChain=!0,i.prototype.done=function(){return this.value},i.prototype.valueOf=function(){return this.value},i.prototype.toString=function(){return Object(E.d)(this.value)},i.prototype.toJSON=function(){return{mathjs:"Chain",value:this.value}},i.fromJSON=function(t){return new i(t.value)},i.createProxy=function(t,e){if("string"==typeof t)r=t,"function"==typeof(u=e)&&(i.prototype[r]=a(u));else for(var n in t)!function(e){Object(k.f)(t,e)&&void 0===s[e]&&o(e,(function(){return t[e]}))}(n);var r,u};var s={expression:!0,docs:!0,type:!0,classes:!0,json:!0,error:!0,isChain:!0};return i.createProxy(n),e&&e("import",(function(t,e,n){n||o(t,e)})),i}),{isClass:!0}),ms={name:"pi",category:"Constants",syntax:["pi"],description:"The number pi is a mathematical constant that is the ratio of a circle's circumference to its diameter, and is approximately equal to 3.14159",examples:["pi","sin(pi/2)"],seealso:["tau"]},gs={name:"e",category:"Constants",syntax:["e"],description:"Euler's number, the base of the natural logarithm. Approximately equal to 2.71828",examples:["e","e ^ 2","exp(2)","log(e)"],seealso:["exp"]},vs={bignumber:{name:"bignumber",category:"Construction",syntax:["bignumber(x)"],description:"Create a big number from a number or string.",examples:["0.1 + 0.2","bignumber(0.1) + bignumber(0.2)",'bignumber("7.2")','bignumber("7.2e500")',"bignumber([0.1, 0.2, 0.3])"],seealso:["boolean","complex","fraction","index","matrix","string","unit"]},boolean:{name:"boolean",category:"Construction",syntax:["x","boolean(x)"],description:"Convert a string or number into a boolean.",examples:["boolean(0)","boolean(1)","boolean(3)",'boolean("true")','boolean("false")',"boolean([1, 0, 1, 1])"],seealso:["bignumber","complex","index","matrix","number","string","unit"]},complex:{name:"complex",category:"Construction",syntax:["complex()","complex(re, im)","complex(string)"],description:"Create a complex number.",examples:["complex()","complex(2, 3)",'complex("7 - 2i")'],seealso:["bignumber","boolean","index","matrix","number","string","unit"]},createUnit:{name:"createUnit",category:"Construction",syntax:["createUnit(definitions)","createUnit(name, definition)"],description:"Create a user-defined unit and register it with the Unit type.",examples:['createUnit("foo")','createUnit("knot", {definition: "0.514444444 m/s", aliases: ["knots", "kt", "kts"]})','createUnit("mph", "1 mile/hour")'],seealso:["unit","splitUnit"]},fraction:{name:"fraction",category:"Construction",syntax:["fraction(num)","fraction(num,den)"],description:"Create a fraction from a number or from a numerator and denominator.",examples:["fraction(0.125)","fraction(1, 3) + fraction(2, 5)"],seealso:["bignumber","boolean","complex","index","matrix","string","unit"]},index:{name:"index",category:"Construction",syntax:["[start]","[start:end]","[start:step:end]","[start1, start 2, ...]","[start1:end1, start2:end2, ...]","[start1:step1:end1, start2:step2:end2, ...]"],description:"Create an index to get or replace a subset of a matrix",examples:["[]","[1, 2, 3]","A = [1, 2, 3; 4, 5, 6]","A[1, :]","A[1, 2] = 50","A[0:2, 0:2] = ones(2, 2)"],seealso:["bignumber","boolean","complex","matrix,","number","range","string","unit"]},matrix:{name:"matrix",category:"Construction",syntax:["[]","[a1, b1, ...; a2, b2, ...]","matrix()",'matrix("dense")',"matrix([...])"],description:"Create a matrix.",examples:["[]","[1, 2, 3]","[1, 2, 3; 4, 5, 6]","matrix()","matrix([3, 4])",'matrix([3, 4; 5, 6], "sparse")','matrix([3, 4; 5, 6], "sparse", "number")'],seealso:["bignumber","boolean","complex","index","number","string","unit","sparse"]},number:{name:"number",category:"Construction",syntax:["x","number(x)","number(unit, valuelessUnit)"],description:"Create a number or convert a string or boolean into a number.",examples:["2","2e3","4.05","number(2)",'number("7.2")',"number(true)","number([true, false, true, true])",'number(unit("52cm"), "m")'],seealso:["bignumber","boolean","complex","fraction","index","matrix","string","unit"]},sparse:{name:"sparse",category:"Construction",syntax:["sparse()","sparse([a1, b1, ...; a1, b2, ...])",'sparse([a1, b1, ...; a1, b2, ...], "number")'],description:"Create a sparse matrix.",examples:["sparse()","sparse([3, 4; 5, 6])",'sparse([3, 0; 5, 0], "number")'],seealso:["bignumber","boolean","complex","index","number","string","unit","matrix"]},splitUnit:{name:"splitUnit",category:"Construction",syntax:["splitUnit(unit: Unit, parts: Unit[])"],description:"Split a unit in an array of units whose sum is equal to the original unit.",examples:['splitUnit(1 m, ["feet", "inch"])'],seealso:["unit","createUnit"]},string:{name:"string",category:"Construction",syntax:['"text"',"string(x)"],description:"Create a string or convert a value to a string",examples:['"Hello World!"',"string(4.2)","string(3 + 2i)"],seealso:["bignumber","boolean","complex","index","matrix","number","unit"]},unit:{name:"unit",category:"Construction",syntax:["value unit","unit(value, unit)","unit(string)"],description:"Create a unit.",examples:["5.5 mm","3 inch",'unit(7.1, "kilogram")','unit("23 deg")'],seealso:["bignumber","boolean","complex","index","matrix","number","string"]},e:gs,E:gs,false:{name:"false",category:"Constants",syntax:["false"],description:"Boolean value false",examples:["false"],seealso:["true"]},i:{name:"i",category:"Constants",syntax:["i"],description:"Imaginary unit, defined as i*i=-1. A complex number is described as a + b*i, where a is the real part, and b is the imaginary part.",examples:["i","i * i","sqrt(-1)"],seealso:[]},Infinity:{name:"Infinity",category:"Constants",syntax:["Infinity"],description:"Infinity, a number which is larger than the maximum number that can be handled by a floating point number.",examples:["Infinity","1 / 0"],seealso:[]},LN2:{name:"LN2",category:"Constants",syntax:["LN2"],description:"Returns the natural logarithm of 2, approximately equal to 0.693",examples:["LN2","log(2)"],seealso:[]},LN10:{name:"LN10",category:"Constants",syntax:["LN10"],description:"Returns the natural logarithm of 10, approximately equal to 2.302",examples:["LN10","log(10)"],seealso:[]},LOG2E:{name:"LOG2E",category:"Constants",syntax:["LOG2E"],description:"Returns the base-2 logarithm of E, approximately equal to 1.442",examples:["LOG2E","log(e, 2)"],seealso:[]},LOG10E:{name:"LOG10E",category:"Constants",syntax:["LOG10E"],description:"Returns the base-10 logarithm of E, approximately equal to 0.434",examples:["LOG10E","log(e, 10)"],seealso:[]},NaN:{name:"NaN",category:"Constants",syntax:["NaN"],description:"Not a number",examples:["NaN","0 / 0"],seealso:[]},null:{name:"null",category:"Constants",syntax:["null"],description:"Value null",examples:["null"],seealso:["true","false"]},pi:ms,PI:ms,phi:{name:"phi",category:"Constants",syntax:["phi"],description:"Phi is the golden ratio. Two quantities are in the golden ratio if their ratio is the same as the ratio of their sum to the larger of the two quantities. Phi is defined as `(1 + sqrt(5)) / 2` and is approximately 1.618034...",examples:["phi"],seealso:[]},SQRT1_2:{name:"SQRT1_2",category:"Constants",syntax:["SQRT1_2"],description:"Returns the square root of 1/2, approximately equal to 0.707",examples:["SQRT1_2","sqrt(1/2)"],seealso:[]},SQRT2:{name:"SQRT2",category:"Constants",syntax:["SQRT2"],description:"Returns the square root of 2, approximately equal to 1.414",examples:["SQRT2","sqrt(2)"],seealso:[]},tau:{name:"tau",category:"Constants",syntax:["tau"],description:"Tau is the ratio constant of a circle's circumference to radius, equal to 2 * pi, approximately 6.2832.",examples:["tau","2 * pi"],seealso:["pi"]},true:{name:"true",category:"Constants",syntax:["true"],description:"Boolean value true",examples:["true"],seealso:["false"]},version:{name:"version",category:"Constants",syntax:["version"],description:"A string with the version number of math.js",examples:["version"],seealso:[]},speedOfLight:{description:"Speed of light in vacuum",examples:["speedOfLight"]},gravitationConstant:{description:"Newtonian constant of gravitation",examples:["gravitationConstant"]},planckConstant:{description:"Planck constant",examples:["planckConstant"]},reducedPlanckConstant:{description:"Reduced Planck constant",examples:["reducedPlanckConstant"]},magneticConstant:{description:"Magnetic constant (vacuum permeability)",examples:["magneticConstant"]},electricConstant:{description:"Electric constant (vacuum permeability)",examples:["electricConstant"]},vacuumImpedance:{description:"Characteristic impedance of vacuum",examples:["vacuumImpedance"]},coulomb:{description:"Coulomb's constant",examples:["coulomb"]},elementaryCharge:{description:"Elementary charge",examples:["elementaryCharge"]},bohrMagneton:{description:"Borh magneton",examples:["bohrMagneton"]},conductanceQuantum:{description:"Conductance quantum",examples:["conductanceQuantum"]},inverseConductanceQuantum:{description:"Inverse conductance quantum",examples:["inverseConductanceQuantum"]},magneticFluxQuantum:{description:"Magnetic flux quantum",examples:["magneticFluxQuantum"]},nuclearMagneton:{description:"Nuclear magneton",examples:["nuclearMagneton"]},klitzing:{description:"Von Klitzing constant",examples:["klitzing"]},bohrRadius:{description:"Borh radius",examples:["bohrRadius"]},classicalElectronRadius:{description:"Classical electron radius",examples:["classicalElectronRadius"]},electronMass:{description:"Electron mass",examples:["electronMass"]},fermiCoupling:{description:"Fermi coupling constant",examples:["fermiCoupling"]},fineStructure:{description:"Fine-structure constant",examples:["fineStructure"]},hartreeEnergy:{description:"Hartree energy",examples:["hartreeEnergy"]},protonMass:{description:"Proton mass",examples:["protonMass"]},deuteronMass:{description:"Deuteron Mass",examples:["deuteronMass"]},neutronMass:{description:"Neutron mass",examples:["neutronMass"]},quantumOfCirculation:{description:"Quantum of circulation",examples:["quantumOfCirculation"]},rydberg:{description:"Rydberg constant",examples:["rydberg"]},thomsonCrossSection:{description:"Thomson cross section",examples:["thomsonCrossSection"]},weakMixingAngle:{description:"Weak mixing angle",examples:["weakMixingAngle"]},efimovFactor:{description:"Efimov factor",examples:["efimovFactor"]},atomicMass:{description:"Atomic mass constant",examples:["atomicMass"]},avogadro:{description:"Avogadro's number",examples:["avogadro"]},boltzmann:{description:"Boltzmann constant",examples:["boltzmann"]},faraday:{description:"Faraday constant",examples:["faraday"]},firstRadiation:{description:"First radiation constant",examples:["firstRadiation"]},loschmidt:{description:"Loschmidt constant at T=273.15 K and p=101.325 kPa",examples:["loschmidt"]},gasConstant:{description:"Gas constant",examples:["gasConstant"]},molarPlanckConstant:{description:"Molar Planck constant",examples:["molarPlanckConstant"]},molarVolume:{description:"Molar volume of an ideal gas at T=273.15 K and p=101.325 kPa",examples:["molarVolume"]},sackurTetrode:{description:"Sackur-Tetrode constant at T=1 K and p=101.325 kPa",examples:["sackurTetrode"]},secondRadiation:{description:"Second radiation constant",examples:["secondRadiation"]},stefanBoltzmann:{description:"Stefan-Boltzmann constant",examples:["stefanBoltzmann"]},wienDisplacement:{description:"Wien displacement law constant",examples:["wienDisplacement"]},molarMass:{description:"Molar mass constant",examples:["molarMass"]},molarMassC12:{description:"Molar mass constant of carbon-12",examples:["molarMassC12"]},gravity:{description:"Standard acceleration of gravity (standard acceleration of free-fall on Earth)",examples:["gravity"]},planckLength:{description:"Planck length",examples:["planckLength"]},planckMass:{description:"Planck mass",examples:["planckMass"]},planckTime:{description:"Planck time",examples:["planckTime"]},planckCharge:{description:"Planck charge",examples:["planckCharge"]},planckTemperature:{description:"Planck temperature",examples:["planckTemperature"]},derivative:{name:"derivative",category:"Algebra",syntax:["derivative(expr, variable)","derivative(expr, variable, {simplify: boolean})"],description:"Takes the derivative of an expression expressed in parser Nodes. The derivative will be taken over the supplied variable in the second parameter. If there are multiple variables in the expression, it will return a partial derivative.",examples:['derivative("2x^3", "x")','derivative("2x^3", "x", {simplify: false})','derivative("2x^2 + 3x + 4", "x")','derivative("sin(2x)", "x")','f = parse("x^2 + x")','x = parse("x")',"df = derivative(f, x)","df.evaluate({x: 3})"],seealso:["simplify","parse","evaluate"]},lsolve:{name:"lsolve",category:"Algebra",syntax:["x=lsolve(L, b)"],description:"Solves the linear system L * x = b where L is an [n x n] lower triangular matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lsolve(a, b)"],seealso:["lup","lusolve","usolve","matrix","sparse"]},lup:{name:"lup",category:"Algebra",syntax:["lup(m)"],description:"Calculate the Matrix LU decomposition with partial pivoting. Matrix A is decomposed in three matrices (L, U, P) where P * A = L * U",examples:["lup([[2, 1], [1, 4]])","lup(matrix([[2, 1], [1, 4]]))","lup(sparse([[2, 1], [1, 4]]))"],seealso:["lusolve","lsolve","usolve","matrix","sparse","slu","qr"]},lusolve:{name:"lusolve",category:"Algebra",syntax:["x=lusolve(A, b)","x=lusolve(lu, b)"],description:"Solves the linear system A * x = b where A is an [n x n] matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lusolve(a, b)"],seealso:["lup","slu","lsolve","usolve","matrix","sparse"]},simplify:{name:"simplify",category:"Algebra",syntax:["simplify(expr)","simplify(expr, rules)"],description:"Simplify an expression tree.",examples:['simplify("3 + 2 / 4")','simplify("2x + x")','f = parse("x * (x + 2 + x)")',"simplified = simplify(f)","simplified.evaluate({x: 2})"],seealso:["derivative","parse","evaluate"]},rationalize:{name:"rationalize",category:"Algebra",syntax:["rationalize(expr)","rationalize(expr, scope)","rationalize(expr, scope, detailed)"],description:"Transform a rationalizable expression in a rational fraction. If rational fraction is one variable polynomial then converts the numerator and denominator in canonical form, with decreasing exponents, returning the coefficients of numerator.",examples:['rationalize("2x/y - y/(x+1)")','rationalize("2x/y - y/(x+1)", true)'],seealso:["simplify"]},slu:{name:"slu",category:"Algebra",syntax:["slu(A, order, threshold)"],description:"Calculate the Matrix LU decomposition with full pivoting. Matrix A is decomposed in two matrices (L, U) and two permutation vectors (pinv, q) where P * A * Q = L * U",examples:["slu(sparse([4.5, 0, 3.2, 0; 3.1, 2.9, 0, 0.9; 0, 1.7, 3, 0; 3.5, 0.4, 0, 1]), 1, 0.001)"],seealso:["lusolve","lsolve","usolve","matrix","sparse","lup","qr"]},usolve:{name:"usolve",category:"Algebra",syntax:["x=usolve(U, b)"],description:"Solves the linear system U * x = b where U is an [n x n] upper triangular matrix and b is a [n] column vector.",examples:["x=usolve(sparse([1, 1, 1, 1; 0, 1, 1, 1; 0, 0, 1, 1; 0, 0, 0, 1]), [1; 2; 3; 4])"],seealso:["lup","lusolve","lsolve","matrix","sparse"]},qr:{name:"qr",category:"Algebra",syntax:["qr(A)"],description:"Calculates the Matrix QR decomposition. Matrix `A` is decomposed in two matrices (`Q`, `R`) where `Q` is an orthogonal matrix and `R` is an upper triangular matrix.",examples:["qr([[1, -1, 4], [1, 4, -2], [1, 4, 2], [1, -1, 0]])"],seealso:["lup","slu","matrix"]},abs:{name:"abs",category:"Arithmetic",syntax:["abs(x)"],description:"Compute the absolute value.",examples:["abs(3.5)","abs(-4.2)"],seealso:["sign"]},add:{name:"add",category:"Operators",syntax:["x + y","add(x, y)"],description:"Add two values.",examples:["a = 2.1 + 3.6","a - 3.6","3 + 2i","3 cm + 2 inch",'"2.3" + "4"'],seealso:["subtract"]},cbrt:{name:"cbrt",category:"Arithmetic",syntax:["cbrt(x)","cbrt(x, allRoots)"],description:"Compute the cubic root value. If x = y * y * y, then y is the cubic root of x. When `x` is a number or complex number, an optional second argument `allRoots` can be provided to return all three cubic roots. If not provided, the principal root is returned",examples:["cbrt(64)","cube(4)","cbrt(-8)","cbrt(2 + 3i)","cbrt(8i)","cbrt(8i, true)","cbrt(27 m^3)"],seealso:["square","sqrt","cube","multiply"]},ceil:{name:"ceil",category:"Arithmetic",syntax:["ceil(x)"],description:"Round a value towards plus infinity. If x is complex, both real and imaginary part are rounded towards plus infinity.",examples:["ceil(3.2)","ceil(3.8)","ceil(-4.2)"],seealso:["floor","fix","round"]},cube:{name:"cube",category:"Arithmetic",syntax:["cube(x)"],description:"Compute the cube of a value. The cube of x is x * x * x.",examples:["cube(2)","2^3","2 * 2 * 2"],seealso:["multiply","square","pow"]},divide:{name:"divide",category:"Operators",syntax:["x / y","divide(x, y)"],description:"Divide two values.",examples:["a = 2 / 3","a * 3","4.5 / 2","3 + 4 / 2","(3 + 4) / 2","18 km / 4.5"],seealso:["multiply"]},dotDivide:{name:"dotDivide",category:"Operators",syntax:["x ./ y","dotDivide(x, y)"],description:"Divide two values element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","b = [2, 1, 1; 3, 2, 5]","a ./ b"],seealso:["multiply","dotMultiply","divide"]},dotMultiply:{name:"dotMultiply",category:"Operators",syntax:["x .* y","dotMultiply(x, y)"],description:"Multiply two values element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","b = [2, 1, 1; 3, 2, 5]","a .* b"],seealso:["multiply","divide","dotDivide"]},dotPow:{name:"dotPow",category:"Operators",syntax:["x .^ y","dotPow(x, y)"],description:"Calculates the power of x to y element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","a .^ 2"],seealso:["pow"]},exp:{name:"exp",category:"Arithmetic",syntax:["exp(x)"],description:"Calculate the exponent of a value.",examples:["exp(1.3)","e ^ 1.3","log(exp(1.3))","x = 2.4","(exp(i*x) == cos(x) + i*sin(x)) # Euler's formula"],seealso:["expm","expm1","pow","log"]},expm:{name:"expm",category:"Arithmetic",syntax:["exp(x)"],description:"Compute the matrix exponential, expm(A) = e^A. The matrix must be square. Not to be confused with exp(a), which performs element-wise exponentiation.",examples:["expm([[0,2],[0,0]])"],seealso:["exp"]},expm1:{name:"expm1",category:"Arithmetic",syntax:["expm1(x)"],description:"Calculate the value of subtracting 1 from the exponential value.",examples:["expm1(2)","pow(e, 2) - 1","log(expm1(2) + 1)"],seealso:["exp","pow","log"]},fix:{name:"fix",category:"Arithmetic",syntax:["fix(x)"],description:"Round a value towards zero. If x is complex, both real and imaginary part are rounded towards zero.",examples:["fix(3.2)","fix(3.8)","fix(-4.2)","fix(-4.8)"],seealso:["ceil","floor","round"]},floor:{name:"floor",category:"Arithmetic",syntax:["floor(x)"],description:"Round a value towards minus infinity.If x is complex, both real and imaginary part are rounded towards minus infinity.",examples:["floor(3.2)","floor(3.8)","floor(-4.2)"],seealso:["ceil","fix","round"]},gcd:{name:"gcd",category:"Arithmetic",syntax:["gcd(a, b)","gcd(a, b, c, ...)"],description:"Compute the greatest common divisor.",examples:["gcd(8, 12)","gcd(-4, 6)","gcd(25, 15, -10)"],seealso:["lcm","xgcd"]},hypot:{name:"hypot",category:"Arithmetic",syntax:["hypot(a, b, c, ...)","hypot([a, b, c, ...])"],description:"Calculate the hypotenusa of a list with values. ",examples:["hypot(3, 4)","sqrt(3^2 + 4^2)","hypot(-2)","hypot([3, 4, 5])"],seealso:["abs","norm"]},lcm:{name:"lcm",category:"Arithmetic",syntax:["lcm(x, y)"],description:"Compute the least common multiple.",examples:["lcm(4, 6)","lcm(6, 21)","lcm(6, 21, 5)"],seealso:["gcd"]},log:{name:"log",category:"Arithmetic",syntax:["log(x)","log(x, base)"],description:"Compute the logarithm of a value. If no base is provided, the natural logarithm of x is calculated. If base if provided, the logarithm is calculated for the specified base. log(x, base) is defined as log(x) / log(base).",examples:["log(3.5)","a = log(2.4)","exp(a)","10 ^ 4","log(10000, 10)","log(10000) / log(10)","b = log(1024, 2)","2 ^ b"],seealso:["exp","log1p","log2","log10"]},log2:{name:"log2",category:"Arithmetic",syntax:["log2(x)"],description:"Calculate the 2-base of a value. This is the same as calculating `log(x, 2)`.",examples:["log2(0.03125)","log2(16)","log2(16) / log2(2)","pow(2, 4)"],seealso:["exp","log1p","log","log10"]},log1p:{name:"log1p",category:"Arithmetic",syntax:["log1p(x)","log1p(x, base)"],description:"Calculate the logarithm of a `value+1`",examples:["log1p(2.5)","exp(log1p(1.4))","pow(10, 4)","log1p(9999, 10)","log1p(9999) / log(10)"],seealso:["exp","log","log2","log10"]},log10:{name:"log10",category:"Arithmetic",syntax:["log10(x)"],description:"Compute the 10-base logarithm of a value.",examples:["log10(0.00001)","log10(10000)","10 ^ 4","log(10000) / log(10)","log(10000, 10)"],seealso:["exp","log"]},mod:{name:"mod",category:"Operators",syntax:["x % y","x mod y","mod(x, y)"],description:"Calculates the modulus, the remainder of an integer division.",examples:["7 % 3","11 % 2","10 mod 4","isOdd(x) = x % 2","isOdd(2)","isOdd(3)"],seealso:["divide"]},multiply:{name:"multiply",category:"Operators",syntax:["x * y","multiply(x, y)"],description:"multiply two values.",examples:["a = 2.1 * 3.4","a / 3.4","2 * 3 + 4","2 * (3 + 4)","3 * 2.1 km"],seealso:["divide"]},norm:{name:"norm",category:"Arithmetic",syntax:["norm(x)","norm(x, p)"],description:"Calculate the norm of a number, vector or matrix.",examples:["abs(-3.5)","norm(-3.5)","norm(3 - 4i)","norm([1, 2, -3], Infinity)","norm([1, 2, -3], -Infinity)","norm([3, 4], 2)","norm([[1, 2], [3, 4]], 1)",'norm([[1, 2], [3, 4]], "inf")','norm([[1, 2], [3, 4]], "fro")']},nthRoot:{name:"nthRoot",category:"Arithmetic",syntax:["nthRoot(a)","nthRoot(a, root)"],description:'Calculate the nth root of a value. The principal nth root of a positive real number A, is the positive real solution of the equation "x^root = A".',examples:["4 ^ 3","nthRoot(64, 3)","nthRoot(9, 2)","sqrt(9)"],seealso:["nthRoots","pow","sqrt"]},nthRoots:{name:"nthRoots",category:"Arithmetic",syntax:["nthRoots(A)","nthRoots(A, root)"],description:'Calculate the nth roots of a value. An nth root of a positive real number A, is a positive real solution of the equation "x^root = A". This function returns an array of complex values.',examples:["nthRoots(1)","nthRoots(1, 3)"],seealso:["sqrt","pow","nthRoot"]},pow:{name:"pow",category:"Operators",syntax:["x ^ y","pow(x, y)"],description:"Calculates the power of x to y, x^y.",examples:["2^3","2*2*2","1 + e ^ (pi * i)"],seealso:["multiply","nthRoot","nthRoots","sqrt"]},round:{name:"round",category:"Arithmetic",syntax:["round(x)","round(x, n)"],description:"round a value towards the nearest integer.If x is complex, both real and imaginary part are rounded towards the nearest integer. When n is specified, the value is rounded to n decimals.",examples:["round(3.2)","round(3.8)","round(-4.2)","round(-4.8)","round(pi, 3)","round(123.45678, 2)"],seealso:["ceil","floor","fix"]},sign:{name:"sign",category:"Arithmetic",syntax:["sign(x)"],description:"Compute the sign of a value. The sign of a value x is 1 when x>1, -1 when x<0, and 0 when x=0.",examples:["sign(3.5)","sign(-4.2)","sign(0)"],seealso:["abs"]},sqrt:{name:"sqrt",category:"Arithmetic",syntax:["sqrt(x)"],description:"Compute the square root value. If x = y * y, then y is the square root of x.",examples:["sqrt(25)","5 * 5","sqrt(-1)"],seealso:["square","sqrtm","multiply","nthRoot","nthRoots","pow"]},sqrtm:{name:"sqrtm",category:"Arithmetic",syntax:["sqrtm(x)"],description:"Calculate the principal square root of a square matrix. The principal square root matrix `X` of another matrix `A` is such that `X * X = A`.",examples:["sqrtm([[1, 2], [3, 4]])"],seealso:["sqrt","abs","square","multiply"]},square:{name:"square",category:"Arithmetic",syntax:["square(x)"],description:"Compute the square of a value. The square of x is x * x.",examples:["square(3)","sqrt(9)","3^2","3 * 3"],seealso:["multiply","pow","sqrt","cube"]},subtract:{name:"subtract",category:"Operators",syntax:["x - y","subtract(x, y)"],description:"subtract two values.",examples:["a = 5.3 - 2","a + 2","2/3 - 1/6","2 * 3 - 3","2.1 km - 500m"],seealso:["add"]},unaryMinus:{name:"unaryMinus",category:"Operators",syntax:["-x","unaryMinus(x)"],description:"Inverse the sign of a value. Converts booleans and strings to numbers.",examples:["-4.5","-(-5.6)",'-"22"'],seealso:["add","subtract","unaryPlus"]},unaryPlus:{name:"unaryPlus",category:"Operators",syntax:["+x","unaryPlus(x)"],description:"Converts booleans and strings to numbers.",examples:["+true",'+"2"'],seealso:["add","subtract","unaryMinus"]},xgcd:{name:"xgcd",category:"Arithmetic",syntax:["xgcd(a, b)"],description:"Calculate the extended greatest common divisor for two values. The result is an array [d, x, y] with 3 entries, where d is the greatest common divisor, and d = x * a + y * b.",examples:["xgcd(8, 12)","gcd(8, 12)","xgcd(36163, 21199)"],seealso:["gcd","lcm"]},bitAnd:{name:"bitAnd",category:"Bitwise",syntax:["x & y","bitAnd(x, y)"],description:"Bitwise AND operation. Performs the logical AND operation on each pair of the corresponding bits of the two given values by multiplying them. If both bits in the compared position are 1, the bit in the resulting binary representation is 1, otherwise, the result is 0",examples:["5 & 3","bitAnd(53, 131)","[1, 12, 31] & 42"],seealso:["bitNot","bitOr","bitXor","leftShift","rightArithShift","rightLogShift"]},bitNot:{name:"bitNot",category:"Bitwise",syntax:["~x","bitNot(x)"],description:"Bitwise NOT operation. Performs a logical negation on each bit of the given value. Bits that are 0 become 1, and those that are 1 become 0.",examples:["~1","~2","bitNot([2, -3, 4])"],seealso:["bitAnd","bitOr","bitXor","leftShift","rightArithShift","rightLogShift"]},bitOr:{name:"bitOr",category:"Bitwise",syntax:["x | y","bitOr(x, y)"],description:"Bitwise OR operation. Performs the logical inclusive OR operation on each pair of corresponding bits of the two given values. The result in each position is 1 if the first bit is 1 or the second bit is 1 or both bits are 1, otherwise, the result is 0.",examples:["5 | 3","bitOr([1, 2, 3], 4)"],seealso:["bitAnd","bitNot","bitXor","leftShift","rightArithShift","rightLogShift"]},bitXor:{name:"bitXor",category:"Bitwise",syntax:["bitXor(x, y)"],description:"Bitwise XOR operation, exclusive OR. Performs the logical exclusive OR operation on each pair of corresponding bits of the two given values. The result in each position is 1 if only the first bit is 1 or only the second bit is 1, but will be 0 if both are 0 or both are 1.",examples:["bitOr(1, 2)","bitXor([2, 3, 4], 4)"],seealso:["bitAnd","bitNot","bitOr","leftShift","rightArithShift","rightLogShift"]},leftShift:{name:"leftShift",category:"Bitwise",syntax:["x << y","leftShift(x, y)"],description:"Bitwise left logical shift of a value x by y number of bits.",examples:["4 << 1","8 >> 1"],seealso:["bitAnd","bitNot","bitOr","bitXor","rightArithShift","rightLogShift"]},rightArithShift:{name:"rightArithShift",category:"Bitwise",syntax:["x >> y","rightArithShift(x, y)"],description:"Bitwise right arithmetic shift of a value x by y number of bits.",examples:["8 >> 1","4 << 1","-12 >> 2"],seealso:["bitAnd","bitNot","bitOr","bitXor","leftShift","rightLogShift"]},rightLogShift:{name:"rightLogShift",category:"Bitwise",syntax:["x >>> y","rightLogShift(x, y)"],description:"Bitwise right logical shift of a value x by y number of bits.",examples:["8 >>> 1","4 << 1","-12 >>> 2"],seealso:["bitAnd","bitNot","bitOr","bitXor","leftShift","rightArithShift"]},bellNumbers:{name:"bellNumbers",category:"Combinatorics",syntax:["bellNumbers(n)"],description:"The Bell Numbers count the number of partitions of a set. A partition is a pairwise disjoint subset of S whose union is S. `bellNumbers` only takes integer arguments. The following condition must be enforced: n >= 0.",examples:["bellNumbers(3)","bellNumbers(8)"],seealso:["stirlingS2"]},catalan:{name:"catalan",category:"Combinatorics",syntax:["catalan(n)"],description:"The Catalan Numbers enumerate combinatorial structures of many different types. catalan only takes integer arguments. The following condition must be enforced: n >= 0.",examples:["catalan(3)","catalan(8)"],seealso:["bellNumbers"]},composition:{name:"composition",category:"Combinatorics",syntax:["composition(n, k)"],description:"The composition counts of n into k parts. composition only takes integer arguments. The following condition must be enforced: k <= n.",examples:["composition(5, 3)"],seealso:["combinations"]},stirlingS2:{name:"stirlingS2",category:"Combinatorics",syntax:["stirlingS2(n, k)"],description:"he Stirling numbers of the second kind, counts the number of ways to partition a set of n labelled objects into k nonempty unlabelled subsets. `stirlingS2` only takes integer arguments. The following condition must be enforced: k <= n. If n = k or k = 1, then s(n,k) = 1.",examples:["stirlingS2(5, 3)"],seealso:["bellNumbers"]},config:{name:"config",category:"Core",syntax:["config()","config(options)"],description:"Get configuration or change configuration.",examples:["config()","1/3 + 1/4",'config({number: "Fraction"})',"1/3 + 1/4"],seealso:[]},import:{name:"import",category:"Core",syntax:["import(functions)","import(functions, options)"],description:"Import functions or constants from an object.",examples:["import({myFn: f(x)=x^2, myConstant: 32 })","myFn(2)","myConstant"],seealso:[]},typed:{name:"typed",category:"Core",syntax:["typed(signatures)","typed(name, signatures)"],description:"Create a typed function.",examples:['double = typed({ "number, number": f(x)=x+x })',"double(2)",'double("hello")'],seealso:[]},arg:{name:"arg",category:"Complex",syntax:["arg(x)"],description:"Compute the argument of a complex value. If x = a+bi, the argument is computed as atan2(b, a).",examples:["arg(2 + 2i)","atan2(3, 2)","arg(2 + 3i)"],seealso:["re","im","conj","abs"]},conj:{name:"conj",category:"Complex",syntax:["conj(x)"],description:"Compute the complex conjugate of a complex value. If x = a+bi, the complex conjugate is a-bi.",examples:["conj(2 + 3i)","conj(2 - 3i)","conj(-5.2i)"],seealso:["re","im","abs","arg"]},re:{name:"re",category:"Complex",syntax:["re(x)"],description:"Get the real part of a complex number.",examples:["re(2 + 3i)","im(2 + 3i)","re(-5.2i)","re(2.4)"],seealso:["im","conj","abs","arg"]},im:{name:"im",category:"Complex",syntax:["im(x)"],description:"Get the imaginary part of a complex number.",examples:["im(2 + 3i)","re(2 + 3i)","im(-5.2i)","im(2.4)"],seealso:["re","conj","abs","arg"]},evaluate:{name:"evaluate",category:"Expression",syntax:["evaluate(expression)","evaluate([expr1, expr2, expr3, ...])"],description:"Evaluate an expression or an array with expressions.",examples:['evaluate("2 + 3")','evaluate("sqrt(" + 4 + ")")'],seealso:[]},help:{name:"help",category:"Expression",syntax:["help(object)","help(string)"],description:"Display documentation on a function or data type.",examples:["help(sqrt)",'help("complex")'],seealso:[]},distance:{name:"distance",category:"Geometry",syntax:["distance([x1, y1], [x2, y2])","distance([[x1, y1], [x2, y2]])"],description:"Calculates the Euclidean distance between two points.",examples:["distance([0,0], [4,4])","distance([[0,0], [4,4]])"],seealso:[]},intersect:{name:"intersect",category:"Geometry",syntax:["intersect(expr1, expr2, expr3, expr4)","intersect(expr1, expr2, expr3)"],description:"Computes the intersection point of lines and/or planes.",examples:["intersect([0, 0], [10, 10], [10, 0], [0, 10])","intersect([1, 0, 1], [4, -2, 2], [1, 1, 1, 6])"],seealso:[]},and:{name:"and",category:"Logical",syntax:["x and y","and(x, y)"],description:"Logical and. Test whether two values are both defined with a nonzero/nonempty value.",examples:["true and false","true and true","2 and 4"],seealso:["not","or","xor"]},not:{name:"not",category:"Logical",syntax:["not x","not(x)"],description:"Logical not. Flips the boolean value of given argument.",examples:["not true","not false","not 2","not 0"],seealso:["and","or","xor"]},or:{name:"or",category:"Logical",syntax:["x or y","or(x, y)"],description:"Logical or. Test if at least one value is defined with a nonzero/nonempty value.",examples:["true or false","false or false","0 or 4"],seealso:["not","and","xor"]},xor:{name:"xor",category:"Logical",syntax:["x xor y","xor(x, y)"],description:"Logical exclusive or, xor. Test whether one and only one value is defined with a nonzero/nonempty value.",examples:["true xor false","false xor false","true xor true","0 xor 4"],seealso:["not","and","or"]},concat:{name:"concat",category:"Matrix",syntax:["concat(A, B, C, ...)","concat(A, B, C, ..., dim)"],description:"Concatenate matrices. By default, the matrices are concatenated by the last dimension. The dimension on which to concatenate can be provided as last argument.",examples:["A = [1, 2; 5, 6]","B = [3, 4; 7, 8]","concat(A, B)","concat(A, B, 1)","concat(A, B, 2)"],seealso:["det","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]},cross:{name:"cross",category:"Matrix",syntax:["cross(A, B)"],description:"Calculate the cross product for two vectors in three dimensional space.",examples:["cross([1, 1, 0], [0, 1, 1])","cross([3, -3, 1], [4, 9, 2])","cross([2, 3, 4], [5, 6, 7])"],seealso:["multiply","dot"]},column:{name:"column",category:"Matrix",syntax:["column(x, index)"],description:"Return a column from a matrix or array.",examples:["A = [[1, 2], [3, 4]]","column(A, 1)","column(A, 2)"],seealso:["row"]},ctranspose:{name:"ctranspose",category:"Matrix",syntax:["x'","ctranspose(x)"],description:"Complex Conjugate and Transpose a matrix",examples:["a = [1, 2, 3; 4, 5, 6]","a'","ctranspose(a)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","zeros"]},det:{name:"det",category:"Matrix",syntax:["det(x)"],description:"Calculate the determinant of a matrix",examples:["det([1, 2; 3, 4])","det([-2, 2, 3; -1, 1, 3; 2, 0, -1])"],seealso:["concat","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]},diag:{name:"diag",category:"Matrix",syntax:["diag(x)","diag(x, k)"],description:"Create a diagonal matrix or retrieve the diagonal of a matrix. When x is a vector, a matrix with the vector values on the diagonal will be returned. When x is a matrix, a vector with the diagonal values of the matrix is returned. When k is provided, the k-th diagonal will be filled in or retrieved, if k is positive, the values are placed on the super diagonal. When k is negative, the values are placed on the sub diagonal.",examples:["diag(1:3)","diag(1:3, 1)","a = [1, 2, 3; 4, 5, 6; 7, 8, 9]","diag(a)"],seealso:["concat","det","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]},dot:{name:"dot",category:"Matrix",syntax:["dot(A, B)","A * B"],description:"Calculate the dot product of two vectors. The dot product of A = [a1, a2, a3, ..., an] and B = [b1, b2, b3, ..., bn] is defined as dot(A, B) = a1 * b1 + a2 * b2 + a3 * b3 + ... + an * bn",examples:["dot([2, 4, 1], [2, 2, 3])","[2, 4, 1] * [2, 2, 3]"],seealso:["multiply","cross"]},getMatrixDataType:{name:"getMatrixDataType",category:"Matrix",syntax:["getMatrixDataType(x)"],description:'Find the data type of all elements in a matrix or array, for example "number" if all items are a number and "Complex" if all values are complex numbers. If a matrix contains more than one data type, it will return "mixed".',examples:["getMatrixDataType([1, 2, 3])","getMatrixDataType([[5 cm], [2 inch]])",'getMatrixDataType([1, "text"])',"getMatrixDataType([1, bignumber(4)])"],seealso:["matrix","sparse","typeOf"]},identity:{name:"identity",category:"Matrix",syntax:["identity(n)","identity(m, n)","identity([m, n])"],description:"Returns the identity matrix with size m-by-n. The matrix has ones on the diagonal and zeros elsewhere.",examples:["identity(3)","identity(3, 5)","a = [1, 2, 3; 4, 5, 6]","identity(size(a))"],seealso:["concat","det","diag","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]},filter:{name:"filter",category:"Matrix",syntax:["filter(x, test)"],description:"Filter items in a matrix.",examples:["isPositive(x) = x > 0","filter([6, -2, -1, 4, 3], isPositive)","filter([6, -2, 0, 1, 0], x != 0)"],seealso:["sort","map","forEach"]},flatten:{name:"flatten",category:"Matrix",syntax:["flatten(x)"],description:"Flatten a multi dimensional matrix into a single dimensional matrix.",examples:["a = [1, 2, 3; 4, 5, 6]","size(a)","b = flatten(a)","size(b)"],seealso:["concat","resize","size","squeeze"]},forEach:{name:"forEach",category:"Matrix",syntax:["forEach(x, callback)"],description:"Iterates over all elements of a matrix/array, and executes the given callback function.",examples:["forEach([1, 2, 3], function(val) { console.log(val) })"],seealso:["map","sort","filter"]},inv:{name:"inv",category:"Matrix",syntax:["inv(x)"],description:"Calculate the inverse of a matrix",examples:["inv([1, 2; 3, 4])","inv(4)","1 / 4"],seealso:["concat","det","diag","identity","ones","range","size","squeeze","subset","trace","transpose","zeros"]},eigs:{name:"eigs",category:"Matrix",syntax:["eigs(x)"],description:"Calculate the eigenvalues and eigenvectors of a real symmetric matrix",examples:["eigs([[5, 2.3], [2.3, 1]])"],seealso:["inv"]},kron:{name:"kron",category:"Matrix",syntax:["kron(x, y)"],description:"Calculates the kronecker product of 2 matrices or vectors.",examples:["kron([[1, 0], [0, 1]], [[1, 2], [3, 4]])","kron([1,1], [2,3,4])"],seealso:["multiply","dot","cross"]},map:{name:"map",category:"Matrix",syntax:["map(x, callback)"],description:"Create a new matrix or array with the results of the callback function executed on each entry of the matrix/array.",examples:["map([1, 2, 3], square)"],seealso:["filter","forEach"]},ones:{name:"ones",category:"Matrix",syntax:["ones(m)","ones(m, n)","ones(m, n, p, ...)","ones([m])","ones([m, n])","ones([m, n, p, ...])"],description:"Create a matrix containing ones.",examples:["ones(3)","ones(3, 5)","ones([2,3]) * 4.5","a = [1, 2, 3; 4, 5, 6]","ones(size(a))"],seealso:["concat","det","diag","identity","inv","range","size","squeeze","subset","trace","transpose","zeros"]},partitionSelect:{name:"partitionSelect",category:"Matrix",syntax:["partitionSelect(x, k)","partitionSelect(x, k, compare)"],description:"Partition-based selection of an array or 1D matrix. Will find the kth smallest value, and mutates the input array. Uses Quickselect.",examples:["partitionSelect([5, 10, 1], 2)",'partitionSelect(["C", "B", "A", "D"], 1)'],seealso:["sort"]},range:{name:"range",category:"Type",syntax:["start:end","start:step:end","range(start, end)","range(start, end, step)","range(string)"],description:"Create a range. Lower bound of the range is included, upper bound is excluded.",examples:["1:5","3:-1:-3","range(3, 7)","range(0, 12, 2)",'range("4:10")',"a = [1, 2, 3, 4; 5, 6, 7, 8]","a[1:2, 1:2]"],seealso:["concat","det","diag","identity","inv","ones","size","squeeze","subset","trace","transpose","zeros"]},resize:{name:"resize",category:"Matrix",syntax:["resize(x, size)","resize(x, size, defaultValue)"],description:"Resize a matrix.",examples:["resize([1,2,3,4,5], [3])","resize([1,2,3], [5])","resize([1,2,3], [5], -1)","resize(2, [2, 3])",'resize("hello", [8], "!")'],seealso:["size","subset","squeeze","reshape"]},reshape:{name:"reshape",category:"Matrix",syntax:["reshape(x, sizes)"],description:"Reshape a multi dimensional array to fit the specified dimensions.",examples:["reshape([1, 2, 3, 4, 5, 6], [2, 3])","reshape([[1, 2], [3, 4]], [1, 4])","reshape([[1, 2], [3, 4]], [4])"],seealso:["size","squeeze","resize"]},row:{name:"row",category:"Matrix",syntax:["row(x, index)"],description:"Return a row from a matrix or array.",examples:["A = [[1, 2], [3, 4]]","row(A, 1)","row(A, 2)"],seealso:["column"]},size:{name:"size",category:"Matrix",syntax:["size(x)"],description:"Calculate the size of a matrix.",examples:["size(2.3)",'size("hello world")',"a = [1, 2; 3, 4; 5, 6]","size(a)","size(1:6)"],seealso:["concat","det","diag","identity","inv","ones","range","squeeze","subset","trace","transpose","zeros"]},sort:{name:"sort",category:"Matrix",syntax:["sort(x)","sort(x, compare)"],description:'Sort the items in a matrix. Compare can be a string "asc", "desc", "natural", or a custom sort function.',examples:["sort([5, 10, 1])",'sort(["C", "B", "A", "D"])',"sortByLength(a, b) = size(a)[1] - size(b)[1]",'sort(["Langdon", "Tom", "Sara"], sortByLength)','sort(["10", "1", "2"], "natural")'],seealso:["map","filter","forEach"]},squeeze:{name:"squeeze",category:"Matrix",syntax:["squeeze(x)"],description:"Remove inner and outer singleton dimensions from a matrix.",examples:["a = zeros(3,2,1)","size(squeeze(a))","b = zeros(1,1,3)","size(squeeze(b))"],seealso:["concat","det","diag","identity","inv","ones","range","size","subset","trace","transpose","zeros"]},subset:{name:"subset",category:"Matrix",syntax:["value(index)","value(index) = replacement","subset(value, [index])","subset(value, [index], replacement)"],description:"Get or set a subset of a matrix or string. Indexes are one-based. Both the ranges lower-bound and upper-bound are included.",examples:["d = [1, 2; 3, 4]","e = []","e[1, 1:2] = [5, 6]","e[2, :] = [7, 8]","f = d * e","f[2, 1]","f[:, 1]"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","trace","transpose","zeros"]},trace:{name:"trace",category:"Matrix",syntax:["trace(A)"],description:"Calculate the trace of a matrix: the sum of the elements on the main diagonal of a square matrix.",examples:["A = [1, 2, 3; -1, 2, 3; 2, 0, 3]","trace(A)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","transpose","zeros"]},transpose:{name:"transpose",category:"Matrix",syntax:["x'","transpose(x)"],description:"Transpose a matrix",examples:["a = [1, 2, 3; 4, 5, 6]","a'","transpose(a)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","zeros"]},zeros:{name:"zeros",category:"Matrix",syntax:["zeros(m)","zeros(m, n)","zeros(m, n, p, ...)","zeros([m])","zeros([m, n])","zeros([m, n, p, ...])"],description:"Create a matrix containing zeros.",examples:["zeros(3)","zeros(3, 5)","a = [1, 2, 3; 4, 5, 6]","zeros(size(a))"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose"]},combinations:{name:"combinations",category:"Probability",syntax:["combinations(n, k)"],description:"Compute the number of combinations of n items taken k at a time",examples:["combinations(7, 5)"],seealso:["combinationsWithRep","permutations","factorial"]},combinationsWithRep:{name:"combinationsWithRep",category:"Probability",syntax:["combinationsWithRep(n, k)"],description:"Compute the number of combinations of n items taken k at a time with replacements.",examples:["combinationsWithRep(7, 5)"],seealso:["combinations","permutations","factorial"]},factorial:{name:"factorial",category:"Probability",syntax:["n!","factorial(n)"],description:"Compute the factorial of a value",examples:["5!","5 * 4 * 3 * 2 * 1","3!"],seealso:["combinations","combinationsWithRep","permutations","gamma"]},gamma:{name:"gamma",category:"Probability",syntax:["gamma(n)"],description:"Compute the gamma function. For small values, the Lanczos approximation is used, and for large values the extended Stirling approximation.",examples:["gamma(4)","3!","gamma(1/2)","sqrt(pi)"],seealso:["factorial"]},kldivergence:{name:"kldivergence",category:"Probability",syntax:["kldivergence(x, y)"],description:"Calculate the Kullback-Leibler (KL) divergence between two distributions.",examples:["kldivergence([0.7,0.5,0.4], [0.2,0.9,0.5])"],seealso:[]},multinomial:{name:"multinomial",category:"Probability",syntax:["multinomial(A)"],description:"Multinomial Coefficients compute the number of ways of picking a1, a2, ..., ai unordered outcomes from `n` possibilities. multinomial takes one array of integers as an argument. The following condition must be enforced: every ai > 0.",examples:["multinomial([1, 2, 1])"],seealso:["combinations","factorial"]},permutations:{name:"permutations",category:"Probability",syntax:["permutations(n)","permutations(n, k)"],description:"Compute the number of permutations of n items taken k at a time",examples:["permutations(5)","permutations(5, 3)"],seealso:["combinations","combinationsWithRep","factorial"]},pickRandom:{name:"pickRandom",category:"Probability",syntax:["pickRandom(array)","pickRandom(array, number)","pickRandom(array, weights)","pickRandom(array, number, weights)","pickRandom(array, weights, number)"],description:"Pick a random entry from a given array.",examples:["pickRandom(0:10)","pickRandom([1, 3, 1, 6])","pickRandom([1, 3, 1, 6], 2)","pickRandom([1, 3, 1, 6], [2, 3, 2, 1])","pickRandom([1, 3, 1, 6], 2, [2, 3, 2, 1])","pickRandom([1, 3, 1, 6], [2, 3, 2, 1], 2)"],seealso:["random","randomInt"]},random:{name:"random",category:"Probability",syntax:["random()","random(max)","random(min, max)","random(size)","random(size, max)","random(size, min, max)"],description:"Return a random number.",examples:["random()","random(10, 20)","random([2, 3])"],seealso:["pickRandom","randomInt"]},randomInt:{name:"randomInt",category:"Probability",syntax:["randomInt(max)","randomInt(min, max)","randomInt(size)","randomInt(size, max)","randomInt(size, min, max)"],description:"Return a random integer number",examples:["randomInt(10, 20)","randomInt([2, 3], 10)"],seealso:["pickRandom","random"]},compare:{name:"compare",category:"Relational",syntax:["compare(x, y)"],description:"Compare two values. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:["compare(2, 3)","compare(3, 2)","compare(2, 2)","compare(5cm, 40mm)","compare(2, [1, 2, 3])"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compareNatural","compareText"]},compareNatural:{name:"compareNatural",category:"Relational",syntax:["compareNatural(x, y)"],description:"Compare two values of any type in a deterministic, natural way. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:["compareNatural(2, 3)","compareNatural(3, 2)","compareNatural(2, 2)","compareNatural(5cm, 40mm)",'compareNatural("2", "10")',"compareNatural(2 + 3i, 2 + 4i)","compareNatural([1, 2, 4], [1, 2, 3])","compareNatural([1, 5], [1, 2, 3])","compareNatural([1, 2], [1, 2])","compareNatural({a: 2}, {a: 4})"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compare","compareText"]},compareText:{name:"compareText",category:"Relational",syntax:["compareText(x, y)"],description:"Compare two strings lexically. Comparison is case sensitive. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:['compareText("B", "A")','compareText("A", "B")','compareText("A", "A")','compareText("2", "10")','compare("2", "10")',"compare(2, 10)",'compareNatural("2", "10")','compareText("B", ["A", "B", "C"])'],seealso:["compare","compareNatural"]},deepEqual:{name:"deepEqual",category:"Relational",syntax:["deepEqual(x, y)"],description:"Check equality of two matrices element wise. Returns true if the size of both matrices is equal and when and each of the elements are equal.",examples:["deepEqual([1,3,4], [1,3,4])","deepEqual([1,3,4], [1,3])"],seealso:["equal","unequal","smaller","larger","smallerEq","largerEq","compare"]},equal:{name:"equal",category:"Relational",syntax:["x == y","equal(x, y)"],description:"Check equality of two values. Returns true if the values are equal, and false if not.",examples:["2+2 == 3","2+2 == 4","a = 3.2","b = 6-2.8","a == b","50cm == 0.5m"],seealso:["unequal","smaller","larger","smallerEq","largerEq","compare","deepEqual","equalText"]},equalText:{name:"equalText",category:"Relational",syntax:["equalText(x, y)"],description:"Check equality of two strings. Comparison is case sensitive. Returns true if the values are equal, and false if not.",examples:['equalText("Hello", "Hello")','equalText("a", "A")','equal("2e3", "2000")','equalText("2e3", "2000")','equalText("B", ["A", "B", "C"])'],seealso:["compare","compareNatural","compareText","equal"]},larger:{name:"larger",category:"Relational",syntax:["x > y","larger(x, y)"],description:"Check if value x is larger than y. Returns true if x is larger than y, and false if not.",examples:["2 > 3","5 > 2*2","a = 3.3","b = 6-2.8","(a > b)","(b < a)","5 cm > 2 inch"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compare"]},largerEq:{name:"largerEq",category:"Relational",syntax:["x >= y","largerEq(x, y)"],description:"Check if value x is larger or equal to y. Returns true if x is larger or equal to y, and false if not.",examples:["2 >= 1+1","2 > 1+1","a = 3.2","b = 6-2.8","(a >= b)"],seealso:["equal","unequal","smallerEq","smaller","compare"]},smaller:{name:"smaller",category:"Relational",syntax:["x < y","smaller(x, y)"],description:"Check if value x is smaller than value y. Returns true if x is smaller than y, and false if not.",examples:["2 < 3","5 < 2*2","a = 3.3","b = 6-2.8","(a < b)","5 cm < 2 inch"],seealso:["equal","unequal","larger","smallerEq","largerEq","compare"]},smallerEq:{name:"smallerEq",category:"Relational",syntax:["x <= y","smallerEq(x, y)"],description:"Check if value x is smaller or equal to value y. Returns true if x is smaller than y, and false if not.",examples:["2 <= 1+1","2 < 1+1","a = 3.2","b = 6-2.8","(a <= b)"],seealso:["equal","unequal","larger","smaller","largerEq","compare"]},unequal:{name:"unequal",category:"Relational",syntax:["x != y","unequal(x, y)"],description:"Check unequality of two values. Returns true if the values are unequal, and false if they are equal.",examples:["2+2 != 3","2+2 != 4","a = 3.2","b = 6-2.8","a != b","50cm != 0.5m","5 cm != 2 inch"],seealso:["equal","smaller","larger","smallerEq","largerEq","compare","deepEqual"]},setCartesian:{name:"setCartesian",category:"Set",syntax:["setCartesian(set1, set2)"],description:"Create the cartesian product of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setCartesian([1, 2], [3, 4])"],seealso:["setUnion","setIntersect","setDifference","setPowerset"]},setDifference:{name:"setDifference",category:"Set",syntax:["setDifference(set1, set2)"],description:"Create the difference of two (multi)sets: every element of set1, that is not the element of set2. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setDifference([1, 2, 3, 4], [3, 4, 5, 6])","setDifference([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setIntersect","setSymDifference"]},setDistinct:{name:"setDistinct",category:"Set",syntax:["setDistinct(set)"],description:"Collect the distinct elements of a multiset. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setDistinct([1, 1, 1, 2, 2, 3])"],seealso:["setMultiplicity"]},setIntersect:{name:"setIntersect",category:"Set",syntax:["setIntersect(set1, set2)"],description:"Create the intersection of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setIntersect([1, 2, 3, 4], [3, 4, 5, 6])","setIntersect([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setDifference"]},setIsSubset:{name:"setIsSubset",category:"Set",syntax:["setIsSubset(set1, set2)"],description:"Check whether a (multi)set is a subset of another (multi)set: every element of set1 is the element of set2. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setIsSubset([1, 2], [3, 4, 5, 6])","setIsSubset([3, 4], [3, 4, 5, 6])"],seealso:["setUnion","setIntersect","setDifference"]},setMultiplicity:{name:"setMultiplicity",category:"Set",syntax:["setMultiplicity(element, set)"],description:"Count the multiplicity of an element in a multiset. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setMultiplicity(1, [1, 2, 2, 4])","setMultiplicity(2, [1, 2, 2, 4])"],seealso:["setDistinct","setSize"]},setPowerset:{name:"setPowerset",category:"Set",syntax:["setPowerset(set)"],description:"Create the powerset of a (multi)set: the powerset contains very possible subsets of a (multi)set. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setPowerset([1, 2, 3])"],seealso:["setCartesian"]},setSize:{name:"setSize",category:"Set",syntax:["setSize(set)","setSize(set, unique)"],description:'Count the number of elements of a (multi)set. When the second parameter "unique" is true, count only the unique values. A multi-dimension array will be converted to a single-dimension array before the operation.',examples:["setSize([1, 2, 2, 4])","setSize([1, 2, 2, 4], true)"],seealso:["setUnion","setIntersect","setDifference"]},setSymDifference:{name:"setSymDifference",category:"Set",syntax:["setSymDifference(set1, set2)"],description:"Create the symmetric difference of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setSymDifference([1, 2, 3, 4], [3, 4, 5, 6])","setSymDifference([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setIntersect","setDifference"]},setUnion:{name:"setUnion",category:"Set",syntax:["setUnion(set1, set2)"],description:"Create the union of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setUnion([1, 2, 3, 4], [3, 4, 5, 6])","setUnion([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setIntersect","setDifference"]},erf:{name:"erf",category:"Special",syntax:["erf(x)"],description:"Compute the erf function of a value using a rational Chebyshev approximations for different intervals of x",examples:["erf(0.2)","erf(-0.5)","erf(4)"],seealso:[]},mad:{name:"mad",category:"Statistics",syntax:["mad(a, b, c, ...)","mad(A)"],description:"Compute the median absolute deviation of a matrix or a list with values. The median absolute deviation is defined as the median of the absolute deviations from the median.",examples:["mad(10, 20, 30)","mad([1, 2, 3])"],seealso:["mean","median","std","abs"]},max:{name:"max",category:"Statistics",syntax:["max(a, b, c, ...)","max(A)","max(A, dim)"],description:"Compute the maximum value of a list of values.",examples:["max(2, 3, 4, 1)","max([2, 3, 4, 1])","max([2, 5; 4, 3])","max([2, 5; 4, 3], 1)","max([2, 5; 4, 3], 2)","max(2.7, 7.1, -4.5, 2.0, 4.1)","min(2.7, 7.1, -4.5, 2.0, 4.1)"],seealso:["mean","median","min","prod","std","sum","variance"]},mean:{name:"mean",category:"Statistics",syntax:["mean(a, b, c, ...)","mean(A)","mean(A, dim)"],description:"Compute the arithmetic mean of a list of values.",examples:["mean(2, 3, 4, 1)","mean([2, 3, 4, 1])","mean([2, 5; 4, 3])","mean([2, 5; 4, 3], 1)","mean([2, 5; 4, 3], 2)","mean([1.0, 2.7, 3.2, 4.0])"],seealso:["max","median","min","prod","std","sum","variance"]},median:{name:"median",category:"Statistics",syntax:["median(a, b, c, ...)","median(A)"],description:"Compute the median of all values. The values are sorted and the middle value is returned. In case of an even number of values, the average of the two middle values is returned.",examples:["median(5, 2, 7)","median([3, -1, 5, 7])"],seealso:["max","mean","min","prod","std","sum","variance","quantileSeq"]},min:{name:"min",category:"Statistics",syntax:["min(a, b, c, ...)","min(A)","min(A, dim)"],description:"Compute the minimum value of a list of values.",examples:["min(2, 3, 4, 1)","min([2, 3, 4, 1])","min([2, 5; 4, 3])","min([2, 5; 4, 3], 1)","min([2, 5; 4, 3], 2)","min(2.7, 7.1, -4.5, 2.0, 4.1)","max(2.7, 7.1, -4.5, 2.0, 4.1)"],seealso:["max","mean","median","prod","std","sum","variance"]},mode:{name:"mode",category:"Statistics",syntax:["mode(a, b, c, ...)","mode(A)","mode(A, a, b, B, c, ...)"],description:"Computes the mode of all values as an array. In case mode being more than one, multiple values are returned in an array.",examples:["mode(2, 1, 4, 3, 1)","mode([1, 2.7, 3.2, 4, 2.7])","mode(1, 4, 6, 1, 6)"],seealso:["max","mean","min","median","prod","std","sum","variance"]},prod:{name:"prod",category:"Statistics",syntax:["prod(a, b, c, ...)","prod(A)"],description:"Compute the product of all values.",examples:["prod(2, 3, 4)","prod([2, 3, 4])","prod([2, 5; 4, 3])"],seealso:["max","mean","min","median","min","std","sum","variance"]},quantileSeq:{name:"quantileSeq",category:"Statistics",syntax:["quantileSeq(A, prob[, sorted])","quantileSeq(A, [prob1, prob2, ...][, sorted])","quantileSeq(A, N[, sorted])"],description:"Compute the prob order quantile of a matrix or a list with values. The sequence is sorted and the middle value is returned. Supported types of sequence values are: Number, BigNumber, Unit Supported types of probablity are: Number, BigNumber. \n\nIn case of a (multi dimensional) array or matrix, the prob order quantile of all elements will be calculated.",examples:["quantileSeq([3, -1, 5, 7], 0.5)","quantileSeq([3, -1, 5, 7], [1/3, 2/3])","quantileSeq([3, -1, 5, 7], 2)","quantileSeq([-1, 3, 5, 7], 0.5, true)"],seealso:["mean","median","min","max","prod","std","sum","variance"]},std:{name:"std",category:"Statistics",syntax:["std(a, b, c, ...)","std(A)","std(A, normalization)"],description:'Compute the standard deviation of all values, defined as std(A) = sqrt(variance(A)). Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["std(2, 4, 6)","std([2, 4, 6, 8])",'std([2, 4, 6, 8], "uncorrected")','std([2, 4, 6, 8], "biased")',"std([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","prod","sum","variance"]},sum:{name:"sum",category:"Statistics",syntax:["sum(a, b, c, ...)","sum(A)"],description:"Compute the sum of all values.",examples:["sum(2, 3, 4, 1)","sum([2, 3, 4, 1])","sum([2, 5; 4, 3])"],seealso:["max","mean","median","min","prod","std","sum","variance"]},variance:{name:"variance",category:"Statistics",syntax:["variance(a, b, c, ...)","variance(A)","variance(A, normalization)"],description:'Compute the variance of all values. Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["variance(2, 4, 6)","variance([2, 4, 6, 8])",'variance([2, 4, 6, 8], "uncorrected")','variance([2, 4, 6, 8], "biased")',"variance([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","min","prod","std","sum"]},acos:{name:"acos",category:"Trigonometry",syntax:["acos(x)"],description:"Compute the inverse cosine of a value in radians.",examples:["acos(0.5)","acos(cos(2.3))"],seealso:["cos","atan","asin"]},acosh:{name:"acosh",category:"Trigonometry",syntax:["acosh(x)"],description:"Calculate the hyperbolic arccos of a value, defined as `acosh(x) = ln(sqrt(x^2 - 1) + x)`.",examples:["acosh(1.5)"],seealso:["cosh","asinh","atanh"]},acot:{name:"acot",category:"Trigonometry",syntax:["acot(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acot(0.5)","acot(cot(0.5))","acot(2)"],seealso:["cot","atan"]},acoth:{name:"acoth",category:"Trigonometry",syntax:["acoth(x)"],description:"Calculate the hyperbolic arccotangent of a value, defined as `acoth(x) = (ln((x+1)/x) + ln(x/(x-1))) / 2`.",examples:["acoth(2)","acoth(0.5)"],seealso:["acsch","asech"]},acsc:{name:"acsc",category:"Trigonometry",syntax:["acsc(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acsc(2)","acsc(csc(0.5))","acsc(0.5)"],seealso:["csc","asin","asec"]},acsch:{name:"acsch",category:"Trigonometry",syntax:["acsch(x)"],description:"Calculate the hyperbolic arccosecant of a value, defined as `acsch(x) = ln(1/x + sqrt(1/x^2 + 1))`.",examples:["acsch(0.5)"],seealso:["asech","acoth"]},asec:{name:"asec",category:"Trigonometry",syntax:["asec(x)"],description:"Calculate the inverse secant of a value.",examples:["asec(0.5)","asec(sec(0.5))","asec(2)"],seealso:["acos","acot","acsc"]},asech:{name:"asech",category:"Trigonometry",syntax:["asech(x)"],description:"Calculate the inverse secant of a value.",examples:["asech(0.5)"],seealso:["acsch","acoth"]},asin:{name:"asin",category:"Trigonometry",syntax:["asin(x)"],description:"Compute the inverse sine of a value in radians.",examples:["asin(0.5)","asin(sin(0.5))"],seealso:["sin","acos","atan"]},asinh:{name:"asinh",category:"Trigonometry",syntax:["asinh(x)"],description:"Calculate the hyperbolic arcsine of a value, defined as `asinh(x) = ln(x + sqrt(x^2 + 1))`.",examples:["asinh(0.5)"],seealso:["acosh","atanh"]},atan:{name:"atan",category:"Trigonometry",syntax:["atan(x)"],description:"Compute the inverse tangent of a value in radians.",examples:["atan(0.5)","atan(tan(0.5))"],seealso:["tan","acos","asin"]},atanh:{name:"atanh",category:"Trigonometry",syntax:["atanh(x)"],description:"Calculate the hyperbolic arctangent of a value, defined as `atanh(x) = ln((1 + x)/(1 - x)) / 2`.",examples:["atanh(0.5)"],seealso:["acosh","asinh"]},atan2:{name:"atan2",category:"Trigonometry",syntax:["atan2(y, x)"],description:"Computes the principal value of the arc tangent of y/x in radians.",examples:["atan2(2, 2) / pi","angle = 60 deg in rad","x = cos(angle)","y = sin(angle)","atan2(y, x)"],seealso:["sin","cos","tan"]},cos:{name:"cos",category:"Trigonometry",syntax:["cos(x)"],description:"Compute the cosine of x in radians.",examples:["cos(2)","cos(pi / 4) ^ 2","cos(180 deg)","cos(60 deg)","sin(0.2)^2 + cos(0.2)^2"],seealso:["acos","sin","tan"]},cosh:{name:"cosh",category:"Trigonometry",syntax:["cosh(x)"],description:"Compute the hyperbolic cosine of x in radians.",examples:["cosh(0.5)"],seealso:["sinh","tanh","coth"]},cot:{name:"cot",category:"Trigonometry",syntax:["cot(x)"],description:"Compute the cotangent of x in radians. Defined as 1/tan(x)",examples:["cot(2)","1 / tan(2)"],seealso:["sec","csc","tan"]},coth:{name:"coth",category:"Trigonometry",syntax:["coth(x)"],description:"Compute the hyperbolic cotangent of x in radians.",examples:["coth(2)","1 / tanh(2)"],seealso:["sech","csch","tanh"]},csc:{name:"csc",category:"Trigonometry",syntax:["csc(x)"],description:"Compute the cosecant of x in radians. Defined as 1/sin(x)",examples:["csc(2)","1 / sin(2)"],seealso:["sec","cot","sin"]},csch:{name:"csch",category:"Trigonometry",syntax:["csch(x)"],description:"Compute the hyperbolic cosecant of x in radians. Defined as 1/sinh(x)",examples:["csch(2)","1 / sinh(2)"],seealso:["sech","coth","sinh"]},sec:{name:"sec",category:"Trigonometry",syntax:["sec(x)"],description:"Compute the secant of x in radians. Defined as 1/cos(x)",examples:["sec(2)","1 / cos(2)"],seealso:["cot","csc","cos"]},sech:{name:"sech",category:"Trigonometry",syntax:["sech(x)"],description:"Compute the hyperbolic secant of x in radians. Defined as 1/cosh(x)",examples:["sech(2)","1 / cosh(2)"],seealso:["coth","csch","cosh"]},sin:{name:"sin",category:"Trigonometry",syntax:["sin(x)"],description:"Compute the sine of x in radians.",examples:["sin(2)","sin(pi / 4) ^ 2","sin(90 deg)","sin(30 deg)","sin(0.2)^2 + cos(0.2)^2"],seealso:["asin","cos","tan"]},sinh:{name:"sinh",category:"Trigonometry",syntax:["sinh(x)"],description:"Compute the hyperbolic sine of x in radians.",examples:["sinh(0.5)"],seealso:["cosh","tanh"]},tan:{name:"tan",category:"Trigonometry",syntax:["tan(x)"],description:"Compute the tangent of x in radians.",examples:["tan(0.5)","sin(0.5) / cos(0.5)","tan(pi / 4)","tan(45 deg)"],seealso:["atan","sin","cos"]},tanh:{name:"tanh",category:"Trigonometry",syntax:["tanh(x)"],description:"Compute the hyperbolic tangent of x in radians.",examples:["tanh(0.5)","sinh(0.5) / cosh(0.5)"],seealso:["sinh","cosh"]},to:{name:"to",category:"Units",syntax:["x to unit","to(x, unit)"],description:"Change the unit of a value.",examples:["5 inch to cm","3.2kg to g","16 bytes in bits"],seealso:[]},clone:{name:"clone",category:"Utils",syntax:["clone(x)"],description:"Clone a variable. Creates a copy of primitive variables,and a deep copy of matrices",examples:["clone(3.5)","clone(2 - 4i)","clone(45 deg)","clone([1, 2; 3, 4])",'clone("hello world")'],seealso:[]},format:{name:"format",category:"Utils",syntax:["format(value)","format(value, precision)"],description:"Format a value of any type as string.",examples:["format(2.3)","format(3 - 4i)","format([])","format(pi, 3)"],seealso:["print"]},isNaN:{name:"isNaN",category:"Utils",syntax:["isNaN(x)"],description:"Test whether a value is NaN (not a number)",examples:["isNaN(2)","isNaN(0 / 0)","isNaN(NaN)","isNaN(Infinity)"],seealso:["isNegative","isNumeric","isPositive","isZero"]},isInteger:{name:"isInteger",category:"Utils",syntax:["isInteger(x)"],description:"Test whether a value is an integer number.",examples:["isInteger(2)","isInteger(3.5)","isInteger([3, 0.5, -2])"],seealso:["isNegative","isNumeric","isPositive","isZero"]},isNegative:{name:"isNegative",category:"Utils",syntax:["isNegative(x)"],description:"Test whether a value is negative: smaller than zero.",examples:["isNegative(2)","isNegative(0)","isNegative(-4)","isNegative([3, 0.5, -2])"],seealso:["isInteger","isNumeric","isPositive","isZero"]},isNumeric:{name:"isNumeric",category:"Utils",syntax:["isNumeric(x)"],description:"Test whether a value is a numeric value. Returns true when the input is a number, BigNumber, Fraction, or boolean.",examples:["isNumeric(2)",'isNumeric("2")','hasNumericValue("2")',"isNumeric(0)","isNumeric(bignumber(500))","isNumeric(fraction(0.125))","isNumeric(2 + 3i)",'isNumeric([2.3, "foo", false])'],seealso:["isInteger","isZero","isNegative","isPositive","isNaN","hasNumericValue"]},hasNumericValue:{name:"hasNumericValue",category:"Utils",syntax:["hasNumericValue(x)"],description:"Test whether a value is an numeric value. In case of a string, true is returned if the string contains a numeric value.",examples:["hasNumericValue(2)",'hasNumericValue("2")','isNumeric("2")',"hasNumericValue(0)","hasNumericValue(bignumber(500))","hasNumericValue(fraction(0.125))","hasNumericValue(2 + 3i)",'hasNumericValue([2.3, "foo", false])'],seealso:["isInteger","isZero","isNegative","isPositive","isNaN","isNumeric"]},isPositive:{name:"isPositive",category:"Utils",syntax:["isPositive(x)"],description:"Test whether a value is positive: larger than zero.",examples:["isPositive(2)","isPositive(0)","isPositive(-4)","isPositive([3, 0.5, -2])"],seealso:["isInteger","isNumeric","isNegative","isZero"]},isPrime:{name:"isPrime",category:"Utils",syntax:["isPrime(x)"],description:"Test whether a value is prime: has no divisors other than itself and one.",examples:["isPrime(3)","isPrime(-2)","isPrime([2, 17, 100])"],seealso:["isInteger","isNumeric","isNegative","isZero"]},isZero:{name:"isZero",category:"Utils",syntax:["isZero(x)"],description:"Test whether a value is zero.",examples:["isZero(2)","isZero(0)","isZero(-4)","isZero([3, 0, -2, 0])"],seealso:["isInteger","isNumeric","isNegative","isPositive"]},typeOf:{name:"typeOf",category:"Utils",syntax:["typeOf(x)"],description:"Get the type of a variable.",examples:["typeOf(3.5)","typeOf(2 - 4i)","typeOf(45 deg)",'typeOf("hello world")'],seealso:["getMatrixDataType"]},numeric:{name:"numeric",category:"Utils",syntax:["numeric(x)"],description:"Convert a numeric input to a specific numeric type: number, BigNumber, or Fraction.",examples:['numeric("4")','numeric("4", "number")','numeric("4", "BigNumber")','numeric("4", "Fraction)','numeric(4, "Fraction")','numeric(fraction(2, 5), "number)'],seealso:["number","fraction","bignumber","string","format"]}},ys=Object(s.a)("help",["typed","mathWithTransform","Help"],(function(t){var e=t.typed,n=t.mathWithTransform,r=t.Help;return e("help",{any:function(t){var e,i=t;if("string"!=typeof t)for(e in n)if(Object(k.f)(n,e)&&t===n[e]){i=e;break}var o=Zn(vs,i);if(o)return new r(o);var a="function"==typeof i?i.name:i;throw new Error('No documentation found on "'+a+'"')}})})),bs=Object(s.a)("chain",["typed","Chain"],(function(t){var e=t.typed,n=t.Chain;return e("chain",{"":function(){return new n},any:function(t){return new n(t)}})})),xs=Object(s.a)("det",["typed","matrix","subtract","multiply","unaryMinus","lup"],(function(t){var e=t.typed,n=t.matrix,i=t.subtract,o=t.multiply,a=t.unaryMinus,s=t.lup;return e("det",{any:function(t){return Object(k.a)(t)},"Array | Matrix":function(t){var e=Object(r.v)(t)?t.size():Array.isArray(t)?(t=n(t)).size():[];switch(e.length){case 0:return Object(k.a)(t);case 1:if(1===e[0])return Object(k.a)(t.valueOf()[0]);throw new RangeError("Matrix must be square (size: "+Object(E.d)(e)+")");case 2:var u=e[0];if(u===e[1])return function(t,e){if(1===e)return Object(k.a)(t[0][0]);if(2===e)return i(o(t[0][0],t[1][1]),o(t[1][0],t[0][1]));for(var n=s(t),r=n.U[0][0],u=1;u<e;u++)r=o(r,n.U[u][u]);for(var l=0,c=0,f=[];;){for(;f[c];)c++;if(e<=c)break;for(var h=c,d=0;!f[n.p[h]];)f[n.p[h]]=!0,h=n.p[h],d++;d%2==0&&l++}return l%2==0?r:a(r)}(t.clone().valueOf(),u);throw new RangeError("Matrix must be square (size: "+Object(E.d)(e)+")");default:throw new RangeError("Matrix must be two dimensional (size: "+Object(E.d)(e)+")")}}})})),ws=Object(s.a)("inv",["typed","matrix","divideScalar","addScalar","multiply","unaryMinus","det","identity","abs"],(function(t){var e=t.typed,n=t.matrix,i=t.divideScalar,o=t.addScalar,a=t.multiply,s=t.unaryMinus,u=t.det,l=t.identity,c=t.abs;return e("inv",{"Array | Matrix":function(t){var e=Object(r.v)(t)?t.size():Object(M.a)(t);switch(e.length){case 1:if(1===e[0])return Object(r.v)(t)?n([i(1,t.valueOf()[0])]):[i(1,t[0])];throw new RangeError("Matrix must be square (size: "+Object(E.d)(e)+")");case 2:var o=e[0],a=e[1];if(o===a)return Object(r.v)(t)?n(f(t.valueOf(),o,a),t.storage()):f(t,o,a);throw new RangeError("Matrix must be square (size: "+Object(E.d)(e)+")");default:throw new RangeError("Matrix must be two dimensional (size: "+Object(E.d)(e)+")")}},any:function(t){return i(1,t)}});function f(t,e,n){var r,f,h,d;if(1===e){if(0===(h=t[0][0]))throw Error("Cannot calculate inverse, determinant is zero");return[[i(1,h)]]}if(2===e){var p=u(t);if(0===p)throw Error("Cannot calculate inverse, determinant is zero");return[[i(t[1][1],p),i(s(t[0][1]),p)],[i(s(t[1][0]),p),i(t[0][0],p)]]}var m=t.concat();for(x=0;x<e;x++)m[x]=m[x].concat();for(var g=l(e).valueOf(),v=0;v<n;v++){for(var y=c(m[v][v]),b=v,x=v+1;x<e;)c(m[x][v])>y&&(y=c(m[x][v]),b=x),x++;if(0===y)throw Error("Cannot calculate inverse, determinant is zero");(x=b)!==v&&(d=m[v],m[v]=m[x],m[x]=d,d=g[v],g[v]=g[x],g[x]=d);var w=m[v],_=g[v];for(x=0;x<e;x++){var S=m[x],O=g[x];if(x!==v){if(0!==S[v]){for(f=i(s(S[v]),w[v]),r=v;r<n;r++)S[r]=o(S[r],a(f,w[r]));for(r=0;r<n;r++)O[r]=o(O[r],a(f,_[r]))}}else{for(f=w[v],r=v;r<n;r++)S[r]=i(S[r],f);for(r=0;r<n;r++)O[r]=i(O[r],f)}}}return g}})),_s=Object(s.a)("eigs",["config","typed","matrix","addScalar","equal","subtract","abs","atan","cos","sin","multiplyScalar","inv","bignumber","multiply","add"],(function(t){var e=t.config,n=t.typed,r=t.matrix,i=t.addScalar,o=t.subtract,a=t.equal,s=t.abs,u=t.atan,l=t.cos,c=t.sin,f=t.multiplyScalar,h=t.inv,d=t.bignumber,p=t.multiply,m=t.add;return n("eigs",{Array:function(t){var e=r(t),n=e.size();if(2!==n.length||n[0]!==n[1])throw new RangeError("Matrix must be square (size: "+Object(E.d)(n)+")");var i=g(e,n[0]);return{values:i[0],vectors:i[1]}},Matrix:function(t){var e=t.size();if(2!==e.length||e[0]!==e[1])throw new RangeError("Matrix must be square (size: "+Object(E.d)(e)+")");var n=g(t,e[0]);return{values:r(n[0]),vectors:r(n[1])}}});function g(t,n){var r=t.datatype();if(void 0===r&&(r=t.getDataType()),"number"!==r&&"BigNumber"!==r&&"Fraction"!==r)throw"mixed"===r?new TypeError("Mixed matrix element type is not supported"):new TypeError("Matrix element type not supported ("+r+")");if(function(t,e){for(var n=0;n<e;n++)for(var r=n;r<e;r++)if(!a(t[n][r],t[r][n]))throw new TypeError("Input matrix is not symmetric")}(t.toArray(),n),"number"===r)return v(t.toArray());if("Fraction"!==r)return"BigNumber"===r?function(t){for(var n,r=t.length,a=s(e.epsilon/r),g=new Array(r),v=0;v<r;v++)g[v]=w(r,0),g[v][v]=1;for(var y=b(t);s(y[1])>=s(a);){var _=y[0][0],S=y[0][1];n=function(t,n,r){var i=o(n,t);return s(i)<=e.epsilon?d(-1).acos().div(4):f(.5,u(p(2,r,h(i))))}(t[_][_],t[S][S],t[_][S]),t=function(t,e,n,r){for(var a=t.length,s=d(l(e)),u=d(c(e)),h=f(s,s),g=f(u,u),v=w(a,d(0)),y=w(a,d(0)),b=p(d(2),s,u,t[n][r]),x=i(o(f(h,t[n][n]),b),f(g,t[r][r])),_=m(f(g,t[n][n]),b,f(h,t[r][r])),S=0;S<a;S++)v[S]=o(f(s,t[n][S]),f(u,t[r][S])),y[S]=i(f(u,t[n][S]),f(s,t[r][S]));t[n][n]=x,t[r][r]=_,t[n][r]=d(0),t[r][n]=d(0);for(var O=0;O<a;O++)O!==n&&O!==r&&(t[n][O]=v[O],t[O][n]=v[O],t[r][O]=y[O],t[O][r]=y[O]);return t}(t,n,_,S),g=function(t,e,n,r){for(var a=t.length,s=l(e),u=c(e),h=w(a,d(0)),p=w(a,d(0)),m=0;m<a;m++)h[m]=o(f(s,t[m][n]),f(u,t[m][r])),p[m]=i(f(u,t[m][n]),f(s,t[m][r]));for(var g=0;g<a;g++)t[g][n]=h[g],t[g][r]=p[g];return t}(g,n,_,S),y=b(t)}for(var O=w(r,0),N=0;N<r;N++)O[N]=t[N][N];return x(Object(k.a)(O),Object(k.a)(g))}(t.toArray()):void 0;for(var g=t.toArray(),y=0;y<n;y++)for(var _=y;_<n;_++)g[y][_]=g[y][_].valueOf(),g[_][y]=g[y][_];return v(t.toArray())}function v(t){for(var n,r=t.length,i=Math.abs(e.epsilon/r),o=new Array(r),a=0;a<r;a++)o[a]=w(r,0),o[a][a]=1;for(var s,u,l,c,f=y(t);Math.abs(f[1])>=Math.abs(i);){var h=f[0][0],d=f[0][1];s=t[h][h],u=t[d][d],l=t[h][d],void 0,c=u-s,t=function(t,e,n,r){for(var i=t.length,o=Math.cos(e),a=Math.sin(e),s=o*o,u=a*a,l=w(i,0),c=w(i,0),f=s*t[n][n]-2*o*a*t[n][r]+u*t[r][r],h=u*t[n][n]+2*o*a*t[n][r]+s*t[r][r],d=0;d<i;d++)l[d]=o*t[n][d]-a*t[r][d],c[d]=a*t[n][d]+o*t[r][d];t[n][n]=f,t[r][r]=h,t[n][r]=0;for(var p=t[r][n]=0;p<i;p++)p!==n&&p!==r&&(t[n][p]=l[p],t[p][n]=l[p],t[r][p]=c[p],t[p][r]=c[p]);return t}(t,n=Math.abs(c)<=e.epsilon?Math.PI/4:.5*Math.atan(2*l/(u-s)),h,d),o=function(t,e,n,r){for(var i=t.length,o=Math.cos(e),a=Math.sin(e),s=w(i,0),u=w(i,0),l=0;l<i;l++)s[l]=o*t[l][n]-a*t[l][r],u[l]=a*t[l][n]+o*t[l][r];for(var c=0;c<i;c++)t[c][n]=s[c],t[c][r]=u[c];return t}(o,n,h,d),f=y(t)}for(var p=w(r,0),m=0;m<r;m++)p[m]=t[m][m];return x(Object(k.a)(p),Object(k.a)(o))}function y(t){for(var e=t.length,n=0,r=[0,1],i=0;i<e;i++)for(var o=i+1;o<e;o++)Math.abs(n)<Math.abs(t[i][o])&&(n=Math.abs(t[i][o]),r=[i,o]);return[r,n]}function b(t){for(var e=t.length,n=0,r=[0,1],i=0;i<e;i++)for(var o=i+1;o<e;o++)s(n)<s(t[i][o])&&(n=s(t[i][o]),r=[i,o]);return[r,n]}function x(t,e){for(var n=t.length,r=Array(n),i=Array(n),o=0;o<n;o++)i[o]=Array(n);for(var a=0;a<n;a++){for(var s=0,u=t[0],l=0;l<t.length;l++)t[l]<u&&(u=t[s=l]);r[a]=t.splice(s,1)[0];for(var c=0;c<n;c++)i[c][a]=e[c][s],e[c].splice(s,1)}return[Object(k.a)(r),Object(k.a)(i)]}function w(t,e){for(var n=new Array(t),r=0;r<t;r++)n[r]=e;return n}})),Ss=Object(s.a)("expm",["typed","abs","add","identity","inv","multiply"],(function(t){var e=t.typed,n=t.abs,i=t.add,o=t.identity,a=t.inv,s=t.multiply;return e("expm",{Matrix:function(t){var e=t.size();if(2!==e.length||e[0]!==e[1])throw new RangeError("Matrix must be square (size: "+Object(E.d)(e)+")");for(var u=e[0],l=function(t,e){for(var n=0;n<30;n++)for(var r=0;r<=n;r++){var i=n-r;if(function(t,e,n){for(var r=1,i=2;i<=e;i++)r*=i;for(var o=r,a=e+1;a<=2*e;a++)o*=a;var s=o*(2*e+1);return 8*Math.pow(t/Math.pow(2,n),2*e)*r*r/(o*s)}(t,r,i)<1e-15)return{q:r,j:i}}throw new Error("Could not find acceptable parameters to compute the matrix exponential (try increasing maxSearchSize in expm.js)")}(function(t){for(var e=t.size()[0],r=0,i=0;i<e;i++){for(var o=0,a=0;a<e;a++)o+=n(t.get([i,a]));r=Math.max(o,r)}return r}(t)),c=l.q,f=l.j,h=s(t,Math.pow(2,-f)),d=o(u),p=o(u),m=1,g=h,v=-1,y=1;y<=c;y++)1<y&&(g=s(g,h),v=-v),d=i(d,s(m=m*(c-y+1)/((2*c-y+1)*y),g)),p=i(p,s(m*v,g));for(var b=s(a(p),d),x=0;x<f;x++)b=s(b,b);return Object(r.H)(t)?t.createSparseMatrix(b):b}})})),Os=Object(s.a)("sqrtm",["typed","abs","add","multiply","sqrt","subtract","inv","size","max","identity"],(function(t){var e=t.typed,n=t.abs,i=t.add,o=t.multiply,a=t.sqrt,s=t.subtract,u=t.inv,l=t.size,c=t.max,f=t.identity;return e("sqrtm",{"Array | Matrix":function(t){var e=Object(r.v)(t)?t.size():Object(M.a)(t);switch(e.length){case 1:if(1===e[0])return a(t);throw new RangeError("Matrix must be square (size: "+Object(E.d)(e)+")");case 2:if(e[0]===e[1])return function(t){var e=0,r=t,a=f(l(t));do{var h,d=r;if(r=o(.5,i(d,u(a))),a=o(.5,i(a,u(d))),1e-6<(h=c(n(s(r,d))))&&1e3<++e)throw new Error("computing square root of matrix: iterative method could not converge")}while(1e-6<h);return r}(t);throw new RangeError("Matrix must be square (size: "+Object(E.d)(e)+")")}}})})),Ns=Object(s.a)("divide",["typed","matrix","multiply","equalScalar","divideScalar","inv"],(function(t){var e=t.typed,n=t.matrix,r=t.multiply,i=t.equalScalar,o=t.divideScalar,a=t.inv,s=fe({typed:e,equalScalar:i}),u=se({typed:e});return e("divide",Object(k.e)({"Array | Matrix, Array | Matrix":function(t,e){return r(t,a(e))},"DenseMatrix, any":function(t,e){return u(t,e,o,!1)},"SparseMatrix, any":function(t,e){return s(t,e,o,!1)},"Array, any":function(t,e){return u(n(t),e,o,!1).valueOf()},"any, Array | Matrix":function(t,e){return r(t,a(e))}},o.signatures))})),Ms="distance",Es=Object(s.a)(Ms,["typed","addScalar","subtract","divideScalar","multiplyScalar","unaryMinus","sqrt","abs"],(function(t){var e=t.typed,n=t.addScalar,i=t.subtract,o=t.multiplyScalar,a=t.divideScalar,s=t.unaryMinus,u=t.sqrt,l=t.abs;return e(Ms,{"Array, Array, Array":function(t,e,n){if(2!==t.length||2!==e.length||2!==n.length)throw new TypeError("Invalid Arguments: Try again");if(!f(t))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!f(e))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!f(n))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");var r=a(i(n[1],n[0]),i(e[1],e[0])),u=o(o(r,r),e[0]),l=s(o(r,e[0])),c=t[1];return g(t[0],t[1],u,l,c)},"Object, Object, Object":function(t,e,n){if(2!==Object.keys(t).length||2!==Object.keys(e).length||2!==Object.keys(n).length)throw new TypeError("Invalid Arguments: Try again");if(!f(t))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!f(e))throw new TypeError("Values of lineOnePtX and lineOnePtY should be numbers or BigNumbers");if(!f(n))throw new TypeError("Values of lineTwoPtX and lineTwoPtY should be numbers or BigNumbers");if("pointX"in t&&"pointY"in t&&"lineOnePtX"in e&&"lineOnePtY"in e&&"lineTwoPtX"in n&&"lineTwoPtY"in n){var r=a(i(n.lineTwoPtY,n.lineTwoPtX),i(e.lineOnePtY,e.lineOnePtX)),u=o(o(r,r),e.lineOnePtX),l=s(o(r,e.lineOnePtX)),c=t.pointX;return g(t.pointX,t.pointY,u,l,c)}throw new TypeError("Key names do not match")},"Array, Array":function(t,e){if(2===t.length&&3===e.length){if(!f(t))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!h(e))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");return g(t[0],t[1],e[0],e[1],e[2])}if(3===t.length&&6===e.length){if(!h(t))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!p(e))throw new TypeError("Array with 6 numbers or BigNumbers expected for second argument");return v(t[0],t[1],t[2],e[0],e[1],e[2],e[3],e[4],e[5])}if(t.length===e.length&&0<t.length){if(!d(t))throw new TypeError("All values of an array should be numbers or BigNumbers");if(!d(e))throw new TypeError("All values of an array should be numbers or BigNumbers");return y(t,e)}throw new TypeError("Invalid Arguments: Try again")},"Object, Object":function(t,e){if(2===Object.keys(t).length&&3===Object.keys(e).length){if(!f(t))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!h(e))throw new TypeError("Values of xCoeffLine, yCoeffLine and constant should be numbers or BigNumbers");if("pointX"in t&&"pointY"in t&&"xCoeffLine"in e&&"yCoeffLine"in e&&"constant"in e)return g(t.pointX,t.pointY,e.xCoeffLine,e.yCoeffLine,e.constant);throw new TypeError("Key names do not match")}if(3===Object.keys(t).length&&6===Object.keys(e).length){if(!h(t))throw new TypeError("Values of pointX, pointY and pointZ should be numbers or BigNumbers");if(!p(e))throw new TypeError("Values of x0, y0, z0, a, b and c should be numbers or BigNumbers");if("pointX"in t&&"pointY"in t&&"x0"in e&&"y0"in e&&"z0"in e&&"a"in e&&"b"in e&&"c"in e)return v(t.pointX,t.pointY,t.pointZ,e.x0,e.y0,e.z0,e.a,e.b,e.c);throw new TypeError("Key names do not match")}if(2===Object.keys(t).length&&2===Object.keys(e).length){if(!f(t))throw new TypeError("Values of pointOneX and pointOneY should be numbers or BigNumbers");if(!f(e))throw new TypeError("Values of pointTwoX and pointTwoY should be numbers or BigNumbers");if("pointOneX"in t&&"pointOneY"in t&&"pointTwoX"in e&&"pointTwoY"in e)return y([t.pointOneX,t.pointOneY],[e.pointTwoX,e.pointTwoY]);throw new TypeError("Key names do not match")}if(3!==Object.keys(t).length||3!==Object.keys(e).length)throw new TypeError("Invalid Arguments: Try again");if(!h(t))throw new TypeError("Values of pointOneX, pointOneY and pointOneZ should be numbers or BigNumbers");if(!h(e))throw new TypeError("Values of pointTwoX, pointTwoY and pointTwoZ should be numbers or BigNumbers");if("pointOneX"in t&&"pointOneY"in t&&"pointOneZ"in t&&"pointTwoX"in e&&"pointTwoY"in e&&"pointTwoZ"in e)return y([t.pointOneX,t.pointOneY,t.pointOneZ],[e.pointTwoX,e.pointTwoY,e.pointTwoZ]);throw new TypeError("Key names do not match")},Array:function(t){if(!function(t){if(2===t[0].length&&c(t[0][0])&&c(t[0][1])){if(t.some((function(t){return 2!==t.length||!c(t[0])||!c(t[1])})))return!1}else{if(!(3===t[0].length&&c(t[0][0])&&c(t[0][1])&&c(t[0][2])))return!1;if(t.some((function(t){return 3!==t.length||!c(t[0])||!c(t[1])||!c(t[2])})))return!1}return!0}(t))throw new TypeError("Incorrect array format entered for pairwise distance calculation");return function(t){for(var e=[],n=[],r=[],i=0;i<t.length-1;i++)for(var o=i+1;o<t.length;o++)2===t[0].length?(n=[t[i][0],t[i][1]],r=[t[o][0],t[o][1]]):3===t[0].length&&(n=[t[i][0],t[i][1],t[i][2]],r=[t[o][0],t[o][1],t[o][2]]),e.push(y(n,r));return e}(t)}});function c(t){return"number"==typeof t||Object(r.e)(t)}function f(t){return t.constructor!==Array&&(t=m(t)),c(t[0])&&c(t[1])}function h(t){return t.constructor!==Array&&(t=m(t)),c(t[0])&&c(t[1])&&c(t[2])}function d(t){return Array.isArray(t)||(t=m(t)),t.every(c)}function p(t){return t.constructor!==Array&&(t=m(t)),c(t[0])&&c(t[1])&&c(t[2])&&c(t[3])&&c(t[4])&&c(t[5])}function m(t){for(var e=Object.keys(t),n=[],r=0;r<e.length;r++)n.push(t[e[r]]);return n}function g(t,e,r,i,s){var c=l(n(n(o(r,t),o(i,e)),s)),f=u(n(o(r,r),o(i,i)));return a(c,f)}function v(t,e,r,s,l,c,f,h,d){var p=[i(o(i(l,e),d),o(i(c,r),h)),i(o(i(c,r),f),o(i(s,t),d)),i(o(i(s,t),h),o(i(l,e),f))],m=(p=u(n(n(o(p[0],p[0]),o(p[1],p[1])),o(p[2],p[2]))),u(n(n(o(f,f),o(h,h)),o(d,d))));return a(p,m)}function y(t,e){for(var r,a=t.length,s=0,l=0;l<a;l++)r=i(t[l],e[l]),s=n(o(r,r),s);return u(s)}})),ks=Object(s.a)("intersect",["typed","config","abs","add","addScalar","matrix","multiply","multiplyScalar","divideScalar","subtract","smaller","equalScalar"],(function(t){var e=t.typed,n=t.config,i=t.abs,o=t.add,a=t.addScalar,s=t.matrix,u=t.multiply,l=t.multiplyScalar,c=t.divideScalar,f=t.subtract,h=t.smaller,d=t.equalScalar;return e("intersect",{"Array, Array, Array":function(t,e,n){if(!g(t))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!g(e))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!(4===(r=n).length&&p(r[0])&&p(r[1])&&p(r[2])&&p(r[3])))throw new TypeError("Array with 4 numbers expected as third argument");var r,i,o,s,u,h,d,m,v,y,b,x,w,_,S,O,N,M;return i=t[0],o=t[1],s=t[2],u=e[0],h=e[1],d=e[2],m=n[0],v=n[1],y=n[2],b=n[3],x=l(i,m),w=l(u,m),_=l(o,v),S=l(h,v),O=l(s,y),N=l(d,y),M=c(f(f(f(b,x),_),O),f(f(f(a(a(w,S),N),x),_),O)),[a(i,l(M,f(u,i))),a(o,l(M,f(h,o))),a(s,l(M,f(d,s)))]},"Array, Array, Array, Array":function(t,e,r,s){if(2===t.length){if(!m(t))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!m(e))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!m(r))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");if(!m(s))throw new TypeError("Array with 2 numbers or BigNumbers expected for fourth argument");return function(t,e,r,s){var d=t,p=r,m=f(d,e),g=f(p,s),v=f(l(m[0],g[1]),l(g[0],m[1]));if(h(i(v),n.epsilon))return null;var y=l(g[0],d[1]),b=l(g[1],d[0]),x=l(g[0],p[1]),w=l(g[1],p[0]),_=c(a(f(f(y,b),x),w),v);return o(u(m,_),d)}(t,e,r,s)}if(3!==t.length)throw new TypeError("Arrays with two or thee dimensional points expected");if(!g(t))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!g(e))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!g(r))throw new TypeError("Array with 3 numbers or BigNumbers expected for third argument");if(!g(s))throw new TypeError("Array with 3 numbers or BigNumbers expected for fourth argument");return p=t[0],y=t[1],b=t[2],x=e[0],w=e[1],_=e[2],S=r[0],O=r[1],N=r[2],C=v(p,S,M=s[0],S,y,O,E=s[1],O,b,N,k=s[2],N),T=v(M,S,x,p,E,O,w,y,k,N,_,b),D=v(p,S,x,p,y,O,w,y,b,N,_,b),A=v(M,S,M,S,E,O,E,O,k,N,k,N),j=v(x,p,x,p,w,y,w,y,_,b,_,b),P=c(f(l(C,T),l(D,A)),f(l(j,A),l(T,T))),I=c(a(C,l(P,T)),A),R=a(p,l(P,f(x,p))),L=a(y,l(P,f(w,y))),F=a(b,l(P,f(_,b))),q=a(S,l(I,f(M,S))),B=a(O,l(I,f(E,O))),z=a(N,l(I,f(k,N))),d(R,q)&&d(L,B)&&d(F,z)?[R,L,F]:null;var p,y,b,x,w,_,S,O,N,M,E,k,C,T,D,A,j,P,I,R,L,F,q,B,z},"Matrix, Matrix, Matrix":function(t,e,n){return s(this(t.valueOf(),e.valueOf(),n.valueOf()))},"Matrix, Matrix, Matrix, Matrix":function(t,e,n,r){return s(this(t.valueOf(),e.valueOf(),n.valueOf(),r.valueOf()))}});function p(t){return"number"==typeof t||Object(r.e)(t)}function m(t){return 2===t.length&&p(t[0])&&p(t[1])}function g(t){return 3===t.length&&p(t[0])&&p(t[1])&&p(t[2])}function v(t,e,n,r,i,o,s,u,c,h,d,p){var m=l(f(t,e),f(n,r)),g=l(f(i,o),f(s,u)),v=l(f(c,h),f(d,p));return a(a(m,g),v)}})),Cs=Object(s.a)("sum",["typed","config","add","numeric"],(function(t){var e=t.typed,n=t.config,r=t.add,i=t.numeric;return e("sum",{"Array | Matrix":o,"Array | Matrix, number | BigNumber":function(t,e){try{return R(t,e,r)}catch(t){throw vr(t,"sum")}},"...":function(t){if(j(t))throw new TypeError("Scalar values expected in function sum");return o(t)}});function o(t){var e;return P(t,(function(t){try{e=void 0===e?t:r(e,t)}catch(e){throw vr(e,"sum",t)}})),void 0===e&&(e=i(0,n.number)),"string"==typeof e&&(e=i(e,n.number)),e}})),Ts=Object(s.a)("mean",["typed","add","divide"],(function(t){var e=t.typed,n=t.add,r=t.divide;return e("mean",{"Array | Matrix":i,"Array | Matrix, number | BigNumber":function(t,e){try{var i=R(t,e,n),o=Array.isArray(t)?Object(M.a)(t):t.size();return r(i,o[e])}catch(t){throw vr(t,"mean")}},"...":function(t){if(j(t))throw new TypeError("Scalar values expected in function mean");return i(t)}});function i(t){var e,i=0;if(P(t,(function(t){try{e=void 0===e?t:n(e,t),i++}catch(e){throw vr(e,"mean",t)}})),0===i)throw new Error("Cannot calculate the mean of an empty array");return r(e,i)}})),Ds=Object(s.a)("median",["typed","add","divide","compare","partitionSelect"],(function(t){var e=t.typed,n=t.add,r=t.divide,i=t.compare,o=t.partitionSelect;function a(t){try{var e=(t=Object(M.e)(t.valueOf())).length;if(0===e)throw new Error("Cannot calculate median of an empty array");if(e%2==0){for(var n=e/2-1,r=o(t,1+n),a=t[n],l=0;l<n;++l)0<i(t[l],a)&&(a=t[l]);return u(a,r)}var c=o(t,(e-1)/2);return s(c)}catch(t){throw vr(t,"median")}}var s=e({"number | BigNumber | Complex | Unit":function(t){return t}}),u=e({"number | BigNumber | Complex | Unit, number | BigNumber | Complex | Unit":function(t,e){return r(n(t,e),2)}});return e("median",{"Array | Matrix":a,"Array | Matrix, number | BigNumber":function(){throw new Error("median(A, dim) is not yet supported")},"...":function(t){if(j(t))throw new TypeError("Scalar values expected in function median");return a(t)}})})),As=Object(s.a)("mad",["typed","abs","map","median","subtract"],(function(t){var e=t.typed,n=t.abs,r=t.map,i=t.median,o=t.subtract;return e("mad",{"Array | Matrix":a,"...":a});function a(t){if(0===(t=Object(M.e)(t.valueOf())).length)throw new Error("Cannot calculate median absolute deviation (mad) of an empty array");try{var e=i(t);return i(r(t,(function(t){return n(o(t,e))})))}catch(t){throw t instanceof TypeError&&-1!==t.message.indexOf("median")?new TypeError(t.message.replace("median","mad")):vr(t,"mad")}}})),js="unbiased",Ps="variance",Is=Object(s.a)(Ps,["typed","add","subtract","multiply","divide","apply","isNaN"],(function(t){var e=t.typed,n=t.add,i=t.subtract,o=t.multiply,a=t.divide,s=t.apply,u=t.isNaN;return e(Ps,{"Array | Matrix":function(t){return l(t,js)},"Array | Matrix, string":l,"Array | Matrix, number | BigNumber":function(t,e){return c(t,e,js)},"Array | Matrix, number | BigNumber, string":c,"...":function(t){return l(t,js)}});function l(t,e){var s=0,l=0;if(0===t.length)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");if(P(t,(function(t){try{s=n(s,t),l++}catch(e){throw vr(e,"variance",t)}})),0===l)throw new Error("Cannot calculate variance of an empty array");var c=a(s,l);if(s=0,P(t,(function(t){var e=i(t,c);s=n(s,o(e,e))})),u(s))return s;switch(e){case"uncorrected":return a(s,l);case"biased":return a(s,l+1);case"unbiased":var f=Object(r.e)(s)?s.mul(0):0;return 1===l?f:a(s,l-1);default:throw new Error('Unknown normalization "'+e+'". Choose "unbiased" (default), "uncorrected", or "biased".')}}function c(t,e,n){try{if(0===t.length)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");return s(t,e,(function(t){return l(t,n)}))}catch(t){throw vr(t,"variance")}}})),Rs=Object(s.a)("quantileSeq",["typed","add","multiply","partitionSelect","compare"],(function(t){var e=t.typed,n=t.add,i=t.multiply,o=t.partitionSelect,s=t.compare;function u(t,e,a){var u=Object(M.e)(t),c=u.length;if(0===c)throw new Error("Cannot calculate quantile of an empty sequence");if(Object(r.y)(e)){var f=e*(c-1),h=f%1;if(0==h){var d=a?u[f]:o(u,f);return l(d),d}var p,m,g=Math.floor(f);if(a)p=u[g],m=u[g+1];else{m=o(u,g+1),p=u[g];for(var v=0;v<g;++v)0<s(u[v],p)&&(p=u[v])}return l(p),l(m),n(i(p,1-h),i(m,h))}var y=e.times(c-1);if(y.isInteger()){y=y.toNumber();var b=a?u[y]:o(u,y);return l(b),b}var x,w,_=y.floor(),S=y.minus(_),O=_.toNumber();if(a)x=u[O],w=u[O+1];else{w=o(u,O+1),x=u[O];for(var N=0;N<O;++N)0<s(u[N],x)&&(x=u[N])}l(x),l(w);var E=new S.constructor(1);return n(i(x,E.minus(S)),i(w,S))}var l=e({"number | BigNumber | Unit":function(t){return t}});return function(t,e,n){var i,o;if(arguments.length<2||3<arguments.length)throw new SyntaxError("Function quantileSeq requires two or three parameters");if(Object(r.i)(t)){if("boolean"!=typeof(n=n||!1))throw new TypeError("Unexpected type of argument in function quantileSeq");if(i=t.valueOf(),Object(r.y)(e)){if(e<0)throw new Error("N/prob must be non-negative");if(e<=1)return u(i,e,n);if(1<e){if(!Object(a.i)(e))throw new Error("N must be a positive integer");for(var s=e+1,l=new Array(e),c=0;c<e;)l[c]=u(i,++c/s,n);return l}}if(Object(r.e)(e)){var f=e.constructor;if(e.isNegative())throw new Error("N/prob must be non-negative");if(o=new f(1),e.lte(o))return new f(u(i,e,n));if(e.gt(o)){if(!e.isInteger())throw new Error("N must be a positive integer");var h=e.toNumber();if(4294967295<h)throw new Error("N must be less than or equal to 2^32-1, as that is the maximum length of an Array");var d=new f(h+1);l=new Array(h);for(var p=0;p<h;)l[p]=new f(u(i,new f(++p).div(d),n));return l}}if(Array.isArray(e)){l=new Array(e.length);for(var m=0;m<l.length;++m){var g=e[m];if(Object(r.y)(g)){if(g<0||1<g)throw new Error("Probability must be between 0 and 1, inclusive")}else{if(!Object(r.e)(g))throw new TypeError("Unexpected type of argument in function quantileSeq");if(o=new g.constructor(1),g.isNegative()||g.gt(o))throw new Error("Probability must be between 0 and 1, inclusive")}l[m]=u(i,g,n)}return l}throw new TypeError("Unexpected type of argument in function quantileSeq")}throw new TypeError("Unexpected type of argument in function quantileSeq")}})),Ls=Object(s.a)("std",["typed","sqrt","variance"],(function(t){var e=t.typed,n=t.sqrt,r=t.variance;return e("std",{"Array | Matrix":i,"Array | Matrix, string":i,"Array | Matrix, number | BigNumber":i,"Array | Matrix, number | BigNumber, string":i,"...":function(t){return i(t)}});function i(t,e){if(0===t.length)throw new SyntaxError("Function std requires one or more parameters (0 provided)");try{return n(r.apply(null,arguments))}catch(t){throw t instanceof TypeError&&-1!==t.message.indexOf(" variance")?new TypeError(t.message.replace(" variance"," std")):t}}}));function Fs(t,e){if(e<t)return 1;if(e===t)return e;var n=e+t>>1;return Fs(t,n)*Fs(1+n,e)}function qs(t,e){if(!Object(a.i)(t)||t<0)throw new TypeError("Positive integer value expected in function combinations");if(!Object(a.i)(e)||e<0)throw new TypeError("Positive integer value expected in function combinations");if(t<e)throw new TypeError("k must be less than or equal to n");var n=t-e;return e<n?Fs(1+n,t)/Fs(1,e):Fs(e+1,t)/Fs(1,n)}qs.signature="number, number";var Bs="combinations",zs=Object(s.a)(Bs,["typed"],(function(t){return(0,t.typed)(Bs,{"number, number":qs,"BigNumber, BigNumber":function(t,e){var n,r,i=t.constructor,o=t.minus(e),a=new i(1);if(!Hs(t)||!Hs(e))throw new TypeError("Positive integer value expected in function combinations");if(e.gt(t))throw new TypeError("k must be less than n in function combinations");if(n=a,e.lt(o))for(r=a;r.lte(o);r=r.plus(a))n=n.times(e.plus(r)).dividedBy(r);else for(r=a;r.lte(e);r=r.plus(a))n=n.times(o.plus(r)).dividedBy(r);return n}})}));function Hs(t){return t.isInteger()&&t.gte(0)}var Us="combinationsWithRep",Ws=Object(s.a)(Us,["typed"],(function(t){return(0,t.typed)(Us,{"number, number":function(t,e){if(!Object(a.i)(t)||t<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(!Object(a.i)(e)||e<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(t<1)throw new TypeError("k must be less than or equal to n + k - 1");return e<t-1?Fs(t,t+e-1)/Fs(1,e):Fs(e+1,t+e-1)/Fs(1,t-1)},"BigNumber, BigNumber":function(t,e){var n,r,i=new t.constructor(1),o=t.minus(i);if(!Vs(t)||!Vs(e))throw new TypeError("Positive integer value expected in function combinationsWithRep");if(t.lt(i))throw new TypeError("k must be less than or equal to n + k - 1 in function combinationsWithRep");if(n=i,e.lt(o))for(r=i;r.lte(o);r=r.plus(i))n=n.times(e.plus(r)).dividedBy(r);else for(r=i;r.lte(e);r=r.plus(i))n=n.times(o.plus(r)).dividedBy(r);return n}})}));function Vs(t){return t.isInteger()&&t.gte(0)}function $s(t){var e;if(Object(a.i)(t))return t<=0?isFinite(t)?1/0:NaN:171<t?1/0:Fs(1,t-1);if(t<.5)return Math.PI/(Math.sin(Math.PI*t)*$s(1-t));if(171.35<=t)return 1/0;if(85<t){var n=t*t,r=n*t,i=r*t,o=i*t;return Math.sqrt(2*Math.PI/t)*Math.pow(t/Math.E,t)*(1+1/(12*t)+1/(288*n)-139/(51840*r)-571/(2488320*i)+163879/(209018880*o)+5246819/(75246796800*o*t))}--t,e=Zs[0];for(var s=1;s<Zs.length;++s)e+=Zs[s]/(t+s);var u=t+Ys+.5;return Math.sqrt(2*Math.PI)*Math.pow(u,t+.5)*Math.exp(-u)*e}$s.signature="number";var Ys=4.7421875,Zs=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22],Gs=Object(s.a)("gamma",["typed","config","multiplyScalar","pow","BigNumber","Complex"],(function(t){var e=t.typed,n=t.config,r=t.multiplyScalar,i=t.pow,o=t.BigNumber,a=t.Complex;return e("gamma",{number:$s,Complex:function(t){if(0===t.im)return this(t.re);t=new a(t.re-1,t.im);for(var e=new a(Zs[0],0),n=1;n<Zs.length;++n){var o=t.re+n,s=o*o+t.im*t.im;0!=s?(e.re+=Zs[n]*o/s,e.im+=-Zs[n]*t.im/s):e.re=Zs[n]<0?-1/0:1/0}var u=new a(t.re+Ys+.5,t.im),l=Math.sqrt(2*Math.PI);t.re+=.5;var c=i(u,t);0===c.im?c.re*=l:(0===c.re||(c.re*=l),c.im*=l);var f=Math.exp(-u.re);return u.re=f*Math.cos(-u.im),u.im=f*Math.sin(-u.im),r(r(c,u),e)},BigNumber:function(t){if(t.isInteger())return t.isNegative()||t.isZero()?new o(1/0):function t(e){if(e<8)return new o([1,1,2,6,24,120,720,5040][e]);var r=n.precision+(0|Math.log(e.toNumber())),i=o.clone({precision:r});if(e%2==1)return e.times(t(new o(e-1)));for(var a=e,s=new i(e),u=e.toNumber();2<a;)u+=a-=2,s=s.times(u);return new o(s.toPrecision(o.precision))}(t.minus(1));if(!t.isFinite())return new o(t.isNegative()?NaN:1/0);throw new Error("Integer BigNumber expected")},"Array | Matrix":function(t){return I(t,this)}})})),Ks="factorial",Xs=Object(s.a)(Ks,["typed","gamma"],(function(t){var e=t.typed,n=t.gamma;return e(Ks,{number:function(t){if(t<0)throw new Error("Value must be non-negative");return n(t+1)},BigNumber:function(t){if(t.isNegative())throw new Error("Value must be non-negative");return n(t.plus(1))},"Array | Matrix":function(t){return I(t,this)}})})),Js="kldivergence",Qs=Object(s.a)(Js,["typed","matrix","divide","sum","multiply","dotDivide","log","isNumeric"],(function(t){var e=t.typed,n=t.matrix,r=t.divide,i=t.sum,o=t.multiply,a=t.dotDivide,s=t.log,u=t.isNumeric;return e(Js,{"Array, Array":function(t,e){return l(n(t),n(e))},"Matrix, Array":function(t,e){return l(t,n(e))},"Array, Matrix":function(t,e){return l(n(t),e)},"Matrix, Matrix":l});function l(t,e){var n=e.size().length,l=t.size().length;if(1<n)throw new Error("first object must be one dimensional");if(1<l)throw new Error("second object must be one dimensional");if(n!==l)throw new Error("Length of two vectors must be equal");if(0===i(t))throw new Error("Sum of elements in first object must be non zero");if(0===i(e))throw new Error("Sum of elements in second object must be non zero");var c=r(t,i(t)),f=r(e,i(e)),h=i(o(c,s(a(c,f))));return u(h)?h:Number.NaN}})),tu="multinomial",eu=Object(s.a)(tu,["typed","add","divide","multiply","factorial","isInteger","isPositive"],(function(t){var e=t.typed,n=t.add,r=t.divide,i=t.multiply,o=t.factorial,a=t.isInteger,s=t.isPositive;return e(tu,{"Array | Matrix":function(t){var e=0,u=1;return P(t,(function(t){if(!a(t)||!s(t))throw new TypeError("Positive integer value expected in function multinomial");e=n(e,t),u=i(u,o(t))})),r(o(e),u)}})})),nu="permutations",ru=Object(s.a)(nu,["typed","factorial"],(function(t){var e=t.typed,n=t.factorial;return e(nu,{"number | BigNumber":n,"number, number":function(t,e){if(!Object(a.i)(t)||t<0)throw new TypeError("Positive integer value expected in function permutations");if(!Object(a.i)(e)||e<0)throw new TypeError("Positive integer value expected in function permutations");if(t<e)throw new TypeError("second argument k must be less than or equal to first argument n");return Fs(t-e+1,t)},"BigNumber, BigNumber":function(t,e){if(!iu(t)||!iu(e))throw new TypeError("Positive integer value expected in function permutations");if(e.gt(t))throw new TypeError("second argument k must be less than or equal to first argument n");for(var n=t.mul(0).add(1),r=t.minus(e).plus(1);r.lte(t);r=r.plus(1))n=n.times(r);return n}})}));function iu(t){return t.isInteger()&&t.gte(0)}var ou=n(14),au=n.n(ou),su=au()();function uu(t){var e,n;return e=null===(n=t)?su:au()(String(n)),function(){return e()}}var lu=Object(s.a)("pickRandom",["typed","config","?on"],(function(t){var e=t.typed,n=t.config,i=t.on,o=uu(n.randomSeed);return i&&i("config",(function(t,e){t.randomSeed!==e.randomSeed&&(o=uu(t.randomSeed))})),e({"Array | Matrix":function(t){return a(t)},"Array | Matrix, number":function(t,e){return a(t,e,void 0)},"Array | Matrix, Array":function(t,e){return a(t,void 0,e)},"Array | Matrix, Array | Matrix, number":function(t,e,n){return a(t,n,e)},"Array | Matrix, number, Array | Matrix":a});function a(t,e,n){var i=void 0===e;if(i&&(e=1),t=t.valueOf(),n=n&&n.valueOf(),1<Object(M.a)(t).length)throw new Error("Only one dimensional vectors supported");var a=0;if(void 0!==n){if(n.length!==t.length)throw new Error("Weights must have the same length as possibles");for(var s=0,u=n.length;s<u;s++){if(!Object(r.y)(n[s])||n[s]<0)throw new Error("Weights must be an array of positive numbers");a+=n[s]}}var l=t.length;if(0===l)return[];if(l<=e)return 1<e?t:t[0];for(var c,f=[];f.length<e;){if(void 0===n)c=t[Math.floor(o()*l)];else for(var h=o()*a,d=0,p=t.length;d<p;d++)if((h-=n[d])<0){c=t[d];break}-1===f.indexOf(c)&&f.push(c)}return i?f[0]:f}}));function cu(t,e){var n=[];if(1<(t=t.slice(0)).length)for(var r=0,i=t.shift();r<i;r++)n.push(cu(t,e));else for(var o=0,a=t.shift();o<a;o++)n.push(e());return n}var fu="random",hu=Object(s.a)(fu,["typed","config","?on"],(function(t){var e=t.typed,n=t.config,i=t.on,o=uu(n.randomSeed);return i&&i("config",(function(t,e){t.randomSeed!==e.randomSeed&&(o=uu(t.randomSeed))})),e(fu,{"":function(){return s(0,1)},number:function(t){return s(0,t)},"number, number":s,"Array | Matrix":function(t){return a(t,0,1)},"Array | Matrix, number":function(t,e){return a(t,0,e)},"Array | Matrix, number, number":a});function a(t,e,n){var i=cu(t.valueOf(),(function(){return s(e,n)}));return Object(r.v)(t)?t.create(i):i}function s(t,e){return t+o()*(e-t)}})),du="randomInt",pu=Object(s.a)(du,["typed","config","?on"],(function(t){var e=t.typed,n=t.config,i=t.on,o=uu(n.randomSeed);return i&&i("config",(function(t,e){t.randomSeed!==e.randomSeed&&(o=uu(t.randomSeed))})),e(du,{"":function(){return s(0,1)},number:function(t){return s(0,t)},"number, number":s,"Array | Matrix":function(t){return a(t,0,1)},"Array | Matrix, number":function(t,e){return a(t,0,e)},"Array | Matrix, number, number":a});function a(t,e,n){var i=cu(t.valueOf(),(function(){return s(e,n)}));return Object(r.v)(t)?t.create(i):i}function s(t,e){return Math.floor(t+o()*(e-t))}})),mu="stirlingS2",gu=Object(s.a)(mu,["typed","addScalar","subtract","multiplyScalar","divideScalar","pow","factorial","combinations","isNegative","isInteger","larger"],(function(t){var e=t.typed,n=t.addScalar,r=t.subtract,i=t.multiplyScalar,o=t.divideScalar,a=t.pow,s=t.factorial,u=t.combinations,l=t.isNegative,c=t.isInteger,f=t.larger;return e(mu,{"number | BigNumber, number | BigNumber":function(t,e){if(!c(t)||l(t)||!c(e)||l(e))throw new TypeError("Non-negative integer value expected in function stirlingS2");if(f(e,t))throw new TypeError("k must be less than or equal to n in function stirlingS2");for(var h=s(e),d=0,p=0;p<=e;p++){var m=a(-1,r(e,p)),g=u(e,p),v=a(p,t);d=n(d,i(i(g,v),m))}return o(d,h)}})})),vu="bellNumbers",yu=Object(s.a)(vu,["typed","addScalar","isNegative","isInteger","stirlingS2"],(function(t){var e=t.typed,n=t.addScalar,r=t.isNegative,i=t.isInteger,o=t.stirlingS2;return e(vu,{"number | BigNumber":function(t){if(!i(t)||r(t))throw new TypeError("Non-negative integer value expected in function bellNumbers");for(var e=0,a=0;a<=t;a++)e=n(e,o(t,a));return e}})})),bu="catalan",xu=Object(s.a)(bu,["typed","addScalar","divideScalar","multiplyScalar","combinations","isNegative","isInteger"],(function(t){var e=t.typed,n=t.addScalar,r=t.divideScalar,i=t.multiplyScalar,o=t.combinations,a=t.isNegative,s=t.isInteger;return e(bu,{"number | BigNumber":function(t){if(!s(t)||a(t))throw new TypeError("Non-negative integer value expected in function catalan");return r(o(i(t,2),t),n(t,1))}})})),wu="composition",_u=Object(s.a)(wu,["typed","addScalar","combinations","isNegative","isPositive","isInteger","larger"],(function(t){var e=t.typed,n=t.addScalar,r=t.combinations,i=t.isPositive,o=(t.isNegative,t.isInteger),a=t.larger;return e(wu,{"number | BigNumber, number | BigNumber":function(t,e){if(!(o(t)&&i(t)&&o(e)&&i(e)))throw new TypeError("Positive integer value expected in function composition");if(a(e,t))throw new TypeError("k must be less than or equal to n in function composition");return r(n(t,-1),n(e,-1))}})})),Su=Object(s.a)("simplifyUtil",["FunctionNode","OperatorNode","SymbolNode"],(function(t){var e=t.FunctionNode,n=t.OperatorNode,i=t.SymbolNode,o={add:!0,multiply:!0},a={add:!0,multiply:!0};function s(t,e){if(!Object(r.B)(t))return!1;var n=t.fn.toString();return e&&Object(k.f)(e,n)&&Object(k.f)(e[n],"associative")?e[n].associative:a[n]||!1}function u(t){var e,n=[];return s(t)?(e=t.op,function t(i){for(var o=0;o<i.args.length;o++){var a=i.args[o];Object(r.B)(a)&&e===a.op?t(a):n.push(a)}}(t),n):t.args}function l(t){return Object(r.B)(t)?function(e){try{return new n(t.op,t.fn,e,t.implicit)}catch(e){return console.error(e),[]}}:function(n){return new e(new i(t.name),n)}}return{createMakeNodeFunction:l,isCommutative:function(t,e){if(!Object(r.B)(t))return!0;var n=t.fn.toString();return e&&Object(k.f)(e,n)&&Object(k.f)(e[n],"commutative")?e[n].commutative:o[n]||!1},isAssociative:s,flatten:function t(e){if(!e.args||0===e.args.length)return e;e.args=u(e);for(var n=0;n<e.args.length;n++)t(e.args[n])},allChildren:u,unflattenr:function t(e){if(e.args&&0!==e.args.length){for(var n=l(e),r=e.args.length,i=0;i<r;i++)t(e.args[i]);if(2<r&&s(e)){for(var o=e.args.pop();0<e.args.length;)o=n([e.args.pop(),o]);e.args=o.args}}},unflattenl:function t(e){if(e.args&&0!==e.args.length){for(var n=l(e),r=e.args.length,i=0;i<r;i++)t(e.args[i]);if(2<r&&s(e)){for(var o=e.args.shift();0<e.args.length;)o=n([o,e.args.shift()]);e.args=o.args}}}}})),Ou=Object(s.a)("simplifyCore",["equal","isZero","add","subtract","multiply","divide","pow","ConstantNode","OperatorNode","FunctionNode","ParenthesisNode"],(function(t){var e=t.equal,n=t.isZero,i=t.add,o=t.subtract,a=t.multiply,s=t.divide,u=t.pow,l=t.ConstantNode,c=t.OperatorNode,f=t.FunctionNode,h=t.ParenthesisNode,d=new l(0),p=new l(1);return function t(m){if(Object(r.B)(m)&&m.isUnary()){var g=t(m.args[0]);if("+"===m.op)return g;if("-"===m.op){if(Object(r.B)(g)){if(g.isUnary()&&"-"===g.op)return g.args[0];if(g.isBinary()&&"subtract"===g.fn)return new c("-","subtract",[g.args[1],g.args[0]])}return new c(m.op,m.fn,[g])}}else if(Object(r.B)(m)&&m.isBinary()){var v=t(m.args[0]),y=t(m.args[1]);if("+"===m.op){if(Object(r.l)(v)){if(n(v.value))return y;if(Object(r.l)(y))return new l(i(v.value,y.value))}return Object(r.l)(y)&&n(y.value)?v:Object(r.B)(y)&&y.isUnary()&&"-"===y.op?new c("-","subtract",[v,y.args[0]]):new c(m.op,m.fn,y?[v,y]:[v])}if("-"===m.op){if(Object(r.l)(v)&&y){if(Object(r.l)(y))return new l(o(v.value,y.value));if(n(v.value))return new c("-","unaryMinus",[y])}if("subtract"===m.fn)return Object(r.l)(y)&&n(y.value)?v:Object(r.B)(y)&&y.isUnary()&&"-"===y.op?t(new c("+","add",[v,y.args[0]])):new c(m.op,m.fn,[v,y])}else{if("*"===m.op){if(Object(r.l)(v)){if(n(v.value))return d;if(e(v.value,1))return y;if(Object(r.l)(y))return new l(a(v.value,y.value))}if(Object(r.l)(y)){if(n(y.value))return d;if(e(y.value,1))return v;if(Object(r.B)(v)&&v.isBinary()&&v.op===m.op){var b=v.args[0];if(Object(r.l)(b)){var x=new l(a(b.value,y.value));return new c(m.op,m.fn,[x,v.args[1]],m.implicit)}}return new c(m.op,m.fn,[y,v],m.implicit)}return new c(m.op,m.fn,[v,y],m.implicit)}if("/"===m.op){if(Object(r.l)(v)){if(n(v.value))return d;if(Object(r.l)(y)&&(e(y.value,1)||e(y.value,2)||e(y.value,4)))return new l(s(v.value,y.value))}return new c(m.op,m.fn,[v,y])}if("^"===m.op){if(Object(r.l)(y)){if(n(y.value))return p;if(e(y.value,1))return v;if(Object(r.l)(v))return new l(u(v.value,y.value));if(Object(r.B)(v)&&v.isBinary()&&"^"===v.op){var w=v.args[1];if(Object(r.l)(w))return new c(m.op,m.fn,[v.args[0],new l(a(w.value,y.value))])}}return new c(m.op,m.fn,[v,y])}}}else{if(Object(r.C)(m)){var _=t(m.content);return Object(r.C)(_)||Object(r.J)(_)||Object(r.l)(_)?_:new h(_)}if(Object(r.r)(m)){var S=m.args.map(t).map((function(t){return Object(r.C)(t)?t.content:t}));return new f(t(m.fn),S)}}return m}})),Nu=Object(s.a)("simplifyConstant",["typed","config","mathWithTransform","?fraction","?bignumber","ConstantNode","OperatorNode","FunctionNode","SymbolNode"],(function(t){var e=t.typed,n=t.config,i=t.mathWithTransform,o=t.fraction,a=t.bignumber,s=t.ConstantNode,u=t.OperatorNode,l=t.FunctionNode,c=t.SymbolNode,f=Su({FunctionNode:l,OperatorNode:u,SymbolNode:c}),h=f.isCommutative,d=f.isAssociative,p=f.allChildren,m=f.createMakeNodeFunction;function g(t,e,n){try{return b(i[t].apply(null,e),n)}catch(o){return e=e.map((function(t){return Object(r.o)(t)?t.valueOf():t})),b(i[t].apply(null,e),n)}}var v=e({Fraction:function(t){var e,n=t.s*t.n;return e=n<0?new u("-","unaryMinus",[new s(-n)]):new s(n),1!==t.d?new u("/","divide",[e,new s(t.d)]):e},number:function(t){return t<0?x(new s(-t)):new s(t)},BigNumber:function(t){return t<0?x(new s(-t)):new s(t)},Complex:function(){throw new Error("Cannot convert Complex number to Node")}});function y(t,e){if(e&&!1!==e.exactFractions&&isFinite(t)&&o){var n=o(t);if(n.valueOf()===t)return n}return t}var b=e({"string, Object":function(t,e){return"BigNumber"===n.number?(void 0===a&&In(),a(t)):"Fraction"===n.number?(void 0===o&&Rn(),o(t)):y(parseFloat(t),e)},"Fraction, Object":function(t){return t},"BigNumber, Object":function(t){return t},"number, Object":y,"Complex, Object":function(t,e){return 0!==t.im?t:y(t.re,e)}});function x(t){return new u("-","unaryMinus",[t])}function w(t,e,n,i){return e.reduce((function(e,o){if(Object(r.w)(e)||Object(r.w)(o))Object(r.w)(e)?Object(r.w)(o)||(o=v(o)):e=v(e);else{try{return g(t,[e,o],i)}catch(e){}e=v(e),o=v(o)}return n([e,o])}))}return function(t,e){var n=function t(e,n){switch(e.type){case"SymbolNode":return e;case"ConstantNode":return"number"!=typeof e.value&&isNaN(e.value)?e:b(e.value,n);case"FunctionNode":if(i[e.name]&&i[e.name].rawArgs)return e;if(-1===["add","multiply"].indexOf(e.name)){var o=e.args.map((function(e){return t(e,n)}));if(!o.some(r.w))try{return g(e.name,o,n)}catch(e){}return o=o.map((function(t){return Object(r.w)(t)?t:v(t)})),new l(e.name,o)}case"OperatorNode":var a,s,u=e.fn.toString(),c=m(e);if(Object(r.B)(e)&&e.isUnary())a=[t(e.args[0],n)],s=Object(r.w)(a[0])?c(a):g(u,a,n);else if(d(e))if(a=(a=p(e)).map((function(e){return t(e,n)})),h(u)){for(var f=[],y=[],x=0;x<a.length;x++)Object(r.w)(a[x])?y.push(a[x]):f.push(a[x]);s=1<f.length?(s=w(u,f,c,n),y.unshift(s),w(u,y,c,n)):w(u,a,c,n)}else s=w(u,a,c,n);else s=w(u,a=e.args.map((function(e){return t(e,n)})),c,n);return s;case"ParenthesisNode":return t(e.content,n);default:throw new Error("Unimplemented node type in simplifyConstant: ".concat(e.type))}}(t,e);return Object(r.w)(n)?n:v(n)}})),Mu=Object(s.a)("resolve",["parse","FunctionNode","OperatorNode","ParenthesisNode"],(function(t){var e=t.parse,n=t.FunctionNode,i=t.OperatorNode,o=t.ParenthesisNode;return function t(a,s){if(!s)return a;if(Object(r.J)(a)){var u=s[a.name];if(Object(r.w)(u))return t(u,s);if("number"==typeof u)return e(String(u))}else{if(Object(r.B)(a)){var l=a.args.map((function(e){return t(e,s)}));return new i(a.op,a.fn,l,a.implicit)}if(Object(r.C)(a))return new o(t(a.content,s));if(Object(r.r)(a)){var c=a.args.map((function(e){return t(e,s)}));return new n(a.name,c)}}return a}}));function Eu(t){return(Eu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var ku=Object(s.a)("simplify",["config","typed","parse","add","subtract","multiply","divide","pow","isZero","equal","?fraction","?bignumber","mathWithTransform","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode","SymbolNode"],(function(t){var e=t.config,n=t.typed,i=t.parse,o=t.add,a=t.subtract,s=t.multiply,u=t.divide,l=t.pow,c=t.isZero,f=t.equal,h=t.fraction,d=t.bignumber,p=t.mathWithTransform,m=t.ConstantNode,g=t.FunctionNode,v=t.OperatorNode,y=t.ParenthesisNode,b=t.SymbolNode,x=Nu({typed:n,config:e,mathWithTransform:p,fraction:h,bignumber:d,ConstantNode:m,OperatorNode:v,FunctionNode:g,SymbolNode:b}),w=Ou({equal:f,isZero:c,add:o,subtract:a,multiply:s,divide:u,pow:l,ConstantNode:m,OperatorNode:v,FunctionNode:g,ParenthesisNode:y}),_=Mu({parse:i,FunctionNode:g,OperatorNode:v,ParenthesisNode:y}),S=Su({FunctionNode:g,OperatorNode:v,SymbolNode:b}),O=S.isCommutative,N=S.isAssociative,M=S.flatten,E=S.unflattenr,C=S.unflattenl,T=S.createMakeNodeFunction,D=n("simplify",{string:function(t){return this(i(t),this.rules,{},{})},"string, Object":function(t,e){return this(i(t),this.rules,e,{})},"string, Object, Object":function(t,e,n){return this(i(t),this.rules,e,n)},"string, Array":function(t,e){return this(i(t),e,{},{})},"string, Array, Object":function(t,e,n){return this(i(t),e,n,{})},"string, Array, Object, Object":function(t,e,n,r){return this(i(t),e,n,r)},"Node, Object":function(t,e){return this(t,this.rules,e,{})},"Node, Object, Object":function(t,e,n){return this(t,this.rules,e,n)},Node:function(t){return this(t,this.rules,{},{})},"Node, Array":function(t,e){return this(t,e,{},{})},"Node, Array, Object":function(t,e,n){return this(t,e,n,{})},"Node, Array, Object, Object":function(t,e,n,r){e=function(t){for(var e=[],n=0;n<t.length;n++){var r,o,a=t[n],s=void 0,u=Eu(a);switch(u){case"string":var l=a.split("->");if(2!==l.length)throw SyntaxError("Could not parse rule: "+a);a={l:l[0],r:l[1]};case"object":s={l:A(i(a.l)),r:A(i(a.r))},a.context&&(s.evaluate=a.context),a.evaluate&&(s.evaluate=i(a.evaluate)),N(s.l)&&(r=T(s.l),o=new b("_p"+P++),s.expanded={},s.expanded.l=r([s.l.clone(),o]),M(s.expanded.l),E(s.expanded.l),s.expanded.r=r([s.r,o]));break;case"function":s=a;break;default:throw TypeError("Unsupported type of rule: "+u)}e.push(s)}return e}(e);for(var o=_(t,n),a={},s=(o=A(o)).toString({parenthesis:"all"});!a[s];){a[s]=!0;for(var u=P=0;u<e.length;u++)o="function"==typeof e[u]?e[u](o,r):(M(o),I(o,e[u])),C(o);s=o.toString({parenthesis:"all"})}return o}});function A(t){return t.transform((function(t,e,n){return Object(r.C)(t)?A(t.content):t}))}D.simplifyCore=w,D.resolve=_;var j={true:!0,false:!0,e:!0,i:!0,Infinity:!0,LN2:!0,LN10:!0,LOG2E:!0,LOG10E:!0,NaN:!0,phi:!0,pi:!0,SQRT1_2:!0,SQRT2:!0,tau:!0};D.rules=[w,{l:"log(e)",r:"1"},{l:"n-n1",r:"n+-n1"},{l:"-(c*v)",r:"(-c) * v"},{l:"-v",r:"(-1) * v"},{l:"n/n1^n2",r:"n*n1^-n2"},{l:"n/n1",r:"n*n1^-1"},{l:"(n ^ n1) ^ n2",r:"n ^ (n1 * n2)"},{l:"n*n",r:"n^2"},{l:"n * n^n1",r:"n^(n1+1)"},{l:"n^n1 * n^n2",r:"n^(n1+n2)"},{l:"n+n",r:"2*n"},{l:"n+-n",r:"0"},{l:"n1*n2 + n2",r:"(n1+1)*n2"},{l:"n1*n3 + n2*n3",r:"(n1+n2)*n3"},{l:"n1 + -1 * (n2 + n3)",r:"n1 + -1 * n2 + -1 * n3"},x,{l:"(-n)*n1",r:"-(n*n1)"},{l:"c+v",r:"v+c",context:{add:{commutative:!1}}},{l:"v*c",r:"c*v",context:{multiply:{commutative:!1}}},{l:"n+-n1",r:"n-n1"},{l:"n*(n1^-1)",r:"n/n1"},{l:"n*n1^-n2",r:"n/n1^n2"},{l:"n1^-1",r:"1/n1"},{l:"n*(n1/n2)",r:"(n*n1)/n2"},{l:"n-(n1+n2)",r:"n-n1-n2"},{l:"1*n",r:"n"},{l:"n1/(n2/n3)",r:"(n1*n3)/n2"}];var P=0,I=n("applyRule",{"Node, Object":function(t,e){var n=t;if(n instanceof v||n instanceof g){if(n.args)for(var r=0;r<n.args.length;r++)n.args[r]=I(n.args[r],e)}else n instanceof y&&n.content&&(n.content=I(n.content,e));var i,o=e.r,a=F(e.l,n)[0];return!a&&e.expanded&&(o=e.expanded.r,a=F(e.expanded.l,n)[0]),a&&(i=n.implicit,n=o.clone(),i&&"implicit"in o&&(n.implicit=!0),n=n.transform((function(t){return t.isSymbolNode&&Object(k.f)(a.placeholders,t.name)?a.placeholders[t.name].clone():t}))),n}});function R(t,e){var n={placeholders:{}};if(!t.placeholders&&!e.placeholders)return n;if(!t.placeholders)return e;if(!e.placeholders)return t;for(var r in t.placeholders)if(Object(k.f)(t.placeholders,r)&&(n.placeholders[r]=t.placeholders[r],Object(k.f)(e.placeholders,r)&&!function t(e,n){if(e instanceof m&&n instanceof m){if(!f(e.value,n.value))return!1}else if(e instanceof b&&n instanceof b){if(e.name!==n.name)return!1}else{if(!(e instanceof v&&n instanceof v||e instanceof g&&n instanceof g))return!1;if(e instanceof v){if(e.op!==n.op||e.fn!==n.fn)return!1}else if(e instanceof g&&e.name!==n.name)return!1;if(e.args.length!==n.args.length)return!1;for(var r=0;r<e.args.length;r++)if(!t(e.args[r],n.args[r]))return!1}return!0}(t.placeholders[r],e.placeholders[r])))return null;for(var i in e.placeholders)Object(k.f)(e.placeholders,i)&&(n.placeholders[i]=e.placeholders[i]);return n}function L(t,e){var n,r=[];if(0===t.length||0===e.length)return r;for(var i=0;i<t.length;i++)for(var o=0;o<e.length;o++)(n=R(t[i],e[o]))&&r.push(n);return r}function F(t,e,n){var i=[{placeholders:{}}];if(t instanceof v&&e instanceof v||t instanceof g&&e instanceof g){if(t instanceof v){if(t.op!==e.op||t.fn!==e.fn)return[]}else if(t instanceof g&&t.name!==e.name)return[];if((1!==e.args.length||1!==t.args.length)&&N(e)&&!n){if(2<=e.args.length&&2===t.args.length){for(var o=function(t,e){var n,r,i=[],o=T(t);if(O(t,e))for(var a=0;a<t.args.length;a++)(r=t.args.slice(0)).splice(a,1),n=1===r.length?r[0]:o(r),i.push(o([t.args[a],n]));else n=1===(r=t.args.slice(1)).length?r[0]:o(r),i.push(o([t.args[0],n]));return i}(e,t.context),a=[],s=0;s<o.length;s++){var u=F(t,o[s],!0);a=a.concat(u)}return a}if(2<t.args.length)throw Error("Unexpected non-binary associative function: "+t.toString());return[]}for(var l=[],c=0;c<t.args.length;c++){var h=F(t.args[c],e.args[c]);if(0===h.length)return[];l.push(h)}i=function(t){if(0===t.length)return t;for(var e=t.reduce(L),n=[],r={},i=0;i<e.length;i++){var o=JSON.stringify(e[i]);r[o]||(r[o]=!0,n.push(e[i]))}return n}(l)}else if(t instanceof b){if(0===t.name.length)throw new Error("Symbol in rule has 0 length...!?");if(j[t.name]){if(t.name!==e.name)return[]}else if("n"===t.name[0]||"_p"===t.name.substring(0,2))i[0].placeholders[t.name]=e;else if("v"===t.name[0]){if(Object(r.l)(e))return[];i[0].placeholders[t.name]=e}else{if("c"!==t.name[0])throw new Error("Invalid symbol in rule: "+t.name);if(!(e instanceof m))return[];i[0].placeholders[t.name]=e}}else{if(!(t instanceof m))return[];if(!f(t.value,e.value))return[]}return i}return D})),Cu=Object(s.a)("derivative",["typed","config","parse","simplify","equal","isZero","numeric","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode","SymbolNode"],(function(t){var e=t.typed,n=t.config,i=t.parse,o=t.simplify,a=t.equal,s=t.isZero,u=t.numeric,l=t.ConstantNode,c=t.FunctionNode,f=t.OperatorNode,h=t.ParenthesisNode,d=t.SymbolNode,p=e("derivative",{"Node, SymbolNode, Object":function(t,e,n){var r={};g(r,t,e.name);var i=v(t,r);return n.simplify?o(i):i},"Node, SymbolNode":function(t,e){return this(t,e,{simplify:!0})},"string, SymbolNode":function(t,e){return this(i(t),e)},"string, SymbolNode, Object":function(t,e,n){return this(i(t),e,n)},"string, string":function(t,e){return this(i(t),i(e))},"string, string, Object":function(t,e,n){return this(i(t),i(e),n)},"Node, string":function(t,e){return this(t,i(e))},"Node, string, Object":function(t,e,n){return this(t,i(e),n)}});p._simplify=!0,p.toTex=function(t){return m.apply(null,t.args)};var m=e("_derivTex",{"Node, SymbolNode":function(t,e){return Object(r.l)(t)&&"string"===Object(r.M)(t.value)?m(i(t.value).toString(),e.toString(),1):m(t.toString(),e.toString(),1)},"Node, ConstantNode":function(t,e){if("string"===Object(r.M)(e.value))return m(t,i(e.value));throw new Error("The second parameter to 'derivative' is a non-string constant")},"Node, SymbolNode, ConstantNode":function(t,e,n){return m(t.toString(),e.name,n.value)},"string, string, number":function(t,e,n){return(1===n?"{d\\over d"+e+"}":"{d^{"+n+"}\\over d"+e+"^{"+n+"}}")+"\\left[".concat(t,"\\right]")}}),g=e("constTag",{"Object, ConstantNode, string":function(t,e){return t[e]=!0},"Object, SymbolNode, string":function(t,e,n){return e.name!==n&&(t[e]=!0)},"Object, ParenthesisNode, string":function(t,e,n){return g(t,e.content,n)},"Object, FunctionAssignmentNode, string":function(t,e,n){return-1===e.params.indexOf(n)?t[e]=!0:g(t,e.expr,n)},"Object, FunctionNode | OperatorNode, string":function(t,e,n){if(0<e.args.length){for(var r=g(t,e.args[0],n),i=1;i<e.args.length;++i)r=g(t,e.args[i],n)&&r;if(r)return t[e]=!0}return!1}}),v=e("_derivative",{"ConstantNode, Object":function(){return y(0)},"SymbolNode, Object":function(t,e){return void 0!==e[t]?y(0):y(1)},"ParenthesisNode, Object":function(t,e){return new h(v(t.content,e))},"FunctionAssignmentNode, Object":function(t,e){return void 0!==e[t]?y(0):v(t.expr,e)},"FunctionNode, Object":function(t,e){if(1!==t.args.length&&function(t){if("log"!==t.name&&"nthRoot"!==t.name&&"pow"!==t.name||2!==t.args.length){for(var e=0;e<t.args.length;++e)t.args[e]=y(0);throw t.compile().evaluate(),new Error("Expected TypeError, but none found")}}(t),void 0!==e[t])return y(0);var n,r,i,o,a=t.args[0],s=!1,u=!1;switch(t.name){case"cbrt":s=!0,r=new f("*","multiply",[y(3),new f("^","pow",[a,new f("/","divide",[y(2),y(3)])])]);break;case"sqrt":case"nthRoot":if(1===t.args.length)s=!0,r=new f("*","multiply",[y(2),new c("sqrt",[a])]);else if(2===t.args.length)return e[n=new f("/","divide",[y(1),t.args[1]])]=e[t.args[1]],v(new f("^","pow",[a,n]),e);break;case"log10":n=y(10);case"log":if(n||1!==t.args.length){if(1===t.args.length&&n||2===t.args.length&&void 0!==e[t.args[1]])r=new f("*","multiply",[a.clone(),new c("log",[n||t.args[1]])]),s=!0;else if(2===t.args.length)return v(new f("/","divide",[new c("log",[a]),new c("log",[t.args[1]])]),e)}else r=a.clone(),s=!0;break;case"pow":return e[n]=e[t.args[1]],v(new f("^","pow",[a,t.args[1]]),e);case"exp":r=new c("exp",[a.clone()]);break;case"sin":r=new c("cos",[a.clone()]);break;case"cos":r=new f("-","unaryMinus",[new c("sin",[a.clone()])]);break;case"tan":r=new f("^","pow",[new c("sec",[a.clone()]),y(2)]);break;case"sec":r=new f("*","multiply",[t,new c("tan",[a.clone()])]);break;case"csc":u=!0,r=new f("*","multiply",[t,new c("cot",[a.clone()])]);break;case"cot":u=!0,r=new f("^","pow",[new c("csc",[a.clone()]),y(2)]);break;case"asin":s=!0,r=new c("sqrt",[new f("-","subtract",[y(1),new f("^","pow",[a.clone(),y(2)])])]);break;case"acos":u=s=!0,r=new c("sqrt",[new f("-","subtract",[y(1),new f("^","pow",[a.clone(),y(2)])])]);break;case"atan":s=!0,r=new f("+","add",[new f("^","pow",[a.clone(),y(2)]),y(1)]);break;case"asec":s=!0,r=new f("*","multiply",[new c("abs",[a.clone()]),new c("sqrt",[new f("-","subtract",[new f("^","pow",[a.clone(),y(2)]),y(1)])])]);break;case"acsc":u=s=!0,r=new f("*","multiply",[new c("abs",[a.clone()]),new c("sqrt",[new f("-","subtract",[new f("^","pow",[a.clone(),y(2)]),y(1)])])]);break;case"acot":u=s=!0,r=new f("+","add",[new f("^","pow",[a.clone(),y(2)]),y(1)]);break;case"sinh":r=new c("cosh",[a.clone()]);break;case"cosh":r=new c("sinh",[a.clone()]);break;case"tanh":r=new f("^","pow",[new c("sech",[a.clone()]),y(2)]);break;case"sech":u=!0,r=new f("*","multiply",[t,new c("tanh",[a.clone()])]);break;case"csch":u=!0,r=new f("*","multiply",[t,new c("coth",[a.clone()])]);break;case"coth":u=!0,r=new f("^","pow",[new c("csch",[a.clone()]),y(2)]);break;case"asinh":s=!0,r=new c("sqrt",[new f("+","add",[new f("^","pow",[a.clone(),y(2)]),y(1)])]);break;case"acosh":s=!0,r=new c("sqrt",[new f("-","subtract",[new f("^","pow",[a.clone(),y(2)]),y(1)])]);break;case"atanh":s=!0,r=new f("-","subtract",[y(1),new f("^","pow",[a.clone(),y(2)])]);break;case"asech":u=s=!0,r=new f("*","multiply",[a.clone(),new c("sqrt",[new f("-","subtract",[y(1),new f("^","pow",[a.clone(),y(2)])])])]);break;case"acsch":u=s=!0,r=new f("*","multiply",[new c("abs",[a.clone()]),new c("sqrt",[new f("+","add",[new f("^","pow",[a.clone(),y(2)]),y(1)])])]);break;case"acoth":u=s=!0,r=new f("-","subtract",[y(1),new f("^","pow",[a.clone(),y(2)])]);break;case"abs":r=new f("/","divide",[new c(new d("abs"),[a.clone()]),a.clone()]);break;default:throw new Error('Function "'+t.name+'" is not supported by derivative, or a wrong number of arguments is passed')}o=s?(i="/","divide"):(i="*","multiply");var l=v(a,e);return u&&(l=new f("-","unaryMinus",[l])),new f(i,o,[l,r])},"OperatorNode, Object":function(t,e){if(void 0!==e[t])return y(0);if("+"===t.op)return new f(t.op,t.fn,t.args.map((function(t){return v(t,e)})));if("-"===t.op){if(t.isUnary())return new f(t.op,t.fn,[v(t.args[0],e)]);if(t.isBinary())return new f(t.op,t.fn,[v(t.args[0],e),v(t.args[1],e)])}if("*"===t.op){var n=t.args.filter((function(t){return void 0!==e[t]}));if(0<n.length){var i=t.args.filter((function(t){return void 0===e[t]})),o=1===i.length?i[0]:new f("*","multiply",i),u=n.concat(v(o,e));return new f("*","multiply",u)}return new f("+","add",t.args.map((function(n){return new f("*","multiply",t.args.map((function(t){return t===n?v(t,e):t.clone()})))})))}if("/"===t.op&&t.isBinary()){var l=t.args[0],h=t.args[1];return void 0!==e[h]?new f("/","divide",[v(l,e),h]):void 0!==e[l]?new f("*","multiply",[new f("-","unaryMinus",[l]),new f("/","divide",[v(h,e),new f("^","pow",[h.clone(),y(2)])])]):new f("/","divide",[new f("-","subtract",[new f("*","multiply",[v(l,e),h.clone()]),new f("*","multiply",[l.clone(),v(h,e)])]),new f("^","pow",[h.clone(),y(2)])])}if("^"===t.op&&t.isBinary()){var d=t.args[0],p=t.args[1];if(void 0!==e[d])return Object(r.l)(d)&&(s(d.value)||a(d.value,1))?y(0):new f("*","multiply",[t,new f("*","multiply",[new c("log",[d.clone()]),v(p.clone(),e)])]);if(void 0===e[p])return new f("*","multiply",[new f("^","pow",[d.clone(),p.clone()]),new f("+","add",[new f("*","multiply",[v(d,e),new f("/","divide",[p.clone(),d.clone()])]),new f("*","multiply",[v(p,e),new c("log",[d.clone()])])])]);if(Object(r.l)(p)){if(s(p.value))return y(0);if(a(p.value,1))return v(d,e)}var m=new f("^","pow",[d.clone(),new f("-","subtract",[p,y(1)])]);return new f("*","multiply",[p.clone(),new f("*","multiply",[v(d,e),m])])}throw new Error('Operator "'+t.op+'" is not supported by derivative, or a wrong number of arguments is passed')}});function y(t,e){return new l(u(t,e||n.number))}return p})),Tu="rationalize",Du=Object(s.a)(Tu,["config","typed","equal","isZero","add","subtract","multiply","divide","pow","parse","simplify","?bignumber","?fraction","mathWithTransform","ConstantNode","OperatorNode","FunctionNode","SymbolNode","ParenthesisNode"],(function(t){var e=t.config,n=t.typed,r=t.equal,i=t.isZero,o=t.add,s=t.subtract,u=t.multiply,l=t.divide,c=t.pow,f=t.parse,h=t.simplify,d=t.fraction,p=t.bignumber,m=t.mathWithTransform,g=t.ConstantNode,v=t.OperatorNode,y=t.FunctionNode,b=t.SymbolNode,x=t.ParenthesisNode,w=Nu({typed:n,config:e,mathWithTransform:m,fraction:d,bignumber:p,ConstantNode:g,OperatorNode:v,FunctionNode:y,SymbolNode:b}),_=Ou({equal:r,isZero:i,add:o,subtract:s,multiply:u,divide:l,pow:c,ConstantNode:g,OperatorNode:v,FunctionNode:y,ParenthesisNode:x});return n(Tu,{string:function(t){return this(f(t),{},!1)},"string, boolean":function(t,e){return this(f(t),{},e)},"string, Object":function(t,e){return this(f(t),e,!1)},"string, Object, boolean":function(t,e,n){return this(f(t),e,n)},Node:function(t){return this(t,{},!1)},"Node, boolean":function(t,e){return this(t,{},e)},"Node, Object":function(t,e){return this(t,e,!1)},"Node, Object, boolean":function(t,e,n){var r,i,o,s,u,l,c=((s={}).firstRules=(r=[_,{l:"n+n",r:"2*n"},{l:"n+-n",r:"0"},w,{l:"n*(n1^-1)",r:"n/n1"},{l:"n*n1^-n2",r:"n/n1^n2"},{l:"n1^-1",r:"1/n1"},{l:"n*(n1/n2)",r:"(n*n1)/n2"},{l:"1*n",r:"n"}]).concat(i=[{l:"(-n1)/(-n2)",r:"n1/n2"},{l:"(-n1)*(-n2)",r:"n1*n2"},{l:"n1--n2",r:"n1+n2"},{l:"n1-n2",r:"n1+(-n2)"},{l:"(n1+n2)*n3",r:"(n1*n3 + n2*n3)"},{l:"n1*(n2+n3)",r:"(n1*n2+n1*n3)"},{l:"c1*n + c2*n",r:"(c1+c2)*n"},{l:"c1*n + n",r:"(c1+1)*n"},{l:"c1*n - c2*n",r:"(c1-c2)*n"},{l:"c1*n - n",r:"(c1-1)*n"},{l:"v/c",r:"(1/c)*v"},{l:"v/-c",r:"-(1/c)*v"},{l:"-v*-c",r:"c*v"},{l:"-v*c",r:"-c*v"},{l:"v*-c",r:"-c*v"},{l:"v*c",r:"c*v"},{l:"-(-n1*n2)",r:"(n1*n2)"},{l:"-(n1*n2)",r:"(-n1*n2)"},{l:"-(-n1+n2)",r:"(n1-n2)"},{l:"-(n1+n2)",r:"(-n1-n2)"},{l:"(n1^n2)^n3",r:"(n1^(n2*n3))"},{l:"-(-n1/n2)",r:"(n1/n2)"},{l:"-(n1/n2)",r:"(-n1/n2)"}],o=[{l:"(n1/(n2/n3))",r:"((n1*n3)/n2)"},{l:"(n1/n2/n3)",r:"(n1/(n2*n3))"}]),s.distrDivRules=[{l:"(n1/n2 + n3/n4)",r:"((n1*n4 + n3*n2)/(n2*n4))"},{l:"(n1/n2 + n3)",r:"((n1 + n3*n2)/n2)"},{l:"(n1 + n2/n3)",r:"((n1*n3 + n2)/n3)"}],s.sucDivRules=o,s.firstRulesAgain=r.concat(i),s.finalRules=[_,{l:"n*-n",r:"-n^2"},{l:"n*n",r:"n^2"},w,{l:"n*-n^n1",r:"-n^(n1+1)"},{l:"n*n^n1",r:"n^(n1+1)"},{l:"n^n1*-n^n2",r:"-n^(n1+n2)"},{l:"n^n1*n^n2",r:"n^(n1+n2)"},{l:"n^n1*-n",r:"-n^(n1+1)"},{l:"n^n1*n",r:"n^(n1+1)"},{l:"n^n1/-n",r:"-n^(n1-1)"},{l:"n^n1/n",r:"n^(n1-1)"},{l:"n/-n^n1",r:"-n^(1-n1)"},{l:"n/n^n1",r:"n^(1-n1)"},{l:"n^n1/-n^n2",r:"n^(n1-n2)"},{l:"n^n1/n^n2",r:"n^(n1-n2)"},{l:"n1+(-n2*n3)",r:"n1-n2*n3"},{l:"v*(-c)",r:"-c*v"},{l:"n1+-n2",r:"n1-n2"},{l:"v*c",r:"c*v"},{l:"(n1^n2)^n3",r:"(n1^(n2*n3))"}],s),f=function(t,e,n,r){var i=[],o=h(t,r,e,{exactFractions:!1}),s="+-*"+((n=!!n)?"/":"");!function t(e){var n=e.type;if("FunctionNode"===n)throw new Error("There is an unsolved function call");if("OperatorNode"===n)if("^"===e.op){if("ConstantNode"!==e.args[1].type||!Object(a.i)(parseFloat(e.args[1].value)))throw new Error("There is a non-integer exponent");t(e.args[0])}else{if(-1===s.indexOf(e.op))throw new Error("Operator "+e.op+" invalid in polynomial expression");for(var r=0;r<e.args.length;r++)t(e.args[r])}else if("SymbolNode"===n){var o=e.name;-1===i.indexOf(o)&&i.push(o)}else if("ParenthesisNode"===n)t(e.content);else if("ConstantNode"!==n)throw new Error("type "+n+" is not allowed in polynomial expression")}(o);var u={};return u.expression=o,u.variables=i,u}(t,e,!0,c.firstRules),d=f.variables.length;if(t=f.expression,1<=d){t=function t(e,n,r){var i,o,s,u,l=e.type,c=1<arguments.length;if("OperatorNode"===l&&e.isBinary()&&(i=!1,"^"===e.op&&("ParenthesisNode"!==e.args[0].type&&"OperatorNode"!==e.args[0].type||"ConstantNode"!==e.args[1].type||(i=2<=(o=parseFloat(e.args[1].value))&&Object(a.i)(o))),i&&(e=2<o?(s=e.args[0],u=new v("^","pow",[e.args[0].cloneDeep(),new g(o-1)]),new v("*","multiply",[s,u])):new v("*","multiply",[e.args[0],e.args[0].cloneDeep()]),c&&("content"===r?n.content=e:n.args[r]=e))),"ParenthesisNode"===l)t(e.content,e,"content");else if("ConstantNode"!==l&&"SymbolNode"!==l)for(var f=0;f<e.args.length;f++)t(e.args[f],e,f);if(!c)return e}(t);var p,m=!0,y=!1;for(t=h(t,c.firstRules,{},{exactFractions:!1});l=m?c.distrDivRules:c.sucDivRules,m=!m,(p=(t=h(t,l)).toString())!==u;)y=!0,u=p;y&&(t=h(t,c.firstRulesAgain,{},{exactFractions:!1})),t=h(t,c.finalRules,{},{exactFractions:!1})}var b=[],x={};return"OperatorNode"===t.type&&t.isBinary()&&"/"===t.op?(1===d&&(t.args[0]=S(t.args[0],b),t.args[1]=S(t.args[1])),n&&(x.numerator=t.args[0],x.denominator=t.args[1])):(1===d&&(t=S(t,b)),n&&(x.numerator=t,x.denominator=null)),n?(x.coefficients=b,x.variables=f.variables,x.expression=t,x):t}});function S(t,e){void 0===e&&(e=[]);var n=e[0]=0,r="";!function t(i,o,s){var u=i.type;if("FunctionNode"===u)throw new Error("There is an unsolved function call");if("OperatorNode"===u){if(-1==="+-*^".indexOf(i.op))throw new Error("Operator "+i.op+" invalid");if(null!==o){if(("unaryMinus"===i.fn||"pow"===i.fn)&&"add"!==o.fn&&"subtract"!==o.fn&&"multiply"!==o.fn)throw new Error("Invalid "+i.op+" placing");if(("subtract"===i.fn||"add"===i.fn||"multiply"===i.fn)&&"add"!==o.fn&&"subtract"!==o.fn)throw new Error("Invalid "+i.op+" placing");if(("subtract"===i.fn||"add"===i.fn||"unaryMinus"===i.fn)&&0!==s.noFil)throw new Error("Invalid "+i.op+" placing")}"^"!==i.op&&"*"!==i.op||(s.fire=i.op);for(var l=0;l<i.args.length;l++)"unaryMinus"===i.fn&&(s.oper="-"),"+"!==i.op&&"subtract"!==i.fn||(s.fire="",s.cte=1,s.oper=0===l?"+":i.op),s.noFil=l,t(i.args[l],i,s)}else if("SymbolNode"===u){if(i.name!==r&&""!==r)throw new Error("There is more than one variable");if(r=i.name,null===o)return void(e[1]=1);if("^"===o.op&&0!==s.noFil)throw new Error("In power the variable should be the first parameter");if("*"===o.op&&1!==s.noFil)throw new Error("In multiply the variable should be the second parameter");""!==s.fire&&"*"!==s.fire||(n<1&&(e[1]=0),e[1]+=s.cte*("+"===s.oper?1:-1),n=Math.max(1,n))}else{if("ConstantNode"!==u)throw new Error("Type "+u+" is not allowed");var c=parseFloat(i.value);if(null===o)return void(e[0]=c);if("^"===o.op){if(1!==s.noFil)throw new Error("Constant cannot be powered");if(!Object(a.i)(c)||c<=0)throw new Error("Non-integer exponent is not allowed");for(var f=n+1;f<c;f++)e[f]=0;return n<c&&(e[c]=0),e[c]+=s.cte*("+"===s.oper?1:-1),void(n=Math.max(c,n))}s.cte=c,""===s.fire&&(e[0]+=s.cte*("+"===s.oper?1:-1))}}(t,null,{cte:1,oper:"+",fire:""});for(var i,o,s,u,l,c=!0,f=n=e.length-1;0<=f;f--)0!==e[f]&&(o=new g(c?e[f]:Math.abs(e[f])),s=e[f]<0?"-":"+",0<f&&(l=new b(r),1<f&&(u=new g(f),l=new v("^","pow",[l,u])),o=-1===e[f]&&c?new v("-","unaryMinus",[l]):1===Math.abs(e[f])?l:new v("*","multiply",[o,l])),i=c?o:"+"==s?new v("+","add",[i,o]):new v("-","subtract",[i,o]),c=!1);return c?new g(0):i}})),Au=Object(s.a)("reviver",["classes"],(function(t){var e=t.classes;return function(t,n){var r=e[n&&n.mathjs];return r&&"function"==typeof r.fromJSON?r.fromJSON(n):n}})),ju=Object(s.a)("replacer",[],(function(){return function(t,e){return"number"!=typeof e||isFinite(e)&&!isNaN(e)?e:{mathjs:"number",value:String(e)}}})),Pu=Math.PI,Iu=2*Math.PI,Ru=Math.E,Lu=Object(s.a)("true",[],(function(){return!0})),Fu=Object(s.a)("false",[],(function(){return!1})),qu=Object(s.a)("null",[],(function(){return null})),Bu=nl("Infinity",["config","?BigNumber"],(function(t){var e=t.config,n=t.BigNumber;return"BigNumber"===e.number?new n(1/0):1/0})),zu=nl("NaN",["config","?BigNumber"],(function(t){var e=t.config,n=t.BigNumber;return"BigNumber"===e.number?new n(NaN):NaN})),Hu=nl("pi",["config","?BigNumber"],(function(t){var e=t.config,n=t.BigNumber;return"BigNumber"===e.number?Pi(n):Pu})),Uu=nl("tau",["config","?BigNumber"],(function(t){var e=t.config,n=t.BigNumber;return"BigNumber"===e.number?Ii(n):Iu})),Wu=nl("e",["config","?BigNumber"],(function(t){var e=t.config,n=t.BigNumber;return"BigNumber"===e.number?Ai(n):Ru})),Vu=nl("phi",["config","?BigNumber"],(function(t){var e=t.config,n=t.BigNumber;return"BigNumber"===e.number?ji(n):1.618033988749895})),$u=nl("LN2",["config","?BigNumber"],(function(t){var e=t.config,n=t.BigNumber;return"BigNumber"===e.number?new n(2).ln():Math.LN2})),Yu=nl("LN10",["config","?BigNumber"],(function(t){var e=t.config,n=t.BigNumber;return"BigNumber"===e.number?new n(10).ln():Math.LN10})),Zu=nl("LOG2E",["config","?BigNumber"],(function(t){var e=t.config,n=t.BigNumber;return"BigNumber"===e.number?new n(1).div(new n(2).ln()):Math.LOG2E})),Gu=nl("LOG10E",["config","?BigNumber"],(function(t){var e=t.config,n=t.BigNumber;return"BigNumber"===e.number?new n(1).div(new n(10).ln()):Math.LOG10E})),Ku=nl("SQRT1_2",["config","?BigNumber"],(function(t){var e=t.config,n=t.BigNumber;return"BigNumber"===e.number?new n("0.5").sqrt():Math.SQRT1_2})),Xu=nl("SQRT2",["config","?BigNumber"],(function(t){var e=t.config,n=t.BigNumber;return"BigNumber"===e.number?new n(2).sqrt():Math.SQRT2})),Ju=nl("i",["Complex"],(function(t){return t.Complex.I})),Qu=Object(s.a)("PI",["pi"],(function(t){return t.pi})),tl=Object(s.a)("E",["e"],(function(t){return t.e})),el=Object(s.a)("version",[],(function(){return"7.1.0"}));function nl(t,e,n){return Object(s.a)(t,e,n,{recreateOnConfigChange:!0})}var rl=Ql("speedOfLight","299792458","m s^-1"),il=Ql("gravitationConstant","6.67430e-11","m^3 kg^-1 s^-2"),ol=Ql("planckConstant","6.62607015e-34","J s"),al=Ql("reducedPlanckConstant","1.0545718176461565e-34","J s"),sl=Ql("magneticConstant","1.25663706212e-6","N A^-2"),ul=Ql("electricConstant","8.8541878128e-12","F m^-1"),ll=Ql("vacuumImpedance","376.730313667","ohm"),cl=Ql("coulomb","8.987551792261171e9","N m^2 C^-2"),fl=Ql("elementaryCharge","1.602176634e-19","C"),hl=Ql("bohrMagneton","9.2740100783e-24","J T^-1"),dl=Ql("conductanceQuantum","7.748091729863649e-5","S"),pl=Ql("inverseConductanceQuantum","12906.403729652257","ohm"),ml=Ql("magneticFluxQuantum","2.0678338484619295e-15","Wb"),gl=Ql("nuclearMagneton","5.0507837461e-27","J T^-1"),vl=Ql("klitzing","25812.807459304513","ohm"),yl=Ql("bohrRadius","5.29177210903e-11","m"),bl=Ql("classicalElectronRadius","2.8179403262e-15","m"),xl=Ql("electronMass","9.1093837015e-31","kg"),wl=Ql("fermiCoupling","1.1663787e-5","GeV^-2"),_l=tc("fineStructure",.0072973525693),Sl=Ql("hartreeEnergy","4.3597447222071e-18","J"),Ol=Ql("protonMass","1.67262192369e-27","kg"),Nl=Ql("deuteronMass","3.3435830926e-27","kg"),Ml=Ql("neutronMass","1.6749271613e-27","kg"),El=Ql("quantumOfCirculation","3.6369475516e-4","m^2 s^-1"),kl=Ql("rydberg","10973731.568160","m^-1"),Cl=Ql("thomsonCrossSection","6.6524587321e-29","m^2"),Tl=tc("weakMixingAngle",.2229),Dl=tc("efimovFactor",22.7),Al=Ql("atomicMass","1.66053906660e-27","kg"),jl=Ql("avogadro","6.02214076e23","mol^-1"),Pl=Ql("boltzmann","1.380649e-23","J K^-1"),Il=Ql("faraday","96485.33212331001","C mol^-1"),Rl=Ql("firstRadiation","3.7417718521927573e-16","W m^2"),Ll=Ql("loschmidt","2.686780111798444e25","m^-3"),Fl=Ql("gasConstant","8.31446261815324","J K^-1 mol^-1"),ql=Ql("molarPlanckConstant","3.990312712893431e-10","J s mol^-1"),Bl=Ql("molarVolume","0.022413969545014137","m^3 mol^-1"),zl=tc("sackurTetrode",-1.16487052358),Hl=Ql("secondRadiation","0.014387768775039337","m K"),Ul=Ql("stefanBoltzmann","5.67037441918443e-8","W m^-2 K^-4"),Wl=Ql("wienDisplacement","2.897771955e-3","m K"),Vl=Ql("molarMass","0.99999999965e-3","kg mol^-1"),$l=Ql("molarMassC12","11.9999999958e-3","kg mol^-1"),Yl=Ql("gravity","9.80665","m s^-2"),Zl=Ql("planckLength","1.616255e-35","m"),Gl=Ql("planckMass","2.176435e-8","kg"),Kl=Ql("planckTime","5.391245e-44","s"),Xl=Ql("planckCharge","1.87554603778e-18","C"),Jl=Ql("planckTemperature","1.416785e+32","K");function Ql(t,e,n){return Object(s.a)(t,["config","Unit","BigNumber"],(function(t){var r=t.config,i=t.Unit,o=t.BigNumber,a=new i("BigNumber"===r.number?new o(e):parseFloat(e),n);return a.fixPrefix=!0,a}))}function tc(t,e){return Object(s.a)(t,["config","BigNumber"],(function(t){var n=t.config,r=t.BigNumber;return"BigNumber"===n.number?new r(e):e}))}var ec=Object(s.a)("apply",["typed","isInteger"],(function(t){var e=t.typed,n=t.isInteger,i=$t({typed:e,isInteger:n});return e("apply",{"...any":function(t){var e=t[1];Object(r.y)(e)?t[1]=e-1:Object(r.e)(e)&&(t[1]=e.minus(1));try{return i.apply(null,t)}catch(t){throw la(t)}}})}),{isTransformFunction:!0}),nc=Object(s.a)("column",["typed","Index","matrix","range"],(function(t){var e=t.typed,n=t.Index,i=t.matrix,o=t.range,a=pn({typed:e,Index:n,matrix:i,range:o});return e("column",{"...any":function(t){var e=t.length-1,n=t[e];Object(r.y)(n)&&(t[e]=n-1);try{return a.apply(null,t)}catch(t){throw la(t)}}})}),{isTransformFunction:!0});function rc(t,e,n){var i=t.filter((function(t){return Object(r.J)(t)&&!(t.name in e)&&!(t.name in n)}))[0];if(!i)throw new Error('No undefined variable found in inline expression "'+t+'"');var o=i.name,a=Object.create(n),s=t.compile();return function(t){return a[o]=t,s.evaluate(a)}}var ic=Object(s.a)("filter",["typed"],(function(t){var e=t.typed;function n(t,e,n){var o,a;return t[0]&&(o=t[0].compile().evaluate(n)),t[1]&&(a=Object(r.J)(t[1])||Object(r.q)(t[1])?t[1].compile().evaluate(n):rc(t[1],e,n)),i(o,a)}n.rawArgs=!0;var i=e("filter",{"Array, function":oc,"Matrix, function":function(t,e){return t.create(oc(t.toArray(),e))},"Array, RegExp":M.d,"Matrix, RegExp":function(t,e){return t.create(Object(M.d)(t.toArray(),e))}});return n}),{isTransformFunction:!0});function oc(t,e){var n=bn(e);return Object(M.c)(t,(function(t,r,i){return 1===n?e(t):2===n?e(t,[r+1]):e(t,[r+1],i)}))}var ac=Object(s.a)("forEach",["typed"],(function(t){var e=t.typed;function n(t,e,n){var o,a;return t[0]&&(o=t[0].compile().evaluate(n)),t[1]&&(a=Object(r.J)(t[1])||Object(r.q)(t[1])?t[1].compile().evaluate(n):rc(t[1],e,n)),i(o,a)}n.rawArgs=!0;var i=e("forEach",{"Array | Matrix, function":function(t,e){var n=bn(e);!function r(i,o){Array.isArray(i)?Object(M.f)(i,(function(t,e){r(t,o.concat(e+1))})):1===n?e(i):2===n?e(i,o):e(i,o,t)}(t.valueOf(),[])}});return n}),{isTransformFunction:!0}),sc=Object(s.a)("index",["Index"],(function(t){var e=t.Index;return function(){for(var t=[],n=0,i=arguments.length;n<i;n++){var o=arguments[n];if(Object(r.D)(o))o.start--,o.end-=0<o.step?0:2;else if(o&&!0===o.isSet)o=o.map((function(t){return t-1}));else if(Object(r.b)(o)||Object(r.v)(o))o=o.map((function(t){return t-1}));else if(Object(r.y)(o))o--;else if(Object(r.e)(o))o=o.toNumber()-1;else if("string"!=typeof o)throw new TypeError("Dimension must be an Array, Matrix, number, string, or Range");t[n]=o}var a=new e;return e.apply(a,t),a}}),{isTransformFunction:!0}),uc=Object(s.a)("map",["typed"],(function(t){var e=t.typed;function n(t,e,n){var o,a;return t[0]&&(o=t[0].compile().evaluate(n)),t[1]&&(a=Object(r.J)(t[1])||Object(r.q)(t[1])?t[1].compile().evaluate(n):rc(t[1],e,n)),i(o,a)}n.rawArgs=!0;var i=e("map",{"Array, function":function(t,e){return lc(t,e,t)},"Matrix, function":function(t,e){return t.create(lc(t.valueOf(),e,t))}});return n}),{isTransformFunction:!0});function lc(t,e,n){var r=bn(e);return function t(i,o){return Array.isArray(i)?Object(M.k)(i,(function(e,n){return t(e,o.concat(n+1))})):1===r?e(i):2===r?e(i,o):e(i,o,n)}(t,[])}var cc=Object(s.a)("max",["typed","config","numeric","larger"],(function(t){var e=t.typed,n=t.config,i=t.numeric,o=t.larger,a=Mi({typed:e,config:n,numeric:i,larger:o});return e("max",{"...any":function(t){var e;2===t.length&&Object(r.i)(t[0])&&(e=t[1],Object(r.y)(e)?t[1]=e-1:Object(r.e)(e)&&(t[1]=e.minus(1)));try{return a.apply(null,t)}catch(t){throw la(t)}}})}),{isTransformFunction:!0}),fc=Object(s.a)("mean",["typed","add","divide"],(function(t){var e=t.typed,n=t.add,i=t.divide,o=Ts({typed:e,add:n,divide:i});return e("mean",{"...any":function(t){var e;2===t.length&&Object(r.i)(t[0])&&(e=t[1],Object(r.y)(e)?t[1]=e-1:Object(r.e)(e)&&(t[1]=e.minus(1)));try{return o.apply(null,t)}catch(t){throw la(t)}}})}),{isTransformFunction:!0}),hc=Object(s.a)("min",["typed","config","numeric","smaller"],(function(t){var e=t.typed,n=t.config,i=t.numeric,o=t.smaller,a=Ei({typed:e,config:n,numeric:i,smaller:o});return e("min",{"...any":function(t){var e;2===t.length&&Object(r.i)(t[0])&&(e=t[1],Object(r.y)(e)?t[1]=e-1:Object(r.e)(e)&&(t[1]=e.minus(1)));try{return a.apply(null,t)}catch(t){throw la(t)}}})}),{isTransformFunction:!0}),dc=Object(s.a)("range",["typed","config","?matrix","?bignumber","smaller","smallerEq","larger","largerEq"],(function(t){var e=t.typed,n=t.config,r=t.matrix,i=t.bignumber,o=t.smaller,a=t.smallerEq,s=t.larger,u=t.largerEq,l=Fn({typed:e,config:n,matrix:r,bignumber:i,smaller:o,smallerEq:a,larger:s,largerEq:u});return e("range",{"...any":function(t){return"boolean"!=typeof t[t.length-1]&&t.push(!0),l.apply(null,t)}})}),{isTransformFunction:!0}),pc=Object(s.a)("row",["typed","Index","matrix","range"],(function(t){var e=t.typed,n=t.Index,i=t.matrix,o=t.range,a=Un({typed:e,Index:n,matrix:i,range:o});return e("row",{"...any":function(t){var e=t.length-1,n=t[e];Object(r.y)(n)&&(t[e]=n-1);try{return a.apply(null,t)}catch(t){throw la(t)}}})}),{isTransformFunction:!0}),mc=Object(s.a)("subset",["typed","matrix"],(function(t){var e=t.typed,n=t.matrix,r=er({typed:e,matrix:n});return e("subset",{"...any":function(t){try{return r.apply(null,t)}catch(t){throw la(t)}}})}),{isTransformFunction:!0}),gc=Object(s.a)("concat",["typed","matrix","isInteger"],(function(t){var e=t.typed,n=t.matrix,i=t.isInteger,o=dn({typed:e,matrix:n,isInteger:i});return e("concat",{"...any":function(t){var e=t.length-1,n=t[e];Object(r.y)(n)?t[e]=n-1:Object(r.e)(n)&&(t[e]=n.minus(1));try{return o.apply(null,t)}catch(t){throw la(t)}}})}),{isTransformFunction:!0}),vc=Object(s.a)("std",["typed","sqrt","variance"],(function(t){var e=t.typed,n=t.sqrt,i=t.variance,o=Ls({typed:e,sqrt:n,variance:i});return e("std",{"...any":function(t){var e;2<=t.length&&Object(r.i)(t[0])&&(e=t[1],Object(r.y)(e)?t[1]=e-1:Object(r.e)(e)&&(t[1]=e.minus(1)));try{return o.apply(null,t)}catch(t){throw la(t)}}})}),{isTransformFunction:!0}),yc=Object(s.a)("sum",["typed","config","add","numeric"],(function(t){var e=t.typed,n=t.config,i=t.add,o=t.numeric,a=Cs({typed:e,config:n,add:i,numeric:o});return e("sum",{"...any":function(t){var e;2===t.length&&Object(r.i)(t[0])&&(e=t[1],Object(r.y)(e)?t[1]=e-1:Object(r.e)(e)&&(t[1]=e.minus(1)));try{return a.apply(null,t)}catch(t){throw la(t)}}})}),{isTransformFunction:!0}),bc="variance",xc=Object(s.a)(bc,["typed","add","subtract","multiply","divide","apply","isNaN"],(function(t){var e=t.typed,n=t.add,i=t.subtract,o=t.multiply,a=t.divide,s=t.apply,u=t.isNaN,l=Is({typed:e,add:n,subtract:i,multiply:o,divide:a,apply:s,isNaN:u});return e(bc,{"...any":function(t){var e;2<=t.length&&Object(r.i)(t[0])&&(e=t[1],Object(r.y)(e)?t[1]=e-1:Object(r.e)(e)&&(t[1]=e.minus(1)));try{return l.apply(null,t)}catch(t){throw la(t)}}})}),{isTransformFunction:!0})},function(t,e,n){"use strict";n.r(e),n.d(e,"create",(function(){return y}));var r=n(3),i=n(17),o=n.n(i),a=n(1),s=n(0),u=n(2),l=n(12);function c(t){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var f={epsilon:1e-12,matrix:"Matrix",number:"number",precision:64,predictable:!1,randomSeed:null},h=["Matrix","Array"],d=["number","BigNumber","Fraction"];function p(t,e,n){var r,i;void 0!==t[e]&&(r=n,i=t[e],-1===r.indexOf(i))&&console.warn('Warning: Unknown value "'+t[e]+'" for configuration option "'+e+'". Available options: '+n.map((function(t){return JSON.stringify(t)})).join(", ")+".")}var m=n(6),g=n(9);function v(){return(v=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function y(t,e){var n=v({},f,e);if("function"!=typeof Object.create)throw new Error("ES5 not supported by this JavaScript engine. Please load the es5-shim and es5-sham library for compatibility.");var i,b,x,w,_=(i={isNumber:a.y,isComplex:a.j,isBigNumber:a.e,isFraction:a.o,isUnit:a.L,isString:a.I,isArray:a.b,isMatrix:a.v,isCollection:a.i,isDenseMatrix:a.n,isSparseMatrix:a.H,isRange:a.D,isIndex:a.t,isBoolean:a.g,isResultSet:a.G,isHelp:a.s,isFunction:a.p,isDate:a.m,isRegExp:a.F,isObject:a.z,isNull:a.x,isUndefined:a.K,isAccessorNode:a.a,isArrayNode:a.c,isAssignmentNode:a.d,isBlockNode:a.f,isConditionalNode:a.k,isConstantNode:a.l,isFunctionAssignmentNode:a.q,isFunctionNode:a.r,isIndexNode:a.u,isNode:a.w,isObjectNode:a.A,isOperatorNode:a.B,isParenthesisNode:a.C,isRangeNode:a.E,isSymbolNode:a.J,isChain:a.h},b=new o.a,i.on=b.on.bind(b),i.off=b.off.bind(b),i.once=b.once.bind(b),i.emit=b.emit.bind(b),i);function S(t){if(t){var e=Object(r.i)(x,r.a);p(t,"matrix",h),p(t,"number",d),Object(r.b)(x,t);var n=Object(r.i)(x,r.a),i=Object(r.i)(t,r.a);return w("config",n,e,i),n}return Object(r.i)(x,r.a)}_.config=(x=n,w=_.emit,S.MATRIX_OPTIONS=h,S.NUMBER_OPTIONS=d,Object.keys(f).forEach((function(t){Object.defineProperty(S,t,{get:function(){return x[t]},enumerable:!0,configurable:!0})})),S),_.expression={transform:{},mathWithTransform:{config:_.config}};var O={},N=function(t,e,n,i){function o(t,e){e&&"function"==typeof e.transform?(n.expression.transform[t]=e.transform,d(t)&&(n.expression.mathWithTransform[t]=e.transform)):(delete n.expression.transform[t],d(t)&&(n.expression.mathWithTransform[t]=e))}function f(t){delete n.expression.transform[t],d(t)?n.expression.mathWithTransform[t]=n[t]:delete n.expression.mathWithTransform[t]}function h(t){return"function"==typeof t&&"object"===c(t.signatures)}function d(t){return!Object(r.f)(g,t)}function p(t){return!(-1!==t.fn.indexOf(".")||Object(r.f)(g,t.fn)||t.meta&&t.meta.isClass)}function m(t){return void 0!==t&&void 0!==t.meta&&!0===t.meta.isTransformFunction}var g={expression:!0,type:!0,docs:!0,error:!0,json:!0,chain:!0};return function(e,d){var g=arguments.length;if(1!==g&&2!==g)throw new l.a("import",g,1,2);d=d||{};var v,y={};for(var b in function t(e,n,i){if(Array.isArray(n))n.forEach((function(n){return t(e,n)}));else if("object"===c(n))for(var o in n)Object(r.f)(n,o)&&t(e,n[o],o);else if(Object(s.b)(n)||void 0!==i){var a=Object(s.b)(n)?m(n)?n.fn+".transform":n.fn:i;if(Object(r.f)(e,a)&&e[a]!==n&&!d.silent)throw new Error('Cannot import "'+a+'" twice');e[a]=n}else if(!d.silent)throw new TypeError("Factory, Object, or Array expected")}(y,e),y)if(Object(r.f)(y,b)){var x=y[b];if(Object(s.b)(x))!function(e,o){var a=2<arguments.length&&void 0!==arguments[2]?arguments[2]:e.fn;if(Object(u.b)(a,"."))throw new Error("Factory name should not contain a nested path. Name: "+JSON.stringify(a));function l(){var r={};e.dependencies.map(s.c).forEach((function(t){if(Object(u.b)(t,"."))throw new Error("Factory dependency should not contain a nested path. Name: "+JSON.stringify(t));"math"===t?r.math=n:"mathWithTransform"===t?r.mathWithTransform=n.expression.mathWithTransform:"classes"===t?r.classes=n:r[t]=n[t]}));var i=e(r);if(i&&"function"==typeof i.transform)throw new Error('Transforms cannot be attached to factory functions. Please create a separate function for it with exports.path="expression.transform"');if(void 0===g||o.override)return i;if(h(g)&&h(i))return t(g,i);if(o.silent)return g;throw new Error('Cannot import "'+a+'": already exists')}var c=m(e)?n.expression.transform:n,d=a in n.expression.transform,g=Object(r.f)(c,a)?c[a]:void 0;e.meta&&!1===e.meta.lazy?c[a]=l():Object(r.h)(c,a,l),g&&d?f(a):(m(e)||p(e))&&Object(r.h)(n.expression.mathWithTransform,a,(function(){return c[a]})),i[a]=e,n.emit("import",a,l)}(x,d);else if("function"==typeof(v=x)||"number"==typeof v||"string"==typeof v||"boolean"==typeof v||null===v||Object(a.L)(v)||Object(a.j)(v)||Object(a.e)(v)||Object(a.o)(v)||Object(a.v)(v)||Array.isArray(v))!function(e,r,a){if(a.wrap&&"function"==typeof r&&(r=function(t){function e(){for(var e=[],r=0,i=arguments.length;r<i;r++){var o=arguments[r];e[r]=o&&o.valueOf()}return t.apply(n,e)}return t.transform&&(e.transform=t.transform),e}(r)),!function(t){return"function"==typeof t&&"string"==typeof t.signature}(r)||(r=t(e,function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},r.signature,r))),h(n[e])&&h(r))return r=a.override?t(e,r.signatures):t(n[e],r),n[e]=r,delete i[e],o(e,r),n.emit("import",e,(function(){return r}));if(void 0===n[e]||a.override)return n[e]=r,delete i[e],o(e,r),n.emit("import",e,(function(){return r}));if(!a.silent)throw new Error('Cannot import "'+e+'": already exists')}(b,x,d);else if(!d.silent)throw new TypeError("Factory, Object, or Array expected")}}}((function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return _.typed.apply(_.typed,e)}),0,_,O);return _.import=N,_.on("config",(function(){Object(r.k)(O).forEach((function(t){t&&t.meta&&t.meta.recreateOnConfigChange&&N(t,{override:!0})}))})),_.create=y.bind(null,t),_.factory=s.a,_.import(Object(r.k)(Object(r.c)(t))),_.ArgumentsError=l.a,_.DimensionError=m.a,_.IndexError=g.a,_}}],t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var i in e)t.d(r,i,function(t){return e[t]}.bind(null,i));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},t.p="",t(t.s=18);function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var e,n}()},30845:function(t,e){"use strict";var n=Number.isNaN||function(t){return"number"==typeof t&&t!=t};function r(t,e){if(t.length!==e.length)return!1;for(var r=0;r<t.length;r++)if(!((i=t[r])===(o=e[r])||n(i)&&n(o)))return!1;var i,o;return!0}e.Z=function(t,e){var n;void 0===e&&(e=r);var i,o=[],a=!1;return function(){for(var r=[],s=0;s<arguments.length;s++)r[s]=arguments[s];return a&&n===this&&e(r,o)||(i=t.apply(this,r),a=!0,n=this,o=r),i}}},70743:function(t){!function(e){var n,r,i=!1;function o(t){if("undefined"!=typeof document&&!i){var e=document.documentElement;r=window.pageYOffset,document.documentElement.scrollHeight>window.innerHeight?e.style.width="calc(100% - "+function(){if(void 0!==n)return n;var t=document.documentElement,e=document.createElement("div");return e.setAttribute("style","width:99px;height:99px;position:absolute;top:-9999px;overflow:scroll;"),t.appendChild(e),n=e.offsetWidth-e.clientWidth,t.removeChild(e),n}()+"px)":e.style.width="100%",e.style.position="fixed",e.style.top=-r+"px",e.style.overflow="hidden",i=!0}}function a(){if("undefined"!=typeof document&&i){var t=document.documentElement;t.style.width="",t.style.position="",t.style.top="",t.style.overflow="",window.scroll(0,r),i=!1}}var s={on:o,off:a,toggle:function(){i?a():o()}};void 0!==t.exports?t.exports=s:e.noScroll=s}(this)},43105:function(t,e){var n,r;"undefined"!=typeof self&&self,n=function(){var t,e;return e={DAY:864e5,HOUR:3600,defaults:{dateSettings:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],meridiem:["AM","PM"],ordinal:function(t){var e=t%10,n={1:"st",2:"nd",3:"rd"};return 1!==Math.floor(t%100/10)&&n[e]?n[e]:"th"}},separators:/[ \-+\/.:@]/g,validParts:/[dDjlNSwzWFmMntLoYyaABgGhHisueTIOPZcrU]/g,intParts:/[djwNzmnyYhHgGis]/g,tzParts:/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,tzClip:/[^-+\dA-Z]/g},getInt:function(t,e){return parseInt(t,e||10)},compare:function(t,e){return"string"==typeof t&&"string"==typeof e&&t.toLowerCase()===e.toLowerCase()},lpad:function(t,n,r){var i=t.toString();return r=r||"0",i.length<n?e.lpad(r+i,n):i},merge:function(t){var n,r;for(t=t||{},n=1;n<arguments.length;n++)if(r=arguments[n])for(var i in r)r.hasOwnProperty(i)&&("object"==typeof r[i]?e.merge(t[i],r[i]):t[i]=r[i]);return t},getIndex:function(t,e){for(var n=0;n<e.length;n++)if(e[n].toLowerCase()===t.toLowerCase())return n;return-1}},(t=function(t){var n=this,r=e.merge(e.defaults,t);n.dateSettings=r.dateSettings,n.separators=r.separators,n.validParts=r.validParts,n.intParts=r.intParts,n.tzParts=r.tzParts,n.tzClip=r.tzClip}).prototype={constructor:t,getMonth:function(t){var n;return 0===(n=e.getIndex(t,this.dateSettings.monthsShort)+1)&&(n=e.getIndex(t,this.dateSettings.months)+1),n},parseDate:function(t,n){var r,i,o,a,s,u,l,c,f,h,d=this,p=!1,m=!1,g=d.dateSettings,v={date:null,year:null,month:null,day:null,hour:0,min:0,sec:0};if(!t)return null;if(t instanceof Date)return t;if("U"===n)return(o=e.getInt(t))?new Date(1e3*o):t;switch(typeof t){case"number":return new Date(t);case"string":break;default:return null}if(!(r=n.match(d.validParts))||0===r.length)throw new Error("Invalid date format definition.");for(o=r.length-1;o>=0;o--)"S"===r[o]&&r.splice(o,1);for(i=t.replace(d.separators,"\0").split("\0"),o=0;o<i.length;o++)switch(a=i[o],s=e.getInt(a),r[o]){case"y":case"Y":if(!s)return null;f=a.length,v.year=2===f?e.getInt((s<70?"20":"19")+a):s,p=!0;break;case"m":case"n":case"M":case"F":if(isNaN(s)){if(!((u=d.getMonth(a))>0))return null;v.month=u}else{if(!(s>=1&&s<=12))return null;v.month=s}p=!0;break;case"d":case"j":if(!(s>=1&&s<=31))return null;v.day=s,p=!0;break;case"g":case"h":if(h=i[l=r.indexOf("a")>-1?r.indexOf("a"):r.indexOf("A")>-1?r.indexOf("A"):-1],-1!==l)c=e.compare(h,g.meridiem[0])?0:e.compare(h,g.meridiem[1])?12:-1,s>=1&&s<=12&&-1!==c?v.hour=s%12==0?c:s+c:s>=0&&s<=23&&(v.hour=s);else{if(!(s>=0&&s<=23))return null;v.hour=s}m=!0;break;case"G":case"H":if(!(s>=0&&s<=23))return null;v.hour=s,m=!0;break;case"i":if(!(s>=0&&s<=59))return null;v.min=s,m=!0;break;case"s":if(!(s>=0&&s<=59))return null;v.sec=s,m=!0}if(!0===p){var y=v.year||0,b=v.month?v.month-1:0,x=v.day||1;v.date=new Date(y,b,x,v.hour,v.min,v.sec,0)}else{if(!0!==m)return null;v.date=new Date(0,0,0,v.hour,v.min,v.sec,0)}return v.date},guessDate:function(t,n){if("string"!=typeof t)return t;var r,i,o,a,s,u,l=t.replace(this.separators,"\0").split("\0"),c=n.match(this.validParts),f=new Date,h=0;if(!/^[djmn]/g.test(c[0]))return t;for(o=0;o<l.length;o++){if(h=2,s=l[o],u=e.getInt(s.substr(0,2)),isNaN(u))return null;switch(o){case 0:"m"===c[0]||"n"===c[0]?f.setMonth(u-1):f.setDate(u);break;case 1:"m"===c[0]||"n"===c[0]?f.setDate(u):f.setMonth(u-1);break;case 2:if(i=f.getFullYear(),h=(r=s.length)<4?r:4,!(i=e.getInt(r<4?i.toString().substr(0,4-r)+s:s.substr(0,4))))return null;f.setFullYear(i);break;case 3:f.setHours(u);break;case 4:f.setMinutes(u);break;case 5:f.setSeconds(u)}(a=s.substr(h)).length>0&&l.splice(o+1,0,a)}return f},parseFormat:function(t,n){var r,i=this,o=i.dateSettings,a=/\\?(.?)/gi,s=function(t,e){return r[t]?r[t]():e};return r={d:function(){return e.lpad(r.j(),2)},D:function(){return o.daysShort[r.w()]},j:function(){return n.getDate()},l:function(){return o.days[r.w()]},N:function(){return r.w()||7},w:function(){return n.getDay()},z:function(){var t=new Date(r.Y(),r.n()-1,r.j()),n=new Date(r.Y(),0,1);return Math.round((t-n)/e.DAY)},W:function(){var t=new Date(r.Y(),r.n()-1,r.j()-r.N()+3),n=new Date(t.getFullYear(),0,4);return e.lpad(1+Math.round((t-n)/e.DAY/7),2)},F:function(){return o.months[n.getMonth()]},m:function(){return e.lpad(r.n(),2)},M:function(){return o.monthsShort[n.getMonth()]},n:function(){return n.getMonth()+1},t:function(){return new Date(r.Y(),r.n(),0).getDate()},L:function(){var t=r.Y();return t%4==0&&t%100!=0||t%400==0?1:0},o:function(){var t=r.n(),e=r.W();return r.Y()+(12===t&&e<9?1:1===t&&e>9?-1:0)},Y:function(){return n.getFullYear()},y:function(){return r.Y().toString().slice(-2)},a:function(){return r.A().toLowerCase()},A:function(){var t=r.G()<12?0:1;return o.meridiem[t]},B:function(){var t=n.getUTCHours()*e.HOUR,r=60*n.getUTCMinutes(),i=n.getUTCSeconds();return e.lpad(Math.floor((t+r+i+e.HOUR)/86.4)%1e3,3)},g:function(){return r.G()%12||12},G:function(){return n.getHours()},h:function(){return e.lpad(r.g(),2)},H:function(){return e.lpad(r.G(),2)},i:function(){return e.lpad(n.getMinutes(),2)},s:function(){return e.lpad(n.getSeconds(),2)},u:function(){return e.lpad(1e3*n.getMilliseconds(),6)},e:function(){return/\((.*)\)/.exec(String(n))[1]||"Coordinated Universal Time"},I:function(){return new Date(r.Y(),0)-Date.UTC(r.Y(),0)!=new Date(r.Y(),6)-Date.UTC(r.Y(),6)?1:0},O:function(){var t=n.getTimezoneOffset(),r=Math.abs(t);return(t>0?"-":"+")+e.lpad(100*Math.floor(r/60)+r%60,4)},P:function(){var t=r.O();return t.substr(0,3)+":"+t.substr(3,2)},T:function(){return(String(n).match(i.tzParts)||[""]).pop().replace(i.tzClip,"")||"UTC"},Z:function(){return 60*-n.getTimezoneOffset()},c:function(){return"Y-m-d\\TH:i:sP".replace(a,s)},r:function(){return"D, d M Y H:i:s O".replace(a,s)},U:function(){return n.getTime()/1e3||0}},s(t,t)},formatDate:function(t,n){var r,i,o,a,s,u=this,l="";if("string"==typeof t&&!(t=u.parseDate(t,n)))return null;if(t instanceof Date){for(o=n.length,r=0;r<o;r++)"S"!==(s=n.charAt(r))&&"\\"!==s&&(r>0&&"\\"===n.charAt(r-1)?l+=s:(a=u.parseFormat(s,t),r!==o-1&&u.intParts.test(s)&&"S"===n.charAt(r+1)&&(i=e.getInt(a)||0,a+=u.dateSettings.ordinal(i)),l+=a));return l}return""}},t},void 0===(r=n.apply(e,[]))||(t.exports=r)},76095:function(t){var e;"undefined"!=typeof self&&self,e=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=109)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(17),i=n(18),o=n(19),a=n(45),s=n(46),u=n(47),l=n(48),c=n(49),f=n(12),h=n(32),d=n(33),p=n(31),m=n(1),g={Scope:m.Scope,create:m.create,find:m.find,query:m.query,register:m.register,Container:r.default,Format:i.default,Leaf:o.default,Embed:l.default,Scroll:a.default,Block:u.default,Inline:s.default,Text:c.default,Attributor:{Attribute:f.default,Class:h.default,Style:d.default,Store:p.default}};e.default=g},function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(e){var n=this;return e="[Parchment] "+e,(n=t.call(this,e)||this).message=e,n.name=n.constructor.name,n}return i(e,t),e}(Error);e.ParchmentError=o;var a,s={},u={},l={},c={};function f(t,e){var n;if(void 0===e&&(e=a.ANY),"string"==typeof t)n=c[t]||s[t];else if(t instanceof Text||t.nodeType===Node.TEXT_NODE)n=c.text;else if("number"==typeof t)t&a.LEVEL&a.BLOCK?n=c.block:t&a.LEVEL&a.INLINE&&(n=c.inline);else if(t instanceof HTMLElement){var r=(t.getAttribute("class")||"").split(/\s+/);for(var i in r)if(n=u[r[i]])break;n=n||l[t.tagName]}return null==n?null:e&a.LEVEL&n.scope&&e&a.TYPE&n.scope?n:null}e.DATA_KEY="__blot",function(t){t[t.TYPE=3]="TYPE",t[t.LEVEL=12]="LEVEL",t[t.ATTRIBUTE=13]="ATTRIBUTE",t[t.BLOT=14]="BLOT",t[t.INLINE=7]="INLINE",t[t.BLOCK=11]="BLOCK",t[t.BLOCK_BLOT=10]="BLOCK_BLOT",t[t.INLINE_BLOT=6]="INLINE_BLOT",t[t.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",t[t.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",t[t.ANY=15]="ANY"}(a=e.Scope||(e.Scope={})),e.create=function(t,e){var n=f(t);if(null==n)throw new o("Unable to create "+t+" blot");var r=n,i=t instanceof Node||t.nodeType===Node.TEXT_NODE?t:r.create(e);return new r(i,e)},e.find=function t(n,r){return void 0===r&&(r=!1),null==n?null:null!=n[e.DATA_KEY]?n[e.DATA_KEY].blot:r?t(n.parentNode,r):null},e.query=f,e.register=function t(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(e.length>1)return e.map((function(e){return t(e)}));var r=e[0];if("string"!=typeof r.blotName&&"string"!=typeof r.attrName)throw new o("Invalid definition");if("abstract"===r.blotName)throw new o("Cannot register abstract class");return c[r.blotName||r.attrName]=r,"string"==typeof r.keyName?s[r.keyName]=r:(null!=r.className&&(u[r.className]=r),null!=r.tagName&&(Array.isArray(r.tagName)?r.tagName=r.tagName.map((function(t){return t.toUpperCase()})):r.tagName=r.tagName.toUpperCase(),(Array.isArray(r.tagName)?r.tagName:[r.tagName]).forEach((function(t){null!=l[t]&&null!=r.className||(l[t]=r)})))),r}},function(t,e,n){var r=n(51),i=n(11),o=n(3),a=n(20),s=String.fromCharCode(0),u=function(t){Array.isArray(t)?this.ops=t:null!=t&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]};u.prototype.insert=function(t,e){var n={};return 0===t.length?this:(n.insert=t,null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n))},u.prototype.delete=function(t){return t<=0?this:this.push({delete:t})},u.prototype.retain=function(t,e){if(t<=0)return this;var n={retain:t};return null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n)},u.prototype.push=function(t){var e=this.ops.length,n=this.ops[e-1];if(t=o(!0,{},t),"object"==typeof n){if("number"==typeof t.delete&&"number"==typeof n.delete)return this.ops[e-1]={delete:n.delete+t.delete},this;if("number"==typeof n.delete&&null!=t.insert&&(e-=1,"object"!=typeof(n=this.ops[e-1])))return this.ops.unshift(t),this;if(i(t.attributes,n.attributes)){if("string"==typeof t.insert&&"string"==typeof n.insert)return this.ops[e-1]={insert:n.insert+t.insert},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this;if("number"==typeof t.retain&&"number"==typeof n.retain)return this.ops[e-1]={retain:n.retain+t.retain},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this}}return e===this.ops.length?this.ops.push(t):this.ops.splice(e,0,t),this},u.prototype.chop=function(){var t=this.ops[this.ops.length-1];return t&&t.retain&&!t.attributes&&this.ops.pop(),this},u.prototype.filter=function(t){return this.ops.filter(t)},u.prototype.forEach=function(t){this.ops.forEach(t)},u.prototype.map=function(t){return this.ops.map(t)},u.prototype.partition=function(t){var e=[],n=[];return this.forEach((function(r){(t(r)?e:n).push(r)})),[e,n]},u.prototype.reduce=function(t,e){return this.ops.reduce(t,e)},u.prototype.changeLength=function(){return this.reduce((function(t,e){return e.insert?t+a.length(e):e.delete?t-e.delete:t}),0)},u.prototype.length=function(){return this.reduce((function(t,e){return t+a.length(e)}),0)},u.prototype.slice=function(t,e){t=t||0,"number"!=typeof e&&(e=1/0);for(var n=[],r=a.iterator(this.ops),i=0;i<e&&r.hasNext();){var o;i<t?o=r.next(t-i):(o=r.next(e-i),n.push(o)),i+=a.length(o)}return new u(n)},u.prototype.compose=function(t){var e=a.iterator(this.ops),n=a.iterator(t.ops),r=[],o=n.peek();if(null!=o&&"number"==typeof o.retain&&null==o.attributes){for(var s=o.retain;"insert"===e.peekType()&&e.peekLength()<=s;)s-=e.peekLength(),r.push(e.next());o.retain-s>0&&n.next(o.retain-s)}for(var l=new u(r);e.hasNext()||n.hasNext();)if("insert"===n.peekType())l.push(n.next());else if("delete"===e.peekType())l.push(e.next());else{var c=Math.min(e.peekLength(),n.peekLength()),f=e.next(c),h=n.next(c);if("number"==typeof h.retain){var d={};"number"==typeof f.retain?d.retain=c:d.insert=f.insert;var p=a.attributes.compose(f.attributes,h.attributes,"number"==typeof f.retain);if(p&&(d.attributes=p),l.push(d),!n.hasNext()&&i(l.ops[l.ops.length-1],d)){var m=new u(e.rest());return l.concat(m).chop()}}else"number"==typeof h.delete&&"number"==typeof f.retain&&l.push(h)}return l.chop()},u.prototype.concat=function(t){var e=new u(this.ops.slice());return t.ops.length>0&&(e.push(t.ops[0]),e.ops=e.ops.concat(t.ops.slice(1))),e},u.prototype.diff=function(t,e){if(this.ops===t.ops)return new u;var n=[this,t].map((function(e){return e.map((function(n){if(null!=n.insert)return"string"==typeof n.insert?n.insert:s;throw new Error("diff() called "+(e===t?"on":"with")+" non-document")})).join("")})),o=new u,l=r(n[0],n[1],e),c=a.iterator(this.ops),f=a.iterator(t.ops);return l.forEach((function(t){for(var e=t[1].length;e>0;){var n=0;switch(t[0]){case r.INSERT:n=Math.min(f.peekLength(),e),o.push(f.next(n));break;case r.DELETE:n=Math.min(e,c.peekLength()),c.next(n),o.delete(n);break;case r.EQUAL:n=Math.min(c.peekLength(),f.peekLength(),e);var s=c.next(n),u=f.next(n);i(s.insert,u.insert)?o.retain(n,a.attributes.diff(s.attributes,u.attributes)):o.push(u).delete(n)}e-=n}})),o.chop()},u.prototype.eachLine=function(t,e){e=e||"\n";for(var n=a.iterator(this.ops),r=new u,i=0;n.hasNext();){if("insert"!==n.peekType())return;var o=n.peek(),s=a.length(o)-n.peekLength(),l="string"==typeof o.insert?o.insert.indexOf(e,s)-s:-1;if(l<0)r.push(n.next());else if(l>0)r.push(n.next(l));else{if(!1===t(r,n.next(1).attributes||{},i))return;i+=1,r=new u}}r.length()>0&&t(r,{},i)},u.prototype.transform=function(t,e){if(e=!!e,"number"==typeof t)return this.transformPosition(t,e);for(var n=a.iterator(this.ops),r=a.iterator(t.ops),i=new u;n.hasNext()||r.hasNext();)if("insert"!==n.peekType()||!e&&"insert"===r.peekType())if("insert"===r.peekType())i.push(r.next());else{var o=Math.min(n.peekLength(),r.peekLength()),s=n.next(o),l=r.next(o);if(s.delete)continue;l.delete?i.push(l):i.retain(o,a.attributes.transform(s.attributes,l.attributes,e))}else i.retain(a.length(n.next()));return i.chop()},u.prototype.transformPosition=function(t,e){e=!!e;for(var n=a.iterator(this.ops),r=0;n.hasNext()&&r<=t;){var i=n.peekLength(),o=n.peekType();n.next(),"delete"!==o?("insert"===o&&(r<t||!e)&&(t+=i),r+=i):t-=Math.min(i,t-r)}return t},t.exports=u},function(t,e){"use strict";var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,a=function(t){return"function"==typeof Array.isArray?Array.isArray(t):"[object Array]"===r.call(t)},s=function(t){if(!t||"[object Object]"!==r.call(t))return!1;var e,i=n.call(t,"constructor"),o=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!i&&!o)return!1;for(e in t);return void 0===e||n.call(t,e)},u=function(t,e){i&&"__proto__"===e.name?i(t,e.name,{enumerable:!0,configurable:!0,value:e.newValue,writable:!0}):t[e.name]=e.newValue},l=function(t,e){if("__proto__"===e){if(!n.call(t,e))return;if(o)return o(t,e).value}return t[e]};t.exports=function t(){var e,n,r,i,o,c,f=arguments[0],h=1,d=arguments.length,p=!1;for("boolean"==typeof f&&(p=f,f=arguments[1]||{},h=2),(null==f||"object"!=typeof f&&"function"!=typeof f)&&(f={});h<d;++h)if(null!=(e=arguments[h]))for(n in e)r=l(f,n),f!==(i=l(e,n))&&(p&&i&&(s(i)||(o=a(i)))?(o?(o=!1,c=r&&a(r)?r:[]):c=r&&s(r)?r:{},u(f,{name:n,newValue:t(p,c,i)})):void 0!==i&&u(f,{name:n,newValue:i}));return f}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BlockEmbed=e.bubbleFormats=void 0;var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=f(n(3)),a=f(n(2)),s=f(n(0)),u=f(n(16)),l=f(n(6)),c=f(n(7));function f(t){return t&&t.__esModule?t:{default:t}}function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function d(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function p(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var m=function(t){function e(){return h(this,e),d(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return p(e,t),r(e,[{key:"attach",value:function(){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"attach",this).call(this),this.attributes=new s.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return(new a.default).insert(this.value(),(0,o.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(t,e){var n=s.default.query(t,s.default.Scope.BLOCK_ATTRIBUTE);null!=n&&this.attributes.attribute(n,e)}},{key:"formatAt",value:function(t,e,n,r){this.format(n,r)}},{key:"insertAt",value:function(t,n,r){if("string"==typeof n&&n.endsWith("\n")){var o=s.default.create(g.blotName);this.parent.insertBefore(o,0===t?this:this.next),o.insertAt(0,n.slice(0,-1))}else i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,r)}}]),e}(s.default.Embed);m.scope=s.default.Scope.BLOCK_BLOT;var g=function(t){function e(t){h(this,e);var n=d(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.cache={},n}return p(e,t),r(e,[{key:"delta",value:function(){return null==this.cache.delta&&(this.cache.delta=this.descendants(s.default.Leaf).reduce((function(t,e){return 0===e.length()?t:t.insert(e.value(),v(e))}),new a.default).insert("\n",v(this))),this.cache.delta}},{key:"deleteAt",value:function(t,n){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"deleteAt",this).call(this,t,n),this.cache={}}},{key:"formatAt",value:function(t,n,r,o){n<=0||(s.default.query(r,s.default.Scope.BLOCK)?t+n===this.length()&&this.format(r,o):i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,Math.min(n,this.length()-t-1),r,o),this.cache={})}},{key:"insertAt",value:function(t,n,r){if(null!=r)return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,r);if(0!==n.length){var o=n.split("\n"),a=o.shift();a.length>0&&(t<this.length()-1||null==this.children.tail?i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,Math.min(t,this.length()-1),a):this.children.tail.insertAt(this.children.tail.length(),a),this.cache={});var s=this;o.reduce((function(t,e){return(s=s.split(t,!0)).insertAt(0,e),e.length}),t+a.length)}}},{key:"insertBefore",value:function(t,n){var r=this.children.head;i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n),r instanceof u.default&&r.remove(),this.cache={}}},{key:"length",value:function(){return null==this.cache.length&&(this.cache.length=i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"length",this).call(this)+1),this.cache.length}},{key:"moveChildren",value:function(t,n){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"moveChildren",this).call(this,t,n),this.cache={}}},{key:"optimize",value:function(t){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t),this.cache={}}},{key:"path",value:function(t){return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"path",this).call(this,t,!0)}},{key:"removeChild",value:function(t){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"removeChild",this).call(this,t),this.cache={}}},{key:"split",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(n&&(0===t||t>=this.length()-1)){var r=this.clone();return 0===t?(this.parent.insertBefore(r,this),this):(this.parent.insertBefore(r,this.next),r)}var o=i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"split",this).call(this,t,n);return this.cache={},o}}]),e}(s.default.Block);function v(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null==t?e:("function"==typeof t.formats&&(e=(0,o.default)(e,t.formats())),null==t.parent||"scroll"==t.parent.blotName||t.parent.statics.scope!==t.statics.scope?e:v(t.parent,e))}g.blotName="block",g.tagName="P",g.defaultChild="break",g.allowedChildren=[l.default,s.default.Embed,c.default],e.bubbleFormats=v,e.BlockEmbed=m,e.default=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.overload=e.expandConfig=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();n(50);var a=g(n(2)),s=g(n(14)),u=g(n(8)),l=g(n(9)),c=g(n(0)),f=n(15),h=g(f),d=g(n(3)),p=g(n(10)),m=g(n(34));function g(t){return t&&t.__esModule?t:{default:t}}function v(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var y=(0,p.default)("quill"),b=function(){function t(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=x(e,r),this.container=this.options.container,null==this.container)return y.error("Invalid Quill container",e);this.options.debug&&t.debug(this.options.debug);var i=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new u.default,this.scroll=c.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new s.default(this.scroll),this.selection=new h.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(u.default.events.EDITOR_CHANGE,(function(t){t===u.default.events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())})),this.emitter.on(u.default.events.SCROLL_UPDATE,(function(t,e){var r=n.selection.lastRange,i=r&&0===r.length?r.index:void 0;w.call(n,(function(){return n.editor.update(null,e,i)}),t)}));var o=this.clipboard.convert("<div class='ql-editor' style=\"white-space: normal;\">"+i+"<p><br></p></div>");this.setContents(o),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return o(t,null,[{key:"debug",value:function(t){!0===t&&(t="log"),p.default.level(t)}},{key:"find",value:function(t){return t.__quill||c.default.find(t)}},{key:"import",value:function(t){return null==this.imports[t]&&y.error("Cannot import "+t+". Are you sure it was registered?"),this.imports[t]}},{key:"register",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!=typeof t){var i=t.attrName||t.blotName;"string"==typeof i?this.register("formats/"+i,t,e):Object.keys(t).forEach((function(r){n.register(r,t[r],e)}))}else null==this.imports[t]||r||y.warn("Overwriting "+t+" with",e),this.imports[t]=e,(t.startsWith("blots/")||t.startsWith("formats/"))&&"abstract"!==e.blotName?c.default.register(e):t.startsWith("modules")&&"function"==typeof e.register&&e.register()}}]),o(t,[{key:"addContainer",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof t){var n=t;(t=document.createElement("div")).classList.add(n)}return this.container.insertBefore(t,e),t}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(t,e,n){var r=this,o=_(t,e,n),a=i(o,4);return t=a[0],e=a[1],n=a[3],w.call(this,(function(){return r.editor.deleteText(t,e)}),n,t,-1*e)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t)}},{key:"focus",value:function(){var t=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=t,this.scrollIntoView()}},{key:"format",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.default.sources.API;return w.call(this,(function(){var r=n.getSelection(!0),i=new a.default;if(null==r)return i;if(c.default.query(t,c.default.Scope.BLOCK))i=n.editor.formatLine(r.index,r.length,v({},t,e));else{if(0===r.length)return n.selection.format(t,e),i;i=n.editor.formatText(r.index,r.length,v({},t,e))}return n.setSelection(r,u.default.sources.SILENT),i}),r)}},{key:"formatLine",value:function(t,e,n,r,o){var a,s=this,u=_(t,e,n,r,o),l=i(u,4);return t=l[0],e=l[1],a=l[2],o=l[3],w.call(this,(function(){return s.editor.formatLine(t,e,a)}),o,t,0)}},{key:"formatText",value:function(t,e,n,r,o){var a,s=this,u=_(t,e,n,r,o),l=i(u,4);return t=l[0],e=l[1],a=l[2],o=l[3],w.call(this,(function(){return s.editor.formatText(t,e,a)}),o,t,0)}},{key:"getBounds",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;e="number"==typeof t?this.selection.getBounds(t,n):this.selection.getBounds(t.index,t.length);var r=this.container.getBoundingClientRect();return{bottom:e.bottom-r.top,height:e.height,left:e.left-r.left,right:e.right-r.left,top:e.top-r.top,width:e.width}}},{key:"getContents",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=_(t,e),r=i(n,2);return t=r[0],e=r[1],this.editor.getContents(t,e)}},{key:"getFormat",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof t?this.editor.getFormat(t,e):this.editor.getFormat(t.index,t.length)}},{key:"getIndex",value:function(t){return t.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(t){return this.scroll.leaf(t)}},{key:"getLine",value:function(t){return this.scroll.line(t)}},{key:"getLines",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof t?this.scroll.lines(t.index,t.length):this.scroll.lines(t,e)}},{key:"getModule",value:function(t){return this.theme.modules[t]}},{key:"getSelection",value:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=_(t,e),r=i(n,2);return t=r[0],e=r[1],this.editor.getText(t,e)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(e,n,r){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.sources.API;return w.call(this,(function(){return i.editor.insertEmbed(e,n,r)}),o,e)}},{key:"insertText",value:function(t,e,n,r,o){var a,s=this,u=_(t,0,n,r,o),l=i(u,4);return t=l[0],a=l[2],o=l[3],w.call(this,(function(){return s.editor.insertText(t,e,a)}),o,t,e.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(t,e,n){this.clipboard.dangerouslyPasteHTML(t,e,n)}},{key:"removeFormat",value:function(t,e,n){var r=this,o=_(t,e,n),a=i(o,4);return t=a[0],e=a[1],n=a[3],w.call(this,(function(){return r.editor.removeFormat(t,e)}),n,t)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.sources.API;return w.call(this,(function(){t=new a.default(t);var n=e.getLength(),r=e.editor.deleteText(0,n),i=e.editor.applyDelta(t),o=i.ops[i.ops.length-1];return null!=o&&"string"==typeof o.insert&&"\n"===o.insert[o.insert.length-1]&&(e.editor.deleteText(e.getLength()-1,1),i.delete(1)),r.compose(i)}),n)}},{key:"setSelection",value:function(e,n,r){if(null==e)this.selection.setRange(null,n||t.sources.API);else{var o=_(e,n,r),a=i(o,4);e=a[0],n=a[1],r=a[3],this.selection.setRange(new f.Range(e,n),r),r!==u.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.sources.API,n=(new a.default).insert(t);return this.setContents(n,e)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u.default.sources.USER,e=this.scroll.update(t);return this.selection.update(t),e}},{key:"updateContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.sources.API;return w.call(this,(function(){return t=new a.default(t),e.editor.applyDelta(t,n)}),n,!0)}}]),t}();function x(t,e){if((e=(0,d.default)(!0,{container:t,modules:{clipboard:!0,keyboard:!0,history:!0}},e)).theme&&e.theme!==b.DEFAULTS.theme){if(e.theme=b.import("themes/"+e.theme),null==e.theme)throw new Error("Invalid theme "+e.theme+". Did you register it?")}else e.theme=m.default;var n=(0,d.default)(!0,{},e.theme.DEFAULTS);[n,e].forEach((function(t){t.modules=t.modules||{},Object.keys(t.modules).forEach((function(e){!0===t.modules[e]&&(t.modules[e]={})}))}));var r=Object.keys(n.modules).concat(Object.keys(e.modules)).reduce((function(t,e){var n=b.import("modules/"+e);return null==n?y.error("Cannot load "+e+" module. Are you sure you registered it?"):t[e]=n.DEFAULTS||{},t}),{});return null!=e.modules&&e.modules.toolbar&&e.modules.toolbar.constructor!==Object&&(e.modules.toolbar={container:e.modules.toolbar}),e=(0,d.default)(!0,{},b.DEFAULTS,{modules:r},n,e),["bounds","container","scrollingContainer"].forEach((function(t){"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))})),e.modules=Object.keys(e.modules).reduce((function(t,n){return e.modules[n]&&(t[n]=e.modules[n]),t}),{}),e}function w(t,e,n,r){if(this.options.strict&&!this.isEnabled()&&e===u.default.sources.USER)return new a.default;var i=null==n?null:this.getSelection(),o=this.editor.delta,s=t();if(null!=i&&(!0===n&&(n=i.index),null==r?i=S(i,s,e):0!==r&&(i=S(i,n,r,e)),this.setSelection(i,u.default.sources.SILENT)),s.length()>0){var l,c,f=[u.default.events.TEXT_CHANGE,s,o,e];(l=this.emitter).emit.apply(l,[u.default.events.EDITOR_CHANGE].concat(f)),e!==u.default.sources.SILENT&&(c=this.emitter).emit.apply(c,f)}return s}function _(t,e,n,i,o){var a={};return"number"==typeof t.index&&"number"==typeof t.length?"number"!=typeof e?(o=i,i=n,n=e,e=t.length,t=t.index):(e=t.length,t=t.index):"number"!=typeof e&&(o=i,i=n,n=e,e=0),"object"===(void 0===n?"undefined":r(n))?(a=n,o=i):"string"==typeof n&&(null!=i?a[n]=i:o=n),[t,e,a,o=o||u.default.sources.API]}function S(t,e,n,r){if(null==t)return null;var o=void 0,s=void 0;if(e instanceof a.default){var l=[t.index,t.index+t.length].map((function(t){return e.transformPosition(t,r!==u.default.sources.USER)})),c=i(l,2);o=c[0],s=c[1]}else{var h=[t.index,t.index+t.length].map((function(t){return t<e||t===e&&r===u.default.sources.USER?t:n>=0?t+n:Math.max(e,t+n)})),d=i(h,2);o=d[0],s=d[1]}return new f.Range(o,s-o)}b.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},b.events=u.default.events,b.sources=u.default.sources,b.version="1.3.7",b.imports={delta:a.default,parchment:c.default,"core/module":l.default,"core/theme":m.default},e.expandConfig=x,e.overload=_,e.default=b},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=s(n(7)),a=s(n(0));function s(t){return t&&t.__esModule?t:{default:t}}var u=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"formatAt",value:function(t,n,r,o){if(e.compare(this.statics.blotName,r)<0&&a.default.query(r,a.default.Scope.BLOT)){var s=this.isolate(t,n);o&&s.wrap(r,o)}else i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,n,r,o)}},{key:"optimize",value:function(t){if(i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t),this.parent instanceof e&&e.compare(this.statics.blotName,this.parent.statics.blotName)>0){var n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}}],[{key:"compare",value:function(t,n){var r=e.order.indexOf(t),i=e.order.indexOf(n);return r>=0||i>=0?r-i:t===n?0:t<n?-1:1}}]),e}(a.default.Inline);u.allowedChildren=[u,a.default.Embed,o.default],u.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(((r=n(0))&&r.__esModule?r:{default:r}).default.Text);e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=a(n(54));function a(t){return t&&t.__esModule?t:{default:t}}var s=(0,a(n(10)).default)("quill:events");["selectionchange","mousedown","mouseup","click"].forEach((function(t){document.addEventListener(t,(function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];[].slice.call(document.querySelectorAll(".ql-container")).forEach((function(t){var n;t.__quill&&t.__quill.emitter&&(n=t.__quill.emitter).handleDOM.apply(n,e)}))}))}));var u=function(t){function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var t=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.listeners={},t.on("error",s.error),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"emit",value:function(){s.log.apply(s,arguments),i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];(this.listeners[t.type]||[]).forEach((function(e){var r=e.node,i=e.handler;(t.target===r||r.contains(t.target))&&i.apply(void 0,[t].concat(n))}))}},{key:"listenDOM",value:function(t,e,n){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push({node:e,handler:n})}}]),e}(o.default);u.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},u.sources={API:"api",SILENT:"silent",USER:"user"},e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.quill=e,this.options=n};r.DEFAULTS={},e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=["error","warn","log","info"],i="warn";function o(t){if(r.indexOf(t)<=r.indexOf(i)){for(var e,n=arguments.length,o=Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];(e=console)[t].apply(e,o)}}function a(t){return r.reduce((function(e,n){return e[n]=o.bind(console,n,t),e}),{})}o.level=a.level=function(t){i=t},e.default=a},function(t,e,n){var r=Array.prototype.slice,i=n(52),o=n(53),a=t.exports=function(t,e,n){return n||(n={}),t===e||(t instanceof Date&&e instanceof Date?t.getTime()===e.getTime():!t||!e||"object"!=typeof t&&"object"!=typeof e?n.strict?t===e:t==e:function(t,e,n){var l,c;if(s(t)||s(e))return!1;if(t.prototype!==e.prototype)return!1;if(o(t))return!!o(e)&&(t=r.call(t),e=r.call(e),a(t,e,n));if(u(t)){if(!u(e))return!1;if(t.length!==e.length)return!1;for(l=0;l<t.length;l++)if(t[l]!==e[l])return!1;return!0}try{var f=i(t),h=i(e)}catch(t){return!1}if(f.length!=h.length)return!1;for(f.sort(),h.sort(),l=f.length-1;l>=0;l--)if(f[l]!=h[l])return!1;for(l=f.length-1;l>=0;l--)if(c=f[l],!a(t[c],e[c],n))return!1;return typeof t==typeof e}(t,e,n))};function s(t){return null==t}function u(t){return!(!t||"object"!=typeof t||"number"!=typeof t.length||"function"!=typeof t.copy||"function"!=typeof t.slice||t.length>0&&"number"!=typeof t[0])}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=function(){function t(t,e,n){void 0===n&&(n={}),this.attrName=t,this.keyName=e;var i=r.Scope.TYPE&r.Scope.ATTRIBUTE;null!=n.scope?this.scope=n.scope&r.Scope.LEVEL|i:this.scope=r.Scope.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}return t.keys=function(t){return[].map.call(t.attributes,(function(t){return t.name}))},t.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.setAttribute(this.keyName,e),!0)},t.prototype.canAdd=function(t,e){return null!=r.query(t,r.Scope.BLOT&(this.scope|r.Scope.TYPE))&&(null==this.whitelist||("string"==typeof e?this.whitelist.indexOf(e.replace(/["']/g,""))>-1:this.whitelist.indexOf(e)>-1))},t.prototype.remove=function(t){t.removeAttribute(this.keyName)},t.prototype.value=function(t){var e=t.getAttribute(this.keyName);return this.canAdd(t,e)&&e?e:""},t}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Code=void 0;var r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=f(n(2)),s=f(n(0)),u=f(n(4)),l=f(n(6)),c=f(n(7));function f(t){return t&&t.__esModule?t:{default:t}}function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function d(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function p(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var m=function(t){function e(){return h(this,e),d(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return p(e,t),e}(l.default);m.blotName="code",m.tagName="CODE";var g=function(t){function e(){return h(this,e),d(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return p(e,t),i(e,[{key:"delta",value:function(){var t=this,e=this.domNode.textContent;return e.endsWith("\n")&&(e=e.slice(0,-1)),e.split("\n").reduce((function(e,n){return e.insert(n).insert("\n",t.formats())}),new a.default)}},{key:"format",value:function(t,n){if(t!==this.statics.blotName||!n){var i=this.descendant(c.default,this.length()-1),a=r(i,1)[0];null!=a&&a.deleteAt(a.length()-1,1),o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}},{key:"formatAt",value:function(t,n,r,i){if(0!==n&&null!=s.default.query(r,s.default.Scope.BLOCK)&&(r!==this.statics.blotName||i!==this.statics.formats(this.domNode))){var o=this.newlineIndex(t);if(!(o<0||o>=t+n)){var a=this.newlineIndex(t,!0)+1,u=o-a+1,l=this.isolate(a,u),c=l.next;l.format(r,i),c instanceof e&&c.formatAt(0,t-a+n-u,r,i)}}}},{key:"insertAt",value:function(t,e,n){if(null==n){var i=this.descendant(c.default,t),o=r(i,2),a=o[0],s=o[1];a.insertAt(s,e)}}},{key:"length",value:function(){var t=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?t:t+1}},{key:"newlineIndex",value:function(t){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])return this.domNode.textContent.slice(0,t).lastIndexOf("\n");var e=this.domNode.textContent.slice(t).indexOf("\n");return e>-1?t+e:-1}},{key:"optimize",value:function(t){this.domNode.textContent.endsWith("\n")||this.appendChild(s.default.create("text","\n")),o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===n.statics.formats(n.domNode)&&(n.optimize(t),n.moveChildren(this),n.remove())}},{key:"replace",value:function(t){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t),[].slice.call(this.domNode.querySelectorAll("*")).forEach((function(t){var e=s.default.find(t);null==e?t.parentNode.removeChild(t):e instanceof s.default.Embed?e.remove():e.unwrap()}))}}],[{key:"create",value:function(t){var n=o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("spellcheck",!1),n}},{key:"formats",value:function(){return!0}}]),e}(u.default);g.blotName="code-block",g.tagName="PRE",g.TAB=" ",e.Code=m,e.default=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=v(n(2)),s=v(n(20)),u=v(n(0)),l=v(n(13)),c=v(n(24)),f=n(4),h=v(f),d=v(n(16)),p=v(n(21)),m=v(n(11)),g=v(n(3));function v(t){return t&&t.__esModule?t:{default:t}}var y=/^[ -~]*$/,b=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.scroll=e,this.delta=this.getDelta()}return o(t,[{key:"applyDelta",value:function(t){var e=this,n=!1;this.scroll.update();var o=this.scroll.length();return this.scroll.batchStart(),(t=function(t){return t.reduce((function(t,e){if(1===e.insert){var n=(0,p.default)(e.attributes);return delete n.image,t.insert({image:e.attributes.image},n)}if(null==e.attributes||!0!==e.attributes.list&&!0!==e.attributes.bullet||((e=(0,p.default)(e)).attributes.list?e.attributes.list="ordered":(e.attributes.list="bullet",delete e.attributes.bullet)),"string"==typeof e.insert){var r=e.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return t.insert(r,e.attributes)}return t.push(e)}),new a.default)}(t)).reduce((function(t,a){var l=a.retain||a.delete||a.insert.length||1,c=a.attributes||{};if(null!=a.insert){if("string"==typeof a.insert){var d=a.insert;d.endsWith("\n")&&n&&(n=!1,d=d.slice(0,-1)),t>=o&&!d.endsWith("\n")&&(n=!0),e.scroll.insertAt(t,d);var p=e.scroll.line(t),m=i(p,2),v=m[0],y=m[1],b=(0,g.default)({},(0,f.bubbleFormats)(v));if(v instanceof h.default){var x=v.descendant(u.default.Leaf,y),w=i(x,1)[0];b=(0,g.default)(b,(0,f.bubbleFormats)(w))}c=s.default.attributes.diff(b,c)||{}}else if("object"===r(a.insert)){var _=Object.keys(a.insert)[0];if(null==_)return t;e.scroll.insertAt(t,_,a.insert[_])}o+=l}return Object.keys(c).forEach((function(n){e.scroll.formatAt(t,l,n,c[n])})),t+l}),0),t.reduce((function(t,n){return"number"==typeof n.delete?(e.scroll.deleteAt(t,n.delete),t):t+(n.retain||n.insert.length||1)}),0),this.scroll.batchEnd(),this.update(t)}},{key:"deleteText",value:function(t,e){return this.scroll.deleteAt(t,e),this.update((new a.default).retain(t).delete(e))}},{key:"formatLine",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.scroll.update(),Object.keys(r).forEach((function(i){if(null==n.scroll.whitelist||n.scroll.whitelist[i]){var o=n.scroll.lines(t,Math.max(e,1)),a=e;o.forEach((function(e){var o=e.length();if(e instanceof l.default){var s=t-e.offset(n.scroll),u=e.newlineIndex(s+a)-s+1;e.formatAt(s,u,i,r[i])}else e.format(i,r[i]);a-=o}))}})),this.scroll.optimize(),this.update((new a.default).retain(t).retain(e,(0,p.default)(r)))}},{key:"formatText",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(r).forEach((function(i){n.scroll.formatAt(t,e,i,r[i])})),this.update((new a.default).retain(t).retain(e,(0,p.default)(r)))}},{key:"getContents",value:function(t,e){return this.delta.slice(t,t+e)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce((function(t,e){return t.concat(e.delta())}),new a.default)}},{key:"getFormat",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],r=[];0===e?this.scroll.path(t).forEach((function(t){var e=i(t,1)[0];e instanceof h.default?n.push(e):e instanceof u.default.Leaf&&r.push(e)})):(n=this.scroll.lines(t,e),r=this.scroll.descendants(u.default.Leaf,t,e));var o=[n,r].map((function(t){if(0===t.length)return{};for(var e=(0,f.bubbleFormats)(t.shift());Object.keys(e).length>0;){var n=t.shift();if(null==n)return e;e=x((0,f.bubbleFormats)(n),e)}return e}));return g.default.apply(g.default,o)}},{key:"getText",value:function(t,e){return this.getContents(t,e).filter((function(t){return"string"==typeof t.insert})).map((function(t){return t.insert})).join("")}},{key:"insertEmbed",value:function(t,e,n){return this.scroll.insertAt(t,e,n),this.update((new a.default).retain(t).insert(function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},e,n)))}},{key:"insertText",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(t,e),Object.keys(r).forEach((function(i){n.scroll.formatAt(t,e.length,i,r[i])})),this.update((new a.default).retain(t).insert(e,(0,p.default)(r)))}},{key:"isBlank",value:function(){if(0==this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;var t=this.scroll.children.head;return t.statics.blotName===h.default.blotName&&!(t.children.length>1)&&t.children.head instanceof d.default}},{key:"removeFormat",value:function(t,e){var n=this.getText(t,e),r=this.scroll.line(t+e),o=i(r,2),s=o[0],u=o[1],c=0,f=new a.default;null!=s&&(c=s instanceof l.default?s.newlineIndex(u)-u+1:s.length()-u,f=s.delta().slice(u,u+c-1).insert("\n"));var h=this.getContents(t,e+c).diff((new a.default).insert(n).concat(f)),d=(new a.default).retain(t).concat(h);return this.applyDelta(d)}},{key:"update",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=this.delta;if(1===e.length&&"characterData"===e[0].type&&e[0].target.data.match(y)&&u.default.find(e[0].target)){var i=u.default.find(e[0].target),o=(0,f.bubbleFormats)(i),s=i.offset(this.scroll),l=e[0].oldValue.replace(c.default.CONTENTS,""),h=(new a.default).insert(l),d=(new a.default).insert(i.value());t=(new a.default).retain(s).concat(h.diff(d,n)).reduce((function(t,e){return e.insert?t.insert(e.insert,o):t.push(e)}),new a.default),this.delta=r.compose(t)}else this.delta=this.getDelta(),t&&(0,m.default)(r.compose(t),this.delta)||(t=r.diff(this.delta,n));return t}}]),t}();function x(t,e){return Object.keys(e).reduce((function(n,r){return null==t[r]||(e[r]===t[r]?n[r]=e[r]:Array.isArray(e[r])?e[r].indexOf(t[r])<0&&(n[r]=e[r].concat([t[r]])):n[r]=[e[r],t[r]]),n}),{})}e.default=b},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Range=void 0;var r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=l(n(0)),a=l(n(21)),s=l(n(11)),u=l(n(8));function l(t){return t&&t.__esModule?t:{default:t}}function c(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var h=(0,l(n(10)).default)("quill:selection"),d=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;f(this,t),this.index=e,this.length=n},p=function(){function t(e,n){var r=this;f(this,t),this.emitter=n,this.scroll=e,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=o.default.create("cursor",this),this.lastRange=this.savedRange=new d(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,(function(){r.mouseDown||setTimeout(r.update.bind(r,u.default.sources.USER),1)})),this.emitter.on(u.default.events.EDITOR_CHANGE,(function(t,e){t===u.default.events.TEXT_CHANGE&&e.length()>0&&r.update(u.default.sources.SILENT)})),this.emitter.on(u.default.events.SCROLL_BEFORE_UPDATE,(function(){if(r.hasFocus()){var t=r.getNativeRange();null!=t&&t.start.node!==r.cursor.textNode&&r.emitter.once(u.default.events.SCROLL_UPDATE,(function(){try{r.setNativeRange(t.start.node,t.start.offset,t.end.node,t.end.offset)}catch(t){}}))}})),this.emitter.on(u.default.events.SCROLL_OPTIMIZE,(function(t,e){if(e.range){var n=e.range,i=n.startNode,o=n.startOffset,a=n.endNode,s=n.endOffset;r.setNativeRange(i,o,a,s)}})),this.update(u.default.sources.SILENT)}return i(t,[{key:"handleComposition",value:function(){var t=this;this.root.addEventListener("compositionstart",(function(){t.composing=!0})),this.root.addEventListener("compositionend",(function(){if(t.composing=!1,t.cursor.parent){var e=t.cursor.restore();if(!e)return;setTimeout((function(){t.setNativeRange(e.startNode,e.startOffset,e.endNode,e.endOffset)}),1)}}))}},{key:"handleDragging",value:function(){var t=this;this.emitter.listenDOM("mousedown",document.body,(function(){t.mouseDown=!0})),this.emitter.listenDOM("mouseup",document.body,(function(){t.mouseDown=!1,t.update(u.default.sources.USER)}))}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(t,e){if(null==this.scroll.whitelist||this.scroll.whitelist[t]){this.scroll.update();var n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!o.default.query(t,o.default.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var r=o.default.find(n.start.node,!1);if(null==r)return;if(r instanceof o.default.Leaf){var i=r.split(n.start.offset);r.parent.insertBefore(this.cursor,i)}else r.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(t,e),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.scroll.length();t=Math.min(t,n-1),e=Math.min(t+e,n-1)-t;var i=void 0,o=this.scroll.leaf(t),a=r(o,2),s=a[0],u=a[1];if(null==s)return null;var l=s.position(u,!0),c=r(l,2);i=c[0],u=c[1];var f=document.createRange();if(e>0){f.setStart(i,u);var h=this.scroll.leaf(t+e),d=r(h,2);if(s=d[0],u=d[1],null==s)return null;var p=s.position(u,!0),m=r(p,2);return i=m[0],u=m[1],f.setEnd(i,u),f.getBoundingClientRect()}var g="left",v=void 0;return i instanceof Text?(u<i.data.length?(f.setStart(i,u),f.setEnd(i,u+1)):(f.setStart(i,u-1),f.setEnd(i,u),g="right"),v=f.getBoundingClientRect()):(v=s.domNode.getBoundingClientRect(),u>0&&(g="right")),{bottom:v.top+v.height,height:v.height,left:v[g],right:v[g],top:v.top,width:0}}},{key:"getNativeRange",value:function(){var t=document.getSelection();if(null==t||t.rangeCount<=0)return null;var e=t.getRangeAt(0);if(null==e)return null;var n=this.normalizeNative(e);return h.info("getNativeRange",n),n}},{key:"getRange",value:function(){var t=this.getNativeRange();return null==t?[null,null]:[this.normalizedToRange(t),t]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(t){var e=this,n=[[t.start.node,t.start.offset]];t.native.collapsed||n.push([t.end.node,t.end.offset]);var i=n.map((function(t){var n=r(t,2),i=n[0],a=n[1],s=o.default.find(i,!0),u=s.offset(e.scroll);return 0===a?u:s instanceof o.default.Container?u+s.length():u+s.index(i,a)})),a=Math.min(Math.max.apply(Math,c(i)),this.scroll.length()-1),s=Math.min.apply(Math,[a].concat(c(i)));return new d(s,a-s)}},{key:"normalizeNative",value:function(t){if(!m(this.root,t.startContainer)||!t.collapsed&&!m(this.root,t.endContainer))return null;var e={start:{node:t.startContainer,offset:t.startOffset},end:{node:t.endContainer,offset:t.endOffset},native:t};return[e.start,e.end].forEach((function(t){for(var e=t.node,n=t.offset;!(e instanceof Text)&&e.childNodes.length>0;)if(e.childNodes.length>n)e=e.childNodes[n],n=0;else{if(e.childNodes.length!==n)break;n=(e=e.lastChild)instanceof Text?e.data.length:e.childNodes.length+1}t.node=e,t.offset=n})),e}},{key:"rangeToNative",value:function(t){var e=this,n=t.collapsed?[t.index]:[t.index,t.index+t.length],i=[],o=this.scroll.length();return n.forEach((function(t,n){t=Math.min(o-1,t);var a,s=e.scroll.leaf(t),u=r(s,2),l=u[0],c=u[1],f=l.position(c,0!==n),h=r(f,2);a=h[0],c=h[1],i.push(a,c)})),i.length<2&&(i=i.concat(i)),i}},{key:"scrollIntoView",value:function(t){var e=this.lastRange;if(null!=e){var n=this.getBounds(e.index,e.length);if(null!=n){var i=this.scroll.length()-1,o=this.scroll.line(Math.min(e.index,i)),a=r(o,1)[0],s=a;if(e.length>0){var u=this.scroll.line(Math.min(e.index+e.length,i));s=r(u,1)[0]}if(null!=a&&null!=s){var l=t.getBoundingClientRect();n.top<l.top?t.scrollTop-=l.top-n.top:n.bottom>l.bottom&&(t.scrollTop+=n.bottom-l.bottom)}}}}},{key:"setNativeRange",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(h.info("setNativeRange",t,e,n,r),null==t||null!=this.root.parentNode&&null!=t.parentNode&&null!=n.parentNode){var o=document.getSelection();if(null!=o)if(null!=t){this.hasFocus()||this.root.focus();var a=(this.getNativeRange()||{}).native;if(null==a||i||t!==a.startContainer||e!==a.startOffset||n!==a.endContainer||r!==a.endOffset){"BR"==t.tagName&&(e=[].indexOf.call(t.parentNode.childNodes,t),t=t.parentNode),"BR"==n.tagName&&(r=[].indexOf.call(n.parentNode.childNodes,n),n=n.parentNode);var s=document.createRange();s.setStart(t,e),s.setEnd(n,r),o.removeAllRanges(),o.addRange(s)}}else o.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.default.sources.API;if("string"==typeof e&&(n=e,e=!1),h.info("setRange",t),null!=t){var r=this.rangeToNative(t);this.setNativeRange.apply(this,c(r).concat([e]))}else this.setNativeRange(null);this.update(n)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u.default.sources.USER,e=this.lastRange,n=this.getRange(),i=r(n,2),o=i[0],l=i[1];if(this.lastRange=o,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,s.default)(e,this.lastRange)){var c;!this.composing&&null!=l&&l.native.collapsed&&l.start.node!==this.cursor.textNode&&this.cursor.restore();var f,h=[u.default.events.SELECTION_CHANGE,(0,a.default)(this.lastRange),(0,a.default)(e),t];(c=this.emitter).emit.apply(c,[u.default.events.EDITOR_CHANGE].concat(h)),t!==u.default.sources.SILENT&&(f=this.emitter).emit.apply(f,h)}}}]),t}();function m(t,e){try{e.parentNode}catch(t){return!1}return e instanceof Text&&(e=e.parentNode),t.contains(e)}e.Range=d,e.default=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"insertInto",value:function(t,n){0===t.children.length?o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertInto",this).call(this,t,n):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),e}(((r=n(0))&&r.__esModule?r:{default:r}).default.Embed);a.blotName="break",a.tagName="BR",e.default=a},function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(44),a=n(30),s=n(1),u=function(t){function e(e){var n=t.call(this,e)||this;return n.build(),n}return i(e,t),e.prototype.appendChild=function(t){this.insertBefore(t)},e.prototype.attach=function(){t.prototype.attach.call(this),this.children.forEach((function(t){t.attach()}))},e.prototype.build=function(){var t=this;this.children=new o.default,[].slice.call(this.domNode.childNodes).reverse().forEach((function(e){try{var n=l(e);t.insertBefore(n,t.children.head||void 0)}catch(t){if(t instanceof s.ParchmentError)return;throw t}}))},e.prototype.deleteAt=function(t,e){if(0===t&&e===this.length())return this.remove();this.children.forEachAt(t,e,(function(t,e,n){t.deleteAt(e,n)}))},e.prototype.descendant=function(t,n){var r=this.children.find(n),i=r[0],o=r[1];return null==t.blotName&&t(i)||null!=t.blotName&&i instanceof t?[i,o]:i instanceof e?i.descendant(t,o):[null,-1]},e.prototype.descendants=function(t,n,r){void 0===n&&(n=0),void 0===r&&(r=Number.MAX_VALUE);var i=[],o=r;return this.children.forEachAt(n,r,(function(n,r,a){(null==t.blotName&&t(n)||null!=t.blotName&&n instanceof t)&&i.push(n),n instanceof e&&(i=i.concat(n.descendants(t,r,o))),o-=a})),i},e.prototype.detach=function(){this.children.forEach((function(t){t.detach()})),t.prototype.detach.call(this)},e.prototype.formatAt=function(t,e,n,r){this.children.forEachAt(t,e,(function(t,e,i){t.formatAt(e,i,n,r)}))},e.prototype.insertAt=function(t,e,n){var r=this.children.find(t),i=r[0],o=r[1];if(i)i.insertAt(o,e,n);else{var a=null==n?s.create("text",e):s.create(e,n);this.appendChild(a)}},e.prototype.insertBefore=function(t,e){if(null!=this.statics.allowedChildren&&!this.statics.allowedChildren.some((function(e){return t instanceof e})))throw new s.ParchmentError("Cannot insert "+t.statics.blotName+" into "+this.statics.blotName);t.insertInto(this,e)},e.prototype.length=function(){return this.children.reduce((function(t,e){return t+e.length()}),0)},e.prototype.moveChildren=function(t,e){this.children.forEach((function(n){t.insertBefore(n,e)}))},e.prototype.optimize=function(e){if(t.prototype.optimize.call(this,e),0===this.children.length)if(null!=this.statics.defaultChild){var n=s.create(this.statics.defaultChild);this.appendChild(n),n.optimize(e)}else this.remove()},e.prototype.path=function(t,n){void 0===n&&(n=!1);var r=this.children.find(t,n),i=r[0],o=r[1],a=[[this,t]];return i instanceof e?a.concat(i.path(o,n)):(null!=i&&a.push([i,o]),a)},e.prototype.removeChild=function(t){this.children.remove(t)},e.prototype.replace=function(n){n instanceof e&&n.moveChildren(this),t.prototype.replace.call(this,n)},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=this.clone();return this.parent.insertBefore(n,this.next),this.children.forEachAt(t,this.length(),(function(t,r,i){t=t.split(r,e),n.appendChild(t)})),n},e.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},e.prototype.update=function(t,e){var n=this,r=[],i=[];t.forEach((function(t){t.target===n.domNode&&"childList"===t.type&&(r.push.apply(r,t.addedNodes),i.push.apply(i,t.removedNodes))})),i.forEach((function(t){if(!(null!=t.parentNode&&"IFRAME"!==t.tagName&&document.body.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var e=s.find(t);null!=e&&(null!=e.domNode.parentNode&&e.domNode.parentNode!==n.domNode||e.detach())}})),r.filter((function(t){return t.parentNode==n.domNode})).sort((function(t,e){return t===e?0:t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1})).forEach((function(t){var e=null;null!=t.nextSibling&&(e=s.find(t.nextSibling));var r=l(t);r.next==e&&null!=r.next||(null!=r.parent&&r.parent.removeChild(n),n.insertBefore(r,e||void 0))}))},e}(a.default);function l(t){var e=s.find(t);if(null==e)try{e=s.create(t)}catch(n){e=s.create(s.Scope.INLINE),[].slice.call(t.childNodes).forEach((function(t){e.domNode.appendChild(t)})),t.parentNode&&t.parentNode.replaceChild(e.domNode,t),e.attach()}return e}e.default=u},function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(12),a=n(31),s=n(17),u=n(1),l=function(t){function e(e){var n=t.call(this,e)||this;return n.attributes=new a.default(n.domNode),n}return i(e,t),e.formats=function(t){return"string"==typeof this.tagName||(Array.isArray(this.tagName)?t.tagName.toLowerCase():void 0)},e.prototype.format=function(t,e){var n=u.query(t);n instanceof o.default?this.attributes.attribute(n,e):e&&(null==n||t===this.statics.blotName&&this.formats()[t]===e||this.replaceWith(t,e))},e.prototype.formats=function(){var t=this.attributes.values(),e=this.statics.formats(this.domNode);return null!=e&&(t[this.statics.blotName]=e),t},e.prototype.replaceWith=function(e,n){var r=t.prototype.replaceWith.call(this,e,n);return this.attributes.copy(r),r},e.prototype.update=function(e,n){var r=this;t.prototype.update.call(this,e,n),e.some((function(t){return t.target===r.domNode&&"attributes"===t.type}))&&this.attributes.build()},e.prototype.wrap=function(n,r){var i=t.prototype.wrap.call(this,n,r);return i instanceof e&&i.statics.scope===this.statics.scope&&this.attributes.move(i),i},e}(s.default);e.default=l},function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(30),a=n(1),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.value=function(t){return!0},e.prototype.index=function(t,e){return this.domNode===t||this.domNode.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(e,1):-1},e.prototype.position=function(t,e){var n=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return t>0&&(n+=1),[this.parent.domNode,n]},e.prototype.value=function(){var t;return(t={})[this.statics.blotName]=this.statics.value(this.domNode)||!0,t},e.scope=a.Scope.INLINE_BLOT,e}(o.default);e.default=s},function(t,e,n){var r=n(11),i=n(3),o={attributes:{compose:function(t,e,n){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var r=i(!0,{},e);for(var o in n||(r=Object.keys(r).reduce((function(t,e){return null!=r[e]&&(t[e]=r[e]),t}),{})),t)void 0!==t[o]&&void 0===e[o]&&(r[o]=t[o]);return Object.keys(r).length>0?r:void 0},diff:function(t,e){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var n=Object.keys(t).concat(Object.keys(e)).reduce((function(n,i){return r(t[i],e[i])||(n[i]=void 0===e[i]?null:e[i]),n}),{});return Object.keys(n).length>0?n:void 0},transform:function(t,e,n){if("object"!=typeof t)return e;if("object"==typeof e){if(!n)return e;var r=Object.keys(e).reduce((function(n,r){return void 0===t[r]&&(n[r]=e[r]),n}),{});return Object.keys(r).length>0?r:void 0}}},iterator:function(t){return new a(t)},length:function(t){return"number"==typeof t.delete?t.delete:"number"==typeof t.retain?t.retain:"string"==typeof t.insert?t.insert.length:1}};function a(t){this.ops=t,this.index=0,this.offset=0}a.prototype.hasNext=function(){return this.peekLength()<1/0},a.prototype.next=function(t){t||(t=1/0);var e=this.ops[this.index];if(e){var n=this.offset,r=o.length(e);if(t>=r-n?(t=r-n,this.index+=1,this.offset=0):this.offset+=t,"number"==typeof e.delete)return{delete:t};var i={};return e.attributes&&(i.attributes=e.attributes),"number"==typeof e.retain?i.retain=t:"string"==typeof e.insert?i.insert=e.insert.substr(n,t):i.insert=e.insert,i}return{retain:1/0}},a.prototype.peek=function(){return this.ops[this.index]},a.prototype.peekLength=function(){return this.ops[this.index]?o.length(this.ops[this.index])-this.offset:1/0},a.prototype.peekType=function(){return this.ops[this.index]?"number"==typeof this.ops[this.index].delete?"delete":"number"==typeof this.ops[this.index].retain?"retain":"insert":"retain"},a.prototype.rest=function(){if(this.hasNext()){if(0===this.offset)return this.ops.slice(this.index);var t=this.offset,e=this.index,n=this.next(),r=this.ops.slice(this.index);return this.offset=t,this.index=e,[n].concat(r)}return[]},t.exports=o},function(t,e){var n=function(){"use strict";function t(t,e){return null!=e&&t instanceof e}var e,n,r;try{e=Map}catch(t){e=function(){}}try{n=Set}catch(t){n=function(){}}try{r=Promise}catch(t){r=function(){}}function i(o,s,u,l,c){"object"==typeof s&&(u=s.depth,l=s.prototype,c=s.includeNonEnumerable,s=s.circular);var f=[],h=[],d="undefined"!=typeof Buffer;return void 0===s&&(s=!0),void 0===u&&(u=1/0),function o(u,p){if(null===u)return null;if(0===p)return u;var m,g;if("object"!=typeof u)return u;if(t(u,e))m=new e;else if(t(u,n))m=new n;else if(t(u,r))m=new r((function(t,e){u.then((function(e){t(o(e,p-1))}),(function(t){e(o(t,p-1))}))}));else if(i.__isArray(u))m=[];else if(i.__isRegExp(u))m=new RegExp(u.source,a(u)),u.lastIndex&&(m.lastIndex=u.lastIndex);else if(i.__isDate(u))m=new Date(u.getTime());else{if(d&&Buffer.isBuffer(u))return m=Buffer.allocUnsafe?Buffer.allocUnsafe(u.length):new Buffer(u.length),u.copy(m),m;t(u,Error)?m=Object.create(u):void 0===l?(g=Object.getPrototypeOf(u),m=Object.create(g)):(m=Object.create(l),g=l)}if(s){var v=f.indexOf(u);if(-1!=v)return h[v];f.push(u),h.push(m)}for(var y in t(u,e)&&u.forEach((function(t,e){var n=o(e,p-1),r=o(t,p-1);m.set(n,r)})),t(u,n)&&u.forEach((function(t){var e=o(t,p-1);m.add(e)})),u){var b;g&&(b=Object.getOwnPropertyDescriptor(g,y)),b&&null==b.set||(m[y]=o(u[y],p-1))}if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(u);for(y=0;y<x.length;y++){var w=x[y];(!(S=Object.getOwnPropertyDescriptor(u,w))||S.enumerable||c)&&(m[w]=o(u[w],p-1),S.enumerable||Object.defineProperty(m,w,{enumerable:!1}))}}if(c){var _=Object.getOwnPropertyNames(u);for(y=0;y<_.length;y++){var S,O=_[y];(S=Object.getOwnPropertyDescriptor(u,O))&&S.enumerable||(m[O]=o(u[O],p-1),Object.defineProperty(m,O,{enumerable:!1}))}}return m}(o,u)}function o(t){return Object.prototype.toString.call(t)}function a(t){var e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),e}return i.clonePrototype=function(t){if(null===t)return null;var e=function(){};return e.prototype=t,new e},i.__objToStr=o,i.__isDate=function(t){return"object"==typeof t&&"[object Date]"===o(t)},i.__isArray=function(t){return"object"==typeof t&&"[object Array]"===o(t)},i.__isRegExp=function(t){return"object"==typeof t&&"[object RegExp]"===o(t)},i.__getRegExpFlags=a,i}();"object"==typeof t&&t.exports&&(t.exports=n)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=d(n(0)),s=d(n(8)),u=n(4),l=d(u),c=d(n(16)),f=d(n(13)),h=d(n(25));function d(t){return t&&t.__esModule?t:{default:t}}function p(t){return t instanceof l.default||t instanceof u.BlockEmbed}var m=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.emitter=n.emitter,Array.isArray(n.whitelist)&&(r.whitelist=n.whitelist.reduce((function(t,e){return t[e]=!0,t}),{})),r.domNode.addEventListener("DOMNodeInserted",(function(){})),r.optimize(),r.enable(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(t,n){var i=this.line(t),a=r(i,2),s=a[0],l=a[1],h=this.line(t+n),d=r(h,1)[0];if(o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"deleteAt",this).call(this,t,n),null!=d&&s!==d&&l>0){if(s instanceof u.BlockEmbed||d instanceof u.BlockEmbed)return void this.optimize();if(s instanceof f.default){var p=s.newlineIndex(s.length(),!0);if(p>-1&&(s=s.split(p+1))===d)return void this.optimize()}else if(d instanceof f.default){var m=d.newlineIndex(0);m>-1&&d.split(m+1)}var g=d.children.head instanceof c.default?null:d.children.head;s.moveChildren(d,g),s.remove()}this.optimize()}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",t)}},{key:"formatAt",value:function(t,n,r,i){(null==this.whitelist||this.whitelist[r])&&(o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,n,r,i),this.optimize())}},{key:"insertAt",value:function(t,n,r){if(null==r||null==this.whitelist||this.whitelist[n]){if(t>=this.length())if(null==r||null==a.default.query(n,a.default.Scope.BLOCK)){var i=a.default.create(this.statics.defaultChild);this.appendChild(i),null==r&&n.endsWith("\n")&&(n=n.slice(0,-1)),i.insertAt(0,n,r)}else{var s=a.default.create(n,r);this.appendChild(s)}else o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,r);this.optimize()}}},{key:"insertBefore",value:function(t,n){if(t.statics.scope===a.default.Scope.INLINE_BLOT){var r=a.default.create(this.statics.defaultChild);r.appendChild(t),t=r}o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n)}},{key:"leaf",value:function(t){return this.path(t).pop()||[null,-1]}},{key:"line",value:function(t){return t===this.length()?this.line(t-1):this.descendant(p,t)}},{key:"lines",value:function(){return function t(e,n,r){var i=[],o=r;return e.children.forEachAt(n,r,(function(e,n,r){p(e)?i.push(e):e instanceof a.default.Container&&(i=i.concat(t(e,n,o))),o-=r})),i}(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE)}},{key:"optimize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!0!==this.batch&&(o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t,n),t.length>0&&this.emitter.emit(s.default.events.SCROLL_OPTIMIZE,t,n))}},{key:"path",value:function(t){return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"path",this).call(this,t).slice(1)}},{key:"update",value:function(t){if(!0!==this.batch){var n=s.default.sources.USER;"string"==typeof t&&(n=t),Array.isArray(t)||(t=this.observer.takeRecords()),t.length>0&&this.emitter.emit(s.default.events.SCROLL_BEFORE_UPDATE,n,t),o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"update",this).call(this,t.concat([])),t.length>0&&this.emitter.emit(s.default.events.SCROLL_UPDATE,n,t)}}}]),e}(a.default.Scroll);m.blotName="scroll",m.className="ql-editor",m.tagName="DIV",m.defaultChild="block",m.allowedChildren=[l.default,u.BlockEmbed,h.default],e.default=m},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SHORTKEY=e.default=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=m(n(21)),s=m(n(11)),u=m(n(3)),l=m(n(2)),c=m(n(20)),f=m(n(0)),h=m(n(5)),d=m(n(10)),p=m(n(9));function m(t){return t&&t.__esModule?t:{default:t}}function g(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var v=(0,d.default)("quill:keyboard"),y=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",b=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.bindings={},Object.keys(r.options.bindings).forEach((function(e){("list autofill"!==e||null==t.scroll.whitelist||t.scroll.whitelist.list)&&r.options.bindings[e]&&r.addBinding(r.options.bindings[e])})),r.addBinding({key:e.keys.ENTER,shiftKey:null},O),r.addBinding({key:e.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},(function(){})),/Firefox/i.test(navigator.userAgent)?(r.addBinding({key:e.keys.BACKSPACE},{collapsed:!0},w),r.addBinding({key:e.keys.DELETE},{collapsed:!0},_)):(r.addBinding({key:e.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},w),r.addBinding({key:e.keys.DELETE},{collapsed:!0,suffix:/^.?$/},_)),r.addBinding({key:e.keys.BACKSPACE},{collapsed:!1},S),r.addBinding({key:e.keys.DELETE},{collapsed:!1},S),r.addBinding({key:e.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},w),r.listen(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,null,[{key:"match",value:function(t,e){return e=E(e),!["altKey","ctrlKey","metaKey","shiftKey"].some((function(n){return!!e[n]!==t[n]&&null!==e[n]}))&&e.key===(t.which||t.keyCode)}}]),o(e,[{key:"addBinding",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=E(t);if(null==r||null==r.key)return v.warn("Attempted to add invalid keyboard binding",r);"function"==typeof e&&(e={handler:e}),"function"==typeof n&&(n={handler:n}),r=(0,u.default)(r,e,n),this.bindings[r.key]=this.bindings[r.key]||[],this.bindings[r.key].push(r)}},{key:"listen",value:function(){var t=this;this.quill.root.addEventListener("keydown",(function(n){if(!n.defaultPrevented){var o=n.which||n.keyCode,a=(t.bindings[o]||[]).filter((function(t){return e.match(n,t)}));if(0!==a.length){var u=t.quill.getSelection();if(null!=u&&t.quill.hasFocus()){var l=t.quill.getLine(u.index),c=i(l,2),h=c[0],d=c[1],p=t.quill.getLeaf(u.index),m=i(p,2),g=m[0],v=m[1],y=0===u.length?[g,v]:t.quill.getLeaf(u.index+u.length),b=i(y,2),x=b[0],w=b[1],_=g instanceof f.default.Text?g.value().slice(0,v):"",S=x instanceof f.default.Text?x.value().slice(w):"",O={collapsed:0===u.length,empty:0===u.length&&h.length()<=1,format:t.quill.getFormat(u),offset:d,prefix:_,suffix:S};a.some((function(e){if(null!=e.collapsed&&e.collapsed!==O.collapsed)return!1;if(null!=e.empty&&e.empty!==O.empty)return!1;if(null!=e.offset&&e.offset!==O.offset)return!1;if(Array.isArray(e.format)){if(e.format.every((function(t){return null==O.format[t]})))return!1}else if("object"===r(e.format)&&!Object.keys(e.format).every((function(t){return!0===e.format[t]?null!=O.format[t]:!1===e.format[t]?null==O.format[t]:(0,s.default)(e.format[t],O.format[t])})))return!1;return!(null!=e.prefix&&!e.prefix.test(O.prefix)||null!=e.suffix&&!e.suffix.test(O.suffix)||!0===e.handler.call(t,u,O))}))&&n.preventDefault()}}}}))}}]),e}(p.default);function x(t,e){var n,r=t===b.keys.LEFT?"prefix":"suffix";return g(n={key:t,shiftKey:e,altKey:null},r,/^$/),g(n,"handler",(function(n){var r=n.index;t===b.keys.RIGHT&&(r+=n.length+1);var o=this.quill.getLeaf(r);return!(i(o,1)[0]instanceof f.default.Embed&&(t===b.keys.LEFT?e?this.quill.setSelection(n.index-1,n.length+1,h.default.sources.USER):this.quill.setSelection(n.index-1,h.default.sources.USER):e?this.quill.setSelection(n.index,n.length+1,h.default.sources.USER):this.quill.setSelection(n.index+n.length+1,h.default.sources.USER),1))})),n}function w(t,e){if(!(0===t.index||this.quill.getLength()<=1)){var n=this.quill.getLine(t.index),r=i(n,1)[0],o={};if(0===e.offset){var a=this.quill.getLine(t.index-1),s=i(a,1)[0];if(null!=s&&s.length()>1){var u=r.formats(),l=this.quill.getFormat(t.index-1,1);o=c.default.attributes.diff(u,l)||{}}}var f=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(e.prefix)?2:1;this.quill.deleteText(t.index-f,f,h.default.sources.USER),Object.keys(o).length>0&&this.quill.formatLine(t.index-f,f,o,h.default.sources.USER),this.quill.focus()}}function _(t,e){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix)?2:1;if(!(t.index>=this.quill.getLength()-n)){var r={},o=0,a=this.quill.getLine(t.index),s=i(a,1)[0];if(e.offset>=s.length()-1){var u=this.quill.getLine(t.index+1),l=i(u,1)[0];if(l){var f=s.formats(),d=this.quill.getFormat(t.index,1);r=c.default.attributes.diff(f,d)||{},o=l.length()}}this.quill.deleteText(t.index,n,h.default.sources.USER),Object.keys(r).length>0&&this.quill.formatLine(t.index+o-1,n,r,h.default.sources.USER)}}function S(t){var e=this.quill.getLines(t),n={};if(e.length>1){var r=e[0].formats(),i=e[e.length-1].formats();n=c.default.attributes.diff(i,r)||{}}this.quill.deleteText(t,h.default.sources.USER),Object.keys(n).length>0&&this.quill.formatLine(t.index,1,n,h.default.sources.USER),this.quill.setSelection(t.index,h.default.sources.SILENT),this.quill.focus()}function O(t,e){var n=this;t.length>0&&this.quill.scroll.deleteAt(t.index,t.length);var r=Object.keys(e.format).reduce((function(t,n){return f.default.query(n,f.default.Scope.BLOCK)&&!Array.isArray(e.format[n])&&(t[n]=e.format[n]),t}),{});this.quill.insertText(t.index,"\n",r,h.default.sources.USER),this.quill.setSelection(t.index+1,h.default.sources.SILENT),this.quill.focus(),Object.keys(e.format).forEach((function(t){null==r[t]&&(Array.isArray(e.format[t])||"link"!==t&&n.quill.format(t,e.format[t],h.default.sources.USER))}))}function N(t){return{key:b.keys.TAB,shiftKey:!t,format:{"code-block":!0},handler:function(e){var n=f.default.query("code-block"),r=e.index,o=e.length,a=this.quill.scroll.descendant(n,r),s=i(a,2),u=s[0],l=s[1];if(null!=u){var c=this.quill.getIndex(u),d=u.newlineIndex(l,!0)+1,p=u.newlineIndex(c+l+o),m=u.domNode.textContent.slice(d,p).split("\n");l=0,m.forEach((function(e,i){t?(u.insertAt(d+l,n.TAB),l+=n.TAB.length,0===i?r+=n.TAB.length:o+=n.TAB.length):e.startsWith(n.TAB)&&(u.deleteAt(d+l,n.TAB.length),l-=n.TAB.length,0===i?r-=n.TAB.length:o-=n.TAB.length),l+=e.length+1})),this.quill.update(h.default.sources.USER),this.quill.setSelection(r,o,h.default.sources.SILENT)}}}}function M(t){return{key:t[0].toUpperCase(),shortKey:!0,handler:function(e,n){this.quill.format(t,!n.format[t],h.default.sources.USER)}}}function E(t){if("string"==typeof t||"number"==typeof t)return E({key:t});if("object"===(void 0===t?"undefined":r(t))&&(t=(0,a.default)(t,!1)),"string"==typeof t.key)if(null!=b.keys[t.key.toUpperCase()])t.key=b.keys[t.key.toUpperCase()];else{if(1!==t.key.length)return null;t.key=t.key.toUpperCase().charCodeAt(0)}return t.shortKey&&(t[y]=t.shortKey,delete t.shortKey),t}b.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},b.DEFAULTS={bindings:{bold:M("bold"),italic:M("italic"),underline:M("underline"),indent:{key:b.keys.TAB,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","+1",h.default.sources.USER)}},outdent:{key:b.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","-1",h.default.sources.USER)}},"outdent backspace":{key:b.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(t,e){null!=e.format.indent?this.quill.format("indent","-1",h.default.sources.USER):null!=e.format.list&&this.quill.format("list",!1,h.default.sources.USER)}},"indent code-block":N(!0),"outdent code-block":N(!1),"remove tab":{key:b.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(t){this.quill.deleteText(t.index-1,1,h.default.sources.USER)}},tab:{key:b.keys.TAB,handler:function(t){this.quill.history.cutoff();var e=(new l.default).retain(t.index).delete(t.length).insert("\t");this.quill.updateContents(e,h.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index+1,h.default.sources.SILENT)}},"list empty enter":{key:b.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(t,e){this.quill.format("list",!1,h.default.sources.USER),e.format.indent&&this.quill.format("indent",!1,h.default.sources.USER)}},"checklist enter":{key:b.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(t){var e=this.quill.getLine(t.index),n=i(e,2),r=n[0],o=n[1],a=(0,u.default)({},r.formats(),{list:"checked"}),s=(new l.default).retain(t.index).insert("\n",a).retain(r.length()-o-1).retain(1,{list:"unchecked"});this.quill.updateContents(s,h.default.sources.USER),this.quill.setSelection(t.index+1,h.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:b.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(t,e){var n=this.quill.getLine(t.index),r=i(n,2),o=r[0],a=r[1],s=(new l.default).retain(t.index).insert("\n",e.format).retain(o.length()-a-1).retain(1,{header:null});this.quill.updateContents(s,h.default.sources.USER),this.quill.setSelection(t.index+1,h.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(t,e){var n=e.prefix.length,r=this.quill.getLine(t.index),o=i(r,2),a=o[0],s=o[1];if(s>n)return!0;var u=void 0;switch(e.prefix.trim()){case"[]":case"[ ]":u="unchecked";break;case"[x]":u="checked";break;case"-":case"*":u="bullet";break;default:u="ordered"}this.quill.insertText(t.index," ",h.default.sources.USER),this.quill.history.cutoff();var c=(new l.default).retain(t.index-s).delete(n+1).retain(a.length()-2-s).retain(1,{list:u});this.quill.updateContents(c,h.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index-n,h.default.sources.SILENT)}},"code exit":{key:b.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(t){var e=this.quill.getLine(t.index),n=i(e,2),r=n[0],o=n[1],a=(new l.default).retain(t.index+r.length()-o-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(a,h.default.sources.USER)}},"embed left":x(b.keys.LEFT,!1),"embed left shift":x(b.keys.LEFT,!0),"embed right":x(b.keys.RIGHT,!1),"embed right shift":x(b.keys.RIGHT,!0)}},e.default=b,e.SHORTKEY=y},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=s(n(0)),a=s(n(7));function s(t){return t&&t.__esModule?t:{default:t}}var u=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.selection=n,r.textNode=document.createTextNode(e.CONTENTS),r.domNode.appendChild(r.textNode),r._length=0,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,null,[{key:"value",value:function(){}}]),i(e,[{key:"detach",value:function(){null!=this.parent&&this.parent.removeChild(this)}},{key:"format",value:function(t,n){if(0!==this._length)return r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n);for(var i=this,a=0;null!=i&&i.statics.scope!==o.default.Scope.BLOCK_BLOT;)a+=i.offset(i.parent),i=i.parent;null!=i&&(this._length=e.CONTENTS.length,i.optimize(),i.formatAt(a,e.CONTENTS.length,t,n),this._length=0)}},{key:"index",value:function(t,n){return t===this.textNode?0:r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"index",this).call(this,t,n)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!this.selection.composing&&null!=this.parent){var t=this.textNode,n=this.selection.getNativeRange(),r=void 0,i=void 0,s=void 0;if(null!=n&&n.start.node===t&&n.end.node===t){var u=[t,n.start.offset,n.end.offset];r=u[0],i=u[1],s=u[2]}for(;null!=this.domNode.lastChild&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==e.CONTENTS){var l=this.textNode.data.split(e.CONTENTS).join("");this.next instanceof a.default?(r=this.next.domNode,this.next.insertAt(0,l),this.textNode.data=e.CONTENTS):(this.textNode.data=l,this.parent.insertBefore(o.default.create(this.textNode),this),this.textNode=document.createTextNode(e.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),null!=i){var c=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}([i,s].map((function(t){return Math.max(0,Math.min(r.data.length,t-1))})),2);return i=c[0],s=c[1],{startNode:r,startOffset:i,endNode:r,endOffset:s}}}}},{key:"update",value:function(t,e){var n=this;if(t.some((function(t){return"characterData"===t.type&&t.target===n.textNode}))){var r=this.restore();r&&(e.range=r)}}},{key:"value",value:function(){return""}}]),e}(o.default.Embed);u.blotName="cursor",u.className="ql-cursor",u.tagName="span",u.CONTENTS="\ufeff",e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=a(n(0)),i=n(4),o=a(i);function a(t){return t&&t.__esModule?t:{default:t}}var s=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(r.default.Container);s.allowedChildren=[o.default,i.BlockEmbed,s],e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorStyle=e.ColorClass=e.ColorAttributor=void 0;var r,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=(r=n(0))&&r.__esModule?r:{default:r},s=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"value",value:function(t){var n=o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"value",this).call(this,t);return n.startsWith("rgb(")?"#"+(n=n.replace(/^[^\d]+/,"").replace(/[^\d]+$/,"")).split(",").map((function(t){return("00"+parseInt(t).toString(16)).slice(-2)})).join(""):n}}]),e}(a.default.Attributor.Style),u=new a.default.Attributor.Class("color","ql-color",{scope:a.default.Scope.INLINE}),l=new s("color","color",{scope:a.default.Scope.INLINE});e.ColorAttributor=s,e.ColorClass=u,e.ColorStyle=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sanitize=e.default=void 0;var r,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"format",value:function(t,n){if(t!==this.statics.blotName||!n)return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n);n=this.constructor.sanitize(n),this.domNode.setAttribute("href",n)}}],[{key:"create",value:function(t){var n=o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return t=this.sanitize(t),n.setAttribute("href",t),n.setAttribute("rel","noopener noreferrer"),n.setAttribute("target","_blank"),n}},{key:"formats",value:function(t){return t.getAttribute("href")}},{key:"sanitize",value:function(t){return s(t,this.PROTOCOL_WHITELIST)?t:this.SANITIZED_URL}}]),e}(((r=n(6))&&r.__esModule?r:{default:r}).default);function s(t,e){var n=document.createElement("a");n.href=t;var r=n.href.slice(0,n.href.indexOf(":"));return e.indexOf(r)>-1}a.blotName="link",a.tagName="A",a.SANITIZED_URL="about:blank",a.PROTOCOL_WHITELIST=["http","https","mailto","tel"],e.default=a,e.sanitize=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=s(n(23)),a=s(n(107));function s(t){return t&&t.__esModule?t:{default:t}}var u=0;function l(t,e){t.setAttribute(e,!("true"===t.getAttribute(e)))}var c=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.select=e,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",(function(){n.togglePicker()})),this.label.addEventListener("keydown",(function(t){switch(t.keyCode){case o.default.keys.ENTER:n.togglePicker();break;case o.default.keys.ESCAPE:n.escape(),t.preventDefault()}})),this.select.addEventListener("change",this.update.bind(this))}return i(t,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),l(this.label,"aria-expanded"),l(this.options,"aria-hidden")}},{key:"buildItem",value:function(t){var e=this,n=document.createElement("span");return n.tabIndex="0",n.setAttribute("role","button"),n.classList.add("ql-picker-item"),t.hasAttribute("value")&&n.setAttribute("data-value",t.getAttribute("value")),t.textContent&&n.setAttribute("data-label",t.textContent),n.addEventListener("click",(function(){e.selectItem(n,!0)})),n.addEventListener("keydown",(function(t){switch(t.keyCode){case o.default.keys.ENTER:e.selectItem(n,!0),t.preventDefault();break;case o.default.keys.ESCAPE:e.escape(),t.preventDefault()}})),n}},{key:"buildLabel",value:function(){var t=document.createElement("span");return t.classList.add("ql-picker-label"),t.innerHTML=a.default,t.tabIndex="0",t.setAttribute("role","button"),t.setAttribute("aria-expanded","false"),this.container.appendChild(t),t}},{key:"buildOptions",value:function(){var t=this,e=document.createElement("span");e.classList.add("ql-picker-options"),e.setAttribute("aria-hidden","true"),e.tabIndex="-1",e.id="ql-picker-options-"+u,u+=1,this.label.setAttribute("aria-controls",e.id),this.options=e,[].slice.call(this.select.options).forEach((function(n){var r=t.buildItem(n);e.appendChild(r),!0===n.selected&&t.selectItem(r)})),this.container.appendChild(e)}},{key:"buildPicker",value:function(){var t=this;[].slice.call(this.select.attributes).forEach((function(e){t.container.setAttribute(e.name,e.value)})),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var t=this;this.close(),setTimeout((function(){return t.label.focus()}),1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.container.querySelector(".ql-selected");if(t!==n&&(null!=n&&n.classList.remove("ql-selected"),null!=t&&(t.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(t.parentNode.children,t),t.hasAttribute("data-value")?this.label.setAttribute("data-value",t.getAttribute("data-value")):this.label.removeAttribute("data-value"),t.hasAttribute("data-label")?this.label.setAttribute("data-label",t.getAttribute("data-label")):this.label.removeAttribute("data-label"),e))){if("function"==typeof Event)this.select.dispatchEvent(new Event("change"));else if("object"===("undefined"==typeof Event?"undefined":r(Event))){var i=document.createEvent("Event");i.initEvent("change",!0,!0),this.select.dispatchEvent(i)}this.close()}}},{key:"update",value:function(){var t=void 0;if(this.select.selectedIndex>-1){var e=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex],this.selectItem(e)}else this.selectItem(null);var n=null!=t&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),t}();e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=v(n(0)),i=v(n(5)),o=n(4),a=v(o),s=v(n(16)),u=v(n(25)),l=v(n(24)),c=v(n(35)),f=v(n(6)),h=v(n(22)),d=v(n(7)),p=v(n(55)),m=v(n(42)),g=v(n(23));function v(t){return t&&t.__esModule?t:{default:t}}i.default.register({"blots/block":a.default,"blots/block/embed":o.BlockEmbed,"blots/break":s.default,"blots/container":u.default,"blots/cursor":l.default,"blots/embed":c.default,"blots/inline":f.default,"blots/scroll":h.default,"blots/text":d.default,"modules/clipboard":p.default,"modules/history":m.default,"modules/keyboard":g.default}),r.default.register(a.default,s.default,l.default,f.default,h.default,d.default),e.default=i.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=function(){function t(t){this.domNode=t,this.domNode[r.DATA_KEY]={blot:this}}return Object.defineProperty(t.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),t.create=function(t){if(null==this.tagName)throw new r.ParchmentError("Blot definition missing tagName");var e;return Array.isArray(this.tagName)?("string"==typeof t&&(t=t.toUpperCase(),parseInt(t).toString()===t&&(t=parseInt(t))),e="number"==typeof t?document.createElement(this.tagName[t-1]):this.tagName.indexOf(t)>-1?document.createElement(t):document.createElement(this.tagName[0])):e=document.createElement(this.tagName),this.className&&e.classList.add(this.className),e},t.prototype.attach=function(){null!=this.parent&&(this.scroll=this.parent.scroll)},t.prototype.clone=function(){var t=this.domNode.cloneNode(!1);return r.create(t)},t.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[r.DATA_KEY]},t.prototype.deleteAt=function(t,e){this.isolate(t,e).remove()},t.prototype.formatAt=function(t,e,n,i){var o=this.isolate(t,e);if(null!=r.query(n,r.Scope.BLOT)&&i)o.wrap(n,i);else if(null!=r.query(n,r.Scope.ATTRIBUTE)){var a=r.create(this.statics.scope);o.wrap(a),a.format(n,i)}},t.prototype.insertAt=function(t,e,n){var i=null==n?r.create("text",e):r.create(e,n),o=this.split(t);this.parent.insertBefore(i,o)},t.prototype.insertInto=function(t,e){void 0===e&&(e=null),null!=this.parent&&this.parent.children.remove(this);var n=null;t.children.insertBefore(this,e),null!=e&&(n=e.domNode),this.domNode.parentNode==t.domNode&&this.domNode.nextSibling==n||t.domNode.insertBefore(this.domNode,n),this.parent=t,this.attach()},t.prototype.isolate=function(t,e){var n=this.split(t);return n.split(e),n},t.prototype.length=function(){return 1},t.prototype.offset=function(t){return void 0===t&&(t=this.parent),null==this.parent||this==t?0:this.parent.children.offset(this)+this.parent.offset(t)},t.prototype.optimize=function(t){null!=this.domNode[r.DATA_KEY]&&delete this.domNode[r.DATA_KEY].mutations},t.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},t.prototype.replace=function(t){null!=t.parent&&(t.parent.insertBefore(this,t.next),t.remove())},t.prototype.replaceWith=function(t,e){var n="string"==typeof t?r.create(t,e):t;return n.replace(this),n},t.prototype.split=function(t,e){return 0===t?this:this.next},t.prototype.update=function(t,e){},t.prototype.wrap=function(t,e){var n="string"==typeof t?r.create(t,e):t;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},t.blotName="abstract",t}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(12),i=n(32),o=n(33),a=n(1),s=function(){function t(t){this.attributes={},this.domNode=t,this.build()}return t.prototype.attribute=function(t,e){e?t.add(this.domNode,e)&&(null!=t.value(this.domNode)?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])},t.prototype.build=function(){var t=this;this.attributes={};var e=r.default.keys(this.domNode),n=i.default.keys(this.domNode),s=o.default.keys(this.domNode);e.concat(n).concat(s).forEach((function(e){var n=a.query(e,a.Scope.ATTRIBUTE);n instanceof r.default&&(t.attributes[n.attrName]=n)}))},t.prototype.copy=function(t){var e=this;Object.keys(this.attributes).forEach((function(n){var r=e.attributes[n].value(e.domNode);t.format(n,r)}))},t.prototype.move=function(t){var e=this;this.copy(t),Object.keys(this.attributes).forEach((function(t){e.attributes[t].remove(e.domNode)})),this.attributes={}},t.prototype.values=function(){var t=this;return Object.keys(this.attributes).reduce((function(e,n){return e[n]=t.attributes[n].value(t.domNode),e}),{})},t}();e.default=s},function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function o(t,e){return(t.getAttribute("class")||"").split(/\s+/).filter((function(t){return 0===t.indexOf(e+"-")}))}Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.keys=function(t){return(t.getAttribute("class")||"").split(/\s+/).map((function(t){return t.split("-").slice(0,-1).join("-")}))},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(this.remove(t),t.classList.add(this.keyName+"-"+e),!0)},e.prototype.remove=function(t){o(t,this.keyName).forEach((function(e){t.classList.remove(e)})),0===t.classList.length&&t.removeAttribute("class")},e.prototype.value=function(t){var e=(o(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,e)?e:""},e}(n(12).default);e.default=a},function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function o(t){var e=t.split("-"),n=e.slice(1).map((function(t){return t[0].toUpperCase()+t.slice(1)})).join("");return e[0]+n}Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.keys=function(t){return(t.getAttribute("style")||"").split(";").map((function(t){return t.split(":")[0].trim()}))},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.style[o(this.keyName)]=e,!0)},e.prototype.remove=function(t){t.style[o(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")},e.prototype.value=function(t){var e=t.style[o(this.keyName)];return this.canAdd(t,e)?e:""},e}(n(12).default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.quill=e,this.options=n,this.modules={}}return r(t,[{key:"init",value:function(){var t=this;Object.keys(this.options.modules).forEach((function(e){null==t.modules[e]&&t.addModule(e)}))}},{key:"addModule",value:function(t){var e=this.quill.constructor.import("modules/"+t);return this.modules[t]=new e(this.quill,this.options.modules[t]||{}),this.modules[t]}}]),t}();i.DEFAULTS={modules:{}},i.themes={default:i},e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=s(n(0)),a=s(n(7));function s(t){return t&&t.__esModule?t:{default:t}}var u="\ufeff",l=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.contentNode=document.createElement("span"),n.contentNode.setAttribute("contenteditable",!1),[].slice.call(n.domNode.childNodes).forEach((function(t){n.contentNode.appendChild(t)})),n.leftGuard=document.createTextNode(u),n.rightGuard=document.createTextNode(u),n.domNode.appendChild(n.leftGuard),n.domNode.appendChild(n.contentNode),n.domNode.appendChild(n.rightGuard),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"index",value:function(t,n){return t===this.leftGuard?0:t===this.rightGuard?1:i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"index",this).call(this,t,n)}},{key:"restore",value:function(t){var e=void 0,n=void 0,r=t.data.split(u).join("");if(t===this.leftGuard)if(this.prev instanceof a.default){var i=this.prev.length();this.prev.insertAt(i,r),e={startNode:this.prev.domNode,startOffset:i+r.length}}else n=document.createTextNode(r),this.parent.insertBefore(o.default.create(n),this),e={startNode:n,startOffset:r.length};else t===this.rightGuard&&(this.next instanceof a.default?(this.next.insertAt(0,r),e={startNode:this.next.domNode,startOffset:r.length}):(n=document.createTextNode(r),this.parent.insertBefore(o.default.create(n),this.next),e={startNode:n,startOffset:r.length}));return t.data=u,e}},{key:"update",value:function(t,e){var n=this;t.forEach((function(t){if("characterData"===t.type&&(t.target===n.leftGuard||t.target===n.rightGuard)){var r=n.restore(t.target);r&&(e.range=r)}}))}}]),e}(o.default.Embed);e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AlignStyle=e.AlignClass=e.AlignAttribute=void 0;var r,i=(r=n(0))&&r.__esModule?r:{default:r},o={scope:i.default.Scope.BLOCK,whitelist:["right","center","justify"]},a=new i.default.Attributor.Attribute("align","align",o),s=new i.default.Attributor.Class("align","ql-align",o),u=new i.default.Attributor.Style("align","text-align",o);e.AlignAttribute=a,e.AlignClass=s,e.AlignStyle=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BackgroundStyle=e.BackgroundClass=void 0;var r,i=(r=n(0))&&r.__esModule?r:{default:r},o=n(26),a=new i.default.Attributor.Class("background","ql-bg",{scope:i.default.Scope.INLINE}),s=new o.ColorAttributor("background","background-color",{scope:i.default.Scope.INLINE});e.BackgroundClass=a,e.BackgroundStyle=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DirectionStyle=e.DirectionClass=e.DirectionAttribute=void 0;var r,i=(r=n(0))&&r.__esModule?r:{default:r},o={scope:i.default.Scope.BLOCK,whitelist:["rtl"]},a=new i.default.Attributor.Attribute("direction","dir",o),s=new i.default.Attributor.Class("direction","ql-direction",o),u=new i.default.Attributor.Style("direction","direction",o);e.DirectionAttribute=a,e.DirectionClass=s,e.DirectionStyle=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FontClass=e.FontStyle=void 0;var r,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=(r=n(0))&&r.__esModule?r:{default:r},s={scope:a.default.Scope.INLINE,whitelist:["serif","monospace"]},u=new a.default.Attributor.Class("font","ql-font",s),l=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"value",value:function(t){return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"value",this).call(this,t).replace(/["']/g,"")}}]),e}(a.default.Attributor.Style),c=new l("font","font-family",s);e.FontStyle=c,e.FontClass=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SizeStyle=e.SizeClass=void 0;var r,i=(r=n(0))&&r.__esModule?r:{default:r},o=new i.default.Attributor.Class("size","ql-size",{scope:i.default.Scope.INLINE,whitelist:["small","large","huge"]}),a=new i.default.Attributor.Style("size","font-size",{scope:i.default.Scope.INLINE,whitelist:["10px","18px","32px"]});e.SizeClass=o,e.SizeStyle=a},function(t,e,n){"use strict";t.exports={align:{"":n(76),center:n(77),right:n(78),justify:n(79)},background:n(80),blockquote:n(81),bold:n(82),clean:n(83),code:n(58),"code-block":n(58),color:n(84),direction:{"":n(85),rtl:n(86)},float:{center:n(87),full:n(88),left:n(89),right:n(90)},formula:n(91),header:{1:n(92),2:n(93)},italic:n(94),image:n(95),indent:{"+1":n(96),"-1":n(97)},link:n(98),list:{ordered:n(99),bullet:n(100),check:n(101)},script:{sub:n(102),super:n(103)},strike:n(104),underline:n(105),video:n(106)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLastChangeIndex=e.default=void 0;var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=a(n(0)),o=a(n(5));function a(t){return t&&t.__esModule?t:{default:t}}var s=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.lastRecorded=0,r.ignoreChange=!1,r.clear(),r.quill.on(o.default.events.EDITOR_CHANGE,(function(t,e,n,i){t!==o.default.events.TEXT_CHANGE||r.ignoreChange||(r.options.userOnly&&i!==o.default.sources.USER?r.transform(e):r.record(e,n))})),r.quill.keyboard.addBinding({key:"Z",shortKey:!0},r.undo.bind(r)),r.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},r.redo.bind(r)),/Win/i.test(navigator.platform)&&r.quill.keyboard.addBinding({key:"Y",shortKey:!0},r.redo.bind(r)),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"change",value:function(t,e){if(0!==this.stack[t].length){var n=this.stack[t].pop();this.stack[e].push(n),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n[t],o.default.sources.USER),this.ignoreChange=!1;var r=u(n[t]);this.quill.setSelection(r)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(t,e){if(0!==t.ops.length){this.stack.redo=[];var n=this.quill.getContents().diff(e),r=Date.now();if(this.lastRecorded+this.options.delay>r&&this.stack.undo.length>0){var i=this.stack.undo.pop();n=n.compose(i.undo),t=i.redo.compose(t)}else this.lastRecorded=r;this.stack.undo.push({redo:t,undo:n}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(t){this.stack.undo.forEach((function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)})),this.stack.redo.forEach((function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)}))}},{key:"undo",value:function(){this.change("undo","redo")}}]),e}(a(n(9)).default);function u(t){var e=t.reduce((function(t,e){return t+(e.delete||0)}),0),n=t.length()-e;return function(t){var e=t.ops[t.ops.length-1];return null!=e&&(null!=e.insert?"string"==typeof e.insert&&e.insert.endsWith("\n"):null!=e.attributes&&Object.keys(e.attributes).some((function(t){return null!=i.default.query(t,i.default.Scope.BLOCK)})))}(t)&&(n-=1),n}s.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},e.default=s,e.getLastChangeIndex=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BaseTooltip=void 0;var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=p(n(3)),a=p(n(2)),s=p(n(8)),u=p(n(23)),l=p(n(34)),c=p(n(59)),f=p(n(60)),h=p(n(28)),d=p(n(61));function p(t){return t&&t.__esModule?t:{default:t}}function m(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function g(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function v(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var y=[!1,"center","right","justify"],b=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],x=[!1,"serif","monospace"],w=["1","2","3",!1],_=["small",!1,"large","huge"],S=function(t){function e(t,n){m(this,e);var r=g(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return t.emitter.listenDOM("click",document.body,(function e(n){if(!document.body.contains(t.root))return document.body.removeEventListener("click",e);null==r.tooltip||r.tooltip.root.contains(n.target)||document.activeElement===r.tooltip.textbox||r.quill.hasFocus()||r.tooltip.hide(),null!=r.pickers&&r.pickers.forEach((function(t){t.container.contains(n.target)||t.close()}))})),r}return v(e,t),r(e,[{key:"addModule",value:function(t){var n=i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"addModule",this).call(this,t);return"toolbar"===t&&this.extendToolbar(n),n}},{key:"buildButtons",value:function(t,e){t.forEach((function(t){(t.getAttribute("class")||"").split(/\s+/).forEach((function(n){if(n.startsWith("ql-")&&(n=n.slice(3),null!=e[n]))if("direction"===n)t.innerHTML=e[n][""]+e[n].rtl;else if("string"==typeof e[n])t.innerHTML=e[n];else{var r=t.value||"";null!=r&&e[n][r]&&(t.innerHTML=e[n][r])}}))}))}},{key:"buildPickers",value:function(t,e){var n=this;this.pickers=t.map((function(t){if(t.classList.contains("ql-align"))return null==t.querySelector("option")&&N(t,y),new f.default(t,e.align);if(t.classList.contains("ql-background")||t.classList.contains("ql-color")){var n=t.classList.contains("ql-background")?"background":"color";return null==t.querySelector("option")&&N(t,b,"background"===n?"#ffffff":"#000000"),new c.default(t,e[n])}return null==t.querySelector("option")&&(t.classList.contains("ql-font")?N(t,x):t.classList.contains("ql-header")?N(t,w):t.classList.contains("ql-size")&&N(t,_)),new h.default(t)})),this.quill.on(s.default.events.EDITOR_CHANGE,(function(){n.pickers.forEach((function(t){t.update()}))}))}}]),e}(l.default);S.DEFAULTS=(0,o.default)(!0,{},l.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var t=this,e=this.container.querySelector("input.ql-image[type=file]");null==e&&((e=document.createElement("input")).setAttribute("type","file"),e.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),e.classList.add("ql-image"),e.addEventListener("change",(function(){if(null!=e.files&&null!=e.files[0]){var n=new FileReader;n.onload=function(n){var r=t.quill.getSelection(!0);t.quill.updateContents((new a.default).retain(r.index).delete(r.length).insert({image:n.target.result}),s.default.sources.USER),t.quill.setSelection(r.index+1,s.default.sources.SILENT),e.value=""},n.readAsDataURL(e.files[0])}})),this.container.appendChild(e)),e.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var O=function(t){function e(t,n){m(this,e);var r=g(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.textbox=r.root.querySelector('input[type="text"]'),r.listen(),r}return v(e,t),r(e,[{key:"listen",value:function(){var t=this;this.textbox.addEventListener("keydown",(function(e){u.default.match(e,"enter")?(t.save(),e.preventDefault()):u.default.match(e,"escape")&&(t.cancel(),e.preventDefault())}))}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"link",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null!=e?this.textbox.value=e:t!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+t)||""),this.root.setAttribute("data-mode",t)}},{key:"restoreFocus",value:function(){var t=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=t}},{key:"save",value:function(){var t,e,n=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":var r=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",n,s.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",n,s.default.sources.USER)),this.quill.root.scrollTop=r;break;case"video":n=(e=(t=n).match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/))?(e[1]||"https")+"://www.youtube.com/embed/"+e[2]+"?showinfo=0":(e=t.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(e[1]||"https")+"://player.vimeo.com/video/"+e[2]+"/":t;case"formula":if(!n)break;var i=this.quill.getSelection(!0);if(null!=i){var o=i.index+i.length;this.quill.insertEmbed(o,this.root.getAttribute("data-mode"),n,s.default.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(o+1," ",s.default.sources.USER),this.quill.setSelection(o+2,s.default.sources.USER)}}this.textbox.value="",this.hide()}}]),e}(d.default);function N(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e.forEach((function(e){var r=document.createElement("option");e===n?r.setAttribute("selected","selected"):r.setAttribute("value",e),t.appendChild(r)}))}e.BaseTooltip=O,e.default=S},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(){this.head=this.tail=null,this.length=0}return t.prototype.append=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.insertBefore(t[0],null),t.length>1&&this.append.apply(this,t.slice(1))},t.prototype.contains=function(t){for(var e,n=this.iterator();e=n();)if(e===t)return!0;return!1},t.prototype.insertBefore=function(t,e){t&&(t.next=e,null!=e?(t.prev=e.prev,null!=e.prev&&(e.prev.next=t),e.prev=t,e===this.head&&(this.head=t)):null!=this.tail?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)},t.prototype.offset=function(t){for(var e=0,n=this.head;null!=n;){if(n===t)return e;e+=n.length(),n=n.next}return-1},t.prototype.remove=function(t){this.contains(t)&&(null!=t.prev&&(t.prev.next=t.next),null!=t.next&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)},t.prototype.iterator=function(t){return void 0===t&&(t=this.head),function(){var e=t;return null!=t&&(t=t.next),e}},t.prototype.find=function(t,e){void 0===e&&(e=!1);for(var n,r=this.iterator();n=r();){var i=n.length();if(t<i||e&&t===i&&(null==n.next||0!==n.next.length()))return[n,t];t-=i}return[null,0]},t.prototype.forEach=function(t){for(var e,n=this.iterator();e=n();)t(e)},t.prototype.forEachAt=function(t,e,n){if(!(e<=0))for(var r,i=this.find(t),o=i[0],a=t-i[1],s=this.iterator(o);(r=s())&&a<t+e;){var u=r.length();t>a?n(r,t-a,Math.min(e,a+u-t)):n(r,0,Math.min(u,t+e-a)),a+=u}},t.prototype.map=function(t){return this.reduce((function(e,n){return e.push(t(n)),e}),[])},t.prototype.reduce=function(t,e){for(var n,r=this.iterator();n=r();)e=t(e,n);return e},t}();e.default=r},function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(17),a=n(1),s={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},u=function(t){function e(e){var n=t.call(this,e)||this;return n.scroll=n,n.observer=new MutationObserver((function(t){n.update(t)})),n.observer.observe(n.domNode,s),n.attach(),n}return i(e,t),e.prototype.detach=function(){t.prototype.detach.call(this),this.observer.disconnect()},e.prototype.deleteAt=function(e,n){this.update(),0===e&&n===this.length()?this.children.forEach((function(t){t.remove()})):t.prototype.deleteAt.call(this,e,n)},e.prototype.formatAt=function(e,n,r,i){this.update(),t.prototype.formatAt.call(this,e,n,r,i)},e.prototype.insertAt=function(e,n,r){this.update(),t.prototype.insertAt.call(this,e,n,r)},e.prototype.optimize=function(e,n){var r=this;void 0===e&&(e=[]),void 0===n&&(n={}),t.prototype.optimize.call(this,n);for(var i=[].slice.call(this.observer.takeRecords());i.length>0;)e.push(i.pop());for(var s=function(t,e){void 0===e&&(e=!0),null!=t&&t!==r&&null!=t.domNode.parentNode&&(null==t.domNode[a.DATA_KEY].mutations&&(t.domNode[a.DATA_KEY].mutations=[]),e&&s(t.parent))},u=function(t){null!=t.domNode[a.DATA_KEY]&&null!=t.domNode[a.DATA_KEY].mutations&&(t instanceof o.default&&t.children.forEach(u),t.optimize(n))},l=e,c=0;l.length>0;c+=1){if(c>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(l.forEach((function(t){var e=a.find(t.target,!0);null!=e&&(e.domNode===t.target&&("childList"===t.type?(s(a.find(t.previousSibling,!1)),[].forEach.call(t.addedNodes,(function(t){var e=a.find(t,!1);s(e,!1),e instanceof o.default&&e.children.forEach((function(t){s(t,!1)}))}))):"attributes"===t.type&&s(e.prev)),s(e))})),this.children.forEach(u),i=(l=[].slice.call(this.observer.takeRecords())).slice();i.length>0;)e.push(i.pop())}},e.prototype.update=function(e,n){var r=this;void 0===n&&(n={}),(e=e||this.observer.takeRecords()).map((function(t){var e=a.find(t.target,!0);return null==e?null:null==e.domNode[a.DATA_KEY].mutations?(e.domNode[a.DATA_KEY].mutations=[t],e):(e.domNode[a.DATA_KEY].mutations.push(t),null)})).forEach((function(t){null!=t&&t!==r&&null!=t.domNode[a.DATA_KEY]&&t.update(t.domNode[a.DATA_KEY].mutations||[],n)})),null!=this.domNode[a.DATA_KEY].mutations&&t.prototype.update.call(this,this.domNode[a.DATA_KEY].mutations,n),this.optimize(e,n)},e.blotName="scroll",e.defaultChild="block",e.scope=a.Scope.BLOCK_BLOT,e.tagName="DIV",e}(o.default);e.default=u},function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(18),a=n(1),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.formats=function(n){if(n.tagName!==e.tagName)return t.formats.call(this,n)},e.prototype.format=function(n,r){var i=this;n!==this.statics.blotName||r?t.prototype.format.call(this,n,r):(this.children.forEach((function(t){t instanceof o.default||(t=t.wrap(e.blotName,!0)),i.attributes.copy(t)})),this.unwrap())},e.prototype.formatAt=function(e,n,r,i){null!=this.formats()[r]||a.query(r,a.Scope.ATTRIBUTE)?this.isolate(e,n).format(r,i):t.prototype.formatAt.call(this,e,n,r,i)},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n);var r=this.formats();if(0===Object.keys(r).length)return this.unwrap();var i=this.next;i instanceof e&&i.prev===this&&function(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n in t)if(t[n]!==e[n])return!1;return!0}(r,i.formats())&&(i.moveChildren(this),i.remove())},e.blotName="inline",e.scope=a.Scope.INLINE_BLOT,e.tagName="SPAN",e}(o.default);e.default=s},function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(18),a=n(1),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.formats=function(n){var r=a.query(e.blotName).tagName;if(n.tagName!==r)return t.formats.call(this,n)},e.prototype.format=function(n,r){null!=a.query(n,a.Scope.BLOCK)&&(n!==this.statics.blotName||r?t.prototype.format.call(this,n,r):this.replaceWith(e.blotName))},e.prototype.formatAt=function(e,n,r,i){null!=a.query(r,a.Scope.BLOCK)?this.format(r,i):t.prototype.formatAt.call(this,e,n,r,i)},e.prototype.insertAt=function(e,n,r){if(null==r||null!=a.query(n,a.Scope.INLINE))t.prototype.insertAt.call(this,e,n,r);else{var i=this.split(e),o=a.create(n,r);i.parent.insertBefore(o,i)}},e.prototype.update=function(e,n){navigator.userAgent.match(/Trident/)?this.build():t.prototype.update.call(this,e,n)},e.blotName="block",e.scope=a.Scope.BLOCK_BLOT,e.tagName="P",e}(o.default);e.default=s},function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.formats=function(t){},e.prototype.format=function(e,n){t.prototype.formatAt.call(this,0,this.length(),e,n)},e.prototype.formatAt=function(e,n,r,i){0===e&&n===this.length()?this.format(r,i):t.prototype.formatAt.call(this,e,n,r,i)},e.prototype.formats=function(){return this.statics.formats(this.domNode)},e}(n(19).default);e.default=o},function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(19),a=n(1),s=function(t){function e(e){var n=t.call(this,e)||this;return n.text=n.statics.value(n.domNode),n}return i(e,t),e.create=function(t){return document.createTextNode(t)},e.value=function(t){var e=t.data;return e.normalize&&(e=e.normalize()),e},e.prototype.deleteAt=function(t,e){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+e)},e.prototype.index=function(t,e){return this.domNode===t?e:-1},e.prototype.insertAt=function(e,n,r){null==r?(this.text=this.text.slice(0,e)+n+this.text.slice(e),this.domNode.data=this.text):t.prototype.insertAt.call(this,e,n,r)},e.prototype.length=function(){return this.text.length},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof e&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},e.prototype.position=function(t,e){return void 0===e&&(e=!1),[this.domNode,t]},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=a.create(this.domNode.splitText(t));return this.parent.insertBefore(n,this.next),this.text=this.statics.value(this.domNode),n},e.prototype.update=function(t,e){var n=this;t.some((function(t){return"characterData"===t.type&&t.target===n.domNode}))&&(this.text=this.statics.value(this.domNode))},e.prototype.value=function(){return this.text},e.blotName="text",e.scope=a.Scope.INLINE_BLOT,e}(o.default);e.default=s},function(t,e,n){"use strict";var r=document.createElement("div");if(r.classList.toggle("test-class",!1),r.classList.contains("test-class")){var i=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return arguments.length>1&&!this.contains(t)==!e?e:i.call(this,t)}}String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return e=e||0,this.substr(e,t.length)===t}),String.prototype.endsWith||(String.prototype.endsWith=function(t,e){var n=this.toString();("number"!=typeof e||!isFinite(e)||Math.floor(e)!==e||e>n.length)&&(e=n.length),e-=t.length;var r=n.indexOf(t,e);return-1!==r&&r===e}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var e,n=Object(this),r=n.length>>>0,i=arguments[1],o=0;o<r;o++)if(e=n[o],t.call(i,e,o,n))return e}}),document.addEventListener("DOMContentLoaded",(function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)}))},function(t,e){var n=-1,r=1,i=0;function o(t,e,c){if(t==e)return t?[[i,t]]:[];(c<0||t.length<c)&&(c=null);var h=s(t,e),d=t.substring(0,h);h=u(t=t.substring(h),e=e.substring(h));var p=t.substring(t.length-h),m=function(t,e){var l;if(!t)return[[r,e]];if(!e)return[[n,t]];var c=t.length>e.length?t:e,f=t.length>e.length?e:t,h=c.indexOf(f);if(-1!=h)return l=[[r,c.substring(0,h)],[i,f],[r,c.substring(h+f.length)]],t.length>e.length&&(l[0][0]=l[2][0]=n),l;if(1==f.length)return[[n,t],[r,e]];var d=function(t,e){var n=t.length>e.length?t:e,r=t.length>e.length?e:t;if(n.length<4||2*r.length<n.length)return null;function i(t,e,n){for(var r,i,o,a,l=t.substring(n,n+Math.floor(t.length/4)),c=-1,f="";-1!=(c=e.indexOf(l,c+1));){var h=s(t.substring(n),e.substring(c)),d=u(t.substring(0,n),e.substring(0,c));f.length<d+h&&(f=e.substring(c-d,c)+e.substring(c,c+h),r=t.substring(0,n-d),i=t.substring(n+h),o=e.substring(0,c-d),a=e.substring(c+h))}return 2*f.length>=t.length?[r,i,o,a,f]:null}var o,a,l,c,f,h=i(n,r,Math.ceil(n.length/4)),d=i(n,r,Math.ceil(n.length/2));return h||d?(o=d?h&&h[4].length>d[4].length?h:d:h,t.length>e.length?(a=o[0],l=o[1],c=o[2],f=o[3]):(c=o[0],f=o[1],a=o[2],l=o[3]),[a,l,c,f,o[4]]):null}(t,e);if(d){var p=d[0],m=d[1],g=d[2],v=d[3],y=d[4],b=o(p,g),x=o(m,v);return b.concat([[i,y]],x)}return function(t,e){for(var i=t.length,o=e.length,s=Math.ceil((i+o)/2),u=s,l=2*s,c=new Array(l),f=new Array(l),h=0;h<l;h++)c[h]=-1,f[h]=-1;c[u+1]=0,f[u+1]=0;for(var d=i-o,p=d%2!=0,m=0,g=0,v=0,y=0,b=0;b<s;b++){for(var x=-b+m;x<=b-g;x+=2){for(var w=u+x,_=(E=x==-b||x!=b&&c[w-1]<c[w+1]?c[w+1]:c[w-1]+1)-x;E<i&&_<o&&t.charAt(E)==e.charAt(_);)E++,_++;if(c[w]=E,E>i)g+=2;else if(_>o)m+=2;else if(p&&(N=u+d-x)>=0&&N<l&&-1!=f[N]&&E>=(O=i-f[N]))return a(t,e,E,_)}for(var S=-b+v;S<=b-y;S+=2){for(var O,N=u+S,M=(O=S==-b||S!=b&&f[N-1]<f[N+1]?f[N+1]:f[N-1]+1)-S;O<i&&M<o&&t.charAt(i-O-1)==e.charAt(o-M-1);)O++,M++;if(f[N]=O,O>i)y+=2;else if(M>o)v+=2;else if(!p){var E;if((w=u+d-S)>=0&&w<l&&-1!=c[w]&&(_=u+(E=c[w])-w,E>=(O=i-O)))return a(t,e,E,_)}}}return[[n,t],[r,e]]}(t,e)}(t=t.substring(0,t.length-h),e=e.substring(0,e.length-h));return d&&m.unshift([i,d]),p&&m.push([i,p]),l(m),null!=c&&(m=function(t,e){var r=function(t,e){if(0===e)return[i,t];for(var r=0,o=0;o<t.length;o++){var a=t[o];if(a[0]===n||a[0]===i){var s=r+a[1].length;if(e===s)return[o+1,t];if(e<s){t=t.slice();var u=e-r,l=[a[0],a[1].slice(0,u)],c=[a[0],a[1].slice(u)];return t.splice(o,1,l,c),[o+1,t]}r=s}}throw new Error("cursor_pos is out of bounds!")}(t,e),o=r[1],a=r[0],s=o[a],u=o[a+1];if(null==s)return t;if(s[0]!==i)return t;if(null!=u&&s[1]+u[1]===u[1]+s[1])return o.splice(a,2,u,s),f(o,a,2);if(null!=u&&0===u[1].indexOf(s[1])){o.splice(a,2,[u[0],s[1]],[0,s[1]]);var l=u[1].slice(s[1].length);return l.length>0&&o.splice(a+2,0,[u[0],l]),f(o,a,3)}return t}(m,c)),function(t){for(var e=!1,o=function(t){return t.charCodeAt(0)>=56320&&t.charCodeAt(0)<=57343},a=2;a<t.length;a+=1)t[a-2][0]===i&&((s=t[a-2][1]).charCodeAt(s.length-1)>=55296&&s.charCodeAt(s.length-1)<=56319)&&t[a-1][0]===n&&o(t[a-1][1])&&t[a][0]===r&&o(t[a][1])&&(e=!0,t[a-1][1]=t[a-2][1].slice(-1)+t[a-1][1],t[a][1]=t[a-2][1].slice(-1)+t[a][1],t[a-2][1]=t[a-2][1].slice(0,-1));var s;if(!e)return t;var u=[];for(a=0;a<t.length;a+=1)t[a][1].length>0&&u.push(t[a]);return u}(m)}function a(t,e,n,r){var i=t.substring(0,n),a=e.substring(0,r),s=t.substring(n),u=e.substring(r),l=o(i,a),c=o(s,u);return l.concat(c)}function s(t,e){if(!t||!e||t.charAt(0)!=e.charAt(0))return 0;for(var n=0,r=Math.min(t.length,e.length),i=r,o=0;n<i;)t.substring(o,i)==e.substring(o,i)?o=n=i:r=i,i=Math.floor((r-n)/2+n);return i}function u(t,e){if(!t||!e||t.charAt(t.length-1)!=e.charAt(e.length-1))return 0;for(var n=0,r=Math.min(t.length,e.length),i=r,o=0;n<i;)t.substring(t.length-i,t.length-o)==e.substring(e.length-i,e.length-o)?o=n=i:r=i,i=Math.floor((r-n)/2+n);return i}function l(t){t.push([i,""]);for(var e,o=0,a=0,c=0,f="",h="";o<t.length;)switch(t[o][0]){case r:c++,h+=t[o][1],o++;break;case n:a++,f+=t[o][1],o++;break;case i:a+c>1?(0!==a&&0!==c&&(0!==(e=s(h,f))&&(o-a-c>0&&t[o-a-c-1][0]==i?t[o-a-c-1][1]+=h.substring(0,e):(t.splice(0,0,[i,h.substring(0,e)]),o++),h=h.substring(e),f=f.substring(e)),0!==(e=u(h,f))&&(t[o][1]=h.substring(h.length-e)+t[o][1],h=h.substring(0,h.length-e),f=f.substring(0,f.length-e))),0===a?t.splice(o-c,a+c,[r,h]):0===c?t.splice(o-a,a+c,[n,f]):t.splice(o-a-c,a+c,[n,f],[r,h]),o=o-a-c+(a?1:0)+(c?1:0)+1):0!==o&&t[o-1][0]==i?(t[o-1][1]+=t[o][1],t.splice(o,1)):o++,c=0,a=0,f="",h=""}""===t[t.length-1][1]&&t.pop();var d=!1;for(o=1;o<t.length-1;)t[o-1][0]==i&&t[o+1][0]==i&&(t[o][1].substring(t[o][1].length-t[o-1][1].length)==t[o-1][1]?(t[o][1]=t[o-1][1]+t[o][1].substring(0,t[o][1].length-t[o-1][1].length),t[o+1][1]=t[o-1][1]+t[o+1][1],t.splice(o-1,1),d=!0):t[o][1].substring(0,t[o+1][1].length)==t[o+1][1]&&(t[o-1][1]+=t[o+1][1],t[o][1]=t[o][1].substring(t[o+1][1].length)+t[o+1][1],t.splice(o+1,1),d=!0)),o++;d&&l(t)}var c=o;function f(t,e,n){for(var r=e+n-1;r>=0&&r>=e-1;r--)if(r+1<t.length){var i=t[r],o=t[r+1];i[0]===o[1]&&t.splice(r,2,[i[0],i[1]+o[1]])}return t}c.INSERT=r,c.DELETE=n,c.EQUAL=i,t.exports=c},function(t,e){function n(t){var e=[];for(var n in t)e.push(n);return e}(t.exports="function"==typeof Object.keys?Object.keys:n).shim=n},function(t,e){var n="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();function r(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function i(t){return t&&"object"==typeof t&&"number"==typeof t.length&&Object.prototype.hasOwnProperty.call(t,"callee")&&!Object.prototype.propertyIsEnumerable.call(t,"callee")||!1}(e=t.exports=n?r:i).supported=r,e.unsupported=i},function(t,e){"use strict";var n=Object.prototype.hasOwnProperty,r="~";function i(){}function o(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function a(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(r=!1)),a.prototype.eventNames=function(){var t,e,i=[];if(0===this._eventsCount)return i;for(e in t=this._events)n.call(t,e)&&i.push(r?e.slice(1):e);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},a.prototype.listeners=function(t,e){var n=r?r+t:t,i=this._events[n];if(e)return!!i;if(!i)return[];if(i.fn)return[i.fn];for(var o=0,a=i.length,s=new Array(a);o<a;o++)s[o]=i[o].fn;return s},a.prototype.emit=function(t,e,n,i,o,a){var s=r?r+t:t;if(!this._events[s])return!1;var u,l,c=this._events[s],f=arguments.length;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),f){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,n),!0;case 4:return c.fn.call(c.context,e,n,i),!0;case 5:return c.fn.call(c.context,e,n,i,o),!0;case 6:return c.fn.call(c.context,e,n,i,o,a),!0}for(l=1,u=new Array(f-1);l<f;l++)u[l-1]=arguments[l];c.fn.apply(c.context,u)}else{var h,d=c.length;for(l=0;l<d;l++)switch(c[l].once&&this.removeListener(t,c[l].fn,void 0,!0),f){case 1:c[l].fn.call(c[l].context);break;case 2:c[l].fn.call(c[l].context,e);break;case 3:c[l].fn.call(c[l].context,e,n);break;case 4:c[l].fn.call(c[l].context,e,n,i);break;default:if(!u)for(h=1,u=new Array(f-1);h<f;h++)u[h-1]=arguments[h];c[l].fn.apply(c[l].context,u)}}return!0},a.prototype.on=function(t,e,n){var i=new o(e,n||this),a=r?r+t:t;return this._events[a]?this._events[a].fn?this._events[a]=[this._events[a],i]:this._events[a].push(i):(this._events[a]=i,this._eventsCount++),this},a.prototype.once=function(t,e,n){var i=new o(e,n||this,!0),a=r?r+t:t;return this._events[a]?this._events[a].fn?this._events[a]=[this._events[a],i]:this._events[a].push(i):(this._events[a]=i,this._eventsCount++),this},a.prototype.removeListener=function(t,e,n,o){var a=r?r+t:t;if(!this._events[a])return this;if(!e)return 0==--this._eventsCount?this._events=new i:delete this._events[a],this;var s=this._events[a];if(s.fn)s.fn!==e||o&&!s.once||n&&s.context!==n||(0==--this._eventsCount?this._events=new i:delete this._events[a]);else{for(var u=0,l=[],c=s.length;u<c;u++)(s[u].fn!==e||o&&!s[u].once||n&&s[u].context!==n)&&l.push(s[u]);l.length?this._events[a]=1===l.length?l[0]:l:0==--this._eventsCount?this._events=new i:delete this._events[a]}return this},a.prototype.removeAllListeners=function(t){var e;return t?(e=r?r+t:t,this._events[e]&&(0==--this._eventsCount?this._events=new i:delete this._events[e])):(this._events=new i,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prototype.setMaxListeners=function(){return this},a.prefixed=r,a.EventEmitter=a,void 0!==t&&(t.exports=a)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.matchText=e.matchSpacing=e.matchNewline=e.matchBlot=e.matchAttributor=e.default=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=b(n(3)),s=b(n(2)),u=b(n(0)),l=b(n(5)),c=b(n(10)),f=b(n(9)),h=n(36),d=n(37),p=b(n(13)),m=n(26),g=n(38),v=n(39),y=n(40);function b(t){return t&&t.__esModule?t:{default:t}}function x(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var w=(0,c.default)("quill:clipboard"),_="__ql-matcher",S=[[Node.TEXT_NODE,L],[Node.TEXT_NODE,I],["br",function(t,e){return C(e,"\n")||e.insert("\n"),e}],[Node.ELEMENT_NODE,I],[Node.ELEMENT_NODE,P],[Node.ELEMENT_NODE,R],[Node.ELEMENT_NODE,j],[Node.ELEMENT_NODE,function(t,e){var n={},r=t.style||{};return r.fontStyle&&"italic"===k(t).fontStyle&&(n.italic=!0),r.fontWeight&&(k(t).fontWeight.startsWith("bold")||parseInt(k(t).fontWeight)>=700)&&(n.bold=!0),Object.keys(n).length>0&&(e=E(e,n)),parseFloat(r.textIndent||0)>0&&(e=(new s.default).insert("\t").concat(e)),e}],["li",function(t,e){var n=u.default.query(t);if(null==n||"list-item"!==n.blotName||!C(e,"\n"))return e;for(var r=-1,i=t.parentNode;!i.classList.contains("ql-clipboard");)"list"===(u.default.query(i)||{}).blotName&&(r+=1),i=i.parentNode;return r<=0?e:e.compose((new s.default).retain(e.length()-1).retain(1,{indent:r}))}],["b",A.bind(A,"bold")],["i",A.bind(A,"italic")],["style",function(){return new s.default}]],O=[h.AlignAttribute,g.DirectionAttribute].reduce((function(t,e){return t[e.keyName]=e,t}),{}),N=[h.AlignStyle,d.BackgroundStyle,m.ColorStyle,g.DirectionStyle,v.FontStyle,y.SizeStyle].reduce((function(t,e){return t[e.keyName]=e,t}),{}),M=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.quill.root.addEventListener("paste",r.onPaste.bind(r)),r.container=r.quill.addContainer("ql-clipboard"),r.container.setAttribute("contenteditable",!0),r.container.setAttribute("tabindex",-1),r.matchers=[],S.concat(r.options.matchers).forEach((function(t){var e=i(t,2),o=e[0],a=e[1];(n.matchVisual||a!==R)&&r.addMatcher(o,a)})),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"addMatcher",value:function(t,e){this.matchers.push([t,e])}},{key:"convert",value:function(t){if("string"==typeof t)return this.container.innerHTML=t.replace(/\>\r?\n +\</g,"><"),this.convert();var e=this.quill.getFormat(this.quill.selection.savedRange.index);if(e[p.default.blotName]){var n=this.container.innerText;return this.container.innerHTML="",(new s.default).insert(n,x({},p.default.blotName,e[p.default.blotName]))}var r=this.prepareMatching(),o=i(r,2),a=o[0],u=o[1],l=D(this.container,a,u);return C(l,"\n")&&null==l.ops[l.ops.length-1].attributes&&(l=l.compose((new s.default).retain(l.length()-1).delete(1))),w.log("convert",this.container.innerHTML,l),this.container.innerHTML="",l}},{key:"dangerouslyPasteHTML",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default.sources.API;if("string"==typeof t)this.quill.setContents(this.convert(t),e),this.quill.setSelection(0,l.default.sources.SILENT);else{var r=this.convert(e);this.quill.updateContents((new s.default).retain(t).concat(r),n),this.quill.setSelection(t+r.length(),l.default.sources.SILENT)}}},{key:"onPaste",value:function(t){var e=this;if(!t.defaultPrevented&&this.quill.isEnabled()){var n=this.quill.getSelection(),r=(new s.default).retain(n.index),i=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(l.default.sources.SILENT),setTimeout((function(){r=r.concat(e.convert()).delete(n.length),e.quill.updateContents(r,l.default.sources.USER),e.quill.setSelection(r.length()-n.length,l.default.sources.SILENT),e.quill.scrollingContainer.scrollTop=i,e.quill.focus()}),1)}}},{key:"prepareMatching",value:function(){var t=this,e=[],n=[];return this.matchers.forEach((function(r){var o=i(r,2),a=o[0],s=o[1];switch(a){case Node.TEXT_NODE:n.push(s);break;case Node.ELEMENT_NODE:e.push(s);break;default:[].forEach.call(t.container.querySelectorAll(a),(function(t){t[_]=t[_]||[],t[_].push(s)}))}})),[e,n]}}]),e}(f.default);function E(t,e,n){return"object"===(void 0===e?"undefined":r(e))?Object.keys(e).reduce((function(t,n){return E(t,n,e[n])}),t):t.reduce((function(t,r){return r.attributes&&r.attributes[e]?t.push(r):t.insert(r.insert,(0,a.default)({},x({},e,n),r.attributes))}),new s.default)}function k(t){if(t.nodeType!==Node.ELEMENT_NODE)return{};var e="__ql-computed-style";return t[e]||(t[e]=window.getComputedStyle(t))}function C(t,e){for(var n="",r=t.ops.length-1;r>=0&&n.length<e.length;--r){var i=t.ops[r];if("string"!=typeof i.insert)break;n=i.insert+n}return n.slice(-1*e.length)===e}function T(t){if(0===t.childNodes.length)return!1;var e=k(t);return["block","list-item"].indexOf(e.display)>-1}function D(t,e,n){return t.nodeType===t.TEXT_NODE?n.reduce((function(e,n){return n(t,e)}),new s.default):t.nodeType===t.ELEMENT_NODE?[].reduce.call(t.childNodes||[],(function(r,i){var o=D(i,e,n);return i.nodeType===t.ELEMENT_NODE&&(o=e.reduce((function(t,e){return e(i,t)}),o),o=(i[_]||[]).reduce((function(t,e){return e(i,t)}),o)),r.concat(o)}),new s.default):new s.default}function A(t,e,n){return E(n,t,!0)}function j(t,e){var n=u.default.Attributor.Attribute.keys(t),r=u.default.Attributor.Class.keys(t),i=u.default.Attributor.Style.keys(t),o={};return n.concat(r).concat(i).forEach((function(e){var n=u.default.query(e,u.default.Scope.ATTRIBUTE);null!=n&&(o[n.attrName]=n.value(t),o[n.attrName])||(null==(n=O[e])||n.attrName!==e&&n.keyName!==e||(o[n.attrName]=n.value(t)||void 0),null==(n=N[e])||n.attrName!==e&&n.keyName!==e||(n=N[e],o[n.attrName]=n.value(t)||void 0))})),Object.keys(o).length>0&&(e=E(e,o)),e}function P(t,e){var n=u.default.query(t);if(null==n)return e;if(n.prototype instanceof u.default.Embed){var r={},i=n.value(t);null!=i&&(r[n.blotName]=i,e=(new s.default).insert(r,n.formats(t)))}else"function"==typeof n.formats&&(e=E(e,n.blotName,n.formats(t)));return e}function I(t,e){return C(e,"\n")||(T(t)||e.length()>0&&t.nextSibling&&T(t.nextSibling))&&e.insert("\n"),e}function R(t,e){if(T(t)&&null!=t.nextElementSibling&&!C(e,"\n\n")){var n=t.offsetHeight+parseFloat(k(t).marginTop)+parseFloat(k(t).marginBottom);t.nextElementSibling.offsetTop>t.offsetTop+1.5*n&&e.insert("\n")}return e}function L(t,e){var n=t.data;if("O:P"===t.parentNode.tagName)return e.insert(n.trim());if(0===n.trim().length&&t.parentNode.classList.contains("ql-clipboard"))return e;if(!k(t.parentNode).whiteSpace.startsWith("pre")){var r=function(t,e){return(e=e.replace(/[^\u00a0]/g,"")).length<1&&t?" ":e};n=(n=n.replace(/\r\n/g," ").replace(/\n/g," ")).replace(/\s\s+/g,r.bind(r,!0)),(null==t.previousSibling&&T(t.parentNode)||null!=t.previousSibling&&T(t.previousSibling))&&(n=n.replace(/^\s+/,r.bind(r,!1))),(null==t.nextSibling&&T(t.parentNode)||null!=t.nextSibling&&T(t.nextSibling))&&(n=n.replace(/\s+$/,r.bind(r,!1)))}return e.insert(n)}M.DEFAULTS={matchers:[],matchVisual:!0},e.default=M,e.matchAttributor=j,e.matchBlot=P,e.matchNewline=I,e.matchSpacing=R,e.matchText=L},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"optimize",value:function(t){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),e}(((r=n(6))&&r.__esModule?r:{default:r}).default);a.blotName="bold",a.tagName=["STRONG","B"],e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.addControls=e.default=void 0;var r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=c(n(2)),a=c(n(0)),s=c(n(5)),u=c(n(10)),l=c(n(9));function c(t){return t&&t.__esModule?t:{default:t}}function f(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var h=(0,u.default)("quill:toolbar"),d=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i,o=f(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if(Array.isArray(o.options.container)){var a=document.createElement("div");m(a,o.options.container),t.container.parentNode.insertBefore(a,t.container),o.container=a}else"string"==typeof o.options.container?o.container=document.querySelector(o.options.container):o.container=o.options.container;return o.container instanceof HTMLElement?(o.container.classList.add("ql-toolbar"),o.controls=[],o.handlers={},Object.keys(o.options.handlers).forEach((function(t){o.addHandler(t,o.options.handlers[t])})),[].forEach.call(o.container.querySelectorAll("button, select"),(function(t){o.attach(t)})),o.quill.on(s.default.events.EDITOR_CHANGE,(function(t,e){t===s.default.events.SELECTION_CHANGE&&o.update(e)})),o.quill.on(s.default.events.SCROLL_OPTIMIZE,(function(){var t=o.quill.selection.getRange(),e=r(t,1)[0];o.update(e)})),o):(i=h.error("Container required for toolbar",o.options),f(o,i))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"addHandler",value:function(t,e){this.handlers[t]=e}},{key:"attach",value:function(t){var e=this,n=[].find.call(t.classList,(function(t){return 0===t.indexOf("ql-")}));if(n){if(n=n.slice(3),"BUTTON"===t.tagName&&t.setAttribute("type","button"),null==this.handlers[n]){if(null!=this.quill.scroll.whitelist&&null==this.quill.scroll.whitelist[n])return void h.warn("ignoring attaching to disabled format",n,t);if(null==a.default.query(n))return void h.warn("ignoring attaching to nonexistent format",n,t)}var i="SELECT"===t.tagName?"change":"click";t.addEventListener(i,(function(i){var u=void 0;if("SELECT"===t.tagName){if(t.selectedIndex<0)return;var l=t.options[t.selectedIndex];u=!l.hasAttribute("selected")&&(l.value||!1)}else u=!t.classList.contains("ql-active")&&(t.value||!t.hasAttribute("value")),i.preventDefault();e.quill.focus();var c=e.quill.selection.getRange(),f=r(c,1)[0];if(null!=e.handlers[n])e.handlers[n].call(e,u);else if(a.default.query(n).prototype instanceof a.default.Embed){if(!(u=prompt("Enter "+n)))return;e.quill.updateContents((new o.default).retain(f.index).delete(f.length).insert(function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},n,u)),s.default.sources.USER)}else e.quill.format(n,u,s.default.sources.USER);e.update(f)})),this.controls.push([n,t])}}},{key:"update",value:function(t){var e=null==t?{}:this.quill.getFormat(t);this.controls.forEach((function(n){var i=r(n,2),o=i[0],a=i[1];if("SELECT"===a.tagName){var s=void 0;if(null==t)s=null;else if(null==e[o])s=a.querySelector("option[selected]");else if(!Array.isArray(e[o])){var u=e[o];"string"==typeof u&&(u=u.replace(/\"/g,'\\"')),s=a.querySelector('option[value="'+u+'"]')}null==s?(a.value="",a.selectedIndex=-1):s.selected=!0}else if(null==t)a.classList.remove("ql-active");else if(a.hasAttribute("value")){var l=e[o]===a.getAttribute("value")||null!=e[o]&&e[o].toString()===a.getAttribute("value")||null==e[o]&&!a.getAttribute("value");a.classList.toggle("ql-active",l)}else a.classList.toggle("ql-active",null!=e[o])}))}}]),e}(l.default);function p(t,e,n){var r=document.createElement("button");r.setAttribute("type","button"),r.classList.add("ql-"+e),null!=n&&(r.value=n),t.appendChild(r)}function m(t,e){Array.isArray(e[0])||(e=[e]),e.forEach((function(e){var n=document.createElement("span");n.classList.add("ql-formats"),e.forEach((function(t){if("string"==typeof t)p(n,t);else{var e=Object.keys(t)[0],r=t[e];Array.isArray(r)?function(t,e,n){var r=document.createElement("select");r.classList.add("ql-"+e),n.forEach((function(t){var e=document.createElement("option");!1!==t?e.setAttribute("value",t):e.setAttribute("selected","selected"),r.appendChild(e)})),t.appendChild(r)}(n,e,r):p(n,e,r)}})),t.appendChild(n)}))}d.DEFAULTS={},d.DEFAULTS={container:null,handlers:{clean:function(){var t=this,e=this.quill.getSelection();if(null!=e)if(0==e.length){var n=this.quill.getFormat();Object.keys(n).forEach((function(e){null!=a.default.query(e,a.default.Scope.INLINE)&&t.quill.format(e,!1)}))}else this.quill.removeFormat(e,s.default.sources.USER)},direction:function(t){var e=this.quill.getFormat().align;"rtl"===t&&null==e?this.quill.format("align","right",s.default.sources.USER):t||"right"!==e||this.quill.format("align",!1,s.default.sources.USER),this.quill.format("direction",t,s.default.sources.USER)},indent:function(t){var e=this.quill.getSelection(),n=this.quill.getFormat(e),r=parseInt(n.indent||0);if("+1"===t||"-1"===t){var i="+1"===t?1:-1;"rtl"===n.direction&&(i*=-1),this.quill.format("indent",r+i,s.default.sources.USER)}},link:function(t){!0===t&&(t=prompt("Enter link URL:")),this.quill.format("link",t,s.default.sources.USER)},list:function(t){var e=this.quill.getSelection(),n=this.quill.getFormat(e);"check"===t?"checked"===n.list||"unchecked"===n.list?this.quill.format("list",!1,s.default.sources.USER):this.quill.format("list","unchecked",s.default.sources.USER):this.quill.format("list",t,s.default.sources.USER)}}},e.default=d,e.addControls=m},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.label.innerHTML=n,r.container.classList.add("ql-color-picker"),[].slice.call(r.container.querySelectorAll(".ql-picker-item"),0,7).forEach((function(t){t.classList.add("ql-primary")})),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"buildItem",value:function(t){var n=o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"buildItem",this).call(this,t);return n.style.backgroundColor=t.getAttribute("value")||"",n}},{key:"selectItem",value:function(t,n){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"selectItem",this).call(this,t,n);var r=this.label.querySelector(".ql-color-label"),i=t&&t.getAttribute("data-value")||"";r&&("line"===r.tagName?r.style.stroke=i:r.style.fill=i)}}]),e}(((r=n(28))&&r.__esModule?r:{default:r}).default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.container.classList.add("ql-icon-picker"),[].forEach.call(r.container.querySelectorAll(".ql-picker-item"),(function(t){t.innerHTML=n[t.getAttribute("data-value")||""]})),r.defaultItem=r.container.querySelector(".ql-selected"),r.selectItem(r.defaultItem),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"selectItem",value:function(t,n){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"selectItem",this).call(this,t,n),t=t||this.defaultItem,this.label.innerHTML=t.innerHTML}}]),e}(((r=n(28))&&r.__esModule?r:{default:r}).default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function(){function t(e,n){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.quill=e,this.boundsContainer=n||document.body,this.root=e.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",(function(){r.root.style.marginTop=-1*r.quill.root.scrollTop+"px"})),this.hide()}return r(t,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(t){var e=t.left+t.width/2-this.root.offsetWidth/2,n=t.bottom+this.quill.root.scrollTop;this.root.style.left=e+"px",this.root.style.top=n+"px",this.root.classList.remove("ql-flip");var r=this.boundsContainer.getBoundingClientRect(),i=this.root.getBoundingClientRect(),o=0;if(i.right>r.right&&(o=r.right-i.right,this.root.style.left=e+o+"px"),i.left<r.left&&(o=r.left-i.left,this.root.style.left=e+o+"px"),i.bottom>r.bottom){var a=i.bottom-i.top,s=t.bottom-t.top+a;this.root.style.top=n-s+"px",this.root.classList.add("ql-flip")}return o}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),t}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=h(n(3)),a=h(n(8)),s=n(43),u=h(s),l=h(n(27)),c=n(15),f=h(n(41));function h(t){return t&&t.__esModule?t:{default:t}}function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function m(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var g=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],v=function(t){function e(t,n){d(this,e),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=g);var r=p(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.quill.container.classList.add("ql-snow"),r}return m(e,t),i(e,[{key:"extendToolbar",value:function(t){t.container.classList.add("ql-snow"),this.buildButtons([].slice.call(t.container.querySelectorAll("button")),f.default),this.buildPickers([].slice.call(t.container.querySelectorAll("select")),f.default),this.tooltip=new y(this.quill,this.options.bounds),t.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},(function(e,n){t.handlers.link.call(t,!n.format.link)}))}}]),e}(u.default);v.DEFAULTS=(0,o.default)(!0,{},u.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(t){if(t){var e=this.quill.getSelection();if(null==e||0==e.length)return;var n=this.quill.getText(e);/^\S+@\S+\.\S+$/.test(n)&&0!==n.indexOf("mailto:")&&(n="mailto:"+n),this.quill.theme.tooltip.edit("link",n)}else this.quill.format("link",!1)}}}}});var y=function(t){function e(t,n){d(this,e);var r=p(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.preview=r.root.querySelector("a.ql-preview"),r}return m(e,t),i(e,[{key:"listen",value:function(){var t=this;r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",(function(e){t.root.classList.contains("ql-editing")?t.save():t.edit("link",t.preview.textContent),e.preventDefault()})),this.root.querySelector("a.ql-remove").addEventListener("click",(function(e){if(null!=t.linkRange){var n=t.linkRange;t.restoreFocus(),t.quill.formatText(n,"link",!1,a.default.sources.USER),delete t.linkRange}e.preventDefault(),t.hide()})),this.quill.on(a.default.events.SELECTION_CHANGE,(function(e,n,r){if(null!=e){if(0===e.length&&r===a.default.sources.USER){var i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}(t.quill.scroll.descendant(l.default,e.index),2),o=i[0],s=i[1];if(null!=o){t.linkRange=new c.Range(e.index-s,o.length());var u=l.default.formats(o.domNode);return t.preview.textContent=u,t.preview.setAttribute("href",u),t.show(),void t.position(t.quill.getBounds(t.linkRange))}}else delete t.linkRange;t.hide()}}))}},{key:"show",value:function(){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),e}(s.BaseTooltip);y.TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),e.default=v},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=I(n(29)),i=n(36),o=n(38),a=n(64),s=I(n(65)),u=I(n(66)),l=n(67),c=I(l),f=n(37),h=n(26),d=n(39),p=n(40),m=I(n(56)),g=I(n(68)),v=I(n(27)),y=I(n(69)),b=I(n(70)),x=I(n(71)),w=I(n(72)),_=I(n(73)),S=n(13),O=I(S),N=I(n(74)),M=I(n(75)),E=I(n(57)),k=I(n(41)),C=I(n(28)),T=I(n(59)),D=I(n(60)),A=I(n(61)),j=I(n(108)),P=I(n(62));function I(t){return t&&t.__esModule?t:{default:t}}r.default.register({"attributors/attribute/direction":o.DirectionAttribute,"attributors/class/align":i.AlignClass,"attributors/class/background":f.BackgroundClass,"attributors/class/color":h.ColorClass,"attributors/class/direction":o.DirectionClass,"attributors/class/font":d.FontClass,"attributors/class/size":p.SizeClass,"attributors/style/align":i.AlignStyle,"attributors/style/background":f.BackgroundStyle,"attributors/style/color":h.ColorStyle,"attributors/style/direction":o.DirectionStyle,"attributors/style/font":d.FontStyle,"attributors/style/size":p.SizeStyle},!0),r.default.register({"formats/align":i.AlignClass,"formats/direction":o.DirectionClass,"formats/indent":a.IndentClass,"formats/background":f.BackgroundStyle,"formats/color":h.ColorStyle,"formats/font":d.FontClass,"formats/size":p.SizeClass,"formats/blockquote":s.default,"formats/code-block":O.default,"formats/header":u.default,"formats/list":c.default,"formats/bold":m.default,"formats/code":S.Code,"formats/italic":g.default,"formats/link":v.default,"formats/script":y.default,"formats/strike":b.default,"formats/underline":x.default,"formats/image":w.default,"formats/video":_.default,"formats/list/item":l.ListItem,"modules/formula":N.default,"modules/syntax":M.default,"modules/toolbar":E.default,"themes/bubble":j.default,"themes/snow":P.default,"ui/icons":k.default,"ui/picker":C.default,"ui/icon-picker":D.default,"ui/color-picker":T.default,"ui/tooltip":A.default},!0),e.default=r.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentClass=void 0;var r,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=(r=n(0))&&r.__esModule?r:{default:r},s=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"add",value:function(t,n){if("+1"===n||"-1"===n){var r=this.value(t)||0;n="+1"===n?r+1:r-1}return 0===n?(this.remove(t),!0):o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"add",this).call(this,t,n)}},{key:"canAdd",value:function(t,n){return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"canAdd",this).call(this,t,n)||o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"canAdd",this).call(this,t,parseInt(n))}},{key:"value",value:function(t){return parseInt(o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"value",this).call(this,t))||void 0}}]),e}(a.default.Attributor.Class),u=new s("indent","ql-indent",{scope:a.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});e.IndentClass=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(((r=n(4))&&r.__esModule?r:{default:r}).default);i.blotName="blockquote",i.tagName="blockquote",e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,null,[{key:"formats",value:function(t){return this.tagName.indexOf(t.tagName)+1}}]),e}(((r=n(4))&&r.__esModule?r:{default:r}).default);o.blotName="header",o.tagName=["H1","H2","H3","H4","H5","H6"],e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.ListItem=void 0;var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=u(n(0)),a=u(n(4)),s=u(n(25));function u(t){return t&&t.__esModule?t:{default:t}}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function f(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var h=function(t){function e(){return l(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return f(e,t),r(e,[{key:"format",value:function(t,n){t!==d.blotName||n?i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n):this.replaceWith(o.default.create(this.statics.scope))}},{key:"remove",value:function(){null==this.prev&&null==this.next?this.parent.remove():i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(t,n){return this.parent.isolate(this.offset(this.parent),this.length()),t===this.parent.statics.blotName?(this.parent.replaceWith(t,n),this):(this.parent.unwrap(),i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replaceWith",this).call(this,t,n))}}],[{key:"formats",value:function(t){return t.tagName===this.tagName?void 0:i(e.__proto__||Object.getPrototypeOf(e),"formats",this).call(this,t)}}]),e}(a.default);h.blotName="list-item",h.tagName="LI";var d=function(t){function e(t){l(this,e);var n=c(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t)),r=function(e){if(e.target.parentNode===t){var r=n.statics.formats(t),i=o.default.find(e.target);"checked"===r?i.format("list","unchecked"):"unchecked"===r&&i.format("list","checked")}};return t.addEventListener("touchstart",r),t.addEventListener("mousedown",r),n}return f(e,t),r(e,null,[{key:"create",value:function(t){var n="ordered"===t?"OL":"UL",r=i(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,n);return"checked"!==t&&"unchecked"!==t||r.setAttribute("data-checked","checked"===t),r}},{key:"formats",value:function(t){return"OL"===t.tagName?"ordered":"UL"===t.tagName?t.hasAttribute("data-checked")?"true"===t.getAttribute("data-checked")?"checked":"unchecked":"bullet":void 0}}]),r(e,[{key:"format",value:function(t,e){this.children.length>0&&this.children.tail.format(t,e)}},{key:"formats",value:function(){return t={},e=this.statics.blotName,n=this.statics.formats(this.domNode),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t;var t,e,n}},{key:"insertBefore",value:function(t,n){if(t instanceof h)i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n);else{var r=null==n?this.length():n.offset(this),o=this.split(r);o.parent.insertBefore(t,o)}}},{key:"optimize",value:function(t){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&n.domNode.tagName===this.domNode.tagName&&n.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(n.moveChildren(this),n.remove())}},{key:"replace",value:function(t){if(t.statics.blotName!==this.statics.blotName){var n=o.default.create(this.statics.defaultChild);t.moveChildren(n),this.appendChild(n)}i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t)}}]),e}(s.default);d.blotName="list",d.scope=o.default.Scope.BLOCK_BLOT,d.tagName=["OL","UL"],d.defaultChild="list-item",d.allowedChildren=[h],e.ListItem=h,e.default=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(((r=n(56))&&r.__esModule?r:{default:r}).default);i.blotName="italic",i.tagName=["EM","I"],e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,null,[{key:"create",value:function(t){return"super"===t?document.createElement("sup"):"sub"===t?document.createElement("sub"):o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t)}},{key:"formats",value:function(t){return"SUB"===t.tagName?"sub":"SUP"===t.tagName?"super":void 0}}]),e}(((r=n(6))&&r.__esModule?r:{default:r}).default);a.blotName="script",a.tagName=["SUB","SUP"],e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(((r=n(6))&&r.__esModule?r:{default:r}).default);i.blotName="strike",i.tagName="S",e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(((r=n(6))&&r.__esModule?r:{default:r}).default);i.blotName="underline",i.tagName="U",e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=(r=n(0))&&r.__esModule?r:{default:r},s=n(27),u=["alt","height","width"],l=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"format",value:function(t,n){u.indexOf(t)>-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return"string"==typeof t&&n.setAttribute("src",this.sanitize(t)),n}},{key:"formats",value:function(t){return u.reduce((function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e}),{})}},{key:"match",value:function(t){return/\.(jpe?g|gif|png)$/.test(t)||/^data:image\/.+;base64/.test(t)}},{key:"sanitize",value:function(t){return(0,s.sanitize)(t,["http","https","data"])?t:"//:0"}},{key:"value",value:function(t){return t.getAttribute("src")}}]),e}(a.default.Embed);l.blotName="image",l.tagName="IMG",e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=n(4),s=(r=n(27))&&r.__esModule?r:{default:r},u=["height","width"],l=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"format",value:function(t,n){u.indexOf(t)>-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen",!0),n.setAttribute("src",this.sanitize(t)),n}},{key:"formats",value:function(t){return u.reduce((function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e}),{})}},{key:"sanitize",value:function(t){return s.default.sanitize(t)}},{key:"value",value:function(t){return t.getAttribute("src")}}]),e}(a.BlockEmbed);l.blotName="video",l.className="ql-video",l.tagName="IFRAME",e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.FormulaBlot=void 0;var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=u(n(35)),a=u(n(5)),s=u(n(9));function u(t){return t&&t.__esModule?t:{default:t}}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function f(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var h=function(t){function e(){return l(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return f(e,t),r(e,null,[{key:"create",value:function(t){var n=i(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return"string"==typeof t&&(window.katex.render(t,n,{throwOnError:!1,errorColor:"#f00"}),n.setAttribute("data-value",t)),n}},{key:"value",value:function(t){return t.getAttribute("data-value")}}]),e}(o.default);h.blotName="formula",h.className="ql-formula",h.tagName="SPAN";var d=function(t){function e(){l(this,e);var t=c(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));if(null==window.katex)throw new Error("Formula module requires KaTeX.");return t}return f(e,t),r(e,null,[{key:"register",value:function(){a.default.register(h,!0)}}]),e}(s.default);e.FormulaBlot=h,e.default=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CodeToken=e.CodeBlock=void 0;var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=u(n(0)),a=u(n(5)),s=u(n(9));function u(t){return t&&t.__esModule?t:{default:t}}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function f(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var h=function(t){function e(){return l(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return f(e,t),r(e,[{key:"replaceWith",value:function(t){this.domNode.textContent=this.domNode.textContent,this.attach(),i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replaceWith",this).call(this,t)}},{key:"highlight",value:function(t){var e=this.domNode.textContent;this.cachedText!==e&&((e.trim().length>0||null==this.cachedText)&&(this.domNode.innerHTML=t(e),this.domNode.normalize(),this.attach()),this.cachedText=e)}}]),e}(u(n(13)).default);h.className="ql-syntax";var d=new o.default.Attributor.Class("token","hljs",{scope:o.default.Scope.INLINE}),p=function(t){function e(t,n){l(this,e);var r=c(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if("function"!=typeof r.options.highlight)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var i=null;return r.quill.on(a.default.events.SCROLL_OPTIMIZE,(function(){clearTimeout(i),i=setTimeout((function(){r.highlight(),i=null}),r.options.interval)})),r.highlight(),r}return f(e,t),r(e,null,[{key:"register",value:function(){a.default.register(d,!0),a.default.register(h,!0)}}]),r(e,[{key:"highlight",value:function(){var t=this;if(!this.quill.selection.composing){this.quill.update(a.default.sources.USER);var e=this.quill.getSelection();this.quill.scroll.descendants(h).forEach((function(e){e.highlight(t.options.highlight)})),this.quill.update(a.default.sources.SILENT),null!=e&&this.quill.setSelection(e,a.default.sources.SILENT)}}}]),e}(s.default);p.DEFAULTS={highlight:null==window.hljs?null:function(t){return window.hljs.highlightAuto(t).value},interval:1e3},e.CodeBlock=h,e.CodeToken=d,e.default=p},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(t,e){t.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(t,e){t.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'},function(t,e){t.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(t,e){t.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BubbleTooltip=void 0;var r=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=f(n(3)),a=f(n(8)),s=n(43),u=f(s),l=n(15),c=f(n(41));function f(t){return t&&t.__esModule?t:{default:t}}function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function d(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function p(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var m=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],g=function(t){function e(t,n){h(this,e),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=m);var r=d(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.quill.container.classList.add("ql-bubble"),r}return p(e,t),i(e,[{key:"extendToolbar",value:function(t){this.tooltip=new v(this.quill,this.options.bounds),this.tooltip.root.appendChild(t.container),this.buildButtons([].slice.call(t.container.querySelectorAll("button")),c.default),this.buildPickers([].slice.call(t.container.querySelectorAll("select")),c.default)}}]),e}(u.default);g.DEFAULTS=(0,o.default)(!0,{},u.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(t){t?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var v=function(t){function e(t,n){h(this,e);var r=d(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.quill.on(a.default.events.EDITOR_CHANGE,(function(t,e,n,i){if(t===a.default.events.SELECTION_CHANGE)if(null!=e&&e.length>0&&i===a.default.sources.USER){r.show(),r.root.style.left="0px",r.root.style.width="",r.root.style.width=r.root.offsetWidth+"px";var o=r.quill.getLines(e.index,e.length);if(1===o.length)r.position(r.quill.getBounds(e));else{var s=o[o.length-1],u=r.quill.getIndex(s),c=Math.min(s.length()-1,e.index+e.length-u),f=r.quill.getBounds(new l.Range(u,c));r.position(f)}}else document.activeElement!==r.textbox&&r.quill.hasFocus()&&r.hide()})),r}return p(e,t),i(e,[{key:"listen",value:function(){var t=this;r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",(function(){t.root.classList.remove("ql-editing")})),this.quill.on(a.default.events.SCROLL_OPTIMIZE,(function(){setTimeout((function(){if(!t.root.classList.contains("ql-hidden")){var e=t.quill.getSelection();null!=e&&t.position(t.quill.getBounds(e))}}),1)}))}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(t){var n=r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"position",this).call(this,t),i=this.root.querySelector(".ql-tooltip-arrow");if(i.style.marginLeft="",0===n)return n;i.style.marginLeft=-1*n-i.offsetWidth/2+"px"}}]),e}(s.BaseTooltip);v.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),e.BubbleTooltip=v,e.default=g},function(t,e,n){t.exports=n(63)}]).default},t.exports=e()},24561:function(t,e,n){"use strict";n.r(e),n.d(e,{BulletList:function(){return p},Code:function(){return h},Facebook:function(){return c},Instagram:function(){return f},List:function(){return d}});var r=n(67294),i=function(){return i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},i.apply(this,arguments)},o=function(){return Math.random().toString(36).substring(2)},a=function(t){var e=t.rtl,n=t.speed,a=t.interval,s=t.style,u=t.width,l=t.height,c=t.baseUrl,f=t.gradientRatio,h=t.animate,d=t.ariaLabel,p=t.children,m=t.className,g=t.uniquekey,v=t.primaryColor,y=t.primaryOpacity,b=t.secondaryColor,x=t.secondaryOpacity,w=t.preserveAspectRatio,_=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}(t,["rtl","speed","interval","style","width","height","baseUrl","gradientRatio","animate","ariaLabel","children","className","uniquekey","primaryColor","primaryOpacity","secondaryColor","secondaryOpacity","preserveAspectRatio"]),S=g?g+"-idClip":o(),O=g?g+"-idGradient":o(),N=e?{transform:"scaleX(-1)"}:{},M="0; "+a+"; 1",E=n+"s";return(0,r.createElement)("svg",i({role:"img",style:i(i({},s),N),className:m,"aria-label":d||null,viewBox:"0 0 "+u+" "+l,preserveAspectRatio:w},_),d?(0,r.createElement)("title",null,d):null,(0,r.createElement)("rect",{x:"0",y:"0",width:u,height:l,clipPath:"url("+c+"#"+S+")",style:{fill:"url("+c+"#"+O+")"}}),(0,r.createElement)("defs",null,(0,r.createElement)("clipPath",{id:S},p),(0,r.createElement)("linearGradient",{id:O},(0,r.createElement)("stop",{offset:"0%",stopColor:v,stopOpacity:y},h&&(0,r.createElement)("animate",{attributeName:"offset",values:-f+"; "+-f+"; 1",keyTimes:M,dur:E,repeatCount:"indefinite"})),(0,r.createElement)("stop",{offset:"50%",stopColor:b,stopOpacity:x},h&&(0,r.createElement)("animate",{attributeName:"offset",values:-f/2+"; "+-f/2+"; "+(1+f/2),keyTimes:M,dur:E,repeatCount:"indefinite"})),(0,r.createElement)("stop",{offset:"100%",stopColor:v,stopOpacity:y},h&&(0,r.createElement)("animate",{attributeName:"offset",values:"0; 0; "+(1+f),keyTimes:M,dur:E,repeatCount:"indefinite"})))))},s={animate:!0,ariaLabel:"Loading interface...",baseUrl:"",gradientRatio:2,height:130,interval:.25,preserveAspectRatio:"none",primaryColor:"#f0f0f0",primaryOpacity:1,rtl:!1,secondaryColor:"#e0e0e0",secondaryOpacity:1,speed:2,style:{},width:400},u=function(t){return(0,r.createElement)("rect",{x:"0",y:"0",rx:"5",ry:"5",width:t.width,height:t.height})},l=function(t){var e=i(i({},s),t);return(0,r.createElement)(a,i({},e),t.children||(0,r.createElement)(u,i({},e)))},c=function(t){return(0,r.createElement)(l,i({},t),(0,r.createElement)("rect",{x:"70",y:"15",rx:"4",ry:"4",width:"117",height:"6.4"}),(0,r.createElement)("rect",{x:"70",y:"35",rx:"3",ry:"3",width:"85",height:"6.4"}),(0,r.createElement)("rect",{x:"0",y:"80",rx:"3",ry:"3",width:"350",height:"6.4"}),(0,r.createElement)("rect",{x:"0",y:"100",rx:"3",ry:"3",width:"380",height:"6.4"}),(0,r.createElement)("rect",{x:"0",y:"120",rx:"3",ry:"3",width:"201",height:"6.4"}),(0,r.createElement)("circle",{cx:"30",cy:"30",r:"30"}))},f=function(t){return(0,r.createElement)(l,i({},t,{height:480}),(0,r.createElement)("circle",{cx:"30",cy:"30",r:"30"}),(0,r.createElement)("rect",{x:"75",y:"13",rx:"4",ry:"4",width:"100",height:"13"}),(0,r.createElement)("rect",{x:"75",y:"37",rx:"4",ry:"4",width:"50",height:"8"}),(0,r.createElement)("rect",{x:"0",y:"70",rx:"5",ry:"5",width:"400",height:"400"}))},h=function(t){return(0,r.createElement)(l,i({},t),(0,r.createElement)("rect",{x:"0",y:"0",rx:"3",ry:"3",width:"70",height:"10"}),(0,r.createElement)("rect",{x:"80",y:"0",rx:"3",ry:"3",width:"100",height:"10"}),(0,r.createElement)("rect",{x:"190",y:"0",rx:"3",ry:"3",width:"10",height:"10"}),(0,r.createElement)("rect",{x:"15",y:"20",rx:"3",ry:"3",width:"130",height:"10"}),(0,r.createElement)("rect",{x:"155",y:"20",rx:"3",ry:"3",width:"130",height:"10"}),(0,r.createElement)("rect",{x:"15",y:"40",rx:"3",ry:"3",width:"90",height:"10"}),(0,r.createElement)("rect",{x:"115",y:"40",rx:"3",ry:"3",width:"60",height:"10"}),(0,r.createElement)("rect",{x:"185",y:"40",rx:"3",ry:"3",width:"60",height:"10"}),(0,r.createElement)("rect",{x:"0",y:"60",rx:"3",ry:"3",width:"30",height:"10"}))},d=function(t){return(0,r.createElement)(l,i({},t),(0,r.createElement)("rect",{x:"0",y:"0",rx:"3",ry:"3",width:"250",height:"10"}),(0,r.createElement)("rect",{x:"20",y:"20",rx:"3",ry:"3",width:"220",height:"10"}),(0,r.createElement)("rect",{x:"20",y:"40",rx:"3",ry:"3",width:"170",height:"10"}),(0,r.createElement)("rect",{x:"0",y:"60",rx:"3",ry:"3",width:"250",height:"10"}),(0,r.createElement)("rect",{x:"20",y:"80",rx:"3",ry:"3",width:"200",height:"10"}),(0,r.createElement)("rect",{x:"20",y:"100",rx:"3",ry:"3",width:"80",height:"10"}))},p=function(t){return(0,r.createElement)(l,i({},t),(0,r.createElement)("circle",{cx:"10",cy:"20",r:"8"}),(0,r.createElement)("rect",{x:"25",y:"15",rx:"5",ry:"5",width:"220",height:"10"}),(0,r.createElement)("circle",{cx:"10",cy:"50",r:"8"}),(0,r.createElement)("rect",{x:"25",y:"45",rx:"5",ry:"5",width:"220",height:"10"}),(0,r.createElement)("circle",{cx:"10",cy:"80",r:"8"}),(0,r.createElement)("rect",{x:"25",y:"75",rx:"5",ry:"5",width:"220",height:"10"}),(0,r.createElement)("circle",{cx:"10",cy:"110",r:"8"}),(0,r.createElement)("rect",{x:"25",y:"105",rx:"5",ry:"5",width:"220",height:"10"}))};e.default=l},35639:function(t,e,n){"use strict";var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=n(67294),a=u(o),s=u(n(45697));function u(t){return t&&t.__esModule?t:{default:t}}var l={position:"absolute",top:0,left:0,visibility:"hidden",height:0,overflow:"scroll",whiteSpace:"pre"},c=["extraWidth","injectStyles","inputClassName","inputRef","inputStyle","minWidth","onAutosize","placeholderIsMinWidth"],f=function(t,e){e.style.fontSize=t.fontSize,e.style.fontFamily=t.fontFamily,e.style.fontWeight=t.fontWeight,e.style.fontStyle=t.fontStyle,e.style.letterSpacing=t.letterSpacing,e.style.textTransform=t.textTransform},h=!("undefined"==typeof window||!window.navigator)&&/MSIE |Trident\/|Edge\//.test(window.navigator.userAgent),d=function(){return h?"_"+Math.random().toString(36).substr(2,12):void 0},p=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.inputRef=function(t){n.input=t,"function"==typeof n.props.inputRef&&n.props.inputRef(t)},n.placeHolderSizerRef=function(t){n.placeHolderSizer=t},n.sizerRef=function(t){n.sizer=t},n.state={inputWidth:t.minWidth,inputId:t.id||d(),prevId:t.id},n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,null,[{key:"getDerivedStateFromProps",value:function(t,e){var n=t.id;return n!==e.prevId?{inputId:n||d(),prevId:n}:null}}]),i(e,[{key:"componentDidMount",value:function(){this.mounted=!0,this.copyInputStyles(),this.updateInputWidth()}},{key:"componentDidUpdate",value:function(t,e){e.inputWidth!==this.state.inputWidth&&"function"==typeof this.props.onAutosize&&this.props.onAutosize(this.state.inputWidth),this.updateInputWidth()}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"copyInputStyles",value:function(){if(this.mounted&&window.getComputedStyle){var t=this.input&&window.getComputedStyle(this.input);t&&(f(t,this.sizer),this.placeHolderSizer&&f(t,this.placeHolderSizer))}}},{key:"updateInputWidth",value:function(){if(this.mounted&&this.sizer&&void 0!==this.sizer.scrollWidth){var t=void 0;t=this.props.placeholder&&(!this.props.value||this.props.value&&this.props.placeholderIsMinWidth)?Math.max(this.sizer.scrollWidth,this.placeHolderSizer.scrollWidth)+2:this.sizer.scrollWidth+2,(t+="number"===this.props.type&&void 0===this.props.extraWidth?16:parseInt(this.props.extraWidth)||0)<this.props.minWidth&&(t=this.props.minWidth),t!==this.state.inputWidth&&this.setState({inputWidth:t})}}},{key:"getInput",value:function(){return this.input}},{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"renderStyles",value:function(){var t=this.props.injectStyles;return h&&t?a.default.createElement("style",{dangerouslySetInnerHTML:{__html:"input#"+this.state.inputId+"::-ms-clear {display: none;}"}}):null}},{key:"render",value:function(){var t=[this.props.defaultValue,this.props.value,""].reduce((function(t,e){return null!=t?t:e})),e=r({},this.props.style);e.display||(e.display="inline-block");var n=r({boxSizing:"content-box",width:this.state.inputWidth+"px"},this.props.inputStyle),i=function(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}(this.props,[]);return function(t){c.forEach((function(e){return delete t[e]}))}(i),i.className=this.props.inputClassName,i.id=this.state.inputId,i.style=n,a.default.createElement("div",{className:this.props.className,style:e},this.renderStyles(),a.default.createElement("input",r({},i,{ref:this.inputRef})),a.default.createElement("div",{ref:this.sizerRef,style:l},t),this.props.placeholder?a.default.createElement("div",{ref:this.placeHolderSizerRef,style:l},this.props.placeholder):null)}}]),e}(o.Component);p.propTypes={className:s.default.string,defaultValue:s.default.any,extraWidth:s.default.oneOfType([s.default.number,s.default.string]),id:s.default.string,injectStyles:s.default.bool,inputClassName:s.default.string,inputRef:s.default.func,inputStyle:s.default.object,minWidth:s.default.oneOfType([s.default.number,s.default.string]),onAutosize:s.default.func,onChange:s.default.func,placeholder:s.default.string,placeholderIsMinWidth:s.default.bool,style:s.default.object,value:s.default.any},p.defaultProps={minWidth:1,injectStyles:!0},e.Z=p},64777:function(t,e,n){"use strict";n.r(e);var r=n(67294),i=n(73935),o=n(45697),a=n.n(o),s=n(37723),u=n(94184),l=n.n(u),c=n(70743),f=n.n(c),h=n(54483),d=n.n(h);function p(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function m(t,e,n){return e&&p(t.prototype,e),n&&p(t,n),t}function g(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function v(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){g(t,e,n[e])}))}return t}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}function b(t,e){return b=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},b(t,e)}function x(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var w=function(t){var e=t.classes,n=t.classNames,i=t.styles,o=t.closeIconSize,a=t.closeIconSvgPath,s=t.onClickCloseIcon,u=t.id;return r.createElement("button",{className:l()(e.closeButton,n.closeButton),style:i.closeButton,onClick:s,id:u},r.createElement("svg",{className:l()(e.closeIcon,n.closeIcon),style:i.closeIcon,xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 0 36 36"},a))};w.propTypes={classNames:a().object.isRequired,styles:a().object.isRequired,classes:a().object.isRequired,closeIconSize:a().number.isRequired,closeIconSvgPath:a().node.isRequired,onClickCloseIcon:a().func.isRequired,id:a().string},w.defaultProps={id:null};var _=[];!function(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=t:i.appendChild(document.createTextNode(t))}}(".styles_overlay__CLSq- {\n background: rgba(0, 0, 0, 0.75);\n display: flex;\n align-items: flex-start;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow-y: auto;\n overflow-x: hidden;\n z-index: 1000;\n padding: 1.2rem;\n}\n.styles_modal__gNwvD {\n max-width: 800px;\n position: relative;\n padding: 1.2rem;\n background: #ffffff;\n background-clip: padding-box;\n box-shadow: 0 12px 15px 0 rgba(0, 0, 0, 0.25);\n margin: 0 auto;\n}\n.styles_modalCenter__L9F2w {\n margin: auto;\n}\n.styles_closeButton__20ID4 {\n position: absolute;\n top: 14px;\n right: 14px;\n border: none;\n padding: 0;\n background-color: transparent;\n display: flex;\n}\n.styles_closeIcon__1QwbI {\n}\n.styles_transitionEnter__3j_-a {\n opacity: 0.01;\n}\n.styles_transitionEnterActive___eQs7 {\n opacity: 1;\n transition: opacity 500ms cubic-bezier(0.23, 1, 0.32, 1);\n}\n.styles_transitionExit__1KmEf {\n opacity: 1;\n}\n.styles_transitionExitActive__1nQXw {\n opacity: 0.01;\n transition: opacity 500ms cubic-bezier(0.23, 1, 0.32, 1);\n}\n",{insertAt:"top"});var S="undefined"!=typeof window,O=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),n=function(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?x(t):e}(this,y(e).call(this,t)),g(x(n),"shouldClose",null),g(x(n),"handleOpen",(function(){var t;t=x(n),-1===_.indexOf(t)&&_.push(t),S&&!n.props.container&&document.body.appendChild(n.container),n.props.blockScroll&&e.blockScroll(),document.addEventListener("keydown",n.handleKeydown)})),g(x(n),"handleClose",(function(){var t,r;t=x(n),-1!==(r=_.indexOf(t))&&_.splice(r,1),n.props.blockScroll&&e.unblockScroll(),S&&!n.props.container&&document.body.removeChild(n.container),document.removeEventListener("keydown",n.handleKeydown)})),g(x(n),"handleClickOverlay",(function(t){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose?(n.props.onOverlayClick&&n.props.onOverlayClick(t),n.props.closeOnOverlayClick&&n.props.onClose(t),n.shouldClose=null):n.shouldClose=null})),g(x(n),"handleClickCloseIcon",(function(t){n.props.onClose(t)})),g(x(n),"handleKeydown",(function(t){var e;27===t.keyCode&&(e=x(n),_.length&&_[_.length-1]===e)&&(n.props.onEscKeyDown&&n.props.onEscKeyDown(t),n.props.closeOnEsc&&n.props.onClose(t))})),g(x(n),"handleModalEvent",(function(){n.shouldClose=!1})),g(x(n),"handleEntered",(function(){n.props.onEntered&&n.props.onEntered()})),g(x(n),"handleExited",(function(){n.props.onExited&&n.props.onExited(),n.setState({showPortal:!1}),n.props.blockScroll&&e.unblockScroll()})),n.container=S&&document.createElement("div"),n.state={showPortal:n.props.open},n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&b(t,e)}(e,t),m(e,null,[{key:"blockScroll",value:function(){f().on()}}]),m(e,[{key:"componentDidMount",value:function(){this.props.open&&this.handleOpen()}},{key:"componentDidUpdate",value:function(t,e){e.showPortal&&!this.state.showPortal?this.handleClose():!t.open&&this.props.open&&this.handleOpen()}},{key:"componentWillUnmount",value:function(){this.state.showPortal&&this.handleClose()}},{key:"render",value:function(){var t=this.props,e=t.open,n=t.center,o=t.classes,a=t.classNames,u=t.styles,c=t.showCloseIcon,f=t.closeIconSize,h=t.closeIconSvgPath,p=t.animationDuration,m=t.focusTrapped,g=t.focusTrapOptions,y=t.overlayId,b=t.modalId,x=t.closeIconId,_=t.role,S=t.ariaLabelledby,O=t.ariaDescribedby;if(!this.state.showPortal)return null;var N=r.createElement(r.Fragment,null,this.props.children,c&&r.createElement(w,{classes:o,classNames:a,styles:u,closeIconSize:f,closeIconSvgPath:h,onClickCloseIcon:this.handleClickCloseIcon,id:x}));return i.createPortal(r.createElement(s.Z,{in:e,appear:!0,classNames:{appear:a.transitionEnter||o.transitionEnter,appearActive:a.transitionEnterActive||o.transitionEnterActive,enter:a.transitionEnter||o.transitionEnter,enterActive:a.transitionEnterActive||o.transitionEnterActive,exit:a.transitionExit||o.transitionExit,exitActive:a.transitionExitActive||o.transitionExitActive},timeout:p,onEntered:this.handleEntered,onExited:this.handleExited},r.createElement("div",{className:l()(o.overlay,a.overlay),onClick:this.handleClickOverlay,style:u.overlay,id:y},r.createElement("div",{className:l()(o.modal,n&&o.modalCenter,a.modal),style:u.modal,onMouseDown:this.handleModalEvent,onMouseUp:this.handleModalEvent,onClick:this.handleModalEvent,id:b,role:_,"aria-modal":"true","aria-labelledby":S,"aria-describedby":O},m?r.createElement(d(),{focusTrapOptions:v({},{clickOutsideDeactivates:!0},g)},N):N))),this.props.container||this.container)}}],[{key:"getDerivedStateFromProps",value:function(t,e){return!e.showPortal&&t.open?{showPortal:!0}:null}}]),e}(r.Component);g(O,"unblockScroll",(function(){0===_.length&&f().off()})),O.propTypes={closeOnEsc:a().bool,closeOnOverlayClick:a().bool,onEntered:a().func,onExited:a().func,onClose:a().func.isRequired,onEscKeyDown:a().func,onOverlayClick:a().func,open:a().bool.isRequired,classNames:a().object,styles:a().object,children:a().node,classes:a().object,center:a().bool,showCloseIcon:a().bool,closeIconSize:a().number,closeIconSvgPath:a().node,animationDuration:a().number,container:a().object,blockScroll:a().bool,focusTrapped:a().bool,focusTrapOptions:a().object,overlayId:a().string,modalId:a().string,closeIconId:a().string,role:a().string,ariaLabelledby:a().string,ariaDescribedby:a().string},O.defaultProps={classes:{overlay:"styles_overlay__CLSq-",modal:"styles_modal__gNwvD",modalCenter:"styles_modalCenter__L9F2w",closeButton:"styles_closeButton__20ID4",closeIcon:"styles_closeIcon__1QwbI",transitionEnter:"styles_transitionEnter__3j_-a",transitionEnterActive:"styles_transitionEnterActive___eQs7",transitionExit:"styles_transitionExit__1KmEf",transitionExitActive:"styles_transitionExitActive__1nQXw"},closeOnEsc:!0,closeOnOverlayClick:!0,onEntered:void 0,onExited:void 0,onEscKeyDown:void 0,onOverlayClick:void 0,showCloseIcon:!0,closeIconSize:28,closeIconSvgPath:r.createElement("path",{d:"M28.5 9.62L26.38 7.5 18 15.88 9.62 7.5 7.5 9.62 15.88 18 7.5 26.38l2.12 2.12L18 20.12l8.38 8.38 2.12-2.12L20.12 18z"}),classNames:{},styles:{},children:null,center:!1,animationDuration:500,blockScroll:!0,focusTrapped:!0,focusTrapOptions:{},overlayId:void 0,modalId:void 0,closeIconId:void 0,role:"dialog",ariaLabelledby:void 0,ariaDescribedby:void 0},e.default=O},4371:function(t,e,n){"use strict";n.r(e),n.d(e,{Input:function(){return R},MultiValue:function(){return L},Placeholder:function(){return F},SingleValue:function(){return q},ValueContainer:function(){return B},default:function(){return z}});var r=n(45987),i=n(87462),o=n(4942),a=n(15671),s=n(43144),u=n(60136),l=n(82963),c=n(61120),f=n(67294),h=n(30845),d=(n(34412),n(73935),n(53569)),p=(n(93998),n(35639),n(12666)),m=n(63366),g=n(97326),v=n(94578),y=n(220);function b(t,e){var n=Object.create(null);return t&&f.Children.map(t,(function(t){return t})).forEach((function(t){n[t.key]=function(t){return e&&(0,f.isValidElement)(t)?e(t):t}(t)})),n}function x(t,e,n){return null!=n[e]?n[e]:t.props[e]}function w(t,e,n){var r=b(t.children),i=function(t,e){function n(n){return n in e?e[n]:t[n]}t=t||{},e=e||{};var r,i=Object.create(null),o=[];for(var a in t)a in e?o.length&&(i[a]=o,o=[]):o.push(a);var s={};for(var u in e){if(i[u])for(r=0;r<i[u].length;r++){var l=i[u][r];s[i[u][r]]=n(l)}s[u]=n(u)}for(r=0;r<o.length;r++)s[o[r]]=n(o[r]);return s}(e,r);return Object.keys(i).forEach((function(o){var a=i[o];if((0,f.isValidElement)(a)){var s=o in e,u=o in r,l=e[o],c=(0,f.isValidElement)(l)&&!l.props.in;!u||s&&!c?u||!s||c?u&&s&&(0,f.isValidElement)(l)&&(i[o]=(0,f.cloneElement)(a,{onExited:n.bind(null,a),in:l.props.in,exit:x(a,"exit",t),enter:x(a,"enter",t)})):i[o]=(0,f.cloneElement)(a,{in:!1}):i[o]=(0,f.cloneElement)(a,{onExited:n.bind(null,a),in:!0,exit:x(a,"exit",t),enter:x(a,"enter",t)})}})),i}var _=Object.values||function(t){return Object.keys(t).map((function(e){return t[e]}))},S=function(t){function e(e,n){var r,i=(r=t.call(this,e,n)||this).handleExited.bind((0,g.Z)(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}(0,v.Z)(e,t);var n=e.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},e.getDerivedStateFromProps=function(t,e){var n,r,i=e.children,o=e.handleExited;return{children:e.firstRender?(n=t,r=o,b(n.children,(function(t){return(0,f.cloneElement)(t,{onExited:r.bind(null,t),in:!0,appear:x(t,"appear",n),enter:x(t,"enter",n),exit:x(t,"exit",n)})}))):w(t,i,o),firstRender:!1}},n.handleExited=function(t,e){var n=b(this.props.children);t.key in n||(t.props.onExited&&t.props.onExited(e),this.mounted&&this.setState((function(e){var n=(0,i.Z)({},e.children);return delete n[t.key],{children:n}})))},n.render=function(){var t=this.props,e=t.component,n=t.childFactory,r=(0,m.Z)(t,["component","childFactory"]),i=this.state.contextValue,o=_(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===e?f.createElement(y.Z.Provider,{value:i},o):f.createElement(y.Z.Provider,{value:i},f.createElement(e,r,o))},e}(f.Component);S.propTypes={},S.defaultProps={component:"div",childFactory:function(t){return t}};var O=S;function N(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function M(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?N(Object(n),!0).forEach((function(e){(0,o.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var E=function(t){var e=t.component,n=t.duration,o=void 0===n?1:n,a=t.in,s=(t.onExited,(0,r.Z)(t,["component","duration","in","onExited"])),u={entering:{opacity:0},entered:{opacity:1,transition:"opacity ".concat(o,"ms")},exiting:{opacity:0},exited:{opacity:0}};return f.createElement(p.ZP,{mountOnEnter:!0,unmountOnExit:!0,in:a,timeout:o},(function(t){var n={style:M({},u[t])};return f.createElement(e,(0,i.Z)({innerProps:n},s))}))},k=function(t){(0,u.Z)(i,t);var e,n,r=(e=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=(0,c.Z)(e);if(n){var i=(0,c.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,l.Z)(this,t)});function i(){var t;(0,a.Z)(this,i);for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return(t=r.call.apply(r,[this].concat(n))).duration=260,t.rafID=void 0,t.state={width:"auto"},t.transition={exiting:{width:0,transition:"width ".concat(t.duration,"ms ease-out")},exited:{width:0}},t.getWidth=function(e){e&&isNaN(t.state.width)&&(t.rafID=window.requestAnimationFrame((function(){var n=e.getBoundingClientRect().width;t.setState({width:n})})))},t.getStyle=function(t){return{overflow:"hidden",whiteSpace:"nowrap",width:t}},t.getTransition=function(e){return t.transition[e]},t}return(0,s.Z)(i,[{key:"componentWillUnmount",value:function(){this.rafID&&window.cancelAnimationFrame(this.rafID)}},{key:"render",value:function(){var t=this,e=this.props,n=e.children,r=e.in,i=this.state.width;return f.createElement(p.ZP,{enter:!1,mountOnEnter:!0,unmountOnExit:!0,in:r,timeout:this.duration},(function(e){var r=M(M({},t.getStyle(i)),t.getTransition(e));return f.createElement("div",{ref:t.getWidth,style:r},n)}))}}]),i}(f.Component),C=function(t){return function(e){var n=e.in,o=e.onExited,a=(0,r.Z)(e,["in","onExited"]);return f.createElement(k,{in:n,onExited:o},f.createElement(t,(0,i.Z)({cropWithEllipsis:n},a)))}},T=function(t){return function(e){return f.createElement(E,(0,i.Z)({component:t,duration:e.isMulti?260:1},e))}},D=function(t){return function(e){return f.createElement(E,(0,i.Z)({component:t},e))}},A=function(t){return function(e){return f.createElement(O,(0,i.Z)({component:t},e))}};function j(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var P=function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=(0,d.y)({components:e}),i=n.Input,a=n.MultiValue,s=n.Placeholder,u=n.SingleValue,l=n.ValueContainer,c=(0,r.Z)(n,["Input","MultiValue","Placeholder","SingleValue","ValueContainer"]);return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?j(Object(n),!0).forEach((function(e){(0,o.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({Input:(t=i,function(e){e.in,e.onExited,e.appear,e.enter,e.exit;var n=(0,r.Z)(e,["in","onExited","appear","enter","exit"]);return f.createElement(t,n)}),MultiValue:C(a),Placeholder:T(s),SingleValue:D(u),ValueContainer:A(l)},c)},I=P(),R=I.Input,L=I.MultiValue,F=I.Placeholder,q=I.SingleValue,B=I.ValueContainer,z=(0,h.Z)(P,d.B)},53569:function(t,e,n){"use strict";n.d(e,{A:function(){return _},B:function(){return Z},C:function(){return w},D:function(){return M},E:function(){return y},F:function(){return Pt},M:function(){return I},a:function(){return G},b:function(){return ft},c:function(){return ot},d:function(){return it},e:function(){return mt},f:function(){return at},g:function(){return pt},h:function(){return yt},i:function(){return X},j:function(){return q},k:function(){return R},l:function(){return ut},m:function(){return j},n:function(){return H},o:function(){return _t},p:function(){return St},q:function(){return Ot},r:function(){return F},s:function(){return Ct},t:function(){return Tt},u:function(){return Dt},v:function(){return K},w:function(){return E},x:function(){return k},y:function(){return It},z:function(){return x}});var r=n(45987),i=n(87462),o=n(4942),a=n(15671),s=n(43144),u=n(60136),l=n(82963),c=n(61120),f=n(67294),h=n(34412),d=n(73935),p=n(71002),m=n(93998),g=n(30168),v=n(35639),y=function(){};function b(t,e){return e?"-"===e[0]?t+e:t+"__"+e:t}function x(t,e,n){var r=[n];if(e&&t)for(var i in e)e.hasOwnProperty(i)&&e[i]&&r.push("".concat(b(t,i)));return r.filter((function(t){return t})).map((function(t){return String(t).trim()})).join(" ")}var w=function(t){return Array.isArray(t)?t.filter(Boolean):"object"===(0,p.Z)(t)&&null!==t?[t]:[]};function _(t){return[document.documentElement,document.body,window].indexOf(t)>-1}function S(t){return _(t)?window.pageYOffset:t.scrollTop}function O(t,e){_(t)?window.scrollTo(0,e):t.scrollTop=e}function N(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:y,i=S(t),o=e-i,a=0;!function e(){var s,u=o*((s=(s=a+=10)/n-1)*s*s+1)+i;O(t,u),a<n?window.requestAnimationFrame(e):r(t)}()}function M(t,e){var n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=e.offsetHeight/3;r.bottom+i>n.bottom?O(t,Math.min(e.offsetTop+e.clientHeight-t.offsetHeight+i,t.scrollHeight)):r.top-i<n.top&&O(t,Math.max(e.offsetTop-i,0))}function E(){try{return document.createEvent("TouchEvent"),!0}catch(t){return!1}}function k(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(t){return!1}}function C(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function T(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?C(Object(n),!0).forEach((function(e){(0,o.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function D(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=(0,c.Z)(t);if(e){var i=(0,c.Z)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,l.Z)(this,n)}}var A=function(t){return"auto"===t?"bottom":t},j=function(t){var e,n=t.placement,r=t.theme,i=r.borderRadius,a=r.spacing,s=r.colors;return e={label:"menu"},(0,o.Z)(e,function(t){return t?{bottom:"top",top:"bottom"}[t]:"bottom"}(n),"100%"),(0,o.Z)(e,"backgroundColor",s.neutral0),(0,o.Z)(e,"borderRadius",i),(0,o.Z)(e,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),(0,o.Z)(e,"marginBottom",a.menuGutter),(0,o.Z)(e,"marginTop",a.menuGutter),(0,o.Z)(e,"position","absolute"),(0,o.Z)(e,"width","100%"),(0,o.Z)(e,"zIndex",1),e},P=(0,f.createContext)({getPortalPlacement:null}),I=function(t){(0,u.Z)(n,t);var e=D(n);function n(){var t;(0,a.Z)(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(t=e.call.apply(e,[this].concat(i))).state={maxHeight:t.props.maxMenuHeight,placement:null},t.getPlacement=function(e){var n=t.props,r=n.minMenuHeight,i=n.maxMenuHeight,o=n.menuPlacement,a=n.menuPosition,s=n.menuShouldScrollIntoView,u=n.theme;if(e){var l="fixed"===a,c=function(t){var e=t.maxHeight,n=t.menuEl,r=t.minHeight,i=t.placement,o=t.shouldScroll,a=t.isFixedPosition,s=t.theme.spacing,u=function(t){var e=getComputedStyle(t),n="absolute"===e.position,r=/(auto|scroll)/,i=document.documentElement;if("fixed"===e.position)return i;for(var o=t;o=o.parentElement;)if(e=getComputedStyle(o),(!n||"static"!==e.position)&&r.test(e.overflow+e.overflowY+e.overflowX))return o;return i}(n),l={placement:"bottom",maxHeight:e};if(!n||!n.offsetParent)return l;var c=u.getBoundingClientRect().height,f=n.getBoundingClientRect(),h=f.bottom,d=f.height,p=f.top,m=n.offsetParent.getBoundingClientRect().top,g=window.innerHeight,v=S(u),y=parseInt(getComputedStyle(n).marginBottom,10),b=parseInt(getComputedStyle(n).marginTop,10),x=m-b,w=g-p,_=x+v,M=c-v-p,E=h-g+v+y,k=v+p-b,C=160;switch(i){case"auto":case"bottom":if(w>=d)return{placement:"bottom",maxHeight:e};if(M>=d&&!a)return o&&N(u,E,C),{placement:"bottom",maxHeight:e};if(!a&&M>=r||a&&w>=r)return o&&N(u,E,C),{placement:"bottom",maxHeight:a?w-y:M-y};if("auto"===i||a){var T=e,D=a?x:_;return D>=r&&(T=Math.min(D-y-s.controlHeight,e)),{placement:"top",maxHeight:T}}if("bottom"===i)return O(u,E),{placement:"bottom",maxHeight:e};break;case"top":if(x>=d)return{placement:"top",maxHeight:e};if(_>=d&&!a)return o&&N(u,k,C),{placement:"top",maxHeight:e};if(!a&&_>=r||a&&x>=r){var A=e;return(!a&&_>=r||a&&x>=r)&&(A=a?x-b:_-b),o&&N(u,k,C),{placement:"top",maxHeight:A}}return{placement:"bottom",maxHeight:e};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return l}({maxHeight:i,menuEl:e,minHeight:r,placement:o,shouldScroll:s&&!l,isFixedPosition:l,theme:u}),f=t.context.getPortalPlacement;f&&f(c),t.setState(c)}},t.getUpdatedProps=function(){var e=t.props.menuPlacement,n=t.state.placement||A(e);return T(T({},t.props),{},{placement:n,maxHeight:t.state.maxHeight})},t}return(0,s.Z)(n,[{key:"render",value:function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),n}(f.Component);I.contextType=P;var R=function(t){var e=t.maxHeight,n=t.theme.spacing.baseUnit;return{maxHeight:e,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},L=function(t){var e=t.theme,n=e.spacing.baseUnit;return{color:e.colors.neutral40,padding:"".concat(2*n,"px ").concat(3*n,"px"),textAlign:"center"}},F=L,q=L,B=function(t){var e=t.children,n=t.className,r=t.cx,o=t.getStyles,a=t.innerProps;return(0,h.tZ)("div",(0,i.Z)({css:o("noOptionsMessage",t),className:r({"menu-notice":!0,"menu-notice--no-options":!0},n)},a),e)};B.defaultProps={children:"No options"};var z=function(t){var e=t.children,n=t.className,r=t.cx,o=t.getStyles,a=t.innerProps;return(0,h.tZ)("div",(0,i.Z)({css:o("loadingMessage",t),className:r({"menu-notice":!0,"menu-notice--loading":!0},n)},a),e)};z.defaultProps={children:"Loading..."};var H=function(t){var e=t.rect,n=t.offset,r=t.position;return{left:e.left,position:r,top:n,width:e.width,zIndex:1}},U=function(t){(0,u.Z)(n,t);var e=D(n);function n(){var t;(0,a.Z)(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(t=e.call.apply(e,[this].concat(i))).state={placement:null},t.getPortalPlacement=function(e){var n=e.placement;n!==A(t.props.menuPlacement)&&t.setState({placement:n})},t}return(0,s.Z)(n,[{key:"render",value:function(){var t=this.props,e=t.appendTo,n=t.children,r=t.controlElement,i=t.menuPlacement,o=t.menuPosition,a=t.getStyles,s="fixed"===o;if(!e&&!s||!r)return null;var u=this.state.placement||A(i),l=function(t){var e=t.getBoundingClientRect();return{bottom:e.bottom,height:e.height,left:e.left,right:e.right,top:e.top,width:e.width}}(r),c=s?0:window.pageYOffset,f={offset:l[u]+c,position:o,rect:l},p=(0,h.tZ)("div",{css:a("menuPortal",f)},n);return(0,h.tZ)(P.Provider,{value:{getPortalPlacement:this.getPortalPlacement}},e?(0,d.createPortal)(p,e):p)}}]),n}(f.Component),W=Array.isArray,V=Object.keys,$=Object.prototype.hasOwnProperty;function Y(t,e){if(t===e)return!0;if(t&&e&&"object"==(0,p.Z)(t)&&"object"==(0,p.Z)(e)){var n,r,i,o=W(t),a=W(e);if(o&&a){if((r=t.length)!=e.length)return!1;for(n=r;0!=n--;)if(!Y(t[n],e[n]))return!1;return!0}if(o!=a)return!1;var s=t instanceof Date,u=e instanceof Date;if(s!=u)return!1;if(s&&u)return t.getTime()==e.getTime();var l=t instanceof RegExp,c=e instanceof RegExp;if(l!=c)return!1;if(l&&c)return t.toString()==e.toString();var f=V(t);if((r=f.length)!==V(e).length)return!1;for(n=r;0!=n--;)if(!$.call(e,f[n]))return!1;for(n=r;0!=n--;)if(!("_owner"===(i=f[n])&&t.$$typeof||Y(t[i],e[i])))return!1;return!0}return t!=t&&e!=e}function Z(t,e){try{return Y(t,e)}catch(t){if(t.message&&t.message.match(/stack|recursion/i))return console.warn("Warning: react-fast-compare does not handle circular references.",t.name,t.message),!1;throw t}}var G=function(t){var e=t.isDisabled;return{label:"container",direction:t.isRtl?"rtl":null,pointerEvents:e?"none":null,position:"relative"}},K=function(t){var e=t.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:"".concat(e.baseUnit/2,"px ").concat(2*e.baseUnit,"px"),WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}},X=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}};function J(){var t=(0,g.Z)(["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"]);return J=function(){return t},t}var Q={name:"19bqh2r",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0;"},tt=function(t){var e=t.size,n=(0,r.Z)(t,["size"]);return(0,h.tZ)("svg",(0,i.Z)({height:e,width:e,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Q},n))},et=function(t){return(0,h.tZ)(tt,(0,i.Z)({size:20},t),(0,h.tZ)("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},nt=function(t){return(0,h.tZ)(tt,(0,i.Z)({size:20},t),(0,h.tZ)("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},rt=function(t){var e=t.isFocused,n=t.theme,r=n.spacing.baseUnit,i=n.colors;return{label:"indicatorContainer",color:e?i.neutral60:i.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:e?i.neutral80:i.neutral40}}},it=rt,ot=rt,at=function(t){var e=t.isDisabled,n=t.theme,r=n.spacing.baseUnit,i=n.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:e?i.neutral10:i.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},st=(0,h.F4)(J()),ut=function(t){var e=t.isFocused,n=t.size,r=t.theme,i=r.colors,o=r.spacing.baseUnit;return{label:"loadingIndicator",color:e?i.neutral60:i.neutral20,display:"flex",padding:2*o,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},lt=function(t){var e=t.delay,n=t.offset;return(0,h.tZ)("span",{css:(0,m.Z)({animation:"".concat(st," 1s ease-in-out ").concat(e,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":null,height:"1em",verticalAlign:"top",width:"1em"},"")})},ct=function(t){var e=t.className,n=t.cx,r=t.getStyles,o=t.innerProps,a=t.isRtl;return(0,h.tZ)("div",(0,i.Z)({},o,{css:r("loadingIndicator",t),className:n({indicator:!0,"loading-indicator":!0},e)}),(0,h.tZ)(lt,{delay:0,offset:a}),(0,h.tZ)(lt,{delay:160,offset:!0}),(0,h.tZ)(lt,{delay:320,offset:!a}))};ct.defaultProps={size:4};var ft=function(t){var e=t.isDisabled,n=t.isFocused,r=t.theme,i=r.colors,o=r.borderRadius,a=r.spacing;return{label:"control",alignItems:"center",backgroundColor:e?i.neutral5:i.neutral0,borderColor:e?i.neutral10:n?i.primary:i.neutral20,borderRadius:o,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px ".concat(i.primary):null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:a.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?i.primary:i.neutral30}}};function ht(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function dt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ht(Object(n),!0).forEach((function(e){(0,o.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ht(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var pt=function(t){var e=t.theme.spacing;return{paddingBottom:2*e.baseUnit,paddingTop:2*e.baseUnit}},mt=function(t){var e=t.theme.spacing;return{label:"group",color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*e.baseUnit,paddingRight:3*e.baseUnit,textTransform:"uppercase"}};function gt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function vt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?gt(Object(n),!0).forEach((function(e){(0,o.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):gt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var yt=function(t){var e=t.isDisabled,n=t.theme,r=n.spacing,i=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:e?"hidden":"visible",color:i.neutral80}},bt=function(t){return{label:"input",background:0,border:0,fontSize:"inherit",opacity:t?0:1,outline:0,padding:0,color:"inherit"}};function xt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function wt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?xt(Object(n),!0).forEach((function(e){(0,o.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):xt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var _t=function(t){var e=t.theme,n=e.spacing,r=e.borderRadius;return{label:"multiValue",backgroundColor:e.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},St=function(t){var e=t.theme,n=e.borderRadius,r=e.colors,i=t.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:i?"ellipsis":null,whiteSpace:"nowrap"}},Ot=function(t){var e=t.theme,n=e.spacing,r=e.borderRadius,i=e.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:t.isFocused&&i.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}}},Nt=function(t){var e=t.children,n=t.innerProps;return(0,h.tZ)("div",n,e)},Mt=Nt,Et=Nt,kt=function(t){var e=t.children,n=t.className,r=t.components,i=t.cx,o=t.data,a=t.getStyles,s=t.innerProps,u=t.isDisabled,l=t.removeProps,c=t.selectProps,f=r.Container,d=r.Label,p=r.Remove;return(0,h.tZ)(h.ms,null,(function(r){var m=r.css,g=r.cx;return(0,h.tZ)(f,{data:o,innerProps:wt(wt({},s),{},{className:g(m(a("multiValue",t)),i({"multi-value":!0,"multi-value--is-disabled":u},n))}),selectProps:c},(0,h.tZ)(d,{data:o,innerProps:{className:g(m(a("multiValueLabel",t)),i({"multi-value__label":!0},n))},selectProps:c},e),(0,h.tZ)(p,{data:o,innerProps:wt({className:g(m(a("multiValueRemove",t)),i({"multi-value__remove":!0},n))},l),selectProps:c}))}))};kt.defaultProps={cropWithEllipsis:!0};var Ct=function(t){var e=t.isDisabled,n=t.isFocused,r=t.isSelected,i=t.theme,o=i.spacing,a=i.colors;return{label:"option",backgroundColor:r?a.primary:n?a.primary25:"transparent",color:e?a.neutral20:r?a.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:"".concat(2*o.baseUnit,"px ").concat(3*o.baseUnit,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:!e&&(r?a.primary:a.primary50)}}},Tt=function(t){var e=t.theme,n=e.spacing;return{label:"placeholder",color:e.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},Dt=function(t){var e=t.isDisabled,n=t.theme,r=n.spacing,i=n.colors;return{label:"singleValue",color:e?i.neutral40:i.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - ".concat(2*r.baseUnit,"px)"),overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}};function At(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function jt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?At(Object(n),!0).forEach((function(e){(0,o.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):At(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var Pt={ClearIndicator:function(t){var e=t.children,n=t.className,r=t.cx,o=t.getStyles,a=t.innerProps;return(0,h.tZ)("div",(0,i.Z)({},a,{css:o("clearIndicator",t),className:r({indicator:!0,"clear-indicator":!0},n)}),e||(0,h.tZ)(et,null))},Control:function(t){var e=t.children,n=t.cx,r=t.getStyles,o=t.className,a=t.isDisabled,s=t.isFocused,u=t.innerRef,l=t.innerProps,c=t.menuIsOpen;return(0,h.tZ)("div",(0,i.Z)({ref:u,css:r("control",t),className:n({control:!0,"control--is-disabled":a,"control--is-focused":s,"control--menu-is-open":c},o)},l),e)},DropdownIndicator:function(t){var e=t.children,n=t.className,r=t.cx,o=t.getStyles,a=t.innerProps;return(0,h.tZ)("div",(0,i.Z)({},a,{css:o("dropdownIndicator",t),className:r({indicator:!0,"dropdown-indicator":!0},n)}),e||(0,h.tZ)(nt,null))},DownChevron:nt,CrossIcon:et,Group:function(t){var e=t.children,n=t.className,r=t.cx,o=t.getStyles,a=t.Heading,s=t.headingProps,u=t.label,l=t.theme,c=t.selectProps;return(0,h.tZ)("div",{css:o("group",t),className:r({group:!0},n)},(0,h.tZ)(a,(0,i.Z)({},s,{selectProps:c,theme:l,getStyles:o,cx:r}),u),(0,h.tZ)("div",null,e))},GroupHeading:function(t){var e=t.className,n=t.cx,o=t.getStyles,a=t.theme,s=(t.selectProps,(0,r.Z)(t,["className","cx","getStyles","theme","selectProps"]));return(0,h.tZ)("div",(0,i.Z)({css:o("groupHeading",dt({theme:a},s)),className:n({"group-heading":!0},e)},s))},IndicatorsContainer:function(t){var e=t.children,n=t.className,r=t.cx,i=t.getStyles;return(0,h.tZ)("div",{css:i("indicatorsContainer",t),className:r({indicators:!0},n)},e)},IndicatorSeparator:function(t){var e=t.className,n=t.cx,r=t.getStyles,o=t.innerProps;return(0,h.tZ)("span",(0,i.Z)({},o,{css:r("indicatorSeparator",t),className:n({"indicator-separator":!0},e)}))},Input:function(t){var e=t.className,n=t.cx,o=t.getStyles,a=t.innerRef,s=t.isHidden,u=t.isDisabled,l=t.theme,c=(t.selectProps,(0,r.Z)(t,["className","cx","getStyles","innerRef","isHidden","isDisabled","theme","selectProps"]));return(0,h.tZ)("div",{css:o("input",vt({theme:l},c))},(0,h.tZ)(v.Z,(0,i.Z)({className:n({input:!0},e),inputRef:a,inputStyle:bt(s),disabled:u},c)))},LoadingIndicator:ct,Menu:function(t){var e=t.children,n=t.className,r=t.cx,o=t.getStyles,a=t.innerRef,s=t.innerProps;return(0,h.tZ)("div",(0,i.Z)({css:o("menu",t),className:r({menu:!0},n)},s,{ref:a}),e)},MenuList:function(t){var e=t.children,n=t.className,r=t.cx,o=t.getStyles,a=t.isMulti,s=t.innerRef,u=t.innerProps;return(0,h.tZ)("div",(0,i.Z)({css:o("menuList",t),className:r({"menu-list":!0,"menu-list--is-multi":a},n),ref:s},u),e)},MenuPortal:U,LoadingMessage:z,NoOptionsMessage:B,MultiValue:kt,MultiValueContainer:Mt,MultiValueLabel:Et,MultiValueRemove:function(t){var e=t.children,n=t.innerProps;return(0,h.tZ)("div",n,e||(0,h.tZ)(et,{size:14}))},Option:function(t){var e=t.children,n=t.className,r=t.cx,o=t.getStyles,a=t.isDisabled,s=t.isFocused,u=t.isSelected,l=t.innerRef,c=t.innerProps;return(0,h.tZ)("div",(0,i.Z)({css:o("option",t),className:r({option:!0,"option--is-disabled":a,"option--is-focused":s,"option--is-selected":u},n),ref:l},c),e)},Placeholder:function(t){var e=t.children,n=t.className,r=t.cx,o=t.getStyles,a=t.innerProps;return(0,h.tZ)("div",(0,i.Z)({css:o("placeholder",t),className:r({placeholder:!0},n)},a),e)},SelectContainer:function(t){var e=t.children,n=t.className,r=t.cx,o=t.getStyles,a=t.innerProps,s=t.isDisabled,u=t.isRtl;return(0,h.tZ)("div",(0,i.Z)({css:o("container",t),className:r({"--is-disabled":s,"--is-rtl":u},n)},a),e)},SingleValue:function(t){var e=t.children,n=t.className,r=t.cx,o=t.getStyles,a=t.isDisabled,s=t.innerProps;return(0,h.tZ)("div",(0,i.Z)({css:o("singleValue",t),className:r({"single-value":!0,"single-value--is-disabled":a},n)},s),e)},ValueContainer:function(t){var e=t.children,n=t.className,r=t.cx,i=t.isMulti,o=t.getStyles,a=t.hasValue;return(0,h.tZ)("div",{css:o("valueContainer",t),className:r({"value-container":!0,"value-container--is-multi":i,"value-container--has-value":a},n)},e)}},It=function(t){return jt(jt({},Pt),t.components)}},20320:function(t,e,n){"use strict";n.r(e),n.d(e,{NonceProvider:function(){return ft},components:function(){return h.F},createFilter:function(){return D},default:function(){return dt},defaultTheme:function(){return et},mergeStyles:function(){return tt}});var r=n(15671),i=n(43144),o=n(60136),a=n(82963),s=n(61120),u=n(67294),l=n(30845),c=n(34412),f=n(73935),h=n(53569),d=n(45987),p=n(87462),m=n(40181);function g(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,l=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){l=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(t,e)||(0,m.Z)(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}for(var v=n(42982),y=n(4942),b=n(97326),x=n(93998),w=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],_=new RegExp("["+w.map((function(t){return t.letters})).join("")+"]","g"),S={},O=0;O<w.length;O++)for(var N=w[O],M=0;M<N.letters.length;M++)S[N.letters[M]]=N.base;var E=function(t){return t.replace(_,(function(t){return S[t]}))};function k(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var C=function(t){return t.replace(/^\s+|\s+$/g,"")},T=function(t){return"".concat(t.label," ").concat(t.value)},D=function(t){return function(e,n){var r=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?k(Object(n),!0).forEach((function(e){(0,y.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({ignoreCase:!0,ignoreAccents:!0,stringify:T,trim:!0,matchFrom:"any"},t),i=r.ignoreCase,o=r.ignoreAccents,a=r.stringify,s=r.trim,u=r.matchFrom,l=s?C(n):n,c=s?C(a(e)):a(e);return i&&(l=l.toLowerCase(),c=c.toLowerCase()),o&&(l=E(l),c=E(c)),"start"===u?c.substr(0,l.length)===l:c.indexOf(l)>-1}},A={name:"1laao21-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap;"},j=function(t){return(0,c.tZ)("span",(0,p.Z)({css:A},t))};function P(t){t.in,t.out,t.onExited,t.appear,t.enter,t.exit;var e=t.innerRef,n=(t.emotion,(0,d.Z)(t,["in","out","onExited","appear","enter","exit","innerRef","emotion"]));return(0,c.tZ)("input",(0,p.Z)({ref:e},n,{css:(0,x.Z)({label:"dummyInput",background:0,border:0,fontSize:"inherit",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(0)"},"")}))}var I=function(t){(0,o.Z)(l,t);var e,n,u=(e=l,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=(0,s.Z)(e);if(n){var i=(0,s.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,a.Z)(this,t)});function l(){return(0,r.Z)(this,l),u.apply(this,arguments)}return(0,i.Z)(l,[{key:"componentDidMount",value:function(){this.props.innerRef((0,f.findDOMNode)(this))}},{key:"componentWillUnmount",value:function(){this.props.innerRef(null)}},{key:"render",value:function(){return this.props.children}}]),l}(u.Component),R=["boxSizing","height","overflow","paddingRight","position"],L={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function F(t){t.preventDefault()}function q(t){t.stopPropagation()}function B(){var t=this.scrollTop,e=this.scrollHeight,n=t+this.offsetHeight;0===t?this.scrollTop=1:n===e&&(this.scrollTop=t-1)}function z(){return"ontouchstart"in window||navigator.maxTouchPoints}var H=!(!window.document||!window.document.createElement),U=0,W=function(t){(0,o.Z)(l,t);var e,n,u=(e=l,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=(0,s.Z)(e);if(n){var i=(0,s.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,a.Z)(this,t)});function l(){var t;(0,r.Z)(this,l);for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return(t=u.call.apply(u,[this].concat(n))).originalStyles={},t.listenerOptions={capture:!1,passive:!1},t}return(0,i.Z)(l,[{key:"componentDidMount",value:function(){var t=this;if(H){var e=this.props,n=e.accountForScrollbars,r=e.touchScrollTarget,i=document.body,o=i&&i.style;if(n&&R.forEach((function(e){var n=o&&o[e];t.originalStyles[e]=n})),n&&U<1){var a=parseInt(this.originalStyles.paddingRight,10)||0,s=document.body?document.body.clientWidth:0,u=window.innerWidth-s+a||0;Object.keys(L).forEach((function(t){var e=L[t];o&&(o[t]=e)})),o&&(o.paddingRight="".concat(u,"px"))}i&&z()&&(i.addEventListener("touchmove",F,this.listenerOptions),r&&(r.addEventListener("touchstart",B,this.listenerOptions),r.addEventListener("touchmove",q,this.listenerOptions))),U+=1}}},{key:"componentWillUnmount",value:function(){var t=this;if(H){var e=this.props,n=e.accountForScrollbars,r=e.touchScrollTarget,i=document.body,o=i&&i.style;U=Math.max(U-1,0),n&&U<1&&R.forEach((function(e){var n=t.originalStyles[e];o&&(o[e]=n)})),i&&z()&&(i.removeEventListener("touchmove",F,this.listenerOptions),r&&(r.removeEventListener("touchstart",B,this.listenerOptions),r.removeEventListener("touchmove",q,this.listenerOptions)))}}},{key:"render",value:function(){return null}}]),l}(u.Component);W.defaultProps={accountForScrollbars:!0};var V={name:"1dsbpcp",styles:"position:fixed;left:0;bottom:0;right:0;top:0;"},$=function(t){(0,o.Z)(l,t);var e,n,u=(e=l,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=(0,s.Z)(e);if(n){var i=(0,s.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,a.Z)(this,t)});function l(){var t;(0,r.Z)(this,l);for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return(t=u.call.apply(u,[this].concat(n))).state={touchScrollTarget:null},t.getScrollTarget=function(e){e!==t.state.touchScrollTarget&&t.setState({touchScrollTarget:e})},t.blurSelectInput=function(){document.activeElement&&document.activeElement.blur()},t}return(0,i.Z)(l,[{key:"render",value:function(){var t=this.props,e=t.children,n=t.isEnabled,r=this.state.touchScrollTarget;return n?(0,c.tZ)("div",null,(0,c.tZ)("div",{onClick:this.blurSelectInput,css:V}),(0,c.tZ)(I,{innerRef:this.getScrollTarget},e),r?(0,c.tZ)(W,{touchScrollTarget:r}):null):e}}]),l}(u.PureComponent);var Y=function(t){(0,o.Z)(c,t);var e,n,l=(e=c,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=(0,s.Z)(e);if(n){var i=(0,s.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,a.Z)(this,t)});function c(){var t;(0,r.Z)(this,c);for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return(t=l.call.apply(l,[this].concat(n))).isBottom=!1,t.isTop=!1,t.scrollTarget=void 0,t.touchStart=void 0,t.cancelScroll=function(t){t.preventDefault(),t.stopPropagation()},t.handleEventDelta=function(e,n){var r=t.props,i=r.onBottomArrive,o=r.onBottomLeave,a=r.onTopArrive,s=r.onTopLeave,u=t.scrollTarget,l=u.scrollTop,c=u.scrollHeight,f=u.clientHeight,h=t.scrollTarget,d=n>0,p=c-f-l,m=!1;p>n&&t.isBottom&&(o&&o(e),t.isBottom=!1),d&&t.isTop&&(s&&s(e),t.isTop=!1),d&&n>p?(i&&!t.isBottom&&i(e),h.scrollTop=c,m=!0,t.isBottom=!0):!d&&-n>l&&(a&&!t.isTop&&a(e),h.scrollTop=0,m=!0,t.isTop=!0),m&&t.cancelScroll(e)},t.onWheel=function(e){t.handleEventDelta(e,e.deltaY)},t.onTouchStart=function(e){t.touchStart=e.changedTouches[0].clientY},t.onTouchMove=function(e){var n=t.touchStart-e.changedTouches[0].clientY;t.handleEventDelta(e,n)},t.getScrollTarget=function(e){t.scrollTarget=e},t}return(0,i.Z)(c,[{key:"componentDidMount",value:function(){this.startListening(this.scrollTarget)}},{key:"componentWillUnmount",value:function(){this.stopListening(this.scrollTarget)}},{key:"startListening",value:function(t){t&&("function"==typeof t.addEventListener&&t.addEventListener("wheel",this.onWheel,!1),"function"==typeof t.addEventListener&&t.addEventListener("touchstart",this.onTouchStart,!1),"function"==typeof t.addEventListener&&t.addEventListener("touchmove",this.onTouchMove,!1))}},{key:"stopListening",value:function(t){t&&("function"==typeof t.removeEventListener&&t.removeEventListener("wheel",this.onWheel,!1),"function"==typeof t.removeEventListener&&t.removeEventListener("touchstart",this.onTouchStart,!1),"function"==typeof t.removeEventListener&&t.removeEventListener("touchmove",this.onTouchMove,!1))}},{key:"render",value:function(){return u.createElement(I,{innerRef:this.getScrollTarget},this.props.children)}}]),c}(u.Component);function Z(t){var e=t.isEnabled,n=void 0===e||e,r=(0,d.Z)(t,["isEnabled"]);return n?u.createElement(Y,r):r.children}var G=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.isSearchable,r=e.isMulti,i=e.label,o=e.isDisabled,a=e.tabSelectsValue;switch(t){case"menu":return"Use Up and Down to choose options".concat(o?"":", press Enter to select the currently focused option",", press Escape to exit the menu").concat(a?", press Tab to select the option and exit the menu":"",".");case"input":return"".concat(i||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value"}},K=function(t,e){var n=e.value,r=e.isDisabled;if(n)switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(n,", deselected.");case"select-option":return"option ".concat(n,r?" is disabled. Select another option.":", selected.")}},X=function(t){return!!t.isDisabled};function J(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var Q={clearIndicator:h.c,container:h.a,control:h.b,dropdownIndicator:h.d,group:h.g,groupHeading:h.e,indicatorsContainer:h.i,indicatorSeparator:h.f,input:h.h,loadingIndicator:h.l,loadingMessage:h.j,menu:h.m,menuList:h.k,menuPortal:h.n,multiValue:h.o,multiValueLabel:h.p,multiValueRemove:h.q,noOptionsMessage:h.r,option:h.s,placeholder:h.t,singleValue:h.u,valueContainer:h.v};function tt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?J(Object(n),!0).forEach((function(e){(0,y.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):J(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t);return Object.keys(e).forEach((function(r){t[r]?n[r]=function(n,i){return e[r](t[r](n,i),i)}:n[r]=e[r]})),n}var et={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}};function nt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function rt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?nt(Object(n),!0).forEach((function(e){(0,y.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var it={backspaceRemovesValue:!0,blurInputOnSelect:(0,h.w)(),captureMenuScroll:!(0,h.w)(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:D(),formatGroupLabel:function(t){return t.label},getOptionLabel:function(t){return t.label},getOptionValue:function(t){return t.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:X,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!(0,h.x)(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var e=t.count;return"".concat(e," result").concat(1!==e?"s":""," available")},styles:{},tabIndex:"0",tabSelectsValue:!0},ot=1,at=function(t){(0,o.Z)(f,t);var e,n,c=(e=f,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=(0,s.Z)(e);if(n){var i=(0,s.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,a.Z)(this,t)});function f(t){var e;(0,r.Z)(this,f),(e=c.call(this,t)).state={ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,menuOptions:{render:[],focusable:[]},selectValue:[]},e.blockOptionHover=!1,e.isComposing=!1,e.clearFocusValueOnUpdate=!1,e.commonProps=void 0,e.components=void 0,e.hasGroups=!1,e.initialTouchX=0,e.initialTouchY=0,e.inputIsHiddenAfterUpdate=void 0,e.instancePrefix="",e.openAfterFocus=!1,e.scrollToFocusedOptionOnUpdate=!1,e.userIsDragging=void 0,e.controlRef=null,e.getControlRef=function(t){e.controlRef=t},e.focusedOptionRef=null,e.getFocusedOptionRef=function(t){e.focusedOptionRef=t},e.menuListRef=null,e.getMenuListRef=function(t){e.menuListRef=t},e.inputRef=null,e.getInputRef=function(t){e.inputRef=t},e.cacheComponents=function(t){e.components=(0,h.y)({components:t})},e.focus=e.focusInput,e.blur=e.blurInput,e.onChange=function(t,n){var r=e.props,i=r.onChange,o=r.name;i(t,rt(rt({},n),{},{name:o}))},e.setValue=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",r=arguments.length>2?arguments[2]:void 0,i=e.props,o=i.closeMenuOnSelect,a=i.isMulti;e.onInputChange("",{action:"set-value"}),o&&(e.inputIsHiddenAfterUpdate=!a,e.onMenuClose()),e.clearFocusValueOnUpdate=!0,e.onChange(t,{action:n,option:r})},e.selectOption=function(t){var n=e.props,r=n.blurInputOnSelect,i=n.isMulti,o=e.state.selectValue;if(i)if(e.isOptionSelected(t,o)){var a=e.getOptionValue(t);e.setValue(o.filter((function(t){return e.getOptionValue(t)!==a})),"deselect-option",t),e.announceAriaLiveSelection({event:"deselect-option",context:{value:e.getOptionLabel(t)}})}else e.isOptionDisabled(t,o)?e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t),isDisabled:!0}}):(e.setValue([].concat((0,v.Z)(o),[t]),"select-option",t),e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t)}}));else e.isOptionDisabled(t,o)?e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t),isDisabled:!0}}):(e.setValue(t,"select-option"),e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t)}}));r&&e.blurInput()},e.removeValue=function(t){var n=e.state.selectValue,r=e.getOptionValue(t),i=n.filter((function(t){return e.getOptionValue(t)!==r}));e.onChange(i.length?i:null,{action:"remove-value",removedValue:t}),e.announceAriaLiveSelection({event:"remove-value",context:{value:t?e.getOptionLabel(t):""}}),e.focusInput()},e.clearValue=function(){e.onChange(null,{action:"clear"})},e.popValue=function(){var t=e.state.selectValue,n=t[t.length-1],r=t.slice(0,t.length-1);e.announceAriaLiveSelection({event:"pop-value",context:{value:n?e.getOptionLabel(n):""}}),e.onChange(r.length?r:null,{action:"pop-value",removedValue:n})},e.getValue=function(){return e.state.selectValue},e.cx=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return h.z.apply(void 0,[e.props.classNamePrefix].concat(n))},e.getOptionLabel=function(t){return e.props.getOptionLabel(t)},e.getOptionValue=function(t){return e.props.getOptionValue(t)},e.getStyles=function(t,n){var r=Q[t](n);r.boxSizing="border-box";var i=e.props.styles[t];return i?i(r,n):r},e.getElementId=function(t){return"".concat(e.instancePrefix,"-").concat(t)},e.getActiveDescendentId=function(){var t=e.props.menuIsOpen,n=e.state,r=n.menuOptions,i=n.focusedOption;if(i&&t){var o=r.focusable.indexOf(i),a=r.render[o];return a&&a.key}},e.announceAriaLiveSelection=function(t){var n=t.event,r=t.context;e.setState({ariaLiveSelection:K(n,r)})},e.announceAriaLiveContext=function(t){var n=t.event,r=t.context;e.setState({ariaLiveContext:G(n,rt(rt({},r),{},{label:e.props["aria-label"]}))})},e.onMenuMouseDown=function(t){0===t.button&&(t.stopPropagation(),t.preventDefault(),e.focusInput())},e.onMenuMouseMove=function(t){e.blockOptionHover=!1},e.onControlMouseDown=function(t){var n=e.props.openMenuOnClick;e.state.isFocused?e.props.menuIsOpen?"INPUT"!==t.target.tagName&&"TEXTAREA"!==t.target.tagName&&e.onMenuClose():n&&e.openMenu("first"):(n&&(e.openAfterFocus=!0),e.focusInput()),"INPUT"!==t.target.tagName&&"TEXTAREA"!==t.target.tagName&&t.preventDefault()},e.onDropdownIndicatorMouseDown=function(t){if(!(t&&"mousedown"===t.type&&0!==t.button||e.props.isDisabled)){var n=e.props,r=n.isMulti,i=n.menuIsOpen;e.focusInput(),i?(e.inputIsHiddenAfterUpdate=!r,e.onMenuClose()):e.openMenu("first"),t.preventDefault(),t.stopPropagation()}},e.onClearIndicatorMouseDown=function(t){t&&"mousedown"===t.type&&0!==t.button||(e.clearValue(),t.stopPropagation(),e.openAfterFocus=!1,"touchend"===t.type?e.focusInput():setTimeout((function(){return e.focusInput()})))},e.onScroll=function(t){"boolean"==typeof e.props.closeMenuOnScroll?t.target instanceof HTMLElement&&(0,h.A)(t.target)&&e.props.onMenuClose():"function"==typeof e.props.closeMenuOnScroll&&e.props.closeMenuOnScroll(t)&&e.props.onMenuClose()},e.onCompositionStart=function(){e.isComposing=!0},e.onCompositionEnd=function(){e.isComposing=!1},e.onTouchStart=function(t){var n=t.touches,r=n&&n.item(0);r&&(e.initialTouchX=r.clientX,e.initialTouchY=r.clientY,e.userIsDragging=!1)},e.onTouchMove=function(t){var n=t.touches,r=n&&n.item(0);if(r){var i=Math.abs(r.clientX-e.initialTouchX),o=Math.abs(r.clientY-e.initialTouchY);e.userIsDragging=i>5||o>5}},e.onTouchEnd=function(t){e.userIsDragging||(e.controlRef&&!e.controlRef.contains(t.target)&&e.menuListRef&&!e.menuListRef.contains(t.target)&&e.blurInput(),e.initialTouchX=0,e.initialTouchY=0)},e.onControlTouchEnd=function(t){e.userIsDragging||e.onControlMouseDown(t)},e.onClearIndicatorTouchEnd=function(t){e.userIsDragging||e.onClearIndicatorMouseDown(t)},e.onDropdownIndicatorTouchEnd=function(t){e.userIsDragging||e.onDropdownIndicatorMouseDown(t)},e.handleInputChange=function(t){var n=t.currentTarget.value;e.inputIsHiddenAfterUpdate=!1,e.onInputChange(n,{action:"input-change"}),e.props.menuIsOpen||e.onMenuOpen()},e.onInputFocus=function(t){var n=e.props,r=n.isSearchable,i=n.isMulti;e.props.onFocus&&e.props.onFocus(t),e.inputIsHiddenAfterUpdate=!1,e.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:i}}),e.setState({isFocused:!0}),(e.openAfterFocus||e.props.openMenuOnFocus)&&e.openMenu("first"),e.openAfterFocus=!1},e.onInputBlur=function(t){e.menuListRef&&e.menuListRef.contains(document.activeElement)?e.inputRef.focus():(e.props.onBlur&&e.props.onBlur(t),e.onInputChange("",{action:"input-blur"}),e.onMenuClose(),e.setState({focusedValue:null,isFocused:!1}))},e.onOptionHover=function(t){e.blockOptionHover||e.state.focusedOption===t||e.setState({focusedOption:t})},e.shouldHideSelectedOptions=function(){var t=e.props,n=t.hideSelectedOptions,r=t.isMulti;return void 0===n?r:n},e.onKeyDown=function(t){var n=e.props,r=n.isMulti,i=n.backspaceRemovesValue,o=n.escapeClearsValue,a=n.inputValue,s=n.isClearable,u=n.isDisabled,l=n.menuIsOpen,c=n.onKeyDown,f=n.tabSelectsValue,h=n.openMenuOnFocus,d=e.state,p=d.focusedOption,m=d.focusedValue,g=d.selectValue;if(!(u||"function"==typeof c&&(c(t),t.defaultPrevented))){switch(e.blockOptionHover=!0,t.key){case"ArrowLeft":if(!r||a)return;e.focusValue("previous");break;case"ArrowRight":if(!r||a)return;e.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(m)e.removeValue(m);else{if(!i)return;r?e.popValue():s&&e.clearValue()}break;case"Tab":if(e.isComposing)return;if(t.shiftKey||!l||!f||!p||h&&e.isOptionSelected(p,g))return;e.selectOption(p);break;case"Enter":if(229===t.keyCode)break;if(l){if(!p)return;if(e.isComposing)return;e.selectOption(p);break}return;case"Escape":l?(e.inputIsHiddenAfterUpdate=!1,e.onInputChange("",{action:"menu-close"}),e.onMenuClose()):s&&o&&e.clearValue();break;case" ":if(a)return;if(!l){e.openMenu("first");break}if(!p)return;e.selectOption(p);break;case"ArrowUp":l?e.focusOption("up"):e.openMenu("last");break;case"ArrowDown":l?e.focusOption("down"):e.openMenu("first");break;case"PageUp":if(!l)return;e.focusOption("pageup");break;case"PageDown":if(!l)return;e.focusOption("pagedown");break;case"Home":if(!l)return;e.focusOption("first");break;case"End":if(!l)return;e.focusOption("last");break;default:return}t.preventDefault()}},e.buildMenuOptions=function(t,n){var r=t.inputValue,i=void 0===r?"":r,o=t.options,a=function(t,r){var o=e.isOptionDisabled(t,n),a=e.isOptionSelected(t,n),s=e.getOptionLabel(t),u=e.getOptionValue(t);if(!(e.shouldHideSelectedOptions()&&a||!e.filterOption({label:s,value:u,data:t},i))){var l=o?void 0:function(){return e.onOptionHover(t)},c=o?void 0:function(){return e.selectOption(t)},f="".concat(e.getElementId("option"),"-").concat(r);return{innerProps:{id:f,onClick:c,onMouseMove:l,onMouseOver:l,tabIndex:-1},data:t,isDisabled:o,isSelected:a,key:f,label:s,type:"option",value:u}}};return o.reduce((function(t,n,r){if(n.options){e.hasGroups||(e.hasGroups=!0);var i=n.options.map((function(e,n){var i=a(e,"".concat(r,"-").concat(n));return i&&t.focusable.push(e),i})).filter(Boolean);if(i.length){var o="".concat(e.getElementId("group"),"-").concat(r);t.render.push({type:"group",key:o,data:n,options:i})}}else{var s=a(n,"".concat(r));s&&(t.render.push(s),t.focusable.push(n))}return t}),{render:[],focusable:[]})};var n=t.value;e.cacheComponents=(0,l.Z)(e.cacheComponents,h.B).bind((0,b.Z)(e)),e.cacheComponents(t.components),e.instancePrefix="react-select-"+(e.props.instanceId||++ot);var i=(0,h.C)(n);e.buildMenuOptions=(0,l.Z)(e.buildMenuOptions,(function(t,e){var n=g(t,2),r=n[0],i=n[1],o=g(e,2),a=o[0];return i===o[1]&&r.inputValue===a.inputValue&&r.options===a.options})).bind((0,b.Z)(e));var o=t.menuIsOpen?e.buildMenuOptions(t,i):{render:[],focusable:[]};return e.state.menuOptions=o,e.state.selectValue=i,e}return(0,i.Z)(f,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"UNSAFE_componentWillReceiveProps",value:function(t){var e=this.props,n=e.options,r=e.value,i=e.menuIsOpen,o=e.inputValue;if(this.cacheComponents(t.components),t.value!==r||t.options!==n||t.menuIsOpen!==i||t.inputValue!==o){var a=(0,h.C)(t.value),s=t.menuIsOpen?this.buildMenuOptions(t,a):{render:[],focusable:[]},u=this.getNextFocusedValue(a),l=this.getNextFocusedOption(s.focusable);this.setState({menuOptions:s,selectValue:a,focusedOption:l,focusedValue:u})}null!=this.inputIsHiddenAfterUpdate&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)}},{key:"componentDidUpdate",value:function(t){var e=this.props,n=e.isDisabled,r=e.menuIsOpen,i=this.state.isFocused;(i&&!n&&t.isDisabled||i&&r&&!t.menuIsOpen)&&this.focusInput(),i&&n&&!t.isDisabled&&this.setState({isFocused:!1},this.onMenuClose),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&((0,h.D)(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){var t=this.props,e=t.isSearchable,n=t.isMulti;this.announceAriaLiveContext({event:"input",context:{isSearchable:e,isMulti:n}}),this.onInputChange("",{action:"menu-close"}),this.props.onMenuClose()}},{key:"onInputChange",value:function(t,e){this.props.onInputChange(t,e)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(t){var e=this,n=this.state,r=n.selectValue,i=n.isFocused,o=this.buildMenuOptions(this.props,r),a=this.props,s=a.isMulti,u=a.tabSelectsValue,l="first"===t?0:o.focusable.length-1;if(!s){var c=o.focusable.indexOf(r[0]);c>-1&&(l=c)}this.scrollToFocusedOptionOnUpdate=!(i&&this.menuListRef),this.inputIsHiddenAfterUpdate=!1,this.setState({menuOptions:o,focusedValue:null,focusedOption:o.focusable[l]},(function(){e.onMenuOpen(),e.announceAriaLiveContext({event:"menu",context:{tabSelectsValue:u}})}))}},{key:"focusValue",value:function(t){var e=this.props,n=e.isMulti,r=e.isSearchable,i=this.state,o=i.selectValue,a=i.focusedValue;if(n){this.setState({focusedOption:null});var s=o.indexOf(a);a||(s=-1,this.announceAriaLiveContext({event:"value"}));var u=o.length-1,l=-1;if(o.length){switch(t){case"previous":l=0===s?0:-1===s?u:s-1;break;case"next":s>-1&&s<u&&(l=s+1)}-1===l&&this.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:n}}),this.setState({inputIsHidden:-1!==l,focusedValue:o[l]})}}}},{key:"focusOption",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",e=this.props,n=e.pageSize,r=e.tabSelectsValue,i=this.state,o=i.focusedOption,a=i.menuOptions.focusable;if(a.length){var s=0,u=a.indexOf(o);o||(u=-1,this.announceAriaLiveContext({event:"menu",context:{tabSelectsValue:r}})),"up"===t?s=u>0?u-1:a.length-1:"down"===t?s=(u+1)%a.length:"pageup"===t?(s=u-n)<0&&(s=0):"pagedown"===t?(s=u+n)>a.length-1&&(s=a.length-1):"last"===t&&(s=a.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:a[s],focusedValue:null}),this.announceAriaLiveContext({event:"menu",context:{isDisabled:X(a[s]),tabSelectsValue:r}})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(et):rt(rt({},et),this.props.theme):et}},{key:"getCommonProps",value:function(){var t=this.clearValue,e=this.cx,n=this.getStyles,r=this.getValue,i=this.setValue,o=this.selectOption,a=this.props,s=a.isMulti,u=a.isRtl,l=a.options;return{cx:e,clearValue:t,getStyles:n,getValue:r,hasValue:this.hasValue(),isMulti:s,isRtl:u,options:l,selectOption:o,setValue:i,selectProps:a,theme:this.getTheme()}}},{key:"getNextFocusedValue",value:function(t){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var e=this.state,n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r<t.length)return t[r]}return null}},{key:"getNextFocusedOption",value:function(t){var e=this.state.focusedOption;return e&&t.indexOf(e)>-1?e:t[0]}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.state.menuOptions.render.length}},{key:"countOptions",value:function(){return this.state.menuOptions.focusable.length}},{key:"isClearable",value:function(){var t=this.props,e=t.isClearable,n=t.isMulti;return void 0===e?n:e}},{key:"isOptionDisabled",value:function(t,e){return"function"==typeof this.props.isOptionDisabled&&this.props.isOptionDisabled(t,e)}},{key:"isOptionSelected",value:function(t,e){var n=this;if(e.indexOf(t)>-1)return!0;if("function"==typeof this.props.isOptionSelected)return this.props.isOptionSelected(t,e);var r=this.getOptionValue(t);return e.some((function(t){return n.getOptionValue(t)===r}))}},{key:"filterOption",value:function(t,e){return!this.props.filterOption||this.props.filterOption(t,e)}},{key:"formatOptionLabel",value:function(t,e){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(t,{context:e,inputValue:n,selectValue:r})}return this.getOptionLabel(t)}},{key:"formatGroupLabel",value:function(t){return this.props.formatGroupLabel(t)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"constructAriaLiveMessage",value:function(){var t=this.state,e=t.ariaLiveContext,n=t.selectValue,r=t.focusedValue,i=t.focusedOption,o=this.props,a=o.options,s=o.menuIsOpen,u=o.inputValue,l=o.screenReaderStatus,c=r?function(t){var e=t.focusedValue,n=t.selectValue;return"value ".concat((0,t.getOptionLabel)(e)," focused, ").concat(n.indexOf(e)+1," of ").concat(n.length,".")}({focusedValue:r,getOptionLabel:this.getOptionLabel,selectValue:n}):"",f=i&&s?function(t){var e=t.focusedOption,n=t.options;return"option ".concat((0,t.getOptionLabel)(e)," focused").concat(e.isDisabled?" disabled":"",", ").concat(n.indexOf(e)+1," of ").concat(n.length,".")}({focusedOption:i,getOptionLabel:this.getOptionLabel,options:a}):"",h=function(t){var e=t.inputValue;return"".concat(t.screenReaderMessage).concat(e?" for search term "+e:"",".")}({inputValue:u,screenReaderMessage:l({count:this.countOptions()})});return"".concat(c," ").concat(f," ").concat(h," ").concat(e)}},{key:"renderInput",value:function(){var t=this.props,e=t.isDisabled,n=t.isSearchable,r=t.inputId,i=t.inputValue,o=t.tabIndex,a=t.form,s=this.components.Input,l=this.state.inputIsHidden,c=r||this.getElementId("input"),f={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]};if(!n)return u.createElement(P,(0,p.Z)({id:c,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:h.E,onFocus:this.onInputFocus,readOnly:!0,disabled:e,tabIndex:o,form:a,value:""},f));var d=this.commonProps,m=d.cx,g=d.theme,v=d.selectProps;return u.createElement(s,(0,p.Z)({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:m,getStyles:this.getStyles,id:c,innerRef:this.getInputRef,isDisabled:e,isHidden:l,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,selectProps:v,spellCheck:"false",tabIndex:o,form:a,theme:g,type:"text",value:i},f))}},{key:"renderPlaceholderOrValue",value:function(){var t=this,e=this.components,n=e.MultiValue,r=e.MultiValueContainer,i=e.MultiValueLabel,o=e.MultiValueRemove,a=e.SingleValue,s=e.Placeholder,l=this.commonProps,c=this.props,f=c.controlShouldRenderValue,h=c.isDisabled,d=c.isMulti,m=c.inputValue,g=c.placeholder,v=this.state,y=v.selectValue,b=v.focusedValue,x=v.isFocused;if(!this.hasValue()||!f)return m?null:u.createElement(s,(0,p.Z)({},l,{key:"placeholder",isDisabled:h,isFocused:x}),g);if(d){var w=y.map((function(e,a){var s=e===b;return u.createElement(n,(0,p.Z)({},l,{components:{Container:r,Label:i,Remove:o},isFocused:s,isDisabled:h,key:"".concat(t.getOptionValue(e)).concat(a),index:a,removeProps:{onClick:function(){return t.removeValue(e)},onTouchEnd:function(){return t.removeValue(e)},onMouseDown:function(t){t.preventDefault(),t.stopPropagation()}},data:e}),t.formatOptionLabel(e,"value"))}));return w}if(m)return null;var _=y[0];return u.createElement(a,(0,p.Z)({},l,{data:_,isDisabled:h}),this.formatOptionLabel(_,"value"))}},{key:"renderClearIndicator",value:function(){var t=this.components.ClearIndicator,e=this.commonProps,n=this.props,r=n.isDisabled,i=n.isLoading,o=this.state.isFocused;if(!this.isClearable()||!t||r||!this.hasValue()||i)return null;var a={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return u.createElement(t,(0,p.Z)({},e,{innerProps:a,isFocused:o}))}},{key:"renderLoadingIndicator",value:function(){var t=this.components.LoadingIndicator,e=this.commonProps,n=this.props,r=n.isDisabled,i=n.isLoading,o=this.state.isFocused;return t&&i?u.createElement(t,(0,p.Z)({},e,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:o})):null}},{key:"renderIndicatorSeparator",value:function(){var t=this.components,e=t.DropdownIndicator,n=t.IndicatorSeparator;if(!e||!n)return null;var r=this.commonProps,i=this.props.isDisabled,o=this.state.isFocused;return u.createElement(n,(0,p.Z)({},r,{isDisabled:i,isFocused:o}))}},{key:"renderDropdownIndicator",value:function(){var t=this.components.DropdownIndicator;if(!t)return null;var e=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return u.createElement(t,(0,p.Z)({},e,{innerProps:i,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var t=this,e=this.components,n=e.Group,r=e.GroupHeading,i=e.Menu,o=e.MenuList,a=e.MenuPortal,s=e.LoadingMessage,l=e.NoOptionsMessage,c=e.Option,f=this.commonProps,m=this.state,g=m.focusedOption,v=m.menuOptions,y=this.props,b=y.captureMenuScroll,x=y.inputValue,w=y.isLoading,_=y.loadingMessage,S=y.minMenuHeight,O=y.maxMenuHeight,N=y.menuIsOpen,M=y.menuPlacement,E=y.menuPosition,k=y.menuPortalTarget,C=y.menuShouldBlockScroll,T=y.menuShouldScrollIntoView,D=y.noOptionsMessage,A=y.onMenuScrollToTop,j=y.onMenuScrollToBottom;if(!N)return null;var P,I=function(e){var n=g===e.data;return e.innerRef=n?t.getFocusedOptionRef:void 0,u.createElement(c,(0,p.Z)({},f,e,{isFocused:n}),t.formatOptionLabel(e.data,"menu"))};if(this.hasOptions())P=v.render.map((function(e){if("group"===e.type){e.type;var i=(0,d.Z)(e,["type"]),o="".concat(e.key,"-heading");return u.createElement(n,(0,p.Z)({},f,i,{Heading:r,headingProps:{id:o,data:e.data},label:t.formatGroupLabel(e.data)}),e.options.map((function(t){return I(t)})))}if("option"===e.type)return I(e)}));else if(w){var R=_({inputValue:x});if(null===R)return null;P=u.createElement(s,f,R)}else{var L=D({inputValue:x});if(null===L)return null;P=u.createElement(l,f,L)}var F={minMenuHeight:S,maxMenuHeight:O,menuPlacement:M,menuPosition:E,menuShouldScrollIntoView:T},q=u.createElement(h.M,(0,p.Z)({},f,F),(function(e){var n=e.ref,r=e.placerProps,a=r.placement,s=r.maxHeight;return u.createElement(i,(0,p.Z)({},f,F,{innerRef:n,innerProps:{onMouseDown:t.onMenuMouseDown,onMouseMove:t.onMenuMouseMove},isLoading:w,placement:a}),u.createElement(Z,{isEnabled:b,onTopArrive:A,onBottomArrive:j},u.createElement($,{isEnabled:C},u.createElement(o,(0,p.Z)({},f,{innerRef:t.getMenuListRef,isLoading:w,maxHeight:s}),P))))}));return k||"fixed"===E?u.createElement(a,(0,p.Z)({},f,{appendTo:k,controlElement:this.controlRef,menuPlacement:M,menuPosition:E}),q):q}},{key:"renderFormField",value:function(){var t=this,e=this.props,n=e.delimiter,r=e.isDisabled,i=e.isMulti,o=e.name,a=this.state.selectValue;if(o&&!r){if(i){if(n){var s=a.map((function(e){return t.getOptionValue(e)})).join(n);return u.createElement("input",{name:o,type:"hidden",value:s})}var l=a.length>0?a.map((function(e,n){return u.createElement("input",{key:"i-".concat(n),name:o,type:"hidden",value:t.getOptionValue(e)})})):u.createElement("input",{name:o,type:"hidden"});return u.createElement("div",null,l)}var c=a[0]?this.getOptionValue(a[0]):"";return u.createElement("input",{name:o,type:"hidden",value:c})}}},{key:"renderLiveRegion",value:function(){return this.state.isFocused?u.createElement(j,{"aria-live":"polite"},u.createElement("span",{id:"aria-selection-event"}," ",this.state.ariaLiveSelection),u.createElement("span",{id:"aria-context"}," ",this.constructAriaLiveMessage())):null}},{key:"render",value:function(){var t=this.components,e=t.Control,n=t.IndicatorsContainer,r=t.SelectContainer,i=t.ValueContainer,o=this.props,a=o.className,s=o.id,l=o.isDisabled,c=o.menuIsOpen,f=this.state.isFocused,h=this.commonProps=this.getCommonProps();return u.createElement(r,(0,p.Z)({},h,{className:a,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:l,isFocused:f}),this.renderLiveRegion(),u.createElement(e,(0,p.Z)({},h,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:l,isFocused:f,menuIsOpen:c}),u.createElement(i,(0,p.Z)({},h,{isDisabled:l}),this.renderPlaceholderOrValue(),this.renderInput()),u.createElement(n,(0,p.Z)({},h,{isDisabled:l}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}]),f}(u.Component);at.defaultProps=it,n(35639);var st=n(25755);var ut,lt,ct,ft=function(t){(0,o.Z)(h,t);var e,n,f=(e=h,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=(0,s.Z)(e);if(n){var i=(0,s.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,a.Z)(this,t)});function h(t){var e;return(0,r.Z)(this,h),(e=f.call(this,t)).createEmotionCache=function(t){return(0,st.Z)({nonce:t})},e.createEmotionCache=(0,l.Z)(e.createEmotionCache),e}return(0,i.Z)(h,[{key:"render",value:function(){var t=this.createEmotionCache(this.props.nonce);return u.createElement(c.nq,{value:t},this.props.children)}}]),h}(u.Component),ht=(ut=at,ct=lt=function(t){(0,o.Z)(c,t);var e,n,l=(e=c,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=(0,s.Z)(e);if(n){var i=(0,s.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,a.Z)(this,t)});function c(){var t;(0,r.Z)(this,c);for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return(t=l.call.apply(l,[this].concat(n))).select=void 0,t.state={inputValue:void 0!==t.props.inputValue?t.props.inputValue:t.props.defaultInputValue,menuIsOpen:void 0!==t.props.menuIsOpen?t.props.menuIsOpen:t.props.defaultMenuIsOpen,value:void 0!==t.props.value?t.props.value:t.props.defaultValue},t.onChange=function(e,n){t.callProp("onChange",e,n),t.setState({value:e})},t.onInputChange=function(e,n){var r=t.callProp("onInputChange",e,n);t.setState({inputValue:void 0!==r?r:e})},t.onMenuOpen=function(){t.callProp("onMenuOpen"),t.setState({menuIsOpen:!0})},t.onMenuClose=function(){t.callProp("onMenuClose"),t.setState({menuIsOpen:!1})},t}return(0,i.Z)(c,[{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"getProp",value:function(t){return void 0!==this.props[t]?this.props[t]:this.state[t]}},{key:"callProp",value:function(t){if("function"==typeof this.props[t]){for(var e,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return(e=this.props)[t].apply(e,r)}}},{key:"render",value:function(){var t=this,e=this.props,n=(e.defaultInputValue,e.defaultMenuIsOpen,e.defaultValue,(0,d.Z)(e,["defaultInputValue","defaultMenuIsOpen","defaultValue"]));return u.createElement(ut,(0,p.Z)({},n,{ref:function(e){t.select=e},inputValue:this.getProp("inputValue"),menuIsOpen:this.getProp("menuIsOpen"),onChange:this.onChange,onInputChange:this.onInputChange,onMenuClose:this.onMenuClose,onMenuOpen:this.onMenuOpen,value:this.getProp("value")}))}}]),c}(u.Component),lt.defaultProps={defaultInputValue:"",defaultMenuIsOpen:!1,defaultValue:null},ct),dt=ht},25224:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=(r=n(67294))&&r.__esModule?r:{default:r};e.default=function(){return i.default.createElement("svg",{width:"14",height:"11",viewBox:"0 0 14 11"},i.default.createElement("path",{d:"M11.264 0L5.26 6.004 2.103 2.847 0 4.95l5.26 5.26 8.108-8.107L11.264 0",fill:"#fff",fillRule:"evenodd"}))}},80888:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=n(67294),a=h(o),s=h(n(94184)),u=h(n(45697)),l=h(n(25224)),c=h(n(56963)),f=n(11520);function h(t){return t&&t.__esModule?t:{default:t}}var d=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.handleClick=n.handleClick.bind(n),n.handleTouchStart=n.handleTouchStart.bind(n),n.handleTouchMove=n.handleTouchMove.bind(n),n.handleTouchEnd=n.handleTouchEnd.bind(n),n.handleFocus=n.handleFocus.bind(n),n.handleBlur=n.handleBlur.bind(n),n.previouslyChecked=!(!t.checked&&!t.defaultChecked),n.state={checked:!(!t.checked&&!t.defaultChecked),hasFocus:!1},n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"componentDidUpdate",value:function(t){t.checked!==this.props.checked&&this.setState({checked:!!this.props.checked})}},{key:"handleClick",value:function(t){if(!this.props.disabled){var e=this.input;if(t.target!==e&&!this.moved)return this.previouslyChecked=e.checked,t.preventDefault(),e.focus(),void e.click();var n=this.props.hasOwnProperty("checked")?this.props.checked:e.checked;this.setState({checked:n})}}},{key:"handleTouchStart",value:function(t){this.props.disabled||(this.startX=(0,f.pointerCoord)(t).x,this.activated=!0)}},{key:"handleTouchMove",value:function(t){if(this.activated&&(this.moved=!0,this.startX)){var e=(0,f.pointerCoord)(t).x;this.state.checked&&e+15<this.startX?(this.setState({checked:!1}),this.startX=e,this.activated=!0):e-15>this.startX&&(this.setState({checked:!0}),this.startX=e,this.activated=e<this.startX+5)}}},{key:"handleTouchEnd",value:function(t){if(this.moved){var e=this.input;if(t.preventDefault(),this.startX){var n=(0,f.pointerCoord)(t).x;!0===this.previouslyChecked&&this.startX+4>n?this.previouslyChecked!==this.state.checked&&(this.setState({checked:!1}),this.previouslyChecked=this.state.checked,e.click()):this.startX-4<n&&this.previouslyChecked!==this.state.checked&&(this.setState({checked:!0}),this.previouslyChecked=this.state.checked,e.click()),this.activated=!1,this.startX=null,this.moved=!1}}}},{key:"handleFocus",value:function(t){var e=this.props.onFocus;e&&e(t),this.setState({hasFocus:!0})}},{key:"handleBlur",value:function(t){var e=this.props.onBlur;e&&e(t),this.setState({hasFocus:!1})}},{key:"getIcon",value:function(t){var n=this.props.icons;return n?void 0===n[t]?e.defaultProps.icons[t]:n[t]:null}},{key:"render",value:function(){var t=this,e=this.props,n=e.className,i=(e.icons,function(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}(e,["className","icons"])),o=(0,s.default)("react-toggle",{"react-toggle--checked":this.state.checked,"react-toggle--focus":this.state.hasFocus,"react-toggle--disabled":this.props.disabled},n);return a.default.createElement("div",{className:o,onClick:this.handleClick,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEnd},a.default.createElement("div",{className:"react-toggle-track"},a.default.createElement("div",{className:"react-toggle-track-check"},this.getIcon("checked")),a.default.createElement("div",{className:"react-toggle-track-x"},this.getIcon("unchecked"))),a.default.createElement("div",{className:"react-toggle-thumb"}),a.default.createElement("input",r({},i,{ref:function(e){t.input=e},onFocus:this.handleFocus,onBlur:this.handleBlur,className:"react-toggle-screenreader-only",type:"checkbox"})))}}]),e}(o.PureComponent);e.default=d,d.displayName="Toggle",d.defaultProps={icons:{checked:a.default.createElement(l.default,null),unchecked:a.default.createElement(c.default,null)}},d.propTypes={checked:u.default.bool,disabled:u.default.bool,defaultChecked:u.default.bool,onChange:u.default.func,onFocus:u.default.func,onBlur:u.default.func,className:u.default.string,name:u.default.string,value:u.default.string,id:u.default.string,"aria-labelledby":u.default.string,"aria-label":u.default.string,icons:u.default.oneOfType([u.default.bool,u.default.shape({checked:u.default.node,unchecked:u.default.node})])}},11520:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.pointerCoord=function(t){if(t){var e=t.changedTouches;if(e&&e.length>0){var n=e[0];return{x:n.clientX,y:n.clientY}}var r=t.pageX;if(void 0!==r)return{x:r,y:t.pageY}}return{x:0,y:0}}},56963:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=(r=n(67294))&&r.__esModule?r:{default:r};e.default=function(){return i.default.createElement("svg",{width:"10",height:"10",viewBox:"0 0 10 10"},i.default.createElement("path",{d:"M9.9 2.12L7.78 0 4.95 2.828 2.12 0 0 2.12l2.83 2.83L0 7.776 2.123 9.9 4.95 7.07 7.78 9.9 9.9 7.776 7.072 4.95 9.9 2.12",fill:"#fff",fillRule:"evenodd"}))}},51474:function(t,e,n){"use strict";function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function i(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s(){return s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},s.apply(this,arguments)}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function l(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}n.r(e),n.d(e,{MultiDrag:function(){return be},Sortable:function(){return Bt},Swap:function(){return ue}});var c=l(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),f=l(/Edge/i),h=l(/firefox/i),d=l(/safari/i)&&!l(/chrome/i)&&!l(/android/i),p=l(/iP(ad|od|hone)/i),m=l(/chrome/i)&&l(/android/i),g={capture:!1,passive:!1};function v(t,e,n){t.addEventListener(e,n,!c&&g)}function y(t,e,n){t.removeEventListener(e,n,!c&&g)}function b(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function x(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function w(t,e,n,r){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&b(t,e):b(t,e))||r&&t===n)return t;if(t===n)break}while(t=x(t))}return null}var _,S=/\s+/g;function O(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var r=(" "+t.className+" ").replace(S," ").replace(" "+e+" "," ");t.className=(r+(n?" "+e:"")).replace(S," ")}}function N(t,e,n){var r=t&&t.style;if(r){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in r||-1!==e.indexOf("webkit")||(e="-webkit-"+e),r[e]=n+("string"==typeof n?"":"px")}}function M(t,e){var n="";if("string"==typeof t)n=t;else do{var r=N(t,"transform");r&&"none"!==r&&(n=r+" "+n)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function E(t,e,n){if(t){var r=t.getElementsByTagName(e),i=0,o=r.length;if(n)for(;i<o;i++)n(r[i],i);return r}return[]}function k(){return document.scrollingElement||document.documentElement}function C(t,e,n,r,i){if(t.getBoundingClientRect||t===window){var o,a,s,u,l,f,h;if(t!==window&&t.parentNode&&t!==k()?(a=(o=t.getBoundingClientRect()).top,s=o.left,u=o.bottom,l=o.right,f=o.height,h=o.width):(a=0,s=0,u=window.innerHeight,l=window.innerWidth,f=window.innerHeight,h=window.innerWidth),(e||n)&&t!==window&&(i=i||t.parentNode,!c))do{if(i&&i.getBoundingClientRect&&("none"!==N(i,"transform")||n&&"static"!==N(i,"position"))){var d=i.getBoundingClientRect();a-=d.top+parseInt(N(i,"border-top-width")),s-=d.left+parseInt(N(i,"border-left-width")),u=a+o.height,l=s+o.width;break}}while(i=i.parentNode);if(r&&t!==window){var p=M(i||t),m=p&&p.a,g=p&&p.d;p&&(u=(a/=g)+(f/=g),l=(s/=m)+(h/=m))}return{top:a,left:s,bottom:u,right:l,width:h,height:f}}}function T(t,e,n){for(var r=I(t,!0),i=C(t)[e];r;){var o=C(r)[n];if(!("top"===n||"left"===n?i>=o:i<=o))return r;if(r===k())break;r=I(r,!1)}return!1}function D(t,e,n,r){for(var i=0,o=0,a=t.children;o<a.length;){if("none"!==a[o].style.display&&a[o]!==Bt.ghost&&(r||a[o]!==Bt.dragged)&&w(a[o],n.draggable,t,!1)){if(i===e)return a[o];i++}o++}return null}function A(t,e){for(var n=t.lastElementChild;n&&(n===Bt.ghost||"none"===N(n,"display")||e&&!b(n,e));)n=n.previousElementSibling;return n||null}function j(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===Bt.clone||e&&!b(t,e)||n++;return n}function P(t){var e=0,n=0,r=k();if(t)do{var i=M(t),o=i.a,a=i.d;e+=t.scrollLeft*o,n+=t.scrollTop*a}while(t!==r&&(t=t.parentNode));return[e,n]}function I(t,e){if(!t||!t.getBoundingClientRect)return k();var n=t,r=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=N(n);if(n.clientWidth<n.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!n.getBoundingClientRect||n===document.body)return k();if(r||e)return n;r=!0}}}while(n=n.parentNode);return k()}function R(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function L(t,e){return function(){if(!_){var n=arguments;1===n.length?t.call(this,n[0]):t.apply(this,n),_=setTimeout((function(){_=void 0}),e)}}}function F(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function q(t){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):n?n(t).clone(!0)[0]:t.cloneNode(!0)}function B(t,e){N(t,"position","absolute"),N(t,"top",e.top),N(t,"left",e.left),N(t,"width",e.width),N(t,"height",e.height)}function z(t){N(t,"position",""),N(t,"top",""),N(t,"left",""),N(t,"width",""),N(t,"height","")}var H="Sortable"+(new Date).getTime();var U=[],W={initializeByDefault:!0},V={mount:function(t){for(var e in W)W.hasOwnProperty(e)&&!(e in t)&&(t[e]=W[e]);U.forEach((function(e){if(e.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")})),U.push(t)},pluginEvent:function(t,e,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var o=t+"Global";U.forEach((function(r){e[r.pluginName]&&(e[r.pluginName][o]&&e[r.pluginName][o](i({sortable:e},n)),e.options[r.pluginName]&&e[r.pluginName][t]&&e[r.pluginName][t](i({sortable:e},n)))}))},initializePlugins:function(t,e,n,r){for(var i in U.forEach((function(r){var i=r.pluginName;if(t.options[i]||r.initializeByDefault){var o=new r(t,e,t.options);o.sortable=t,o.options=t.options,t[i]=o,s(n,o.defaults)}})),t.options)if(t.options.hasOwnProperty(i)){var o=this.modifyOption(t,i,t.options[i]);void 0!==o&&(t.options[i]=o)}},getEventProperties:function(t,e){var n={};return U.forEach((function(r){"function"==typeof r.eventProperties&&s(n,r.eventProperties.call(e[r.pluginName],t))})),n},modifyOption:function(t,e,n){var r;return U.forEach((function(i){t[i.pluginName]&&i.optionListeners&&"function"==typeof i.optionListeners[e]&&(r=i.optionListeners[e].call(t[i.pluginName],n))})),r}};function $(t){var e=t.sortable,n=t.rootEl,r=t.name,o=t.targetEl,a=t.cloneEl,s=t.toEl,u=t.fromEl,l=t.oldIndex,h=t.newIndex,d=t.oldDraggableIndex,p=t.newDraggableIndex,m=t.originalEvent,g=t.putSortable,v=t.extraEventProperties;if(e=e||n&&n[H]){var y,b=e.options,x="on"+r.charAt(0).toUpperCase()+r.substr(1);!window.CustomEvent||c||f?(y=document.createEvent("Event")).initEvent(r,!0,!0):y=new CustomEvent(r,{bubbles:!0,cancelable:!0}),y.to=s||n,y.from=u||n,y.item=o||n,y.clone=a,y.oldIndex=l,y.newIndex=h,y.oldDraggableIndex=d,y.newDraggableIndex=p,y.originalEvent=m,y.pullMode=g?g.lastPutMode:void 0;var w=i(i({},v),V.getEventProperties(r,e));for(var _ in w)y[_]=w[_];n&&n.dispatchEvent(y),b[x]&&b[x].call(e,y)}}var Y=["evt"],Z=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.evt,o=function(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}(n,Y);V.pluginEvent.bind(Bt)(t,e,i({dragEl:K,parentEl:X,ghostEl:J,rootEl:Q,nextEl:tt,lastDownEl:et,cloneEl:nt,cloneHidden:rt,dragStarted:gt,putSortable:lt,activeSortable:Bt.active,originalEvent:r,oldIndex:it,oldDraggableIndex:at,newIndex:ot,newDraggableIndex:st,hideGhostForTarget:Rt,unhideGhostForTarget:Lt,cloneNowHidden:function(){rt=!0},cloneNowShown:function(){rt=!1},dispatchSortableEvent:function(t){G({sortable:e,name:t,originalEvent:r})}},o))};function G(t){$(i({putSortable:lt,cloneEl:nt,targetEl:K,rootEl:Q,oldIndex:it,oldDraggableIndex:at,newIndex:ot,newDraggableIndex:st},t))}var K,X,J,Q,tt,et,nt,rt,it,ot,at,st,ut,lt,ct,ft,ht,dt,pt,mt,gt,vt,yt,bt,xt,wt=!1,_t=!1,St=[],Ot=!1,Nt=!1,Mt=[],Et=!1,kt=[],Ct="undefined"!=typeof document,Tt=p,Dt=f||c?"cssFloat":"float",At=Ct&&!m&&!p&&"draggable"in document.createElement("div"),jt=function(){if(Ct){if(c)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Pt=function(t,e){var n=N(t),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=D(t,0,e),o=D(t,1,e),a=i&&N(i),s=o&&N(o),u=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+C(i).width,l=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+C(o).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&a.float&&"none"!==a.float){var c="left"===a.float?"left":"right";return!o||"both"!==s.clear&&s.clear!==c?"horizontal":"vertical"}return i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||u>=r&&"none"===n[Dt]||o&&"none"===n[Dt]&&u+l>r)?"vertical":"horizontal"},It=function(t){function e(t,n){return function(r,i,o,a){var s=r.options.group.name&&i.options.group.name&&r.options.group.name===i.options.group.name;if(null==t&&(n||s))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"==typeof t)return e(t(r,i,o,a),n)(r,i,o,a);var u=(n?r:i).options.group.name;return!0===t||"string"==typeof t&&t===u||t.join&&t.indexOf(u)>-1}}var n={},r=t.group;r&&"object"==o(r)||(r={name:r}),n.name=r.name,n.checkPull=e(r.pull,!0),n.checkPut=e(r.put),n.revertClone=r.revertClone,t.group=n},Rt=function(){!jt&&J&&N(J,"display","none")},Lt=function(){!jt&&J&&N(J,"display","")};Ct&&!m&&document.addEventListener("click",(function(t){if(_t)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),_t=!1,!1}),!0);var Ft=function(t){if(K){t=t.touches?t.touches[0]:t;var e=(i=t.clientX,o=t.clientY,St.some((function(t){var e=t[H].options.emptyInsertThreshold;if(e&&!A(t)){var n=C(t),r=i>=n.left-e&&i<=n.right+e,s=o>=n.top-e&&o<=n.bottom+e;return r&&s?a=t:void 0}})),a);if(e){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[H]._onDragOver(n)}}var i,o,a},qt=function(t){K&&K.parentNode[H]._isOutsideThisEl(t.target)};function Bt(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=s({},e),t[H]=this;var n,r,o={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Pt(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Bt.supportPointer&&"PointerEvent"in window&&!d,emptyInsertThreshold:5};for(var a in V.initializePlugins(this,t,o),o)!(a in e)&&(e[a]=o[a]);for(var u in It(e),this)"_"===u.charAt(0)&&"function"==typeof this[u]&&(this[u]=this[u].bind(this));this.nativeDraggable=!e.forceFallback&&At,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?v(t,"pointerdown",this._onTapStart):(v(t,"mousedown",this._onTapStart),v(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(v(t,"dragover",this),v(t,"dragenter",this)),St.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),s(this,(r=[],{captureAnimationState:function(){r=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(t){if("none"!==N(t,"display")&&t!==Bt.ghost){r.push({target:t,rect:C(t)});var e=i({},r[r.length-1].rect);if(t.thisAnimationDuration){var n=M(t,!0);n&&(e.top-=n.f,e.left-=n.e)}t.fromRect=e}}))},addAnimationState:function(t){r.push(t)},removeAnimationState:function(t){r.splice(function(t,e){for(var n in t)if(t.hasOwnProperty(n))for(var r in e)if(e.hasOwnProperty(r)&&e[r]===t[n][r])return Number(n);return-1}(r,{target:t}),1)},animateAll:function(t){var e=this;if(!this.options.animation)return clearTimeout(n),void("function"==typeof t&&t());var i=!1,o=0;r.forEach((function(t){var n=0,r=t.target,a=r.fromRect,s=C(r),u=r.prevFromRect,l=r.prevToRect,c=t.rect,f=M(r,!0);f&&(s.top-=f.f,s.left-=f.e),r.toRect=s,r.thisAnimationDuration&&R(u,s)&&!R(a,s)&&(c.top-s.top)/(c.left-s.left)==(a.top-s.top)/(a.left-s.left)&&(n=function(t,e,n,r){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*r.animation}(c,u,l,e.options)),R(s,a)||(r.prevFromRect=a,r.prevToRect=s,n||(n=e.options.animation),e.animate(r,c,s,n)),n&&(i=!0,o=Math.max(o,n),clearTimeout(r.animationResetTimer),r.animationResetTimer=setTimeout((function(){r.animationTime=0,r.prevFromRect=null,r.fromRect=null,r.prevToRect=null,r.thisAnimationDuration=null}),n),r.thisAnimationDuration=n)})),clearTimeout(n),i?n=setTimeout((function(){"function"==typeof t&&t()}),o):"function"==typeof t&&t(),r=[]},animate:function(t,e,n,r){if(r){N(t,"transition",""),N(t,"transform","");var i=M(this.el),o=i&&i.a,a=i&&i.d,s=(e.left-n.left)/(o||1),u=(e.top-n.top)/(a||1);t.animatingX=!!s,t.animatingY=!!u,N(t,"transform","translate3d("+s+"px,"+u+"px,0)"),this.forRepaintDummy=function(t){return t.offsetWidth}(t),N(t,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),N(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){N(t,"transition",""),N(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),r)}}}))}function zt(t,e,n,r,i,o,a,s){var u,l,h=t[H],d=h.options.onMove;return!window.CustomEvent||c||f?(u=document.createEvent("Event")).initEvent("move",!0,!0):u=new CustomEvent("move",{bubbles:!0,cancelable:!0}),u.to=e,u.from=t,u.dragged=n,u.draggedRect=r,u.related=i||e,u.relatedRect=o||C(e),u.willInsertAfter=s,u.originalEvent=a,t.dispatchEvent(u),d&&(l=d.call(h,u,a)),l}function Ht(t){t.draggable=!1}function Ut(){Et=!1}function Wt(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,r=0;n--;)r+=e.charCodeAt(n);return r.toString(36)}function Vt(t){return setTimeout(t,0)}function $t(t){return clearTimeout(t)}Bt.prototype={constructor:Bt,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(vt=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,K):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,r=this.options,i=r.preventOnFilter,o=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,s=(a||t).target,u=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,l=r.filter;if(function(t){kt.length=0;for(var e=t.getElementsByTagName("input"),n=e.length;n--;){var r=e[n];r.checked&&kt.push(r)}}(n),!K&&!(/mousedown|pointerdown/.test(o)&&0!==t.button||r.disabled)&&!u.isContentEditable&&(this.nativeDraggable||!d||!s||"SELECT"!==s.tagName.toUpperCase())&&!((s=w(s,r.draggable,n,!1))&&s.animated||et===s)){if(it=j(s),at=j(s,r.draggable),"function"==typeof l){if(l.call(this,t,s,this))return G({sortable:e,rootEl:u,name:"filter",targetEl:s,toEl:n,fromEl:n}),Z("filter",e,{evt:t}),void(i&&t.cancelable&&t.preventDefault())}else if(l&&(l=l.split(",").some((function(r){if(r=w(u,r.trim(),n,!1))return G({sortable:e,rootEl:r,name:"filter",targetEl:s,fromEl:n,toEl:n}),Z("filter",e,{evt:t}),!0}))))return void(i&&t.cancelable&&t.preventDefault());r.handle&&!w(u,r.handle,n,!1)||this._prepareDragStart(t,a,s)}}},_prepareDragStart:function(t,e,n){var r,i=this,o=i.el,a=i.options,s=o.ownerDocument;if(n&&!K&&n.parentNode===o){var u=C(n);if(Q=o,X=(K=n).parentNode,tt=K.nextSibling,et=n,ut=a.group,Bt.dragged=K,ct={target:K,clientX:(e||t).clientX,clientY:(e||t).clientY},pt=ct.clientX-u.left,mt=ct.clientY-u.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,K.style["will-change"]="all",r=function(){Z("delayEnded",i,{evt:t}),Bt.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!h&&i.nativeDraggable&&(K.draggable=!0),i._triggerDragStart(t,e),G({sortable:i,name:"choose",originalEvent:t}),O(K,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){E(K,t.trim(),Ht)})),v(s,"dragover",Ft),v(s,"mousemove",Ft),v(s,"touchmove",Ft),v(s,"mouseup",i._onDrop),v(s,"touchend",i._onDrop),v(s,"touchcancel",i._onDrop),h&&this.nativeDraggable&&(this.options.touchStartThreshold=4,K.draggable=!0),Z("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(f||c))r();else{if(Bt.eventCanceled)return void this._onDrop();v(s,"mouseup",i._disableDelayedDrag),v(s,"touchend",i._disableDelayedDrag),v(s,"touchcancel",i._disableDelayedDrag),v(s,"mousemove",i._delayedDragTouchMoveHandler),v(s,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&v(s,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(r,a.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){K&&Ht(K),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;y(t,"mouseup",this._disableDelayedDrag),y(t,"touchend",this._disableDelayedDrag),y(t,"touchcancel",this._disableDelayedDrag),y(t,"mousemove",this._delayedDragTouchMoveHandler),y(t,"touchmove",this._delayedDragTouchMoveHandler),y(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?v(document,"pointermove",this._onTouchMove):v(document,e?"touchmove":"mousemove",this._onTouchMove):(v(K,"dragend",this),v(Q,"dragstart",this._onDragStart));try{document.selection?Vt((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(wt=!1,Q&&K){Z("dragStarted",this,{evt:e}),this.nativeDraggable&&v(document,"dragover",qt);var n=this.options;!t&&O(K,n.dragClass,!1),O(K,n.ghostClass,!0),Bt.active=this,t&&this._appendGhost(),G({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(ft){this._lastX=ft.clientX,this._lastY=ft.clientY,Rt();for(var t=document.elementFromPoint(ft.clientX,ft.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(ft.clientX,ft.clientY))!==e;)e=t;if(K.parentNode[H]._isOutsideThisEl(t),e)do{if(e[H]&&e[H]._onDragOver({clientX:ft.clientX,clientY:ft.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break;t=e}while(e=e.parentNode);Lt()}},_onTouchMove:function(t){if(ct){var e=this.options,n=e.fallbackTolerance,r=e.fallbackOffset,i=t.touches?t.touches[0]:t,o=J&&M(J,!0),a=J&&o&&o.a,s=J&&o&&o.d,u=Tt&&xt&&P(xt),l=(i.clientX-ct.clientX+r.x)/(a||1)+(u?u[0]-Mt[0]:0)/(a||1),c=(i.clientY-ct.clientY+r.y)/(s||1)+(u?u[1]-Mt[1]:0)/(s||1);if(!Bt.active&&!wt){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(J){o?(o.e+=l-(ht||0),o.f+=c-(dt||0)):o={a:1,b:0,c:0,d:1,e:l,f:c};var f="matrix(".concat(o.a,",").concat(o.b,",").concat(o.c,",").concat(o.d,",").concat(o.e,",").concat(o.f,")");N(J,"webkitTransform",f),N(J,"mozTransform",f),N(J,"msTransform",f),N(J,"transform",f),ht=l,dt=c,ft=i}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!J){var t=this.options.fallbackOnBody?document.body:Q,e=C(K,!0,Tt,!0,t),n=this.options;if(Tt){for(xt=t;"static"===N(xt,"position")&&"none"===N(xt,"transform")&&xt!==document;)xt=xt.parentNode;xt!==document.body&&xt!==document.documentElement?(xt===document&&(xt=k()),e.top+=xt.scrollTop,e.left+=xt.scrollLeft):xt=k(),Mt=P(xt)}O(J=K.cloneNode(!0),n.ghostClass,!1),O(J,n.fallbackClass,!0),O(J,n.dragClass,!0),N(J,"transition",""),N(J,"transform",""),N(J,"box-sizing","border-box"),N(J,"margin",0),N(J,"top",e.top),N(J,"left",e.left),N(J,"width",e.width),N(J,"height",e.height),N(J,"opacity","0.8"),N(J,"position",Tt?"absolute":"fixed"),N(J,"zIndex","100000"),N(J,"pointerEvents","none"),Bt.ghost=J,t.appendChild(J),N(J,"transform-origin",pt/parseInt(J.style.width)*100+"% "+mt/parseInt(J.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,r=t.dataTransfer,i=n.options;Z("dragStart",this,{evt:t}),Bt.eventCanceled?this._onDrop():(Z("setupClone",this),Bt.eventCanceled||((nt=q(K)).removeAttribute("id"),nt.draggable=!1,nt.style["will-change"]="",this._hideClone(),O(nt,this.options.chosenClass,!1),Bt.clone=nt),n.cloneId=Vt((function(){Z("clone",n),Bt.eventCanceled||(n.options.removeCloneOnHide||Q.insertBefore(nt,K),n._hideClone(),G({sortable:n,name:"clone"}))})),!e&&O(K,i.dragClass,!0),e?(_t=!0,n._loopId=setInterval(n._emulateDragOver,50)):(y(document,"mouseup",n._onDrop),y(document,"touchend",n._onDrop),y(document,"touchcancel",n._onDrop),r&&(r.effectAllowed="move",i.setData&&i.setData.call(n,r,K)),v(document,"drop",n),N(K,"transform","translateZ(0)")),wt=!0,n._dragStartId=Vt(n._dragStarted.bind(n,e,t)),v(document,"selectstart",n),gt=!0,d&&N(document.body,"user-select","none"))},_onDragOver:function(t){var e,n,r,o,a=this.el,s=t.target,u=this.options,l=u.group,c=Bt.active,f=ut===l,h=u.sort,d=lt||c,p=this,m=!1;if(!Et){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),s=w(s,u.draggable,a,!0),q("dragOver"),Bt.eventCanceled)return m;if(K.contains(t.target)||s.animated&&s.animatingX&&s.animatingY||p._ignoreWhileAnimating===s)return z(!1);if(_t=!1,c&&!u.disabled&&(f?h||(r=X!==Q):lt===this||(this.lastPutMode=ut.checkPull(this,c,K,t))&&l.checkPut(this,c,K,t))){if(o="vertical"===this._getDirection(t,s),e=C(K),q("dragOverValid"),Bt.eventCanceled)return m;if(r)return X=Q,B(),this._hideClone(),q("revert"),Bt.eventCanceled||(tt?Q.insertBefore(K,tt):Q.appendChild(K)),z(!0);var g=A(a,u.draggable);if(!g||function(t,e,n){var r=C(A(n.el,n.options.draggable));return e?t.clientX>r.right+10||t.clientX<=r.right&&t.clientY>r.bottom&&t.clientX>=r.left:t.clientX>r.right&&t.clientY>r.top||t.clientX<=r.right&&t.clientY>r.bottom+10}(t,o,this)&&!g.animated){if(g===K)return z(!1);if(g&&a===t.target&&(s=g),s&&(n=C(s)),!1!==zt(Q,a,K,e,s,n,t,!!s))return B(),g&&g.nextSibling?a.insertBefore(K,g.nextSibling):a.appendChild(K),X=a,U(),z(!0)}else if(g&&function(t,e,n){var r=C(D(n.el,0,n.options,!0));return e?t.clientX<r.left-10||t.clientY<r.top&&t.clientX<r.right:t.clientY<r.top-10||t.clientY<r.bottom&&t.clientX<r.left}(t,o,this)){var v=D(a,0,u,!0);if(v===K)return z(!1);if(n=C(s=v),!1!==zt(Q,a,K,e,s,n,t,!1))return B(),a.insertBefore(K,v),X=a,U(),z(!0)}else if(s.parentNode===a){n=C(s);var y,b,x,_=K.parentNode!==a,S=!function(t,e,n){var r=n?t.left:t.top,i=n?t.right:t.bottom,o=n?t.width:t.height,a=n?e.left:e.top,s=n?e.right:e.bottom,u=n?e.width:e.height;return r===a||i===s||r+o/2===a+u/2}(K.animated&&K.toRect||e,s.animated&&s.toRect||n,o),M=o?"top":"left",E=T(s,"top","top")||T(K,"top","top"),k=E?E.scrollTop:void 0;if(vt!==s&&(b=n[M],Ot=!1,Nt=!S&&u.invertSwap||_),y=function(t,e,n,r,i,o,a,s){var u=r?t.clientY:t.clientX,l=r?n.height:n.width,c=r?n.top:n.left,f=r?n.bottom:n.right,h=!1;if(!a)if(s&&bt<l*i){if(!Ot&&(1===yt?u>c+l*o/2:u<f-l*o/2)&&(Ot=!0),Ot)h=!0;else if(1===yt?u<c+bt:u>f-bt)return-yt}else if(u>c+l*(1-i)/2&&u<f-l*(1-i)/2)return function(t){return j(K)<j(t)?1:-1}(e);return(h=h||a)&&(u<c+l*o/2||u>f-l*o/2)?u>c+l/2?1:-1:0}(t,s,n,o,S?1:u.swapThreshold,null==u.invertedSwapThreshold?u.swapThreshold:u.invertedSwapThreshold,Nt,vt===s),0!==y){var P=j(K);do{P-=y,x=X.children[P]}while(x&&("none"===N(x,"display")||x===J))}if(0===y||x===s)return z(!1);vt=s,yt=y;var I=s.nextElementSibling,R=!1,L=zt(Q,a,K,e,s,n,t,R=1===y);if(!1!==L)return 1!==L&&-1!==L||(R=1===L),Et=!0,setTimeout(Ut,30),B(),R&&!I?a.appendChild(K):s.parentNode.insertBefore(K,R?I:s),E&&F(E,0,k-E.scrollTop),X=K.parentNode,void 0===b||Nt||(bt=Math.abs(b-C(s)[M])),U(),z(!0)}if(a.contains(K))return z(!1)}return!1}function q(u,l){Z(u,p,i({evt:t,isOwner:f,axis:o?"vertical":"horizontal",revert:r,dragRect:e,targetRect:n,canSort:h,fromSortable:d,target:s,completed:z,onMove:function(n,r){return zt(Q,a,K,e,n,C(n),t,r)},changed:U},l))}function B(){q("dragOverAnimationCapture"),p.captureAnimationState(),p!==d&&d.captureAnimationState()}function z(e){return q("dragOverCompleted",{insertion:e}),e&&(f?c._hideClone():c._showClone(p),p!==d&&(O(K,lt?lt.options.ghostClass:c.options.ghostClass,!1),O(K,u.ghostClass,!0)),lt!==p&&p!==Bt.active?lt=p:p===Bt.active&<&&(lt=null),d===p&&(p._ignoreWhileAnimating=s),p.animateAll((function(){q("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==d&&(d.animateAll(),d._ignoreWhileAnimating=null)),(s===K&&!K.animated||s===a&&!s.animated)&&(vt=null),u.dragoverBubble||t.rootEl||s===document||(K.parentNode[H]._isOutsideThisEl(t.target),!e&&Ft(t)),!u.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),m=!0}function U(){ot=j(K),st=j(K,u.draggable),G({sortable:p,name:"change",toEl:a,newIndex:ot,newDraggableIndex:st,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){y(document,"mousemove",this._onTouchMove),y(document,"touchmove",this._onTouchMove),y(document,"pointermove",this._onTouchMove),y(document,"dragover",Ft),y(document,"mousemove",Ft),y(document,"touchmove",Ft)},_offUpEvents:function(){var t=this.el.ownerDocument;y(t,"mouseup",this._onDrop),y(t,"touchend",this._onDrop),y(t,"pointerup",this._onDrop),y(t,"touchcancel",this._onDrop),y(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;ot=j(K),st=j(K,n.draggable),Z("drop",this,{evt:t}),X=K&&K.parentNode,ot=j(K),st=j(K,n.draggable),Bt.eventCanceled||(wt=!1,Nt=!1,Ot=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),$t(this.cloneId),$t(this._dragStartId),this.nativeDraggable&&(y(document,"drop",this),y(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),d&&N(document.body,"user-select",""),N(K,"transform",""),t&&(gt&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),J&&J.parentNode&&J.parentNode.removeChild(J),(Q===X||lt&&"clone"!==lt.lastPutMode)&&nt&&nt.parentNode&&nt.parentNode.removeChild(nt),K&&(this.nativeDraggable&&y(K,"dragend",this),Ht(K),K.style["will-change"]="",gt&&!wt&&O(K,lt?lt.options.ghostClass:this.options.ghostClass,!1),O(K,this.options.chosenClass,!1),G({sortable:this,name:"unchoose",toEl:X,newIndex:null,newDraggableIndex:null,originalEvent:t}),Q!==X?(ot>=0&&(G({rootEl:X,name:"add",toEl:X,fromEl:Q,originalEvent:t}),G({sortable:this,name:"remove",toEl:X,originalEvent:t}),G({rootEl:X,name:"sort",toEl:X,fromEl:Q,originalEvent:t}),G({sortable:this,name:"sort",toEl:X,originalEvent:t})),lt&<.save()):ot!==it&&ot>=0&&(G({sortable:this,name:"update",toEl:X,originalEvent:t}),G({sortable:this,name:"sort",toEl:X,originalEvent:t})),Bt.active&&(null!=ot&&-1!==ot||(ot=it,st=at),G({sortable:this,name:"end",toEl:X,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){Z("nulling",this),Q=K=X=J=tt=nt=et=rt=ct=ft=gt=ot=st=it=at=vt=yt=lt=ut=Bt.dragged=Bt.ghost=Bt.clone=Bt.active=null,kt.forEach((function(t){t.checked=!0})),kt.length=ht=dt=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":K&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,r=0,i=n.length,o=this.options;r<i;r++)w(t=n[r],o.draggable,this.el,!1)&&e.push(t.getAttribute(o.dataIdAttr)||Wt(t));return e},sort:function(t,e){var n={},r=this.el;this.toArray().forEach((function(t,e){var i=r.children[e];w(i,this.options.draggable,r,!1)&&(n[t]=i)}),this),e&&this.captureAnimationState(),t.forEach((function(t){n[t]&&(r.removeChild(n[t]),r.appendChild(n[t]))})),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return w(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(void 0===e)return n[t];var r=V.modifyOption(this,t,e);n[t]=void 0!==r?r:e,"group"===t&&It(n)},destroy:function(){Z("destroy",this);var t=this.el;t[H]=null,y(t,"mousedown",this._onTapStart),y(t,"touchstart",this._onTapStart),y(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(y(t,"dragover",this),y(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),St.splice(St.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!rt){if(Z("hideClone",this),Bt.eventCanceled)return;N(nt,"display","none"),this.options.removeCloneOnHide&&nt.parentNode&&nt.parentNode.removeChild(nt),rt=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(rt){if(Z("showClone",this),Bt.eventCanceled)return;K.parentNode!=Q||this.options.group.revertClone?tt?Q.insertBefore(nt,tt):Q.appendChild(nt):Q.insertBefore(nt,K),this.options.group.revertClone&&this.animate(K,nt),N(nt,"display",""),rt=!1}}else this._hideClone()}},Ct&&v(document,"touchmove",(function(t){(Bt.active||wt)&&t.cancelable&&t.preventDefault()})),Bt.utils={on:v,off:y,css:N,find:E,is:function(t,e){return!!w(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},throttle:L,closest:w,toggleClass:O,clone:q,index:j,nextTick:Vt,cancelNextTick:$t,detectDirection:Pt,getChild:D},Bt.get=function(t){return t[H]},Bt.mount=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e[0].constructor===Array&&(e=e[0]),e.forEach((function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(Bt.utils=i(i({},Bt.utils),t.utils)),V.mount(t)}))},Bt.create=function(t,e){return new Bt(t,e)},Bt.version="1.15.0";var Yt,Zt,Gt,Kt,Xt,Jt,Qt=[],te=!1;function ee(){Qt.forEach((function(t){clearInterval(t.pid)})),Qt=[]}function ne(){clearInterval(Jt)}var re,ie=L((function(t,e,n,r){if(e.scroll){var i,o=(t.touches?t.touches[0]:t).clientX,a=(t.touches?t.touches[0]:t).clientY,s=e.scrollSensitivity,u=e.scrollSpeed,l=k(),c=!1;Zt!==n&&(Zt=n,ee(),Yt=e.scroll,i=e.scrollFn,!0===Yt&&(Yt=I(n,!0)));var f=0,h=Yt;do{var d=h,p=C(d),m=p.top,g=p.bottom,v=p.left,y=p.right,b=p.width,x=p.height,w=void 0,_=void 0,S=d.scrollWidth,O=d.scrollHeight,M=N(d),E=d.scrollLeft,T=d.scrollTop;d===l?(w=b<S&&("auto"===M.overflowX||"scroll"===M.overflowX||"visible"===M.overflowX),_=x<O&&("auto"===M.overflowY||"scroll"===M.overflowY||"visible"===M.overflowY)):(w=b<S&&("auto"===M.overflowX||"scroll"===M.overflowX),_=x<O&&("auto"===M.overflowY||"scroll"===M.overflowY));var D=w&&(Math.abs(y-o)<=s&&E+b<S)-(Math.abs(v-o)<=s&&!!E),A=_&&(Math.abs(g-a)<=s&&T+x<O)-(Math.abs(m-a)<=s&&!!T);if(!Qt[f])for(var j=0;j<=f;j++)Qt[j]||(Qt[j]={});Qt[f].vx==D&&Qt[f].vy==A&&Qt[f].el===d||(Qt[f].el=d,Qt[f].vx=D,Qt[f].vy=A,clearInterval(Qt[f].pid),0==D&&0==A||(c=!0,Qt[f].pid=setInterval(function(){r&&0===this.layer&&Bt.active._onTouchMove(Xt);var e=Qt[this.layer].vy?Qt[this.layer].vy*u:0,n=Qt[this.layer].vx?Qt[this.layer].vx*u:0;"function"==typeof i&&"continue"!==i.call(Bt.dragged.parentNode[H],n,e,t,Xt,Qt[this.layer].el)||F(Qt[this.layer].el,n,e)}.bind({layer:f}),24))),f++}while(e.bubbleScroll&&h!==l&&(h=I(h,!1)));te=c}}),30),oe=function(t){var e=t.originalEvent,n=t.putSortable,r=t.dragEl,i=t.activeSortable,o=t.dispatchSortableEvent,a=t.hideGhostForTarget,s=t.unhideGhostForTarget;if(e){var u=n||i;a();var l=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,c=document.elementFromPoint(l.clientX,l.clientY);s(),u&&!u.el.contains(c)&&(o("spill"),this.onSpill({dragEl:r,putSortable:n}))}};function ae(){}function se(){}function ue(){function t(){this.defaults={swapClass:"sortable-swap-highlight"}}return t.prototype={dragStart:function(t){var e=t.dragEl;re=e},dragOverValid:function(t){var e=t.completed,n=t.target,r=t.onMove,i=t.activeSortable,o=t.changed,a=t.cancel;if(i.options.swap){var s=this.sortable.el,u=this.options;if(n&&n!==s){var l=re;!1!==r(n)?(O(n,u.swapClass,!0),re=n):re=null,l&&l!==re&&O(l,u.swapClass,!1)}o(),e(!0),a()}},drop:function(t){var e,n,r,i,o,a,s=t.activeSortable,u=t.putSortable,l=t.dragEl,c=u||this.sortable,f=this.options;re&&O(re,f.swapClass,!1),re&&(f.swap||u&&u.options.swap)&&l!==re&&(c.captureAnimationState(),c!==s&&s.captureAnimationState(),n=re,o=(e=l).parentNode,a=n.parentNode,o&&a&&!o.isEqualNode(n)&&!a.isEqualNode(e)&&(r=j(e),i=j(n),o.isEqualNode(a)&&r<i&&i++,o.insertBefore(n,o.children[r]),a.insertBefore(e,a.children[i])),c.animateAll(),c!==s&&s.animateAll())},nulling:function(){re=null}},s(t,{pluginName:"swap",eventProperties:function(){return{swapItem:re}}})}ae.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var r=D(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(e,r):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:oe},s(ae,{pluginName:"revertOnSpill"}),se.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable||this.sortable;n.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),n.animateAll()},drop:oe},s(se,{pluginName:"removeOnSpill"});var le,ce,fe,he,de,pe=[],me=[],ge=!1,ve=!1,ye=!1;function be(){function t(t){for(var e in this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this));t.options.avoidImplicitDeselect||(t.options.supportPointer?v(document,"pointerup",this._deselectMultiDrag):(v(document,"mouseup",this._deselectMultiDrag),v(document,"touchend",this._deselectMultiDrag))),v(document,"keydown",this._checkKeyDown),v(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,avoidImplicitDeselect:!1,setData:function(e,n){var r="";pe.length&&ce===t?pe.forEach((function(t,e){r+=(e?", ":"")+t.textContent})):r=n.textContent,e.setData("Text",r)}}}return t.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(t){var e=t.dragEl;fe=e},delayEnded:function(){this.isMultiDrag=~pe.indexOf(fe)},setupClone:function(t){var e=t.sortable,n=t.cancel;if(this.isMultiDrag){for(var r=0;r<pe.length;r++)me.push(q(pe[r])),me[r].sortableIndex=pe[r].sortableIndex,me[r].draggable=!1,me[r].style["will-change"]="",O(me[r],this.options.selectedClass,!1),pe[r]===fe&&O(me[r],this.options.chosenClass,!1);e._hideClone(),n()}},clone:function(t){var e=t.sortable,n=t.rootEl,r=t.dispatchSortableEvent,i=t.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||pe.length&&ce===e&&(xe(!0,n),r("clone"),i()))},showClone:function(t){var e=t.cloneNowShown,n=t.rootEl,r=t.cancel;this.isMultiDrag&&(xe(!1,n),me.forEach((function(t){N(t,"display","")})),e(),de=!1,r())},hideClone:function(t){var e=this,n=(t.sortable,t.cloneNowHidden),r=t.cancel;this.isMultiDrag&&(me.forEach((function(t){N(t,"display","none"),e.options.removeCloneOnHide&&t.parentNode&&t.parentNode.removeChild(t)})),n(),de=!0,r())},dragStartGlobal:function(t){t.sortable,!this.isMultiDrag&&ce&&ce.multiDrag._deselectMultiDrag(),pe.forEach((function(t){t.sortableIndex=j(t)})),pe=pe.sort((function(t,e){return t.sortableIndex-e.sortableIndex})),ye=!0},dragStarted:function(t){var e=this,n=t.sortable;if(this.isMultiDrag){if(this.options.sort&&(n.captureAnimationState(),this.options.animation)){pe.forEach((function(t){t!==fe&&N(t,"position","absolute")}));var r=C(fe,!1,!0,!0);pe.forEach((function(t){t!==fe&&B(t,r)})),ve=!0,ge=!0}n.animateAll((function(){ve=!1,ge=!1,e.options.animation&&pe.forEach((function(t){z(t)})),e.options.sort&&we()}))}},dragOver:function(t){var e=t.target,n=t.completed,r=t.cancel;ve&&~pe.indexOf(e)&&(n(!1),r())},revert:function(t){var e=t.fromSortable,n=t.rootEl,r=t.sortable,i=t.dragRect;pe.length>1&&(pe.forEach((function(t){r.addAnimationState({target:t,rect:ve?C(t):i}),z(t),t.fromRect=i,e.removeAnimationState(t)})),ve=!1,function(t,e){pe.forEach((function(n,r){var i=e.children[n.sortableIndex+(t?Number(r):0)];i?e.insertBefore(n,i):e.appendChild(n)}))}(!this.options.removeCloneOnHide,n))},dragOverCompleted:function(t){var e=t.sortable,n=t.isOwner,r=t.insertion,i=t.activeSortable,o=t.parentEl,a=t.putSortable,s=this.options;if(r){if(n&&i._hideClone(),ge=!1,s.animation&&pe.length>1&&(ve||!n&&!i.options.sort&&!a)){var u=C(fe,!1,!0,!0);pe.forEach((function(t){t!==fe&&(B(t,u),o.appendChild(t))})),ve=!0}if(!n)if(ve||we(),pe.length>1){var l=de;i._showClone(e),i.options.animation&&!de&&l&&me.forEach((function(t){i.addAnimationState({target:t,rect:he}),t.fromRect=he,t.thisAnimationDuration=null}))}else i._showClone(e)}},dragOverAnimationCapture:function(t){var e=t.dragRect,n=t.isOwner,r=t.activeSortable;if(pe.forEach((function(t){t.thisAnimationDuration=null})),r.options.animation&&!n&&r.multiDrag.isMultiDrag){he=s({},e);var i=M(fe,!0);he.top-=i.f,he.left-=i.e}},dragOverAnimationComplete:function(){ve&&(ve=!1,we())},drop:function(t){var e=t.originalEvent,n=t.rootEl,r=t.parentEl,i=t.sortable,o=t.dispatchSortableEvent,a=t.oldIndex,s=t.putSortable,u=s||this.sortable;if(e){var l=this.options,c=r.children;if(!ye)if(l.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),O(fe,l.selectedClass,!~pe.indexOf(fe)),~pe.indexOf(fe))pe.splice(pe.indexOf(fe),1),le=null,$({sortable:i,rootEl:n,name:"deselect",targetEl:fe,originalEvent:e});else{if(pe.push(fe),$({sortable:i,rootEl:n,name:"select",targetEl:fe,originalEvent:e}),e.shiftKey&&le&&i.el.contains(le)){var f,h,d=j(le),p=j(fe);if(~d&&~p&&d!==p)for(p>d?(h=d,f=p):(h=p,f=d+1);h<f;h++)~pe.indexOf(c[h])||(O(c[h],l.selectedClass,!0),pe.push(c[h]),$({sortable:i,rootEl:n,name:"select",targetEl:c[h],originalEvent:e}))}else le=fe;ce=u}if(ye&&this.isMultiDrag){if(ve=!1,(r[H].options.sort||r!==n)&&pe.length>1){var m=C(fe),g=j(fe,":not(."+this.options.selectedClass+")");if(!ge&&l.animation&&(fe.thisAnimationDuration=null),u.captureAnimationState(),!ge&&(l.animation&&(fe.fromRect=m,pe.forEach((function(t){if(t.thisAnimationDuration=null,t!==fe){var e=ve?C(t):m;t.fromRect=e,u.addAnimationState({target:t,rect:e})}}))),we(),pe.forEach((function(t){c[g]?r.insertBefore(t,c[g]):r.appendChild(t),g++})),a===j(fe))){var v=!1;pe.forEach((function(t){t.sortableIndex===j(t)||(v=!0)})),v&&o("update")}pe.forEach((function(t){z(t)})),u.animateAll()}ce=u}(n===r||s&&"clone"!==s.lastPutMode)&&me.forEach((function(t){t.parentNode&&t.parentNode.removeChild(t)}))}},nullingGlobal:function(){this.isMultiDrag=ye=!1,me.length=0},destroyGlobal:function(){this._deselectMultiDrag(),y(document,"pointerup",this._deselectMultiDrag),y(document,"mouseup",this._deselectMultiDrag),y(document,"touchend",this._deselectMultiDrag),y(document,"keydown",this._checkKeyDown),y(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(t){if(!(void 0!==ye&&ye||ce!==this.sortable||t&&w(t.target,this.options.draggable,this.sortable.el,!1)||t&&0!==t.button))for(;pe.length;){var e=pe[0];O(e,this.options.selectedClass,!1),pe.shift(),$({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:e,originalEvent:t})}},_checkKeyDown:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},s(t,{pluginName:"multiDrag",utils:{select:function(t){var e=t.parentNode[H];e&&e.options.multiDrag&&!~pe.indexOf(t)&&(ce&&ce!==e&&(ce.multiDrag._deselectMultiDrag(),ce=e),O(t,e.options.selectedClass,!0),pe.push(t))},deselect:function(t){var e=t.parentNode[H],n=pe.indexOf(t);e&&e.options.multiDrag&&~n&&(O(t,e.options.selectedClass,!1),pe.splice(n,1))}},eventProperties:function(){var t,e=this,n=[],r=[];return pe.forEach((function(t){var i;n.push({multiDragElement:t,index:t.sortableIndex}),i=ve&&t!==fe?-1:ve?j(t,":not(."+e.options.selectedClass+")"):j(t),r.push({multiDragElement:t,index:i})})),{items:(t=pe,function(t){if(Array.isArray(t))return u(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),clones:[].concat(me),oldIndicies:n,newIndicies:r}},optionListeners:{multiDragKey:function(t){return"ctrl"===(t=t.toLowerCase())?t="Control":t.length>1&&(t=t.charAt(0).toUpperCase()+t.substr(1)),t}}})}function xe(t,e){me.forEach((function(n,r){var i=e.children[n.sortableIndex+(t?Number(r):0)];i?e.insertBefore(n,i):e.appendChild(n)}))}function we(){pe.forEach((function(t){t!==fe&&t.parentNode&&t.parentNode.removeChild(t)}))}Bt.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?v(document,"dragover",this._handleAutoScroll):this.options.supportPointer?v(document,"pointermove",this._handleFallbackAutoScroll):e.touches?v(document,"touchmove",this._handleFallbackAutoScroll):v(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?y(document,"dragover",this._handleAutoScroll):(y(document,"pointermove",this._handleFallbackAutoScroll),y(document,"touchmove",this._handleFallbackAutoScroll),y(document,"mousemove",this._handleFallbackAutoScroll)),ne(),ee(),clearTimeout(_),_=void 0},nulling:function(){Xt=Zt=Yt=te=Jt=Gt=Kt=null,Qt.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var n=this,r=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,o=document.elementFromPoint(r,i);if(Xt=t,e||this.options.forceAutoScrollFallback||f||c||d){ie(t,this.options,o,e);var a=I(o,!0);!te||Jt&&r===Gt&&i===Kt||(Jt&&ne(),Jt=setInterval((function(){var o=I(document.elementFromPoint(r,i),!0);o!==a&&(a=o,ee()),ie(t,n.options,o,e)}),10),Gt=r,Kt=i)}else{if(!this.options.bubbleScroll||I(o,!0)===k())return void ee();ie(t,this.options,I(o,!1),!1)}}},s(t,{pluginName:"scroll",initializeByDefault:!0})}),Bt.mount(se,ae),e.default=Bt},34760:function(t){var e=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'],n=e.join(","),r="undefined"==typeof Element?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;function i(t,e){e=e||{};var i,a,s,c=[],h=[],d=new f(t.ownerDocument||t),p=t.querySelectorAll(n);for(e.includeContainer&&r.call(t,n)&&(p=Array.prototype.slice.apply(p)).unshift(t),i=0;i<p.length;i++)o(a=p[i],d)&&(0===(s=u(a))?c.push(a):h.push({documentOrder:i,tabIndex:s,node:a}));return h.sort(l).map((function(t){return t.node})).concat(c)}function o(t,e){return!(!a(t,e)||function(t){return function(t){return c(t)&&"radio"===t.type}(t)&&!function(t){if(!t.name)return!0;var e=function(t){for(var e=0;e<t.length;e++)if(t[e].checked)return t[e]}(t.ownerDocument.querySelectorAll('input[type="radio"][name="'+t.name+'"]'));return!e||e===t}(t)}(t)||u(t)<0)}function a(t,e){return e=e||new f(t.ownerDocument||t),!(t.disabled||function(t){return c(t)&&"hidden"===t.type}(t)||e.isUntouchable(t))}i.isTabbable=function(t,e){if(!t)throw new Error("No node provided");return!1!==r.call(t,n)&&o(t,e)},i.isFocusable=function(t,e){if(!t)throw new Error("No node provided");return!1!==r.call(t,s)&&a(t,e)};var s=e.concat("iframe").join(",");function u(t){var e=parseInt(t.getAttribute("tabindex"),10);return isNaN(e)?function(t){return"true"===t.contentEditable}(t)?0:t.tabIndex:e}function l(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex}function c(t){return"INPUT"===t.tagName}function f(t){this.doc=t,this.cache=[]}f.prototype.hasDisplayNone=function(t,e){if(t.nodeType!==Node.ELEMENT_NODE)return!1;var n=function(e,n){for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return e[r]}(this.cache);if(n)return n[1];var r=!1;return"none"===(e=e||this.doc.defaultView.getComputedStyle(t)).display?r=!0:t.parentNode&&(r=this.hasDisplayNone(t.parentNode)),this.cache.push([t,r]),r},f.prototype.isUntouchable=function(t){if(t===this.doc.documentElement)return!1;var e=this.doc.defaultView.getComputedStyle(t);return!!this.hasDisplayNone(t,e)||"hidden"===e.visibility},t.exports=i},70655:function(t,e,n){"use strict";n.r(e),n.d(e,{__assign:function(){return o},__asyncDelegator:function(){return b},__asyncGenerator:function(){return y},__asyncValues:function(){return x},__await:function(){return v},__awaiter:function(){return c},__classPrivateFieldGet:function(){return O},__classPrivateFieldSet:function(){return N},__decorate:function(){return s},__exportStar:function(){return h},__extends:function(){return i},__generator:function(){return f},__importDefault:function(){return S},__importStar:function(){return _},__makeTemplateObject:function(){return w},__metadata:function(){return l},__param:function(){return u},__read:function(){return p},__rest:function(){return a},__spread:function(){return m},__spreadArrays:function(){return g},__values:function(){return d}});var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)};function i(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},o.apply(this,arguments)};function a(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}function s(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function u(t,e){return function(n,r){e(n,r,t)}}function l(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function c(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))}function f(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function h(t,e){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}function d(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function p(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function m(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(p(arguments[e]));return t}function g(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}function v(t){return this instanceof v?(this.v=t,this):new v(t)}function y(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(t,e||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(t){i[t]&&(r[t]=function(e){return new Promise((function(n,r){o.push([t,e,n,r])>1||s(t,e)}))})}function s(t,e){try{(n=i[t](e)).value instanceof v?Promise.resolve(n.value.v).then(u,l):c(o[0][2],n)}catch(t){c(o[0][3],t)}var n}function u(t){s("next",t)}function l(t){s("throw",t)}function c(t,e){t(e),o.shift(),o.length&&s(o[0][0],o[0][1])}}function b(t){var e,n;return e={},r("next"),r("throw",(function(t){throw t})),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,i){e[r]=t[r]?function(e){return(n=!n)?{value:v(t[r](e)),done:"return"===r}:i?i(e):e}:i}}function x(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=d(t),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(n){e[n]=t[n]&&function(e){return new Promise((function(r,i){!function(t,e,n,r){Promise.resolve(r).then((function(e){t({value:e,done:n})}),e)}(r,i,(e=t[n](e)).done,e.value)}))}}}function w(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function _(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function S(t){return t&&t.__esModule?t:{default:t}}function O(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function N(t,e,n){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,n),n}},47529:function(t){t.exports=function(){for(var t={},n=0;n<arguments.length;n++){var r=arguments[n];for(var i in r)e.call(r,i)&&(t[i]=r[i])}return t};var e=Object.prototype.hasOwnProperty},17156:function(t){function e(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}t.exports=function(t){return function(){var n=this,r=arguments;return new Promise((function(i,o){var a=t.apply(n,r);function s(t){e(a,i,o,s,u,"next",t)}function u(t){e(a,i,o,s,u,"throw",t)}s(void 0)}))}},t.exports.__esModule=!0,t.exports.default=t.exports},10434:function(t){function e(){return t.exports=e=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},t.exports.__esModule=!0,t.exports.default=t.exports,e.apply(this,arguments)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},11752:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r=n(61120);function i(){return i="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=(0,r.Z)(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},i.apply(this,arguments)}},45987:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r=n(63366);function i(t,e){if(null==t)return{};var n,i,o=(0,r.Z)(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}},12860:function(t,e,n){"use strict";function r(t){throw new TypeError('"'+t+'" is read-only')}n.d(e,{Z:function(){return r}})},648:function(t){"use strict";t.exports=JSON.parse('{"version":"2.0","metadata":{"apiVersion":"2013-12-02","endpointPrefix":"kinesis","jsonVersion":"1.1","protocol":"json","protocolSettings":{"h2":"eventstream"},"serviceAbbreviation":"Kinesis","serviceFullName":"Amazon Kinesis","serviceId":"Kinesis","signatureVersion":"v4","targetPrefix":"Kinesis_20131202","uid":"kinesis-2013-12-02"},"operations":{"AddTagsToStream":{"input":{"type":"structure","required":["Tags"],"members":{"StreamName":{},"Tags":{"type":"map","key":{},"value":{}},"StreamARN":{"contextParam":{"name":"StreamARN"}}}},"staticContextParams":{"OperationType":{"value":"control"}}},"CreateStream":{"input":{"type":"structure","required":["StreamName"],"members":{"StreamName":{},"ShardCount":{"type":"integer"},"StreamModeDetails":{"shape":"S9"}}}},"DecreaseStreamRetentionPeriod":{"input":{"type":"structure","required":["RetentionPeriodHours"],"members":{"StreamName":{},"RetentionPeriodHours":{"type":"integer"},"StreamARN":{"contextParam":{"name":"StreamARN"}}}},"staticContextParams":{"OperationType":{"value":"control"}}},"DeleteStream":{"input":{"type":"structure","members":{"StreamName":{},"EnforceConsumerDeletion":{"type":"boolean"},"StreamARN":{"contextParam":{"name":"StreamARN"}}}},"staticContextParams":{"OperationType":{"value":"control"}}},"DeregisterStreamConsumer":{"input":{"type":"structure","members":{"StreamARN":{"contextParam":{"name":"StreamARN"}},"ConsumerName":{},"ConsumerARN":{"contextParam":{"name":"ConsumerARN"}}}},"staticContextParams":{"OperationType":{"value":"control"}}},"DescribeLimits":{"input":{"type":"structure","members":{}},"output":{"type":"structure","required":["ShardLimit","OpenShardCount","OnDemandStreamCount","OnDemandStreamCountLimit"],"members":{"ShardLimit":{"type":"integer"},"OpenShardCount":{"type":"integer"},"OnDemandStreamCount":{"type":"integer"},"OnDemandStreamCountLimit":{"type":"integer"}}}},"DescribeStream":{"input":{"type":"structure","members":{"StreamName":{},"Limit":{"type":"integer"},"ExclusiveStartShardId":{},"StreamARN":{"contextParam":{"name":"StreamARN"}}}},"output":{"type":"structure","required":["StreamDescription"],"members":{"StreamDescription":{"type":"structure","required":["StreamName","StreamARN","StreamStatus","Shards","HasMoreShards","RetentionPeriodHours","StreamCreationTimestamp","EnhancedMonitoring"],"members":{"StreamName":{},"StreamARN":{},"StreamStatus":{},"StreamModeDetails":{"shape":"S9"},"Shards":{"shape":"St"},"HasMoreShards":{"type":"boolean"},"RetentionPeriodHours":{"type":"integer"},"StreamCreationTimestamp":{"type":"timestamp"},"EnhancedMonitoring":{"shape":"S10"},"EncryptionType":{},"KeyId":{}}}}},"staticContextParams":{"OperationType":{"value":"control"}}},"DescribeStreamConsumer":{"input":{"type":"structure","members":{"StreamARN":{"contextParam":{"name":"StreamARN"}},"ConsumerName":{},"ConsumerARN":{"contextParam":{"name":"ConsumerARN"}}}},"output":{"type":"structure","required":["ConsumerDescription"],"members":{"ConsumerDescription":{"type":"structure","required":["ConsumerName","ConsumerARN","ConsumerStatus","ConsumerCreationTimestamp","StreamARN"],"members":{"ConsumerName":{},"ConsumerARN":{},"ConsumerStatus":{},"ConsumerCreationTimestamp":{"type":"timestamp"},"StreamARN":{}}}}},"staticContextParams":{"OperationType":{"value":"control"}}},"DescribeStreamSummary":{"input":{"type":"structure","members":{"StreamName":{},"StreamARN":{"contextParam":{"name":"StreamARN"}}}},"output":{"type":"structure","required":["StreamDescriptionSummary"],"members":{"StreamDescriptionSummary":{"type":"structure","required":["StreamName","StreamARN","StreamStatus","RetentionPeriodHours","StreamCreationTimestamp","EnhancedMonitoring","OpenShardCount"],"members":{"StreamName":{},"StreamARN":{},"StreamStatus":{},"StreamModeDetails":{"shape":"S9"},"RetentionPeriodHours":{"type":"integer"},"StreamCreationTimestamp":{"type":"timestamp"},"EnhancedMonitoring":{"shape":"S10"},"EncryptionType":{},"KeyId":{},"OpenShardCount":{"type":"integer"},"ConsumerCount":{"type":"integer"}}}}},"staticContextParams":{"OperationType":{"value":"control"}}},"DisableEnhancedMonitoring":{"input":{"type":"structure","required":["ShardLevelMetrics"],"members":{"StreamName":{},"ShardLevelMetrics":{"shape":"S12"},"StreamARN":{"contextParam":{"name":"StreamARN"}}}},"output":{"shape":"S1f"},"staticContextParams":{"OperationType":{"value":"control"}}},"EnableEnhancedMonitoring":{"input":{"type":"structure","required":["ShardLevelMetrics"],"members":{"StreamName":{},"ShardLevelMetrics":{"shape":"S12"},"StreamARN":{"contextParam":{"name":"StreamARN"}}}},"output":{"shape":"S1f"},"staticContextParams":{"OperationType":{"value":"control"}}},"GetRecords":{"input":{"type":"structure","required":["ShardIterator"],"members":{"ShardIterator":{},"Limit":{"type":"integer"},"StreamARN":{"contextParam":{"name":"StreamARN"}}}},"output":{"type":"structure","required":["Records"],"members":{"Records":{"type":"list","member":{"type":"structure","required":["SequenceNumber","Data","PartitionKey"],"members":{"SequenceNumber":{},"ApproximateArrivalTimestamp":{"type":"timestamp"},"Data":{"type":"blob"},"PartitionKey":{},"EncryptionType":{}}}},"NextShardIterator":{},"MillisBehindLatest":{"type":"long"},"ChildShards":{"type":"list","member":{"type":"structure","required":["ShardId","ParentShards","HashKeyRange"],"members":{"ShardId":{},"ParentShards":{"type":"list","member":{}},"HashKeyRange":{"shape":"Sv"}}}}}},"staticContextParams":{"OperationType":{"value":"data"}}},"GetShardIterator":{"input":{"type":"structure","required":["ShardId","ShardIteratorType"],"members":{"StreamName":{},"ShardId":{},"ShardIteratorType":{},"StartingSequenceNumber":{},"Timestamp":{"type":"timestamp"},"StreamARN":{"contextParam":{"name":"StreamARN"}}}},"output":{"type":"structure","members":{"ShardIterator":{}}},"staticContextParams":{"OperationType":{"value":"data"}}},"IncreaseStreamRetentionPeriod":{"input":{"type":"structure","required":["RetentionPeriodHours"],"members":{"StreamName":{},"RetentionPeriodHours":{"type":"integer"},"StreamARN":{"contextParam":{"name":"StreamARN"}}}},"staticContextParams":{"OperationType":{"value":"control"}}},"ListShards":{"input":{"type":"structure","members":{"StreamName":{},"NextToken":{},"ExclusiveStartShardId":{},"MaxResults":{"type":"integer"},"StreamCreationTimestamp":{"type":"timestamp"},"ShardFilter":{"type":"structure","required":["Type"],"members":{"Type":{},"ShardId":{},"Timestamp":{"type":"timestamp"}}},"StreamARN":{"contextParam":{"name":"StreamARN"}}}},"output":{"type":"structure","members":{"Shards":{"shape":"St"},"NextToken":{}}},"staticContextParams":{"OperationType":{"value":"control"}}},"ListStreamConsumers":{"input":{"type":"structure","required":["StreamARN"],"members":{"StreamARN":{"contextParam":{"name":"StreamARN"}},"NextToken":{},"MaxResults":{"type":"integer"},"StreamCreationTimestamp":{"type":"timestamp"}}},"output":{"type":"structure","members":{"Consumers":{"type":"list","member":{"shape":"S27"}},"NextToken":{}}},"staticContextParams":{"OperationType":{"value":"control"}}},"ListStreams":{"input":{"type":"structure","members":{"Limit":{"type":"integer"},"ExclusiveStartStreamName":{},"NextToken":{}}},"output":{"type":"structure","required":["StreamNames","HasMoreStreams"],"members":{"StreamNames":{"type":"list","member":{}},"HasMoreStreams":{"type":"boolean"},"NextToken":{},"StreamSummaries":{"type":"list","member":{"type":"structure","required":["StreamName","StreamARN","StreamStatus"],"members":{"StreamName":{},"StreamARN":{},"StreamStatus":{},"StreamModeDetails":{"shape":"S9"},"StreamCreationTimestamp":{"type":"timestamp"}}}}}}},"ListTagsForStream":{"input":{"type":"structure","members":{"StreamName":{},"ExclusiveStartTagKey":{},"Limit":{"type":"integer"},"StreamARN":{"contextParam":{"name":"StreamARN"}}}},"output":{"type":"structure","required":["Tags","HasMoreTags"],"members":{"Tags":{"type":"list","member":{"type":"structure","required":["Key"],"members":{"Key":{},"Value":{}}}},"HasMoreTags":{"type":"boolean"}}},"staticContextParams":{"OperationType":{"value":"control"}}},"MergeShards":{"input":{"type":"structure","required":["ShardToMerge","AdjacentShardToMerge"],"members":{"StreamName":{},"ShardToMerge":{},"AdjacentShardToMerge":{},"StreamARN":{"contextParam":{"name":"StreamARN"}}}},"staticContextParams":{"OperationType":{"value":"control"}}},"PutRecord":{"input":{"type":"structure","required":["Data","PartitionKey"],"members":{"StreamName":{},"Data":{"type":"blob"},"PartitionKey":{},"ExplicitHashKey":{},"SequenceNumberForOrdering":{},"StreamARN":{"contextParam":{"name":"StreamARN"}}}},"output":{"type":"structure","required":["ShardId","SequenceNumber"],"members":{"ShardId":{},"SequenceNumber":{},"EncryptionType":{}}},"staticContextParams":{"OperationType":{"value":"data"}}},"PutRecords":{"input":{"type":"structure","required":["Records"],"members":{"Records":{"type":"list","member":{"type":"structure","required":["Data","PartitionKey"],"members":{"Data":{"type":"blob"},"ExplicitHashKey":{},"PartitionKey":{}}}},"StreamName":{},"StreamARN":{"contextParam":{"name":"StreamARN"}}}},"output":{"type":"structure","required":["Records"],"members":{"FailedRecordCount":{"type":"integer"},"Records":{"type":"list","member":{"type":"structure","members":{"SequenceNumber":{},"ShardId":{},"ErrorCode":{},"ErrorMessage":{}}}},"EncryptionType":{}}},"staticContextParams":{"OperationType":{"value":"data"}}},"RegisterStreamConsumer":{"input":{"type":"structure","required":["StreamARN","ConsumerName"],"members":{"StreamARN":{"contextParam":{"name":"StreamARN"}},"ConsumerName":{}}},"output":{"type":"structure","required":["Consumer"],"members":{"Consumer":{"shape":"S27"}}},"staticContextParams":{"OperationType":{"value":"control"}}},"RemoveTagsFromStream":{"input":{"type":"structure","required":["TagKeys"],"members":{"StreamName":{},"TagKeys":{"type":"list","member":{}},"StreamARN":{"contextParam":{"name":"StreamARN"}}}},"staticContextParams":{"OperationType":{"value":"control"}}},"SplitShard":{"input":{"type":"structure","required":["ShardToSplit","NewStartingHashKey"],"members":{"StreamName":{},"ShardToSplit":{},"NewStartingHashKey":{},"StreamARN":{"contextParam":{"name":"StreamARN"}}}},"staticContextParams":{"OperationType":{"value":"control"}}},"StartStreamEncryption":{"input":{"type":"structure","required":["EncryptionType","KeyId"],"members":{"StreamName":{},"EncryptionType":{},"KeyId":{},"StreamARN":{"contextParam":{"name":"StreamARN"}}}},"staticContextParams":{"OperationType":{"value":"control"}}},"StopStreamEncryption":{"input":{"type":"structure","required":["EncryptionType","KeyId"],"members":{"StreamName":{},"EncryptionType":{},"KeyId":{},"StreamARN":{"contextParam":{"name":"StreamARN"}}}},"staticContextParams":{"OperationType":{"value":"control"}}},"UpdateShardCount":{"input":{"type":"structure","required":["TargetShardCount","ScalingType"],"members":{"StreamName":{},"TargetShardCount":{"type":"integer"},"ScalingType":{},"StreamARN":{"contextParam":{"name":"StreamARN"}}}},"output":{"type":"structure","members":{"StreamName":{},"CurrentShardCount":{"type":"integer"},"TargetShardCount":{"type":"integer"},"StreamARN":{}}},"staticContextParams":{"OperationType":{"value":"control"}}},"UpdateStreamMode":{"input":{"type":"structure","required":["StreamARN","StreamModeDetails"],"members":{"StreamARN":{"contextParam":{"name":"StreamARN"}},"StreamModeDetails":{"shape":"S9"}}},"staticContextParams":{"OperationType":{"value":"control"}}}},"shapes":{"S9":{"type":"structure","required":["StreamMode"],"members":{"StreamMode":{}}},"St":{"type":"list","member":{"type":"structure","required":["ShardId","HashKeyRange","SequenceNumberRange"],"members":{"ShardId":{},"ParentShardId":{},"AdjacentParentShardId":{},"HashKeyRange":{"shape":"Sv"},"SequenceNumberRange":{"type":"structure","required":["StartingSequenceNumber"],"members":{"StartingSequenceNumber":{},"EndingSequenceNumber":{}}}}}},"Sv":{"type":"structure","required":["StartingHashKey","EndingHashKey"],"members":{"StartingHashKey":{},"EndingHashKey":{}}},"S10":{"type":"list","member":{"type":"structure","members":{"ShardLevelMetrics":{"shape":"S12"}}}},"S12":{"type":"list","member":{}},"S1f":{"type":"structure","members":{"StreamName":{},"CurrentShardLevelMetrics":{"shape":"S12"},"DesiredShardLevelMetrics":{"shape":"S12"},"StreamARN":{}}},"S27":{"type":"structure","required":["ConsumerName","ConsumerARN","ConsumerStatus","ConsumerCreationTimestamp"],"members":{"ConsumerName":{},"ConsumerARN":{},"ConsumerStatus":{},"ConsumerCreationTimestamp":{"type":"timestamp"}}}}}')},10424:function(t){"use strict";t.exports=JSON.parse('{"o":{"DescribeStream":{"input_token":"ExclusiveStartShardId","limit_key":"Limit","more_results":"StreamDescription.HasMoreShards","output_token":"StreamDescription.Shards[-1].ShardId","result_key":"StreamDescription.Shards"},"ListStreamConsumers":{"input_token":"NextToken","limit_key":"MaxResults","output_token":"NextToken"},"ListStreams":{"input_token":"NextToken","limit_key":"Limit","more_results":"HasMoreStreams","output_token":"NextToken","result_key":["StreamNames","StreamSummaries"]}}}')},54059:function(t){"use strict";t.exports=JSON.parse('{"V":{"StreamExists":{"delay":10,"operation":"DescribeStream","maxAttempts":18,"acceptors":[{"expected":"ACTIVE","matcher":"path","state":"success","argument":"StreamDescription.StreamStatus"}]},"StreamNotExists":{"delay":10,"operation":"DescribeStream","maxAttempts":18,"acceptors":[{"expected":"ResourceNotFoundException","matcher":"error","state":"success"}]}}}')}}]);
|