@hippovideo/video-sdk 0.0.0-experimental-c8b1d0e44200-20230710 → 0.0.0-experimental-143250fd6532-20230711

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.
Files changed (65) hide show
  1. package/app/104-bundle-hippo-531xxzhsmog-0b359abe4c6a5ee2f315.js +1 -0
  2. package/app/105-bundle-hippo-531xxzhsmog-f9a48d5a6676f5658571.js +1 -0
  3. package/app/134-bundle-hippo-531xxzhsmog-33e5751ee8eabaf8325d.js +1 -0
  4. package/app/160-bundle-hippo-531xxzhsmog-6a53a0cfc890b1018823.js +1 -0
  5. package/app/199-bundle-hippo-531xxzhsmog-0847c9cdc2dd13978db4.js +2 -0
  6. package/app/200-bundle-hippo-531xxzhsmog-cc4ce14507b481adce4a.js +1 -0
  7. package/app/224-bundle-hippo-531xxzhsmog-c5f0078ca66c66961376.js +1 -0
  8. package/app/227-bundle-hippo-531xxzhsmog-054097cd9811599fbb52.js +2 -0
  9. package/app/227-bundle-hippo-531xxzhsmog-054097cd9811599fbb52.js.LICENSE.txt +26 -0
  10. package/app/242-bundle-hippo-531xxzhsmog-65d7bd902bf92d642fd9.js +1 -0
  11. package/app/{245-bundle-hippo-mc7qius79l-c3716a52fbe1ce81f986.js → 245-bundle-hippo-531xxzhsmog-d51f9b953f38044cfbab.js} +1 -1
  12. package/app/248-bundle-hippo-531xxzhsmog-f7f2950aeaeff9dff8a1.js +2 -0
  13. package/app/248-bundle-hippo-531xxzhsmog-f7f2950aeaeff9dff8a1.js.LICENSE.txt +108 -0
  14. package/app/252-bundle-hippo-531xxzhsmog-f16bffc6544697f84316.js +1 -0
  15. package/app/256-bundle-hippo-531xxzhsmog-b77bb3ac388b037011b4.js +1 -0
  16. package/app/27-bundle-hippo-531xxzhsmog-c12d06feeaf69ad6e754.js +1 -0
  17. package/app/292-bundle-hippo-531xxzhsmog-233bb3cc2573ab8fdae6.js +1 -0
  18. package/app/300-bundle-hippo-531xxzhsmog-af37f6f49f987d3b1d4e.js +1 -0
  19. package/app/337-bundle-hippo-531xxzhsmog-af1d31f808b1fadaefb8.js +1 -0
  20. package/app/343-bundle-hippo-531xxzhsmog-74e9cd68bfd58e14b900.js +1 -0
  21. package/app/362-bundle-hippo-531xxzhsmog-a8775ff8dd1026d63c63.js +1 -0
  22. package/app/365-bundle-hippo-531xxzhsmog-ac90d27b0c3d70c85e28.js +1 -0
  23. package/app/40-bundle-hippo-531xxzhsmog-99a14accde069837cb73.js +1 -0
  24. package/app/435-bundle-hippo-531xxzhsmog-a8cb770f9b97ef589b22.js +2 -0
  25. package/app/435-bundle-hippo-531xxzhsmog-a8cb770f9b97ef589b22.js.LICENSE.txt +3 -0
  26. package/app/48-bundle-hippo-531xxzhsmog-e2ff976a0367bb013cad.js +1 -0
  27. package/app/{520-bundle-hippo-mc7qius79l-0fa1ca3268a61df20c0c.js → 520-bundle-hippo-531xxzhsmog-d23078f76b266375b506.js} +1 -1
  28. package/app/522-bundle-hippo-531xxzhsmog-2f2efd9e442fa7de3cfd.js +1 -0
  29. package/app/524-bundle-hippo-531xxzhsmog-f1422ef6fabf36708c4b.js +1 -0
  30. package/app/556-bundle-hippo-531xxzhsmog-b5275c01aaeaed24c81b.js +1 -0
  31. package/app/578-bundle-hippo-531xxzhsmog-b314d782985def0b4d47.js +1 -0
  32. package/app/628-bundle-hippo-531xxzhsmog-50191e0883760bd5feab.js +1 -0
  33. package/app/685-bundle-hippo-531xxzhsmog-ccc5045d7aad29577351.js +1 -0
  34. package/app/69-bundle-hippo-531xxzhsmog-663b3d265f426b438f2d.js +2 -0
  35. package/app/69.hv_recorder.css +1 -0
  36. package/app/693-bundle-hippo-531xxzhsmog-06900303db93b087ffa4.js +1 -0
  37. package/app/708-bundle-hippo-531xxzhsmog-0768898f682eb8a1df2d.js +1 -0
  38. package/app/716-bundle-hippo-531xxzhsmog-c4338e6a3a2533f7e973.js +1 -0
  39. package/app/762-bundle-hippo-531xxzhsmog-9c086bbc3477dfdeab74.js +1 -0
  40. package/app/768-bundle-hippo-531xxzhsmog-3dd6361f635c53d7850c.js +1 -0
  41. package/app/782-bundle-hippo-531xxzhsmog-7f69a88c298e22961d5c.js +1 -0
  42. package/app/798-bundle-hippo-531xxzhsmog-7431372ff7f1f55f1fa2.js +1 -0
  43. package/app/834-bundle-hippo-531xxzhsmog-ad8da7cd03ab1d44bacd.js +1 -0
  44. package/app/850-bundle-hippo-531xxzhsmog-a67a83cf8eda07ca65aa.js +1 -0
  45. package/app/889-bundle-hippo-531xxzhsmog-e090fc90803ec69556bd.js +1 -0
  46. package/app/903-bundle-hippo-531xxzhsmog-ad831c454afa8f565475.js +1 -0
  47. package/app/923-bundle-hippo-531xxzhsmog-98c6e38704b3ea4eacec.js +1 -0
  48. package/app/927-bundle-hippo-531xxzhsmog-34f0c401aea5918c9e55.js +1 -0
  49. package/app/946-bundle-hippo-531xxzhsmog-2ada4f0f786cbebe525f.js +1 -0
  50. package/app/949-bundle-hippo-531xxzhsmog-0dfd4113c6af68379afb.js +1 -0
  51. package/app/994-bundle-hippo-531xxzhsmog-9f08763feb63e3dea419.js +1 -0
  52. package/app/hv_recorder.js +1 -1
  53. package/app/hv_recorder.js.LICENSE.txt +0 -146
  54. package/app/webpack-common-manifest.json +50 -8
  55. package/package.json +1 -1
  56. package/app/72-bundle-hippo-mc7qius79l-72de8ab38ee9fa8db3a1.js +0 -2
  57. package/app/72.hv_recorder.css +0 -1
  58. package/app/882-bundle-hippo-mc7qius79l-740ed4132eee6ac2ba4c.js +0 -2
  59. package/app/882.hv_recorder.css +0 -1
  60. /package/app/{188-bundle-hippo-mc7qius79l-6e9300c4f156ca5b8ce8.js → 188-bundle-hippo-531xxzhsmog-6e9300c4f156ca5b8ce8.js} +0 -0
  61. /package/app/{882-bundle-hippo-mc7qius79l-740ed4132eee6ac2ba4c.js.LICENSE.txt → 199-bundle-hippo-531xxzhsmog-0847c9cdc2dd13978db4.js.LICENSE.txt} +0 -0
  62. /package/app/{245-bundle-hippo-mc7qius79l-c3716a52fbe1ce81f986.js.LICENSE.txt → 245-bundle-hippo-531xxzhsmog-d51f9b953f38044cfbab.js.LICENSE.txt} +0 -0
  63. /package/app/{520-bundle-hippo-mc7qius79l-0fa1ca3268a61df20c0c.js.LICENSE.txt → 520-bundle-hippo-531xxzhsmog-d23078f76b266375b506.js.LICENSE.txt} +0 -0
  64. /package/app/{72-bundle-hippo-mc7qius79l-72de8ab38ee9fa8db3a1.js.LICENSE.txt → 69-bundle-hippo-531xxzhsmog-663b3d265f426b438f2d.js.LICENSE.txt} +0 -0
  65. /package/app/{881-bundle-hippo-mc7qius79l-1e41c84326fac8446b66.js → 881-bundle-hippo-531xxzhsmog-1e41c84326fac8446b66.js} +0 -0
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 199-bundle-hippo-531xxzhsmog-0847c9cdc2dd13978db4.js.LICENSE.txt */
2
+ (self.webpackChunkHVRecorder=self.webpackChunkHVRecorder||[]).push([[199],{62125:function(e,t,n){"use strict";n.d(t,{SQ:function(){return l},gp:function(){return c},mF:function(){return s}});class r extends Date{static parseDateTime(e,t="YYYY-MM-DD",n="en-US"){if(!e)return new Date((new Date).setHours(0,0,0,0));if(e instanceof r)return e.toJSDate();if(e instanceof Date)return e;if(/^-?\d{10,}$/.test(String(e)))return new Date(Number(e));if("string"==typeof e){const i=[];let o=null;for(;null!=(o=r.regex.exec(t));)"\\"!==o[1]&&i.push(o);if(i.length){const t={year:null,month:null,shortMonth:null,longMonth:null,day:null,hour:0,minute:0,second:0,ampm:null,value:""};i[0].index>0&&(t.value+=".*?");for(const[e,o]of Object.entries(i)){const i=Number(e),{group:a,pattern:s}=r.formatPatterns(o[0],n);t[a]=i+1,t.value+=s,t.value+=".*?"}const o=new RegExp(`^${t.value}$`);if(o.test(e)){const i=o.exec(e),a=Number(i[t.year]);let s=null;t.month?s=Number(i[t.month])-1:t.shortMonth?s=r.shortMonths(n).indexOf(i[t.shortMonth]):t.longMonth&&(s=r.longMonths(n).indexOf(i[t.longMonth]));const u=Number(i[t.day])||1,l=Number(i[t.hour]);let c=Number.isNaN(l)?0:l;const f=Number(i[t.minute]),h=Number.isNaN(f)?0:f,d=Number(i[t.second]),p=Number.isNaN(d)?0:d,m=i[t.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(e){return r.MONTH_JS.map((t=>new Date(2019,t).toLocaleString(e,{month:"short"})))}static longMonths(e){return r.MONTH_JS.map((t=>new Date(2019,t).toLocaleString(e,{month:"long"})))}static formatPatterns(e,t){switch(e){case"YY":case"YYYY":return{group:"year",pattern:`(\\d{${e.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(t).join("|")})`};case"MMMM":return{group:"longMonth",pattern:`(${r.longMonths(t).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(e=null,t="YYYY-MM-DD",n="en-US"){super(r.parseDateTime(e,t,n)),this.lang=n}getWeek(e){const t=new Date(this.midnight_ts(this)),n=(this.getDay()+(7-e))%7;t.setDate(t.getDate()-n);const r=t.getTime();return t.setMonth(0,1),t.getDay()!==e&&t.setMonth(0,1+(4-t.getDay()+7)%7),1+Math.ceil((r-t.getTime())/6048e5)}clone(){return new r(this)}toJSDate(){return new Date(this)}inArray(e,t="[]"){return e.some((e=>e instanceof Array?this.isBetween(e[0],e[1],t):this.isSame(e,"day")))}isBetween(e,t,n="()"){switch(n){default:case"()":return this.midnight_ts(this)>this.midnight_ts(e)&&this.midnight_ts(this)<this.midnight_ts(t);case"[)":return this.midnight_ts(this)>=this.midnight_ts(e)&&this.midnight_ts(this)<this.midnight_ts(t);case"(]":return this.midnight_ts(this)>this.midnight_ts(e)&&this.midnight_ts(this)<=this.midnight_ts(t);case"[]":return this.midnight_ts()>=this.midnight_ts(e)&&this.midnight_ts()<=this.midnight_ts(t)}}isBefore(e,t="days"){switch(t){case"day":case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()>new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime();case"month":case"months":return new Date(e.getFullYear(),e.getMonth(),1).getTime()>new Date(this.getFullYear(),this.getMonth(),1).getTime();case"year":case"years":return e.getFullYear()>this.getFullYear()}throw new Error("isBefore: Invalid unit!")}isSameOrBefore(e,t="days"){switch(t){case"day":case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()>=new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime();case"month":case"months":return new Date(e.getFullYear(),e.getMonth(),1).getTime()>=new Date(this.getFullYear(),this.getMonth(),1).getTime()}throw new Error("isSameOrBefore: Invalid unit!")}isAfter(e,t="days"){switch(t){case"day":case"days":return new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime()>new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime();case"month":case"months":return new Date(this.getFullYear(),this.getMonth(),1).getTime()>new Date(e.getFullYear(),e.getMonth(),1).getTime();case"year":case"years":return this.getFullYear()>e.getFullYear()}throw new Error("isAfter: Invalid unit!")}isSameOrAfter(e,t="days"){switch(t){case"day":case"days":return new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime()>=new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime();case"month":case"months":return new Date(this.getFullYear(),this.getMonth(),1).getTime()>=new Date(e.getFullYear(),e.getMonth(),1).getTime()}throw new Error("isSameOrAfter: Invalid unit!")}isSame(e,t="days"){switch(t){case"day":case"days":return new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime()===new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime();case"month":case"months":return new Date(this.getFullYear(),this.getMonth(),1).getTime()===new Date(e.getFullYear(),e.getMonth(),1).getTime()}throw new Error("isSame: Invalid unit!")}add(e,t="days"){switch(t){case"day":case"days":this.setDate(this.getDate()+e);break;case"month":case"months":this.setMonth(this.getMonth()+e)}return this}subtract(e,t="days"){switch(t){case"day":case"days":this.setDate(this.getDate()-e);break;case"month":case"months":this.setMonth(this.getMonth()-e)}return this}diff(e,t="days"){switch(t){default:case"day":case"days":return Math.round((this.midnight_ts()-this.midnight_ts(e))/864e5);case"month":case"months":let t=12*(e.getFullYear()-this.getFullYear());return t-=e.getMonth(),t+=this.getMonth(),t}}format(e,t="en-US"){let n="";const i=[];let o=null;for(;null!=(o=r.regex.exec(e));)"\\"!==o[1]&&i.push(o);if(i.length){i[0].index>0&&(n+=e.substring(0,i[0].index));for(const[r,o]of Object.entries(i)){const a=Number(r);n+=this.formatTokens(o[0],t),i[a+1]&&(n+=e.substring(o.index+o[0].length,i[a+1].index)),a===i.length-1&&(n+=e.substring(o.index+o[0].length))}}return n.replace(/\\/g,"")}midnight_ts(e){return e?new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0,0).getTime():new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0,0).getTime()}formatTokens(e,t){switch(e){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(t)[this.getMonth()];case"MMMM":return r.longMonths(t)[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(e){this.picker=e}render(e,t){e||(e=new r),e.setDate(1),e.setHours(0,0,0,0),"function"==typeof this[`get${t}View`]&&this[`get${t}View`](e)}getContainerView(e){this.picker.ui.container.innerHTML="",this.picker.options.header&&this.picker.trigger("render",{date:e.clone(),view:"Header"}),this.picker.trigger("render",{date:e.clone(),view:"Main"}),this.picker.options.autoApply||this.picker.trigger("render",{date:e.clone(),view:"Footer"})}getHeaderView(e){const t=document.createElement("header");this.picker.options.header instanceof HTMLElement&&t.appendChild(this.picker.options.header),"string"==typeof this.picker.options.header&&(t.innerHTML=this.picker.options.header),this.picker.ui.container.appendChild(t),this.picker.trigger("view",{target:t,date:e.clone(),view:"Header"})}getMainView(e){const t=document.createElement("main");this.picker.ui.container.appendChild(t);const n=document.createElement("div");n.className=`calendars grid-${this.picker.options.grid}`;for(let t=0;t<this.picker.options.calendars;t++){const r=document.createElement("div");r.className="calendar",n.appendChild(r);const i=this.getCalendarHeaderView(e.clone());r.appendChild(i),this.picker.trigger("view",{date:e.clone(),view:"CalendarHeader",index:t,target:i});const o=this.getCalendarDayNamesView();r.appendChild(o),this.picker.trigger("view",{date:e.clone(),view:"CalendarDayNames",index:t,target:o});const a=this.getCalendarDaysView(e.clone());r.appendChild(a),this.picker.trigger("view",{date:e.clone(),view:"CalendarDays",index:t,target:a});const s=this.getCalendarFooterView(this.picker.options.lang,e.clone());r.appendChild(s),this.picker.trigger("view",{date:e.clone(),view:"CalendarFooter",index:t,target:s}),this.picker.trigger("view",{date:e.clone(),view:"CalendarItem",index:t,target:r}),e.add(1,"month")}t.appendChild(n),this.picker.trigger("view",{date:e.clone(),view:"Calendars",target:n}),this.picker.trigger("view",{date:e.clone(),view:"Main",target:t})}getFooterView(e){const t=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),t.appendChild(n),this.picker.ui.container.appendChild(t),this.picker.trigger("view",{date:e,target:t,view:"Footer"})}getCalendarHeaderView(e){const t=document.createElement("div");t.className="header";const n=document.createElement("div");n.className="month-name",n.innerHTML=`<span>${e.toLocaleString(this.picker.options.lang,{month:"long"})}</span> ${e.format("YYYY")}`,t.appendChild(n);const r=document.createElement("button");r.className="previous-button unit",r.innerHTML=this.picker.options.locale.previousMonth,t.appendChild(r);const i=document.createElement("button");return i.className="next-button unit",i.innerHTML=this.picker.options.locale.nextMonth,t.appendChild(i),t}getCalendarDayNamesView(){const e=document.createElement("div");e.className="daynames-row";for(let t=1;t<=7;t++){const n=3+this.picker.options.firstDay+t,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"}),e.appendChild(r),this.picker.trigger("view",{dayIdx:n,view:"CalendarDayName",target:r})}return e}getCalendarDaysView(e){const t=document.createElement("div");t.className="days-grid";const n=this.calcOffsetDays(e,this.picker.options.firstDay),r=32-new Date(e.getFullYear(),e.getMonth(),32).getDate();for(let e=0;e<n;e++){const e=document.createElement("div");e.className="offset",t.appendChild(e)}for(let n=1;n<=r;n++){e.setDate(n);const r=this.getCalendarDayView(e);t.appendChild(r),this.picker.trigger("view",{date:e,view:"CalendarDay",target:r})}return t}getCalendarDayView(e){const t=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=e.format("D"),i.dataset.time=String(e.getTime()),e.isSame(n,"day")&&i.classList.add("today"),[0,6].includes(e.getDay())&&i.classList.add("weekend"),this.picker.datePicked.length?this.picker.datePicked[0].isSame(e,"day")&&i.classList.add("selected"):t&&e.isSame(t,"day")&&i.classList.add("selected"),this.picker.trigger("view",{date:e,view:"CalendarDay",target:i}),i}getCalendarFooterView(e,t){const n=document.createElement("div");return n.className="footer",n}calcOffsetDays(e,t){let n=e.getDay()-t;return n<0&&(n+=7),n}}class o{picker;instances={};constructor(e){this.picker=e}initialize(){const e=[];this.picker.options.plugins.forEach((t=>{"function"==typeof t?e.push(new t):"string"==typeof t&&"undefined"!=typeof easepick&&Object.prototype.hasOwnProperty.call(easepick,t)?e.push(new easepick[t]):console.warn(`easepick: ${t} not found.`)})),e.sort(((e,t)=>e.priority>t.priority?-1:e.priority<t.priority||e.dependencies.length>t.dependencies.length?1:e.dependencies.length<t.dependencies.length?-1:0)),e.forEach((e=>{e.attach(this.picker),this.instances[e.getName()]=e}))}getInstance(e){return this.instances[e]}addInstance(e){if(Object.prototype.hasOwnProperty.call(this.instances,e))console.warn(`easepick: ${e} already added.`);else{if("undefined"!=typeof easepick&&Object.prototype.hasOwnProperty.call(easepick,e)){const t=new easepick[e];return t.attach(this.picker),this.instances[t.getName()]=t,t}if("undefined"!==this.getPluginFn(e)){const t=new(this.getPluginFn(e));return t.attach(this.picker),this.instances[t.getName()]=t,t}console.warn(`easepick: ${e} not found.`)}return null}removeInstance(e){return e in this.instances&&this.instances[e].detach(),delete this.instances[e]}reloadInstance(e){return this.removeInstance(e),this.addInstance(e)}getPluginFn(e){return[...this.picker.options.plugins].filter((t=>"function"==typeof t&&(new t).getName()===e)).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(e){const t={...this.options.locale,...e.locale};this.options={...this.options,...e},this.options.locale=t,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(e,t,n={}){this.ui.container.addEventListener(e,t,n)}off(e,t,n={}){this.ui.container.removeEventListener(e,t,n)}trigger(e,t={}){return this.ui.container.dispatchEvent(new CustomEvent(e,{detail:t}))}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((e=>{this.PluginManager.removeInstance(e)})),this.ui.wrapper.remove()}onRender(e){const{view:t,date:n}=e.detail;this.Calendar.render(n,t)}onView(e){const{view:t,target:n}=e.detail;"Footer"===t&&this.datePicked.length&&(n.querySelector(".apply-button").disabled=!1)}onClickHeaderButton(e){this.isCalendarHeaderButton(e)&&(e.classList.contains("next-button")?this.calendars[0].add(1,"month"):this.calendars[0].subtract(1,"month"),this.renderAll(this.calendars[0]))}onClickCalendarDay(e){if(this.isCalendarDay(e)){const t=new r(e.dataset.time);this.options.autoApply?(this.setDate(t),this.trigger("select",{date:this.getDate()}),this.hide()):(this.datePicked[0]=t,this.trigger("preselect",{date:this.getDate()}),this.renderAll())}}onClickApplyButton(e){if(this.isApplyButton(e)){if(this.datePicked[0]instanceof Date){const e=this.datePicked[0].clone();this.setDate(e)}this.hide(),this.trigger("select",{date:this.getDate()})}}onClickCancelButton(e){this.isCancelButton(e)&&this.hide()}onClick(e){const t=e.target;if(t instanceof HTMLElement){const e=t.closest(".unit");if(!(e instanceof HTMLElement))return;this.onClickHeaderButton(e),this.onClickCalendarDay(e),this.onClickApplyButton(e),this.onClickCancelButton(e)}}isShown(){return this.ui.container.classList.contains("inline")||this.ui.container.classList.contains("show")}show(e){if(this.isShown())return;const t=e&&"target"in e?e.target:this.options.element,{top:n,left:r}=this.adjustPosition(t);this.ui.container.style.top=`${n}px`,this.ui.container.style.left=`${r}px`,this.ui.container.classList.add("show"),this.trigger("show",{target:t})}hide(){this.ui.container.classList.remove("show"),this.datePicked.length=0,this.renderAll(),this.trigger("hide")}setDate(e){const t=new r(e,this.options.format);this.options.date=t.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 e=this.getDate(),t=e instanceof Date?e.format(this.options.format,this.options.lang):"",n=this.options.element;n instanceof HTMLInputElement?n.value=t:n instanceof HTMLElement&&(n.innerText=t)}hidePicker(e){let t=e.target,n=null;t.shadowRoot&&(t=e.composedPath()[0],n=t.getRootNode().host),this.isShown()&&n!==this.ui.wrapper&&t!==this.options.element&&this.hide()}renderAll(e){this.trigger("render",{view:"Container",date:(e||this.calendars[0]).clone()})}isCalendarHeaderButton(e){return["previous-button","next-button"].some((t=>e.classList.contains(t)))}isCalendarDay(e){return e.classList.contains("day")}isApplyButton(e){return e.classList.contains("apply-button")}isCancelButton(e){return e.classList.contains("cancel-button")}gotoDate(e){const t=new r(e,this.options.format);t.setDate(1),this.calendars[0]=t.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((e=>{const t=document.createElement("link");t.href=e,t.rel="stylesheet";const n=()=>{this.cssLoaded++,this.cssLoaded===this.options.css.length&&(this.ui.wrapper.style.display="")};t.addEventListener("load",n),t.addEventListener("error",n),this.ui.shadowRoot.append(t)}));else if("string"==typeof this.options.css){const e=document.createElement("style"),t=document.createTextNode(this.options.css);e.appendChild(t),this.ui.shadowRoot.append(e),this.ui.wrapper.style.display=""}else"function"==typeof this.options.css&&(this.options.css.call(this,this),this.ui.wrapper.style.display="")}adjustPosition(e){const t=e.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=t.bottom-n.bottom,o=t.left-n.left;return"undefined"!=typeof window&&(window.innerHeight<i+r.height&&i-r.height>=0&&(i=t.top-n.top-r.height),window.innerWidth<o+r.width&&t.right-r.width>=0&&(o=t.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(e){const t=this.getName(),n={...this.options};this.options={...this.options,...e.options[t]||{}};for(const r of Object.keys(n))if(null!==n[r]&&"object"==typeof n[r]&&Object.keys(n[r]).length&&t in e.options&&r in e.options[t]){const i={...e.options[t][r]};null!==i&&"object"==typeof i&&Object.keys(i).length&&Object.keys(i).every((e=>Object.keys(n[r]).includes(e)))&&(this.options[r]={...n[r],...i})}if(this.picker=e,this.dependenciesNotFound()){const e=this.dependencies.filter((e=>!this.pluginsAsStringArray().includes(e)));return void console.warn(`${this.getName()}: required dependencies (${e.join(", ")}).`)}const r=this.camelCaseToKebab(this.getName());this.picker.ui.container.classList.add(r),this.onAttach()}detach(){const e=this.camelCaseToKebab(this.getName());this.picker.ui.container.classList.remove(e),"function"==typeof this.onDetach&&this.onDetach()}dependenciesNotFound(){return this.dependencies.length&&!this.dependencies.every((e=>this.pluginsAsStringArray().includes(e)))}pluginsAsStringArray(){return this.picker.options.plugins.map((e=>"function"==typeof e?(new e).getName():e))}camelCaseToKebab(e){return e.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 e=this.picker.calendars[0].clone().subtract(1,"month");this.picker.gotoDate(e)}if((this.options.minDays||this.options.maxDays||this.options.selectForward||this.options.selectBackward)&&!this.picker.options.plugins.includes("RangePlugin")){const e=["minDays","maxDays","selectForward","selectBackward"];console.warn(`${this.getName()}: options ${e.join(", ")} required RangePlugin.`)}this.picker.on("view",this.binds.onView)}onDetach(){this.picker.off("view",this.binds.onView)}onView(e){const{view:t,target:n,date:i}=e.detail;if("CalendarHeader"===t&&(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"===t){const e=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 e=i.clone().subtract(this.options.minDays-1,"day"),t=i.clone().add(this.options.minDays-1,"day");let r=!1,o=!1;for(;e.isBefore(i,"day");){if(this.testFilter(e)){r=!0;break}e.add(1,"day")}for(;t.isAfter(i,"day");){if(this.testFilter(t)){o=!0;break}t.subtract(1,"day")}r&&o&&n.classList.add("not-available")}this.rangeIsNotAvailable(i,e)&&n.classList.add("not-available")}this.dateIsNotAvailable(i,e)&&n.classList.add("not-available")}if(this.options.presets&&"PresetPluginButton"===t){const e=new r(Number(n.dataset.start)),t=new r(Number(n.dataset.end)),i=t.diff(e,"day"),o=this.options.minDays&&i<this.options.minDays,a=this.options.maxDays&&i>this.options.maxDays;(o||a||this.lockMinDate(e)||this.lockMaxDate(e)||this.lockMinDate(t)||this.lockMaxDate(t)||this.rangeIsNotAvailable(e,t))&&n.setAttribute("disabled","disabled")}}dateIsNotAvailable(e,t){return this.lockMinDate(e)||this.lockMaxDate(e)||this.lockMinDays(e,t)||this.lockMaxDays(e,t)||this.lockSelectForward(e)||this.lockSelectBackward(e)}rangeIsNotAvailable(e,t){if(!e||!t)return!1;const n=(e.isSameOrBefore(t,"day")?e:t).clone(),r=(t.isSameOrAfter(e,"day")?t:e).clone();for(;n.isSameOrBefore(r,"day");){if(this.testFilter(n))return!0;n.add(1,"day")}return!1}lockMinDate(e){return this.options.minDate instanceof r&&e.isBefore(this.options.minDate,"day")}lockMaxDate(e){return this.options.maxDate instanceof r&&e.isAfter(this.options.maxDate,"day")}lockMinDays(e,t){if(this.options.minDays&&t){const n=t.clone().subtract(this.options.minDays-1,"day"),r=t.clone().add(this.options.minDays-1,"day");return e.isBetween(n,r)}return!1}lockMaxDays(e,t){if(this.options.maxDays&&t){const n=t.clone().subtract(this.options.maxDays,"day"),r=t.clone().add(this.options.maxDays,"day");return!e.isBetween(n,r)}return!1}lockSelectForward(e){if(1===this.picker.datePicked.length&&this.options.selectForward){const t=this.picker.datePicked[0].clone();return e.isBefore(t,"day")}return!1}lockSelectBackward(e){if(1===this.picker.datePicked.length&&this.options.selectBackward){const t=this.picker.datePicked[0].clone();return e.isAfter(t,"day")}return!1}testFilter(e){return"function"==typeof this.options.filter&&this.options.filter(e,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:e=>e,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[e,t]=this.picker.options.element.value.split(this.options.delimiter);this.options.strict?e&&t&&this.setDateRange(e,t):(e&&this.setStartDate(e),t&&this.setEndDate(t))}}updateValues(){const e=this.picker.options.element,t=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(t)e instanceof HTMLInputElement?e.value=i:e instanceof HTMLElement&&(e.innerText=i),t instanceof HTMLInputElement?t.value=o:t instanceof HTMLElement&&(t.innerText=o);else{const t=`${i}${i||o?this.options.delimiter:""}${o}`;e instanceof HTMLInputElement?e.value=t:e instanceof HTMLElement&&(e.innerText=t)}}clear(){this.options.startDate=null,this.options.endDate=null,this.picker.datePicked.length=0,this.updateValues(),this.picker.renderAll(),this.picker.trigger("clear")}onShow(e){const{target:t}=e.detail;this.triggerElement=t,this.picker.options.scrollToDate&&this.getStartDate()instanceof Date&&this.picker.gotoDate(this.getStartDate()),this.initializeRepick()}onView(e){const{view:t,target:n}=e.detail;if("Main"===t&&(this.tooltipElement=document.createElement("span"),this.tooltipElement.className="range-plugin-tooltip",n.appendChild(this.tooltipElement)),"CalendarDay"===t){const e=new r(n.dataset.time),t=this.picker.datePicked,i=t.length?this.picker.datePicked[0]:this.getStartDate(),o=t.length?this.picker.datePicked[1]:this.getEndDate();i&&i.isSame(e,"day")&&n.classList.add("start"),i&&o&&(o.isSame(e,"day")&&n.classList.add("end"),e.isBetween(i,o)&&n.classList.add("in-range"))}if("Footer"===t){const e=1===this.picker.datePicked.length&&!this.options.strict||2===this.picker.datePicked.length;n.querySelector(".apply-button").disabled=!e}}hidePicker(e){let t=e.target,n=null;t.shadowRoot&&(t=e.composedPath()[0],n=t.getRootNode().host),this.picker.isShown()&&n!==this.picker.ui.wrapper&&t!==this.picker.options.element&&t!==this.options.elementEnd&&this.picker.hide()}setStartDate(e){const t=new r(e,this.picker.options.format);this.options.startDate=t?t.clone():null,this.updateValues(),this.picker.renderAll()}setEndDate(e){const t=new r(e,this.picker.options.format);this.options.endDate=t?t.clone():null,this.updateValues(),this.picker.renderAll()}setDateRange(e,t){const n=new r(e,this.picker.options.format),i=new r(t,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(e){const t=e.target;if(t instanceof HTMLElement){this.isContainer(t)&&this.initializeRepick();const e=t.closest(".unit");if(!(e instanceof HTMLElement))return;if(this.picker.isCalendarDay(e)){if(1!==this.picker.datePicked.length)return;let t=this.picker.datePicked[0].clone(),n=new r(e.dataset.time),i=!1;if(t.isAfter(n,"day")){const e=t.clone();t=n.clone(),n=e.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(t,n)&&s.classList.add("in-range"),a.isSame(this.picker.datePicked[0],"day")&&(s.classList.add("start"),s.classList.toggle("flipped",i)),o===e&&(s.classList.add("end"),s.classList.toggle("flipped",i)),o.className=s.className})),this.options.tooltip){const r=this.options.tooltipNumber(n.diff(t,"day")+1);if(r>0){const t=new Intl.PluralRules(this.picker.options.lang).select(r),n=`${r} ${this.options.locale[t]}`;this.showTooltip(e,n)}else this.hideTooltip()}}}}onMouseLeave(e){if(this.isContainer(e.target)&&this.options.repick){const e=this.getStartDate(),t=this.getEndDate();e&&t&&(this.picker.datePicked.length=0,this.picker.renderAll())}}onClickCalendarDay(e){if(this.picker.isCalendarDay(e)){2===this.picker.datePicked.length&&(this.picker.datePicked.length=0);const t=new r(e.dataset.time);if(this.picker.datePicked[this.picker.datePicked.length]=t,2===this.picker.datePicked.length&&this.picker.datePicked[0].isAfter(this.picker.datePicked[1])){const e=this.picker.datePicked[1].clone();this.picker.datePicked[1]=this.picker.datePicked[0].clone(),this.picker.datePicked[0]=e.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(e){this.picker.isApplyButton(e)&&(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(e,t){this.tooltipElement.style.visibility="visible",this.tooltipElement.innerHTML=t;const n=this.picker.ui.container.getBoundingClientRect(),r=this.tooltipElement.getBoundingClientRect(),i=e.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 e=[...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)])],t=Object.keys(this.options.locale);e.every((e=>t.includes(e)))||console.warn(`${this.getName()}: provide locales (${e.join(", ")}) for correct tooltip text.`)}initializeRepick(){if(!this.options.repick)return;const e=this.getStartDate(),t=this.getEndDate();t&&this.triggerElement===this.picker.options.element&&(this.picker.datePicked[0]=t),e&&this.triggerElement===this.options.elementEnd&&(this.picker.datePicked[0]=e)}isContainer(e){return e===this.picker.ui.container}}},25755:function(e,t,n){"use strict";var r=n(79664),i=n(48285),o="/*|*/",a=o+"}";function s(e){e&&u.current.insert(e+"}")}var u={current:null},l=function(e,t,n,r,i,l,c,f,h,d){switch(e){case 1:switch(t.charCodeAt(0)){case 64:return u.current.insert(t+";"),"";case 108:if(98===t.charCodeAt(2))return""}break;case 2:if(0===f)return t+o;break;case 3:switch(f){case 102:case 112:return u.current.insert(n[0]+t),"";default:return t+(0===d?o:"")}case-2:t.split(a).forEach(s)}};t.Z=function(e){void 0===e&&(e={});var t,n=e.key||"css";void 0!==e.prefix&&(t={prefix:e.prefix});var o,a=new i.Z(t),s={};o=e.container||document.head;var c,f=document.querySelectorAll("style[data-emotion-"+n+"]");Array.prototype.forEach.call(f,(function(e){e.getAttribute("data-emotion-"+n).split(" ").forEach((function(e){s[e]=!0})),e.parentNode!==o&&o.appendChild(e)})),a.use(e.stylisPlugins)(l),c=function(e,t,n,r){var i=t.name;u.current=n,a(e,t.styles),r&&(h.inserted[i]=!0)};var h={key:n,sheet:new r.m({key:n,container:o,nonce:e.nonce,speedy:e.speedy}),nonce:e.nonce,inserted:s,registered:{},insert:c};return h}},34412:function(e,t,n){"use strict";n.d(t,{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(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]):r+=n+" "})),r}var a=function(e,t,n){var r=e.key+"-"+t.name;if(!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles),void 0===e.inserted[t.name]){var i=t;do{e.insert("."+r,i,e.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(e){var t=function(t,n){return(0,r.createElement)(l.Consumer,null,(function(r){return e(t,r,n)}))};return(0,r.forwardRef)(t)},d="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",p=function(){return null},m=function(e,t,n,i){var l=null===n?t.css:t.css(n);"string"==typeof l&&void 0!==e.registered[l]&&(l=e.registered[l]);var c=t[d],f=[l],h="";"string"==typeof t.className?h=o(e.registered,f,t.className):null!=t.className&&(h=t.className+" ");var m=(0,s.O)(f);a(e,m,"string"==typeof c),h+=e.key+"-"+m.name;var g={};for(var v in t)u.call(t,v)&&"css"!==v&&v!==d&&(g[v]=t[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(e,t,n){return"function"==typeof e.css?(0,r.createElement)(c.Consumer,null,(function(r){return m(t,e,r,n)})):m(t,e,null,n)})),v=(n(79664),n(93998)),y=function(e,t){var n=arguments;if(null==t||!u.call(t,"css"))return r.createElement.apply(void 0,n);var i=n.length,o=new Array(i);o[0]=g,o[1]=function(e,t){var n={};for(var r in t)u.call(t,r)&&(n[r]=t[r]);return n[d]=e,n}(e,t);for(var a=2;a<i;a++)o[a]=n[a];return r.createElement.apply(null,o)},b=(r.Component,function(){var e=v.Z.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}),x=function e(t){for(var n=t.length,r=0,i="";r<n;r++){var o=t[r];if(null!=o){var a=void 0;switch(typeof o){case"boolean":break;case"object":if(Array.isArray(o))a=e(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(e,t){return(0,r.createElement)(c.Consumer,null,(function(n){var i=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=(0,s.O)(n,t.registered);return a(t,i,!1),t.key+"-"+i.name},u={css:i,cx:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return function(e,t,n){var r=[],i=o(e,r,n);return r.length<2?n:i+t(r)}(t.registered,i,x(n))},theme:n},l=e.children(u),c=(0,r.createElement)(w,null);return(0,r.createElement)(r.Fragment,null,c,l)}))}))},93998:function(e,t,n){"use strict";var r=n(74449);t.Z=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,r.O)(t)}},74449:function(e,t,n){"use strict";n.d(t,{O:function(){return m}});var r,i=function(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.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(e){return 45===e.charCodeAt(1)},l=function(e){return null!=e&&"boolean"!=typeof e},c=(r={},function(e){return void 0===r[e]&&(r[e]=u(t=e)?t:t.replace(a,"-$&").toLowerCase()),r[e];var t}),f=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(s,(function(e,t,n){return d={name:t,styles:n,next:d},t}))}return 1===o.Z[e]||u(e)||"number"!=typeof t||0===t?t:t+"px"};function h(e,t,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(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=h(e,t,n[i],!1);else for(var o in n){var a=n[o];if("object"!=typeof a)null!=t&&void 0!==t[a]?r+=o+"{"+t[a]+"}":l(a)&&(r+=c(o)+":"+f(o,a)+";");else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var s=h(e,t,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}(e,t,n);case"function":if(void 0!==e){var o=d,a=n(e);return d=o,h(e,t,a,r)}}if(null==t)return n;var s=t[n];return void 0===s||r?n:s}var d,p=/label:\s*([^\s;\n{]+)\s*;/g,m=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";d=void 0;var a=e[0];null==a||void 0===a.raw?(r=!1,o+=h(n,t,a,!1)):o+=a[0];for(var s=1;s<e.length;s++)o+=h(n,t,e[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(e,t,n){"use strict";n.d(t,{m:function(){return r}});var r=function(){function e(e){this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.before=null}var t=e.prototype;return t.insert=function(e){if(this.ctr%(this.isSpeedy?65e3:1)==0){var t,n=function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t}(this);t=0===this.tags.length?this.before:this.tags[this.tags.length-1].nextSibling,this.container.insertBefore(n,t),this.tags.push(n)}var r=this.tags[this.tags.length-1];if(this.isSpeedy){var i=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(r);try{var o=105===e.charCodeAt(1)&&64===e.charCodeAt(0);i.insertRule(e,o?0:i.cssRules.length)}catch(e){}}else r.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}()},5752:function(e,t,n){"use strict";Object.defineProperty(t,"__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 e(e,t,n){var r,i,u=this;this.firebase_=n,this.isDeleted_=!1,this.name_=t.name,this.automaticDataCollectionEnabled_=t.automaticDataCollectionEnabled||!1,this.options_=a.deepCopy(e),this.container=new s.ComponentContainer(t.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(e){r={error:e}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}}return Object.defineProperty(e.prototype,"automaticDataCollectionEnabled",{get:function(){return this.checkDestroyed_(),this.automaticDataCollectionEnabled_},set:function(e){this.checkDestroyed_(),this.automaticDataCollectionEnabled_=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this.checkDestroyed_(),this.name_},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return this.checkDestroyed_(),this.options_},enumerable:!0,configurable:!0}),e.prototype.delete=function(){var e=this;return new Promise((function(t){e.checkDestroyed_(),t()})).then((function(){return e.firebase_.INTERNAL.removeApp(e.name_),Promise.all(e.container.getProviders().map((function(e){return e.delete()})))})).then((function(){e.isDeleted_=!0}))},e.prototype._getService=function(e,t){return void 0===t&&(t=h),this.checkDestroyed_(),this.container.getProvider(e).getImmediate({identifier:t})},e.prototype._removeServiceInstance=function(e,t){void 0===t&&(t=h),this.container.getProvider(e).clearInstance(t)},e.prototype._addComponent=function(e){try{this.container.addComponent(e)}catch(t){p.debug("Component "+e.name+" failed to register with FirebaseApp "+this.name,t)}},e.prototype._addOrOverwriteComponent=function(e){this.container.addOrOverwriteComponent(e)},e.prototype.checkDestroyed_=function(){if(this.isDeleted_)throw c.create("app-deleted",{appName:this.name_})},e}();m.prototype.name&&m.prototype.options||m.prototype.delete||console.log("dc");var g=function e(){var t=function(e){var t={},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(t,s))throw c.create("duplicate-app",{appName:s});var u=new e(n,o,r);return t[s]=u,u},app:i,registerVersion:function(e,t,n){var r,i=null!==(r=d[e])&&void 0!==r?r:e;n&&(i+="-"+n);var o=i.match(/\s|\//),a=t.match(/\s|\//);if(o||a){var u=['Unable to register library "'+i+'" with version "'+t+'":'];return o&&u.push('library name "'+i+'" contains illegal characters (whitespace or "/")'),o&&a&&u.push("and"),a&&u.push('version name "'+t+'" contains illegal characters (whitespace or "/")'),void p.warn(u.join(" "))}l(new s.Component(i+"-version",(function(){return{library:i,version:t}}),"VERSION"))},setLogLevel:u.setLogLevel,onLog:function(e,t){if(null!==e&&"function"!=typeof e)throw c.create("invalid-log-argument",{appName:name});u.setUserLogHandler(e,t)},apps:null,SDK_VERSION:"7.13.2",INTERNAL:{registerComponent:l,removeApp:function(e){delete t[e]},components:n,useAsService:function(e,t){return"serverAuth"===t?null:t}}};function i(e){if(e=e||h,!a.contains(t,e))throw c.create("no-app",{appName:e});return t[e]}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(e){if(void 0===e&&(e=i()),"function"!=typeof e[f])throw c.create("invalid-app-argument",{appName:f});return e[f]()};void 0!==s.serviceProps&&a.deepExtend(h,s.serviceProps),r[f]=h,e.prototype[f]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this._getService.bind(this,f).apply(this,s.multipleInstances?e:[])}}try{for(var d=o.__values(Object.keys(t)),m=d.next();!m.done;m=d.next()){var g=m.value;t[g]._addComponent(s)}}catch(e){u={error:e}}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(t).map((function(e){return t[e]}))}}),i.App=e,r}(m);return t.INTERNAL=o.__assign(o.__assign({},t.INTERNAL),{createFirebaseNamespace:e,extendNamespace:function(e){a.deepExtend(t,e)},createSubscribe:a.createSubscribe,ErrorFactory:a.ErrorFactory,deepExtend:a.deepExtend}),t}(),v=function(){function e(e){this.container=e}return e.prototype.getPlatformInfoString=function(){return this.container.getProviders().map((function(e){if(function(e){var t=e.getComponent();return"VERSION"===(null==t?void 0:t.type)}(e)){var t=e.getImmediate();return t.library+"/"+t.version}return null})).filter((function(e){return e})).join(" ")},e}();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 e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];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,e)};var x=g;!function(e,t){e.INTERNAL.registerComponent(new s.Component("platform-logger",(function(e){return new v(e)}),"PRIVATE")),e.registerVersion(f,"0.6.1",void 0),e.registerVersion("fire-js","")}(x),t.default=x,t.firebase=x},79730:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(70655),i=n(31313),o=function(){function e(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY"}return e.prototype.setInstantiationMode=function(e){return this.instantiationMode=e,this},e.prototype.setMultipleInstances=function(e){return this.multipleInstances=e,this},e.prototype.setServiceProps=function(e){return this.serviceProps=e,this},e}(),a="[DEFAULT]",s=function(){function e(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map}return e.prototype.get=function(e){void 0===e&&(e=a);var t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){var n=new i.Deferred;this.instancesDeferred.set(t,n);try{var r=this.getOrInitializeService(t);r&&n.resolve(r)}catch(e){}}return this.instancesDeferred.get(t).promise},e.prototype.getImmediate=function(e){var t=r.__assign({identifier:a,optional:!1},e),n=t.identifier,i=t.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(e){if(i)return null;throw e}},e.prototype.getComponent=function(){return this.component},e.prototype.setComponent=function(e){var t,n;if(e.name!==this.name)throw Error("Mismatching Component "+e.name+" for Provider "+this.name+".");if(this.component)throw Error("Component for "+this.name+" has already been provided");if(this.component=e,function(e){return"EAGER"===e.instantiationMode}(e))try{this.getOrInitializeService(a)}catch(e){}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(e){}}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},e.prototype.clearInstance=function(e){void 0===e&&(e=a),this.instancesDeferred.delete(e),this.instances.delete(e)},e.prototype.delete=function(){return r.__awaiter(this,void 0,void 0,(function(){var e;return r.__generator(this,(function(t){switch(t.label){case 0:return e=Array.from(this.instances.values()),[4,Promise.all(e.filter((function(e){return"INTERNAL"in e})).map((function(e){return e.INTERNAL.delete()})))];case 1:return t.sent(),[2]}}))}))},e.prototype.isComponentSet=function(){return null!=this.component},e.prototype.getOrInitializeService=function(e){var t=this.instances.get(e);return!t&&this.component&&(t=this.component.instanceFactory(this.container,function(e){return e===a?void 0:e}(e)),this.instances.set(e,t)),t||null},e.prototype.normalizeInstanceIdentifier=function(e){return this.component?this.component.multipleInstances?e:a:e},e}(),u=function(){function e(e){this.name=e,this.providers=new Map}return e.prototype.addComponent=function(e){var t=this.getProvider(e.name);if(t.isComponentSet())throw new Error("Component "+e.name+" has already been registered with "+this.name);t.setComponent(e)},e.prototype.addOrOverwriteComponent=function(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)},e.prototype.getProvider=function(e){if(this.providers.has(e))return this.providers.get(e);var t=new s(e,this);return this.providers.set(e,t),t},e.prototype.getProviders=function(){return Array.from(this.providers.values())},e}();t.Component=o,t.ComponentContainer=u,t.Provider=s},78005:function(e,t){!function(e){"use strict";function t(e){return new Promise((function(t,n){e.onsuccess=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function n(e,n,r){var i,o=new Promise((function(o,a){t(i=e[n].apply(e,r)).then(o,a)}));return o.request=i,o}function r(e,t,n){n.forEach((function(n){Object.defineProperty(e.prototype,n,{get:function(){return this[t][n]},set:function(e){this[t][n]=e}})}))}function i(e,t,r,i){i.forEach((function(i){i in r.prototype&&(e.prototype[i]=function(){return n(this[t],i,arguments)})}))}function o(e,t,n,r){r.forEach((function(r){r in n.prototype&&(e.prototype[r]=function(){return this[t][r].apply(this[t],arguments)})}))}function a(e,t,r,i){i.forEach((function(i){i in r.prototype&&(e.prototype[i]=function(){return e=this[t],(r=n(e,i,arguments)).then((function(e){if(e)return new u(e,r.request)}));var e,r})}))}function s(e){this._index=e}function u(e,t){this._cursor=e,this._request=t}function l(e){this._store=e}function c(e){this._tx=e,this.complete=new Promise((function(t,n){e.oncomplete=function(){t()},e.onerror=function(){n(e.error)},e.onabort=function(){n(e.error)}}))}function f(e,t,n){this._db=e,this.oldVersion=t,this.transaction=new c(n)}function h(e){this._db=e}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(e){e in IDBCursor.prototype&&(u.prototype[e]=function(){var n=this,r=arguments;return Promise.resolve().then((function(){return n._cursor[e].apply(n._cursor,r),t(n._request).then((function(e){if(e)return new u(e,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(e){[l,s].forEach((function(t){e in t.prototype&&(t.prototype[e.replace("open","iterate")]=function(){var t,n=(t=arguments,Array.prototype.slice.call(t)),r=n[n.length-1],i=this._store||this._index,o=i[e].apply(i,n.slice(0,-1));o.onsuccess=function(){r(o.result)}})}))})),[s,l].forEach((function(e){e.prototype.getAll||(e.prototype.getAll=function(e,t){var n=this,r=[];return new Promise((function(i){n.iterateCursor(e,(function(e){e?(r.push(e.value),void 0===t||r.length!=t?e.continue():i(r)):i(r)}))}))})})),e.openDb=function(e,t,r){var i=n(indexedDB,"open",[e,t]),o=i.request;return o&&(o.onupgradeneeded=function(e){r&&r(new f(o.result,e.oldVersion,o.transaction))}),i.then((function(e){return new h(e)}))},e.deleteDb=function(e){return n(indexedDB,"deleteDatabase",[e])},Object.defineProperty(e,"__esModule",{value:!0})}(t)},14594:function(e,t,n){"use strict";function r(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}var i;n.r(t),n.d(t,{LogLevel:function(){return o},Logger:function(){return f},setLogLevel:function(){return h},setUserLogHandler:function(){return d}});var o,a=[];!function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.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(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];if(!(t<e.logLevel)){var o=(new Date).toISOString(),a=l[t];if(!a)throw new Error("Attempted to log a message with an invalid logType (value: "+t+")");console[a].apply(console,r(["["+o+"] "+e.name+":"],n))}},f=function(){function e(e){this.name=e,this._logLevel=u,this._logHandler=c,this._userLogHandler=null,a.push(this)}return Object.defineProperty(e.prototype,"logLevel",{get:function(){return this._logLevel},set:function(e){if(!(e in o))throw new TypeError("Invalid value assigned to `logLevel`");this._logLevel=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"logHandler",{get:function(){return this._logHandler},set:function(e){if("function"!=typeof e)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"userLogHandler",{get:function(){return this._userLogHandler},set:function(e){this._userLogHandler=e},enumerable:!0,configurable:!0}),e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,r([this,o.DEBUG],e)),this._logHandler.apply(this,r([this,o.DEBUG],e))},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,r([this,o.VERBOSE],e)),this._logHandler.apply(this,r([this,o.VERBOSE],e))},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,r([this,o.INFO],e)),this._logHandler.apply(this,r([this,o.INFO],e))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,r([this,o.WARN],e)),this._logHandler.apply(this,r([this,o.WARN],e))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,r([this,o.ERROR],e)),this._logHandler.apply(this,r([this,o.ERROR],e))},e}();function h(e){var t="string"==typeof e?s[e]:e;a.forEach((function(e){e.logLevel=t}))}function d(e,t){for(var n=function(n){var r=null;t&&t.level&&(r=s[t.level]),n.userLogHandler=null===e?null:function(t,n){for(var i=[],a=2;a<arguments.length;a++)i[a-2]=arguments[a];var s=i.map((function(e){if(null==e)return null;if("string"==typeof e)return e;if("number"==typeof e||"boolean"==typeof e)return e.toString();if(e instanceof Error)return e.message;try{return JSON.stringify(e)}catch(e){return null}})).filter((function(e){return e})).join(" ");n>=(null!=r?r:t.logLevel)&&e({level:o[n].toLowerCase(),message:s,args:i,type:t.name})}},r=0,i=a;r<i.length;r++)n(i[r])}},3031:function(e,t){!function(e){"use strict";function t(e){return new Promise((function(t,n){e.onsuccess=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function n(e,n,r){var i,o=new Promise((function(o,a){t(i=e[n].apply(e,r)).then(o,a)}));return o.request=i,o}function r(e,t,n){n.forEach((function(n){Object.defineProperty(e.prototype,n,{get:function(){return this[t][n]},set:function(e){this[t][n]=e}})}))}function i(e,t,r,i){i.forEach((function(i){i in r.prototype&&(e.prototype[i]=function(){return n(this[t],i,arguments)})}))}function o(e,t,n,r){r.forEach((function(r){r in n.prototype&&(e.prototype[r]=function(){return this[t][r].apply(this[t],arguments)})}))}function a(e,t,r,i){i.forEach((function(i){i in r.prototype&&(e.prototype[i]=function(){return e=this[t],(r=n(e,i,arguments)).then((function(e){if(e)return new u(e,r.request)}));var e,r})}))}function s(e){this._index=e}function u(e,t){this._cursor=e,this._request=t}function l(e){this._store=e}function c(e){this._tx=e,this.complete=new Promise((function(t,n){e.oncomplete=function(){t()},e.onerror=function(){n(e.error)},e.onabort=function(){n(e.error)}}))}function f(e,t,n){this._db=e,this.oldVersion=t,this.transaction=new c(n)}function h(e){this._db=e}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(e){e in IDBCursor.prototype&&(u.prototype[e]=function(){var n=this,r=arguments;return Promise.resolve().then((function(){return n._cursor[e].apply(n._cursor,r),t(n._request).then((function(e){if(e)return new u(e,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(e){[l,s].forEach((function(t){e in t.prototype&&(t.prototype[e.replace("open","iterate")]=function(){var t,n=(t=arguments,Array.prototype.slice.call(t)),r=n[n.length-1],i=this._store||this._index,o=i[e].apply(i,n.slice(0,-1));o.onsuccess=function(){r(o.result)}})}))})),[s,l].forEach((function(e){e.prototype.getAll||(e.prototype.getAll=function(e,t){var n=this,r=[];return new Promise((function(i){n.iterateCursor(e,(function(e){e?(r.push(e.value),void 0===t||r.length!=t?e.continue():i(r)):i(r)}))}))})})),e.openDb=function(e,t,r){var i=n(indexedDB,"open",[e,t]),o=i.request;return o&&(o.onupgradeneeded=function(e){r&&r(new f(o.result,e.oldVersion,o.transaction))}),i.then((function(e){return new h(e)}))},e.deleteDb=function(e){return n(indexedDB,"deleteDatabase",[e])},Object.defineProperty(e,"__esModule",{value:!0})}(t)},31313:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(70655),i={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"},o=function(e,t){if(!e)throw a(t)},a=function(e){return new Error("Firebase Database ("+i.SDK_VERSION+") INTERNAL ASSERT FAILED: "+e)},s=function(e){for(var t=[],n=0,r=0;r<e.length;r++){var i=e.charCodeAt(r);i<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=63&i|128):55296==(64512&i)&&r+1<e.length&&56320==(64512&e.charCodeAt(r+1))?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++r)),t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=63&i|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=63&i|128)}return t},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(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();for(var n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[],i=0;i<e.length;i+=3){var o=e[i],a=i+1<e.length,s=a?e[i+1]:0,u=i+2<e.length,l=u?e[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(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(s(e),t)},decodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):function(e){for(var t=[],n=0,r=0;n<e.length;){var i=e[n++];if(i<128)t[r++]=String.fromCharCode(i);else if(i>191&&i<224){var o=e[n++];t[r++]=String.fromCharCode((31&i)<<6|63&o)}else if(i>239&&i<365){var a=((7&i)<<18|(63&(o=e[n++]))<<12|(63&(s=e[n++]))<<6|63&e[n++])-65536;t[r++]=String.fromCharCode(55296+(a>>10)),t[r++]=String.fromCharCode(56320+(1023&a))}else{o=e[n++];var s=e[n++];t[r++]=String.fromCharCode((15&i)<<12|(63&o)<<6|63&s)}}return t.join("")}(this.decodeStringToByteArray(e,t))},decodeStringToByteArray:function(e,t){this.init_();for(var n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[],i=0;i<e.length;){var o=n[e.charAt(i++)],a=i<e.length?n[e.charAt(i)]:0,s=++i<e.length?n[e.charAt(i)]:64,u=++i<e.length?n[e.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 e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}},l=function(e){try{return u.decodeString(e,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};function c(e,t){if(!(t instanceof Object))return t;switch(t.constructor){case Date:return new Date(t.getTime());case Object:void 0===e&&(e={});break;case Array:e=[];break;default:return t}for(var n in t)t.hasOwnProperty(n)&&(e[n]=c(e[n],t[n]));return e}var f=function(){function e(){var e=this;this.reject=function(){},this.resolve=function(){},this.promise=new Promise((function(t,n){e.resolve=t,e.reject=n}))}return e.prototype.wrapCallback=function(e){var t=this;return function(n,r){n?t.reject(n):t.resolve(r),"function"==typeof e&&(t.promise.catch((function(){})),1===e.length?e(n):e(n,r))}},e}();function h(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""}var d=function(e){function t(n,r){var i=e.call(this,r)||this;return i.code=n,i.name="FirebaseError",Object.setPrototypeOf(i,t.prototype),Error.captureStackTrace&&Error.captureStackTrace(i,p.prototype.create),i}return r.__extends(t,e),t}(Error),p=function(){function e(e,t,n){this.service=e,this.serviceName=t,this.errors=n}return e.prototype.create=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=t[0]||{},i=this.service+"/"+e,o=this.errors[e],a=o?function(e,t){return e.replace(m,(function(e,n){var r=t[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},e}(),m=/\{\$([^}]+)}/g;function g(e){return JSON.parse(e)}var v=function(e){var t={},n={},r={},i="";try{var o=e.split(".");t=g(l(o[0])||""),n=g(l(o[1])||""),i=o[2],r=n.d||{},delete n.d}catch(e){}return{header:t,claims:n,data:r,signature:i}},y=function(){function e(){this.chain_=[],this.buf_=[],this.W_=[],this.pad_=[],this.inbuf_=0,this.total_=0,this.blockSize=64,this.pad_[0]=128;for(var e=1;e<this.blockSize;++e)this.pad_[e]=0;this.reset()}return e.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},e.prototype.compress_=function(e,t){t||(t=0);var n=this.W_;if("string"==typeof e)for(var r=0;r<16;r++)n[r]=e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|e.charCodeAt(t+3),t+=4;else for(r=0;r<16;r++)n[r]=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3],t+=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},e.prototype.update=function(e,t){if(null!=e){void 0===t&&(t=e.length);for(var n=t-this.blockSize,r=0,i=this.buf_,o=this.inbuf_;r<t;){if(0===o)for(;r<=n;)this.compress_(e,r),r+=this.blockSize;if("string"==typeof e){for(;r<t;)if(i[o]=e.charCodeAt(r),++r,++o===this.blockSize){this.compress_(i),o=0;break}}else for(;r<t;)if(i[o]=e[r],++r,++o===this.blockSize){this.compress_(i),o=0;break}}this.inbuf_=o,this.total_+=t}},e.prototype.digest=function(){var e=[],t=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&t,t/=256;this.compress_(this.buf_);var r=0;for(n=0;n<5;n++)for(var i=24;i>=0;i-=8)e[r]=this.chain_[n]>>i&255,++r;return e},e}(),b=function(){function e(e,t){var n=this;this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then((function(){e(n)})).catch((function(e){n.error(e)}))}return e.prototype.next=function(e){this.forEachObserver((function(t){t.next(e)}))},e.prototype.error=function(e){this.forEachObserver((function(t){t.error(e)})),this.close(e)},e.prototype.complete=function(){this.forEachObserver((function(e){e.complete()})),this.close()},e.prototype.subscribe=function(e,t,n){var r,i=this;if(void 0===e&&void 0===t&&void 0===n)throw new Error("Missing Observer.");void 0===(r=function(e,t){if("object"!=typeof e||null===e)return!1;for(var n=0,r=["next","error","complete"];n<r.length;n++){var i=r[n];if(i in e&&"function"==typeof e[i])return!0}return!1}(e)?e:{next:e,error:t,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(e){}})),this.observers.push(r),o},e.prototype.unsubscribeOne=function(e){void 0!==this.observers&&void 0!==this.observers[e]&&(delete this.observers[e],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))},e.prototype.forEachObserver=function(e){if(!this.finalized)for(var t=0;t<this.observers.length;t++)this.sendOne(t,e)},e.prototype.sendOne=function(e,t){var n=this;this.task.then((function(){if(void 0!==n.observers&&void 0!==n.observers[e])try{t(n.observers[e])}catch(e){"undefined"!=typeof console&&console.error&&console.error(e)}}))},e.prototype.close=function(e){var t=this;this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then((function(){t.observers=void 0,t.onNoObservers=void 0})))},e}();function x(){}function w(e,t,n){var r="";switch(t){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 e+" failed: "+(r+" argument ")}t.CONSTANTS=i,t.Deferred=f,t.ErrorFactory=p,t.FirebaseError=d,t.Sha1=y,t.assert=o,t.assertionError=a,t.async=function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];Promise.resolve(!0).then((function(){e.apply(void 0,n)})).catch((function(e){t&&t(e)}))}},t.base64=u,t.base64Decode=l,t.base64Encode=function(e){var t=s(e);return u.encodeByteArray(t,!0)},t.contains=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.createSubscribe=function(e,t){var n=new b(e,t);return n.subscribe.bind(n)},t.decode=v,t.deepCopy=function(e){return c(void 0,e)},t.deepExtend=c,t.errorPrefix=w,t.getUA=h,t.isAdmin=function(e){var t=v(e).claims;return"object"==typeof t&&!0===t.admin},t.isBrowser=function(){return"object"==typeof self&&self.self===self},t.isBrowserExtension=function(){var e="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0;return"object"==typeof e&&void 0!==e.id},t.isElectron=function(){return h().indexOf("Electron/")>=0},t.isEmpty=function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0},t.isIE=function(){var e=h();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0},t.isMobileCordova=function(){return"undefined"!=typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(h())},t.isNode=function(){try{return"[object process]"===Object.prototype.toString.call(n.g.process)}catch(e){return!1}},t.isNodeSdk=function(){return!0===i.NODE_CLIENT||!0===i.NODE_ADMIN},t.isReactNative=function(){return"object"==typeof navigator&&"ReactNative"===navigator.product},t.isUWP=function(){return h().indexOf("MSAppHost/")>=0},t.isValidFormat=function(e){var t=v(e).claims;return!!t&&"object"==typeof t&&t.hasOwnProperty("iat")},t.isValidTimestamp=function(e){var t=v(e).claims,n=Math.floor((new Date).getTime()/1e3),r=0,i=0;return"object"==typeof t&&(t.hasOwnProperty("nbf")?r=t.nbf:t.hasOwnProperty("iat")&&(r=t.iat),i=t.hasOwnProperty("exp")?t.exp:r+86400),!!n&&!!r&&!!i&&n>=r&&n<=i},t.issuedAtTime=function(e){var t=v(e).claims;return"object"==typeof t&&t.hasOwnProperty("iat")?t.iat:null},t.jsonEval=g,t.map=function(e,t,n){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=t.call(n,e[i],i,e));return r},t.querystring=function(e){for(var t=[],n=function(e,n){Array.isArray(n)?n.forEach((function(n){t.push(encodeURIComponent(e)+"="+encodeURIComponent(n))})):t.push(encodeURIComponent(e)+"="+encodeURIComponent(n))},r=0,i=Object.entries(e);r<i.length;r++){var o=i[r];n(o[0],o[1])}return t.length?"&"+t.join("&"):""},t.querystringDecode=function(e){var t={};return e.replace(/^\?/,"").split("&").forEach((function(e){if(e){var n=e.split("=");t[n[0]]=n[1]}})),t},t.safeGet=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0},t.stringLength=function(e){for(var t=0,n=0;n<e.length;n++){var r=e.charCodeAt(n);r<128?t++:r<2048?t+=2:r>=55296&&r<=56319?(t+=4,n++):t+=3}return t},t.stringToByteArray=function(e){for(var t=[],n=0,r=0;r<e.length;r++){var i=e.charCodeAt(r);if(i>=55296&&i<=56319){var a=i-55296;r++,o(r<e.length,"Surrogate pair missing trail surrogate."),i=65536+(a<<10)+(e.charCodeAt(r)-56320)}i<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=63&i|128):i<65536?(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=63&i|128):(t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=63&i|128)}return t},t.stringify=function(e){return JSON.stringify(e)},t.validateArgCount=function(e,t,n,r){var i;if(r<t?i="at least "+t:r>n&&(i=0===n?"none":"no more than "+n),i)throw new Error(e+" failed: Was called with "+r+(1===r?" argument.":" arguments.")+" Expects "+i+".")},t.validateCallback=function(e,t,n,r){if((!r||n)&&"function"!=typeof n)throw new Error(w(e,t,r)+"must be a valid function.")},t.validateContextObject=function(e,t,n,r){if((!r||n)&&("object"!=typeof n||null===n))throw new Error(w(e,t,r)+"must be a valid context object.")},t.validateNamespace=function(e,t,n,r){if((!r||n)&&"string"!=typeof n)throw new Error(w(e,t,r)+"must be a valid firebase namespace.")}},21434:function(e,t,n){"use strict";n.d(t,{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(e){return r.createElement("svg",e,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(e){var t=e.isShown,n=e.onCloseComplete,i=e.body,o=e.yesText,l=e.noText,h=e.okText,d=e.onYes,p=e.onNo,m=(e.size,e.shouldCloseOnOverlayClick),g=e.shouldCloseOnEscapePress,v=e.isOk,y=e.isYesDisabled,b=(0,r.useCallback)((function(e){n(e)}),[n]),x=(0,r.useCallback)((function(e){m&&b(e)}),[b,m]),w=(0,r.useCallback)((function(e,t){g&&"Escape"===e.key&&b(t)}),[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 t&&document.body.addEventListener("keydown",w,!1),function(){document.body.removeEventListener("keydown",w,!1)}}),[w,t]),r.createElement(s.Z,null,r.createElement(a.Z,{in:t,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(e){w(e,"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},99754:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(67294),i=n(45697),o=n.n(i),a=n(61233),s=a.ZP.button.withConfig({displayName:"styles__StyledButton",componentId:"RC__r4nupz-0"})(["padding:11px 16px;width:fit-content;min-width:68px;font-size:14px;font-weight:bold;cursor:pointer;text-transform:uppercase;&.primary{border:none;border-radius:3px;background:transparent linear-gradient(90deg,#eb6b79 0%,#f29e56 100%) 0% 0% no-repeat padding-box;color:#ffffff;&:hover{background:transparent linear-gradient(90deg,#f29e56 0%,#eb6b79 100%) 0% 0% no-repeat padding-box;}&:active{background:transparent linear-gradient(90deg,#f29e56 60%,#eb6b79 100%) 0% 0% no-repeat padding-box;}}&.secondary{border:none;border-radius:3px;background:#ccd4d8;color:var(--color-base-black);&:hover{background:#b4c0c6;}}&.primary,&.secondary{","}"],(function(e){return e.disabled&&(0,a.iv)(["pointer-events:none;cursor:not-allowed;background:var(--color-background-button-secondary-base);color:var(--color-base-black);"])})),u=function(e){var t=e.children,n=e.appearance,i=e.onClick,o=e.disabled;return r.createElement(s,{className:n,onClick:i,disabled:o},t)};u.propTypes={children:o().string.isRequired,appearance:o().string,onClick:o().func,disabled:o().bool},u.defaultProps={appearance:"primary",onClick:function(){},disabled:!1};var l=u},39844:function(e,t,n){"use strict";n.d(t,{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(e){return e.sidebarWidth}),(function(e){return e.isLocalSidebar?"100%":"100vh"}),(function(e){return e.sidebarWidth}),(function(e){return e.sidebarWidth}),(function(e){return e.isLocalSidebar&&(0,l.iv)(["transform:translateY(-100%);"])}),(function(e){return e.isFooterPresent&&(0,l.iv)(["padding-bottom:20vh;"])}),c,c,c,c);function h(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||p(e)||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(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){l=!0,i=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(e,t)||p(e,t)||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(e,t){if(e){if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var g=function(e){return r.createElement("svg",e,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(e){return r.createElement("svg",e,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(e){var t=e.children,n=e.isShown,o=e.onCloseComplete,a=e.title,l=e.footer,c=e.size,p=e.shouldCloseOnOverlayClick,m=e.shouldCloseOnEscapePress,y=e.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(e){var t=e.name,n=e.title,r=e.footer;w((function(e){var i=h(e);return i.push({name:t,title:n,footer:r}),i}))}),[]),E=(0,r.useCallback)((function(){w((function(e){var t=h(e);return t.pop(),t}))}),[]),C=(0,r.useCallback)((function(){o(),w([])}),[o]),A=(0,r.useCallback)((function(){p&&C()}),[C,p]),M=(0,r.useCallback)((function(e){m&&"Escape"===e.key&&C()}),[C,m]),k=(0,r.useMemo)((function(){return"small"===c?"45vw":"medium"===c?"60vw":"80vw"}),[c]),T=(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",M,!1),function(){document.body.removeEventListener("click",M,!1)}}),[M,n]),(0,r.useEffect)((function(){return function(){document.body.removeEventListener("keydown",M,!1)}}),[]),(0,r.useEffect)((function(){S&&n&&O(!1)}),[n,S]);var D=(0,r.useCallback)((function(){return r.createElement(s.Z,{in:n,timeout:300,classNames:"hv-sidebar",onExited:C,unmountOnExit:!0},r.createElement(f,{sidebarWidth:k,isFooterPresent:l||(null==T?void 0:T.footer),isLocalSidebar:!!y},r.createElement("div",{className:"sidebar-backdrop",onClick:A,onKeyDown:M,role:"button","aria-label":"Close sidebar",tabIndex:-1}),r.createElement("div",{className:"sidebar-inner"},(a||(null==T?void 0:T.title))&&r.createElement("div",{className:"sidebar-inner__header"},"MAIN"!==T.name&&r.createElement("span",{className:"sidebar-inner__back-icon",onClick:function(){E()},onKeyDown:function(){E()},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==T?void 0:T.title)||a),"MAIN"===T.name&&r.createElement("span",{className:"sidebar-inner__close-icon",onClick:A,onKeyDown:M,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 t?t({pushSubSidebar:N,popSubSidebar:E,presentView:T}):t),((null==T?void 0:T.footer)||l)&&r.createElement("div",{className:"sidebar-inner__footer"},(null==T?void 0:T.footer)||l))))}),[t,l,A,M,C,n,y,E,T,N,a,k]);return y?!n&&S?null:i.createPortal(D(),document.getElementById(y)):r.createElement(u.Z,null,D())};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},37900:function(e,t,n){"use strict";n.d(t,{Z:function(){return D}});var r=n(67294),i=n(45697),o=n.n(i),a=n(79521);function s(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}(e)||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 u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var l="...",c=function(e,t){var n=t-e+1;return Array.from({length:n},(function(t,n){return n+e}))},f=n(61233),h=(f.ZP.div.withConfig({displayName:"styles",componentId:"RC__h7faor-0"})(["padding:0;"]),f.ZP.div.withConfig({displayName:"styles__StyledPagination",componentId:"RC__h7faor-1"})(["display:flex;gap:10px;align-items:center;span{font:normal normal normal 12px/17px Open Sans;color:#4a494a;}.select{border:0.0625rem solid #e7e7e7;font-size:0.8125rem;font-weight:normal;outline:none;-webkit-appearance:none;-moz-appearance:none;background-color:#fff;color:#272727;padding:0.5rem;background-image:url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgeD0iMTJweCIgeT0iMHB4IiB3aWR0aD0iMjRweCIgaGVpZ2h0PSIzcHgiIHZpZXdCb3g9IjAgMCA2IDMiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDYgMyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+PHBvbHlnb24gcG9pbnRzPSI1Ljk5MiwwIDIuOTkyLDMgLTAuMDA4LDAgIi8+PC9zdmc+');background-position:100% center;background-repeat:no-repeat;border-radius:3px;width:2.5rem;margin:0;}.pagination-container{display:flex;list-style-type:none;width:fit-content;height:36px;border-radius:4px;margin:0;.pagination-item{padding:0 12px;height:32px;text-align:center;color:rgba(0,0,0,0.87);display:flex;box-sizing:border-box;align-items:center;letter-spacing:0.01071em;line-height:1.43;font-size:13px;min-width:32px;border-top:1px solid #959ea5;border-bottom:1px solid #959ea5;border-right:1px solid #d5d5d5;color:#767676;&:first-child{border-left:1px solid #d5d5d5;border-radius:3px 0 0 3px;}&:last-child{border-radius:0 3px 3px 0;}&.dots:hover{background-color:transparent;cursor:default;}&:hover{background-color:rgba(0,0,0,0.04);cursor:pointer;}&.selected{background-color:#edf7ff;color:#0069b7;border:1px solid #0069b7;}&.remove-border{&:not(:last-child){border-right:unset !important;}&:last-child{border-left:unset !important;}}.arrow{width:unset;height:unset;&::before{position:relative;display:inline-block;width:0.4em;height:0.4em;border-right:0.12em solid rgba(0,0,0,0.87);border-top:0.12em solid rgba(0,0,0,0.87);}svg{vertical-align:middle;}}&.disabled{pointer-events:none;background-color:#ededed;color:#9b9b9b;border:1px solid #959ea5;.arrow::before{border-right:0.12em solid rgba(0,0,0,0.43);border-top:0.12em solid rgba(0,0,0,0.43);}&:hover{background-color:transparent;cursor:default;}}}}"])),d=function(e){return r.createElement("svg",e,r.createElement("path",{"'data-name'":"Icon ionic-ios-arrow-down",d:"M4.6 5.752L.242 1.4a.819.819 0 0 1 0-1.162.829.829 0 0 1 1.165 0L6.34 5.169a.821.821 0 0 1 .024 1.139l-4.954 4.96a.823.823 0 0 1-1.165-1.16z",fill:"#9b9b9b"}))};d.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"6.58",height:"11.508",viewBox:"0 0 6.58 11.508"};var p=function(e){return r.createElement("svg",e,r.createElement("path",{"'data-name'":"Icon ionic-ios-arrow-down",d:"M1.98 5.756l4.358 4.352a.819.819 0 0 1 0 1.162.829.829 0 0 1-1.165 0L.24 6.339A.821.821 0 0 1 .216 5.2L5.17.24A.823.823 0 0 1 6.335 1.4z",fill:"#9b9b9b"}))};p.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"6.58",height:"11.508",viewBox:"0 0 6.58 11.508"};var m=function(e){var t=e.onPageChange,n=e.totalCount,i=e.siblingCount,o=e.currentPage,a=e.pageSize,u=e.className,f=e.onPageSizeChange,m=function(e){var t=e.totalCount,n=e.pageSize,i=e.siblingCount,o=void 0===i?1:i,a=e.currentPage;return(0,r.useMemo)((function(){var e=Math.ceil(t/n),r=o+5;if(r>=e)return c(1,e);var i=a-o,u=a+o,f=i>3,h=u<e-2,d=1,p=e;if(f&&!h){var m=c(e-4,p);return[d,l].concat(s(m))}if(!f&&h){var g=c(d,r-1);return[].concat(s(g),[l,p])}if(f&&h){var v=c(i,u);return[d,l].concat(s(v),[l,p])}return 0}),[t,n,o,a])}({currentPage:o,totalCount:n,siblingCount:i,pageSize:a}),g=(0,r.useMemo)((function(){return[5,10,15,20,25]}),[]);if(0===o||m.length<1)return null;var v=m[m.length-1];return r.createElement(h,null,r.createElement("ul",{className:"pagination-container ".concat(u||"")},r.createElement("li",{className:1===o?"pagination-item disabled remove-border":"pagination-item",onClick:function(){t({page:o-1})}},r.createElement("div",{className:"arrow"},r.createElement(p,null))),m.map((function(e){return e===l?r.createElement("li",{className:"pagination-item dots"},"…"):r.createElement("li",{className:e===o?"pagination-item selected":e===o-1?"pagination-item remove-border":"pagination-item",onClick:function(){return t({page:e})}},e)})),r.createElement("li",{className:o===v?"pagination-item disabled remove-border":"pagination-item",onClick:function(){t({page:o+1})}},r.createElement("div",{className:"arrow"},r.createElement(d,null)))),r.createElement("span",null,"Rows per page"),r.createElement("select",{className:"select",value:a,onChange:function(e){f(e)}},g.map((function(e){return r.createElement("option",{key:e,value:e},e)}))))};m.propTypes={onPageSizeChange:o().func.isRequired,onPageChange:o().func.isRequired,totalCount:o().number.isRequired,currentPage:o().number.isRequired,pageSize:o().number.isRequired,siblingCount:o().number,className:o().string},m.defaultProps={className:"",siblingCount:1};var g=m,v=n(53989),y=f.ZP.div.withConfig({displayName:"styles__TableWrapper",componentId:"RC__i8fivn-0"})(["width:100%;height:100%;input[type='checkbox' i]{width:15px;height:15px;border-radius:0.25rem;margin-bottom:0;vertical-align:top;outline:none;}.pagination-wrapper{display:flex;justify-content:center;align-items:center;gap:10px;font:normal normal normal 12px/17px Open Sans;color:#4a494a;}"]),b=f.ZP.table.withConfig({displayName:"styles__CustomizedTable",componentId:"RC__i8fivn-1"})(["border-spacing:0;width:100%;table-layout:unset;height:calc(100% - 36px);"]),x=f.ZP.thead.withConfig({displayName:"styles__TableHeader",componentId:"RC__i8fivn-2"})(["display:block;width:100%;tr{border-bottom:0;border-top:1px solid #e3e3e3;}"]),w=f.ZP.tbody.withConfig({displayName:"styles__TableBody",componentId:"RC__i8fivn-3"})(["display:block;width:100%;height:inherit;overflow:auto;position:relative;"]),_=f.ZP.tr.withConfig({displayName:"styles__TableRow",componentId:"RC__i8fivn-4"})(["border:1px solid #e3e3e3;border-top:0;display:table;width:100%;table-layout:fixed;"]),S=f.ZP.th.withConfig({displayName:"styles__TableHead",componentId:"RC__i8fivn-5"})(["background-color:#f2f5f8;margin:0;padding:",";text-align:left;color:#646a6f;width:",";:last-child{border-right:0;}font:normal normal 600 12px/17px Open Sans;vertical-align:middle;svg{margin-left:6px;transform:",";}.sortedItem{display:flex;background-color:",";width:fit-content;border-radius:0.25rem;padding:6px;&:hover{background:#cdd9e5;color:#0e1419;}}"],(function(e){return e.column.canSort?0:"8px 6px"}),(function(e){var t=e.column;return null!=t&&t.cellwidth?t.cellwidth:"auto"}),(function(e){return e.column.isSortedDesc?"rotate(180deg)":"none"}),(function(e){return e.column.isSorted?"#E1EAF4":"unset"})),O=f.ZP.td.withConfig({displayName:"styles__TableCell",componentId:"RC__i8fivn-6"})(["margin:0;padding:15px 6px;text-align:left;color:#2a3139;vertical-align:middle;&:nth-child(2){font-weight:600;color:#0e1419;}:last-child{border-right:0;}font:normal normal 400 14px/18px Open Sans;width:",";"],(function(e){var t,n=e.cell;return null!=n&&null!==(t=n.column)&&void 0!==t&&t.cellwidth?n.column.cellwidth:"auto"})),N=f.ZP.div.withConfig({displayName:"styles__StyledTableLoader",componentId:"RC__i8fivn-7"})([".hv-hippoui{&-color-loading{position:absolute;top:50%;left:48%;transform:translate(-50%,-50%);z-index:1;}&-loading-bar{display:inline-block;width:5px;height:35px;margin:0px 3px;border-radius:0.25rem;background-color:#e58060;animation:color-loading 1s ease-in-out infinite;&:nth-child(1){animation-delay:0s;}&:nth-child(2){animation-delay:0.09s;}&:nth-child(3){animation-delay:0.18s;}&:nth-child(4){animation-delay:0.27s;}}}@keyframes color-loading{0%{transform:scale(1);}20%{transform:scale(1,2.2);}40%{transform:scale(1);}}"]),E=function(){return r.createElement(N,null,r.createElement("div",{className:"hv-hippoui-color-loading"},r.createElement("div",{className:"hv-hippoui-loading-bar"}),r.createElement("div",{className:"hv-hippoui-loading-bar"}),r.createElement("div",{className:"hv-hippoui-loading-bar"}),r.createElement("div",{className:"hv-hippoui-loading-bar"})))};function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function A(){return A=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},A.apply(this,arguments)}var M=function(e){return r.createElement("svg",e,r.createElement("path",{"'data-name'":"Icon ionic-ios-arrow-round-down",d:"M7.68 5.747a.533.533 0 0 0-.75 0L4.447 8.222V.525a.53.53 0 0 0-1.06 0v7.692L.903 5.739a.537.537 0 0 0-.75 0 .528.528 0 0 0 0 .746l3.385 3.36a.6.6 0 0 0 .167.11.506.506 0 0 0 .2.041.531.531 0 0 0 .371-.151l3.385-3.36a.519.519 0 0 0 .019-.738z",fill:"#0e1419"}))};M.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"7.83",height:"10",viewBox:"0 0 7.83 10"};var k=(0,r.forwardRef)((function(e,t){var n=e.indeterminate,i=e.title,o=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,["indeterminate","title"]),a=(0,r.useRef)(),s=t||a;return(0,r.useEffect)((function(){s.current.indeterminate=n}),[s,n]),i?r.createElement(v.Z,{content:"Select All",position:"top"},r.createElement("input",A({type:"checkbox",ref:s},o))):r.createElement("input",A({type:"checkbox",ref:s},o))})),T=(0,r.forwardRef)((function(e,t){var n=e.children,i=e.columns,o=e.data,s=e.triggerFetchdata,u=e.onrowselect,l=e.pageCount,c=e.defaultPageSize,f=e.showPagination,h=e.defaultSortBy,d=e.loading,p=(0,a.useTable)({columns:i,data:o,manualSortBy:!0,autoResetSortBy:!1,pageCount:l,initialState:{pageIndex:0,pageSize:c,sortBy:h},manualPagination:!0,disableSortRemove:!0,autoResetPage:!1},a.useSortBy,a.usePagination,a.useRowSelect,(function(e){u&&e.visibleColumns.push((function(e){return[{id:"selection",Header:function(e){var t=e.getToggleAllRowsSelectedProps;return r.createElement("div",null,r.createElement(k,A({},t({title:void 0}),{title:"Select All"})))},Cell:function(e){var t=e.row;return r.createElement("div",null,r.createElement(k,t.getToggleRowSelectedProps({title:void 0})))},cellwidth:"40px"}].concat(function(e){if(Array.isArray(e))return C(e)}(t=e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?C(e,t):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.")}());var t}))})),m=p.getTableProps,N=p.getTableBodyProps,T=p.headerGroups,D=p.rows,j=p.prepareRow,P=p.selectedFlatRows,I=p.gotoPage,R=p.pageCount,L=p.setPageSize,F=p.state,B=F.sortBy,q=F.pageIndex,z=F.pageSize;return(0,r.useImperativeHandle)(t,(function(){return p})),(0,r.useEffect)((function(){s({sortBy:B,pageIndex:q+1,pageSize:z})}),[B,s,q,z]),(0,r.useEffect)((function(){u&&u({selectedFlatRows:P})}),[u,P]),r.createElement(y,null,"function"==typeof n?r.createElement(b,m(),n(p)):r.createElement(b,m(),r.createElement(x,null,T.map((function(e){return r.createElement(_,e.getHeaderGroupProps(),e.headers.map((function(e){return r.createElement(S,A({},e.getHeaderProps(e.getSortByToggleProps({title:void 0})),{column:e}),e.canSort?r.createElement(r.Fragment,null,e.customSortTitle?r.createElement("div",{className:"sortedItem"},e.render("Header"),r.createElement("span",null,e.isSorted?r.createElement(M,null):"")):r.createElement("div",{className:"sortedItem"},r.createElement(v.Z,{content:e.isSorted?e.isSortedDesc?"Sorted z ➞ a":"Sorted a ➞ z":"Sort a ➞ z",position:"top"},e.render("Header"),r.createElement("span",null,e.isSorted?r.createElement(M,null):"")))):e.render("Header"))})))}))),r.createElement(w,N(),d?r.createElement(E,null):null==D?void 0:D.map((function(e){return j(e),r.createElement(_,e.getRowProps(),e.cells.map((function(e){return r.createElement(O,A({},e.getCellProps(),{cell:e}),e.render("Cell"))})))})))),r.createElement("br",null),f&&r.createElement("div",{className:"pagination-wrapper"},r.createElement("span",null,"Showing ",(q+1)*z-z+1," - ",D.length+q*z," of ",R),r.createElement(g,{currentPage:q+1,totalCount:R,pageSize:z,onPageChange:function(e){var t=e.page;I(t-1)},onPageSizeChange:function(e){L(Number(e.target.value))}})))}));T.Row=_,T.Header=x,T.Body=w,T.Head=S,T.Cell=O,T.propTypes={children:o().oneOfType([o().node,o().func]),columns:o().any.isRequired,data:o().any.isRequired,triggerFetchdata:o().func.isRequired,onrowselect:o().func,pageCount:o().number.isRequired,defaultPageSize:o().number,showPagination:o().bool,defaultSortBy:o().any},T.defaultProps={showPagination:!1,defaultPageSize:5,children:null,onrowselect:null,defaultSortBy:[]};var D=T},58307:function(e,t){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(e,t){e.className+=" "+t}function u(e,t){for(var n=e.className.split(" "),r=t.split(" "),i=0;i<r.length;i+=1){var o=n.indexOf(r[i]);o>-1&&n.splice(o,1)}e.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(e){for(;e.lastChild;)e.removeChild(e.lastChild)}function d(e){if(null===e)return e;var t;if(Array.isArray(e)){t=[];for(var n=0;n<e.length;n+=1)t.push(d(e[n]));return t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return(t=new RegExp(e.source)).global=e.global,t.ignoreCase=e.ignoreCase,t.multiline=e.multiline,t.lastIndex=e.lastIndex,t;if("object"==typeof e){for(var r in t={},e)e.hasOwnProperty(r)&&(t[r]=d(e[r]));return t}return e}function p(e,t){if(e.elements){var n=e.elements.root;n.parentNode.removeChild(n),delete e.elements,e.settings=d(e.__settings),e.__init=t,delete e.__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(e){}var v=function(e,t,n,r,i){e.addEventListener(t,n,m?{capture:r,passive:i}:!0===r)},y=function(e,t,n,r,i){e.removeEventListener(t,n,m?{capture:r,passive:i}:!0===r)},b=function(){var e,t,n=!1,r={animation:"animationend",OAnimation:"oAnimationEnd oanimationend",msAnimation:"MSAnimationEnd",MozAnimation:"animationend",WebkitAnimation:"webkitAnimationEnd"};for(e in r)if(void 0!==document.documentElement.style[e]){t=r[e],n=!0;break}return{type:t,supported:n}}();function x(e,t){return function(){if(arguments.length>0){for(var n=[],r=0;r<arguments.length;r+=1)n.push(arguments[r]);return n.push(e),t.apply(e,n)}return t.apply(e,[null,e])}}function w(e,t){return{index:e,button:t,cancel:!1}}function _(e,t){if("function"==typeof t.get(e))return t.get(e).call(t)}var S=function(){var e,t,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>',E={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 C(e){if(!e.__internal){var t;N.defaults.hooks.preinit(e),delete e.__init,e.__settings||(e.__settings=d(e.settings)),"function"==typeof e.setup?((t=e.setup()).options=t.options||{},t.focus=t.focus||{}):t={buttons:[],focus:{element:null,select:!1},options:{}},"object"!=typeof e.hooks&&(e.hooks={});var r=[];if(Array.isArray(t.buttons))for(var i=0;i<t.buttons.length;i+=1){var o=t.buttons[i],a={};for(var u in o)o.hasOwnProperty(u)&&(a[u]=o[u]);r.push(a)}var l=e.__internal={isOpen:!1,activeElement:document.body,timerIn:void 0,timerOut:void 0,buttons:r,focus:t.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=E.base+" "+E.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<e.__internal.buttons.length;f+=1){var h=e.__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 e.elements=c,l.resetHandler=x(e,ee),l.beginMoveHandler=x(e,me),l.beginResizeHandler=x(e,Oe),l.bringToFrontHandler=x(e,j),l.modalClickHandler=x(e,$),l.buttonsClickHandler=x(e,K),l.commandsClickHandler=x(e,R),l.transitionInHandler=x(e,re),l.transitionOutHandler=x(e,ie),l.options)void 0!==t.options[m]?e.set(m,t.options[m]):N.defaults.hasOwnProperty(m)?e.set(m,N.defaults[m]):"title"===m&&e.set(m,N.defaults.glossary[m]);"function"==typeof e.build&&e.build(),N.defaults.hooks.postinit(e)}document.body.appendChild(e.elements.root)}function A(){r.scrollTo(e,t)}function M(){for(var e=0,t=0;t<a.length;t+=1){var n=a[t];(n.isModal()||n.isMaximized())&&(e+=1)}0===e&&document.body.className.indexOf(E.noOverflow)>=0?(u(document.body,E.noOverflow),D(!1)):e>0&&document.body.className.indexOf(E.noOverflow)<0&&(D(!0),s(document.body,E.noOverflow))}var k="",T=0;function D(e){N.defaults.preventBodyShift&&(e&&document.documentElement.scrollHeight>document.documentElement.clientHeight?(T=t,k=r.getComputedStyle(document.body).top,s(document.body,E.fixed),document.body.style.top=-t+"px"):e||(t=T,document.body.style.top=k,u(document.body,E.fixed),A()))}function j(e,t){for(var n=a.indexOf(t)+1;n<a.length;n+=1)if(a[n].isModal())return;return document.body.lastChild!==t.elements.root&&(document.body.appendChild(t.elements.root),a.splice(a.indexOf(t),1),a.push(t),Q(t)),!1}function P(e,t,n,r,i){var o,a={op:void 0,items:[]};if(void 0===i&&"string"==typeof r)a.op="get",t.hasOwnProperty(r)?(a.found=!0,a.value=t[r]):(a.found=!1,a.value=void 0);else if(a.op="set","object"==typeof r){var s=r;for(var u in s)t.hasOwnProperty(u)?(t[u]!==s[u]&&(o=t[u],t[u]=s[u],n.call(e,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");t.hasOwnProperty(r)?(t[r]!==i&&(o=t[r],t[r]=i,n.call(e,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(e){var t;G(e,(function(n){return t=!0!==e.get("invokeOnCloseOff")&&!0===n.invokeOnClose})),!t&&e.isOpen()&&e.close()}function R(e,t){switch(e.srcElement||e.target){case t.elements.commands.pin:t.isPinned()?F(t):L(t);break;case t.elements.commands.maximize:t.isMaximized()?q(t):B(t);break;case t.elements.commands.close:I(t)}return!1}function L(e){e.set("pinned",!0)}function F(e){e.set("pinned",!1)}function B(e){_("onmaximize",e),s(e.elements.root,E.maximized),e.isOpen()&&M(),_("onmaximized",e)}function q(e){_("onrestore",e),u(e.elements.root,E.maximized),e.isOpen()&&M(),_("onrestored",e)}function z(e){var t=f();e.elements.modal.style.marginTop=c()+"px",e.elements.modal.style.marginLeft=t+"px",e.elements.modal.style.marginRight=-t+"px"}function H(e){var t=parseInt(e.elements.modal.style.marginTop,10),n=parseInt(e.elements.modal.style.marginLeft,10);if(e.elements.modal.style.marginTop="",e.elements.modal.style.marginLeft="",e.elements.modal.style.marginRight="",e.isOpen()){var r=0,i=0;""!==e.elements.dialog.style.top&&(r=parseInt(e.elements.dialog.style.top,10)),e.elements.dialog.style.top=r+(t-c())+"px",""!==e.elements.dialog.style.left&&(i=parseInt(e.elements.dialog.style.left,10)),e.elements.dialog.style.left=i+(n-f())+"px"}}function U(e){e.get("modal")||e.get("pinned")?H(e):z(e)}var W=!1,V=0;function $(e,t){if(e.timeStamp-V>200&&(V=e.timeStamp)&&!W){var n=e.srcElement||e.target;!0===t.get("closableByDimmer")&&n===t.elements.modal&&I(t)}W=!1}var Y=0,Z=!1;function G(e,t){if(Date.now()-Y>200&&(Y=Date.now()))for(var n=0;n<e.__internal.buttons.length;n+=1){var r=e.__internal.buttons[n];if(!r.element.disabled&&t(r)){var i=w(n,r);"function"==typeof e.callback&&e.callback.apply(e,[i]),!1===i.cancel&&e.close();break}}}function K(e,t){var n=e.srcElement||e.target;G(t,(function(e){return e.element===n&&(Z=!0)}))}function X(e){if(!Z){var t=a[a.length-1],r=e.keyCode;return 0===t.__internal.buttons.length&&27===r&&!0===t.get("closable")?(I(t),!1):n.indexOf(r)>-1?(G(t,(function(e){return e.key===r})),!1):void 0}Z=!1}function J(e){var t=a[a.length-1],r=e.keyCode;if(37===r||39===r){for(var i=t.__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 e.preventDefault(),e.stopPropagation(),G(t,(function(e){return e.key===r})),!1}function Q(e,t){if(t)t.focus();else{var n=e.__internal.focus,r=n.element;switch(typeof n.element){case"number":e.__internal.buttons.length>n.element&&(r=!0===e.get("basic")?e.elements.reset[0]:e.__internal.buttons[n.element].element);break;case"string":r=e.elements.body.querySelector(n.element);break;case"function":r=n.element.call(e)}(!0===e.get("defaultFocusOff")||null==r&&0===e.__internal.buttons.length)&&(r=e.elements.reset[0]),r&&r.focus&&(r.focus(),n.select&&r.select&&r.select())}}function ee(e,t){if(!t)for(var n=a.length-1;n>-1;n-=1)if(a[n].isModal()){t=a[n];break}if(t&&t.isModal()){var r,i=t.elements.reset[0],o=t.elements.reset[1],s=e.relatedTarget,u=t.elements.root.contains(s),l=e.srcElement||e.target;if(l===i&&!u||l===o&&s===i)return;l===o||l===document.body?r=i:l===i&&s===o?r=te(t):l===i&&u&&(r=te(t,!0)),Q(t,r)}}function te(e,t){var n=[].slice.call(e.elements.dialog.querySelectorAll(o.tabbable));t&&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 ne(e){var t=a[a.length-1];t&&e.shiftKey&&9===e.keyCode&&t.elements.reset[1].focus()}function re(e,t){clearTimeout(t.__internal.timerIn),Q(t),Z=!1,_("onfocus",t),y(t.elements.dialog,b.type,t.__internal.transitionInHandler),u(t.elements.root,E.animationIn)}function ie(e,t){clearTimeout(t.__internal.timerOut),y(t.elements.dialog,b.type,t.__internal.transitionOutHandler),ye(t),Ce(t),t.isMaximized()&&!t.get("startMaximized")&&q(t),"function"==typeof t.__internal.destroy&&t.__internal.destroy.apply(t)}var oe=null,ae=0,se=0,ue="pageX",le="pageY",ce=null,fe=!1,he=null;function de(e,t){var n=e[ue]-ae,r=e[le]-se;fe&&(r-=document.body.scrollTop),t.style.left=n+"px",t.style.top=r+"px"}function pe(e,t){var n=e[ue]-ae,r=e[le]-se;fe&&(r-=document.body.scrollTop),t.style.left=Math.min(ce.maxLeft,Math.max(ce.minLeft,n))+"px",t.style.top=fe?Math.min(ce.maxTop,Math.max(ce.minTop,r))+"px":Math.max(ce.minTop,r)+"px"}function me(e,t){if(null===be&&!t.isMaximized()&&t.get("movable")){var n,r=0,i=0;if("touchstart"===e.type?(e.preventDefault(),n=e.targetTouches[0],ue="clientX",le="clientY"):0===e.button&&(n=e),n){var o=t.elements.dialog;if(s(o,E.capture),o.style.left&&(r=parseInt(o.style.left,10)),o.style.top&&(i=parseInt(o.style.top,10)),ae=n[ue]-r,se=n[le]-i,t.isModal()?se+=t.elements.modal.scrollTop:t.isPinned()&&(se-=document.body.scrollTop),t.get("moveBounded")){var a=o,u=-r,l=-i;do{u+=a.offsetLeft,l+=a.offsetTop}while(a=a.offsetParent);ce={maxLeft:u,minLeft:-u,maxTop:document.documentElement.clientHeight-o.clientHeight-l,minTop:-l},he=pe}else ce=null,he=de;return _("onmove",t),fe=!t.isModal()&&t.isPinned(),oe=t,he(n,o),s(document.body,E.noSelection),!1}}}function ge(e){var t;oe&&("touchmove"===e.type?(e.preventDefault(),t=e.targetTouches[0]):0===e.button&&(t=e),t&&he(t,oe.elements.dialog))}function ve(){if(oe){var e=oe;oe=ce=null,u(document.body,E.noSelection),u(e.elements.dialog,E.capture),_("onmoved",e)}}function ye(e){oe=null;var t=e.elements.dialog;t.style.left=t.style.top=""}var be=null,xe=Number.Nan,we=0,_e=0,Se=0;function Oe(e,t){var n;if(!t.isMaximized()&&("touchstart"===e.type?(e.preventDefault(),n=e.targetTouches[0]):0===e.button&&(n=e),n)){_("onresize",t),be=t,Se=t.elements.resizeHandle.offsetHeight/2;var r=t.elements.dialog;return s(r,E.capture),xe=parseInt(r.style.left,10),r.style.height=r.offsetHeight+"px",r.style.minHeight=t.elements.header.offsetHeight+t.elements.footer.offsetHeight+"px",r.style.width=(we=r.offsetWidth)+"px","none"!==r.style.maxWidth&&(r.style.minWidth=(_e=r.offsetWidth)+"px"),r.style.maxWidth="none",s(document.body,E.noSelection),!1}}function Ne(e){var t;be&&("touchmove"===e.type?(e.preventDefault(),t=e.targetTouches[0]):0===e.button&&(t=e),t&&function(e,t,n){var r,i,o=t,a=0,s=0;do{a+=o.offsetLeft,s+=o.offsetTop}while(o=o.offsetParent);!0===n?(r=e.pageX,i=e.pageY):(r=e.clientX,i=e.clientY);var u=l();if(u&&(r=document.body.offsetWidth-r,isNaN(xe)||(a=document.body.offsetWidth-a-t.offsetWidth)),t.style.height=i-s+Se+"px",t.style.width=r-a+Se+"px",!isNaN(xe)){var c=.5*Math.abs(t.offsetWidth-we);u&&(c*=-1),t.offsetWidth>we?t.style.left=xe+c+"px":t.offsetWidth>=_e&&(t.style.left=xe-c+"px")}}(t,be.elements.dialog,!be.get("modal")&&!be.get("pinned")))}function Ee(){if(be){var e=be;be=null,u(document.body,E.noSelection),u(e.elements.dialog,E.capture),W=!0,_("onresized",e)}}function Ce(e){be=null;var t=e.elements.dialog;"none"===t.style.maxWidth&&(t.style.maxWidth=t.style.minWidth=t.style.width=t.style.height=t.style.minHeight=t.style.left="",xe=Number.Nan,we=_e=Se=0)}function Ae(){for(var e=0;e<a.length;e+=1){var t=a[e];t.get("autoReset")&&(ye(t),Ce(t))}}function Me(e){v(e.elements.dialog,"focus",e.__internal.bringToFrontHandler,!0)}function ke(e){y(e.elements.dialog,"focus",e.__internal.bringToFrontHandler,!0)}function Te(e){v(e.elements.header,"mousedown",e.__internal.beginMoveHandler),v(e.elements.header,"touchstart",e.__internal.beginMoveHandler,!1,!1)}function De(e){y(e.elements.header,"mousedown",e.__internal.beginMoveHandler),y(e.elements.header,"touchstart",e.__internal.beginMoveHandler,!1,!1)}function je(e){v(e.elements.resizeHandle,"mousedown",e.__internal.beginResizeHandler),v(e.elements.resizeHandle,"touchstart",e.__internal.beginResizeHandler,!1,!1)}function Pe(e){y(e.elements.resizeHandle,"mousedown",e.__internal.beginResizeHandler),y(e.elements.resizeHandle,"touchstart",e.__internal.beginResizeHandler,!1,!1)}return{__init:C,isOpen:function(){return this.__internal.isOpen},isModal:function(){return this.elements.root.className.indexOf(E.modeless)<0},isMaximized:function(){return this.elements.root.className.indexOf(E.maximized)>-1},isPinned:function(){return this.elements.root.className.indexOf(E.unpinned)<0},maximize:function(){return this.isMaximized()||B(this),this},restore:function(){return this.isMaximized()&&q(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(e,t){if(!isNaN(e)&&!isNaN(t)){_("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=e-i,s=t-o;l()&&(a*=-1),n.style.left=a+"px",n.style.top=s+"px",_("onmoved",this)}return this},resizeTo:function(e,t){var n=parseFloat(e),r=parseFloat(t),i=/(\d*\.\d+|\d+)%/;if(!isNaN(n)&&!isNaN(r)&&!0===this.get("resizable")){_("onresize",this),(""+e).match(i)&&(n=n/100*document.documentElement.clientWidth),(""+t).match(i)&&(r=r/100*document.documentElement.clientHeight);var o=this.elements.dialog;"none"!==o.style.maxWidth&&(o.style.minWidth=(_e=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(e,t){var n=this,r=P(this,this.__internal.options,(function(e,t,r){!function(e,t,n,r){switch(t){case"title":e.setHeader(r);break;case"modal":!function(e){e.get("modal")?(u(e.elements.root,E.modeless),e.isOpen()&&(ke(e),U(e),M())):(s(e.elements.root,E.modeless),e.isOpen()&&(Me(e),U(e),M()))}(e);break;case"basic":!function(e){e.get("basic")?s(e.elements.root,E.basic):u(e.elements.root,E.basic)}(e);break;case"frameless":!function(e){e.get("frameless")?s(e.elements.root,E.frameless):u(e.elements.root,E.frameless)}(e);break;case"pinned":!function(e){e.get("pinned")?(u(e.elements.root,E.unpinned),e.isOpen()&&H(e)):(s(e.elements.root,E.unpinned),e.isOpen()&&!e.isModal()&&z(e))}(e);break;case"closable":!function(e){e.get("closable")?(s(e.elements.root,E.closable),function(e){v(e.elements.modal,"click",e.__internal.modalClickHandler)}(e)):(u(e.elements.root,E.closable),function(e){y(e.elements.modal,"click",e.__internal.modalClickHandler)}(e))}(e);break;case"maximizable":!function(e){e.get("maximizable")?s(e.elements.root,E.maximizable):u(e.elements.root,E.maximizable)}(e);break;case"pinnable":!function(e){e.get("pinnable")?s(e.elements.root,E.pinnable):u(e.elements.root,E.pinnable)}(e);break;case"movable":!function(e){e.get("movable")?(s(e.elements.root,E.movable),e.isOpen()&&Te(e)):(ye(e),u(e.elements.root,E.movable),e.isOpen()&&De(e))}(e);break;case"resizable":!function(e){e.get("resizable")?(s(e.elements.root,E.resizable),e.isOpen()&&je(e)):(Ce(e),u(e.elements.root,E.resizable),e.isOpen()&&Pe(e))}(e);break;case"padding":r?u(e.elements.root,E.noPadding):e.elements.root.className.indexOf(E.noPadding)<0&&s(e.elements.root,E.noPadding);break;case"overflow":r?u(e.elements.root,E.noOverflow):e.elements.root.className.indexOf(E.noOverflow)<0&&s(e.elements.root,E.noOverflow);break;case"transition":!function(e,t,n){"string"==typeof n&&u(e.elements.root,E.prefix+n),s(e.elements.root,E.prefix+t),e.elements.root.offsetWidth}(e,r,n);break;case"transitionOff":!function(e){e.get("transitionOff")?s(e.elements.root,E.noTransition):u(e.elements.root,E.noTransition)}(e)}"function"==typeof e.hooks.onupdate&&e.hooks.onupdate.call(e,t,n,r)}(n,e,t,r)}),e,t);if("get"===r.op)return r.found?r.value:void 0!==this.settings?P(this,this.settings,this.settingUpdated||function(){},e,t).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(e,t){return this.setting(e,t),this},get:function(e){return this.setting(e)},setHeader:function(e){return"string"==typeof e?(h(this.elements.header),this.elements.header.innerHTML=e):e instanceof r.HTMLElement&&this.elements.header.firstChild!==e&&(h(this.elements.header),this.elements.header.appendChild(e)),this},setContent:function(e){return"string"==typeof e?(h(this.elements.content),this.elements.content.innerHTML=e):e instanceof r.HTMLElement&&this.elements.content.firstChild!==e&&(h(this.elements.content),this.elements.content.appendChild(e)),this},showModal:function(e){return this.show(!0,e)},show:function(n,o){if(C(this),this.__internal.isOpen){ye(this),Ce(this),s(this.elements.dialog,E.shake);var l=this;setTimeout((function(){u(l.elements.dialog,E.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",Ae),v(document.body,"keyup",X),v(document.body,"keydown",J),v(document.body,"focus",ee),v(document.documentElement,"mousemove",ge),v(document.documentElement,"touchmove",ge,!1,!1),v(document.documentElement,"mouseup",ve),v(document.documentElement,"touchend",ve),v(document.documentElement,"mousemove",Ne),v(document.documentElement,"touchmove",Ne,!1,!1),v(document.documentElement,"mouseup",Ee),v(document.documentElement,"touchend",Ee)),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",ne),v(d.elements.reset[1],"focusin",d.__internal.resetHandler),Z=!0,v(d.elements.dialog,b.type,d.__internal.transitionInHandler),d.get("modal")||Me(d),d.get("resizable")&&je(d),d.get("movable")&&Te(d),void 0!==n&&this.set("modal",n),e=f(),t=c(),M(),"string"==typeof o&&""!==o&&(this.__internal.className=o,s(this.elements.root,o)),this.get("startMaximized")?this.maximize():this.isMaximized()&&q(this),U(this),this.elements.root.removeAttribute("style"),u(this.elements.root,E.animationOut),s(this.elements.root,E.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,E.hidden),A(),"function"==typeof this.hooks.onshow&&this.hooks.onshow.call(this),_("onshow",this)}var d;return this},close:function(){var e;return this.__internal.isOpen&&!1!==_("onclosing",this)&&(e=this,1===a.length&&(y(r,"resize",Ae),y(document.body,"keyup",X),y(document.body,"keydown",J),y(document.body,"focus",ee),y(document.documentElement,"mousemove",ge),y(document.documentElement,"mouseup",ve),y(document.documentElement,"mousemove",Ne),y(document.documentElement,"mouseup",Ee)),y(e.elements.commands.container,"click",e.__internal.commandsClickHandler),y(e.elements.footer,"click",e.__internal.buttonsClickHandler),y(e.elements.reset[0],"focusin",e.__internal.resetHandler),y(e.elements.reset[0],"keydown",ne),y(e.elements.reset[1],"focusin",e.__internal.resetHandler),v(e.elements.dialog,b.type,e.__internal.transitionOutHandler),e.get("modal")||ke(e),e.get("movable")&&De(e),e.get("resizable")&&Pe(e),u(this.elements.root,E.animationIn),s(this.elements.root,E.animationOut),clearTimeout(this.__internal.timerOut),this.__internal.timerOut=setTimeout(this.__internal.transitionOutHandler,b.supported?1e3:100),s(this.elements.root,E.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,M()),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,C)},this.close()):this.__internal.destroy||p(this,C)),this}}}(),O=function(){var e,t=[],n=o.notifier.classes,i=n.base;function a(t){t.__internal||(t.__internal={position:N.defaults.notifier.position,delay:N.defaults.notifier.delay},e=document.createElement("DIV"),("transitionOff"in o.notifier?o.notifier.transitionOff:o.transitionOff)&&(i=n.base+" ajs-no-transition"),l(t)),e.parentNode!==document.body&&document.body.appendChild(e)}function l(t){switch(e.className=i,t.__internal.position){case"top-right":s(e,n.top+" "+n.right);break;case"top-left":s(e,n.top+" "+n.left);break;case"top-center":s(e,n.top+" "+n.center);break;case"bottom-left":s(e,n.bottom+" "+n.left);break;case"bottom-center":s(e,n.bottom+" "+n.center);break;default:s(e,n.bottom+" "+n.right)}}return{setting:function(e,t){if(a(this),void 0===t)return this.__internal[e];switch(e){case"position":this.__internal.position=t,l(this);break;case"delay":this.__internal.delay=t}return this},set:function(e,t){return this.setting(e,t),this},get:function(e){return this.setting(e)},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(e){clearTimeout(e.__internal.timer),clearTimeout(e.__internal.transitionTimeout)}return l={element:i,push:function(r,i){if(!this.__internal.pushed){var o,u;switch((l=this).__internal.pushed=!0,t.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?e.appendChild(this.element):e.insertBefore(this.element,e.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===e&&(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)),t.splice(t.indexOf(this),1),this.__internal.pushed=!1)),this},delay:function(e){if(a(this),this.__internal.delay=void 0===e||isNaN(+e)?O.__internal.delay:+e,this.__internal.delay>0){var t=this;this.__internal.timer=setTimeout((function(){t.dismiss()}),1e3*this.__internal.delay)}return this},setContent:function(e){if("string"==typeof e?(h(this.element),this.element.innerHTML=e):e instanceof r.HTMLElement&&this.element.firstChild!==e&&(h(this.element),this.element.appendChild(e)),this.__internal.closeButton){var t=document.createElement("span");s(t,n.close),t.setAttribute("data-close",!0),this.element.appendChild(t)}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(e,t){t.__internal.closeButton&&"true"!==e.target.getAttribute("data-close")||t.dismiss(!0)})),l.__internal.transitionEndHandler=x(l,(function t(n,r){y(r.element,b.type,t),e.removeChild(r.element)}))),l;var l}(l,o)},dismissAll:function(e){for(var n=t.slice(0),r=0;r<n.length;r+=1){var i=n[r];void 0!==e&&e===i||i.dismiss()}}}}(),N=new function(){var e={};function t(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function n(t){var n=e[t].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 t(new e[o].factory,new r)}),i||(a.dialog=t(new a.factory,S)),e[n]=a}(r,i,o,a);this[r]=o?function(){if(0===arguments.length)return s.dialog;var e=t(new s.factory,S);return e&&"function"==typeof e.__init&&e.__init(e),e.main.apply(e,arguments),e.show.apply(e)}:function(){if(s.dialog&&"function"==typeof s.dialog.__init&&s.dialog.__init(s.dialog),0===arguments.length)return s.dialog;var e=s.dialog;return e.main.apply(s.dialog,arguments),e.show.apply(s.dialog)}},closeAll:function(e){for(var t=a.slice(0),n=0;n<t.length;n+=1){var r=t[n];void 0!==e&&e===r||r.close()}},setting:function(e,t,r){if("notifier"===e)return O.setting(t,r);var i=n(e);return i?i.setting(t,r):void 0},set:function(e,t,n){return this.setting(e,t,n)},get:function(e,t){return this.setting(e,t)},notify:function(e,t,n,r){return O.create(t,r).push(e,n)},message:function(e,t,n){return O.create(null,n).push(e,t)},success:function(e,t,n){return O.create("success",n).push(e,t)},error:function(e,t,n){return O.create("error",n).push(e,t)},warning:function(e,t,n){return O.create("warning",n).push(e,t)},dismissAll:function(){O.dismissAll()}}};N.dialog("alert",(function(){return{main:function(e,t,n){var r,i,o;switch(arguments.length){case 1:i=e;break;case 2:"function"==typeof t?(i=e,o=t):(r=e,i=t);break;case 3:r=e,i=t,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(e){this.setContent(e)},settings:{message:void 0,onok:void 0,label:void 0},settingUpdated:function(e,t,n){switch(e){case"message":this.setMessage(n);break;case"label":this.__internal.buttons[0].element&&(this.__internal.buttons[0].element.innerHTML=n)}},callback:function(e){if("function"==typeof this.get("onok")){var t=this.get("onok").call(this,e);void 0!==t&&(e.cancel=!t)}}}})),N.dialog("confirm",(function(){var e={timer:null,index:null,text:null,duration:null,task:function(n,r){if(r.isOpen()){if(r.__internal.buttons[e.index].element.innerHTML=e.text+" (&#8207;"+e.duration+"&#8207;) ",e.duration-=1,-1===e.duration){t(r);var i=r.__internal.buttons[e.index],o=w(e.index,i);"function"==typeof r.callback&&r.callback.apply(r,[o]),!1!==o.close&&r.close()}}else t(r)}};function t(t){null!==e.timer&&(clearInterval(e.timer),e.timer=null,t.__internal.buttons[e.index].element.innerHTML=e.text)}function n(n,r,i){t(n),e.duration=i,e.index=r,e.text=n.__internal.buttons[r].element.innerHTML,e.timer=setInterval(x(n,e.task),1e3),e.task(null,n)}return{main:function(e,t,n,r){var i,o,a,s;switch(arguments.length){case 1:o=e;break;case 2:o=e,a=t;break;case 3:o=e,a=t,s=n;break;case 4:i=e,o=t,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(e){this.setContent(e)},settings:{message:null,labels:null,onok:null,oncancel:null,defaultFocus:null,reverseButtons:null},settingUpdated:function(e,t,n){switch(e){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(e){var n;switch(t(this),e.index){case 0:"function"==typeof this.get("onok")&&void 0!==(n=this.get("onok").call(this,e))&&(e.cancel=!n);break;case 1:"function"==typeof this.get("oncancel")&&void 0!==(n=this.get("oncancel").call(this,e))&&(e.cancel=!n)}},autoOk:function(e){return n(this,0,e),this},autoCancel:function(e){return n(this,1,e),this}}})),N.dialog("prompt",(function(){var e=document.createElement("INPUT"),t=document.createElement("P");return{main:function(e,t,n,r,i){var o,a,s,u,l;switch(arguments.length){case 1:a=e;break;case 2:a=e,s=t;break;case 3:a=e,s=t,u=n;break;case 4:a=e,s=t,u=n,l=r;break;case 5:o=e,a=t,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:e,select:!0},options:{maximizable:!1,resizable:!1}}},build:function(){e.className=N.defaults.theme.input,e.setAttribute("type","text"),e.value=this.get("value"),this.elements.content.appendChild(t),this.elements.content.appendChild(e)},prepare:function(){},setMessage:function(e){"string"==typeof e?(h(t),t.innerHTML=e):e instanceof r.HTMLElement&&t.firstChild!==e&&(h(t),t.appendChild(e))},settings:{message:void 0,labels:void 0,onok:void 0,oncancel:void 0,value:"",type:"text",reverseButtons:void 0},settingUpdated:function(t,n,r){switch(t){case"message":this.setMessage(r);break;case"value":e.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":e.type=r;break;default:e.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(t){var n;switch(t.index){case 0:this.settings.value=e.value,"function"==typeof this.get("onok")&&void 0!==(n=this.get("onok").call(this,t,this.settings.value))&&(t.cancel=!n);break;case 1:"function"==typeof this.get("oncancel")&&void 0!==(n=this.get("oncancel").call(this,t))&&(t.cancel=!n),t.cancel||(e.value=this.settings.value)}}}})),"object"==typeof e.exports?e.exports=N:void 0===(n=function(){return N}.apply(t,[]))||(e.exports=n)}("undefined"!=typeof window?window:this)},96814:function(e,t,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 e=n(648);return e.paginators=n(10424).o,e.waiters=n(54059).V,e},enumerable:!0,configurable:!0}),e.exports=r.Kinesis},94184:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"===o||"number"===o)e.push(n);else if(Array.isArray(n)){if(n.length){var a=i.apply(null,n);a&&e.push(a)}}else if("object"===o){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var s in n)r.call(n,s)&&n[s]&&e.push(s)}}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(n=function(){return i}.apply(t,[]))||(e.exports=n)}()},7556:function(e,t,n){var r=n(47293);e.exports=r((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}))},95631:function(e,t,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;e.exports={getConstructor:function(e,t,n,c){var f=e((function(e,i){s(e,h),g(e,{type:t,index:r(null),first:void 0,last:void 0,size:0}),d||(e.size=0),u(i)||l(i,e[c],{that:e,AS_ENTRIES:n})})),h=f.prototype,m=v(t),y=function(e,t,n){var r,i,o=m(e),a=b(e,t);return a?a.value=n:(o.last=a={index:i=p(t,!0),key:t,value:n,previous:r=o.last,next:void 0,removed:!1},o.first||(o.first=a),r&&(r.next=a),d?o.size++:e.size++,"F"!==i&&(o.index[i]=a)),e},b=function(e,t){var n,r=m(e),i=p(t);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==t)return n};return o(h,{clear:function(){for(var e=m(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete t[n.index],n=n.next;e.first=e.last=void 0,d?e.size=0:this.size=0},delete:function(e){var t=this,n=m(t),r=b(t,e);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--:t.size--}return!!r},forEach:function(e){for(var t,n=m(this),r=a(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!b(this,e)}}),o(h,n?{get:function(e){var t=b(this,e);return t&&t.value},set:function(e,t){return y(this,0===e?0:e,t)}}:{add:function(e){return y(this,e=0===e?0:e,e)}}),d&&i(h,"size",{configurable:!0,get:function(){return m(this).size}}),f},setStrong:function(e,t,n){var r=t+" Iterator",i=v(t),o=v(r);c(e,t,(function(e,t){g(this,{type:r,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=o(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?f("keys"==t?n.key:"values"==t?n.value:[n.key,n.value],!1):(e.target=void 0,f(void 0,!0))}),n?"entries":"values",!n,!0),h(t)}}},77710:function(e,t,n){"use strict";var r=n(82109),i=n(17854),o=n(1702),a=n(54705),s=n(98052),u=n(62423),l=n(20408),c=n(25787),f=n(60614),h=n(68554),d=n(70111),p=n(47293),m=n(17072),g=n(58003),v=n(79587);e.exports=function(e,t,n){var y=-1!==e.indexOf("Map"),b=-1!==e.indexOf("Weak"),x=y?"set":"add",w=i[e],_=w&&w.prototype,S=w,O={},N=function(e){var t=o(_[e]);s(_,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(b&&!d(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return b&&!d(e)?void 0:t(this,0===e?0:e)}:"has"==e?function(e){return!(b&&!d(e))&&t(this,0===e?0:e)}:function(e,n){return t(this,0===e?0:e,n),this})};if(a(e,!f(w)||!(b||_.forEach&&!p((function(){(new w).entries().next()})))))S=n.getConstructor(t,e,y,x),u.enable();else if(a(e,!0)){var E=new S,C=E[x](b?{}:-0,1)!=E,A=p((function(){E.has(1)})),M=m((function(e){new w(e)})),k=!b&&p((function(){for(var e=new w,t=5;t--;)e[x](t,t);return!e.has(-0)}));M||((S=t((function(e,t){c(e,_);var n=v(new w,e,S);return h(t)||l(t,n[x],{that:n,AS_ENTRIES:y}),n}))).prototype=_,_.constructor=S),(A||k)&&(N("delete"),N("has"),y&&N("get")),(k||C)&&N(x),b&&_.clear&&delete _.clear}return O[e]=S,r({global:!0,constructor:!0,forced:S!=w},O),g(S,e),b||n.setStrong(S,e,y),S}},76677:function(e,t,n){var r=n(47293);e.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},62423:function(e,t,n){var r=n(82109),i=n(1702),o=n(3501),a=n(70111),s=n(92597),u=n(3070).f,l=n(8006),c=n(1156),f=n(52050),h=n(69711),d=n(76677),p=!1,m=h("meta"),g=0,v=function(e){u(e,m,{value:{objectID:"O"+g++,weakData:{}}})},y=e.exports={enable:function(){y.enable=function(){},p=!0;var e=l.f,t=i([].splice),n={};n[m]=1,e(n).length&&(l.f=function(n){for(var r=e(n),i=0,o=r.length;i<o;i++)if(r[i]===m){t(r,i,1);break}return r},r({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:c.f}))},fastKey:function(e,t){if(!a(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!s(e,m)){if(!f(e))return"F";if(!t)return"E";v(e)}return e[m].objectID},getWeakData:function(e,t){if(!s(e,m)){if(!f(e))return!0;if(!t)return!1;v(e)}return e[m].weakData},onFreeze:function(e){return d&&p&&f(e)&&!s(e,m)&&v(e),e}};o[m]=!0},52050:function(e,t,n){var r=n(47293),i=n(70111),o=n(84326),a=n(7556),s=Object.isExtensible,u=r((function(){s(1)}));e.exports=u||a?function(e){return!!i(e)&&(!a||"ArrayBuffer"!=o(e))&&(!s||s(e))}:s},69098:function(e,t,n){"use strict";n(77710)("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),n(95631))},51532:function(e,t,n){n(69098)},17727:function(e,t,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(e){var t=l(this,s("Promise")),n=u(e);return this.then(n?function(n){return c(t,e()).then((function(){return n}))}:e,n?function(n){return c(t,e()).then((function(){throw n}))}:e)}}),!i&&u(o)){var d=s("Promise").prototype.finally;h.finally!==d&&f(h,"finally",d,{unsafe:!0})}},37227:function(e,t,n){"use strict";n(77710)("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),n(95631))},70189:function(e,t,n){n(37227)},68757:function(e,t,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(e,t,n){return n>e.length?-1:""===t?n:y(e,t,n)};r({target:"String",proto:!0},{replaceAll:function(e,t){var n,r,o,p,S,O,N,E,C,A=a(this),M=0,k=0,T="";if(!u(e)){if((n=l(e))&&(r=c(a(h(e))),!~y(r,"g")))throw v("`.replaceAll` does not allow non-global regexes");if(o=f(e,g))return i(o,e,A,t);if(m&&n)return b(c(A),e,t)}for(p=c(A),S=c(e),(O=s(t))||(t=c(t)),N=S.length,E=w(1,N),M=_(p,S,0);-1!==M;)C=O?c(t(S,M,p)):d(S,p,M,[],void 0,t),T+=x(p,k,M)+C,k=M+N,M=_(p,S,M+E);return k<p.length&&(T+=x(p,k)),T}})},27207:function(e,t,n){n(68757)},36511:function(e,t,n){"use strict";var r=n(27418),i={};function o(e,t,n,r,i,o,a,s){if(!e){var u;if(void 0===t)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(t.replace(/%s/g,(function(){return l[c++]})))).name="Invariant Violation"}throw u.framesToPop=1,u}}var a="mixins";e.exports=function(e,t,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(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)h(e,t[n])},childContextTypes:function(e,t){e.childContextTypes=r({},e.childContextTypes,t)},contextTypes:function(e,t){e.contextTypes=r({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps?e.getDefaultProps=p(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,t){e.propTypes=r({},e.propTypes,t)},statics:function(e,t){!function(e,t){if(t)for(var n in t){var r=t[n];if(t.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 e)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(e[n]=p(e[n],r));e[n]=r}}}(e,t)},autobind:function(){}};function f(e,t){var n=u.hasOwnProperty(t)?u[t]:null;b.hasOwnProperty(t)&&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.",t),e&&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.",t)}function h(e,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(!t(n),"ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object.");var r=e.prototype,i=r.__reactAutoBindPairs;for(var s in n.hasOwnProperty(a)&&c.mixins(e,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](e,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(e,t){for(var n in o(e&&t&&"object"==typeof e&&"object"==typeof t,"mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects."),t)t.hasOwnProperty(n)&&(o(void 0===e[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),e[n]=t[n]);return e}function p(e,t){return function(){var n=e.apply(this,arguments),r=t.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(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function g(e,t){return t.bind(e)}var v={componentDidMount:function(){this.__isMounted=!0}},y={componentWillUnmount:function(){this.__isMounted=!1}},b={replaceState:function(e,t){this.updater.enqueueReplaceState(this,e,t)},isMounted:function(){return!!this.__isMounted}},x=function(){};return r(x.prototype,e.prototype,b),function(e){var t=function(e,r,a){this.__reactAutoBindPairs.length&&function(e){for(var t=e.__reactAutoBindPairs,n=0;n<t.length;n+=2){var r=t[n],i=t[n+1];e[r]=g(e,i)}}(this),this.props=e,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",t.displayName||"ReactCompositeComponent"),this.state=s};for(var r in t.prototype=new x,t.prototype.constructor=t,t.prototype.__reactAutoBindPairs=[],s.forEach(h.bind(null,t)),h(t,v),h(t,e),h(t,y),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),o(t.prototype.render,"createClass(...): Class specification must implement a `render` method."),u)t.prototype[r]||(t.prototype[r]=null);return t}}},72555:function(e,t,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;e.exports=i(r.Component,r.isValidElement,o)},40452:function(e,t,n){var r;e.exports=(r=n(78249),n(98269),n(68214),n(90888),n(75109),function(){var e=r,t=e.lib.BlockCipher,n=e.algo,i=[],o=[],a=[],s=[],u=[],l=[],c=[],f=[],h=[],d=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var n=0,r=0;for(t=0;t<256;t++){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=e[n],g=e[m],v=e[g],y=257*e[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^e[e[e[v^m]]],r^=e[e[r]]):n=r=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],m=n.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,n=e.sigBytes/4,r=4*((this._nRounds=n+6)+1),o=this._keySchedule=[],a=0;a<r;a++)if(a<n)o[a]=t[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(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,u,l,i)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,c,f,h,d,o),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,i,o,a,s){for(var u=this._nRounds,l=e[t]^n[0],c=e[t+1]^n[1],f=e[t+2]^n[2],h=e[t+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++],e[t]=m,e[t+1]=g,e[t+2]=v,e[t+3]=y},keySize:8});e.AES=t._createHelper(m)}(),r.AES)},75109:function(e,t,n){var r,i,o,a,s,u,l,c,f,h,d,p,m,g,v,y,b,x,w;e.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(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){u.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?w:b}return function(t){return{encrypt:function(n,r,i){return e(r).encrypt(t,n,r,i)},decrypt:function(n,r,i){return e(r).decrypt(t,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(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),m=d.CBC=function(){var e=p.extend();function t(e,t,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++)e[t+o]^=i[o]}return e.Encryptor=e.extend({processBlock:function(e,n){var r=this._cipher,i=r.blockSize;t.call(this,e,n,i),r.encryptBlock(e,n),this._prevBlock=e.slice(n,n+i)}}),e.Decryptor=e.extend({processBlock:function(e,n){var r=this._cipher,i=r.blockSize,o=e.slice(n,n+i);r.decryptBlock(e,n),t.call(this,e,n,i),this._prevBlock=o}}),e}(),g=(i.pad={}).Pkcs7={pad:function(e,t){for(var n=4*t,r=n-e.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);e.concat(u)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},o.BlockCipher=h.extend({cfg:h.cfg.extend({mode:m,padding:g}),reset:function(){h.reset.call(this);var e=this.cfg,t=e.iv,n=e.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,t&&t.words):(this._mode=r.call(n,this,t&&t.words),this._mode.__creator=r)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){e.pad(this._data,this.blockSize);var t=this._process(!0)}else t=this._process(!0),e.unpad(t);return t},blockSize:4}),v=o.CipherParams=a.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),y=(i.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,n=e.salt;if(n)var r=s.create([1398893684,1701076831]).concat(n).concat(t);else r=t;return r.toString(c)},parse:function(e){var t=c.parse(e),n=t.words;if(1398893684==n[0]&&1701076831==n[1]){var r=s.create(n.slice(2,4));n.splice(0,4),t.sigBytes-=16}return v.create({ciphertext:t,salt:r})}},b=o.SerializableCipher=a.extend({cfg:a.extend({format:y}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var i=e.createEncryptor(n,r),o=i.finalize(t),a=i.cfg;return v.create({ciphertext:o,key:n,iv:a.iv,algorithm:e,mode:a.mode,padding:a.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(n,r).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),x=(i.kdf={}).OpenSSL={execute:function(e,t,n,r){r||(r=s.random(8));var i=f.create({keySize:t+n}).compute(e,r),o=s.create(i.words.slice(t),4*n);return i.sigBytes=4*t,v.create({key:i,iv:o,salt:r})}},w=o.PasswordBasedCipher=b.extend({cfg:b.cfg.extend({kdf:x}),encrypt:function(e,t,n,r){var i=(r=this.cfg.extend(r)).kdf.execute(n,e.keySize,e.ivSize);r.iv=i.iv;var o=b.encrypt.call(this,e,t,i.key,r);return o.mixIn(i),o},decrypt:function(e,t,n,r){r=this.cfg.extend(r),t=this._parse(t,r.format);var i=r.kdf.execute(n,e.keySize,e.ivSize,t.salt);return r.iv=i.iv,b.decrypt.call(this,e,t,i.key,r)}}))))},78249:function(e,t){var n;e.exports=(n=n||function(e,t){var n=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),r={},i=r.lib={},o=i.Base={extend:function(e){var t=n(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},a=i.WordArray=o.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||u).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var o=0;o<i;o++){var a=n[o>>>2]>>>24-o%4*8&255;t[r+o>>>2]|=a<<24-(r+o)%4*8}else for(o=0;o<i;o+=4)t[r+o>>>2]=n[o>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=o.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n,r=[],i=function(t){var n=987654321,r=4294967295;return function(){var i=((n=36969*(65535&n)+(n>>16)&r)<<16)+(t=18e3*(65535&t)+(t>>16)&r)&r;return i/=4294967296,(i+=.5)*(e.random()>.5?1:-1)}},o=0;o<t;o+=4){var s=i(4294967296*(n||e.random()));n=987654071*s(),r.push(4294967296*s()|0)}return new a.init(r,t)}}),s=r.enc={},u=s.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new a.init(n,t/2)}},l=s.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new a.init(n,t)}},c=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(l.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return l.parse(unescape(encodeURIComponent(e)))}},f=i.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=c.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,i=n.sigBytes,o=this.blockSize,s=i/(4*o),u=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*o,l=e.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 e=o.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),h=(i.Hasher=f.extend({cfg:o.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){f.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new h.HMAC.init(e,n).finalize(t)}}}),r.algo={});return r}(Math),n)},98269:function(e,t,n){var r,i,o;e.exports=(r=n(78249),o=(i=r).lib.WordArray,i.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp();for(var i=[],o=0;o<n;o+=3)for(var a=(t[o>>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[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(e){var t=e.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=e.indexOf(a);-1!==s&&(t=s)}return function(e,t,n){for(var r=[],i=0,a=0;a<t;a++)if(a%4){var s=n[e.charCodeAt(a-1)]<<a%4*2,u=n[e.charCodeAt(a)]>>>6-a%4*2;r[i>>>2]|=(s|u)<<24-i%4*8,i++}return o.create(r,i)}(e,t,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},r.enc.Base64)},50298:function(e,t,n){var r;e.exports=(r=n(78249),function(){var e=r,t=e.lib.WordArray,n=e.enc;function i(e){return e<<8&4278255360|e>>>8&16711935}n.Utf16=n.Utf16BE={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i+=2){var o=t[i>>>2]>>>16-i%4*8&65535;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var n=e.length,r=[],i=0;i<n;i++)r[i>>>1]|=e.charCodeAt(i)<<16-i%2*16;return t.create(r,2*n)}},n.Utf16LE={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],o=0;o<n;o+=2){var a=i(t[o>>>2]>>>16-o%4*8&65535);r.push(String.fromCharCode(a))}return r.join("")},parse:function(e){for(var n=e.length,r=[],o=0;o<n;o++)r[o>>>1]|=i(e.charCodeAt(o)<<16-o%2*16);return t.create(r,2*n)}}}(),r.enc.Utf16)},90888:function(e,t,n){var r,i,o,a,s,u,l,c;e.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(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){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(e).finalize(t);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(e,t,n){return l.create(n).compute(e,t)},c.EvpKDF)},42209:function(e,t,n){var r,i,o,a;e.exports=(a=n(78249),n(75109),i=(r=a).lib.CipherParams,o=r.enc.Hex,r.format.Hex={stringify:function(e){return e.ciphertext.toString(o)},parse:function(e){var t=o.parse(e);return i.create({ciphertext:t})}},a.format.Hex)},89824:function(e,t,n){var r,i,o;e.exports=(i=(r=n(78249)).lib.Base,o=r.enc.Utf8,void(r.algo.HMAC=i.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=o.parse(t));var n=e.blockSize,r=4*n;t.sigBytes>r&&(t=e.finalize(t)),t.clamp();for(var i=this._oKey=t.clone(),a=this._iKey=t.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 e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,n=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(n))}})))},81354:function(e,t,n){var r;e.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(e,t,n){var r;e.exports=(r=n(78249),function(){if("function"==typeof ArrayBuffer){var e=r.lib.WordArray,t=e.init,n=e.init=function(e){if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),(e instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array)&&(e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),e instanceof Uint8Array){for(var n=e.byteLength,r=[],i=0;i<n;i++)r[i>>>2]|=e[i]<<24-i%4*8;t.call(this,r,n)}else t.apply(this,arguments)};n.prototype=e}}(),r.lib.WordArray)},68214:function(e,t,n){var r;e.exports=(r=n(78249),function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.algo,s=[];!function(){for(var t=0;t<64;t++)s[t]=4294967296*e.abs(e.sin(t+1))|0}();var u=a.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,a=e[t+0],u=e[t+1],d=e[t+2],p=e[t+3],m=e[t+4],g=e[t+5],v=e[t+6],y=e[t+7],b=e[t+8],x=e[t+9],w=e[t+10],_=e[t+11],S=e[t+12],O=e[t+13],N=e[t+14],E=e[t+15],C=o[0],A=o[1],M=o[2],k=o[3];C=l(C,A,M,k,a,7,s[0]),k=l(k,C,A,M,u,12,s[1]),M=l(M,k,C,A,d,17,s[2]),A=l(A,M,k,C,p,22,s[3]),C=l(C,A,M,k,m,7,s[4]),k=l(k,C,A,M,g,12,s[5]),M=l(M,k,C,A,v,17,s[6]),A=l(A,M,k,C,y,22,s[7]),C=l(C,A,M,k,b,7,s[8]),k=l(k,C,A,M,x,12,s[9]),M=l(M,k,C,A,w,17,s[10]),A=l(A,M,k,C,_,22,s[11]),C=l(C,A,M,k,S,7,s[12]),k=l(k,C,A,M,O,12,s[13]),M=l(M,k,C,A,N,17,s[14]),C=c(C,A=l(A,M,k,C,E,22,s[15]),M,k,u,5,s[16]),k=c(k,C,A,M,v,9,s[17]),M=c(M,k,C,A,_,14,s[18]),A=c(A,M,k,C,a,20,s[19]),C=c(C,A,M,k,g,5,s[20]),k=c(k,C,A,M,w,9,s[21]),M=c(M,k,C,A,E,14,s[22]),A=c(A,M,k,C,m,20,s[23]),C=c(C,A,M,k,x,5,s[24]),k=c(k,C,A,M,N,9,s[25]),M=c(M,k,C,A,p,14,s[26]),A=c(A,M,k,C,b,20,s[27]),C=c(C,A,M,k,O,5,s[28]),k=c(k,C,A,M,d,9,s[29]),M=c(M,k,C,A,y,14,s[30]),C=f(C,A=c(A,M,k,C,S,20,s[31]),M,k,g,4,s[32]),k=f(k,C,A,M,b,11,s[33]),M=f(M,k,C,A,_,16,s[34]),A=f(A,M,k,C,N,23,s[35]),C=f(C,A,M,k,u,4,s[36]),k=f(k,C,A,M,m,11,s[37]),M=f(M,k,C,A,y,16,s[38]),A=f(A,M,k,C,w,23,s[39]),C=f(C,A,M,k,O,4,s[40]),k=f(k,C,A,M,a,11,s[41]),M=f(M,k,C,A,p,16,s[42]),A=f(A,M,k,C,v,23,s[43]),C=f(C,A,M,k,x,4,s[44]),k=f(k,C,A,M,S,11,s[45]),M=f(M,k,C,A,E,16,s[46]),C=h(C,A=f(A,M,k,C,d,23,s[47]),M,k,a,6,s[48]),k=h(k,C,A,M,y,10,s[49]),M=h(M,k,C,A,N,15,s[50]),A=h(A,M,k,C,g,21,s[51]),C=h(C,A,M,k,S,6,s[52]),k=h(k,C,A,M,p,10,s[53]),M=h(M,k,C,A,w,15,s[54]),A=h(A,M,k,C,u,21,s[55]),C=h(C,A,M,k,b,6,s[56]),k=h(k,C,A,M,E,10,s[57]),M=h(M,k,C,A,v,15,s[58]),A=h(A,M,k,C,O,21,s[59]),C=h(C,A,M,k,m,6,s[60]),k=h(k,C,A,M,_,10,s[61]),M=h(M,k,C,A,d,15,s[62]),A=h(A,M,k,C,x,21,s[63]),o[0]=o[0]+C|0,o[1]=o[1]+A|0,o[2]=o[2]+M|0,o[3]=o[3]+k|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;n[i>>>5]|=128<<24-i%32;var o=e.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),t.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 e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function l(e,t,n,r,i,o,a){var s=e+(t&n|~t&r)+i+a;return(s<<o|s>>>32-o)+t}function c(e,t,n,r,i,o,a){var s=e+(t&r|n&~r)+i+a;return(s<<o|s>>>32-o)+t}function f(e,t,n,r,i,o,a){var s=e+(t^n^r)+i+a;return(s<<o|s>>>32-o)+t}function h(e,t,n,r,i,o,a){var s=e+(n^(t|~r))+i+a;return(s<<o|s>>>32-o)+t}t.MD5=o._createHelper(u),t.HmacMD5=o._createHmacHelper(u)}(Math),r.MD5)},8568:function(e,t,n){var r;e.exports=(r=n(78249),n(75109),r.mode.CFB=function(){var e=r.lib.BlockCipherMode.extend();function t(e,t,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++)e[t+a]^=o[a]}return e.Encryptor=e.extend({processBlock:function(e,n){var r=this._cipher,i=r.blockSize;t.call(this,e,n,i,r),this._prevBlock=e.slice(n,n+i)}}),e.Decryptor=e.extend({processBlock:function(e,n){var r=this._cipher,i=r.blockSize,o=e.slice(n,n+i);t.call(this,e,n,i,r),this._prevBlock=o}}),e}(),r.mode.CFB)},59968:function(e,t,n){var r;e.exports=(r=n(78249),n(75109),r.mode.CTRGladman=function(){var e=r.lib.BlockCipherMode.extend();function t(e){if(255==(e>>24&255)){var t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}var n=e.Encryptor=e.extend({processBlock:function(e,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(e){0===(e[0]=t(e[0]))&&(e[1]=t(e[1]))}(a);var s=a.slice(0);r.encryptBlock(s,0);for(var u=0;u<i;u++)e[n+u]^=s[u]}});return e.Decryptor=n,e}(),r.mode.CTRGladman)},74242:function(e,t,n){var r,i,o;e.exports=(o=n(78249),n(75109),o.mode.CTR=(i=(r=o.lib.BlockCipherMode.extend()).Encryptor=r.extend({processBlock:function(e,t){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++)e[t+s]^=a[s]}}),r.Decryptor=i,r),o.mode.CTR)},31148:function(e,t,n){var r,i;e.exports=(i=n(78249),n(75109),i.mode.ECB=((r=i.lib.BlockCipherMode.extend()).Encryptor=r.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),r.Decryptor=r.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),r),i.mode.ECB)},27660:function(e,t,n){var r,i,o;e.exports=(o=n(78249),n(75109),o.mode.OFB=(i=(r=o.lib.BlockCipherMode.extend()).Encryptor=r.extend({processBlock:function(e,t){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++)e[t+a]^=o[a]}}),r.Decryptor=i,r),o.mode.OFB)},43615:function(e,t,n){var r;e.exports=(r=n(78249),n(75109),r.pad.AnsiX923={pad:function(e,t){var n=e.sigBytes,r=4*t,i=r-n%r,o=n+i-1;e.clamp(),e.words[o>>>2]|=i<<24-o%4*8,e.sigBytes+=i},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},r.pad.Ansix923)},92807:function(e,t,n){var r;e.exports=(r=n(78249),n(75109),r.pad.Iso10126={pad:function(e,t){var n=4*t,i=n-e.sigBytes%n;e.concat(r.lib.WordArray.random(i-1)).concat(r.lib.WordArray.create([i<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},r.pad.Iso10126)},71077:function(e,t,n){var r;e.exports=(r=n(78249),n(75109),r.pad.Iso97971={pad:function(e,t){e.concat(r.lib.WordArray.create([2147483648],1)),r.pad.ZeroPadding.pad(e,t)},unpad:function(e){r.pad.ZeroPadding.unpad(e),e.sigBytes--}},r.pad.Iso97971)},16991:function(e,t,n){var r;e.exports=(r=n(78249),n(75109),r.pad.NoPadding={pad:function(){},unpad:function(){}},r.pad.NoPadding)},56475:function(e,t,n){var r;e.exports=(r=n(78249),n(75109),r.pad.ZeroPadding={pad:function(e,t){var n=4*t;e.clamp(),e.sigBytes+=n-(e.sigBytes%n||n)},unpad:function(e){for(var t=e.words,n=e.sigBytes-1;!(t[n>>>2]>>>24-n%4*8&255);)n--;e.sigBytes=n+1}},r.pad.ZeroPadding)},2112:function(e,t,n){var r,i,o,a,s,u,l,c,f;e.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(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=this.cfg,r=l.create(n.hasher,e),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(t).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(e,t,n){return c.create(n).compute(e,t)},f.PBKDF2)},93974:function(e,t,n){var r;e.exports=(r=n(78249),n(98269),n(68214),n(90888),n(75109),function(){var e=r,t=e.lib.StreamCipher,n=e.algo,i=[],o=[],a=[],s=n.RabbitLegacy=t.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],r=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[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(t){var o=t.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(e,t){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),e[t+r]^=i[r]},blockSize:4,ivSize:2});function u(){for(var e=this._X,t=this._C,n=0;n<8;n++)o[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<o[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<o[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<o[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<o[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<o[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<o[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<o[6]>>>0?1:0)|0,this._b=t[7]>>>0<o[7]>>>0?1:0,n=0;n<8;n++){var r=e[n]+t[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}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.RabbitLegacy=t._createHelper(s)}(),r.RabbitLegacy)},84454:function(e,t,n){var r;e.exports=(r=n(78249),n(98269),n(68214),n(90888),n(75109),function(){var e=r,t=e.lib.StreamCipher,n=e.algo,i=[],o=[],a=[],s=n.Rabbit=t.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,n=0;n<4;n++)e[n]=16711935&(e[n]<<8|e[n]>>>24)|4278255360&(e[n]<<24|e[n]>>>8);var r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],i=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[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(t){var o=t.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(e,t){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),e[t+r]^=i[r]},blockSize:4,ivSize:2});function u(){for(var e=this._X,t=this._C,n=0;n<8;n++)o[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<o[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<o[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<o[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<o[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<o[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<o[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<o[6]>>>0?1:0)|0,this._b=t[7]>>>0<o[7]>>>0?1:0,n=0;n<8;n++){var r=e[n]+t[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}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.Rabbit=t._createHelper(s)}(),r.Rabbit)},51857:function(e,t,n){var r;e.exports=(r=n(78249),n(98269),n(68214),n(90888),n(75109),function(){var e=r,t=e.lib.StreamCipher,n=e.algo,i=n.RC4=t.extend({_doReset:function(){for(var e=this._key,t=e.words,n=e.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=t[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(e,t){e[t]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var e=this._S,t=this._i,n=this._j,r=0,i=0;i<4;i++){n=(n+e[t=(t+1)%256])%256;var o=e[t];e[t]=e[n],e[n]=o,r|=e[(e[t]+e[n])%256]<<24-8*i}return this._i=t,this._j=n,r}e.RC4=t._createHelper(i);var a=n.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)o.call(this)}});e.RC4Drop=t._createHelper(a)}(),r.RC4)},30706:function(e,t,n){var r;e.exports=(r=n(78249),function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.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(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o,a,d,x,w,_,S,O,N,E,C,A=this._hash.words,M=f.words,k=h.words,T=s.words,D=u.words,j=l.words,P=c.words;for(_=o=A[0],S=a=A[1],O=d=A[2],N=x=A[3],E=w=A[4],n=0;n<80;n+=1)C=o+e[t+T[n]]|0,C+=n<16?p(a,d,x)+M[0]:n<32?m(a,d,x)+M[1]:n<48?g(a,d,x)+M[2]:n<64?v(a,d,x)+M[3]:y(a,d,x)+M[4],C=(C=b(C|=0,j[n]))+w|0,o=w,w=x,x=b(d,10),d=a,a=C,C=_+e[t+D[n]]|0,C+=n<16?y(S,O,N)+k[0]:n<32?v(S,O,N)+k[1]:n<48?g(S,O,N)+k[2]:n<64?m(S,O,N)+k[3]:p(S,O,N)+k[4],C=(C=b(C|=0,P[n]))+E|0,_=E,E=N,N=b(O,10),O=S,S=C;C=A[1]+d+N|0,A[1]=A[2]+x+E|0,A[2]=A[3]+w+_|0,A[3]=A[4]+o+S|0,A[4]=A[0]+a+O|0,A[0]=C},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),e.sigBytes=4*(t.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 e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function p(e,t,n){return e^t^n}function m(e,t,n){return e&t|~e&n}function g(e,t,n){return(e|~t)^n}function v(e,t,n){return e&n|t&~n}function y(e,t,n){return e^(t|~n)}function b(e,t){return e<<t|e>>>32-t}t.RIPEMD160=o._createHelper(d),t.HmacRIPEMD160=o._createHmacHelper(d)}(Math),r.RIPEMD160)},62783:function(e,t,n){var r,i,o,a,s,u,l,c;e.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(e,t){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|e[t+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 e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}}),r.SHA1=a._createHelper(l),r.HmacSHA1=a._createHmacHelper(l),c.SHA1)},87792:function(e,t,n){var r,i,o,a,s,u;e.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 e=a._doFinalize.call(this);return e.sigBytes-=4,e}}),r.SHA224=a._createHelper(s),r.HmacSHA224=a._createHmacHelper(s),u.SHA224)},52153:function(e,t,n){var r;e.exports=(r=n(78249),function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.algo,s=[],u=[];!function(){function t(t){for(var n=e.sqrt(t),r=2;r<=n;r++)if(!(t%r))return!1;return!0}function n(e){return 4294967296*(e-(0|e))|0}for(var r=2,i=0;i<64;)t(r)&&(i<8&&(s[i]=n(e.pow(r,.5))),u[i]=n(e.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(e,t){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|e[t+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 t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return n[i>>>5]|=128<<24-i%32,n[14+(i+64>>>9<<4)]=e.floor(r/4294967296),n[15+(i+64>>>9<<4)]=r,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=o._createHelper(c),t.HmacSHA256=o._createHmacHelper(c)}(Math),r.SHA256)},13327:function(e,t,n){var r;e.exports=(r=n(78249),n(64938),function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.x64.Word,s=t.algo,u=[],l=[],c=[];!function(){for(var e=1,t=0,n=0;n<24;n++){u[e+5*t]=(n+1)*(n+2)/2%64;var r=(2*e+3*t)%5;e=t%5,t=r}for(e=0;e<5;e++)for(t=0;t<5;t++)l[e+5*t]=t+(2*e+3*t)%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 e=0;e<25;e++)f[e]=a.create()}();var h=s.SHA3=o.extend({cfg:o.cfg.extend({outputLength:512}),_doReset:function(){for(var e=this._state=[],t=0;t<25;t++)e[t]=new a.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(e,t){for(var n=this._state,r=this.blockSize/2,i=0;i<r;i++){var o=e[t+2*i],a=e[t+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),(A=n[i]).high^=a,A.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^=(A=n[h+5*m]).high,p^=A.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++)(A=n[h+5*m]).high^=d,A.low^=p}for(var w=1;w<25;w++){var _=(A=n[w]).high,S=A.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 E=f[0],C=n[0];for(E.high=C.high,E.low=C.low,h=0;h<5;h++)for(m=0;m<5;m++){var A=n[w=h+5*m],M=f[w],k=f[(h+1)%5+5*m],T=f[(h+2)%5+5*m];A.high=M.high^~k.high&T.high,A.low=M.low^~k.low&T.low}A=n[0];var D=c[s];A.high^=D.high,A.low^=D.low}},_doFinalize:function(){var t=this._data,n=t.words,r=(this._nDataBytes,8*t.sigBytes),o=32*this.blockSize;n[r>>>5]|=1<<24-r%32,n[(e.ceil((r+1)/o)*o>>>5)-1]|=128,t.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 e=o.clone.call(this),t=e._state=this._state.slice(0),n=0;n<25;n++)t[n]=t[n].clone();return e}});t.SHA3=o._createHelper(h),t.HmacSHA3=o._createHmacHelper(h)}(Math),r.SHA3)},17460:function(e,t,n){var r,i,o,a,s,u,l,c;e.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 e=u._doFinalize.call(this);return e.sigBytes-=16,e}}),r.SHA384=u._createHelper(l),r.HmacSHA384=u._createHmacHelper(l),c.SHA384)},70034:function(e,t,n){var r;e.exports=(r=n(78249),n(64938),function(){var e=r,t=e.lib.Hasher,n=e.x64,i=n.Word,o=n.WordArray,a=e.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 e=0;e<80;e++)l[e]=s()}();var c=a.SHA512=t.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(e,t){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,E=f.low,C=h.high,A=h.low,M=d,k=p,T=m,D=g,j=v,P=y,I=b,R=x,L=w,F=_,B=S,q=O,z=N,H=E,U=C,W=A,V=0;V<80;V++){var $=l[V];if(V<16)var Y=$.high=0|e[t+2*V],Z=$.low=0|e[t+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),ee=l[V-2],te=ee.high,ne=ee.low,re=(te>>>19|ne<<13)^(te<<3|ne>>>29)^te>>>6,ie=(ne>>>19|te<<13)^(ne<<3|te>>>29)^(ne>>>6|te<<26),oe=l[V-7],ae=oe.high,se=oe.low,ue=l[V-16],le=ue.high,ce=ue.low;Y=(Y=(Y=J+ae+((Z=Q+se)>>>0<Q>>>0?1:0))+re+((Z+=ie)>>>0<ie>>>0?1:0))+le+((Z+=ce)>>>0<ce>>>0?1:0),$.high=Y,$.low=Z}var fe,he=L&B^~L&z,de=F&q^~F&H,pe=M&T^M&j^T&j,me=k&D^k&P^D&P,ge=(M>>>28|k<<4)^(M<<30|k>>>2)^(M<<25|k>>>7),ve=(k>>>28|M<<4)^(k<<30|M>>>2)^(k<<25|M>>>7),ye=(L>>>14|F<<18)^(L>>>18|F<<14)^(L<<23|F>>>9),be=(F>>>14|L<<18)^(F>>>18|L<<14)^(F<<23|L>>>9),xe=u[V],we=xe.high,_e=xe.low,Se=U+ye+((fe=W+be)>>>0<W>>>0?1:0),Oe=ve+me;U=z,W=H,z=B,H=q,B=L,q=F,L=I+(Se=(Se=(Se=Se+he+((fe+=de)>>>0<de>>>0?1:0))+we+((fe+=_e)>>>0<_e>>>0?1:0))+Y+((fe+=Z)>>>0<Z>>>0?1:0))+((F=R+fe|0)>>>0<R>>>0?1:0)|0,I=j,R=P,j=T,P=D,T=M,D=k,M=Se+(ge+pe+(Oe>>>0<ve>>>0?1:0))+((k=fe+Oe|0)>>>0<fe>>>0?1:0)|0}p=r.low=p+k,r.high=d+M+(p>>>0<k>>>0?1:0),g=i.low=g+D,i.high=m+T+(g>>>0<D>>>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+q,c.high=S+B+(O>>>0<q>>>0?1:0),E=f.low=E+H,f.high=N+z+(E>>>0<H>>>0?1:0),A=h.low=A+W,h.high=C+U+(A>>>0<W>>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[30+(r+128>>>10<<5)]=Math.floor(n/4294967296),t[31+(r+128>>>10<<5)]=n,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=t.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});e.SHA512=t._createHelper(c),e.HmacSHA512=t._createHmacHelper(c)}(),r.SHA512)},94253:function(e,t,n){var r;e.exports=(r=n(78249),n(98269),n(68214),n(90888),n(75109),function(){var e=r,t=e.lib,n=t.WordArray,i=t.BlockCipher,o=e.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 e=this._key.words,t=[],n=0;n<56;n++){var r=a[n]-1;t[n]=e[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]|=t[(s[n]-1+c)%28]<<31-n%6,l[4+(n/6|0)]|=t[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(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,n){this._lBlock=e[t],this._rBlock=e[t+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),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function h(e,t){var n=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=n,this._lBlock^=n<<e}function d(e,t){var n=(this._rBlock>>>e^this._lBlock)&t;this._lBlock^=n,this._rBlock^=n<<e}e.DES=i._createHelper(f);var p=o.TripleDES=i.extend({_doReset:function(){var e=this._key.words;this._des1=f.createEncryptor(n.create(e.slice(0,2))),this._des2=f.createEncryptor(n.create(e.slice(2,4))),this._des3=f.createEncryptor(n.create(e.slice(4,6)))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});e.TripleDES=i._createHelper(p)}(),r.TripleDES)},64938:function(e,t,n){var r,i,o,a,s,u;e.exports=(r=n(78249),o=(i=r).lib,a=o.Base,s=o.WordArray,(u=i.x64={}).Word=a.extend({init:function(e,t){this.high=e,this.low=t}}),u.WordArray=a.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:8*e.length},toX32:function(){for(var e=this.words,t=e.length,n=[],r=0;r<t;r++){var i=e[r];n.push(i.high),n.push(i.low)}return s.create(n,this.sigBytes)},clone:function(){for(var e=a.clone.call(this),t=e.words=this.words.slice(0),n=t.length,r=0;r<n;r++)t[r]=t[r].clone();return e}}),r)},52942:function(e,t,n){var r,i;!function(){function o(e){return e&&(e.ownerDocument||e.document||e).documentElement}function a(e){return e&&(e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView)}function s(e,t){return t>e?-1:e>t?1:e>=t?0:NaN}function u(e){return null===e?NaN:+e}function l(e){return!isNaN(e)}function c(e){return{left:function(t,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);i>r;){var o=r+i>>>1;e(t[o],n)<0?r=o+1:i=o}return r},right:function(t,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);i>r;){var o=r+i>>>1;e(t[o],n)>0?i=o:r=o+1}return r}}}function f(e){return e.length}function h(e,t){for(var n in t)Object.defineProperty(e.prototype,n,{value:t[n],enumerable:!1})}function d(){this._=Object.create(null)}function p(e){return(e+="")===Ao||e[0]===Mo?Mo+e:e}function m(e){return(e+="")[0]===Mo?e.slice(1):e}function g(e){return p(e)in this._}function v(e){return(e=p(e))in this._&&delete this._[e]}function y(){var e=[];for(var t in this._)e.push(m(t));return e}function b(){var e=0;for(var t in this._)++e;return e}function x(){for(var e in this._)return!1;return!0}function w(){this._=Object.create(null)}function _(e){return e}function S(e,t,n){return function(){var r=n.apply(t,arguments);return r===t?e:r}}function O(e,t){if(t in e)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var n=0,r=ko.length;r>n;++n){var i=ko[n]+t;if(i in e)return i}}function N(){}function E(){}function C(e){function t(){for(var t,r=n,i=-1,o=r.length;++i<o;)(t=r[i].on)&&t.apply(this,arguments);return e}var n=[],r=new d;return t.on=function(t,i){var o,a=r.get(t);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(t)),i&&n.push(r.set(t,{on:i})),e)},t}function A(){vo.event.preventDefault()}function M(){for(var e,t=vo.event;e=t.sourceEvent;)t=e;return t}function k(e){for(var t=new E,n=0,r=arguments.length;++n<r;)t[arguments[n]]=C(t);return t.of=function(n,r){return function(i){try{var o=i.sourceEvent=vo.event;i.target=e,vo.event=i,t[i.type].apply(n,r)}finally{vo.event=o}}},t}function T(e){return Do(e,Ro),e}function D(e){return"function"==typeof e?e:function(){return jo(e,this)}}function j(e){return"function"==typeof e?e:function(){return Po(e,this)}}function P(e,t){return e=vo.ns.qualify(e),null==t?e.local?function(){this.removeAttributeNS(e.space,e.local)}:function(){this.removeAttribute(e)}:"function"==typeof t?e.local?function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}:function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}:e.local?function(){this.setAttributeNS(e.space,e.local,t)}:function(){this.setAttribute(e,t)}}function I(e){return e.trim().replace(/\s+/g," ")}function R(e){return new RegExp("(?:^|\\s+)"+vo.requote(e)+"(?:\\s+|$)","g")}function L(e){return(e+"").trim().split(/^|\s+/)}function F(e,t){var n=(e=L(e).map(B)).length;return"function"==typeof t?function(){for(var r=-1,i=t.apply(this,arguments);++r<n;)e[r](this,i)}:function(){for(var r=-1;++r<n;)e[r](this,t)}}function B(e){var t=R(e);return function(n,r){if(i=n.classList)return r?i.add(e):i.remove(e);var i=n.getAttribute("class")||"";r?(t.lastIndex=0,t.test(i)||n.setAttribute("class",I(i+" "+e))):n.setAttribute("class",I(i.replace(t," ")))}}function q(e,t,n){return null==t?function(){this.style.removeProperty(e)}:"function"==typeof t?function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}:function(){this.style.setProperty(e,t,n)}}function z(e,t){return null==t?function(){delete this[e]}:"function"==typeof t?function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}:function(){this[e]=t}}function H(e){return"function"==typeof e?e:(e=vo.ns.qualify(e)).local?function(){return this.ownerDocument.createElementNS(e.space,e.local)}:function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Lo&&t.documentElement.namespaceURI===Lo?t.createElement(e):t.createElementNS(n,e)}}function U(){var e=this.parentNode;e&&e.removeChild(this)}function W(e){return{__data__:e}}function V(e){return function(){return Io(this,e)}}function $(e){return arguments.length||(e=s),function(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}}function Y(e,t){for(var n=0,r=e.length;r>n;n++)for(var i,o=e[n],a=0,s=o.length;s>a;a++)(i=o[a])&&t(i,a,n);return e}function Z(e){return Do(e,Bo),e}function G(e,t,n){function r(){var t=this[i];t&&(this.removeEventListener(e,t,t.$),delete this[i])}var i="__on"+e,o=e.indexOf("."),a=K;o>0&&(e=e.slice(0,o));var s=qo.get(e);return s&&(e=s,a=X),o?t?function(){var o=a(t,bo(arguments));r.call(this),this.addEventListener(e,this[i]=o,o.$=n),o._=t}:r:t?N:function(){var t,n=new RegExp("^__on([^.]+)"+vo.requote(e)+"$");for(var r in this)if(t=r.match(n)){var i=this[r];this.removeEventListener(t[1],i,i.$),delete this[r]}}}function K(e,t){return function(n){var r=vo.event;vo.event=n,t[0]=this.__data__;try{e.apply(this,t)}finally{vo.event=r}}}function X(e,t){var n=K(e,t);return function(e){var t=this,r=e.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||n.call(t,e)}}function J(e){var t=".dragsuppress-"+ ++Ho,n="click"+t,r=vo.select(a(e)).on("touchmove"+t,A).on("dragstart"+t,A).on("selectstart"+t,A);if(null==zo&&(zo=!("onselectstart"in e)&&O(e.style,"userSelect")),zo){var i=o(e).style,s=i[zo];i[zo]="none"}return function(e){if(r.on(t,null),zo&&(i[zo]=s),e){var o=function(){r.on(n,null)};r.on(n,(function(){A(),o()}),!0),setTimeout(o,0)}}}function Q(e,t){t.changedTouches&&(t=t.changedTouches[0]);var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();if(0>Uo){var i=a(e);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=t.pageX,r.y=t.pageY):(r.x=t.clientX,r.y=t.clientY),[(r=r.matrixTransform(e.getScreenCTM().inverse())).x,r.y]}var s=e.getBoundingClientRect();return[t.clientX-s.left-e.clientLeft,t.clientY-s.top-e.clientTop]}function ee(){return vo.event.changedTouches[0].identifier}function te(e){return e>0?1:0>e?-1:0}function ne(e,t,n){return(t[0]-e[0])*(n[1]-e[1])-(t[1]-e[1])*(n[0]-e[0])}function re(e){return e>1?0:-1>e?$o:Math.acos(e)}function ie(e){return e>1?Go:-1>e?-Go:Math.asin(e)}function oe(e){return((e=Math.exp(e))+1/e)/2}function ae(e){return(e=Math.sin(e/2))*e}function se(){}function ue(e,t,n){return this instanceof ue?(this.h=+e,this.s=+t,void(this.l=+n)):arguments.length<2?e instanceof ue?new ue(e.h,e.s,e.l):we(""+e,_e,ue):new ue(e,t,n)}function le(e,t,n){function r(e){return Math.round(255*function(e){return e>360?e-=360:0>e&&(e+=360),60>e?i+(o-i)*e/60:180>e?o:240>e?i+(o-i)*(240-e)/60:i}(e))}var i,o;return e=isNaN(e)?0:(e%=360)<0?e+360:e,t=isNaN(t)||0>t?0:t>1?1:t,i=2*(n=0>n?0:n>1?1:n)-(o=.5>=n?n*(1+t):n+t-n*t),new ve(r(e+120),r(e),r(e-120))}function ce(e,t,n){return this instanceof ce?(this.h=+e,this.c=+t,void(this.l=+n)):arguments.length<2?e instanceof ce?new ce(e.h,e.c,e.l):function(e,t,n){return e>0?new ce(Math.atan2(n,t)*Xo,Math.sqrt(t*t+n*n),e):new ce(NaN,NaN,e)}(e instanceof he?e.l:(e=Se((e=vo.rgb(e)).r,e.g,e.b)).l,e.a,e.b):new ce(e,t,n)}function fe(e,t,n){return isNaN(e)&&(e=0),isNaN(t)&&(t=0),new he(n,Math.cos(e*=Ko)*t,Math.sin(e)*t)}function he(e,t,n){return this instanceof he?(this.l=+e,this.a=+t,void(this.b=+n)):arguments.length<2?e instanceof he?new he(e.l,e.a,e.b):e instanceof ce?fe(e.h,e.c,e.l):Se((e=ve(e)).r,e.g,e.b):new he(e,t,n)}function de(e,t,n){var r=(e+16)/116,i=r+t/500,o=r-n/200;return new ve(ge(3.2404542*(i=pe(i)*oa)-1.5371385*(r=pe(r)*aa)-.4985314*(o=pe(o)*sa)),ge(-.969266*i+1.8760108*r+.041556*o),ge(.0556434*i-.2040259*r+1.0572252*o))}function pe(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function me(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function ge(e){return Math.round(255*(.00304>=e?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function ve(e,t,n){return this instanceof ve?(this.r=~~e,this.g=~~t,void(this.b=~~n)):arguments.length<2?e instanceof ve?new ve(e.r,e.g,e.b):we(""+e,ve,le):new ve(e,t,n)}function ye(e){return new ve(e>>16,e>>8&255,255&e)}function be(e){return ye(e)+""}function xe(e){return 16>e?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function we(e,t,n){var r,i,o,a=0,s=0,u=0;if(r=/([a-z]+)\((.*)\)/.exec(e=e.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 t(Ne(i[0]),Ne(i[1]),Ne(i[2]))}return(o=ca.get(e))?t(o.r,o.g,o.b):(null==e||"#"!==e.charAt(0)||isNaN(o=parseInt(e.slice(1),16))||(4===e.length?(a=(3840&o)>>4,a|=a>>4,s=240&o,s|=s>>4,u=15&o,u|=u<<4):7===e.length&&(a=(16711680&o)>>16,s=(65280&o)>>8,u=255&o)),t(a,s,u))}function _e(e,t,n){var r,i,o=Math.min(e/=255,t/=255,n/=255),a=Math.max(e,t,n),s=a-o,u=(a+o)/2;return s?(i=.5>u?s/(a+o):s/(2-a-o),r=e==a?(t-n)/s+(n>t?6:0):t==a?(n-e)/s+2:(e-t)/s+4,r*=60):(r=NaN,i=u>0&&1>u?0:r),new ue(r,i,u)}function Se(e,t,n){var r=me((.4124564*(e=Oe(e))+.3575761*(t=Oe(t))+.1804375*(n=Oe(n)))/oa),i=me((.2126729*e+.7151522*t+.072175*n)/aa);return he(116*i-16,500*(r-i),200*(i-me((.0193339*e+.119192*t+.9503041*n)/sa)))}function Oe(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Ne(e){var t=parseFloat(e);return"%"===e.charAt(e.length-1)?Math.round(2.55*t):t}function Ee(e){return"function"==typeof e?e:function(){return e}}function Ce(e){return function(t,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=null),Ae(t,n,e,r)}}function Ae(e,t,n,r){function i(){var e,t=u.status;if(!t&&function(e){var t=e.responseType;return t&&"text"!==t?e.response:e.responseText}(u)||t>=200&&300>t||304===t){try{e=n.call(o,u)}catch(e){return void a.error.call(o,e)}a.load.call(o,e)}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(e)||(u=new XDomainRequest),"onload"in u?u.onload=u.onerror=i:u.onreadystatechange=function(){u.readyState>3&&i()},u.onprogress=function(e){var t=vo.event;vo.event=e;try{a.progress.call(o,u)}finally{vo.event=t}},o.header=function(e,t){return e=(e+"").toLowerCase(),arguments.length<2?s[e]:(null==t?delete s[e]:s[e]=t+"",o)},o.mimeType=function(e){return arguments.length?(t=null==e?null:e+"",o):t},o.responseType=function(e){return arguments.length?(l=e,o):l},o.response=function(e){return n=e,o},["get","post"].forEach((function(e){o[e]=function(){return o.send.apply(o,[e].concat(bo(arguments)))}})),o.send=function(n,r,i){if(2===arguments.length&&"function"==typeof r&&(i=r,r=null),u.open(n,e,!0),null==t||"accept"in s||(s.accept=t+",*/*"),u.setRequestHeader)for(var c in s)u.setRequestHeader(c,s[c]);return null!=t&&u.overrideMimeType&&u.overrideMimeType(t),null!=l&&(u.responseType=l),null!=i&&o.on("error",i).on("load",(function(e){i(null,e)})),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(e){return 1===e.length?function(t,n){e(null==t?n:null)}:e}(r))}function Me(e,t,n){var r=arguments.length;2>r&&(t=0),3>r&&(n=Date.now());var i={c:e,t:n+t,n:null};return ha?ha.n=i:fa=i,ha=i,da||(pa=clearTimeout(pa),da=1,ma(ke)),i}function ke(){var e=Te(),t=De()-e;t>24?(isFinite(t)&&(clearTimeout(pa),pa=setTimeout(ke,t)),da=0):(da=1,ma(ke))}function Te(){for(var e=Date.now(),t=fa;t;)e>=t.t&&t.c(e-t.t)&&(t.c=null),t=t.n;return e}function De(){for(var e,t=fa,n=1/0;t;)t.c?(t.t<n&&(n=t.t),t=(e=t).n):t=e?e.n=t.n:fa=t.n;return ha=e,n}function je(e,t){return t-(e?Math.ceil(Math.log(e)/Math.LN10):1)}function Pe(e){var t=e.decimal,n=e.thousands,r=e.grouping,i=e.currency,o=r&&n?function(e,t){for(var i=e.length,o=[],a=0,s=r[0],u=0;i>0&&s>0&&(u+s+1>t&&(s=Math.max(1,t-u)),o.push(e.substring(i-=s,i+s)),!((u+=s+1)>t));)s=r[a=(a+1)%r.length];return o.reverse().join(n)}:_;return function(e){var n=va.exec(e),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)||Ie;var b=l&&f;return function(e){var n=g;if(v&&e%1)return"";var i=0>e||0===e&&0>1/e?(e=-e,"-"):"-"===s?"":s;if(0>p){var u=vo.formatPrefix(e,h);e=u.scale(e),n=u.symbol+g}else e*=p;var x,w,_=(e=d(e,h)).lastIndexOf(".");if(0>_){var S=y?e.lastIndexOf("e"):-1;0>S?(x=e,w=""):(x=e.substring(0,S),w=e.substring(S))}else x=e.substring(0,_),w=t+e.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,e=x+w,("<"===a?i+e+N:">"===a?N+i+e:"^"===a?N.substring(0,O>>=1)+i+e+N.substring(O):i+(b?e:N+e))+n}}}function Ie(e){return e+""}function Re(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Le(e,t,n){function r(t){var n=e(t),r=o(n,1);return r-t>t-n?n:r}function i(n){return t(n=e(new xa(n-1)),1),n}function o(e,n){return t(e=new xa(+e),n),e}function a(e,r,o){var a=i(e),s=[];if(o>1)for(;r>a;)n(a)%o||s.push(new Date(+a)),t(a,1);else for(;r>a;)s.push(new Date(+a)),t(a,1);return s}e.floor=e,e.round=r,e.ceil=i,e.offset=o,e.range=a;var s=e.utc=Fe(e);return s.floor=s,s.round=Fe(r),s.ceil=Fe(i),s.offset=Fe(o),s.range=function(e,t,n){try{xa=Re;var r=new Re;return r._=e,a(r,t,n)}finally{xa=Date}},e}function Fe(e){return function(t,n){try{xa=Re;var r=new Re;return r._=t,e(r,n)._}finally{xa=Date}}}function Be(e){function t(e){function t(t){for(var n,i,o,a=[],s=-1,u=0;++s<r;)37===e.charCodeAt(s)&&(a.push(e.slice(u,s)),null!=(i=_a[n=e.charAt(++s)])&&(n=e.charAt(++s)),(o=x[n])&&(n=o(t,null==i?"e"===n?" ":"0":i)),a.push(n),u=s+1);return a.push(e.slice(u,s)),a.join("")}var r=e.length;return t.parse=function(t){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null};if(n(r,e,t,0)!=t.length)return null;"p"in r&&(r.H=r.H%12+12*r.p);var i=null!=r.Z&&xa!==Re,o=new(i?Re: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},t.toString=function(){return e},t}function n(e,t,n,r){for(var i,o,a,s=0,u=t.length,l=n.length;u>s;){if(r>=l)return-1;if(37===(i=t.charCodeAt(s++))){if(a=t.charAt(s++),!(o=w[a in _a?t.charAt(s++):a])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}var r=e.dateTime,i=e.date,o=e.time,a=e.periods,s=e.days,u=e.shortDays,l=e.months,c=e.shortMonths;t.utc=function(e){function n(e){try{var t=new(xa=Re);return t._=e,r(t)}finally{xa=Date}}var r=t(e);return n.parse=function(e){try{xa=Re;var t=r.parse(e);return t&&t._}finally{xa=Date}},n.toString=r.toString,n},t.multi=t.utc.multi=it;var f=vo.map(),h=ze(s),d=He(s),p=ze(u),m=He(u),g=ze(l),v=He(l),y=ze(c),b=He(c);a.forEach((function(e,t){f.set(e.toLowerCase(),t)}));var x={a:function(e){return u[e.getDay()]},A:function(e){return s[e.getDay()]},b:function(e){return c[e.getMonth()]},B:function(e){return l[e.getMonth()]},c:t(r),d:function(e,t){return qe(e.getDate(),t,2)},e:function(e,t){return qe(e.getDate(),t,2)},H:function(e,t){return qe(e.getHours(),t,2)},I:function(e,t){return qe(e.getHours()%12||12,t,2)},j:function(e,t){return qe(1+ba.dayOfYear(e),t,3)},L:function(e,t){return qe(e.getMilliseconds(),t,3)},m:function(e,t){return qe(e.getMonth()+1,t,2)},M:function(e,t){return qe(e.getMinutes(),t,2)},p:function(e){return a[+(e.getHours()>=12)]},S:function(e,t){return qe(e.getSeconds(),t,2)},U:function(e,t){return qe(ba.sundayOfYear(e),t,2)},w:function(e){return e.getDay()},W:function(e,t){return qe(ba.mondayOfYear(e),t,2)},x:t(i),X:t(o),y:function(e,t){return qe(e.getFullYear()%100,t,2)},Y:function(e,t){return qe(e.getFullYear()%1e4,t,4)},Z:nt,"%":function(){return"%"}},w={a:function(e,t,n){p.lastIndex=0;var r=p.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){h.lastIndex=0;var r=h.exec(t.slice(n));return r?(e.w=d.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){y.lastIndex=0;var r=y.exec(t.slice(n));return r?(e.m=b.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){g.lastIndex=0;var r=g.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,t,r){return n(e,x.c.toString(),t,r)},d:Ke,e:Ke,H:Je,I:Je,j:Xe,L:tt,m:Ge,M:Qe,p:function(e,t,n){var r=f.get(t.slice(n,n+=2).toLowerCase());return null==r?-1:(e.p=r,n)},S:et,U:We,w:Ue,W:Ve,x:function(e,t,r){return n(e,x.x.toString(),t,r)},X:function(e,t,r){return n(e,x.X.toString(),t,r)},y:Ye,Y:$e,Z:Ze,"%":rt};return t}function qe(e,t,n){var r=0>e?"-":"",i=(r?-e:e)+"",o=i.length;return r+(n>o?new Array(n-o+1).join(t)+i:i)}function ze(e){return new RegExp("^(?:"+e.map(vo.requote).join("|")+")","i")}function He(e){for(var t=new d,n=-1,r=e.length;++n<r;)t.set(e[n].toLowerCase(),n);return t}function Ue(e,t,n){Sa.lastIndex=0;var r=Sa.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function We(e,t,n){Sa.lastIndex=0;var r=Sa.exec(t.slice(n));return r?(e.U=+r[0],n+r[0].length):-1}function Ve(e,t,n){Sa.lastIndex=0;var r=Sa.exec(t.slice(n));return r?(e.W=+r[0],n+r[0].length):-1}function $e(e,t,n){Sa.lastIndex=0;var r=Sa.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Ye(e,t,n){Sa.lastIndex=0;var r=Sa.exec(t.slice(n,n+2));return r?(e.y=function(e){return e+(e>68?1900:2e3)}(+r[0]),n+r[0].length):-1}function Ze(e,t,n){return/^[+-]\d{4}$/.test(t=t.slice(n,n+5))?(e.Z=-t,n+5):-1}function Ge(e,t,n){Sa.lastIndex=0;var r=Sa.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Ke(e,t,n){Sa.lastIndex=0;var r=Sa.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Xe(e,t,n){Sa.lastIndex=0;var r=Sa.exec(t.slice(n,n+3));return r?(e.j=+r[0],n+r[0].length):-1}function Je(e,t,n){Sa.lastIndex=0;var r=Sa.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Qe(e,t,n){Sa.lastIndex=0;var r=Sa.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function et(e,t,n){Sa.lastIndex=0;var r=Sa.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function tt(e,t,n){Sa.lastIndex=0;var r=Sa.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function nt(e){var t=e.getTimezoneOffset(),n=t>0?"-":"+",r=Co(t)/60|0,i=Co(t)%60;return n+qe(r,"0",2)+qe(i,"0",2)}function rt(e,t,n){Oa.lastIndex=0;var r=Oa.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function it(e){for(var t=e.length,n=-1;++n<t;)e[n][0]=this(e[n][0]);return function(t){for(var n=0,r=e[n];!r[1](t);)r=e[++n];return r[0](t)}}function ot(){}function at(e,t,n){var r=n.s=e+t,i=r-e,o=r-i;n.t=e-o+(t-i)}function st(e,t){e&&Aa.hasOwnProperty(e.type)&&Aa[e.type](e,t)}function ut(e,t,n){var r,i=-1,o=e.length-n;for(t.lineStart();++i<o;)r=e[i],t.point(r[0],r[1],r[2]);t.lineEnd()}function lt(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)ut(e[n],t,1);t.polygonEnd()}function ct(){function e(e,t){t=t*Ko/2+$o/4;var n=(e*=Ko)-r,a=n>=0?1:-1,s=a*n,u=Math.cos(t),l=Math.sin(t),c=o*l,f=i*u+c*Math.cos(s),h=c*a*Math.sin(s);ka.add(Math.atan2(h,f)),r=e,i=u,o=l}var t,n,r,i,o;Ta.point=function(a,s){Ta.point=e,r=(t=a)*Ko,i=Math.cos(s=(n=s)*Ko/2+$o/4),o=Math.sin(s)},Ta.lineEnd=function(){e(t,n)}}function ft(e){var t=e[0],n=e[1],r=Math.cos(n);return[r*Math.cos(t),r*Math.sin(t),Math.sin(n)]}function ht(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function dt(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function pt(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function mt(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function gt(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function vt(e){return[Math.atan2(e[1],e[0]),ie(e[2])]}function yt(e,t){return Co(e[0]-t[0])<Wo&&Co(e[1]-t[1])<Wo}function bt(e,t){e*=Ko;var n=Math.cos(t*=Ko);xt(n*Math.cos(e),n*Math.sin(e),Math.sin(t))}function xt(e,t,n){++Da,Pa+=(e-Pa)/Da,Ia+=(t-Ia)/Da,Ra+=(n-Ra)/Da}function wt(){function e(e,i){e*=Ko;var o=Math.cos(i*=Ko),a=o*Math.cos(e),s=o*Math.sin(e),u=Math.sin(i),l=Math.atan2(Math.sqrt((l=n*u-r*s)*l+(l=r*a-t*u)*l+(l=t*s-n*a)*l),t*a+n*s+r*u);ja+=l,La+=l*(t+(t=a)),Fa+=l*(n+(n=s)),Ba+=l*(r+(r=u)),xt(t,n,r)}var t,n,r;Ua.point=function(i,o){i*=Ko;var a=Math.cos(o*=Ko);t=a*Math.cos(i),n=a*Math.sin(i),r=Math.sin(o),Ua.point=e,xt(t,n,r)}}function _t(){Ua.point=bt}function St(){function e(e,t){e*=Ko;var n=Math.cos(t*=Ko),a=n*Math.cos(e),s=n*Math.sin(e),u=Math.sin(t),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&&-re(d)/h,m=Math.atan2(h,d);qa+=p*l,za+=p*c,Ha+=p*f,ja+=m,La+=m*(r+(r=a)),Fa+=m*(i+(i=s)),Ba+=m*(o+(o=u)),xt(r,i,o)}var t,n,r,i,o;Ua.point=function(a,s){t=a,n=s,Ua.point=e,a*=Ko;var u=Math.cos(s*=Ko);r=u*Math.cos(a),i=u*Math.sin(a),o=Math.sin(s),xt(r,i,o)},Ua.lineEnd=function(){e(t,n),Ua.lineEnd=_t,Ua.point=bt}}function Ot(e,t){function n(n,r){return n=e(n,r),t(n[0],n[1])}return e.invert&&t.invert&&(n.invert=function(n,r){return(n=t.invert(n,r))&&e.invert(n[0],n[1])}),n}function Nt(){return!0}function Et(e,t,n,r,i){var o=[],a=[];if(e.forEach((function(e){if(!((t=e.length-1)<=0)){var t,n=e[0],r=e[t];if(yt(n,r)){i.lineStart();for(var s=0;t>s;++s)i.point((n=e[s])[0],n[1]);return void i.lineEnd()}var u=new At(n,e,null,!0),l=new At(n,null,u,!1);u.o=l,o.push(u),a.push(l),u=new At(r,e,null,!1),l=new At(r,null,u,!0),u.o=l,o.push(u),a.push(l)}})),a.sort(t),Ct(o),Ct(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 Ct(e){if(t=e.length){for(var t,n,r=0,i=e[0];++r<t;)i.n=n=e[r],n.p=i,i=n;i.n=n=e[0],n.p=i}}function At(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function Mt(e,t,n,r){return function(i,o){function a(t,n){var r=i(t,n);e(t=r[0],n=r[1])&&o.point(t,n)}function s(e,t){var n=i(e,t);g.point(n[0],n[1])}function u(){y.point=s,g.lineStart()}function l(){y.point=a,g.lineEnd()}function c(e,t){m.push([e,t]);var n=i(e,t);x.point(n[0],n[1])}function f(){x.lineStart(),m=[]}function h(){c(m[0][0],m[0][1]),x.lineEnd();var e,t=x.clean(),n=b.buffer(),r=n.length;if(m.pop(),p.push(m),m=null,r)if(1&t){var i,a=-1;if((r=(e=n[0]).length-1)>0){for(w||(o.polygonStart(),w=!0),o.lineStart();++a<r;)o.point((i=e[a])[0],i[1]);o.lineEnd()}}else r>1&&2&t&&n.push(n.pop().concat(n.shift())),d.push(n.filter(kt))}var d,p,m,g=t(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 e=function(e,t){var n=e[0],r=e[1],i=[Math.sin(n),-Math.cos(n),0],o=0,a=0;ka.reset();for(var s=0,u=t.length;u>s;++s){var l=t[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=(e=l[g])[0],y=e[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(ka.add(Math.atan2(N*_*Math.sin(S),m*x+N*Math.cos(S))),o+=O?w+_*Yo:w,O^h>=n^v>=n){var E=dt(ft(f),ft(e));gt(E);var C=dt(i,E);gt(C);var A=(O^w>=0?-1:1)*ie(C[2]);(r>A||r===A&&(E[0]||E[1]))&&(a+=O^w>=0?1:-1)}if(!g++)break;h=v,p=b,m=x,f=e}}return(-Wo>o||Wo>o&&-Wo>ka)^1&a}(v,p);d.length?(w||(o.polygonStart(),w=!0),Et(d,Dt,e,n,o)):e&&(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=Tt(),x=t(b),w=!1;return y}}function kt(e){return e.length>1}function Tt(){var e,t=[];return{lineStart:function(){t.push(e=[])},point:function(t,n){e.push([t,n])},lineEnd:N,buffer:function(){var n=t;return t=[],e=null,n},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Dt(e,t){return((e=e.x)[0]<0?e[1]-Go-Wo:Go-e[1])-((t=t.x)[0]<0?t[1]-Go-Wo:Go-t[1])}function jt(e,t,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=e-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=t-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 Pt(e,t,n,r){function i(r,i){return Co(r[0]-e)<Wo?i>0?0:3:Co(r[0]-n)<Wo?i>0?2:1:Co(r[1]-t)<Wo?i>0?1:0:i>0?3:2}function o(e,t){return a(e.x,t.x)}function a(e,t){var n=i(e,1),r=i(t,1);return n!==r?n-r:0===n?t[1]-e[1]:1===n?e[0]-t[0]:2===n?e[1]-t[1]:t[0]-e[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?e:n,c>1?r:t)}while((c=(c+u+4)%4)!==f);else l.point(s[0],s[1])}function l(i,o){return i>=e&&n>=i&&o>=t&&r>=o}function c(e,t){l(e,t)&&s.point(e,t)}function f(e,t){var n=l(e=Math.max(-Va,Math.min(Va,e)),t=Math.max(-Va,Math.min(Va,t)));if(d&&p.push([e,t]),w)m=e,g=t,v=n,w=!1,n&&(s.lineStart(),s.point(e,t));else if(n&&x)s.point(e,t);else{var r={a:{x:y,y:b},b:{x:e,y:t}};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(e,t),_=!1)}y=e,b=t,x=n}var h,d,p,m,g,v,y,b,x,w,_,S=s,O=Tt(),N=jt(e,t,n,r),E={point:c,lineStart:function(){E.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())),E.point=c,x&&s.lineEnd()},polygonStart:function(){s=O,h=[],d=[],_=!0},polygonEnd:function(){s=S,h=vo.merge(h);var t=function(e){for(var t=0,n=d.length,r=e[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&&ne(l,o,e)>0&&++t:o[1]<=r&&ne(l,o,e)<0&&--t,l=o;return 0!==t}([e,r]),n=_&&t,i=h.length;(n||i)&&(s.polygonStart(),n&&(s.lineStart(),u(null,null,1,s),s.lineEnd()),i&&Et(h,o,t,u,s),s.polygonEnd()),h=d=p=null}};return E}}function It(e){var t=0,n=$o/3,r=Gt(e),i=r(t,n);return i.parallels=function(e){return arguments.length?r(t=e[0]*$o/180,n=e[1]*$o/180):[t/$o*180,n/$o*180]},i}function Rt(e,t){function n(e,t){var n=Math.sqrt(o-2*i*Math.sin(t))/i;return[n*Math.sin(e*=i),a-n*Math.cos(e)]}var r=Math.sin(e),i=(r+Math.sin(t))/2,o=1+r*(2*i-r),a=Math.sqrt(o)/i;return n.invert=function(e,t){var n=a-t;return[Math.atan2(e,n)/i,ie((o-(e*e+n*n)*i*i)/(2*i))]},n}function Lt(){function e(e,t){Ya+=i*e-r*t,r=e,i=t}var t,n,r,i;Ja.point=function(o,a){Ja.point=e,t=r=o,n=i=a},Ja.lineEnd=function(){e(t,n)}}function Ft(){function e(e,t){a.push("M",e,",",t,o)}function t(e,t){a.push("M",e,",",t),s.point=n}function n(e,t){a.push("L",e,",",t)}function r(){s.point=e}function i(){a.push("Z")}var o=Bt(4.5),a=[],s={point:e,lineStart:function(){s.point=t},lineEnd:r,polygonStart:function(){s.lineEnd=i},polygonEnd:function(){s.lineEnd=r,s.point=e},pointRadius:function(e){return o=Bt(e),s},result:function(){if(a.length){var e=a.join("");return a=[],e}}};return s}function Bt(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function qt(e,t){Pa+=e,Ia+=t,++Ra}function zt(){function e(e,r){var i=e-t,o=r-n,a=Math.sqrt(i*i+o*o);La+=a*(t+e)/2,Fa+=a*(n+r)/2,Ba+=a,qt(t=e,n=r)}var t,n;es.point=function(r,i){es.point=e,qt(t=r,n=i)}}function Ht(){es.point=qt}function Ut(){function e(e,t){var n=e-r,o=t-i,a=Math.sqrt(n*n+o*o);La+=a*(r+e)/2,Fa+=a*(i+t)/2,Ba+=a,qa+=(a=i*e-r*t)*(r+e),za+=a*(i+t),Ha+=3*a,qt(r=e,i=t)}var t,n,r,i;es.point=function(o,a){es.point=e,qt(t=r=o,n=i=a)},es.lineEnd=function(){e(t,n)}}function Wt(e){function t(t,n){e.moveTo(t+a,n),e.arc(t,n,a,0,Yo)}function n(t,n){e.moveTo(t,n),s.point=r}function r(t,n){e.lineTo(t,n)}function i(){s.point=t}function o(){e.closePath()}var a=4.5,s={point:t,lineStart:function(){s.point=n},lineEnd:i,polygonStart:function(){s.lineEnd=o},polygonEnd:function(){s.lineEnd=i,s.point=t},pointRadius:function(e){return a=e,s},result:N};return s}function Vt(e){function t(e){return(s?r:n)(e)}function n(t){return Yt(t,(function(n,r){n=e(n,r),t.point(n[0],n[1])}))}function r(t){function n(n,r){n=e(n,r),t.point(n[0],n[1])}function r(){y=NaN,S.point=o,t.lineStart()}function o(n,r){var o=ft([n,r]),a=e(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,t),t.point(y,b)}function a(){S.point=n,t.lineEnd()}function u(){r(),S.point=l,S.lineEnd=c}function l(e,t){o(f=e,t),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,t),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(){t.polygonStart(),S.lineStart=u},polygonEnd:function(){t.polygonEnd(),S.lineStart=r}};return S}function i(t,n,r,s,u,l,c,f,h,d,p,m,g,v){var y=c-t,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),E=Co(Co(S)-1)<Wo||Co(r-h)<Wo?(r+h)/2:Math.atan2(_,w),C=e(E,N),A=C[0],M=C[1],k=A-t,T=M-n,D=b*k-y*T;(D*D/x>o||Co((y*k+b*T)/x-.5)>.3||a>s*d+u*p+l*m)&&(i(t,n,r,s,u,l,A,M,E,w/=O,_/=O,S,g,v),v.point(A,M),i(A,M,E,w,_,S,c,f,h,d,p,m,g,v))}}var o=.5,a=Math.cos(30*Ko),s=16;return t.precision=function(e){return arguments.length?(s=(o=e*e)>0&&16,t):Math.sqrt(o)},t}function $t(e){this.stream=e}function Yt(e,t){return{point:t,sphere:function(){e.sphere()},lineStart:function(){e.lineStart()},lineEnd:function(){e.lineEnd()},polygonStart:function(){e.polygonStart()},polygonEnd:function(){e.polygonEnd()}}}function Zt(e){return Gt((function(){return e}))()}function Gt(e){function t(e){return[(e=s(e[0]*Ko,e[1]*Ko))[0]*h+u,l-e[1]*h]}function n(e){return(e=s.invert((e[0]-u)/h,(l-e[1])/h))&&[e[0]*Xo,e[1]*Xo]}function r(){s=Ot(a=Qt(v,y,b),o);var e=o(m,g);return u=d-e[0]*h,l=p+e[1]*h,i()}function i(){return c&&(c.valid=!1,c=null),t}var o,a,s,u,l,c,f=Vt((function(e,t){return[(e=o(e,t))[0]*h+u,l-e[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 t.stream=function(e){return c&&(c.valid=!1),(c=Kt(x(a,f(w(e))))).valid=!0,c},t.clipAngle=function(e){return arguments.length?(x=null==e?(S=e,Wa):function(e){function t(e,t){return Math.cos(e)*Math.cos(t)>i}function n(e,t,n){var r=[1,0,0],o=dt(ft(e),ft(t)),a=ht(o,o),s=o[0],u=a-s*s;if(!u)return!n&&e;var l=i*a/u,c=-i*s/u,f=dt(r,o),h=mt(r,l);pt(h,mt(o,c));var d=f,p=ht(h,d),m=ht(d,d),g=p*p-m*(ht(h,h)-1);if(!(0>g)){var v=Math.sqrt(g),y=mt(d,(-p-v)/m);if(pt(y,h),y=vt(y),!n)return y;var b,x=e[0],w=t[0],_=e[1],S=t[1];x>w&&(b=x,x=w,w=b);var O=w-x,N=Co(O-$o)<Wo;if(!N&&_>S&&(b=_,_=S,S=b),N||Wo>O?N?_+S>0^y[1]<(Co(y[0]-x)<Wo?_:S):_<=y[1]&&y[1]<=S:O>$o^(x<=y[0]&&y[0]<=w)){var E=mt(d,(-p+v)/m);return pt(E,h),[y,vt(E)]}}}function r(t,n){var r=o?e:$o-e,i=0;return-r>t?i|=1:t>r&&(i|=2),-r>n?i|=4:n>r&&(i|=8),i}var i=Math.cos(e),o=i>0,a=Co(i)>Wo;return Mt(t,(function(e){var i,s,u,l,c;return{lineStart:function(){l=u=!1,c=1},point:function(f,h){var d,p=[f,h],m=t(f,h),g=o?m?0:r(f,h):m?r(f+(0>f?$o:-$o),h):0;if(!i&&(l=u=m)&&e.lineStart(),m!==u&&(d=n(i,p),(yt(i,d)||yt(p,d))&&(p[0]+=Wo,p[1]+=Wo,m=t(p[0],p[1]))),m!==u)c=0,m?(e.lineStart(),d=n(p,i),e.point(d[0],d[1])):(d=n(i,p),e.point(d[0],d[1]),e.lineEnd()),i=d;else if(a&&i&&o^m){var v;g&s||!(v=n(p,i,!0))||(c=0,o?(e.lineStart(),e.point(v[0][0],v[0][1]),e.point(v[1][0],v[1][1]),e.lineEnd()):(e.point(v[1][0],v[1][1]),e.lineEnd(),e.lineStart(),e.point(v[0][0],v[0][1])))}!m||i&&yt(i,p)||e.point(p[0],p[1]),i=p,u=m,s=g},lineEnd:function(){u&&e.lineEnd(),i=null},clean:function(){return c|(l&&u)<<1}}}),rn(e,6*Ko),o?[0,-e]:[-$o,e-$o])}((S=+e)*Ko),i()):S},t.clipExtent=function(e){return arguments.length?(O=e,w=e?Pt(e[0][0],e[0][1],e[1][0],e[1][1]):_,i()):O},t.scale=function(e){return arguments.length?(h=+e,r()):h},t.translate=function(e){return arguments.length?(d=+e[0],p=+e[1],r()):[d,p]},t.center=function(e){return arguments.length?(m=e[0]%360*Ko,g=e[1]%360*Ko,r()):[m*Xo,g*Xo]},t.rotate=function(e){return arguments.length?(v=e[0]%360*Ko,y=e[1]%360*Ko,b=e.length>2?e[2]%360*Ko:0,r()):[v*Xo,y*Xo,b*Xo]},vo.rebind(t,f,"precision"),function(){return o=e.apply(this,arguments),t.invert=o.invert&&n,r()}}function Kt(e){return Yt(e,(function(t,n){e.point(t*Ko,n*Ko)}))}function Xt(e,t){return[e,t]}function Jt(e,t){return[e>$o?e-Yo:-$o>e?e+Yo:e,t]}function Qt(e,t,n){return e?t||n?Ot(tn(e),nn(t,n)):tn(e):t||n?nn(t,n):Jt}function en(e){return function(t,n){return[(t+=e)>$o?t-Yo:-$o>t?t+Yo:t,n]}}function tn(e){var t=en(e);return t.invert=en(-e),t}function nn(e,t){function n(e,t){var n=Math.cos(t),s=Math.cos(e)*n,u=Math.sin(e)*n,l=Math.sin(t),c=l*r+s*i;return[Math.atan2(u*o-c*a,s*r-l*i),ie(c*o+u*a)]}var r=Math.cos(e),i=Math.sin(e),o=Math.cos(t),a=Math.sin(t);return n.invert=function(e,t){var n=Math.cos(t),s=Math.cos(e)*n,u=Math.sin(e)*n,l=Math.sin(t),c=l*o-u*a;return[Math.atan2(u*o+l*a,s*r+c*i),ie(c*r-s*i)]},n}function rn(e,t){var n=Math.cos(e),r=Math.sin(e);return function(i,o,a,s){var u=a*t;null!=i?(i=on(n,i),o=on(n,o),(a>0?o>i:i>o)&&(i+=a*Yo)):(i=e+a*Yo,o=e-.5*u);for(var l,c=i;a>0?c>o:o>c;c-=u)s.point((l=vt([n,-r*Math.cos(c),-r*Math.sin(c)]))[0],l[1])}}function on(e,t){var n=ft(t);n[0]-=e,gt(n);var r=re(-n[1]);return((-n[2]<0?-r:r)+2*Math.PI-Wo)%(2*Math.PI)}function an(e,t,n){var r=vo.range(e,t-Wo,n).concat(t);return function(e){return r.map((function(t){return[e,t]}))}}function sn(e,t,n){var r=vo.range(e,t-Wo,n).concat(t);return function(e){return r.map((function(t){return[t,e]}))}}function un(e){return e.source}function ln(e){return e.target}function cn(e,t){function n(t,n){var r=Math.cos(t),i=Math.cos(n),o=e(r*i);return[o*i*Math.sin(t),o*Math.sin(n)]}return n.invert=function(e,n){var r=Math.sqrt(e*e+n*n),i=t(r),o=Math.sin(i),a=Math.cos(i);return[Math.atan2(e*o,r*a),Math.asin(r&&n*o/r)]},n}function fn(e,t){function n(e,t){a>0?-Go+Wo>t&&(t=-Go+Wo):t>Go-Wo&&(t=Go-Wo);var n=a/Math.pow(i(t),o);return[n*Math.sin(o*e),a-n*Math.cos(o*e)]}var r=Math.cos(e),i=function(e){return Math.tan($o/4+e/2)},o=e===t?Math.sin(e):Math.log(r/Math.cos(t))/Math.log(i(t)/i(e)),a=r*Math.pow(i(e),o)/o;return o?(n.invert=function(e,t){var n=a-t,r=te(o)*Math.sqrt(e*e+n*n);return[Math.atan2(e,n)/o,2*Math.atan(Math.pow(a/r,1/o))-Go]},n):dn}function hn(e,t){function n(e,t){var n=o-t;return[n*Math.sin(i*e),o-n*Math.cos(i*e)]}var r=Math.cos(e),i=e===t?Math.sin(e):(r-Math.cos(t))/(t-e),o=r/i+e;return Co(i)<Wo?Xt:(n.invert=function(e,t){var n=o-t;return[Math.atan2(e,n)/i,o-te(i)*Math.sqrt(e*e+n*n)]},n)}function dn(e,t){return[e,Math.log(Math.tan($o/4+t/2))]}function pn(e){var t,n=Zt(e),r=n.scale,i=n.translate,o=n.clipExtent;return n.scale=function(){var e=r.apply(n,arguments);return e===n?t?n.clipExtent(null):n:e},n.translate=function(){var e=i.apply(n,arguments);return e===n?t?n.clipExtent(null):n:e},n.clipExtent=function(e){var a=o.apply(n,arguments);if(a===n){if(t=null==e){var s=$o*r(),u=i();o([[u[0]-s,u[1]-s],[u[0]+s,u[1]+s]])}}else t&&(a=null);return a},n.clipExtent(null)}function mn(e,t){return[Math.log(Math.tan($o/4+t/2)),-e]}function gn(e){return e[0]}function vn(e){return e[1]}function yn(e){for(var t=e.length,n=[0,1],r=2,i=2;t>i;i++){for(;r>1&&ne(e[n[r-2]],e[n[r-1]],e[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function bn(e,t){return e[0]-t[0]||e[1]-t[1]}function xn(e,t,n){return(n[0]-t[0])*(e[1]-t[1])<(n[1]-t[1])*(e[0]-t[0])}function wn(e,t,n,r){var i=e[0],o=n[0],a=t[0]-i,s=r[0]-o,u=e[1],l=n[1],c=t[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(e){var t=e[0],n=e[e.length-1];return!(t[0]-n[0]||t[1]-n[1])}function Sn(){Hn(this),this.edge=this.site=this.circle=null}function On(e){var t=ps.pop()||new Sn;return t.site=e,t}function Nn(e){Pn(e),fs.remove(e),ps.push(e),Hn(e)}function En(e){var t=e.circle,n=t.x,r=t.cy,i={x:n,y:r},o=e.P,a=e.N,s=[e];Nn(e);for(var u=o;u.circle&&Co(n-u.circle.x)<Wo&&Co(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&&Co(n-l.circle.x)<Wo&&Co(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],Bn(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 Cn(e){for(var t,n,r,i,o=e.x,a=e.y,s=fs._;s;)if((r=An(s,a)-o)>Wo)s=s.L;else{if(!((i=o-Mn(s,a))>Wo)){r>-Wo?(t=s.P,n=s):i>-Wo?(t=s,n=s.N):t=n=s;break}if(!s.R){t=s;break}s=s.R}var u=On(e);if(fs.insert(t,u),t||n){if(t===n)return Pn(t),n=On(t.site),fs.insert(u,n),u.edge=n.edge=Ln(t.site,u.site),jn(t),void jn(n);if(!n)return void(u.edge=Ln(t.site,u.site));Pn(t),Pn(n);var l=t.site,c=l.x,f=l.y,h=e.x-c,d=e.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};Bn(n.edge,l,p,x),u.edge=Ln(l,e,null,x),n.edge=Ln(e,p,null,x),jn(t),jn(n)}}function An(e,t){var n=e.site,r=n.x,i=n.y,o=i-t;if(!o)return r;var a=e.P;if(!a)return-1/0;var s=(n=a.site).x,u=n.y,l=u-t;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 Mn(e,t){var n=e.N;if(n)return An(n,t);var r=e.site;return r.y===t?r.x:1/0}function kn(e){this.site=e,this.edges=[]}function Tn(e,t){return t.angle-e.angle}function Dn(){Hn(this),this.x=this.y=this.arc=this.site=this.cy=null}function jn(e){var t=e.P,n=e.N;if(t&&n){var r=t.site,i=e.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 Dn;v.arc=e,v.site=i,v.x=p+a,v.y=g+Math.sqrt(p*p+m*m),v.cy=g,e.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(e){var t=e.circle;t&&(t.P||(hs=t.N),ds.remove(t),ms.push(t),Hn(t),e.circle=null)}function In(e,t){var n=e.b;if(n)return!0;var r,i,o=e.a,a=t[0][0],s=t[1][0],u=t[0][1],l=t[1][1],c=e.l,f=e.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 e.a=o,e.b=n,!0}function Rn(e,t){this.l=e,this.r=t,this.a=this.b=null}function Ln(e,t,n,r){var i=new Rn(e,t);return ls.push(i),n&&Bn(i,e,t,n),r&&Bn(i,t,e,r),cs[e.i].edges.push(new qn(i,e,t)),cs[t.i].edges.push(new qn(i,t,e)),i}function Fn(e,t,n){var r=new Rn(e,null);return r.a=t,r.b=n,ls.push(r),r}function Bn(e,t,n,r){e.a||e.b?e.l===n?e.b=r:e.a=r:(e.a=r,e.l=t,e.r=n)}function qn(e,t,n){var r=e.a,i=e.b;this.edge=e,this.site=t,this.angle=n?Math.atan2(n.y-t.y,n.x-t.x):e.l===t?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(e){e.U=e.C=e.L=e.R=e.P=e.N=null}function Un(e,t){var n=t,r=t.R,i=n.U;i?i.L===n?i.L=r:i.R=r:e._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function Wn(e,t){var n=t,r=t.L,i=n.U;i?i.L===n?i.L=r:i.R=r:e._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function Vn(e){for(;e.L;)e=e.L;return e}function $n(e,t){var n,r,i,o=e.sort(Yn).pop();for(ls=[],cs=new Array(e.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 kn(o),Cn(o),n=o.x,r=o.y),o=e.pop();else{if(!i)break;En(i.arc)}t&&(function(e){for(var t,n=ls,r=jt(e[0][0],e[0][1],e[1][0],e[1][1]),i=n.length;i--;)(!In(t=n[i],e)||!r(t)||Co(t.a.x-t.b.x)<Wo&&Co(t.a.y-t.b.y)<Wo)&&(t.a=t.b=null,n.splice(i,1))}(t),function(e){for(var t,n,r,i,o,a,s,u,l,c,f=e[0][0],h=e[1][0],d=e[0][1],p=e[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,t=(l=s[++a%u].start()).x,n=l.y,(Co(r-t)>Wo||Co(i-n)>Wo)&&(s.splice(a,0,new qn(Fn(o.site,c,Co(r-f)<Wo&&p-i>Wo?{x:f,y:Co(t-f)<Wo?n:p}:Co(i-p)<Wo&&h-r>Wo?{x:Co(n-p)<Wo?t:h,y:p}:Co(r-h)<Wo&&i-d>Wo?{x:h,y:Co(t-h)<Wo?n:d}:Co(i-d)<Wo&&r-f>Wo?{x:Co(n-d)<Wo?t:f,y:d}:null),o.site,null)),++u)}(t));var a={cells:cs,edges:ls};return fs=ds=ls=cs=null,a}function Yn(e,t){return t.y-e.y||t.x-e.x}function Zn(e,t,n){return(e.x-n.x)*(t.y-e.y)-(e.x-t.x)*(n.y-e.y)}function Gn(e){return e.x}function Kn(e){return e.y}function Xn(e,t,n,r,i,o){if(!e(t,n,r,i,o)){var a=.5*(n+i),s=.5*(r+o),u=t.nodes;u[0]&&Xn(e,u[0],n,r,a,s),u[1]&&Xn(e,u[1],a,r,i,s),u[2]&&Xn(e,u[2],n,s,a,o),u[3]&&Xn(e,u[3],a,s,i,o)}}function Jn(e,t){e=vo.rgb(e),t=vo.rgb(t);var n=e.r,r=e.g,i=e.b,o=t.r-n,a=t.g-r,s=t.b-i;return function(e){return"#"+xe(Math.round(n+o*e))+xe(Math.round(r+a*e))+xe(Math.round(i+s*e))}}function Qn(e,t){var n,r={},i={};for(n in e)n in t?r[n]=nr(e[n],t[n]):i[n]=e[n];for(n in t)n in e||(i[n]=t[n]);return function(e){for(n in r)i[n]=r[n](e);return i}}function er(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function tr(e,t){var n,r,i,o=vs.lastIndex=ys.lastIndex=0,a=-1,s=[],u=[];for(e+="",t+="";(n=vs.exec(e))&&(r=ys.exec(t));)(i=r.index)>o&&(i=t.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:er(n,r)})),o=ys.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?u[0]?(t=u[0].x,function(e){return t(e)+""}):function(){return t}:(t=u.length,function(e){for(var n,r=0;t>r;++r)s[(n=u[r]).i]=n.x(e);return s.join("")})}function nr(e,t){for(var n,r=vo.interpolators.length;--r>=0&&!(n=vo.interpolators[r](e,t)););return n}function rr(e,t){var n,r=[],i=[],o=e.length,a=t.length,s=Math.min(e.length,t.length);for(n=0;s>n;++n)r.push(nr(e[n],t[n]));for(;o>n;++n)i[n]=e[n];for(;a>n;++n)i[n]=t[n];return function(e){for(n=0;s>n;++n)i[n]=r[n](e);return i}}function ir(e){return function(t){return 1-e(1-t)}}function or(e){return function(t){return.5*(.5>t?e(2*t):2-e(2-2*t))}}function ar(e){return e*e}function sr(e){return e*e*e}function ur(e){if(0>=e)return 0;if(e>=1)return 1;var t=e*e,n=t*e;return 4*(.5>e?n:3*(e-t)+n-.75)}function lr(e){return 1-Math.cos(e*Go)}function cr(e){return Math.pow(2,10*(e-1))}function fr(e){return 1-Math.sqrt(1-e*e)}function hr(e){return 1/2.75>e?7.5625*e*e:2/2.75>e?7.5625*(e-=1.5/2.75)*e+.75:2.5/2.75>e?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function dr(e,t){return t-=e,function(n){return Math.round(e+t*n)}}function pr(e){var t=[e.a,e.b],n=[e.c,e.d],r=gr(t),i=mr(t,n),o=gr(function(e,t,n){return e[0]+=n*t[0],e[1]+=n*t[1],e}(n,t,-i))||0;t[0]*n[1]<n[0]*t[1]&&(t[0]*=-1,t[1]*=-1,r*=-1,i*=-1),this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-n[0],n[1]))*Xo,this.translate=[e.e,e.f],this.scale=[r,o],this.skew=o?Math.atan2(i,o)*Xo:0}function mr(e,t){return e[0]*t[0]+e[1]*t[1]}function gr(e){var t=Math.sqrt(mr(e,e));return t&&(e[0]/=t,e[1]/=t),t}function vr(e){return e.length?e.pop()+",":""}function yr(e,t){var n=[],r=[];return e=vo.transform(e),t=vo.transform(t),function(e,t,n,r){if(e[0]!==t[0]||e[1]!==t[1]){var i=n.push("translate(",null,",",null,")");r.push({i:i-4,x:er(e[0],t[0])},{i:i-2,x:er(e[1],t[1])})}else(t[0]||t[1])&&n.push("translate("+t+")")}(e.translate,t.translate,n,r),function(e,t,n,r){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),r.push({i:n.push(vr(n)+"rotate(",null,")")-2,x:er(e,t)})):t&&n.push(vr(n)+"rotate("+t+")")}(e.rotate,t.rotate,n,r),function(e,t,n,r){e!==t?r.push({i:n.push(vr(n)+"skewX(",null,")")-2,x:er(e,t)}):t&&n.push(vr(n)+"skewX("+t+")")}(e.skew,t.skew,n,r),function(e,t,n,r){if(e[0]!==t[0]||e[1]!==t[1]){var i=n.push(vr(n)+"scale(",null,",",null,")");r.push({i:i-4,x:er(e[0],t[0])},{i:i-2,x:er(e[1],t[1])})}else 1===t[0]&&1===t[1]||n.push(vr(n)+"scale("+t+")")}(e.scale,t.scale,n,r),e=t=null,function(e){for(var t,i=-1,o=r.length;++i<o;)n[(t=r[i]).i]=t.x(e);return n.join("")}}function br(e,t){return t=(t-=e=+e)||1/t,function(n){return(n-e)/t}}function xr(e,t){return t=(t-=e=+e)||1/t,function(n){return Math.max(0,Math.min(1,(n-e)/t))}}function wr(e){for(var t=e.source,n=e.target,r=function(e,t){if(e===t)return e;for(var n=_r(e),r=_r(t),i=n.pop(),o=r.pop(),a=null;i===o;)a=i,i=n.pop(),o=r.pop();return a}(t,n),i=[t];t!==r;)t=t.parent,i.push(t);for(var o=i.length;n!==r;)i.splice(o,0,n),n=n.parent;return i}function _r(e){for(var t=[],n=e.parent;null!=n;)t.push(e),e=n,n=n.parent;return t.push(e),t}function Sr(e){e.fixed|=2}function Or(e){e.fixed&=-7}function Nr(e){e.fixed|=4,e.px=e.x,e.py=e.y}function Er(e){e.fixed&=-5}function Cr(e,t,n){var r=0,i=0;if(e.charge=0,!e.leaf)for(var o,a=e.nodes,s=a.length,u=-1;++u<s;)null!=(o=a[u])&&(Cr(o,t,n),e.charge+=o.charge,r+=o.charge*o.cx,i+=o.charge*o.cy);if(e.point){e.leaf||(e.point.x+=Math.random()-.5,e.point.y+=Math.random()-.5);var l=t*n[e.point.index];e.charge+=e.pointCharge=l,r+=l*e.point.x,i+=l*e.point.y}e.cx=r/e.charge,e.cy=i/e.charge}function Ar(e,t){return vo.rebind(e,t,"sort","children","value"),e.nodes=e,e.links=Pr,e}function Mr(e,t){for(var n=[e];null!=(e=n.pop());)if(t(e),(i=e.children)&&(r=i.length))for(var r,i;--r>=0;)n.push(i[r])}function kr(e,t){for(var n=[e],r=[];null!=(e=n.pop());)if(r.push(e),(o=e.children)&&(i=o.length))for(var i,o,a=-1;++a<i;)n.push(o[a]);for(;null!=(e=r.pop());)t(e)}function Tr(e){return e.children}function Dr(e){return e.value}function jr(e,t){return t.value-e.value}function Pr(e){return vo.merge(e.map((function(e){return(e.children||[]).map((function(t){return{source:e,target:t}}))})))}function Ir(e){return e.x}function Rr(e){return e.y}function Lr(e,t,n){e.y0=t,e.y=n}function Fr(e){return vo.range(e.length)}function Br(e){for(var t=-1,n=e[0].length,r=[];++t<n;)r[t]=0;return r}function qr(e){for(var t,n=1,r=0,i=e[0][1],o=e.length;o>n;++n)(t=e[n][1])>i&&(r=n,i=t);return r}function zr(e){return e.reduce(Hr,0)}function Hr(e,t){return e+t[1]}function Ur(e,t){return Wr(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function Wr(e,t){for(var n=-1,r=+e[0],i=(e[1]-r)/t,o=[];++n<=t;)o[n]=i*n+r;return o}function Vr(e){return[vo.min(e),vo.max(e)]}function $r(e,t){return e.value-t.value}function Yr(e,t){var n=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=n,n._pack_prev=t}function Zr(e,t){e._pack_next=t,t._pack_prev=e}function Gr(e,t){var n=t.x-e.x,r=t.y-e.y,i=e.r+t.r;return.999*i*i>n*n+r*r}function Kr(e){function t(e){c=Math.min(e.x-e.r,c),f=Math.max(e.x+e.r,f),h=Math.min(e.y-e.r,h),d=Math.max(e.y+e.r,d)}if((n=e.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,t(r),l>1&&((i=n[1]).x=i.r,i.y=0,t(i),l>2))for(ei(r,i,o=n[2]),t(o),Yr(r,o),r._pack_prev=o,Yr(o,i),i=r._pack_next,a=3;l>a;a++){ei(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,t(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));e.r=b,n.forEach(Jr)}}function Xr(e){e._pack_next=e._pack_prev=e}function Jr(e){delete e._pack_next,delete e._pack_prev}function Qr(e,t,n,r){var i=e.children;if(e.x=t+=r*e.x,e.y=n+=r*e.y,e.r*=r,i)for(var o=-1,a=i.length;++o<a;)Qr(i[o],t,n,r)}function ei(e,t,n){var r=e.r+n.r,i=t.x-e.x,o=t.y-e.y;if(r&&(i||o)){var a=t.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=e.x+u*i+l*o,n.y=e.y+u*o-l*i}else n.x=e.x+r,n.y=e.y}function ti(e,t){return e.parent==t.parent?1:2}function ni(e){var t=e.children;return t.length?t[0]:e.t}function ri(e){var t,n=e.children;return(t=n.length)?n[t-1]:e.t}function ii(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function oi(e,t,n){return e.a.parent===t.parent?e.a:n}function ai(e){var t=e.children;return t&&t.length?ai(t[0]):e}function si(e){var t,n=e.children;return n&&(t=n.length)?si(n[t-1]):e}function ui(e){return{x:e.x,y:e.y,dx:e.dx,dy:e.dy}}function li(e,t){var n=e.x+t[3],r=e.y+t[0],i=e.dx-t[1]-t[3],o=e.dy-t[0]-t[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(e){var t=e[0],n=e[e.length-1];return n>t?[t,n]:[n,t]}function fi(e){return e.rangeExtent?e.rangeExtent():ci(e.range())}function hi(e,t,n,r){var i=n(e[0],e[1]),o=r(t[0],t[1]);return function(e){return o(i(e))}}function di(e,t){var n,r=0,i=e.length-1,o=e[r],a=e[i];return o>a&&(n=r,r=i,i=n,n=o,o=a,a=n),e[r]=t.floor(o),e[i]=t.ceil(a),e}function pi(e){return e?{floor:function(t){return Math.floor(t/e)*e},ceil:function(t){return Math.ceil(t/e)*e}}:Ms}function mi(e,t,n,r){var i=[],o=[],a=0,s=Math.min(e.length,t.length)-1;for(e[s]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<=s;)i.push(n(e[a-1],e[a])),o.push(r(t[a-1],t[a]));return function(t){var n=vo.bisect(e,t,1,s)-1;return o[n](i[n](t))}}function gi(e,t,n,r){function i(){var i=Math.min(e.length,t.length)>2?mi:hi,u=r?xr:br;return a=i(e,t,u,n),s=i(t,e,u,nr),o}function o(e){return a(e)}var a,s;return o.invert=function(e){return s(e)},o.domain=function(t){return arguments.length?(e=t.map(Number),i()):e},o.range=function(e){return arguments.length?(t=e,i()):t},o.rangeRound=function(e){return o.range(e).interpolate(dr)},o.clamp=function(e){return arguments.length?(r=e,i()):r},o.interpolate=function(e){return arguments.length?(n=e,i()):n},o.ticks=function(t){return xi(e,t)},o.tickFormat=function(t,n){return wi(e,t,n)},o.nice=function(t){return yi(e,t),i()},o.copy=function(){return gi(e,t,n,r)},i()}function vi(e,t){return vo.rebind(e,t,"range","rangeRound","interpolate","clamp")}function yi(e,t){return di(e,pi(bi(e,t)[2])),di(e,pi(bi(e,t)[2])),e}function bi(e,t){null==t&&(t=10);var n=ci(e),r=n[1]-n[0],i=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),o=t/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(e,t){return vo.range.apply(vo,bi(e,t))}function wi(e,t,n){var r=bi(e,t);if(n){var i=va.exec(n);if(i.shift(),"s"===i[8]){var o=vo.formatPrefix(Math.max(Co(r[0]),Co(r[1])));return i[7]||(i[7]="."+_i(o.scale(r[2]))),i[8]="f",n=vo.format(i.join("")),function(e){return n(o.scale(e))+o.symbol}}i[7]||(i[7]="."+function(e,t){var n=_i(t[2]);return e in ks?Math.abs(n-_i(Math.max(Co(t[0]),Co(t[1]))))+ +("e"!==e):n-2*("%"===e)}(i[8],r)),n=i.join("")}else n=",."+_i(r[2])+"f";return vo.format(n)}function _i(e){return-Math.floor(Math.log(e)/Math.LN10+.01)}function Si(e,t,n,r){function i(e){return(n?Math.log(0>e?0:e):-Math.log(e>0?0:-e))/Math.log(t)}function o(e){return n?Math.pow(t,e):-Math.pow(t,-e)}function a(t){return e(i(t))}return a.invert=function(t){return o(e.invert(t))},a.domain=function(t){return arguments.length?(n=t[0]>=0,e.domain((r=t.map(Number)).map(i)),a):r},a.base=function(n){return arguments.length?(t=+n,e.domain(r.map(i)),a):t},a.nice=function(){var t=di(r.map(i),n?Math:Ds);return e.domain(t),r=t.map(o),a},a.ticks=function(){var e=ci(r),a=[],s=e[0],u=e[1],l=Math.floor(i(s)),c=Math.ceil(i(u)),f=t%1?2:t;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(e,n){if(!arguments.length)return Ts;arguments.length<2?n=Ts:"function"!=typeof n&&(n=vo.format(n));var r=Math.max(1,t*e/a.ticks().length);return function(e){var a=e/o(Math.round(i(e)));return t-.5>a*t&&(a*=t),r>=a?n(e):""}},a.copy=function(){return Si(e.copy(),t,n,r)},vi(a,e)}function Oi(e,t,n){function r(t){return e(i(t))}var i=Ni(t),o=Ni(1/t);return r.invert=function(t){return o(e.invert(t))},r.domain=function(t){return arguments.length?(e.domain((n=t.map(Number)).map(i)),r):n},r.ticks=function(e){return xi(n,e)},r.tickFormat=function(e,t){return wi(n,e,t)},r.nice=function(e){return r.domain(yi(n,e))},r.exponent=function(a){return arguments.length?(i=Ni(t=a),o=Ni(1/t),e.domain(n.map(i)),r):t},r.copy=function(){return Oi(e.copy(),t,n)},vi(r,e)}function Ni(e){return function(t){return 0>t?-Math.pow(-t,e):Math.pow(t,e)}}function Ei(e,t){function n(n){return o[((i.get(n)||("range"===t.t?i.set(n,e.push(n)):NaN))-1)%o.length]}function r(t,n){return vo.range(e.length).map((function(e){return t+n*e}))}var i,o,a;return n.domain=function(r){if(!arguments.length)return e;e=[],i=new d;for(var o,a=-1,s=r.length;++a<s;)i.has(o=r[a])||i.set(o,e.push(o));return n[t.t].apply(n,t.a)},n.range=function(e){return arguments.length?(o=e,a=0,t={t:"range",a:arguments},n):o},n.rangePoints=function(i,s){arguments.length<2&&(s=0);var u=i[0],l=i[1],c=e.length<2?(u=(u+l)/2,0):(l-u)/(e.length-1+s);return o=r(u+c*s/2,c),a=0,t={t:"rangePoints",a:arguments},n},n.rangeRoundPoints=function(i,s){arguments.length<2&&(s=0);var u=i[0],l=i[1],c=e.length<2?(u=l=Math.round((u+l)/2),0):(l-u)/(e.length-1+s)|0;return o=r(u+Math.round(c*s/2+(l-u-(e.length-1+s)*c)/2),c),a=0,t={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)/(e.length-s+2*u);return o=r(c+f*u,f),l&&o.reverse(),a=f*(1-s),t={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)/(e.length-s+2*u));return o=r(c+Math.round((f-c-(e.length-s)*h)/2),h),l&&o.reverse(),a=Math.round(h*(1-s)),t={t:"rangeRoundBands",a:arguments},n},n.rangeBand=function(){return a},n.rangeExtent=function(){return ci(t.a[0])},n.copy=function(){return Ei(e,t)},n.domain(e)}function Ci(e,t){function n(){var n=0,o=t.length;for(i=[];++n<o;)i[n-1]=vo.quantile(e,n/o);return r}function r(e){return isNaN(e=+e)?void 0:t[vo.bisect(i,e)]}var i;return r.domain=function(t){return arguments.length?(e=t.map(u).filter(l).sort(s),n()):e},r.range=function(e){return arguments.length?(t=e,n()):t},r.quantiles=function(){return i},r.invertExtent=function(n){return 0>(n=t.indexOf(n))?[NaN,NaN]:[n>0?i[n-1]:e[0],n<i.length?i[n]:e[e.length-1]]},r.copy=function(){return Ci(e,t)},n()}function Ai(e,t,n){function r(t){return n[Math.max(0,Math.min(a,Math.floor(o*(t-e))))]}function i(){return o=n.length/(t-e),a=n.length-1,r}var o,a;return r.domain=function(n){return arguments.length?(e=+n[0],t=+n[n.length-1],i()):[e,t]},r.range=function(e){return arguments.length?(n=e,i()):n},r.invertExtent=function(t){return[t=0>(t=n.indexOf(t))?NaN:t/o+e,t+1/o]},r.copy=function(){return Ai(e,t,n)},i()}function Mi(e,t){function n(n){return n>=n?t[vo.bisect(e,n)]:void 0}return n.domain=function(t){return arguments.length?(e=t,n):e},n.range=function(e){return arguments.length?(t=e,n):t},n.invertExtent=function(n){return n=t.indexOf(n),[e[n-1],e[n]]},n.copy=function(){return Mi(e,t)},n}function ki(e){function t(e){return+e}return t.invert=t,t.domain=t.range=function(n){return arguments.length?(e=n.map(t),t):e},t.ticks=function(t){return xi(e,t)},t.tickFormat=function(t,n){return wi(e,t,n)},t.copy=function(){return ki(e)},t}function Ti(){return 0}function Di(e){return e.innerRadius}function ji(e){return e.outerRadius}function Pi(e){return e.startAngle}function Ii(e){return e.endAngle}function Ri(e){return e&&e.padAngle}function Li(e,t,n,r){return(e-n)*t-(t-r)*e>0?0:1}function Fi(e,t,n,r,i){var o=e[0]-t[0],a=e[1]-t[1],s=(i?r:-r)/Math.sqrt(o*o+a*a),u=s*a,l=-s*o,c=e[0]+u,f=e[1]+l,h=t[0]+u,d=t[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,E=_-p,C=S-m,A=O-p,M=N-m;return E*E+C*C>A*A+M*M&&(_=O,S=N),[[_-u,S-l],[_*n/b,S*n/b]]}function Bi(e){function t(t){function a(){l.push("M",o(e(c),s))}for(var u,l=[],c=[],f=-1,h=t.length,d=Ee(n),p=Ee(r);++f<h;)i.call(this,u=t[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=Nt,o=qi,a=o.key,s=.7;return t.x=function(e){return arguments.length?(n=e,t):n},t.y=function(e){return arguments.length?(r=e,t):r},t.defined=function(e){return arguments.length?(i=e,t):i},t.interpolate=function(e){return arguments.length?(a="function"==typeof e?o=e:(o=Fs.get(e)||qi).key,t):a},t.tension=function(e){return arguments.length?(s=e,t):s},t}function qi(e){return e.length>1?e.join("L"):e+"Z"}function zi(e){return e.join("L")+"Z"}function Hi(e){for(var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];++t<n;)i.push("V",(r=e[t])[1],"H",r[0]);return i.join("")}function Ui(e){for(var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];++t<n;)i.push("H",(r=e[t])[0],"V",r[1]);return i.join("")}function Wi(e,t){if(t.length<1||e.length!=t.length&&e.length!=t.length+2)return qi(e);var n=e.length!=t.length,r="",i=e[0],o=e[1],a=t[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=e[1],u=2),t.length>1){s=t[1],o=e[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<t.length;l++,u++)o=e[u],s=t[l],r+="S"+(o[0]-s[0])+","+(o[1]-s[1])+","+o[0]+","+o[1]}if(n){var c=e[u];r+="Q"+(o[0]+2*s[0]/3)+","+(o[1]+2*s[1]/3)+","+c[0]+","+c[1]}return r}function Vi(e,t){for(var n,r=[],i=(1-t)/2,o=e[0],a=e[1],s=1,u=e.length;++s<u;)n=o,o=a,a=e[s],r.push([i*(a[0]-n[0]),i*(a[1]-n[1])]);return r}function $i(e){if(e.length<3)return qi(e);var t=1,n=e.length,r=e[0],i=r[0],o=r[1],a=[i,i,i,(r=e[1])[0]],s=[o,o,o,r[1]],u=[i,",",o,"L",Yi(zs,a),",",Yi(zs,s)];for(e.push(e[n-1]);++t<=n;)r=e[t],a.shift(),a.push(r[0]),s.shift(),s.push(r[1]),Zi(u,a,s);return e.pop(),u.push("L",r),u.join("")}function Yi(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function Zi(e,t,n){e.push("C",Yi(Bs,t),",",Yi(Bs,n),",",Yi(qs,t),",",Yi(qs,n),",",Yi(zs,t),",",Yi(zs,n))}function Gi(e,t){return(t[1]-e[1])/(t[0]-e[0])}function Ki(e){for(var t,n,r,i=-1,o=e.length;++i<o;)n=(t=e[i])[0],r=t[1]-Go,t[0]=n*Math.cos(r),t[1]=n*Math.sin(r);return e}function Xi(e){function t(t){function u(){m.push("M",s(e(v),f),c,l(e(g.reverse()),f),"Z")}for(var h,d,p,m=[],g=[],v=[],y=-1,b=t.length,x=Ee(n),w=Ee(i),_=n===r?function(){return d}:Ee(r),S=i===o?function(){return p}:Ee(o);++y<b;)a.call(this,h=t[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=Nt,s=qi,u=s.key,l=s,c="L",f=.7;return t.x=function(e){return arguments.length?(n=r=e,t):r},t.x0=function(e){return arguments.length?(n=e,t):n},t.x1=function(e){return arguments.length?(r=e,t):r},t.y=function(e){return arguments.length?(i=o=e,t):o},t.y0=function(e){return arguments.length?(i=e,t):i},t.y1=function(e){return arguments.length?(o=e,t):o},t.defined=function(e){return arguments.length?(a=e,t):a},t.interpolate=function(e){return arguments.length?(u="function"==typeof e?s=e:(s=Fs.get(e)||qi).key,l=s.reverse||s,c=s.closed?"M":"L",t):u},t.tension=function(e){return arguments.length?(f=e,t):f},t}function Ji(e){return e.radius}function Qi(e){return[e.x,e.y]}function eo(){return 64}function to(){return"circle"}function no(e){var t=Math.sqrt(e/$o);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function ro(e){return function(){var t,n,r;(t=this[e])&&(r=t[n=t.active])&&(r.timer.c=null,r.timer.t=NaN,--t.count?delete t[n]:delete this[e],t.active+=.5,r.event&&r.event.interrupt.call(this,this.__data__,r.index))}}function io(e,t,n){return Do(e,Zs),e.namespace=t,e.id=n,e}function oo(e,t,n,r){var i=e.id,o=e.namespace;return Y(e,"function"==typeof n?function(e,a,s){e[o][i].tween.set(t,r(n.call(e,e.__data__,a,s)))}:(n=r(n),function(e){e[o][i].tween.set(t,n)}))}function ao(e){return null==e&&(e=""),function(){this.textContent=e}}function so(e){return null==e?"__transition__":"__transition_"+e+"__"}function uo(e,t,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(e,e.__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,Me((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(e,e.__data__,t),f=[],p.tween.forEach((function(n,r){(r=r.call(e,e.__data__,t))&&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(e,a);return o>=1?(p.event&&p.event.end.call(e,e.__data__,t),--h.count?delete h[r]:delete e[n],1):void 0}var s,u,l,c,f,h=e[n]||(e[n]={active:0,count:0}),p=h[r];p||(s=i.time,u=Me((function(e){var t=p.delay;return u.t=t+s,e>=t?o(e-t):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:t},i=null,++h.count)}function lo(e,t,n){e.attr("transform",(function(e){var r=t(e);return"translate("+(isFinite(r)?r:n(e))+",0)"}))}function co(e,t,n){e.attr("transform",(function(e){var r=t(e);return"translate(0,"+(isFinite(r)?r:n(e))+")"}))}function fo(e){return e.toISOString()}function ho(e,t,n){function r(t){return e(t)}function i(e,n){var r=(e[1]-e[0])/n,i=vo.bisect(ru,r);return i==ru.length?[t.year,bi(e.map((function(e){return e/31536e6})),n)[2]]:i?t[r/ru[i-1]<ru[i]/r?i-1:i]:[au,bi(e,n)[2]]}return r.invert=function(t){return po(e.invert(t))},r.domain=function(t){return arguments.length?(e.domain(t),r):e.domain().map(po)},r.nice=function(e,t){function n(n){return!isNaN(n)&&!e.range(n,po(+n+1),t).length}var o=r.domain(),a=ci(o),s=null==e?i(a,10):"number"==typeof e&&i(a,e);return s&&(e=s[0],t=s[1]),r.domain(di(o,t>1?{floor:function(t){for(;n(t=e.floor(t));)t=po(t-1);return t},ceil:function(t){for(;n(t=e.ceil(t));)t=po(+t+1);return t}}:e))},r.ticks=function(e,t){var n=ci(r.domain()),o=null==e?i(n,10):"number"==typeof e?i(n,e):!e.range&&[{range:e},t];return o&&(e=o[0],t=o[1]),e.range(n[0],po(+n[1]+1),1>t?1:t)},r.tickFormat=function(){return n},r.copy=function(){return ho(e.copy(),t,n)},vi(r,e)}function po(e){return new Date(e)}function mo(e){return JSON.parse(e.responseText)}function go(e){var t=xo.createRange();return t.selectNode(xo.body),t.createContextualFragment(e.responseText)}var vo={version:"3.5.17"},yo=[].slice,bo=function(e){return yo.call(e)},xo=this.document;if(xo)try{bo(xo.documentElement.childNodes)[0].nodeType}catch(e){bo=function(e){for(var t=e.length,n=new Array(t);t--;)n[t]=e[t];return n}}if(Date.now||(Date.now=function(){return+new Date}),xo)try{xo.createElement("DIV").style.setProperty("opacity",0,"")}catch(e){var wo=this.Element.prototype,_o=wo.setAttribute,So=wo.setAttributeNS,Oo=this.CSSStyleDeclaration.prototype,No=Oo.setProperty;wo.setAttribute=function(e,t){_o.call(this,e,t+"")},wo.setAttributeNS=function(e,t,n){So.call(this,e,t,n+"")},Oo.setProperty=function(e,t,n){No.call(this,e,t+"",n)}}vo.ascending=s,vo.descending=function(e,t){return e>t?-1:t>e?1:t>=e?0:NaN},vo.min=function(e,t){var n,r,i=-1,o=e.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=e[i])&&r>=r){n=r;break}for(;++i<o;)null!=(r=e[i])&&n>r&&(n=r)}else{for(;++i<o;)if(null!=(r=t.call(e,e[i],i))&&r>=r){n=r;break}for(;++i<o;)null!=(r=t.call(e,e[i],i))&&n>r&&(n=r)}return n},vo.max=function(e,t){var n,r,i=-1,o=e.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=e[i])&&r>=r){n=r;break}for(;++i<o;)null!=(r=e[i])&&r>n&&(n=r)}else{for(;++i<o;)if(null!=(r=t.call(e,e[i],i))&&r>=r){n=r;break}for(;++i<o;)null!=(r=t.call(e,e[i],i))&&r>n&&(n=r)}return n},vo.extent=function(e,t){var n,r,i,o=-1,a=e.length;if(1===arguments.length){for(;++o<a;)if(null!=(r=e[o])&&r>=r){n=i=r;break}for(;++o<a;)null!=(r=e[o])&&(n>r&&(n=r),r>i&&(i=r))}else{for(;++o<a;)if(null!=(r=t.call(e,e[o],o))&&r>=r){n=i=r;break}for(;++o<a;)null!=(r=t.call(e,e[o],o))&&(n>r&&(n=r),r>i&&(i=r))}return[n,i]},vo.sum=function(e,t){var n,r=0,i=e.length,o=-1;if(1===arguments.length)for(;++o<i;)l(n=+e[o])&&(r+=n);else for(;++o<i;)l(n=+t.call(e,e[o],o))&&(r+=n);return r},vo.mean=function(e,t){var n,r=0,i=e.length,o=-1,a=i;if(1===arguments.length)for(;++o<i;)l(n=u(e[o]))?r+=n:--a;else for(;++o<i;)l(n=u(t.call(e,e[o],o)))?r+=n:--a;return a?r/a:void 0},vo.quantile=function(e,t){var n=(e.length-1)*t+1,r=Math.floor(n),i=+e[r-1],o=n-r;return o?i+o*(e[r]-i):i},vo.median=function(e,t){var n,r=[],i=e.length,o=-1;if(1===arguments.length)for(;++o<i;)l(n=u(e[o]))&&r.push(n);else for(;++o<i;)l(n=u(t.call(e,e[o],o)))&&r.push(n);return r.length?vo.quantile(r.sort(s),.5):void 0},vo.variance=function(e,t){var n,r,i=e.length,o=0,a=0,s=-1,c=0;if(1===arguments.length)for(;++s<i;)l(n=u(e[s]))&&(a+=(r=n-o)*(n-(o+=r/++c)));else for(;++s<i;)l(n=u(t.call(e,e[s],s)))&&(a+=(r=n-o)*(n-(o+=r/++c)));return c>1?a/(c-1):void 0},vo.deviation=function(){var e=vo.variance.apply(this,arguments);return e?Math.sqrt(e):e};var Eo=c(s);vo.bisectLeft=Eo.left,vo.bisect=vo.bisectRight=Eo.right,vo.bisector=function(e){return c(1===e.length?function(t,n){return s(e(t),n)}:e)},vo.shuffle=function(e,t,n){(o=arguments.length)<3&&(n=e.length,2>o&&(t=0));for(var r,i,o=n-t;o;)i=Math.random()*o--|0,r=e[o+t],e[o+t]=e[i+t],e[i+t]=r;return e},vo.permute=function(e,t){for(var n=t.length,r=new Array(n);n--;)r[n]=e[t[n]];return r},vo.pairs=function(e){for(var t=0,n=e.length-1,r=e[0],i=new Array(0>n?0:n);n>t;)i[t]=[r,r=e[++t]];return i},vo.transpose=function(e){if(!(i=e.length))return[];for(var t=-1,n=vo.min(e,f),r=new Array(n);++t<n;)for(var i,o=-1,a=r[t]=new Array(i);++o<i;)a[o]=e[o][t];return r},vo.zip=function(){return vo.transpose(arguments)},vo.keys=function(e){var t=[];for(var n in e)t.push(n);return t},vo.values=function(e){var t=[];for(var n in e)t.push(e[n]);return t},vo.entries=function(e){var t=[];for(var n in e)t.push({key:n,value:e[n]});return t},vo.merge=function(e){for(var t,n,r,i=e.length,o=-1,a=0;++o<i;)a+=e[o].length;for(n=new Array(a);--i>=0;)for(t=(r=e[i]).length;--t>=0;)n[--a]=r[t];return n};var Co=Math.abs;vo.range=function(e,t,n){if(arguments.length<3&&(n=1,arguments.length<2&&(t=e,e=0)),(t-e)/n==1/0)throw new Error("infinite range");var r,i=[],o=function(e){for(var t=1;e*t%1;)t*=10;return t}(Co(n)),a=-1;if(e*=o,t*=o,0>(n*=o))for(;(r=e+n*++a)>t;)i.push(r/o);else for(;(r=e+n*++a)<t;)i.push(r/o);return i},vo.map=function(e,t){var n=new d;if(e instanceof d)e.forEach((function(e,t){n.set(e,t)}));else if(Array.isArray(e)){var r,i=-1,o=e.length;if(1===arguments.length)for(;++i<o;)n.set(i,e[i]);else for(;++i<o;)n.set(t.call(e,r=e[i],i),r)}else for(var a in e)n.set(a,e[a]);return n};var Ao="__proto__",Mo="\0";h(d,{has:g,get:function(e){return this._[p(e)]},set:function(e,t){return this._[p(e)]=t},remove:v,keys:y,values:function(){var e=[];for(var t in this._)e.push(this._[t]);return e},entries:function(){var e=[];for(var t in this._)e.push({key:m(t),value:this._[t]});return e},size:b,empty:x,forEach:function(e){for(var t in this._)e.call(this,m(t),this._[t])}}),vo.nest=function(){function e(t,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 t?(l=t(),c=function(n,r){l.set(n,e(t,r,s))}):(l={},c=function(n,r){l[n]=e(t,r,s)}),g.forEach(c),l}function t(e,n){if(n>=o.length)return e;var r=[],i=a[n++];return e.forEach((function(e,i){r.push({key:e,values:t(i,n)})})),i?r.sort((function(e,t){return i(e.key,t.key)})):r}var n,r,i={},o=[],a=[];return i.map=function(t,n){return e(n,t,0)},i.entries=function(n){return t(e(vo.map,n,0),0)},i.key=function(e){return o.push(e),i},i.sortKeys=function(e){return a[o.length-1]=e,i},i.sortValues=function(e){return n=e,i},i.rollup=function(e){return r=e,i},i},vo.set=function(e){var t=new w;if(e)for(var n=0,r=e.length;r>n;++n)t.add(e[n]);return t},h(w,{has:g,add:function(e){return this._[p(e+="")]=!0,e},remove:v,values:y,size:b,empty:x,forEach:function(e){for(var t in this._)e.call(this,m(t))}}),vo.behavior={},vo.rebind=function(e,t){for(var n,r=1,i=arguments.length;++r<i;)e[n=arguments[r]]=S(e,t,t[n]);return e};var ko=["webkit","ms","moz","Moz","o","O"];vo.dispatch=function(){for(var e=new E,t=-1,n=arguments.length;++t<n;)e[arguments[t]]=C(e);return e},E.prototype.on=function(e,t){var n=e.indexOf("."),r="";if(n>=0&&(r=e.slice(n+1),e=e.slice(0,n)),e)return arguments.length<2?this[e].on(r):this[e].on(r,t);if(2===arguments.length){if(null==t)for(e in this)this.hasOwnProperty(e)&&this[e].on(r,null);return this}},vo.event=null,vo.requote=function(e){return e.replace(To,"\\$&")};var To=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,Do={}.__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)e[n]=t[n]},jo=function(e,t){return t.querySelector(e)},Po=function(e,t){return t.querySelectorAll(e)},Io=function(e,t){var n=e.matches||e[O(e,"matchesSelector")];return(Io=function(e,t){return n.call(e,t)})(e,t)};"function"==typeof Sizzle&&(jo=function(e,t){return Sizzle(e,t)[0]||null},Po=Sizzle,Io=Sizzle.matchesSelector),vo.selection=function(){return vo.select(xo.documentElement)};var Ro=vo.selection.prototype=[];Ro.select=function(e){var t,n,r,i,o=[];e=D(e);for(var a=-1,s=this.length;++a<s;){o.push(t=[]),t.parentNode=(r=this[a]).parentNode;for(var u=-1,l=r.length;++u<l;)(i=r[u])?(t.push(n=e.call(i,i.__data__,u,a)),n&&"__data__"in i&&(n.__data__=i.__data__)):t.push(null)}return T(o)},Ro.selectAll=function(e){var t,n,r=[];e=j(e);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(t=bo(e.call(n,n.__data__,s,i))),t.parentNode=n);return T(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(e){var t=e.indexOf(":"),n=e;return t>=0&&"xmlns"!==(n=e.slice(0,t))&&(e=e.slice(t+1)),Fo.hasOwnProperty(n)?{space:Fo[n],local:e}:e}},Ro.attr=function(e,t){if(arguments.length<2){if("string"==typeof e){var n=this.node();return(e=vo.ns.qualify(e)).local?n.getAttributeNS(e.space,e.local):n.getAttribute(e)}for(t in e)this.each(P(t,e[t]));return this}return this.each(P(e,t))},Ro.classed=function(e,t){if(arguments.length<2){if("string"==typeof e){var n=this.node(),r=(e=L(e)).length,i=-1;if(t=n.classList){for(;++i<r;)if(!t.contains(e[i]))return!1}else for(t=n.getAttribute("class");++i<r;)if(!R(e[i]).test(t))return!1;return!0}for(t in e)this.each(F(t,e[t]));return this}return this.each(F(e,t))},Ro.style=function(e,t,n){var r=arguments.length;if(3>r){if("string"!=typeof e){for(n in 2>r&&(t=""),e)this.each(q(n,e[n],t));return this}if(2>r){var i=this.node();return a(i).getComputedStyle(i,null).getPropertyValue(e)}n=""}return this.each(q(e,t,n))},Ro.property=function(e,t){if(arguments.length<2){if("string"==typeof e)return this.node()[e];for(t in e)this.each(z(t,e[t]));return this}return this.each(z(e,t))},Ro.text=function(e){return arguments.length?this.each("function"==typeof e?function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}:null==e?function(){this.textContent=""}:function(){this.textContent=e}):this.node().textContent},Ro.html=function(e){return arguments.length?this.each("function"==typeof e?function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}:null==e?function(){this.innerHTML=""}:function(){this.innerHTML=e}):this.node().innerHTML},Ro.append=function(e){return e=H(e),this.select((function(){return this.appendChild(e.apply(this,arguments))}))},Ro.insert=function(e,t){return e=H(e),t=D(t),this.select((function(){return this.insertBefore(e.apply(this,arguments),t.apply(this,arguments)||null)}))},Ro.remove=function(){return this.each(U)},Ro.data=function(e,t){function n(e,n){var r,i,o,a=e.length,c=n.length,f=Math.min(a,c),h=new Array(c),p=new Array(c),m=new Array(a);if(t){var g,v=new d,y=new Array(a);for(r=-1;++r<a;)(i=e[r])&&(v.has(g=t.call(i,i.__data__,r))?m[r]=i:v.set(g,i),y[r]=g);for(r=-1;++r<c;)(i=v.get(g=t.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]=e[r])}else{for(r=-1;++r<f;)i=e[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]=e[r]}p.update=h,p.parentNode=h.parentNode=m.parentNode=e.parentNode,s.push(p),u.push(h),l.push(m)}var r,i,o=-1,a=this.length;if(!arguments.length){for(e=new Array(a=(r=this[0]).length);++o<a;)(i=r[o])&&(e[o]=i.__data__);return e}var s=Z([]),u=T([]),l=T([]);if("function"==typeof e)for(;++o<a;)n(r=this[o],e.call(r,r.parentNode.__data__,o));else for(;++o<a;)n(r=this[o],e);return u.enter=function(){return s},u.exit=function(){return l},u},Ro.datum=function(e){return arguments.length?this.property("__data__",e):this.property("__data__")},Ro.filter=function(e){var t,n,r,i=[];"function"!=typeof e&&(e=V(e));for(var o=0,a=this.length;a>o;o++){i.push(t=[]),t.parentNode=(n=this[o]).parentNode;for(var s=0,u=n.length;u>s;s++)(r=n[s])&&e.call(r,r.__data__,s,o)&&t.push(r)}return T(i)},Ro.order=function(){for(var e=-1,t=this.length;++e<t;)for(var n,r=this[e],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(e){e=$.apply(this,arguments);for(var t=-1,n=this.length;++t<n;)this[t].sort(e);return this.order()},Ro.each=function(e){return Y(this,(function(t,n,r){e.call(t,t.__data__,n,r)}))},Ro.call=function(e){var t=bo(arguments);return e.apply(t[0]=this,t),this},Ro.empty=function(){return!this.node()},Ro.node=function(){for(var e=0,t=this.length;t>e;e++)for(var n=this[e],r=0,i=n.length;i>r;r++){var o=n[r];if(o)return o}return null},Ro.size=function(){var e=0;return Y(this,(function(){++e})),e};var Bo=[];vo.selection.enter=Z,vo.selection.enter.prototype=Bo,Bo.append=Ro.append,Bo.empty=Ro.empty,Bo.node=Ro.node,Bo.call=Ro.call,Bo.size=Ro.size,Bo.select=function(e){for(var t,n,r,i,o,a=[],s=-1,u=this.length;++s<u;){r=(i=this[s]).update,a.push(t=[]),t.parentNode=i.parentNode;for(var l=-1,c=i.length;++l<c;)(o=i[l])?(t.push(r[l]=n=e.call(i.parentNode,o.__data__,l,s)),n.__data__=o.__data__):t.push(null)}return T(a)},Bo.insert=function(e,t){return arguments.length<2&&(t=function(e){var t,n;return function(r,i,o){var a,s=e[o].update,u=s.length;for(o!=n&&(n=o,t=0),i>=t&&(t=i+1);!(a=s[t])&&++t<u;);return a}}(this)),Ro.insert.call(this,e,t)},vo.select=function(e){var t;return"string"==typeof e?(t=[jo(e,xo)]).parentNode=xo.documentElement:(t=[e]).parentNode=o(e),T([t])},vo.selectAll=function(e){var t;return"string"==typeof e?(t=bo(Po(e,xo))).parentNode=xo.documentElement:(t=bo(e)).parentNode=null,T([t])},Ro.on=function(e,t,n){var r=arguments.length;if(3>r){if("string"!=typeof e){for(n in 2>r&&(t=!1),e)this.each(G(n,e[n],t));return this}if(2>r)return(r=this.node()["__on"+e])&&r._;n=!1}return this.each(G(e,t,n))};var qo=vo.map({mouseenter:"mouseover",mouseleave:"mouseout"});xo&&qo.forEach((function(e){"on"+e in xo&&qo.remove(e)}));var zo,Ho=0;vo.mouse=function(e){return Q(e,M())};var Uo=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;vo.touch=function(e,t,n){if(arguments.length<3&&(n=t,t=M().changedTouches),t)for(var r,i=0,o=t.length;o>i;++i)if((r=t[i]).identifier===n)return Q(e,r)},vo.behavior.drag=function(){function e(){this.on("mousedown.drag",i).on("touchstart.drag",o)}function t(e,t,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=e(),p=".drag"+(null==d?"":"-"+d),m=vo.select(i(l)).on(o+p,(function(){var e,n,r=t(c,d);r&&(e=r[0]-v[0],n=r[1]-v[1],h|=e|n,v=r,f({type:"drag",x:r[0]+s[0],y:r[1]+s[1],dx:e,dy:n}))})).on(a+p,(function(){t(c,d)&&(m.on(o+p,null).on(a+p,null),g(h),f({type:"dragend"}))})),g=J(l),v=t(c,d);s=r?[(s=r.apply(u,arguments)).x-v[0],s.y-v[1]]:[0,0],f({type:"dragstart"})}}var n=k(e,"drag","dragstart","dragend"),r=null,i=t(N,vo.mouse,a,"mousemove","mouseup"),o=t(ee,vo.touch,_,"touchmove","touchend");return e.origin=function(t){return arguments.length?(r=t,e):r},vo.rebind(e,n,"on")},vo.touches=function(e,t){return arguments.length<2&&(t=M().touches),t?bo(t).map((function(t){var n=Q(e,t);return n.identifier=t.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(e,t){var n,r,i=e[0],o=e[1],a=e[2],s=t[0],u=t[1],l=t[2],c=s-i,f=u-o,h=c*c+f*f;if(Vo>h)r=Math.log(l/a)/Jo,n=function(e){return[i+e*c,o+e*f,a*Math.exp(Jo*e*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(e){var t=e*r,n=oe(g),s=a/(2*d)*(n*function(e){return((e=Math.exp(2*e))-1)/(e+1)}(Jo*t+g)-function(e){return((e=Math.exp(e))-1/e)/2}(g));return[i+s*c,o+s*f,a*n/oe(Jo*t+g)]}}return n.duration=1e3*r,n},vo.behavior.zoom=function(){function e(e){e.on(M,c).on(ea+".zoom",h).on("dblclick.zoom",d).on(j,f)}function t(e){return[(e[0]-S.x)/S.k,(e[1]-S.y)/S.k]}function n(e){S.k=Math.max(N[0],Math.min(N[1],e))}function r(e,t){t=function(e){return[e[0]*S.k+S.x,e[1]*S.k+S.y]}(t),S.x+=e[0]-t[0],S.y+=e[1]-t[1]}function i(t,i,o,a){t.__chart__={x:S.x,y:S.y,k:S.k},n(Math.pow(2,a)),r(m=i,o),t=vo.select(t),E>0&&(t=t.transition().duration(E)),t.call(e.event)}function o(){x&&x.domain(b.range().map((function(e){return(e-S.x)/S.k})).map(b.invert)),_&&_.domain(w.range().map((function(e){return(e-S.y)/S.k})).map(w.invert))}function s(e){C++||e({type:"zoomstart"})}function u(e){o(),e({type:"zoom",scale:S.k,translate:[S.x,S.y]})}function l(e){--C||(e({type:"zoomend"}),m=null)}function c(){var e=this,n=P.of(e,arguments),i=0,o=vo.select(a(e)).on(T,(function(){i=1,r(vo.mouse(e),c),u(n)})).on(D,(function(){o.on(T,null).on(D,null),f(i),l(n)})),c=t(vo.mouse(e)),f=J(e);Ys.call(e),s(n)}function f(){function e(){var e=vo.touches(p);return d=S.k,e.forEach((function(e){e.identifier in g&&(g[e.identifier]=t(e))})),e}function o(){var t=vo.event.target;vo.select(t).on(x,a).on(w,h),_.push(t);for(var n=vo.event.changedTouches,r=0,o=n.length;o>r;++r)g[n[r].identifier]=null;var s=e(),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),A()}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 e,t,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(t)break;e=i,t=o}if(o){var c=(c=i[0]-e[0])*c+(c=i[1]-e[1])*c,f=v&&Math.sqrt(c/v);e=[(e[0]+i[0])/2,(e[1]+i[1])/2],t=[(t[0]+o[0])/2,(t[1]+o[1])/2],n(f*d)}y=null,r(e,t),u(m)}function h(){if(vo.event.touches.length){for(var t=vo.event.changedTouches,n=0,r=t.length;r>n;++n)delete g[t[n].identifier];for(var i in g)return void e()}vo.selectAll(_).on(b,null),O.on(M,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(M,null).on(j,o)}function h(){var e=P.of(this,arguments);v?clearTimeout(v):(Ys.call(this),p=t(m=g||vo.mouse(this)),s(e)),v=setTimeout((function(){v=null,l(e)}),50),A(),n(Math.pow(2,.002*Qo())*S.k),r(m,p),u(e)}function d(){var e=vo.mouse(this),n=Math.log(S.k)/Math.LN2;i(this,e,t(e),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=ta,E=250,C=0,M="mousedown.zoom",T="mousemove.zoom",D="mouseup.zoom",j="touchstart.zoom",P=k(e,"zoomstart","zoom","zoomend");return ea||(ea="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")),e.event=function(e){e.each((function(){var e=P.of(this,arguments),t=S;Vs?vo.select(this).transition().each("start.zoom",(function(){S=this.__chart__||{x:0,y:0,k:1},s(e)})).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-t.x)/t.k,(o-t.y)/t.k,n/t.k]);return function(t){var r=a(t),s=n/r[2];this.__chart__=S={x:i-r[0]*s,y:o-r[1]*s,k:s},u(e)}})).each("interrupt.zoom",(function(){l(e)})).each("end.zoom",(function(){l(e)})):(this.__chart__=S,s(e),u(e),l(e))}))},e.translate=function(t){return arguments.length?(S={x:+t[0],y:+t[1],k:S.k},o(),e):[S.x,S.y]},e.scale=function(t){return arguments.length?(S={x:S.x,y:S.y,k:null},n(+t),o(),e):S.k},e.scaleExtent=function(t){return arguments.length?(N=null==t?ta:[+t[0],+t[1]],e):N},e.center=function(t){return arguments.length?(g=t&&[+t[0],+t[1]],e):g},e.size=function(t){return arguments.length?(O=t&&[+t[0],+t[1]],e):O},e.duration=function(t){return arguments.length?(E=+t,e):E},e.x=function(t){return arguments.length?(x=t,b=t.copy(),S={x:0,y:0,k:1},e):x},e.y=function(t){return arguments.length?(_=t,w=t.copy(),S={x:0,y:0,k:1},e):_},vo.rebind(e,P,"on")};var Qo,ea,ta=[0,1/0];vo.color=se,se.prototype.toString=function(){return this.rgb()+""},vo.hsl=ue;var na=ue.prototype=new se;na.brighter=function(e){return e=Math.pow(.7,arguments.length?e:1),new ue(this.h,this.s,this.l/e)},na.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),new ue(this.h,this.s,e*this.l)},na.rgb=function(){return le(this.h,this.s,this.l)},vo.hcl=ce;var ra=ce.prototype=new se;ra.brighter=function(e){return new ce(this.h,this.c,Math.min(100,this.l+ia*(arguments.length?e:1)))},ra.darker=function(e){return new ce(this.h,this.c,Math.max(0,this.l-ia*(arguments.length?e:1)))},ra.rgb=function(){return fe(this.h,this.c,this.l).rgb()},vo.lab=he;var ia=18,oa=.95047,aa=1,sa=1.08883,ua=he.prototype=new se;ua.brighter=function(e){return new he(Math.min(100,this.l+ia*(arguments.length?e:1)),this.a,this.b)},ua.darker=function(e){return new he(Math.max(0,this.l-ia*(arguments.length?e:1)),this.a,this.b)},ua.rgb=function(){return de(this.l,this.a,this.b)},vo.rgb=ve;var la=ve.prototype=new se;la.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,n=this.g,r=this.b,i=30;return t||n||r?(t&&i>t&&(t=i),n&&i>n&&(n=i),r&&i>r&&(r=i),new ve(Math.min(255,t/e),Math.min(255,n/e),Math.min(255,r/e))):new ve(i,i,i)},la.darker=function(e){return new ve((e=Math.pow(.7,arguments.length?e:1))*this.r,e*this.g,e*this.b)},la.hsl=function(){return _e(this.r,this.g,this.b)},la.toString=function(){return"#"+xe(this.r)+xe(this.g)+xe(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(e,t){ca.set(e,ye(t))})),vo.functor=Ee,vo.xhr=Ce(_),vo.dsv=function(e,t){function n(e,n,o){arguments.length<3&&(o=n,n=null);var a=Ae(e,t,null==n?r:i(n),o);return a.row=function(e){return arguments.length?a.response(null==(n=e)?r:i(e)):n},a}function r(e){return n.parse(e.responseText)}function i(e){return function(t){return n.parse(t.responseText,e)}}function o(t){return t.map(a).join(e)}function a(e){return s.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}var s=new RegExp('["'+e+"\n]"),u=e.charCodeAt(0);return n.parse=function(e,t){var r;return n.parseRows(e,(function(e,n){if(r)return r(e,n-1);var i=new Function("d","return {"+e.map((function(e,t){return JSON.stringify(e)+": d["+t+"]"})).join(",")+"}");r=t?function(e,n){return t(i(e),n)}:i}))},n.parseRows=function(e,t){function n(){if(c>=l)return a;if(i)return i=!1,o;var t=c;if(34===e.charCodeAt(t)){for(var n=t;n++<l;)if(34===e.charCodeAt(n)){if(34!==e.charCodeAt(n+1))break;++n}return c=n+2,13===(r=e.charCodeAt(n+1))?(i=!0,10===e.charCodeAt(n+2)&&++c):10===r&&(i=!0),e.slice(t+1,n).replace(/""/g,'"')}for(;l>c;){var r,s=1;if(10===(r=e.charCodeAt(c++)))i=!0;else if(13===r)i=!0,10===e.charCodeAt(c)&&(++c,++s);else if(r!==u)continue;return e.slice(t,c-s)}return e.slice(t)}for(var r,i,o={},a={},s=[],l=e.length,c=0,f=0;(r=n())!==a;){for(var h=[];r!==o&&r!==a;)h.push(r),r=n();t&&null==(h=t(h,f++))||s.push(h)}return s},n.format=function(t){if(Array.isArray(t[0]))return n.formatRows(t);var r=new w,i=[];return t.forEach((function(e){for(var t in e)r.has(t)||i.push(r.add(t))})),[i.map(a).join(e)].concat(t.map((function(t){return i.map((function(e){return a(t[e])})).join(e)}))).join("\n")},n.formatRows=function(e){return e.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(e){setTimeout(e,17)};vo.timer=function(){Me.apply(this,arguments)},vo.timer.flush=function(){Te(),De()},vo.round=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)};var ga=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map((function(e,t){var n=Math.pow(10,3*Co(8-t));return{scale:t>8?function(e){return e/n}:function(e){return e*n},symbol:e}}));vo.formatPrefix=function(e,t){var n=0;return(e=+e)&&(0>e&&(e*=-1),t&&(e=vo.round(e,je(e,t))),n=1+Math.floor(1e-12+Math.log(e)/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(e){return e.toString(2)},c:function(e){return String.fromCharCode(e)},o:function(e){return e.toString(8)},x:function(e){return e.toString(16)},X:function(e){return e.toString(16).toUpperCase()},g:function(e,t){return e.toPrecision(t)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},r:function(e,t){return(e=vo.round(e,je(e,t))).toFixed(Math.max(0,Math.min(20,je(e*(1+1e-15),t))))}}),ba=vo.time={},xa=Date;Re.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=Le((function(e){return(e=ba.day(e)).setMonth(0,1),e}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e){return e.getFullYear()})),ba.years=ba.year.range,ba.years.utc=ba.year.utc.range,ba.day=Le((function(e){var t=new xa(2e3,0);return t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e){return e.getDate()-1})),ba.days=ba.day.range,ba.days.utc=ba.day.utc.range,ba.dayOfYear=function(e){var t=ba.year(e);return Math.floor((e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach((function(e,t){t=7-t;var n=ba[e]=Le((function(e){return(e=ba.day(e)).setDate(e.getDate()-(e.getDay()+t)%7),e}),(function(e,t){e.setDate(e.getDate()+7*Math.floor(t))}),(function(e){var n=ba.year(e).getDay();return Math.floor((ba.dayOfYear(e)+(n+t)%7)/7)-(n!==t)}));ba[e+"s"]=n.range,ba[e+"s"].utc=n.utc.range,ba[e+"OfYear"]=function(e){var n=ba.year(e).getDay();return Math.floor((ba.dayOfYear(e)+(n+t)%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(e){return{numberFormat:Pe(e),timeFormat:Be(e)}};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={},ot.prototype={s:0,t:0,add:function(e){at(e,this.t,Ea),at(Ea.s,this.s,this),this.s?this.t+=Ea.t:this.s=Ea.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var Ea=new ot;vo.geo.stream=function(e,t){e&&Ca.hasOwnProperty(e.type)?Ca[e.type](e,t):st(e,t)};var Ca={Feature:function(e,t){st(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)st(n[r].geometry,t)}},Aa={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){ut(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)ut(n[r],t,0)},Polygon:function(e,t){lt(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)lt(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)st(n[r],t)}};vo.geo.area=function(e){return Ma=0,vo.geo.stream(e,Ta),Ma};var Ma,ka=new ot,Ta={sphere:function(){Ma+=4*$o},point:N,lineStart:N,lineEnd:N,polygonStart:function(){ka.reset(),Ta.lineStart=ct},polygonEnd:function(){var e=2*ka;Ma+=0>e?4*$o+e:e,Ta.lineStart=Ta.lineEnd=Ta.point=N}};vo.geo.bounds=function(){function e(e,t){b.push(x=[c=e,h=e]),f>t&&(f=t),t>d&&(d=t)}function t(t,n){var r=ft([t*Ko,n*Ko]);if(v){var i=dt(v,r),o=dt([i[1],-i[0],0],i);gt(o),o=vt(o);var a=t-p,u=a>0?1:-1,l=o[0]*Xo*u,m=Co(a)>180;if(m^(l>u*p&&u*t>l))(g=o[1]*Xo)>d&&(d=g);else if(m^((l=(l+360)%360-180)>u*p&&u*t>l)){var g=-o[1]*Xo;f>g&&(f=g)}else f>n&&(f=n),n>d&&(d=n);m?p>t?s(c,t)>s(c,h)&&(h=t):s(t,h)>s(c,h)&&(c=t):h>=c?(c>t&&(c=t),t>h&&(h=t)):t>p?s(c,t)>s(c,h)&&(h=t):s(t,h)>s(c,h)&&(c=t)}else e(t,n);v=r,p=t}function n(){w.point=t}function r(){x[0]=c,x[1]=h,w.point=e,v=null}function i(e,n){if(v){var r=e-p;y+=Co(r)>180?r+(r>0?360:-360):r}else m=e,g=n;Ta.point(e,n),t(e,n)}function o(){Ta.lineStart()}function a(){i(m,g),Ta.lineEnd(),Co(y)>Wo&&(c=-(h=180)),x[0]=c,x[1]=h,v=null}function s(e,t){return(t-=e)<0?t+360:t}function u(e,t){return e[0]-t[0]}function l(e,t){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}var c,f,h,d,p,m,g,v,y,b,x,w={point:e,lineStart:n,lineEnd:r,polygonStart:function(){w.point=i,w.lineStart=o,w.lineEnd=a,y=0,Ta.polygonStart()},polygonEnd:function(){Ta.polygonEnd(),w.point=e,w.lineStart=n,w.lineEnd=r,0>ka?(c=-(h=180),f=-(d=90)):y>Wo?d=90:-Wo>y&&(f=-90),x[0]=c,x[1]=h}};return function(e){if(d=h=-(c=f=1/0),b=[],vo.geo.stream(e,w),o=b.length){b.sort(u);for(var t=1,n=[p=b[0]];o>t;++t)l((i=b[t])[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=(t=0,n[o=n.length-1]);o>=t;p=i,++t)i=n[t],(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(e){Da=ja=Pa=Ia=Ra=La=Fa=Ba=qa=za=Ha=0,vo.geo.stream(e,Ua);var t=qa,n=za,r=Ha,i=t*t+n*n+r*r;return Vo>i&&(t=La,n=Fa,r=Ba,Wo>ja&&(t=Pa,n=Ia,r=Ra),Vo>(i=t*t+n*n+r*r))?[NaN,NaN]:[Math.atan2(n,t)*Xo,ie(r/Math.sqrt(i))*Xo]};var Da,ja,Pa,Ia,Ra,La,Fa,Ba,qa,za,Ha,Ua={sphere:N,point:bt,lineStart:wt,lineEnd:_t,polygonStart:function(){Ua.lineStart=St},polygonEnd:function(){Ua.lineStart=wt}},Wa=Mt(Nt,(function(e){var t,n=NaN,r=NaN,i=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(o,a){var s=o>0?$o:-$o,u=Co(o-n);Co(u-$o)<Wo?(e.point(n,r=(r+a)/2>0?Go:-Go),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(s,r),e.point(o,r),t=0):i!==s&&u>=$o&&(Co(n-i)<Wo&&(n-=i*Wo),Co(o-s)<Wo&&(o-=s*Wo),r=function(e,t,n,r){var i,o,a=Math.sin(e-n);return Co(a)>Wo?Math.atan((Math.sin(t)*(o=Math.cos(r))*Math.sin(n)-Math.sin(r)*(i=Math.cos(t))*Math.sin(e))/(i*o*a)):(t+r)/2}(n,r,o,a),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(s,r),t=0),e.point(n=o,r=a),i=s},lineEnd:function(){e.lineEnd(),n=r=NaN},clean:function(){return 2-t}}}),(function(e,t,n,r){var i;if(null==e)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(Co(e[0]-t[0])>Wo){var o=e[0]<t[0]?$o:-$o;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(t[0],t[1])}),[-$o,-$o/2]),Va=1e9;vo.geo.clipExtent=function(){var e,t,n,r,i,o,a={stream:function(e){return i&&(i.valid=!1),(i=o(e)).valid=!0,i},extent:function(s){return arguments.length?(o=Pt(e=+s[0][0],t=+s[0][1],n=+s[1][0],r=+s[1][1]),i&&(i.valid=!1,i=null),a):[[e,t],[n,r]]}};return a.extent([[0,0],[960,500]])},(vo.geo.conicEqualArea=function(){return It(Rt)}).raw=Rt,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 e(e){var o=e[0],a=e[1];return t=null,n(o,a),t||(r(o,a),t)||i(o,a),t}var t,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(e,n){t=[e,n]}};return e.invert=function(e){var t=o.scale(),n=o.translate(),r=(e[0]-n[0])/t,i=(e[1]-n[1])/t;return(i>=.12&&.234>i&&r>=-.425&&-.214>r?a:i>=.166&&.234>i&&r>=-.214&&-.115>r?s:o).invert(e)},e.stream=function(e){var t=o.stream(e),n=a.stream(e),r=s.stream(e);return{point:function(e,i){t.point(e,i),n.point(e,i),r.point(e,i)},sphere:function(){t.sphere(),n.sphere(),r.sphere()},lineStart:function(){t.lineStart(),n.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),n.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),n.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),n.polygonEnd(),r.polygonEnd()}}},e.precision=function(t){return arguments.length?(o.precision(t),a.precision(t),s.precision(t),e):o.precision()},e.scale=function(t){return arguments.length?(o.scale(t),a.scale(.35*t),s.scale(t),e.translate(o.translate())):o.scale()},e.translate=function(t){if(!arguments.length)return o.translate();var l=o.scale(),c=+t[0],f=+t[1];return n=o.translate(t).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,e},e.scale(1070)};var $a,Ya,Za,Ga,Ka,Xa,Ja={point:N,lineStart:N,lineEnd:N,polygonStart:function(){Ya=0,Ja.lineStart=Lt},polygonEnd:function(){Ja.lineStart=Ja.lineEnd=Ja.point=N,$a+=Co(Ya/2)}},Qa={point:function(e,t){Za>e&&(Za=e),e>Ka&&(Ka=e),Ga>t&&(Ga=t),t>Xa&&(Xa=t)},lineStart:N,lineEnd:N,polygonStart:N,polygonEnd:N},es={point:qt,lineStart:zt,lineEnd:Ht,polygonStart:function(){es.lineStart=Ut},polygonEnd:function(){es.point=qt,es.lineStart=zt,es.lineEnd=Ht}};vo.geo.path=function(){function e(e){return e&&("function"==typeof s&&o.pointRadius(+s.apply(this,arguments)),a&&a.valid||(a=i(o)),vo.geo.stream(e,a)),o.result()}function t(){return a=null,e}var n,r,i,o,a,s=4.5;return e.area=function(e){return $a=0,vo.geo.stream(e,i(Ja)),$a},e.centroid=function(e){return Pa=Ia=Ra=La=Fa=Ba=qa=za=Ha=0,vo.geo.stream(e,i(es)),Ha?[qa/Ha,za/Ha]:Ba?[La/Ba,Fa/Ba]:Ra?[Pa/Ra,Ia/Ra]:[NaN,NaN]},e.bounds=function(e){return Ka=Xa=-(Za=Ga=1/0),vo.geo.stream(e,i(Qa)),[[Za,Ga],[Ka,Xa]]},e.projection=function(e){return arguments.length?(i=(n=e)?e.stream||function(e){var t=Vt((function(t,n){return e([t*Xo,n*Xo])}));return function(e){return Kt(t(e))}}(e):_,t()):n},e.context=function(e){return arguments.length?(o=null==(r=e)?new Ft:new Wt(e),"function"!=typeof s&&o.pointRadius(s),t()):r},e.pointRadius=function(t){return arguments.length?(s="function"==typeof t?t:(o.pointRadius(+t),+t),e):s},e.projection(vo.geo.albersUsa()).context(null)},vo.geo.transform=function(e){return{stream:function(t){var n=new $t(t);for(var r in e)n[r]=e[r];return n}}},$t.prototype={point:function(e,t){this.stream.point(e,t)},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=Zt,vo.geo.projectionMutator=Gt,(vo.geo.equirectangular=function(){return Zt(Xt)}).raw=Xt.invert=Xt,vo.geo.rotation=function(e){function t(t){return(t=e(t[0]*Ko,t[1]*Ko))[0]*=Xo,t[1]*=Xo,t}return e=Qt(e[0]%360*Ko,e[1]*Ko,e.length>2?e[2]*Ko:0),t.invert=function(t){return(t=e.invert(t[0]*Ko,t[1]*Ko))[0]*=Xo,t[1]*=Xo,t},t},Jt.invert=Xt,vo.geo.circle=function(){function e(){var e="function"==typeof r?r.apply(this,arguments):r,t=Qt(-e[0]*Ko,-e[1]*Ko,0).invert,i=[];return n(null,null,1,{point:function(e,n){i.push(e=t(e,n)),e[0]*=Xo,e[1]*=Xo}}),{type:"Polygon",coordinates:[i]}}var t,n,r=[0,0],i=6;return e.origin=function(t){return arguments.length?(r=t,e):r},e.angle=function(r){return arguments.length?(n=rn((t=+r)*Ko,i*Ko),e):t},e.precision=function(r){return arguments.length?(n=rn(t*Ko,(i=+r)*Ko),e):i},e.angle(90)},vo.geo.distance=function(e,t){var n,r=(t[0]-e[0])*Ko,i=e[1]*Ko,o=t[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 e(){return{type:"MultiLineString",coordinates:t()}}function t(){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(e){return Co(e%g)>Wo})).map(c)).concat(vo.range(Math.ceil(s/m)*m,a,m).filter((function(e){return Co(e%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 e.lines=function(){return t().map((function(e){return{type:"LineString",coordinates:e}}))},e.outline=function(){return{type:"Polygon",coordinates:[h(o).concat(d(u).slice(1),h(i).reverse().slice(1),d(l).reverse().slice(1))]}},e.extent=function(t){return arguments.length?e.majorExtent(t).minorExtent(t):e.minorExtent()},e.majorExtent=function(t){return arguments.length?(o=+t[0][0],i=+t[1][0],l=+t[0][1],u=+t[1][1],o>i&&(t=o,o=i,i=t),l>u&&(t=l,l=u,u=t),e.precision(y)):[[o,l],[i,u]]},e.minorExtent=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],a=+t[1][1],r>n&&(t=r,r=n,n=t),s>a&&(t=s,s=a,a=t),e.precision(y)):[[r,s],[n,a]]},e.step=function(t){return arguments.length?e.majorStep(t).minorStep(t):e.minorStep()},e.majorStep=function(t){return arguments.length?(g=+t[0],v=+t[1],e):[g,v]},e.minorStep=function(t){return arguments.length?(p=+t[0],m=+t[1],e):[p,m]},e.precision=function(t){return arguments.length?(y=+t,c=an(s,a,90),f=sn(r,n,y),h=an(l,u,90),d=sn(o,i,y),e):y},e.majorExtent([[-180,-90+Wo],[180,90-Wo]]).minorExtent([[-180,-80-Wo],[180,80+Wo]])},vo.geo.greatArc=function(){function e(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),n||i.apply(this,arguments)]}}var t,n,r=un,i=ln;return e.distance=function(){return vo.geo.distance(t||r.apply(this,arguments),n||i.apply(this,arguments))},e.source=function(n){return arguments.length?(r=n,t="function"==typeof n?null:n,e):r},e.target=function(t){return arguments.length?(i=t,n="function"==typeof t?null:t,e):i},e.precision=function(){return arguments.length?e:0},e},vo.geo.interpolate=function(e,t){return function(e,t,n,r){var i=Math.cos(t),o=Math.sin(t),a=Math.cos(r),s=Math.sin(r),u=i*Math.cos(e),l=i*Math.sin(e),c=a*Math.cos(n),f=a*Math.sin(n),h=2*Math.asin(Math.sqrt(ae(r-t)+i*a*ae(n-e))),d=1/Math.sin(h),p=h?function(e){var t=Math.sin(e*=h)*d,n=Math.sin(h-e)*d,r=n*u+t*c,i=n*l+t*f,a=n*o+t*s;return[Math.atan2(i,r)*Xo,Math.atan2(a,Math.sqrt(r*r+i*i))*Xo]}:function(){return[e*Xo,t*Xo]};return p.distance=h,p}(e[0]*Ko,e[1]*Ko,t[0]*Ko,t[1]*Ko)},vo.geo.length=function(e){return ts=0,vo.geo.stream(e,ns),ts};var ts,ns={sphere:N,point:N,lineStart:function(){function e(e,i){var o=Math.sin(i*=Ko),a=Math.cos(i),s=Co((e*=Ko)-t),u=Math.cos(s);ts+=Math.atan2(Math.sqrt((s=a*Math.sin(s))*s+(s=r*o-n*a*u)*s),n*o+r*a*u),t=e,n=o,r=a}var t,n,r;ns.point=function(i,o){t=i*Ko,n=Math.sin(o*=Ko),r=Math.cos(o),ns.point=e},ns.lineEnd=function(){ns.point=ns.lineEnd=N}},lineEnd:N,polygonStart:N,polygonEnd:N},rs=cn((function(e){return Math.sqrt(2/(1+e))}),(function(e){return 2*Math.asin(e/2)}));(vo.geo.azimuthalEqualArea=function(){return Zt(rs)}).raw=rs;var is=cn((function(e){var t=Math.acos(e);return t&&t/Math.sin(t)}),_);(vo.geo.azimuthalEquidistant=function(){return Zt(is)}).raw=is,(vo.geo.conicConformal=function(){return It(fn)}).raw=fn,(vo.geo.conicEquidistant=function(){return It(hn)}).raw=hn;var os=cn((function(e){return 1/e}),Math.atan);(vo.geo.gnomonic=function(){return Zt(os)}).raw=os,dn.invert=function(e,t){return[e,2*Math.atan(Math.exp(t))-Go]},(vo.geo.mercator=function(){return pn(dn)}).raw=dn;var as=cn((function(){return 1}),Math.asin);(vo.geo.orthographic=function(){return Zt(as)}).raw=as;var ss=cn((function(e){return 1/(1+e)}),(function(e){return 2*Math.atan(e)}));(vo.geo.stereographic=function(){return Zt(ss)}).raw=ss,mn.invert=function(e,t){return[-t,2*Math.atan(Math.exp(e))-Go]},(vo.geo.transverseMercator=function(){var e=pn(mn),t=e.center,n=e.rotate;return e.center=function(e){return e?t([-e[1],e[0]]):[(e=t())[1],-e[0]]},e.rotate=function(e){return e?n([e[0],e[1],e.length>2?e[2]+90:90]):[(e=n())[0],e[1],e[2]-90]},n([0,0,90])}).raw=mn,vo.geom={},vo.geom.hull=function(e){function t(e){if(e.length<3)return[];var t,i=Ee(n),o=Ee(r),a=e.length,s=[],u=[];for(t=0;a>t;t++)s.push([+i.call(this,e[t],t),+o.call(this,e[t],t),t]);for(s.sort(bn),t=0;a>t;t++)u.push([s[t][0],-s[t][1]]);var l=yn(s),c=yn(u),f=c[0]===l[0],h=c[c.length-1]===l[l.length-1],d=[];for(t=l.length-1;t>=0;--t)d.push(e[s[l[t]][2]]);for(t=+f;t<c.length-h;++t)d.push(e[s[c[t]][2]]);return d}var n=gn,r=vn;return arguments.length?t(e):(t.x=function(e){return arguments.length?(n=e,t):n},t.y=function(e){return arguments.length?(r=e,t):r},t)},vo.geom.polygon=function(e){return Do(e,us),e};var us=vo.geom.polygon.prototype=[];us.area=function(){for(var e,t=-1,n=this.length,r=this[n-1],i=0;++t<n;)e=r,r=this[t],i+=e[1]*r[0]-e[0]*r[1];return.5*i},us.centroid=function(e){var t,n,r=-1,i=this.length,o=0,a=0,s=this[i-1];for(arguments.length||(e=-1/(6*this.area()));++r<i;)t=s,s=this[r],n=t[0]*s[1]-s[0]*t[1],o+=(t[0]+s[0])*n,a+=(t[1]+s[1])*n;return[o*e,a*e]},us.clip=function(e){for(var t,n,r,i,o,a,s=_n(e),u=-1,l=this.length-_n(this),c=this[l-1];++u<l;){for(t=e.slice(),e.length=0,i=this[u],o=t[(r=t.length-s)-1],n=-1;++n<r;)xn(a=t[n],c,i)?(xn(o,c,i)||e.push(wn(o,a,c,i)),e.push(a)):xn(o,c,i)&&e.push(wn(o,a,c,i)),o=a;s&&e.push(e[0]),c=i}return e};var ls,cs,fs,hs,ds,ps=[],ms=[];kn.prototype.prepare=function(){for(var e,t=this.edges,n=t.length;n--;)(e=t[n].edge).b&&e.a||t.splice(n,1);return t.sort(Tn),t.length},qn.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(e,t){var n,r,i;if(e){if(t.P=e,t.N=e.N,e.N&&(e.N.P=t),e.N=t,e.R){for(e=e.R;e.L;)e=e.L;e.L=t}else e.R=t;n=e}else this._?(e=Vn(this._),t.P=null,t.N=e,e.P=e.L=t,n=e):(t.P=t.N=null,this._=t,n=null);for(t.L=t.R=null,t.U=n,t.C=!0,e=t;n&&n.C;)n===(r=n.U).L?(i=r.R)&&i.C?(n.C=i.C=!1,r.C=!0,e=r):(e===n.R&&(Un(this,n),n=(e=n).U),n.C=!1,r.C=!0,Wn(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,e=r):(e===n.L&&(Wn(this,n),n=(e=n).U),n.C=!1,r.C=!0,Un(this,r)),n=e.U;this._.C=!1},remove:function(e){e.N&&(e.N.P=e.P),e.P&&(e.P.N=e.N),e.N=e.P=null;var t,n,r,i=e.U,o=e.L,a=e.R;if(n=o?a?Vn(a):o:a,i?i.L===e?i.L=n:i.R=n:this._=n,o&&a?(r=n.C,n.C=e.C,n.L=o,o.U=n,n!==a?(i=n.U,n.U=e.U,e=n.R,i.L=e,n.R=a,a.U=n):(n.U=i,i=n,e=n.R)):(r=e.C,e=n),e&&(e.U=i),!r){if(e&&e.C)return void(e.C=!1);do{if(e===this._)break;if(e===i.L){if((t=i.R).C&&(t.C=!1,i.C=!0,Un(this,i),t=i.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,Wn(this,t),t=i.R),t.C=i.C,i.C=t.R.C=!1,Un(this,i),e=this._;break}}else if((t=i.L).C&&(t.C=!1,i.C=!0,Wn(this,i),t=i.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,Un(this,t),t=i.L),t.C=i.C,i.C=t.L.C=!1,Wn(this,i),e=this._;break}t.C=!0,e=i,i=i.U}while(!e.C);e&&(e.C=!1)}}},vo.geom.voronoi=function(e){function t(e){var t=new Array(e.length),r=s[0][0],i=s[0][1],o=s[1][0],a=s[1][1];return $n(n(e),s).cells.forEach((function(n,s){var u=n.edges,l=n.site,c=t[s]=u.length?u.map((function(e){var t=e.start();return[t.x,t.y]})):l.x>=r&&l.x<=o&&l.y>=i&&l.y<=a?[[r,a],[o,a],[o,i],[r,i]]:[];c.point=e[s]})),t}function n(e){return e.map((function(e,t){return{x:Math.round(o(e,t)/Wo)*Wo,y:Math.round(a(e,t)/Wo)*Wo,i:t}}))}var r=gn,i=vn,o=r,a=i,s=gs;return e?t(e):(t.links=function(e){return $n(n(e)).edges.filter((function(e){return e.l&&e.r})).map((function(t){return{source:e[t.l.i],target:e[t.r.i]}}))},t.triangles=function(e){var t=[];return $n(n(e)).cells.forEach((function(n,r){for(var i,o=n.site,a=n.edges.sort(Tn),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&&t.push([e[r],e[i.i],e[c.i]])})),t},t.x=function(e){return arguments.length?(o=Ee(r=e),t):r},t.y=function(e){return arguments.length?(a=Ee(i=e),t):i},t.clipExtent=function(e){return arguments.length?(s=null==e?gs:e,t):s===gs?null:s},t.size=function(e){return arguments.length?t.clipExtent(e&&[[0,0],e]):s===gs?null:s&&s[1]},t)};var gs=[[-1e6,-1e6],[1e6,1e6]];vo.geom.delaunay=function(e){return vo.geom.voronoi().triangles(e)},vo.geom.quadtree=function(e,t,n,r,i){function o(e){function o(e,t,n,r,i,o,a,s){if(!isNaN(n)&&!isNaN(r))if(e.leaf){var u=e.x,c=e.y;if(null!=u)if(Co(u-n)+Co(c-r)<.01)l(e,t,n,r,i,o,a,s);else{var f=e.point;e.x=e.y=e.point=null,l(e,f,u,c,i,o,a,s),l(e,t,n,r,i,o,a,s)}else e.x=n,e.y=r,e.point=t}else l(e,t,n,r,i,o,a,s)}function l(e,t,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;e.leaf=!1,f?i=l:s=l,h?a=c:u=c,o(e=e.nodes[d]||(e.nodes[d]={leaf:!0,nodes:[],point:null,x:null,y:null}),t,n,r,i,a,s,u)}var c,f,h,d,p,m,g,v,y,b=Ee(s),x=Ee(u);if(null!=t)m=t,g=n,v=r,y=i;else if(v=y=-(m=g=1/0),f=[],h=[],p=e.length,a)for(d=0;p>d;++d)(c=e[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=e[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(e){o(N,e,+b(e,++d),+x(e,d),m,g,v,y)}};if(N.visit=function(e){Xn(e,N,m,g,v,y)},N.find=function(e){return function(e,t,n,r,i,o,a){var s,u=1/0;return function e(l,c,f,h,d){if(!(c>o||f>a||r>h||i>d)){if(p=l.point){var p,m=t-l.x,g=n-l.y,v=m*m+g*g;if(u>v){var y=Math.sqrt(u=v);r=t-y,i=n-y,o=t+y,a=n+y,s=p}}for(var b=l.nodes,x=.5*(c+h),w=.5*(f+d),_=(n>=w)<<1|t>=x,S=_+4;S>_;++_)if(l=b[3&_])switch(3&_){case 0:e(l,c,f,x,w);break;case 1:e(l,x,f,h,w);break;case 2:e(l,c,w,x,d);break;case 3:e(l,x,w,h,d)}}}(e,r,i,o,a),s}(N,e[0],e[1],m,g,v,y)},d=-1,null==t){for(;++d<p;)o(N,e[d],f[d],h[d],m,g,v,y);--d}else e.forEach(N.add);return f=h=e=c=null,N}var a,s=gn,u=vn;return(a=arguments.length)?(s=Gn,u=Kn,3===a&&(i=n,r=t,n=t=0),o(e)):(o.x=function(e){return arguments.length?(s=e,o):s},o.y=function(e){return arguments.length?(u=e,o):u},o.extent=function(e){return arguments.length?(null==e?t=n=r=i=null:(t=+e[0][0],n=+e[0][1],r=+e[1][0],i=+e[1][1]),o):null==t?null:[[t,n],[r,i]]},o.size=function(e){return arguments.length?(null==e?t=n=r=i=null:(t=n=0,r=+e[0],i=+e[1]),o):null==t?null:[r-t,i-n]},o)},vo.interpolateRgb=Jn,vo.interpolateObject=Qn,vo.interpolateNumber=er,vo.interpolateString=tr;var vs=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ys=new RegExp(vs.source,"g");vo.interpolate=nr,vo.interpolators=[function(e,t){var n=typeof t;return("string"===n?ca.has(t.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(t)?Jn:tr:t instanceof se?Jn:Array.isArray(t)?rr:"object"===n&&isNaN(t)?Qn:er)(e,t)}],vo.interpolateArray=rr;var bs=function(){return _},xs=vo.map({linear:bs,poly:function(e){return function(t){return Math.pow(t,e)}},quad:function(){return ar},cubic:function(){return sr},sin:function(){return lr},exp:function(){return cr},circle:function(){return fr},elastic:function(e,t){var n;return arguments.length<2&&(t=.45),arguments.length?n=t/Yo*Math.asin(1/e):(e=1,n=t/4),function(r){return 1+e*Math.pow(2,-10*r)*Math.sin((r-n)*Yo/t)}},back:function(e){return e||(e=1.70158),function(t){return t*t*((e+1)*t-e)}},bounce:function(){return hr}}),ws=vo.map({in:_,out:ir,"in-out":or,"out-in":function(e){return or(ir(e))}});vo.ease=function(e){var t=e.indexOf("-"),n=t>=0?e.slice(0,t):e,r=t>=0?e.slice(t+1):"in";return n=xs.get(n)||bs,function(e){return function(t){return 0>=t?0:t>=1?1:e(t)}}((r=ws.get(r)||_)(n.apply(null,yo.call(arguments,1))))},vo.interpolateHcl=function(e,t){e=vo.hcl(e),t=vo.hcl(t);var n=e.h,r=e.c,i=e.l,o=t.h-n,a=t.c-r,s=t.l-i;return isNaN(a)&&(a=0,r=isNaN(r)?t.c:r),isNaN(o)?(o=0,n=isNaN(n)?t.h:n):o>180?o-=360:-180>o&&(o+=360),function(e){return fe(n+o*e,r+a*e,i+s*e)+""}},vo.interpolateHsl=function(e,t){e=vo.hsl(e),t=vo.hsl(t);var n=e.h,r=e.s,i=e.l,o=t.h-n,a=t.s-r,s=t.l-i;return isNaN(a)&&(a=0,r=isNaN(r)?t.s:r),isNaN(o)?(o=0,n=isNaN(n)?t.h:n):o>180?o-=360:-180>o&&(o+=360),function(e){return le(n+o*e,r+a*e,i+s*e)+""}},vo.interpolateLab=function(e,t){e=vo.lab(e),t=vo.lab(t);var n=e.l,r=e.a,i=e.b,o=t.l-n,a=t.a-r,s=t.b-i;return function(e){return de(n+o*e,r+a*e,i+s*e)+""}},vo.interpolateRound=dr,vo.transform=function(e){var t=xo.createElementNS(vo.ns.prefix.svg,"g");return(vo.transform=function(e){if(null!=e){t.setAttribute("transform",e);var n=t.transform.baseVal.consolidate()}return new pr(n?n.matrix:_s)})(e)},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(e){for(var t=[],n=-1,r=e.length;++n<r;)t.push(wr(e[n]));return t}},vo.layout.chord=function(){function e(){var e,l,f,h,d,p={},m=[],g=vo.range(o),v=[];for(n=[],r=[],e=0,h=-1;++h<o;){for(l=0,d=-1;++d<o;)l+=i[h][d];m.push(l),v.push(vo.range(o)),e+=l}for(a&&g.sort((function(e,t){return a(m[e],m[t])})),s&&v.forEach((function(e,t){e.sort((function(e,n){return s(i[t][e],i[t][n])}))})),e=(Yo-c*o)/e,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*e;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&&t()}function t(){n.sort((function(e,t){return u((e.source.value+e.target.value)/2,(t.source.value+t.target.value)/2)}))}var n,r,i,o,a,s,u,l={},c=0;return l.matrix=function(e){return arguments.length?(o=(i=e)&&i.length,n=r=null,l):i},l.padding=function(e){return arguments.length?(c=e,n=r=null,l):c},l.sortGroups=function(e){return arguments.length?(a=e,n=r=null,l):a},l.sortSubgroups=function(e){return arguments.length?(s=e,n=null,l):s},l.sortChords=function(e){return arguments.length?(u=e,n&&t(),l):u},l.chords=function(){return n||e(),n},l.groups=function(){return r||e(),r},l},vo.layout.force=function(){function e(e){return function(t,n,r,i){if(t.point!==e){var o=t.cx-e.x,a=t.cy-e.y,s=i-n,u=o*o+a*a;if(u>s*s/v){if(m>u){var l=t.charge/u;e.px-=o*l,e.py-=a*l}return!0}t.point&&u&&m>u&&(l=t.pointCharge/u,e.px-=o*l,e.py-=a*l)}return!t.charge}}function t(e){e.px=vo.event.x,e.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 t,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(Cr(t=vo.geom.quadtree(y),i,s),r=-1;++r<_;)(u=y[r]).fixed||t.visit(e(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(e){return arguments.length?(y=e,u):y},u.links=function(e){return arguments.length?(b=e,u):b},u.size=function(e){return arguments.length?(c=e,u):c},u.linkDistance=function(e){return arguments.length?(h="function"==typeof e?e:+e,u):h},u.distance=u.linkDistance,u.linkStrength=function(e){return arguments.length?(d="function"==typeof e?e:+e,u):d},u.friction=function(e){return arguments.length?(f=+e,u):f},u.charge=function(e){return arguments.length?(p="function"==typeof e?e:+e,u):p},u.chargeDistance=function(e){return arguments.length?(m=e*e,u):Math.sqrt(m)},u.gravity=function(e){return arguments.length?(g=+e,u):g},u.theta=function(e){return arguments.length?(v=e*e,u):Math.sqrt(v)},u.alpha=function(e){return arguments.length?(e=+e,i?e>0?i=e:(n.c=null,n.t=NaN,n=null,l.end({type:"end",alpha:i=0})):e>0&&(l.start({type:"start",alpha:i=e}),n=Me(u.tick)),u):i},u.start=function(){function e(e,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[t],u=-1,c=s.length;++u<c;)if(!isNaN(a=s[u][e]))return a;return Math.random()*r}var t,n,r,i=y.length,l=b.length,f=c[0],m=c[1];for(t=0;i>t;++t)(r=y[t]).index=t,r.weight=0;for(t=0;l>t;++t)"number"==typeof(r=b[t]).source&&(r.source=y[r.source]),"number"==typeof r.target&&(r.target=y[r.target]),++r.source.weight,++r.target.weight;for(t=0;i>t;++t)r=y[t],isNaN(r.x)&&(r.x=e("x",f)),isNaN(r.y)&&(r.y=e("y",m)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(o=[],"function"==typeof h)for(t=0;l>t;++t)o[t]=+h.call(this,b[t],t);else for(t=0;l>t;++t)o[t]=h;if(a=[],"function"==typeof d)for(t=0;l>t;++t)a[t]=+d.call(this,b[t],t);else for(t=0;l>t;++t)a[t]=d;if(s=[],"function"==typeof p)for(t=0;i>t;++t)s[t]=+p.call(this,y[t],t);else for(t=0;i>t;++t)s[t]=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",t).on("dragend.force",Or)),arguments.length?void this.on("mouseover.force",Nr).on("mouseout.force",Er).call(r):r},vo.rebind(u,l,"on")};var Ss=20,Os=1,Ns=1/0;vo.layout.hierarchy=function(){function e(i){var o,a=[i],s=[];for(i.depth=0;null!=(o=a.pop());)if(s.push(o),(l=n.call(e,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(e,o,o.depth)||0),delete o.children;return kr(i,(function(e){var n,i;t&&(n=e.children)&&n.sort(t),r&&(i=e.parent)&&(i.value+=e.value)})),s}var t=jr,n=Tr,r=Dr;return e.sort=function(n){return arguments.length?(t=n,e):t},e.children=function(t){return arguments.length?(n=t,e):n},e.value=function(t){return arguments.length?(r=t,e):r},e.revalue=function(t){return r&&(Mr(t,(function(e){e.children&&(e.value=0)})),kr(t,(function(t){var n;t.children||(t.value=+r.call(e,t,t.depth)||0),(n=t.parent)&&(n.value+=t.value)}))),t},e},vo.layout.partition=function(){function e(t,n,r,i){var o=t.children;if(t.x=n,t.y=t.depth*i,t.dx=r,t.dy=i,o&&(a=o.length)){var a,s,u,l=-1;for(r=t.value?r/t.value:0;++l<a;)e(s=o[l],n,u=s.value*r,i),n+=u}}function t(e){var n=e.children,r=0;if(n&&(i=n.length))for(var i,o=-1;++o<i;)r=Math.max(r,t(n[o]));return 1+r}function n(n,o){var a=r.call(this,n,o);return e(a[0],0,i[0],i[1]/t(a[0])),a}var r=vo.layout.hierarchy(),i=[1,1];return n.size=function(e){return arguments.length?(i=e,n):i},Ar(n,r)},vo.layout.pie=function(){function e(a){var s,u=a.length,l=a.map((function(n,r){return+t.call(e,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===Es?function(e,t){return l[t]-l[e]}:function(e,t){return n(a[e],a[t])}),g.forEach((function(e){v[e]={data:a[e],value:s=l[e],startAngle:c,endAngle:c+=s*m+d,padAngle:h}})),v}var t=Number,n=Es,r=0,i=Yo,o=0;return e.value=function(n){return arguments.length?(t=n,e):t},e.sort=function(t){return arguments.length?(n=t,e):n},e.startAngle=function(t){return arguments.length?(r=t,e):r},e.endAngle=function(t){return arguments.length?(i=t,e):i},e.padAngle=function(t){return arguments.length?(o=t,e):o},e};var Es={};vo.layout.stack=function(){function e(s,u){if(!(h=s.length))return s;var l=s.map((function(n,r){return t.call(e,n,r)})),c=l.map((function(t){return t.map((function(t,n){return[o.call(e,t,n),a.call(e,t,n)]}))})),f=n.call(e,c,u);l=vo.permute(l,f),c=vo.permute(c,f);var h,d,p,m,g=r.call(e,c,u),v=l[0].length;for(p=0;v>p;++p)for(i.call(e,l[0][p],m=g[p],c[0][p][1]),d=1;h>d;++d)i.call(e,l[d][p],m+=c[d-1][p][1],c[d][p][1]);return s}var t=_,n=Fr,r=Br,i=Lr,o=Ir,a=Rr;return e.values=function(n){return arguments.length?(t=n,e):t},e.order=function(t){return arguments.length?(n="function"==typeof t?t:Cs.get(t)||Fr,e):n},e.offset=function(t){return arguments.length?(r="function"==typeof t?t:As.get(t)||Br,e):r},e.x=function(t){return arguments.length?(o=t,e):o},e.y=function(t){return arguments.length?(a=t,e):a},e.out=function(t){return arguments.length?(i=t,e):i},e};var Cs=vo.map({"inside-out":function(e){var t,n,r=e.length,i=e.map(qr),o=e.map(zr),a=vo.range(r).sort((function(e,t){return i[e]-i[t]})),s=0,u=0,l=[],c=[];for(t=0;r>t;++t)n=a[t],u>s?(s+=o[n],l.push(n)):(u+=o[n],c.push(n));return c.reverse().concat(l)},reverse:function(e){return vo.range(e.length).reverse()},default:Fr}),As=vo.map({silhouette:function(e){var t,n,r,i=e.length,o=e[0].length,a=[],s=0,u=[];for(n=0;o>n;++n){for(t=0,r=0;i>t;t++)r+=e[t][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(e){var t,n,r,i,o,a,s,u,l,c=e.length,f=e[0],h=f.length,d=[];for(d[0]=u=l=0,n=1;h>n;++n){for(t=0,i=0;c>t;++t)i+=e[t][n][1];for(t=0,o=0,s=f[n][0]-f[n-1][0];c>t;++t){for(r=0,a=(e[t][n][1]-e[t][n-1][1])/(2*s);t>r;++r)a+=(e[r][n][1]-e[r][n-1][1])/s;o+=a*e[t][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(e){var t,n,r,i=e.length,o=e[0].length,a=1/i,s=[];for(n=0;o>n;++n){for(t=0,r=0;i>t;t++)r+=e[t][n][1];if(r)for(t=0;i>t;t++)e[t][n][1]/=r;else for(t=0;i>t;t++)e[t][n][1]=a}for(n=0;o>n;++n)s[n]=0;return s},zero:Br});vo.layout.histogram=function(){function e(e,o){for(var a,s,u=[],l=e.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=t?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(e[o]));return u}var t=!0,n=Number,r=Vr,i=Ur;return e.value=function(t){return arguments.length?(n=t,e):n},e.range=function(t){return arguments.length?(r=Ee(t),e):r},e.bins=function(t){return arguments.length?(i="number"==typeof t?function(e){return Wr(e,t)}:Ee(t),e):i},e.frequency=function(n){return arguments.length?(t=!!n,e):t},e},vo.layout.pack=function(){function e(e,o){var a=n.call(this,e,o),s=a[0],u=i[0],l=i[1],c=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(s.x=s.y=0,kr(s,(function(e){e.r=+c(e.value)})),kr(s,Kr),r){var f=r*(t?1:Math.max(2*s.r/u,2*s.r/l))/2;kr(s,(function(e){e.r+=f})),kr(s,Kr),kr(s,(function(e){e.r-=f}))}return Qr(s,u/2,l/2,t?1:1/Math.max(2*s.r/u,2*s.r/l)),a}var t,n=vo.layout.hierarchy().sort($r),r=0,i=[1,1];return e.size=function(t){return arguments.length?(i=t,e):i},e.radius=function(n){return arguments.length?(t=null==n||"function"==typeof n?n:+n,e):t},e.padding=function(t){return arguments.length?(r=+t,e):r},Ar(e,n)},vo.layout.tree=function(){function e(e,u){var l=i.call(this,e,u),c=l[0],f=function(e){for(var t,n={A:null,children:[e]},r=[n];null!=(t=r.pop());)for(var i,o=t.children,a=0,s=o.length;s>a;++a)r.push((o[a]=i={_:o[a],parent:t,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(kr(f,t),f.parent.m=-f.z,Mr(f,n),s)Mr(c,r);else{var h=c,d=c,p=c;Mr(c,(function(e){e.x<h.x&&(h=e),e.x>d.x&&(d=e),e.depth>p.depth&&(p=e)}));var m=o(h,d)/2-h.x,g=a[0]/(d.x+o(d,h)/2+m),v=a[1]/(p.depth||1);Mr(c,(function(e){e.x=(e.x+m)*g,e.y=e.depth*v}))}return l}function t(e){var t=e.children,n=e.parent.children,r=e.i?n[e.i-1]:null;if(t.length){!function(e){for(var t,n=0,r=0,i=e.children,o=i.length;--o>=0;)(t=i[o]).z+=n,t.m+=n,n+=t.s+(r+=t.c)}(e);var i=(t[0].z+t[t.length-1].z)/2;r?(e.z=r.z+o(e._,r._),e.m=e.z-i):e.z=i}else r&&(e.z=r.z+o(e._,r._));e.parent.A=function(e,t,n){if(t){for(var r,i=e,a=e,s=t,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=e,(r=s.z+f-i.z-l+o(s._,i._))>0&&(ii(oi(s,e,n),e,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=e)}return n}(e,r,e.parent.A||n[0])}function n(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function r(e){e.x*=a[0],e.y=e.depth*a[1]}var i=vo.layout.hierarchy().sort(null).value(null),o=ti,a=[1,1],s=null;return e.separation=function(t){return arguments.length?(o=t,e):o},e.size=function(t){return arguments.length?(s=null==(a=t)?r:null,e):s?null:a},e.nodeSize=function(t){return arguments.length?(s=null==(a=t)?null:r,e):s?a:null},Ar(e,i)},vo.layout.cluster=function(){function e(e,o){var a,s=t.call(this,e,o),u=s[0],l=0;kr(u,(function(e){var t=e.children;t&&t.length?(e.x=function(e){return e.reduce((function(e,t){return e+t.x}),0)/e.length}(t),e.y=function(e){return 1+vo.max(e,(function(e){return e.y}))}(t)):(e.x=a?l+=n(e,a):0,e.y=0,a=e)}));var c=ai(u),f=si(u),h=c.x-n(c,f)/2,d=f.x+n(f,c)/2;return kr(u,i?function(e){e.x=(e.x-u.x)*r[0],e.y=(u.y-e.y)*r[1]}:function(e){e.x=(e.x-h)/(d-h)*r[0],e.y=(1-(u.y?e.y/u.y:1))*r[1]}),s}var t=vo.layout.hierarchy().sort(null).value(null),n=ti,r=[1,1],i=!1;return e.separation=function(t){return arguments.length?(n=t,e):n},e.size=function(t){return arguments.length?(i=null==(r=t),e):i?null:r},e.nodeSize=function(t){return arguments.length?(i=null!=(r=t),e):i?r:null},Ar(e,t)},vo.layout.treemap=function(){function e(e,t){for(var n,r,i=-1,o=e.length;++i<o;)r=(n=e[i]).value*(0>t?0:t),n.area=isNaN(r)||0>=r?0:r}function t(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(e(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(t)}}function n(t){var r=t.children;if(r&&r.length){var o,a=f(t),s=r.slice(),u=[];for(e(s,a.dx*a.dy/t.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(e,t){for(var n,r=e.area,i=0,o=1/0,a=-1,s=e.length;++a<s;)(n=e[a].area)&&(o>n&&(o=n),n>i&&(i=n));return t*=t,(r*=r)?Math.max(t*i*p/r,r/(t*o*p)):1/0}function i(e,t,n,r){var i,o=-1,a=e.length,s=n.x,l=n.y,c=t?u(e.area/t):0;if(t==n.dx){for((r||c>n.dy)&&(c=n.dy);++o<a;)(i=e[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=e[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),e([o],o.dx*o.dy/o.value),(a?n:t)(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(e){return arguments.length?(l=e,o):l},o.padding=function(e){function t(t){return li(t,e)}return arguments.length?(f=null==(c=e)?ui:"function"==(n=typeof e)?function(t){var n=e.call(o,t,t.depth);return null==n?ui(t):li(t,"number"==typeof n?[n,n,n,n]:n)}:"number"===n?(e=[e,e,e,e],t):t,o):c;var n},o.round=function(e){return arguments.length?(u=e?Math.round:Number,o):u!=Number},o.sticky=function(e){return arguments.length?(h=e,a=null,o):h},o.ratio=function(e){return arguments.length?(p=e,o):p},o.mode=function(e){return arguments.length?(d=e+"",o):d},Ar(o,s)},vo.random={normal:function(e,t){var n=arguments.length;return 2>n&&(t=1),1>n&&(e=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 e+t*n*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var e=vo.random.normal.apply(vo,arguments);return function(){return Math.exp(e())}},bates:function(e){var t=vo.random.irwinHall(e);return function(){return t()/e}},irwinHall:function(e){return function(){for(var t=0,n=0;e>n;n++)t+=Math.random();return t}}},vo.scale={};var Ms={floor:_,ceil:_};vo.scale.linear=function(){return gi([0,1],[0,1],nr,!1)};var ks={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 Ts=vo.format(".0e"),Ds={floor:function(e){return-Math.ceil(-e)},ceil:function(e){return-Math.floor(-e)}};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 Ei([],{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(be),Ps=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(be),Is=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(be),Rs=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(be);vo.scale.quantile=function(){return Ci([],[])},vo.scale.quantize=function(){return Ai(0,1,[0,1])},vo.scale.threshold=function(){return Mi([.5],[0,1])},vo.scale.identity=function(){return ki([0,1])},vo.svg={},vo.svg.arc=function(){function e(){var e=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(e>l&&(p=l,l=e,e=p),h>=Zo)return t(l,d)+(e?t(e,1-d):"")+"Z";var p,m,g,v,y,b,x,w,_,S,O,N,E=0,C=0,A=[];if((v=(+u.apply(this,arguments)||0)/2)&&(g=o===Ls?Math.sqrt(e*e+l*l):+o.apply(this,arguments),d||(C*=-1),l&&(C=ie(g/l*Math.sin(v))),e&&(E=ie(g/e*Math.sin(v)))),l){y=l*Math.cos(c+C),b=l*Math.sin(c+C),x=l*Math.cos(f-C),w=l*Math.sin(f-C);var M=Math.abs(f-c-2*C)<=$o?0:1;if(C&&Li(y,b,x,w)===d^M){var k=(c+f)/2;y=l*Math.cos(k),b=l*Math.sin(k),x=w=null}}else y=b=0;if(e){_=e*Math.cos(f-E),S=e*Math.sin(f-E),O=e*Math.cos(c+E),N=e*Math.sin(c+E);var T=Math.abs(c-f+2*E)<=$o?0:1;if(E&&Li(_,S,O,N)===1-d^T){var D=(c+f)/2;_=e*Math.cos(D),S=e*Math.sin(D),O=N=null}}else _=S=0;if(h>Wo&&(p=Math.min(Math.abs(l-e)/2,+i.apply(this,arguments)))>.001){m=l>e^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],B=w-I[1],q=1/Math.sin(Math.acos((R*F+L*B)/(Math.sqrt(R*R+L*L)*Math.sqrt(F*F+B*B)))/2),z=Math.sqrt(I[0]*I[0]+I[1]*I[1]);P=Math.min(p,(e-z)/(q-1)),j=Math.min(p,(l-z)/(q+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?A.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]):A.push("M",H[0],"A",j,",",j," 0 1,",m," ",U[0])}else A.push("M",y,",",b);if(null!=O){var W=Fi([y,b],[O,N],e,-P,d),V=Fi([_,S],null==x?[y,b]:[x,w],e,-P,d);p===P?A.push("L",V[0],"A",P,",",P," 0 0,",m," ",V[1],"A",e,",",e," 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]):A.push("L",V[0],"A",P,",",P," 0 0,",m," ",W[0])}else A.push("L",_,",",S)}else A.push("M",y,",",b),null!=x&&A.push("A",l,",",l," 0 ",M,",",d," ",x,",",w),A.push("L",_,",",S),null!=O&&A.push("A",e,",",e," 0 ",T,",",1-d," ",O,",",N);return A.push("Z"),A.join("")}function t(e,t){return"M0,"+e+"A"+e+","+e+" 0 1,"+t+" 0,"+-e+"A"+e+","+e+" 0 1,"+t+" 0,"+e}var n=Di,r=ji,i=Ti,o=Ls,a=Pi,s=Ii,u=Ri;return e.innerRadius=function(t){return arguments.length?(n=Ee(t),e):n},e.outerRadius=function(t){return arguments.length?(r=Ee(t),e):r},e.cornerRadius=function(t){return arguments.length?(i=Ee(t),e):i},e.padRadius=function(t){return arguments.length?(o=t==Ls?Ls:Ee(t),e):o},e.startAngle=function(t){return arguments.length?(a=Ee(t),e):a},e.endAngle=function(t){return arguments.length?(s=Ee(t),e):s},e.padAngle=function(t){return arguments.length?(u=Ee(t),e):u},e.centroid=function(){var e=(+n.apply(this,arguments)+ +r.apply(this,arguments))/2,t=(+a.apply(this,arguments)+ +s.apply(this,arguments))/2-Go;return[Math.cos(t)*e,Math.sin(t)*e]},e};var Ls="auto";vo.svg.line=function(){return Bi(_)};var Fs=vo.map({linear:qi,"linear-closed":zi,step:function(e){for(var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];++t<n;)i.push("H",(r[0]+(r=e[t])[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(e){if(e.length<4)return qi(e);for(var t,n=[],r=-1,i=e.length,o=[0],a=[0];++r<3;)t=e[r],o.push(t[0]),a.push(t[1]);for(n.push(Yi(zs,o)+","+Yi(zs,a)),--r;++r<i;)t=e[r],o.shift(),o.push(t[0]),a.shift(),a.push(t[1]),Zi(n,o,a);return n.join("")},"basis-closed":function(e){for(var t,n,r=-1,i=e.length,o=i+4,a=[],s=[];++r<4;)n=e[r%i],a.push(n[0]),s.push(n[1]);for(t=[Yi(zs,a),",",Yi(zs,s)],--r;++r<o;)n=e[r%i],a.shift(),a.push(n[0]),s.shift(),s.push(n[1]),Zi(t,a,s);return t.join("")},bundle:function(e,t){var n=e.length-1;if(n)for(var r,i,o=e[0][0],a=e[0][1],s=e[n][0]-o,u=e[n][1]-a,l=-1;++l<=n;)i=l/n,(r=e[l])[0]=t*r[0]+(1-t)*(o+i*s),r[1]=t*r[1]+(1-t)*(a+i*u);return $i(e)},cardinal:function(e,t){return e.length<3?qi(e):e[0]+Wi(e,Vi(e,t))},"cardinal-open":function(e,t){return e.length<4?qi(e):e[1]+Wi(e.slice(1,-1),Vi(e,t))},"cardinal-closed":function(e,t){return e.length<3?zi(e):e[0]+Wi((e.push(e[0]),e),Vi([e[e.length-2]].concat(e,[e[1]]),t))},monotone:function(e){return e.length<3?qi(e):e[0]+Wi(e,function(e){for(var t,n,r,i,o=[],a=function(e){for(var t=0,n=e.length-1,r=[],i=e[0],o=e[1],a=r[0]=Gi(i,o);++t<n;)r[t]=(a+(a=Gi(i=o,o=e[t+1])))/2;return r[t]=a,r}(e),s=-1,u=e.length-1;++s<u;)t=Gi(e[s],e[s+1]),Co(t)<Wo?a[s]=a[s+1]=0:(i=(n=a[s]/t)*n+(r=a[s+1]/t)*r)>9&&(i=3*t/Math.sqrt(i),a[s]=i*n,a[s+1]=i*r);for(s=-1;++s<=u;)i=(e[Math.min(u,s+1)][0]-e[Math.max(0,s-1)][0])/(6*(1+a[s]*a[s])),o.push([i||0,a[s]*i||0]);return o}(e))}});Fs.forEach((function(e,t){t.key=e,t.closed=/-closed$/.test(e)}));var Bs=[0,2/3,1/3,0],qs=[0,1/3,2/3,0],zs=[0,1/6,2/3,1/6];vo.svg.line.radial=function(){var e=Bi(Ki);return e.radius=e.x,delete e.x,e.angle=e.y,delete e.y,e},Hi.reverse=Ui,Ui.reverse=Hi,vo.svg.area=function(){return Xi(_)},vo.svg.area.radial=function(){var e=Xi(Ki);return e.radius=e.x,delete e.x,e.innerRadius=e.x0,delete e.x0,e.outerRadius=e.x1,delete e.x1,e.angle=e.y,delete e.y,e.startAngle=e.y0,delete e.y0,e.endAngle=e.y1,delete e.y1,e},vo.svg.chord=function(){function e(e,a){var s=t(this,i,e,a),u=t(this,o,e,a);return"M"+s.p0+n(s.r,s.p1,s.a1-s.a0)+(function(e,t){return e.a0==t.a0&&e.a1==t.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 t(e,t,n,r){var i=t.call(e,n,r),o=a.call(e,i,r),l=s.call(e,i,r)-Go,c=u.call(e,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(e,t,n){return"A"+e+","+e+" 0 "+ +(n>$o)+",1 "+t}function r(e,t,n,r){return"Q 0,0 "+r}var i=un,o=ln,a=Ji,s=Pi,u=Ii;return e.radius=function(t){return arguments.length?(a=Ee(t),e):a},e.source=function(t){return arguments.length?(i=Ee(t),e):i},e.target=function(t){return arguments.length?(o=Ee(t),e):o},e.startAngle=function(t){return arguments.length?(s=Ee(t),e):s},e.endAngle=function(t){return arguments.length?(u=Ee(t),e):u},e},vo.svg.diagonal=function(){function e(e,i){var o=t.call(this,e,i),a=n.call(this,e,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 t=un,n=ln,r=Qi;return e.source=function(n){return arguments.length?(t=Ee(n),e):t},e.target=function(t){return arguments.length?(n=Ee(t),e):n},e.projection=function(t){return arguments.length?(r=t,e):r},e},vo.svg.diagonal.radial=function(){var e=vo.svg.diagonal(),t=Qi,n=e.projection;return e.projection=function(e){return arguments.length?n(function(e){return function(){var t=e.apply(this,arguments),n=t[0],r=t[1]-Go;return[n*Math.cos(r),n*Math.sin(r)]}}(t=e)):t},e},vo.svg.symbol=function(){function e(e,r){return(Hs.get(t.call(this,e,r))||no)(n.call(this,e,r))}var t=to,n=eo;return e.type=function(n){return arguments.length?(t=Ee(n),e):t},e.size=function(t){return arguments.length?(n=Ee(t),e):n},e};var Hs=vo.map({circle:no,cross:function(e){var t=Math.sqrt(e/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(e){var t=Math.sqrt(e/(2*Ws)),n=t*Ws;return"M0,"+-t+"L"+n+",0 0,"+t+" "+-n+",0Z"},square:function(e){var t=Math.sqrt(e)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(e){var t=Math.sqrt(e/Us),n=t*Us/2;return"M0,"+n+"L"+t+","+-n+" "+-t+","+-n+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/Us),n=t*Us/2;return"M0,"+-n+"L"+t+","+n+" "+-t+","+n+"Z"}});vo.svg.symbolTypes=Hs.keys();var Us=Math.sqrt(3),Ws=Math.tan(30*Ko);Ro.transition=function(e){for(var t,n,r=Vs||++Gs,i=so(e),o=[],a=$s||{time:Date.now(),ease:ur,delay:0,duration:250},s=-1,u=this.length;++s<u;){o.push(t=[]);for(var l=this[s],c=-1,f=l.length;++c<f;)(n=l[c])&&uo(n,c,i,r,a),t.push(n)}return io(o,i,r)},Ro.interrupt=function(e){return this.each(null==e?Ys:ro(so(e)))};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(e,t){return e&&e.transition?Vs?e.transition(t):e:vo.selection().transition(e)},vo.transition.prototype=Zs,Zs.select=function(e){var t,n,r,i=this.id,o=this.namespace,a=[];e=D(e);for(var s=-1,u=this.length;++s<u;){a.push(t=[]);for(var l=this[s],c=-1,f=l.length;++c<f;)(r=l[c])&&(n=e.call(r,r.__data__,c,s))?("__data__"in r&&(n.__data__=r.__data__),uo(n,c,o,i,r[o][i]),t.push(n)):t.push(null)}return io(a,o,i)},Zs.selectAll=function(e){var t,n,r,i,o,a=this.id,s=this.namespace,u=[];e=j(e);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=e.call(r,r.__data__,h,l),u.push(t=[]);for(var p=-1,m=n.length;++p<m;)(i=n[p])&&uo(i,p,s,a,o),t.push(i)}return io(u,s,a)},Zs.filter=function(e){var t,n,r=[];"function"!=typeof e&&(e=V(e));for(var i=0,o=this.length;o>i;i++){r.push(t=[]);for(var a,s=0,u=(a=this[i]).length;u>s;s++)(n=a[s])&&e.call(n,n.__data__,s,i)&&t.push(n)}return io(r,this.namespace,this.id)},Zs.tween=function(e,t){var n=this.id,r=this.namespace;return arguments.length<2?this.node()[r][n].tween.get(e):Y(this,null==t?function(t){t[r][n].tween.remove(e)}:function(i){i[r][n].tween.set(e,t)})},Zs.attr=function(e,t){function n(){this.removeAttribute(o)}function r(){this.removeAttributeNS(o.space,o.local)}if(arguments.length<2){for(t in e)this.attr(t,e[t]);return this}var i="transform"==e?yr:nr,o=vo.ns.qualify(e);return oo(this,"attr."+e,t,o.local?function(e){return null==e?r:(e+="",function(){var t,n=this.getAttributeNS(o.space,o.local);return n!==e&&(t=i(n,e),function(e){this.setAttributeNS(o.space,o.local,t(e))})})}:function(e){return null==e?n:(e+="",function(){var t,n=this.getAttribute(o);return n!==e&&(t=i(n,e),function(e){this.setAttribute(o,t(e))})})})},Zs.attrTween=function(e,t){var n=vo.ns.qualify(e);return this.tween("attr."+e,n.local?function(e,r){var i=t.call(this,e,r,this.getAttributeNS(n.space,n.local));return i&&function(e){this.setAttributeNS(n.space,n.local,i(e))}}:function(e,r){var i=t.call(this,e,r,this.getAttribute(n));return i&&function(e){this.setAttribute(n,i(e))}})},Zs.style=function(e,t,n){function r(){this.style.removeProperty(e)}var i=arguments.length;if(3>i){if("string"!=typeof e){for(n in 2>i&&(t=""),e)this.style(n,e[n],t);return this}n=""}return oo(this,"style."+e,t,(function(t){return null==t?r:(t+="",function(){var r,i=a(this).getComputedStyle(this,null).getPropertyValue(e);return i!==t&&(r=nr(i,t),function(t){this.style.setProperty(e,r(t),n)})})}))},Zs.styleTween=function(e,t,n){return arguments.length<3&&(n=""),this.tween("style."+e,(function(r,i){var o=t.call(this,r,i,a(this).getComputedStyle(this,null).getPropertyValue(e));return o&&function(t){this.style.setProperty(e,o(t),n)}}))},Zs.text=function(e){return oo(this,"text",e,ao)},Zs.remove=function(){var e=this.namespace;return this.each("end.transition",(function(){var t;this[e].count<2&&(t=this.parentNode)&&t.removeChild(this)}))},Zs.ease=function(e){var t=this.id,n=this.namespace;return arguments.length<1?this.node()[n][t].ease:("function"!=typeof e&&(e=vo.ease.apply(vo,arguments)),Y(this,(function(r){r[n][t].ease=e})))},Zs.delay=function(e){var t=this.id,n=this.namespace;return arguments.length<1?this.node()[n][t].delay:Y(this,"function"==typeof e?function(r,i,o){r[n][t].delay=+e.call(r,r.__data__,i,o)}:(e=+e,function(r){r[n][t].delay=e}))},Zs.duration=function(e){var t=this.id,n=this.namespace;return arguments.length<1?this.node()[n][t].duration:Y(this,"function"==typeof e?function(r,i,o){r[n][t].duration=Math.max(1,e.call(r,r.__data__,i,o))}:(e=Math.max(1,e),function(r){r[n][t].duration=e}))},Zs.each=function(e,t){var n=this.id,r=this.namespace;if(arguments.length<2){var i=$s,o=Vs;try{Vs=n,Y(this,(function(t,i,o){$s=t[r][n],e.call(t,t.__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(e,t)}));return this},Zs.transition=function(){for(var e,t,n,r=this.id,i=++Gs,o=this.namespace,a=[],s=0,u=this.length;u>s;s++){a.push(e=[]);for(var l,c=0,f=(l=this[s]).length;f>c;c++)(t=l[c])&&uo(t,c,o,i,{time:(n=t[o][r]).time,ease:n.ease,delay:n.delay+n.duration,duration:n.duration}),e.push(t)}return io(a,o,i)},vo.svg.axis=function(){function e(e){e.each((function(){var e,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==t?f.tickFormat?f.tickFormat.apply(f,s):_:t,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,E,C=m.select("line"),A=v.select("line"),M=p.select("text").text(d),k=m.select("text"),T=v.select("text"),D="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(e=lo,S="x",N="y",O="x2",E="y2",M.attr("dy",0>D?"0em":".71em").style("text-anchor","middle"),w.attr("d","M"+b[0]+","+D*o+"V0H"+b[1]+"V"+D*o)):(e=co,S="y",N="x",O="y2",E="x2",M.attr("dy",".32em").style("text-anchor",0>D?"end":"start"),w.attr("d","M"+D*o+","+b[0]+"H0V"+b[1]+"H"+D*o)),C.attr(E,D*i),k.attr(N,D*y),A.attr(O,0).attr(E,D*i),T.attr(S,0).attr(N,D*y),f.rangeBand){var j=f,P=j.rangeBand()/2;c=f=function(e){return j(e)+P}}else c.rangeBand?c=f:g.call(e,f,c);m.call(e,c,f),v.call(e,f,f)}))}var t,n=vo.scale.linear(),r=Ks,i=6,o=6,a=3,s=[10],u=null;return e.scale=function(t){return arguments.length?(n=t,e):n},e.orient=function(t){return arguments.length?(r=t in Xs?t+"":Ks,e):r},e.ticks=function(){return arguments.length?(s=bo(arguments),e):s},e.tickValues=function(t){return arguments.length?(u=t,e):u},e.tickFormat=function(n){return arguments.length?(t=n,e):t},e.tickSize=function(t){var n=arguments.length;return n?(i=+t,o=+arguments[n-1],e):i},e.innerTickSize=function(t){return arguments.length?(i=+t,e):i},e.outerTickSize=function(t){return arguments.length?(o=+t,e):o},e.tickPadding=function(t){return arguments.length?(a=+t,e):a},e.tickSubdivide=function(){return arguments.length&&e},e};var Ks="bottom",Xs={top:1,right:1,bottom:1,left:1};vo.svg.brush=function(){function e(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(e){return"resize "+e})).style("cursor",(function(e){return Js[e]})).append("rect").attr("x",(function(e){return/[ew]$/.test(e)?-3:null})).attr("y",(function(e){return/^[ns]/.test(e)?-3:null})).attr("width",6).attr("height",6).style("visibility","hidden"),s.style("display",e.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)),t(f)}))}function t(e){e.selectAll(".resize").attr("transform",(function(e){return"translate("+f[+/e$/.test(e)]+","+h[+/^s/.test(e)]+")"}))}function n(e){e.select(".extent").attr("x",f[0]),e.selectAll(".extent,.n>rect,.s>rect").attr("width",f[1]-f[0])}function r(e){e.select(".extent").attr("y",h[0]),e.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function i(){function i(){var e=vo.mouse(b),i=!1;y&&(e[0]+=y[0],e[1]+=y[1]),E||(vo.event.altKey?(v||(v=[(f[0]+f[1])/2,(h[0]+h[1])/2]),M[0]=f[+(e[0]<v[0])],M[1]=h[+(e[1]<v[1])]):v=null),O&&m(e,l,0)&&(n(_),i=!0),N&&m(e,c,1)&&(r(_),i=!0),i&&(t(_),w({type:"brush",mode:E?"move":"resize"}))}function m(e,t,n){var r,i,a=fi(t),u=a[0],l=a[1],c=M[n],m=n?h:f,g=m[1]-m[0];return E&&(u-=c,l-=g+c),r=(n?p:d)?Math.max(u,Math.min(l,e[n])):e[n],E?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",e.empty()?"none":null),vo.select("body").style("cursor",null),k.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),C(),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,E=x.classed("extent"),C=J(b),M=vo.mouse(b),k=vo.select(a(b)).on("keydown.brush",(function(){32==vo.event.keyCode&&(E||(v=null,M[0]-=f[1],M[1]-=h[1],E=2),A())})).on("keyup.brush",(function(){32==vo.event.keyCode&&2==E&&(M[0]+=f[1],M[1]+=h[1],E=0,A())}));if(vo.event.changedTouches?k.on("touchmove.brush",i).on("touchend.brush",g):k.on("mousemove.brush",i).on("mouseup.brush",g),_.interrupt().selectAll("*").interrupt(),E)M[0]=f[0]-M[0],M[1]=h[0]-M[1];else if(S){var T=+/w$/.test(S),D=+/^n/.test(S);y=[f[1-T]-M[0],h[1-D]-M[1]],M[0]=f[T],M[1]=h[D]}else vo.event.altKey&&(v=M.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=k(e,"brushstart","brush","brushend"),l=null,c=null,f=[0,0],h=[0,0],d=!0,p=!0,m=Qs[0];return e.event=function(e){e.each((function(){var e=u.of(this,arguments),t={x:f,y:h,i:o,j:s},n=this.__chart__||t;this.__chart__=t,Vs?vo.select(this).transition().each("start.brush",(function(){o=n.i,s=n.j,f=n.x,h=n.y,e({type:"brushstart"})})).tween("brush:brush",(function(){var n=rr(f,t.x),r=rr(h,t.y);return o=s=null,function(i){f=t.x=n(i),h=t.y=r(i),e({type:"brush",mode:"resize"})}})).each("end.brush",(function(){o=t.i,s=t.j,e({type:"brush",mode:"resize"}),e({type:"brushend"})})):(e({type:"brushstart"}),e({type:"brush",mode:"resize"}),e({type:"brushend"}))}))},e.x=function(t){return arguments.length?(m=Qs[!(l=t)<<1|!c],e):l},e.y=function(t){return arguments.length?(m=Qs[!l<<1|!(c=t)],e):c},e.clamp=function(t){return arguments.length?(l&&c?(d=!!t[0],p=!!t[1]):l?d=!!t:c&&(p=!!t),e):l&&c?[d,p]:l?d:c?p:null},e.extent=function(t){var n,r,i,a,u;return arguments.length?(l&&(n=t[0],r=t[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=t[0],a=t[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])),e):(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])},e.clear=function(){return e.empty()||(f=[0,0],h=[0,0],o=s=null),e},e.empty=function(){return!!l&&f[0]==f[1]||!!c&&h[0]==h[1]},vo.rebind(e,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"],[]],eu=ba.format=Na.timeFormat,tu=eu.utc,nu=tu("%Y-%m-%dT%H:%M:%S.%LZ");eu.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?fo:nu,fo.parse=function(e){var t=new Date(e);return isNaN(t)?null:t},fo.toString=nu.toString,ba.second=Le((function(e){return new xa(1e3*Math.floor(e/1e3))}),(function(e,t){e.setTime(e.getTime()+1e3*Math.floor(t))}),(function(e){return e.getSeconds()})),ba.seconds=ba.second.range,ba.seconds.utc=ba.second.utc.range,ba.minute=Le((function(e){return new xa(6e4*Math.floor(e/6e4))}),(function(e,t){e.setTime(e.getTime()+6e4*Math.floor(t))}),(function(e){return e.getMinutes()})),ba.minutes=ba.minute.range,ba.minutes.utc=ba.minute.utc.range,ba.hour=Le((function(e){var t=e.getTimezoneOffset()/60;return new xa(36e5*(Math.floor(e/36e5-t)+t))}),(function(e,t){e.setTime(e.getTime()+36e5*Math.floor(t))}),(function(e){return e.getHours()})),ba.hours=ba.hour.range,ba.hours.utc=ba.hour.utc.range,ba.month=Le((function(e){return(e=ba.day(e)).setDate(1),e}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e){return e.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=eu.multi([[".%L",function(e){return e.getMilliseconds()}],[":%S",function(e){return e.getSeconds()}],["%I:%M",function(e){return e.getMinutes()}],["%I %p",function(e){return e.getHours()}],["%a %d",function(e){return e.getDay()&&1!=e.getDate()}],["%b %d",function(e){return 1!=e.getDate()}],["%B",function(e){return e.getMonth()}],["%Y",Nt]]),au={range:function(e,t,n){return vo.range(Math.ceil(e/n)*n,+t,n).map(po)},floor:_,ceil:_};iu.year=ba.year,ba.scale=function(){return ho(vo.scale.linear(),iu,ou)};var su=iu.map((function(e){return[e[0].utc,e[1]]})),uu=tu.multi([[".%L",function(e){return e.getUTCMilliseconds()}],[":%S",function(e){return e.getUTCSeconds()}],["%I:%M",function(e){return e.getUTCMinutes()}],["%I %p",function(e){return e.getUTCHours()}],["%a %d",function(e){return e.getUTCDay()&&1!=e.getUTCDate()}],["%b %d",function(e){return 1!=e.getUTCDate()}],["%B",function(e){return e.getUTCMonth()}],["%Y",Nt]]);su.year=ba.year.utc,ba.scale.utc=function(){return ho(vo.scale.linear(),su,uu)},vo.text=Ce((function(e){return e.responseText})),vo.json=function(e,t){return Ae(e,"application/json",mo,t)},vo.html=function(e,t){return Ae(e,"text/html",go,t)},vo.xml=Ce((function(e){return e.responseXML})),this.d3=vo,void 0===(i="function"==typeof(r=vo)?r.call(t,n,t,e):r)||(e.exports=i)}()},81920:function(e,t,n){var r,i;!function(o){"use strict";r=[n(19755)],i=function(e){return function(e,t,n,r){var i,o,a,s,u=function(t,n){if(this instanceof u)return e(t).DataTable(n);n=t,this.$=function(e,t){return this.api(!0).$(e,t)},this._=function(e,t){return this.api(!0).rows(e,t).data()},this.api=function(e){return new o(e?ut(this[i.iApiIndex]):this)},this.fnAddData=function(t,n){var i=this.api(!0),o=Array.isArray(t)&&(Array.isArray(t[0])||e.isPlainObject(t[0]))?i.rows.add(t):i.row.add(t);return(n===r||n)&&i.draw(),o.flatten().toArray()},this.fnAdjustColumnSizing=function(e){var t=this.api(!0).columns.adjust(),n=t.settings()[0],i=n.oScroll;e===r||e?t.draw(!1):""===i.sX&&""===i.sY||Ue(n)},this.fnClearTable=function(e){var t=this.api(!0).clear();(e===r||e)&&t.draw()},this.fnClose=function(e){this.api(!0).row(e).child.hide()},this.fnDeleteRow=function(e,t,n){var i=this.api(!0),o=i.rows(e),a=o.settings()[0],s=a.aoData[o[0][0]];return o.remove(),t&&t.call(this,a,s),(n===r||n)&&i.draw(),s},this.fnDestroy=function(e){this.api(!0).destroy(e)},this.fnDraw=function(e){this.api(!0).draw(e)},this.fnFilter=function(e,t,n,i,o,a){var s=this.api(!0);null===t||t===r?s.search(e,n,i,a):s.column(t).search(e,n,i,a),s.draw()},this.fnGetData=function(e,t){var n=this.api(!0);if(e!==r){var i=e.nodeName?e.nodeName.toLowerCase():"";return t!==r||"td"==i||"th"==i?n.cell(e,t).data():n.row(e).data()||null}return n.data().toArray()},this.fnGetNodes=function(e){var t=this.api(!0);return e!==r?t.row(e).node():t.rows().nodes().flatten().toArray()},this.fnGetPosition=function(e){var t=this.api(!0),n=e.nodeName.toUpperCase();if("TR"==n)return t.row(e).index();if("TD"==n||"TH"==n){var r=t.cell(e).index();return[r.row,r.columnVisible,r.column]}return null},this.fnIsOpen=function(e){return this.api(!0).row(e).child.isShown()},this.fnOpen=function(e,t,n){return this.api(!0).row(e).child(t,n).show().child()[0]},this.fnPageChange=function(e,t){var n=this.api(!0).page(e);(t===r||t)&&n.draw(!1)},this.fnSetColumnVis=function(e,t,n){var i=this.api(!0).column(e).visible(t);(n===r||n)&&i.columns.adjust().draw()},this.fnSettings=function(){return ut(this[i.iApiIndex])},this.fnSort=function(e){this.api(!0).order(e).draw()},this.fnSortListener=function(e,t,n){this.api(!0).order.listener(e,t,n)},this.fnUpdate=function(e,t,n,i,o){var a=this.api(!0);return n===r||null===n?a.row(t).data(e):a.cell(t,n).data(e),(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]=Ft(c));return this.each((function(){var t,i=l>1?ft({},n,!0):n,o=0,c=this.getAttribute("id"),f=!1,h=u.defaults,d=e(this);if("table"==this.nodeName.toLowerCase()){D(h),j(h.column),M(h,h,!0),M(h.column,h.column,!0),M(h,e.extend(i,d.data()),!0);var p=u.settings;for(o=0,t=p.length;o<t;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 lt(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=e.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(),D(i),k(i.oLanguage),i.aLengthMenu&&!i.iDisplayLength&&(i.iDisplayLength=Array.isArray(i.aLengthMenu[0])?i.aLengthMenu[0][0]:i.aLengthMenu[0]),i=ft(e.extend(!0,{},h),i),ct(y.oFeatures,i,["bPaginate","bLengthChange","bFilter","bSort","bSortMulti","bInfo","bProcessing","bAutoWidth","bSortClasses","bServerSide","bDeferRender"]),ct(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"]]),ct(y.oScroll,i,[["sScrollX","sX"],["sScrollXInner","sXInner"],["sScrollY","sY"],["bScrollCollapse","bCollapse"]]),ct(y.oLanguage,i,"fnInfoCallback"),dt(y,"aoDrawCallback",i.fnDrawCallback,"user"),dt(y,"aoServerParams",i.fnServerParams,"user"),dt(y,"aoStateSaveParams",i.fnStateSaveParams,"user"),dt(y,"aoStateLoadParams",i.fnStateLoadParams,"user"),dt(y,"aoStateLoaded",i.fnStateLoaded,"user"),dt(y,"aoRowCallback",i.fnRowCallback,"user"),dt(y,"aoRowCreatedCallback",i.fnCreatedRow,"user"),dt(y,"aoHeaderCallback",i.fnHeaderCallback,"user"),dt(y,"aoFooterCallback",i.fnFooterCallback,"user"),dt(y,"aoInitComplete",i.fnInitComplete,"user"),dt(y,"aoPreDrawCallback",i.fnPreDrawCallback,"user"),y.rowIdFn=J(i.rowId),P(y);var b=y.oClasses;if(e.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;e.extend(!0,w,i.oLanguage),w.sUrl?(e.ajax({dataType:"json",url:w.sUrl,success:function(t){M(h.oLanguage,t),k(t),e.extend(!0,w,t),pt(y,null,"i18n",[y]),Pe(y)},error:function(){Pe(y)}}),f=!0):pt(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!==e.inArray(!0,e.map(_,(function(e,t){return S.hasClass(e)})))&&(e("tbody tr",this).removeClass(_.join(" ")),y.asDestroyStripes=_.slice());var O,N=[],E=this.getElementsByTagName("thead");if(0!==E.length&&(he(y.aoHeader,E[0]),N=de(y)),null===i.aoColumns)for(O=[],o=0,t=N.length;o<t;o++)O.push(null);else O=i.aoColumns;for(o=0,t=O.length;o<t;o++)R(y,N?N[o]:null);if(W(y,i.aoColumnDefs,O,(function(e,t){L(y,e,t)})),S.length){var C=function(e,t){return null!==e.getAttribute("data-"+t)?t:null};e(S[0]).children("th, td").each((function(e,t){var n=y.aoColumns[e];if(n.mData===e){var i=C(t,"sort")||C(t,"order"),o=C(t,"filter")||C(t,"search");null===i&&null===o||(n.mData={_:e+".display",sort:null!==i?e+".@data-"+i:r,type:null!==i?e+".@data-"+i:r,filter:null!==o?e+".@data-"+o:r},L(y,e))}}))}var A=y.oFeatures,T=function(){if(i.aaSorting===r){var n=y.aaSorting;for(o=0,t=n.length;o<t;o++)n[o][1]=y.aoColumns[o].asSorting[0]}rt(y),A.bSort&&dt(y,"aoDrawCallback",(function(){if(y.bSorted){var t=Je(y),n={};e.each(t,(function(e,t){n[t.src]=t.dir})),pt(y,null,"order",[y,t,n]),et(y)}})),dt(y,"aoDrawCallback",(function(){(y.bSorted||"ssp"===vt(y)||A.bDeferRender)&&rt(y)}),"sc");var a=d.children("caption").each((function(){this._captionSide=e(this).css("caption-side")})),s=d.children("thead");0===s.length&&(s=e("<thead/>").appendTo(d)),y.nTHead=s[0];var u=d.children("tbody");0===u.length&&(u=e("<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=e("<tfoot/>").appendTo(d)),0===l.length||0===l.children().length?d.addClass(b.sNoFooter):l.length>0&&(y.nTFoot=l[0],he(y.aoFooter,y.nTFoot)),i.aaData)for(o=0;o<i.aaData.length;o++)V(y,i.aaData[o]);else(y.bDeferLoading||"dom"==vt(y))&&$(y,e(y.nTBody).children("tr"));y.aiDisplay=y.aiDisplayMaster.slice(),y.bInitialised=!0,!1===f&&Pe(y)};dt(y,"aoDrawCallback",ot,"state_save"),i.bStateSave?(A.bStateSave=!0,at(y,0,T)):T()}else lt(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(e){return!e||!0===e||"-"===e},g=function(e){var t=parseInt(e,10);return!isNaN(t)&&isFinite(e)?t:null},v=function(e,t){return l[t]||(l[t]=new RegExp(Ne(t),"g")),"string"==typeof e&&"."!==t?e.replace(/\./g,"").replace(l[t],"."):e},y=function(e,t,n){var r="string"==typeof e;return!!m(e)||(t&&r&&(e=v(e,t)),n&&r&&(e=e.replace(p,"")),!isNaN(parseFloat(e))&&isFinite(e))},b=function(e,t,n){return!!m(e)||function(e){return m(e)||"string"==typeof e}(e)&&!!y(O(e),t,n)||null},x=function(e,t,n){var i=[],o=0,a=e.length;if(n!==r)for(;o<a;o++)e[o]&&e[o][t]&&i.push(e[o][t][n]);else for(;o<a;o++)e[o]&&i.push(e[o][t]);return i},w=function(e,t,n,i){var o=[],a=0,s=t.length;if(i!==r)for(;a<s;a++)e[t[a]][n]&&o.push(e[t[a]][n][i]);else for(;a<s;a++)o.push(e[t[a]][n]);return o},_=function(e,t){var n,i=[];t===r?(t=0,n=e):(n=t,t=e);for(var o=t;o<n;o++)i.push(o);return i},S=function(e){for(var t=[],n=0,r=e.length;n<r;n++)e[n]&&t.push(e[n]);return t},O=function(e){return e.replace(f,"")},N=function(e){if(function(e){if(e.length<2)return!0;for(var t=e.slice().sort(),n=t[0],r=1,i=t.length;r<i;r++){if(t[r]===n)return!1;n=t[r]}return!0}(e))return e.slice();var t,n,r,i=[],o=e.length,a=0;e:for(n=0;n<o;n++){for(t=e[n],r=0;r<a;r++)if(i[r]===t)continue e;i.push(t),a++}return i},E=function(e,t){if(Array.isArray(t))for(var n=0;n<t.length;n++)E(e,t[n]);else e.push(t);return e},C=function(e,t){return t===r&&(t=0),-1!==this.indexOf(e,t)};function A(t){var n,r,i={};e.each(t,(function(e,o){(n=e.match(/^([^A-Z]+?)([A-Z])/))&&-1!=="a aa ai ao as b fn i m o s ".indexOf(n[1]+" ")&&(r=e.replace(n[0],n[2].toLowerCase()),i[r]=e,"o"===n[1]&&A(t[e]))})),t._hungarianMap=i}function M(t,n,i){var o;t._hungarianMap||A(t),e.each(n,(function(a,s){(o=t._hungarianMap[a])===r||!i&&n[o]!==r||("o"===o.charAt(0)?(n[o]||(n[o]={}),e.extend(!0,n[o],n[a]),M(t[o],n[o],i)):n[o]=n[a])}))}function k(e){var t=u.defaults.oLanguage,n=t.sDecimal;if(n&&Rt(n),e){var r=e.sZeroRecords;!e.sEmptyTable&&r&&"No data available in table"===t.sEmptyTable&&ct(e,e,"sZeroRecords","sEmptyTable"),!e.sLoadingRecords&&r&&"Loading..."===t.sLoadingRecords&&ct(e,e,"sZeroRecords","sLoadingRecords"),e.sInfoThousands&&(e.sThousands=e.sInfoThousands);var i=e.sDecimal;i&&n!==i&&Rt(i)}}Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),Array.prototype.includes||(Array.prototype.includes=C),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}),String.prototype.includes||(String.prototype.includes=C),u.util={throttle:function(e,t){var n,i,o=t!==r?t:200;return function(){var t=this,a=+new Date,s=arguments;n&&a<n+o?(clearTimeout(i),i=setTimeout((function(){n=r,e.apply(t,s)}),o)):(n=a,e.apply(t,s))}},escapeRegex:function(e){return e.replace(d,"\\$1")},set:function(t){if(e.isPlainObject(t))return u.util.set(t._);if(null===t)return function(){};if("function"==typeof t)return function(e,n,r){t(e,"set",n,r)};if("string"!=typeof t||-1===t.indexOf(".")&&-1===t.indexOf("[")&&-1===t.indexOf("("))return function(e,n){e[t]=n};var n=function(e,t,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,""),e[c[h]]=[],(o=c.slice()).splice(0,h+1),l=o.join("."),Array.isArray(t))for(var p=0,m=t.length;p<m;p++)n(u={},t[p],l),e[c[h]].push(u);else e[c[h]]=t;return}s&&(c[h]=c[h].replace(K,""),e=e[c[h]](t)),null!==e[c[h]]&&e[c[h]]!==r||(e[c[h]]={}),e=e[c[h]]}f.match(K)?e=e[f.replace(K,"")](t):e[f.replace(G,"")]=t};return function(e,r){return n(e,r,t)}},get:function(t){if(e.isPlainObject(t)){var n={};return e.each(t,(function(e,t){t&&(n[e]=u.util.get(t))})),function(e,t,i,o){var a=n[t]||n._;return a!==r?a(e,t,i,o):e}}if(null===t)return function(e){return e};if("function"==typeof t)return function(e,n,r,i){return t(e,n,r,i)};if("string"!=typeof t||-1===t.indexOf(".")&&-1===t.indexOf("[")&&-1===t.indexOf("("))return function(e,n){return e[t]};var i=function(e,t,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]&&(e=e[l[c]]),s=[],l.splice(0,c+1),u=l.join("."),Array.isArray(e))for(var h=0,d=e.length;h<d;h++)s.push(i(e[h],t,u));var p=o[0].substring(1,o[0].length-1);e=""===p?s:s.join(p);break}if(a)l[c]=l[c].replace(K,""),e=e[l[c]]();else{if(null===e||e[l[c]]===r)return r;e=e[l[c]]}}return e};return function(e,n){return i(e,n,t)}}};var T=function(e,t,n){e[t]!==r&&(e[n]=e[t])};function D(e){T(e,"ordering","bSort"),T(e,"orderMulti","bSortMulti"),T(e,"orderClasses","bSortClasses"),T(e,"orderCellsTop","bSortCellsTop"),T(e,"order","aaSorting"),T(e,"orderFixed","aaSortingFixed"),T(e,"paging","bPaginate"),T(e,"pagingType","sPaginationType"),T(e,"pageLength","iDisplayLength"),T(e,"searching","bFilter"),"boolean"==typeof e.sScrollX&&(e.sScrollX=e.sScrollX?"100%":""),"boolean"==typeof e.scrollX&&(e.scrollX=e.scrollX?"100%":"");var t=e.aoSearchCols;if(t)for(var n=0,r=t.length;n<r;n++)t[n]&&M(u.models.oSearch,t[n])}function j(e){T(e,"orderable","bSortable"),T(e,"orderData","aDataSort"),T(e,"orderSequence","asSorting"),T(e,"orderDataType","sortDataType");var t=e.aDataSort;"number"!=typeof t||Array.isArray(t)||(e.aDataSort=[t])}function P(n){if(!u.__browser){var r={};u.__browser=r;var i=e("<div/>").css({position:"fixed",top:0,left:-1*e(t).scrollLeft(),height:1,width:1,overflow:"hidden"}).append(e("<div/>").css({position:"absolute",top:1,left:1,width:100,overflow:"scroll"}).append(e("<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()}e.extend(n.oBrowser,u.__browser),n.oScroll.iBarWidth=u.__browser.barWidth}function I(e,t,n,i,o,a){var s,u=i,l=!1;for(n!==r&&(s=n,l=!0);u!==o;)e.hasOwnProperty(u)&&(s=l?t(s,e[u],u,e):e[u],l=!0,u+=a);return s}function R(t,r){var i=u.defaults.column,o=t.aoColumns.length,a=e.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});t.aoColumns.push(a);var s=t.aoPreSearchCols;s[o]=e.extend({},u.models.oSearch,s[o]),L(t,o,e(r).data())}function L(t,n,i){var o=t.aoColumns[n],a=t.oClasses,s=e(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),M(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),e.extend(o,i),ct(o,i,"sWidth","sWidthOrig"),i.iDataSort!==r&&(o.aDataSort=[i.iDataSort]),ct(o,i,"aDataSort"));var c=o.mData,f=J(c),h=o.mRender?J(o.mRender):null,d=function(e){return"string"==typeof e&&-1!==e.indexOf("@")};o._bAttrSrc=e.isPlainObject(c)&&(d(c.sort)||d(c.type)||d(c.filter)),o._setter=null,o.fnGetData=function(e,t,n){var i=f(e,t,r,n);return h&&t?h(i,t,e,n):i},o.fnSetData=function(e,t,n){return Q(c)(e,t,n)},"number"!=typeof c&&(t._rowReadObject=!0),t.oFeatures.bSort||(o.bSortable=!1,s.addClass(a.sSortableNone));var p=-1!==e.inArray("asc",o.asSorting),m=-1!==e.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(e){if(!1!==e.oFeatures.bAutoWidth){var t=e.aoColumns;$e(e);for(var n=0,r=t.length;n<r;n++)t[n].nTh.style.width=t[n].sWidth}var i=e.oScroll;""===i.sY&&""===i.sX||Ue(e),pt(e,null,"column-sizing",[e])}function B(e,t){var n=H(e,"bVisible");return"number"==typeof n[t]?n[t]:null}function q(t,n){var r=H(t,"bVisible"),i=e.inArray(n,r);return-1!==i?i:null}function z(t){var n=0;return e.each(t.aoColumns,(function(t,r){r.bVisible&&"none"!==e(r.nTh).css("display")&&n++})),n}function H(t,n){var r=[];return e.map(t.aoColumns,(function(e,t){e[n]&&r.push(t)})),r}function U(e){var t,n,i,o,a,s,l,c,f,h=e.aoColumns,d=e.aoData,p=u.ext.type.detect;for(t=0,n=h.length;t<n;t++)if(f=[],!(l=h[t]).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(e,a,t,"type")),(c=p[i](f[a],e))||i===p.length-1)&&("html"!==c||m(f[a]));a++);if(c){l.sType=c;break}}l.sType||(l.sType="string")}}function W(t,n,i,o){var a,s,u,l,c,f,h,d=t.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(t);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]||e(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(t,n,i,o){var a=t.aoData.length,s=e.extend(!0,{},u.models.oRow,{src:i?"dom":"data",idx:a});s._aData=n,t.aoData.push(s);for(var l=t.aoColumns,c=0,f=l.length;c<f;c++)l[c].sType=null;t.aiDisplayMaster.push(a);var h=t.rowIdFn(n);return h!==r&&(t.aIds[h]=s),!i&&t.oFeatures.bDeferRender||oe(t,a,i,o),a}function $(t,n){var r;return n instanceof e||(n=e(n)),n.map((function(e,n){return r=ie(t,n),V(t,r.data,n,r.cells)}))}function Y(e,t,n,i){"search"===i?i="filter":"order"===i&&(i="sort");var o=e.iDraw,a=e.aoColumns[n],s=e.aoData[t]._aData,l=a.sDefaultContent,c=a.fnGetData(s,i,{settings:e,row:t,col:n});if(c===r)return e.iDrawError!=o&&null===l&&(lt(e,0,"Requested unknown parameter "+("function"==typeof a.mData?"{function}":"'"+a.mData+"'")+" for row "+t+", column "+n,4),e.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(e,t,n,r){var i=e.aoColumns[n],o=e.aoData[t]._aData;i.fnSetData(o,r,{settings:e,row:t,col:n})}var G=/\[.*?\]$/,K=/\(\)$/;function X(t){return e.map(t.match(/(\\.|[^\.])+/g)||[""],(function(e){return e.replace(/\\\./g,".")}))}var J=u.util.get,Q=u.util.set;function ee(e){return x(e.aoData,"_aData")}function te(e){e.aoData.length=0,e.aiDisplayMaster.length=0,e.aiDisplay.length=0,e.aIds={}}function ne(e,t,n){for(var i=-1,o=0,a=e.length;o<a;o++)e[o]==t?i=o:e[o]>t&&e[o]--;-1!=i&&n===r&&e.splice(i,1)}function re(e,t,n,i){var o,a,s=e.aoData[t],u=function(n,r){for(;n.childNodes.length;)n.removeChild(n.firstChild);n.innerHTML=Y(e,t,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=ie(e,s,i,i===r?r:s._aData).data;s._aSortData=null,s._aFilterData=null;var c=e.aoColumns;if(i!==r)c[i].sType=null;else{for(o=0,a=c.length;o<a;o++)c[o].sType=null;ae(e,s)}}function ie(e,t,n,i){var o,a,s,u=[],l=t.firstChild,c=0,f=e.aoColumns,h=e._rowReadObject;i=i!==r?i:h?{}:[];var d=function(e,t){if("string"==typeof e){var n=e.indexOf("@");if(-1!==n){var r=e.substring(n+1);Q(e)(i,t.getAttribute(r))}}},p=function(e){n!==r&&n!==c||(a=f[c],s=e.innerHTML.trim(),a&&a._bAttrSrc?(Q(a.mData._)(i,s),d(a.mData.sort,e),d(a.mData.type,e),d(a.mData.filter,e)):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=t.anCells).length;m<g;m++)p(u[m]);var v=t.firstChild?t:t.nTr;if(v){var y=v.getAttribute("id");y&&Q(e.rowId)(i,y)}return{data:i,cells:u}}function oe(t,r,i,o){var a,s,u,l,c,f,h=t.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,ae(t,h),l=0,c=t.aoColumns.length;l<c;l++)u=t.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||e.isPlainObject(u.mData)&&u.mData._===l+".display")||(s.innerHTML=Y(t,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(t.oInstance,s,Y(t,r,l),d,r,l);pt(t,"aoRowCreatedCallback",null,[a,d,r,p])}}function ae(t,n){var r=n.nTr,i=n._aData;if(r){var o=t.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,e(r).removeClass(n.__rowc.join(" ")).addClass(i.DT_RowClass)}i.DT_RowAttr&&e(r).attr(i.DT_RowAttr),i.DT_RowData&&e(r).data(i.DT_RowData)}}function se(t){var n,r,i,o,a,s=t.nTHead,u=t.nTFoot,l=0===e("th, td",s).length,c=t.oClasses,f=t.aoColumns;for(l&&(o=e("<tr/>").appendTo(s)),n=0,r=f.length;n<r;n++)a=f[n],i=e(a.nTh).addClass(a.sClass),l&&i.appendTo(o),t.oFeatures.bSort&&(i.addClass(a.sSortingClass),!1!==a.bSortable&&(i.attr("tabindex",t.iTabIndex).attr("aria-controls",t.sTableId),nt(t,a.nTh,n))),a.sTitle!=i[0].innerHTML&&i.html(a.sTitle),gt(t,"header")(t,i,a,c);if(l&&he(t.aoHeader,s),e(s).children("tr").children("th, td").addClass(c.sHeaderTH),e(u).children("tr").children("th, td").addClass(c.sFooterTH),null!==u){var h=t.aoFooter[0];for(n=0,r=h.length;n<r;n++)(a=f[n]).nTf=h[n].cell,a.sClass&&e(a.nTf).addClass(a.sClass)}}function ue(t,n,i){var o,a,s,u,l,c,f,h,d,p=[],m=[],g=t.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--)t.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++}e(p[o][s].cell).attr("rowspan",h).attr("colspan",d)}}}}function le(t,n){var i=pt(t,"aoPreDrawCallback","preDraw",[t]);if(-1===e.inArray(!1,i)){var o=[],a=0,s=t.asStripeClasses,u=s.length,l=(t.aoOpenRows.length,t.oLanguage),c=t.iInitDisplayStart,f="ssp"==vt(t),h=t.aiDisplay;t.bDrawing=!0,c!==r&&-1!==c&&(t._iDisplayStart=f?c:c>=t.fnRecordsDisplay()?0:c,t.iInitDisplayStart=-1);var d=t._iDisplayStart,p=t.fnDisplayEnd();if(t.bDeferLoading)t.bDeferLoading=!1,t.iDraw++,ze(t,!1);else if(f){if(!t.bDestroying&&!n)return void me(t)}else t.iDraw++;if(0!==h.length)for(var m=f?0:d,g=f?t.aoData.length:p,v=m;v<g;v++){var y=h[v],b=t.aoData[y];null===b.nTr&&oe(t,y);var x=b.nTr;if(0!==u){var w=s[a%u];b._sRowStripe!=w&&(e(x).removeClass(b._sRowStripe).addClass(w),b._sRowStripe=w)}pt(t,"aoRowCallback",null,[x,b._aData,a,v,y]),o.push(x),a++}else{var _=l.sZeroRecords;1==t.iDraw&&"ajax"==vt(t)?_=l.sLoadingRecords:l.sEmptyTable&&0===t.fnRecordsTotal()&&(_=l.sEmptyTable),o[0]=e("<tr/>",{class:u?s[0]:""}).append(e("<td />",{valign:"top",colSpan:z(t),class:t.oClasses.sRowEmpty}).html(_))[0]}pt(t,"aoHeaderCallback","header",[e(t.nTHead).children("tr")[0],ee(t),d,p,h]),pt(t,"aoFooterCallback","footer",[e(t.nTFoot).children("tr")[0],ee(t),d,p,h]);var S=e(t.nTBody);S.children().detach(),S.append(e(o)),pt(t,"aoDrawCallback","draw",[t]),t.bSorted=!1,t.bFiltered=!1,t.bDrawing=!1}else ze(t,!1)}function ce(e,t){var n=e.oFeatures,r=n.bSort,i=n.bFilter;r&&Qe(e),i?xe(e,e.oPreviousSearch):e.aiDisplay=e.aiDisplayMaster.slice(),!0!==t&&(e._iDisplayStart=0),e._drawHold=t,le(e),e._drawHold=!1}function fe(t){var n=t.oClasses,r=e(t.nTable),i=e("<div/>").insertBefore(r),o=t.oFeatures,a=e("<div/>",{id:t.sTableId+"_wrapper",class:n.sWrapper+(t.nTFoot?"":" "+n.sNoFooter)});t.nHolding=i[0],t.nTableWrapper=a[0],t.nTableReinsertBefore=t.nTable.nextSibling;for(var s,l,c,f,h,d,p=t.sDom.split(""),m=0;m<p.length;m++){if(s=null,"<"==(l=p[m])){if(c=e("<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=e(c)}else if(">"==l)a=a.parent();else if("l"==l&&o.bPaginate&&o.bLengthChange)s=Le(t);else if("f"==l&&o.bFilter)s=be(t);else if("r"==l&&o.bProcessing)s=qe(t);else if("t"==l)s=He(t);else if("i"==l&&o.bInfo)s=Te(t);else if("p"==l&&o.bPaginate)s=Fe(t);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(t);break}if(s){var x=t.aanFeatures;x[l]||(x[l]=[]),x[l].push(s),a.append(s)}}i.replaceWith(a),t.nHolding=null}function he(t,n){var r,i,o,a,s,u,l,c,f,h,d=e(n).children("tr"),p=function(e,t,n){for(var r=e[t];r[n];)n++;return n};for(t.splice(0,t.length),o=0,u=d.length;o<u;o++)t.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(t,o,0),h=1===c,s=0;s<c;s++)for(a=0;a<f;a++)t[o+a][l+s]={cell:i,unique:h},t[o+a].nTr=r;i=i.nextSibling}}function de(e,t,n){var r=[];n||(n=e.aoHeader,t&&he(n=[],t));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]&&e.bSortCellsTop||(r[a]=n[i][a].cell);return r}function pe(t,n,r){if(pt(t,"aoServerParams","serverParams",[n]),n&&Array.isArray(n)){var i={},o=/(.*?)\[\]$/;e.each(n,(function(e,t){var n=t.name.match(o);if(n){var r=n[0];i[r]||(i[r]=[]),i[r].push(t.value)}else i[t.name]=t.value})),n=i}var a,s=t.ajax,u=t.oInstance,l=function(e){var n=t.jqXhr?t.jqXhr.status:null;(null===e||"number"==typeof n&&204==n)&&ye(t,e={},[]);var i=e.error||e.sError;i&&lt(t,0,i),t.json=e,pt(t,null,"xhr",[t,e,t.jqXHR]),r(e)};if(e.isPlainObject(s)&&s.data){var c="function"==typeof(a=s.data)?a(n,t):a;n="function"==typeof a&&c?c:e.extend(!0,n,c),delete s.data}var f={data:n,success:l,dataType:"json",cache:!1,type:t.sServerMethod,error:function(n,r,i){var o=pt(t,null,"xhr",[t,null,t.jqXHR]);-1===e.inArray(!0,o)&&("parsererror"==r?lt(t,0,"Invalid JSON response",1):4===n.readyState&&lt(t,0,"Ajax error",7)),ze(t,!1)}};t.oAjaxData=n,pt(t,null,"preXhr",[t,n]),t.fnServerData?t.fnServerData.call(u,t.sAjaxSource,e.map(n,(function(e,t){return{name:t,value:e}})),l,t):t.sAjaxSource||"string"==typeof s?t.jqXHR=e.ajax(e.extend(f,{url:s||t.sAjaxSource})):"function"==typeof s?t.jqXHR=s.call(u,n,l,t):(t.jqXHR=e.ajax(e.extend(f,s)),s.data=a)}function me(e){e.iDraw++,ze(e,!0),pe(e,ge(e),(function(t){ve(e,t)}))}function ge(t){var n,r,i,o,a=t.aoColumns,s=a.length,l=t.oFeatures,c=t.oPreviousSearch,f=t.aoPreSearchCols,h=[],d=Je(t),p=t._iDisplayStart,m=!1!==l.bPaginate?t._iDisplayLength:-1,g=function(e,t){h.push({name:e,value:t})};g("sEcho",t.iDraw),g("iColumns",s),g("sColumns",x(a,"sName").join(",")),g("iDisplayStart",p),g("iDisplayLength",m);var v={draw:t.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&&(e.each(d,(function(e,t){v.order.push({column:t.col,dir:t.dir}),g("iSortCol_"+e,t.col),g("sSortDir_"+e,t.dir)})),g("iSortingCols",d.length));var y=u.ext.legacy.ajax;return null===y?t.sAjaxSource?h:v:y?h:v}function ve(e,t){var n=function(e,n){return t[e]!==r?t[e]:t[n]},i=ye(e,t),o=n("sEcho","draw"),a=n("iTotalRecords","recordsTotal"),s=n("iTotalDisplayRecords","recordsFiltered");if(o!==r){if(1*o<e.iDraw)return;e.iDraw=1*o}i||(i=[]),te(e),e._iRecordsTotal=parseInt(a,10),e._iRecordsDisplay=parseInt(s,10);for(var u=0,l=i.length;u<l;u++)V(e,i[u]);e.aiDisplay=e.aiDisplayMaster.slice(),le(e,!0),e._bInitComplete||Ie(e,t),ze(e,!1)}function ye(t,n,i){var o=e.isPlainObject(t.ajax)&&t.ajax.dataSrc!==r?t.ajax.dataSrc:t.sAjaxDataProp;if(!i)return"data"===o?n.aaData||n[o]:""!==o?J(o)(n):n;Q(o)(n,i)}function be(t){var r=t.oClasses,i=t.sTableId,o=t.oLanguage,a=t.oPreviousSearch,s=t.aanFeatures,u='<input type="search" class="'+r.sFilterInput+'"/>',l=o.sSearch;l=l.match(/_INPUT_/)?l.replace("_INPUT_",u):l+u;var c=e("<div/>",{id:s.f?null:i+"_filter",class:r.sFilter}).append(e("<label/>").append(l)),f=function(e){s.f;var n=this.value?this.value:"";a.return&&"Enter"!==e.key||n!=a.sSearch&&(xe(t,{sSearch:n,bRegex:a.bRegex,bSmart:a.bSmart,bCaseInsensitive:a.bCaseInsensitive,return:a.return}),t._iDisplayStart=0,le(t))},h=null!==t.searchDelay?t.searchDelay:"ssp"===vt(t)?400:0,d=e("input",c).val(a.sSearch).attr("placeholder",o.sSearchPlaceholder).on("keyup.DT search.DT input.DT paste.DT cut.DT",h?Ye(f,h):f).on("mouseup",(function(e){setTimeout((function(){f.call(d[0],e)}),10)})).on("keypress.DT",(function(e){if(13==e.keyCode)return!1})).attr("aria-controls",i);return e(t.nTable).on("search.dt.DT",(function(e,r){if(t===r)try{d[0]!==n.activeElement&&d.val(a.sSearch)}catch(e){}})),c[0]}function xe(e,t,n){var i=e.oPreviousSearch,o=e.aoPreSearchCols,a=function(e){i.sSearch=e.sSearch,i.bRegex=e.bRegex,i.bSmart=e.bSmart,i.bCaseInsensitive=e.bCaseInsensitive,i.return=e.return},s=function(e){return e.bEscapeRegex!==r?!e.bEscapeRegex:e.bRegex};if(U(e),"ssp"!=vt(e)){Se(e,t.sSearch,n,s(t),t.bSmart,t.bCaseInsensitive,t.return),a(t);for(var u=0;u<o.length;u++)_e(e,o[u].sSearch,u,s(o[u]),o[u].bSmart,o[u].bCaseInsensitive);we(e)}else a(t);e.bFiltered=!0,pt(e,null,"search",[e])}function we(t){for(var n,r,i=u.ext.search,o=t.aiDisplay,a=0,s=i.length;a<s;a++){for(var l=[],c=0,f=o.length;c<f;c++)r=o[c],n=t.aoData[r],i[a](t,n._aFilterData,r,n._aData,c)&&l.push(r);o.length=0,e.merge(o,l)}}function _e(e,t,n,r,i,o){if(""!==t){for(var a,s=[],u=e.aiDisplay,l=Oe(t,r,i,o),c=0;c<u.length;c++)a=e.aoData[u[c]]._aFilterData[n],l.test(a)&&s.push(u[c]);e.aiDisplay=s}}function Se(e,t,n,r,i,o){var a,s,l,c=Oe(t,r,i,o),f=e.oPreviousSearch.sSearch,h=e.aiDisplayMaster,d=[];if(0!==u.ext.search.length&&(n=!0),s=Ae(e),t.length<=0)e.aiDisplay=h.slice();else{for((s||n||r||f.length>t.length||0!==t.indexOf(f)||e.bSorted)&&(e.aiDisplay=h.slice()),a=e.aiDisplay,l=0;l<a.length;l++)c.test(e.aoData[a[l]]._sFilterRow)&&d.push(a[l]);e.aiDisplay=d}}function Oe(t,n,r,i){if(t=n?t:Ne(t),r){var o=e.map(t.match(/"[^"]+"|[^ ]+/g)||[""],(function(e){if('"'===e.charAt(0)){var t=e.match(/^"(.*)"$/);e=t?t[1]:e}return e.replace('"',"")}));t="^(?=.*?"+o.join(")(?=.*?")+").*$"}return new RegExp(t,i?"i":"")}var Ne=u.util.escapeRegex,Ee=e("<div>")[0],Ce=Ee.textContent!==r;function Ae(e){var t,n,r,i,o,a,s,u=e.aoColumns,l=!1;for(t=0,r=e.aoData.length;t<r;t++)if(!(s=e.aoData[t])._aFilterData){for(o=[],n=0,i=u.length;n<i;n++)u[n].bSearchable?(null===(a=Y(e,t,n,"filter"))&&(a=""),"string"!=typeof a&&a.toString&&(a=a.toString())):a="",a.indexOf&&-1!==a.indexOf("&")&&(Ee.innerHTML=a,a=Ce?Ee.textContent:Ee.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 Me(e){return{search:e.sSearch,smart:e.bSmart,regex:e.bRegex,caseInsensitive:e.bCaseInsensitive}}function ke(e){return{sSearch:e.search,bSmart:e.smart,bRegex:e.regex,bCaseInsensitive:e.caseInsensitive}}function Te(t){var n=t.sTableId,r=t.aanFeatures.i,i=e("<div/>",{class:t.oClasses.sInfo,id:r?null:n+"_info"});return r||(t.aoDrawCallback.push({fn:De,sName:"information"}),i.attr("role","status").attr("aria-live","polite"),e(t.nTable).attr("aria-describedby",n+"_info")),i[0]}function De(t){var n=t.aanFeatures.i;if(0!==n.length){var r=t.oLanguage,i=t._iDisplayStart+1,o=t.fnDisplayEnd(),a=t.fnRecordsTotal(),s=t.fnRecordsDisplay(),u=s?r.sInfo:r.sInfoEmpty;s!==a&&(u+=" "+r.sInfoFiltered),u=je(t,u+=r.sInfoPostFix);var l=r.fnInfoCallback;null!==l&&(u=l.call(t.oInstance,t,i,o,a,s,u)),e(n).html(u)}}function je(e,t){var n=e.fnFormatNumber,r=e._iDisplayStart+1,i=e._iDisplayLength,o=e.fnRecordsDisplay(),a=-1===i;return t.replace(/_START_/g,n.call(e,r)).replace(/_END_/g,n.call(e,e.fnDisplayEnd())).replace(/_MAX_/g,n.call(e,e.fnRecordsTotal())).replace(/_TOTAL_/g,n.call(e,o)).replace(/_PAGE_/g,n.call(e,a?1:Math.ceil(r/i))).replace(/_PAGES_/g,n.call(e,a?1:Math.ceil(o/i)))}function Pe(e){var t,n,r,i=e.iInitDisplayStart,o=e.aoColumns,a=e.oFeatures,s=e.bDeferLoading;if(e.bInitialised){for(fe(e),se(e),ue(e,e.aoHeader),ue(e,e.aoFooter),ze(e,!0),a.bAutoWidth&&$e(e),t=0,n=o.length;t<n;t++)(r=o[t]).sWidth&&(r.nTh.style.width=Xe(r.sWidth));pt(e,null,"preInit",[e]),ce(e);var u=vt(e);("ssp"!=u||s)&&("ajax"==u?pe(e,[],(function(n){var r=ye(e,n);for(t=0;t<r.length;t++)V(e,r[t]);e.iInitDisplayStart=i,ce(e),ze(e,!1),Ie(e,n)})):(ze(e,!1),Ie(e)))}else setTimeout((function(){Pe(e)}),200)}function Ie(e,t){e._bInitComplete=!0,(t||e.oInit.aaData)&&F(e),pt(e,null,"plugin-init",[e,t]),pt(e,"aoInitComplete","init",[e,t])}function Re(e,t){var n=parseInt(t,10);e._iDisplayLength=n,mt(e),pt(e,null,"length",[e,n])}function Le(t){for(var n=t.oClasses,r=t.sTableId,i=t.aLengthMenu,o=Array.isArray(i[0]),a=o?i[0]:i,s=o?i[1]:i,u=e("<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]?t.fnFormatNumber(s[l]):s[l],a[l]);var f=e("<div><label/></div>").addClass(n.sLength);return t.aanFeatures.l||(f[0].id=r+"_length"),f.children().append(t.oLanguage.sLengthMenu.replace("_MENU_",u[0].outerHTML)),e("select",f).val(t._iDisplayLength).on("change.DT",(function(n){Re(t,e(this).val()),le(t)})),e(t.nTable).on("length.dt.DT",(function(n,r,i){t===r&&e("select",f).val(i)})),f[0]}function Fe(t){var n=t.sPaginationType,r=u.ext.pager[n],i="function"==typeof r,o=function(e){le(e)},a=e("<div/>").addClass(t.oClasses.sPaging+n)[0],s=t.aanFeatures;return i||r.fnInit(t,a,o),s.p||(a.id=t.sTableId+"_paginate",t.aoDrawCallback.push({fn:function(e){if(i){var t,n,a=e._iDisplayStart,u=e._iDisplayLength,l=e.fnRecordsDisplay(),c=-1===u,f=c?0:Math.ceil(a/u),h=c?1:Math.ceil(l/u),d=r(f,h);for(t=0,n=s.p.length;t<n;t++)gt(e,"pageButton")(e,s.p[t],t,d,f,h)}else r.fnUpdate(e,o)},sName:"pagination"})),a}function Be(e,t,n){var r=e._iDisplayStart,i=e._iDisplayLength,o=e.fnRecordsDisplay();0===o||-1===i?r=0:"number"==typeof t?(r=t*i)>o&&(r=0):"first"==t?r=0:"previous"==t?(r=i>=0?r-i:0)<0&&(r=0):"next"==t?r+i<o&&(r+=i):"last"==t?r=Math.floor((o-1)/i)*i:lt(e,0,"Unknown paging action: "+t,5);var a=e._iDisplayStart!==r;return e._iDisplayStart=r,a&&(pt(e,null,"page",[e]),n&&le(e)),a}function qe(t){return e("<div/>",{id:t.aanFeatures.r?null:t.sTableId+"_processing",class:t.oClasses.sProcessing}).html(t.oLanguage.sProcessing).insertBefore(t.nTable)[0]}function ze(t,n){t.oFeatures.bProcessing&&e(t.aanFeatures.r).css("display",n?"block":"none"),pt(t,null,"processing",[t,n])}function He(t){var n=e(t.nTable),r=t.oScroll;if(""===r.sX&&""===r.sY)return t.nTable;var i=r.sX,o=r.sY,a=t.oClasses,s=n.children("caption"),u=s.length?s[0]._captionSide:null,l=e(n[0].cloneNode(!1)),c=e(n[0].cloneNode(!1)),f=n.children("tfoot"),h="<div/>",d=function(e){return e?Xe(e):null};f.length||(f=null);var p=e(h,{class:a.sScrollWrapper}).append(e(h,{class:a.sScrollHead}).css({overflow:"hidden",position:"relative",border:0,width:i?d(i):"100%"}).append(e(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(e(h,{class:a.sScrollBody}).css({position:"relative",overflow:"auto",width:d(i)}).append(n));f&&p.append(e(h,{class:a.sScrollFoot}).css({overflow:"hidden",border:0,width:i?d(i):"100%"}).append(e(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&&e(v).on("scroll.DT",(function(e){var t=this.scrollLeft;g.scrollLeft=t,f&&(y.scrollLeft=t)})),e(v).css("max-height",o),r.bCollapse||e(v).css("height",o),t.nScrollHead=g,t.nScrollBody=v,t.nScrollFoot=y,t.aoDrawCallback.push({fn:Ue,sName:"scrolling"}),p[0]}function Ue(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=e(n.nScrollHead),b=y[0].style,w=y.children("div"),_=w[0].style,S=w.children("table"),O=n.nScrollBody,N=e(O),E=O.style,C=e(n.nScrollFoot).children("div"),A=C.children("table"),M=e(n.nTHead),k=e(n.nTable),T=k[0],D=T.style,j=n.nTFoot?e(n.nTFoot):null,P=n.oBrowser,I=P.bScrollOversize,R=(x(n.aoColumns,"nTh"),[]),L=[],q=[],z=[],H=function(e){var t=e.style;t.paddingTop="0",t.paddingBottom="0",t.borderTopWidth="0",t.borderBottomWidth="0",t.height=0},U=O.scrollHeight>O.clientHeight;if(n.scrollBarVis!==U&&n.scrollBarVis!==r)return n.scrollBarVis=U,void F(n);n.scrollBarVis=U,k.children("thead, tfoot").remove(),j&&(l=j.clone().prependTo(k),o=j.find("tr"),s=l.find("tr")),u=M.clone().prependTo(k),i=M.find("tr"),a=u.find("tr"),u.find("th, td").removeAttr("tabindex"),p||(E.width="100%",y[0].style.width="100%"),e.each(de(n,u),(function(e,t){c=B(n,e),t.style.width=n.aoColumns[c].sWidth})),j&&We((function(e){e.style.width=""}),s),h=k.outerWidth(),""===p?(D.width="100%",I&&(k.find("tbody").height()>O.offsetHeight||"scroll"==N.css("overflow-y"))&&(D.width=Xe(k.outerWidth()-v)),h=k.outerWidth()):""!==m&&(D.width=Xe(m),h=k.outerWidth()),We(H,a),We((function(n){var r=t.getComputedStyle?t.getComputedStyle(n).width:Xe(e(n).width());q.push(n.innerHTML),R.push(r)}),a),We((function(e,t){e.style.width=R[t]}),i),e(a).height(0),j&&(We(H,s),We((function(t){z.push(t.innerHTML),L.push(Xe(e(t).css("width")))}),s),We((function(e,t){e.style.width=L[t]}),o),e(s).height(0)),We((function(e,t){e.innerHTML='<div class="dataTables_sizing">'+q[t]+"</div>",e.childNodes[0].style.height="0",e.childNodes[0].style.overflow="hidden",e.style.width=R[t]}),a),j&&We((function(e,t){e.innerHTML='<div class="dataTables_sizing">'+z[t]+"</div>",e.childNodes[0].style.height="0",e.childNodes[0].style.overflow="hidden",e.style.width=L[t]}),s),k.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"))&&(D.width=Xe(f-v)),""!==p&&""===m||lt(n,1,"Possible column misalignment",6)):f="100%",E.width=Xe(f),b.width=Xe(f),j&&(n.nScrollFoot.style.width=Xe(f)),g||I&&(E.height=Xe(T.offsetHeight+v));var W=k.outerWidth();S[0].style.width=Xe(W),_.width=Xe(W);var V=k.height()>O.clientHeight||"scroll"==N.css("overflow-y"),$="padding"+(P.bScrollbarLeft?"Left":"Right");_[$]=V?v+"px":"0px",j&&(A[0].style.width=Xe(W),C[0].style.width=Xe(W),C[0].style[$]=V?v+"px":"0px"),k.children("colgroup").insertBefore(k.children("thead")),N.trigger("scroll"),!n.bSorted&&!n.bFiltered||n._drawHold||(O.scrollTop=0)}function We(e,t,n){for(var r,i,o=0,a=0,s=t.length;a<s;){for(r=t[a].firstChild,i=n?n[a].firstChild:null;r;)1===r.nodeType&&(n?e(r,i,o):e(r,o),o++),r=r.nextSibling,i=n?i.nextSibling:null;a++}}var Ve=/<.*?>/g;function $e(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=e("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=Ze(i.sWidthOrig,g),v=!0);if(b||!v&&!c&&!l&&h==z(n)&&h==p.length)for(r=0;r<h;r++){var w=B(n,r);null!==w&&(s[w].sWidth=Xe(p.eq(r).width()))}else{var _=e(a).clone().css("visibility","hidden").removeAttr("id");_.find("tbody tr").remove();var S=e("<tr/>").appendTo(_.find("tbody"));for(_.find("thead, tfoot").remove(),_.append(e(n.nTHead).clone()).append(e(n.nTFoot).clone()),_.find("tfoot th, tfoot td").css("width",""),p=de(n,_.find("thead")[0]),r=0;r<d.length;r++)i=s[d[r]],p[r].style.width=null!==i.sWidthOrig&&""!==i.sWidthOrig?Xe(i.sWidthOrig):"",i.sWidthOrig&&c&&e(p[r]).append(e("<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]],e(Ge(n,o)).clone(!1).append(i.sContentPadding).appendTo(S);e("[name]",_).removeAttr("name");var O=e("<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 E=e(p[r]),C=E.outerWidth()-E.width(),A=y.bBounding?Math.ceil(p[r].getBoundingClientRect().width):E.outerWidth();N+=A,s[d[r]].sWidth=Xe(A-C)}a.style.width=Xe(N),O.remove()}if(m&&(a.style.width=Xe(m)),(m||c)&&!n._reszEvt){var M=function(){e(t).on("resize.DT-"+n.sInstance,Ye((function(){F(n)})))};b?setTimeout(M,1e3):M(),n._reszEvt=!0}}var Ye=u.util.throttle;function Ze(t,r){if(!t)return 0;var i=e("<div/>").css("width",Xe(t)).appendTo(r||n.body),o=i[0].offsetWidth;return i.remove(),o}function Ge(t,n){var r=Ke(t,n);if(r<0)return null;var i=t.aoData[r];return i.nTr?i.anCells[n]:e("<td/>").html(Y(t,r,n,"display"))[0]}function Ke(e,t){for(var n,r=-1,i=-1,o=0,a=e.aoData.length;o<a;o++)(n=(n=(n=Y(e,o,t,"display")+"").replace(Ve,"")).replace(/&nbsp;/g," ")).length>r&&(r=n.length,i=o);return i}function Xe(e){return null===e?"0px":"number"==typeof e?e<0?"0px":e+"px":e.match(/\d$/)?e+"px":e}function Je(t){var n,i,o,a,s,l,c,f=[],h=t.aoColumns,d=t.aaSortingFixed,p=e.isPlainObject(d),m=[],g=function(t){t.length&&!Array.isArray(t[0])?m.push(t):e.merge(m,t)};for(Array.isArray(d)&&g(d),p&&d.pre&&g(d.pre),g(t.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=e.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 Qe(e){var t,n,r,i,o,a=[],s=u.ext.type.order,l=e.aoData,c=(e.aoColumns,0),f=e.aiDisplayMaster;for(U(e),t=0,n=(o=Je(e)).length;t<n;t++)(i=o[t]).formatter&&c++,it(e,i.col);if("ssp"!=vt(e)&&0!==o.length){for(t=0,r=f.length;t<r;t++)a[f[t]]=t;c===o.length?f.sort((function(e,t){var n,r,i,s,u,c=o.length,f=l[e]._aSortData,h=l[t]._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[e])<(r=a[t])?-1:n>r?1:0})):f.sort((function(e,t){var n,r,i,u,c,f=o.length,h=l[e]._aSortData,d=l[t]._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[e])<(r=a[t])?-1:n>r?1:0}))}e.bSorted=!0}function et(e){for(var t,n,r=e.aoColumns,i=Je(e),o=e.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],t=c+("asc"===n?o.sSortAscending:o.sSortDescending)):t=c,f.setAttribute("aria-label",t)}}function tt(t,n,i,o){var a,s=t.aoColumns[n],u=t.aaSorting,l=s.asSorting,c=function(t,n){var i=t._idx;return i===r&&(i=e.inArray(t[1],l)),i+1<l.length?i+1:n?null:0};if("number"==typeof u[0]&&(u=t.aaSorting=[u]),i&&t.oFeatures.bSortMulti){var f=e.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);ce(t),"function"==typeof o&&o(t)}function nt(e,t,n,r){var i=e.aoColumns[n];ht(t,{},(function(t){!1!==i.bSortable&&(e.oFeatures.bProcessing?(ze(e,!0),setTimeout((function(){tt(e,n,t.shiftKey,r),"ssp"!==vt(e)&&ze(e,!1)}),0)):tt(e,n,t.shiftKey,r))}))}function rt(t){var n,r,i,o=t.aLastSort,a=t.oClasses.sSortColumn,s=Je(t),u=t.oFeatures;if(u.bSort&&u.bSortClasses){for(n=0,r=o.length;n<r;n++)i=o[n].src,e(x(t.aoData,"anCells",i)).removeClass(a+(n<2?n+1:3));for(n=0,r=s.length;n<r;n++)i=s[n].src,e(x(t.aoData,"anCells",i)).addClass(a+(n<2?n+1:3))}t.aLastSort=s}function it(e,t){var n,r,i,o=e.aoColumns[t],a=u.ext.order[o.sSortDataType];a&&(n=a.call(e.oInstance,e,t,q(e,t)));for(var s=u.ext.type.order[o.sType+"-pre"],l=0,c=e.aoData.length;l<c;l++)(r=e.aoData[l])._aSortData||(r._aSortData=[]),r._aSortData[t]&&!a||(i=a?n[l]:Y(e,l,t,"sort"),r._aSortData[t]=s?s(i):i)}function ot(t){if(!t._bLoadingState){var n={time:+new Date,start:t._iDisplayStart,length:t._iDisplayLength,order:e.extend(!0,[],t.aaSorting),search:Me(t.oPreviousSearch),columns:e.map(t.aoColumns,(function(e,n){return{visible:e.bVisible,search:Me(t.aoPreSearchCols[n])}}))};t.oSavedState=n,pt(t,"aoStateSaveParams","stateSaveParams",[t,n]),t.oFeatures.bStateSave&&!t.bDestroying&&t.fnStateSaveCallback.call(t.oInstance,t,n)}}function at(e,t,n){if(e.oFeatures.bStateSave){var i=e.fnStateLoadCallback.call(e.oInstance,e,(function(t){st(e,t,n)}));return i!==r&&st(e,i,n),!0}n()}function st(t,n,i){var o,a,s=t.aoColumns;t._bLoadingState=!0;var l=t._bInitComplete?new u.Api(t):null;if(!n||!n.time)return t._bLoadingState=!1,void i();var c=pt(t,"aoStateLoadParams","stateLoadParams",[t,n]);if(-1!==e.inArray(!1,c))return t._bLoadingState=!1,void i();var f=t.iStateDuration;if(f>0&&n.time<+new Date-1e3*f)return t._bLoadingState=!1,void i();if(n.columns&&s.length!==n.columns.length)return t._bLoadingState=!1,void i();if(t.oLoadedState=e.extend(!0,{},n),n.start!==r&&(t._iDisplayStart=n.start,null===l&&(t.iInitDisplayStart=n.start)),n.length!==r&&(t._iDisplayLength=n.length),n.order!==r&&(t.aaSorting=[],e.each(n.order,(function(e,n){t.aaSorting.push(n[0]>=s.length?[0,n[1]]:n)}))),n.search!==r&&e.extend(t.oPreviousSearch,ke(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&&e.extend(t.aoPreSearchCols[o],ke(h.search))}l&&l.columns.adjust()}t._bLoadingState=!1,pt(t,"aoStateLoaded","stateLoaded",[t,n]),i()}function ut(t){var n=u.settings,r=e.inArray(t,x(n,"nTable"));return-1!==r?n[r]:null}function lt(e,n,r,i){if(r="DataTables warning: "+(e?"table id="+e.sTableId+" - ":"")+r,i&&(r+=". For more information about this error, please see http://datatables.net/tn/"+i),n)t.console&&console.log&&console.log(r);else{var o=u.ext,a=o.sErrMode||o.errMode;if(e&&pt(e,null,"error",[e,i,r]),"alert"==a)alert(r);else{if("throw"==a)throw new Error(r);"function"==typeof a&&a(e,i,r)}}}function ct(t,n,i,o){Array.isArray(i)?e.each(i,(function(e,r){Array.isArray(r)?ct(t,n,r[0],r[1]):ct(t,n,r)})):(o===r&&(o=i),n[i]!==r&&(t[o]=n[i]))}function ft(t,n,r){var i;for(var o in n)n.hasOwnProperty(o)&&(i=n[o],e.isPlainObject(i)?(e.isPlainObject(t[o])||(t[o]={}),e.extend(!0,t[o],i)):r&&"data"!==o&&"aaData"!==o&&Array.isArray(i)?t[o]=i.slice():t[o]=i);return t}function ht(t,n,r){e(t).on("click.DT",n,(function(n){e(t).trigger("blur"),r(n)})).on("keypress.DT",n,(function(e){13===e.which&&(e.preventDefault(),r(e))})).on("selectstart.DT",(function(){return!1}))}function dt(e,t,n,r){n&&e[t].push({fn:n,sName:r})}function pt(t,n,r,i){var o=[];if(n&&(o=e.map(t[n].slice().reverse(),(function(e,n){return e.fn.apply(t.oInstance,i)}))),null!==r){var a=e.Event(r+".dt");e(t.nTable).trigger(a,i),o.push(a.result)}return o}function mt(e){var t=e._iDisplayStart,n=e.fnDisplayEnd(),r=e._iDisplayLength;t>=n&&(t=n-r),t-=t%r,(-1===r||t<0)&&(t=0),e._iDisplayStart=t}function gt(t,n){var r=t.renderer,i=u.ext.renderer[n];return e.isPlainObject(r)&&r[n]?i[r[n]]||i._:"string"==typeof r&&i[r]||i._}function vt(e){return e.oFeatures.bServerSide?"ssp":e.ajax||e.sAjaxSource?"ajax":"dom"}var yt=[],bt=Array.prototype;o=function(t,n){if(!(this instanceof o))return new o(t,n);var r=[],i=function(t){var n=function(t){var n,r,i=u.settings,o=e.map(i,(function(e,t){return e.nTable}));return t?t.nTable&&t.oApi?[t]:t.nodeName&&"table"===t.nodeName.toLowerCase()?-1!==(n=e.inArray(t,o))?[i[n]]:null:t&&"function"==typeof t.settings?t.settings().toArray():("string"==typeof t?r=e(t):t instanceof e&&(r=t),r?r.map((function(t){return-1!==(n=e.inArray(this,o))?i[n]:null})).toArray():void 0):[]}(t);n&&r.push.apply(r,n)};if(Array.isArray(t))for(var a=0,s=t.length;a<s;a++)i(t[a]);else i(t);this.context=N(r),n&&e.merge(this,n),this.selector={rows:null,cols:null,opts:null},o.extend(this,this,yt)},u.Api=o,e.extend(o.prototype,{any:function(){return 0!==this.count()},concat:bt.concat,context:[],count:function(){return this.flatten().length},each:function(e){for(var t=0,n=this.length;t<n;t++)e.call(this,this[t],t,this);return this},eq:function(e){var t=this.context;return t.length>e?new o(t[e],this[e]):null},filter:function(e){var t=[];if(bt.filter)t=bt.filter.call(this,e,this);else for(var n=0,r=this.length;n<r;n++)e.call(this,this[n],n,this)&&t.push(this[n]);return new o(this.context,t)},flatten:function(){var e=[];return new o(this.context,e.concat.apply(e,this.toArray()))},join:bt.join,indexOf:bt.indexOf||function(e,t){for(var n=t||0,r=this.length;n<r;n++)if(this[n]===e)return n;return-1},iterator:function(e,t,n,i){var a,s,u,l,c,f,h,d,p=[],m=this.context,g=this.selector;for("string"==typeof e&&(i=n,n=t,t=e,e=!1),s=0,u=m.length;s<u;s++){var v=new o(m[s]);if("table"===t)(a=n.call(v,m[s],s))!==r&&p.push(a);else if("columns"===t||"rows"===t)(a=n.call(v,m[s],this[s],s))!==r&&p.push(a);else if("column"===t||"column-rows"===t||"row"===t||"cell"===t)for(h=this[s],"column-rows"===t&&(f=Nt(m[s],g.opts)),l=0,c=h.length;l<c;l++)d=h[l],(a="cell"===t?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,e?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:bt.lastIndexOf||function(e,t){return this.indexOf.apply(this.toArray.reverse(),arguments)},length:0,map:function(e){var t=[];if(bt.map)t=bt.map.call(this,e,this);else for(var n=0,r=this.length;n<r;n++)t.push(e.call(this,this[n],n));return new o(this.context,t)},pluck:function(e){return this.map((function(t){return t[e]}))},pop:bt.pop,push:bt.push,reduce:bt.reduce||function(e,t){return I(this,e,t,0,this.length,1)},reduceRight:bt.reduceRight||function(e,t){return I(this,e,t,this.length-1,-1,-1)},reverse:bt.reverse,selector:null,shift:bt.shift,slice:function(){return new o(this.context,this)},sort:bt.sort,splice:bt.splice,toArray:function(){return bt.slice.call(this)},to$:function(){return e(this)},toJQuery:function(){return e(this)},unique:function(){return new o(this.context,N(this))},unshift:bt.unshift}),o.extend=function(e,t,n){if(n.length&&t&&(t instanceof o||t.__dt_wrapper)){var r,i,a,s=function(e,t,n){return function(){var r=t.apply(e,arguments);return o.extend(r,r,n.methodExt),r}};for(r=0,i=n.length;r<i;r++)t[(a=n[r]).name]="function"===a.type?s(e,a.val,a):"object"===a.type?{}:a.val,t[a.name].__dt_wrapper=!0,o.extend(e,t[a.name],a.propExt)}},o.register=a=function(t,n){if(Array.isArray(t))for(var r=0,i=t.length;r<i;r++)o.register(t[r],n);else{var a,s,u,l,c=t.split("."),f=yt,h=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n].name===t)return e[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":e.isPlainObject(n)?"object":"other"):f=l?d.methodExt:d.propExt}}},o.registerPlural=s=function(e,t,n){o.register(e,n),o.register(t,(function(){var e=n.apply(this,arguments);return e===this?this:e instanceof o?e.length?Array.isArray(e[0])?new o(e.context,e[0]):e[0]:r:e}))};var xt=function(t,n){if(Array.isArray(t))return e.map(t,(function(e){return xt(e,n)}));if("number"==typeof t)return[n[t]];var r=e.map(n,(function(e,t){return e.nTable}));return e(r).filter(t).map((function(t){var i=e.inArray(this,r);return n[i]})).toArray()};a("tables()",(function(e){return e!==r&&null!==e?new o(xt(e,this.context)):this})),a("table()",(function(e){var t=this.tables(e),n=t.context;return n.length?new o(n[0]):t})),s("tables().nodes()","table().node()",(function(){return this.iterator("table",(function(e){return e.nTable}),1)})),s("tables().body()","table().body()",(function(){return this.iterator("table",(function(e){return e.nTBody}),1)})),s("tables().header()","table().header()",(function(){return this.iterator("table",(function(e){return e.nTHead}),1)})),s("tables().footer()","table().footer()",(function(){return this.iterator("table",(function(e){return e.nTFoot}),1)})),s("tables().containers()","table().container()",(function(){return this.iterator("table",(function(e){return e.nTableWrapper}),1)})),a("draw()",(function(e){return this.iterator("table",(function(t){"page"===e?le(t):("string"==typeof e&&(e="full-hold"!==e),ce(t,!1===e))}))})),a("page()",(function(e){return e===r?this.page.info().page:this.iterator("table",(function(t){Be(t,e)}))})),a("page.info()",(function(e){if(0===this.context.length)return r;var t=this.context[0],n=t._iDisplayStart,i=t.oFeatures.bPaginate?t._iDisplayLength:-1,o=t.fnRecordsDisplay(),a=-1===i;return{page:a?0:Math.floor(n/i),pages:a?1:Math.ceil(o/i),start:n,end:t.fnDisplayEnd(),length:i,recordsTotal:t.fnRecordsTotal(),recordsDisplay:o,serverSide:"ssp"===vt(t)}})),a("page.len()",(function(e){return e===r?0!==this.context.length?this.context[0]._iDisplayLength:r:this.iterator("table",(function(t){Re(t,e)}))}));var wt=function(e,t,n){if(n){var r=new o(e);r.one("draw",(function(){n(r.ajax.json())}))}if("ssp"==vt(e))ce(e,t);else{ze(e,!0);var i=e.jqXHR;i&&4!==i.readyState&&i.abort(),pe(e,[],(function(n){te(e);for(var r=ye(e,n),i=0,o=r.length;i<o;i++)V(e,r[i]);ce(e,t),ze(e,!1)}))}};a("ajax.json()",(function(){var e=this.context;if(e.length>0)return e[0].json})),a("ajax.params()",(function(){var e=this.context;if(e.length>0)return e[0].oAjaxData})),a("ajax.reload()",(function(e,t){return this.iterator("table",(function(n){wt(n,!1===t,e)}))})),a("ajax.url()",(function(t){var n=this.context;return t===r?0===n.length?r:(n=n[0]).ajax?e.isPlainObject(n.ajax)?n.ajax.url:n.ajax:n.sAjaxSource:this.iterator("table",(function(n){e.isPlainObject(n.ajax)?n.ajax.url=t:n.ajax=t}))})),a("ajax.url().load()",(function(e,t){return this.iterator("table",(function(n){wt(n,!1===t,e)}))}));var _t=function(e,t,n,o,a){var s,u,l,c,f,h,d=[],p=typeof t;for(t&&"string"!==p&&"function"!==p&&t.length!==r||(t=[t]),l=0,c=t.length;l<c;l++)for(f=0,h=(u=t[l]&&t[l].split&&!t[l].match(/[\[\(:]/)?t[l].split(","):[t[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[e];if(m.length)for(l=0,c=m.length;l<c;l++)d=m[l](o,a,d);return N(d)},St=function(t){return t||(t={}),t.filter&&t.search===r&&(t.search=t.filter),e.extend({search:"none",order:"current",page:"all"},t)},Ot=function(e){for(var t=0,n=e.length;t<n;t++)if(e[t].length>0)return e[0]=e[t],e[0].length=1,e.length=1,e.context=[e.context[t]],e;return e.length=0,e},Nt=function(t,n){var r,i=[],o=t.aiDisplay,a=t.aiDisplayMaster,s=n.search,u=n.order,l=n.page;if("ssp"==vt(t))return"removed"===s?[]:_(0,a.length);if("current"==l)for(f=t._iDisplayStart,h=t.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=e.map(a,(function(e){return c.hasOwnProperty(e)?null:e}))}}else if("index"==u||"original"==u)for(f=0,h=t.aoData.length;f<h;f++)("none"==s||-1===(r=e.inArray(f,o))&&"removed"==s||r>=0&&"applied"==s)&&i.push(f);return i};a("rows()",(function(t,n){t===r?t="":e.isPlainObject(t)&&(n=t,t=""),n=St(n);var i=this.iterator("table",(function(i){return function(t,n,i){var o;return _t("row",n,(function(n){var a=g(n),s=t.aoData;if(null!==a&&!i)return[a];if(o||(o=Nt(t,i)),null!==a&&-1!==e.inArray(a,o))return[a];if(null===n||n===r||""===n)return o;if("function"==typeof n)return e.map(o,(function(e){var t=s[e];return n(e,t._aData,t.nTr)?e: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=e(n).closest("*[data-dt-row]");return c.length?[c.data("dt-row")]:[]}if("string"==typeof n&&"#"===n.charAt(0)){var f=t.aIds[n.replace(/^#/,"")];if(f!==r)return[f.idx]}var h=S(w(t.aoData,o,"nTr"));return e(h).filter(n).map((function(){return this._DT_RowIndex})).toArray()}),t,i)}(i,t,n)}),1);return i.selector.rows=t,i.selector.opts=n,i})),a("rows().nodes()",(function(){return this.iterator("row",(function(e,t){return e.aoData[t].nTr||r}),1)})),a("rows().data()",(function(){return this.iterator(!0,"rows",(function(e,t){return w(e.aoData,t,"_aData")}),1)})),s("rows().cache()","row().cache()",(function(e){return this.iterator("row",(function(t,n){var r=t.aoData[n];return"search"===e?r._aFilterData:r._aSortData}),1)})),s("rows().invalidate()","row().invalidate()",(function(e){return this.iterator("row",(function(t,n){re(t,n,e)}))})),s("rows().indexes()","row().index()",(function(){return this.iterator("row",(function(e,t){return t}),1)})),s("rows().ids()","row().id()",(function(e){for(var t=[],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);t.push((!0===e?"#":"")+u)}return new o(n,t)})),s("rows().remove()","row().remove()",(function(){var e=this;return this.iterator("row",(function(t,n,i){var o,a,s,u,l,c,f=t.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;ne(t.aiDisplayMaster,n),ne(t.aiDisplay,n),ne(e[i],n,!1),t._iRecordsDisplay>0&&t._iRecordsDisplay--,mt(t);var d=t.rowIdFn(h._aData);d!==r&&delete t.aIds[d]})),this.iterator("table",(function(e){for(var t=0,n=e.aoData.length;t<n;t++)e.aoData[t].idx=t})),this})),a("rows.add()",(function(t){var n=this.iterator("table",(function(e){var n,r,i,o=[];for(r=0,i=t.length;r<i;r++)(n=t[r]).nodeName&&"TR"===n.nodeName.toUpperCase()?o.push($(e,n)[0]):o.push(V(e,n));return o}),1),r=this.rows(-1);return r.pop(),e.merge(r,n),r})),a("row()",(function(e,t){return Ot(this.rows(e,t))})),a("row().data()",(function(e){var t=this.context;if(e===r)return t.length&&this.length?t[0].aoData[this[0]]._aData:r;var n=t[0].aoData[this[0]];return n._aData=e,Array.isArray(e)&&n.nTr&&n.nTr.id&&Q(t[0].rowId)(e,n.nTr.id),re(t[0],this[0],"data"),this})),a("row().node()",(function(){var e=this.context;return e.length&&this.length&&e[0].aoData[this[0]].nTr||null})),a("row.add()",(function(t){t instanceof e&&t.length&&(t=t[0]);var n=this.iterator("table",(function(e){return t.nodeName&&"TR"===t.nodeName.toUpperCase()?$(e,t)[0]:V(e,t)}));return this.row(n[0])})),e(n).on("plugin-init.dt",(function(e,t){var n=new o(t);n.on("stateSaveParams",(function(e,t,i){var o=n.rows().iterator("row",(function(e,t){return e.aoData[t]._detailsShow?t:r}));i.childRows=n.rows(o).ids(!0).toArray()}));var i=n.state.loaded();i&&i.childRows&&n.rows(i.childRows).every((function(){pt(t,null,"requestChild",[this])}))}));var Et=function(t,n){var i=t.context;if(i.length){var o=i[0].aoData[n!==r?n:t[0]];o&&o._details&&(o._details.remove(),o._detailsShow=r,o._details=r,e(o.nTr).removeClass("dt-hasChild"),ot(i[0]))}},Ct=function(t,n){var r=t.context;if(r.length&&t.length){var i=r[0].aoData[t[0]];i._details&&(i._detailsShow=n,n?(i._details.insertAfter(i.nTr),e(i.nTr).addClass("dt-hasChild")):(i._details.detach(),e(i.nTr).removeClass("dt-hasChild")),pt(r[0],null,"childRow",[n,t.row(t[0])]),At(r[0]),ot(r[0]))}},At=function(e){var t=new o(e),n=".dt.DT_details",r="draw"+n,i="column-visibility"+n,a="destroy"+n,s=e.aoData;t.off(r+" "+i+" "+a),x(s,"_details").length>0&&(t.on(r,(function(n,r){e===r&&t.rows({page:"current"}).eq(0).each((function(e){var t=s[e];t._detailsShow&&t._details.insertAfter(t.nTr)}))})),t.on(i,(function(t,n,r,i){if(e===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)})),t.on(a,(function(n,r){if(e===r)for(var i=0,o=s.length;i<o;i++)s[i]._details&&Et(t,i)})))},Mt="row().child",kt=Mt+"()";a(kt,(function(t,n){var i=this.context;return t===r?i.length&&this.length?i[0].aoData[this[0]]._details:r:(!0===t?this.child.show():!1===t?Et(this):i.length&&this.length&&function(t,n,r,i){var o=[],a=function(n,r){if(Array.isArray(n)||n instanceof e)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=e("<tr><td></td></tr>").addClass(r);e("td",u).addClass(r).html(n)[0].colSpan=z(t),o.push(u[0])}};a(r,i),n._details&&n._details.detach(),n._details=e(o),n._detailsShow&&n._details.insertAfter(n.nTr)}(i[0],i[0].aoData[this[0]],t,n),this)})),a([Mt+".show()",kt+".show()"],(function(e){return Ct(this,!0),this})),a([Mt+".hide()",kt+".hide()"],(function(){return Ct(this,!1),this})),a([Mt+".remove()",kt+".remove()"],(function(){return Et(this),this})),a(Mt+".isShown()",(function(){var e=this.context;return e.length&&this.length&&e[0].aoData[this[0]]._detailsShow||!1}));var Tt=/^([^:]+):(name|visIdx|visible)$/,Dt=function(e,t,n,r,i){for(var o=[],a=0,s=i.length;a<s;a++)o.push(Y(e,i[a],t));return o};a("columns()",(function(t,n){t===r?t="":e.isPlainObject(t)&&(n=t,t=""),n=St(n);var i=this.iterator("table",(function(r){return function(t,n,r){var i=t.aoColumns,o=x(i,"sName"),a=x(i,"nTh");return _t("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=Nt(t,r);return e.map(i,(function(e,r){return n(r,Dt(t,r,0,0,u),a[r])?r:null}))}var l="string"==typeof n?n.match(Tt):"";if(l)switch(l[2]){case"visIdx":case"visible":var c=parseInt(l[1],10);if(c<0){var f=e.map(i,(function(e,t){return e.bVisible?t:null}));return[f[f.length+c]]}return[B(t,c)];case"name":return e.map(o,(function(e,t){return e===l[1]?t:null}));default:return[]}if(n.nodeName&&n._DT_CellIndex)return[n._DT_CellIndex.column];var h=e(a).filter(n).map((function(){return e.inArray(this,a)})).toArray();if(h.length||!n.nodeName)return h;var d=e(n).closest("*[data-dt-column]");return d.length?[d.data("dt-column")]:[]}),t,r)}(r,t,n)}),1);return i.selector.cols=t,i.selector.opts=n,i})),s("columns().header()","column().header()",(function(e,t){return this.iterator("column",(function(e,t){return e.aoColumns[t].nTh}),1)})),s("columns().footer()","column().footer()",(function(e,t){return this.iterator("column",(function(e,t){return e.aoColumns[t].nTf}),1)})),s("columns().data()","column().data()",(function(){return this.iterator("column-rows",Dt,1)})),s("columns().dataSrc()","column().dataSrc()",(function(){return this.iterator("column",(function(e,t){return e.aoColumns[t].mData}),1)})),s("columns().cache()","column().cache()",(function(e){return this.iterator("column-rows",(function(t,n,r,i,o){return w(t.aoData,o,"search"===e?"_aFilterData":"_aSortData",n)}),1)})),s("columns().nodes()","column().nodes()",(function(){return this.iterator("column-rows",(function(e,t,n,r,i){return w(e.aoData,i,"anCells",t)}),1)})),s("columns().visible()","column().visible()",(function(t,n){var i=this,o=this.iterator("column",(function(n,i){if(t===r)return n.aoColumns[i].bVisible;!function(t,n,i){var o,a,s,u,l=t.aoColumns,c=l[n],f=t.aoData;if(i===r)return c.bVisible;if(c.bVisible!==i){if(i){var h=e.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 e(x(t.aoData,"anCells",n)).detach();c.bVisible=i}}(n,i,t)}));return t!==r&&this.iterator("table",(function(o){ue(o,o.aoHeader),ue(o,o.aoFooter),o.aiDisplay.length||e(o.nTBody).find("td[colspan]").attr("colspan",z(o)),ot(o),i.iterator("column",(function(e,r){pt(e,null,"column-visibility",[e,r,t,n])})),(n===r||n)&&i.columns.adjust()})),o})),s("columns().indexes()","column().index()",(function(e){return this.iterator("column",(function(t,n){return"visible"===e?q(t,n):n}),1)})),a("columns.adjust()",(function(){return this.iterator("table",(function(e){F(e)}),1)})),a("column.index()",(function(e,t){if(0!==this.context.length){var n=this.context[0];if("fromVisible"===e||"toData"===e)return B(n,t);if("fromData"===e||"toVisible"===e)return q(n,t)}})),a("column()",(function(e,t){return Ot(this.columns(e,t))}));a("cells()",(function(t,n,i){if(e.isPlainObject(t)&&(t.row===r?(i=t,t=null):(i=n,n=null)),e.isPlainObject(n)&&(i=n,n=null),null===n||n===r)return this.iterator("table",(function(n){return function(t,n,i){var o,a,s,u,l,c,f,h=t.aoData,d=Nt(t,i),p=S(w(h,d,"anCells")),m=e(E([],p)),g=t.aoColumns.length;return _t("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(t,o,l),f.anCells?f.anCells[l]:null)&&a.push(c)):a.push(c);return a}if(e.isPlainObject(n))return n.column!==r&&n.row!==r&&-1!==e.inArray(n.row,d)?[n]:[];var p=m.filter(n).map((function(e,t){return{row:t._DT_CellIndex.row,column:t._DT_CellIndex.column}})).toArray();return p.length||!n.nodeName?p:(f=e(n).closest("*[data-dt-row]")).length?[{row:f.data("dt-row"),column:f.data("dt-column")}]:[]}),t,i)}(n,t,St(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(t,l),h=this.iterator("table",(function(e,t){var n=[];for(o=0,a=f[t].length;o<a;o++)for(s=0,u=c[t].length;s<u;s++)n.push({row:f[t][o],column:c[t][s]});return n}),1),d=i&&i.selected?this.cells(h,i):h;return e.extend(d.selector,{cols:n,rows:t,opts:i}),d})),s("cells().nodes()","cell().node()",(function(){return this.iterator("cell",(function(e,t,n){var i=e.aoData[t];return i&&i.anCells?i.anCells[n]:r}),1)})),a("cells().data()",(function(){return this.iterator("cell",(function(e,t,n){return Y(e,t,n)}),1)})),s("cells().cache()","cell().cache()",(function(e){return e="search"===e?"_aFilterData":"_aSortData",this.iterator("cell",(function(t,n,r){return t.aoData[n][e][r]}),1)})),s("cells().render()","cell().render()",(function(e){return this.iterator("cell",(function(t,n,r){return Y(t,n,r,e)}),1)})),s("cells().indexes()","cell().index()",(function(){return this.iterator("cell",(function(e,t,n){return{row:t,column:n,columnVisible:q(e,n)}}),1)})),s("cells().invalidate()","cell().invalidate()",(function(e){return this.iterator("cell",(function(t,n,r){re(t,n,e,r)}))})),a("cell()",(function(e,t,n){return Ot(this.cells(e,t,n))})),a("cell().data()",(function(e){var t=this.context,n=this[0];return e===r?t.length&&n.length?Y(t[0],n[0].row,n[0].column):r:(Z(t[0],n[0].row,n[0].column,e),re(t[0],n[0].row,"data",n[0].column),this)})),a("order()",(function(e,t){var n=this.context;return e===r?0!==n.length?n[0].aaSorting:r:("number"==typeof e?e=[[e,t]]:e.length&&!Array.isArray(e[0])&&(e=Array.prototype.slice.call(arguments)),this.iterator("table",(function(t){t.aaSorting=e.slice()})))})),a("order.listener()",(function(e,t,n){return this.iterator("table",(function(r){nt(r,e,t,n)}))})),a("order.fixed()",(function(t){if(!t){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=e.extend(!0,{},t)}))})),a(["columns().order()","column().order()"],(function(t){var n=this;return this.iterator("table",(function(r,i){var o=[];e.each(n[i],(function(e,n){o.push([n,t])})),r.aaSorting=o}))})),a("search()",(function(t,n,i,o){var a=this.context;return t===r?0!==a.length?a[0].oPreviousSearch.sSearch:r:this.iterator("table",(function(r){r.oFeatures.bFilter&&xe(r,e.extend({},r.oPreviousSearch,{sSearch:t+"",bRegex:null!==n&&n,bSmart:null===i||i,bCaseInsensitive:null===o||o}),1)}))})),s("columns().search()","column().search()",(function(t,n,i,o){return this.iterator("column",(function(a,s){var u=a.aoPreSearchCols;if(t===r)return u[s].sSearch;a.oFeatures.bFilter&&(e.extend(u[s],{sSearch:t+"",bRegex:null!==n&&n,bSmart:null===i||i,bCaseInsensitive:null===o||o}),xe(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(e){e.fnStateSaveCallback.call(e.oInstance,e,{})}))})),a("state.loaded()",(function(){return this.context.length?this.context[0].oLoadedState:null})),a("state.save()",(function(){return this.iterator("table",(function(e){ot(e)}))})),u.versionCheck=u.fnVersionCheck=function(e){for(var t,n,r=u.version.split("."),i=e.split("."),o=0,a=i.length;o<a;o++)if((t=parseInt(r[o],10)||0)!==(n=parseInt(i[o],10)||0))return t>n;return!0},u.isDataTable=u.fnIsDataTable=function(t){var n=e(t).get(0),r=!1;return t instanceof u.Api||(e.each(u.settings,(function(t,i){var o=i.nScrollHead?e("table",i.nScrollHead)[0]:null,a=i.nScrollFoot?e("table",i.nScrollFoot)[0]:null;i.nTable!==n&&o!==n&&a!==n||(r=!0)})),r)},u.tables=u.fnTables=function(t){var n=!1;e.isPlainObject(t)&&(n=t.api,t=t.visible);var r=e.map(u.settings,(function(n){if(!t||t&&e(n.nTable).is(":visible"))return n.nTable}));return n?new o(r):r},u.camelToHungarian=M,a("$()",(function(t,n){var r=this.rows(n).nodes(),i=e(r);return e([].concat(i.filter(t).toArray(),i.find(t).toArray()))})),e.each(["on","one","off"],(function(t,n){a(n+"()",(function(){var t=Array.prototype.slice.call(arguments);t[0]=e.map(t[0].split(/\s/),(function(e){return e.match(/\.dt\b/)?e:e+".dt"})).join(" ");var r=e(this.tables().nodes());return r[n].apply(r,t),this}))})),a("clear()",(function(){return this.iterator("table",(function(e){te(e)}))})),a("settings()",(function(){return new o(this.context,this.context)})),a("init()",(function(){var e=this.context;return e.length?e[0].oInit:null})),a("data()",(function(){return this.iterator("table",(function(e){return x(e.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=e(l),p=e(c),m=e(r.nTableWrapper),g=e.map(r.aoData,(function(e){return e.nTr}));r.bDestroying=!0,pt(r,"aoDestroyCallback","destroy",[r]),n||new o(r).columns().visible(!0),m.off(".DT").find(":not(tbody *)").off(".DT"),e(t).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=[],rt(r),e(g).removeClass(r.asStripeClasses.join(" ")),e("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(t){e(this).addClass(r.asDestroyStripes[t%i])})));var y=e.inArray(r,u.settings);-1!==y&&u.settings.splice(y,1)}))})),e.each(["column","row","cell"],(function(e,t){a(t+"s().every()",(function(e){var n=this.selector.opts,i=this;return this.iterator(t,(function(o,a,s,u,l){e.call(i[t](a,"cell"===t?s:n,"cell"===t?n:r),a,s,u,l)}))}))})),a("i18n()",(function(t,n,i){var o=this.context[0],a=J(t)(o.oLanguage);return a===r&&(a=n),i!==r&&e.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(e){return e.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(e){try{return JSON.parse((-1===e.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+e.sInstance+"_"+location.pathname))}catch(e){return{}}},fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(e,t){try{(-1===e.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+e.sInstance+"_"+location.pathname,JSON.stringify(t))}catch(e){}},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:e.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"},A(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},A(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"==vt(this)?1*this._iRecordsTotal:this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==vt(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var e=this._iDisplayLength,t=this._iDisplayStart,n=t+e,r=this.aiDisplay.length,i=this.oFeatures,o=i.bPaginate;return i.bServerSide?!1===o||-1===e?t+r:Math.min(t+e,this._iRecordsDisplay):!o||n>r||-1===e?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},e.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}),e.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 jt=u.ext.pager;function Pt(e,t){var n=[],r=jt.numbers_length,i=Math.floor(r/2);return t<=r?n=_(0,t):e<=i?((n=_(0,r-2)).push("ellipsis"),n.push(t-1)):e>=t-1-i?((n=_(t-(r-2),t)).splice(0,0,"ellipsis"),n.splice(0,0,0)):((n=_(e-i+2,e+i-1)).push("ellipsis"),n.push(t-1),n.splice(0,0,"ellipsis"),n.splice(0,0,0)),n.DT_el="span",n}e.extend(jt,{simple:function(e,t){return["previous","next"]},full:function(e,t){return["first","previous","next","last"]},numbers:function(e,t){return[Pt(e,t)]},simple_numbers:function(e,t){return["previous",Pt(e,t),"next"]},full_numbers:function(e,t){return["first","previous",Pt(e,t),"next","last"]},first_last_numbers:function(e,t){return["first",Pt(e,t),"last"]},_numbers:Pt,numbers_length:7}),e.extend(!0,u.ext.renderer,{pageButton:{_:function(t,i,o,a,s,u){var l,c,f,h=t.oClasses,d=t.oLanguage.oPaginate,p=t.oLanguage.oAria.paginate||{},m=0,g=function(n,r){var i,a,f,v,y=h.sPageButtonDisabled,b=function(e){Be(t,e.data.action,!0)};for(i=0,a=r.length;i<a;i++)if(f=r[i],Array.isArray(f)){var x=e("<"+(f.DT_el||"div")+"/>").appendTo(n);g(x,f)}else{switch(l=null,c=f,v=t.iTabIndex,f){case"ellipsis":n.append('<span class="ellipsis">&#x2026;</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=t.fnFormatNumber(f+1),c=s===f?h.sPageButtonActive:""}null!==l&&(ht(e("<a>",{class:h.sPageButton+" "+c,"aria-controls":t.sTableId,"aria-label":p[f],"data-dt-idx":m,tabindex:v,id:0===o&&"string"==typeof f?t.sTableId+"_"+f:null}).html(l).appendTo(n),{action:f},b),m++)}};try{f=e(i).find(n.activeElement).data("dt-idx")}catch(e){}g(e(i).empty(),a),f!==r&&e(i).find("[data-dt-idx="+f+"]").trigger("focus")}}}),e.extend(u.ext.type.detect,[function(e,t){var n=t.oLanguage.sDecimal;return y(e,n)?"num"+n:null},function(e,t){if(e&&!(e instanceof Date)&&!h.test(e))return null;var n=Date.parse(e);return null!==n&&!isNaN(n)||m(e)?"date":null},function(e,t){var n=t.oLanguage.sDecimal;return y(e,n,!0)?"num-fmt"+n:null},function(e,t){var n=t.oLanguage.sDecimal;return b(e,n)?"html-num"+n:null},function(e,t){var n=t.oLanguage.sDecimal;return b(e,n,!0)?"html-num-fmt"+n:null},function(e,t){return m(e)||"string"==typeof e&&-1!==e.indexOf("<")?"html":null}]),e.extend(u.ext.type.search,{html:function(e){return m(e)?e:"string"==typeof e?e.replace(c," ").replace(f,""):""},string:function(e){return m(e)?e:"string"==typeof e?e.replace(c," "):e}});var It=function(e,t,n,r){return 0===e||e&&"-"!==e?(t&&(e=v(e,t)),e.replace&&(n&&(e=e.replace(n,"")),r&&(e=e.replace(r,""))),1*e):-1/0};function Rt(t){e.each({num:function(e){return It(e,t)},"num-fmt":function(e){return It(e,t,p)},"html-num":function(e){return It(e,t,f)},"html-num-fmt":function(e){return It(e,t,f,p)}},(function(e,n){i.type.order[e+t+"-pre"]=n,e.match(/^html\-/)&&(i.type.search[e+t]=i.type.search.html)}))}e.extend(i.type.order,{"date-pre":function(e){var t=Date.parse(e);return isNaN(t)?-1/0:t},"html-pre":function(e){return m(e)?"":e.replace?e.replace(/<.*?>/g,"").toLowerCase():e+""},"string-pre":function(e){return m(e)?"":"string"==typeof e?e.toLowerCase():e.toString?e.toString():""},"string-asc":function(e,t){return e<t?-1:e>t?1:0},"string-desc":function(e,t){return e<t?1:e>t?-1:0}}),Rt(""),e.extend(!0,u.ext.renderer,{header:{_:function(t,n,r,i){e(t.nTable).on("order.dt.DT",(function(e,o,a,s){if(t===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(t,n,r,i){e("<div/>").addClass(i.sSortJUIWrapper).append(n.contents()).append(e("<span/>").addClass(i.sSortIcon+" "+r.sSortingClassJUI)).appendTo(n),e(t.nTable).on("order.dt.DT",(function(e,o,a,s){if(t===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 Lt=function(e){return Array.isArray(e)&&(e=e.join(",")),"string"==typeof e?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"):e};function Ft(e){return function(){var t=[ut(this[u.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return u.ext.internal[e].apply(this,t)}}return u.render={number:function(e,t,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 Lt(o);s=s.toFixed(n),o=Math.abs(s);var u=parseInt(o,10),l=n?t+(o-u).toFixed(n).substring(2):"";return 0===u&&0===parseFloat(l)&&(a=""),a+(r||"")+u.toString().replace(/\B(?=(\d{3})+(?!\d))/g,e)+l+(i||"")}}},text:function(){return{display:Lt,filter:Lt}}},e.extend(u.ext.internal,{_fnExternApiFunc:Ft,_fnBuildAjax:pe,_fnAjaxUpdate:me,_fnAjaxParameters:ge,_fnAjaxUpdateDraw:ve,_fnAjaxDataSrc:ye,_fnAddColumn:R,_fnColumnOptions:L,_fnAdjustColumnSizing:F,_fnVisibleToColumnIndex:B,_fnColumnIndexToVisible:q,_fnVisbleColumns:z,_fnGetColumns:H,_fnColumnTypes:U,_fnApplyColumnDefs:W,_fnHungarianMap:A,_fnCamelToHungarian:M,_fnLanguageCompat:k,_fnBrowserDetect:P,_fnAddData:V,_fnAddTr:$,_fnNodeToDataIndex:function(e,t){return t._DT_RowIndex!==r?t._DT_RowIndex:null},_fnNodeToColumnIndex:function(t,n,r){return e.inArray(r,t.aoData[n].anCells)},_fnGetCellData:Y,_fnSetCellData:Z,_fnSplitObjNotation:X,_fnGetObjectDataFn:J,_fnSetObjectDataFn:Q,_fnGetDataMaster:ee,_fnClearTable:te,_fnDeleteIndex:ne,_fnInvalidate:re,_fnGetRowElements:ie,_fnCreateTr:oe,_fnBuildHead:se,_fnDrawHead:ue,_fnDraw:le,_fnReDraw:ce,_fnAddOptionsHtml:fe,_fnDetectHeader:he,_fnGetUniqueThs:de,_fnFeatureHtmlFilter:be,_fnFilterComplete:xe,_fnFilterCustom:we,_fnFilterColumn:_e,_fnFilter:Se,_fnFilterCreateSearch:Oe,_fnEscapeRegex:Ne,_fnFilterData:Ae,_fnFeatureHtmlInfo:Te,_fnUpdateInfo:De,_fnInfoMacros:je,_fnInitialise:Pe,_fnInitComplete:Ie,_fnLengthChange:Re,_fnFeatureHtmlLength:Le,_fnFeatureHtmlPaginate:Fe,_fnPageChange:Be,_fnFeatureHtmlProcessing:qe,_fnProcessingDisplay:ze,_fnFeatureHtmlTable:He,_fnScrollDraw:Ue,_fnApplyToChildren:We,_fnCalculateColumnWidths:$e,_fnThrottle:Ye,_fnConvertToWidth:Ze,_fnGetWidestNode:Ge,_fnGetMaxLenString:Ke,_fnStringToCss:Xe,_fnSortFlatten:Je,_fnSort:Qe,_fnSortAria:et,_fnSortListener:tt,_fnSortAttachListener:nt,_fnSortingClasses:rt,_fnSortData:it,_fnSaveState:ot,_fnLoadState:at,_fnImplementState:st,_fnSettingsFromNode:ut,_fnLog:lt,_fnMap:ct,_fnBindAction:ht,_fnCallbackReg:dt,_fnCallbackFire:pt,_fnLengthOverflow:mt,_fnRenderer:gt,_fnDataSource:vt,_fnRowAttributes:ae,_fnExtend:ft,_fnCalculateEnd:function(){}}),e.fn.dataTable=u,u.$=e,e.fn.dataTableSettings=u.settings,e.fn.dataTableExt=u.ext,e.fn.DataTable=function(t){return e(this).dataTable(t).api()},e.each(u,(function(t,n){e.fn.DataTable[t]=n})),u}(e,window,document)}.apply(t,r),void 0===i||(e.exports=i)}()},82083:function(e,t,n){var r,i;!function(o){"use strict";r=[n(19755)],i=function(e){return function(e,t,n,r){var i,o,a,s,u=function(t){this.$=function(e,t){return this.api(!0).$(e,t)},this._=function(e,t){return this.api(!0).rows(e,t).data()},this.api=function(e){return new o(e?ot(this[i.iApiIndex]):this)},this.fnAddData=function(t,n){var i=this.api(!0),o=e.isArray(t)&&(e.isArray(t[0])||e.isPlainObject(t[0]))?i.rows.add(t):i.row.add(t);return(n===r||n)&&i.draw(),o.flatten().toArray()},this.fnAdjustColumnSizing=function(e){var t=this.api(!0).columns.adjust(),n=t.settings()[0],i=n.oScroll;e===r||e?t.draw(!1):""===i.sX&&""===i.sY||ze(n)},this.fnClearTable=function(e){var t=this.api(!0).clear();(e===r||e)&&t.draw()},this.fnClose=function(e){this.api(!0).row(e).child.hide()},this.fnDeleteRow=function(e,t,n){var i=this.api(!0),o=i.rows(e),a=o.settings()[0],s=a.aoData[o[0][0]];return o.remove(),t&&t.call(this,a,s),(n===r||n)&&i.draw(),s},this.fnDestroy=function(e){this.api(!0).destroy(e)},this.fnDraw=function(e){this.api(!0).draw(e)},this.fnFilter=function(e,t,n,i,o,a){var s=this.api(!0);null===t||t===r?s.search(e,n,i,a):s.column(t).search(e,n,i,a),s.draw()},this.fnGetData=function(e,t){var n=this.api(!0);if(e!==r){var i=e.nodeName?e.nodeName.toLowerCase():"";return t!==r||"td"==i||"th"==i?n.cell(e,t).data():n.row(e).data()||null}return n.data().toArray()},this.fnGetNodes=function(e){var t=this.api(!0);return e!==r?t.row(e).node():t.rows().nodes().flatten().toArray()},this.fnGetPosition=function(e){var t=this.api(!0),n=e.nodeName.toUpperCase();if("TR"==n)return t.row(e).index();if("TD"==n||"TH"==n){var r=t.cell(e).index();return[r.row,r.columnVisible,r.column]}return null},this.fnIsOpen=function(e){return this.api(!0).row(e).child.isShown()},this.fnOpen=function(e,t,n){return this.api(!0).row(e).child(t,n).show().child()[0]},this.fnPageChange=function(e,t){var n=this.api(!0).page(e);(t===r||t)&&n.draw(!1)},this.fnSetColumnVis=function(e,t,n){var i=this.api(!0).column(e).visible(t);(n===r||n)&&i.columns.adjust().draw()},this.fnSettings=function(){return ot(this[i.iApiIndex])},this.fnSort=function(e){this.api(!0).order(e).draw()},this.fnSortListener=function(e,t,n){this.api(!0).order.listener(e,t,n)},this.fnUpdate=function(e,t,n,i,o){var a=this.api(!0);return n===r||null===n?a.row(t).data(e):a.cell(t,n).data(e),(o===r||o)&&a.columns.adjust(),(i===r||i)&&a.draw(),0},this.fnVersionCheck=i.fnVersionCheck;var n=this,a=t===r,s=this.length;for(var l in a&&(t={}),this.oApi=this.internal=i.internal,u.ext.internal)l&&(this[l]=Pt(l));return this.each((function(){var i,o=s>1?ut({},t,!0):t,l=0,c=this.getAttribute("id"),f=!1,h=u.defaults,d=e(this);if("table"==this.nodeName.toLowerCase()){k(h),T(h.column),C(h,h,!0),C(h.column,h.column,!0),C(h,e.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 at(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=e.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(),k(o),A(o.oLanguage),o.aLengthMenu&&!o.iDisplayLength&&(o.iDisplayLength=e.isArray(o.aLengthMenu[0])?o.aLengthMenu[0][0]:o.aLengthMenu[0]),o=ut(e.extend(!0,{},h),o),st(y.oFeatures,o,["bPaginate","bLengthChange","bFilter","bSort","bSortMulti","bInfo","bProcessing","bAutoWidth","bSortClasses","bServerSide","bDeferRender"]),st(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"]]),st(y.oScroll,o,[["sScrollX","sX"],["sScrollXInner","sXInner"],["sScrollY","sY"],["bScrollCollapse","bCollapse"]]),st(y.oLanguage,o,"fnInfoCallback"),ct(y,"aoDrawCallback",o.fnDrawCallback,"user"),ct(y,"aoServerParams",o.fnServerParams,"user"),ct(y,"aoStateSaveParams",o.fnStateSaveParams,"user"),ct(y,"aoStateLoadParams",o.fnStateLoadParams,"user"),ct(y,"aoStateLoaded",o.fnStateLoaded,"user"),ct(y,"aoRowCallback",o.fnRowCallback,"user"),ct(y,"aoRowCreatedCallback",o.fnCreatedRow,"user"),ct(y,"aoHeaderCallback",o.fnHeaderCallback,"user"),ct(y,"aoFooterCallback",o.fnFooterCallback,"user"),ct(y,"aoInitComplete",o.fnInitComplete,"user"),ct(y,"aoPreDrawCallback",o.fnPreDrawCallback,"user"),y.rowIdFn=K(o.rowId),D(y);var b=y.oClasses;if(e.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=e.isArray(o.iDeferLoading);y._iRecordsDisplay=x?o.iDeferLoading[0]:o.iDeferLoading,y._iRecordsTotal=x?o.iDeferLoading[1]:o.iDeferLoading}var w=y.oLanguage;e.extend(!0,w,o.oLanguage),w.sUrl&&(e.ajax({dataType:"json",url:w.sUrl,success:function(t){A(t),C(h.oLanguage,t),e.extend(!0,w,t),De(y)},error:function(){De(y)}}),f=!0),null===o.asStripeClasses&&(y.asStripeClasses=[b.sStripeOdd,b.sStripeEven]);var _=y.asStripeClasses,S=d.children("tbody").find("tr").eq(0);-1!==e.inArray(!0,e.map(_,(function(e,t){return S.hasClass(e)})))&&(e("tbody tr",this).removeClass(_.join(" ")),y.asDestroyStripes=_.slice());var O,N=[],E=this.getElementsByTagName("thead");if(0!==E.length&&(ce(y.aoHeader,E[0]),N=fe(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(e,t){I(y,e,t)})),S.length){var M=function(e,t){return null!==e.getAttribute("data-"+t)?t:null};e(S[0]).children("th, td").each((function(e,t){var n=y.aoColumns[e];if(n.mData===e){var i=M(t,"sort")||M(t,"order"),o=M(t,"filter")||M(t,"search");null===i&&null===o||(n.mData={_:e+".display",sort:null!==i?e+".@data-"+i:r,type:null!==i?e+".@data-"+i:r,filter:null!==o?e+".@data-"+o:r},I(y,e))}}))}var j=y.oFeatures,R=function(){if(o.aaSorting===r){var t=y.aaSorting;for(l=0,i=t.length;l<i;l++)t[l][1]=y.aoColumns[l].asSorting[0]}tt(y),j.bSort&&ct(y,"aoDrawCallback",(function(){if(y.bSorted){var t=Ke(y),n={};e.each(t,(function(e,t){n[t.src]=t.dir})),ft(y,null,"order",[y,t,n]),Je(y)}})),ct(y,"aoDrawCallback",(function(){(y.bSorted||"ssp"===pt(y)||j.bDeferRender)&&tt(y)}),"sc");var n=d.children("caption").each((function(){this._captionSide=e(this).css("caption-side")})),a=d.children("thead");0===a.length&&(a=e("<thead/>").appendTo(d)),y.nTHead=a[0];var s=d.children("tbody");0===s.length&&(s=e("<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=e("<tfoot/>").appendTo(d)),0===u.length||0===u.children().length?d.addClass(b.sNoFooter):u.length>0&&(y.nTFoot=u[0],ce(y.aoFooter,y.nTFoot)),o.aaData)for(l=0;l<o.aaData.length;l++)U(y,o.aaData[l]);else(y.bDeferLoading||"dom"==pt(y))&&W(y,e(y.nTBody).children("tr"));y.aiDisplay=y.aiDisplayMaster.slice(),y.bInitialised=!0,!1===f&&De(y)};o.bStateSave?(j.bStateSave=!0,ct(y,"aoDrawCallback",rt,"state_save"),it(y,0,R)):R()}else at(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(e){return!e||!0===e||"-"===e},g=function(e){var t=parseInt(e,10);return!isNaN(t)&&isFinite(e)?t:null},v=function(e,t){return l[t]||(l[t]=new RegExp(Se(t),"g")),"string"==typeof e&&"."!==t?e.replace(/\./g,"").replace(l[t],"."):e},y=function(e,t,n){var r="string"==typeof e;return!!m(e)||(t&&r&&(e=v(e,t)),n&&r&&(e=e.replace(p,"")),!isNaN(parseFloat(e))&&isFinite(e))},b=function(e,t,n){return!!m(e)||function(e){return m(e)||"string"==typeof e}(e)&&!!y(O(e),t,n)||null},x=function(e,t,n){var i=[],o=0,a=e.length;if(n!==r)for(;o<a;o++)e[o]&&e[o][t]&&i.push(e[o][t][n]);else for(;o<a;o++)e[o]&&i.push(e[o][t]);return i},w=function(e,t,n,i){var o=[],a=0,s=t.length;if(i!==r)for(;a<s;a++)e[t[a]][n]&&o.push(e[t[a]][n][i]);else for(;a<s;a++)o.push(e[t[a]][n]);return o},_=function(e,t){var n,i=[];t===r?(t=0,n=e):(n=t,t=e);for(var o=t;o<n;o++)i.push(o);return i},S=function(e){for(var t=[],n=0,r=e.length;n<r;n++)e[n]&&t.push(e[n]);return t},O=function(e){return e.replace(f,"")},N=function(e){if(function(e){if(e.length<2)return!0;for(var t=e.slice().sort(),n=t[0],r=1,i=t.length;r<i;r++){if(t[r]===n)return!1;n=t[r]}return!0}(e))return e.slice();var t,n,r,i=[],o=e.length,a=0;e:for(n=0;n<o;n++){for(t=e[n],r=0;r<a;r++)if(i[r]===t)continue e;i.push(t),a++}return i};function E(t){var n,r,i={};e.each(t,(function(e,o){(n=e.match(/^([^A-Z]+?)([A-Z])/))&&-1!=="a aa ai ao as b fn i m o s ".indexOf(n[1]+" ")&&(r=e.replace(n[0],n[2].toLowerCase()),i[r]=e,"o"===n[1]&&E(t[e]))})),t._hungarianMap=i}function C(t,n,i){var o;t._hungarianMap||E(t),e.each(n,(function(a,s){(o=t._hungarianMap[a])===r||!i&&n[o]!==r||("o"===o.charAt(0)?(n[o]||(n[o]={}),e.extend(!0,n[o],n[a]),C(t[o],n[o],i)):n[o]=n[a])}))}function A(e){var t=u.defaults.oLanguage,n=t.sDecimal;if(n&&Dt(n),e){var r=e.sZeroRecords;!e.sEmptyTable&&r&&"No data available in table"===t.sEmptyTable&&st(e,e,"sZeroRecords","sEmptyTable"),!e.sLoadingRecords&&r&&"Loading..."===t.sLoadingRecords&&st(e,e,"sZeroRecords","sLoadingRecords"),e.sInfoThousands&&(e.sThousands=e.sInfoThousands);var i=e.sDecimal;i&&n!==i&&Dt(i)}}u.util={throttle:function(e,t){var n,i,o=t!==r?t:200;return function(){var t=this,a=+new Date,s=arguments;n&&a<n+o?(clearTimeout(i),i=setTimeout((function(){n=r,e.apply(t,s)}),o)):(n=a,e.apply(t,s))}},escapeRegex:function(e){return e.replace(d,"\\$1")}};var M=function(e,t,n){e[t]!==r&&(e[n]=e[t])};function k(e){M(e,"ordering","bSort"),M(e,"orderMulti","bSortMulti"),M(e,"orderClasses","bSortClasses"),M(e,"orderCellsTop","bSortCellsTop"),M(e,"order","aaSorting"),M(e,"orderFixed","aaSortingFixed"),M(e,"paging","bPaginate"),M(e,"pagingType","sPaginationType"),M(e,"pageLength","iDisplayLength"),M(e,"searching","bFilter"),"boolean"==typeof e.sScrollX&&(e.sScrollX=e.sScrollX?"100%":""),"boolean"==typeof e.scrollX&&(e.scrollX=e.scrollX?"100%":"");var t=e.aoSearchCols;if(t)for(var n=0,r=t.length;n<r;n++)t[n]&&C(u.models.oSearch,t[n])}function T(t){M(t,"orderable","bSortable"),M(t,"orderData","aDataSort"),M(t,"orderSequence","asSorting"),M(t,"orderDataType","sortDataType");var n=t.aDataSort;"number"!=typeof n||e.isArray(n)||(t.aDataSort=[n])}function D(n){if(!u.__browser){var r={};u.__browser=r;var i=e("<div/>").css({position:"fixed",top:0,left:-1*e(t).scrollLeft(),height:1,width:1,overflow:"hidden"}).append(e("<div/>").css({position:"absolute",top:1,left:1,width:100,overflow:"scroll"}).append(e("<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()}e.extend(n.oBrowser,u.__browser),n.oScroll.iBarWidth=u.__browser.barWidth}function j(e,t,n,i,o,a){var s,u=i,l=!1;for(n!==r&&(s=n,l=!0);u!==o;)e.hasOwnProperty(u)&&(s=l?t(s,e[u],u,e):e[u],l=!0,u+=a);return s}function P(t,r){var i=u.defaults.column,o=t.aoColumns.length,a=e.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});t.aoColumns.push(a);var s=t.aoPreSearchCols;s[o]=e.extend({},u.models.oSearch,s[o]),I(t,o,e(r).data())}function I(t,n,i){var o=t.aoColumns[n],a=t.oClasses,s=e(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&&(T(i),C(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),e.extend(o,i),st(o,i,"sWidth","sWidthOrig"),i.iDataSort!==r&&(o.aDataSort=[i.iDataSort]),st(o,i,"aDataSort"));var c=o.mData,f=K(c),h=o.mRender?K(o.mRender):null,d=function(e){return"string"==typeof e&&-1!==e.indexOf("@")};o._bAttrSrc=e.isPlainObject(c)&&(d(c.sort)||d(c.type)||d(c.filter)),o._setter=null,o.fnGetData=function(e,t,n){var i=f(e,t,r,n);return h&&t?h(i,t,e,n):i},o.fnSetData=function(e,t,n){return X(c)(e,t,n)},"number"!=typeof c&&(t._rowReadObject=!0),t.oFeatures.bSort||(o.bSortable=!1,s.addClass(a.sSortableNone));var p=-1!==e.inArray("asc",o.asSorting),m=-1!==e.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(e){if(!1!==e.oFeatures.bAutoWidth){var t=e.aoColumns;We(e);for(var n=0,r=t.length;n<r;n++)t[n].nTh.style.width=t[n].sWidth}var i=e.oScroll;""===i.sY&&""===i.sX||ze(e),ft(e,null,"column-sizing",[e])}function L(e,t){var n=q(e,"bVisible");return"number"==typeof n[t]?n[t]:null}function F(t,n){var r=q(t,"bVisible"),i=e.inArray(n,r);return-1!==i?i:null}function B(t){var n=0;return e.each(t.aoColumns,(function(t,r){r.bVisible&&"none"!==e(r.nTh).css("display")&&n++})),n}function q(t,n){var r=[];return e.map(t.aoColumns,(function(e,t){e[n]&&r.push(t)})),r}function z(e){var t,n,i,o,a,s,l,c,f,h=e.aoColumns,d=e.aoData,p=u.ext.type.detect;for(t=0,n=h.length;t<n;t++)if(f=[],!(l=h[t]).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(e,a,t,"type")),(c=p[i](f[a],e))||i===p.length-1)&&"html"!==c;a++);if(c){l.sType=c;break}}l.sType||(l.sType="string")}}function H(t,n,i,o){var a,s,u,l,c,f,h,d=t.aoColumns;if(n)for(a=n.length-1;a>=0;a--){var p=(h=n[a]).targets!==r?h.targets:h.aTargets;for(e.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(t);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]||e(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(t,n,i,o){var a=t.aoData.length,s=e.extend(!0,{},u.models.oRow,{src:i?"dom":"data",idx:a});s._aData=n,t.aoData.push(s);for(var l=t.aoColumns,c=0,f=l.length;c<f;c++)l[c].sType=null;t.aiDisplayMaster.push(a);var h=t.rowIdFn(n);return h!==r&&(t.aIds[h]=s),!i&&t.oFeatures.bDeferRender||re(t,a,i,o),a}function W(t,n){var r;return n instanceof e||(n=e(n)),n.map((function(e,n){return r=ne(t,n),U(t,r.data,n,r.cells)}))}function V(e,t,n,i){var o=e.iDraw,a=e.aoColumns[n],s=e.aoData[t]._aData,u=a.sDefaultContent,l=a.fnGetData(s,i,{settings:e,row:t,col:n});if(l===r)return e.iDrawError!=o&&null===u&&(at(e,0,"Requested unknown parameter "+("function"==typeof a.mData?"{function}":"'"+a.mData+"'")+" for row "+t+", column "+n,4),e.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 $(e,t,n,r){var i=e.aoColumns[n],o=e.aoData[t]._aData;i.fnSetData(o,r,{settings:e,row:t,col:n})}var Y=/\[.*?\]$/,Z=/\(\)$/;function G(t){return e.map(t.match(/(\\.|[^\.])+/g)||[""],(function(e){return e.replace(/\\\./g,".")}))}function K(t){if(e.isPlainObject(t)){var n={};return e.each(t,(function(e,t){t&&(n[e]=K(t))})),function(e,t,i,o){var a=n[t]||n._;return a!==r?a(e,t,i,o):e}}if(null===t)return function(e){return e};if("function"==typeof t)return function(e,n,r,i){return t(e,n,r,i)};if("string"!=typeof t||-1===t.indexOf(".")&&-1===t.indexOf("[")&&-1===t.indexOf("("))return function(e,n){return e[t]};var i=function(t,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]&&(t=t[c[f]]),u=[],c.splice(0,f+1),l=c.join("."),e.isArray(t))for(var d=0,p=t.length;d<p;d++)u.push(i(t[d],n,l));var m=a[0].substring(1,a[0].length-1);t=""===m?u:u.join(m);break}if(s)c[f]=c[f].replace(Z,""),t=t[c[f]]();else{if(null===t||t[c[f]]===r)return r;t=t[c[f]]}}return t};return function(e,n){return i(e,n,t)}}function X(t){if(e.isPlainObject(t))return X(t._);if(null===t)return function(){};if("function"==typeof t)return function(e,n,r){t(e,"set",n,r)};if("string"!=typeof t||-1===t.indexOf(".")&&-1===t.indexOf("[")&&-1===t.indexOf("("))return function(e,n){e[t]=n};var n=function(t,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,""),t[f[d]]=[],(a=f.slice()).splice(0,d+1),c=a.join("."),e.isArray(i))for(var m=0,g=i.length;m<g;m++)n(l={},i[m],c),t[f[d]].push(l);else t[f[d]]=i;return}u&&(f[d]=f[d].replace(Z,""),t=t[f[d]](i)),null!==t[f[d]]&&t[f[d]]!==r||(t[f[d]]={}),t=t[f[d]]}h.match(Z)?t=t[h.replace(Z,"")](i):t[h.replace(Y,"")]=i};return function(e,r){return n(e,r,t)}}function J(e){return x(e.aoData,"_aData")}function Q(e){e.aoData.length=0,e.aiDisplayMaster.length=0,e.aiDisplay.length=0,e.aIds={}}function ee(e,t,n){for(var i=-1,o=0,a=e.length;o<a;o++)e[o]==t?i=o:e[o]>t&&e[o]--;-1!=i&&n===r&&e.splice(i,1)}function te(e,t,n,i){var o,a,s=e.aoData[t],u=function(n,r){for(;n.childNodes.length;)n.removeChild(n.firstChild);n.innerHTML=V(e,t,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=ne(e,s,i,i===r?r:s._aData).data;s._aSortData=null,s._aFilterData=null;var c=e.aoColumns;if(i!==r)c[i].sType=null;else{for(o=0,a=c.length;o<a;o++)c[o].sType=null;ie(e,s)}}function ne(t,n,i,o){var a,s,u,l=[],c=n.firstChild,f=0,h=t.aoColumns,d=t._rowReadObject;o=o!==r?o:d?{}:[];var p=function(e,t){if("string"==typeof e){var n=e.indexOf("@");if(-1!==n){var r=e.substring(n+1);X(e)(o,t.getAttribute(r))}}},m=function(t){i!==r&&i!==f||(s=h[f],u=e.trim(t.innerHTML),s&&s._bAttrSrc?(X(s.mData._)(o,u),p(s.mData.sort,t),p(s.mData.type,t),p(s.mData.filter,t)):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(t.rowId)(o,b)}return{data:o,cells:l}}function re(t,r,i,o){var a,s,u,l,c,f=t.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,ie(t,f),l=0,c=t.aoColumns.length;l<c;l++)u=t.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||e.isPlainObject(u.mData)&&u.mData._===l+".display"||(s.innerHTML=V(t,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(t.oInstance,s,V(t,r,l),h,r,l);ft(t,"aoRowCreatedCallback",null,[a,h,r,d])}f.nTr.setAttribute("role","row")}function ie(t,n){var r=n.nTr,i=n._aData;if(r){var o=t.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,e(r).removeClass(n.__rowc.join(" ")).addClass(i.DT_RowClass)}i.DT_RowAttr&&e(r).attr(i.DT_RowAttr),i.DT_RowData&&e(r).data(i.DT_RowData)}}function oe(t){var n,r,i,o,a,s=t.nTHead,u=t.nTFoot,l=0===e("th, td",s).length,c=t.oClasses,f=t.aoColumns;for(l&&(o=e("<tr/>").appendTo(s)),n=0,r=f.length;n<r;n++)a=f[n],i=e(a.nTh).addClass(a.sClass),l&&i.appendTo(o),t.oFeatures.bSort&&(i.addClass(a.sSortingClass),!1!==a.bSortable&&(i.attr("tabindex",t.iTabIndex).attr("aria-controls",t.sTableId),et(t,a.nTh,n))),a.sTitle!=i[0].innerHTML&&i.html(a.sTitle),dt(t,"header")(t,i,a,c);if(l&&ce(t.aoHeader,s),e(s).find(">tr").attr("role","row"),e(s).find(">tr>th, >tr>td").addClass(c.sHeaderTH),e(u).find(">tr>th, >tr>td").addClass(c.sFooterTH),null!==u){var h=t.aoFooter[0];for(n=0,r=h.length;n<r;n++)(a=f[n]).nTf=h[n].cell,a.sClass&&e(a.nTf).addClass(a.sClass)}}function ae(t,n,i){var o,a,s,u,l,c,f,h,d,p=[],m=[],g=t.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--)t.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++}e(p[o][s].cell).attr("rowspan",h).attr("colspan",d)}}}}function se(t){var n=ft(t,"aoPreDrawCallback","preDraw",[t]);if(-1===e.inArray(!1,n)){var i=[],o=0,a=t.asStripeClasses,s=a.length,u=(t.aoOpenRows.length,t.oLanguage),l=t.iInitDisplayStart,c="ssp"==pt(t),f=t.aiDisplay;t.bDrawing=!0,l!==r&&-1!==l&&(t._iDisplayStart=c?l:l>=t.fnRecordsDisplay()?0:l,t.iInitDisplayStart=-1);var h=t._iDisplayStart,d=t.fnDisplayEnd();if(t.bDeferLoading)t.bDeferLoading=!1,t.iDraw++,Be(t,!1);else if(c){if(!t.bDestroying&&!de(t))return}else t.iDraw++;if(0!==f.length)for(var p=c?0:h,m=c?t.aoData.length:d,g=p;g<m;g++){var v=f[g],y=t.aoData[v];null===y.nTr&&re(t,v);var b=y.nTr;if(0!==s){var x=a[o%s];y._sRowStripe!=x&&(e(b).removeClass(y._sRowStripe).addClass(x),y._sRowStripe=x)}ft(t,"aoRowCallback",null,[b,y._aData,o,g,v]),i.push(b),o++}else{var w=u.sZeroRecords;1==t.iDraw&&"ajax"==pt(t)?w=u.sLoadingRecords:u.sEmptyTable&&0===t.fnRecordsTotal()&&(w=u.sEmptyTable),i[0]=e("<tr/>",{class:s?a[0]:""}).append(e("<td />",{valign:"top",colSpan:B(t),class:t.oClasses.sRowEmpty}).html(w))[0]}ft(t,"aoHeaderCallback","header",[e(t.nTHead).children("tr")[0],J(t),h,d,f]),ft(t,"aoFooterCallback","footer",[e(t.nTFoot).children("tr")[0],J(t),h,d,f]);var _=e(t.nTBody);_.children().detach(),_.append(e(i)),ft(t,"aoDrawCallback","draw",[t]),t.bSorted=!1,t.bFiltered=!1,t.bDrawing=!1}else Be(t,!1)}function ue(e,t){var n=e.oFeatures,r=n.bSort,i=n.bFilter;r&&Xe(e),i?ye(e,e.oPreviousSearch):e.aiDisplay=e.aiDisplayMaster.slice(),!0!==t&&(e._iDisplayStart=0),e._drawHold=t,se(e),e._drawHold=!1}function le(t){var n=t.oClasses,r=e(t.nTable),i=e("<div/>").insertBefore(r),o=t.oFeatures,a=e("<div/>",{id:t.sTableId+"_wrapper",class:n.sWrapper+(t.nTFoot?"":" "+n.sNoFooter)});t.nHolding=i[0],t.nTableWrapper=a[0],t.nTableReinsertBefore=t.nTable.nextSibling;for(var s,l,c,f,h,d,p=t.sDom.split(""),m=0;m<p.length;m++){if(s=null,"<"==(l=p[m])){if(c=e("<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=e(c)}else if(">"==l)a=a.parent();else if("l"==l&&o.bPaginate&&o.bLengthChange)s=Ie(t);else if("f"==l&&o.bFilter)s=ve(t);else if("r"==l&&o.bProcessing)s=Fe(t);else if("t"==l)s=qe(t);else if("i"==l&&o.bInfo)s=Me(t);else if("p"==l&&o.bPaginate)s=Re(t);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(t);break}if(s){var x=t.aanFeatures;x[l]||(x[l]=[]),x[l].push(s),a.append(s)}}i.replaceWith(a),t.nHolding=null}function ce(t,n){var r,i,o,a,s,u,l,c,f,h,d=e(n).children("tr"),p=function(e,t,n){for(var r=e[t];r[n];)n++;return n};for(t.splice(0,t.length),o=0,u=d.length;o<u;o++)t.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(t,o,0),h=1===c,s=0;s<c;s++)for(a=0;a<f;a++)t[o+a][l+s]={cell:i,unique:h},t[o+a].nTr=r;i=i.nextSibling}}function fe(e,t,n){var r=[];n||(n=e.aoHeader,t&&ce(n=[],t));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]&&e.bSortCellsTop||(r[a]=n[i][a].cell);return r}function he(t,n,r){if(ft(t,"aoServerParams","serverParams",[n]),n&&e.isArray(n)){var i={},o=/(.*?)\[\]$/;e.each(n,(function(e,t){var n=t.name.match(o);if(n){var r=n[0];i[r]||(i[r]=[]),i[r].push(t.value)}else i[t.name]=t.value})),n=i}var a,s=t.ajax,u=t.oInstance,l=function(e){ft(t,null,"xhr",[t,e,t.jqXHR]),r(e)};if(e.isPlainObject(s)&&s.data){var c="function"==typeof(a=s.data)?a(n,t):a;n="function"==typeof a&&c?c:e.extend(!0,n,c),delete s.data}var f={data:n,success:function(e){var n=e.error||e.sError;n&&at(t,0,n),t.json=e,l(e)},dataType:"json",cache:!1,type:t.sServerMethod,error:function(n,r,i){var o=ft(t,null,"xhr",[t,null,t.jqXHR]);-1===e.inArray(!0,o)&&("parsererror"==r?at(t,0,"Invalid JSON response",1):4===n.readyState&&at(t,0,"Ajax error",7)),Be(t,!1)}};t.oAjaxData=n,ft(t,null,"preXhr",[t,n]),t.fnServerData?t.fnServerData.call(u,t.sAjaxSource,e.map(n,(function(e,t){return{name:t,value:e}})),l,t):t.sAjaxSource||"string"==typeof s?t.jqXHR=e.ajax(e.extend(f,{url:s||t.sAjaxSource})):"function"==typeof s?t.jqXHR=s.call(u,n,l,t):(t.jqXHR=e.ajax(e.extend(f,s)),s.data=a)}function de(e){return!e.bAjaxDataGet||(e.iDraw++,Be(e,!0),he(e,pe(e),(function(t){me(e,t)})),!1)}function pe(t){var n,r,i,o,a=t.aoColumns,s=a.length,l=t.oFeatures,c=t.oPreviousSearch,f=t.aoPreSearchCols,h=[],d=Ke(t),p=t._iDisplayStart,m=!1!==l.bPaginate?t._iDisplayLength:-1,g=function(e,t){h.push({name:e,value:t})};g("sEcho",t.iDraw),g("iColumns",s),g("sColumns",x(a,"sName").join(",")),g("iDisplayStart",p),g("iDisplayLength",m);var v={draw:t.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&&(e.each(d,(function(e,t){v.order.push({column:t.col,dir:t.dir}),g("iSortCol_"+e,t.col),g("sSortDir_"+e,t.dir)})),g("iSortingCols",d.length));var y=u.ext.legacy.ajax;return null===y?t.sAjaxSource?h:v:y?h:v}function me(e,t){var n=function(e,n){return t[e]!==r?t[e]:t[n]},i=ge(e,t),o=n("sEcho","draw"),a=n("iTotalRecords","recordsTotal"),s=n("iTotalDisplayRecords","recordsFiltered");if(o){if(1*o<e.iDraw)return;e.iDraw=1*o}Q(e),e._iRecordsTotal=parseInt(a,10),e._iRecordsDisplay=parseInt(s,10);for(var u=0,l=i.length;u<l;u++)U(e,i[u]);e.aiDisplay=e.aiDisplayMaster.slice(),e.bAjaxDataGet=!1,se(e),e._bInitComplete||je(e,t),e.bAjaxDataGet=!0,Be(e,!1)}function ge(t,n){var i=e.isPlainObject(t.ajax)&&t.ajax.dataSrc!==r?t.ajax.dataSrc:t.sAjaxDataProp;return"data"===i?n.aaData||n[i]:""!==i?K(i)(n):n}function ve(t){var r=t.oClasses,i=t.sTableId,o=t.oLanguage,a=t.oPreviousSearch,s=t.aanFeatures,u='<input type="search" class="'+r.sFilterInput+'"/>',l=o.sSearch;l=l.match(/_INPUT_/)?l.replace("_INPUT_",u):l+u;var c=e("<div/>",{id:s.f?null:i+"_filter",class:r.sFilter}).append(e("<label/>").append(l)),f=function(){s.f;var e=this.value?this.value:"";e!=a.sSearch&&(ye(t,{sSearch:e,bRegex:a.bRegex,bSmart:a.bSmart,bCaseInsensitive:a.bCaseInsensitive}),t._iDisplayStart=0,se(t))},h=null!==t.searchDelay?t.searchDelay:"ssp"===pt(t)?400:0,d=e("input",c).val(a.sSearch).attr("placeholder",o.sSearchPlaceholder).on("keyup.DT search.DT input.DT paste.DT cut.DT",h?Ve(f,h):f).on("keypress.DT",(function(e){if(13==e.keyCode)return!1})).attr("aria-controls",i);return e(t.nTable).on("search.dt.DT",(function(e,r){if(t===r)try{d[0]!==n.activeElement&&d.val(a.sSearch)}catch(e){}})),c[0]}function ye(e,t,n){var i=e.oPreviousSearch,o=e.aoPreSearchCols,a=function(e){i.sSearch=e.sSearch,i.bRegex=e.bRegex,i.bSmart=e.bSmart,i.bCaseInsensitive=e.bCaseInsensitive},s=function(e){return e.bEscapeRegex!==r?!e.bEscapeRegex:e.bRegex};if(z(e),"ssp"!=pt(e)){we(e,t.sSearch,n,s(t),t.bSmart,t.bCaseInsensitive),a(t);for(var u=0;u<o.length;u++)xe(e,o[u].sSearch,u,s(o[u]),o[u].bSmart,o[u].bCaseInsensitive);be(e)}else a(t);e.bFiltered=!0,ft(e,null,"search",[e])}function be(t){for(var n,r,i=u.ext.search,o=t.aiDisplay,a=0,s=i.length;a<s;a++){for(var l=[],c=0,f=o.length;c<f;c++)r=o[c],n=t.aoData[r],i[a](t,n._aFilterData,r,n._aData,c)&&l.push(r);o.length=0,e.merge(o,l)}}function xe(e,t,n,r,i,o){if(""!==t){for(var a,s=[],u=e.aiDisplay,l=_e(t,r,i,o),c=0;c<u.length;c++)a=e.aoData[u[c]]._aFilterData[n],l.test(a)&&s.push(u[c]);e.aiDisplay=s}}function we(e,t,n,r,i,o){var a,s,l,c=_e(t,r,i,o),f=e.oPreviousSearch.sSearch,h=e.aiDisplayMaster,d=[];if(0!==u.ext.search.length&&(n=!0),s=Ee(e),t.length<=0)e.aiDisplay=h.slice();else{for((s||n||f.length>t.length||0!==t.indexOf(f)||e.bSorted)&&(e.aiDisplay=h.slice()),a=e.aiDisplay,l=0;l<a.length;l++)c.test(e.aoData[a[l]]._sFilterRow)&&d.push(a[l]);e.aiDisplay=d}}function _e(t,n,r,i){if(t=n?t:Se(t),r){var o=e.map(t.match(/"[^"]+"|[^ ]+/g)||[""],(function(e){if('"'===e.charAt(0)){var t=e.match(/^"(.*)"$/);e=t?t[1]:e}return e.replace('"',"")}));t="^(?=.*?"+o.join(")(?=.*?")+").*$"}return new RegExp(t,i?"i":"")}var Se=u.util.escapeRegex,Oe=e("<div>")[0],Ne=Oe.textContent!==r;function Ee(e){var t,n,r,i,o,a,s,l,c=e.aoColumns,f=u.ext.type.search,h=!1;for(n=0,i=e.aoData.length;n<i;n++)if(!(l=e.aoData[n])._aFilterData){for(a=[],r=0,o=c.length;r<o;r++)(t=c[r]).bSearchable?(s=V(e,n,r,"filter"),f[t.sType]&&(s=f[t.sType](s)),null===s&&(s=""),"string"!=typeof s&&s.toString&&(s=s.toString())):s="",s.indexOf&&-1!==s.indexOf("&")&&(Oe.innerHTML=s,s=Ne?Oe.textContent:Oe.innerText),s.replace&&(s=s.replace(/[\r\n]/g,"")),a.push(s);l._aFilterData=a,l._sFilterRow=a.join(" "),h=!0}return h}function Ce(e){return{search:e.sSearch,smart:e.bSmart,regex:e.bRegex,caseInsensitive:e.bCaseInsensitive}}function Ae(e){return{sSearch:e.search,bSmart:e.smart,bRegex:e.regex,bCaseInsensitive:e.caseInsensitive}}function Me(t){var n=t.sTableId,r=t.aanFeatures.i,i=e("<div/>",{class:t.oClasses.sInfo,id:r?null:n+"_info"});return r||(t.aoDrawCallback.push({fn:ke,sName:"information"}),i.attr("role","status").attr("aria-live","polite"),e(t.nTable).attr("aria-describedby",n+"_info")),i[0]}function ke(t){var n=t.aanFeatures.i;if(0!==n.length){var r=t.oLanguage,i=t._iDisplayStart+1,o=t.fnDisplayEnd(),a=t.fnRecordsTotal(),s=t.fnRecordsDisplay(),u=s?r.sInfo:r.sInfoEmpty;s!==a&&(u+=" "+r.sInfoFiltered),u=Te(t,u+=r.sInfoPostFix);var l=r.fnInfoCallback;null!==l&&(u=l.call(t.oInstance,t,i,o,a,s,u)),e(n).html(u)}}function Te(e,t){var n=e.fnFormatNumber,r=e._iDisplayStart+1,i=e._iDisplayLength,o=e.fnRecordsDisplay(),a=-1===i;return t.replace(/_START_/g,n.call(e,r)).replace(/_END_/g,n.call(e,e.fnDisplayEnd())).replace(/_MAX_/g,n.call(e,e.fnRecordsTotal())).replace(/_TOTAL_/g,n.call(e,o)).replace(/_PAGE_/g,n.call(e,a?1:Math.ceil(r/i))).replace(/_PAGES_/g,n.call(e,a?1:Math.ceil(o/i)))}function De(e){var t,n,r,i=e.iInitDisplayStart,o=e.aoColumns,a=e.oFeatures,s=e.bDeferLoading;if(e.bInitialised){for(le(e),oe(e),ae(e,e.aoHeader),ae(e,e.aoFooter),Be(e,!0),a.bAutoWidth&&We(e),t=0,n=o.length;t<n;t++)(r=o[t]).sWidth&&(r.nTh.style.width=Ge(r.sWidth));ft(e,null,"preInit",[e]),ue(e);var u=pt(e);("ssp"!=u||s)&&("ajax"==u?he(e,[],(function(n){var r=ge(e,n);for(t=0;t<r.length;t++)U(e,r[t]);e.iInitDisplayStart=i,ue(e),Be(e,!1),je(e,n)})):(Be(e,!1),je(e)))}else setTimeout((function(){De(e)}),200)}function je(e,t){e._bInitComplete=!0,(t||e.oInit.aaData)&&R(e),ft(e,null,"plugin-init",[e,t]),ft(e,"aoInitComplete","init",[e,t])}function Pe(e,t){var n=parseInt(t,10);e._iDisplayLength=n,ht(e),ft(e,null,"length",[e,n])}function Ie(t){for(var n=t.oClasses,r=t.sTableId,i=t.aLengthMenu,o=e.isArray(i[0]),a=o?i[0]:i,s=o?i[1]:i,u=e("<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]?t.fnFormatNumber(s[l]):s[l],a[l]);var f=e("<div><label/></div>").addClass(n.sLength);return t.aanFeatures.l||(f[0].id=r+"_length"),f.children().append(t.oLanguage.sLengthMenu.replace("_MENU_",u[0].outerHTML)),e("select",f).val(t._iDisplayLength).on("change.DT",(function(n){Pe(t,e(this).val()),se(t)})),e(t.nTable).on("length.dt.DT",(function(n,r,i){t===r&&e("select",f).val(i)})),f[0]}function Re(t){var n=t.sPaginationType,r=u.ext.pager[n],i="function"==typeof r,o=function(e){se(e)},a=e("<div/>").addClass(t.oClasses.sPaging+n)[0],s=t.aanFeatures;return i||r.fnInit(t,a,o),s.p||(a.id=t.sTableId+"_paginate",t.aoDrawCallback.push({fn:function(e){if(i){var t,n,a=e._iDisplayStart,u=e._iDisplayLength,l=e.fnRecordsDisplay(),c=-1===u,f=c?0:Math.ceil(a/u),h=c?1:Math.ceil(l/u),d=r(f,h);for(t=0,n=s.p.length;t<n;t++)dt(e,"pageButton")(e,s.p[t],t,d,f,h)}else r.fnUpdate(e,o)},sName:"pagination"})),a}function Le(e,t,n){var r=e._iDisplayStart,i=e._iDisplayLength,o=e.fnRecordsDisplay();0===o||-1===i?r=0:"number"==typeof t?(r=t*i)>o&&(r=0):"first"==t?r=0:"previous"==t?(r=i>=0?r-i:0)<0&&(r=0):"next"==t?r+i<o&&(r+=i):"last"==t?r=Math.floor((o-1)/i)*i:at(e,0,"Unknown paging action: "+t,5);var a=e._iDisplayStart!==r;return e._iDisplayStart=r,a&&(ft(e,null,"page",[e]),n&&se(e)),a}function Fe(t){return e("<div/>",{id:t.aanFeatures.r?null:t.sTableId+"_processing",class:t.oClasses.sProcessing}).html(t.oLanguage.sProcessing).insertBefore(t.nTable)[0]}function Be(t,n){t.oFeatures.bProcessing&&e(t.aanFeatures.r).css("display",n?"block":"none"),ft(t,null,"processing",[t,n])}function qe(t){var n=e(t.nTable);n.attr("role","grid");var r=t.oScroll;if(""===r.sX&&""===r.sY)return t.nTable;var i=r.sX,o=r.sY,a=t.oClasses,s=n.children("caption"),u=s.length?s[0]._captionSide:null,l=e(n[0].cloneNode(!1)),c=e(n[0].cloneNode(!1)),f=n.children("tfoot"),h="<div/>",d=function(e){return e?Ge(e):null};f.length||(f=null);var p=e(h,{class:a.sScrollWrapper}).append(e(h,{class:a.sScrollHead}).css({overflow:"hidden",position:"relative",border:0,width:i?d(i):"100%"}).append(e(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(e(h,{class:a.sScrollBody}).css({position:"relative",overflow:"auto",width:d(i)}).append(n));f&&p.append(e(h,{class:a.sScrollFoot}).css({overflow:"hidden",border:0,width:i?d(i):"100%"}).append(e(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&&e(v).on("scroll.DT",(function(e){var t=this.scrollLeft;g.scrollLeft=t,f&&(y.scrollLeft=t)})),e(v).css(o&&r.bCollapse?"max-height":"height",o),t.nScrollHead=g,t.nScrollBody=v,t.nScrollFoot=y,t.aoDrawCallback.push({fn:ze,sName:"scrolling"}),p[0]}function ze(t){var n,i,o,a,s,u,l,c,f,h=t.oScroll,d=h.sX,p=h.sXInner,m=h.sY,g=h.iBarWidth,v=e(t.nScrollHead),y=v[0].style,b=v.children("div"),w=b[0].style,_=b.children("table"),S=t.nScrollBody,O=e(S),N=S.style,E=e(t.nScrollFoot).children("div"),C=E.children("table"),A=e(t.nTHead),M=e(t.nTable),k=M[0],T=k.style,D=t.nTFoot?e(t.nTFoot):null,j=t.oBrowser,P=j.bScrollOversize,I=x(t.aoColumns,"nTh"),F=[],B=[],q=[],z=[],H=function(e){var t=e.style;t.paddingTop="0",t.paddingBottom="0",t.borderTopWidth="0",t.borderBottomWidth="0",t.height=0},U=S.scrollHeight>S.clientHeight;if(t.scrollBarVis!==U&&t.scrollBarVis!==r)return t.scrollBarVis=U,void R(t);t.scrollBarVis=U,M.children("thead, tfoot").remove(),D&&(u=D.clone().prependTo(M),i=D.find("tr"),a=u.find("tr")),s=A.clone().prependTo(M),n=A.find("tr"),o=s.find("tr"),s.find("th, td").removeAttr("tabindex"),d||(N.width="100%",v[0].style.width="100%"),e.each(fe(t,s),(function(e,n){l=L(t,e),n.style.width=t.aoColumns[l].sWidth})),D&&He((function(e){e.style.width=""}),a),f=M.outerWidth(),""===d?(T.width="100%",P&&(M.find("tbody").height()>S.offsetHeight||"scroll"==O.css("overflow-y"))&&(T.width=Ge(M.outerWidth()-g)),f=M.outerWidth()):""!==p&&(T.width=Ge(p),f=M.outerWidth()),He(H,o),He((function(t){q.push(t.innerHTML),F.push(Ge(e(t).css("width")))}),o),He((function(t,n){-1!==e.inArray(t,I)&&(t.style.width=F[n])}),n),e(o).height(0),D&&(He(H,a),He((function(t){z.push(t.innerHTML),B.push(Ge(e(t).css("width")))}),a),He((function(e,t){e.style.width=B[t]}),i),e(a).height(0)),He((function(e,t){e.innerHTML='<div class="dataTables_sizing">'+q[t]+"</div>",e.childNodes[0].style.height="0",e.childNodes[0].style.overflow="hidden",e.style.width=F[t]}),o),D&&He((function(e,t){e.innerHTML='<div class="dataTables_sizing">'+z[t]+"</div>",e.childNodes[0].style.height="0",e.childNodes[0].style.overflow="hidden",e.style.width=B[t]}),a),M.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"))&&(T.width=Ge(c-g)),""!==d&&""===p||at(t,1,"Possible column misalignment",6)):c="100%",N.width=Ge(c),y.width=Ge(c),D&&(t.nScrollFoot.style.width=Ge(c)),m||P&&(N.height=Ge(k.offsetHeight+g));var W=M.outerWidth();_[0].style.width=Ge(W),w.width=Ge(W);var V=M.height()>S.clientHeight||"scroll"==O.css("overflow-y"),$="padding"+(j.bScrollbarLeft?"Left":"Right");w[$]=V?g+"px":"0px",D&&(C[0].style.width=Ge(W),E[0].style.width=Ge(W),E[0].style[$]=V?g+"px":"0px"),M.children("colgroup").insertBefore(M.children("thead")),O.scroll(),!t.bSorted&&!t.bFiltered||t._drawHold||(S.scrollTop=0)}function He(e,t,n){for(var r,i,o=0,a=0,s=t.length;a<s;){for(r=t[a].firstChild,i=n?n[a].firstChild:null;r;)1===r.nodeType&&(n?e(r,i,o):e(r,o),o++),r=r.nextSibling,i=n?i.nextSibling:null;a++}}var Ue=/<.*?>/g;function We(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=q(n,"bVisible"),p=e("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=$e(i.sWidthOrig,g),v=!0);if(b||!v&&!c&&!l&&h==B(n)&&h==p.length)for(r=0;r<h;r++){var w=L(n,r);null!==w&&(s[w].sWidth=Ge(p.eq(r).width()))}else{var _=e(a).clone().css("visibility","hidden").removeAttr("id");_.find("tbody tr").remove();var S=e("<tr/>").appendTo(_.find("tbody"));for(_.find("thead, tfoot").remove(),_.append(e(n.nTHead).clone()).append(e(n.nTFoot).clone()),_.find("tfoot th, tfoot td").css("width",""),p=fe(n,_.find("thead")[0]),r=0;r<d.length;r++)i=s[d[r]],p[r].style.width=null!==i.sWidthOrig&&""!==i.sWidthOrig?Ge(i.sWidthOrig):"",i.sWidthOrig&&c&&e(p[r]).append(e("<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]],e(Ye(n,o)).clone(!1).append(i.sContentPadding).appendTo(S);e("[name]",_).removeAttr("name");var O=e("<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 E=e(p[r]),C=E.outerWidth()-E.width(),A=y.bBounding?Math.ceil(p[r].getBoundingClientRect().width):E.outerWidth();N+=A,s[d[r]].sWidth=Ge(A-C)}a.style.width=Ge(N),O.remove()}if(m&&(a.style.width=Ge(m)),(m||c)&&!n._reszEvt){var M=function(){e(t).on("resize.DT-"+n.sInstance,Ve((function(){R(n)})))};b?setTimeout(M,1e3):M(),n._reszEvt=!0}}var Ve=u.util.throttle;function $e(t,r){if(!t)return 0;var i=e("<div/>").css("width",Ge(t)).appendTo(r||n.body),o=i[0].offsetWidth;return i.remove(),o}function Ye(t,n){var r=Ze(t,n);if(r<0)return null;var i=t.aoData[r];return i.nTr?i.anCells[n]:e("<td/>").html(V(t,r,n,"display"))[0]}function Ze(e,t){for(var n,r=-1,i=-1,o=0,a=e.aoData.length;o<a;o++)(n=(n=(n=V(e,o,t,"display")+"").replace(Ue,"")).replace(/&nbsp;/g," ")).length>r&&(r=n.length,i=o);return i}function Ge(e){return null===e?"0px":"number"==typeof e?e<0?"0px":e+"px":e.match(/\d$/)?e+"px":e}function Ke(t){var n,i,o,a,s,l,c,f=[],h=t.aoColumns,d=t.aaSortingFixed,p=e.isPlainObject(d),m=[],g=function(t){t.length&&!e.isArray(t[0])?m.push(t):e.merge(m,t)};for(e.isArray(d)&&g(d),p&&d.pre&&g(d.pre),g(t.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=e.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 Xe(e){var t,n,r,i,o,a=[],s=u.ext.type.order,l=e.aoData,c=(e.aoColumns,0),f=e.aiDisplayMaster;for(z(e),t=0,n=(o=Ke(e)).length;t<n;t++)(i=o[t]).formatter&&c++,nt(e,i.col);if("ssp"!=pt(e)&&0!==o.length){for(t=0,r=f.length;t<r;t++)a[f[t]]=t;c===o.length?f.sort((function(e,t){var n,r,i,s,u,c=o.length,f=l[e]._aSortData,h=l[t]._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[e])<(r=a[t])?-1:n>r?1:0})):f.sort((function(e,t){var n,r,i,u,c,f=o.length,h=l[e]._aSortData,d=l[t]._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[e])<(r=a[t])?-1:n>r?1:0}))}e.bSorted=!0}function Je(e){for(var t,n,r=e.aoColumns,i=Ke(e),o=e.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],t=c+("asc"===n?o.sSortAscending:o.sSortDescending)):t=c,f.setAttribute("aria-label",t)}}function Qe(t,n,i,o){var a,s=t.aoColumns[n],u=t.aaSorting,l=s.asSorting,c=function(t,n){var i=t._idx;return i===r&&(i=e.inArray(t[1],l)),i+1<l.length?i+1:n?null:0};if("number"==typeof u[0]&&(u=t.aaSorting=[u]),i&&t.oFeatures.bSortMulti){var f=e.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);ue(t),"function"==typeof o&&o(t)}function et(e,t,n,r){var i=e.aoColumns[n];lt(t,{},(function(t){!1!==i.bSortable&&(e.oFeatures.bProcessing?(Be(e,!0),setTimeout((function(){Qe(e,n,t.shiftKey,r),"ssp"!==pt(e)&&Be(e,!1)}),0)):Qe(e,n,t.shiftKey,r))}))}function tt(t){var n,r,i,o=t.aLastSort,a=t.oClasses.sSortColumn,s=Ke(t),u=t.oFeatures;if(u.bSort&&u.bSortClasses){for(n=0,r=o.length;n<r;n++)i=o[n].src,e(x(t.aoData,"anCells",i)).removeClass(a+(n<2?n+1:3));for(n=0,r=s.length;n<r;n++)i=s[n].src,e(x(t.aoData,"anCells",i)).addClass(a+(n<2?n+1:3))}t.aLastSort=s}function nt(e,t){var n,r,i,o=e.aoColumns[t],a=u.ext.order[o.sSortDataType];a&&(n=a.call(e.oInstance,e,t,F(e,t)));for(var s=u.ext.type.order[o.sType+"-pre"],l=0,c=e.aoData.length;l<c;l++)(r=e.aoData[l])._aSortData||(r._aSortData=[]),r._aSortData[t]&&!a||(i=a?n[l]:V(e,l,t,"sort"),r._aSortData[t]=s?s(i):i)}function rt(t){if(t.oFeatures.bStateSave&&!t.bDestroying){var n={time:+new Date,start:t._iDisplayStart,length:t._iDisplayLength,order:e.extend(!0,[],t.aaSorting),search:Ce(t.oPreviousSearch),columns:e.map(t.aoColumns,(function(e,n){return{visible:e.bVisible,search:Ce(t.aoPreSearchCols[n])}}))};ft(t,"aoStateSaveParams","stateSaveParams",[t,n]),t.oSavedState=n,t.fnStateSaveCallback.call(t.oInstance,t,n)}}function it(t,n,i){var o,a,s=t.aoColumns,u=function(n){if(n&&n.time){var u=ft(t,"aoStateLoadParams","stateLoadParams",[t,n]);if(-1===e.inArray(!1,u)){var l=t.iStateDuration;if(l>0&&n.time<+new Date-1e3*l)i();else if(n.columns&&s.length!==n.columns.length)i();else{if(t.oLoadedState=e.extend(!0,{},n),n.start!==r&&(t._iDisplayStart=n.start,t.iInitDisplayStart=n.start),n.length!==r&&(t._iDisplayLength=n.length),n.order!==r&&(t.aaSorting=[],e.each(n.order,(function(e,n){t.aaSorting.push(n[0]>=s.length?[0,n[1]]:n)}))),n.search!==r&&e.extend(t.oPreviousSearch,Ae(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&&e.extend(t.aoPreSearchCols[o],Ae(c.search))}ft(t,"aoStateLoaded","stateLoaded",[t,n]),i()}}else i()}else i()};if(t.oFeatures.bStateSave){var l=t.fnStateLoadCallback.call(t.oInstance,t,u);l!==r&&u(l)}else i()}function ot(t){var n=u.settings,r=e.inArray(t,x(n,"nTable"));return-1!==r?n[r]:null}function at(e,n,r,i){if(r="DataTables warning: "+(e?"table id="+e.sTableId+" - ":"")+r,i&&(r+=". For more information about this error, please see http://datatables.net/tn/"+i),n)t.console&&console.log&&console.log(r);else{var o=u.ext,a=o.sErrMode||o.errMode;if(e&&ft(e,null,"error",[e,i,r]),"alert"==a)alert(r);else{if("throw"==a)throw new Error(r);"function"==typeof a&&a(e,i,r)}}}function st(t,n,i,o){e.isArray(i)?e.each(i,(function(r,i){e.isArray(i)?st(t,n,i[0],i[1]):st(t,n,i)})):(o===r&&(o=i),n[i]!==r&&(t[o]=n[i]))}function ut(t,n,r){var i;for(var o in n)n.hasOwnProperty(o)&&(i=n[o],e.isPlainObject(i)?(e.isPlainObject(t[o])||(t[o]={}),e.extend(!0,t[o],i)):r&&"data"!==o&&"aaData"!==o&&e.isArray(i)?t[o]=i.slice():t[o]=i);return t}function lt(t,n,r){e(t).on("click.DT",n,(function(n){e(t).blur(),r(n)})).on("keypress.DT",n,(function(e){13===e.which&&(e.preventDefault(),r(e))})).on("selectstart.DT",(function(){return!1}))}function ct(e,t,n,r){n&&e[t].push({fn:n,sName:r})}function ft(t,n,r,i){var o=[];if(n&&(o=e.map(t[n].slice().reverse(),(function(e,n){return e.fn.apply(t.oInstance,i)}))),null!==r){var a=e.Event(r+".dt");e(t.nTable).trigger(a,i),o.push(a.result)}return o}function ht(e){var t=e._iDisplayStart,n=e.fnDisplayEnd(),r=e._iDisplayLength;t>=n&&(t=n-r),t-=t%r,(-1===r||t<0)&&(t=0),e._iDisplayStart=t}function dt(t,n){var r=t.renderer,i=u.ext.renderer[n];return e.isPlainObject(r)&&r[n]?i[r[n]]||i._:"string"==typeof r&&i[r]||i._}function pt(e){return e.oFeatures.bServerSide?"ssp":e.ajax||e.sAjaxSource?"ajax":"dom"}var mt=[],gt=Array.prototype;o=function(t,n){if(!(this instanceof o))return new o(t,n);var r=[],i=function(t){var n=function(t){var n,r,i=u.settings,o=e.map(i,(function(e,t){return e.nTable}));return t?t.nTable&&t.oApi?[t]:t.nodeName&&"table"===t.nodeName.toLowerCase()?-1!==(n=e.inArray(t,o))?[i[n]]:null:t&&"function"==typeof t.settings?t.settings().toArray():("string"==typeof t?r=e(t):t instanceof e&&(r=t),r?r.map((function(t){return-1!==(n=e.inArray(this,o))?i[n]:null})).toArray():void 0):[]}(t);n&&(r=r.concat(n))};if(e.isArray(t))for(var a=0,s=t.length;a<s;a++)i(t[a]);else i(t);this.context=N(r),n&&e.merge(this,n),this.selector={rows:null,cols:null,opts:null},o.extend(this,this,mt)},u.Api=o,e.extend(o.prototype,{any:function(){return 0!==this.count()},concat:gt.concat,context:[],count:function(){return this.flatten().length},each:function(e){for(var t=0,n=this.length;t<n;t++)e.call(this,this[t],t,this);return this},eq:function(e){var t=this.context;return t.length>e?new o(t[e],this[e]):null},filter:function(e){var t=[];if(gt.filter)t=gt.filter.call(this,e,this);else for(var n=0,r=this.length;n<r;n++)e.call(this,this[n],n,this)&&t.push(this[n]);return new o(this.context,t)},flatten:function(){var e=[];return new o(this.context,e.concat.apply(e,this.toArray()))},join:gt.join,indexOf:gt.indexOf||function(e,t){for(var n=t||0,r=this.length;n<r;n++)if(this[n]===e)return n;return-1},iterator:function(e,t,n,i){var a,s,u,l,c,f,h,d,p=[],m=this.context,g=this.selector;for("string"==typeof e&&(i=n,n=t,t=e,e=!1),s=0,u=m.length;s<u;s++){var v=new o(m[s]);if("table"===t)(a=n.call(v,m[s],s))!==r&&p.push(a);else if("columns"===t||"rows"===t)(a=n.call(v,m[s],this[s],s))!==r&&p.push(a);else if("column"===t||"column-rows"===t||"row"===t||"cell"===t)for(h=this[s],"column-rows"===t&&(f=wt(m[s],g.opts)),l=0,c=h.length;l<c;l++)d=h[l],(a="cell"===t?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,e?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:gt.lastIndexOf||function(e,t){return this.indexOf.apply(this.toArray.reverse(),arguments)},length:0,map:function(e){var t=[];if(gt.map)t=gt.map.call(this,e,this);else for(var n=0,r=this.length;n<r;n++)t.push(e.call(this,this[n],n));return new o(this.context,t)},pluck:function(e){return this.map((function(t){return t[e]}))},pop:gt.pop,push:gt.push,reduce:gt.reduce||function(e,t){return j(this,e,t,0,this.length,1)},reduceRight:gt.reduceRight||function(e,t){return j(this,e,t,this.length-1,-1,-1)},reverse:gt.reverse,selector:null,shift:gt.shift,slice:function(){return new o(this.context,this)},sort:gt.sort,splice:gt.splice,toArray:function(){return gt.slice.call(this)},to$:function(){return e(this)},toJQuery:function(){return e(this)},unique:function(){return new o(this.context,N(this))},unshift:gt.unshift}),o.extend=function(t,n,r){if(r.length&&n&&(n instanceof o||n.__dt_wrapper)){var i,a,s,u=function(e,t,n){return function(){var r=t.apply(e,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(t,s.val,s):e.isPlainObject(s.val)?{}:s.val,n[s.name].__dt_wrapper=!0,o.extend(t,n[s.name],s.propExt)}},o.register=a=function(t,n){if(e.isArray(t))for(var r=0,i=t.length;r<i;r++)o.register(t[r],n);else{var a,s,u,l,c=t.split("."),f=mt,h=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n].name===t)return e[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(t,n,i){o.register(t,i),o.register(n,(function(){var t=i.apply(this,arguments);return t===this?this:t instanceof o?t.length?e.isArray(t[0])?new o(t.context,t[0]):t[0]:r:t}))};a("tables()",(function(t){return t?new o(function(t,n){if("number"==typeof t)return[n[t]];var r=e.map(n,(function(e,t){return e.nTable}));return e(r).filter(t).map((function(t){var i=e.inArray(this,r);return n[i]})).toArray()}(t,this.context)):this})),a("table()",(function(e){var t=this.tables(e),n=t.context;return n.length?new o(n[0]):t})),s("tables().nodes()","table().node()",(function(){return this.iterator("table",(function(e){return e.nTable}),1)})),s("tables().body()","table().body()",(function(){return this.iterator("table",(function(e){return e.nTBody}),1)})),s("tables().header()","table().header()",(function(){return this.iterator("table",(function(e){return e.nTHead}),1)})),s("tables().footer()","table().footer()",(function(){return this.iterator("table",(function(e){return e.nTFoot}),1)})),s("tables().containers()","table().container()",(function(){return this.iterator("table",(function(e){return e.nTableWrapper}),1)})),a("draw()",(function(e){return this.iterator("table",(function(t){"page"===e?se(t):("string"==typeof e&&(e="full-hold"!==e),ue(t,!1===e))}))})),a("page()",(function(e){return e===r?this.page.info().page:this.iterator("table",(function(t){Le(t,e)}))})),a("page.info()",(function(e){if(0===this.context.length)return r;var t=this.context[0],n=t._iDisplayStart,i=t.oFeatures.bPaginate?t._iDisplayLength:-1,o=t.fnRecordsDisplay(),a=-1===i;return{page:a?0:Math.floor(n/i),pages:a?1:Math.ceil(o/i),start:n,end:t.fnDisplayEnd(),length:i,recordsTotal:t.fnRecordsTotal(),recordsDisplay:o,serverSide:"ssp"===pt(t)}})),a("page.len()",(function(e){return e===r?0!==this.context.length?this.context[0]._iDisplayLength:r:this.iterator("table",(function(t){Pe(t,e)}))}));var vt=function(e,t,n){if(n){var r=new o(e);r.one("draw",(function(){n(r.ajax.json())}))}if("ssp"==pt(e))ue(e,t);else{Be(e,!0);var i=e.jqXHR;i&&4!==i.readyState&&i.abort(),he(e,[],(function(n){Q(e);for(var r=ge(e,n),i=0,o=r.length;i<o;i++)U(e,r[i]);ue(e,t),Be(e,!1)}))}};a("ajax.json()",(function(){var e=this.context;if(e.length>0)return e[0].json})),a("ajax.params()",(function(){var e=this.context;if(e.length>0)return e[0].oAjaxData})),a("ajax.reload()",(function(e,t){return this.iterator("table",(function(n){vt(n,!1===t,e)}))})),a("ajax.url()",(function(t){var n=this.context;return t===r?0===n.length?r:(n=n[0]).ajax?e.isPlainObject(n.ajax)?n.ajax.url:n.ajax:n.sAjaxSource:this.iterator("table",(function(n){e.isPlainObject(n.ajax)?n.ajax.url=t:n.ajax=t}))})),a("ajax.url().load()",(function(e,t){return this.iterator("table",(function(n){vt(n,!1===t,e)}))}));var yt=function(t,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]?e.trim(l[h]):l[h]))&&u.length&&(p=p.concat(u));var g=i.selector[t];if(g.length)for(c=0,f=g.length;c<f;c++)p=g[c](a,s,p);return N(p)},bt=function(t){return t||(t={}),t.filter&&t.search===r&&(t.search=t.filter),e.extend({search:"none",order:"current",page:"all"},t)},xt=function(e){for(var t=0,n=e.length;t<n;t++)if(e[t].length>0)return e[0]=e[t],e[0].length=1,e.length=1,e.context=[e.context[t]],e;return e.length=0,e},wt=function(t,n){var r,i=[],o=t.aiDisplay,a=t.aiDisplayMaster,s=n.search,u=n.order,l=n.page;if("ssp"==pt(t))return"removed"===s?[]:_(0,a.length);if("current"==l)for(f=t._iDisplayStart,h=t.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=e.map(a,(function(e){return c.hasOwnProperty(e)?null:e}))}}else if("index"==u||"original"==u)for(f=0,h=t.aoData.length;f<h;f++)("none"==s||-1===(r=e.inArray(f,o))&&"removed"==s||r>=0&&"applied"==s)&&i.push(f);return i};a("rows()",(function(t,n){t===r?t="":e.isPlainObject(t)&&(n=t,t=""),n=bt(n);var i=this.iterator("table",(function(i){return function(t,n,i){var o;return yt("row",n,(function(n){var a=g(n),s=t.aoData;if(null!==a&&!i)return[a];if(o||(o=wt(t,i)),null!==a&&-1!==e.inArray(a,o))return[a];if(null===n||n===r||""===n)return o;if("function"==typeof n)return e.map(o,(function(e){var t=s[e];return n(e,t._aData,t.nTr)?e: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=e(n).closest("*[data-dt-row]");return c.length?[c.data("dt-row")]:[]}if("string"==typeof n&&"#"===n.charAt(0)){var f=t.aIds[n.replace(/^#/,"")];if(f!==r)return[f.idx]}var h=S(w(t.aoData,o,"nTr"));return e(h).filter(n).map((function(){return this._DT_RowIndex})).toArray()}),t,i)}(i,t,n)}),1);return i.selector.rows=t,i.selector.opts=n,i})),a("rows().nodes()",(function(){return this.iterator("row",(function(e,t){return e.aoData[t].nTr||r}),1)})),a("rows().data()",(function(){return this.iterator(!0,"rows",(function(e,t){return w(e.aoData,t,"_aData")}),1)})),s("rows().cache()","row().cache()",(function(e){return this.iterator("row",(function(t,n){var r=t.aoData[n];return"search"===e?r._aFilterData:r._aSortData}),1)})),s("rows().invalidate()","row().invalidate()",(function(e){return this.iterator("row",(function(t,n){te(t,n,e)}))})),s("rows().indexes()","row().index()",(function(){return this.iterator("row",(function(e,t){return t}),1)})),s("rows().ids()","row().id()",(function(e){for(var t=[],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);t.push((!0===e?"#":"")+u)}return new o(n,t)})),s("rows().remove()","row().remove()",(function(){var e=this;return this.iterator("row",(function(t,n,i){var o,a,s,u,l,c,f=t.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;ee(t.aiDisplayMaster,n),ee(t.aiDisplay,n),ee(e[i],n,!1),t._iRecordsDisplay>0&&t._iRecordsDisplay--,ht(t);var d=t.rowIdFn(h._aData);d!==r&&delete t.aIds[d]})),this.iterator("table",(function(e){for(var t=0,n=e.aoData.length;t<n;t++)e.aoData[t].idx=t})),this})),a("rows.add()",(function(t){var n=this.iterator("table",(function(e){var n,r,i,o=[];for(r=0,i=t.length;r<i;r++)(n=t[r]).nodeName&&"TR"===n.nodeName.toUpperCase()?o.push(W(e,n)[0]):o.push(U(e,n));return o}),1),r=this.rows(-1);return r.pop(),e.merge(r,n),r})),a("row()",(function(e,t){return xt(this.rows(e,t))})),a("row().data()",(function(t){var n=this.context;if(t===r)return n.length&&this.length?n[0].aoData[this[0]]._aData:r;var i=n[0].aoData[this[0]];return i._aData=t,e.isArray(t)&&i.nTr.id&&X(n[0].rowId)(t,i.nTr.id),te(n[0],this[0],"data"),this})),a("row().node()",(function(){var e=this.context;return e.length&&this.length&&e[0].aoData[this[0]].nTr||null})),a("row.add()",(function(t){t instanceof e&&t.length&&(t=t[0]);var n=this.iterator("table",(function(e){return t.nodeName&&"TR"===t.nodeName.toUpperCase()?W(e,t)[0]:U(e,t)}));return this.row(n[0])}));var _t=function(e,t){var n=e.context;if(n.length){var i=n[0].aoData[t!==r?t:e[0]];i&&i._details&&(i._details.remove(),i._detailsShow=r,i._details=r)}},St=function(e,t){var n=e.context;if(n.length&&e.length){var r=n[0].aoData[e[0]];r._details&&(r._detailsShow=t,t?r._details.insertAfter(r.nTr):r._details.detach(),Ot(n[0]))}},Ot=function(e){var t=new o(e),n=".dt.DT_details",r="draw"+n,i="column-visibility"+n,a="destroy"+n,s=e.aoData;t.off(r+" "+i+" "+a),x(s,"_details").length>0&&(t.on(r,(function(n,r){e===r&&t.rows({page:"current"}).eq(0).each((function(e){var t=s[e];t._detailsShow&&t._details.insertAfter(t.nTr)}))})),t.on(i,(function(t,n,r,i){if(e===n)for(var o,a=B(n),u=0,l=s.length;u<l;u++)(o=s[u])._details&&o._details.children("td[colspan]").attr("colspan",a)})),t.on(a,(function(n,r){if(e===r)for(var i=0,o=s.length;i<o;i++)s[i]._details&&_t(t,i)})))},Nt="row().child",Et=Nt+"()";a(Et,(function(t,n){var i=this.context;return t===r?i.length&&this.length?i[0].aoData[this[0]]._details:r:(!0===t?this.child.show():!1===t?_t(this):i.length&&this.length&&function(t,n,r,i){var o=[],a=function(n,r){if(e.isArray(n)||n instanceof e)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=e("<tr><td/></tr>").addClass(r);e("td",u).addClass(r).html(n)[0].colSpan=B(t),o.push(u[0])}};a(r,i),n._details&&n._details.detach(),n._details=e(o),n._detailsShow&&n._details.insertAfter(n.nTr)}(i[0],i[0].aoData[this[0]],t,n),this)})),a([Nt+".show()",Et+".show()"],(function(e){return St(this,!0),this})),a([Nt+".hide()",Et+".hide()"],(function(){return St(this,!1),this})),a([Nt+".remove()",Et+".remove()"],(function(){return _t(this),this})),a(Nt+".isShown()",(function(){var e=this.context;return e.length&&this.length&&e[0].aoData[this[0]]._detailsShow||!1}));var Ct=/^([^:]+):(name|visIdx|visible)$/,At=function(e,t,n,r,i){for(var o=[],a=0,s=i.length;a<s;a++)o.push(V(e,i[a],t));return o};a("columns()",(function(t,n){t===r?t="":e.isPlainObject(t)&&(n=t,t=""),n=bt(n);var i=this.iterator("table",(function(r){return function(t,n,r){var i=t.aoColumns,o=x(i,"sName"),a=x(i,"nTh");return yt("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=wt(t,r);return e.map(i,(function(e,r){return n(r,At(t,r,0,0,u),a[r])?r:null}))}var l="string"==typeof n?n.match(Ct):"";if(l)switch(l[2]){case"visIdx":case"visible":var c=parseInt(l[1],10);if(c<0){var f=e.map(i,(function(e,t){return e.bVisible?t:null}));return[f[f.length+c]]}return[L(t,c)];case"name":return e.map(o,(function(e,t){return e===l[1]?t:null}));default:return[]}if(n.nodeName&&n._DT_CellIndex)return[n._DT_CellIndex.column];var h=e(a).filter(n).map((function(){return e.inArray(this,a)})).toArray();if(h.length||!n.nodeName)return h;var d=e(n).closest("*[data-dt-column]");return d.length?[d.data("dt-column")]:[]}),t,r)}(r,t,n)}),1);return i.selector.cols=t,i.selector.opts=n,i})),s("columns().header()","column().header()",(function(e,t){return this.iterator("column",(function(e,t){return e.aoColumns[t].nTh}),1)})),s("columns().footer()","column().footer()",(function(e,t){return this.iterator("column",(function(e,t){return e.aoColumns[t].nTf}),1)})),s("columns().data()","column().data()",(function(){return this.iterator("column-rows",At,1)})),s("columns().dataSrc()","column().dataSrc()",(function(){return this.iterator("column",(function(e,t){return e.aoColumns[t].mData}),1)})),s("columns().cache()","column().cache()",(function(e){return this.iterator("column-rows",(function(t,n,r,i,o){return w(t.aoData,o,"search"===e?"_aFilterData":"_aSortData",n)}),1)})),s("columns().nodes()","column().nodes()",(function(){return this.iterator("column-rows",(function(e,t,n,r,i){return w(e.aoData,i,"anCells",t)}),1)})),s("columns().visible()","column().visible()",(function(t,n){var i=this.iterator("column",(function(n,i){if(t===r)return n.aoColumns[i].bVisible;!function(t,n,i){var o,a,s,u,l=t.aoColumns,c=l[n],f=t.aoData;if(i===r)return c.bVisible;if(c.bVisible!==i){if(i){var h=e.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 e(x(t.aoData,"anCells",n)).detach();c.bVisible=i,ae(t,t.aoHeader),ae(t,t.aoFooter),t.aiDisplay.length||e(t.nTBody).find("td[colspan]").attr("colspan",B(t)),rt(t)}}(n,i,t)}));return t!==r&&(this.iterator("column",(function(e,r){ft(e,null,"column-visibility",[e,r,t,n])})),(n===r||n)&&this.columns.adjust()),i})),s("columns().indexes()","column().index()",(function(e){return this.iterator("column",(function(t,n){return"visible"===e?F(t,n):n}),1)})),a("columns.adjust()",(function(){return this.iterator("table",(function(e){R(e)}),1)})),a("column.index()",(function(e,t){if(0!==this.context.length){var n=this.context[0];if("fromVisible"===e||"toData"===e)return L(n,t);if("fromData"===e||"toVisible"===e)return F(n,t)}})),a("column()",(function(e,t){return xt(this.columns(e,t))}));a("cells()",(function(t,n,i){if(e.isPlainObject(t)&&(t.row===r?(i=t,t=null):(i=n,n=null)),e.isPlainObject(n)&&(i=n,n=null),null===n||n===r)return this.iterator("table",(function(n){return function(t,n,i){var o,a,s,u,l,c,f,h=t.aoData,d=wt(t,i),p=S(w(h,d,"anCells")),m=e([].concat.apply([],p)),g=t.aoColumns.length;return yt("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(t,o,l),f.anCells?f.anCells[l]:null)&&a.push(c)):a.push(c);return a}if(e.isPlainObject(n))return n.column!==r&&n.row!==r&&-1!==e.inArray(n.row,d)?[n]:[];var p=m.filter(n).map((function(e,t){return{row:t._DT_CellIndex.row,column:t._DT_CellIndex.column}})).toArray();return p.length||!n.nodeName?p:(f=e(n).closest("*[data-dt-row]")).length?[{row:f.data("dt-row"),column:f.data("dt-column")}]:[]}),t,i)}(n,t,bt(i))}));var o,a,s,u,l,c=this.columns(n),f=this.rows(t);this.iterator("table",(function(e,t){for(o=[],a=0,s=f[t].length;a<s;a++)for(u=0,l=c[t].length;u<l;u++)o.push({row:f[t][a],column:c[t][u]})}),1);var h=this.cells(o,i);return e.extend(h.selector,{cols:n,rows:t,opts:i}),h})),s("cells().nodes()","cell().node()",(function(){return this.iterator("cell",(function(e,t,n){var i=e.aoData[t];return i&&i.anCells?i.anCells[n]:r}),1)})),a("cells().data()",(function(){return this.iterator("cell",(function(e,t,n){return V(e,t,n)}),1)})),s("cells().cache()","cell().cache()",(function(e){return e="search"===e?"_aFilterData":"_aSortData",this.iterator("cell",(function(t,n,r){return t.aoData[n][e][r]}),1)})),s("cells().render()","cell().render()",(function(e){return this.iterator("cell",(function(t,n,r){return V(t,n,r,e)}),1)})),s("cells().indexes()","cell().index()",(function(){return this.iterator("cell",(function(e,t,n){return{row:t,column:n,columnVisible:F(e,n)}}),1)})),s("cells().invalidate()","cell().invalidate()",(function(e){return this.iterator("cell",(function(t,n,r){te(t,n,e,r)}))})),a("cell()",(function(e,t,n){return xt(this.cells(e,t,n))})),a("cell().data()",(function(e){var t=this.context,n=this[0];return e===r?t.length&&n.length?V(t[0],n[0].row,n[0].column):r:($(t[0],n[0].row,n[0].column,e),te(t[0],n[0].row,"data",n[0].column),this)})),a("order()",(function(t,n){var i=this.context;return t===r?0!==i.length?i[0].aaSorting:r:("number"==typeof t?t=[[t,n]]:t.length&&!e.isArray(t[0])&&(t=Array.prototype.slice.call(arguments)),this.iterator("table",(function(e){e.aaSorting=t.slice()})))})),a("order.listener()",(function(e,t,n){return this.iterator("table",(function(r){et(r,e,t,n)}))})),a("order.fixed()",(function(t){if(!t){var n=this.context,i=n.length?n[0].aaSortingFixed:r;return e.isArray(i)?{pre:i}:i}return this.iterator("table",(function(n){n.aaSortingFixed=e.extend(!0,{},t)}))})),a(["columns().order()","column().order()"],(function(t){var n=this;return this.iterator("table",(function(r,i){var o=[];e.each(n[i],(function(e,n){o.push([n,t])})),r.aaSorting=o}))})),a("search()",(function(t,n,i,o){var a=this.context;return t===r?0!==a.length?a[0].oPreviousSearch.sSearch:r:this.iterator("table",(function(r){r.oFeatures.bFilter&&ye(r,e.extend({},r.oPreviousSearch,{sSearch:t+"",bRegex:null!==n&&n,bSmart:null===i||i,bCaseInsensitive:null===o||o}),1)}))})),s("columns().search()","column().search()",(function(t,n,i,o){return this.iterator("column",(function(a,s){var u=a.aoPreSearchCols;if(t===r)return u[s].sSearch;a.oFeatures.bFilter&&(e.extend(u[s],{sSearch:t+"",bRegex:null!==n&&n,bSmart:null===i||i,bCaseInsensitive:null===o||o}),ye(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(e){e.fnStateSaveCallback.call(e.oInstance,e,{})}))})),a("state.loaded()",(function(){return this.context.length?this.context[0].oLoadedState:null})),a("state.save()",(function(){return this.iterator("table",(function(e){rt(e)}))})),u.versionCheck=u.fnVersionCheck=function(e){for(var t,n,r=u.version.split("."),i=e.split("."),o=0,a=i.length;o<a;o++)if((t=parseInt(r[o],10)||0)!==(n=parseInt(i[o],10)||0))return t>n;return!0},u.isDataTable=u.fnIsDataTable=function(t){var n=e(t).get(0),r=!1;return t instanceof u.Api||(e.each(u.settings,(function(t,i){var o=i.nScrollHead?e("table",i.nScrollHead)[0]:null,a=i.nScrollFoot?e("table",i.nScrollFoot)[0]:null;i.nTable!==n&&o!==n&&a!==n||(r=!0)})),r)},u.tables=u.fnTables=function(t){var n=!1;e.isPlainObject(t)&&(n=t.api,t=t.visible);var r=e.map(u.settings,(function(n){if(!t||t&&e(n.nTable).is(":visible"))return n.nTable}));return n?new o(r):r},u.camelToHungarian=C,a("$()",(function(t,n){var r=this.rows(n).nodes(),i=e(r);return e([].concat(i.filter(t).toArray(),i.find(t).toArray()))})),e.each(["on","one","off"],(function(t,n){a(n+"()",(function(){var t=Array.prototype.slice.call(arguments);t[0]=e.map(t[0].split(/\s/),(function(e){return e.match(/\.dt\b/)?e:e+".dt"})).join(" ");var r=e(this.tables().nodes());return r[n].apply(r,t),this}))})),a("clear()",(function(){return this.iterator("table",(function(e){Q(e)}))})),a("settings()",(function(){return new o(this.context,this.context)})),a("init()",(function(){var e=this.context;return e.length?e[0].oInit:null})),a("data()",(function(){return this.iterator("table",(function(e){return x(e.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=e(l),p=e(c),m=e(r.nTableWrapper),g=e.map(r.aoData,(function(e){return e.nTr}));r.bDestroying=!0,ft(r,"aoDestroyCallback","destroy",[r]),n||new o(r).columns().visible(!0),m.off(".DT").find(":not(tbody *)").off(".DT"),e(t).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=[],tt(r),e(g).removeClass(r.asStripeClasses.join(" ")),e("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(t){e(this).addClass(r.asDestroyStripes[t%i])})));var y=e.inArray(r,u.settings);-1!==y&&u.settings.splice(y,1)}))})),e.each(["column","row","cell"],(function(e,t){a(t+"s().every()",(function(e){var n=this.selector.opts,i=this;return this.iterator(t,(function(o,a,s,u,l){e.call(i[t](a,"cell"===t?s:n,"cell"===t?n:r),a,s,u,l)}))}))})),a("i18n()",(function(t,n,i){var o=this.context[0],a=K(t)(o.oLanguage);return a===r&&(a=n),i!==r&&e.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(e){return e.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(e){try{return JSON.parse((-1===e.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+e.sInstance+"_"+location.pathname))}catch(e){}},fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(e,t){try{(-1===e.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+e.sInstance+"_"+location.pathname,JSON.stringify(t))}catch(e){}},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:e.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"},E(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},E(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"==pt(this)?1*this._iRecordsTotal:this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==pt(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var e=this._iDisplayLength,t=this._iDisplayStart,n=t+e,r=this.aiDisplay.length,i=this.oFeatures,o=i.bPaginate;return i.bServerSide?!1===o||-1===e?t+r:Math.min(t+e,this._iRecordsDisplay):!o||n>r||-1===e?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},e.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}),e.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 Mt=u.ext.pager;function kt(e,t){var n=[],r=Mt.numbers_length,i=Math.floor(r/2);return t<=r?n=_(0,t):e<=i?((n=_(0,r-2)).push("ellipsis"),n.push(t-1)):e>=t-1-i?((n=_(t-(r-2),t)).splice(0,0,"ellipsis"),n.splice(0,0,0)):((n=_(e-i+2,e+i-1)).push("ellipsis"),n.push(t-1),n.splice(0,0,"ellipsis"),n.splice(0,0,0)),n.DT_el="span",n}e.extend(Mt,{simple:function(e,t){return["previous","next"]},full:function(e,t){return["first","previous","next","last"]},numbers:function(e,t){return[kt(e,t)]},simple_numbers:function(e,t){return["previous",kt(e,t),"next"]},full_numbers:function(e,t){return["first","previous",kt(e,t),"next","last"]},first_last_numbers:function(e,t){return["first",kt(e,t),"last"]},_numbers:kt,numbers_length:7}),e.extend(!0,u.ext.renderer,{pageButton:{_:function(t,i,o,a,s,u){var l,c,f,h=t.oClasses,d=t.oLanguage.oPaginate,p=t.oLanguage.oAria.paginate||{},m=0,g=function(n,r){var i,a,f,v=function(e){Le(t,e.data.action,!0)};for(i=0,a=r.length;i<a;i++)if(f=r[i],e.isArray(f)){var y=e("<"+(f.DT_el||"div")+"/>").appendTo(n);g(y,f)}else{switch(l=null,c="",f){case"ellipsis":n.append('<span class="ellipsis">&#x2026;</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&&(lt(e("<a>",{class:h.sPageButton+" "+c,"aria-controls":t.sTableId,"aria-label":p[f],"data-dt-idx":m,tabindex:t.iTabIndex,id:0===o&&"string"==typeof f?t.sTableId+"_"+f:null}).html(l).appendTo(n),{action:f},v),m++)}};try{f=e(i).find(n.activeElement).data("dt-idx")}catch(e){}g(e(i).empty(),a),f!==r&&e(i).find("[data-dt-idx="+f+"]").focus()}}}),e.extend(u.ext.type.detect,[function(e,t){var n=t.oLanguage.sDecimal;return y(e,n)?"num"+n:null},function(e,t){if(e&&!(e instanceof Date)&&!h.test(e))return null;var n=Date.parse(e);return null!==n&&!isNaN(n)||m(e)?"date":null},function(e,t){var n=t.oLanguage.sDecimal;return y(e,n,!0)?"num-fmt"+n:null},function(e,t){var n=t.oLanguage.sDecimal;return b(e,n)?"html-num"+n:null},function(e,t){var n=t.oLanguage.sDecimal;return b(e,n,!0)?"html-num-fmt"+n:null},function(e,t){return m(e)||"string"==typeof e&&-1!==e.indexOf("<")?"html":null}]),e.extend(u.ext.type.search,{html:function(e){return m(e)?e:"string"==typeof e?e.replace(c," ").replace(f,""):""},string:function(e){return m(e)?e:"string"==typeof e?e.replace(c," "):e}});var Tt=function(e,t,n,r){return 0===e||e&&"-"!==e?(t&&(e=v(e,t)),e.replace&&(n&&(e=e.replace(n,"")),r&&(e=e.replace(r,""))),1*e):-1/0};function Dt(t){e.each({num:function(e){return Tt(e,t)},"num-fmt":function(e){return Tt(e,t,p)},"html-num":function(e){return Tt(e,t,f)},"html-num-fmt":function(e){return Tt(e,t,f,p)}},(function(e,n){i.type.order[e+t+"-pre"]=n,e.match(/^html\-/)&&(i.type.search[e+t]=i.type.search.html)}))}e.extend(i.type.order,{"date-pre":function(e){var t=Date.parse(e);return isNaN(t)?-1/0:t},"html-pre":function(e){return m(e)?"":e.replace?e.replace(/<.*?>/g,"").toLowerCase():e+""},"string-pre":function(e){return m(e)?"":"string"==typeof e?e.toLowerCase():e.toString?e.toString():""},"string-asc":function(e,t){return e<t?-1:e>t?1:0},"string-desc":function(e,t){return e<t?1:e>t?-1:0}}),Dt(""),e.extend(!0,u.ext.renderer,{header:{_:function(t,n,r,i){e(t.nTable).on("order.dt.DT",(function(e,o,a,s){if(t===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(t,n,r,i){e("<div/>").addClass(i.sSortJUIWrapper).append(n.contents()).append(e("<span/>").addClass(i.sSortIcon+" "+r.sSortingClassJUI)).appendTo(n),e(t.nTable).on("order.dt.DT",(function(e,o,a,s){if(t===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 jt=function(e){return"string"==typeof e?e.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"):e};function Pt(e){return function(){var t=[ot(this[u.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return u.ext.internal[e].apply(this,t)}}return u.render={number:function(e,t,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 jt(o);s=s.toFixed(n),o=Math.abs(s);var u=parseInt(o,10),l=n?t+(o-u).toFixed(n).substring(2):"";return a+(r||"")+u.toString().replace(/\B(?=(\d{3})+(?!\d))/g,e)+l+(i||"")}}},text:function(){return{display:jt}}},e.extend(u.ext.internal,{_fnExternApiFunc:Pt,_fnBuildAjax:he,_fnAjaxUpdate:de,_fnAjaxParameters:pe,_fnAjaxUpdateDraw:me,_fnAjaxDataSrc:ge,_fnAddColumn:P,_fnColumnOptions:I,_fnAdjustColumnSizing:R,_fnVisibleToColumnIndex:L,_fnColumnIndexToVisible:F,_fnVisbleColumns:B,_fnGetColumns:q,_fnColumnTypes:z,_fnApplyColumnDefs:H,_fnHungarianMap:E,_fnCamelToHungarian:C,_fnLanguageCompat:A,_fnBrowserDetect:D,_fnAddData:U,_fnAddTr:W,_fnNodeToDataIndex:function(e,t){return t._DT_RowIndex!==r?t._DT_RowIndex:null},_fnNodeToColumnIndex:function(t,n,r){return e.inArray(r,t.aoData[n].anCells)},_fnGetCellData:V,_fnSetCellData:$,_fnSplitObjNotation:G,_fnGetObjectDataFn:K,_fnSetObjectDataFn:X,_fnGetDataMaster:J,_fnClearTable:Q,_fnDeleteIndex:ee,_fnInvalidate:te,_fnGetRowElements:ne,_fnCreateTr:re,_fnBuildHead:oe,_fnDrawHead:ae,_fnDraw:se,_fnReDraw:ue,_fnAddOptionsHtml:le,_fnDetectHeader:ce,_fnGetUniqueThs:fe,_fnFeatureHtmlFilter:ve,_fnFilterComplete:ye,_fnFilterCustom:be,_fnFilterColumn:xe,_fnFilter:we,_fnFilterCreateSearch:_e,_fnEscapeRegex:Se,_fnFilterData:Ee,_fnFeatureHtmlInfo:Me,_fnUpdateInfo:ke,_fnInfoMacros:Te,_fnInitialise:De,_fnInitComplete:je,_fnLengthChange:Pe,_fnFeatureHtmlLength:Ie,_fnFeatureHtmlPaginate:Re,_fnPageChange:Le,_fnFeatureHtmlProcessing:Fe,_fnProcessingDisplay:Be,_fnFeatureHtmlTable:qe,_fnScrollDraw:ze,_fnApplyToChildren:He,_fnCalculateColumnWidths:We,_fnThrottle:Ve,_fnConvertToWidth:$e,_fnGetWidestNode:Ye,_fnGetMaxLenString:Ze,_fnStringToCss:Ge,_fnSortFlatten:Ke,_fnSort:Xe,_fnSortAria:Je,_fnSortListener:Qe,_fnSortAttachListener:et,_fnSortingClasses:tt,_fnSortData:nt,_fnSaveState:rt,_fnLoadState:it,_fnSettingsFromNode:ot,_fnLog:at,_fnMap:st,_fnBindAction:lt,_fnCallbackReg:ct,_fnCallbackFire:ft,_fnLengthOverflow:ht,_fnRenderer:dt,_fnDataSource:pt,_fnRowAttributes:ie,_fnExtend:ut,_fnCalculateEnd:function(){}}),e.fn.dataTable=u,u.$=e,e.fn.dataTableSettings=u.settings,e.fn.dataTableExt=u.ext,e.fn.DataTable=function(t){return e(this).dataTable(t).api()},e.each(u,(function(t,n){e.fn.DataTable[t]=n})),e.fn.dataTable}(e,window,document)}.apply(t,r),void 0===i||(e.exports=i)}()},27856:function(e){e.exports=function(){"use strict";var e=Object.freeze||function(e){return e},t=e(["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=e(["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=e(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),i=e(["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=e(["#text"]),a=Object.freeze||function(e){return e},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(e,t){h&&h(e,null);for(var n=t.length;n--;){var r=t[n];if("string"==typeof r){var i=r.toLowerCase();i!==r&&(Object.isFrozen(t)||(t[n]=i),r=i)}e[r]=!0}return e}function m(e){var t={},n=void 0;for(n in e)d(f,e,[n])&&(t[n]=e[n]);return t}d||(d=function(e,t,n){return e.apply(t,n)});var g=Object.seal||function(e){return e},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(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function N(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var E=("undefined"!=typeof Reflect&&Reflect).apply,C=Array.prototype.slice,A=Object.freeze,M=function(){return"undefined"==typeof window?null:window};E||(E=function(e,t,n){return e.apply(t,n)});return function e(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:M(),f=function(t){return e(t)};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,k=a.document,T=a.DocumentFragment,D=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,B=a.DOMParser,q=a.TrustedTypes;if("function"==typeof D){var z=k.createElement("template");z.content&&z.content.ownerDocument&&(k=z.content.ownerDocument)}var H=function(e,t){if("object"!==(void 0===e?"undefined":O(e))||"function"!=typeof e.createPolicy)return null;var n=null,r="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(r)&&(n=t.currentScript.getAttribute(r));var i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+i+" could not be created."),null}}(q,h),U=H?H.createHTML(""):"",W=k,V=W.implementation,$=W.createNodeIterator,Y=W.getElementsByTagName,Z=W.createDocumentFragment,G=h.importNode,K={};f.isSupported=V&&void 0!==V.createHTMLDocument&&9!==k.documentMode;var X=v,J=y,Q=b,ee=x,te=_,ne=S,re=w,ie=null,oe=p({},[].concat(N(t),N(n),N(r),N(i),N(o))),ae=null,se=p({},[].concat(N(s),N(u),N(l),N(c))),ue=null,le=null,ce=!0,fe=!0,he=!1,de=!1,pe=!1,me=!1,ge=!1,ve=!1,ye=!1,be=!1,xe=!1,we=!0,_e=!0,Se=!1,Oe={},Ne=p({},["audio","head","math","script","style","template","svg","video"]),Ee=p({},["audio","video","img","source","image"]),Ce=null,Ae=p({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),Me=null,ke=k.createElement("form"),Te=function(e){Me&&Me===e||(e&&"object"===(void 0===e?"undefined":O(e))||(e={}),ie="ALLOWED_TAGS"in e?p({},e.ALLOWED_TAGS):oe,ae="ALLOWED_ATTR"in e?p({},e.ALLOWED_ATTR):se,Ce="ADD_URI_SAFE_ATTR"in e?p({},e.ADD_URI_SAFE_ATTR):Ae,ue="FORBID_TAGS"in e?p({},e.FORBID_TAGS):{},le="FORBID_ATTR"in e?p({},e.FORBID_ATTR):{},Oe="USE_PROFILES"in e&&e.USE_PROFILES,ce=!1!==e.ALLOW_ARIA_ATTR,fe=!1!==e.ALLOW_DATA_ATTR,he=e.ALLOW_UNKNOWN_PROTOCOLS||!1,de=e.SAFE_FOR_JQUERY||!1,pe=e.SAFE_FOR_TEMPLATES||!1,me=e.WHOLE_DOCUMENT||!1,ye=e.RETURN_DOM||!1,be=e.RETURN_DOM_FRAGMENT||!1,xe=e.RETURN_DOM_IMPORT||!1,ve=e.FORCE_BODY||!1,we=!1!==e.SANITIZE_DOM,_e=!1!==e.KEEP_CONTENT,Se=e.IN_PLACE||!1,re=e.ALLOWED_URI_REGEXP||re,pe&&(fe=!1),be&&(ye=!0),Oe&&(ie=p({},[].concat(N(o))),ae=[],!0===Oe.html&&(p(ie,t),p(ae,s)),!0===Oe.svg&&(p(ie,n),p(ae,u),p(ae,c)),!0===Oe.svgFilters&&(p(ie,r),p(ae,u),p(ae,c)),!0===Oe.mathMl&&(p(ie,i),p(ae,l),p(ae,c))),e.ADD_TAGS&&(ie===oe&&(ie=m(ie)),p(ie,e.ADD_TAGS)),e.ADD_ATTR&&(ae===se&&(ae=m(ae)),p(ae,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&p(Ce,e.ADD_URI_SAFE_ATTR),_e&&(ie["#text"]=!0),me&&p(ie,["html","head","body"]),ie.table&&p(ie,["tbody"]),A&&A(e),Me=e)},De=function(e){f.removed.push({element:e});try{e.parentNode.removeChild(e)}catch(t){e.outerHTML=U}},je=function(e,t){try{f.removed.push({attribute:t.getAttributeNode(e),from:t})}catch(e){f.removed.push({attribute:null,from:t})}t.removeAttribute(e)},Pe=function(e){var t=void 0,n=void 0;if(ve)e="<remove></remove>"+e;else{var r=e.match(/^[\s]+/);(n=r&&r[0])&&(e=e.slice(n.length))}if(d)try{t=(new B).parseFromString(e,"text/html")}catch(e){}if(g&&p(ue,["title"]),!t||!t.documentElement){var i=(t=V.createHTMLDocument("")).body;i.parentNode.removeChild(i.parentNode.firstElementChild),i.outerHTML=H?H.createHTML(e):e}return n&&t.body.insertBefore(k.createTextNode(n),t.body.childNodes[0]||null),Y.call(t,me?"html":"body")[0]};f.isSupported&&(function(){try{Pe('<svg><p><style><img src="</style><img src=x onerror=1//">').querySelector("svg img")&&(d=!0)}catch(e){}}(),function(){try{Pe("<x/><title>&lt;/title&gt;&lt;img&gt;").querySelector("title").innerHTML.match(/<\/title/)&&(g=!0)}catch(e){}}());var Ie=function(e){return $.call(e.ownerDocument||e,e,P.SHOW_ELEMENT|P.SHOW_COMMENT|P.SHOW_TEXT,(function(){return P.FILTER_ACCEPT}),!1)},Re=function(e){return"object"===(void 0===j?"undefined":O(j))?e instanceof j:e&&"object"===(void 0===e?"undefined":O(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Le=function(e,t,n){K[e]&&K[e].forEach((function(e){e.call(f,t,n,Me)}))},Fe=function(e){var t,n=void 0;if(Le("beforeSanitizeElements",e,null),!((t=e)instanceof L||t instanceof F||"string"==typeof t.nodeName&&"string"==typeof t.textContent&&"function"==typeof t.removeChild&&t.attributes instanceof R&&"function"==typeof t.removeAttribute&&"function"==typeof t.setAttribute))return De(e),!0;var r=e.nodeName.toLowerCase();if(Le("uponSanitizeElement",e,{tagName:r,allowedTags:ie}),!ie[r]||ue[r]){if(_e&&!Ne[r]&&"function"==typeof e.insertAdjacentHTML)try{var i=e.innerHTML;e.insertAdjacentHTML("AfterEnd",H?H.createHTML(i):i)}catch(e){}return De(e),!0}return"noscript"===r&&e.innerHTML.match(/<\/noscript/i)||"noembed"===r&&e.innerHTML.match(/<\/noembed/i)?(De(e),!0):(!de||e.firstElementChild||e.content&&e.content.firstElementChild||!/</g.test(e.textContent)||(f.removed.push({element:e.cloneNode()}),e.innerHTML?e.innerHTML=e.innerHTML.replace(/</g,"&lt;"):e.innerHTML=e.textContent.replace(/</g,"&lt;")),pe&&3===e.nodeType&&(n=(n=(n=e.textContent).replace(X," ")).replace(J," "),e.textContent!==n&&(f.removed.push({element:e.cloneNode()}),e.textContent=n)),Le("afterSanitizeElements",e,null),!1)},Be=function(e,t,n){if(we&&("id"===t||"name"===t)&&(n in k||n in ke))return!1;if(fe&&Q.test(t));else if(ce&&ee.test(t));else{if(!ae[t]||le[t])return!1;if(Ce[t]);else if(re.test(n.replace(ne,"")));else if("src"!==t&&"xlink:href"!==t||"script"===e||0!==n.indexOf("data:")||!Ee[e])if(he&&!te.test(n.replace(ne,"")));else if(n)return!1}return!0},qe=function(e){var t=void 0,n=void 0,r=void 0,i=void 0,o=void 0;Le("beforeSanitizeAttributes",e,null);var a=e.attributes;if(a){var s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ae};for(o=a.length;o--;){var u=t=a[o],l=u.name,c=u.namespaceURI;if(n=t.value.trim(),r=l.toLowerCase(),s.attrName=r,s.attrValue=n,s.keepAttr=!0,Le("uponSanitizeAttribute",e,s),n=s.attrValue,"name"===r&&"IMG"===e.nodeName&&a.id)i=a.id,a=E(C,a,[]),je("id",e),je(l,e),a.indexOf(i)>o&&e.setAttribute("id",i.value);else{if("INPUT"===e.nodeName&&"type"===r&&"file"===n&&s.keepAttr&&(ae[r]||!le[r]))continue;"id"===l&&e.setAttribute(l,""),je(l,e)}if(s.keepAttr){pe&&(n=(n=n.replace(X," ")).replace(J," "));var h=e.nodeName.toLowerCase();if(Be(h,r,n))try{c?e.setAttributeNS(c,l,n):e.setAttribute(l,n),f.removed.pop()}catch(e){}}}Le("afterSanitizeAttributes",e,null)}},ze=function e(t){var n=void 0,r=Ie(t);for(Le("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)Le("uponSanitizeShadowNode",n,null),Fe(n)||(n.content instanceof T&&e(n.content),qe(n));Le("afterSanitizeShadowDOM",t,null)};return f.sanitize=function(e,t){var n=void 0,r=void 0,i=void 0,o=void 0,s=void 0;if(e||(e="\x3c!--\x3e"),"string"!=typeof e&&!Re(e)){if("function"!=typeof e.toString)throw new TypeError("toString is not a function");if("string"!=typeof(e=e.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 e)return a.toStaticHTML(e);if(Re(e))return a.toStaticHTML(e.outerHTML)}return e}if(ge||Te(t),f.removed=[],Se);else if(e instanceof j)1===(r=(n=Pe("\x3c!--\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!ye&&!pe&&!me&&-1===e.indexOf("<"))return H?H.createHTML(e):e;if(!(n=Pe(e)))return ye?null:U}n&&ve&&De(n.firstChild);for(var u=Ie(Se?e:n);i=u.nextNode();)3===i.nodeType&&i===o||Fe(i)||(i.content instanceof T&&ze(i.content),qe(i),o=i);if(o=null,Se)return e;if(ye){if(be)for(s=Z.call(n.ownerDocument);n.firstChild;)s.appendChild(n.firstChild);else s=n;return xe&&(s=G.call(h,s,!0)),s}var l=me?n.outerHTML:n.innerHTML;return pe&&(l=(l=l.replace(X," ")).replace(J," ")),H?H.createHTML(l):l},f.setConfig=function(e){Te(e),ge=!0},f.clearConfig=function(){Me=null,ge=!1},f.isValidAttribute=function(e,t,n){Me||Te({});var r=e.toLowerCase(),i=t.toLowerCase();return Be(r,i,n)},f.addHook=function(e,t){"function"==typeof t&&(K[e]=K[e]||[],K[e].push(t))},f.removeHook=function(e){K[e]&&K[e].pop()},f.removeHooks=function(e){K[e]&&(K[e]=[])},f.removeAllHooks=function(){K={}},f}()}()},81923:function(e,t,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"),e.exports=i},42567:function(e,t,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(e){return e instanceof s.FirebaseError&&e.code.includes("request-failed")}function v(e){var t=e.projectId;return d+"/projects/"+t+"/installations"}function y(e){return{token:e.token,requestStatus:2,expiresIn:(t=e.expiresIn,Number(t.replace("s","000"))),creationTime:Date.now()};var t}function b(e,t){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,t.json()];case 1:return n=i.sent(),r=n.error,[2,m.create("request-failed",{requestName:e,serverCode:r.code,serverMessage:r.message,serverStatus:r.status})]}}))}))}function x(e){var t=e.apiKey;return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":t})}function w(e,t){var n=t.refreshToken,r=x(e);return r.append("Authorization",function(e){return h+" "+e}(n)),r}function _(e){return(0,a.__awaiter)(this,void 0,void 0,(function(){var t;return(0,a.__generator)(this,(function(n){switch(n.label){case 0:return[4,e()];case 1:return(t=n.sent()).status>=500&&t.status<600?[2,e()]:[2,t]}}))}))}function S(e,t){var n=t.fid;return(0,a.__awaiter)(this,void 0,void 0,(function(){var t,r,i,o,s,u;return(0,a.__generator)(this,(function(a){switch(a.label){case 0:return t=v(e),r=x(e),i={fid:n,authVersion:h,appId:e.appId,sdkVersion:f},o={method:"POST",headers:r,body:JSON.stringify(i)},[4,_((function(){return fetch(t,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(e){return new Promise((function(t){setTimeout(t,e)}))}var N=/^[cdef][\w-]{21}$/,E="";function C(){try{var e=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(e),e[0]=112+e[0]%16;var t=function(e){var t;return(t=e,btoa(String.fromCharCode.apply(String,(0,a.__spread)(t))).replace(/\+/g,"-").replace(/\//g,"_")).substr(0,22)}(e);return N.test(t)?t:E}catch(e){return E}}function A(e){return e.appName+"!"+e.appId}var M=new Map;function k(e,t){var n=A(e);T(n,t),function(e,t){var n=j();n&&n.postMessage({key:e,fid:t}),P()}(n,t)}function T(e,t){var n,r,i=M.get(e);if(i)try{for(var o=(0,a.__values)(i),s=o.next();!s.done;s=o.next())(0,s.value)(t)}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}var D=null;function j(){return!D&&"BroadcastChannel"in self&&((D=new BroadcastChannel("[Firebase] FID Change")).onmessage=function(e){T(e.data.key,e.data.fid)}),D}function P(){0===M.size&&D&&(D.close(),D=null)}var I,R="firebase-installations-database",L=1,F="firebase-installations-store",B=null;function q(){return B||(B=(0,u.openDb)(R,L,(function(e){0===e.oldVersion&&e.createObjectStore(F)}))),B}function z(e,t){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=A(e),[4,q()];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(t,n)];case 3:return a.sent(),[4,i.complete];case 4:return a.sent(),s&&s.fid===t.fid||k(e,t.fid),[2,t]}}))}))}function H(e){return(0,a.__awaiter)(this,void 0,void 0,(function(){var t,n,r;return(0,a.__generator)(this,(function(i){switch(i.label){case 0:return t=A(e),[4,q()];case 1:return n=i.sent(),[4,(r=n.transaction(F,"readwrite")).objectStore(F).delete(t)];case 2:return i.sent(),[4,r.complete];case 3:return i.sent(),[2]}}))}))}function U(e,t){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=A(e),[4,q()];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=t(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||k(e,u.fid),[2,u]}}))}))}function W(e){return(0,a.__awaiter)(this,void 0,void 0,(function(){var t,n,r;return(0,a.__generator)(this,(function(i){switch(i.label){case 0:return[4,U(e,(function(n){var r=function(e){return Y(e||{fid:C(),registrationStatus:0})}(n),i=function(e,t){if(0===t.registrationStatus){if(!navigator.onLine)return{installationEntry:t,registrationPromise:Promise.reject(m.create("app-offline"))};var n={fid:t.fid,registrationStatus:1,registrationTime:Date.now()},r=function(e,t){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(e,t)];case 1:return n=i.sent(),[2,z(e,n)];case 2:return g(r=i.sent())&&409===r.serverCode?[4,H(e)]:[3,4];case 3:return i.sent(),[3,6];case 4:return[4,z(e,{fid:t.fid,registrationStatus:0})];case 5:i.sent(),i.label=6;case 6:throw r;case 7:return[2]}}))}))}(e,n);return{installationEntry:n,registrationPromise:r}}return 1===t.registrationStatus?{installationEntry:t,registrationPromise:V(e)}:{installationEntry:t}}(e,r);return t=i.registrationPromise,i.installationEntry}))];case 1:return(n=i.sent()).fid!==E?[3,3]:(r={},[4,t]);case 2:return[2,(r.installationEntry=i.sent(),r)];case 3:return[2,{installationEntry:n,registrationPromise:t}]}}))}))}function V(e){return(0,a.__awaiter)(this,void 0,void 0,(function(){var t,n,r,i;return(0,a.__generator)(this,(function(o){switch(o.label){case 0:return[4,$(e)];case 1:t=o.sent(),o.label=2;case 2:return 1!==t.registrationStatus?[3,5]:[4,O(100)];case 3:return o.sent(),[4,$(e)];case 4:return t=o.sent(),[3,2];case 5:return 0!==t.registrationStatus?[3,7]:[4,W(e)];case 6:return n=o.sent(),r=n.installationEntry,(i=n.registrationPromise)?[2,i]:[2,r];case 7:return[2,t]}}))}))}function $(e){return U(e,(function(e){if(!e)throw m.create("installation-not-found");return Y(e)}))}function Y(e){return 1===(t=e).registrationStatus&&t.registrationTime+c<Date.now()?{fid:e.fid,registrationStatus:0}:e;var t}function Z(e,t){var n=e.appConfig,r=e.platformLoggerProvider;return(0,a.__awaiter)(this,void 0,void 0,(function(){var e,i,o,s,u,l;return(0,a.__generator)(this,(function(a){switch(a.label){case 0:return e=function(e,t){var n=t.fid;return v(e)+"/"+n+"/authTokens:generate"}(n,t),i=w(n,t),(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(e,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(e,t){return void 0===t&&(t=!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(e.appConfig,(function(r){if(!X(r))throw m.create("not-registered");var i,o=r.authToken;if(!t&&(2===(i=o).requestStatus&&!function(e){var t=Date.now();return t<e.creationTime||e.creationTime+e.expiresIn<t+36e5}(i)))return r;if(1===o.requestStatus)return n=function(e,t){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(e.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(e.appConfig)];case 4:return n=i.sent(),[3,2];case 5:return 0===(r=n.authToken).requestStatus?[2,G(e,t)]:[2,r]}}))}))}(e,t),r;if(!navigator.onLine)throw m.create("app-offline");var s=function(e){var t={requestStatus:1,requestTime:Date.now()};return(0,a.__assign)((0,a.__assign)({},e),{authToken:t})}(r);return n=function(e,t){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(e,t)];case 1:return n=o.sent(),i=(0,a.__assign)((0,a.__assign)({},t),{authToken:n}),[4,z(e.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(e.appConfig)];case 4:return o.sent(),[3,7];case 5:return i=(0,a.__assign)((0,a.__assign)({},t),{authToken:{requestStatus:0}}),[4,z(e.appConfig,i)];case 6:o.sent(),o.label=7;case 7:throw r;case 8:return[2]}}))}))}(e,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(e){return U(e,(function(e){if(!X(e))throw m.create("not-registered");var t;return 1===(t=e.authToken).requestStatus&&t.requestTime+c<Date.now()?(0,a.__assign)((0,a.__assign)({},e),{authToken:{requestStatus:0}}):e}))}function X(e){return void 0!==e&&2===e.registrationStatus}function J(e){return(0,a.__awaiter)(this,void 0,void 0,(function(){var t;return(0,a.__generator)(this,(function(n){switch(n.label){case 0:return[4,W(e)];case 1:return(t=n.sent().registrationPromise)?[4,t]:[3,3];case 2:n.sent(),n.label=3;case 3:return[2]}}))}))}function Q(e,t){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(e,t){var n=t.fid;return v(e)+"/"+n}(e,t),r=w(e,t),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 ee(e){return m.create("missing-app-config-values",{valueName:e})}(I=i.default).INTERNAL.registerComponent(new o.Component("installations",(function(e){var t=e.getProvider("app").getImmediate(),n=function(e){var t,n;if(!e||!e.options)throw ee("App Configuration");if(!e.name)throw ee("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(!e.options[o])throw ee(o)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return{appName:e.name,projectId:e.options.projectId,apiKey:e.options.apiKey,appId:e.options.appId}}(t),r={appConfig:n,platformLoggerProvider:e.getProvider("platform-logger")},i={app:t,getId:function(){return function(e){return(0,a.__awaiter)(this,void 0,void 0,(function(){var t,n,r;return(0,a.__generator)(this,(function(i){switch(i.label){case 0:return[4,W(e.appConfig)];case 1:return t=i.sent(),n=t.installationEntry,(r=t.registrationPromise)?r.catch(console.error):G(e).catch(console.error),[2,n.fid]}}))}))}(r)},getToken:function(e){return function(e,t){return void 0===t&&(t=!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(e.appConfig)];case 1:return n.sent(),[4,G(e,t)];case 2:return[2,n.sent().token]}}))}))}(r,e)},delete:function(){return function(e){return(0,a.__awaiter)(this,void 0,void 0,(function(){var t,n;return(0,a.__generator)(this,(function(r){switch(r.label){case 0:return[4,U(t=e.appConfig,(function(e){if(!e||0!==e.registrationStatus)return e}))];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(t,n)];case 4:return r.sent(),[4,H(t)];case 5:r.sent(),r.label=6;case 6:return[2]}}))}))}(r)},onIdChange:function(e){return function(e,t){var n=e.appConfig;return function(e,t){j();var n=A(e),r=M.get(n);r||(r=new Set,M.set(n,r)),r.add(t)}(n,t),function(){!function(e,t){var n=A(e),r=M.get(n);r&&(r.delete(t),0===r.size&&M.delete(n),P())}(n,t)}}(r,e)}};return i}),"PUBLIC")),I.registerVersion("@firebase/installations",l);var te,ne=n(3031),re=((te={})["missing-app-config-values"]='Missing App configuration value: "{$valueName}"',te["only-available-in-window"]="This method is available in a Window context.",te["only-available-in-sw"]="This method is available in a service worker context.",te["permission-default"]="The notification permission was not granted and dismissed instead.",te["permission-blocked"]="The notification permission was not granted and blocked instead.",te["unsupported-browser"]="This browser doesn't support the API's required to use the firebase SDK.",te["failed-service-worker-registration"]="We are unable to register the default service worker. {$browserErrorMessage}",te["token-subscribe-failed"]="A problem occured while subscribing the user to FCM: {$errorInfo}",te["token-subscribe-no-token"]="FCM returned no token when subscribing the user to push.",te["token-unsubscribe-failed"]="A problem occured while unsubscribing the user from FCM: {$errorInfo}",te["token-update-failed"]="A problem occured while updating the user from FCM: {$errorInfo}",te["token-update-no-token"]="FCM returned no token when updating the user to push.",te["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.",te["invalid-sw-registration"]="The input to useServiceWorker() must be a ServiceWorkerRegistration.",te["invalid-bg-handler"]="The input to setBackgroundMessageHandler() must be a function.",te["invalid-vapid-key"]="The public VAPID key must be a string.",te["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.",te),ie=new s.ErrorFactory("messaging","Messaging",re);function oe(e){return ie.create("missing-app-config-values",{valueName:e})}function ae(e){var t=new Uint8Array(e);return btoa(String.fromCharCode.apply(String,(0,a.__spread)(t))).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function se(e){for(var t=(e+"=".repeat((4-e.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),n=atob(t),r=new Uint8Array(n.length),i=0;i<n.length;++i)r[i]=n.charCodeAt(i);return r}var ue="fcm_token_details_db",le=5,ce="fcm_token_object_Store";function fe(e){return(0,a.__awaiter)(this,void 0,void 0,(function(){var t,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(t=i.sent(),!t.map((function(e){return e.name})).includes(ue))return[2,null];i.label=2;case 2:return n=null,[4,(0,ne.openDb)(ue,le,(function(t){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 t.oldVersion<2?[2]:t.objectStoreNames.contains(ce)?[4,(r=t.transaction.objectStore(ce)).index("fcmSenderId").get(e)]:[2];case 1:return i=a.sent(),[4,r.clear()];case 2:if(a.sent(),!i)return[2];if(2===t.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:ae(o.vapidKey)}}}else(3===t.oldVersion||4===t.oldVersion)&&(n={token:(o=i).fcmToken,createTime:o.createTime,subscriptionOptions:{auth:ae(o.auth),p256dh:ae(o.p256dh),endpoint:o.endpoint,swScope:o.swScope,vapidKey:ae(o.vapidKey)}});return[2]}}))}))}))];case 3:return i.sent().close(),[4,(0,ne.deleteDb)(ue)];case 4:return i.sent(),[4,(0,ne.deleteDb)("fcm_vapid_details_db")];case 5:return i.sent(),[4,(0,ne.deleteDb)("undefined")];case 6:return i.sent(),[2,he(n)?n:null]}}))}))}function he(e){if(!e||!e.subscriptionOptions)return!1;var t=e.subscriptionOptions;return"number"==typeof e.createTime&&e.createTime>0&&"string"==typeof e.token&&e.token.length>0&&"string"==typeof t.auth&&t.auth.length>0&&"string"==typeof t.p256dh&&t.p256dh.length>0&&"string"==typeof t.endpoint&&t.endpoint.length>0&&"string"==typeof t.swScope&&t.swScope.length>0&&"string"==typeof t.vapidKey&&t.vapidKey.length>0}var de="firebase-messaging-database",pe=1,me="firebase-messaging-store",ge=null;function ve(){return ge||(ge=(0,ne.openDb)(de,pe,(function(e){0===e.oldVersion&&e.createObjectStore(me)}))),ge}function ye(e){return(0,a.__awaiter)(this,void 0,void 0,(function(){var t,n,r;return(0,a.__generator)(this,(function(i){switch(i.label){case 0:return t=we(e),[4,ve()];case 1:return[4,i.sent().transaction(me).objectStore(me).get(t)];case 2:return(n=i.sent())?[2,n]:[3,3];case 3:return[4,fe(e.appConfig.senderId)];case 4:return(r=i.sent())?[4,be(e,r)]:[3,6];case 5:return i.sent(),[2,r];case 6:return[2]}}))}))}function be(e,t){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=we(e),[4,ve()];case 1:return r=o.sent(),[4,(i=r.transaction(me,"readwrite")).objectStore(me).put(t,n)];case 2:return o.sent(),[4,i.complete];case 3:return o.sent(),[2,t]}}))}))}function xe(e){return(0,a.__awaiter)(this,void 0,void 0,(function(){var t,n,r;return(0,a.__generator)(this,(function(i){switch(i.label){case 0:return t=we(e),[4,ve()];case 1:return n=i.sent(),[4,(r=n.transaction(me,"readwrite")).objectStore(me).delete(t)];case 2:return i.sent(),[4,r.complete];case 3:return i.sent(),[2]}}))}))}function we(e){return e.appConfig.appId}var _e,Se="BDOU99-h67HcA6JeFXHbSNMu7e2yNNu3RzoMj8TM4W88jITfq7ZmPvIM1Iv-4_l2LxQcYwhqby2xGpWwzjfAnG4",Oe="https://fcmregistrations.googleapis.com/v1",Ne="FCM_MSG",Ee="google.c.a.c_id";function Ce(e,t){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,Te(e)];case 1:n=a.sent(),r=De(t),i={method:"POST",headers:n,body:JSON.stringify(r)},a.label=2;case 2:return a.trys.push([2,5,,6]),[4,fetch(ke(e.appConfig),i)];case 3:return[4,a.sent().json()];case 4:return o=a.sent(),[3,6];case 5:throw s=a.sent(),ie.create("token-subscribe-failed",{errorInfo:s});case 6:if(o.error)throw u=o.error.message,ie.create("token-subscribe-failed",{errorInfo:u});if(!o.token)throw ie.create("token-subscribe-no-token");return[2,o.token]}}))}))}function Ae(e,t){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,Te(e)];case 1:n=a.sent(),r=De(t.subscriptionOptions),i={method:"PATCH",headers:n,body:JSON.stringify(r)},a.label=2;case 2:return a.trys.push([2,5,,6]),[4,fetch(ke(e.appConfig)+"/"+t.token,i)];case 3:return[4,a.sent().json()];case 4:return o=a.sent(),[3,6];case 5:throw s=a.sent(),ie.create("token-update-failed",{errorInfo:s});case 6:if(o.error)throw u=o.error.message,ie.create("token-update-failed",{errorInfo:u});if(!o.token)throw ie.create("token-update-no-token");return[2,o.token]}}))}))}function Me(e,t){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,Te(e)];case 1:n=a.sent(),r={method:"DELETE",headers:n},a.label=2;case 2:return a.trys.push([2,5,,6]),[4,fetch(ke(e.appConfig)+"/"+t,r)];case 3:return[4,a.sent().json()];case 4:if((i=a.sent()).error)throw o=i.error.message,ie.create("token-unsubscribe-failed",{errorInfo:o});return[3,6];case 5:throw s=a.sent(),ie.create("token-unsubscribe-failed",{errorInfo:s});case 6:return[2]}}))}))}function ke(e){var t=e.projectId;return Oe+"/projects/"+t+"/registrations"}function Te(e){var t=e.appConfig,n=e.installations;return(0,a.__awaiter)(this,void 0,void 0,(function(){var e;return(0,a.__generator)(this,(function(r){switch(r.label){case 0:return[4,n.getToken()];case 1:return e=r.sent(),[2,new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":t.apiKey,"x-goog-firebase-installations-auth":"FIS "+e})]}}))}))}function De(e){var t=e.p256dh,n=e.auth,r=e.endpoint,i=e.vapidKey,o={web:{endpoint:r,auth:n,p256dh:t}};return i!==Se&&(o.web.applicationPubKey=i),o}function je(e,t,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 ie.create("permission-blocked");return[4,Le(t,n)];case 1:return r=a.sent(),[4,ye(e)];case 2:return i=a.sent(),o={vapidKey:n,swScope:t.scope,endpoint:r.endpoint,auth:ae(r.getKey("auth")),p256dh:ae(r.getKey("p256dh"))},i?[3,3]:[2,Re(e,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,Me(e,i.token)];case 5:return a.sent(),[3,7];case 6:return s=a.sent(),console.warn(s),[3,7];case 7:return[2,Re(e,o)];case 8:return Date.now()>=i.createTime+6048e5?[2,Ie({token:i.token,createTime:Date.now(),subscriptionOptions:o},e,t)]:[2,i.token];case 9:return[2]}var u,l,c,f,h,d}))}))}function Pe(e,t){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,ye(e)];case 1:return(n=i.sent())?[4,Me(e,n.token)]:[3,4];case 2:return i.sent(),[4,xe(e)];case 3:i.sent(),i.label=4;case 4:return[4,t.pushManager.getSubscription()];case 5:return(r=i.sent())?[2,r.unsubscribe()]:[2,!0]}}))}))}function Ie(e,t,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,Ae(t,e)];case 1:return r=s.sent(),i=(0,a.__assign)({token:r,createTime:Date.now()},e),[4,be(t,i)];case 2:return s.sent(),[2,r];case 3:return o=s.sent(),[4,Pe(t,n)];case 4:throw s.sent(),o;case 5:return[2]}}))}))}function Re(e,t){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,Ce(e,t)];case 1:return n=i.sent(),r={token:n,createTime:Date.now(),subscriptionOptions:t},[4,be(e,r)];case 2:return i.sent(),[2,r.token]}}))}))}function Le(e,t){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,e.pushManager.getSubscription()];case 1:return(n=r.sent())?[2,n]:[2,e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:se(t)})]}}))}))}function Fe(e){return"object"==typeof e&&!!e&&Ee in e}!function(e){e.PUSH_RECEIVED="push-received",e.NOTIFICATION_CLICKED="notification-clicked"}(_e||(_e={}));var Be=function(){function e(e){var t=this;this.firebaseDependencies=e,this.vapidKey=null,this.onMessageCallback=null,navigator.serviceWorker.addEventListener("message",(function(e){return t.messageEventListener(e)}))}return Object.defineProperty(e.prototype,"app",{get:function(){return this.firebaseDependencies.app},enumerable:!0,configurable:!0}),e.prototype.getToken=function(){return(0,a.__awaiter)(this,void 0,void 0,(function(){var e;return(0,a.__generator)(this,(function(t){switch(t.label){case 0:return this.vapidKey||(this.vapidKey=Se),[4,this.getServiceWorkerRegistration()];case 1:return e=t.sent(),"default"!==Notification.permission?[3,3]:[4,Notification.requestPermission()];case 2:t.sent(),t.label=3;case 3:if("granted"!==Notification.permission)throw ie.create("permission-blocked");return[2,je(this.firebaseDependencies,e,this.vapidKey)]}}))}))},e.prototype.deleteToken=function(){return(0,a.__awaiter)(this,void 0,void 0,(function(){var e;return(0,a.__generator)(this,(function(t){switch(t.label){case 0:return[4,this.getServiceWorkerRegistration()];case 1:return e=t.sent(),[2,Pe(this.firebaseDependencies,e)]}}))}))},e.prototype.requestPermission=function(){return(0,a.__awaiter)(this,void 0,void 0,(function(){var e;return(0,a.__generator)(this,(function(t){switch(t.label){case 0:return"granted"===Notification.permission?[2]:[4,Notification.requestPermission()];case 1:if("granted"===(e=t.sent()))return[2];throw"denied"===e?ie.create("permission-blocked"):ie.create("permission-default")}}))}))},e.prototype.usePublicVapidKey=function(e){if(null!==this.vapidKey)throw ie.create("use-vapid-key-after-get-token");if("string"!=typeof e||0===e.length)throw ie.create("invalid-vapid-key");this.vapidKey=e},e.prototype.useServiceWorker=function(e){if(!(e instanceof ServiceWorkerRegistration))throw ie.create("invalid-sw-registration");if(this.swRegistration)throw ie.create("use-sw-after-get-token");this.swRegistration=e},e.prototype.onMessage=function(e){var t=this;return this.onMessageCallback="function"==typeof e?e:e.next,function(){t.onMessageCallback=null}},e.prototype.setBackgroundMessageHandler=function(){throw ie.create("only-available-in-sw")},e.prototype.onTokenRefresh=function(){return function(){}},e.prototype.getServiceWorkerRegistration=function(){return(0,a.__awaiter)(this,void 0,void 0,(function(){var e,t;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]),e=this,[4,navigator.serviceWorker.register("/firebase-messaging-sw.js",{scope:"/firebase-cloud-messaging-push-scope"})];case 2:return e.swRegistration=n.sent(),this.swRegistration.update().catch((function(){})),[3,4];case 3:throw t=n.sent(),ie.create("failed-service-worker-registration",{browserErrorMessage:t.message});case 4:return[2,this.swRegistration]}}))}))},e.prototype.messageEventListener=function(e){var t;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===(t=e.data)||void 0===t?void 0:t.firebaseMessaging)?(n=e.data.firebaseMessaging,r=n.type,i=n.payload,this.onMessageCallback&&r===_e.PUSH_RECEIVED&&this.onMessageCallback(i),Fe(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]}}))}))},e.prototype.logEvent=function(e,t){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(e){switch(e){case _e.NOTIFICATION_CLICKED:return"notification_open";case _e.PUSH_RECEIVED:return"notification_foreground";default:throw new Error}}(e),[4,this.firebaseDependencies.analyticsProvider.get()];case 1:return r.sent().logEvent(n,{message_id:t[Ee],message_name:t["google.c.a.c_l"],message_time:t["google.c.a.ts"],message_device_time:Math.floor(Date.now()/1e3)}),[2]}}))}))},e}(),qe=function(){function e(e){var t=this;this.firebaseDependencies=e,this.vapidKey=null,this.bgMessageHandler=null,self.addEventListener("push",(function(e){e.waitUntil(t.onPush(e))})),self.addEventListener("pushsubscriptionchange",(function(e){e.waitUntil(t.onSubChange(e))})),self.addEventListener("notificationclick",(function(e){e.waitUntil(t.onNotificationClick(e))}))}return Object.defineProperty(e.prototype,"app",{get:function(){return this.firebaseDependencies.app},enumerable:!0,configurable:!0}),e.prototype.setBackgroundMessageHandler=function(e){if(!e||"function"!=typeof e)throw ie.create("invalid-bg-handler");this.bgMessageHandler=e},e.prototype.getToken=function(){var e,t;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,ye(this.firebaseDependencies)];case 1:n=r.sent(),this.vapidKey=null!==(t=null===(e=null==n?void 0:n.subscriptionOptions)||void 0===e?void 0:e.vapidKey)&&void 0!==t?t:Se,r.label=2;case 2:return[2,je(this.firebaseDependencies,self.registration,this.vapidKey)]}}))}))},e.prototype.deleteToken=function(){return Pe(this.firebaseDependencies,self.registration)},e.prototype.requestPermission=function(){throw ie.create("only-available-in-window")},e.prototype.usePublicVapidKey=function(e){if(null!==this.vapidKey)throw ie.create("use-vapid-key-after-get-token");if("string"!=typeof e||0===e.length)throw ie.create("invalid-vapid-key");this.vapidKey=e},e.prototype.useServiceWorker=function(){throw ie.create("only-available-in-window")},e.prototype.onMessage=function(){throw ie.create("only-available-in-window")},e.prototype.onTokenRefresh=function(){throw ie.create("only-available-in-window")},e.prototype.onPush=function(e){return(0,a.__awaiter)(this,void 0,void 0,(function(){var t,n,r;return(0,a.__generator)(this,(function(i){switch(i.label){case 0:return t=function(e){var t=e.data;if(!t)return null;try{return t.json()}catch(e){return null}}(e),t?[4,Ue()]:[2];case 1:return function(e){return e.some((function(e){return"visible"===e.visibilityState&&!e.url.startsWith("chrome-extension://")}))}(n=i.sent())?[2,He(n,t)]:(r=function(e){var t;if(e&&"object"==typeof e.notification){var n=(0,a.__assign)({},e.notification);return n.data=(0,a.__assign)((0,a.__assign)({},e.notification.data),((t={})[Ne]=e,t)),n}}(t),r?[4,Ve(r)]:[3,3]);case 2:return i.sent(),[3,5];case 3:return this.bgMessageHandler?[4,this.bgMessageHandler(t)]:[3,5];case 4:i.sent(),i.label=5;case 5:return[2]}}))}))},e.prototype.onSubChange=function(e){var t,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 e.newSubscription?[3,2]:[4,Pe(this.firebaseDependencies,self.registration)];case 1:case 5:return i.sent(),[2];case 2:return[4,ye(this.firebaseDependencies)];case 3:return r=i.sent(),[4,Pe(this.firebaseDependencies,self.registration)];case 4:return i.sent(),[4,je(this.firebaseDependencies,self.registration,null!==(n=null===(t=null==r?void 0:r.subscriptionOptions)||void 0===t?void 0:t.vapidKey)&&void 0!==n?n:Se)]}}))}))},e.prototype.onNotificationClick=function(e){var t,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===(t=e.notification)||void 0===t?void 0:t.data)||void 0===n?void 0:n[Ne])?e.action?[2]:(e.stopImmediatePropagation(),e.notification.close(),i=function(e){var t,n,r,i=null!==(n=null===(t=e.fcmOptions)||void 0===t?void 0:t.link)&&void 0!==n?n:null===(r=e.notification)||void 0===r?void 0:r.click_action;return i||(Fe(e.data)?self.location.origin:null)}(r),i?[4,ze(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(e){setTimeout(e,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=We(_e.NOTIFICATION_CLICKED,r),[2,o.postMessage(s)]):[2]}}))}))},e}();function ze(e){return(0,a.__awaiter)(this,void 0,void 0,(function(){var t,n,r,i,o,s,u;return(0,a.__generator)(this,(function(l){switch(l.label){case 0:return t=new URL(e,self.location.href).href,[4,Ue()];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===t)return[2,o]}catch(e){s={error:e}}finally{try{i&&!i.done&&(u=r.return)&&u.call(r)}finally{if(s)throw s.error}}return[2,null]}}))}))}function He(e,t){var n,r,i=We(_e.PUSH_RECEIVED,t);try{for(var o=(0,a.__values)(e),s=o.next();!s.done;s=o.next())s.value.postMessage(i)}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}function Ue(){return self.clients.matchAll({type:"window",includeUncontrolled:!0})}function We(e,t){return{firebaseMessaging:{type:e,payload:t}}}function Ve(e){var t,n=null!==(t=e.title)&&void 0!==t?t:"",r=e.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,e)}var $e={isSupported:Ye};function Ye(){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(e){var t=e.getProvider("app").getImmediate(),n=function(e){var t,n;if(!e||!e.options)throw oe("App Configuration Object");if(!e.name)throw oe("App Name");var r=e.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 oe(s)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return{appName:e.name,projectId:r.projectId,apiKey:r.apiKey,appId:r.appId,senderId:r.messagingSenderId}}(t),r={app:t,appConfig:n,installations:e.getProvider("installations").getImmediate(),analyticsProvider:e.getProvider("analytics-internal")};if(!Ye())throw ie.create("unsupported-browser");return self&&"ServiceWorkerGlobalScope"in self?new qe(r):new Be(r)}),"PUBLIC").setServiceProps($e))},54483:function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(67294),o=n(63172),a=["active","paused","tag","focusTrapOptions","_createFocusTrap"],s=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.setNode=function(e){n.node=e},"undefined"!=typeof document&&(n.previouslyFocusedElement=document.activeElement),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"componentDidMount",value:function(){var e=this.props.focusTrapOptions,t={returnFocusOnDeactivate:!1};for(var n in e)e.hasOwnProperty(n)&&"returnFocusOnDeactivate"!==n&&(t[n]=e[n]);this.focusTrap=this.props._createFocusTrap(this.node,t),this.props.active&&this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause()}},{key:"componentDidUpdate",value:function(e){if(e.active&&!this.props.active){var t={returnFocus:this.props.focusTrapOptions.returnFocusOnDeactivate||!1};this.focusTrap.deactivate(t)}else!e.active&&this.props.active&&this.focusTrap.activate();e.paused&&!this.props.paused?this.focusTrap.unpause():!e.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 e={ref:this.setNode};for(var t in this.props)this.props.hasOwnProperty(t)&&-1===a.indexOf(t)&&(e[t]=this.props[t]);return i.createElement(this.props.tag,e,this.props.children)}}]),t}(i.Component);s.defaultProps={active:!0,tag:"div",paused:!1,focusTrapOptions:{},_createFocusTrap:o},e.exports=s},63172:function(e,t,n){var r=n(34760),i=n(47529),o=null;function a(e){return setTimeout(e,0)}e.exports=function(e,t){var n=document,s="string"==typeof e?n.querySelector(e):e,u=i({returnFocusOnDeactivate:!0,escapeDeactivates:!0},t),l={firstTabbableNode:null,lastTabbableNode:null,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1},c={activate:function(e){if(!l.active){x(),l.active=!0,l.paused=!1,l.nodeFocusedBeforeActivation=n.activeElement;var t=e&&e.onActivate?e.onActivate:u.onActivate;return t&&t(),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(e){if(l.active){d(),l.active=!1,l.paused=!1;var t=e&&void 0!==e.onDeactivate?e.onDeactivate:u.onDeactivate;return t&&t(),(e&&void 0!==e.returnFocus?e.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(e){var t=u[e],r=t;if(!t)return null;if("string"==typeof t&&!(r=n.querySelector(t)))throw new Error("`"+e+"` refers to no known node");if("function"==typeof t&&!(r=t()))throw new Error("`"+e+"` did not return a node");return r}function m(){var e;if(!(e=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 e}function g(e){s.contains(e.target)||(u.clickOutsideDeactivates?f({returnFocus:!r.isFocusable(e.target)}):e.preventDefault())}function v(e){s.contains(e.target)||e.target instanceof Document||(e.stopImmediatePropagation(),w(l.mostRecentlyFocusedNode||m()))}function y(e){if(!1!==u.escapeDeactivates&&function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e))return e.preventDefault(),void f();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){if(x(),e.shiftKey&&e.target===l.firstTabbableNode)return e.preventDefault(),void w(l.lastTabbableNode);e.shiftKey||e.target!==l.lastTabbableNode||(e.preventDefault(),w(l.firstTabbableNode))}(e)}function b(e){u.clickOutsideDeactivates||s.contains(e.target)||(e.preventDefault(),e.stopImmediatePropagation())}function x(){var e=r(s);l.firstTabbableNode=e[0]||m(),l.lastTabbableNode=e[e.length-1]||m()}function w(e){e!==n.activeElement&&(e&&e.focus?(e.focus(),l.mostRecentlyFocusedNode=e,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(e)&&e.select()):w(m()))}}},12328:function(e,t,n){var r;!function(i){if(!Object.defineProperty)throw"Font.js requires Object.defineProperty, which this browser does not support.";if(!document.createElement("canvas").getContext)throw"Font.js requires <canvas> and the Canvas2D API, which this browser does not support.";function o(){this.fontFamily="fjs"+(999999*Math.random()|0)}!function(e){try{return void new Uint8Array(1)}catch(e){}function t(e,t){return this.slice(e,t)}function n(e,t){var n,r=e.length;for(arguments.length<2&&(t=0),n=0;n<r;++n,++t)this[t]=255&e[n]}function r(e){var r,i;if("number"==typeof e)for(r=new Array(e),i=0;i<e;++i)r[i]=0;else r=e.slice(0);return r.subarray=t,r.buffer=r,r.byteLength=r.length,r.set=n,"object"==typeof e&&e.buffer&&(r.buffer=e.buffer),r}e.Uint8Array=r,e.Uint32Array=r,e.Int32Array=r}(i),function(e){var t;e.opera||"response"in XMLHttpRequest.prototype||"mozResponseArrayBuffer"in XMLHttpRequest.prototype||"mozResponse"in XMLHttpRequest.prototype||"responseArrayBuffer"in XMLHttpRequest.prototype||(t=e.VBArray?function(){return new Uint8Array(new VBArray(this.responseBody).toArray())}:function(){this.responseBody},Object.defineProperty(XMLHttpRequest.prototype,"response",{get:t}))}(i),i.btoa||(i.btoa=function(e){var t,n,r,i,o,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",s=0,u=0,l="",c=[];if(!e)return e;do{t=(o=e.charCodeAt(s++)<<16|e.charCodeAt(s++)<<8|e.charCodeAt(s++))>>18&63,n=o>>12&63,r=o>>6&63,i=63&o,c[u++]=a.charAt(t)+a.charAt(n)+a.charAt(r)+a.charAt(i)}while(s<e.length);l=c.join("");var f=e.length%3;return(f?l.slice(0,f-3):l)+"===".slice(f||3)}),o.prototype.url="",o.prototype.format="",o.prototype.data="",o.prototype.base64="AAEAAAAKAIAAAwAgT1MvMgAAAAAAAACsAAAAWGNtYXAAAAAAAAABBAAAACxnbHlmAAAAAAAAATAAAAAQaGVhZAAAAAAAAAFAAAAAOGhoZWEAAAAAAAABeAAAACRobXR4AAAAAAAAAZwAAAAIbG9jYQAAAAAAAAGkAAAACG1heHAAAAAAAAABrAAAACBuYW1lAAAAAAAAAcwAAAAgcG9zdAAAAAAAAAHsAAAAEAAEAAEAZAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAABAAMAAQAAAAwABAAgAAAABAAEAAEAAABB//8AAABB////wAABAAAAAAABAAAAAAAAAAAAAAAAMQAAAQAAAAAAAAAAAABfDzz1AAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAEAAgAAAAAAAAABAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAIAAAAAQAAAAIAAQABAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAIAHgADAAEECQABAAAAAAADAAEECQACAAIAAAAAAAEAAAAAAAAAAAAAAAAAAA==",o.prototype.metrics={quadsize:0,leading:0,ascent:0,descent:0,weightclass:400},o.prototype.systemfont=!1,o.prototype.loaded=!1,o.prototype.onload=function(){},o.prototype.onerror=function(){},o.prototype.canvas=!1,o.prototype.context=!1,o.prototype.validate=function(e,t,n,r,i){!1!==i&&i<0?this.onerror("Requested system font '"+this.fontFamily+"' could not be loaded (it may not be installed)."):getComputedStyle(e,null).getPropertyValue("width").replace("px","")>0?(document.head.removeChild(t),document.body.removeChild(e),this.loaded=!0,this.onload()):(console.log("timing out"),setTimeout((function(){r.validate(e,t,n,r,!1!==i&&i-50)}),1e3))},o.prototype.ondownloaded=function(){var e=this,t=function(e){return String.fromCharCode(e)},n=function(e){if(e<256)return t(0)+t(e);var n=255&e;return t(e>>8)+t(n)},r=function(e,t){return 256*e+t},i=function(e,t){var n,r=e>>7==1;return n=256*(e&=127)+t,r?n-32768:n},o=function(e,t,n,r){return 16777216*e+65536*t+256*n+r},a=function(t){e.onerror(t)},s=t(0)+t(1)+t(0)+t(0),u=this.data,l=t(u[0])+t(u[1])+t(u[2])+t(u[3]),c=l===s,f=!c&&"OTTO"===l;if(c)this.format="truetype";else{if(!f)return void a("Error: file at "+this.url+" cannot be interpreted as OpenType font.");this.format="opentype"}var h,d,p=r(u[4],u[5]),m=12+16*p,g={};for(h=12;h<m;h+=16)d=t(u[h])+t(u[h+1])+t(u[h+2])+t(u[h+3]),g[d]={name:d,checksum:o(u[h+4],u[h+5],u[h+6],u[h+7]),offset:o(u[h+8],u[h+9],u[h+10],u[h+11]),length:o(u[h+12],u[h+13],u[h+14],u[h+15])};var v=function(e){return g[e]?e:(a("Error: font is missing the required OpenType '"+e+"' table."),!1)};if(!1!==(d=v("head"))){h=g[d].offset,g[d].version=""+u[h]+u[h+1]+u[h+2]+u[h+3];var y=r(u[h+18],u[h+19]);if(this.metrics.quadsize=y,!1!==(d=v("hhea"))&&(h=g[d].offset,g[d].version=""+u[h]+u[h+1]+u[h+2]+u[h+3],this.metrics.ascent=i(u[h+4],u[h+5])/y,this.metrics.descent=i(u[h+6],u[h+7])/y,this.metrics.leading=i(u[h+8],u[h+9])/y,!1!==(d=v("OS/2"))&&(h=g[d].offset,g[d].version=""+u[h]+u[h+1],this.metrics.weightclass=r(u[h+4],u[h+5]),!1!==(d=v("cmap"))))){h=g[d].offset,g[d].version=""+u[h]+u[h+1],p=r(u[h+2],u[h+3]);for(var b,x,w,_,S=!1,O=0;O<p;O++)x=r(u[b=h+4+8*O],u[b+1]),w=r(u[b+2],u[b+3]),_=o(u[b+4],u[b+5],u[b+6],u[b+7]),3===x&&1===w&&(S=_);var N="A";if(!1!==S&&4===(l=r(u[h+=S],u[h+1]))){for(var E=function(e){return-1===[9,10,11,12,13,32,127,128,129,141,142,143,144,149,157,158,160,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8232,8233,8234,8235,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,12288].indexOf(e)},C=h+14,A=h+14+r(u[h+6],u[h+7])/2*2,M=!1;C<A&&!E(M=r(u[C],u[C+1]));C+=2)M=!1;if(0!=M){N=String.fromCharCode(M);var k=(65536-(M-1))%65536,T=t(0)+n(M)+n(65535)+n(0)+n(M)+n(65535)+n(k)+n(1),D=btoa(T);this.base64=this.base64.substring(0,380)+D+this.base64.substring(380+D.length)}}this.bootstrapValidation(N,!1)}}},o.prototype.bootstrapValidation=function(e,t){var n=this.fontFamily+" testfont",r=document.createElement("style");r.setAttribute("type","text/css"),r.innerHTML="@font-face {\n font-family: '"+n+"';\n src: url('data:application/x-font-ttf;base64,"+this.base64+"')\n format('truetype');}",document.head.appendChild(r);var i=!1;this.systemfont||(i=this.toStyleNode(),document.head.appendChild(i));var o=document.createElement("p");if(o.style.cssText="position: absolute; top: 0; left: 0; opacity: 0;",o.style.fontFamily="'"+this.fontFamily+"', '"+n+"'",o.innerHTML=e+e+e+e+e+e+e+e+e+e,document.body.appendChild(o),"undefined"==typeof getComputedStyle)this.onload(),error("Error: getComputedStyle is not supported by this browser.\nConsequently, Font.onload() cannot be trusted.");else{var a=this.systemfont?1e3:this.metrics.quadsize,s=document.createElement("canvas");s.width=a,s.height=a,this.canvas=s;var u=s.getContext("2d");u.font="1em '"+this.fontFamily+"'",u.fillStyle="white",u.fillRect(-1,-1,a+2,a+2),u.fillStyle="black",u.fillText("test text",50,a/2),this.context=u;var l=this;setTimeout((function(){l.validate(o,r,i,l,t)}),50)}},o.prototype.processSystemFont=function(){this.systemfont=!0,this.metrics=!1,this.bootstrapValidation("A",1e3)},o.prototype.loadFont=function(){var e=this;if(-1!==this.url.indexOf(".")){var t=new XMLHttpRequest;t.open("GET",e.url,!0),t.responseType="arraybuffer",t.onload=function(n){var r=t.response;r?(e.data=new Uint8Array(r),e.ondownloaded()):e.onerror("Error downloading font resource from "+e.url)},t.onerror=function(t){e.onerror("Error downloading font resource from "+e.url)},t.send(null)}else setTimeout((function(){e.processSystemFont()}),10)},o.prototype.styleNode=!1,o.prototype.toStyleNode=function(){if(this.styleNode)return this.styleNode;this.styleNode=document.createElement("style"),this.styleNode.type="text/css";var e=this.url.replace(".ttf",".eot"),t="@font-face {\n";return t+=" font-family: '"+this.fontFamily+"';\n",t+=" src: url('"+e+"') format(eot), url('"+this.url+"') format('"+this.format+"');\n",t+="}",this.styleNode.innerHTML=t,this.styleNode},o.prototype.measureText=function(e,t){if(!this.loaded)return this.onerror("measureText() was called while the font was not yet loaded"),!1;this.context.font=t+"px '"+this.fontFamily+"'";var n=this.context.measureText(e);n.fontsize=t,n.ascent=0,n.descent=0,n.bounds={minx:0,maxx:n.width,miny:0,maxy:0},n.height=0;var r=[];n.width,this.metrics.quadsize,r.push(e);var i,o=r.length;for(i=0;i<o;i++)this.measureSegment(r[i],t,n);return n},o.prototype.measureSegment=function(e,t,n){var r=document.createElement("div");for(r.style.position="absolute",r.style.opacity=0,r.style.font=t+"px '"+this.fontFamily+"'",r.innerHTML=e,v=1;v<10;v++)r.innerHTML+="<br/>"+e;document.body.appendChild(r),n.leading=1.2*t;var i,o=(i=r,"height",document.defaultView.getComputedStyle(i,null).getPropertyValue("height"));if((o=o.replace("px",""))>=10*t&&(n.leading=o/10|0),document.body.removeChild(r),/^\s*$/.test(e))return n;this.canvas;var a=this.context,s=this.systemfont?1e3:this.metrics.quadsize,u=s,l=s,c=s/2,f=(s-n.width)/2;f!==(0|f)&&(f|=0),a.fillStyle="white",a.fillRect(-50,-50,u+100,l+100),a.fillStyle="black",a.fillText(e,f,c);for(var h=n.width+50|0,d=4*t,p=f-25,m=c-d/2,g=a.getImageData(p,m,h,d).data,v=0,y=0,b=4*h,x=g.length,w=d/2;++v<x&&255===g[v];);var _=v/b|0;for(v=x-1;--v>0&&255===g[v];);var S=v/b|0;for(v=0,y=0;y<h&&255===g[v];)(v+=b)>=x&&(y++,v=v-x+4);var O=y,N=1;for(v=x-3,y=0;y<h&&255===g[v];)(v-=b)<0&&(y++,v=x-3-4*N++);var E=h-y;return n.ascent=w-_,n.descent=S-w,n.bounds={minx:O-25,maxx:E-25,miny:-n.descent,maxy:n.ascent},n.height=S-_+1,n},Object.defineProperty(o.prototype,"src",{set:function(e){this.url=e,this.loadFont()}}),void 0===(r=function(){return o}.call(t,n,t,e))||(e.exports=r)}(window)},82414:function(e,t,n){!function(e,t,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(e,t,n){this.bindings(t,n)},events:function(t){var n=this,r=this.S;n.create(this.S(t)),r(this.scope).off(".fndtn.accordion").on("click.fndtn.accordion","["+this.attr_name()+"] > dd > a, ["+this.attr_name()+"] > li > a",(function(t){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=e("> dd, > li",i),l=u.children("."+a.content_class),c=l.filter("."+a.active_class);if(t.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(e,t){return"true"===t?"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(t){var n=t,r=e("> .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&&t.attr("aria-multiselectable","true")},toggle:function(e){var n=void 0!==(e=void 0!==e?e:{}).selector?e.selector:"",r=void 0!==e.toggle_state?e.toggle_state:"",i=(void 0!==e.$accordion?e.$accordion:this.S(this.scope).closest("["+this.attr_name()+"]")).find("> dd"+n+", > li"+n);if(i.length<1)return t.console&&console.error("Selection not found.",n),!1;var o=this.S,a=this.settings.active_class;i.each((function(){var e=o(this),t=e.hasClass(a);(t&&"close"===r||!t&&"open"===r||""===r)&&e.find("> a").trigger("click.fndtn.accordion")}))},open:function(e){(e=void 0!==e?e:{}).toggle_state="open",this.toggle(e)},close:function(e){(e=void 0!==e?e:{}).toggle_state="close",this.toggle(e)},off:function(){},reflow:function(){}}}(n(19755),window,window.document)},13832:function(e,t,n){!function(e,t,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(t,n,r){Foundation.inherit(this,"throttle"),e.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(t){(o(this).data(i.attr_name(!0)+"-init")||i.settings).is_hover&&!Modernizr.touch||(t.preventDefault(),o(this).parent("[data-reveal-id]").length&&t.stopPropagation(),i.toggle(e(this)))})).on("mouseenter.fndtn.dropdown","["+this.attr_name()+"], ["+this.attr_name()+"-content]",(function(e){var t,n,r=o(this);clearTimeout(i.timeout),r.data(i.data_attr())?(t=o("#"+r.data(i.data_attr())),n=r):(t=r,n=o("["+i.attr_name()+'="'+t.attr("id")+'"]'));var a=n.data(i.attr_name(!0)+"-init")||i.settings;o(e.currentTarget).data(i.data_attr())&&a.is_hover&&i.closeall.call(i),a.is_hover&&i.open.apply(i,[t,n])})).on("mouseleave.fndtn.dropdown","["+this.attr_name()+"], ["+this.attr_name()+"-content]",(function(e){var t=o(this);if(t.data(i.data_attr()))n=t.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(){t.data(i.data_attr())?n.is_hover&&i.close.call(i,o("#"+t.data(i.data_attr()))):n.is_hover&&i.close.call(i,t)}.bind(this),n.hover_timeout)})).on("click.fndtn.dropdown",(function(t){var r=o(t.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]")),(t.target===n||e.contains(n.documentElement,t.target))&&(o(t.target).closest("["+i.attr_name()+"]").length>0||(!o(t.target).data("revealId")&&r.length>0&&(o(t.target).is("["+i.attr_name()+"-content]")||e.contains(r.first()[0],t.target))?t.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(t).off(".dropdown").on("resize.fndtn.dropdown",i.throttle((function(){i.resize.call(i)}),50)),this.resize()},close:function(t){var n=this;t.each((function(r){(e("["+n.attr_name()+"="+t[r].id+"]")||e("aria-controls="+t[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",[t]))})),t.removeClass("f-open-"+this.attr_name(!0))},closeall:function(){var t=this;e.each(t.S(".f-open-"+this.attr_name(!0)),(function(){t.close.call(t,t.S(this))}))},open:function(e,t){this.css(e.addClass(this.settings.active_class),t),e.prev("["+this.attr_name()+"]").addClass(this.settings.active_class),e.data("target",t.get(0)).trigger("opened.fndtn.dropdown",[e,t]),e.attr("aria-hidden","false"),t.attr("aria-expanded","true"),e.focus(),e.addClass("f-open-"+this.attr_name(!0))},data_attr:function(){return this.namespace.length>0?this.namespace+"-"+this.name:this.name},toggle:function(e){if(!e.hasClass(this.settings.disabled_class)){var t=this.S("#"+e.data(this.data_attr()));0!==t.length&&(this.close.call(this,this.S("["+this.attr_name()+"-content]").not(t)),t.hasClass(this.settings.active_class)?(this.close.call(this,t),t.data("target")!==e.get(0)&&this.open.call(this,t,e)):this.open.call(this,t,e))}},resize:function(){var t=this.S("["+this.attr_name()+"-content].open"),n=e(t.data("target"));t.length&&n.length&&this.css(t,n)},css:function(e,t){var n=Math.max((t.width()-e.width())/2,8),r=t.data(this.attr_name(!0)+"-init")||this.settings,i=e.parent().css("overflow-y")||e.parent().css("overflow");if(this.clear_idx(),this.small()){var o=this.dirs.bottom.call(e,t,r);e.attr("style","").removeClass("drop-left drop-right drop-top").css({position:"absolute",width:"95%","max-width":"none",top:o.top}),e.css(Foundation.rtl?"right":"left",n)}else if("visible"!==i){var a=t[0].offsetTop+t[0].offsetHeight;e.attr("style","").css({position:"absolute",top:a}),e.css(Foundation.rtl?"right":"left",n)}else this.style(e,t,r);return e},style:function(t,n,r){var i=e.extend({position:"absolute"},this.dirs[r.align].call(t,n,r));t.attr("style","").css(i)},dirs:{_base:function(e,r){var i=this.offsetParent().offset(),o=e.offset();o.top-=i.top,o.left-=i.left,o.missRight=!1,o.missTop=!1,o.missLeft=!1,o.leftRightFlag=!1;var a=t.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=e.offset().left;e.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(e,t){var n=Foundation.libs.dropdown,r=n.dirs._base.call(this,e,t);return this.addClass("drop-top"),1==r.missTop&&(r.top=r.top+e.outerHeight()+this.outerHeight(),this.removeClass("drop-top")),1==r.missRight&&(r.left=r.left-this.outerWidth()+e.outerWidth()),(e.outerWidth()<this.outerWidth()||n.small()||this.hasClass(t.mega_menu))&&n.adjust_pip(this,e,t,r),Foundation.rtl?{left:r.left-this.outerWidth()+e.outerWidth(),top:r.top-this.outerHeight()}:{left:r.left,top:r.top-this.outerHeight()}},bottom:function(e,t){var n=Foundation.libs.dropdown,r=n.dirs._base.call(this,e,t);return 1==r.missRight&&(r.left=r.left-this.outerWidth()+e.outerWidth()),(e.outerWidth()<this.outerWidth()||n.small()||this.hasClass(t.mega_menu))&&n.adjust_pip(this,e,t,r),n.rtl?{left:r.left-this.outerWidth()+e.outerWidth(),top:r.top+e.outerHeight()}:{left:r.left,top:r.top+e.outerHeight()}},left:function(e,t){var n=Foundation.libs.dropdown.dirs._base.call(this,e,t);return this.addClass("drop-left"),1==n.missLeft&&(n.left=n.left+this.outerWidth(),n.top=n.top+e.outerHeight(),this.removeClass("drop-left")),{left:n.left-this.outerWidth(),top:n.top}},right:function(e,t){var n=Foundation.libs.dropdown.dirs._base.call(this,e,t);this.addClass("drop-right"),1==n.missRight?(n.left=n.left-this.outerWidth(),n.top=n.top+e.outerHeight(),this.removeClass("drop-right")):n.triggeredRight=!0;var r=Foundation.libs.dropdown;return(e.outerWidth()<this.outerWidth()||r.small()||this.hasClass(t.mega_menu))&&r.adjust_pip(this,e,t,n),{left:n.left+e.outerWidth(),top:n.top}}},adjust_pip:function(e,t,n,r){var i=Foundation.stylesheet,o=8;e.hasClass(n.mega_class)?o=r.left+t.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=e.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 e=Foundation.stylesheet;void 0!==this.rule_idx&&(e.deleteRule(this.rule_idx),e.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(t).off(".fndtn.dropdown"),this.S("[data-dropdown-content]").off(".fndtn.dropdown")},reflow:function(){}}}(n(19755),window,window.document)},56071:function(e,t,n){!function(e,t,n,r){"use strict";Foundation.libs.offcanvas={name:"offcanvas",version:"5.5.3",settings:{open_method:"move",close_on_click:!1},init:function(e,t,n){this.bindings(t,n)},events:function(){var t=this,n=t.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){t.click_toggle_class(o,r+i),"overlap"!==t.settings.open_method&&n(".left-submenu").removeClass(r+i),e(".left-off-canvas-toggle").attr("aria-expanded","true")})).on("click.fndtn.offcanvas",".left-off-canvas-menu a",(function(o){var a=t.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)):(t.hide.call(t,r+i,t.get_wrapper(o)),s.parent().removeClass(r+i)),e(".left-off-canvas-toggle").attr("aria-expanded","true")})).on("click.fndtn.offcanvas",".right-off-canvas-toggle",(function(i){t.click_toggle_class(i,r+o),"overlap"!==t.settings.open_method&&n(".right-submenu").removeClass(r+o),e(".right-off-canvas-toggle").attr("aria-expanded","true")})).on("click.fndtn.offcanvas",".right-off-canvas-menu a",(function(i){var a=t.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)):(t.hide.call(t,r+o,t.get_wrapper(i)),s.parent().removeClass(r+o)),e(".right-off-canvas-toggle").attr("aria-expanded","true")})).on("click.fndtn.offcanvas",".top-off-canvas-toggle",(function(i){t.click_toggle_class(i,r+s),"overlap"!==t.settings.open_method&&n(".top-submenu").removeClass(r+s),e(".top-off-canvas-toggle").attr("aria-expanded","true")})).on("click.fndtn.offcanvas",".top-off-canvas-menu a",(function(i){var o=t.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)):(t.hide.call(t,r+s,t.get_wrapper(i)),a.parent().removeClass(r+s)),e(".top-off-canvas-toggle").attr("aria-expanded","true")})).on("click.fndtn.offcanvas",".bottom-off-canvas-toggle",(function(i){t.click_toggle_class(i,r+a),"overlap"!==t.settings.open_method&&n(".bottom-submenu").removeClass(r+a),e(".bottom-off-canvas-toggle").attr("aria-expanded","true")})).on("click.fndtn.offcanvas",".bottom-off-canvas-menu a",(function(i){var o=t.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)):(t.hide.call(t,r+a,t.get_wrapper(i)),s.parent().removeClass(r+a)),e(".bottom-off-canvas-toggle").attr("aria-expanded","true")})).on("click.fndtn.offcanvas",".exit-off-canvas",(function(a){t.click_remove_class(a,r+o),n(".right-submenu").removeClass(r+o),i&&(t.click_remove_class(a,r+i),n(".left-submenu").removeClass(r+o)),e(".right-off-canvas-toggle").attr("aria-expanded","true")})).on("click.fndtn.offcanvas",".exit-off-canvas",(function(n){t.click_remove_class(n,r+o),e(".left-off-canvas-toggle").attr("aria-expanded","false"),i&&(t.click_remove_class(n,r+i),e(".right-off-canvas-toggle").attr("aria-expanded","false"))})).on("click.fndtn.offcanvas",".exit-off-canvas",(function(i){t.click_remove_class(i,r+a),n(".bottom-submenu").removeClass(r+a),s&&(t.click_remove_class(i,r+s),n(".top-submenu").removeClass(r+a)),e(".bottom-off-canvas-toggle").attr("aria-expanded","true")})).on("click.fndtn.offcanvas",".exit-off-canvas",(function(n){t.click_remove_class(n,r+a),e(".top-off-canvas-toggle").attr("aria-expanded","false"),s&&(t.click_remove_class(n,r+s),e(".bottom-off-canvas-toggle").attr("aria-expanded","false"))}))},toggle:function(e,t){(t=t||this.get_wrapper()).is("."+e)?this.hide(e,t):this.show(e,t)},show:function(e,t){(t=t||this.get_wrapper()).trigger("open.fndtn.offcanvas"),t.addClass(e)},hide:function(e,t){(t=t||this.get_wrapper()).trigger("close.fndtn.offcanvas"),t.removeClass(e)},click_toggle_class:function(e,t){e.preventDefault();var n=this.get_wrapper(e);this.toggle(t,n)},click_remove_class:function(e,t){e.preventDefault();var n=this.get_wrapper(e);this.hide(t,n)},get_settings:function(e){return this.S(e.target).closest("["+this.attr_name()+"]").data(this.attr_name(!0)+"-init")||this.settings},get_wrapper:function(e){var t=this.S(e?e.target:this.scope).closest(".off-canvas-wrap");return 0===t.length&&(t=this.S(".off-canvas-wrap")),t},reflow:function(){}}}(n(19755),window,window.document)},31564:function(e,t,n){!function(e,t,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(e,t,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(t,n),this.handle_location_hash_change()},events:function(){var e=this,n=this.S,r=function(t,r){n(r).closest("["+e.attr_name()+"]").data(e.attr_name(!0)+"-init").is_hover&&!Modernizr.touch||(9!==(t.keyCode||t.which)&&(t.preventDefault(),t.stopPropagation()),e.toggle_active_tab(n(r).parent()))};n(this.scope).off(".tab").on("keydown.fndtn.tab","["+this.attr_name()+"] > * > a",(function(e){var t=e.keyCode||e.which;13!==t&&32!==t||r(e,this)})).on("click.fndtn.tab","["+this.attr_name()+"] > * > a",(function(e){r(e,this)})).on("mouseenter.fndtn.tab","["+this.attr_name()+"] > * > a",(function(t){n(this).closest("["+e.attr_name()+"]").data(e.attr_name(!0)+"-init").is_hover&&e.toggle_active_tab(n(this).parent())})),n(t).on("hashchange.fndtn.tab",(function(t){t.preventDefault(),e.handle_location_hash_change()}))},handle_location_hash_change:function(){var t=this,n=this.S;n("["+this.attr_name()+"]",this.scope).each((function(){var i,o=n(this).data(t.attr_name(!0)+"-init");if(o.deep_linking)if(""!=(i=o.scroll_to_content?t.scope.location.hash:t.scope.location.hash.replace("fndtn-",""))){var a=n(i);if(a.hasClass("content")&&a.parent().hasClass("tabs-content"))t.toggle_active_tab(e("["+t.attr_name()+"] > * > a[href="+i+"]").parent());else{var s=a.closest(".content").attr("id");s!=r&&t.toggle_active_tab(e("["+t.attr_name()+"] > * > a[href=#"+s+"]").parent(),i)}}else for(var u=0;u<t.default_tab_hashes.length;u++)t.toggle_active_tab(e("["+t.attr_name()+"] > * > a[href="+t.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(e){(e!==(p.scroll_to_content?a.default_tab_hashes[0]:"fndtn-"+a.default_tab_hashes[0].replace("#",""))||t.location.hash)&&(t.location.hash=e)};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(t){var r,i=e(this),o=e(this).parents("li").prev().children('[role="tab"]'),a=e(this).parents("li").next().children('[role="tab"]');switch(t.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()),e('[role="tabpanel"]').attr("aria-hidden","true"),e("#"+e(n.activeElement).attr("href").substring(1)).attr("aria-hidden",null)}))},data_attr:function(e){return this.namespace.length>0?this.namespace+"-"+e:e},off:function(){},reflow:function(){}}}(n(19755),window,window.document)},59172:function(e,t,n){!function(e,t,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(e,t){return'<span data-selector="'+e+'" id="'+e+'" class="'+Foundation.libs.tooltip.settings.tooltip_class.substring(1)+'" role="tooltip">'+t+'<span class="nub"></span></span>'}},cache:{},init:function(e,t,n){Foundation.inherit(this,"random_str"),this.bindings(t,n)},should_show:function(t,n){var r=e.extend({},this.settings,this.data_options(t));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(t){var n=this,r=n.S;function i(e,t,r){e.timer||(r?(e.timer=null,n.showTip(t)):e.timer=setTimeout(function(){e.timer=null,n.showTip(t)}.bind(e),n.settings.hover_delay))}function o(e,t){e.timer&&(clearTimeout(e.timer),e.timer=null),n.hide(t)}n.create(this.S(t)),e(this.scope).off(".tooltip").on("mouseenter.fndtn.tooltip mouseleave.fndtn.tooltip touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip","["+this.attr_name()+"]",(function(t){var a=r(this),s=e.extend({},n.settings,n.data_options(a));if(Modernizr.touch&&/touchstart|MSPointerDown/i.test(t.type)&&r(t.target).is("a"))return!1;if(/mouse/i.test(t.type)&&n.ie_touch(t))return!1;if(a.hasClass("open"))Modernizr.touch&&/touchstart|MSPointerDown/i.test(t.type)&&t.preventDefault(),n.hide(a);else{if(s.disable_for_touch&&Modernizr.touch&&/touchstart|MSPointerDown/i.test(t.type))return;if(!s.disable_for_touch&&Modernizr.touch&&/touchstart|MSPointerDown/i.test(t.type)&&(t.preventDefault(),r(s.tooltip_class+".open").hide(),e(".open["+n.attr_name()+"]").length>0)){var u=r(e(".open["+n.attr_name()+"]")[0]);n.hide(u)}/enter|over/i.test(t.type)?i(this,a):"mouseout"===t.type||"mouseleave"===t.type?o(this,a):i(this,a,!0)}})).on("mouseleave.fndtn.tooltip touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip","["+this.attr_name()+"].open",(function(t){if(/mouse/i.test(t.type)&&n.ie_touch(t))return!1;"touch"==e(this).data("tooltip-open-event-type")&&"mouseleave"==t.type||("mouse"==e(this).data("tooltip-open-event-type")&&/MSPointerDown|touchstart/i.test(t.type)?n.convert_to_touch(e(this)):o(this,e(this)))})).on("DOMNodeRemoved DOMAttrModified","["+this.attr_name()+"]:not(a)",(function(e){o(this,r(this))}))},ie_touch:function(e){return!1},showTip:function(e){var t=this.getTip(e);if(this.should_show(e,t))return this.show(e)},getTip:function(t){var n=this.selector(t),r=e.extend({},this.settings,this.data_options(t)),i=null;return n&&(i=this.S('span[data-selector="'+n+'"]'+r.tooltip_class)),"object"==typeof i&&i},selector:function(e){var t=e.attr(this.attr_name())||e.attr("data-selector");return"string"!=typeof t&&(t=this.random_str(6),e.attr("data-selector",t).attr("aria-describedby",t)),t},create:function(n){var r=this,i=e.extend({},this.settings,this.data_options(n)),o=this.settings.tip_template;"string"==typeof i.tip_template&&t.hasOwnProperty(i.tip_template)&&(o=t[i.tip_template]);var a=e(o(this.selector(n),e("<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(e){r.hide(n)}))),n.removeAttr("title").attr("title","")},reposition:function(t,n,r){var i,o,a,s;n.css("visibility","hidden").show(),i=t.data("width"),a=(o=n.children(".nub")).outerHeight(),o.outerWidth(),this.small()?n.css({width:"100%"}):n.css({width:i||"auto"}),s=function(e,t,n,r,i,o){return e.css({top:t||"auto",bottom:r||"auto",left:i||"auto",right:n||"auto"}).end()};var u=t.offset().top,l=t.offset().left,c=t.outerHeight();if(s(n,u+c+10,"auto","auto",l),this.small())s(n,u+c+10,"auto","auto",12.5,e(this.scope).width()),n.addClass("tip-override"),s(o,-a,"auto","auto",l);else{Foundation.rtl&&(o.addClass("rtl"),l=l+t.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+t.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(t){var n=e.extend({},this.settings,this.data_options(t)),r=["tip-top","tip-left","tip-bottom","tip-right","radius","round"].concat(n.additional_inheritable_classes),i=t.attr("class"),o=i?e.map(i.split(" "),(function(t,n){if(-1!==e.inArray(t,r))return t})).join(" "):"";return e.trim(o)},convert_to_touch:function(t){var n=this,r=n.getTip(t),i=e.extend({},n.settings,n.data_options(t));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(e){n.hide(t)}))),t.data("tooltip-open-event-type","touch")},show:function(e){var t=this.getTip(e);"touch"==e.data("tooltip-open-event-type")&&this.convert_to_touch(e),this.reposition(e,t,e.attr("class")),e.addClass("open"),t.fadeIn(this.settings.fade_in_duration)},hide:function(e){var t=this.getTip(e);t.fadeOut(this.settings.fade_out_duration,(function(){t.find(".tap-to-close").remove(),t.off("click.fndtn.tooltip.tapclose MSPointerDown.fndtn.tapclose"),e.removeClass("open")}))},off:function(){var t=this;this.S(this.scope).off(".fndtn.tooltip"),this.S(this.settings.tooltip_class).each((function(n){e("["+t.attr_name()+"]").eq(n).attr("title",e(this).text())})).remove()},reflow:function(){}}}(n(19755),window,window.document)},93294:function(e,t,n){!function(e,t,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(t,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 t=e(this),n=t.data(i.attr_name(!0)+"-init");i.S("section, .top-bar-section",this),t.data("index",0);var r=t.parent();r.hasClass("fixed")||i.is_sticky(t,r,n)?(i.settings.sticky_class=n.sticky_class,i.settings.sticky_topbar=t,t.data("height",r.outerHeight()),t.data("stickyoffset",r.offset().top)):t.data("height",t.outerHeight()),n.assembled||i.assemble(t),n.is_hover?i.S(".has-dropdown",t).addClass("not-click"):i.S(".has-dropdown",t).removeClass("not-click"),i.add_custom_rule(".f-topbar-fixed { padding-top: "+t.data("height")+"px }"),r.hasClass("fixed")&&i.S("body").addClass("f-topbar-fixed")}))},is_sticky:function(e,t,n){var r=t.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%"}),e(">.name",a).css({right:"100%"})):(a.css({left:"0%"}),e(">.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"),t.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(e){e.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(t){var n=e(this).closest("li"),i=n.closest("["+r.attr_name()+"]").data(r.attr_name(!0)+"-init");i.dropdown_autoclose&&i.is_hover&&e(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(t){var n=i(this),o=i(t.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||(t.stopImmediatePropagation(),n.hasClass("hover")?(n.removeClass("hover").find("li").removeClass("hover"),n.parents("li.hover").removeClass("hover")):(n.addClass("hover"),e(n).siblings().removeClass("hover"),"A"===o[0].nodeName&&o.parent().hasClass("has-dropdown")&&t.preventDefault()))})).on("click.fndtn.topbar","["+this.attr_name()+"] .has-dropdown>a",(function(e){if(r.breakpoint()){e.preventDefault();var t=i(this),n=t.closest("["+r.attr_name()+"]"),o=n.find("section, .top-bar-section"),a=(t.next(".dropdown").outerHeight(),t.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",t.siblings("ul").outerHeight(!0)+n.data("height"))}})),i(t).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(e){i(e.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(e){e.preventDefault();var t=i(this),n=t.closest("["+r.attr_name()+"]"),o=n.find("section, .top-bar-section"),a=(n.data(r.attr_name(!0)+"-init"),t.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(){e(this).parents(".has-dropdown").addClass("hover")})).blur((function(){e(this).parents(".has-dropdown").removeClass("hover")}))},resize:function(){var e=this;e.S("["+this.attr_name()+"]").each((function(){var t,r=e.S(this),i=r.data(e.attr_name(!0)+"-init"),o=r.parent("."+e.settings.sticky_class);if(!e.breakpoint()){var a=r.hasClass("expanded");r.css("height","").removeClass("expanded").find("li").removeClass("hover"),a&&e.toggle(r)}e.is_sticky(r,o,i)&&(o.hasClass("fixed")?(o.removeClass("fixed"),t=o.offset().top,e.S(n.body).hasClass("f-topbar-fixed")&&(t-=r.data("height")),r.data("stickyoffset",t),o.addClass("fixed")):(t=o.offset().top,r.data("stickyoffset",t)))}))},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(t){var n=this,r=t.data(this.attr_name(!0)+"-init"),i=n.S("section, .top-bar-section",t);i.detach(),n.S(".has-dropdown>a",i).each((function(){var t,i=n.S(this),o=i.siblings(".dropdown"),a=i.attr("href");o.find(".title.back").length||(t=1==r.mobile_show_parent_link&&a?e('<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>"):e('<li class="title back js-generated"><h5><a href="javascript:void(0)"></a></h5>'),1==r.custom_back_text?e("h5>a",t).html(r.back_text):e("h5>a",t).html("&laquo; "+i.html()),o.prepend(t))})),i.appendTo(t),this.sticky(),this.assembled(t)},assembled:function(t){t.data(this.attr_name(!0),e.extend({},t.data(this.attr_name(!0)),{assembled:!0}))},height:function(t){var n=0,r=this;return e("> li",t).each((function(){n+=r.S(this).outerHeight(!0)})),n},sticky:function(){var e=this;this.S(t).on("scroll",(function(){e.update_sticky_positioning()}))},update_sticky_positioning:function(){var e="."+this.settings.sticky_class,n=this.S(t),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(e).hasClass("expanded")||(n.scrollTop()>i?r.S(e).hasClass("fixed")||(r.S(e).addClass("fixed"),r.S("body").addClass("f-topbar-fixed")):n.scrollTop()<=i&&r.S(e).hasClass("fixed")&&(r.S(e).removeClass("fixed"),r.S("body").removeClass("f-topbar-fixed")))}},off:function(){this.S(this.scope).off(".fndtn.topbar"),this.S(t).off(".fndtn.topbar")},reflow:function(){}}}(n(19755),window,window.document)},53435:function(e,t,n){"use strict";n(19755),e=n.hmd(e);var r,i=n(19755);r=function(e){e.extend(e.fn,{validate:function(t){if(this.length){var n=e.data(this[0],"validator");return n||(this.attr("novalidate","novalidate"),n=new e.validator(t,this[0]),e.data(this[0],"validator",n),n.settings.onsubmit&&(this.on("click.validate",":submit",(function(t){n.submitButton=t.currentTarget,e(this).hasClass("cancel")&&(n.cancelSubmit=!0),void 0!==e(this).attr("formnovalidate")&&(n.cancelSubmit=!0)})),this.on("submit.validate",(function(t){function r(){var r,i;return n.submitButton&&(n.settings.submitHandler||n.formSubmitted)&&(r=e("<input type='hidden'/>").attr("name",n.submitButton.name).val(e(n.submitButton).val()).appendTo(n.currentForm)),!(n.settings.submitHandler&&!n.settings.debug)||(i=n.settings.submitHandler.call(n,n.currentForm,t),r&&r.remove(),void 0!==i&&i)}return n.settings.debug&&t.preventDefault(),n.cancelSubmit?(n.cancelSubmit=!1,r()):n.form()?n.pendingRequest?(n.formSubmitted=!0,!1):r():(n.focusInvalid(),!1)}))),n)}t&&t.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing.")},valid:function(){var t,n,r;return e(this[0]).is("form")?t=this.validate().form():(r=[],t=!0,n=e(this[0].form).validate(),this.each((function(){(t=n.element(this)&&t)||(r=r.concat(n.errorList))})),n.errorList=r),t},rules:function(t,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(t)switch(i=(r=e.data(l.form,"validator").settings).rules,o=e.validator.staticRules(l),t){case"add":e.extend(o,e.validator.normalizeRule(n)),delete o.messages,i[l.name]=o,n.messages&&(r.messages[l.name]=e.extend(r.messages[l.name],n.messages));break;case"remove":return n?(u={},e.each(n.split(/\s/),(function(e,t){u[t]=o[t],delete o[t]})),u):(delete i[l.name],o)}return(a=e.validator.normalizeRules(e.extend({},e.validator.classRules(l),e.validator.attributeRules(l),e.validator.dataRules(l),e.validator.staticRules(l)),l)).required&&(s=a.required,delete a.required,a=e.extend({required:s},a)),a.remote&&(s=a.remote,delete a.remote,a=e.extend(a,{remote:s})),a}}});var t,n=function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};e.extend(e.expr.pseudos||e.expr[":"],{blank:function(t){return!n(""+e(t).val())},filled:function(t){var r=e(t).val();return null!==r&&!!n(""+r)},unchecked:function(t){return!e(t).prop("checked")}}),e.validator=function(t,n){this.settings=e.extend(!0,{},e.validator.defaults,t),this.currentForm=n,this.init()},e.validator.format=function(t,n){return 1===arguments.length?function(){var n=e.makeArray(arguments);return n.unshift(t),e.validator.format.apply(this,n)}:(void 0===n||(arguments.length>2&&n.constructor!==Array&&(n=e.makeArray(arguments).slice(1)),n.constructor!==Array&&(n=[n]),e.each(n,(function(e,n){t=t.replace(new RegExp("\\{"+e+"\\}","g"),(function(){return n}))}))),t)},e.extend(e.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:e([]),errorLabelContainer:e([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(e){this.lastActive=e,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,e,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(e)))},onfocusout:function(e){this.checkable(e)||!(e.name in this.submitted)&&this.optional(e)||this.element(e)},onkeyup:function(t,n){9===n.which&&""===this.elementValue(t)||-1!==e.inArray(n.keyCode,[16,17,18,20,35,36,37,38,39,40,45,144,225])||(t.name in this.submitted||t.name in this.invalid)&&this.element(t)},onclick:function(e){e.name in this.submitted?this.element(e):e.parentNode.name in this.submitted&&this.element(e.parentNode)},highlight:function(t,n,r){"radio"===t.type?this.findByName(t.name).addClass(n).removeClass(r):e(t).addClass(n).removeClass(r)},unhighlight:function(t,n,r){"radio"===t.type?this.findByName(t.name).removeClass(n).addClass(r):e(t).removeClass(n).addClass(r)}},setDefaults:function(t){e.extend(e.validator.defaults,t)},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:e.validator.format("Please enter no more than {0} characters."),minlength:e.validator.format("Please enter at least {0} characters."),rangelength:e.validator.format("Please enter a value between {0} and {1} characters long."),range:e.validator.format("Please enter a value between {0} and {1}."),max:e.validator.format("Please enter a value less than or equal to {0}."),min:e.validator.format("Please enter a value greater than or equal to {0}."),step:e.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){this.labelContainer=e(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||e(this.currentForm),this.containers=e(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var t,n=this.currentForm,r=this.groups={};function i(t){var r=void 0!==e(this).attr("contenteditable")&&"false"!==e(this).attr("contenteditable");if(!this.form&&r&&(this.form=e(this).closest("form")[0],this.name=e(this).attr("name")),n===this.form){var i=e.data(this.form,"validator"),o="on"+t.type.replace(/^validate/,""),a=i.settings;a[o]&&!e(this).is(a.ignore)&&a[o].call(i,this,t)}}e.each(this.settings.groups,(function(t,n){"string"==typeof n&&(n=n.split(/\s/)),e.each(n,(function(e,n){r[n]=t}))})),t=this.settings.rules,e.each(t,(function(n,r){t[n]=e.validator.normalizeRule(r)})),e(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&&e(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),e.extend(this.submitted,this.errorMap),this.invalid=e.extend({},this.errorMap),this.valid()||e(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var e=0,t=this.currentElements=this.elements();t[e];e++)this.check(t[e]);return this.valid()},element:function(t){var n,r,i=this.clean(t),o=this.validationTargetFor(i),a=this,s=!0;return void 0===o?delete this.invalid[i.name]:(this.prepareElement(o),this.currentElements=e(o),(r=this.groups[o.name])&&e.each(this.groups,(function(e,t){t===r&&e!==o.name&&(i=a.validationTargetFor(a.clean(a.findByName(e))))&&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(),e(t).attr("aria-invalid",!n)),s},showErrors:function(t){if(t){var n=this;e.extend(this.errorMap,t),this.errorList=e.map(this.errorMap,(function(e,t){return{message:e,element:n.findByName(t)[0]}})),this.successList=e.grep(this.successList,(function(e){return!(e.name in t)}))}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){e.fn.resetForm&&e(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var t=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(t)},resetElements:function(e){var t;if(this.settings.unhighlight)for(t=0;e[t];t++)this.settings.unhighlight.call(this,e[t],this.settings.errorClass,""),this.findByName(e[t].name).removeClass(this.settings.validClass);else e.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(e){var t,n=0;for(t in e)void 0!==e[t]&&null!==e[t]&&!1!==e[t]&&n++;return n},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(e){e.not(this.containers).text(""),this.addWrapper(e).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{e(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").trigger("focus").trigger("focusin")}catch(e){}},findLastActive:function(){var t=this.lastActive;return t&&1===e.grep(this.errorList,(function(e){return e.element.name===t.name})).length&&t},elements:function(){var t=this,n={};return e(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter((function(){var r=this.name||e(this).attr("name"),i=void 0!==e(this).attr("contenteditable")&&"false"!==e(this).attr("contenteditable");return!r&&t.settings.debug&&window.console&&console.error("%o has no name assigned",this),i&&(this.form=e(this).closest("form")[0],this.name=r),!(this.form!==t.currentForm||r in n||!t.objectLength(e(this).rules())||(n[r]=!0,0))}))},clean:function(t){return e(t)[0]},errors:function(){var t=this.settings.errorClass.split(" ").join(".");return e(this.settings.errorElement+"."+t,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=e([]),this.toHide=e([])},reset:function(){this.resetInternals(),this.currentElements=e([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(e){this.reset(),this.toHide=this.errorsFor(e)},elementValue:function(t){var n,r,i=e(t),o=t.type,a=void 0!==i.attr("contenteditable")&&"false"!==i.attr("contenteditable");return"radio"===o||"checkbox"===o?this.findByName(t.name).filter(":checked").val():"number"===o&&void 0!==t.validity?t.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(t){t=this.validationTargetFor(this.clean(t));var n,r,i,o,a=e(t).rules(),s=e.map(a,(function(e,t){return t})).length,u=!1,l=this.elementValue(t);for(r in"function"==typeof a.normalizer?o=a.normalizer:"function"==typeof this.settings.normalizer&&(o=this.settings.normalizer),o&&(l=o.call(t,l),delete a.normalizer),a){i={method:r,parameters:a[r]};try{if("dependency-mismatch"===(n=e.validator.methods[r].call(this,l,t,i.parameters))&&1===s){u=!0;continue}if(u=!1,"pending"===n)return void(this.toHide=this.toHide.not(this.errorsFor(t)));if(!n)return this.formatAndAdd(t,i),!1}catch(e){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+t.id+", check the '"+i.method+"' method.",e),e instanceof TypeError&&(e.message+=". Exception occurred when checking element "+t.id+", check the '"+i.method+"' method."),e}}if(!u)return this.objectLength(a)&&this.successList.push(t),!0},customDataMessage:function(t,n){return e(t).data("msg"+n.charAt(0).toUpperCase()+n.substring(1).toLowerCase())||e(t).data("msg")},customMessage:function(e,t){var n=this.settings.messages[e];return n&&(n.constructor===String?n:n[t])},findDefined:function(){for(var e=0;e<arguments.length;e++)if(void 0!==arguments[e])return arguments[e]},defaultMessage:function(t,n){"string"==typeof n&&(n={method:n});var r=this.findDefined(this.customMessage(t.name,n.method),this.customDataMessage(t,n.method),!this.settings.ignoreTitle&&t.title||void 0,e.validator.messages[n.method],"<strong>Warning: No message defined for "+t.name+"</strong>"),i=/\$?\{(\d+)\}/g;return"function"==typeof r?r=r.call(this,n.parameters,t):i.test(r)&&(r=e.validator.format(r.replace(i,"{$1}"),n.parameters)),r},formatAndAdd:function(e,t){var n=this.defaultMessage(e,t);this.errorList.push({message:n,element:e,method:t.method}),this.errorMap[e.name]=n,this.submitted[e.name]=n},addWrapper:function(e){return this.settings.wrapper&&(e=e.add(e.parent(this.settings.wrapper))),e},defaultShowErrors:function(){var e,t,n;for(e=0;this.errorList[e];e++)n=this.errorList[e],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(e=0;this.successList[e];e++)this.showLabel(this.successList[e]);if(this.settings.unhighlight)for(e=0,t=this.validElements();t[e];e++)this.settings.unhighlight.call(this,t[e],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 e(this.errorList).map((function(){return this.element}))},showLabel:function(t,n){var r,i,o,a,s=this.errorsFor(t),u=this.idOrName(t),l=e(t).attr("aria-describedby");s.length?(s.removeClass(this.settings.validClass).addClass(this.settings.errorClass),s.html(n)):(r=s=e("<"+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,e(t)):r.insertAfter(t),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,e(t).attr("aria-describedby",l),(i=this.groups[t.name])&&(a=this,e.each(a.groups,(function(t,n){n===i&&e("[name='"+a.escapeCssMeta(t)+"']",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,t)),this.toShow=this.toShow.add(s)},errorsFor:function(t){var n=this.escapeCssMeta(this.idOrName(t)),r=e(t).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(e){return void 0===e?"":e.replace(/([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(e){return this.groups[e.name]||(this.checkable(e)?e.name:e.id||e.name)},validationTargetFor:function(t){return this.checkable(t)&&(t=this.findByName(t.name)),e(t).not(this.settings.ignore)[0]},checkable:function(e){return/radio|checkbox/i.test(e.type)},findByName:function(t){return e(this.currentForm).find("[name='"+this.escapeCssMeta(t)+"']")},getLength:function(t,n){switch(n.nodeName.toLowerCase()){case"select":return e("option:selected",n).length;case"input":if(this.checkable(n))return this.findByName(n.name).filter(":checked").length}return t.length},depend:function(e,t){return!this.dependTypes[typeof e]||this.dependTypes[typeof e](e,t)},dependTypes:{boolean:function(e){return e},string:function(t,n){return!!e(t,n.form).length},function:function(e,t){return e(t)}},optional:function(t){var n=this.elementValue(t);return!e.validator.methods.required.call(this,n,t)&&"dependency-mismatch"},startRequest:function(t){this.pending[t.name]||(this.pendingRequest++,e(t).addClass(this.settings.pendingClass),this.pending[t.name]=!0)},stopRequest:function(t,n){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[t.name],e(t).removeClass(this.settings.pendingClass),n&&0===this.pendingRequest&&this.formSubmitted&&this.form()&&0===this.pendingRequest?(e(this.currentForm).trigger("submit"),this.submitButton&&e("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!n&&0===this.pendingRequest&&this.formSubmitted&&(e(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(t,n){return n="string"==typeof n&&n||"remote",e.data(t,"previousValue")||e.data(t,"previousValue",{old:null,valid:!0,message:this.defaultMessage(t,{method:n})})},destroy:function(){this.resetForm(),e(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(t,n){t.constructor===String?this.classRuleSettings[t]=n:e.extend(this.classRuleSettings,t)},classRules:function(t){var n={},r=e(t).attr("class");return r&&e.each(r.split(" "),(function(){this in e.validator.classRuleSettings&&e.extend(n,e.validator.classRuleSettings[this])})),n},normalizeAttributeRule:function(e,t,n,r){/min|max|step/.test(n)&&(null===t||/number|range|text/.test(t))&&(r=Number(r),isNaN(r)&&(r=void 0)),r||0===r?e[n]=r:t===n&&"range"!==t&&(e["date"===t?"dateISO":n]=!0)},attributeRules:function(t){var n,r,i={},o=e(t),a=t.getAttribute("type");for(n in e.validator.methods)"required"===n?(""===(r=t.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(t){var n,r,i={},o=e(t),a=t.getAttribute("type");for(n in e.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(t){var n={},r=e.data(t.form,"validator");return r.settings.rules&&(n=e.validator.normalizeRule(r.settings.rules[t.name])||{}),n},normalizeRules:function(t,n){return e.each(t,(function(r,i){if(!1!==i){if(i.param||i.depends){var o=!0;switch(typeof i.depends){case"string":o=!!e(i.depends,n.form).length;break;case"function":o=i.depends.call(n,n)}o?t[r]=void 0===i.param||i.param:(e.data(n.form,"validator").resetElements(e(n)),delete t[r])}}else delete t[r]})),e.each(t,(function(e,r){t[e]="function"==typeof r&&"normalizer"!==e?r(n):r})),e.each(["minlength","maxlength"],(function(){t[this]&&(t[this]=Number(t[this]))})),e.each(["rangelength","range"],(function(){var e;t[this]&&(Array.isArray(t[this])?t[this]=[Number(t[this][0]),Number(t[this][1])]:"string"==typeof t[this]&&(e=t[this].replace(/[\[\]]/g,"").split(/[\s,]+/),t[this]=[Number(e[0]),Number(e[1])]))})),e.validator.autoCreateRanges&&(null!=t.min&&null!=t.max&&(t.range=[t.min,t.max],delete t.min,delete t.max),null!=t.minlength&&null!=t.maxlength&&(t.rangelength=[t.minlength,t.maxlength],delete t.minlength,delete t.maxlength)),t},normalizeRule:function(t){if("string"==typeof t){var n={};e.each(t.split(/\s/),(function(){n[this]=!0})),t=n}return t},addMethod:function(t,n,r){e.validator.methods[t]=n,e.validator.messages[t]=void 0!==r?r:e.validator.messages[t],n.length<3&&e.validator.addClassRules(t,e.validator.normalizeRule(t))},methods:{required:function(t,n,r){if(!this.depend(r,n))return"dependency-mismatch";if("select"===n.nodeName.toLowerCase()){var i=e(n).val();return i&&i.length>0}return this.checkable(n)?this.getLength(t,n)>0:null!=t&&t.length>0},email:function(e,t){return this.optional(t)||/^[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(e)},url:function(e,t){return this.optional(t)||/^(?:(?:(?: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(e)},date:(t=!1,function(e,n){return t||(t=!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(e).toString())}),dateISO:function(e,t){return this.optional(t)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(e)},number:function(e,t){return this.optional(t)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(e)},digits:function(e,t){return this.optional(t)||/^\d+$/.test(e)},minlength:function(e,t,n){var r=Array.isArray(e)?e.length:this.getLength(e,t);return this.optional(t)||r>=n},maxlength:function(e,t,n){var r=Array.isArray(e)?e.length:this.getLength(e,t);return this.optional(t)||r<=n},rangelength:function(e,t,n){var r=Array.isArray(e)?e.length:this.getLength(e,t);return this.optional(t)||r>=n[0]&&r<=n[1]},min:function(e,t,n){return this.optional(t)||e>=n},max:function(e,t,n){return this.optional(t)||e<=n},range:function(e,t,n){return this.optional(t)||e>=n[0]&&e<=n[1]},step:function(t,n,r){var i,o=e(n).attr("type"),a="Step attribute on input type "+o+" is not supported.",s=new RegExp("\\b"+o+"\\b"),u=function(e){var t=(""+e).match(/(?:\.(\d+))?$/);return t&&t[1]?t[1].length:0},l=function(e){return Math.round(e*Math.pow(10,i))},c=!0;if(o&&!s.test(["text","number","range"].join()))throw new Error(a);return i=u(r),(u(t)>i||l(t)%l(r)!=0)&&(c=!1),this.optional(n)||c},equalTo:function(t,n,r){var i=e(r);return this.settings.onfocusout&&i.not(".validate-equalTo-blur").length&&i.addClass("validate-equalTo-blur").on("blur.validate-equalTo",(function(){e(n).valid()})),t===i.val()},remote:function(t,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=e.param(e.extend({data:t},r.data)),u.old===s?u.valid:(u.old=s,o=this,this.startRequest(n),(a={})[n.name]=t,e.ajax(e.extend(!0,{mode:"abort",port:"validate"+n.name,dataType:"json",data:a,context:o.currentForm,success:function(e){var r,a,s,l=!0===e||"true"===e;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=e||o.defaultMessage(n,{method:i,parameters:t}),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 e.ajaxPrefilter?e.ajaxPrefilter((function(e,t,n){var r=e.port;"abort"===e.mode&&(i[r]&&i[r].abort(),i[r]=n)})):(r=e.ajax,e.ajax=function(t){var n=("mode"in t?t:e.ajaxSettings).mode,o=("port"in t?t:e.ajaxSettings).port;return"abort"===n?(i[o]&&i[o].abort(),i[o]=r.apply(this,arguments),i[o]):r.apply(this,arguments)}),e},"function"==typeof define&&n.amdO?define(["jquery"],r):e.exports?e.exports=r(n(19755)):r(i)},29936:function(e,t,n){"use strict";n(82083),e=n.hmd(e);var r,i=n(19755);r=function(e,t,n,r){var i=e.fn.dataTable,o=e('<meta class="foundation-mq"/>').appendTo("head");return i.ext.foundationVersion=o.css("font-family").match(/small|medium|large/)?6:5,o.remove(),e.extend(i.ext.classes,{sWrapper:"dataTables_wrapper dt-foundation",sProcessing:"dataTables_processing panel callout"}),e.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(t,n,r,o,a,s){var u,l,c,f=new i.Api(t),h=t.oClasses,d=t.oLanguage.oPaginate,p=t.oLanguage.oAria.paginate||{},m=5===i.ext.foundationVersion,g=function(n,i){var o,v,y,b,x=function(t){t.preventDefault(),e(t.currentTarget).hasClass("unavailable")||f.page()==t.data.action||f.page(t.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="&#x2026;",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=e("<li>",{class:h.sPageButton+" "+l,"aria-controls":t.sTableId,"aria-label":p[b],tabindex:t.iTabIndex,id:0===r&&"string"==typeof b?t.sTableId+"_"+b:null}).append(c?e("<"+c+"/>",{href:"#"}).html(u):u).appendTo(n),t.oApi._fnBindAction(y,{action:b},x))}};g(e(n).empty().html('<ul class="pagination"/>').children("ul"),o)},i},"function"==typeof define&&n.amdO?define(["jquery","datatables.net"],(function(e){return r(e,window,document)})):"object"==typeof exports?e.exports=function(e,t){return e||(e=window),t&&t.fn.dataTable||(t=n(81920)(e,t).$),r(t,0,e.document)}:r(i,window,document)},99459:function(e,t,n){var r,i,o,a=n(19755);o=function(e,t,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&&(e("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:e(n),body:e(t.body),input:e(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])),e.extend(s,o),e.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(e){var t=this,n=[].slice;if("function"!=typeof t)throw new TypeError;var r=n.call(arguments,1),i=function(){if(this instanceof i){var o=function(){};o.prototype=t.prototype;var a=new o,s=t.apply(a,r.concat(n.call(arguments)));return Object(s)===s?s:a}return t.apply(e,r.concat(n.call(arguments)))};return i}),Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){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=+t||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]===e)return n;n++}return-1}),l.prototype={init:function(e){this.no_diapason=!1,this.coords.p_step=this.convertToPercent(this.options.step,!0),this.target="base",this.toggleInput(),this.append(),this.setMinMax(),e?(this.force_redraw=!0,this.calc(!0),this.callOnUpdate()):(this.force_redraw=!0,this.calc(!0),this.callOnStart()),this.updateScene()},append:function(){var e='<span class="irs irs--'+this.options.skin+" js-irs-"+this.plugin_count+" "+this.options.extra_classes+'"></span>';this.$cache.input.before(e),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 e=this.options.min,t=this.options.max,n=this.options.from,r=this.options.to;e<n&&r===t?this.$cache.s_from.addClass("type_last"):r<t&&this.$cache.s_to.addClass("type_last")},changeLevel:function(e){switch(e){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(e){var t,n;this.target||(t=(n="single"===this.options.type?this.$cache.single:this.$cache.from).offset().left,t+=n.width()/2-1,this.pointerClick("single",{preventDefault:function(){},pageX:t}))},pointerMove:function(e){if(this.dragging){var t=e.pageX||e.originalEvent.touches&&e.originalEvent.touches[0].pageX;this.coords.x_pointer=t-this.coords.x_gap,this.calc()}},pointerUp:function(t){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&&e("*").prop("unselectable",!1),this.updateScene(),this.restoreOriginalMinInterval(),(e.contains(this.$cache.cont[0],t.target)||this.dragging)&&this.callOnFinish(),this.dragging=!1)},pointerDown:function(t,n){n.preventDefault();var r=n.pageX||n.originalEvent.touches&&n.originalEvent.touches[0].pageX;2!==n.button&&("both"===t&&this.setTempMinInterval(),t=t||this.target||"from",this.current_plugin=this.plugin_count,this.target=t,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(t),u&&e("*").prop("unselectable",!0),this.$cache.line.trigger("focus"),this.updateScene())},pointerClick:function(e,t){t.preventDefault();var n=t.pageX||t.originalEvent.touches&&t.originalEvent.touches[0].pageX;2!==t.button&&(this.current_plugin=this.plugin_count,this.target=e,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(e,t){if(!(this.current_plugin!==this.plugin_count||t.altKey||t.ctrlKey||t.shiftKey||t.metaKey)){switch(t.which){case 83:case 65:case 40:case 37:t.preventDefault(),this.moveByKey(!1);break;case 87:case 68:case 38:case 39:t.preventDefault(),this.moveByKey(!0)}return!0}},moveByKey:function(e){var t=this.coords.p_pointer,n=(this.options.max-this.options.min)/100;n=this.options.step/n,e?t+=n:t-=n,this.coords.x_pointer=this.toFixed(this.coords.w_rs/100*t),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 e=this._prettify(this.options.min),t=this._prettify(this.options.max);this.result.min_pretty=e,this.result.max_pretty=t,this.$cache.min.html(this.decorate(e,this.options.min)),this.$cache.max.html(this.decorate(t,this.options.max))}this.labels.w_min=this.$cache.min.outerWidth(!1),this.labels.w_max=this.$cache.max.outerWidth(!1)}},setTempMinInterval:function(){var e=this.result.to-this.result.from;null===this.old_min_interval&&(this.old_min_interval=this.options.min_interval),this.options.min_interval=e},restoreOriginalMinInterval:function(){null!==this.old_min_interval&&(this.options.min_interval=this.old_min_interval,this.old_min_interval=null)},calc:function(e){if(this.options&&(this.calc_count++,10!==this.calc_count&&!e||(this.calc_count=0,this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.calcHandlePercent()),this.coords.w_rs)){this.calcPointerPercent();var t=this.getHandleX();switch("both"===this.target&&(this.coords.p_gap=0,t=this.getHandleX()),"click"===this.target&&(this.coords.p_gap=this.coords.p_handle/2,t=this.getHandleX(),this.options.drag_interval?this.target="both_one":this.target=this.chooseHandle(t)),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(t),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(t),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(t),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;t=this.toFixed(t+.001*this.coords.p_handle),this.coords.p_from_real=this.convertToRealPercent(t)-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(t)+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(t),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(e){return e/(100-this.coords.p_handle)*100},convertToFakePercent:function(e){return e/100*(100-this.coords.p_handle)},getHandleX:function(){var e=100-this.coords.p_handle,t=this.toFixed(this.coords.p_pointer-this.coords.p_gap);return t<0?t=0:e<t&&(t=e),t},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(e){return"single"===this.options.type?"single":this.coords.p_from_real+(this.coords.p_to_real-this.coords.p_from_real)/2<=e?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 e,t,n,r,i,o=this.options.values.length,a=this.options.p_values;if(!this.options.hide_from_to)if("single"===this.options.type)e=o?this.decorate(a[this.result.from]):(r=this._prettify(this.result.from),this.decorate(r,this.result.from)),this.$cache.single.html(e),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?(e=this.decorate(a[this.result.from]),e+=this.options.values_separator,e+=this.decorate(a[this.result.to])):e=this.decorate(a[this.result.from]+this.options.values_separator+a[this.result.to]),t=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?(e=this.decorate(r,this.result.from),e+=this.options.values_separator,e+=this.decorate(i,this.result.to)):e=this.decorate(r+this.options.values_separator+i,this.result.to),t=this.decorate(r,this.result.from),this.decorate(i,this.result.to)),this.$cache.single.html(e),this.$cache.from.html(t),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 e,t,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)?(e=this.convertToPercent(a?i.from_min:i.min),t=this.convertToPercent(s?i.from_max:i.max)-e,e=this.toFixed(e-this.coords.p_handle/100*e),t=this.toFixed(t-this.coords.p_handle/100*t),e+=this.coords.p_handle/2,o.shad_single[0].style.display="block",o.shad_single[0].style.left=e+"%",o.shad_single[0].style.width=t+"%"):o.shad_single[0].style.display="none":(i.from_shadow&&(a||s)?(e=this.convertToPercent(a?i.from_min:i.min),t=this.convertToPercent(s?i.from_max:i.max)-e,e=this.toFixed(e-this.coords.p_handle/100*e),t=this.toFixed(t-this.coords.p_handle/100*t),e+=this.coords.p_handle/2,o.shad_from[0].style.display="block",o.shad_from[0].style.left=e+"%",o.shad_from[0].style.width=t+"%"):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(e,t){var n,r=this.options.max-this.options.min,i=r/100;return r?(n=(t?e:e-this.options.min)/i,this.toFixed(n)):(this.no_diapason=!0,0)},convertToValue:function(e){var t,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===e)return this.options.min;if(100===e)return this.options.max;o&&(s=t=o.length),a&&(s=n=a.length),t&&n&&(s=n<=t?t:n),r<0&&(r=+(r+(u=Math.abs(r))).toFixed(s),i=+(i+u).toFixed(s));var l,c=(i-r)/100*e+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(e){var t=Math.round(e/this.coords.p_step)*this.coords.p_step;return 100<t&&(t=100),100===e&&(t=100),this.toFixed(t)},checkMinInterval:function(e,t,n){var r,i,o=this.options;return o.min_interval?(r=this.convertToValue(e),i=this.convertToValue(t),"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)):e},checkMaxInterval:function(e,t,n){var r,i,o=this.options;return o.max_interval?(r=this.convertToValue(e),i=this.convertToValue(t),"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)):e},checkDiapason:function(e,t,n){var r=this.convertToValue(e),i=this.options;return"number"!=typeof t&&(t=i.min),"number"!=typeof n&&(n=i.max),r<t&&(r=t),n<r&&(r=n),this.convertToPercent(r)},toFixed:function(e){return+(e=e.toFixed(20))},_prettify:function(e){return this.options.prettify_enabled?this.options.prettify&&"function"==typeof this.options.prettify?this.options.prettify(e):this.prettify(e):e},prettify:function(e){return e.toString().replace(/(\d{1,3}(?=(?:\d\d\d)+(?!\d)))/g,"$1"+this.options.prettify_separator)},checkEdges:function(e,t){return this.options.force_edges&&(e<0?e=0:100-t<e&&(e=100-t)),this.toFixed(e)},validate:function(){var e,t,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,t=0;t<o;t++)e=+i[t],e=isNaN(e)?i[t]:(i[t]=e,this._prettify(e)),n.p_values.push(e);"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(e,t){var n="",r=this.options;return r.prefix&&(n+=r.prefix),n+=e,r.max_postfix&&(r.values.length&&e===r.p_values[r.max]||t===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 e,t,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),e=0;e<u+1;e++){for(r=c,100<(l=this.toFixed(n*e))&&(l=100),i=((this.coords.big[e]=l)-n*(e-1))/(r+1),t=1;t<=r&&0!==l;t++)f+='<span class="irs-grid-pol small" style="left: '+this.toFixed(l-i*t)+'%"></span>';f+='<span class="irs-grid-pol" style="left: '+l+'%"></span>',o=this.convertToValue(l),f+='<span class="irs-grid-text js-grid-text-'+e+'" 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 e,t,n=this.coords.big_num;for(t=0;t<n;t++)e=this.$cache.grid.find(".js-grid-text-"+t),this.$cache.grid_labels.push(e);this.calcGridLabels()},calcGridLabels:function(){var e,t,n=[],r=[],i=this.coords.big_num;for(e=0;e<i;e++)this.coords.big_w[e]=this.$cache.grid_labels[e].outerWidth(!1),this.coords.big_p[e]=this.toFixed(this.coords.big_w[e]/this.coords.w_rs*100),this.coords.big_x[e]=this.toFixed(this.coords.big_p[e]/2),n[e]=this.toFixed(this.coords.big[e]-this.coords.big_x[e]),r[e]=this.toFixed(n[e]+this.coords.big_p[e]);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),e=0;e<i;e++)t=this.$cache.grid_labels[e][0],this.coords.big_x[e]!==Number.POSITIVE_INFINITY&&(t.style.marginLeft=-this.coords.big_x[e]+"%")},calcGridCollision:function(e,t,n){var r,i,o,a=this.coords.big_num;for(r=0;r<a&&!(a<=(i=r+e/2));r+=e)o=this.$cache.grid_labels[i][0],n[r]<=t[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(t){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=e.extend(this.options,t),this.validate(),this.updateResult(t),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),e.data(this.input,"ionRangeSlider",null),this.remove(),this.input=null,this.options=null)}},e.fn.ionRangeSlider=function(t){return this.each((function(){e.data(this,"ionRangeSlider")||e.data(this,"ionRangeSlider",new l(this,t,s++))}))},function(){for(var e=0,t=["ms","moz","webkit","o"],r=0;r<t.length&&!n.requestAnimationFrame;++r)n.requestAnimationFrame=n[t[r]+"RequestAnimationFrame"],n.cancelAnimationFrame=n[t[r]+"CancelAnimationFrame"]||n[t[r]+"CancelRequestAnimationFrame"];n.requestAnimationFrame||(n.requestAnimationFrame=function(t,r){var i=(new Date).getTime(),o=Math.max(0,16-(i-e)),a=n.setTimeout((function(){t(i+o)}),o);return e=i+o,a}),n.cancelAnimationFrame||(n.cancelAnimationFrame=function(e){clearTimeout(e)})}()},void 0!==a&&a||!n.amdO?o(void 0!==a&&a||"object"!=typeof t?a:n(19755),document,window,navigator):(r=[n(19755)],void 0===(i=function(e){return o(e,document,window,navigator)}.apply(t,r))||(e.exports=i))},62813:function(e,t,n){var r,i,o,a,s;!function(){"use strict";var e,t,n,r,i,o;o=864e5,e=function(e,t){return"string"==typeof e&&"string"==typeof t&&e.toLowerCase()===t.toLowerCase()},t=function(e,n,r){var i=r||"0",o=e.toString();return o.length<n?t(i+o,n):o},n=function(e){var t,r;for(e=e||{},t=1;t<arguments.length;t++)if(r=arguments[t])for(var i in r)r.hasOwnProperty(i)&&("object"==typeof r[i]?n(e[i],r[i]):e[i]=r[i]);return e},r=function(e,t){for(var n=0;n<t.length;n++)if(t[n].toLowerCase()===e.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(e){var t=e%10,n={1:"st",2:"nd",3:"rd"};return 1!==Math.floor(e%100/10)&&n[t]?n[t]:"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(e){var t=this,r=n(i,e);t.dateSettings=r.dateSettings,t.separators=r.separators,t.validParts=r.validParts,t.intParts=r.intParts,t.tzParts=r.tzParts,t.tzClip=r.tzClip},a.prototype={constructor:a,getMonth:function(e){var t;return 0===(t=r(e,this.dateSettings.monthsShort)+1)&&(t=r(e,this.dateSettings.months)+1),t},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=parseInt(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(i=t.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=e(h,g.meridiem[0])?0:e(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(e,t){if("string"!=typeof e)return e;var n,r,i,o,a,s,u=e.replace(this.separators,"\0").split("\0"),l=t.match(this.validParts),c=new Date,f=0;if(!/^[djmn]/g.test(l[0]))return e;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(e,n){var r,i=this,a=i.dateSettings,s=/\\?(.?)/gi,u=function(e,t){return r[e]?r[e]():t};return r={d:function(){return t(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 e=new Date(r.Y(),r.n()-1,r.j()),t=new Date(r.Y(),0,1);return Math.round((e-t)/o)},W:function(){var e=new Date(r.Y(),r.n()-1,r.j()-r.N()+3),n=new Date(e.getFullYear(),0,4);return t(1+Math.round((e-n)/o/7),2)},F:function(){return a.months[n.getMonth()]},m:function(){return t(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 e=r.Y();return e%4==0&&e%100!=0||e%400==0?1:0},o:function(){var e=r.n(),t=r.W();return r.Y()+(12===e&&9>t?1:1===e&&t>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 e=r.G()<12?0:1;return a.meridiem[e]},B:function(){var e=3600*n.getUTCHours(),r=60*n.getUTCMinutes(),i=n.getUTCSeconds();return t(Math.floor((e+r+i+3600)/86.4)%1e3,3)},g:function(){return r.G()%12||12},G:function(){return n.getHours()},h:function(){return t(r.g(),2)},H:function(){return t(r.G(),2)},i:function(){return t(n.getMinutes(),2)},s:function(){return t(n.getSeconds(),2)},u:function(){return t(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 e=n.getTimezoneOffset(),r=Math.abs(e);return(e>0?"-":"+")+t(100*Math.floor(r/60)+r%60,4)},P:function(){var e=r.O();return e.substr(0,3)+":"+e.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(e,e)},formatDate:function(e,t){var n,r,i,o,a,s=this,u="";if("string"==typeof e&&!(e=s.parseDate(e,t)))return null;if(e instanceof Date){for(i=t.length,n=0;i>n;n++)"S"!==(a=t.charAt(n))&&"\\"!==a&&(n>0&&"\\"===t.charAt(n-1)?u+=a:(o=s.parseFormat(a,e),n!==i-1&&s.intParts.test(a)&&"S"===t.charAt(n+1)&&(r=parseInt(o)||0,o+=s.dateSettings.ordinal(r)),u+=o));return u}return""}}}(),s=function(e){"use strict";var t={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=t.i18n[i],u={days:s.dayOfWeek,daysShort:s.dayOfWeekShort,months:s.months,monthsShort:e.map(s.months,(function(e){return e.substring(0,3)}))};"function"==typeof a&&(n=r=new a({dateSettings:e.extend({},o,u)}))},u={moment:{default_options:{format:"YYYY/MM/DD HH:mm",formatDate:"YYYY/MM/DD",formatTime:"HH:mm"},formatter:{parseDate:function(e,t){if(c(t))return r.parseDate(e,t);var n=moment(e,t);return!!n.isValid()&&n.toDate()},formatDate:function(e,t){return c(t)?r.formatDate(e,t):moment(e).format(t)},formatMask:function(e){return e.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")}}}};e.datetimepicker={setLocale:function(e){var n=t.i18n[e]?e:"en";i!==n&&(i=n,s())},setDateFormatter:function(r){if("string"==typeof r&&u.hasOwnProperty(r)){var i=u[r];e.extend(t,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(e){return-1!==Object.values(l).indexOf(e)};function f(e,t,n){this.date=e,this.desc=t,this.style=n}e.extend(e.datetimepicker,l),s(),window.getComputedStyle||(window.getComputedStyle=function(e){return this.el=e,this.getPropertyValue=function(t){var n=/(-([a-z]))/g;return"float"===t&&(t="styleFloat"),n.test(t)&&(t=t.replace(n,(function(e,t,n){return n.toUpperCase()}))),e.currentStyle[t]||null},this}),Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){var n,r;for(n=t||0,r=this.length;n<r;n+=1)if(this[n]===e)return n;return-1}),Date.prototype.countDaysInMonth=function(){return new Date(this.getFullYear(),this.getMonth()+1,0).getDate()},e.fn.xdsoftScroller=function(t,n){return this.each((function(){var r,i,o,a,s,u=e(this),l=function(e){var t,n={x:0,y:0};return"touchstart"===e.type||"touchmove"===e.type||"touchend"===e.type||"touchcancel"===e.type?(t=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0],n.x=t.clientX,n.y=t.clientY):"mousedown"!==e.type&&"mouseup"!==e.type&&"mousemove"!==e.type&&"mouseover"!==e.type&&"mouseout"!==e.type&&"mouseenter"!==e.type&&"mouseleave"!==e.type||(n.x=e.clientX,n.y=e.clientY),n},c=100,f=!1,h=0,d=0,p=0,m=!1,g=0,v=function(){};"hide"!==n?(e(this).hasClass("xdsoft_scroller_box")||(r=u.children().eq(0),i=u[0].clientHeight,o=r[0].offsetHeight,a=e('<div class="xdsoft_scrollbar"></div>'),s=e('<div class="xdsoft_scroller"></div>'),a.append(s),u.addClass("xdsoft_scroller_box").append(a),v=function(e){var t=l(e).y-h+g;t<0&&(t=0),t+s[0].offsetHeight>p&&(t=p-s[0].offsetHeight),u.trigger("scroll_element.xdsoft_scroller",[c?t/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?(t.ownerDocument&&e(t.ownerDocument.body).addClass("xdsoft_noselect"),e([t.ownerDocument.body,t.contentWindow]).on("touchend mouseup.xdsoft_scroller",(function n(){e([t.ownerDocument.body,t.contentWindow]).off("touchend mouseup.xdsoft_scroller",n).off("mousemove.xdsoft_scroller",v).removeClass("xdsoft_noselect")})),e(t.ownerDocument.body).on("mousemove.xdsoft_scroller",v)):(m=!0,r.stopPropagation(),r.preventDefault())})).on("touchmove",(function(e){m&&(e.preventDefault(),v(e))})).on("touchend touchcancel",(function(){m=!1,g=0})),u.on("scroll_element.xdsoft_scroller",(function(e,t){i||u.trigger("resize_scroll.xdsoft_scroller",[t,!0]),t=t>1?1:t<0||isNaN(t)?0:t,s.css("margin-top",c*t),setTimeout((function(){r.css("marginTop",-parseInt((r[0].offsetHeight-i)*t,10))}),10)})).on("resize_scroll.xdsoft_scroller",(function(e,t,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",[t||Math.abs(parseInt(r.css("marginTop"),10))/(o-i)]))})),u.on("mousewheel",(function(e){var t=Math.abs(parseInt(r.css("marginTop"),10));return(t-=20*e.deltaY)<0&&(t=0),u.trigger("scroll_element.xdsoft_scroller",[t/(o-i)]),e.stopPropagation(),!1})),u.on("touchstart",(function(e){f=l(e),d=Math.abs(parseInt(r.css("marginTop"),10))})),u.on("touchmove",(function(e){if(f){e.preventDefault();var t=l(e);u.trigger("scroll_element.xdsoft_scroller",[(d-(t.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()}))},e.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=e.isPlainObject(r)||!r?e.extend(!0,{},t,r):e.extend(!0,{},t),E=0;return a=function(t){var o,a,s,u,E,C,A=e('<div class="xdsoft_datetimepicker xdsoft_noselect"></div>'),M=e('<div class="xdsoft_copyright"><a target="_blank" href="http://xdsoft.net/jqplugins/datetimepicker/">xdsoft.net</a></div>'),k=e('<div class="xdsoft_datepicker active"></div>'),T=e('<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>'),D=e('<div class="xdsoft_calendar"></div>'),j=e('<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=e('<div class="xdsoft_time_variant"></div>'),R=e('<button type="button" class="xdsoft_save_selected blue-gradient-button">Save Selected</button>'),L=e('<div class="xdsoft_select xdsoft_monthselect"><div></div></div>'),F=e('<div class="xdsoft_select xdsoft_yearselect"><div></div></div>'),B=!1,q=0;N.id&&A.attr("id",N.id),N.style&&A.attr("style",N.style),N.weeks&&A.addClass("xdsoft_showweeks"),N.rtl&&A.addClass("xdsoft_rtl"),A.addClass("xdsoft_"+N.theme),A.addClass(N.className),T.find(".xdsoft_month span").after(L),T.find(".xdsoft_year span").after(F),T.find(".xdsoft_month,.xdsoft_year").on("touchstart mousedown.xdsoft",(function(t){var n,r,i=e(this).find(".xdsoft_select").eq(0),o=0,a=0,s=i.is(":visible");for(T.find(".xdsoft_select").hide(),E.currentTime&&(o=E.currentTime[e(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)),t.stopPropagation(),!1}));var z=function(e){var t=e.originalEvent,n=t.touches?t.touches[0]:t;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 e,n=!1;return N.startDate?n=E.strToDate(N.startDate):(n=N.value||(t&&t.val&&t.val()?t.val():""))?(n=E.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=E.strToDateTime(N.defaultDate),N.defaultTime&&(e=E.strtotime(N.defaultTime),n.setHours(e.getHours()),n.setMinutes(e.getMinutes()))),n&&E.isValidDate(n)?A.data("changed",!0):n="",n||0}function U(r){var i=function(e,t){var n=e.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(t)},o=function(e,t){if(!(e="string"==typeof e||e instanceof String?r.ownerDocument.getElementById(e):e))return!1;if(e.createTextRange){var n=e.createTextRange();return n.collapse(!0),n.moveEnd("character",t),n.moveStart("character",t),n.select(),!0}return!!e.setSelectionRange&&(e.setSelectionRange(t,t),!0)};r.mask&&t.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"===e.type(r.mask)&&(i(r.mask,t.val())||(t.val(r.mask.replace(/[0-9]/g,"_")),o(t[0],0)),t.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)):""===e.trim(s)?this.value=r.mask.replace(/[0-9]/g,"_"):t.trigger("error_input.xdsoft"),n.preventDefault(),!1})),t.on("keydown.xdsoft",(function(n){var a,s=this.value,u=n.which,f=this.selectionStart,N=this.selectionEnd,E=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&&!E&&(f-=1);;){var C=r.mask.substr(f,1),A=f<r.mask.length,M=f>0;if(!(/[^0-9_]/.test(C)&&A&&M))break;f+=8!==u||E?1:-1}if(n.metaKey&&(f=0,E=!0),E){var k=N-f,T=r.mask.replace(/[0-9]/g,"_"),D=T.substr(f,k).substr(1),j=s.substr(0,f),P=a+D,I=s.substr(f+k);s=j+P+I}else{var R=s.substr(0,f),L=a,F=s.substr(f+1);s=R+L+F}if(""===e.trim(s))s=T;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)):""===e.trim(s)?this.value=r.mask.replace(/[0-9]/g,"_"):t.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})))}T.find(".xdsoft_select").xdsoftScroller(N).on("touchstart mousedown.xdsoft",(function(e){var t=e.originalEvent;this.touchMoved=!1,this.touchStartPosition=t.touches?t.touches[0]:t,e.stopPropagation(),e.preventDefault()})).on("touchmove",".xdsoft_option",z).on("touchend mousedown.xdsoft",".xdsoft_option",(function(){if(!this.touchMoved){void 0!==E.currentTime&&null!==E.currentTime||(E.currentTime=E.now());var t=E.currentTime.getFullYear();E&&E.currentTime&&E.currentTime[e(this).parent().parent().hasClass("xdsoft_monthselect")?"setMonth":"setFullYear"](e(this).data("value")),e(this).parent().parent().hide(),A.trigger("xchange.xdsoft"),N.onChangeMonth&&e.isFunction(N.onChangeMonth)&&N.onChangeMonth.call(A,E.currentTime,A.data("input")),t!==E.currentTime.getFullYear()&&e.isFunction(N.onChangeYear)&&N.onChangeYear.call(A,E.currentTime,A.data("input"))}})),A.getValue=function(){return E.getCurrentTime()},A.setOptions=function(r){var i={};N=e.extend(!0,{},N,r),r.allowTimes&&e.isArray(r.allowTimes)&&r.allowTimes.length&&(N.allowTimes=e.extend(!0,[],r.allowTimes)),r.weekends&&e.isArray(r.weekends)&&r.weekends.length&&(N.weekends=e.extend(!0,[],r.weekends)),r.allowDates&&e.isArray(r.allowDates)&&r.allowDates.length&&(N.allowDates=e.extend(!0,[],r.allowDates)),r.allowDateRe&&"[object String]"===Object.prototype.toString.call(r.allowDateRe)&&(N.allowDateRe=new RegExp(r.allowDateRe)),r.highlightedDates&&e.isArray(r.highlightedDates)&&r.highlightedDates.length&&(e.each(r.highlightedDates,(function(t,r){var o,a=e.map(r.split(","),e.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=e.extend(!0,[],i)),r.highlightedPeriods&&e.isArray(r.highlightedPeriods)&&r.highlightedPeriods.length&&(i=e.extend(!0,[],N.highlightedDates),e.each(r.highlightedPeriods,(function(t,r){var o,a,s,u,l,c,h;if(e.isArray(r))o=r[0],a=r[1],s=r[2],h=r[3];else{var d=e.map(r.split(","),e.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=e.extend(!0,[],i)),r.disabledDates&&e.isArray(r.disabledDates)&&r.disabledDates.length&&(N.disabledDates=e.extend(!0,[],r.disabledDates)),r.disabledWeekDays&&e.isArray(r.disabledWeekDays)&&r.disabledWeekDays.length&&(N.disabledWeekDays=e.extend(!0,[],r.disabledWeekDays)),!N.open&&!N.opened||N.inline||t.trigger("open.xdsoft"),N.inline&&(B=!0,A.addClass("xdsoft_inline"),t.after(A).hide()),N.inverseButton&&(N.next="xdsoft_prev",N.prev="xdsoft_next"),N.datepicker?k.addClass("active"):k.removeClass("active"),N.timepicker?j.addClass("active"):j.removeClass("active"),N.value&&(E.setCurrentTime(N.value),t&&t.val&&t.val(E.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(E.strToDateTime(N.minDate),N.formatDate)),N.maxDate&&/^[\+\-](.*)$/.test(N.maxDate)&&(N.maxDate=n.formatDate(E.strToDateTime(N.maxDate),N.formatDate)),N.minDateTime&&/^\+(.*)$/.test(N.minDateTime)&&(N.minDateTime=E.strToDateTime(N.minDateTime).dateFormat(N.formatDate)),N.maxDateTime&&/^\+(.*)$/.test(N.maxDateTime)&&(N.maxDateTime=E.strToDateTime(N.maxDateTime).dateFormat(N.formatDate)),R.toggle(N.showApplyButton),T.find(".xdsoft_today_button").css("visibility",N.todayButton?"visible":"hidden"),T.find("."+N.prev).css("visibility",N.prevButton?"visible":"hidden"),T.find("."+N.next).css("visibility",N.nextButton?"visible":"hidden"),U(N),N.validateOnBlur&&t.off("blur.xdsoft").on("blur.xdsoft",(function(){if(N.allowBlank&&(!e.trim(e(this).val()).length||"string"==typeof N.mask&&e.trim(e(this).val())===N.mask.replace(/[0-9]/g,"_")))e(this).val(null),A.data("xdsoft_datetime").empty();else{var t=n.parseDate(e(this).val(),N.format);if(t)e(this).val(n.formatDate(t,N.format));else{var r=+[e(this).val()[0],e(this).val()[1]].join(""),i=+[e(this).val()[2],e(this).val()[3]].join("");!N.datepicker&&N.timepicker&&r>=0&&r<24&&i>=0&&i<60?e(this).val([r,i].map((function(e){return e>9?e:"0"+e})).join(":")):e(this).val(n.formatDate(E.now(),N.format))}A.data("xdsoft_datetime").setCurrentTime(e(this).val())}A.trigger("changedatetime.xdsoft"),A.trigger("close.xdsoft")})),N.dayOfWeekStartPrev=0===N.dayOfWeekStart?6:N.dayOfWeekStart-1,A.trigger("xchange.xdsoft").trigger("afterOpen.xdsoft")},A.data("options",N).on("touchstart mousedown.xdsoft",(function(e){return e.stopPropagation(),e.preventDefault(),F.hide(),L.hide(),!1})),P.append(I),P.xdsoftScroller(N),A.on("afterOpen.xdsoft",(function(){P.xdsoftScroller(N)})),A.append(k).append(j),!0!==N.withoutCopyright&&A.append(M),k.append(T).append(D).append(R),N.insideParent?e(t).parent().append(A):e(N.parentID).append(A),E=new function(){var t=this;t.now=function(e){var n,r,i=new Date;return!e&&N.defaultDate&&(n=t.strToDateTime(N.defaultDate),i.setFullYear(n.getFullYear()),i.setMonth(n.getMonth()),i.setDate(n.getDate())),i.setFullYear(i.getFullYear()),!e&&N.defaultTime&&(r=t.strtotime(N.defaultTime),i.setHours(r.getHours()),i.setMinutes(r.getMinutes()),i.setSeconds(r.getSeconds()),i.setMilliseconds(r.getMilliseconds())),i},t.isValidDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e.getTime())},t.setCurrentTime=function(e,n){"string"==typeof e?t.currentTime=t.strToDateTime(e):t.isValidDate(e)?t.currentTime=e:e||n||!N.allowBlank||N.inline?t.currentTime=t.now():t.currentTime=null,A.trigger("xchange.xdsoft")},t.empty=function(){t.currentTime=null},t.getCurrentTime=function(){return t.currentTime},t.nextMonth=function(){void 0!==t.currentTime&&null!==t.currentTime||(t.currentTime=t.now());var n,r=t.currentTime.getMonth()+1;return 12===r&&(t.currentTime.setFullYear(t.currentTime.getFullYear()+1),r=0),n=t.currentTime.getFullYear(),t.currentTime.setDate(Math.min(new Date(t.currentTime.getFullYear(),r+1,0).getDate(),t.currentTime.getDate())),t.currentTime.setMonth(r),N.onChangeMonth&&e.isFunction(N.onChangeMonth)&&N.onChangeMonth.call(A,E.currentTime,A.data("input")),n!==t.currentTime.getFullYear()&&e.isFunction(N.onChangeYear)&&N.onChangeYear.call(A,E.currentTime,A.data("input")),A.trigger("xchange.xdsoft"),r},t.prevMonth=function(){void 0!==t.currentTime&&null!==t.currentTime||(t.currentTime=t.now());var n=t.currentTime.getMonth()-1;return-1===n&&(t.currentTime.setFullYear(t.currentTime.getFullYear()-1),n=11),t.currentTime.setDate(Math.min(new Date(t.currentTime.getFullYear(),n+1,0).getDate(),t.currentTime.getDate())),t.currentTime.setMonth(n),N.onChangeMonth&&e.isFunction(N.onChangeMonth)&&N.onChangeMonth.call(A,E.currentTime,A.data("input")),A.trigger("xchange.xdsoft"),n},t.getWeekOfYear=function(t){if(N.onGetWeekOfYear&&e.isFunction(N.onGetWeekOfYear)){var n=N.onGetWeekOfYear.call(A,t);if(void 0!==n)return n}var r=new Date(t.getFullYear(),0,1);return 4!==r.getDay()&&r.setMonth(0,1+(4-r.getDay()+7)%7),Math.ceil(((t-r)/864e5+r.getDay()+1)/7)},t.strToDateTime=function(e){var r,i,o=[];return e&&e instanceof Date&&t.isValidDate(e)?e:((o=/^([+-]{1})(.*)$/.exec(e))&&(o[2]=n.parseDate(o[2],N.formatDate)),o&&o[2]?(r=o[2].getTime()-6e4*o[2].getTimezoneOffset(),i=new Date(t.now(!0).getTime()+parseInt(o[1]+"1",10)*r)):i=e?n.parseDate(e,N.format):t.now(),t.isValidDate(i)||(i=t.now()),i)},t.strToDate=function(e){if(e&&e instanceof Date&&t.isValidDate(e))return e;var r=e?n.parseDate(e,N.formatDate):t.now(!0);return t.isValidDate(r)||(r=t.now(!0)),r},t.strtotime=function(e){if(e&&e instanceof Date&&t.isValidDate(e))return e;var r=e?n.parseDate(e,N.formatTime):t.now(!0);return t.isValidDate(r)||(r=t.now(!0)),r},t.str=function(){var e=N.format;return N.yearOffset&&(e=(e=e.replace("Y",t.currentTime.getFullYear()+N.yearOffset)).replace("y",String(t.currentTime.getFullYear()+N.yearOffset).substring(2,4))),n.formatDate(t.currentTime,e)},t.currentTime=this.now()},R.on("touchend click",(function(e){e.preventDefault(),A.data("changed",!0),E.setCurrentTime(H()),t.val(E.str()),A.trigger("close.xdsoft")})),T.find(".xdsoft_today_button").on("touchend mousedown.xdsoft",(function(){A.data("changed",!0),E.setCurrentTime(0,!0),A.trigger("afterOpen.xdsoft")})).on("dblclick.xdsoft",(function(){var e,n,r=E.getCurrentTime();r=new Date(r.getFullYear(),r.getMonth(),r.getDate()),e=E.strToDate(N.minDate),r<(e=new Date(e.getFullYear(),e.getMonth(),e.getDate()))||(n=E.strToDate(N.maxDate),r>(n=new Date(n.getFullYear(),n.getMonth(),n.getDate()))||(t.val(E.str()),t.trigger("change"),A.trigger("close.xdsoft")))})),T.find(".xdsoft_prev,.xdsoft_next").on("touchend mousedown.xdsoft",(function(){var t=e(this),n=0,r=!1;!function e(i){t.hasClass(N.next)?E.nextMonth():t.hasClass(N.prev)&&E.prevMonth(),N.monthChangeSpinner&&(r||(n=setTimeout(e,i||100)))}(500),e([N.ownerDocument.body,N.contentWindow]).on("touchend mouseup.xdsoft",(function t(){clearTimeout(n),r=!0,e([N.ownerDocument.body,N.contentWindow]).off("touchend mouseup.xdsoft",t)}))})),j.find(".xdsoft_prev,.xdsoft_next").on("touchend mousedown.xdsoft",(function(){var t=e(this),n=0,r=!1,i=110;!function e(o){var a=P[0].clientHeight,s=I[0].offsetHeight,u=Math.abs(parseInt(I.css("marginTop"),10));t.hasClass(N.next)&&s-a-N.timeHeightInTimePicker>=u?I.css("marginTop","-"+(u+N.timeHeightInTimePicker)+"px"):t.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(e,o||i))}(500),e([N.ownerDocument.body,N.contentWindow]).on("touchend mouseup.xdsoft",(function t(){clearTimeout(n),r=!0,e([N.ownerDocument.body,N.contentWindow]).off("touchend mouseup.xdsoft",t)}))})),o=0,A.on("xchange.xdsoft",(function(a){clearTimeout(o),o=setTimeout((function(){void 0!==E.currentTime&&null!==E.currentTime||(E.currentTime=E.now());for(var o,a,s,u,l,c,f,h,d,p,m="",g=new Date(E.currentTime.getFullYear(),E.currentTime.getMonth(),1,12,0,0),v=0,y=E.now(),b=!1,x=!1,w=!1,_=!1,S=[],O=!0,C="";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=E.strToDate(N.maxDate),b=new Date(b.getFullYear(),b.getMonth(),b.getDate(),23,59,59,999)),!1!==N.minDate&&(x=E.strToDate(N.minDate),x=new Date(x.getFullYear(),x.getMonth(),x.getDate())),!1!==N.minDateTime&&(w=E.strToDate(N.minDateTime),w=new Date(w.getFullYear(),w.getMonth(),w.getDate(),w.getHours(),w.getMinutes(),w.getSeconds())),!1!==N.maxDateTime&&(_=E.strToDate(N.maxDateTime),_=new Date(_.getFullYear(),_.getMonth(),_.getDate(),_.getHours(),_.getMinutes(),_.getSeconds())),!1!==_&&(p=31*(12*_.getFullYear()+_.getMonth())+_.getDate());v<E.currentTime.countDaysInMonth()||g.getDay()!==N.dayOfWeekStart||E.currentTime.getMonth()===g.getMonth();){S=[],v+=1,s=g.getDay(),u=g.getDate(),l=g.getFullYear(),P=g.getMonth(),c=E.getWeekOfYear(g),d="",S.push("xdsoft_date"),f=N.beforeShowDay&&e.isFunction(N.beforeShowDay.call)?N.beforeShowDay.call(A,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 M=31*(12*g.getFullYear()+g.getMonth())+g.getDate();(!1!==b&&g>b||!1!==w&&g<w||!1!==x&&g<x||!1!==_&&M>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"),t.is("[disabled]")&&S.push("xdsoft_disabled"),f&&""!==f[1]&&S.push(f[1]),E.currentTime.getMonth()!==P&&S.push("xdsoft_other_month"),(N.defaultSelect||A.data("changed"))&&n.formatDate(E.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&&e.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>",D.html(m),T.find(".xdsoft_label span").eq(0).text(N.i18n[i].months[E.currentTime.getMonth()]),T.find(".xdsoft_label span").eq(1).text(E.currentTime.getFullYear()+N.yearOffset),C="",P="";var k=0;if(!1!==N.minTime){var j=E.strtotime(N.minTime);k=60*j.getHours()+j.getMinutes()}var P,R=1440;if(!1!==N.maxTime&&(j=E.strtotime(N.maxTime),R=60*j.getHours()+j.getMinutes()),!1!==N.minDateTime&&(j=E.strToDateTime(N.minDateTime),n.formatDate(E.currentTime,N.formatDate)===n.formatDate(j,N.formatDate)&&(P=60*j.getHours()+j.getMinutes())>k&&(k=P)),!1!==N.maxDateTime&&(j=E.strToDateTime(N.maxDateTime),n.formatDate(E.currentTime,N.formatDate)===n.formatDate(j,N.formatDate)&&(P=60*j.getHours()+j.getMinutes())<R&&(R=P)),h=function(r,i){var o,a=E.now(),s=N.allowTimes&&e.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;(t.is("[disabled]")||u>=R||u<k)&&S.push("xdsoft_disabled"),(o=new Date(E.currentTime)).setHours(parseInt(E.currentTime.getHours(),10)),s||o.setMinutes(Math[N.roundTime](E.currentTime.getMinutes()/N.step)*N.step),(N.initTime||N.defaultSelect||A.data("changed"))&&o.getHours()===parseInt(r,10)&&(!s&&N.step>59||o.getMinutes()===parseInt(i,10))&&(N.defaultSelect||A.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"),C+='<div class="xdsoft_time '+S.join(" ")+'" data-hour="'+r+'" data-minute="'+i+'">'+n.formatDate(a,N.formatTime)+"</div>"},N.allowTimes&&e.isArray(N.allowTimes)&&N.allowTimes.length)for(v=0;v<N.allowTimes.length;v+=1)h(E.strtotime(N.allowTimes[v]).getHours(),P=E.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 B=60*v+o;B<k||B>=R||h((v<10?"0":"")+v,P=(o<10?"0":"")+o)}for(I.html(C),r="",v=parseInt(N.yearStart,10);v<=parseInt(N.yearEnd,10);v+=1)r+='<div class="xdsoft_option '+(E.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 '+(E.currentTime.getMonth()===v?"xdsoft_current":"")+'" data-value="'+v+'">'+N.i18n[i].months[v]+"</div>";L.children().eq(0).html(r),e(A).trigger("generate.xdsoft")}),10),a.stopPropagation()})).on("afterOpen.xdsoft",(function(){var e,t,n,r;N.timepicker&&(I.find(".xdsoft_current").length?e=".xdsoft_current":I.find(".xdsoft_init_time").length&&(e=".xdsoft_init_time"),e?(t=P[0].clientHeight,(n=I[0].offsetHeight)-t<(r=I.find(e).index()*N.timeHeightInTimePicker+1)&&(r=n-t),P.trigger("scroll_element.xdsoft_scroller",[parseInt(r,10)/(n-t)])):P.trigger("scroll_element.xdsoft_scroller",[0]))})),a=0,D.on("touchend click.xdsoft","td",(function(n){n.stopPropagation(),a+=1;var r=e(this),i=E.currentTime;if(null==i&&(E.currentTime=E.now(),i=E.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")),A.trigger("select.xdsoft",[i]),t.val(E.str()),N.onSelectDate&&e.isFunction(N.onSelectDate)&&N.onSelectDate.call(A,E.currentTime,A.data("input"),n),A.data("changed",!0),A.trigger("xchange.xdsoft"),A.trigger("changedatetime.xdsoft"),(a>1||!0===N.closeOnDateSelect||!1===N.closeOnDateSelect&&!N.timepicker)&&!N.inline&&A.trigger("close.xdsoft"),setTimeout((function(){a=0}),200)})),I.on("touchstart","div",(function(e){this.touchMoved=!1})).on("touchmove","div",z).on("touchend click.xdsoft","div",(function(t){if(!this.touchMoved){t.stopPropagation();var n=e(this),r=E.currentTime;if(null==r&&(E.currentTime=E.now(),r=E.currentTime),n.hasClass("xdsoft_disabled"))return!1;r.setHours(n.data("hour")),r.setMinutes(n.data("minute")),A.trigger("select.xdsoft",[r]),A.data("input").val(E.str()),N.onSelectTime&&e.isFunction(N.onSelectTime)&&N.onSelectTime.call(A,E.currentTime,A.data("input"),t),A.data("changed",!0),A.trigger("xchange.xdsoft"),A.trigger("changedatetime.xdsoft"),!0!==N.inline&&!0===N.closeOnTimeSelect&&A.trigger("close.xdsoft")}})),k.on("mousewheel.xdsoft",(function(e){return!N.scrollMonth||(e.deltaY<0?E.nextMonth():E.prevMonth(),!1)})),t.on("mousewheel.xdsoft",(function(e){return!N.scrollInput||(!N.datepicker&&N.timepicker?((s=I.find(".xdsoft_current").length?I.find(".xdsoft_current").eq(0).index():0)+e.deltaY>=0&&s+e.deltaY<I.children().length&&(s+=e.deltaY),I.children().eq(s).length&&I.children().eq(s).trigger("mousedown"),!1):N.datepicker&&!N.timepicker?(k.trigger(e,[e.deltaY,e.deltaX,e.deltaY]),t.val&&t.val(E.str()),A.trigger("changedatetime.xdsoft"),!1):void 0)})),A.on("changedatetime.xdsoft",(function(t){if(N.onChangeDateTime&&e.isFunction(N.onChangeDateTime)){var n=A.data("input");N.onChangeDateTime.call(A,E.currentTime,n,t),delete N.value,n.trigger("change")}})).on("generate.xdsoft",(function(){N.onGenerate&&e.isFunction(N.onGenerate)&&N.onGenerate.call(A,E.currentTime,A.data("input")),B&&(A.trigger("afterOpen.xdsoft"),B=!1)})).on("click.xdsoft",(function(e){e.stopPropagation()})),s=0,C=function(e,t){do{if(!(e=e.parentNode)||!1===t(e))break}while("HTML"!==e.nodeName)},u=function(){var t,n,r,i,o,a,s,u,l,c,f,h,d;if(t=(u=A.data("input")).offset(),n=u[0],c="top",r=t.top+n.offsetHeight-1,i=t.left,o="absolute",l=e(N.contentWindow).width(),h=e(N.contentWindow).height(),d=e(N.contentWindow).scrollTop(),N.ownerDocument.documentElement.clientWidth-t.left<k.parent().outerWidth(!0)){var p=k.parent().outerWidth(!0)-n.offsetWidth;i-=p}"rtl"===u.parent().css("direction")&&(i-=A.outerWidth()-u.outerWidth()),N.fixed?(r-=d,i-=e(N.contentWindow).scrollLeft(),o="fixed"):(s=!1,C(n,(function(e){return null!==e&&("fixed"===N.contentWindow.getComputedStyle(e).getPropertyValue("position")?(s=!0,!1):void 0)})),s&&!N.insideParent?(o="fixed",r+A.outerHeight()>h+d?(c="bottom",r=h+d-t.top):r-=d):r+A[0].offsetHeight>h+d&&(r=t.top-A[0].offsetHeight+1),r<0&&(r=0),i+n.offsetWidth>l&&(i=l-n.offsetWidth)),a=A[0],C(a,(function(e){if("relative"===N.contentWindow.getComputedStyle(e).getPropertyValue("position")&&l>=e.offsetWidth)return i-=(l-e.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,A.css(f)},A.on("open.xdsoft",(function(t){var n=!0;N.onShow&&e.isFunction(N.onShow)&&(n=N.onShow.call(A,E.currentTime,A.data("input"),t)),!1!==n&&(A.show(),u(),e(N.contentWindow).off("resize.xdsoft",u).on("resize.xdsoft",u),N.closeOnWithoutClick&&e([N.ownerDocument.body,N.contentWindow]).on("touchstart mousedown.xdsoft",(function t(){A.trigger("close.xdsoft"),e([N.ownerDocument.body,N.contentWindow]).off("touchstart mousedown.xdsoft",t)})))})).on("close.xdsoft",(function(t){var n=!0;T.find(".xdsoft_month,.xdsoft_year").find(".xdsoft_select").hide(),N.onClose&&e.isFunction(N.onClose)&&(n=N.onClose.call(A,E.currentTime,A.data("input"),t)),!1===n||N.opened||N.inline||A.hide(),t.stopPropagation()})).on("toggle.xdsoft",(function(){A.is(":visible")?A.trigger("close.xdsoft"):A.trigger("open.xdsoft")})).data("input",t),q=0,A.data("xdsoft_datetime",E),A.setOptions(N),E.setCurrentTime(H()),t.data("xdsoft_datetimepicker",A).on("open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart",(function(){t.is(":disabled")||t.data("xdsoft_datetimepicker").is(":visible")&&N.closeOnInputClick||N.openOnFocus&&(clearTimeout(q),q=setTimeout((function(){t.is(":disabled")||(B=!0,E.setCurrentTime(H(),!0),N.mask&&U(N),A.trigger("open.xdsoft"))}),100))})).on("keydown.xdsoft",(function(t){var n,r=t.which;return-1!==[c].indexOf(r)&&N.enterLikeTab?(n=e("input:visible,textarea:visible,button:visible,a:visible"),A.trigger("close.xdsoft"),n.eq(n.index(this)+1).focus(),!1):-1!==[v].indexOf(r)?(A.trigger("close.xdsoft"),!0):void 0})).on("blur.xdsoft",(function(){A.trigger("close.xdsoft")}))},s=function(t){var n=t.data("xdsoft_datetimepicker");n&&(n.data("xdsoft_datetime",null),n.remove(),t.data("xdsoft_datetimepicker",null).off(".xdsoft"),e(N.contentWindow).off("resize.xdsoft"),e([N.contentWindow,N.ownerDocument.body]).off("mousedown.xdsoft touchstart"),t.unmousewheel&&t.unmousewheel())},e(N.ownerDocument).off("keydown.xdsoftctrl keyup.xdsoftctrl").off("keydown.xdsoftcmd keyup.xdsoftcmd").on("keydown.xdsoftctrl",(function(e){e.keyCode===l&&(O=!0)})).on("keyup.xdsoftctrl",(function(e){e.keyCode===l&&(O=!1)})).on("keydown.xdsoftcmd",(function(e){e.keyCode})).on("keyup.xdsoftcmd",(function(e){e.keyCode})),this.each((function(){var t,i=e(this).data("xdsoft_datetimepicker");if(i){if("string"===e.type(r))switch(r){case"show":e(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(e(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]&&e.isFunction(i[r])&&(u=i[r](o))}else i.setOptions(r);return 0}"string"!==e.type(r)&&(!N.lazyInit||N.open||N.inline?a(e(this)):(t=e(this)).on("open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart",(function e(){t.is(":disabled")||t.data("xdsoft_datetimepicker")||(clearTimeout(E),E=setTimeout((function(){t.data("xdsoft_datetimepicker")||a(t),t.off("open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart",e).trigger("open.xdsoft")}),100))})))})),u},e.fn.datetimepicker.defaults=t},i=[n(19755),n(50450)],void 0===(o="function"==typeof(r=s)?r.apply(t,i):r)||(e.exports=o),i=[n(19755)],r=function(e){var t,n,r=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],i="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],o=Array.prototype.slice;if(e.event.fixHooks)for(var a=r.length;a;)e.event.fixHooks[r[--a]]=e.event.mouseHooks;var s=e.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var t=i.length;t;)this.addEventListener(i[--t],u,!1);else this.onmousewheel=u;e.data(this,"mousewheel-line-height",s.getLineHeight(this)),e.data(this,"mousewheel-page-height",s.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var t=i.length;t;)this.removeEventListener(i[--t],u,!1);else this.onmousewheel=null;e.removeData(this,"mousewheel-line-height"),e.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var n=e(t),r=n["offsetParent"in e.fn?"offsetParent":"parent"]();return r.length||(r=e("body")),parseInt(r.css("fontSize"),10)||parseInt(n.css("fontSize"),10)||16},getPageHeight:function(t){return e(t).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=e.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=e.data(this,"mousewheel-line-height");u*=g,h*=g,f*=g}else if(2===i.deltaMode){var v=e.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),t&&clearTimeout(t),t=setTimeout(l,200),(e.event.dispatch||e.event.handle).apply(this,a)}}function l(){n=null}function c(e,t){return s.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120==0}e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})},void 0===(o="function"==typeof r?r.apply(t,i):r)||(e.exports=o)},50450:function(e,t,n){var r,i,o;i=[n(19755)],r=function(e){var t,n,r=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],i="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],o=Array.prototype.slice;if(e.event.fixHooks)for(var a=r.length;a;)e.event.fixHooks[r[--a]]=e.event.mouseHooks;var s=e.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var t=i.length;t;)this.addEventListener(i[--t],u,!1);else this.onmousewheel=u;e.data(this,"mousewheel-line-height",s.getLineHeight(this)),e.data(this,"mousewheel-page-height",s.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var t=i.length;t;)this.removeEventListener(i[--t],u,!1);else this.onmousewheel=null;e.removeData(this,"mousewheel-line-height"),e.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var n=e(t),r=n["offsetParent"in e.fn?"offsetParent":"parent"]();return r.length||(r=e("body")),parseInt(r.css("fontSize"),10)||parseInt(n.css("fontSize"),10)||16},getPageHeight:function(t){return e(t).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=e.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=e.data(this,"mousewheel-line-height");u*=g,h*=g,f*=g}else if(2===i.deltaMode){var v=e.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),t&&clearTimeout(t),t=setTimeout(l,200),(e.event.dispatch||e.event.handle).apply(this,a)}}function l(){n=null}function c(e,t){return s.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120==0}e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})},void 0===(o=r.apply(t,i))||(e.exports=o)},59786:function(e,t,n){var r,i,o;!function(a){"use strict";i=[n(19755),n(85592),n(63762)],void 0===(o="function"==typeof(r=function(e){return e.effects.define("blind","hide",(function(t,n){var r={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},i=e(this),o=t.direction||"up",a=i.cssClip(),s={clip:e.extend({},a)},u=e.effects.createPlaceholder(i);s.clip[r[o][0]]=s.clip[r[o][1]],"show"===t.mode&&(i.cssClip(s.clip),u&&u.css(e.effects.clipToBox(s)),s.clip=a),u&&u.animate(e.effects.clipToBox(s),t.duration,t.easing),i.animate(s,{queue:!1,duration:t.duration,easing:t.easing,complete:n})}))})?r.apply(t,i):r)||(e.exports=o)}()},10057:function(e,t,n){var r,i,o;!function(a){"use strict";i=[n(19755),n(85592),n(63762)],void 0===(o="function"==typeof(r=function(e){return e.effects.define("slide","show",(function(t,n){var r,i,o=e(this),a={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},s=t.mode,u=t.direction||"left",l="up"===u||"down"===u?"top":"left",c="up"===u||"left"===u,f=t.distance||o["top"===l?"outerHeight":"outerWidth"](!0),h={};e.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:t.duration,easing:t.easing,complete:n})}))})?r.apply(t,i):r)||(e.exports=o)}()},19804:function(e){e.exports=function(){return n={},e.m=t=[function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return a})),n(2);var r=n(3);function i(e,t,n,i){function o(i){var o=Object(r.j)(i,t.map(a));return function(e,t,n){if(!t.filter((function(e){return!((t=e)&&"?"===t[0]);var t})).every((function(e){return void 0!==n[e]}))){var r=t.filter((function(e){return void 0===n[e]}));throw new Error('Cannot create function "'.concat(e,'", ')+"some dependencies are missing: ".concat(r.map((function(e){return'"'.concat(e,'"')})).join(", "),"."))}}(e,t,i),n(o)}return o.isFactory=!0,o.fn=e,o.dependencies=t.slice().sort(),i&&(o.meta=i),o}function o(e){return"function"==typeof e&&"string"==typeof e.fn&&Array.isArray(e.dependencies)}function a(e){return e&&"?"===e[0]?e.slice(1):e}},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e){return"number"==typeof e}function o(e){return e&&!0===e.constructor.prototype.isBigNumber||!1}function a(e){return e&&"object"===r(e)&&!0===Object.getPrototypeOf(e).isComplex||!1}function s(e){return e&&"object"===r(e)&&!0===Object.getPrototypeOf(e).isFraction||!1}function u(e){return e&&!0===e.constructor.prototype.isUnit||!1}function l(e){return"string"==typeof e}n.d(t,"y",(function(){return i})),n.d(t,"e",(function(){return o})),n.d(t,"j",(function(){return a})),n.d(t,"o",(function(){return s})),n.d(t,"L",(function(){return u})),n.d(t,"I",(function(){return l})),n.d(t,"b",(function(){return c})),n.d(t,"v",(function(){return f})),n.d(t,"i",(function(){return h})),n.d(t,"n",(function(){return d})),n.d(t,"H",(function(){return p})),n.d(t,"D",(function(){return m})),n.d(t,"t",(function(){return g})),n.d(t,"g",(function(){return v})),n.d(t,"G",(function(){return y})),n.d(t,"s",(function(){return b})),n.d(t,"p",(function(){return x})),n.d(t,"m",(function(){return w})),n.d(t,"F",(function(){return _})),n.d(t,"z",(function(){return S})),n.d(t,"x",(function(){return O})),n.d(t,"K",(function(){return N})),n.d(t,"a",(function(){return E})),n.d(t,"c",(function(){return C})),n.d(t,"d",(function(){return A})),n.d(t,"f",(function(){return M})),n.d(t,"k",(function(){return k})),n.d(t,"l",(function(){return T})),n.d(t,"q",(function(){return D})),n.d(t,"r",(function(){return j})),n.d(t,"u",(function(){return P})),n.d(t,"w",(function(){return I})),n.d(t,"A",(function(){return R})),n.d(t,"B",(function(){return L})),n.d(t,"C",(function(){return F})),n.d(t,"E",(function(){return B})),n.d(t,"J",(function(){return q})),n.d(t,"h",(function(){return z})),n.d(t,"M",(function(){return H}));var c=Array.isArray;function f(e){return e&&!0===e.constructor.prototype.isMatrix||!1}function h(e){return Array.isArray(e)||f(e)}function d(e){return e&&e.isDenseMatrix&&!0===e.constructor.prototype.isMatrix||!1}function p(e){return e&&e.isSparseMatrix&&!0===e.constructor.prototype.isMatrix||!1}function m(e){return e&&!0===e.constructor.prototype.isRange||!1}function g(e){return e&&!0===e.constructor.prototype.isIndex||!1}function v(e){return"boolean"==typeof e}function y(e){return e&&!0===e.constructor.prototype.isResultSet||!1}function b(e){return e&&!0===e.constructor.prototype.isHelp||!1}function x(e){return"function"==typeof e}function w(e){return e instanceof Date}function _(e){return e instanceof RegExp}function S(e){return!(!e||"object"!==r(e)||e.constructor!==Object||a(e)||s(e))}function O(e){return null===e}function N(e){return void 0===e}function E(e){return e&&!0===e.isAccessorNode&&!0===e.constructor.prototype.isNode||!1}function C(e){return e&&!0===e.isArrayNode&&!0===e.constructor.prototype.isNode||!1}function A(e){return e&&!0===e.isAssignmentNode&&!0===e.constructor.prototype.isNode||!1}function M(e){return e&&!0===e.isBlockNode&&!0===e.constructor.prototype.isNode||!1}function k(e){return e&&!0===e.isConditionalNode&&!0===e.constructor.prototype.isNode||!1}function T(e){return e&&!0===e.isConstantNode&&!0===e.constructor.prototype.isNode||!1}function D(e){return e&&!0===e.isFunctionAssignmentNode&&!0===e.constructor.prototype.isNode||!1}function j(e){return e&&!0===e.isFunctionNode&&!0===e.constructor.prototype.isNode||!1}function P(e){return e&&!0===e.isIndexNode&&!0===e.constructor.prototype.isNode||!1}function I(e){return e&&!0===e.isNode&&!0===e.constructor.prototype.isNode||!1}function R(e){return e&&!0===e.isObjectNode&&!0===e.constructor.prototype.isNode||!1}function L(e){return e&&!0===e.isOperatorNode&&!0===e.constructor.prototype.isNode||!1}function F(e){return e&&!0===e.isParenthesisNode&&!0===e.constructor.prototype.isNode||!1}function B(e){return e&&!0===e.isRangeNode&&!0===e.constructor.prototype.isNode||!1}function q(e){return e&&!0===e.isSymbolNode&&!0===e.constructor.prototype.isNode||!1}function z(e){return e&&!0===e.constructor.prototype.isChain||!1}function H(e){var t=r(e);return"object"===t?null===e?"null":Array.isArray(e)?"Array":e instanceof Date?"Date":e instanceof RegExp?"RegExp":o(e)?"BigNumber":a(e)?"Complex":s(e)?"Fraction":f(e)?"Matrix":u(e)?"Unit":g(e)?"Index":m(e)?"Range":y(e)?"ResultSet":I(e)?e.type:z(e)?"Chain":b(e)?"Help":"Object":"function"===t?"Function":t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"p",(function(){return l})),n.d(t,"q",(function(){return c})),n.d(t,"m",(function(){return f})),n.d(t,"l",(function(){return h})),n.d(t,"n",(function(){return d})),n.d(t,"o",(function(){return p})),n.d(t,"e",(function(){return m})),n.d(t,"k",(function(){return g})),n.d(t,"f",(function(){return v})),n.d(t,"c",(function(){return y})),n.d(t,"d",(function(){return b})),n.d(t,"j",(function(){return x})),n.d(t,"i",(function(){return w})),n.d(t,"g",(function(){return _})),n.d(t,"h",(function(){return S})),n.d(t,"b",(function(){return O}));var r=n(4),i=n(1),o=n(5),a=n(6),s=n(9);function u(e){for(var t=[];Array.isArray(e);)t.push(e.length),e=e[0];return t}function l(e,t){if(0===t.length){if(Array.isArray(e))throw new a.a(e.length,0)}else!function e(t,n,r){var i=t.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=t[s];if(!Array.isArray(u))throw new a.a(n.length-1,n.length,"<");e(t[s],n,o)}else for(s=0;s<i;s++)if(Array.isArray(t[s]))throw new a.a(n.length+1,n.length,">")}(e,t,0)}function c(e,t){if(!Object(i.y)(e)||!Object(r.i)(e))throw new TypeError("Index must be an integer (value: "+e+")");if(e<0||"number"==typeof t&&t<=e)throw new s.a(e,t)}function f(e,t,n){if(!Array.isArray(e)||!Array.isArray(t))throw new TypeError("Array expected");if(0===t.length)throw new Error("Resizing to scalar is not supported");return t.forEach((function(e){if(!Object(i.y)(e)||!Object(r.i)(e)||e<0)throw new TypeError("Invalid size, must contain positive integers (size: "+Object(o.d)(t)+")")})),function e(t,n,r,i){var o,a,s=t.length,u=n[r],l=Math.min(s,u);if(t.length=u,r<n.length-1){var c=r+1;for(o=0;o<l;o++)a=t[o],Array.isArray(a)||(a=[a],t[o]=a),e(a,n,c,i);for(o=l;o<u;o++)a=[],t[o]=a,e(a,n,c,i)}else{for(o=0;o<l;o++)for(;Array.isArray(t[o]);)t[o]=t[o][0];for(o=l;o<u;o++)t[o]=i}}(e,t,0,void 0!==n?n:0),e}function h(e,t){var n,r=m(e);function i(e){return e.reduce((function(e,t){return e*t}))}if(!Array.isArray(e)||!Array.isArray(t))throw new TypeError("Array expected");if(0===t.length)throw new a.a(0,i(u(e)),"!=");for(var o=1,s=0;s<t.length;s++)o*=t[s];if(r.length!==o)throw new a.a(i(t),i(u(e)),"!=");try{n=function(e,t){for(var n,r=e,i=t.length-1;0<i;i--){var o=t[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,t)}catch(n){if(n instanceof a.a)throw new a.a(i(t),i(u(e)),"!=");throw n}return n}function d(e,t){for(var n=t||u(e);Array.isArray(e)&&1===e.length;)e=e[0],n.shift();for(var r=n.length;1===n[r-1];)r--;return r<n.length&&(e=function e(t,n,r){var i,o;if(r<n){var a=r+1;for(i=0,o=t.length;i<o;i++)t[i]=e(t[i],n,a)}else for(;Array.isArray(t);)t=t[0];return t}(e,r,0),n.length=r),e}function p(e,t,n,r){var i=r||u(e);if(n)for(var o=0;o<n;o++)e=[e],i.unshift(1);for(e=function e(t,n,r){var i,o;if(Array.isArray(t)){var a=r+1;for(i=0,o=t.length;i<o;i++)t[i]=e(t[i],n,a)}else for(var s=r;s<n;s++)t=[t];return t}(e,t,0);i.length<t;)i.push(1);return e}function m(e){if(!Array.isArray(e))return e;var t=[];return e.forEach((function e(n){Array.isArray(n)?n.forEach(e):t.push(n)})),t}function g(e,t){return Array.prototype.map.call(e,t)}function v(e,t){Array.prototype.forEach.call(e,t)}function y(e,t){if(1!==u(e).length)throw new Error("Only one dimensional matrices supported");return Array.prototype.filter.call(e,t)}function b(e,t){if(1!==u(e).length)throw new Error("Only one dimensional matrices supported");return Array.prototype.filter.call(e,(function(e){return t.test(e)}))}function x(e,t){return Array.prototype.join.call(e,t)}function w(e){if(!Array.isArray(e))throw new TypeError("Array input expected");if(0===e.length)return e;var t=[],n=0;t[0]={value:e[0],identifier:0};for(var r=1;r<e.length;r++)e[r]===e[r-1]?n++:n=0,t.push({value:e[r],identifier:n});return t}function _(e){if(!Array.isArray(e))throw new TypeError("Array input expected");if(0===e.length)return e;for(var t=[],n=0;n<e.length;n++)t.push(e[n].value);return t}function S(e,t){for(var n,r=0,i=0;i<e.length;i++){var o=e[i],a=Array.isArray(o);if(0===i&&a&&(r=o.length),a&&o.length!==r)return;var s=a?S(o,t):t(o);if(void 0===n)n=s;else if(n!==s)return"mixed"}return n}function O(e,t){return-1!==e.indexOf(t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"i",(function(){return a})),n.d(t,"e",(function(){return s})),n.d(t,"b",(function(){return u})),n.d(t,"d",(function(){return l})),n.d(t,"c",(function(){return c})),n.d(t,"h",(function(){return f})),n.d(t,"f",(function(){return h})),n.d(t,"g",(function(){return d})),n.d(t,"j",(function(){return p})),n.d(t,"k",(function(){return m}));var r=n(1);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e){var t=i(e);if("number"===t||"string"===t||"boolean"===t||null==e)return e;if("function"==typeof e.clone)return e.clone();if(Array.isArray(e))return e.map(o);if(e instanceof Date)return new Date(e.valueOf());if(Object(r.e)(e))return e;if(e instanceof RegExp)throw new TypeError("Cannot clone "+e);return a(e,o)}function a(e,t){var n={};for(var r in e)h(e,r)&&(n[r]=t(e[r]));return n}function s(e,t){for(var n in t)h(t,n)&&(e[n]=t[n]);return e}function u(e,t){if(Array.isArray(t))throw new TypeError("Arrays are not supported by deepExtend");for(var n in t)if(h(t,n))if(t[n]&&t[n].constructor===Object)void 0===e[n]&&(e[n]={}),e[n]&&e[n].constructor===Object?u(e[n],t[n]):e[n]=t[n];else{if(Array.isArray(t[n]))throw new TypeError("Arrays are not supported by deepExtend");e[n]=t[n]}return e}function l(e,t){var n,r,i;if(Array.isArray(e)){if(!Array.isArray(t))return!1;if(e.length!==t.length)return!1;for(r=0,i=e.length;r<i;r++)if(!l(e[r],t[r]))return!1;return!0}if("function"==typeof e)return e===t;if(e instanceof Object){if(Array.isArray(t)||!(t instanceof Object))return!1;for(n in e)if(!(n in t)||!l(e[n],t[n]))return!1;for(n in t)if(!(n in e)||!l(e[n],t[n]))return!1;return!0}return e===t}function c(e){var t={};return function e(t,n){for(var r in t){var o;h(t,r)&&("object"===i(o=t[r])&&null!==o?e(o,n):n[r]=o)}}(e,t),t}function f(e,t,n){var r,i=!0;Object.defineProperty(e,t,{get:function(){return i&&(r=n(),i=!1),r},set:function(e){r=e,i=!1},configurable:!0,enumerable:!0})}function h(e,t){return e&&Object.hasOwnProperty.call(e,t)}function d(e){return e&&"function"==typeof e.factory}function p(e,t){for(var n={},r=0;r<t.length;r++){var i=t[r],o=e[i];void 0!==o&&(n[i]=o)}return n}function m(e){return Object.keys(e).map((function(t){return e[t]}))}},function(e,t,n){"use strict";n.d(t,"i",(function(){return i})),n.d(t,"n",(function(){return o})),n.d(t,"l",(function(){return a})),n.d(t,"j",(function(){return s})),n.d(t,"k",(function(){return u})),n.d(t,"d",(function(){return l})),n.d(t,"g",(function(){return c})),n.d(t,"h",(function(){return f})),n.d(t,"q",(function(){return d})),n.d(t,"f",(function(){return v})),n.d(t,"m",(function(){return b})),n.d(t,"a",(function(){return x})),n.d(t,"b",(function(){return w})),n.d(t,"c",(function(){return _})),n.d(t,"e",(function(){return S})),n.d(t,"o",(function(){return O})),n.d(t,"p",(function(){return N}));var r=n(1);function i(e){return"boolean"==typeof e||!!isFinite(e)&&e===Math.round(e)}var o=Math.sign||function(e){return 0<e?1:e<0?-1:0},a=Math.log2||function(e){return Math.log(e)/Math.LN2},s=Math.log10||function(e){return Math.log(e)/Math.LN10},u=Math.log1p||function(e){return Math.log(e+1)},l=Math.cbrt||function(e){if(0===e)return e;var t,n=e<0;return n&&(e=-e),t=isFinite(e)?(e/((t=Math.exp(Math.log(e)/3))*t)+2*t)/3:e,n?-t:t},c=Math.expm1||function(e){return 2e-4<=e||e<=-2e-4?Math.exp(e)-1:e+e*e/2+e*e*e/6};function f(e,t){if("function"==typeof t)return t(e);if(e===1/0)return"Infinity";if(e===-1/0)return"-Infinity";if(isNaN(e))return"NaN";var n,i="auto";switch(t&&(t.notation&&(i=t.notation),Object(r.y)(t)?n=t:Object(r.y)(t.precision)&&(n=t.precision)),i){case"fixed":return d(e,n);case"exponential":return p(e,n);case"engineering":return function(e,t){if(isNaN(e)||!isFinite(e))return String(e);var n=m(h(e),t),i=n.exponent,o=n.coefficients,a=i%3==0?i:i<0?i-3-i%3:i-i%3;if(Object(r.y)(t))for(;t>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)(t)&&f.length||f.match(/[1-9]/)?"."+f:"",p=o.slice(0,c).join("")+d+"e"+(0<=i?"+":"")+a.toString();return n.sign+p}(e,n);case"auto":return function(e,t,n){if(isNaN(e)||!isFinite(e))return String(e);var r=n&&void 0!==n.lowerExp?n.lowerExp:-3,i=n&&void 0!==n.upperExp?n.upperExp:5,o=h(e),a=t?m(o,t):o;if(a.exponent<r||a.exponent>=i)return p(e,t);var s=a.coefficients,u=a.exponent;s.length<t&&(s=s.concat(g(t-s.length))),s=s.concat(g(u-s.length+1+(s.length<t?t-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("")}(e,n,t&&t).replace(/((\.\d*?)(0+))($|e)/,(function(){var e=arguments[2],t=arguments[4];return"."!==e?e+t:t}));default:throw new Error('Unknown notation "'+i+'". Choose "auto", "exponential", or "fixed".')}}function h(e){var t=String(e).toLowerCase().match(/^0*?(-?)(\d+\.?\d*)(e([+-]?\d+))?$/);if(!t)throw new SyntaxError("Invalid number "+e);var n=t[1],r=t[2],i=parseFloat(t[4]||"0"),o=r.indexOf(".");i+=-1!==o?o-1:r.length-1;var a=r.replace(".","").replace(/^0*/,(function(e){return i-=e.length,""})).replace(/0*$/,"").split("").map((function(e){return parseInt(e)}));return 0===a.length&&(a.push(0),i++),{sign:n,coefficients:a,exponent:i}}function d(e,t){if(isNaN(e)||!isFinite(e))return String(e);var n=h(e),r="number"==typeof t?m(n,n.exponent+1+t):n,i=r.coefficients,o=r.exponent+1,a=o+(t||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(e,t){if(isNaN(e)||!isFinite(e))return String(e);var n=h(e),r=t?m(n,t):n,i=r.coefficients,o=r.exponent;i.length<t&&(i=i.concat(g(t-i.length)));var a=i.shift();return r.sign+a+(0<i.length?"."+i.join(""):"")+"e"+(0<=o?"+":"")+o}function m(e,t){for(var n={sign:e.sign,coefficients:e.coefficients,exponent:e.exponent},r=n.coefficients;t<=0;)r.unshift(0),n.exponent++,t++;if(r.length>t&&5<=r.splice(t,r.length-t)[0]){var i=t-1;for(r[i]++;10===r[i];)r.pop(),0===i&&(r.unshift(0),n.exponent++,i++),r[--i]++}return n}function g(e){for(var t=[],n=0;n<e;n++)t.push(0);return t}function v(e){return e.toExponential().replace(/e.*$/,"").replace(/^0\.?0*|\./,"").length}var y=Number.EPSILON||2220446049250313e-31;function b(e,t,n){if(null==n)return e===t;if(e===t)return!0;if(isNaN(e)||isNaN(t))return!1;if(isFinite(e)&&isFinite(t)){var r=Math.abs(e-t);return r<y||r<=Math.max(Math.abs(e),Math.abs(t))*n}return!1}var x=Math.acosh||function(e){return Math.log(Math.sqrt(e*e-1)+e)},w=Math.asinh||function(e){return Math.log(Math.sqrt(e*e+1)+e)},_=Math.atanh||function(e){return Math.log((1+e)/(1-e))/2},S=Math.cosh||function(e){return(Math.exp(e)+Math.exp(-e))/2},O=Math.sinh||function(e){return(Math.exp(e)-Math.exp(-e))/2},N=Math.tanh||function(e){var t=Math.exp(2*e);return(t-1)/(t+1)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"d",(function(){return u})),n.d(t,"e",(function(){return l})),n.d(t,"c",(function(){return c})),n.d(t,"a",(function(){return f}));var r=n(1),i=n(4);function o(e,t){return void 0!==t?e.toExponential(t-1):e.toExponential()}function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){var n=e.length-t.length,r=e.length;return e.substring(n,r)===t}function u(e,t){return"number"==typeof e?Object(i.h)(e,t):Object(r.e)(e)?function(e,t){if("function"==typeof t)return t(e);if(!e.isFinite())return e.isNaN()?"NaN":e.gt(0)?"Infinity":"-Infinity";var n,r,i="auto";switch(void 0!==t&&(t.notation&&(i=t.notation),"number"==typeof t?n=t:t.precision&&(n=t.precision)),i){case"fixed":return r=n,e.toFixed(r);case"exponential":return o(e,n);case"engineering":return function(e,t){var n=e.e,r=n%3==0?n:n<0?n-3-n%3:n-n%3,i=e.mul(Math.pow(10,-r)),o=i.toPrecision(t);return-1!==o.indexOf("e")&&(o=i.toString()),o+"e"+(0<=n?"+":"")+r.toString()}(e,n);case"auto":var a=t&&void 0!==t.lowerExp?t.lowerExp:-3,s=t&&void 0!==t.upperExp?t.upperExp:5;if(e.isZero())return"0";var u=e.toSignificantDigits(n),l=u.e;return(a<=l&&l<s?u.toFixed():o(e,n)).replace(/((\.\d*?)(0+))($|e)/,(function(){var e=arguments[2],t=arguments[4];return"."!==e?e+t:t}));default:throw new Error('Unknown notation "'+i+'". Choose "auto", "exponential", or "fixed".')}}(e,t):(n=e)&&"object"===a(n)&&"number"==typeof n.s&&"number"==typeof n.n&&"number"==typeof n.d?t&&"decimal"===t.fraction?e.toString():e.s*e.n+"/"+e.d:Array.isArray(e)?function e(t,n){if(Array.isArray(t)){for(var r="[",i=t.length,o=0;o<i;o++)0!==o&&(r+=", "),r+=e(t[o],n);return r+"]"}return u(t,n)}(e,t):Object(r.I)(e)?'"'+e+'"':"function"==typeof e?e.syntax?String(e.syntax):"function":e&&"object"===a(e)?"function"==typeof e.format?e.format(t):e&&e.toString(t)!=={}.toString()?e.toString(t):"{"+Object.keys(e).map((function(n){return'"'+n+'": '+u(e[n],t)})).join(", ")+"}":String(e);var n}function l(e){for(var t=String(e),n="",r=0;r<t.length;){var i=t.charAt(r);"\\"===i?(n+=i,r++,""!==(i=t.charAt(r))&&-1!=='"\\/bfnrtu'.indexOf(i)||(n+="\\"),n+=i):n+='"'===i?'\\"':i,r++}return'"'+n+'"'}function c(e){return String(e).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function f(e,t){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: 0)");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: 1)");return e===t?0:t<e?1:-1}},function(e,t,n){"use strict";function r(e,t,n){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");this.actual=e,this.expected=t,this.relation=n,this.message="Dimension mismatch ("+(Array.isArray(e)?"["+e.join(", ")+"]":e)+" "+(this.relation||"!=")+" "+(Array.isArray(t)?"["+t.join(", ")+"]":t)+")",this.stack=(new Error).stack}n.d(t,"a",(function(){return r})),(r.prototype=new RangeError).constructor=RangeError,r.prototype.name="DimensionError",r.prototype.isDimensionError=!0},,function(e,t,n){var r;!function(){"use strict";function n(e){return.5*(Math.exp(e)+Math.exp(-e))}function i(e){return.5*(Math.exp(e)-Math.exp(-e))}function o(){throw SyntaxError("Invalid Param")}function a(e,t){var n=Math.abs(e),r=Math.abs(t);return 0===e?Math.log(r):0===t?Math.log(n):n<3e3&&r<3e3?.5*Math.log(e*e+t*t):Math.log(e/Math.cos(Math.atan2(t,e)))}function s(e,t){if(!(this instanceof s))return new s(e,t);var n=function(e,t){var n={re:0,im:0};if(null==e)n.re=n.im=0;else if(void 0!==t)n.re=e,n.im=t;else switch(typeof e){case"object":if("im"in e&&"re"in e)n.re=e.re,n.im=e.im;else if("abs"in e&&"arg"in e){if(!Number.isFinite(e.abs)&&Number.isFinite(e.arg))return s.INFINITY;n.re=e.abs*Math.cos(e.arg),n.im=e.abs*Math.sin(e.arg)}else if("r"in e&&"phi"in e){if(!Number.isFinite(e.r)&&Number.isFinite(e.phi))return s.INFINITY;n.re=e.r*Math.cos(e.phi),n.im=e.r*Math.sin(e.phi)}else 2===e.length?(n.re=e[0],n.im=e[1]):o();break;case"string":n.im=n.re=0;var r=e.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=e;break;default:o()}return isNaN(n.re)||isNaN(n.im),n}(e,t);this.re=n.re,this.im=n.im}s.prototype={re:0,im:0,sign:function(){var e=this.abs();return new s(this.re/e,this.im/e)},add:function(e,t){var n=new s(e,t);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(e,t){var n=new s(e,t);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(e,t){var n=new s(e,t);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(e,t){var n=new s(e,t);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;e=this.re,t=this.im;var r,i,o=n.re,a=n.im;return 0===a?new s(e/o,t/o):Math.abs(o)<Math.abs(a)?new s((e*(i=o/a)+t)/(r=o*i+a),(t*i-e)/r):new s((e+t*(i=a/o))/(r=a*i+o),(t-e*i)/r)},pow:function(e,t){var n=new s(e,t);if(e=this.re,t=this.im,n.isZero())return s.ONE;if(0===n.im){if(0===t&&0<=e)return new s(Math.pow(e,n.re),0);if(0===e)switch((n.re%4+4)%4){case 0:return new s(Math.pow(t,n.re),0);case 1:return new s(0,Math.pow(t,n.re));case 2:return new s(-Math.pow(t,n.re),0);case 3:return new s(0,-Math.pow(t,n.re))}}if(0===e&&0===t&&0<n.re&&0<=n.im)return s.ZERO;var r=Math.atan2(t,e),i=a(e,t);return e=Math.exp(n.re*i-n.im*r),t=n.im*i+n.re*r,new s(e*Math.cos(t),e*Math.sin(t))},sqrt:function(){var e,t,n=this.re,r=this.im,i=this.abs();if(0<=n){if(0===r)return new s(Math.sqrt(n),0);e=.5*Math.sqrt(2*(i+n))}else e=Math.abs(r)/Math.sqrt(2*(i-n));return t=n<=0?.5*Math.sqrt(2*(i-n)):Math.abs(r)/Math.sqrt(2*(i+n)),new s(e,r<0?-t:t)},exp:function(){var e=Math.exp(this.re);return this.im,new s(e*Math.cos(this.im),e*Math.sin(this.im))},expm1:function(){var e=this.re,t=this.im;return new s(Math.expm1(e)*Math.cos(t)+function(e){var t=Math.PI/4;if(e<-t||t<e)return Math.cos(e)-1;var n=e*e;return n*(n*(1/24+n*(-1/720+n*(1/40320+n*(-1/3628800+n*(1/4790014600+n*(-1/87178291200+1/20922789888e3*n))))))-.5)}(t),Math.exp(e)*Math.sin(t))},log:function(){var e=this.re,t=this.im;return new s(a(e,t),Math.atan2(t,e))},abs:function(){return e=this.re,t=this.im,n=Math.abs(e),r=Math.abs(t),n<3e3&&r<3e3?Math.sqrt(n*n+r*r):(r=n<r?(n=r,e/t):t/e,n*Math.sqrt(1+r*r));var e,t,n,r},arg:function(){return Math.atan2(this.im,this.re)},sin:function(){var e=this.re,t=this.im;return new s(Math.sin(e)*n(t),Math.cos(e)*i(t))},cos:function(){var e=this.re,t=this.im;return new s(Math.cos(e)*n(t),-Math.sin(e)*i(t))},tan:function(){var e=2*this.re,t=2*this.im,r=Math.cos(e)+n(t);return new s(Math.sin(e)/r,i(t)/r)},cot:function(){var e=2*this.re,t=2*this.im,r=Math.cos(e)-n(t);return new s(-Math.sin(e)/r,i(t)/r)},sec:function(){var e=this.re,t=this.im,r=.5*n(2*t)+.5*Math.cos(2*e);return new s(Math.cos(e)*n(t)/r,Math.sin(e)*i(t)/r)},csc:function(){var e=this.re,t=this.im,r=.5*n(2*t)-.5*Math.cos(2*e);return new s(Math.sin(e)*n(t)/r,-Math.cos(e)*i(t)/r)},asin:function(){var e=this.re,t=this.im,n=new s(t*t-e*e+1,-2*e*t).sqrt(),r=new s(n.re-t,n.im+e).log();return new s(r.im,-r.re)},acos:function(){var e=this.re,t=this.im,n=new s(t*t-e*e+1,-2*e*t).sqrt(),r=new s(n.re-t,n.im+e).log();return new s(Math.PI/2-r.im,r.re)},atan:function(){var e=this.re,t=this.im;if(0===e){if(1===t)return new s(0,1/0);if(-1===t)return new s(0,-1/0)}var n=e*e+(1-t)*(1-t),r=new s((1-t*t-e*e)/n,-2*e/n).log();return new s(-.5*r.im,.5*r.re)},acot:function(){var e=this.re,t=this.im;if(0===t)return new s(Math.atan2(1,e),0);var n=e*e+t*t;return 0!=n?new s(e/n,-t/n).atan():new s(0!==e?e/0:0,0!==t?-t/0:0).atan()},asec:function(){var e=this.re,t=this.im;if(0===e&&0===t)return new s(0,1/0);var n=e*e+t*t;return 0!=n?new s(e/n,-t/n).acos():new s(0!==e?e/0:0,0!==t?-t/0:0).acos()},acsc:function(){var e=this.re,t=this.im;if(0===e&&0===t)return new s(Math.PI/2,1/0);var n=e*e+t*t;return 0!=n?new s(e/n,-t/n).asin():new s(0!==e?e/0:0,0!==t?-t/0:0).asin()},sinh:function(){var e=this.re,t=this.im;return new s(i(e)*Math.cos(t),n(e)*Math.sin(t))},cosh:function(){var e=this.re,t=this.im;return new s(n(e)*Math.cos(t),i(e)*Math.sin(t))},tanh:function(){var e=2*this.re,t=2*this.im,r=n(e)+Math.cos(t);return new s(i(e)/r,Math.sin(t)/r)},coth:function(){var e=2*this.re,t=2*this.im,r=n(e)-Math.cos(t);return new s(i(e)/r,-Math.sin(t)/r)},csch:function(){var e=this.re,t=this.im,r=Math.cos(2*t)-n(2*e);return new s(-2*i(e)*Math.cos(t)/r,2*n(e)*Math.sin(t)/r)},sech:function(){var e=this.re,t=this.im,r=Math.cos(2*t)+n(2*e);return new s(2*n(e)*Math.cos(t)/r,-2*i(e)*Math.sin(t)/r)},asinh:function(){var e=this.im;this.im=-this.re,this.re=e;var t=this.asin();return this.re=-this.im,this.im=e,e=t.re,t.re=-t.im,t.im=e,t},acosh:function(){var e,t=this.acos();return t.im<=0?(e=t.re,t.re=-t.im,t.im=e):(e=t.im,t.im=-t.re,t.re=e),t},atanh:function(){var e=this.re,t=this.im,n=1<e&&0===t,r=1-e,i=1+e,o=r*r+t*t,u=0!=o?new s((i*r-t*t)/o,(t*r+i*t)/o):new s(-1!==e?e/0:0,0!==t?t/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 e=this.re,t=this.im;if(0===e&&0===t)return new s(0,Math.PI/2);var n=e*e+t*t;return 0!=n?new s(e/n,-t/n).atanh():new s(0!==e?e/0:0,0!==t?-t/0:0).atanh()},acsch:function(){var e=this.re,t=this.im;if(0===t)return new s(0!==e?Math.log(e+Math.sqrt(e*e+1)):1/0,0);var n=e*e+t*t;return 0!=n?new s(e/n,-t/n).asinh():new s(0!==e?e/0:0,0!==t?-t/0:0).asinh()},asech:function(){var e=this.re,t=this.im;if(this.isZero())return s.INFINITY;var n=e*e+t*t;return 0!=n?new s(e/n,-t/n).acosh():new s(0!==e?e/0:0,0!==t?-t/0:0).acosh()},inverse:function(){if(this.isZero())return s.INFINITY;if(this.isInfinite())return s.ZERO;var e=this.re,t=this.im,n=e*e+t*t;return new s(e/n,-t/n)},conjugate:function(){return new s(this.re,-this.im)},neg:function(){return new s(-this.re,-this.im)},ceil:function(e){return e=Math.pow(10,e||0),new s(Math.ceil(this.re*e)/e,Math.ceil(this.im*e)/e)},floor:function(e){return e=Math.pow(10,e||0),new s(Math.floor(this.re*e)/e,Math.floor(this.im*e)/e)},round:function(e){return e=Math.pow(10,e||0),new s(Math.round(this.re*e)/e,Math.round(this.im*e)/e)},equals:function(e,t){var n=new s(e,t);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 e=this.re,t=this.im,n="";return this.isNaN()?"NaN":this.isZero()?"0":this.isInfinite()?"Infinity":(0!==e&&(n+=e),0!==t&&(0!==e?n+=t<0?" - ":" + ":t<0&&(n+="-"),1!==(t=Math.abs(t))&&(n+=t),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(t,[]))||(e.exports=r)}()},function(e,t,n){"use strict";function r(e,t,n){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");this.index=e,arguments.length<3?(this.min=0,this.max=t):(this.min=t,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(t,"a",(function(){return r})),(r.prototype=new RangeError).constructor=RangeError,r.prototype.name="IndexError",r.prototype.isIndexError=!0},function(e,t,n){var r;!function(){"use strict";var n={s:1,n:0,d:1};function i(e){function t(){var t=Error.apply(this,arguments);t.name=this.name=e,this.stack=t.stack,this.message=t.message}function n(){}return n.prototype=Error.prototype,t.prototype=new n,t}var o=f.DivisionByZero=i("DivisionByZero"),a=f.InvalidParameter=i("InvalidParameter");function s(e,t){return isNaN(e=parseInt(e,10))&&u(),e*t}function u(){throw new a}var l=function(e,t){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!=e)if(void 0!==t)l=(i=e)*(a=t);else switch(typeof e){case"object":"d"in e&&"n"in e?(i=e.n,a=e.d,"s"in e&&(i*=e.s)):0 in e?(i=e[0],1 in e&&(a=e[1])):u(),l=i*a;break;case"number":if(e<0&&(e=-(l=e)),e%1==0)i=e;else if(0<e){for(1<=e&&(e/=p=Math.pow(10,Math.floor(1+Math.log(e)/Math.LN10)));g<=1e7&&y<=1e7;){if(e===(r=(m+v)/(g+y))){a=g+y<=1e7?(i=m+v,g+y):g<y?(i=v,y):(i=m,g);break}r<e?(m+=v,g+=y):(v+=m,y+=g),a=1e7<g?(i=v,y):(i=m,g)}i*=p}else(isNaN(e)||isNaN(t))&&(a=i=NaN);break;case"string":if(null===(g=e.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(e,t){if(!e)return t;if(!t)return e;for(;;){if(!(e%=t))return t;if(!(t%=e))return e}}function f(e,t){if(!(this instanceof f))return new f(e,t);l(e,t),e=f.REDUCE?c(n.d,n.n):1,this.s=n.s,this.n=n.n/e,this.d=n.d/e}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(e,t){return l(e,t),new f(this.s*this.n*n.d+n.s*this.d*n.n,this.d*n.d)},sub:function(e,t){return l(e,t),new f(this.s*this.n*n.d-n.s*this.d*n.n,this.d*n.d)},mul:function(e,t){return l(e,t),new f(this.s*n.s*this.n*n.n,this.d*n.d)},div:function(e,t){return l(e,t),new f(this.s*n.s*this.n*n.d,this.d*n.n)},clone:function(){return new f(this)},mod:function(e,t){return isNaN(this.n)||isNaN(this.d)?new f(NaN):void 0===e?new f(this.s*this.n%this.d,1):(l(e,t),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(e,t){return l(e,t),new f(c(n.n,this.n)*c(n.d,this.d),n.d*this.d)},lcm:function(e,t){return l(e,t),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(e){return e=Math.pow(10,e||0),isNaN(this.n)||isNaN(this.d)?new f(NaN):new f(Math.ceil(e*this.s*this.n/this.d),e)},floor:function(e){return e=Math.pow(10,e||0),isNaN(this.n)||isNaN(this.d)?new f(NaN):new f(Math.floor(e*this.s*this.n/this.d),e)},round:function(e){return e=Math.pow(10,e||0),isNaN(this.n)||isNaN(this.d)?new f(NaN):new f(Math.round(e*this.s*this.n/this.d),e)},inverse:function(){return new f(this.s*this.d,this.n)},pow:function(e){return e<0?new f(Math.pow(this.s*this.d,-e),Math.pow(this.n,-e)):new f(Math.pow(this.s*this.n,e),Math.pow(this.d,e))},equals:function(e,t){return l(e,t),this.s*this.n*n.d==n.s*n.n*this.d},compare:function(e,t){l(e,t);var r=this.s*this.n*n.d-n.s*n.n*this.d;return(0<r)-(r<0)},simplify:function(e){if(isNaN(this.n)||isNaN(this.d))return this;var t=this.abs().toContinued();e=e||.001;for(var n=0;n<t.length;n++){var r=function e(t){return 1===t.length?new f(t[0]):e(t.slice(1)).inverse().add(t[0])}(t.slice(0,n+1));if(r.sub(this.abs()).abs().valueOf()<e)return r.mul(this.s)}return this},divisible:function(e,t){return l(e,t),!(!(n.n*this.d)||this.n*n.d%(n.n*this.d))},valueOf:function(){return this.s*this.n/this.d},toFraction:function(e){var t,n="",r=this.n,i=this.d;return this.s<0&&(n+="-"),1===i?n+=r:(e&&0<(t=Math.floor(r/i))&&(n+=t,n+=" ",r%=i),n+=r,n+="/",n+=i),n},toLatex:function(e){var t,n="",r=this.n,i=this.d;return this.s<0&&(n+="-"),1===i?n+=r:(e&&0<(t=Math.floor(r/i))&&(n+=t,r%=i),n+="\\frac{",n+=r,n+="}{",n+=i,n+="}"),n},toContinued:function(){var e,t=this.n,n=this.d,r=[];if(isNaN(this.n)||isNaN(this.d))return r;for(;r.push(Math.floor(t/n)),e=t%n,t=n,n=e,1!==t;);return r},toString:function(e){var t,n=this.n,r=this.d;if(isNaN(n)||isNaN(r))return"NaN";f.REDUCE||(n/=t=c(n,r),r/=t),e=e||15;var i=function(e){for(;e%2==0;e/=2);for(;e%5==0;e/=5);if(1===e)return 0;for(var t=10%e,n=1;1!==t;n++)if(t=10*t%e,2e3<n)return 0;return n}(r),o=function(e,t,n){for(var r=1,i=function(e,t,n){for(var r=1;0<t;e=e*e%n,t>>=1)1&t&&(r=r*e%n);return r}(10,n,t),o=0;o<300;o++){if(r===i)return o;r=10*r%t,i=10*i%t}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=e;n&&s--;)a+=n/r|0,n%=r,n*=10;return a}},void 0===(r=function(){return f}.apply(t,[]))||(e.exports=r)}()},function(e,t){e.exports=function e(t,n){"use strict";function r(t){return e.insensitive&&(""+t).toLowerCase()||""+t}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(t).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(e,t,n){"use strict";function r(e,t,n,i){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");this.fn=e,this.count=t,this.min=n,this.max=i,this.message="Wrong number of arguments in function "+e+" ("+t+" provided, "+n+(null!=i?"-"+i:"")+" expected)",this.stack=(new Error).stack}n.d(t,"a",(function(){return r})),(r.prototype=new Error).constructor=Error,r.prototype.name="ArgumentsError",r.prototype.isArgumentsError=!0},function(e,t,n){"use strict";var r,i;void 0===(i="function"==typeof(r=function(){function e(){return!0}function t(){return!1}function n(){}return function r(){var i=[{name:"number",test:function(e){return"number"==typeof e}},{name:"string",test:function(e){return"string"==typeof e}},{name:"boolean",test:function(e){return"boolean"==typeof e}},{name:"Function",test:function(e){return"function"==typeof e}},{name:"Array",test:Array.isArray},{name:"Date",test:function(e){return e instanceof Date}},{name:"RegExp",test:function(e){return e instanceof RegExp}},{name:"Object",test:function(e){return"object"==typeof e&&null!==e&&e.constructor===Object}},{name:"null",test:function(e){return null===e}},{name:"undefined",test:function(e){return void 0===e}}],o={name:"any",test:e},a=[],s=[],u={types:i,conversions:s,ignore:a};function l(e){var t=W(u.types,(function(t){return t.name===e}));if(t)return t;if("any"===e)return o;var n=W(u.types,(function(t){return t.name.toLowerCase()===e.toLowerCase()}));throw new TypeError('Unknown type "'+e+'"'+(n?'. Did you mean "'+n.name+'"?':""))}function c(e){return e===o?999:u.types.indexOf(e)}function f(e){var t=W(u.types,(function(t){return t.test(e)}));if(t)return t.name;throw new TypeError("Value has unknown type. Value: "+e)}function h(e){return e.map((function(e){var t=e.types.map(w);return(e.restParam?"...":"")+t.join("|")})).join(",")}function d(e,t){var n=0===e.indexOf("..."),r=(n?e.length>3?e.slice(3):"any":e).split("|").map(R).filter(L).filter(I),i=function(e,t){var n={};return e.forEach((function(e){-1!==t.indexOf(e.from)||-1===t.indexOf(e.to)||n[e.from]||(n[e.from]=e)})),Object.keys(n).map((function(e){return n[e]}))}(t,r),o=r.map((function(e){var t=l(e);return{name:e,typeIndex:c(t),test:t.test,conversion:null,conversionIndex:-1}})),a=i.map((function(e){var n=l(e.from);return{name:e.from,typeIndex:c(n),test:n.test,conversion:e,conversionIndex:t.indexOf(e)}}));return{types:o.concat(a),restParam:n}}function p(e,t,n){var r=[];return""!==e.trim()&&(r=e.split(",").map(R).map((function(e,t,r){var i=d(e,n);if(i.restParam&&t!==r.length-1)throw new SyntaxError('Unexpected rest parameter "'+e+'": only allowed for the last parameter');return i}))),r.some(B)?null:{params:r,fn:t}}function m(e){var t=q(e);return!!t&&t.restParam}function g(e){return e.types.some((function(e){return null!=e.conversion}))}function v(t){if(t&&0!==t.types.length){if(1===t.types.length)return l(t.types[0].name).test;if(2===t.types.length){var n=l(t.types[0].name).test,r=l(t.types[1].name).test;return function(e){return n(e)||r(e)}}var i=t.types.map((function(e){return l(e.name).test}));return function(e){for(var t=0;t<i.length;t++)if(i[t](e))return!0;return!1}}return e}function y(e){var t,n,r;if(m(e)){var i=(t=function(e){return e.slice(0,e.length-1)}(e).map(v)).length,o=v(q(e));return function(e){for(var n=0;n<t.length;n++)if(!t[n](e[n]))return!1;return function(e){for(var t=i;t<e.length;t++)if(!o(e[t]))return!1;return!0}(e)&&e.length>=i+1}}return 0===e.length?function(e){return 0===e.length}:1===e.length?(n=v(e[0]),function(e){return n(e[0])&&1===e.length}):2===e.length?(n=v(e[0]),r=v(e[1]),function(e){return n(e[0])&&r(e[1])&&2===e.length}):(t=e.map(v),function(e){for(var n=0;n<t.length;n++)if(!t[n](e[n]))return!1;return e.length===t.length})}function b(e,t){return t<e.params.length?e.params[t]:m(e.params)?q(e.params):null}function x(e,t,n){var r=b(e,t);return(r?n?r.types.filter(_):r.types:[]).map(w)}function w(e){return e.name}function _(e){return null===e.conversion||void 0===e.conversion}function S(e,t){var n=function(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=!0;return Object.keys(t)}(V(e,(function(e){return x(e,t,!1)})));return-1!==n.indexOf("any")?["any"]:n}function O(e,t,n){var r,i,o,a=e||"unnamed",s=n;for(o=0;o<t.length;o++){var u=s.filter((function(e){var n=v(b(e,o));return(o<e.params.length||m(e.params))&&n(t[o])}));if(0===u.length){if((i=S(s,o)).length>0){var l=f(t[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(e){return m(e.params)?1/0:e.params.length}));if(t.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: "+t.length+")")).data={category:"tooFewArgs",fn:a,index:t.length,expected:i},r;var h=Math.max.apply(null,c);return t.length>h?((r=new TypeError("Too many arguments in function "+a+" (expected: "+h+", actual: "+t.length+")")).data={category:"tooManyArgs",fn:a,index:t.length,expectedLength:h},r):((r=new TypeError('Arguments of type "'+t.join(", ")+'" do not match any of the defined signatures of function '+a+".")).data={category:"mismatch",actual:t.map(f)},r)}function N(e){for(var t=999,n=0;n<e.types.length;n++)_(e.types[n])&&(t=Math.min(t,e.types[n].typeIndex));return t}function E(e){for(var t=999,n=0;n<e.types.length;n++)_(e.types[n])||(t=Math.min(t,e.types[n].conversionIndex));return t}function C(e,t){var n;return 0!=(n=e.restParam-t.restParam)||0!=(n=g(e)-g(t))||0!=(n=N(e)-N(t))?n:E(e)-E(t)}function A(e,t){var n,r,i=Math.min(e.params.length,t.params.length);if(0!=(r=e.params.some(g)-t.params.some(g)))return r;for(n=0;n<i;n++)if(0!=(r=g(e.params[n])-g(t.params[n])))return r;for(n=0;n<i;n++)if(0!==(r=C(e.params[n],t.params[n])))return r;return e.params.length-t.params.length}function M(e,t){var n=t;if(e.some(g)){var r=m(e),i=e.map(k);n=function(){for(var e=[],n=r?arguments.length-1:arguments.length,o=0;o<n;o++)e[o]=i[o](arguments[o]);return r&&(e[n]=arguments[n].map(i[n])),t.apply(this,e)}}var o=n;if(m(e)){var a=e.length-1;o=function(){return n.apply(this,z(arguments,0,a).concat([z(arguments,a)]))}}return o}function k(e){var t,n,r,i,o=[],a=[];switch(e.types.forEach((function(e){e.conversion&&(o.push(l(e.conversion.from).test),a.push(e.conversion.convert))})),a.length){case 0:return function(e){return e};case 1:return t=o[0],r=a[0],function(e){return t(e)?r(e):e};case 2:return t=o[0],n=o[1],r=a[0],i=a[1],function(e){return t(e)?r(e):n(e)?i(e):e};default:return function(e){for(var t=0;t<a.length;t++)if(o[t](e))return a[t](e);return e}}}function T(e){var t={};return e.forEach((function(e){e.params.some(g)||D(e.params,!0).forEach((function(n){t[h(n)]=e.fn}))})),t}function D(e,t){return function e(n,r,i){if(r<n.length){var o,a=n[r],s=t?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(e){return[e]}));return V(o,(function(t){return e(n,r+1,i.concat([t]))}))}var l=i.map((function(e,t){return{types:e,restParam:t===n.length-1&&m(n)}}));return[l]}(e,0,[])}function j(e,t){for(var n=Math.max(e.params.length,t.params.length),r=0;r<n;r++)if(!U(x(e,r,!0),x(t,r,!0)))return!1;var i=e.params.length,o=t.params.length,a=m(e.params),s=m(t.params);return a?s?i===o:o>=i:s?i>=o:i===o}function P(e,r){if(0===Object.keys(r).length)throw new SyntaxError("No signatures provided");var i=[];Object.keys(r).map((function(e){return p(e,r[e],u.conversions)})).filter(F).forEach((function(e){var t=W(i,(function(t){return j(t,e)}));if(t)throw new TypeError('Conflicting signatures "'+h(t.params)+'" and "'+h(e.params)+'".');i.push(e)}));var o=V(i,(function(e){return(e?D(e.params,!1):[]).map((function(t){return{params:t,fn:e.fn}}))})).filter(F);o.sort(A);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(e){return y(e.params)})),x=a?v(o[0].params[0]):t,w=s?v(o[1].params[0]):t,_=l?v(o[2].params[0]):t,S=c?v(o[3].params[0]):t,N=f?v(o[4].params[0]):t,E=d?v(o[5].params[0]):t,C=a?v(o[0].params[1]):t,k=s?v(o[1].params[1]):t,P=l?v(o[2].params[1]):t,I=c?v(o[3].params[1]):t,R=f?v(o[4].params[1]):t,L=d?v(o[5].params[1]):t,B=o.map((function(e){return M(e.params,e.fn)})),q=a?B[0]:n,z=s?B[1]:n,H=l?B[2]:n,U=c?B[3]:n,$=f?B[4]:n,Y=d?B[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,ee=g?6:0,te=o.length,ne=function(){for(var t=ee;t<te;t++)if(b[t](arguments))return B[t].apply(this,arguments);throw O(e,arguments,o)},re=function e(t,n){return arguments.length===Z&&x(t)&&C(n)?q.apply(e,arguments):arguments.length===G&&w(t)&&k(n)?z.apply(e,arguments):arguments.length===K&&_(t)&&P(n)?H.apply(e,arguments):arguments.length===X&&S(t)&&I(n)?U.apply(e,arguments):arguments.length===J&&N(t)&&R(n)?$.apply(e,arguments):arguments.length===Q&&E(t)&&L(n)?Y.apply(e,arguments):ne.apply(e,arguments)};try{Object.defineProperty(re,"name",{value:e})}catch(a){}return re.signatures=T(o),re}function I(e){return-1===u.ignore.indexOf(e)}function R(e){return e.trim()}function L(e){return!!e}function F(e){return null!==e}function B(e){return 0===e.types.length}function q(e){return e[e.length-1]}function z(e,t,n){return Array.prototype.slice.call(e,t,n)}function H(e,t){return-1!==e.indexOf(t)}function U(e,t){for(var n=0;n<e.length;n++)if(H(t,e[n]))return!0;return!1}function W(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n]}function V(e,t){return Array.prototype.concat.apply([],e.map(t))}function $(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(("object"==typeof r.signatures||"string"==typeof r.signature)&&""!==r.name)if(""===t)t=r.name;else if(t!==r.name){var i=new Error("Function names do not match (expected: "+t+", actual: "+r.name+")");throw i.data={actual:r.name,expected:t},i}}return t}function Y(e){var t,n={};function r(e,r){if(n.hasOwnProperty(e)&&r!==n[e])throw(t=new Error('Signature "'+e+'" is defined twice')).data={signature:e},t}for(var i=0;i<e.length;i++){var o=e[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(t=new TypeError("Function is no typed-function (index: "+i+")")).data={index:i},t;r(o.signature,o),n[o.signature]=o}}return n}return u=P("typed",{"string, Object":P,Object:function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(e[n]);return P($(t),e)},"...Function":function(e){return P($(e),Y(e))},"string, ...Function":function(e,t){return P(e,Y(t))}}),u.create=r,u.types=i,u.conversions=s,u.ignore=a,u.convert=function(e,t){var n=f(e);if(t===n)return e;for(var r=0;r<u.conversions.length;r++){var i=u.conversions[r];if(i.from===n&&i.to===t)return i.convert(e)}throw new Error("Cannot convert from "+n+" to "+t)},u.find=function(e,t){if(!e.signatures)throw new TypeError("Function is no typed-function");var n;if("string"==typeof t){n=t.split(",");for(var r=0;r<n.length;r++)n[r]=n[r].trim()}else{if(!Array.isArray(t))throw new TypeError("String array or a comma separated string expected");n=t}var i=n.join(","),o=e.signatures[i];if(o)return o;throw new TypeError("Signature not found (signature: "+(e.name||"unnamed")+"("+n.join(", ")+"))")},u.addType=function(e,t){if(!e||"string"!=typeof e.name||"function"!=typeof e.test)throw new TypeError("Object with properties {name: string, test: function} expected");if(!1!==t)for(var n=0;n<u.types.length;n++)if("Object"===u.types[n].name)return void u.types.splice(n,0,e);u.types.push(e)},u.addConversion=function(e){if(!e||"string"!=typeof e.from||"string"!=typeof e.to||"function"!=typeof e.convert)throw new TypeError("Object with properties {from: string, to: string, convert: function} expected");u.conversions.push(e)},u}()})?r.apply(t,[]):r)||(e.exports=i)},function(e,t,n){"use strict";(function(t){var n=256,r=[],i=void 0===t?window:t,o=Math.pow(n,6),a=Math.pow(2,52),s=2*a,u=Math.random;function l(e){var t,r=e.length,i=this,o=0,a=i.i=i.j=0,s=i.S=[];for(r||(e=[r++]);o<n;)s[o]=o++;for(o=0;o<n;o++)s[o]=s[a=255&a+e[o%r]+(t=s[o])],s[a]=t;(i.g=function(e){for(var t,r=0,o=i.i,a=i.j,s=i.S;e--;)t=s[o=255&o+1],r=r*n+s[255&(s[o]=s[a=255&a+t])+(s[a]=t)];return i.i=o,i.j=a,r})(n)}function c(e,t){for(var n,r=e+"",i=0;i<r.length;)t[255&i]=255&(n^=19*t[255&i])+r.charCodeAt(i++);return f(t)}function f(e){return String.fromCharCode.apply(0,e)}e.exports=function(t,u){if(u&&!0===u.global)return u.global=!1,Math.random=e.exports(t,u),u.global=!0,Math.random;var h=[],d=(c(function e(t,n){var r,i=[],o=(typeof t)[0];if(n&&"o"==o)for(r in t)try{i.push(e(t[r],n-1))}catch(e){}return i.length?i:"s"==o?t:t+"\0"}(u&&u.entropy?[t,f(r)]:0 in arguments?t:function(e){try{return i.crypto.getRandomValues(e=new Uint8Array(n)),f(e)}catch(e){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 e=d.g(6),t=o,r=0;e<a;)e=(e+r)*n,t*=n,r=d.g(1);for(;s<=e;)e/=2,t/=2,r>>>=1;return(e+r)/t}},e.exports.resetGlobal=function(){Math.random=u},c(Math.random(),r)}).call(this,n(19))},function(e,t,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,E=c.length-1,C=f.length-1,A={name:"[object Decimal]"};function M(e){var t,n,r,i=e.length-1,o="",a=e[0];if(0<i){for(o+=a,t=1;t<i;t++)r=e[t]+"",(n=N-r.length)&&(o+=U(n)),o+=r;a=e[t],(n=N-(r=a+"").length)&&(o+=U(n))}else if(0===a)return"0";for(;a%10==0;)a/=10;return o+a}function k(e,t,n){if(e!==~~e||e<t||n<e)throw Error(m+e)}function T(e,t,n,r){for(var i,o,a=e[0];10<=a;a/=10)--t;return--t<0?(t+=N,i=0):(i=Math.ceil((t+1)/N),t%=N),a=b(10,N-t),o=e[i]%a|0,null==r?t<3?(0==t?o=o/100|0:1==t&&(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)&&(e[i+1]/a/100|0)==b(10,t-2)-1||(o==a/2||0==o)&&0==(e[i+1]/a/100|0):t<4?(0==t?o=o/1e3|0:1==t?o=o/100|0:2==t&&(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)&&(e[i+1]/a/1e3|0)==b(10,t-3)-1}function D(e,t,n){for(var r,i,o=[0],a=0,s=e.length;a<s;){for(i=o.length;i--;)o[i]*=t;for(o[0]+=l.indexOf(e.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()}A.absoluteValue=A.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),L(e)},A.ceil=function(){return L(new this.constructor(this),this.e+1,2)},A.comparedTo=A.cmp=function(e){var t,n,r,i,o=this,a=o.d,s=(e=new o.constructor(e)).d,u=o.s,l=e.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!==e.e)return o.e>e.e^u<0?1:-1;for(t=0,n=(r=a.length)<(i=s.length)?r:i;t<n;++t)if(a[t]!==s[t])return a[t]>s[t]^u<0?1:-1;return r===i?0:i<r^u<0?1:-1},A.cosine=A.cos=function(){var e,t,n=this,r=n.constructor;return n.d?n.d[0]?(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+N,r.rounding=1,n=function(e,t){var n,r,i=t.d.length;r=i<32?(1/J(4,n=Math.ceil(i/3))).toString():(n=16,"2.3283064365386962890625e-10"),e.precision+=n,t=X(e,1,t.times(r),new e(1));for(var o=n;o--;){var a=t.times(t);t=a.times(a).minus(a).times(8).plus(1)}return e.precision-=n,t}(r,Q(r,n)),r.precision=e,r.rounding=t,L(2==a||3==a?n.neg():n,e,t,!0)):new r(1):new r(NaN)},A.cubeRoot=A.cbrt=function(){var e,t,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=M(c.d),(o=((e=c.e)-n.length+1)%3)&&(n+=1==o||-2==o?"0":"00"),o=b(n,1/3),e=y((e+1)/3)-(e%3==(e<0?-1:2)),(r=new f(n=o==1/0?"5e"+e:(n=o.toExponential()).slice(0,n.indexOf("e")+1)+e)).s=c.s),a=(e=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),M(s.d).slice(0,a)===(n=M(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,e+1,1),t=!r.times(r).times(r).eq(c));break}if(!i&&(L(s,e+1,0),s.times(s).times(s).eq(c))){r=s;break}a+=4,i=1}return d=!0,L(r,e,f.rounding,t)},A.decimalPlaces=A.dp=function(){var e,t=this.d,n=NaN;if(t){if(n=((e=t.length-1)-y(this.e/N))*N,e=t[e])for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n},A.dividedBy=A.div=function(e){return j(this,new this.constructor(e))},A.dividedToIntegerBy=A.divToInt=function(e){var t=this.constructor;return L(j(this,new t(e),0,1,1),t.precision,t.rounding)},A.equals=A.eq=function(e){return 0===this.cmp(e)},A.floor=function(){return L(new this.constructor(this),this.e+1,3)},A.greaterThan=A.gt=function(e){return 0<this.cmp(e)},A.greaterThanOrEqualTo=A.gte=function(e){var t=this.cmp(e);return 1==t||0===t},A.hyperbolicCosine=A.cosh=function(){var e,t,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,t=(i=o.d.length)<32?(1/J(4,e=Math.ceil(i/3))).toString():(e=16,"2.3283064365386962890625e-10"),o=X(a,1,o.times(t),new a(1),!0);for(var u,l=e,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)},A.hyperbolicSine=A.sinh=function(){var e,t,n,r,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,n=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,(r=i.d.length)<3)i=X(o,2,i,i,!0);else{e=16<(e=1.4*Math.sqrt(r))?16:0|e,i=X(o,2,i=i.times(1/J(5,e)),i,!0);for(var a,s=new o(5),u=new o(16),l=new o(20);e--;)a=i.times(i),i=i.times(s.plus(a.times(u.times(a).plus(l))))}return L(i,o.precision=t,o.rounding=n,!0)},A.hyperbolicTangent=A.tanh=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+7,r.rounding=1,j(n.sinh(),n.cosh(),r.precision=e,r.rounding=t)):new r(n.s)},A.inverseCosine=A.acos=function(){var e,t=this,n=t.constructor,r=t.abs().cmp(1),i=n.precision,o=n.rounding;return-1!==r?0===r?t.isNeg()?z(n,i,o):new n(0):new n(NaN):t.isZero()?z(n,i+4,o).times(.5):(n.precision=i+6,n.rounding=1,t=t.asin(),e=z(n,i+4,o).times(.5),n.precision=i,n.rounding=o,e.minus(t))},A.inverseHyperbolicCosine=A.acosh=function(){var e,t,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:NaN):n.isFinite()?(e=r.precision,t=r.rounding,r.precision=e+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=e,r.rounding=t,n.ln()):new r(n)},A.inverseHyperbolicSine=A.asinh=function(){var e,t,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+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=e,r.rounding=t,n.ln())},A.inverseHyperbolicTangent=A.atanh=function(){var e,t,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):(e=o.precision,t=o.rounding,r=i.sd(),Math.max(r,e)<2*-i.e-1?L(new o(i),e,t,!0):(o.precision=n=r-i.e,i=j(i.plus(1),new o(1).minus(i),n+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)},A.inverseSine=A.asin=function(){var e,t,n,r,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),n=o.precision,r=o.rounding,-1!==t?0===t?((e=z(o,n+4,r).times(.5)).s=i.s,e):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)))},A.inverseTangent=A.atan=function(){var e,t,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<=C)return(a=z(c,f+4,h).times(.25)).s=l.s,a}else{if(!l.s)return new c(NaN);if(f+4<=C)return(a=z(c,f+4,h).times(.5)).s=l.s,a}for(c.precision=s=f+10,c.rounding=1,e=n=Math.min(28,s/N+2|0);e;--e)l=l.div(l.times(l).plus(1).sqrt().plus(1));for(d=!1,t=Math.ceil(s/N),r=1,u=l.times(l),a=new c(l),i=l;-1!==e;)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[t])for(e=t;a.d[e]===o.d[e]&&e--;);return n&&(a=a.times(2<<n-1)),d=!0,L(a,c.precision=f,c.rounding=h,!0)},A.isFinite=function(){return!!this.d},A.isInteger=A.isInt=function(){return!!this.d&&y(this.e/N)>this.d.length-2},A.isNaN=function(){return!this.s},A.isNegative=A.isNeg=function(){return this.s<0},A.isPositive=A.isPos=function(){return 0<this.s},A.isZero=function(){return!!this.d&&0===this.d[0]},A.lessThan=A.lt=function(e){return this.cmp(e)<0},A.lessThanOrEqualTo=A.lte=function(e){return this.cmp(e)<1},A.logarithm=A.log=function(e){var t,n,r,i,o,a,s,u,l=this,c=l.constructor,f=c.precision,h=c.rounding;if(null==e)e=new c(10),t=!0;else{if(n=(e=new c(e)).d,e.s<0||!n||!n[0]||e.eq(1))return new c(NaN);t=e.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(t)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=t?q(c,s+10):Z(e,s),T((u=j(a,r,s,1)).d,i=f,h))do{if(a=Z(l,s+=10),r=t?q(c,s+10):Z(e,s),u=j(a,r,s,1),!o){+M(u.d).slice(i+1,i+15)+1==1e14&&(u=L(u,f+1,0));break}}while(T(u.d,i+=10,h));return d=!0,L(u,f,h)},A.minus=A.sub=function(e){var t,n,r,i,o,a,s,u,l,c,f,h,p=this,m=p.constructor;if(e=new m(e),!p.d||!e.d)return p.s&&e.s?p.d?e.s=-e.s:e=new m(e.d||p.s!==e.s?p:NaN):e=new m(NaN),e;if(p.s!=e.s)return e.s=-e.s,p.plus(e);if(l=p.d,h=e.d,s=m.precision,u=m.rounding,!l[0]||!h[0]){if(h[0])e.s=-e.s;else{if(!l[0])return new m(3===u?-0:0);e=new m(p)}return d?L(e,s,u):e}if(n=y(e.e/N),c=y(p.e/N),l=l.slice(),o=c-n){for(a=(f=o<0)?(t=l,o=-o,h.length):(t=h,n=c,l.length),(r=Math.max(Math.ceil(s/N),a)+2)<o&&(o=r,t.length=1),t.reverse(),r=o;r--;)t.push(0);t.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&&(t=l,l=h,h=t,e.s=-e.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]?(e.d=l,e.e=B(l,n),d?L(e,s,u):e):new m(3===u?-0:0)},A.modulo=A.mod=function(e){var t,n=this,r=n.constructor;return e=new r(e),!n.d||!e.s||e.d&&!e.d[0]?new r(NaN):!e.d||n.d&&!n.d[0]?L(new r(n),r.precision,r.rounding):(d=!1,9==r.modulo?(t=j(n,e.abs(),0,3,1)).s*=e.s:t=j(n,e,0,r.modulo,1),t=t.times(e),d=!0,n.minus(t))},A.naturalExponential=A.exp=function(){return Y(this)},A.naturalLogarithm=A.ln=function(){return Z(this)},A.negated=A.neg=function(){var e=new this.constructor(this);return e.s=-e.s,L(e)},A.plus=A.add=function(e){var t,n,r,i,o,a,s,u,l,c,f=this,h=f.constructor;if(e=new h(e),!f.d||!e.d)return f.s&&e.s?f.d||(e=new h(e.d||f.s===e.s?f:NaN)):e=new h(NaN),e;if(f.s!=e.s)return e.s=-e.s,f.minus(e);if(l=f.d,c=e.d,s=h.precision,u=h.rounding,!l[0]||!c[0])return c[0]||(e=new h(f)),d?L(e,s,u):e;if(o=y(f.e/N),r=y(e.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),t=0;i;)t=(l[--i]=l[i]+c[i]+t)/O|0,l[i]%=O;for(t&&(l.unshift(t),++r),a=l.length;0==l[--a];)l.pop();return e.d=l,e.e=B(l,r),d?L(e,s,u):e},A.precision=A.sd=function(e){var t;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(m+e);return this.d?(t=H(this.d),e&&this.e+1>t&&(t=this.e+1)):t=NaN,t},A.round=function(){var e=this.constructor;return L(new e(this),this.e+1,e.rounding)},A.sine=A.sin=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+N,r.rounding=1,n=function(e,t){var n,r=t.d.length;if(r<3)return X(e,2,t,t);n=16<(n=1.4*Math.sqrt(r))?16:0|n,t=X(e,2,t=t.times(1/J(5,n)),t);for(var i,o=new e(5),a=new e(16),s=new e(20);n--;)i=t.times(t),t=t.times(o.plus(i.times(a.times(i).minus(s))));return t}(r,Q(r,n)),r.precision=e,r.rounding=t,L(2<a?n.neg():n,e,t,!0)):new r(NaN)},A.squareRoot=A.sqrt=function(){var e,t,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?(((t=M(s)).length+u)%2==0&&(t+="0"),l=Math.sqrt(t),u=y((u+1)/2)-(u<0||u%2),new c(t=l==1/0?"1e"+u:(t=l.toExponential()).slice(0,t.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),M(o.d).slice(0,n)===(t=M(r.d)).slice(0,n)){if("9999"!=(t=t.slice(n-3,n+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(L(r,u+1,1),e=!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,e)},A.tangent=A.tan=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+10,r.rounding=1,(n=n.sin()).s=1,n=j(n,new r(1).minus(n.times(n)).sqrt(),e+10,0),r.precision=e,r.rounding=t,L(2==a||4==a?n.neg():n,e,t,!0)):new r(NaN)},A.times=A.mul=function(e){var t,n,r,i,o,a,s,u,l,c=this.constructor,f=this.d,h=(e=new c(e)).d;if(e.s*=this.s,!(f&&f[0]&&h&&h[0]))return new c(!e.s||f&&!f[0]&&!h||h&&!h[0]&&!f?NaN:f&&h?0*e.s:e.s/0);for(n=y(this.e/N)+y(e.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(t=0,i=u+r;r<i;)s=o[i]+h[r]*f[i-r-1]+t,o[i--]=s%O|0,t=s/O|0;o[i]=(o[i]+t)%O|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=B(o,n),d?L(e,c.precision,c.rounding):e},A.toBinary=function(e,t){return ee(this,2,e,t)},A.toDecimalPlaces=A.toDP=function(e,t){var n=this.constructor,r=new n(this);return void 0===e?r:(k(e,0,u),void 0===t?t=n.rounding:k(t,0,8),L(r,e+r.e+1,t))},A.toExponential=function(e,t){var n=this,r=n.constructor,i=void 0===e?F(n,!0):(k(e,0,u),void 0===t?t=r.rounding:k(t,0,8),F(n=L(new r(n),e+1,t),!0,e+1));return n.isNeg()&&!n.isZero()?"-"+i:i},A.toFixed=function(e,t){var n,r=this,i=r.constructor,o=void 0===e?F(r):(k(e,0,u),void 0===t?t=i.rounding:k(t,0,8),F(n=L(new i(r),e+r.e+1,t),!1,e+n.e+1));return r.isNeg()&&!r.isZero()?"-"+o:o},A.toFraction=function(e){var t,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=(t=new v(r)).e=H(g)-p.e-1)%N,t.d[0]=b(10,a<0?N+a:a),null==e)e=0<o?t:l;else{if(!(s=new v(e)).isInt()||s.lt(l))throw Error(m+s);e=s.gt(t)?0<o?t:l:s}for(d=!1,s=new v(M(g)),c=v.precision,v.precision=o=g.length*N*2;f=j(s,t,0,1,1),1!=(i=n.plus(f.times(r))).cmp(e);)n=r,r=i,i=l,l=u.plus(f.times(i)),u=i,i=t,t=s.minus(f.times(i)),s=i;return i=j(e.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},A.toHexadecimal=A.toHex=function(e,t){return ee(this,16,e,t)},A.toNearest=function(e,t){var n=(r=this).constructor,r=new n(r);if(null==e){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),void 0===t?t=n.rounding:k(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(d=!1,r=j(r,e,0,t,1).times(e),d=!0,L(r)):(e.s=r.s,r=e),r},A.toNumber=function(){return+this},A.toOctal=function(e,t){return ee(this,8,e,t)},A.toPower=A.pow=function(e){var t,n,r,i,o,a,s=this,u=s.constructor,l=+(e=new u(e));if(!(s.d&&e.d&&s.d[0]&&e.d[0]))return new u(b(+s,l));if((s=new u(s)).eq(1))return s;if(r=u.precision,o=u.rounding,e.eq(1))return L(s,r,o);if((t=y(e.e/N))>=e.d.length-1&&(n=l<0?-l:l)<=9007199254740991)return i=W(u,s,n,r),e.s<0?new u(1).div(i):L(i,r,o);if((a=s.s)<0){if(t<e.d.length-1)return new u(NaN);if(0==(1&e.d[t])&&(a=1),0==s.e&&1==s.d[0]&&1==s.d.length)return s.s=a,s}return(t=0!=(n=b(+s,l))&&isFinite(n)?new u(n+"").e:y(l*(Math.log("0."+M(s.d))/Math.LN10+s.e+1)))>u.maxE+1||t<u.minE-1?new u(0<t?a/0:0):(d=!1,u.rounding=s.s=1,n=Math.min(12,(t+"").length),(i=Y(e.times(Z(s,r+n)),r)).d&&T((i=L(i,r+5,1)).d,r,o)&&(t=r+10,+M((i=L(Y(e.times(Z(s,t+n)),t),t+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))},A.toPrecision=function(e,t){var n=this,r=n.constructor,i=void 0===e?F(n,n.e<=r.toExpNeg||n.e>=r.toExpPos):(k(e,1,u),void 0===t?t=r.rounding:k(t,0,8),F(n=L(new r(n),e,t),e<=n.e||n.e<=r.toExpNeg,e));return n.isNeg()&&!n.isZero()?"-"+i:i},A.toSignificantDigits=A.toSD=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(k(e,1,u),void 0===t?t=n.rounding:k(t,0,8)),L(new n(this),e,t)},A.toString=function(){var e=this,t=e.constructor,n=F(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+n:n},A.truncated=A.trunc=function(){return L(new this.constructor(this),this.e+1,1)},A.valueOf=A.toJSON=function(){var e=this,t=e.constructor,n=F(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+n:n};var j=function(e,t,n,r,i,a){var s,u,l,c,f,h,d,p,m,g,v,b,x,w,_,S,E,C,A,M,k=e.constructor,T=e.s==t.s?1:-1,D=e.d,j=t.d;if(!(D&&D[0]&&j&&j[0]))return new k(e.s&&t.s&&(D?!j||D[0]!=j[0]:j)?D&&0==D[0]||!j?0*T:T/0:NaN);for(u=a?(f=1,e.e-t.e):(a=O,f=N,y(e.e/f)-y(t.e/f)),A=j.length,E=D.length,g=(m=new k(T)).d=[],l=0;j[l]==(D[l]||0);l++);if(j[l]>(D[l]||0)&&u--,null==n?(w=n=k.precision,r=k.rounding):w=i?n+(e.e-t.e)+1:n,w<0)g.push(1),h=!0;else{if(w=w/f+2|0,l=0,1==A){for(j=j[c=0],w++;(l<E||c)&&w--;l++)_=c*a+(D[l]||0),g[l]=_/j|0,c=_%j|0;h=c||l<E}else{for(1<(c=a/(j[0]+1)|0)&&(j=P(j,c,a),D=P(D,c,a),A=j.length,E=D.length),S=A,b=(v=D.slice(0,A)).length;b<A;)v[b++]=0;for((M=j.slice()).unshift(0),C=j[0],j[1]>=a/2&&++C;c=0,(s=I(j,v,A,b))<0?(x=v[0],A!=b&&(x=x*a+(v[1]||0)),1<(c=x/C|0)?(a<=c&&(c=a-1),1==(s=I(d=P(j,c,a),v,p=d.length,b=v.length))&&(c--,R(d,A<p?M: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,A,b=v.length))<1&&(c++,R(v,A<b?M:j,b,a)),b=v.length):0===s&&(c++,v=[0]),g[l++]=c,s&&v[0]?v[b++]=D[S]||0:(v=[D[S]],b=1),(S++<E||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(e,t,n){var r,i=0,o=e.length;for(e=e.slice();o--;)r=e[o]*t+i,e[o]=r%n|0,i=r/n|0;return i&&e.unshift(i),e}function I(e,t,n,r){var i,o;if(n!=r)o=r<n?1:-1;else for(i=o=0;i<n;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function R(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]<t[n]?1:0,e[n]=i*r+e[n]-t[n];for(;!e[0]&&1<e.length;)e.shift()}function L(e,t,n,r){var i,o,a,s,u,l,c,f,h,p=e.constructor;e:if(null!=t){if(!(f=e.d))return e;for(i=1,s=f[0];10<=s;s/=10)i++;if((o=t-i)<0)o+=N,a=t,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 e;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||t<0||void 0!==f[h+1]||(a<0?c:c%b(10,i-a-1)),l=n<4?(u||r)&&(0==n||n==(e.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==(e.s<0?8:7)),t<1||!f[0])return f.length=0,l?(t-=e.e+1,f[0]=b(10,(N-t%N)%N),e.e=-t||0):f[0]=e.e=0,e;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&&(e.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&&(e.e>p.maxE?(e.d=null,e.e=NaN):e.e<p.minE&&(e.e=0,e.d=[0])),e}function F(e,t,n){if(!e.isFinite())return G(e);var r,i=e.e,o=M(e.d),a=o.length;return t?(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+(e.e<0?"e":"e+")+e.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 B(e,t){var n=e[0];for(t*=N;10<=n;n/=10)t++;return t}function q(e,t,n){if(E<t)throw d=!0,n&&(e.precision=n),Error(g);return L(new e(c),t,1,!0)}function z(e,t,n){if(C<t)throw Error(g);return L(new e(f),t,n,!0)}function H(e){var t=e.length-1,n=t*N+1;if(t=e[t]){for(;t%10==0;t/=10)n--;for(t=e[0];10<=t;t/=10)n++}return n}function U(e){for(var t="";e--;)t+="0";return t}function W(e,t,n,r){var i,o=new e(1),a=Math.ceil(r/N+4);for(d=!1;;){if(n%2&&te((o=o.times(t)).d,a)&&(i=!0),0===(n=y(n/2))){n=o.d.length-1,i&&0===o.d[n]&&++o.d[n];break}te((t=t.times(t)).d,a)}return d=!0,o}function V(e){return 1&e.d[e.d.length-1]}function $(e,t,n){for(var r,i=new e(t[0]),o=0;++o<t.length;){if(!(r=new e(t[o])).s){i=r;break}i[n](r)&&(i=r)}return i}function Y(e,t){var n,r,i,o,a,s,u,l=0,c=0,f=0,h=e.constructor,p=h.rounding,m=h.precision;if(!e.d||!e.d[0]||17<e.e)return new h(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(u=null==t?(d=!1,m):t,s=new h(.03125);-2<e.e;)e=e.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(e),u,1),n=n.times(++c),M((s=a.plus(j(o,n,u,1))).d).slice(0,u)===M(a.d).slice(0,u)){for(i=f;i--;)a=L(a.times(a),u,1);if(null!=t)return h.precision=m,a;if(!(l<3&&T(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(e,t){var n,r,i,o,a,s,u,l,c,f,h,p=1,m=e,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==t?(d=!1,b):t,v.precision=c+=10,r=(n=M(g)).charAt(0),!(Math.abs(o=m.e)<15e14))return l=q(v,c+2,b).times(o+""),m=Z(new v(r+"."+n.slice(1)),c-10).plus(l),v.precision=b,null==t?L(m,b,y,d=!0):m;for(;r<7&&1!=r||1==r&&3<n.charAt(1);)r=(n=M((m=m.times(e)).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),M((l=u.plus(j(a,new v(i),c,1))).d).slice(0,c)===M(u.d).slice(0,c)){if(u=u.times(2),0!==o&&(u=u.plus(q(v,c+2,b).times(o+""))),u=j(u,new v(p),c,1),null!=t)return v.precision=b,u;if(!T(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(e){return String(e.s*e.s/0)}function K(e,t){var n,r,i;for(-1<(n=t.indexOf("."))&&(t=t.replace(".","")),0<(r=t.search(/e/i))?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);r++);for(i=t.length;48===t.charCodeAt(i-1);--i);if(t=t.slice(r,i)){if(i-=r,e.e=n=n-r-1,e.d=[],r=(n+1)%N,n<0&&(r+=N),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=N;r<i;)e.d.push(+t.slice(r,r+=N));t=t.slice(r),r=N-t.length}else r-=i;for(;r--;)t+="0";e.d.push(+t),d&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function X(e,t,n,r,i){var o,a,s,u,l=e.precision,c=Math.ceil(l/N);for(d=!1,u=n.times(n),s=new e(r);;){if(a=j(s.times(u),new e(t++*t++),l,1),s=i?r.plus(a):r.minus(a),r=j(a.times(u),new e(t++*t++),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(e,t){for(var n=e;--t;)n*=e;return n}function Q(e,t){var n,r=t.s<0,i=z(e,e.precision,1),o=i.times(.5);if((t=t.abs()).lte(o))return a=r?4:1,t;if((n=t.divToInt(i)).isZero())a=r?3:2;else{if((t=t.minus(n.times(i))).lte(o))return a=V(n)?r?2:3:r?4:1,t;a=V(n)?r?1:4:r?3:2}return t.minus(i).abs()}function ee(e,t,n,r){var i,a,s,c,f,h,d,p,m,g=e.constructor,v=void 0!==n;if(v?(k(n,1,u),void 0===r?r=g.rounding:k(r,0,8)):(n=g.precision,r=g.rounding),e.isFinite()){for(v?(i=2,16==t?n=4*n-3:8==t&&(n=3*n-2)):i=t,0<=(s=(d=F(e)).indexOf("."))&&(d=d.replace(".",""),(m=new g(1)).e=d.length-s,m.d=D(F(m),10,i),m.e=m.d.length),a=f=(p=D(d,10,i)).length;0==p[--f];)p.pop();if(p[0]){if(s<0?a--:((e=new g(e)).d=p,e.e=a,p=(e=j(e,m,n,r,0,i)).d,a=e.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===(e.s<0?3:2)):c<s||s===c&&(4===r||h||6===r&&1&p[n-1]||r===(e.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==t||8==t){for(s=16==t?4:3,--f;f%s;f++)d+="0";for(f=(p=D(d,i,t)).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==t?"0x":2==t?"0b":8==t?"0o":"")+d}else d=G(e);return e.s<0?"-"+d:d}function te(e,t){return e.length>t&&(e.length=t,1)}function ne(e){return new this(e).abs()}function re(e){return new this(e).acos()}function ie(e){return new this(e).acosh()}function oe(e,t){return new this(e).plus(t)}function ae(e){return new this(e).asin()}function se(e){return new this(e).asinh()}function ue(e){return new this(e).atan()}function le(e){return new this(e).atanh()}function ce(e,t){e=new this(e),t=new this(t);var n,r=this.precision,i=this.rounding,o=r+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(n=t.s<0?z(this,r,i):new this(0)).s=e.s:!e.d||t.isZero()?(n=z(this,o,1).times(.5)).s=e.s:n=t.s<0?(this.precision=o,this.rounding=1,n=this.atan(j(e,t,o,1)),t=z(this,o,1),this.precision=r,this.rounding=i,e.s<0?n.minus(t):n.plus(t)):this.atan(j(e,t,o,1)):(n=z(this,o,1).times(0<t.s?.25:.75)).s=e.s:n=new this(NaN),n}function fe(e){return new this(e).cbrt()}function he(e){return L(e=new this(e),e.e+1,2)}function de(e){if(!e||"object"!=typeof e)throw Error(p+"Object expected");for(var t,n,r=!0===e.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(t=i[o],r&&(this[t]=h[t]),void 0!==(n=e[t])){if(!(y(n)===n&&i[o+1]<=n&&n<=i[o+2]))throw Error(m+t+": "+n);this[t]=n}if(t="crypto",r&&(this[t]=h[t]),void 0!==(n=e[t])){if(!0!==n&&!1!==n&&0!==n&&1!==n)throw Error(m+t+": "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(v);this[t]=!0}else this[t]=!1}return this}function pe(e){return new this(e).cos()}function me(e){return new this(e).cosh()}function ge(e,t){return new this(e).div(t)}function ve(e){return new this(e).exp()}function ye(e){return L(e=new this(e),e.e+1,3)}function be(){var e,t,n=new this(0);for(d=!1,e=0;e<arguments.length;)if((t=new this(arguments[e++])).d)n.d&&(n=n.plus(t.times(t)));else{if(t.s)return d=!0,new this(1/0);n=t}return d=!0,n.sqrt()}function xe(e){return e instanceof i||e&&"[object Decimal]"===e.name||!1}function we(e){return new this(e).ln()}function _e(e,t){return new this(e).log(t)}function Se(e){return new this(e).log(2)}function Oe(e){return new this(e).log(10)}function Ne(){return $(this,arguments,"lt")}function Ee(){return $(this,arguments,"gt")}function Ce(e,t){return new this(e).mod(t)}function Ae(e,t){return new this(e).mul(t)}function Me(e,t){return new this(e).pow(t)}function ke(e){var t,n,r,i,o=0,a=new this(1),s=[];if(void 0===e?e=this.precision:k(e,1,u),r=Math.ceil(e/N),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(r));o<r;)429e7<=(i=t[o])?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:s[o++]=i%1e7;else{if(!crypto.randomBytes)throw Error(v);for(t=crypto.randomBytes(r*=4);o<r;)214e7<=(i=t[o]+(t[o+1]<<8)+(t[o+2]<<16)+((127&t[o+3])<<24))?crypto.randomBytes(4).copy(t,o):(s.push(i%1e7),o+=4);o=r/4}else for(;o<r;)s[o++]=1e7*Math.random()|0;for(r=s[--o],e%=N,r&&e&&(i=b(10,N-e),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 Te(e){return L(e=new this(e),e.e+1,this.rounding)}function De(e){return(e=new this(e)).d?e.d[0]?e.s:0*e.s:e.s||NaN}function je(e){return new this(e).sin()}function Pe(e){return new this(e).sinh()}function Ie(e){return new this(e).sqrt()}function Re(e,t){return new this(e).sub(t)}function Le(e){return new this(e).tan()}function Fe(e){return new this(e).tanh()}function Be(e){return L(e=new this(e),e.e+1,1)}(i=function e(t){var n,r,o;function a(e){var t,n,r,o=this;if(!(o instanceof a))return new a(e);if(e instanceof(o.constructor=a))return o.s=e.s,void(d?!e.d||e.e>a.maxE?(o.e=NaN,o.d=null):e.e<a.minE?(o.e=0,o.d=[0]):(o.e=e.e,o.d=e.d.slice()):(o.e=e.e,o.d=e.d?e.d.slice():e.d));if("number"==(r=typeof e)){if(0===e)return o.s=1/e<0?-1:1,o.e=0,void(o.d=[0]);if(e<0?(e=-e,o.s=-1):o.s=1,e===~~e&&e<1e7){for(t=0,n=e;10<=n;n/=10)t++;return void(d?a.maxE<t?(o.e=NaN,o.d=null):t<a.minE?(o.e=0,o.d=[0]):(o.e=t,o.d=[e]):(o.e=t,o.d=[e]))}return 0*e!=0?(e||(o.s=NaN),o.e=NaN,void(o.d=null)):K(o,e.toString())}if("string"!=r)throw Error(m+e);return 45===(n=e.charCodeAt(0))?(e=e.slice(1),o.s=-1):(43===n&&(e=e.slice(1)),o.s=1),(S.test(e)?K:function(e,t){var n,r,o,a,s,u,l,c,f;if("Infinity"===t||"NaN"===t)return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(w.test(t))n=16,t=t.toLowerCase();else if(x.test(t))n=2;else{if(!_.test(t))throw Error(m+t);n=8}for(s=0<=(a=(t=0<(a=t.search(/p/i))?(l=+t.slice(a+1),t.substring(2,a)):t.slice(2)).indexOf(".")),r=e.constructor,s&&(a=(u=(t=t.replace(".","")).length)-a,o=W(r,new r(n),a,2*a)),a=f=(c=D(t,n,O)).length-1;0===c[a];--a)c.pop();return a<0?new r(0*e.s):(e.e=B(c,f),e.d=c,d=!1,s&&(e=j(e,o,4*u)),l&&(e=e.times(Math.abs(l)<54?b(2,l):i.pow(2,l))),d=!0,e)})(o,e)}if(a.prototype=A,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=de,a.clone=e,a.isDecimal=xe,a.abs=ne,a.acos=re,a.acosh=ie,a.add=oe,a.asin=ae,a.asinh=se,a.atan=ue,a.atanh=le,a.atan2=ce,a.cbrt=fe,a.ceil=he,a.cos=pe,a.cosh=me,a.div=ge,a.exp=ve,a.floor=ye,a.hypot=be,a.ln=we,a.log=_e,a.log10=Oe,a.log2=Se,a.max=Ne,a.min=Ee,a.mod=Ce,a.mul=Ae,a.pow=Me,a.random=ke,a.round=Te,a.sign=De,a.sin=je,a.sinh=Pe,a.sqrt=Ie,a.sub=Re,a.tan=Le,a.tanh=Fe,a.trunc=Be,void 0===t&&(t={}),t&&!0!==t.defaults)for(o=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],n=0;n<o.length;)t.hasOwnProperty(r=o[n++])||(t[r]=this[r]);return a.config(t),a}(h)).default=i.Decimal=i,c=new i(c),f=new i(f),void 0===(r=function(){return i}.call(t,n,t,e))||(e.exports=r)}()},function(e,t,n){"use strict";function r(e,t){return i({},e,t)}var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o={"{":"\\{","}":"\\}","\\":"\\textbackslash{}","#":"\\#",$:"\\$","%":"\\%","&":"\\&","^":"\\textasciicircum{}",_:"\\_","~":"\\textasciitilde{}"},a={"–":"\\--","—":"\\---"," ":"~","\t":"\\qquad{}","\r\n":"\\newline{}","\n":"\\newline{}"};e.exports=function(e){for(var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=t.preserveFormatting,s=void 0!==n&&n,u=t.escapeMapFn,l=void 0===u?r:u,c=String(e),f="",h=l(i({},o),s?i({},a):{}),d=Object.keys(h);c;)!function(){var e=!1;d.forEach((function(t,n){e||c.length>=t.length&&c.slice(0,t.length)===t&&(f+=h[d[n]],c=c.slice(t.length,c.length),e=!0)})),e||(f+=c.slice(0,1),c=c.slice(1,c.length))}();return f}},function(e,t){function n(){}n.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function i(){r.off(e,i),t.apply(n,arguments)}return i._=t,this.on(e,i,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,i=n.length;r<i;r++)n[r].fn.apply(n[r].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),r=n[e],i=[];if(r&&t)for(var o=0,a=r.length;o<a;o++)r[o].fn!==t&&r[o].fn._!==t&&i.push(r[o]);return i.length?n[e]=i:delete n[e],this}},e.exports=n,e.exports.TinyEmitter=n},function(e,t,n){var r=n(20),i=(0,n(21).create)(r);e.exports=i},function(e,t){var n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";n.r(t),n.d(t,"createTyped",(function(){return l})),n.d(t,"createResultSet",(function(){return d})),n.d(t,"createBigNumberClass",(function(){return g})),n.d(t,"createComplexClass",(function(){return x})),n.d(t,"createFractionClass",(function(){return S})),n.d(t,"createRangeClass",(function(){return O})),n.d(t,"createMatrixClass",(function(){return N})),n.d(t,"createDenseMatrixClass",(function(){return k})),n.d(t,"createClone",(function(){return T})),n.d(t,"createIsInteger",(function(){return q})),n.d(t,"createIsNegative",(function(){return $})),n.d(t,"createIsNumeric",(function(){return Z})),n.d(t,"createHasNumericValue",(function(){return K})),n.d(t,"createIsPositive",(function(){return J})),n.d(t,"createIsZero",(function(){return Q})),n.d(t,"createIsNaN",(function(){return ee})),n.d(t,"createTypeOf",(function(){return te})),n.d(t,"createEqualScalar",(function(){return ie})),n.d(t,"createSparseMatrixClass",(function(){return ae})),n.d(t,"createNumber",(function(){return se})),n.d(t,"createString",(function(){return ue})),n.d(t,"createBoolean",(function(){return ce})),n.d(t,"createBignumber",(function(){return fe})),n.d(t,"createComplex",(function(){return he})),n.d(t,"createFraction",(function(){return de})),n.d(t,"createMatrix",(function(){return pe})),n.d(t,"createSplitUnit",(function(){return ge})),n.d(t,"createUnaryMinus",(function(){return He})),n.d(t,"createUnaryPlus",(function(){return We})),n.d(t,"createAbs",(function(){return Ve})),n.d(t,"createApply",(function(){return $e})),n.d(t,"createAddScalar",(function(){return Ge})),n.d(t,"createCbrt",(function(){return Ke})),n.d(t,"createCeil",(function(){return Xe})),n.d(t,"createCube",(function(){return Je})),n.d(t,"createExp",(function(){return Qe})),n.d(t,"createExpm1",(function(){return et})),n.d(t,"createFix",(function(){return tt})),n.d(t,"createFloor",(function(){return nt})),n.d(t,"createGcd",(function(){return ut})),n.d(t,"createLcm",(function(){return ht})),n.d(t,"createLog10",(function(){return dt})),n.d(t,"createLog2",(function(){return pt})),n.d(t,"createMod",(function(){return yt})),n.d(t,"createMultiplyScalar",(function(){return bt})),n.d(t,"createMultiply",(function(){return wt})),n.d(t,"createNthRoot",(function(){return St})),n.d(t,"createSign",(function(){return Ot})),n.d(t,"createSqrt",(function(){return Nt})),n.d(t,"createSquare",(function(){return Et})),n.d(t,"createSubtract",(function(){return At})),n.d(t,"createXgcd",(function(){return kt})),n.d(t,"createDotMultiply",(function(){return jt})),n.d(t,"createBitAnd",(function(){return Kt})),n.d(t,"createBitNot",(function(){return Xt})),n.d(t,"createBitOr",(function(){return Jt})),n.d(t,"createBitXor",(function(){return en})),n.d(t,"createArg",(function(){return tn})),n.d(t,"createConj",(function(){return nn})),n.d(t,"createIm",(function(){return rn})),n.d(t,"createRe",(function(){return on})),n.d(t,"createNot",(function(){return cn})),n.d(t,"createOr",(function(){return fn})),n.d(t,"createXor",(function(){return hn})),n.d(t,"createConcat",(function(){return dn})),n.d(t,"createColumn",(function(){return pn})),n.d(t,"createCross",(function(){return mn})),n.d(t,"createDiag",(function(){return gn})),n.d(t,"createFilter",(function(){return xn})),n.d(t,"createFlatten",(function(){return Sn})),n.d(t,"createForEach",(function(){return Nn})),n.d(t,"createGetMatrixDataType",(function(){return An})),n.d(t,"createIdentity",(function(){return kn})),n.d(t,"createKron",(function(){return Tn})),n.d(t,"createMap",(function(){return Dn})),n.d(t,"createOnes",(function(){return Pn})),n.d(t,"createRange",(function(){return Fn})),n.d(t,"createReshape",(function(){return qn})),n.d(t,"createResize",(function(){return Hn})),n.d(t,"createRow",(function(){return Un})),n.d(t,"createSize",(function(){return Wn})),n.d(t,"createSqueeze",(function(){return $n})),n.d(t,"createSubset",(function(){return tr})),n.d(t,"createTranspose",(function(){return ar})),n.d(t,"createCtranspose",(function(){return ur})),n.d(t,"createZeros",(function(){return lr})),n.d(t,"createErf",(function(){return cr})),n.d(t,"createMode",(function(){return gr})),n.d(t,"createProd",(function(){return yr})),n.d(t,"createFormat",(function(){return br})),n.d(t,"createPrint",(function(){return xr})),n.d(t,"createTo",(function(){return _r})),n.d(t,"createIsPrime",(function(){return Or})),n.d(t,"createNumeric",(function(){return Nr})),n.d(t,"createDivideScalar",(function(){return Cr})),n.d(t,"createPow",(function(){return Ar})),n.d(t,"createRound",(function(){return jr})),n.d(t,"createLog",(function(){return Ir})),n.d(t,"createLog1p",(function(){return Rr})),n.d(t,"createNthRoots",(function(){return Fr})),n.d(t,"createDotPow",(function(){return Br})),n.d(t,"createDotDivide",(function(){return zr})),n.d(t,"createLsolve",(function(){return Ur})),n.d(t,"createUsolve",(function(){return Wr})),n.d(t,"createLeftShift",(function(){return Yr})),n.d(t,"createRightArithShift",(function(){return Gr})),n.d(t,"createRightLogShift",(function(){return Xr})),n.d(t,"createAnd",(function(){return Jr})),n.d(t,"createCompare",(function(){return ei})),n.d(t,"createCompareNatural",(function(){return ii})),n.d(t,"createCompareText",(function(){return ai})),n.d(t,"createEqual",(function(){return ui})),n.d(t,"createEqualText",(function(){return ci})),n.d(t,"createSmaller",(function(){return hi})),n.d(t,"createSmallerEq",(function(){return pi})),n.d(t,"createLarger",(function(){return gi})),n.d(t,"createLargerEq",(function(){return yi})),n.d(t,"createDeepEqual",(function(){return xi})),n.d(t,"createUnequal",(function(){return _i})),n.d(t,"createPartitionSelect",(function(){return Oi})),n.d(t,"createSort",(function(){return Ni})),n.d(t,"createMax",(function(){return Ei})),n.d(t,"createMin",(function(){return Ci})),n.d(t,"createImmutableDenseMatrixClass",(function(){return Ai})),n.d(t,"createIndexClass",(function(){return Mi})),n.d(t,"createFibonacciHeapClass",(function(){return ki})),n.d(t,"createSpaClass",(function(){return Ti})),n.d(t,"createUnitClass",(function(){return zi})),n.d(t,"createUnitFunction",(function(){return Hi})),n.d(t,"createSparse",(function(){return Ui})),n.d(t,"createCreateUnit",(function(){return Vi})),n.d(t,"createAcos",(function(){return $i})),n.d(t,"createAcosh",(function(){return lo})),n.d(t,"createAcot",(function(){return co})),n.d(t,"createAcoth",(function(){return fo})),n.d(t,"createAcsc",(function(){return ho})),n.d(t,"createAcsch",(function(){return po})),n.d(t,"createAsec",(function(){return mo})),n.d(t,"createAsech",(function(){return go})),n.d(t,"createAsin",(function(){return vo})),n.d(t,"createAsinh",(function(){return yo})),n.d(t,"createAtan",(function(){return bo})),n.d(t,"createAtan2",(function(){return xo})),n.d(t,"createAtanh",(function(){return wo})),n.d(t,"createCos",(function(){return _o})),n.d(t,"createCosh",(function(){return So})),n.d(t,"createCot",(function(){return Oo})),n.d(t,"createCoth",(function(){return No})),n.d(t,"createCsc",(function(){return Eo})),n.d(t,"createCsch",(function(){return Co})),n.d(t,"createSec",(function(){return Ao})),n.d(t,"createSech",(function(){return Mo})),n.d(t,"createSin",(function(){return ko})),n.d(t,"createSinh",(function(){return To})),n.d(t,"createTan",(function(){return Do})),n.d(t,"createTanh",(function(){return jo})),n.d(t,"createSetCartesian",(function(){return Io})),n.d(t,"createSetDifference",(function(){return Lo})),n.d(t,"createSetDistinct",(function(){return Bo})),n.d(t,"createSetIntersect",(function(){return zo})),n.d(t,"createSetIsSubset",(function(){return Uo})),n.d(t,"createSetMultiplicity",(function(){return Vo})),n.d(t,"createSetPowerset",(function(){return Yo})),n.d(t,"createSetSize",(function(){return Go})),n.d(t,"createSetSymDifference",(function(){return Xo})),n.d(t,"createSetUnion",(function(){return Qo})),n.d(t,"createAdd",(function(){return ea})),n.d(t,"createHypot",(function(){return ta})),n.d(t,"createNorm",(function(){return na})),n.d(t,"createDot",(function(){return ra})),n.d(t,"createTrace",(function(){return ia})),n.d(t,"createIndex",(function(){return oa})),n.d(t,"createNode",(function(){return ua})),n.d(t,"createAccessorNode",(function(){return ha})),n.d(t,"createArrayNode",(function(){return da})),n.d(t,"createAssignmentNode",(function(){return ba})),n.d(t,"createBlockNode",(function(){return xa})),n.d(t,"createConditionalNode",(function(){return wa})),n.d(t,"createConstantNode",(function(){return ka})),n.d(t,"createFunctionAssignmentNode",(function(){return Ta})),n.d(t,"createIndexNode",(function(){return ja})),n.d(t,"createObjectNode",(function(){return Ia})),n.d(t,"createOperatorNode",(function(){return Ra})),n.d(t,"createParenthesisNode",(function(){return La})),n.d(t,"createRangeNode",(function(){return Fa})),n.d(t,"createRelationalNode",(function(){return Ba})),n.d(t,"createSymbolNode",(function(){return qa})),n.d(t,"createFunctionNode",(function(){return Ua})),n.d(t,"createParse",(function(){return Va})),n.d(t,"createCompile",(function(){return Ya})),n.d(t,"createEvaluate",(function(){return Ga})),n.d(t,"createParserClass",(function(){return Ka})),n.d(t,"createParser",(function(){return Xa})),n.d(t,"createLup",(function(){return Ja})),n.d(t,"createQr",(function(){return es})),n.d(t,"createSlu",(function(){return ls})),n.d(t,"createLusolve",(function(){return hs})),n.d(t,"createHelpClass",(function(){return ds})),n.d(t,"createChainClass",(function(){return ps})),n.d(t,"createHelp",(function(){return ys})),n.d(t,"createChain",(function(){return bs})),n.d(t,"createDet",(function(){return xs})),n.d(t,"createInv",(function(){return ws})),n.d(t,"createEigs",(function(){return _s})),n.d(t,"createExpm",(function(){return Ss})),n.d(t,"createSqrtm",(function(){return Os})),n.d(t,"createDivide",(function(){return Ns})),n.d(t,"createDistance",(function(){return Cs})),n.d(t,"createIntersect",(function(){return As})),n.d(t,"createSum",(function(){return Ms})),n.d(t,"createMean",(function(){return ks})),n.d(t,"createMedian",(function(){return Ts})),n.d(t,"createMad",(function(){return Ds})),n.d(t,"createVariance",(function(){return Is})),n.d(t,"createQuantileSeq",(function(){return Rs})),n.d(t,"createStd",(function(){return Ls})),n.d(t,"createCombinations",(function(){return zs})),n.d(t,"createCombinationsWithRep",(function(){return Ws})),n.d(t,"createGamma",(function(){return Gs})),n.d(t,"createFactorial",(function(){return Xs})),n.d(t,"createKldivergence",(function(){return Qs})),n.d(t,"createMultinomial",(function(){return tu})),n.d(t,"createPermutations",(function(){return ru})),n.d(t,"createPickRandom",(function(){return lu})),n.d(t,"createRandom",(function(){return hu})),n.d(t,"createRandomInt",(function(){return pu})),n.d(t,"createStirlingS2",(function(){return gu})),n.d(t,"createBellNumbers",(function(){return yu})),n.d(t,"createCatalan",(function(){return xu})),n.d(t,"createComposition",(function(){return _u})),n.d(t,"createSimplify",(function(){return Au})),n.d(t,"createDerivative",(function(){return Mu})),n.d(t,"createRationalize",(function(){return Tu})),n.d(t,"createReviver",(function(){return Du})),n.d(t,"createReplacer",(function(){return ju})),n.d(t,"createE",(function(){return Wu})),n.d(t,"createUppercaseE",(function(){return el})),n.d(t,"createFalse",(function(){return Fu})),n.d(t,"createI",(function(){return Ju})),n.d(t,"createInfinity",(function(){return qu})),n.d(t,"createLN10",(function(){return Yu})),n.d(t,"createLN2",(function(){return $u})),n.d(t,"createLOG10E",(function(){return Gu})),n.d(t,"createLOG2E",(function(){return Zu})),n.d(t,"createNaN",(function(){return zu})),n.d(t,"createNull",(function(){return Bu})),n.d(t,"createPhi",(function(){return Vu})),n.d(t,"createPi",(function(){return Hu})),n.d(t,"createUppercasePi",(function(){return Qu})),n.d(t,"createSQRT1_2",(function(){return Ku})),n.d(t,"createSQRT2",(function(){return Xu})),n.d(t,"createTau",(function(){return Uu})),n.d(t,"createTrue",(function(){return Lu})),n.d(t,"createVersion",(function(){return tl})),n.d(t,"createAtomicMass",(function(){return Dl})),n.d(t,"createAvogadro",(function(){return jl})),n.d(t,"createBohrMagneton",(function(){return hl})),n.d(t,"createBohrRadius",(function(){return yl})),n.d(t,"createBoltzmann",(function(){return Pl})),n.d(t,"createClassicalElectronRadius",(function(){return bl})),n.d(t,"createConductanceQuantum",(function(){return dl})),n.d(t,"createCoulomb",(function(){return cl})),n.d(t,"createDeuteronMass",(function(){return Nl})),n.d(t,"createEfimovFactor",(function(){return Tl})),n.d(t,"createElectricConstant",(function(){return ul})),n.d(t,"createElectronMass",(function(){return xl})),n.d(t,"createElementaryCharge",(function(){return fl})),n.d(t,"createFaraday",(function(){return Il})),n.d(t,"createFermiCoupling",(function(){return wl})),n.d(t,"createFineStructure",(function(){return _l})),n.d(t,"createFirstRadiation",(function(){return Rl})),n.d(t,"createGasConstant",(function(){return Fl})),n.d(t,"createGravitationConstant",(function(){return il})),n.d(t,"createGravity",(function(){return Yl})),n.d(t,"createHartreeEnergy",(function(){return Sl})),n.d(t,"createInverseConductanceQuantum",(function(){return pl})),n.d(t,"createKlitzing",(function(){return vl})),n.d(t,"createLoschmidt",(function(){return Ll})),n.d(t,"createMagneticConstant",(function(){return sl})),n.d(t,"createMagneticFluxQuantum",(function(){return ml})),n.d(t,"createMolarMass",(function(){return Vl})),n.d(t,"createMolarMassC12",(function(){return $l})),n.d(t,"createMolarPlanckConstant",(function(){return Bl})),n.d(t,"createMolarVolume",(function(){return ql})),n.d(t,"createNeutronMass",(function(){return El})),n.d(t,"createNuclearMagneton",(function(){return gl})),n.d(t,"createPlanckCharge",(function(){return Xl})),n.d(t,"createPlanckConstant",(function(){return ol})),n.d(t,"createPlanckLength",(function(){return Zl})),n.d(t,"createPlanckMass",(function(){return Gl})),n.d(t,"createPlanckTemperature",(function(){return Jl})),n.d(t,"createPlanckTime",(function(){return Kl})),n.d(t,"createProtonMass",(function(){return Ol})),n.d(t,"createQuantumOfCirculation",(function(){return Cl})),n.d(t,"createReducedPlanckConstant",(function(){return al})),n.d(t,"createRydberg",(function(){return Al})),n.d(t,"createSackurTetrode",(function(){return zl})),n.d(t,"createSecondRadiation",(function(){return Hl})),n.d(t,"createSpeedOfLight",(function(){return rl})),n.d(t,"createStefanBoltzmann",(function(){return Ul})),n.d(t,"createThomsonCrossSection",(function(){return Ml})),n.d(t,"createVacuumImpedance",(function(){return ll})),n.d(t,"createWeakMixingAngle",(function(){return kl})),n.d(t,"createWienDisplacement",(function(){return Wl})),n.d(t,"createApplyTransform",(function(){return tc})),n.d(t,"createColumnTransform",(function(){return nc})),n.d(t,"createFilterTransform",(function(){return ic})),n.d(t,"createForEachTransform",(function(){return ac})),n.d(t,"createIndexTransform",(function(){return sc})),n.d(t,"createMapTransform",(function(){return uc})),n.d(t,"createMaxTransform",(function(){return cc})),n.d(t,"createMeanTransform",(function(){return fc})),n.d(t,"createMinTransform",(function(){return hc})),n.d(t,"createRangeTransform",(function(){return dc})),n.d(t,"createRowTransform",(function(){return pc})),n.d(t,"createSubsetTransform",(function(){return mc})),n.d(t,"createConcatTransform",(function(){return gc})),n.d(t,"createStdTransform",(function(){return vc})),n.d(t,"createSumTransform",(function(){return yc})),n.d(t,"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(e){var t=e.BigNumber,n=e.Complex,i=e.DenseMatrix,o=e.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(e){if(t||c(e),15<Object(a.f)(e))throw new TypeError("Cannot implicitly convert a number with >15 significant digits to BigNumber (value: "+e+"). Use function bignumber(x) to convert to BigNumber.");return new t(e)}},{from:"number",to:"Complex",convert:function(e){return n||f(e),new n(e,0)}},{from:"number",to:"string",convert:function(e){return e+""}},{from:"BigNumber",to:"Complex",convert:function(e){return n||f(e),new n(e.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(e){return n||f(e),new n(e.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(e){o||h(e);var t=new o(e);if(t.valueOf()!==e)throw new TypeError("Cannot implicitly convert a number to a Fraction when there will be a loss of precision (value: "+e+"). Use function fraction(x) to convert to Fraction.");return t}},{from:"string",to:"number",convert:function(e){var t=Number(e);if(isNaN(t))throw new Error('Cannot convert "'+e+'" to a number');return t}},{from:"string",to:"BigNumber",convert:function(e){t||c(e);try{return new t(e)}catch(t){throw new Error('Cannot convert "'+e+'" to BigNumber')}}},{from:"string",to:"Fraction",convert:function(e){o||h(e);try{return new o(e)}catch(t){throw new Error('Cannot convert "'+e+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(e){n||f(e);try{return new n(e)}catch(t){throw new Error('Cannot convert "'+e+'" to Complex')}}},{from:"boolean",to:"number",convert:function(e){return+e}},{from:"boolean",to:"BigNumber",convert:function(e){return t||c(e),new t(+e)}},{from:"boolean",to:"Fraction",convert:function(e){return o||h(e),new o(+e)}},{from:"boolean",to:"string",convert:function(e){return String(e)}},{from:"Array",to:"Matrix",convert:function(e){return i||function(){throw new Error("Cannot convert array into a Matrix: no class 'DenseMatrix' provided")}(),new i(e)}},{from:"Matrix",to:"Array",convert:function(e){return e.valueOf()}}],s}));function c(e){throw new Error("Cannot convert value ".concat(e," into a BigNumber: no class 'BigNumber' provided"))}function f(e){throw new Error("Cannot convert value ".concat(e," into a Complex number: no class 'Complex' provided"))}function h(e){throw new Error("Cannot convert value ".concat(e," into a Fraction, no class 'Fraction' provided."))}var d=Object(s.a)("ResultSet",[],(function(){function e(t){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator");this.entries=t||[]}return e.prototype.type="ResultSet",e.prototype.isResultSet=!0,e.prototype.valueOf=function(){return this.entries},e.prototype.toString=function(){return"["+this.entries.join(", ")+"]"},e.prototype.toJSON=function(){return{mathjs:"ResultSet",entries:this.entries}},e.fromJSON=function(t){return new e(t.entries)},e}),{isClass:!0}),p=n(15),m=n.n(p),g=Object(s.a)("BigNumber",["?on","config"],(function(e){var t=e.on,n=e.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(e){return new r(e.value)},t&&t("config",(function(e,t){e.precision!==t.precision&&r.config({precision:e.precision})})),r}),{isClass:!0}),v=n(8),y=n.n(v);function b(e){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}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(e){var t,n=this.im,i=this.re,o=Object(a.h)(this.re,e),s=Object(a.h)(this.im,e),u=Object(r.y)(e)?e:e?e.precision:null;return null!==u&&(t=Math.pow(10,-u),Math.abs(i/n)<t&&(i=0),Math.abs(n/i)<t&&(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(e){switch(arguments.length){case 1:var t=e;if("object"===b(t))return y()(t);throw new TypeError("Input has to be an object with r and phi keys.");case 2:var n=e,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(e){return new y.a(e)},y.a.compare=function(e,t){return e.re>t.re?1:e.re<t.re?-1:e.im>t.im?1:e.im<t.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(e){return new _.a(e)},_.a}),{isClass:!0}),O=Object(s.a)("Range",[],(function(){function e(t,n,i){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator");var o=null!=t,a=null!=n,s=null!=i;if(o)if(Object(r.e)(t))t=t.toNumber();else if("number"!=typeof t)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(t):0,this.end=a?parseFloat(n):0,this.step=s?parseFloat(i):1}return e.prototype.type="Range",e.prototype.isRange=!0,e.parse=function(t){if("string"!=typeof t)return null;var n=t.split(":").map((function(e){return parseFloat(e)}));if(n.some((function(e){return isNaN(e)})))return null;switch(n.length){case 2:return new e(n[0],n[1]);case 3:return new e(n[0],n[2],n[1]);default:return null}},e.prototype.clone=function(){return new e(this.start,this.end,this.step)},e.prototype.size=function(){var e=0,t=this.start,n=this.step,r=this.end-t;return Object(a.n)(n)===Object(a.n)(r)?e=Math.ceil(r/n):0==r&&(e=0),isNaN(e)&&(e=0),[e]},e.prototype.min=function(){var e=this.size()[0];return 0<e?0<this.step?this.start:this.start+(e-1)*this.step:void 0},e.prototype.max=function(){var e=this.size()[0];return 0<e?0<this.step?this.start+(e-1)*this.step:this.start:void 0},e.prototype.forEach=function(e){var t=this.start,n=this.step,r=this.end,i=0;if(0<n)for(;t<r;)e(t,[i],this),t+=n,i++;else if(n<0)for(;r<t;)e(t,[i],this),t+=n,i++},e.prototype.map=function(e){var t=[];return this.forEach((function(n,r,i){t[r[0]]=e(n,r,i)})),t},e.prototype.toArray=function(){var e=[];return this.forEach((function(t,n){e[n[0]]=t})),e},e.prototype.valueOf=function(){return this.toArray()},e.prototype.format=function(e){var t=Object(a.h)(this.start,e);return 1!==this.step&&(t+=":"+Object(a.h)(this.step,e)),t+":"+Object(a.h)(this.end,e)},e.prototype.toString=function(){return this.format()},e.prototype.toJSON=function(){return{mathjs:"Range",start:this.start,end:this.end,step:this.step}},e.fromJSON=function(t){return new e(t.start,t.end,t.step)},e}),{isClass:!0}),N=Object(s.a)("Matrix",[],(function(){function e(){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator")}return e.prototype.type="Matrix",e.prototype.isMatrix=!0,e.prototype.storage=function(){throw new Error("Cannot invoke storage on a Matrix interface")},e.prototype.datatype=function(){throw new Error("Cannot invoke datatype on a Matrix interface")},e.prototype.create=function(e,t){throw new Error("Cannot invoke create on a Matrix interface")},e.prototype.subset=function(e,t,n){throw new Error("Cannot invoke subset on a Matrix interface")},e.prototype.get=function(e){throw new Error("Cannot invoke get on a Matrix interface")},e.prototype.set=function(e,t,n){throw new Error("Cannot invoke set on a Matrix interface")},e.prototype.resize=function(e,t){throw new Error("Cannot invoke resize on a Matrix interface")},e.prototype.reshape=function(e,t){throw new Error("Cannot invoke reshape on a Matrix interface")},e.prototype.clone=function(){throw new Error("Cannot invoke clone on a Matrix interface")},e.prototype.size=function(){throw new Error("Cannot invoke size on a Matrix interface")},e.prototype.map=function(e,t){throw new Error("Cannot invoke map on a Matrix interface")},e.prototype.forEach=function(e){throw new Error("Cannot invoke forEach on a Matrix interface")},e.prototype.toArray=function(){throw new Error("Cannot invoke toArray on a Matrix interface")},e.prototype.valueOf=function(){throw new Error("Cannot invoke valueOf on a Matrix interface")},e.prototype.format=function(e){throw new Error("Cannot invoke format on a Matrix interface")},e.prototype.toString=function(){throw new Error("Cannot invoke toString on a Matrix interface")},e}),{isClass:!0}),E=n(2),C=n(5),A=n(3),M=n(6),k=Object(s.a)("DenseMatrix",["Matrix"],(function(e){var t=e.Matrix;function n(e,t){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(t&&!Object(r.I)(t))throw new Error("Invalid datatype: "+t);if(Object(r.v)(e))"DenseMatrix"===e.type?(this._data=Object(A.a)(e._data),this._size=Object(A.a)(e._size)):(this._data=e.toArray(),this._size=e.size()),this._datatype=t||e._datatype;else if(e&&Object(r.b)(e.data)&&Object(r.b)(e.size))this._data=e.data,this._size=e.size,Object(E.p)(this._data,this._size),this._datatype=t||e.datatype;else if(Object(r.b)(e))this._data=function e(t){for(var n=0,i=t.length;n<i;n++){var o=t[n];Object(r.b)(o)?t[n]=e(o):o&&!0===o.isMatrix&&(t[n]=e(o.valueOf()))}return t}(e),this._size=Object(E.a)(this._data),Object(E.p)(this._data,this._size),this._datatype=t;else{if(e)throw new TypeError("Unsupported type of data ("+Object(r.M)(e)+")");this._data=[],this._size=[0],this._datatype=t}}function i(e,t,n){if(0!==t.length)return e._size=t.slice(0),e._data=Object(E.m)(e._data,e._size,n),e;for(var i=e._data;Object(r.b)(i);)i=i[0];return i}function o(e,t,n){for(var r=e._size.slice(0),o=!1;r.length<t.length;)r.push(0),o=!0;for(var a=0,s=t.length;a<s;a++)t[a]>r[a]&&(r[a]=t[a],o=!0);o&&i(e,r,n)}return(n.prototype=new t).createDenseMatrix=function(e,t){return new n(e,t)},n.prototype.type="DenseMatrix",n.prototype.isDenseMatrix=!0,n.prototype.getDataType=function(){return Object(E.h)(this._data,r.M)},n.prototype.storage=function(){return"dense"},n.prototype.datatype=function(){return this._datatype},n.prototype.create=function(e,t){return new n(e,t)},n.prototype.subset=function(e,t,i){switch(arguments.length){case 1:return function(e,t){if(!Object(r.t)(t))throw new TypeError("Invalid index");if(t.isScalar())return e.get(t.min());var i=t.size();if(i.length!==e._size.length)throw new M.a(i.length,e._size.length);for(var o=t.min(),a=t.max(),s=0,u=e._size.length;s<u;s++)Object(E.q)(o[s],e._size[s]),Object(E.q)(a[s],e._size[s]);return new n(function e(t,n,r,i){var o=i===r-1,a=n.dimension(i);return o?a.map((function(e){return Object(E.q)(e,t.length),t[e]})).valueOf():a.map((function(o){Object(E.q)(o,t.length);var a=t[o];return e(a,n,r,i+1)})).valueOf()}(e._data,t,i.length,0),e._datatype)}(this,e);case 2:case 3:return function(e,t,n,i){if(!t||!0!==t.isIndex)throw new TypeError("Invalid index");var a,s=t.size(),u=t.isScalar();if(Object(r.v)(n)?(a=n.size(),n=n.valueOf()):a=Object(E.a)(n),u){if(0!==a.length)throw new TypeError("Scalar expected");e.set(t.min(),n,i)}else{if(s.length<e._size.length)throw new M.a(s.length,e._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(E.o)(n,s.length,c,a)}if(!Object(A.d)(s,a))throw new M.a(s,a,">");var f=t.max().map((function(e){return e+1}));o(e,f,i);var h=s.length;!function e(t,n,r,i,o){var a=o===i-1,s=n.dimension(o);a?s.forEach((function(e,n){Object(E.q)(e),t[e]=r[n[0]]})):s.forEach((function(a,s){Object(E.q)(a),e(t[a],n,r[s[0]],i,o+1)}))}(e._data,t,n,h,0)}return e}(this,e,t,i);default:throw new SyntaxError("Wrong number of arguments")}},n.prototype.get=function(e){if(!Object(r.b)(e))throw new TypeError("Array expected");if(e.length!==this._size.length)throw new M.a(e.length,this._size.length);for(var t=0;t<e.length;t++)Object(E.q)(e[t],this._size[t]);for(var n=this._data,i=0,o=e.length;i<o;i++){var a=e[i];Object(E.q)(a,n.length),n=n[a]}return n},n.prototype.set=function(e,t,n){if(!Object(r.b)(e))throw new TypeError("Array expected");if(e.length<this._size.length)throw new M.a(e.length,this._size.length,"<");var i;o(this,e.map((function(e){return e+1})),n);for(var a=this._data,s=0,u=e.length-1;s<u;s++)i=e[s],Object(E.q)(i,a.length),a=a[i];return i=e[e.length-1],Object(E.q)(i,a.length),a[i]=t,this},n.prototype.resize=function(e,t,n){if(!Object(r.i)(e))throw new TypeError("Array or Matrix expected");var o=e.valueOf().map((function(e){return Array.isArray(e)&&1===e.length?e[0]:e}));return i(n?this.clone():this,o,t)},n.prototype.reshape=function(e,t){var n=t?this.clone():this;return n._data=Object(E.l)(n._data,e),n._size=e.slice(0),n},n.prototype.clone=function(){return new n({data:Object(A.a)(this._data),size:Object(A.a)(this._size),datatype:this._datatype})},n.prototype.size=function(){return this._size.slice(0)},n.prototype.map=function(e){var t=this,i=function n(i,o){return Object(r.b)(i)?i.map((function(e,t){return n(e,o.concat(t))})):e(i,o,t)}(this._data,[]);return new n(i,void 0!==this._datatype?Object(E.h)(i,r.M):void 0)},n.prototype.forEach=function(e){var t=this;!function n(i,o){Object(r.b)(i)?i.forEach((function(e,t){n(e,o.concat(t))})):e(i,o,t)}(this._data,[])},n.prototype.toArray=function(){return Object(A.a)(this._data)},n.prototype.valueOf=function(){return this._data},n.prototype.format=function(e){return Object(C.d)(this._data,e)},n.prototype.toString=function(){return Object(C.d)(this._data)},n.prototype.toJSON=function(){return{mathjs:"DenseMatrix",data:this._data,size:this._size,datatype:this._datatype}},n.prototype.diagonal=function(e){if(e){if(Object(r.e)(e)&&(e=e.toNumber()),!Object(r.y)(e)||!Object(a.i)(e))throw new TypeError("The parameter k must be an integer number")}else e=0;for(var t=0<e?e:0,i=e<0?-e:0,o=this._size[0],s=this._size[1],u=Math.min(o-i,s-t),l=[],c=0;c<u;c++)l[c]=this._data[c+i][c+t];return new n({data:l,size:[u],datatype:this._datatype})},n.diagonal=function(e,t,i,o){if(!Object(r.b)(e))throw new TypeError("Array expected, size parameter");if(2!==e.length)throw new Error("Only two dimensions matrix are supported");if(e=e.map((function(e){if(Object(r.e)(e)&&(e=e.toNumber()),!Object(r.y)(e)||!Object(a.i)(e)||e<1)throw new Error("Size values must be positive integers");return e})),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=e[0],f=e[1],h=Math.min(c-l,f-u);if(Object(r.b)(t)){if(t.length!==h)throw new Error("Invalid value array length");s=function(e){return t[e]}}else if(Object(r.v)(t)){var d=t.size();if(1!==d.length||d[0]!==h)throw new Error("Invalid matrix length");s=function(e){return t.get([e])}}else s=function(){return t};o=o||(Object(r.e)(s(0))?s(0).mul(0):0);var p=[];if(0<e.length){p=Object(E.m)(p,e,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(e){return new n(e)},n.prototype.swapRows=function(e,t){if(!(Object(r.y)(e)&&Object(a.i)(e)&&Object(r.y)(t)&&Object(a.i)(t)))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(E.q)(e,this._size[0]),Object(E.q)(t,this._size[0]),n._swapRows(e,t,this._data),this},n._swapRows=function(e,t,n){var r=n[e];n[e]=n[t],n[t]=r},n}),{isClass:!0}),T=Object(s.a)("clone",["typed"],(function(e){return(0,e.typed)("clone",{any:A.a})})),D=n(9);function j(e){for(var t=0;t<e.length;t++)if(Object(r.i)(e[t]))return 1}function P(e,t){Object(r.v)(e)&&(e=e.valueOf());for(var n=0,i=e.length;n<i;n++){var o=e[n];Array.isArray(o)?P(o,t):t(o)}}function I(e,t,n){return e&&"function"==typeof e.map?e.map((function(e){return I(e,t,n)})):t(e)}function R(e,t,n){var i=Array.isArray(e)?Object(E.a)(e):e.size();if(t<0||t>=i.length)throw new D.a(t,i.length);return Object(r.v)(e)?e.create(L(e.valueOf(),t,n)):L(e,t,n)}function L(e,t,n){var r,i,o,a;if(t<=0){if(Array.isArray(e[0])){for(a=function(e){var t,n,r=e.length,i=e[0].length,o=[];for(n=0;n<i;n++){var a=[];for(t=0;t<r;t++)a.push(e[t][n]);o.push(a)}return o}(e),i=[],r=0;r<a.length;r++)i[r]=L(a[r],t-1,n);return i}for(o=e[0],r=1;r<e.length;r++)o=n(o,e[r]);return o}for(i=[],r=0;r<e.length;r++)i[r]=L(e[r],t-1,n);return i}function F(e,t,n,r,i,o,a,s,u,l,c){var f,h,d,p,m=e._values,g=e._index,v=e._ptr;if(r)for(h=v[t],d=v[t+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[t],d=v[t+1],f=h;f<d;f++)n[p=g[f]]!==o?(n[p]=o,a.push(p)):i[p]=o}var B="isInteger",q=Object(s.a)(B,["typed"],(function(e){return(0,e.typed)(B,{number:a.i,BigNumber:function(e){return e.isInt()},Fraction:function(e){return 1===e.d&&isFinite(e.n)},"Array | Matrix":function(e){return I(e,this)}})}));function z(e){return e<0}function H(e){return 0<e}function U(e){return 0===e}function W(e){return Number.isNaN(e)}W.signature=U.signature=H.signature=z.signature="number";var V="isNegative",$=Object(s.a)(V,["typed"],(function(e){return(0,e.typed)(V,{number:z,BigNumber:function(e){return e.isNeg()&&!e.isZero()&&!e.isNaN()},Fraction:function(e){return e.s<0},Unit:function(e){return this(e.value)},"Array | Matrix":function(e){return I(e,this)}})})),Y="isNumeric",Z=Object(s.a)(Y,["typed"],(function(e){return(0,e.typed)(Y,{"number | BigNumber | Fraction | boolean":function(){return!0},"Complex | Unit | string | null | undefined | Node":function(){return!1},"Array | Matrix":function(e){return I(e,this)}})})),G="hasNumericValue",K=Object(s.a)(G,["typed","isNumeric"],(function(e){var t=e.typed,n=e.isNumeric;return t(G,{string:function(e){return 0<e.trim().length&&!isNaN(Number(e))},any:function(e){return n(e)}})})),X="isPositive",J=Object(s.a)(X,["typed"],(function(e){return(0,e.typed)(X,{number:H,BigNumber:function(e){return!e.isNeg()&&!e.isZero()&&!e.isNaN()},Fraction:function(e){return 0<e.s&&0<e.n},Unit:function(e){return this(e.value)},"Array | Matrix":function(e){return I(e,this)}})})),Q=Object(s.a)("isZero",["typed"],(function(e){return(0,e.typed)("isZero",{number:U,BigNumber:function(e){return e.isZero()},Complex:function(e){return 0===e.re&&0===e.im},Fraction:function(e){return 1===e.d&&0===e.n},Unit:function(e){return this(e.value)},"Array | Matrix":function(e){return I(e,this)}})})),ee=Object(s.a)("isNaN",["typed"],(function(e){return(0,e.typed)("isNaN",{number:W,BigNumber:function(e){return e.isNaN()},Fraction:function(){return!1},Complex:function(e){return e.isNaN()},Unit:function(e){return Number.isNaN(e.value)},"Array | Matrix":function(e){return I(e,Number.isNaN)}})})),te=Object(s.a)("typeOf",["typed"],(function(e){return(0,e.typed)("typeOf",{any:r.M})}));function ne(e,t,n){if(null==n)return e.eq(t);if(e.eq(t))return!0;if(e.isNaN()||t.isNaN())return!1;if(e.isFinite()&&t.isFinite()){var r=e.minus(t).abs();if(r.isZero())return!0;var i=e.constructor.max(e.abs(),t.abs());return r.lte(i.times(n))}return!1}var re="equalScalar",ie=Object(s.a)(re,["typed","config"],(function(e){var t=e.typed,n=e.config;return t(re,{"boolean, boolean":function(e,t){return e===t},"number, number":function(e,t){return Object(a.m)(e,t,n.epsilon)},"BigNumber, BigNumber":function(e,t){return e.eq(t)||ne(e,t,n.epsilon)},"Fraction, Fraction":function(e,t){return e.equals(t)},"Complex, Complex":function(e,t){return r=e,i=t,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(e,t){if(!e.equalBase(t))throw new Error("Cannot compare units with different base");return this(e.value,t.value)}})})),oe=(Object(s.a)(re,["typed","config"],(function(e){var t=e.typed,n=e.config;return t(re,{"number, number":function(e,t){return Object(a.m)(e,t,n.epsilon)}})})),["typed","equalScalar","Matrix"]),ae=Object(s.a)("SparseMatrix",oe,(function(e){var t=e.typed,n=e.equalScalar,i=e.Matrix;function o(e,t){if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");if(t&&!Object(r.I)(t))throw new Error("Invalid datatype: "+t);if(Object(r.v)(e))n=this,a=t,"SparseMatrix"===(i=e).type?(n._values=i._values?Object(A.a)(i._values):void 0,n._index=Object(A.a)(i._index),n._ptr=Object(A.a)(i._ptr),n._size=Object(A.a)(i._size),n._datatype=a||i._datatype):s(n,i.valueOf(),a||i._datatype);else if(e&&Object(r.b)(e.index)&&Object(r.b)(e.ptr)&&Object(r.b)(e.size))this._values=e.values,this._index=e.index,this._ptr=e.ptr,this._size=e.size,this._datatype=t||e.datatype;else if(Object(r.b)(e))s(this,e,t);else{if(e)throw new TypeError("Unsupported type of data ("+Object(r.M)(e)+")");this._values=[],this._index=[],this._ptr=[0],this._size=[0,0],this._datatype=t}var n,i,a}function s(e,i,o){e._values=[],e._index=[],e._ptr=[],e._datatype=o;var a=i.length,s=0,u=n,l=0;if(Object(r.I)(o)&&(u=t.find(n,[o,o])||n,l=t.convert(0,o)),0<a){var c=0;do{e._ptr.push(e._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)||(e._values.push(h),e._index.push(f)))):(0===c&&s<1&&(s=1),u(d,l)||(e._values.push(d),e._index.push(f)))}c++}while(c<s)}e._ptr.push(e._index.length),e._size=[a,s]}function u(e,t,n,r){if(n-t==0)return n;for(var i=t;i<n;i++)if(r[i]===e)return i;return t}function l(e,t,n,r,i,o,a){i.splice(e,0,r),o.splice(e,0,t);for(var s=n+1;s<a.length;s++)a[s]++}function c(e,i,o,a){var s=a||0,u=n,l=0;Object(r.I)(e._datatype)&&(u=t.find(n,[e._datatype,e._datatype])||n,l=t.convert(0,e._datatype),s=t.convert(s,e._datatype));var c=!u(s,l),f=e._size[0],h=e._size[1];if(h<o){for(p=h;p<o;p++)if(e._ptr[p]=e._values.length,c)for(g=0;g<f;g++)e._values.push(s),e._index.push(g);e._ptr[o]=e._values.length}else o<h&&(e._ptr.splice(o+1,h-o),e._values.splice(e._ptr[o],e._values.length),e._index.splice(e._ptr[o],e._index.length));if(h=o,f<i){if(c){for(var d=0,p=0;p<h;p++){e._ptr[p]=e._ptr[p]+d,x=e._ptr[p+1]+d;for(var m=0,g=f;g<i;g++,m++)e._values.splice(x+m,0,s),e._index.splice(x+m,0,g),d++}e._ptr[h]=e._values.length}}else if(i<f){var v=0;for(p=0;p<h;p++){e._ptr[p]=e._ptr[p]-v;for(var y=e._ptr[p],b=e._ptr[p+1]-v,x=y;x<b;x++)i-1<(g=e._index[x])&&(e._values.splice(x,1),e._index.splice(x,1),v++)}e._ptr[p]=e._values.length}return e._size[0]=i,e._size[1]=o,e}function f(e,t,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=t[h]][o]=e?i?Object(A.a)(e[h]):e[h]:1;return u}return(o.prototype=new i).createSparseMatrix=function(e,t){return new o(e,t)},o.prototype.type="SparseMatrix",o.prototype.isSparseMatrix=!0,o.prototype.getDataType=function(){return Object(E.h)(this._values,r.M)},o.prototype.storage=function(){return"sparse"},o.prototype.datatype=function(){return this._datatype},o.prototype.create=function(e,t){return new o(e,t)},o.prototype.density=function(){var e=this._size[0],t=this._size[1];return 0!==e&&0!==t?this._index.length/(e*t):0},o.prototype.subset=function(e,t,n){if(!this._values)throw new Error("Cannot invoke subset on a Pattern only matrix");switch(arguments.length){case 1:return function(e,t){if(!Object(r.t)(t))throw new TypeError("Invalid index");if(t.isScalar())return e.get(t.min());var n,i,a,s,u=t.size();if(u.length!==e._size.length)throw new M.a(u.length,e._size.length);var l=t.min(),c=t.max();for(n=0,i=e._size.length;n<i;n++)Object(E.q)(l[n],e._size[n]),Object(E.q)(c[n],e._size[n]);var f=e._values,h=e._index,d=e._ptr,p=t.dimension(0),m=t.dimension(1),g=[],v=[];p.forEach((function(e,t){v[e]=t[0],g[e]=!0}));var y=f?[]:void 0,b=[],x=[];return m.forEach((function(e){for(x.push(b.length),a=d[e],s=d[e+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:e._datatype})}(this,e);case 2:case 3:return function(e,t,n,i){if(!t||!0!==t.isIndex)throw new TypeError("Invalid index");var o,a=t.size(),s=t.isScalar();if(Object(r.v)(n)?(o=n.size(),n=n.toArray()):o=Object(E.a)(n),s){if(0!==o.length)throw new TypeError("Scalar expected");e.set(t.min(),n,i)}else{if(1!==a.length&&2!==a.length)throw new M.a(a.length,e._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(E.o)(n,a.length,l,o)}if(!Object(A.d)(a,o))throw new M.a(a,o,">");for(var c=t.min()[0],f=t.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];e.set([p+c,m+f],g,i)}}return e}(this,e,t,n);default:throw new SyntaxError("Wrong number of arguments")}},o.prototype.get=function(e){if(!Object(r.b)(e))throw new TypeError("Array expected");if(e.length!==this._size.length)throw new M.a(e.length,this._size.length);if(!this._values)throw new Error("Cannot invoke get on a Pattern only matrix");var t=e[0],n=e[1];Object(E.q)(t,this._size[0]),Object(E.q)(n,this._size[1]);var i=u(t,this._ptr[n],this._ptr[n+1],this._index);return i<this._ptr[n+1]&&this._index[i]===t?this._values[i]:0},o.prototype.set=function(e,i,o){if(!Object(r.b)(e))throw new TypeError("Array expected");if(e.length!==this._size.length)throw new M.a(e.length,this._size.length);if(!this._values)throw new Error("Cannot invoke set on a Pattern only matrix");var a=e[0],s=e[1],f=this._size[0],h=this._size[1],d=n,p=0;Object(r.I)(this._datatype)&&(d=t.find(n,[this._datatype,this._datatype])||n,p=t.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(E.q)(a,f),Object(E.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(e,t,n,r,i){n.splice(e,1),r.splice(e,1);for(var o=t+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(e,t,n){if(!Object(r.i)(e))throw new TypeError("Array or Matrix expected");var i=e.valueOf().map((function(e){return Array.isArray(e)&&1===e.length?e[0]:e}));if(2!==i.length)throw new Error("Only two dimensions matrix are supported");return i.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(C.d)(i)+")")})),c(n?this.clone():this,i[0],i[1],t)},o.prototype.reshape=function(e,t){if(!Object(r.b)(e))throw new TypeError("Array expected");if(2!==e.length)throw new Error("Sparse matrices can only be reshaped in two dimensions");if(e.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(C.d)(e)+")")})),this._size[0]*this._size[1]!=e[0]*e[1])throw new Error("Reshaping sparse matrix will result in the wrong number of elements");var n=t?this.clone():this;if(this._size[0]===e[0]&&this._size[1]===e[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%e[1],f[h]=Math.floor(m/e[1])}n._values.length=0,n._index.length=0,n._ptr.length=e[1]+1,n._size=e.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(A.a)(this._values):void 0,index:Object(A.a)(this._index),ptr:Object(A.a)(this._ptr),size:Object(A.a)(this._size),datatype:this._datatype})},o.prototype.size=function(){return this._size.slice(0)},o.prototype.map=function(e,i){if(!this._values)throw new Error("Cannot invoke map on a Pattern only matrix");var a=this;return function(e,i,a,s,u,l,c){var f=[],h=[],d=[],p=n,m=0;Object(r.I)(e._datatype)&&(p=t.find(n,[e._datatype,e._datatype])||n,m=t.convert(0,e._datatype));for(var g=function(e,t,n){e=l(e,t,n),p(e,m)||(f.push(e),h.push(t))},v=0;v<=u;v++){d.push(f.length);var y=e._ptr[v],b=e._ptr[v+1];if(c)for(var x=y;x<b;x++){var w=e._index[x];0<=w&&w<=a&&g(e._values[x],w-0,v-0)}else{for(var _={},S=y;S<b;S++)_[e._index[S]]=e._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(t,n,r){return e(t,[n,r],a)}),i)},o.prototype.forEach=function(e,t){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(t)for(var s=o;s<a;s++){var u=this._index[s];e(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++)e(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(e){for(var t=this._size[0],n=this._size[1],r=this.density(),i="Sparse Matrix ["+Object(C.d)(t,e)+" x "+Object(C.d)(n,e)+"] density: "+Object(C.d)(r,e)+"\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(C.d)(l,e)+", "+Object(C.d)(o,e)+") ==> "+(this._values?Object(C.d)(this._values[u],e):"X")}return i},o.prototype.toString=function(){return Object(C.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(e){if(e){if(Object(r.e)(e)&&(e=e.toNumber()),!Object(r.y)(e)||!Object(a.i)(e))throw new TypeError("The parameter k must be an integer number")}else e=0;var t=0<e?e:0,n=e<0?-e:0,i=this._size[0],s=this._size[1],u=Math.min(i-n,s-t),l=[],c=[],f=[];f[0]=0;for(var h=t;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-t+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(e){return new o(e)},o.diagonal=function(e,i,s,u,l){if(!Object(r.b)(e))throw new TypeError("Array expected, size parameter");if(2!==e.length)throw new Error("Only two dimensions matrix are supported");if(e=e.map((function(e){if(Object(r.e)(e)&&(e=e.toNumber()),!Object(r.y)(e)||!Object(a.i)(e)||e<1)throw new Error("Size values must be positive integers");return e})),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=t.find(n,[l,l])||n,f=t.convert(0,l));var h,d=0<s?s:0,p=s<0?-s:0,m=e[0],g=e[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(e){return i[e]}}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(e){return i.get([e])}}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(e,t){if(!(Object(r.y)(e)&&Object(a.i)(e)&&Object(r.y)(t)&&Object(a.i)(t)))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(E.q)(e,this._size[0]),Object(E.q)(t,this._size[0]),o._swapRows(e,t,this._size[1],this._values,this._index,this._ptr),this},o._forEachRow=function(e,t,n,r,i){for(var o=r[e],a=r[e+1],s=o;s<a;s++)i(n[s],t[s])},o._swapRows=function(e,t,n,r,i,o){for(var a=0;a<n;a++){var s,l,c,f=o[a],h=o[a+1],d=u(e,f,h,i),p=u(t,f,h,i);d<h&&p<h&&i[d]===e&&i[p]===t?r&&(s=r[d],r[d]=r[p],r[p]=s):d<h&&i[d]===e&&(h<=p||i[p]!==t)?(l=r?r[d]:void 0,i.splice(p,0,t),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]===t&&(h<=d||i[d]!==e)&&(c=r?r[p]:void 0,i.splice(d,0,e),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}),se=Object(s.a)("number",["typed"],(function(e){var t=(0,e.typed)("number",{"":function(){return 0},number:function(e){return e},string:function(e){if("NaN"===e)return NaN;var t=Number(e);if(isNaN(t))throw new SyntaxError('String "'+e+'" is no valid number');return t},BigNumber:function(e){return e.toNumber()},Fraction:function(e){return e.valueOf()},Unit:function(){throw new Error("Second argument with valueless unit expected")},null:function(){return 0},"Unit, string | Unit":function(e,t){return e.toNumber(t)},"Array | Matrix":function(e){return I(e,this)}});return t.fromJSON=function(e){return parseFloat(e.value)},t})),ue=Object(s.a)("string",["typed"],(function(e){return(0,e.typed)("string",{"":function(){return""},number:a.h,null:function(){return"null"},boolean:function(e){return e+""},string:function(e){return e},"Array | Matrix":function(e){return I(e,this)},any:function(e){return String(e)}})})),le="boolean",ce=Object(s.a)(le,["typed"],(function(e){return(0,e.typed)(le,{"":function(){return!1},boolean:function(e){return e},number:function(e){return!!e},null:function(){return!1},BigNumber:function(e){return!e.isZero()},string:function(e){var t=e.toLowerCase();if("true"===t)return!0;if("false"===t)return!1;var n=Number(e);if(""!==e&&!isNaN(n))return!!n;throw new Error('Cannot convert "'+e+'" to a boolean')},"Array | Matrix":function(e){return I(e,this)}})})),fe=Object(s.a)("bignumber",["typed","BigNumber"],(function(e){var t=e.typed,n=e.BigNumber;return t("bignumber",{"":function(){return new n(0)},number:function(e){return new n(e+"")},string:function(e){return new n(e)},BigNumber:function(e){return e},Fraction:function(e){return new n(e.n).div(e.d).times(e.s)},null:function(){return new n(0)},"Array | Matrix":function(e){return I(e,this)}})})),he=Object(s.a)("complex",["typed","Complex"],(function(e){var t=e.typed,n=e.Complex;return t("complex",{"":function(){return n.ZERO},number:function(e){return new n(e,0)},"number, number":function(e,t){return new n(e,t)},"BigNumber, BigNumber":function(e,t){return new n(e.toNumber(),t.toNumber())},Fraction:function(e){return new n(e.valueOf(),0)},Complex:function(e){return e.clone()},string:function(e){return n(e)},null:function(){return n(0)},Object:function(e){if("re"in e&&"im"in e)return new n(e.re,e.im);if("r"in e&&"phi"in e||"abs"in e&&"arg"in e)return new n(e);throw new Error("Expected object with properties (re and im) or (r and phi) or (abs and arg)")},"Array | Matrix":function(e){return I(e,this)}})})),de=Object(s.a)("fraction",["typed","Fraction"],(function(e){var t=e.typed,n=e.Fraction;return t("fraction",{number:function(e){if(!isFinite(e)||isNaN(e))throw new Error(e+" cannot be represented as a fraction");return new n(e)},string:function(e){return new n(e)},"number, number":function(e,t){return new n(e,t)},null:function(){return new n(0)},BigNumber:function(e){return new n(e.toString())},Fraction:function(e){return e},Object:function(e){return new n(e)},"Array | Matrix":function(e){return I(e,this)}})})),pe=Object(s.a)("matrix",["typed","Matrix","DenseMatrix","SparseMatrix"],(function(e){var t=e.typed,n=(e.Matrix,e.DenseMatrix),r=e.SparseMatrix;return t("matrix",{"":function(){return i([])},string:function(e){return i([],e)},"string, string":function(e,t){return i([],e,t)},Array:function(e){return i(e)},Matrix:function(e){return i(e,e.storage())},"Array | Matrix, string":i,"Array | Matrix, string, string":i});function i(e,t,i){if("dense"===t||"default"===t||void 0===t)return new n(e,i);if("sparse"===t)return new r(e,i);throw new TypeError("Unknown matrix type "+JSON.stringify(t)+".")}})),me="splitUnit",ge=Object(s.a)(me,["typed"],(function(e){return(0,e.typed)(me,{"Unit, Array":function(e,t){return e.splitUnit(t)}})})),ve="number",ye="number, number";function be(e){return Math.abs(e)}function xe(e,t){return e+t}function we(e,t){return e*t}function _e(e){return-e}function Se(e){return e}function Oe(e){return Object(a.d)(e)}function Ne(e){return Math.ceil(e)}function Ee(e){return e*e*e}function Ce(e){return Math.exp(e)}function Ae(e){return Object(a.g)(e)}function Me(e,t){if(!Object(a.i)(e)||!Object(a.i)(t))throw new Error("Parameters in function gcd must be integer numbers");for(var n;0!==t;)n=e%t,e=t,t=n;return e<0?-e:e}function ke(e,t){if(!Object(a.i)(e)||!Object(a.i)(t))throw new Error("Parameters in function lcm must be integer numbers");if(0===e||0===t)return 0;for(var n,r=e*t;0!==t;)t=e%(n=t),e=n;return Math.abs(r/e)}function Te(e){return Math.log(e)}function De(e){return Object(a.j)(e)}function je(e){return Object(a.l)(e)}function Pe(e,t){if(0<t)return e-t*Math.floor(e/t);if(0===t)return e;throw new Error("Cannot calculate mod for a negative divisor")}function Ie(e,t){var n=t<0;if(n&&(t=-t),0===t)throw new Error("Root must be non-zero");if(e<0&&Math.abs(t)%2!=1)throw new Error("Root must be odd when a is negative.");if(0===e)return n?1/0:0;if(!isFinite(e))return n?0:e;var r=Math.pow(Math.abs(e),1/t);return r=e<0?-r:r,n?1/r:r}function Re(e){return Object(a.n)(e)}function Le(e){return e*e}function Fe(e,t){var n,r,i,o=0,s=1,u=1,l=0;if(!Object(a.i)(e)||!Object(a.i)(t))throw new Error("Parameters in function xgcd must be integer numbers");for(;t;)i=e-(r=Math.floor(e/t))*t,o=s-r*(n=o),s=n,u=l-r*(n=u),l=n,e=t,t=i;return e<0?[-e,-s,-l]:[e,e?s:0,l]}function Be(e,t){return e*e<1&&t===1/0||1<e*e&&t===-1/0?0:Math.pow(e,t)}function qe(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;return parseFloat(Object(a.q)(e,t))}be.signature=ve,we.signature=xe.signature=ye,Ae.signature=Ce.signature=Ee.signature=Ne.signature=Oe.signature=Se.signature=_e.signature=ve,ke.signature=Me.signature=ye,je.signature=De.signature=Te.signature=ve,Ie.signature=Pe.signature=ye,Le.signature=Re.signature=ve,qe.signature=Be.signature=Fe.signature=ye;var ze="unaryMinus",He=Object(s.a)(ze,["typed"],(function(e){return(0,e.typed)(ze,{number:_e,Complex:function(e){return e.neg()},BigNumber:function(e){return e.neg()},Fraction:function(e){return e.neg()},Unit:function(e){var t=e.clone();return t.value=this(e.value),t},"Array | Matrix":function(e){return I(e,this,!0)}})})),Ue="unaryPlus",We=Object(s.a)(Ue,["typed","config","BigNumber"],(function(e){var t=e.typed,n=e.config,r=e.BigNumber;return t(Ue,{number:Se,Complex:function(e){return e},BigNumber:function(e){return e},Fraction:function(e){return e},Unit:function(e){return e.clone()},"Array | Matrix":function(e){return I(e,this,!0)},"boolean | string":function(e){return"BigNumber"===n.number?new r(+e):+e}})})),Ve=Object(s.a)("abs",["typed"],(function(e){return(0,e.typed)("abs",{number:be,Complex:function(e){return e.abs()},BigNumber:function(e){return e.abs()},Fraction:function(e){return e.abs()},"Array | Matrix":function(e){return I(e,this,!0)},Unit:function(e){return e.abs()}})})),$e=Object(s.a)("apply",["typed","isInteger"],(function(e){var t=e.typed,n=e.isInteger;return t("apply",{"Array | Matrix, number | BigNumber, function":function(e,t,i){if(!n(t))throw new TypeError("Integer number expected for dimension");var o=Array.isArray(e)?Object(E.a)(e):e.size();if(t<0||t>=o.length)throw new D.a(t,o.length);return Object(r.v)(e)?e.create(Ye(e.valueOf(),t,i)):Ye(e,t,i)}})}));function Ye(e,t,n){var r,i,o;if(t<=0){if(Array.isArray(e[0])){for(o=function(e){var t,n,r=e.length,i=e[0].length,o=[];for(n=0;n<i;n++){var a=[];for(t=0;t<r;t++)a.push(e[t][n]);o.push(a)}return o}(e),i=[],r=0;r<o.length;r++)i[r]=Ye(o[r],t-1,n);return i}return n(e)}for(i=[],r=0;r<e.length;r++)i[r]=Ye(e[r],t-1,n);return i}var Ze="addScalar",Ge=Object(s.a)(Ze,["typed"],(function(e){return(0,e.typed)(Ze,{"number, number":xe,"Complex, Complex":function(e,t){return e.add(t)},"BigNumber, BigNumber":function(e,t){return e.plus(t)},"Fraction, Fraction":function(e,t){return e.add(t)},"Unit, Unit":function(e,t){if(null===e.value||void 0===e.value)throw new Error("Parameter x contains a unit with undefined value");if(null===t.value||void 0===t.value)throw new Error("Parameter y contains a unit with undefined value");if(!e.equalBase(t))throw new Error("Units do not match");var n=e.clone();return n.value=this(n.value,t.value),n.fixPrefix=!1,n}})})),Ke=Object(s.a)("cbrt",["config","typed","isNegative","unaryMinus","matrix","Complex","BigNumber","Fraction"],(function(e){var t=e.config,n=e.typed,i=e.isNegative,o=e.unaryMinus,a=e.matrix,s=e.Complex,u=e.BigNumber,l=e.Fraction;return n("cbrt",{number:Oe,Complex:c,"Complex, boolean":c,BigNumber:function(e){return e.cbrt()},Unit:function(e){if(e.value&&Object(r.j)(e.value)){var t=e.clone();return t.value=1,(t=t.pow(1/3)).value=c(e.value),t}var n,a=i(e.value);a&&(e.value=o(e.value)),n=Object(r.e)(e.value)?new u(1).div(3):Object(r.o)(e.value)?new l(1,3):1/3;var s=e.pow(n);return a&&(s.value=o(s.value)),s},"Array | Matrix":function(e){return I(e,this,!0)}});function c(e,n){var r=e.arg()/3,i=e.abs(),o=new s(Oe(i),0).mul(new s(0,r).exp());if(n){var u=[o,new s(Oe(i),0).mul(new s(0,r+2*Math.PI/3).exp()),new s(Oe(i),0).mul(new s(0,r-2*Math.PI/3).exp())];return"Array"===t.matrix?u:a(u)}return o}})),Xe=Object(s.a)("ceil",["typed","config","round"],(function(e){var t=e.typed,n=e.config,r=e.round;return t("ceil",{number:function(e){return(Object(a.m)(e,r(e),n.epsilon)?r:Ne)(e)},Complex:function(e){return e.ceil()},BigNumber:function(e){return ne(e,r(e),n.epsilon)?r(e):e.ceil()},Fraction:function(e){return e.ceil()},"Array | Matrix":function(e){return I(e,this,!0)}})})),Je=Object(s.a)("cube",["typed"],(function(e){return(0,e.typed)("cube",{number:Ee,Complex:function(e){return e.mul(e).mul(e)},BigNumber:function(e){return e.times(e).times(e)},Fraction:function(e){return e.pow(3)},"Array | Matrix":function(e){return I(e,this,!0)},Unit:function(e){return e.pow(3)}})})),Qe=Object(s.a)("exp",["typed"],(function(e){return(0,e.typed)("exp",{number:Ce,Complex:function(e){return e.exp()},BigNumber:function(e){return e.exp()},"Array | Matrix":function(e){return I(e,this)}})})),et=Object(s.a)("expm1",["typed","Complex"],(function(e){var t=e.typed,n=e.Complex;return t("expm1",{number:Ae,Complex:function(e){var t=Math.exp(e.re);return new n(t*Math.cos(e.im)-1,t*Math.sin(e.im))},BigNumber:function(e){return e.exp().minus(1)},"Array | Matrix":function(e){return I(e,this)}})})),tt=Object(s.a)("fix",["typed","Complex","ceil","floor"],(function(e){var t=e.typed,n=e.Complex,r=e.ceil,i=e.floor;return t("fix",{number:function(e){return(0<e?i:r)(e)},Complex:function(e){return new n(0<e.re?Math.floor(e.re):Math.ceil(e.re),0<e.im?Math.floor(e.im):Math.ceil(e.im))},BigNumber:function(e){return(e.isNegative()?r:i)(e)},Fraction:function(e){return e.s<0?e.ceil():e.floor()},"Array | Matrix":function(e){return I(e,this,!0)}})})),nt=Object(s.a)("floor",["typed","config","round"],(function(e){var t=e.typed,n=e.config,r=e.round;return t("floor",{number:function(e){return Object(a.m)(e,r(e),n.epsilon)?r(e):Math.floor(e)},Complex:function(e){return e.floor()},BigNumber:function(e){return ne(e,r(e),n.epsilon)?r(e):e.floor()},Fraction:function(e){return e.floor()},"Array | Matrix":function(e){return I(e,this,!0)}})})),rt=Object(s.a)("algorithm01",["typed"],(function(e){var t=e.typed;return function(e,n,r,i){var o=e._data,a=e._size,s=e._datatype,u=n._values,l=n._index,c=n._ptr,f=n._size,h=n._datatype;if(a.length!==f.length)throw new M.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?t.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 e.createDenseMatrix({data:v,size:[d,p],datatype:m})}})),it=Object(s.a)("algorithm04",["typed","equalScalar"],(function(e){var t=e.typed,n=e.equalScalar;return function(e,r,i){var o=e._values,a=e._index,s=e._ptr,u=e._size,l=e._datatype,c=r._values,f=r._index,h=r._ptr,d=r._size,p=r._datatype;if(u.length!==d.length)throw new M.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=t.find(n,[m,m]),b=t.convert(0,m),x=t.find(i,[m,m]));for(var w=o&&c?[]:void 0,_=[],S=[],O=o&&c?[]:void 0,N=o&&c?[]:void 0,E=[],C=[],A=0;A<v;A++){S[A]=_.length;for(var k,T,D=A+1,j=s[A],P=s[A+1],I=j;I<P;I++)T=a[I],_.push(T),E[T]=D,O&&(O[T]=o[I]);for(j=h[A],P=h[A+1],I=j;I<P;I++)E[T=f[I]]===D?O&&(y(k=x(O[T],c[I]),b)?E[T]=null:O[T]=k):(_.push(T),C[T]=D,N&&(N[T]=c[I]));if(O&&N)for(I=S[A];I<_.length;)E[T=_[I]]===D?(w[I]=O[T],I++):C[T]===D?(w[I]=N[T],I++):_.splice(I,1)}return S[v]=_.length,e.createSparseMatrix({values:w,index:_,ptr:S,size:[g,v],datatype:m})}})),ot=Object(s.a)("algorithm10",["typed","DenseMatrix"],(function(e){var t=e.typed,n=e.DenseMatrix;return function(e,r,i,o){var a=e._values,s=e._index,u=e._ptr,l=e._size,c=e._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=t.convert(r,f),p=t.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})}})),at=Object(s.a)("algorithm13",["typed"],(function(e){var t=e.typed;return function(e,n,r){var i=e._data,o=e._size,a=e._datatype,s=n._data,u=n._size,l=n._datatype,c=[];if(o.length!==u.length)throw new M.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=t.find(r,[f,f]));var p=0<c.length?function e(t,n,r,i,o,a){var s=[];if(n===r.length-1)for(var u=0;u<i;u++)s[u]=t(o[u],a[u]);else for(var l=0;l<i;l++)s[l]=e(t,n+1,r,r[n+1],o[l],a[l]);return s}(d,0,c,c[0],i,s):[];return e.createDenseMatrix({data:p,size:c,datatype:f})}})),st=Object(s.a)("algorithm14",["typed"],(function(e){var t=e.typed;return function(e,n,r,i){var o,a=e._data,s=e._size,u=e._datatype,l=r;"string"==typeof u&&(o=u,n=t.convert(n,o),l=t.find(r,[o,o]));var c=0<s.length?function e(t,n,r,i,o,a,s){var u=[];if(n===r.length-1)for(var l=0;l<i;l++)u[l]=s?t(a,o[l]):t(o[l],a);else for(var c=0;c<i;c++)u[c]=e(t,n+1,r,r[n+1],o[c],a,s);return u}(l,0,s,s[0],a,n,i):[];return e.createDenseMatrix({data:c,size:Object(A.a)(s),datatype:o})}})),ut=Object(s.a)("gcd",["typed","matrix","equalScalar","BigNumber","DenseMatrix"],(function(e){var t=e.typed,n=e.matrix,r=e.equalScalar,i=e.BigNumber,o=e.DenseMatrix,a=rt({typed:t}),s=it({typed:t,equalScalar:r}),u=ot({typed:t,DenseMatrix:o}),l=at({typed:t}),c=st({typed:t});return t("gcd",{"number, number":Me,"BigNumber, BigNumber":function(e,t){if(!e.isInt()||!t.isInt())throw new Error("Parameters in function gcd must be integer numbers");for(var n=new i(0);!t.isZero();){var r=e.mod(t);e=t,t=r}return e.lt(n)?e.neg():e},"Fraction, Fraction":function(e,t){return e.gcd(t)},"SparseMatrix, SparseMatrix":function(e,t){return s(e,t,this)},"SparseMatrix, DenseMatrix":function(e,t){return a(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return a(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return l(e,t,this)},"Array, Array":function(e,t){return this(n(e),n(t)).valueOf()},"Array, Matrix":function(e,t){return this(n(e),t)},"Matrix, Array":function(e,t){return this(e,n(t))},"SparseMatrix, number | BigNumber":function(e,t){return u(e,t,this,!1)},"DenseMatrix, number | BigNumber":function(e,t){return c(e,t,this,!1)},"number | BigNumber, SparseMatrix":function(e,t){return u(t,e,this,!0)},"number | BigNumber, DenseMatrix":function(e,t){return c(t,e,this,!0)},"Array, number | BigNumber":function(e,t){return c(n(e),t,this,!1).valueOf()},"number | BigNumber, Array":function(e,t){return c(n(t),e,this,!0).valueOf()},"Array | Matrix | number | BigNumber, Array | Matrix | number | BigNumber, ...Array | Matrix | number | BigNumber":function(e,t,n){for(var r=this(e,t),i=0;i<n.length;i++)r=this(r,n[i]);return r}})})),lt=Object(s.a)("algorithm02",["typed","equalScalar"],(function(e){var t=e.typed,n=e.equalScalar;return function(e,r,i,o){var a=e._data,s=e._size,u=e._datatype,l=r._values,c=r._index,f=r._ptr,h=r._size,d=r._datatype;if(s.length!==h.length)throw new M.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=t.find(n,[p,p]),y=t.convert(0,p),b=t.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],E=O;E<N;E++){var C=c[E],A=o?b(l[E],a[C][S]):b(a[C][S],l[E]);v(A,y)||(w.push(C),x.push(A))}}return _[g]=w.length,r.createSparseMatrix({values:x,index:w,ptr:_,size:[m,g],datatype:p})}})),ct=Object(s.a)("algorithm06",["typed","equalScalar"],(function(e){var t=e.typed,n=e.equalScalar;return function(e,r,i){var o=e._values,a=e._size,s=e._datatype,u=r._values,l=r._size,c=r._datatype;if(a.length!==l.length)throw new M.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=t.find(n,[f,f]),m=t.convert(0,f),g=t.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(e,S,w,x,_,O,y,g),F(r,S,w,x,_,O,y,g),x)for(var N=b[S];N<y.length;){var E,C=y[N];_[C]!==O||p(E=x[C],m)?y.splice(N,1):(v.push(E),N++)}else for(var A=b[S];A<y.length;)_[y[A]]!==O?y.splice(A,1):A++}return b[d]=y.length,e.createSparseMatrix({values:v,index:y,ptr:b,size:[h,d],datatype:f})}})),ft=Object(s.a)("algorithm11",["typed","equalScalar"],(function(e){var t=e.typed,n=e.equalScalar;return function(e,r,i,o){var a=e._values,s=e._index,u=e._ptr,l=e._size,c=e._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=t.find(n,[f,f]),m=t.convert(0,f),r=t.convert(r,f),g=t.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,e.createSparseMatrix({values:v,index:y,ptr:b,size:[h,d],datatype:f})}})),ht=Object(s.a)("lcm",["typed","matrix","equalScalar"],(function(e){var t=e.typed,n=e.matrix,r=e.equalScalar,i=lt({typed:t,equalScalar:r}),o=ct({typed:t,equalScalar:r}),a=ft({typed:t,equalScalar:r}),s=at({typed:t}),u=st({typed:t});return t("lcm",{"number, number":ke,"BigNumber, BigNumber":function(e,t){if(!e.isInt()||!t.isInt())throw new Error("Parameters in function lcm must be integer numbers");if(e.isZero())return e;if(t.isZero())return t;for(var n=e.times(t);!t.isZero();){var r=t;t=e.mod(r),e=r}return n.div(e).abs()},"Fraction, Fraction":function(e,t){return e.lcm(t)},"SparseMatrix, SparseMatrix":function(e,t){return o(e,t,this)},"SparseMatrix, DenseMatrix":function(e,t){return i(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return i(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return s(e,t,this)},"Array, Array":function(e,t){return this(n(e),n(t)).valueOf()},"Array, Matrix":function(e,t){return this(n(e),t)},"Matrix, Array":function(e,t){return this(e,n(t))},"SparseMatrix, number | BigNumber":function(e,t){return a(e,t,this,!1)},"DenseMatrix, number | BigNumber":function(e,t){return u(e,t,this,!1)},"number | BigNumber, SparseMatrix":function(e,t){return a(t,e,this,!0)},"number | BigNumber, DenseMatrix":function(e,t){return u(t,e,this,!0)},"Array, number | BigNumber":function(e,t){return u(n(e),t,this,!1).valueOf()},"number | BigNumber, Array":function(e,t){return u(n(t),e,this,!0).valueOf()},"Array | Matrix | number | BigNumber, Array | Matrix | number | BigNumber, ...Array | Matrix | number | BigNumber":function(e,t,n){for(var r=this(e,t),i=0;i<n.length;i++)r=this(r,n[i]);return r}})})),dt=Object(s.a)("log10",["typed","config","Complex"],(function(e){var t=e.typed,n=e.config,r=e.Complex;return t("log10",{number:function(e){return 0<=e||n.predictable?De(e):new r(e,0).log().div(Math.LN10)},Complex:function(e){return new r(e).log().div(Math.LN10)},BigNumber:function(e){return!e.isNegative()||n.predictable?e.log():new r(e.toNumber(),0).log().div(Math.LN10)},"Array | Matrix":function(e){return I(e,this)}})})),pt=Object(s.a)("log2",["typed","config","Complex"],(function(e){var t=e.typed,n=e.config,r=e.Complex;return t("log2",{number:function(e){return 0<=e||n.predictable?je(e):i(new r(e,0))},Complex:i,BigNumber:function(e){return!e.isNegative()||n.predictable?e.log(2):i(new r(e.toNumber(),0))},"Array | Matrix":function(e){return I(e,this)}});function i(e){var t=Math.sqrt(e.re*e.re+e.im*e.im);return new r(Math.log2?Math.log2(t):Math.log(t)/Math.LN2,Math.atan2(e.im,e.re)/Math.LN2)}})),mt=Object(s.a)("algorithm03",["typed"],(function(e){var t=e.typed;return function(e,n,r,i){var o=e._data,a=e._size,s=e._datatype,u=n._values,l=n._index,c=n._ptr,f=n._size,h=n._datatype;if(a.length!==f.length)throw new M.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=t.convert(0,d),v=t.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],E=O;E<N;E++){var C=l[E];x[C]=i?v(u[E],o[C][_]):v(o[C][_],u[E]),w[C]=S}for(var A=0;A<p;A++)w[A]===S?y[A][_]=x[A]:y[A][_]=i?v(g,o[A][_]):v(o[A][_],g)}return e.createDenseMatrix({data:y,size:[p,m],datatype:d})}})),gt=Object(s.a)("algorithm05",["typed","equalScalar"],(function(e){var t=e.typed,n=e.equalScalar;return function(e,r,i){var o=e._values,a=e._index,s=e._ptr,u=e._size,l=e._datatype,c=r._values,f=r._index,h=r._ptr,d=r._size,p=r._datatype;if(u.length!==d.length)throw new M.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=t.find(n,[m,m]),b=t.convert(0,m),x=t.find(i,[m,m]));for(var w,_=o&&c?[]:void 0,S=[],O=[],N=_?[]:void 0,E=_?[]:void 0,C=[],A=[],k=0;k<v;k++){O[k]=S.length;for(var T=k+1,D=s[k],j=s[k+1];D<j;D++)w=a[D],S.push(w),C[w]=T,N&&(N[w]=o[D]);for(D=h[k],j=h[k+1];D<j;D++)C[w=f[D]]!==T&&S.push(w),A[w]=T,E&&(E[w]=c[D]);if(_)for(D=O[k];D<S.length;){var P,I=C[w=S[D]],R=A[w];I!==T&&R!==T||(y(P=x(I===T?N[w]:b,R===T?E[w]:b),b)?S.splice(D,1):(_.push(P),D++))}}return O[v]=S.length,e.createSparseMatrix({values:_,index:S,ptr:O,size:[g,v],datatype:m})}})),vt=Object(s.a)("algorithm12",["typed","DenseMatrix"],(function(e){var t=e.typed,n=e.DenseMatrix;return function(e,r,i,o){var a=e._values,s=e._index,u=e._ptr,l=e._size,c=e._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=t.convert(r,f),p=t.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})}})),yt=Object(s.a)("mod",["typed","matrix","equalScalar","DenseMatrix"],(function(e){var t=e.typed,n=e.matrix,r=e.equalScalar,i=e.DenseMatrix,o=lt({typed:t,equalScalar:r}),a=mt({typed:t}),s=gt({typed:t,equalScalar:r}),u=ft({typed:t,equalScalar:r}),l=vt({typed:t,DenseMatrix:i}),c=at({typed:t}),f=st({typed:t});return t("mod",{"number, number":Pe,"BigNumber, BigNumber":function(e,t){return t.isZero()?e:e.mod(t)},"Fraction, Fraction":function(e,t){return e.mod(t)},"SparseMatrix, SparseMatrix":function(e,t){return s(e,t,this,!1)},"SparseMatrix, DenseMatrix":function(e,t){return o(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return a(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return c(e,t,this)},"Array, Array":function(e,t){return this(n(e),n(t)).valueOf()},"Array, Matrix":function(e,t){return this(n(e),t)},"Matrix, Array":function(e,t){return this(e,n(t))},"SparseMatrix, any":function(e,t){return u(e,t,this,!1)},"DenseMatrix, any":function(e,t){return f(e,t,this,!1)},"any, SparseMatrix":function(e,t){return l(t,e,this,!0)},"any, DenseMatrix":function(e,t){return f(t,e,this,!0)},"Array, any":function(e,t){return f(n(e),t,this,!1).valueOf()},"any, Array":function(e,t){return f(n(t),e,this,!0).valueOf()}})})),bt=Object(s.a)("multiplyScalar",["typed"],(function(e){return(0,e.typed)("multiplyScalar",{"number, number":we,"Complex, Complex":function(e,t){return e.mul(t)},"BigNumber, BigNumber":function(e,t){return e.times(t)},"Fraction, Fraction":function(e,t){return e.mul(t)},"number | Fraction | BigNumber | Complex, Unit":function(e,t){var n=t.clone();return n.value=null===n.value?n._normalize(e):this(n.value,e),n},"Unit, number | Fraction | BigNumber | Complex":function(e,t){var n=e.clone();return n.value=null===n.value?n._normalize(t):this(n.value,t),n},"Unit, Unit":function(e,t){return e.multiply(t)}})})),xt="multiply",wt=Object(s.a)(xt,["typed","matrix","addScalar","multiplyScalar","equalScalar","dot"],(function(e){var t=e.typed,n=e.matrix,i=e.addScalar,o=e.multiplyScalar,a=e.equalScalar,s=e.dot,u=ft({typed:t,equalScalar:a}),l=st({typed:t});function c(e,t){switch(e.length){case 1:switch(t.length){case 1:if(e[0]!==t[0])throw new RangeError("Dimension mismatch in multiplication. Vectors must have the same length");break;case 2:if(e[0]!==t[0])throw new RangeError("Dimension mismatch in multiplication. Vector length ("+e[0]+") must match Matrix rows ("+t[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+t.length+" dimensions)")}break;case 2:switch(t.length){case 1:if(e[1]!==t[0])throw new RangeError("Dimension mismatch in multiplication. Matrix columns ("+e[1]+") must match Vector length ("+t[0]+")");break;case 2:if(e[1]!==t[0])throw new RangeError("Dimension mismatch in multiplication. Matrix A columns ("+e[1]+") must match Matrix B rows ("+t[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+t.length+" dimensions)")}break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix A has "+e.length+" dimensions)")}}var f=t("_multiplyMatrixVector",{"DenseMatrix, any":function(e,n){var r,a=e._data,s=e._size,u=e._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=t.find(i,[r,r]),p=t.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 e.createDenseMatrix({data:m,size:[f],datatype:r})},"SparseMatrix, any":function(e,n){var r=e._values,s=e._index,u=e._ptr,l=e._datatype;if(!r)throw new Error("Cannot multiply Pattern only Matrix times Dense Matrix");var c,f=n._data,h=n._datatype,d=e._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=t.find(i,[c,c]),b=t.find(o,[c,c]),x=t.find(a,[c,c]),w=t.convert(0,c));for(var _=[],S=[],O=v[0]=0;O<p;O++){var N=f[O];if(!x(N,w))for(var E=u[O],C=u[O+1],A=E;A<C;A++){var M=s[A];S[M]?_[M]=y(_[M],b(N,r[A])):(S[M]=!0,g.push(M),_[M]=b(N,r[A]))}}for(var k=g.length,T=0;T<k;T++){var D=g[T];m[T]=_[D]}return v[1]=g.length,e.createSparseMatrix({values:m,index:g,ptr:v,size:[d,1],datatype:c})}}),h=t("_multiplyMatrixMatrix",{"DenseMatrix, DenseMatrix":function(e,n){var r,a=e._data,s=e._size,u=e._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=t.find(i,[r,r]),g=t.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 e.createDenseMatrix({data:v,size:[h,p],datatype:r})},"DenseMatrix, SparseMatrix":function(e,n){var r=e._data,s=e._size,u=e._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=t.find(i,[p,p]),y=t.find(o,[p,p]),b=t.find(a,[p,p]),x=t.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 E=f[N],C=f[N+1];if(E<C)for(var A=0,M=0;M<m;M++){for(var k=M+1,T=void 0,D=E;D<C;D++){var j=c[D];A!==k?(T=y(r[M][j],l[D]),A=k):T=v(T,y(r[M][j],l[D]))}A!==k||b(T,x)||(_.push(M),w.push(T))}}return S[g]=_.length,O},"SparseMatrix, DenseMatrix":function(e,n){var r=e._values,s=e._index,u=e._ptr,l=e._datatype;if(!r)throw new Error("Cannot multiply Pattern only Matrix times Dense Matrix");var c,f=n._data,h=n._datatype,d=e._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=t.find(i,[c,c]),v=t.find(o,[c,c]),y=t.find(a,[c,c]),b=t.convert(0,c));for(var x=[],w=[],_=[],S=e.createSparseMatrix({values:x,index:w,ptr:_,size:[d,m],datatype:c}),O=[],N=[],E=0;E<m;E++){_[E]=w.length;for(var C=E+1,A=0;A<p;A++){var M=f[A][E];if(!y(M,b))for(var k=u[A],T=u[A+1],D=k;D<T;D++){var j=s[D];N[j]!==C?(N[j]=C,w.push(j),O[j]=v(M,r[D])):O[j]=g(O[j],v(M,r[D]))}}for(var P=_[E],I=w.length,R=P;R<I;R++){var L=w[R];x[R]=O[L]}}return _[m]=w.length,S},"SparseMatrix, SparseMatrix":function(e,n){var r,a=e._values,s=e._index,u=e._ptr,l=e._datatype,c=n._values,f=n._index,h=n._ptr,d=n._datatype,p=e._size[0],m=n._size[1],g=a&&c,v=i,y=o;l&&d&&l===d&&"string"==typeof l&&(r=l,v=t.find(i,[r,r]),y=t.find(o,[r,r]));for(var b,x,w,_,S,O,N,E,C=g?[]:void 0,A=[],M=[],k=e.createSparseMatrix({values:C,index:A,ptr:M,size:[p,m],datatype:r}),T=g?[]:void 0,D=[],j=0;j<m;j++){M[j]=A.length;var P=j+1;for(S=h[j],O=h[j+1],_=S;_<O;_++)if(E=f[_],g)for(x=u[E],w=u[E+1],b=x;b<w;b++)D[N=s[b]]!==P?(D[N]=P,A.push(N),T[N]=y(c[_],a[b])):T[N]=v(T[N],y(c[_],a[b]));else for(x=u[E],w=u[E+1],b=x;b<w;b++)D[N=s[b]]!==P&&(D[N]=P,A.push(N));if(g)for(var I=M[j],R=A.length,L=I;L<R;L++){var F=A[L];C[L]=T[F]}}return M[m]=A.length,k}});return t(xt,Object(A.e)({"Array, Array":function(e,t){c(Object(E.a)(e),Object(E.a)(t));var i=this(n(e),n(t));return Object(r.v)(i)?i.valueOf():i},"Matrix, Matrix":function(e,n){var r=e.size(),a=n.size();return c(r,a),1===r.length?1===a.length?function(e,t,n){if(0===n)throw new Error("Cannot multiply two empty vectors");return s(e,t)}(e,n,r[0]):function(e,n){if("dense"!==n.storage())throw new Error("Support for SparseMatrix not implemented");return function(e,n){var r,a=e._data,s=e._size,u=e._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=t.find(i,[r,r]),m=t.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 e.createDenseMatrix({data:g,size:[d],datatype:r})}(e,n)}(e,n):(1===a.length?f:h)(e,n)},"Matrix, Array":function(e,t){return this(e,n(t))},"Array, Matrix":function(e,t){return this(n(e,t.storage()),t)},"SparseMatrix, any":function(e,t){return u(e,t,o,!1)},"DenseMatrix, any":function(e,t){return l(e,t,o,!1)},"any, SparseMatrix":function(e,t){return u(t,e,o,!0)},"any, DenseMatrix":function(e,t){return l(t,e,o,!0)},"Array, any":function(e,t){return l(n(e),t,o,!1).valueOf()},"any, Array":function(e,t){return l(n(t),e,o,!0).valueOf()},"any, any":o,"any, any, ...any":function(e,t,n){for(var r=this(e,t),i=0;i<n.length;i++)r=this(r,n[i]);return r}},o.signatures))})),_t="nthRoot",St=Object(s.a)(_t,["typed","matrix","equalScalar","BigNumber"],(function(e){var t=e.typed,n=e.matrix,r=e.equalScalar,i=e.BigNumber,o=rt({typed:t}),a=lt({typed:t,equalScalar:r}),s=ct({typed:t,equalScalar:r}),u=ft({typed:t,equalScalar:r}),l=at({typed:t}),c=st({typed:t}),f="Complex number not supported in function nthRoot. Use nthRoots instead.";return t(_t,{number:function(e){return Ie(e,2)},"number, number":Ie,BigNumber:function(e){return h(e,new i(2))},Complex:function(){throw new Error(f)},"Complex, number":function(){throw new Error(f)},"BigNumber, BigNumber":h,"Array | Matrix":function(e){return this(e,2)},"SparseMatrix, SparseMatrix":function(e,t){if(1===t.density())return s(e,t,this);throw new Error("Root must be non-zero")},"SparseMatrix, DenseMatrix":function(e,t){return a(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){if(1===t.density())return o(e,t,this,!1);throw new Error("Root must be non-zero")},"DenseMatrix, DenseMatrix":function(e,t){return l(e,t,this)},"Array, Array":function(e,t){return this(n(e),n(t)).valueOf()},"Array, Matrix":function(e,t){return this(n(e),t)},"Matrix, Array":function(e,t){return this(e,n(t))},"SparseMatrix, number | BigNumber":function(e,t){return u(e,t,this,!1)},"DenseMatrix, number | BigNumber":function(e,t){return c(e,t,this,!1)},"number | BigNumber, SparseMatrix":function(e,t){if(1===t.density())return u(t,e,this,!0);throw new Error("Root must be non-zero")},"number | BigNumber, DenseMatrix":function(e,t){return c(t,e,this,!0)},"Array, number | BigNumber":function(e,t){return this(n(e),t).valueOf()},"number | BigNumber, Array":function(e,t){return this(e,n(t)).valueOf()}});function h(e,t){var n=i.precision,r=i.clone({precision:n+2}),o=new i(0),a=new r(1),s=t.isNegative();if(s&&(t=t.neg()),t.isZero())throw new Error("Root must be non-zero");if(e.isNegative()&&!t.abs().mod(2).equals(1))throw new Error("Root must be odd when a is negative.");if(e.isZero())return s?new r(1/0):0;if(!e.isFinite())return s?o:e;var u=e.abs().pow(a.div(t));return u=e.isNeg()?u.neg():u,new i((s?a.div(u):u).toPrecision(n))}})),Ot=Object(s.a)("sign",["typed","BigNumber","Fraction","complex"],(function(e){var t=e.typed,n=e.BigNumber,r=e.complex,i=e.Fraction;return t("sign",{number:Re,Complex:function(e){return 0===e.im?r(Re(e.re)):e.sign()},BigNumber:function(e){return new n(e.cmp(0))},Fraction:function(e){return new i(e.s,1)},"Array | Matrix":function(e){return I(e,this,!0)},Unit:function(e){return this(e.value)}})})),Nt=Object(s.a)("sqrt",["config","typed","Complex"],(function(e){var t=e.config,n=e.typed,r=e.Complex;return n("sqrt",{number:i,Complex:function(e){return e.sqrt()},BigNumber:function(e){return!e.isNegative()||t.predictable?e.sqrt():i(e.toNumber())},"Array | Matrix":function(e){return I(e,this,!0)},Unit:function(e){return e.pow(.5)}});function i(e){return isNaN(e)?NaN:0<=e||t.predictable?Math.sqrt(e):new r(e,0).sqrt()}})),Et=Object(s.a)("square",["typed"],(function(e){return(0,e.typed)("square",{number:Le,Complex:function(e){return e.mul(e)},BigNumber:function(e){return e.times(e)},Fraction:function(e){return e.mul(e)},"Array | Matrix":function(e){return I(e,this,!0)},Unit:function(e){return e.pow(2)}})})),Ct="subtract",At=Object(s.a)(Ct,["typed","matrix","equalScalar","addScalar","unaryMinus","DenseMatrix"],(function(e){var t=e.typed,n=e.matrix,r=e.equalScalar,i=e.addScalar,o=e.unaryMinus,a=e.DenseMatrix,s=rt({typed:t}),u=mt({typed:t}),l=gt({typed:t,equalScalar:r}),c=ot({typed:t,DenseMatrix:a}),f=at({typed:t}),h=st({typed:t});return t(Ct,{"number, number":function(e,t){return e-t},"Complex, Complex":function(e,t){return e.sub(t)},"BigNumber, BigNumber":function(e,t){return e.minus(t)},"Fraction, Fraction":function(e,t){return e.sub(t)},"Unit, Unit":function(e,t){if(null===e.value)throw new Error("Parameter x contains a unit with undefined value");if(null===t.value)throw new Error("Parameter y contains a unit with undefined value");if(!e.equalBase(t))throw new Error("Units do not match");var n=e.clone();return n.value=this(n.value,t.value),n.fixPrefix=!1,n},"SparseMatrix, SparseMatrix":function(e,t){return Mt(e,t),l(e,t,this)},"SparseMatrix, DenseMatrix":function(e,t){return Mt(e,t),u(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return Mt(e,t),s(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return Mt(e,t),f(e,t,this)},"Array, Array":function(e,t){return this(n(e),n(t)).valueOf()},"Array, Matrix":function(e,t){return this(n(e),t)},"Matrix, Array":function(e,t){return this(e,n(t))},"SparseMatrix, any":function(e,t){return c(e,o(t),i)},"DenseMatrix, any":function(e,t){return h(e,t,this)},"any, SparseMatrix":function(e,t){return c(t,e,this,!0)},"any, DenseMatrix":function(e,t){return h(t,e,this,!0)},"Array, any":function(e,t){return h(n(e),t,this,!1).valueOf()},"any, Array":function(e,t){return h(n(t),e,this,!0).valueOf()}})}));function Mt(e,t){var n=e.size(),r=t.size();if(n.length!==r.length)throw new M.a(n.length,r.length)}var kt=Object(s.a)("xgcd",["typed","config","matrix","BigNumber"],(function(e){var t=e.typed,n=e.config,r=e.matrix,i=e.BigNumber;return t("xgcd",{"number, number":function(e,t){var i=Fe(e,t);return"Array"===n.matrix?i:r(i)},"BigNumber, BigNumber":function(e,t){var o,a,s,u,l=new i(0),c=new i(1),f=l,h=c,d=c,p=l;if(!e.isInt()||!t.isInt())throw new Error("Parameters in function xgcd must be integer numbers");for(;!t.isZero();)a=e.div(t).floor(),s=e.mod(t),o=f,f=h.minus(a.times(f)),h=o,o=d,d=p.minus(a.times(d)),p=o,e=t,t=s;return u=e.lt(l)?[e.neg(),h.neg(),p.neg()]:[e,e.isZero()?0:h,p],"Array"===n.matrix?u:r(u)}})})),Tt=Object(s.a)("algorithm09",["typed","equalScalar"],(function(e){var t=e.typed,n=e.equalScalar;return function(e,r,i){var o=e._values,a=e._index,s=e._ptr,u=e._size,l=e._datatype,c=r._values,f=r._index,h=r._ptr,d=r._size,p=r._datatype;if(u.length!==d.length)throw new M.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=t.find(n,[m,m]),b=t.convert(0,m),x=t.find(i,[m,m]));for(var w,_,S,O=o&&c?[]:void 0,N=[],E=[],C=O?[]:void 0,A=[],k=0;k<v;k++){E[k]=N.length;var T=k+1;if(C)for(_=h[k],S=h[k+1],w=_;w<S;w++)A[P=f[w]]=T,C[P]=c[w];for(_=s[k],S=s[k+1],w=_;w<S;w++){var D,j,P=a[w];C?(D=A[P]===T?C[P]:b,y(j=x(o[w],D),b)||(N.push(P),O.push(j))):N.push(P)}}return E[v]=N.length,e.createSparseMatrix({values:O,index:N,ptr:E,size:[g,v],datatype:m})}})),Dt="dotMultiply",jt=Object(s.a)(Dt,["typed","matrix","equalScalar","multiplyScalar"],(function(e){var t=e.typed,n=e.matrix,r=e.equalScalar,i=e.multiplyScalar,o=lt({typed:t,equalScalar:r}),a=Tt({typed:t,equalScalar:r}),s=ft({typed:t,equalScalar:r}),u=at({typed:t}),l=st({typed:t});return t(Dt,{"any, any":i,"SparseMatrix, SparseMatrix":function(e,t){return a(e,t,i,!1)},"SparseMatrix, DenseMatrix":function(e,t){return o(t,e,i,!0)},"DenseMatrix, SparseMatrix":function(e,t){return o(e,t,i,!1)},"DenseMatrix, DenseMatrix":function(e,t){return u(e,t,i)},"Array, Array":function(e,t){return this(n(e),n(t)).valueOf()},"Array, Matrix":function(e,t){return this(n(e),t)},"Matrix, Array":function(e,t){return this(e,n(t))},"SparseMatrix, any":function(e,t){return s(e,t,i,!1)},"DenseMatrix, any":function(e,t){return l(e,t,i,!1)},"any, SparseMatrix":function(e,t){return s(t,e,i,!0)},"any, DenseMatrix":function(e,t){return l(t,e,i,!0)},"Array, any":function(e,t){return l(n(e),t,i,!1).valueOf()},"any, Array":function(e,t){return l(n(t),e,i,!0).valueOf()}})}));function Pt(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function bitAnd");var n=e.constructor;if(e.isNaN()||t.isNaN())return new n(NaN);if(e.isZero()||t.eq(-1)||e.eq(t))return e;if(t.isZero()||e.eq(-1))return t;if(!e.isFinite()||!t.isFinite()){if(!e.isFinite()&&!t.isFinite())return e.isNegative()===t.isNegative()?e:new n(0);if(!e.isFinite())return t.isNegative()?e:e.isNegative()?new n(0):t;if(!t.isFinite())return e.isNegative()?t:t.isNegative()?new n(0):e}return Lt(e,t,(function(e,t){return e&t}))}function It(e){if(e.isFinite()&&!e.isInteger())throw new Error("Integer expected in function bitNot");var t=e.constructor,n=t.precision;t.config({precision:1e9});var r=e.plus(new t(1));return r.s=-r.s||null,t.config({precision:n}),r}function Rt(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function bitOr");var n=e.constructor;if(e.isNaN()||t.isNaN())return new n(NaN);var r=new n(-1);return e.isZero()||t.eq(r)||e.eq(t)?t:t.isZero()||e.eq(r)?e:e.isFinite()&&t.isFinite()?Lt(e,t,(function(e,t){return e|t})):!e.isFinite()&&!e.isNegative()&&t.isNegative()||e.isNegative()&&!t.isNegative()&&!t.isFinite()?r:e.isNegative()&&t.isNegative()?e.isFinite()?e:t:e.isFinite()?t:e}function Lt(e,t,n){var r,i,o,a,s,u=e.constructor,l=+(e.s<0),c=+(t.s<0);if(l){r=Ft(It(e));for(var f=0;f<r.length;++f)r[f]^=1}else r=Ft(e);if(c){i=Ft(It(t));for(var h=0;h<i.length;++h)i[h]^=1}else i=Ft(t);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 Ft(e){for(var t=e.d,n=t[0]+"",r=1;r<t.length;++r){for(var i=t[r]+"",o=7-i.length;o--;)i="0"+i;n+=i}for(var a=n.length;"0"===n.charAt(a);)a--;var s=e.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 Bt(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function bitXor");var n=e.constructor;if(e.isNaN()||t.isNaN())return new n(NaN);if(e.isZero())return t;if(t.isZero())return e;if(e.eq(t))return new n(0);var r=new n(-1);return e.eq(r)?It(t):t.eq(r)?It(e):e.isFinite()&&t.isFinite()?Lt(e,t,(function(e,t){return e^t})):e.isFinite()||t.isFinite()?new n(e.isNegative()===t.isNegative()?1/0:-1/0):r}function qt(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function leftShift");var n=e.constructor;return e.isNaN()||t.isNaN()||t.isNegative()&&!t.isZero()?new n(NaN):e.isZero()||t.isZero()?e:e.isFinite()||t.isFinite()?t.lt(55)?e.times(Math.pow(2,t.toNumber())+""):e.times(new n(2).pow(t)):new n(NaN)}function zt(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function rightArithShift");var n=e.constructor;return e.isNaN()||t.isNaN()||t.isNegative()&&!t.isZero()?new n(NaN):e.isZero()||t.isZero()?e:t.isFinite()?t.lt(55)?e.div(Math.pow(2,t.toNumber())+"").floor():e.div(new n(2).pow(t)).floor():e.isNegative()?new n(-1):e.isFinite()?new n(0):new n(NaN)}var Ht="number, number";function Ut(e,t){if(!Object(a.i)(e)||!Object(a.i)(t))throw new Error("Integers expected in function bitAnd");return e&t}function Wt(e){if(!Object(a.i)(e))throw new Error("Integer expected in function bitNot");return~e}function Vt(e,t){if(!Object(a.i)(e)||!Object(a.i)(t))throw new Error("Integers expected in function bitOr");return e|t}function $t(e,t){if(!Object(a.i)(e)||!Object(a.i)(t))throw new Error("Integers expected in function bitXor");return e^t}function Yt(e,t){if(!Object(a.i)(e)||!Object(a.i)(t))throw new Error("Integers expected in function leftShift");return e<<t}function Zt(e,t){if(!Object(a.i)(e)||!Object(a.i)(t))throw new Error("Integers expected in function rightArithShift");return e>>t}function Gt(e,t){if(!Object(a.i)(e)||!Object(a.i)(t))throw new Error("Integers expected in function rightLogShift");return e>>>t}Ut.signature=Ht,Wt.signature="number",Gt.signature=Zt.signature=Yt.signature=$t.signature=Vt.signature=Ht;var Kt=Object(s.a)("bitAnd",["typed","matrix","equalScalar"],(function(e){var t=e.typed,n=e.matrix,r=e.equalScalar,i=lt({typed:t,equalScalar:r}),o=ct({typed:t,equalScalar:r}),a=ft({typed:t,equalScalar:r}),s=at({typed:t}),u=st({typed:t});return t("bitAnd",{"number, number":Ut,"BigNumber, BigNumber":Pt,"SparseMatrix, SparseMatrix":function(e,t){return o(e,t,this,!1)},"SparseMatrix, DenseMatrix":function(e,t){return i(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return i(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return s(e,t,this)},"Array, Array":function(e,t){return this(n(e),n(t)).valueOf()},"Array, Matrix":function(e,t){return this(n(e),t)},"Matrix, Array":function(e,t){return this(e,n(t))},"SparseMatrix, any":function(e,t){return a(e,t,this,!1)},"DenseMatrix, any":function(e,t){return u(e,t,this,!1)},"any, SparseMatrix":function(e,t){return a(t,e,this,!0)},"any, DenseMatrix":function(e,t){return u(t,e,this,!0)},"Array, any":function(e,t){return u(n(e),t,this,!1).valueOf()},"any, Array":function(e,t){return u(n(t),e,this,!0).valueOf()}})})),Xt=Object(s.a)("bitNot",["typed"],(function(e){return(0,e.typed)("bitNot",{number:Wt,BigNumber:It,"Array | Matrix":function(e){return I(e,this)}})})),Jt=Object(s.a)("bitOr",["typed","matrix","equalScalar","DenseMatrix"],(function(e){var t=e.typed,n=e.matrix,r=e.equalScalar,i=e.DenseMatrix,o=rt({typed:t}),a=it({typed:t,equalScalar:r}),s=ot({typed:t,DenseMatrix:i}),u=at({typed:t}),l=st({typed:t});return t("bitOr",{"number, number":Vt,"BigNumber, BigNumber":Rt,"SparseMatrix, SparseMatrix":function(e,t){return a(e,t,this)},"SparseMatrix, DenseMatrix":function(e,t){return o(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return o(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return u(e,t,this)},"Array, Array":function(e,t){return this(n(e),n(t)).valueOf()},"Array, Matrix":function(e,t){return this(n(e),t)},"Matrix, Array":function(e,t){return this(e,n(t))},"SparseMatrix, any":function(e,t){return s(e,t,this,!1)},"DenseMatrix, any":function(e,t){return l(e,t,this,!1)},"any, SparseMatrix":function(e,t){return s(t,e,this,!0)},"any, DenseMatrix":function(e,t){return l(t,e,this,!0)},"Array, any":function(e,t){return l(n(e),t,this,!1).valueOf()},"any, Array":function(e,t){return l(n(t),e,this,!0).valueOf()}})})),Qt=Object(s.a)("algorithm07",["typed","DenseMatrix"],(function(e){var t=e.typed,n=e.DenseMatrix;return function(e,i,o){var a=e._size,s=e._datatype,u=i._size,l=i._datatype;if(a.length!==u.length)throw new M.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=t.convert(0,c),p=t.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(e,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(e,t,n,r,i){for(var o=e._values,a=e._index,s=e._ptr,u=s[t],l=s[t+1];u<l;u++){var c=a[u];n[c]=i,r[c]=o[u]}}})),en=Object(s.a)("bitXor",["typed","matrix","DenseMatrix"],(function(e){var t=e.typed,n=e.matrix,r=e.DenseMatrix,i=mt({typed:t}),o=Qt({typed:t,DenseMatrix:r}),a=vt({typed:t,DenseMatrix:r}),s=at({typed:t}),u=st({typed:t});return t("bitXor",{"number, number":$t,"BigNumber, BigNumber":Bt,"SparseMatrix, SparseMatrix":function(e,t){return o(e,t,this)},"SparseMatrix, DenseMatrix":function(e,t){return i(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return i(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return s(e,t,this)},"Array, Array":function(e,t){return this(n(e),n(t)).valueOf()},"Array, Matrix":function(e,t){return this(n(e),t)},"Matrix, Array":function(e,t){return this(e,n(t))},"SparseMatrix, any":function(e,t){return a(e,t,this,!1)},"DenseMatrix, any":function(e,t){return u(e,t,this,!1)},"any, SparseMatrix":function(e,t){return a(t,e,this,!0)},"any, DenseMatrix":function(e,t){return u(t,e,this,!0)},"Array, any":function(e,t){return u(n(e),t,this,!1).valueOf()},"any, Array":function(e,t){return u(n(t),e,this,!0).valueOf()}})})),tn=Object(s.a)("arg",["typed"],(function(e){return(0,e.typed)("arg",{number:function(e){return Math.atan2(0,e)},BigNumber:function(e){return e.constructor.atan2(0,e)},Complex:function(e){return e.arg()},"Array | Matrix":function(e){return I(e,this)}})})),nn=Object(s.a)("conj",["typed"],(function(e){return(0,e.typed)("conj",{number:function(e){return e},BigNumber:function(e){return e},Complex:function(e){return e.conjugate()},"Array | Matrix":function(e){return I(e,this)}})})),rn=Object(s.a)("im",["typed"],(function(e){return(0,e.typed)("im",{number:function(){return 0},BigNumber:function(e){return e.mul(0)},Complex:function(e){return e.im},"Array | Matrix":function(e){return I(e,this)}})})),on=Object(s.a)("re",["typed"],(function(e){return(0,e.typed)("re",{number:function(e){return e},BigNumber:function(e){return e},Complex:function(e){return e.re},"Array | Matrix":function(e){return I(e,this)}})}));function an(e){return!e}function sn(e,t){return!(!e&&!t)}function un(e,t){return!!e!=!!t}function ln(e,t){return!(!e||!t)}an.signature="number",ln.signature=un.signature=sn.signature="number, number";var cn=Object(s.a)("not",["typed"],(function(e){return(0,e.typed)("not",{number:an,Complex:function(e){return 0===e.re&&0===e.im},BigNumber:function(e){return e.isZero()||e.isNaN()},Unit:function(e){return null===e.value||this(e.value)},"Array | Matrix":function(e){return I(e,this)}})})),fn=Object(s.a)("or",["typed","matrix","equalScalar","DenseMatrix"],(function(e){var t=e.typed,n=e.matrix,r=e.equalScalar,i=e.DenseMatrix,o=mt({typed:t}),a=gt({typed:t,equalScalar:r}),s=vt({typed:t,DenseMatrix:i}),u=at({typed:t}),l=st({typed:t});return t("or",{"number, number":sn,"Complex, Complex":function(e,t){return 0!==e.re||0!==e.im||0!==t.re||0!==t.im},"BigNumber, BigNumber":function(e,t){return!e.isZero()&&!e.isNaN()||!t.isZero()&&!t.isNaN()},"Unit, Unit":function(e,t){return this(e.value||0,t.value||0)},"SparseMatrix, SparseMatrix":function(e,t){return a(e,t,this)},"SparseMatrix, DenseMatrix":function(e,t){return o(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return o(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return u(e,t,this)},"Array, Array":function(e,t){return this(n(e),n(t)).valueOf()},"Array, Matrix":function(e,t){return this(n(e),t)},"Matrix, Array":function(e,t){return this(e,n(t))},"SparseMatrix, any":function(e,t){return s(e,t,this,!1)},"DenseMatrix, any":function(e,t){return l(e,t,this,!1)},"any, SparseMatrix":function(e,t){return s(t,e,this,!0)},"any, DenseMatrix":function(e,t){return l(t,e,this,!0)},"Array, any":function(e,t){return l(n(e),t,this,!1).valueOf()},"any, Array":function(e,t){return l(n(t),e,this,!0).valueOf()}})})),hn=Object(s.a)("xor",["typed","matrix","DenseMatrix"],(function(e){var t=e.typed,n=e.matrix,r=e.DenseMatrix,i=mt({typed:t}),o=Qt({typed:t,DenseMatrix:r}),a=vt({typed:t,DenseMatrix:r}),s=at({typed:t}),u=st({typed:t});return t("xor",{"number, number":un,"Complex, Complex":function(e,t){return(0!==e.re||0!==e.im)!=(0!==t.re||0!==t.im)},"BigNumber, BigNumber":function(e,t){return(!e.isZero()&&!e.isNaN())!=(!t.isZero()&&!t.isNaN())},"Unit, Unit":function(e,t){return this(e.value||0,t.value||0)},"SparseMatrix, SparseMatrix":function(e,t){return o(e,t,this)},"SparseMatrix, DenseMatrix":function(e,t){return i(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return i(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return s(e,t,this)},"Array, Array":function(e,t){return this(n(e),n(t)).valueOf()},"Array, Matrix":function(e,t){return this(n(e),t)},"Matrix, Array":function(e,t){return this(e,n(t))},"SparseMatrix, any":function(e,t){return a(e,t,this,!1)},"DenseMatrix, any":function(e,t){return u(e,t,this,!1)},"any, SparseMatrix":function(e,t){return a(t,e,this,!0)},"any, DenseMatrix":function(e,t){return u(t,e,this,!0)},"Array, any":function(e,t){return u(n(e),t,this,!1).valueOf()},"any, Array":function(e,t){return u(n(t),e,this,!0).valueOf()}})})),dn=Object(s.a)("concat",["typed","matrix","isInteger"],(function(e){var t=e.typed,n=e.matrix,i=e.isInteger;return t("concat",{"...Array | Matrix | number | BigNumber":function(e){for(var t,o=e.length,a=-1,s=!1,u=[],l=0;l<o;l++){var c=e[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(t=a,a=c.valueOf(),!i(a))throw new TypeError("Integer number expected for dimension");if(a<0||0<l&&t<a)throw new D.a(a,t+1)}else{var f=Object(A.a)(c).valueOf(),h=Object(E.a)(f);if(u[l]=f,t=a,a=h.length-1,0<l&&a!==t)throw new M.a(t+1,a+1)}}if(0===u.length)throw new SyntaxError("At least one matrix expected");for(var d=u.shift();u.length;)d=function e(t,n,r,i){if(i<r){if(t.length!==n.length)throw new M.a(t.length,n.length);for(var o=[],a=0;a<t.length;a++)o[a]=e(t[a],n[a],r,i+1);return o}return t.concat(n)}(d,u.shift(),a,0);return s?n(d):d},"...string":function(e){return e.join("")}})})),pn=Object(s.a)("column",["typed","Index","matrix","range"],(function(e){var t=e.typed,n=e.Index,r=e.matrix,i=e.range;return t("column",{"Matrix, number":o,"Array, number":function(e,t){return o(r(Object(A.a)(e)),t).valueOf()}});function o(e,t){if(2!==e.size().length)throw new Error("Only two dimensional matrix is supported");Object(E.q)(t,e.size()[1]);var r=i(0,e.size()[0]),o=new n(r,t);return e.subset(o)}})),mn=Object(s.a)("cross",["typed","matrix","subtract","multiply"],(function(e){var t=e.typed,n=e.matrix,r=e.subtract,i=e.multiply;return t("cross",{"Matrix, Matrix":function(e,t){return n(o(e.toArray(),t.toArray()))},"Matrix, Array":function(e,t){return n(o(e.toArray(),t))},"Array, Matrix":function(e,t){return n(o(e,t.toArray()))},"Array, Array":o});function o(e,t){var n=Math.max(Object(E.a)(e).length,Object(E.a)(t).length);e=Object(E.n)(e),t=Object(E.n)(t);var o=Object(E.a)(e),a=Object(E.a)(t);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(e[1],t[2]),i(e[2],t[1])),r(i(e[2],t[0]),i(e[0],t[2])),r(i(e[0],t[1]),i(e[1],t[0]))];return 1<n?[s]:s}})),gn=Object(s.a)("diag",["typed","matrix","DenseMatrix","SparseMatrix"],(function(e){var t=e.typed,n=e.matrix,i=e.DenseMatrix,o=e.SparseMatrix;return t("diag",{Array:function(e){return s(e,0,Object(E.a)(e),null)},"Array, number":function(e,t){return s(e,t,Object(E.a)(e),null)},"Array, BigNumber":function(e,t){return s(e,t.toNumber(),Object(E.a)(e),null)},"Array, string":function(e,t){return s(e,0,Object(E.a)(e),t)},"Array, number, string":function(e,t,n){return s(e,t,Object(E.a)(e),n)},"Array, BigNumber, string":function(e,t,n){return s(e,t.toNumber(),Object(E.a)(e),n)},Matrix:function(e){return s(e,0,e.size(),e.storage())},"Matrix, number":function(e,t){return s(e,t,e.size(),e.storage())},"Matrix, BigNumber":function(e,t){return s(e,t.toNumber(),e.size(),e.storage())},"Matrix, string":function(e,t){return s(e,0,e.size(),t)},"Matrix, number, string":function(e,t,n){return s(e,t,e.size(),n)},"Matrix, BigNumber, string":function(e,t,n){return s(e,t.toNumber(),e.size(),n)}});function s(e,t,s,u){if(!Object(a.i)(t))throw new TypeError("Second parameter in function diag must be an integer");var l=0<t?t:0,c=t<0?-t:0;switch(s.length){case 1:return function(e,t,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,e,t):i.diagonal(u,e,t);return null!==n?l:l.valueOf()}(e,t,u,s[0],c,l);case 2:return function(e,t,i,o,a,s){if(Object(r.v)(e)){var u=e.diagonal(t);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]=e[f+a][f+s];return null!==i?n(c):c}(e,t,u,s,c,l)}throw new RangeError("Matrix for function diag must be 2 dimensional")}}));function vn(e){return(vn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function yn(e,t){return function n(){"object"!==vn(n.cache)&&(n.cache={});for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=t?t(r):JSON.stringify(r);return o in n.cache||(n.cache[o]=e.apply(e,r)),n.cache[o]}}function bn(e){return Object.keys(e.signatures||{}).reduce((function(e,t){var n=(t.match(/,/g)||[]).length+1;return Math.max(e,n)}),-1)}var xn=Object(s.a)("filter",["typed"],(function(e){return(0,e.typed)("filter",{"Array, function":wn,"Matrix, function":function(e,t){return e.create(wn(e.toArray(),t))},"Array, RegExp":E.d,"Matrix, RegExp":function(e,t){return e.create(Object(E.d)(e.toArray(),t))}})}));function wn(e,t){var n=bn(t);return Object(E.c)(e,(function(e,r,i){return 1===n?t(e):2===n?t(e,[r]):t(e,[r],i)}))}var _n="flatten",Sn=Object(s.a)(_n,["typed","matrix"],(function(e){var t=e.typed,n=e.matrix;return t(_n,{Array:function(e){return Object(E.e)(Object(A.a)(e))},Matrix:function(e){var t=Object(E.e)(Object(A.a)(e.toArray()));return n(t)}})})),On="forEach",Nn=Object(s.a)(On,["typed"],(function(e){return(0,e.typed)(On,{"Array, function":En,"Matrix, function":function(e,t){return e.forEach(t)}})}));function En(e,t){var n=bn(t);!function r(i,o){Array.isArray(i)?Object(E.f)(i,(function(e,t){r(e,o.concat(t))})):1===n?t(i):2===n?t(i,o):t(i,o,e)}(e,[])}var Cn="getMatrixDataType",An=Object(s.a)(Cn,["typed"],(function(e){return(0,e.typed)(Cn,{Array:function(e){return Object(E.h)(e,r.M)},Matrix:function(e){return e.getDataType()}})})),Mn="identity",kn=Object(s.a)(Mn,["typed","config","matrix","BigNumber","DenseMatrix","SparseMatrix"],(function(e){var t=e.typed,n=e.config,i=e.matrix,o=e.BigNumber,s=e.DenseMatrix,u=e.SparseMatrix;return t(Mn,{"":function(){return"Matrix"===n.matrix?i([]):[]},string:function(e){return i(e)},"number | BigNumber":function(e){return c(e,e,"Matrix"===n.matrix?"dense":void 0)},"number | BigNumber, string":function(e,t){return c(e,e,t)},"number | BigNumber, number | BigNumber":function(e,t){return c(e,t,"Matrix"===n.matrix?"dense":void 0)},"number | BigNumber, number | BigNumber, string":c,Array:function(e){return l(e)},"Array, string":l,Matrix:function(e){return l(e.valueOf(),e.storage())},"Matrix, string":function(e,t){return l(e.valueOf(),t)}});function l(e,t){switch(e.length){case 0:return t?i(t):[];case 1:return c(e[0],e[0],t);case 2:return c(e[0],e[1],t);default:throw new Error("Vector containing two values expected")}}function c(e,t,n){var i=Object(r.e)(e)||Object(r.e)(t)?o:null;if(Object(r.e)(e)&&(e=e.toNumber()),Object(r.e)(t)&&(t=t.toNumber()),!Object(a.i)(e)||e<1)throw new Error("Parameters in function identity must be positive integers");if(!Object(a.i)(t)||t<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=[e,t];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(E.m)([],f,c),d=e<t?e:t,p=0;p<d;p++)h[p][p]=l;return h}})),Tn=Object(s.a)("kron",["typed","matrix","multiplyScalar"],(function(e){var t=e.typed,n=e.matrix,r=e.multiplyScalar;return t("kron",{"Matrix, Matrix":function(e,t){return n(i(e.toArray(),t.toArray()))},"Matrix, Array":function(e,t){return n(i(e.toArray(),t))},"Array, Matrix":function(e,t){return n(i(e,t.toArray()))},"Array, Array":i});function i(e,t){if(1===Object(E.a)(e).length&&(e=[e]),1===Object(E.a)(t).length&&(t=[t]),2<Object(E.a)(e).length||2<Object(E.a)(t).length)throw new RangeError("Vectors with dimensions greater then 2 are not supported expected (Size x = "+JSON.stringify(e.length)+", y = "+JSON.stringify(t.length)+")");var n=[],i=[];return e.map((function(e){return t.map((function(t){return i=[],n.push(i),e.map((function(e){return t.map((function(t){return i.push(r(e,t))}))}))}))}))&&n}})),Dn=Object(s.a)("map",["typed"],(function(e){return(0,e.typed)("map",{"Array, function":jn,"Matrix, function":function(e,t){return e.map(t)}})}));function jn(e,t){var n=bn(t);return function r(i,o){return Array.isArray(i)?i.map((function(e,t){return r(e,o.concat(t))})):1===n?t(i):2===n?t(i,o):t(i,o,e)}(e,[])}var Pn=Object(s.a)("ones",["typed","config","matrix","BigNumber"],(function(e){var t=e.typed,n=e.config,i=e.matrix,o=e.BigNumber;return t("ones",{"":function(){return"Array"===n.matrix?s([]):s([],"default")},"...number | BigNumber | string":function(e){if("string"!=typeof e[e.length-1])return"Array"===n.matrix?s(e):s(e,"default");var t=e.pop();return s(e,t)},Array:s,Matrix:function(e){var t=e.storage();return s(e.valueOf(),t)},"Array | Matrix, string":function(e,t){return s(e.valueOf(),t)}});function s(e,t){var n,s=(n=!1,e.forEach((function(e,t,i){Object(r.e)(e)&&(n=!0,i[t]=e.toNumber())})),n?new o(1):1);if(e.forEach((function(e){if("number"!=typeof e||!Object(a.i)(e)||e<0)throw new Error("Parameters in function ones must be positive integers")})),t){var u=i(t);return 0<e.length?u.resize(e,s):u}var l=[];return 0<e.length?Object(E.m)(l,e,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(e){var t=e.typed,n=e.config,r=e.matrix,i=e.bignumber,o=e.smaller,a=e.smallerEq,s=e.larger,u=e.largerEq;return t("range",{string:c,"string, boolean":c,"number, number":function(e,t){return l(f(e,t,1))},"number, number, number":function(e,t,n){return l(f(e,t,n))},"number, number, boolean":function(e,t,n){return l((n?h:f)(e,t,1))},"number, number, number, boolean":function(e,t,n,r){return l((r?h:f)(e,t,n))},"BigNumber, BigNumber":function(e,t){return l(d(e,t,new e.constructor(1)))},"BigNumber, BigNumber, BigNumber":function(e,t,n){return l(d(e,t,n))},"BigNumber, BigNumber, boolean":function(e,t,n){return l((n?p:d)(e,t,new(0,e.constructor)(1)))},"BigNumber, BigNumber, BigNumber, boolean":function(e,t,n,r){return l((r?p:d)(e,t,n))}});function l(e){return"Matrix"===n.matrix?r?r(e):Ln():e}function c(e,t){var r=function(e){var t=e.split(":").map((function(e){return Number(e)}));if(t.some((function(e){return isNaN(e)})))return null;switch(t.length){case 2:return{start:t[0],end:t[1],step:1};case 3:return{start:t[0],end:t[2],step:t[1]};default:return null}}(e);if(!r)throw new SyntaxError('String "'+e+'" is no valid range');return"BigNumber"===n.number?(void 0===i&&In(),l((t?p:d)(i(r.start),i(r.end),i(r.step)))):l((t?h:f)(r.start,r.end,r.step))}function f(e,t,n){var r=[],i=e;if(0<n)for(;o(i,t);)r.push(i),i+=n;else if(n<0)for(;s(i,t);)r.push(i),i+=n;return r}function h(e,t,n){var r=[],i=e;if(0<n)for(;a(i,t);)r.push(i),i+=n;else if(n<0)for(;u(i,t);)r.push(i),i+=n;return r}function d(e,t,n){var r=i(0),a=[],u=e;if(n.gt(r))for(;o(u,t);)a.push(u),u=u.plus(n);else if(n.lt(r))for(;s(u,t);)a.push(u),u=u.plus(n);return a}function p(e,t,n){var r=i(0),o=[],s=e;if(n.gt(r))for(;a(s,t);)o.push(s),s=s.plus(n);else if(n.lt(r))for(;u(s,t);)o.push(s),s=s.plus(n);return o}})),Bn="reshape",qn=Object(s.a)(Bn,["typed","isInteger","matrix"],(function(e){var t=e.typed,n=e.isInteger,r=e.matrix;return t(Bn,{"Matrix, Array":function(e,t){return e.reshape?e.reshape(t):r(Object(E.l)(e.valueOf(),t))},"Array, Array":function(e,t){return t.forEach((function(e){if(!n(e))throw new TypeError("Invalid size for dimension: "+e)})),Object(E.l)(e,t)}})})),zn=n(12),Hn=Object(s.a)("resize",["config","matrix"],(function(e){var t=e.config,n=e.matrix;return function(e,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(e){return Object(r.e)(e)?e.toNumber():e}))),Object(r.v)(e))return e.resize(i,o,!0);if("string"==typeof e)return function(e,t,n){if(void 0!==n){if("string"!=typeof n||1!==n.length)throw new TypeError("Single character expected as defaultValue")}else n=" ";if(1!==t.length)throw new M.a(t.length,1);var r=t[0];if("number"!=typeof r||!Object(a.i)(r))throw new TypeError("Invalid size, must contain positive integers (size: "+Object(C.d)(t)+")");if(e.length>r)return e.substring(0,r);if(e.length<r){for(var i=e,o=0,s=r-e.length;o<s;o++)i+=n;return i}return e}(e,i,o);var s=!Array.isArray(e)&&"Array"!==t.matrix;if(0===i.length){for(;Array.isArray(e);)e=e[0];return Object(A.a)(e)}Array.isArray(e)||(e=[e]),e=Object(A.a)(e);var u=Object(E.m)(e,i,o);return s?n(u):u}})),Un=Object(s.a)("row",["typed","Index","matrix","range"],(function(e){var t=e.typed,n=e.Index,r=e.matrix,i=e.range;return t("row",{"Matrix, number":o,"Array, number":function(e,t){return o(r(Object(A.a)(e)),t).valueOf()}});function o(e,t){if(2!==e.size().length)throw new Error("Only two dimensional matrix is supported");Object(E.q)(t,e.size()[0]);var r=i(0,e.size()[1]),o=new n(t,r);return e.subset(o)}})),Wn=Object(s.a)("size",["typed","config","?matrix"],(function(e){var t=e.typed,n=e.config,r=e.matrix;return t("size",{Matrix:function(e){return e.create(e.size())},Array:E.a,string:function(e){return"Array"===n.matrix?[e.length]:r([e.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(e){var t=e.typed,n=e.matrix;return t(Vn,{Array:function(e){return Object(E.n)(Object(A.a)(e))},Matrix:function(e){var t=Object(E.n)(e.toArray());return Array.isArray(t)?n(t):t},any:function(e){return Object(A.a)(e)}})}));function Yn(e){return(Yn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Zn(e,t){if(Jn(e)&&Kn(e,t))return e[t];if("function"==typeof e[t]&&Xn(e,t))throw new Error('Cannot access method "'+t+'" as a property');throw new Error('No access to property "'+t+'"')}function Gn(e,t,n){if(Jn(e)&&Kn(e,t))return e[t]=n;throw new Error('No access to property "'+t+'"')}function Kn(e,t){if(e&&"object"===Yn(e)){if(Object(A.f)(Qn,t))return 1;if(!(t in Object.prototype)&&!(t in Function.prototype))return 1}}function Xn(e,t){if(null!=e&&"function"==typeof e[t]&&!(Object(A.f)(e,t)&&Object.getPrototypeOf&&t in Object.getPrototypeOf(e))){if(Object(A.f)(er,t))return 1;if(!(t in Object.prototype)&&!(t in Function.prototype))return 1}}function Jn(e){return"object"===Yn(e)&&e&&e.constructor===Object}var Qn={length:!0,name:!0},er={toString:!0,valueOf:!0,toLocaleString:!0},tr=Object(s.a)("subset",["typed","matrix"],(function(e){var t=e.typed,n=e.matrix;return t("subset",{"Array, Index":function(e,t){var r=n(e).subset(t);return t.isScalar()?r:r.valueOf()},"Matrix, Index":function(e,t){return e.subset(t)},"Object, Index":ir,"string, Index":nr,"Array, Index, any":function(e,t,r){return n(Object(A.a)(e)).subset(t,r,void 0).valueOf()},"Array, Index, any, any":function(e,t,r,i){return n(Object(A.a)(e)).subset(t,r,i).valueOf()},"Matrix, Index, any":function(e,t,n){return e.clone().subset(t,n)},"Matrix, Index, any, any":function(e,t,n,r){return e.clone().subset(t,n,r)},"string, Index, string":rr,"string, Index, string, string":rr,"Object, Index, any":or})}));function nr(e,t){if(!Object(r.t)(t))throw new TypeError("Index expected");if(1!==t.size().length)throw new M.a(t.size().length,1);var n=e.length;Object(E.q)(t.min()[0],n),Object(E.q)(t.max()[0],n);var i=t.dimension(0),o="";return i.forEach((function(t){o+=e.charAt(t)})),o}function rr(e,t,n,r){if(!t||!0!==t.isIndex)throw new TypeError("Index expected");if(1!==t.size().length)throw new M.a(t.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=t.dimension(0);if(i.size()[0]!==n.length)throw new M.a(i.size()[0],n.length);var o=e.length;Object(E.q)(t.min()[0]),Object(E.q)(t.max()[0]);for(var a=[],s=0;s<o;s++)a[s]=e.charAt(s);if(i.forEach((function(e,t){a[e]=n.charAt(t[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(e,t){if(1!==t.size().length)throw new M.a(t.size(),1);var n=t.dimension(0);if("string"!=typeof n)throw new TypeError("String expected as index to retrieve an object property");return Zn(e,n)}function or(e,t,n){if(1!==t.size().length)throw new M.a(t.size(),1);var r=t.dimension(0);if("string"!=typeof r)throw new TypeError("String expected as index to retrieve an object property");var i=Object(A.a)(e);return Gn(i,r,n),i}var ar=Object(s.a)("transpose",["typed","matrix"],(function(e){var t=e.typed,n=e.matrix;return t("transpose",{Array:function(e){return this(n(e)).valueOf()},Matrix:function(e){var t,n=e.size();switch(n.length){case 1:t=e.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(C.d)(n)+")");switch(e.storage()){case"dense":t=function(e,t,n){for(var r,i=e._data,o=[],a=0;a<n;a++){r=o[a]=[];for(var s=0;s<t;s++)r[s]=Object(A.a)(i[s][a])}return e.createDenseMatrix({data:o,size:[n,t],datatype:e._datatype})}(e,r,i);break;case"sparse":t=function(e,t,n){for(var r,i,o,a=e._values,s=e._index,u=e._ptr,l=a?[]:void 0,c=[],f=[],h=[],d=0;d<t;d++)h[d]=0;for(r=0,i=s.length;r<i;r++)h[s[r]]++;for(var p=0,m=0;m<t;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(A.a)(a[y]))}return e.createSparseMatrix({values:l,index:c,ptr:f,size:[n,t],datatype:e._datatype})}(e,r,i)}break;default:throw new RangeError("Matrix must be a vector or two dimensional (size: "+Object(C.d)(this._size)+")")}return t},any:function(e){return Object(A.a)(e)}})})),sr="ctranspose",ur=Object(s.a)(sr,["typed","transpose","conj"],(function(e){var t=e.typed,n=e.transpose,r=e.conj;return t(sr,{any:function(e){return r(n(e))}})})),lr=Object(s.a)("zeros",["typed","config","matrix","BigNumber"],(function(e){var t=e.typed,n=e.config,i=e.matrix,o=e.BigNumber;return t("zeros",{"":function(){return"Array"===n.matrix?s([]):s([],"default")},"...number | BigNumber | string":function(e){if("string"!=typeof e[e.length-1])return"Array"===n.matrix?s(e):s(e,"default");var t=e.pop();return s(e,t)},Array:s,Matrix:function(e){var t=e.storage();return s(e.valueOf(),t)},"Array | Matrix, string":function(e,t){return s(e.valueOf(),t)}});function s(e,t){var n,s=(n=!1,e.forEach((function(e,t,i){Object(r.e)(e)&&(n=!0,i[t]=e.toNumber())})),n?new o(0):0);if(e.forEach((function(e){if("number"!=typeof e||!Object(a.i)(e)||e<0)throw new Error("Parameters in function zeros must be positive integers")})),t){var u=i(t);return 0<e.length?u.resize(e,s):u}var l=[];return 0<e.length?Object(E.m)(l,e,s):l}})),cr=Object(s.a)("erf",["typed"],(function(e){return(0,e.typed)("name",{number:function(e){var t=Math.abs(e);return mr<=t?Object(a.n)(e):t<=fr?Object(a.n)(e)*function(e){var t,n=e*e,r=dr[0][4]*n,i=n;for(t=0;t<3;t+=1)r=(r+dr[0][t])*n,i=(i+pr[0][t])*n;return e*(r+dr[0][3])/(i+pr[0][3])}(t):t<=4?Object(a.n)(e)*(1-function(e){var t,n=dr[1][8]*e,r=e;for(t=0;t<7;t+=1)n=(n+dr[1][t])*e,r=(r+pr[1][t])*e;var i=(n+dr[1][7])/(r+pr[1][7]),o=parseInt(16*e)/16,a=(e-o)*(e+o);return Math.exp(-o*o)*Math.exp(-a)*i}(t)):Object(a.n)(e)*(1-function(e){var t,n=1/(e*e),r=dr[2][5]*n,i=n;for(t=0;t<4;t+=1)r=(r+dr[2][t])*n,i=(i+pr[2][t])*n;var o=n*(r+dr[2][4])/(i+pr[2][4]);o=(hr-o)/e;var a=(e-(n=parseInt(16*e)/16))*(e+n);return Math.exp(-n*n)*Math.exp(-a)*o}(t))},"Array | Matrix":function(e){return I(e,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(e){var t=e.typed,n=e.isNaN,r=e.isNumeric;return t("mode",{"Array | Matrix":i,"...":i});function i(e){if(0===(e=Object(E.e)(e.valueOf())).length)throw new Error("Cannot calculate mode of an empty array");for(var t={},i=[],o=0,a=0;a<e.length;a++){var s=e[a];if(r(s)&&n(s))throw new Error("Cannot calculate mode of an array containing NaN values");s in t||(t[s]=0),t[s]++,t[s]===o?i.push(s):t[s]>o&&(o=t[s],i=[s])}return i}}));function vr(e,t,n){var i;return-1!==String(e).indexOf("Unexpected type")?(i=2<arguments.length?" (type: "+Object(r.M)(n)+", value: "+JSON.stringify(n)+")":" (type: "+e.data.actual+")",new TypeError("Cannot calculate "+t+", unexpected type of argument"+i)):-1!==String(e).indexOf("complex numbers")?(i=2<arguments.length?" (type: "+Object(r.M)(n)+", value: "+JSON.stringify(n)+")":"",new TypeError("Cannot calculate "+t+", no ordering relation is defined for complex numbers"+i)):e}var yr=Object(s.a)("prod",["typed","config","multiplyScalar","numeric"],(function(e){var t=e.typed,n=e.config,r=e.multiplyScalar,i=e.numeric;return t("prod",{"Array | Matrix":o,"Array | Matrix, number | BigNumber":function(){throw new Error("prod(A, dim) is not yet supported")},"...":o});function o(e){var t;if(P(e,(function(e){try{t=void 0===t?e:r(t,e)}catch(t){throw vr(t,"prod",e)}})),"string"==typeof t&&(t=i(t,n.number)),void 0===t)throw new Error("Cannot calculate prod of an empty array");return t}})),br=Object(s.a)("format",["typed"],(function(e){return(0,e.typed)("format",{any:C.d,"any, Object | function | number":C.d})})),xr=Object(s.a)("print",["typed"],(function(e){return(0,e.typed)("print",{"string, Object | Array":wr,"string, Object | Array, number | Object":wr})}));function wr(e,t,n){return e.replace(/\$([\w.]+)/g,(function(e,i){for(var o=i.split("."),a=t[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(C.d)(a,n):e}))}var _r=Object(s.a)("to",["typed","matrix"],(function(e){var t=e.typed,n=e.matrix,r=at({typed:t}),i=st({typed:t});return t("to",{"Unit, Unit | string":function(e,t){return e.to(t)},"Matrix, Matrix":function(e,t){return r(e,t,this)},"Array, Array":function(e,t){return this(n(e),n(t)).valueOf()},"Array, Matrix":function(e,t){return this(n(e),t)},"Matrix, Array":function(e,t){return this(e,n(t))},"Matrix, any":function(e,t){return i(e,t,this,!1)},"any, Matrix":function(e,t){return i(t,e,this,!0)},"Array, any":function(e,t){return i(n(e),t,this,!1).valueOf()},"any, Array":function(e,t){return i(n(t),e,this,!0).valueOf()}})})),Sr="isPrime",Or=Object(s.a)(Sr,["typed"],(function(e){return(0,e.typed)(Sr,{number:function(e){if(0*e!=0)return!1;if(e<=3)return 1<e;if(e%2==0||e%3==0)return!1;for(var t=5;t*t<=e;t+=6)if(e%t==0||e%(t+2)==0)return!1;return!0},BigNumber:function(e){if(0*e.toNumber()!=0)return!1;if(e.lte(3))return e.gt(1);if(e.mod(2).eq(0)||e.mod(3).eq(0))return!1;for(var t=5;e.gte(t*t);t+=6)if(e.mod(t).eq(0)||e.mod(t+2).eq(0))return!1;return!0},"Array | Matrix":function(e){return I(e,this)}})})),Nr=Object(s.a)("numeric",["number","?bignumber","?fraction"],(function(e){var t=e.number,n=e.bignumber,i=e.fraction,o={string:!0,number:!0,BigNumber:!0,Fraction:!0},a={number:function(e){return t(e)},BigNumber:n?function(e){return n(e)}:In,Fraction:i?function(e){return i(e)}:Rn};return function(e,t){var n=Object(r.M)(e);if(!(n in o))throw new TypeError("Cannot convert "+e+' of type "'+n+'"; valid input types are '+Object.keys(o).join(", "));if(!(t in a))throw new TypeError("Cannot convert "+e+' to type "'+t+'"; valid output types are '+Object.keys(a).join(", "));return t===n?e:a[t](e)}})),Er="divideScalar",Cr=Object(s.a)(Er,["typed","numeric"],(function(e){var t=e.typed,n=e.numeric;return t(Er,{"number, number":function(e,t){return e/t},"Complex, Complex":function(e,t){return e.div(t)},"BigNumber, BigNumber":function(e,t){return e.div(t)},"Fraction, Fraction":function(e,t){return e.div(t)},"Unit, number | Fraction | BigNumber":function(e,t){var i=e.clone(),o=n(1,Object(r.M)(t));return i.value=this(null===i.value?i._normalize(o):i.value,t),i},"number | Fraction | BigNumber, Unit":function(e,t){var i=(i=t.clone()).pow(-1),o=n(1,Object(r.M)(e));return i.value=this(e,null===t.value?t._normalize(o):t.value),i},"Unit, Unit":function(e,t){return e.divide(t)}})})),Ar=Object(s.a)("pow",["typed","config","identity","multiply","matrix","fraction","number","Complex"],(function(e){var t=e.typed,n=e.config,r=e.identity,i=e.multiply,o=e.matrix,s=e.number,u=e.fraction,l=e.Complex;return t("pow",{"number, number":c,"Complex, Complex":function(e,t){return e.pow(t)},"BigNumber, BigNumber":function(e,t){return t.isInteger()||0<=e||n.predictable?e.pow(t):new l(e.toNumber(),0).pow(t.toNumber(),0)},"Fraction, Fraction":function(e,t){if(1===t.d)return e.pow(t);if(n.predictable)throw new Error("Function pow does not support non-integer exponents for fractions.");return c(e.valueOf(),t.valueOf())},"Array, number":f,"Array, BigNumber":function(e,t){return f(e,t.toNumber())},"Matrix, number":h,"Matrix, BigNumber":function(e,t){return h(e,t.toNumber())},"Unit, number | BigNumber":function(e,t){return e.pow(t)}});function c(e,t){if(n.predictable&&!Object(a.i)(t)&&e<0)try{var r=u(t),i=s(r);if((t===i||Math.abs((t-i)/t)<1e-14)&&r.d%2==1)return(r.n%2==0?1:-1)*Math.pow(-e,t)}catch(e){}return n.predictable&&(e<-1&&t===1/0||-1<e&&e<0&&t===-1/0)?NaN:Object(a.i)(t)||0<=e||n.predictable?Be(e,t):e*e<1&&t===1/0||1<e*e&&t===-1/0?0:new l(e,0).pow(t,0)}function f(e,t){if(!Object(a.i)(t)||t<0)throw new TypeError("For A^b, b must be a positive integer (value is "+t+")");var n=Object(E.a)(e);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=e;1<=t;)1==(1&t)&&(o=i(s,o)),t>>=1,s=i(s,s);return o}function h(e,t){return o(f(e.valueOf(),t))}}));function Mr(e,t){var n,r=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)),r}function kr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mr(Object(n),!0).forEach((function(t){var r,i,o;r=e,o=n[i=t],i in r?Object.defineProperty(r,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Tr="Number of decimals in function round must be an integer",Dr="round",jr=Object(s.a)(Dr,["typed","matrix","equalScalar","zeros","BigNumber","DenseMatrix"],(function(e){var t=e.typed,n=e.matrix,r=e.equalScalar,i=e.zeros,o=e.BigNumber,a=e.DenseMatrix,s=ft({typed:t,equalScalar:r}),u=vt({typed:t,DenseMatrix:a}),l=st({typed:t});return t(Dr,kr(kr({},Pr),{},{Complex:function(e){return e.round()},"Complex, number":function(e,t){if(t%1)throw new TypeError(Tr);return e.round(t)},"Complex, BigNumber":function(e,t){if(!t.isInteger())throw new TypeError(Tr);var n=t.toNumber();return e.round(n)},"number, BigNumber":function(e,t){if(!t.isInteger())throw new TypeError(Tr);return new o(e).toDecimalPlaces(t.toNumber())},BigNumber:function(e){return e.toDecimalPlaces(0)},"BigNumber, BigNumber":function(e,t){if(!t.isInteger())throw new TypeError(Tr);return e.toDecimalPlaces(t.toNumber())},Fraction:function(e){return e.round()},"Fraction, number":function(e,t){if(t%1)throw new TypeError(Tr);return e.round(t)},"Array | Matrix":function(e){return I(e,this,!0)},"SparseMatrix, number | BigNumber":function(e,t){return s(e,t,this,!1)},"DenseMatrix, number | BigNumber":function(e,t){return l(e,t,this,!1)},"number | Complex | BigNumber, SparseMatrix":function(e,t){return r(e,0)?i(t.size(),t.storage()):u(t,e,this,!0)},"number | Complex | BigNumber, DenseMatrix":function(e,t){return r(e,0)?i(t.size(),t.storage()):l(t,e,this,!0)},"Array, number | BigNumber":function(e,t){return l(n(e),t,this,!1).valueOf()},"number | Complex | BigNumber, Array":function(e,t){return l(n(t),e,this,!0).valueOf()}}))})),Pr={number:qe,"number, number":function(e,t){if(!Object(a.i)(t))throw new TypeError(Tr);if(t<0||15<t)throw new Error("Number of decimals in function round must be in te range of 0-15");return qe(e,t)}},Ir=Object(s.a)("log",["config","typed","divideScalar","Complex"],(function(e){var t=e.typed,n=e.config,r=e.divideScalar,i=e.Complex;return t("log",{number:function(e){return 0<=e||n.predictable?Te(e):new i(e,0).log()},Complex:function(e){return e.log()},BigNumber:function(e){return!e.isNegative()||n.predictable?e.ln():new i(e.toNumber(),0).log()},"Array | Matrix":function(e){return I(e,this)},"any, any":function(e,t){return r(this(e),this(t))}})})),Rr=Object(s.a)("log1p",["typed","config","divideScalar","log","Complex"],(function(e){var t=e.typed,n=e.config,r=e.divideScalar,i=e.log,o=e.Complex;return t("log1p",{number:function(e){return-1<=e||n.predictable?Object(a.k)(e):s(new o(e,0))},Complex:s,BigNumber:function(e){var t=e.plus(1);return!t.isNegative()||n.predictable?t.ln():s(new o(e.toNumber(),0))},"Array | Matrix":function(e){return I(e,this)},"any, any":function(e,t){return r(this(e),i(t))}});function s(e){var t=e.re+1;return new o(Math.log(Math.sqrt(t*t+e.im*e.im)),Math.atan2(e.im,t))}})),Lr="nthRoots",Fr=Object(s.a)(Lr,["config","typed","divideScalar","Complex"],(function(e){var t=e.typed,n=(e.config,e.divideScalar,e.Complex),r=[function(e){return new n(e,0)},function(e){return new n(0,e)},function(e){return new n(-e,0)},function(e){return new n(0,-e)}];function i(e,t){if(t<0)throw new Error("Root must be greater than zero");if(0===t)throw new Error("Root must be non-zero");if(t%1!=0)throw new Error("Root must be an integer");if(0===e||0===e.abs())return[new n(0,0)];var i,o="number"==typeof e;!o&&0!==e.re&&0!==e.im||(i=o?2*(e<0):0===e.im?2*(e.re<0):2*(e.im<0)+1);for(var a=e.arg(),s=e.abs(),u=[],l=Math.pow(s,1/t),c=0;c<t;c++){var f=(i+4*c)/t;f!==Math.round(f)?u.push(new n({r:l,phi:(a+2*Math.PI*c)/t})):u.push(r[f%4](l))}return u}return t(Lr,{Complex:function(e){return i(e,2)},"Complex, number":i})})),Br=Object(s.a)("dotPow",["typed","equalScalar","matrix","pow","DenseMatrix"],(function(e){var t=e.typed,n=e.equalScalar,r=e.matrix,i=e.pow,o=e.DenseMatrix,a=mt({typed:t}),s=Qt({typed:t,DenseMatrix:o}),u=ft({typed:t,equalScalar:n}),l=vt({typed:t,DenseMatrix:o}),c=at({typed:t}),f=st({typed:t});return t("dotPow",{"any, any":i,"SparseMatrix, SparseMatrix":function(e,t){return s(e,t,i,!1)},"SparseMatrix, DenseMatrix":function(e,t){return a(t,e,i,!0)},"DenseMatrix, SparseMatrix":function(e,t){return a(e,t,i,!1)},"DenseMatrix, DenseMatrix":function(e,t){return c(e,t,i)},"Array, Array":function(e,t){return this(r(e),r(t)).valueOf()},"Array, Matrix":function(e,t){return this(r(e),t)},"Matrix, Array":function(e,t){return this(e,r(t))},"SparseMatrix, any":function(e,t){return u(e,t,this,!1)},"DenseMatrix, any":function(e,t){return f(e,t,this,!1)},"any, SparseMatrix":function(e,t){return l(t,e,this,!0)},"any, DenseMatrix":function(e,t){return f(t,e,this,!0)},"Array, any":function(e,t){return f(r(e),t,this,!1).valueOf()},"any, Array":function(e,t){return f(r(t),e,this,!0).valueOf()}})})),qr="dotDivide",zr=Object(s.a)(qr,["typed","matrix","equalScalar","divideScalar","DenseMatrix"],(function(e){var t=e.typed,n=e.matrix,r=e.equalScalar,i=e.divideScalar,o=e.DenseMatrix,a=lt({typed:t,equalScalar:r}),s=mt({typed:t}),u=Qt({typed:t,DenseMatrix:o}),l=ft({typed:t,equalScalar:r}),c=vt({typed:t,DenseMatrix:o}),f=at({typed:t}),h=st({typed:t});return t(qr,{"any, any":i,"SparseMatrix, SparseMatrix":function(e,t){return u(e,t,i,!1)},"SparseMatrix, DenseMatrix":function(e,t){return a(t,e,i,!0)},"DenseMatrix, SparseMatrix":function(e,t){return s(e,t,i,!1)},"DenseMatrix, DenseMatrix":function(e,t){return f(e,t,i)},"Array, Array":function(e,t){return this(n(e),n(t)).valueOf()},"Array, Matrix":function(e,t){return this(n(e),t)},"Matrix, Array":function(e,t){return this(e,n(t))},"SparseMatrix, any":function(e,t){return l(e,t,i,!1)},"DenseMatrix, any":function(e,t){return h(e,t,i,!1)},"any, SparseMatrix":function(e,t){return c(t,e,i,!0)},"any, DenseMatrix":function(e,t){return h(t,e,i,!0)},"Array, any":function(e,t){return h(n(e),t,i,!1).valueOf()},"any, Array":function(e,t){return h(n(t),e,i,!0).valueOf()}})}));function Hr(e){var t=e.DenseMatrix;return function(e,n,i){var o=e.size();if(2!==o.length)throw new RangeError("Matrix must be two dimensional (size: "+Object(C.d)(o)+")");var a,s,u,l=o[0];if(l!==o[1])throw new RangeError("Matrix must be square (size: "+Object(C.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 t({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 t({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 t({data:a,size:[l,1],datatype:n._datatype})}if(Object(r.b)(n)){var g=Object(E.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 t({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 t({data:a,size:[l,1]})}}}var Ur=Object(s.a)("lsolve",["typed","matrix","divideScalar","multiplyScalar","subtract","equalScalar","DenseMatrix"],(function(e){var t=e.typed,n=e.matrix,r=e.divideScalar,i=e.multiplyScalar,o=e.subtract,a=e.equalScalar,s=e.DenseMatrix,u=Hr({DenseMatrix:s});return t("lsolve",{"SparseMatrix, Array | Matrix":function(e,t){for(var n,l,c=(t=u(e,t,!0))._data,f=e._size[0],h=e._size[1],d=e._values,p=e._index,m=e._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(e,t){return l(n(e),t).valueOf()}});function l(e,t){for(var n=(t=u(e,t,!0))._data,l=e._size[0],c=e._size[1],f=[],h=e._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(e){var t=e.typed,n=e.matrix,r=e.divideScalar,i=e.multiplyScalar,o=e.subtract,a=e.equalScalar,s=e.DenseMatrix,u=Hr({DenseMatrix:s});return t("usolve",{"SparseMatrix, Array | Matrix":function(e,t){for(var n,l,c=(t=u(e,t,!0))._data,f=e._size[0],h=e._size[1],d=e._values,p=e._index,m=e._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(e,t){return l(n(e),t).valueOf()}});function l(e,t){for(var n=(t=u(e,t,!0))._data,l=e._size[0],c=e._size[1],f=[],h=e._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(e){var t=e.typed,n=e.equalScalar;return function(e,r,i){var o=e._values,a=e._index,s=e._ptr,u=e._size,l=e._datatype,c=r._values,f=r._index,h=r._ptr,d=r._size,p=r._datatype;if(u.length!==d.length)throw new M.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=t.find(n,[m,m]),b=t.convert(0,m),x=t.find(i,[m,m]));for(var w,_=[],S=[],O=[],N=[],E=[],C=0;C<v;C++){O[C]=S.length;for(var A=C+1,k=s[C],T=s[C+1],D=k;D<T;D++)E[w=a[D]]=A,N[w]=o[D],S.push(w);for(k=h[C],T=h[C+1],D=k;D<T;D++)E[w=f[D]]===A&&(N[w]=x(N[w],c[D]));for(D=O[C];D<S.length;){var j=N[w=S[D]];y(j,b)?S.splice(D,1):(_.push(j),D++)}}return O[v]=S.length,e.createSparseMatrix({values:_,index:S,ptr:O,size:[g,v],datatype:m})}})),$r="leftShift",Yr=Object(s.a)($r,["typed","matrix","equalScalar","zeros","DenseMatrix"],(function(e){var t=e.typed,n=e.matrix,r=e.equalScalar,i=e.zeros,o=e.DenseMatrix,a=rt({typed:t}),s=lt({typed:t,equalScalar:r}),u=Vr({typed:t,equalScalar:r}),l=ot({typed:t,DenseMatrix:o}),c=ft({typed:t,equalScalar:r}),f=at({typed:t}),h=st({typed:t});return t($r,{"number, number":Yt,"BigNumber, BigNumber":qt,"SparseMatrix, SparseMatrix":function(e,t){return u(e,t,this,!1)},"SparseMatrix, DenseMatrix":function(e,t){return s(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return a(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return f(e,t,this)},"Array, Array":function(e,t){return this(n(e),n(t)).valueOf()},"Array, Matrix":function(e,t){return this(n(e),t)},"Matrix, Array":function(e,t){return this(e,n(t))},"SparseMatrix, number | BigNumber":function(e,t){return r(t,0)?e.clone():c(e,t,this,!1)},"DenseMatrix, number | BigNumber":function(e,t){return r(t,0)?e.clone():h(e,t,this,!1)},"number | BigNumber, SparseMatrix":function(e,t){return r(e,0)?i(t.size(),t.storage()):l(t,e,this,!0)},"number | BigNumber, DenseMatrix":function(e,t){return r(e,0)?i(t.size(),t.storage()):h(t,e,this,!0)},"Array, number | BigNumber":function(e,t){return this(n(e),t).valueOf()},"number | BigNumber, Array":function(e,t){return this(e,n(t)).valueOf()}})})),Zr="rightArithShift",Gr=Object(s.a)(Zr,["typed","matrix","equalScalar","zeros","DenseMatrix"],(function(e){var t=e.typed,n=e.matrix,r=e.equalScalar,i=e.zeros,o=e.DenseMatrix,a=rt({typed:t}),s=lt({typed:t,equalScalar:r}),u=Vr({typed:t,equalScalar:r}),l=ot({typed:t,DenseMatrix:o}),c=ft({typed:t,equalScalar:r}),f=at({typed:t}),h=st({typed:t});return t(Zr,{"number, number":Zt,"BigNumber, BigNumber":zt,"SparseMatrix, SparseMatrix":function(e,t){return u(e,t,this,!1)},"SparseMatrix, DenseMatrix":function(e,t){return s(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return a(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return f(e,t,this)},"Array, Array":function(e,t){return this(n(e),n(t)).valueOf()},"Array, Matrix":function(e,t){return this(n(e),t)},"Matrix, Array":function(e,t){return this(e,n(t))},"SparseMatrix, number | BigNumber":function(e,t){return r(t,0)?e.clone():c(e,t,this,!1)},"DenseMatrix, number | BigNumber":function(e,t){return r(t,0)?e.clone():h(e,t,this,!1)},"number | BigNumber, SparseMatrix":function(e,t){return r(e,0)?i(t.size(),t.storage()):l(t,e,this,!0)},"number | BigNumber, DenseMatrix":function(e,t){return r(e,0)?i(t.size(),t.storage()):h(t,e,this,!0)},"Array, number | BigNumber":function(e,t){return this(n(e),t).valueOf()},"number | BigNumber, Array":function(e,t){return this(e,n(t)).valueOf()}})})),Kr="rightLogShift",Xr=Object(s.a)(Kr,["typed","matrix","equalScalar","zeros","DenseMatrix"],(function(e){var t=e.typed,n=e.matrix,r=e.equalScalar,i=e.zeros,o=e.DenseMatrix,a=rt({typed:t}),s=lt({typed:t,equalScalar:r}),u=Vr({typed:t,equalScalar:r}),l=ot({typed:t,DenseMatrix:o}),c=ft({typed:t,equalScalar:r}),f=at({typed:t}),h=st({typed:t});return t(Kr,{"number, number":Gt,"SparseMatrix, SparseMatrix":function(e,t){return u(e,t,this,!1)},"SparseMatrix, DenseMatrix":function(e,t){return s(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return a(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return f(e,t,this)},"Array, Array":function(e,t){return this(n(e),n(t)).valueOf()},"Array, Matrix":function(e,t){return this(n(e),t)},"Matrix, Array":function(e,t){return this(e,n(t))},"SparseMatrix, number | BigNumber":function(e,t){return r(t,0)?e.clone():c(e,t,this,!1)},"DenseMatrix, number | BigNumber":function(e,t){return r(t,0)?e.clone():h(e,t,this,!1)},"number | BigNumber, SparseMatrix":function(e,t){return r(e,0)?i(t.size(),t.storage()):l(t,e,this,!0)},"number | BigNumber, DenseMatrix":function(e,t){return r(e,0)?i(t.size(),t.storage()):h(t,e,this,!0)},"Array, number | BigNumber":function(e,t){return this(n(e),t).valueOf()},"number | BigNumber, Array":function(e,t){return this(e,n(t)).valueOf()}})})),Jr=Object(s.a)("and",["typed","matrix","equalScalar","zeros","not"],(function(e){var t=e.typed,n=e.matrix,r=e.equalScalar,i=e.zeros,o=e.not,a=lt({typed:t,equalScalar:r}),s=ct({typed:t,equalScalar:r}),u=ft({typed:t,equalScalar:r}),l=at({typed:t}),c=st({typed:t});return t("and",{"number, number":ln,"Complex, Complex":function(e,t){return!(0===e.re&&0===e.im||0===t.re&&0===t.im)},"BigNumber, BigNumber":function(e,t){return!(e.isZero()||t.isZero()||e.isNaN()||t.isNaN())},"Unit, Unit":function(e,t){return this(e.value||0,t.value||0)},"SparseMatrix, SparseMatrix":function(e,t){return s(e,t,this,!1)},"SparseMatrix, DenseMatrix":function(e,t){return a(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return a(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return l(e,t,this)},"Array, Array":function(e,t){return this(n(e),n(t)).valueOf()},"Array, Matrix":function(e,t){return this(n(e),t)},"Matrix, Array":function(e,t){return this(e,n(t))},"SparseMatrix, any":function(e,t){return o(t)?i(e.size(),e.storage()):u(e,t,this,!1)},"DenseMatrix, any":function(e,t){return o(t)?i(e.size(),e.storage()):c(e,t,this,!1)},"any, SparseMatrix":function(e,t){return o(e)?i(e.size(),e.storage()):u(t,e,this,!0)},"any, DenseMatrix":function(e,t){return o(e)?i(e.size(),e.storage()):c(t,e,this,!0)},"Array, any":function(e,t){return this(n(e),t).valueOf()},"any, Array":function(e,t){return this(e,n(t)).valueOf()}})})),Qr="compare",ei=Object(s.a)(Qr,["typed","config","matrix","equalScalar","BigNumber","Fraction","DenseMatrix"],(function(e){var t=e.typed,n=e.config,r=e.equalScalar,i=e.matrix,o=e.BigNumber,s=e.Fraction,u=e.DenseMatrix,l=mt({typed:t}),c=gt({typed:t,equalScalar:r}),f=vt({typed:t,DenseMatrix:u}),h=at({typed:t}),d=st({typed:t});return t(Qr,{"boolean, boolean":function(e,t){return e===t?0:t<e?1:-1},"number, number":function(e,t){return Object(a.m)(e,t,n.epsilon)?0:t<e?1:-1},"BigNumber, BigNumber":function(e,t){return ne(e,t,n.epsilon)?new o(0):new o(e.cmp(t))},"Fraction, Fraction":function(e,t){return new s(e.compare(t))},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")},"Unit, Unit":function(e,t){if(!e.equalBase(t))throw new Error("Cannot compare units with different base");return this(e.value,t.value)},"SparseMatrix, SparseMatrix":function(e,t){return c(e,t,this)},"SparseMatrix, DenseMatrix":function(e,t){return l(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return l(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return h(e,t,this)},"Array, Array":function(e,t){return this(i(e),i(t)).valueOf()},"Array, Matrix":function(e,t){return this(i(e),t)},"Matrix, Array":function(e,t){return this(e,i(t))},"SparseMatrix, any":function(e,t){return f(e,t,this,!1)},"DenseMatrix, any":function(e,t){return d(e,t,this,!1)},"any, SparseMatrix":function(e,t){return f(t,e,this,!0)},"any, DenseMatrix":function(e,t){return d(t,e,this,!0)},"Array, any":function(e,t){return d(i(e),t,this,!1).valueOf()},"any, Array":function(e,t){return d(i(t),e,this,!0).valueOf()}})})),ti=n(11),ni=n.n(ti),ri="compareNatural",ii=Object(s.a)(ri,["typed","compare"],(function(e){var t=e.typed,n=e.compare,i=n.signatures["boolean,boolean"];return t(ri,{"any, any":function(e,t){var a,s=Object(r.M)(e),u=Object(r.M)(t);if(!("number"!==s&&"BigNumber"!==s&&"Fraction"!==s||"number"!==u&&"BigNumber"!==u&&"Fraction"!==u))return"0"!==(a=n(e,t)).toString()?0<a?1:-1:ni()(s,u);if("Array"===s||"Matrix"===s||"Array"===u||"Matrix"===u)return 0!==(a=function e(t,n,i){return Object(r.H)(n)&&Object(r.H)(i)?o(t,n.toJSON().values,i.toJSON().values):Object(r.H)(n)?e(t,n.toArray(),i):Object(r.H)(i)?e(t,n,i.toArray()):Object(r.n)(n)?e(t,n.toJSON().data,i):Object(r.n)(i)?e(t,n,i.toJSON().data):Array.isArray(n)?Array.isArray(i)?o(t,n,i):e(t,n,[i]):e(t,[n],i)}(this,e,t))?a:ni()(s,u);if(s!==u)return ni()(s,u);if("Complex"===s)return function(e,t){return e.re>t.re?1:e.re<t.re?-1:e.im>t.im?1:e.im<t.im?-1:0}(e,t);if("Unit"===s)return e.equalBase(t)?this(e.value,t.value):o(this,e.formatUnits(),t.formatUnits());if("boolean"===s)return i(e,t);if("string"===s)return ni()(e,t);if("Object"===s)return function(e,t,n){var r=Object.keys(t),i=Object.keys(n);r.sort(ni.a),i.sort(ni.a);var a=o(e,r,i);if(0!==a)return a;for(var s=0;s<r.length;s++){var u=e(t[r[s]],n[i[s]]);if(0!==u)return u}return 0}(this,e,t);if("null"===s)return 0;if("undefined"===s)return 0;throw new TypeError('Unsupported type of value "'+s+'"')}});function o(e,t,n){for(var r=0,i=Math.min(t.length,n.length);r<i;r++){var o=e(t[r],n[r]);if(0!==o)return o}return t.length>n.length?1:t.length<n.length?-1:0}})),oi="compareText",ai=Object(s.a)(oi,["typed","matrix"],(function(e){var t=e.typed,n=e.matrix,r=at({typed:t}),i=st({typed:t});return t(oi,{"any, any":C.a,"DenseMatrix, DenseMatrix":function(e,t){return r(e,t,C.a)},"Array, Array":function(e,t){return this(n(e),n(t)).valueOf()},"Array, Matrix":function(e,t){return this(n(e),t)},"Matrix, Array":function(e,t){return this(e,n(t))},"DenseMatrix, any":function(e,t){return i(e,t,C.a,!1)},"any, DenseMatrix":function(e,t){return i(t,e,C.a,!0)},"Array, any":function(e,t){return i(n(e),t,C.a,!1).valueOf()},"any, Array":function(e,t){return i(n(t),e,C.a,!0).valueOf()}})})),si="equal",ui=Object(s.a)(si,["typed","matrix","equalScalar","DenseMatrix"],(function(e){var t=e.typed,n=e.matrix,r=e.equalScalar,i=e.DenseMatrix,o=mt({typed:t}),a=Qt({typed:t,DenseMatrix:i}),s=vt({typed:t,DenseMatrix:i}),u=at({typed:t}),l=st({typed:t});return t(si,{"any, any":function(e,t){return null===e?null===t:null===t?null===e:void 0===e?void 0===t:void 0===t?void 0===e:r(e,t)},"SparseMatrix, SparseMatrix":function(e,t){return a(e,t,r)},"SparseMatrix, DenseMatrix":function(e,t){return o(t,e,r,!0)},"DenseMatrix, SparseMatrix":function(e,t){return o(e,t,r,!1)},"DenseMatrix, DenseMatrix":function(e,t){return u(e,t,r)},"Array, Array":function(e,t){return this(n(e),n(t)).valueOf()},"Array, Matrix":function(e,t){return this(n(e),t)},"Matrix, Array":function(e,t){return this(e,n(t))},"SparseMatrix, any":function(e,t){return s(e,t,r,!1)},"DenseMatrix, any":function(e,t){return l(e,t,r,!1)},"any, SparseMatrix":function(e,t){return s(t,e,r,!0)},"any, DenseMatrix":function(e,t){return l(t,e,r,!0)},"Array, any":function(e,t){return l(n(e),t,r,!1).valueOf()},"any, Array":function(e,t){return l(n(t),e,r,!0).valueOf()}})})),li=(Object(s.a)(si,["typed","equalScalar"],(function(e){var t=e.typed,n=e.equalScalar;return t(si,{"any, any":function(e,t){return null===e?null===t:null===t?null===e:void 0===e?void 0===t:void 0===t?void 0===e:n(e,t)}})})),"equalText"),ci=Object(s.a)(li,["typed","compareText","isZero"],(function(e){var t=e.typed,n=e.compareText,r=e.isZero;return t(li,{"any, any":function(e,t){return r(n(e,t))}})})),fi="smaller",hi=Object(s.a)(fi,["typed","config","matrix","DenseMatrix"],(function(e){var t=e.typed,n=e.config,r=e.matrix,i=e.DenseMatrix,o=mt({typed:t}),s=Qt({typed:t,DenseMatrix:i}),u=vt({typed:t,DenseMatrix:i}),l=at({typed:t}),c=st({typed:t});return t(fi,{"boolean, boolean":function(e,t){return e<t},"number, number":function(e,t){return e<t&&!Object(a.m)(e,t,n.epsilon)},"BigNumber, BigNumber":function(e,t){return e.lt(t)&&!ne(e,t,n.epsilon)},"Fraction, Fraction":function(e,t){return-1===e.compare(t)},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")},"Unit, Unit":function(e,t){if(!e.equalBase(t))throw new Error("Cannot compare units with different base");return this(e.value,t.value)},"SparseMatrix, SparseMatrix":function(e,t){return s(e,t,this)},"SparseMatrix, DenseMatrix":function(e,t){return o(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return o(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return l(e,t,this)},"Array, Array":function(e,t){return this(r(e),r(t)).valueOf()},"Array, Matrix":function(e,t){return this(r(e),t)},"Matrix, Array":function(e,t){return this(e,r(t))},"SparseMatrix, any":function(e,t){return u(e,t,this,!1)},"DenseMatrix, any":function(e,t){return c(e,t,this,!1)},"any, SparseMatrix":function(e,t){return u(t,e,this,!0)},"any, DenseMatrix":function(e,t){return c(t,e,this,!0)},"Array, any":function(e,t){return c(r(e),t,this,!1).valueOf()},"any, Array":function(e,t){return c(r(t),e,this,!0).valueOf()}})})),di="smallerEq",pi=Object(s.a)(di,["typed","config","matrix","DenseMatrix"],(function(e){var t=e.typed,n=e.config,r=e.matrix,i=e.DenseMatrix,o=mt({typed:t}),s=Qt({typed:t,DenseMatrix:i}),u=vt({typed:t,DenseMatrix:i}),l=at({typed:t}),c=st({typed:t});return t(di,{"boolean, boolean":function(e,t){return e<=t},"number, number":function(e,t){return e<=t||Object(a.m)(e,t,n.epsilon)},"BigNumber, BigNumber":function(e,t){return e.lte(t)||ne(e,t,n.epsilon)},"Fraction, Fraction":function(e,t){return 1!==e.compare(t)},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")},"Unit, Unit":function(e,t){if(!e.equalBase(t))throw new Error("Cannot compare units with different base");return this(e.value,t.value)},"SparseMatrix, SparseMatrix":function(e,t){return s(e,t,this)},"SparseMatrix, DenseMatrix":function(e,t){return o(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return o(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return l(e,t,this)},"Array, Array":function(e,t){return this(r(e),r(t)).valueOf()},"Array, Matrix":function(e,t){return this(r(e),t)},"Matrix, Array":function(e,t){return this(e,r(t))},"SparseMatrix, any":function(e,t){return u(e,t,this,!1)},"DenseMatrix, any":function(e,t){return c(e,t,this,!1)},"any, SparseMatrix":function(e,t){return u(t,e,this,!0)},"any, DenseMatrix":function(e,t){return c(t,e,this,!0)},"Array, any":function(e,t){return c(r(e),t,this,!1).valueOf()},"any, Array":function(e,t){return c(r(t),e,this,!0).valueOf()}})})),mi="larger",gi=Object(s.a)(mi,["typed","config","matrix","DenseMatrix"],(function(e){var t=e.typed,n=e.config,r=e.matrix,i=e.DenseMatrix,o=mt({typed:t}),s=Qt({typed:t,DenseMatrix:i}),u=vt({typed:t,DenseMatrix:i}),l=at({typed:t}),c=st({typed:t});return t(mi,{"boolean, boolean":function(e,t){return t<e},"number, number":function(e,t){return t<e&&!Object(a.m)(e,t,n.epsilon)},"BigNumber, BigNumber":function(e,t){return e.gt(t)&&!ne(e,t,n.epsilon)},"Fraction, Fraction":function(e,t){return 1===e.compare(t)},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")},"Unit, Unit":function(e,t){if(!e.equalBase(t))throw new Error("Cannot compare units with different base");return this(e.value,t.value)},"SparseMatrix, SparseMatrix":function(e,t){return s(e,t,this)},"SparseMatrix, DenseMatrix":function(e,t){return o(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return o(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return l(e,t,this)},"Array, Array":function(e,t){return this(r(e),r(t)).valueOf()},"Array, Matrix":function(e,t){return this(r(e),t)},"Matrix, Array":function(e,t){return this(e,r(t))},"SparseMatrix, any":function(e,t){return u(e,t,this,!1)},"DenseMatrix, any":function(e,t){return c(e,t,this,!1)},"any, SparseMatrix":function(e,t){return u(t,e,this,!0)},"any, DenseMatrix":function(e,t){return c(t,e,this,!0)},"Array, any":function(e,t){return c(r(e),t,this,!1).valueOf()},"any, Array":function(e,t){return c(r(t),e,this,!0).valueOf()}})})),vi="largerEq",yi=Object(s.a)(vi,["typed","config","matrix","DenseMatrix"],(function(e){var t=e.typed,n=e.config,r=e.matrix,i=e.DenseMatrix,o=mt({typed:t}),s=Qt({typed:t,DenseMatrix:i}),u=vt({typed:t,DenseMatrix:i}),l=at({typed:t}),c=st({typed:t});return t(vi,{"boolean, boolean":function(e,t){return t<=e},"number, number":function(e,t){return t<=e||Object(a.m)(e,t,n.epsilon)},"BigNumber, BigNumber":function(e,t){return e.gte(t)||ne(e,t,n.epsilon)},"Fraction, Fraction":function(e,t){return-1!==e.compare(t)},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")},"Unit, Unit":function(e,t){if(!e.equalBase(t))throw new Error("Cannot compare units with different base");return this(e.value,t.value)},"SparseMatrix, SparseMatrix":function(e,t){return s(e,t,this)},"SparseMatrix, DenseMatrix":function(e,t){return o(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return o(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return l(e,t,this)},"Array, Array":function(e,t){return this(r(e),r(t)).valueOf()},"Array, Matrix":function(e,t){return this(r(e),t)},"Matrix, Array":function(e,t){return this(e,r(t))},"SparseMatrix, any":function(e,t){return u(e,t,this,!1)},"DenseMatrix, any":function(e,t){return c(e,t,this,!1)},"any, SparseMatrix":function(e,t){return u(t,e,this,!0)},"any, DenseMatrix":function(e,t){return c(t,e,this,!0)},"Array, any":function(e,t){return c(r(e),t,this,!1).valueOf()},"any, Array":function(e,t){return c(r(t),e,this,!0).valueOf()}})})),bi="deepEqual",xi=Object(s.a)(bi,["typed","equal"],(function(e){var t=e.typed,n=e.equal;return t(bi,{"any, any":function(e,t){return function e(t,r){if(Array.isArray(t)){if(Array.isArray(r)){var i=t.length;if(i!==r.length)return!1;for(var o=0;o<i;o++)if(!e(t[o],r[o]))return!1;return!0}return!1}return!Array.isArray(r)&&n(t,r)}(e.valueOf(),t.valueOf())}})})),wi="unequal",_i=Object(s.a)(wi,["typed","config","equalScalar","matrix","DenseMatrix"],(function(e){var t=e.typed,n=(e.config,e.equalScalar),r=e.matrix,i=e.DenseMatrix,o=mt({typed:t}),a=Qt({typed:t,DenseMatrix:i}),s=vt({typed:t,DenseMatrix:i}),u=at({typed:t}),l=st({typed:t});return t("unequal",{"any, any":function(e,t){return null===e?null!==t:null===t?null!==e:void 0===e?void 0!==t:void 0===t?void 0!==e:c(e,t)},"SparseMatrix, SparseMatrix":function(e,t){return a(e,t,c)},"SparseMatrix, DenseMatrix":function(e,t){return o(t,e,c,!0)},"DenseMatrix, SparseMatrix":function(e,t){return o(e,t,c,!1)},"DenseMatrix, DenseMatrix":function(e,t){return u(e,t,c)},"Array, Array":function(e,t){return this(r(e),r(t)).valueOf()},"Array, Matrix":function(e,t){return this(r(e),t)},"Matrix, Array":function(e,t){return this(e,r(t))},"SparseMatrix, any":function(e,t){return s(e,t,c,!1)},"DenseMatrix, any":function(e,t){return l(e,t,c,!1)},"any, SparseMatrix":function(e,t){return s(t,e,c,!0)},"any, DenseMatrix":function(e,t){return l(t,e,c,!0)},"Array, any":function(e,t){return l(r(e),t,c,!1).valueOf()},"any, Array":function(e,t){return l(r(t),e,c,!0).valueOf()}});function c(e,t){return!n(e,t)}})),Si=(Object(s.a)(wi,["typed","equalScalar"],(function(e){var t=e.typed,n=e.equalScalar;return t(wi,{"any, any":function(e,t){return null===e?null!==t:null===t?null!==e:void 0===e?void 0!==t:void 0===t?void 0!==e:!n(e,t)}})})),"partitionSelect"),Oi=Object(s.a)(Si,["typed","isNumeric","isNaN","compare"],(function(e){function t(e,t){return-s(e,t)}var n=e.typed,i=e.isNumeric,o=e.isNaN,s=e.compare,u=s;return n(Si,{"Array | Matrix, number":function(e,t){return l(e,t,u)},"Array | Matrix, number, string":function(e,n,r){if("asc"===r)return l(e,n,u);if("desc"===r)return l(e,n,t);throw new Error('Compare string must be "asc" or "desc"')},"Array | Matrix, number, function":l});function l(e,t,n){if(!Object(a.i)(t)||t<0)throw new Error("k must be a non-negative integer");if(Object(r.v)(e)){if(1<e.size().length)throw new Error("Only one dimensional matrices supported");return c(e.valueOf(),t,n)}if(Array.isArray(e))return c(e,t,n)}function c(e,t,n){if(t>=e.length)throw new Error("k out of bounds");for(var r=0;r<e.length;r++)if(i(e[r])&&o(e[r]))return e[r];for(var a=0,s=e.length-1;a<s;){for(var u,l=a,c=s,f=e[Math.floor(Math.random()*(s-a+1))+a];l<c;)0<=n(e[l],f)?(u=e[c],e[c]=e[l],e[l]=u,--c):++l;0<n(e[l],f)&&--l,t<=l?s=l:a=l+1}return e[t]}})),Ni=Object(s.a)("sort",["typed","matrix","compare","compareNatural"],(function(e){function t(e,t){return-i(e,t)}var n=e.typed,r=e.matrix,i=e.compare,o=e.compareNatural,a=i;return n("sort",{Array:function(e){return u(e),e.sort(a)},Matrix:function(e){return l(e),r(e.toArray().sort(a),e.storage())},"Array, function":function(e,t){return u(e),e.sort(t)},"Matrix, function":function(e,t){return l(e),r(e.toArray().sort(t),e.storage())},"Array, string":function(e,t){return u(e),e.sort(s(t))},"Matrix, string":function(e,t){return l(e),r(e.toArray().sort(s(t)),e.storage())}});function s(e){if("asc"===e)return a;if("desc"===e)return t;if("natural"===e)return o;throw new Error('String "asc", "desc", or "natural" expected')}function u(e){if(1!==Object(E.a)(e).length)throw new Error("One dimensional array expected")}function l(e){if(1!==e.size().length)throw new Error("One dimensional matrix expected")}})),Ei=Object(s.a)("max",["typed","config","numeric","larger"],(function(e){var t=e.typed,n=e.config,r=e.numeric,i=e.larger;return t("max",{"Array | Matrix":a,"Array | Matrix, number | BigNumber":function(e,t){return R(e,t.valueOf(),o)},"...":function(e){if(j(e))throw new TypeError("Scalar values expected in function max");return a(e)}});function o(e,t){try{return i(e,t)?e:t}catch(e){throw vr(e,"max",t)}}function a(e){var t;if(P(e,(function(e){try{isNaN(e)&&"number"==typeof e?t=NaN:void 0!==t&&!i(e,t)||(t=e)}catch(t){throw vr(t,"max",e)}})),void 0===t)throw new Error("Cannot calculate max of an empty array");return"string"==typeof t&&(t=r(t,n.number)),t}})),Ci=Object(s.a)("min",["typed","config","numeric","smaller"],(function(e){var t=e.typed,n=e.config,r=e.numeric,i=e.smaller;return t("min",{"Array | Matrix":a,"Array | Matrix, number | BigNumber":function(e,t){return R(e,t.valueOf(),o)},"...":function(e){if(j(e))throw new TypeError("Scalar values expected in function min");return a(e)}});function o(e,t){try{return i(e,t)?e:t}catch(e){throw vr(e,"min",t)}}function a(e){var t;if(P(e,(function(e){try{isNaN(e)&&"number"==typeof e?t=NaN:void 0!==t&&!i(e,t)||(t=e)}catch(t){throw vr(t,"min",e)}})),void 0===t)throw new Error("Cannot calculate min of an empty array");return"string"==typeof t&&(t=r(t,n.number)),t}})),Ai=Object(s.a)("ImmutableDenseMatrix",["smaller","DenseMatrix"],(function(e){var t=e.smaller,n=e.DenseMatrix;function i(e,t){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");if(t&&!Object(r.I)(t))throw new Error("Invalid datatype: "+t);if(Object(r.v)(e)||Object(r.b)(e)){var o=new n(e,t);this._data=o._data,this._size=o._size,this._datatype=o._datatype,this._min=null,this._max=null}else if(e&&Object(r.b)(e.data)&&Object(r.b)(e.size))this._data=e.data,this._size=e.size,this._datatype=e.datatype,this._min=void 0!==e.min?e.min:null,this._max=void 0!==e.max?e.max:null;else{if(e)throw new TypeError("Unsupported type of data ("+Object(r.M)(e)+")");this._data=[],this._size=[0],this._datatype=t,this._min=null,this._max=null}}return(i.prototype=new n).type="ImmutableDenseMatrix",i.prototype.isImmutableDenseMatrix=!0,i.prototype.subset=function(e){switch(arguments.length){case 1:var t=n.prototype.subset.call(this,e);return Object(r.v)(t)?new i({data:t._data,size:t._size,datatype:t._datatype}):t;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(A.a)(this._data),size:Object(A.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(e){return new i(e)},i.prototype.swapRows=function(){throw new Error("Cannot invoke swapRows on an Immutable Matrix instance")},i.prototype.min=function(){var e;return null===this._min&&(e=null,this.forEach((function(n){null!==e&&!t(n,e)||(e=n)})),this._min=null!==e?e:void 0),this._min},i.prototype.max=function(){var e;return null===this._max&&(e=null,this.forEach((function(n){null!==e&&!t(e,n)||(e=n)})),this._max=null!==e?e:void 0),this._max},i}),{isClass:!0}),Mi=Object(s.a)("Index",["ImmutableDenseMatrix"],(function(e){var t=e.ImmutableDenseMatrix;function n(e){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");this._dimensions=[],this._isScalar=!0;for(var t=0,o=arguments.length;t<o;t++){var a=arguments[t];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(e){for(var n=0,r=e.length;n<r;n++)if("number"!=typeof e[n]||!Object(a.i)(e[n]))throw new TypeError("Index parameters must be positive integer numbers");return new t(e)}return n.prototype.type="Index",n.prototype.isIndex=!0,n.prototype.clone=function(){var e=new n;return e._dimensions=Object(A.a)(this._dimensions),e._isScalar=this._isScalar,e},n.create=function(e){var t=new n;return n.apply(t,e),t},n.prototype.size=function(){for(var e=[],t=0,n=this._dimensions.length;t<n;t++){var r=this._dimensions[t];e[t]="string"==typeof r?1:r.size()[0]}return e},n.prototype.max=function(){for(var e=[],t=0,n=this._dimensions.length;t<n;t++){var r=this._dimensions[t];e[t]="string"==typeof r?r:r.max()}return e},n.prototype.min=function(){for(var e=[],t=0,n=this._dimensions.length;t<n;t++){var r=this._dimensions[t];e[t]="string"==typeof r?r:r.min()}return e},n.prototype.forEach=function(e){for(var t=0,n=this._dimensions.length;t<n;t++)e(this._dimensions[t],t,this)},n.prototype.dimension=function(e){return this._dimensions[e]||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 e=[],t=0,n=this._dimensions.length;t<n;t++){var r=this._dimensions[t];e.push("string"==typeof r?r:r.toArray())}return e},n.prototype.toString=function(){for(var e=[],t=0,n=this._dimensions.length;t<n;t++){var r=this._dimensions[t];"string"==typeof r?e.push(JSON.stringify(r)):e.push(r.toString())}return"["+e.join(", ")+"]"},n.prototype.toJSON=function(){return{mathjs:"Index",dimensions:this._dimensions}},n.fromJSON=function(e){return n.create(e.dimensions)},n}),{isClass:!0}),ki=Object(s.a)("FibonacciHeap",["smaller","larger"],(function(e){var t=e.smaller,n=e.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(e,t,n){t.left.right=t.right,t.right.left=t.left,n.degree--,n.child===t&&(n.child=t.right),0===n.degree&&(n.child=null),t.left=e,t.right=e.right,((e.right=t).right.left=t).parent=null,t.mark=!1}i.prototype.type="FibonacciHeap",i.prototype.isFibonacciHeap=!0,i.prototype.insert=function(e,n){var r,i={key:e,value:n,degree:0};return this._minimum?(r=this._minimum,i.left=r,i.right=r.right,(r.right=i).right.left=i,t(e,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 e=this._minimum;if(null===e)return e;for(var i=this._minimum,o=e.degree,s=e.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 e.left.right=e.right,e.right.left=e.left,i=e===e.right?null:function(e,i){var o,s=Math.floor(Math.log(i)*r)+1,u=new Array(s),l=0,c=e;if(c)for(l++,c=c.right;c!==e;)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--}e=null;for(var p=0;p<s;p++)(o=u[p])&&(e?(o.left.right=o.right,o.right.left=o.left,o.left=e,o.right=e.right,(e.right=o).right.left=o,t(o.key,e.key)&&(e=o)):e=o);return e}(i=e.right,this._size),this._size--,this._minimum=i,e},i.prototype.remove=function(e){this._minimum=function(e,n,r){n.key=-1;var i=n.parent;return i&&t(n.key,i.key)&&(o(e,n,i),function e(t,n){var r=n.parent;r&&(n.mark?(o(t,n,r),e(r)):n.mark=!0)}(e,i)),t(n.key,e.key)&&(e=n),e}(this._minimum,e),this.extractMinimum()};var a=function(e,t){e.left.right=e.right,e.right.left=e.left,(e.parent=t).child?(e.left=t.child,e.right=t.child.right,(t.child.right=e).right.left=e):((t.child=e).right=e).left=e,t.degree++,e.mark=!1};return i}),{isClass:!0}),Ti=Object(s.a)("Spa",["addScalar","equalScalar","FibonacciHeap"],(function(e){var t=e.addScalar,n=e.equalScalar,r=e.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(e,t){var n;this._values[e]?this._values[e].value=t:(n=this._heap.insert(e,t),this._values[e]=n)},i.prototype.get=function(e){var t=this._values[e];return t?t.value:0},i.prototype.accumulate=function(e,n){var r=this._values[e];r?r.value=t(r.value,n):(r=this._heap.insert(e,n),this._values[e]=r)},i.prototype.forEach=function(e,t,r){var i=this._heap,o=this._values,a=[];for((u=i.extractMinimum())&&a.push(u);u&&u.key<=t;)u.key>=e&&(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(e,t){var n,r=this._values[e],i=this._values[t];!r&&i?(r=this._heap.insert(e,i.value),this._heap.remove(i),this._values[e]=r,this._values[t]=void 0):r&&!i?(i=this._heap.insert(t,r.value),this._heap.remove(r),this._values[t]=i,this._values[e]=void 0):r&&i&&(n=r.value,r.value=i.value,i.value=n)},i}),{isClass:!0}),Di=yn((function(e){return new e(1).exp()}),Ri),ji=yn((function(e){return new e(1).plus(new e(5).sqrt()).div(2)}),Ri),Pi=yn((function(e){return e.acos(-1)}),Ri),Ii=yn((function(e){return Pi(e).times(2)}),Ri);function Ri(e){return e[0].precision}function Li(e){return(Li="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Fi(){return(Fi=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Bi(e,t){var n,r=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)),r}function qi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bi(Object(n),!0).forEach((function(t){var r,i,o;r=e,o=n[i=t],i in r?Object.defineProperty(r,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var zi=Object(s.a)("Unit",["?on","config","addScalar","subtract","multiplyScalar","divideScalar","pow","abs","fix","round","equal","isNumeric","format","number","Complex","BigNumber","Fraction"],(function(e){var t,n,i,o=e.on,a=e.config,s=e.addScalar,u=e.subtract,l=e.multiplyScalar,c=e.divideScalar,f=e.pow,h=e.abs,d=e.fix,p=e.round,m=e.equal,g=e.isNumeric,v=e.format,y=e.number,b=e.Complex,x=e.BigNumber,w=e.Fraction,_=y;function S(e,t){if(!(this instanceof S))throw new Error("Constructor must be called with the new operator");if(null!=e&&!g(e)&&!Object(r.j)(e))throw new TypeError("First parameter in Unit constructor must be number, BigNumber, Fraction, Complex, or undefined");if(void 0!==t&&("string"!=typeof t||""===t))throw new TypeError("Second parameter in Unit constructor must be a string");if(void 0!==t){var n=S.parse(t);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!=e?this._normalize(e):null,this.fixPrefix=!1,this.skipAutomaticSimplification=!0}function O(){for(;" "===i||"\t"===i;)E()}function N(e){return"0"<=e&&e<="9"}function E(){n++,i=t.charAt(n)}function M(e){n=e,i=t.charAt(n)}function k(){var e,t="",r=n;if("+"===i?E():"-"===i&&(t+=i,E()),!("0"<=(e=i)&&e<="9"||"."===e))return M(r),null;if("."===i){if(t+=i,E(),!N(i))return M(r),null}else{for(;N(i);)t+=i,E();"."===i&&(t+=i,E())}for(;N(i);)t+=i,E();if("E"===i||"e"===i){var o="",a=n;if(o+=i,E(),"+"!==i&&"-"!==i||(o+=i,E()),!N(i))return M(a),t;for(t+=o;N(i);)t+=i,E()}return t}function T(e){return i===e&&(E(),e)}function D(e){if(Object(A.f)(B,e)){var t=B[e];return{unit:t,prefix:t.prefixes[""]}}for(var n in B)if(Object(A.f)(B,n)&&Object(C.b)(e,n)){var r=B[n],i=e.length-n.length,o=e.substring(0,i),a=Object(A.f)(r.prefixes,o)?r.prefixes[o]:void 0;if(void 0!==a)return{unit:r,prefix:a}}return null}function j(e){return e.equalBase(R.NONE)&&null!==e.value&&!a.predictable?e.value:e}S.prototype.type="Unit",S.prototype.isUnit=!0,S.parse=function(e,r){if(r=r||{},n=-1,i="","string"!=typeof(t=e))throw new TypeError("Invalid argument in Unit.parse, string expected");var o=new S,s=1,u=!(o.units=[]);E(),O();var l=k(),c=null;if(l){if("BigNumber"===a.number)c=new x(l);else if("Fraction"===a.number)try{c=new w(l)}catch(e){c=parseFloat(l)}else c=parseFloat(l);O(),T("*")?(s=1,u=!0):T("/")&&(s=-1,u=!0)}for(var f=[],h=1;;){for(O();"("===i;)f.push(s),h*=s,s=1,E(),O();var d;if(!i)break;var p=i;if(null===(d=function(){for(var e="",r=t.charCodeAt(n);48<=r&&r<=57||65<=r&&r<=90||97<=r&&r<=122;)e+=i,E(),r=t.charCodeAt(n);return(65<=(r=e.charCodeAt(0))&&r<=90||97<=r&&r<=122)&&e||null}()))throw new SyntaxError('Unexpected "'+p+'" in "'+t+'" at index '+n.toString());var m=D(d);if(null===m)throw new SyntaxError('Unit "'+d+'" not found.');var g=s*h;if(O(),T("^")){O();var v=k();if(null===v)throw new SyntaxError('In "'+e+'", "^" 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 "'+t+'" at index '+n.toString());h/=f.pop(),E(),O()}u=!1,T("*")?(s=1,u=!0):T("/")?(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: "'+e+'"');if(u)throw new SyntaxError('Trailing characters: "'+e+'"');if(0!==f.length)throw new SyntaxError('Unmatched "(" in "'+t+'"');if(0===o.units.length&&!r.allowNoUnits)throw new SyntaxError('"'+e+'" contains no units');return o.value=void 0!==c?o._normalize(c):null,o},S.prototype.clone=function(){var e=new S;e.fixPrefix=this.fixPrefix,e.skipAutomaticSimplification=this.skipAutomaticSimplification,e.value=Object(A.a)(this.value),e.dimensions=this.dimensions.slice(0),e.units=[];for(var t=0;t<this.units.length;t++)for(var n in e.units[t]={},this.units[t])Object(A.f)(this.units[t],n)&&(e.units[t][n]=this.units[t][n]);return e},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(e){var t,n,i,o;if(null==e||0===this.units.length)return e;if(this._isDerived()){for(var a=e,u=S._getNumberConverter(Object(r.M)(e)),c=0;c<this.units.length;c++)t=u(this.units[c].unit.value),o=u(this.units[c].prefix.value),i=u(this.units[c].power),a=l(a,f(l(t,o),i));return a}return t=(u=S._getNumberConverter(Object(r.M)(e)))(this.units[0].unit.value),n=u(this.units[0].unit.offset),o=u(this.units[0].prefix.value),l(s(e,n),l(t,o))},S.prototype._denormalize=function(e,t){var n,i,o,a;if(null==e||0===this.units.length)return e;if(this._isDerived()){for(var s=e,h=S._getNumberConverter(Object(r.M)(e)),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)(e)))(this.units[0].unit.value),a=h(this.units[0].prefix.value),i=h(this.units[0].unit.offset),u(c(c(e,n),null==t?a:t),i)},S.isValuelessUnit=function(e){return null!==D(e)},S.prototype.hasBase=function(e){if("string"==typeof e&&(e=R[e]),!e)return!1;for(var t=0;t<I.length;t++)if(1e-12<Math.abs((this.dimensions[t]||0)-(e.dimensions[t]||0)))return!1;return!0},S.prototype.equalBase=function(e){for(var t=0;t<I.length;t++)if(1e-12<Math.abs((this.dimensions[t]||0)-(e.dimensions[t]||0)))return!1;return!0},S.prototype.equals=function(e){return this.equalBase(e)&&m(this.value,e.value)},S.prototype.multiply=function(e){for(var t=this.clone(),n=0;n<I.length;n++)t.dimensions[n]=(this.dimensions[n]||0)+(e.dimensions[n]||0);for(var r,i,o=0;o<e.units.length;o++){var a=qi({},e.units[o]);t.units.push(a)}return null!==this.value||null!==e.value?(r=null===this.value?this._normalize(1):this.value,i=null===e.value?e._normalize(1):e.value,t.value=l(r,i)):t.value=null,t.skipAutomaticSimplification=!1,j(t)},S.prototype.divide=function(e){for(var t=this.clone(),n=0;n<I.length;n++)t.dimensions[n]=(this.dimensions[n]||0)-(e.dimensions[n]||0);for(var r,i,o=0;o<e.units.length;o++){var a=qi(qi({},e.units[o]),{},{power:-e.units[o].power});t.units.push(a)}return null!==this.value||null!==e.value?(r=null===this.value?this._normalize(1):this.value,i=null===e.value?e._normalize(1):e.value,t.value=c(r,i)):t.value=null,t.skipAutomaticSimplification=!1,j(t)},S.prototype.pow=function(e){for(var t=this.clone(),n=0;n<I.length;n++)t.dimensions[n]=(this.dimensions[n]||0)*e;for(var r=0;r<t.units.length;r++)t.units[r].power*=e;return null!==t.value?t.value=f(t.value,e):t.value=null,t.skipAutomaticSimplification=!1,j(t)},S.prototype.abs=function(){var e=this.clone();for(var t in e.value=null!==e.value?h(e.value):null,e.units)"VA"!==e.units[t].unit.name&&"VAR"!==e.units[t].unit.name||(e.units[t].unit=B.W);return e},S.prototype.to=function(e){var t,n=null===this.value?this._normalize(1):this.value;if("string"==typeof e){if(t=S.parse(e),!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 t.value=Object(A.a)(n),t.fixPrefix=!0,t.skipAutomaticSimplification=!0,t}if(Object(r.L)(e)){if(!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(t=e.clone()).value=Object(A.a)(n),t.fixPrefix=!0,t.skipAutomaticSimplification=!0,t}throw new Error("String or Unit expected as parameter")},S.prototype.toNumber=function(e){return _(this.toNumeric(e))},S.prototype.toNumeric=function(e){var t=e?this.to(e):this.clone();return t._isDerived()||0===t.units.length?t._denormalize(t.value):t._denormalize(t.value,t.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(e){var t=new S(e.value,e.unit);return t.fixPrefix=e.fixPrefix||!1,t},S.prototype.valueOf=S.prototype.toString,S.prototype.simplify=function(){var e,t,n=this.clone(),r=[];for(var i in W)if(Object(A.f)(W,i)&&n.hasBase(R[i])){e=i;break}if("NONE"===e)n.units=[];else if(e&&Object(A.f)(W,e)&&(t=W[e]),t)n.units=[{unit:t.unit,prefix:t.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(A.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 e=this.clone(),t=[],n=0;n<I.length;n++){var r=I[n];if(1e-12<Math.abs(e.dimensions[n]||0)){if(!Object(A.f)(H.si,r))throw new Error("Cannot express custom unit "+r+" in SI units");t.push({unit:H.si[r].unit,prefix:H.si[r].prefix,power:e.dimensions[n]||0})}}return e.units=t,e.fixPrefix=!0,e.skipAutomaticSimplification=!0,e},S.prototype.formatUnits=function(){for(var e="",t="",n=0,r=0,i=0;i<this.units.length;i++)0<this.units[i].power?(n++,e+=" "+this.units[i].prefix.name+this.units[i].unit.name,1e-15<Math.abs(this.units[i].power-1)&&(e+="^"+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?(t+=" "+this.units[o].prefix.name+this.units[o].unit.name,1e-15<Math.abs(this.units[o].power+1)&&(t+="^"+-this.units[o].power)):(t+=" "+this.units[o].prefix.name+this.units[o].unit.name,t+="^"+this.units[o].power));e=e.substr(1),t=t.substr(1),1<n&&0<r&&(e="("+e+")"),1<r&&0<n&&(t="("+t+")");var a=e;return 0<n&&0<r&&(a+=" / "),a+t},S.prototype.format=function(e){var t=this.skipAutomaticSimplification||null===this.value?this.clone():this.simplify(),n=!1;for(var i in void 0!==t.value&&null!==t.value&&Object(r.j)(t.value)&&(n=Math.abs(t.value.re)<1e-14),t.units)Object(A.f)(t.units,i)&&t.units[i].unit&&("VA"===t.units[i].unit.name&&n?t.units[i].unit=B.VAR:"VAR"!==t.units[i].unit.name||n||(t.units[i].unit=B.VA));1!==t.units.length||t.fixPrefix||Math.abs(t.units[0].power-Math.round(t.units[0].power))<1e-14&&(t.units[0].prefix=t._bestPrefix());var o=t._denormalize(t.value),a=null!==t.value?v(o,e||{}):"",s=t.formatUnits();return t.value&&Object(r.j)(t.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 e=null!==this.value?h(this.value):0,t=h(this.units[0].unit.value),n=this.units[0].prefix;if(0===e)return n;var r=this.units[0].power,i=Math.log(e/Math.pow(n.value*t,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(A.f)(s,u)&&(!(o=s[u]).scientific||((a=Math.abs(Math.log(e/Math.pow(o.value*t,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(e){for(var t=this.clone(),n=[],r=0;r<e.length&&(t=t.to(e[r]),r!==e.length-1);r++){var i=t.toNumeric(),o=p(i),a=new S(m(o,i)?o:d(t.toNumeric()),e[r].toString());n.push(a),t=u(t,a)}for(var l=0,c=0;c<n.length;c++)l=s(l,n[c].value);return m(l,this.value)&&(t.value=0),n.push(t),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(A.f)(R,L)&&(R[L].key=L);var F={name:"",base:{},value:1,offset:0,dimensions:I.map((function(e){return 0}))},B={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}},q={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(e){var t;"BigNumber"===e.number?(t=Pi(x),B.rad.value=new x(1),B.deg.value=t.div(180),B.grad.value=t.div(200),B.cycle.value=t.times(2),B.arcsec.value=t.div(648e3),B.arcmin.value=t.div(10800)):(B.rad.value=1,B.deg.value=Math.PI/180,B.grad.value=Math.PI/200,B.cycle.value=2*Math.PI,B.arcsec.value=Math.PI/648e3,B.arcmin.value=Math.PI/10800),B.radian.value=B.rad.value,B.degree.value=B.deg.value,B.gradian.value=B.grad.value}z(a),o&&o("config",(function(e,t){e.number!==t.number&&z(e)}));var H={si:{NONE:{unit:F,prefix:P.NONE[""]},LENGTH:{unit:B.m,prefix:P.SHORT[""]},MASS:{unit:B.g,prefix:P.SHORT.k},TIME:{unit:B.s,prefix:P.SHORT[""]},CURRENT:{unit:B.A,prefix:P.SHORT[""]},TEMPERATURE:{unit:B.K,prefix:P.SHORT[""]},LUMINOUS_INTENSITY:{unit:B.cd,prefix:P.SHORT[""]},AMOUNT_OF_SUBSTANCE:{unit:B.mol,prefix:P.SHORT[""]},ANGLE:{unit:B.rad,prefix:P.SHORT[""]},BIT:{unit:B.bits,prefix:P.SHORT[""]},FORCE:{unit:B.N,prefix:P.SHORT[""]},ENERGY:{unit:B.J,prefix:P.SHORT[""]},POWER:{unit:B.W,prefix:P.SHORT[""]},PRESSURE:{unit:B.Pa,prefix:P.SHORT[""]},ELECTRIC_CHARGE:{unit:B.C,prefix:P.SHORT[""]},ELECTRIC_CAPACITANCE:{unit:B.F,prefix:P.SHORT[""]},ELECTRIC_POTENTIAL:{unit:B.V,prefix:P.SHORT[""]},ELECTRIC_RESISTANCE:{unit:B.ohm,prefix:P.SHORT[""]},ELECTRIC_INDUCTANCE:{unit:B.H,prefix:P.SHORT[""]},ELECTRIC_CONDUCTANCE:{unit:B.S,prefix:P.SHORT[""]},MAGNETIC_FLUX:{unit:B.Wb,prefix:P.SHORT[""]},MAGNETIC_FLUX_DENSITY:{unit:B.T,prefix:P.SHORT[""]},FREQUENCY:{unit:B.Hz,prefix:P.SHORT[""]}}};H.cgs=JSON.parse(JSON.stringify(H.si)),H.cgs.LENGTH={unit:B.m,prefix:P.SHORT.c},H.cgs.MASS={unit:B.g,prefix:P.SHORT[""]},H.cgs.FORCE={unit:B.dyn,prefix:P.SHORT[""]},H.cgs.ENERGY={unit:B.erg,prefix:P.NONE[""]},H.us=JSON.parse(JSON.stringify(H.si)),H.us.LENGTH={unit:B.ft,prefix:P.NONE[""]},H.us.MASS={unit:B.lbm,prefix:P.NONE[""]},H.us.TEMPERATURE={unit:B.degF,prefix:P.NONE[""]},H.us.FORCE={unit:B.lbf,prefix:P.NONE[""]},H.us.ENERGY={unit:B.BTU,prefix:P.BTU[""]},H.us.POWER={unit:B.hp,prefix:P.NONE[""]},H.us.PRESSURE={unit:B.psi,prefix:P.NONE[""]},H.auto=JSON.parse(JSON.stringify(H.si));var U,W=H.auto;for(var V in S.setUnitSystem=function(e){if(!Object(A.f)(H,e))throw new Error("Unit system "+e+" does not exist. Choices are: "+Object.keys(H).join(", "));W=H[e]},S.getUnitSystem=function(){for(var e in H)if(Object(A.f)(H,e)&&H[e]===W)return e},S.typeConverters={BigNumber:function(e){return new x(e+"")},Fraction:function(e){return new w(e)},Complex:function(e){return e},number:function(e){return e}},S._getNumberConverter=function(e){if(!S.typeConverters[e])throw new TypeError('Unsupported type "'+e+'"');return S.typeConverters[e]},B)Object(A.f)(B,V)&&((U=B[V]).dimensions=U.base.dimensions);for(var $ in q)if(Object(A.f)(q,$)){var Y=B[q[$]],Z={};for(var G in Y)Object(A.f)(Y,G)&&(Z[G]=Y[G]);Z.name=$,B[$]=Z}return S.createUnit=function(e,t){if("object"!==Li(e))throw new TypeError("createUnit expects first parameter to be of type 'Object'");if(t&&t.override)for(var n in e)if(Object(A.f)(e,n)&&S.deleteUnit(n),e[n].aliases)for(var r=0;r<e[n].aliases.length;r++)S.deleteUnit(e[n].aliases[r]);var i;for(var o in e)Object(A.f)(e,o)&&(i=S.createUnitSingle(o,e[o]));return i},S.createUnitSingle=function(e,t,n){if(null==t&&(t={}),"string"!=typeof e)throw new TypeError("createUnitSingle expects first parameter to be of type 'string'");if(Object(A.f)(B,e))throw new Error('Cannot create unit "'+e+'": a unit with that name already exists');!function(e){for(var t,n=0;n<e.length;n++){var r=e.charAt(n),i=function(e){return/^[a-zA-Z]$/.test(e)};if(0===n&&!i(r))throw new Error('Invalid unit name (must begin with alpha character): "'+e+'"');if(0<n&&!(i(r)||"0"<=(t=r)&&t<="9"))throw new Error('Invalid unit name (only alphanumeric characters are allowed): "'+e+'"')}}(e);var r,i,o,a=null,s=[],u=0;if(t&&"Unit"===t.type)a=t.clone();else if("string"==typeof t)""!==t&&(r=t);else{if("object"!==Li(t))throw new TypeError('Cannot create unit "'+e+'" from "'+t.toString()+'": expecting "string" or "Unit" or "Object"');r=t.definition,i=t.prefixes,u=t.offset,o=t.baseName,t.aliases&&(s=t.aliases.valueOf())}if(s)for(var l=0;l<s.length;l++)if(Object(A.f)(B,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(t){throw t.message='Could not create unit "'+e+'" from "'+r+'": '+t.message,t}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:e,value:a.value,dimensions:a.dimensions.slice(0),prefixes:i,offset:u});for(var d in R)if(Object(A.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||e+"_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||e+"_STUFF",0<=I.indexOf(o))throw new Error('Cannot create new base unit "'+e+'": a base unit with that name already exists (and cannot be overridden)');for(var g in I.push(o),R)Object(A.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:e,value:1,dimensions:R[o].dimensions.slice(0),prefixes:i,offset:u,base:R[o]},W[o]={unit:c,prefix:P.NONE[""]}}S.UNITS[e]=c;for(var b=0;b<s.length;b++){var x=s[b],w={};for(var _ in c)Object(A.f)(c,_)&&(w[_]=c[_]);w.name=x,S.UNITS[x]=w}return new S(null,e)},S.deleteUnit=function(e){delete S.UNITS[e]},S.PREFIXES=P,S.BASE_DIMENSIONS=I,S.BASE_UNITS=R,S.UNIT_SYSTEMS=H,S.UNITS=B,S}),{isClass:!0}),Hi=Object(s.a)("unit",["typed","Unit"],(function(e){var t=e.typed,n=e.Unit;return t("unit",{Unit:function(e){return e.clone()},string:function(e){return n.isValuelessUnit(e)?new n(null,e):n.parse(e,{allowNoUnits:!0})},"number | BigNumber | Fraction | Complex, string":function(e,t){return new n(e,t)},"Array | Matrix":function(e){return I(e,this)}})})),Ui=Object(s.a)("sparse",["typed","SparseMatrix"],(function(e){var t=e.typed,n=e.SparseMatrix;return t("sparse",{"":function(){return new n([])},string:function(e){return new n([],e)},"Array | Matrix":function(e){return new n(e)},"Array | Matrix, string":function(e,t){return new n(e,t)}})})),Wi="createUnit",Vi=Object(s.a)(Wi,["typed","Unit"],(function(e){var t=e.typed,n=e.Unit;return t(Wi,{"Object, Object":function(e,t){return n.createUnit(e,t)},Object:function(e){return n.createUnit(e,{})},"string, Unit | string | Object, Object":function(e,t,r){var i={};return i[e]=t,n.createUnit(i,r)},"string, Unit | string | Object":function(e,t){var r={};return r[e]=t,n.createUnit(r,{})},string:function(e){var t={};return t[e]={},n.createUnit(t,{})}})})),$i=Object(s.a)("acos",["typed","config","Complex"],(function(e){var t=e.typed,n=e.config,r=e.Complex;return t("acos",{number:function(e){return-1<=e&&e<=1||n.predictable?Math.acos(e):new r(e,0).acos()},Complex:function(e){return e.acos()},BigNumber:function(e){return e.acos()},"Array | Matrix":function(e){return I(e,this)}})}));function Yi(e){return Object(a.a)(e)}function Zi(e){return Math.atan(1/e)}function Gi(e){return isFinite(e)?(Math.log((e+1)/e)+Math.log(e/(e-1)))/2:0}function Ki(e){return Math.asin(1/e)}function Xi(e){var t=1/e;return Math.log(t+Math.sqrt(t*t+1))}function Ji(e){return Math.acos(1/e)}function Qi(e){var t=1/e,n=Math.sqrt(t*t-1);return Math.log(n+t)}function eo(e){return Object(a.b)(e)}function to(e){return Object(a.c)(e)}function no(e){return 1/Math.tan(e)}function ro(e){var t=Math.exp(2*e);return(t+1)/(t-1)}function io(e){return 1/Math.sin(e)}function oo(e){return 0===e?Number.POSITIVE_INFINITY:Math.abs(2/(Math.exp(e)-Math.exp(-e)))*Object(a.n)(e)}function ao(e){return 1/Math.cos(e)}function so(e){return 2/(Math.exp(e)+Math.exp(-e))}function uo(e){return Object(a.o)(e)}uo.signature=so.signature=ao.signature=oo.signature=io.signature=ro.signature=no.signature=to.signature=eo.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(e){var t=e.typed,n=e.config,r=e.Complex;return t("acosh",{number:function(e){return 1<=e||n.predictable?Yi(e):e<=-1?new r(Math.log(Math.sqrt(e*e-1)-e),Math.PI):new r(e,0).acosh()},Complex:function(e){return e.acosh()},BigNumber:function(e){return e.acosh()},"Array | Matrix":function(e){return I(e,this)}})})),co=Object(s.a)("acot",["typed","BigNumber"],(function(e){var t=e.typed,n=e.BigNumber;return t("acot",{number:Zi,Complex:function(e){return e.acot()},BigNumber:function(e){return new n(1).div(e).atan()},"Array | Matrix":function(e){return I(e,this)}})})),fo=Object(s.a)("acoth",["typed","config","Complex","BigNumber"],(function(e){var t=e.typed,n=e.config,r=e.Complex,i=e.BigNumber;return t("acoth",{number:function(e){return 1<=e||e<=-1||n.predictable?Gi(e):new r(e,0).acoth()},Complex:function(e){return e.acoth()},BigNumber:function(e){return new i(1).div(e).atanh()},"Array | Matrix":function(e){return I(e,this)}})})),ho=Object(s.a)("acsc",["typed","config","Complex","BigNumber"],(function(e){var t=e.typed,n=e.config,r=e.Complex,i=e.BigNumber;return t("acsc",{number:function(e){return e<=-1||1<=e||n.predictable?Ki(e):new r(e,0).acsc()},Complex:function(e){return e.acsc()},BigNumber:function(e){return new i(1).div(e).asin()},"Array | Matrix":function(e){return I(e,this)}})})),po=Object(s.a)("acsch",["typed","BigNumber"],(function(e){var t=e.typed,n=e.BigNumber;return t("acsch",{number:Xi,Complex:function(e){return e.acsch()},BigNumber:function(e){return new n(1).div(e).asinh()},"Array | Matrix":function(e){return I(e,this)}})})),mo=Object(s.a)("asec",["typed","config","Complex","BigNumber"],(function(e){var t=e.typed,n=e.config,r=e.Complex,i=e.BigNumber;return t("asec",{number:function(e){return e<=-1||1<=e||n.predictable?Ji(e):new r(e,0).asec()},Complex:function(e){return e.asec()},BigNumber:function(e){return new i(1).div(e).acos()},"Array | Matrix":function(e){return I(e,this)}})})),go=Object(s.a)("asech",["typed","config","Complex","BigNumber"],(function(e){var t=e.typed,n=e.config,r=e.Complex,i=e.BigNumber;return t("asech",{number:function(e){if(e<=1&&-1<=e||n.predictable){var t=1/e;if(0<t||n.predictable)return Qi(e);var i=Math.sqrt(t*t-1);return new r(Math.log(i-t),Math.PI)}return new r(e,0).asech()},Complex:function(e){return e.asech()},BigNumber:function(e){return new i(1).div(e).acosh()},"Array | Matrix":function(e){return I(e,this)}})})),vo=Object(s.a)("asin",["typed","config","Complex"],(function(e){var t=e.typed,n=e.config,r=e.Complex;return t("asin",{number:function(e){return-1<=e&&e<=1||n.predictable?Math.asin(e):new r(e,0).asin()},Complex:function(e){return e.asin()},BigNumber:function(e){return e.asin()},"Array | Matrix":function(e){return I(e,this,!0)}})})),yo=Object(s.a)("asinh",["typed"],(function(e){return(0,e.typed)("asinh",{number:eo,Complex:function(e){return e.asinh()},BigNumber:function(e){return e.asinh()},"Array | Matrix":function(e){return I(e,this,!0)}})})),bo=Object(s.a)("atan",["typed"],(function(e){return(0,e.typed)("atan",{number:function(e){return Math.atan(e)},Complex:function(e){return e.atan()},BigNumber:function(e){return e.atan()},"Array | Matrix":function(e){return I(e,this,!0)}})})),xo=Object(s.a)("atan2",["typed","matrix","equalScalar","BigNumber","DenseMatrix"],(function(e){var t=e.typed,n=e.matrix,r=e.equalScalar,i=e.BigNumber,o=e.DenseMatrix,a=lt({typed:t,equalScalar:r}),s=mt({typed:t}),u=Tt({typed:t,equalScalar:r}),l=ft({typed:t,equalScalar:r}),c=vt({typed:t,DenseMatrix:o}),f=at({typed:t}),h=st({typed:t});return t("atan2",{"number, number":Math.atan2,"BigNumber, BigNumber":function(e,t){return i.atan2(e,t)},"SparseMatrix, SparseMatrix":function(e,t){return u(e,t,this,!1)},"SparseMatrix, DenseMatrix":function(e,t){return a(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return s(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return f(e,t,this)},"Array, Array":function(e,t){return this(n(e),n(t)).valueOf()},"Array, Matrix":function(e,t){return this(n(e),t)},"Matrix, Array":function(e,t){return this(e,n(t))},"SparseMatrix, number | BigNumber":function(e,t){return l(e,t,this,!1)},"DenseMatrix, number | BigNumber":function(e,t){return h(e,t,this,!1)},"number | BigNumber, SparseMatrix":function(e,t){return c(t,e,this,!0)},"number | BigNumber, DenseMatrix":function(e,t){return h(t,e,this,!0)},"Array, number | BigNumber":function(e,t){return h(n(e),t,this,!1).valueOf()},"number | BigNumber, Array":function(e,t){return h(n(t),e,this,!0).valueOf()}})})),wo=Object(s.a)("atanh",["typed","config","Complex"],(function(e){var t=e.typed,n=e.config,r=e.Complex;return t("atanh",{number:function(e){return e<=1&&-1<=e||n.predictable?to(e):new r(e,0).atanh()},Complex:function(e){return e.atanh()},BigNumber:function(e){return e.atanh()},"Array | Matrix":function(e){return I(e,this,!0)}})})),_o=Object(s.a)("cos",["typed"],(function(e){return(0,e.typed)("cos",{number:Math.cos,Complex:function(e){return e.cos()},BigNumber:function(e){return e.cos()},Unit:function(e){if(!e.hasBase(e.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function cos is no angle");return this(e.value)},"Array | Matrix":function(e){return I(e,this)}})})),So=Object(s.a)("cosh",["typed"],(function(e){return(0,e.typed)("cosh",{number:a.e,Complex:function(e){return e.cosh()},BigNumber:function(e){return e.cosh()},Unit:function(e){if(!e.hasBase(e.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function cosh is no angle");return this(e.value)},"Array | Matrix":function(e){return I(e,this)}})})),Oo=Object(s.a)("cot",["typed","BigNumber"],(function(e){var t=e.typed,n=e.BigNumber;return t("cot",{number:no,Complex:function(e){return e.cot()},BigNumber:function(e){return new n(1).div(e.tan())},Unit:function(e){if(!e.hasBase(e.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function cot is no angle");return this(e.value)},"Array | Matrix":function(e){return I(e,this)}})})),No=Object(s.a)("coth",["typed","BigNumber"],(function(e){var t=e.typed,n=e.BigNumber;return t("coth",{number:ro,Complex:function(e){return e.coth()},BigNumber:function(e){return new n(1).div(e.tanh())},Unit:function(e){if(!e.hasBase(e.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function coth is no angle");return this(e.value)},"Array | Matrix":function(e){return I(e,this)}})})),Eo=Object(s.a)("csc",["typed","BigNumber"],(function(e){var t=e.typed,n=e.BigNumber;return t("csc",{number:io,Complex:function(e){return e.csc()},BigNumber:function(e){return new n(1).div(e.sin())},Unit:function(e){if(!e.hasBase(e.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function csc is no angle");return this(e.value)},"Array | Matrix":function(e){return I(e,this)}})})),Co=Object(s.a)("csch",["typed","BigNumber"],(function(e){var t=e.typed,n=e.BigNumber;return t("csch",{number:oo,Complex:function(e){return e.csch()},BigNumber:function(e){return new n(1).div(e.sinh())},Unit:function(e){if(!e.hasBase(e.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function csch is no angle");return this(e.value)},"Array | Matrix":function(e){return I(e,this)}})})),Ao=Object(s.a)("sec",["typed","BigNumber"],(function(e){var t=e.typed,n=e.BigNumber;return t("sec",{number:ao,Complex:function(e){return e.sec()},BigNumber:function(e){return new n(1).div(e.cos())},Unit:function(e){if(!e.hasBase(e.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function sec is no angle");return this(e.value)},"Array | Matrix":function(e){return I(e,this)}})})),Mo=Object(s.a)("sech",["typed","BigNumber"],(function(e){var t=e.typed,n=e.BigNumber;return t("sech",{number:so,Complex:function(e){return e.sech()},BigNumber:function(e){return new n(1).div(e.cosh())},Unit:function(e){if(!e.hasBase(e.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function sech is no angle");return this(e.value)},"Array | Matrix":function(e){return I(e,this)}})})),ko=Object(s.a)("sin",["typed"],(function(e){return(0,e.typed)("sin",{number:Math.sin,Complex:function(e){return e.sin()},BigNumber:function(e){return e.sin()},Unit:function(e){if(!e.hasBase(e.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function sin is no angle");return this(e.value)},"Array | Matrix":function(e){return I(e,this,!0)}})})),To=Object(s.a)("sinh",["typed"],(function(e){return(0,e.typed)("sinh",{number:uo,Complex:function(e){return e.sinh()},BigNumber:function(e){return e.sinh()},Unit:function(e){if(!e.hasBase(e.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function sinh is no angle");return this(e.value)},"Array | Matrix":function(e){return I(e,this,!0)}})})),Do=Object(s.a)("tan",["typed"],(function(e){return(0,e.typed)("tan",{number:Math.tan,Complex:function(e){return e.tan()},BigNumber:function(e){return e.tan()},Unit:function(e){if(!e.hasBase(e.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function tan is no angle");return this(e.value)},"Array | Matrix":function(e){return I(e,this,!0)}})})),jo=Object(s.a)("tanh",["typed"],(function(e){return(0,e.typed)("tanh",{number:a.p,Complex:function(e){return e.tanh()},BigNumber:function(e){return e.tanh()},Unit:function(e){if(!e.hasBase(e.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function tanh is no angle");return this(e.value)},"Array | Matrix":function(e){return I(e,this,!0)}})})),Po="setCartesian",Io=Object(s.a)(Po,["typed","size","subset","compareNatural","Index","DenseMatrix"],(function(e){var t=e.typed,n=e.size,r=e.subset,i=e.compareNatural,o=e.Index,a=e.DenseMatrix;return t(Po,{"Array | Matrix, Array | Matrix":function(e,t){var s=[];if(0!==r(n(e),new o(0))&&0!==r(n(t),new o(0)))for(var u=Object(E.e)(Array.isArray(e)?e:e.toArray()).sort(i),l=Object(E.e)(Array.isArray(t)?t:t.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(e)&&Array.isArray(t)?s:new a(s)}})})),Ro="setDifference",Lo=Object(s.a)(Ro,["typed","size","subset","compareNatural","Index","DenseMatrix"],(function(e){var t=e.typed,n=e.size,r=e.subset,i=e.compareNatural,o=e.Index,a=e.DenseMatrix;return t(Ro,{"Array | Matrix, Array | Matrix":function(e,t){if(0===r(n(e),new o(0)))c=[];else{if(0===r(n(t),new o(0)))return Object(E.e)(e.toArray());for(var s,u=Object(E.i)(Object(E.e)(Array.isArray(e)?e:e.toArray()).sort(i)),l=Object(E.i)(Object(E.e)(Array.isArray(t)?t:t.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(e)&&Array.isArray(t)?Object(E.g)(c):new a(Object(E.g)(c))}})})),Fo="setDistinct",Bo=Object(s.a)(Fo,["typed","size","subset","compareNatural","Index","DenseMatrix"],(function(e){var t=e.typed,n=e.size,r=e.subset,i=e.compareNatural,o=e.Index,a=e.DenseMatrix;return t(Fo,{"Array | Matrix":function(e){if(0===r(n(e),new o(0)))t=[];else{var t,s=Object(E.e)(Array.isArray(e)?e:e.toArray()).sort(i);(t=[]).push(s[0]);for(var u=1;u<s.length;u++)0!==i(s[u],s[u-1])&&t.push(s[u])}return Array.isArray(e)?t:new a(t)}})})),qo="setIntersect",zo=Object(s.a)(qo,["typed","size","subset","compareNatural","Index","DenseMatrix"],(function(e){var t=e.typed,n=e.size,r=e.subset,i=e.compareNatural,o=e.Index,a=e.DenseMatrix;return t(qo,{"Array | Matrix, Array | Matrix":function(e,t){if(0===r(n(e),new o(0))||0===r(n(t),new o(0)))l=[];else for(var s=Object(E.i)(Object(E.e)(Array.isArray(e)?e:e.toArray()).sort(i)),u=Object(E.i)(Object(E.e)(Array.isArray(t)?t:t.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(e)&&Array.isArray(t)?Object(E.g)(l):new a(Object(E.g)(l))}})})),Ho="setIsSubset",Uo=Object(s.a)(Ho,["typed","size","subset","compareNatural","Index"],(function(e){var t=e.typed,n=e.size,r=e.subset,i=e.compareNatural,o=e.Index;return t(Ho,{"Array | Matrix, Array | Matrix":function(e,t){if(0===r(n(e),new o(0)))return!0;if(0===r(n(t),new o(0)))return!1;for(var a,s=Object(E.i)(Object(E.e)(Array.isArray(e)?e:e.toArray()).sort(i)),u=Object(E.i)(Object(E.e)(Array.isArray(t)?t:t.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(e){var t=e.typed,n=e.size,r=e.subset,i=e.compareNatural,o=e.Index;return t(Wo,{"number | BigNumber | Fraction | Complex, Array | Matrix":function(e,t){if(0===r(n(t),new o(0)))return 0;for(var a=Object(E.e)(Array.isArray(t)?t:t.toArray()),s=0,u=0;u<a.length;u++)0===i(a[u],e)&&s++;return s}})})),$o="setPowerset",Yo=Object(s.a)($o,["typed","size","subset","compareNatural","Index"],(function(e){var t=e.typed,n=e.size,r=e.subset,i=e.compareNatural,o=e.Index;return t($o,{"Array | Matrix":function(e){if(0===r(n(e),new o(0)))return[];for(var t=Object(E.e)(Array.isArray(e)?e:e.toArray()).sort(i),a=[],s=0;s.toString(2).length<=t.length;)a.push(function(e,t){for(var n=[],r=0;r<t.length;r++)"1"===t[r]&&n.push(e[r]);return n}(t,s.toString(2).split("").reverse())),s++;return function(e){for(var t=[],n=e.length-1;0<n;n--)for(var r=0;r<n;r++)e[r].length>e[r+1].length&&(t=e[r],e[r]=e[r+1],e[r+1]=t);return e}(a)}})})),Zo="setSize",Go=Object(s.a)(Zo,["typed","compareNatural"],(function(e){var t=e.typed,n=e.compareNatural;return t(Zo,{"Array | Matrix":function(e){return Array.isArray(e)?Object(E.e)(e).length:Object(E.e)(e.toArray()).length},"Array | Matrix, boolean":function(e,t){if(!1===t||0===e.length)return Array.isArray(e)?Object(E.e)(e).length:Object(E.e)(e.toArray()).length;for(var r=Object(E.e)(Array.isArray(e)?e:e.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(e){var t=e.typed,n=e.size,r=e.concat,i=e.subset,o=e.setDifference,a=e.Index;return t(Ko,{"Array | Matrix, Array | Matrix":function(e,t){if(0===i(n(e),new a(0)))return Object(E.e)(t);if(0===i(n(t),new a(0)))return Object(E.e)(e);var s=Object(E.e)(e),u=Object(E.e)(t);return r(o(s,u),o(u,s))}})})),Jo="setUnion",Qo=Object(s.a)(Jo,["typed","size","concat","subset","setIntersect","setSymDifference","Index"],(function(e){var t=e.typed,n=e.size,r=e.concat,i=e.subset,o=e.setIntersect,a=e.setSymDifference,s=e.Index;return t(Jo,{"Array | Matrix, Array | Matrix":function(e,t){if(0===i(n(e),new s(0)))return Object(E.e)(t);if(0===i(n(t),new s(0)))return Object(E.e)(e);var u=Object(E.e)(e),l=Object(E.e)(t);return r(a(u,l),o(u,l))}})})),ea=Object(s.a)("add",["typed","matrix","addScalar","equalScalar","DenseMatrix","SparseMatrix"],(function(e){var t=e.typed,n=e.matrix,r=e.addScalar,i=e.equalScalar,o=e.DenseMatrix,a=(e.SparseMatrix,rt({typed:t})),s=it({typed:t,equalScalar:i}),u=ot({typed:t,DenseMatrix:o}),l=at({typed:t}),c=st({typed:t});return t("add",Object(A.e)({"DenseMatrix, DenseMatrix":function(e,t){return l(e,t,r)},"DenseMatrix, SparseMatrix":function(e,t){return a(e,t,r,!1)},"SparseMatrix, DenseMatrix":function(e,t){return a(t,e,r,!0)},"SparseMatrix, SparseMatrix":function(e,t){return s(e,t,r)},"Array, Array":function(e,t){return this(n(e),n(t)).valueOf()},"Array, Matrix":function(e,t){return this(n(e),t)},"Matrix, Array":function(e,t){return this(e,n(t))},"DenseMatrix, any":function(e,t){return c(e,t,r,!1)},"SparseMatrix, any":function(e,t){return u(e,t,r,!1)},"any, DenseMatrix":function(e,t){return c(t,e,r,!0)},"any, SparseMatrix":function(e,t){return u(t,e,r,!0)},"Array, any":function(e,t){return c(n(e),t,r,!1).valueOf()},"any, Array":function(e,t){return c(n(t),e,r,!0).valueOf()},"any, any":r,"any, any, ...any":function(e,t,n){for(var r=this(e,t),i=0;i<n.length;i++)r=this(r,n[i]);return r}},r.signatures))})),ta=Object(s.a)("hypot",["typed","abs","addScalar","divideScalar","multiplyScalar","sqrt","smaller","isPositive"],(function(e){var t=e.typed,n=e.abs,r=e.addScalar,i=e.divideScalar,o=e.multiplyScalar,a=e.sqrt,s=e.smaller,u=e.isPositive;return t("hypot",{"... number | BigNumber":function(e){for(var t=0,l=0,c=0;c<e.length;c++){var f=n(e[c]);s(l,f)?(t=o(t,o(i(l,f),i(l,f))),t=r(t,1),l=f):t=r(t,u(f)?o(i(f,l),i(f,l)):f)}return o(l,a(t))},Array:function(e){return this.apply(this,Object(E.e)(e))},Matrix:function(e){return this.apply(this,Object(E.e)(e.toArray()))}})})),na=Object(s.a)("norm",["typed","abs","add","pow","conj","sqrt","multiply","equalScalar","larger","smaller","matrix"],(function(e){var t=e.typed,n=e.abs,r=e.add,i=e.pow,o=e.conj,a=e.sqrt,s=e.multiply,u=e.equalScalar,l=e.larger,c=e.smaller,f=e.matrix;return t("norm",{number:Math.abs,Complex:function(e){return e.abs()},BigNumber:function(e){return e.abs()},boolean:function(e){return Math.abs(e)},Array:function(e){return h(f(e),2)},Matrix:function(e){return h(e,2)},"number | Complex | BigNumber | boolean, number | BigNumber | string":function(e){return this(e)},"Array, number | BigNumber | string":function(e,t){return h(f(e),t)},"Matrix, number | BigNumber | string":h});function h(e,t){var f,d=e.size();if(1===d.length){if(t===Number.POSITIVE_INFINITY||"inf"===t){var p=0;return e.forEach((function(e){var t=n(e);l(t,p)&&(p=t)}),!0),p}if(t===Number.NEGATIVE_INFINITY||"-inf"===t)return e.forEach((function(e){var t=n(e);f&&!c(t,f)||(f=t)}),!0),f||0;if("fro"===t)return h(e,2);if("number"!=typeof t||isNaN(t))throw new Error("Unsupported parameter value");if(u(t,0))return Number.POSITIVE_INFINITY;var m=0;return e.forEach((function(e){m=r(i(n(e),t),m)}),!0),i(m,1/t)}if(2===d.length){if(1===t){var g=[],v=0;return e.forEach((function(e,t){var i=t[1],o=r(g[i]||0,n(e));l(o,v)&&(v=o),g[i]=o}),!0),v}if(t===Number.POSITIVE_INFINITY||"inf"===t){var y=[],b=0;return e.forEach((function(e,t){var i=t[0],o=r(y[i]||0,n(e));l(o,b)&&(b=o),y[i]=o}),!0),b}if("fro"===t){var x=0;return e.forEach((function(e,t){x=r(x,s(e,o(e)))})),n(a(x))}if(2===t)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(e){var t=e.typed,n=e.addScalar,i=e.multiplyScalar,o=e.conj,a=e.size;return t("dot",{"Array | DenseMatrix, Array | DenseMatrix":function(e,a){var l,c=s(e,a),f=Object(r.v)(e)?e._data:e,h=Object(r.v)(e)?e._datatype:void 0,d=Object(r.v)(a)?a._data:a,p=Object(r.v)(a)?a._datatype:void 0,m=2===u(e).length,g=2===u(a).length,v=n,y=i;if(h&&p&&h===p&&"string"==typeof h&&(l=h,v=t.find(n,[l,l]),y=t.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]),E=1;E<c;E++)N=v(N,y(o(f[E][0]),d[E][0]));return N}},"SparseMatrix, SparseMatrix":function(e,t){s(e,t);for(var r=e._index,o=e._values,a=t._index,u=t._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(e,t){var n,r,i=u(e),o=u(t);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(e){return Object(r.v)(e)?e.size():a(e)}})),ia=Object(s.a)("trace",["typed","matrix","add"],(function(e){var t=e.typed,n=e.matrix,r=e.add;return t("trace",{Array:function(e){return i(n(e))},SparseMatrix:function(e){var t=e._values,n=e._index,i=e._ptr,o=e._size,a=o[0],s=o[1];if(a!==s)throw new RangeError("Matrix must be square (size: "+Object(C.d)(o)+")");var u=0;if(0<t.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,t[h]);break}if(l<d)break}return u},DenseMatrix:i,any:A.a});function i(e){var t=e._size,n=e._data;switch(t.length){case 1:if(1===t[0])return Object(A.a)(n[0]);throw new RangeError("Matrix must be square (size: "+Object(C.d)(t)+")");case 2:var i=t[0];if(i!==t[1])throw new RangeError("Matrix must be square (size: "+Object(C.d)(t)+")");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(C.d)(t)+")")}}})),oa=Object(s.a)("index",["typed","Index"],(function(e){var t=e.typed,n=e.Index;return t("index",{"...number | string | BigNumber | Range | Array | Matrix":function(e){var t=e.map((function(e){return Object(r.e)(e)?e.toNumber():Array.isArray(e)||Object(r.v)(e)?e.map((function(e){return Object(r.e)(e)?e.toNumber():e})):e})),i=new n;return n.apply(i,t),i}})})),aa={end:!0};function sa(e){return(sa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var ua=Object(s.a)("Node",["mathWithTransform"],(function(e){var t=e.mathWithTransform;function n(){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator")}return n.prototype.evaluate=function(e){return this.compile().evaluate(e)},n.prototype.type="Node",n.prototype.isNode=!0,n.prototype.comment="",n.prototype.compile=function(){var e=this._compile(t,{}),n={};return{evaluate:function(t){var r=t||{};return function(e){for(var t in e)if(Object(A.f)(e,t)&&t in aa)throw new Error('Scope contains an illegal symbol, "'+t+'" is a reserved keyword')}(r),e(r,n,null)}}},n.prototype._compile=function(e,t){throw new Error("Method _compile should be implemented by type "+this.type)},n.prototype.forEach=function(e){throw new Error("Cannot run forEach on a Node interface")},n.prototype.map=function(e){throw new Error("Cannot run map on a Node interface")},n.prototype._ifNode=function(e){if(!Object(r.w)(e))throw new TypeError("Callback function must return a Node");return e},n.prototype.traverse=function(e){e(this,null,null),function e(t,n){t.forEach((function(t,r,i){n(t,r,i),e(t,n)}))}(this,e)},n.prototype.transform=function(e){return function t(n,r,i){var o=e(n,r,i);return o!==n?o:n.map(t)}(this,null,null)},n.prototype.filter=function(e){var t=[];return this.traverse((function(n,r,i){e(n,r,i)&&t.push(n)})),t},n.prototype.clone=function(){throw new Error("Cannot clone a Node interface")},n.prototype.cloneDeep=function(){return this.map((function(e){return e.cloneDeep()}))},n.prototype.equals=function(e){return!!e&&Object(A.d)(this,e)},n.prototype.toString=function(e){var t;if(e&&"object"===sa(e))switch(sa(e.handler)){case"object":case"undefined":break;case"function":t=e.handler(this,e);break;default:throw new TypeError("Object or function expected as callback")}return void 0!==t?t:this._toString(e)},n.prototype.toJSON=function(){throw new Error("Cannot serialize object: toJSON not implemented by "+this.type)},n.prototype.toHTML=function(e){var t;if(e&&"object"===sa(e))switch(sa(e.handler)){case"object":case"undefined":break;case"function":t=e.handler(this,e);break;default:throw new TypeError("Object or function expected as callback")}return void 0!==t?t:this.toHTML(e)},n.prototype._toString=function(){throw new Error("_toString not implemented for "+this.type)},n.prototype.toTex=function(e){var t;if(e&&"object"===sa(e))switch(sa(e.handler)){case"object":case"undefined":break;case"function":t=e.handler(this,e);break;default:throw new TypeError("Object or function expected as callback")}return void 0!==t?t:this._toTex(e)},n.prototype._toTex=function(e){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(e){return e&&e.isIndexError?new D.a(e.index+1,e.min+1,void 0!==e.max?e.max+1:void 0):e}function ca(e){return(ca="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fa(e){var t=e.subset;return function(e,n){try{if(Array.isArray(e))return t(e,n);if(e&&"function"==typeof e.subset)return e.subset(n);if("string"==typeof e)return t(e,n);if("object"!==ca(e))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(e,n.getObjectProperty())}catch(e){throw la(e)}}}var ha=Object(s.a)("AccessorNode",["subset","Node"],(function(e){var t=e.subset,n=e.Node,i=fa({subset:t});function o(e,t){if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");if(!Object(r.w)(e))throw new TypeError('Node expected for parameter "object"');if(!Object(r.u)(t))throw new TypeError('IndexNode expected for parameter "index"');this.object=e||null,this.index=t,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(e){return!(Object(r.a)(e)||Object(r.c)(e)||Object(r.l)(e)||Object(r.r)(e)||Object(r.A)(e)||Object(r.C)(e)||Object(r.J)(e))}return(o.prototype=new n).type="AccessorNode",o.prototype.isAccessorNode=!0,o.prototype._compile=function(e,t){var n=this.object._compile(e,t),r=this.index._compile(e,t);if(this.index.isObjectProperty()){var o=this.index.getObjectProperty();return function(e,t,r){return Zn(n(e,t,r),o)}}return function(e,t,o){var a=n(e,t,o),s=r(e,t,a);return i(a,s)}},o.prototype.forEach=function(e){e(this.object,"object",this),e(this.index,"index",this)},o.prototype.map=function(e){return new o(this._ifNode(e(this.object,"object",this)),this._ifNode(e(this.index,"index",this)))},o.prototype.clone=function(){return new o(this.object,this.index)},o.prototype._toString=function(e){var t=this.object.toString(e);return a(this.object)&&(t="("+t+")"),t+this.index.toString(e)},o.prototype.toHTML=function(e){var t=this.object.toHTML(e);return a(this.object)&&(t='<span class="math-parenthesis math-round-parenthesis">(</span>'+t+'<span class="math-parenthesis math-round-parenthesis">)</span>'),t+this.index.toHTML(e)},o.prototype._toTex=function(e){var t=this.object.toTex(e);return a(this.object)&&(t="\\left(' + object + '\\right)"),t+this.index.toTex(e)},o.prototype.toJSON=function(){return{mathjs:"AccessorNode",object:this.object,index:this.index}},o.fromJSON=function(e){return new o(e.object,e.index)},o}),{isClass:!0,isNode:!0}),da=Object(s.a)("ArrayNode",["Node"],(function(e){var t=e.Node;function n(e){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(this.items=e||[],!Array.isArray(this.items)||!this.items.every(r.w))throw new TypeError("Array containing Nodes expected")}return(n.prototype=new t).type="ArrayNode",n.prototype.isArrayNode=!0,n.prototype._compile=function(e,t){var n=Object(E.k)(this.items,(function(n){return n._compile(e,t)}));if("Array"===e.config.matrix)return function(e,t,r){return Object(E.k)(n,(function(n){return n(e,t,r)}))};var r=e.matrix;return function(e,t,i){return r(Object(E.k)(n,(function(n){return n(e,t,i)})))}},n.prototype.forEach=function(e){for(var t=0;t<this.items.length;t++)e(this.items[t],"items["+t+"]",this)},n.prototype.map=function(e){for(var t=[],r=0;r<this.items.length;r++)t[r]=this._ifNode(e(this.items[r],"items["+r+"]",this));return new n(t)},n.prototype.clone=function(){return new n(this.items.slice(0))},n.prototype._toString=function(e){return"["+this.items.map((function(t){return t.toString(e)})).join(", ")+"]"},n.prototype.toJSON=function(){return{mathjs:"ArrayNode",items:this.items}},n.fromJSON=function(e){return new n(e.items)},n.prototype.toHTML=function(e){return'<span class="math-parenthesis math-square-parenthesis">[</span>'+this.items.map((function(t){return t.toHTML(e)})).join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-square-parenthesis">]</span>'},n.prototype._toTex=function(e){var t="\\begin{bmatrix}";return this.items.forEach((function(n){n.items?t+=n.items.map((function(t){return t.toTex(e)})).join("&"):t+=n.toTex(e),t+="\\\\"})),t+="\\end{bmatrix}"},n}),{isClass:!0,isNode:!0});function pa(e){return(pa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}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(e,t){var n=e;"keep"!==t&&(n=e.getContent());for(var r=n.getIdentifier(),i=0;i<ma.length;i++)if(r in ma[i])return i;return null}function va(e,t){var n=e;"keep"!==t&&(n=e.getContent());var r=n.getIdentifier(),i=ga(n,t);if(null===i)return null;var o=ma[i][r];if(Object(A.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(e,t,n){var r="keep"!==n?e.getContent():e,i="keep"!==n?e.getContent():t,o=r.getIdentifier(),a=i.getIdentifier(),s=ga(r,n);if(null===s)return null;var u=ma[s][o];if(Object(A.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(e){var t,n,i,o=e.subset,a=e.matrix,s=e.Node,u=fa({subset:o}),l=(n=(t={subset:o,matrix:a}).subset,i=t.matrix,function(e,t,r){try{if(Array.isArray(e))return i(e).subset(t,r).valueOf();if(e&&"function"==typeof e.subset)return e.subset(t,r);if("string"==typeof e)return n(e,t,r);if("object"!==pa(e))throw new TypeError("Cannot apply index: unsupported type of object");if(!t.isObjectProperty())throw TypeError("Cannot apply a numeric index as object property");return Gn(e,t.getObjectProperty(),r),e}catch(e){throw la(e)}});function c(e,t,n){if(!(this instanceof c))throw new SyntaxError("Constructor must be called with the new operator");if(this.object=e,this.index=n?t:null,this.value=n||t,!Object(r.J)(e)&&!Object(r.a)(e))throw new TypeError('SymbolNode or AccessorNode expected as "object"');if(Object(r.J)(e)&&"end"===e.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(e,t){var n=ga(e,t=t||"keep"),r=ga(e.value,t);return"all"===t||null!==r&&r<=n}return(c.prototype=new s).type="AssignmentNode",c.prototype.isAssignmentNode=!0,c.prototype._compile=function(e,t){var n=this.object._compile(e,t),i=this.index?this.index._compile(e,t):null,o=this.value._compile(e,t),a=this.object.name;if(this.index){if(this.index.isObjectProperty()){var s=this.index.getObjectProperty();return function(e,t,r){var i=n(e,t,r),a=o(e,t,r);return Gn(i,s,a)}}if(Object(r.J)(this.object))return function(e,t,r){var s=n(e,t,r),u=o(e,t,r),c=i(e,t,s);return Gn(e,a,l(s,c,u)),u};var c=this.object.object._compile(e,t);if(this.object.index.isObjectProperty()){var f=this.object.index.getObjectProperty();return function(e,t,n){var r=c(e,t,n),a=Zn(r,f),s=i(e,t,a),u=o(e,t,n);return Gn(r,f,l(a,s,u)),u}}var h=this.object.index._compile(e,t);return function(e,t,n){var r=c(e,t,n),a=h(e,t,r),s=u(r,a),f=i(e,t,s),d=o(e,t,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(e,t,n){return Gn(e,a,o(e,t,n))}},c.prototype.forEach=function(e){e(this.object,"object",this),this.index&&e(this.index,"index",this),e(this.value,"value",this)},c.prototype.map=function(e){return new c(this._ifNode(e(this.object,"object",this)),this.index?this._ifNode(e(this.index,"index",this)):null,this._ifNode(e(this.value,"value",this)))},c.prototype.clone=function(){return new c(this.object,this.index,this.value)},c.prototype._toString=function(e){var t=this.object.toString(e),n=this.index?this.index.toString(e):"",r=this.value.toString(e);return f(this,e&&e.parenthesis)&&(r="("+r+")"),t+n+" = "+r},c.prototype.toJSON=function(){return{mathjs:"AssignmentNode",object:this.object,index:this.index,value:this.value}},c.fromJSON=function(e){return new c(e.object,e.index,e.value)},c.prototype.toHTML=function(e){var t=this.object.toHTML(e),n=this.index?this.index.toHTML(e):"",r=this.value.toHTML(e);return f(this,e&&e.parenthesis)&&(r='<span class="math-paranthesis math-round-parenthesis">(</span>'+r+'<span class="math-paranthesis math-round-parenthesis">)</span>'),t+n+'<span class="math-operator math-assignment-operator math-variable-assignment-operator math-binary-operator">=</span>'+r},c.prototype._toTex=function(e){var t=this.object.toTex(e),n=this.index?this.index.toTex(e):"",r=this.value.toTex(e);return f(this,e&&e.parenthesis)&&(r="\\left(".concat(r,"\\right)")),t+n+":="+r},c}),{isClass:!0,isNode:!0}),xa=Object(s.a)("BlockNode",["ResultSet","Node"],(function(e){var t=e.ResultSet,n=e.Node;function i(e){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");if(!Array.isArray(e))throw new Error("Array expected");this.blocks=e.map((function(e){var t=e&&e.node,n=!e||void 0===e.visible||e.visible;if(!Object(r.w)(t))throw new TypeError('Property "node" must be a Node');if("boolean"!=typeof n)throw new TypeError('Property "visible" must be a boolean');return{node:t,visible:n}}))}return(i.prototype=new n).type="BlockNode",i.prototype.isBlockNode=!0,i.prototype._compile=function(e,n){var r=Object(E.k)(this.blocks,(function(t){return{evaluate:t.node._compile(e,n),visible:t.visible}}));return function(e,n,i){var o=[];return Object(E.f)(r,(function(t){var r=t.evaluate(e,n,i);t.visible&&o.push(r)})),new t(o)}},i.prototype.forEach=function(e){for(var t=0;t<this.blocks.length;t++)e(this.blocks[t].node,"blocks["+t+"].node",this)},i.prototype.map=function(e){for(var t=[],n=0;n<this.blocks.length;n++){var r=this.blocks[n],o=this._ifNode(e(r.node,"blocks["+n+"].node",this));t[n]={node:o,visible:r.visible}}return new i(t)},i.prototype.clone=function(){return new i(this.blocks.map((function(e){return{node:e.node,visible:e.visible}})))},i.prototype._toString=function(e){return this.blocks.map((function(t){return t.node.toString(e)+(t.visible?"":";")})).join("\n")},i.prototype.toJSON=function(){return{mathjs:"BlockNode",blocks:this.blocks}},i.fromJSON=function(e){return new i(e.blocks)},i.prototype.toHTML=function(e){return this.blocks.map((function(t){return t.node.toHTML(e)+(t.visible?"":'<span class="math-separator">;</span>')})).join('<span class="math-separator"><br /></span>')},i.prototype._toTex=function(e){return this.blocks.map((function(t){return t.node.toTex(e)+(t.visible?"":";")})).join("\\;\\;\n")},i}),{isClass:!0,isNode:!0}),wa=Object(s.a)("ConditionalNode",["Node"],(function(e){var t=e.Node;function n(e,t,i){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(!Object(r.w)(e))throw new TypeError("Parameter condition must be a Node");if(!Object(r.w)(t))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=e,this.trueExpr=t,this.falseExpr=i}return(n.prototype=new t).type="ConditionalNode",n.prototype.isConditionalNode=!0,n.prototype._compile=function(e,t){var n=this.condition._compile(e,t),i=this.trueExpr._compile(e,t),o=this.falseExpr._compile(e,t);return function(e,t,a){return(function(e){if("number"==typeof e||"boolean"==typeof e||"string"==typeof e)return!!e;if(e){if(Object(r.e)(e))return!e.isZero();if(Object(r.j)(e))return!(!e.re&&!e.im);if(Object(r.L)(e))return!!e.value}if(null!=e)throw new TypeError('Unsupported type of condition "'+Object(r.M)(e)+'"');return!1}(n(e,t,a))?i:o)(e,t,a)}},n.prototype.forEach=function(e){e(this.condition,"condition",this),e(this.trueExpr,"trueExpr",this),e(this.falseExpr,"falseExpr",this)},n.prototype.map=function(e){return new n(this._ifNode(e(this.condition,"condition",this)),this._ifNode(e(this.trueExpr,"trueExpr",this)),this._ifNode(e(this.falseExpr,"falseExpr",this)))},n.prototype.clone=function(){return new n(this.condition,this.trueExpr,this.falseExpr)},n.prototype._toString=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=ga(this,t),r=this.condition.toString(e),i=ga(this.condition,t);("all"===t||"OperatorNode"===this.condition.type||null!==i&&i<=n)&&(r="("+r+")");var o=this.trueExpr.toString(e),a=ga(this.trueExpr,t);("all"===t||"OperatorNode"===this.trueExpr.type||null!==a&&a<=n)&&(o="("+o+")");var s=this.falseExpr.toString(e),u=ga(this.falseExpr,t);return("all"===t||"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(e){return new n(e.condition,e.trueExpr,e.falseExpr)},n.prototype.toHTML=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=ga(this,t),r=this.condition.toHTML(e),i=ga(this.condition,t);("all"===t||"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(e),a=ga(this.trueExpr,t);("all"===t||"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(e),u=ga(this.falseExpr,t);return("all"===t||"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(e){return"\\begin{cases} {"+this.trueExpr.toTex(e)+"}, &\\quad{\\text{if }\\;"+this.condition.toTex(e)+"}\\\\{"+this.falseExpr.toTex(e)+"}, &\\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"},Ea={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(e){return e.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)"}},Ca={deg:"^\\circ"};function Aa(e){return Sa()(e,{preserveFormatting:!0})}function Ma(e,t){return(t=void 0!==t&&t)?Object(A.f)(Ca,e)?Ca[e]:"\\mathrm{"+Aa(e)+"}":Object(A.f)(Oa,e)?Oa[e]:Aa(e)}var ka=Object(s.a)("ConstantNode",["Node"],(function(e){var t=e.Node;function n(e){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");this.value=e}return(n.prototype=new t).type="ConstantNode",n.prototype.isConstantNode=!0,n.prototype._compile=function(e,t){var n=this.value;return function(){return n}},n.prototype.forEach=function(e){},n.prototype.map=function(e){return this.clone()},n.prototype.clone=function(){return new n(this.value)},n.prototype._toString=function(e){return Object(C.d)(this.value,e)},n.prototype.toHTML=function(e){var t=this._toString(e);switch(Object(r.M)(this.value)){case"number":case"BigNumber":case"Fraction":return'<span class="math-number">'+t+"</span>";case"string":return'<span class="math-string">'+t+"</span>";case"boolean":return'<span class="math-boolean">'+t+"</span>";case"null":return'<span class="math-null-symbol">'+t+"</span>";case"undefined":return'<span class="math-undefined">'+t+"</span>";default:return'<span class="math-symbol">'+t+"</span>"}},n.prototype.toJSON=function(){return{mathjs:"ConstantNode",value:this.value}},n.fromJSON=function(e){return new n(e.value)},n.prototype._toTex=function(e){var t=this._toString(e);switch(Object(r.M)(this.value)){case"string":return"\\mathtt{"+Aa(t)+"}";case"number":case"BigNumber":if(!isFinite(this.value))return this.value.valueOf()<0?"-\\infty":"\\infty";var n=t.toLowerCase().indexOf("e");return-1!==n?t.substring(0,n)+"\\cdot10^{"+t.substring(n+1)+"}":t;case"Fraction":return this.value.toLatex();default:return t}},n}),{isClass:!0,isNode:!0}),Ta=Object(s.a)("FunctionAssignmentNode",["typed","Node"],(function(e){var t=e.typed,n=e.Node;function i(e,t,n){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");if("string"!=typeof e)throw new TypeError('String expected for parameter "name"');if(!Array.isArray(t))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(e in aa)throw new Error('Illegal function name, "'+e+'" is a reserved keyword');this.name=e,this.params=t.map((function(e){return e&&e.name||e})),this.types=t.map((function(e){return e&&e.type||"any"})),this.expr=n}function o(e,t){var n=ga(e,t),r=ga(e.expr,t);return"all"===t||null!==r&&r<=n}return(i.prototype=new n).type="FunctionAssignmentNode",i.prototype.isFunctionAssignmentNode=!0,i.prototype._compile=function(e,n){var r=Object.create(n);Object(E.f)(this.params,(function(e){r[e]=!0}));var i=this.expr._compile(e,r),o=this.name,a=this.params,s=Object(E.j)(this.types,","),u=o+"("+Object(E.j)(this.params,", ")+")";return function(e,n,r){var l={};l[s]=function(){for(var t=Object.create(n),o=0;o<a.length;o++)t[a[o]]=arguments[o];return i(e,t,r)};var c=t(o,l);return c.syntax=u,Gn(e,o,c),c}},i.prototype.forEach=function(e){e(this.expr,"expr",this)},i.prototype.map=function(e){var t=this._ifNode(e(this.expr,"expr",this));return new i(this.name,this.params.slice(0),t)},i.prototype.clone=function(){return new i(this.name,this.params.slice(0),this.expr)},i.prototype._toString=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=this.expr.toString(e);return o(this,t)&&(n="("+n+")"),this.name+"("+this.params.join(", ")+") = "+n},i.prototype.toJSON=function(){var e=this.types;return{mathjs:"FunctionAssignmentNode",name:this.name,params:this.params.map((function(t,n){return{name:t,type:e[n]}})),expr:this.expr}},i.fromJSON=function(e){return new i(e.name,e.params,e.expr)},i.prototype.toHTML=function(e){for(var t=e&&e.parenthesis?e.parenthesis:"keep",n=[],r=0;r<this.params.length;r++)n.push('<span class="math-symbol math-parameter">'+Object(C.c)(this.params[r])+"</span>");var i=this.expr.toHTML(e);return o(this,t)&&(i='<span class="math-parenthesis math-round-parenthesis">(</span>'+i+'<span class="math-parenthesis math-round-parenthesis">)</span>'),'<span class="math-function">'+Object(C.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(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=this.expr.toTex(e);return o(this,t)&&(n="\\left(".concat(n,"\\right)")),"\\mathrm{"+this.name+"}\\left("+this.params.map(Ma).join(",")+"\\right):="+n},i}),{isClass:!0,isNode:!0});function Da(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ja=Object(s.a)("IndexNode",["Range","Node","size"],(function(e){var t=e.Range,n=e.Node,i=e.size;function o(e,t){if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");if(this.dimensions=e,this.dotNotation=t||!1,!Array.isArray(e)||!e.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(e,n,i){return new t(Object(r.e)(e)?e.toNumber():e,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(e,t){var n=Object(E.k)(this.dimensions,(function(n,o){if(Object(r.E)(n)){if(n.needsEnd()){var s=Object.create(t);s.end=!0;var u=n.start._compile(e,s),l=n.end._compile(e,s),c=n.step?n.step._compile(e,s):function(){return 1};return function(e,t,n){var r=i(n).valueOf(),s=Object.create(t);return s.end=r[o],a(u(e,s,n),l(e,s,n),c(e,s,n))}}var f=n.start._compile(e,t),h=n.end._compile(e,t),d=n.step?n.step._compile(e,t):function(){return 1};return function(e,t,n){return a(f(e,t,n),h(e,t,n),d(e,t,n))}}if(Object(r.J)(n)&&"end"===n.name){var p=Object.create(t);p.end=!0;var m=n._compile(e,p);return function(e,t,n){var r=i(n).valueOf(),a=Object.create(t);return a.end=r[o],m(e,a,n)}}var g=n._compile(e,t);return function(e,t,n){return g(e,t,n)}})),o=Zn(e,"index");return function(e,t,r){var i=Object(E.k)(n,(function(n){return n(e,t,r)}));return o.apply(void 0,function(e){return function(e){if(Array.isArray(e))return Da(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Da(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Da(e,t):void 0}}(e)||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(e){for(var t=0;t<this.dimensions.length;t++)e(this.dimensions[t],"dimensions["+t+"]",this)},o.prototype.map=function(e){for(var t=[],n=0;n<this.dimensions.length;n++)t[n]=this._ifNode(e(this.dimensions[n],"dimensions["+n+"]",this));return new o(t,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(e){return this.dotNotation?"."+this.getObjectProperty():"["+this.dimensions.join(", ")+"]"},o.prototype.toJSON=function(){return{mathjs:"IndexNode",dimensions:this.dimensions,dotNotation:this.dotNotation}},o.fromJSON=function(e){return new o(e.dimensions,e.dotNotation)},o.prototype.toHTML=function(e){for(var t=[],n=0;n<this.dimensions.length;n++)t[n]=this.dimensions[n].toHTML();return this.dotNotation?'<span class="math-operator math-accessor-operator">.</span><span class="math-symbol math-property">'+Object(C.c)(this.getObjectProperty())+"</span>":'<span class="math-parenthesis math-square-parenthesis">[</span>'+t.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-square-parenthesis">]</span>'},o.prototype._toTex=function(e){var t=this.dimensions.map((function(t){return t.toTex(e)}));return this.dotNotation?"."+this.getObjectProperty():"_{"+t.join(",")+"}"},o}),{isClass:!0,isNode:!0});function Pa(e){return(Pa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Ia=Object(s.a)("ObjectNode",["Node"],(function(e){var t=e.Node;function n(e){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(this.properties=e||{},e&&("object"!==Pa(e)||!Object.keys(e).every((function(t){return Object(r.w)(e[t])}))))throw new TypeError("Object containing Nodes expected")}return(n.prototype=new t).type="ObjectNode",n.prototype.isObjectNode=!0,n.prototype._compile=function(e,t){var n={};for(var r in this.properties)if(Object(A.f)(this.properties,r)){var i=Object(C.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(e,t)}return function(e,t,r){var i={};for(var o in n)Object(A.f)(n,o)&&(i[o]=n[o](e,t,r));return i}},n.prototype.forEach=function(e){for(var t in this.properties)Object(A.f)(this.properties,t)&&e(this.properties[t],"properties["+Object(C.e)(t)+"]",this)},n.prototype.map=function(e){var t={};for(var r in this.properties)Object(A.f)(this.properties,r)&&(t[r]=this._ifNode(e(this.properties[r],"properties["+Object(C.e)(r)+"]",this)));return new n(t)},n.prototype.clone=function(){var e={};for(var t in this.properties)Object(A.f)(this.properties,t)&&(e[t]=this.properties[t]);return new n(e)},n.prototype._toString=function(e){var t=[];for(var n in this.properties)Object(A.f)(this.properties,n)&&t.push(Object(C.e)(n)+": "+this.properties[n].toString(e));return"{"+t.join(", ")+"}"},n.prototype.toJSON=function(){return{mathjs:"ObjectNode",properties:this.properties}},n.fromJSON=function(e){return new n(e.properties)},n.prototype.toHTML=function(e){var t=[];for(var n in this.properties)Object(A.f)(this.properties,n)&&t.push('<span class="math-symbol math-property">'+Object(C.c)(n)+'</span><span class="math-operator math-assignment-operator math-property-assignment-operator math-binary-operator">:</span>'+this.properties[n].toHTML(e));return'<span class="math-parenthesis math-curly-parenthesis">{</span>'+t.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-curly-parenthesis">}</span>'},n.prototype._toTex=function(e){var t=[];for(var n in this.properties)Object(A.f)(this.properties,n)&&t.push("\\mathbf{"+n+":} & "+this.properties[n].toTex(e)+"\\\\");return"\\left\\{\\begin{array}{ll}".concat(t.join("\n"),"\\end{array}\\right\\}")},n}),{isClass:!0,isNode:!0}),Ra=Object(s.a)("OperatorNode",["Node"],(function(e){var t=e.Node;function n(e,t,i,o){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if("string"!=typeof e)throw new TypeError('string expected for parameter "op"');if("string"!=typeof t)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=e,this.fn=t,this.args=i||[]}function i(e,t,n,r,i){var o,a=ga(e,t),s=va(e,t);if("all"===t||2<r.length&&"OperatorNode:add"!==e.getIdentifier()&&"OperatorNode:multiply"!==e.getIdentifier())return r.map((function(e){switch(e.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],t);if(i&&null!==u){var l,c="keep"===t?(l=r[0].getIdentifier(),e.getIdentifier()):(l=r[0].getContent().getIdentifier(),e.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],t),m=ya(e,r[0],t),g=null!==p&&(p===a&&"right"===s&&!m||p<a),v=ga(r[1],t),y=ya(e,r[1],t),b=null!==v&&(v===a&&"left"===s&&!y||v<a);i&&(d="keep"===t?(f=e.getIdentifier(),h=e.args[0].getIdentifier(),e.args[1].getIdentifier()):(f=e.getContent().getIdentifier(),h=e.args[0].getContent().getIdentifier(),e.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"!==e.getIdentifier()&&"OperatorNode:multiply"!==e.getIdentifier()||(o=r.map((function(n){var r=ga(n,t),i=ya(e,n,t),o=va(n,t);return null!==r&&(a===r&&s===o&&!i||r<a)})))}return 2<=r.length&&"OperatorNode:multiply"===e.getIdentifier()&&e.implicit&&"auto"===t&&"hide"===n&&(o=r.map((function(e,t){var n="ParenthesisNode"===e.getIdentifier();return!(!o[t]&&!n)}))),o}return(n.prototype=new t).type="OperatorNode",n.prototype.isOperatorNode=!0,n.prototype._compile=function(e,t){if("string"!=typeof this.fn||!Xn(e,this.fn))throw e[this.fn]?new Error('No access to function "'+this.fn+'"'):new Error("Function "+this.fn+' missing in provided namespace "math"');var n=Zn(e,this.fn),r=Object(E.k)(this.args,(function(n){return n._compile(e,t)}));if(1===r.length){var i=r[0];return function(e,t,r){return n(i(e,t,r))}}if(2!==r.length)return function(e,t,i){return n.apply(null,Object(E.k)(r,(function(n){return n(e,t,i)})))};var o=r[0],a=r[1];return function(e,t,r){return n(o(e,t,r),a(e,t,r))}},n.prototype.forEach=function(e){for(var t=0;t<this.args.length;t++)e(this.args[t],"args["+t+"]",this)},n.prototype.map=function(e){for(var t=[],r=0;r<this.args.length;r++)t[r]=this._ifNode(e(this.args[r],"args["+r+"]",this));return new n(this.op,this.fn,t,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(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=e&&e.implicit?e.implicit:"hide",r=this.args,o=i(this,t,n,r,!1);if(1===r.length){var a=va(this,t),s=r[0].toString(e);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(e),c=r[1].toString(e);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(t,n){return t=t.toString(e),o[n]&&(t="("+t+")"),t}));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(e){return new n(e.op,e.fn,e.args,e.implicit)},n.prototype.toHTML=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=e&&e.implicit?e.implicit:"hide",r=this.args,o=i(this,t,n,r,!1);if(1===r.length){var a=va(this,t),s=r[0].toHTML(e);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(C.c)(this.op)+"</span>"+s:s+'<span class="math-operator math-unary-operator math-righthand-unary-operator">'+Object(C.c)(this.op)+"</span>"}if(2===r.length){var u=r[0].toHTML(e),l=r[1].toHTML(e);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(C.c)(this.op)+"</span>"+l}var c=r.map((function(t,n){return t=t.toHTML(e),o[n]&&(t='<span class="math-parenthesis math-round-parenthesis">(</span>'+t+'<span class="math-parenthesis math-round-parenthesis">)</span>'),t}));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(C.c)(this.op)+"</span>"):'<span class="math-function">'+Object(C.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(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=e&&e.implicit?e.implicit:"hide",r=this.args,o=i(this,t,n,r,!0),a=void 0===(a=Na[this.fn])?this.op:a;if(1===r.length){var s=va(this,t),u=r[0].toTex(e);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(e);o[0]&&(c="\\left(".concat(c,"\\right)"));var f,h=r[1].toTex(e);switch(o[1]&&(h="\\left(".concat(h,"\\right)")),f="keep"===t?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(t,n){return t=t.toTex(e),o[n]&&(t="\\left(".concat(t,"\\right)")),t}));return"OperatorNode:multiply"===this.getIdentifier()&&this.implicit?d.join("~"):d.join(a)}return"\\mathrm{"+this.fn+"}\\left("+r.map((function(t){return t.toTex(e)})).join(",")+"\\right)"},n.prototype.getIdentifier=function(){return this.type+":"+this.fn},n}),{isClass:!0,isNode:!0}),La=Object(s.a)("ParenthesisNode",["Node"],(function(e){var t=e.Node;function n(e){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(!Object(r.w)(e))throw new TypeError('Node expected for parameter "content"');this.content=e}return(n.prototype=new t).type="ParenthesisNode",n.prototype.isParenthesisNode=!0,n.prototype._compile=function(e,t){return this.content._compile(e,t)},n.prototype.getContent=function(){return this.content.getContent()},n.prototype.forEach=function(e){e(this.content,"content",this)},n.prototype.map=function(e){return new n(e(this.content,"content",this))},n.prototype.clone=function(){return new n(this.content)},n.prototype._toString=function(e){return!e||e&&!e.parenthesis||e&&"keep"===e.parenthesis?"("+this.content.toString(e)+")":this.content.toString(e)},n.prototype.toJSON=function(){return{mathjs:"ParenthesisNode",content:this.content}},n.fromJSON=function(e){return new n(e.content)},n.prototype.toHTML=function(e){return!e||e&&!e.parenthesis||e&&"keep"===e.parenthesis?'<span class="math-parenthesis math-round-parenthesis">(</span>'+this.content.toHTML(e)+'<span class="math-parenthesis math-round-parenthesis">)</span>':this.content.toHTML(e)},n.prototype._toTex=function(e){return!e||e&&!e.parenthesis||e&&"keep"===e.parenthesis?"\\left(".concat(this.content.toTex(e),"\\right)"):this.content.toTex(e)},n}),{isClass:!0,isNode:!0}),Fa=Object(s.a)("RangeNode",["Node"],(function(e){var t=e.Node;function n(e,t,i){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(!Object(r.w)(e))throw new TypeError("Node expected");if(!Object(r.w)(t))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=e,this.end=t,this.step=i||null}function i(e,t){var n,r=ga(e,t),i={},o=ga(e.start,t);i.start=null!==o&&o<=r||"all"===t,e.step&&(n=ga(e.step,t),i.step=null!==n&&n<=r||"all"===t);var a=ga(e.end,t);return i.end=null!==a&&a<=r||"all"===t,i}return(n.prototype=new t).type="RangeNode",n.prototype.isRangeNode=!0,n.prototype.needsEnd=function(){return 0<this.filter((function(e){return Object(r.J)(e)&&"end"===e.name})).length},n.prototype._compile=function(e,t){var n=e.range,r=this.start._compile(e,t),i=this.end._compile(e,t);if(this.step){var o=this.step._compile(e,t);return function(e,t,a){return n(r(e,t,a),i(e,t,a),o(e,t,a))}}return function(e,t,o){return n(r(e,t,o),i(e,t,o))}},n.prototype.forEach=function(e){e(this.start,"start",this),e(this.end,"end",this),this.step&&e(this.step,"step",this)},n.prototype.map=function(e){return new n(this._ifNode(e(this.start,"start",this)),this._ifNode(e(this.end,"end",this)),this.step&&this._ifNode(e(this.step,"step",this)))},n.prototype.clone=function(){return new n(this.start,this.end,this.step&&this.step)},n.prototype._toString=function(e){var t,n,r=i(this,e&&e.parenthesis?e.parenthesis:"keep"),o=this.start.toString(e);r.start&&(o="("+o+")"),t=o,this.step&&(n=this.step.toString(e),r.step&&(n="("+n+")"),t+=":"+n);var a=this.end.toString(e);return r.end&&(a="("+a+")"),t+":"+a},n.prototype.toJSON=function(){return{mathjs:"RangeNode",start:this.start,end:this.end,step:this.step}},n.fromJSON=function(e){return new n(e.start,e.end,e.step)},n.prototype.toHTML=function(e){var t,n,r=i(this,e&&e.parenthesis?e.parenthesis:"keep"),o=this.start.toHTML(e);r.start&&(o='<span class="math-parenthesis math-round-parenthesis">(</span>'+o+'<span class="math-parenthesis math-round-parenthesis">)</span>'),t=o,this.step&&(n=this.step.toHTML(e),r.step&&(n='<span class="math-parenthesis math-round-parenthesis">(</span>'+n+'<span class="math-parenthesis math-round-parenthesis">)</span>'),t+='<span class="math-operator math-range-operator">:</span>'+n);var a=this.end.toHTML(e);return r.end&&(a='<span class="math-parenthesis math-round-parenthesis">(</span>'+a+'<span class="math-parenthesis math-round-parenthesis">)</span>'),t+'<span class="math-operator math-range-operator">:</span>'+a},n.prototype._toTex=function(e){var t,n=i(this,e&&e.parenthesis?e.parenthesis:"keep"),r=this.start.toTex(e);n.start&&(r="\\left(".concat(r,"\\right)")),this.step&&(t=this.step.toTex(e),n.step&&(t="\\left(".concat(t,"\\right)")),r+=":"+t);var o=this.end.toTex(e);return n.end&&(o="\\left(".concat(o,"\\right)")),r+":"+o},n}),{isClass:!0,isNode:!0}),Ba=Object(s.a)("RelationalNode",["Node"],(function(e){var t=e.Node;function n(e,t){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(!Array.isArray(e))throw new TypeError("Parameter conditionals must be an array");if(!Array.isArray(t))throw new TypeError("Parameter params must be an array");if(e.length!==t.length-1)throw new TypeError("Parameter params must contain exactly one more element than parameter conditionals");this.conditionals=e,this.params=t}return(n.prototype=new t).type="RelationalNode",n.prototype.isRelationalNode=!0,n.prototype._compile=function(e,t){var n=this,r=this.params.map((function(n){return n._compile(e,t)}));return function(t,i,o){for(var a=r[0](t,i,o),s=0;s<n.conditionals.length;s++){var u=a;if(a=r[s+1](t,i,o),!Zn(e,n.conditionals[s])(u,a))return!1}return!0}},n.prototype.forEach=function(e){var t=this;this.params.forEach((function(n,r){return e(n,"params["+r+"]",t)}),this)},n.prototype.map=function(e){var t=this;return new n(this.conditionals.slice(),this.params.map((function(n,r){return t._ifNode(e(n,"params["+r+"]",t))}),this))},n.prototype.clone=function(){return new n(this.conditionals,this.params)},n.prototype._toString=function(e){for(var t=e&&e.parenthesis?e.parenthesis:"keep",n=ga(this,t),r=this.params.map((function(r,i){var o=ga(r,t);return"all"===t||null!==o&&o<=n?"("+r.toString(e)+")":r.toString(e)})),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(e){return new n(e.conditionals,e.params)},n.prototype.toHTML=function(e){for(var t=e&&e.parenthesis?e.parenthesis:"keep",n=ga(this,t),r=this.params.map((function(r,i){var o=ga(r,t);return"all"===t||null!==o&&o<=n?'<span class="math-parenthesis math-round-parenthesis">(</span>'+r.toHTML(e)+'<span class="math-parenthesis math-round-parenthesis">)</span>':r.toHTML(e)})),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(C.c)(i[this.conditionals[a]])+"</span>"+r[a+1];return o},n.prototype._toTex=function(e){for(var t=e&&e.parenthesis?e.parenthesis:"keep",n=ga(this,t),r=this.params.map((function(r,i){var o=ga(r,t);return"all"===t||null!==o&&o<=n?"\\left("+r.toTex(e)+"\right)":r.toTex(e)})),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}),qa=Object(s.a)("SymbolNode",["math","?Unit","Node"],(function(e){var t=e.math,n=e.Unit,r=e.Node;function i(e){return!!n&&n.isValuelessUnit(e)}function o(e){if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");if("string"!=typeof e)throw new TypeError('String expected for parameter "name"');this.name=e}return(o.prototype=new r).type="SymbolNode",o.prototype.isSymbolNode=!0,o.prototype._compile=function(e,t){var r=this.name;if(!0===t[r])return function(e,t,n){return t[r]};if(r in e)return function(t,n,i){return Zn(r in t?t:e,r)};var o=i(r);return function(e,t,i){return r in e?Zn(e,r):o?new n(null,r):function(e){throw new Error("Undefined symbol "+e)}(r)}},o.prototype.forEach=function(e){},o.prototype.map=function(e){return this.clone()},o.prototype.clone=function(){return new o(this.name)},o.prototype._toString=function(e){return this.name},o.prototype.toHTML=function(e){var t=Object(C.c)(this.name);return"true"===t||"false"===t?'<span class="math-symbol math-boolean">'+t+"</span>":"i"===t?'<span class="math-symbol math-imaginary-symbol">'+t+"</span>":"Infinity"===t?'<span class="math-symbol math-infinity-symbol">'+t+"</span>":"NaN"===t?'<span class="math-symbol math-nan-symbol">'+t+"</span>":"null"===t?'<span class="math-symbol math-null-symbol">'+t+"</span>":"undefined"===t?'<span class="math-symbol math-undefined-symbol">'+t+"</span>":'<span class="math-symbol">'+t+"</span>"},o.prototype.toJSON=function(){return{mathjs:"SymbolNode",name:this.name}},o.fromJSON=function(e){return new o(e.name)},o.prototype._toTex=function(e){var n=!1;void 0===t[this.name]&&i(this.name)&&(n=!0);var r=Ma(this.name,n);return"\\"===r[0]?r:" "+r},o}),{isClass:!0,isNode:!0});function za(e){return(za="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ha(){return(Ha=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Ua=Object(s.a)("FunctionNode",["math","Node","SymbolNode"],(function(e){var t=e.math,n=e.Node,i=e.SymbolNode;function o(e,t){if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");if("string"==typeof e&&(e=new i(e)),!Object(r.w)(e))throw new TypeError('Node expected as parameter "fn"');if(!Array.isArray(t)||!t.every(r.w))throw new TypeError('Array containing Nodes expected for parameter "args"');this.fn=e,this.args=t||[],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(e,t){if(!(this instanceof o))throw new TypeError("No valid FunctionNode");var n=Object(E.k)(this.args,(function(n){return n._compile(e,t)}));if(Object(r.J)(this.fn)){var i=this.fn.name,a=i in e?Zn(e,i):void 0;if("function"==typeof a&&!0===a.rawArgs){var s=this.args;return function(t,n){return(i in t?Zn(t,i):a)(s,e,Ha({},t,n))}}if(1===n.length){var u=n[0];return function(e,t,n){return(i in e?Zn(e,i):a)(u(e,t,n))}}if(2!==n.length)return function(e,t,r){return(i in e?Zn(e,i):a).apply(null,Object(E.k)(n,(function(n){return n(e,t,r)})))};var l=n[0],c=n[1];return function(e,t,n){return(i in e?Zn(e,i):a)(l(e,t,n),c(e,t,n))}}if(Object(r.a)(this.fn)&&Object(r.u)(this.fn.index)&&this.fn.index.isObjectProperty()){var f=this.fn.object._compile(e,t),h=this.fn.index.getObjectProperty(),d=this.args;return function(t,r,i){var o=f(t,r,i);return function(e,t){if(!Xn(e,t))throw new Error('No access to method "'+t+'"')}(o,h),o[h]&&o[h].rawArgs?o[h](d,e,Ha({},t,r)):o[h].apply(o,Object(E.k)(n,(function(e){return e(t,r,i)})))}}var p=this.fn._compile(e,t),m=this.args;return function(t,r,i){var o=p(t,r,i);return o&&o.rawArgs?o(m,e,Ha({},t,r)):o.apply(o,Object(E.k)(n,(function(e){return e(t,r,i)})))}},o.prototype.forEach=function(e){e(this.fn,"fn",this);for(var t=0;t<this.args.length;t++)e(this.args[t],"args["+t+"]",this)},o.prototype.map=function(e){for(var t=this._ifNode(e(this.fn,"fn",this)),n=[],r=0;r<this.args.length;r++)n[r]=this._ifNode(e(this.args[r],"args["+r+"]",this));return new o(t,n)},o.prototype.clone=function(){return new o(this.fn,this.args.slice(0))};var a=o.prototype.toString;function s(e,t,n){for(var i,o="",a=new RegExp("\\$(?:\\{([a-z_][a-z_0-9]*)(?:\\[([0-9]+)\\])?\\}|\\$)","ig"),s=0;null!==(i=a.exec(e));)if(o+=e.substring(s,i.index),s=i.index,"$$"===i[0])o+="$",s++;else{s+=i[0].length;var u=t[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(e,t){if(Object(r.w)(e))return e.toTex(n);throw new TypeError("Template: "+i[1]+"["+t+"] 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+e.slice(s)}o.prototype.toString=function(e){var t,n=this.fn.toString(e);return e&&"object"===za(e.handler)&&Object(A.f)(e.handler,n)&&(t=e.handler[n](this,e)),void 0!==t?t:a.call(this,e)},o.prototype._toString=function(e){var t=this.args.map((function(t){return t.toString(e)}));return(Object(r.q)(this.fn)?"("+this.fn.toString(e)+")":this.fn.toString(e))+"("+t.join(", ")+")"},o.prototype.toJSON=function(){return{mathjs:"FunctionNode",fn:this.fn,args:this.args}},o.fromJSON=function(e){return new o(e.fn,e.args)},o.prototype.toHTML=function(e){var t=this.args.map((function(t){return t.toHTML(e)}));return'<span class="math-function">'+Object(C.c)(this.fn)+'</span><span class="math-paranthesis math-round-parenthesis">(</span>'+t.join('<span class="math-separator">,</span>')+'<span class="math-paranthesis math-round-parenthesis">)</span>'};var u=o.prototype.toTex;return o.prototype.toTex=function(e){var t;return e&&"object"===za(e.handler)&&Object(A.f)(e.handler,this.name)&&(t=e.handler[this.name](this,e)),void 0!==t?t:u.call(this,e)},o.prototype._toTex=function(e){var n,r,i=this.args.map((function(t){return t.toTex(e)}));switch(Ea[this.name]&&(n=Ea[this.name]),!t[this.name]||"function"!=typeof t[this.name].toTex&&"object"!==za(t[this.name].toTex)&&"string"!=typeof t[this.name].toTex||(n=t[this.name].toTex),za(n)){case"function":r=n(this,e);break;case"string":r=s(n,this,e);break;case"object":switch(za(n[i.length])){case"function":r=n[i.length](this,e);break;case"string":r=s(n[i.length],this,e)}}return void 0!==r?r:s("\\mathrm{${name}}\\left(${args}\\right)",this,e)},o.prototype.getIdentifier=function(){return this.type+":"+this.name},o}),{isClass:!0,isNode:!0});function Wa(){return(Wa=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).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(e){var t=e.typed,n=e.numeric,i=e.config,o=e.AccessorNode,a=e.ArrayNode,s=e.AssignmentNode,u=e.BlockNode,l=e.ConditionalNode,c=e.ConstantNode,f=e.FunctionAssignmentNode,h=e.FunctionNode,d=e.IndexNode,p=e.ObjectNode,m=e.OperatorNode,g=e.ParenthesisNode,v=e.RangeNode,y=e.RelationalNode,b=e.SymbolNode,x=t("parse",{string:function(e){return F(e,{})},"Array | Matrix":function(e){return w(e,{})},"string, Object":function(e,t){return F(e,void 0!==t.nodes?t.nodes:{})},"Array | Matrix, Object":w});function w(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=void 0!==t.nodes?t.nodes:{};return I(e,(function(e){if("string"!=typeof e)throw new TypeError("String expected");return F(e,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},E=["NaN","Infinity"];function C(e,t){return e.expression.substr(e.index,t)}function M(e){return C(e,1)}function k(e){e.index++}function T(e){return e.expression.charAt(e.index-1)}function D(e){return e.expression.charAt(e.index+1)}function j(e){for(e.tokenType=_.NULL,e.token="",e.comment="";x.isWhitespace(M(e),e.nestingLevel);)k(e);if("#"===M(e))for(;"\n"!==M(e)&&""!==M(e);)e.comment+=M(e),k(e);if(""!==M(e)){if("\n"===M(e)&&!e.nestingLevel)return e.tokenType=_.DELIMITER,e.token=M(e),void k(e);var t=M(e),n=C(e,2),r=C(e,3);if(3===r.length&&S[r])return e.tokenType=_.DELIMITER,e.token=r,k(e),k(e),void k(e);if(2===n.length&&S[n])return e.tokenType=_.DELIMITER,e.token=n,k(e),void k(e);if(S[t])return e.tokenType=_.DELIMITER,e.token=t,void k(e);if(x.isDigitDot(t)){if(e.tokenType=_.NUMBER,"."===M(e))e.token+=M(e),k(e),x.isDigit(M(e))||(e.tokenType=_.DELIMITER);else{for(;x.isDigit(M(e));)e.token+=M(e),k(e);x.isDecimalMark(M(e),D(e))&&(e.token+=M(e),k(e))}for(;x.isDigit(M(e));)e.token+=M(e),k(e);if("E"===M(e)||"e"===M(e))if(x.isDigit(D(e))||"-"===D(e)||"+"===D(e)){if(e.token+=M(e),k(e),"+"!==M(e)&&"-"!==M(e)||(e.token+=M(e),k(e)),!x.isDigit(M(e)))throw oe(e,'Digit expected, got "'+M(e)+'"');for(;x.isDigit(M(e));)e.token+=M(e),k(e);if(x.isDecimalMark(M(e),D(e)))throw oe(e,'Digit expected, got "'+M(e)+'"')}else if("."===D(e))throw k(e),oe(e,'Digit expected, got "'+M(e)+'"')}else{if(!x.isAlpha(M(e),T(e),D(e))){for(e.tokenType=_.UNKNOWN;""!==M(e);)e.token+=M(e),k(e);throw oe(e,'Syntax error in part "'+e.token+'"')}for(;x.isAlpha(M(e),T(e),D(e))||x.isDigit(M(e));)e.token+=M(e),k(e);Object(A.f)(O,e.token)?e.tokenType=_.DELIMITER:e.tokenType=_.SYMBOL}}else e.tokenType=_.DELIMITER}function P(e){for(;j(e),"\n"===e.token;);}function R(e){e.nestingLevel++}function L(e){e.nestingLevel--}function F(e,t){var n={extraNodes:{},expression:"",comment:"",index:0,token:"",tokenType:_.NULL,nestingLevel:0,conditionalLevel:null};Wa(n,{expression:e,extraNodes:t}),j(n);var r=function(e){var t,n,r=[];for(""!==e.token&&"\n"!==e.token&&";"!==e.token&&((t=B(e)).comment=e.comment);"\n"===e.token||";"===e.token;)0===r.length&&t&&(n=";"!==e.token,r.push({node:t,visible:n})),j(e),"\n"!==e.token&&";"!==e.token&&""!==e.token&&((t=B(e)).comment=e.comment,n=";"!==e.token,r.push({node:t,visible:n}));return 0<r.length?new u(r):(t||((t=new c(void 0)).comment=e.comment),t)}(n);if(""!==n.token)throw n.tokenType===_.DELIMITER?ae(n,"Unexpected operator "+n.token):oe(n,'Unexpected part "'+n.token+'"');return r}function B(e){var t,n,i,o,a=function(e){for(var t=function(e){for(var t=q(e);"or"===e.token;)P(e),t=new m("or","or",[t,q(e)]);return t}(e);"?"===e.token;){var n=e.conditionalLevel;e.conditionalLevel=e.nestingLevel,P(e);var r=t,i=B(e);if(":"!==e.token)throw oe(e,"False part of conditional expression expected");e.conditionalLevel=null,P(e);var o=B(e);t=new l(r,i,o),e.conditionalLevel=n}return t}(e);if("="!==e.token)return a;if(Object(r.J)(a))return t=a.name,P(e),i=B(e),new s(new b(t),i);if(Object(r.a)(a))return P(e),i=B(e),new s(a.object,a.index,i);if(Object(r.r)(a)&&Object(r.J)(a.fn)&&(o=!0,n=[],t=a.name,a.args.forEach((function(e,t){Object(r.J)(e)?n[t]=e.name:o=!1})),o))return P(e),i=B(e),new f(t,n,i);throw oe(e,"Invalid left hand side of assignment operator =")}function q(e){for(var t=z(e);"xor"===e.token;)P(e),t=new m("xor","xor",[t,z(e)]);return t}function z(e){for(var t=H(e);"and"===e.token;)P(e),t=new m("and","and",[t,H(e)]);return t}function H(e){for(var t=U(e);"|"===e.token;)P(e),t=new m("|","bitOr",[t,U(e)]);return t}function U(e){for(var t=W(e);"^|"===e.token;)P(e),t=new m("^|","bitXor",[t,W(e)]);return t}function W(e){for(var t=V(e);"&"===e.token;)P(e),t=new m("&","bitAnd",[t,V(e)]);return t}function V(e){for(var t=[$(e)],n=[],r={"==":"equal","!=":"unequal","<":"smaller",">":"larger","<=":"smallerEq",">=":"largerEq"};Object(A.f)(r,e.token);){var i={name:e.token,fn:r[e.token]};n.push(i),P(e),t.push($(e))}return 1===t.length?t[0]:2===t.length?new m(n[0].name,n[0].fn,t):new y(n.map((function(e){return e.fn})),t)}function $(e){for(var t,n,r,i=Y(e),o={"<<":"leftShift",">>":"rightArithShift",">>>":"rightLogShift"};Object(A.f)(o,e.token);)n=o[t=e.token],P(e),r=[i,Y(e)],i=new m(t,n,r);return i}function Y(e){for(var t,n,r,i=Z(e),o={to:"to",in:"to"};Object(A.f)(o,e.token);)n=o[t=e.token],P(e),i="in"===t&&""===e.token?new m("*","multiply",[i,new b("in")],!0):(r=[i,Z(e)],new m(t,n,r));return i}function Z(e){var t=[],n=":"===e.token?new c(1):G(e);if(":"===e.token&&e.conditionalLevel!==e.nestingLevel){for(t.push(n);":"===e.token&&t.length<3;)P(e),")"===e.token||"]"===e.token||","===e.token||""===e.token?t.push(new b("end")):t.push(G(e));n=3===t.length?new v(t[0],t[2],t[1]):new v(t[0],t[1])}return n}function G(e){for(var t,n,r,i=K(e),o={"+":"add","-":"subtract"};Object(A.f)(o,e.token);)n=o[t=e.token],P(e),r=[i,K(e)],i=new m(t,n,r);return i}function K(e){for(var t,n,r,i=X(e),o={"*":"multiply",".*":"dotMultiply","/":"divide","./":"dotDivide","%":"mod",mod:"mod"};Object(A.f)(o,e.token);)n=o[t=e.token],P(e),r=X(e),i=new m(t,n,[i,r]);return i}function X(e){for(var t=J(e),n=t;e.tokenType===_.SYMBOL||"in"===e.token&&Object(r.l)(t)||!(e.tokenType!==_.NUMBER||Object(r.l)(n)||Object(r.B)(n)&&"!"!==n.op)||"("===e.token;)n=J(e),t=new m("*","multiply",[t,n],!0);return t}function J(e){for(var t=Q(e),n=t,i=[];"/"===e.token&&Object(r.l)(n);){if(i.push(Wa({},e)),P(e),e.tokenType!==_.NUMBER){Wa(e,i.pop());break}if(i.push(Wa({},e)),P(e),e.tokenType!==_.SYMBOL&&"("!==e.token){i.pop(),Wa(e,i.pop());break}Wa(e,i.pop()),i.pop(),n=Q(e),t=new m("/","divide",[t,n])}return t}function Q(e){var t,r,o,s={"-":"unaryMinus","+":"unaryPlus","~":"bitNot",not:"not"};return Object(A.f)(s,e.token)?(o=s[e.token],t=e.token,P(e),r=[Q(e)],new m(t,o,r)):function(e){var t,r,o,s;return t=function(e){var t,r,o;t=function(e){var t=[];if(e.tokenType===_.SYMBOL&&Object(A.f)(e.extraNodes,e.token)){var r=e.extraNodes[e.token];if(j(e),"("===e.token){if(t=[],R(e),j(e),")"!==e.token)for(t.push(B(e));","===e.token;)j(e),t.push(B(e));if(")"!==e.token)throw oe(e,"Parenthesis ) expected");L(e),j(e)}return new r(t)}return function(e){var t;return e.tokenType===_.SYMBOL||e.tokenType===_.DELIMITER&&e.token in O?(t=e.token,j(e),ee(e,Object(A.f)(N,t)?new c(N[t]):-1!==E.indexOf(t)?new c(n(t,"number")):new b(t))):function(e){var t;return'"'!==e.token?function(e){var t;return"'"!==e.token?function(e){var t,r,o,s;if("["!==e.token)return function(e){if("{"!==e.token)return function(e){var t;return e.tokenType!==_.NUMBER?function(e){var t;if("("!==e.token)return function(e){throw""===e.token?oe(e,"Unexpected end of expression"):oe(e,"Value expected")}(e);if(R(e),j(e),t=B(e),")"===e.token)return L(e),j(e),ee(e,t=new g(t));throw oe(e,"Parenthesis ) expected")}(e):(t=e.token,j(e),new c(n(t,i.number)))}(e);var t;R(e);var r={};do{if(j(e),"}"!==e.token){if('"'===e.token)t=te(e);else if("'"===e.token)t=ne(e);else{if(!(e.tokenType===_.SYMBOL||e.tokenType===_.DELIMITER&&e.token in O))throw oe(e,"Symbol or string expected as object key");t=e.token,j(e)}if(":"!==e.token)throw oe(e,"Colon : expected after object key");j(e),r[t]=B(e)}}while(","===e.token);if("}"!==e.token)throw oe(e,"Comma , or bracket } expected after object value");return L(e),j(e),ee(e,new p(r))}(e);if(R(e),j(e),"]"!==e.token){var u=re(e);if(";"===e.token){for(o=1,r=[u];";"===e.token;)j(e),r[o]=re(e),o++;if("]"!==e.token)throw oe(e,"End of matrix ] expected");L(e),j(e),s=r[0].items.length;for(var l=1;l<o;l++)if(r[l].items.length!==s)throw ae(e,"Column dimensions mismatch ("+r[l].items.length+" !== "+s+")");t=new a(r)}else{if("]"!==e.token)throw oe(e,"End of matrix ] expected");L(e),j(e),t=u}}else L(e),j(e),t=new a([]);return ee(e,t)}(e):(t=ne(e),ee(e,new c(t)))}(e):(t=te(e),ee(e,new c(t)))}(e)}(e)}(e);for(var s={"!":"factorial","'":"ctranspose"};Object(A.f)(s,e.token);)o=s[r=e.token],j(e),t=ee(e,t=new m(r,o,[t]));return t}(e),"^"!==e.token&&".^"!==e.token||(o="^"===(r=e.token)?"pow":"dotPow",P(e),s=[t,Q(e)],t=new m(r,o,s)),t}(e)}function ee(e,t,n){for(var i;!("("!==e.token&&"["!==e.token&&"."!==e.token||n&&-1===n.indexOf(e.token));)if(i=[],"("===e.token){if(!Object(r.J)(t)&&!Object(r.a)(t))return t;if(R(e),j(e),")"!==e.token)for(i.push(B(e));","===e.token;)j(e),i.push(B(e));if(")"!==e.token)throw oe(e,"Parenthesis ) expected");L(e),j(e),t=new h(t,i)}else if("["===e.token){if(R(e),j(e),"]"!==e.token)for(i.push(B(e));","===e.token;)j(e),i.push(B(e));if("]"!==e.token)throw oe(e,"Parenthesis ] expected");L(e),j(e),t=new o(t,new d(i))}else{if(j(e),e.tokenType!==_.SYMBOL)throw oe(e,"Property name expected after dot");i.push(new c(e.token)),j(e),t=new o(t,new d(i,!0))}return t}function te(e){for(var t="";""!==M(e)&&'"'!==M(e);)"\\"===M(e)&&(t+=M(e),k(e)),t+=M(e),k(e);if(j(e),'"'!==e.token)throw oe(e,'End of string " expected');return j(e),JSON.parse('"'+t+'"')}function ne(e){for(var t="";""!==M(e)&&"'"!==M(e);)"\\"===M(e)&&(t+=M(e),k(e)),t+=M(e),k(e);if(j(e),"'"!==e.token)throw oe(e,"End of string ' expected");return j(e),JSON.parse('"'+t+'"')}function re(e){for(var t=[B(e)],n=1;","===e.token;)j(e),t[n]=B(e),n++;return new a(t)}function ie(e){return e.index-e.token.length+1}function oe(e,t){var n=ie(e),r=new SyntaxError(t+" (char "+n+")");return r.char=n,r}function ae(e,t){var n=ie(e),r=new SyntaxError(t+" (char "+n+")");return r.char=n,r}return x.isAlpha=function(e,t,n){return x.isValidLatinOrGreek(e)||x.isValidMathSymbol(e,n)||x.isValidMathSymbol(t,e)},x.isValidLatinOrGreek=function(e){return/^[a-zA-Z_$\u00C0-\u02AF\u0370-\u03FF\u2100-\u214F]$/.test(e)},x.isValidMathSymbol=function(e,t){return/^[\uD835]$/.test(e)&&/^[\uDC00-\uDFFF]$/.test(t)&&/^[^\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(t)},x.isWhitespace=function(e,t){return" "===e||"\t"===e||"\n"===e&&0<t},x.isDecimalMark=function(e,t){return"."===e&&"/"!==t&&"*"!==t&&"^"!==t},x.isDigitDot=function(e){return"0"<=e&&e<="9"||"."===e},x.isDigit=function(e){return"0"<=e&&e<="9"},x})),$a="compile",Ya=Object(s.a)($a,["typed","parse"],(function(e){var t=e.typed,n=e.parse;return t($a,{string:function(e){return n(e).compile()},"Array | Matrix":function(e){return I(e,(function(e){return n(e).compile()}))}})})),Za="evaluate",Ga=Object(s.a)(Za,["typed","parse"],(function(e){var t=e.typed,n=e.parse;return t(Za,{string:function(e){return n(e).compile().evaluate({})},"string, Object":function(e,t){return n(e).compile().evaluate(t)},"Array | Matrix":function(e){var t={};return I(e,(function(e){return n(e).compile().evaluate(t)}))},"Array | Matrix, Object":function(e,t){return I(e,(function(e){return n(e).compile().evaluate(t)}))}})})),Ka=Object(s.a)("Parser",["parse"],(function(e){var t=e.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(e){return t(e).compile().evaluate(this.scope)},n.prototype.get=function(e){return e in this.scope?Zn(this.scope,e):void 0},n.prototype.getAll=function(){return Object(A.e)({},this.scope)},n.prototype.set=function(e,t){return Gn(this.scope,e,t)},n.prototype.remove=function(e){delete this.scope[e]},n.prototype.clear=function(){for(var e in this.scope)Object(A.f)(this.scope,e)&&delete this.scope[e]},n}),{isClass:!0}),Xa=Object(s.a)("parser",["typed","Parser"],(function(e){var t=e.typed,n=e.Parser;return t("parser",{"":function(){return new n}})})),Ja=Object(s.a)("lup",["typed","matrix","abs","addScalar","divideScalar","multiplyScalar","subtract","larger","equalScalar","unaryMinus","DenseMatrix","SparseMatrix","Spa"],(function(e){var t=e.typed,n=e.matrix,r=e.abs,i=e.addScalar,o=e.divideScalar,a=e.multiplyScalar,s=e.subtract,u=e.larger,l=e.equalScalar,c=e.unaryMinus,f=e.DenseMatrix,h=e.SparseMatrix,d=e.Spa;return t("lup",{DenseMatrix:p,SparseMatrix:function(e){var t,n,i,s=e._size[0],f=e._size[1],p=Math.min(s,f),m=e._values,g=e._index,v=e._ptr,y=[],b=[],x=[],w=[s,p],_=[],S=[],O=[],N=[p,f],E=[],C=[];for(t=0;t<s;t++)E[t]=t,C[t]=t;function A(){var e=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++)t=g[i],e.set(E[t],m[i]);0<n&&e.forEach(0,n-1,(function(t,n){h._forEachRow(t,y,b,x,(function(r,i){t<r&&e.accumulate(r,c(a(i,n)))}))}));var A,M,k,T,D=n,j=e.get(n),P=r(j);e.forEach(n+1,s-1,(function(e,t){var n=r(t);u(n,P)&&(D=e,P=n,j=t)})),n!==D&&(h._swapRows(n,D,w[1],y,b,x),h._swapRows(n,D,N[1],_,S,O),e.swap(n,D),M=D,k=C[A=n],T=C[M],E[k]=M,E[T]=A,C[A]=T,C[M]=k),e.forEach(0,s-1,(function(e,t){e<=n?(_.push(t),S.push(e)):(t=o(t,j),l(t,0)||(y.push(t),b.push(e)))}))}for(n=0;n<f;n++)A();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:E,toString:function(){return"L: "+this.L.toString()+"\nU: "+this.U.toString()+"\nP: "+this.p}}},Array:function(e){var t=p(n(e));return{L:t.L.valueOf(),U:t.U.valueOf(),p:t.p}}});function p(e){var t,n=e._size[0],c=e._size[1],h=Math.min(n,c),d=Object(A.a)(e._data),p=[],m=[n,h],g=[],v=[h,c],y=[];for(N=0;N<n;N++)y[N]=N;for(t=0;t<c;t++){if(0<t)for(N=0;N<n;N++){for(var b=Math.min(N,t),x=0,w=0;w<b;w++)x=i(x,a(d[N][w],d[w][t]));d[N][t]=s(d[N][t],x)}for(var _=t,S=0,O=0,N=t;N<n;N++){var E=d[N][t],C=r(E);u(C,S)&&(_=N,S=C,O=E)}if(t!==_&&(y[t]=[y[_],y[_]=y[t]][0],f._swapRows(t,_,d)),t<n)for(N=t+1;N<n;N++){var M=d[N][t];l(M,0)||(d[N][t]=o(d[N][t],O))}}for(t=0;t<c;t++)for(N=0;N<n;N++)0===t&&(N<c&&(g[N]=[]),p[N]=[]),N<t?(N<c&&(g[N][t]=d[N][t]),t<n&&(p[N][t]=0)):N!==t?(N<c&&(g[N][t]=0),t<n&&(p[N][t]=d[N][t])):(N<c&&(g[N][t]=d[N][t]),t<n&&(p[N][t]=1));var k=new f({data:p,size:m}),T=new f({data:g,size:v}),D=[];for(N=0,h=y.length;N<h;N++)D[y[N]]=N;return{L:k,U:T,p:D,toString:function(){return"L: "+this.L.toString()+"\nU: "+this.U.toString()+"\nP: "+this.p}}}}));function Qa(){return(Qa=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var es=Object(s.a)("qr",["typed","matrix","zeros","identity","isZero","equal","sign","sqrt","conj","unaryMinus","addScalar","divideScalar","multiplyScalar","subtract","complex"],(function(e){var t=e.typed,n=e.matrix,r=e.zeros,i=e.identity,o=e.isZero,a=e.equal,s=e.sign,u=e.sqrt,l=e.conj,c=e.unaryMinus,f=e.addScalar,h=e.divideScalar,d=e.multiplyScalar,p=e.subtract,m=e.complex;return Qa(t("qr",{DenseMatrix:v,SparseMatrix:function(){throw new Error("qr not implemented for sparse matrices yet")},Array:function(e){var t=v(n(e));return{Q:t.Q.valueOf(),R:t.R.valueOf()}}}),{_denseQRimpl:g});function g(e){for(var t=e._size[0],n=e._size[1],m=i([t],"dense"),g=m._data,v=e.clone(),y=v._data,b=r([t],""),x=0;x<Math.min(n,t);++x){var w=y[x][x],_=c(a(w,0)?1:s(w)),S=l(_),O=0;for(C=x;C<t;C++)O=f(O,d(y[C][x],l(y[C][x])));var N=d(_,u(O));if(!o(N)){for(var E=p(w,N),C=x+(b[x]=1);C<t;C++)b[C]=h(y[C][x],E);for(var A=c(l(h(E,N))),M=void 0,k=x;k<n;k++){for(M=0,C=x;C<t;C++)M=f(M,d(l(b[C]),y[C][k]));for(M=d(M,A),C=x;C<t;C++)y[C][k]=d(p(y[C][k],d(b[C],M)),S)}for(C=0;C<t;C++){for(M=0,k=x;k<t;k++)M=f(M,d(g[C][k],b[k]));for(M=d(M,A),k=x;k<t;++k)g[C][k]=h(p(g[C][k],d(M,l(b[k]))),S)}}}return{Q:m,R:v,toString:function(){return"Q: "+this.Q.toString()+"\nR: "+this.R.toString()}}}function v(e){var t=g(e),n=t.R._data;if(0<e._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 t}}));function ts(e,t,n,r,i,o,a){var s=0;for(n[a]=e;0<=s;){var u=n[a+s],l=n[r+u];-1===l?(s--,o[t++]=u):(n[r+u]=n[i+l],n[a+ ++s]=l)}return t}var ns=Object(s.a)("csAmd",["add","multiply","transpose"],(function(e){var t=e.add,n=e.multiply,r=e.transpose;return function(e,a){if(!a||e<=0||3<e)return null;var s=a._size,u=s[0],l=s[1],c=0,f=Math.max(16,10*Math.sqrt(l)),h=function(e,i,o,a,s){var u=r(i);if(1===e&&a===o)return t(i,u);if(2!==e)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)}(e,a,u,l,f=Math.min(l-2,f));!function(e,t,n){for(var r=e._values,i=e._index,o=e._ptr,a=e._size[1],s=0,u=0;u<a;u++){var l=o[u];for(o[u]=s;l<o[u+1];l++)t(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,E=h._ptr,C=E[l],A=[],M=[],k=l+1,T=2*(l+1),D=3*(l+1),j=4*(l+1),P=5*(l+1),I=6*(l+1),R=7*(l+1),L=A,F=function(e,t,n,r,o,a,s,u,l,c,f,h){for(var d=0;d<e;d++)n[0+d]=t[d+1]-t[d];for(var p=n[0+e]=0;p<=e;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,e);return n[f+e]=-2,t[e]=-1,n[c+e]=0,m}(l,E,M,0,D,L,T,R,k,I,j,P),B=function(e,t,n,r,i,o,a,s,u,l,c){for(var f=0,h=0;h<e;h++){var d,p=n[r+h];0===p?(n[i+h]=-2,f++,t[h]=-1,n[o+h]=0):a<p?(n[s+h]=0,n[i+h]=-1,f++,t[h]=-e-2,n[s+e]++):(-1!==(d=n[u+p])&&(l[d]=h),n[c+h]=n[u+p],n[u+p]=h)}return f}(l,E,M,P,j,I,f,k,D,L,T),q=0;B<l;){for(p=-1;q<l&&-1===(p=M[D+q]);q++);-1!==M[T+p]&&(L[M[T+p]]=-1),M[D+q]=M[T+p];var z=M[j+p],H=M[k+p];B+=H;var U=0;M[k+p]=-H;for(var W,V,$=E[p],Y=0===z?$:C,Z=Y,G=1;G<=z+1;G++){for(v=z<G?(g=$,M[0+(V=p)]-z):(g=E[V=N[$++]],M[0+V]),m=1;m<=v;m++)(y=M[k+(d=N[g++])])<=0||(U+=y,M[k+d]=-y,-1!==M[T+(N[Z++]=d)]&&(L[M[T+d]]=L[d]),-1!==L[d]?M[T+L[d]]=M[T+d]:M[D+M[P+d]]=M[T+d]);V!==p&&(E[V]=-p-2,M[I+V]=0)}for(0!==z&&(C=Z),M[P+p]=U,E[p]=Y,M[0+p]=Z-Y,M[j+p]=-2,F=i(F,c,M,I,l),b=Y;b<Z;b++)if(!((x=M[j+(d=N[b])])<=0))for(var K=F-(y=-M[k+d]),X=($=E[d],E[d]+x-1);$<=X;$++)M[I+(V=N[$])]>=F?M[I+V]-=y:0!==M[I+V]&&(M[I+V]=M[P+V]+K);for(b=Y;b<Z;b++){for(w=(X=E[d=N[b]])+M[j+d]-1,O=S=0,$=_=X;$<=w;$++)0!==M[I+(V=N[$])]&&(0<(W=M[I+V]-F)?(O+=W,S+=N[_++]=V):(E[V]=-p-2,M[I+V]=0));M[j+d]=_-X+1;var J=_,Q=X+M[0+d];for($=1+w;$<Q;$++){var ee=M[k+(ne=N[$])];ee<=0||(O+=ee,S+=N[_++]=ne)}0===O?(E[d]=-p-2,U-=y=-M[k+d],H+=y,B+=y,M[k+d]=0,M[j+d]=-1):(M[P+d]=Math.min(M[P+d],O),N[_]=N[J],N[J]=N[X],N[X]=p,M[0+d]=_-X+1,S=(S<0?-S:S)%l,M[T+d]=M[R+S],L[M[R+S]=d]=S)}for(M[P+p]=U,F=i(F+(c=Math.max(c,U)),c,M,I,l),b=Y;b<Z;b++)if(!(0<=M[k+(d=N[b])]))for(d=M[R+(S=L[d])],M[R+S]=-1;-1!==d&&-1!==M[T+d];d=M[T+d],F++){for(v=M[0+d],x=M[j+d],$=E[d]+1;$<=E[d]+v-1;$++)M[I+N[$]]=F;for(var te=d,ne=M[T+d];-1!==ne;){var re=M[0+ne]===v&&M[j+ne]===x;for($=E[ne]+1;re&&$<=E[ne]+v-1;$++)M[I+N[$]]!==F&&(re=0);re?(E[ne]=-d-2,M[k+d]+=M[k+ne],M[k+ne]=0,M[j+ne]=-1,ne=M[T+ne],M[T+te]=ne):ne=M[T+(te=ne)]}}for(b=$=Y;b<Z;b++)(y=-M[k+(d=N[b])])<=0||(M[k+d]=y,O=M[P+d]+U-y,-1!==M[D+(O=Math.min(O,l-B-y))]&&(L[M[D+O]]=d),M[T+d]=M[D+O],L[d]=-1,M[D+O]=d,q=Math.min(q,O),M[P+d]=O,N[$++]=d);M[k+p]=H,0==(M[0+p]=$-Y)&&(E[p]=-1,M[I+p]=0),0!==z&&(C=$)}for(d=0;d<l;d++)E[d]=-E[d]-2;for(ne=0;ne<=l;ne++)M[D+ne]=-1;for(ne=l;0<=ne;ne--)0<M[k+ne]||(M[T+ne]=M[D+E[ne]],M[D+E[ne]]=ne);for(V=l;0<=V;V--)M[k+V]<=0||-1!==E[V]&&(M[T+V]=M[D+E[V]],M[D+E[V]]=V);for(d=p=0;d<=l;d++)-1===E[d]&&(p=ts(d,p,M,D,T,A,I));return A.splice(A.length-1,1),A};function i(e,t,n,r,i){if(e<2||e+t<0){for(var o=0;o<i;o++)0!==n[r+o]&&(n[r+o]=1);e=2}return e}function o(e,t){return e!==t}})),rs=Object(s.a)("csCounts",["transpose"],(function(e){var t=e.transpose;return function(e,n,r,i){if(!e||!n||!r)return null;for(var o,a,s,u,l,c,f=e._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=t(e),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 E=function(e,t,n,r,i,o,a){var s,u,l,c=0;if(e<=t||n[r+t]<=n[i+e])return-1;n[i+e]=n[r+t];var f=n[o+e];if(n[o+e]=t,-1===f)c=1,l=e;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<=E.jleaf&&_[a]++,2===E.jleaf&&_[E.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(e){var t=e.add,n=e.multiply,r=e.transpose,i=ns({add:t,multiply:n,transpose:r}),o=rs({transpose:r});return function(e,t,n){var r,a=t._ptr,s=t._size[1],u={};if(u.q=i(e,t),e&&!u.q)return null;if(n){var l=e?function(e,t,n,r){for(var i=e._values,o=e._index,a=e._ptr,s=e._size,u=e._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,e.createSparseMatrix({values:f,index:h,ptr:d,size:[l,c],datatype:u})}(t,0,u.q):t;u.parent=function(e,t){if(!e)return null;var n,r=e._index,i=e._ptr,o=e._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(e,t){if(!e)return null;for(var n=0,r=[],i=[],o=t,a=2*t,s=0;s<t;s++)i[0+s]=-1;for(s=t-1;0<=s;s--)-1!==e[s]&&(i[o+s]=i[0+e[s]],i[0+e[s]]=s);for(s=0;s<t;s++)-1===e[s]&&(n=ts(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(e,t){var n=e._ptr,r=e._index,i=e._size,o=i[0],a=i[1];t.pinv=[],t.leftmost=[];var s,u,l,c,f,h=t.parent,d=t.pinv,p=t.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(t.lnz=0,t.m2=o,u=0;u<a;u++){var b;s=m[g+u],t.lnz++,s<0&&(s=t.m2++),d[s]=u,--y[u]<=0||(t.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(e,t){e[t]=-e[t]-2}function as(e){return e<0?-e-2:e}var ss=Object(s.a)("csSpsolve",["divideScalar","multiply","subtract"],(function(e){var t=e.divideScalar,n=e.multiply,r=e.subtract;return function(e,i,o,a,s,u,l){for(var c,f,h,d=e._values,p=e._index,m=e._ptr,g=e._size[1],v=i._values,y=i._index,b=i._ptr,x=function(e,t,n,r,i){for(var o=e._ptr,a=e._size,s=t._index,u=t._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(e,t,n,r,i){var o,a=t._index,s=t._ptr,u=t._size[1],l=0;for(r[0]=e;0<=l;){e=r[l];var c=i?i[e]:e;s[e]<0||(os(s,e),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]=e)}return n}(p,e,c,r,i))}for(d=c;d<l;d++)os(o,r[d]);return c}(e,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]=t(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(e){var t=e.abs,n=e.divideScalar,r=e.multiply,i=e.subtract,o=e.larger,a=e.largerEq,s=e.SparseMatrix,u=ss({divideScalar:n,multiply:r,subtract:i});return function(e,i,l){if(!e)return null;var c,f=e._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(C=0;C<f;C++)S[C]=0,_[C]=-1,g[C+1]=0;for(var N=d=h=0;N<f;N++){g[N]=h,x[N]=d;for(var E,C,A=c?c[N]:N,M=u(v,e,A,O,S,_,1),k=-1,T=-1,D=M;D<f;D++)_[C=O[D]]<0?(E=t(S[C]),o(E,T)&&(T=E,k=C)):(b[d]=_[C],y[d++]=S[C]);if(-1===k||T<=0)return null;_[A]<0&&a(t(S[A]),r(T,l))&&(k=A);var j=S[k];for(b[d]=N,y[d++]=j,_[k]=N,m[h]=k,p[h++]=1,D=M;D<f;D++)_[C=O[D]]<0&&(m[h]=C,p[h++]=n(S[C],j)),S[C]=0}for(g[f]=h,x[f]=d,D=0;D<h;D++)m[D]=_[m[D]];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(e){var t=e.typed,n=e.abs,r=e.add,i=e.multiply,o=e.transpose,s=e.divideScalar,u=e.subtract,l=e.larger,c=e.largerEq,f=e.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 t("slu",{"SparseMatrix, number, number":function(e,t,n){if(!Object(a.i)(t)||t<0||3<t)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(t,e,!1),i=d(e,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(e,t){var n,r=t.length,i=[];if(e)for(n=0;n<r;n++)i[e[n]]=t[n];else for(n=0;n<r;n++)i[n]=t[n];return i}var fs="lusolve",hs=Object(s.a)(fs,["typed","matrix","lup","slu","usolve","lsolve","DenseMatrix"],(function(e){var t=e.typed,n=e.matrix,i=e.lup,o=e.slu,a=e.usolve,s=e.lsolve,u=Hr({DenseMatrix:e.DenseMatrix});return t(fs,{"Array, Array | Matrix":function(e,t){e=n(e);var r=i(e);return c(r.L,r.U,r.p,null,t).valueOf()},"DenseMatrix, Array | Matrix":function(e,t){var n=i(e);return c(n.L,n.U,n.p,null,t)},"SparseMatrix, Array | Matrix":function(e,t){var n=i(e);return c(n.L,n.U,n.p,null,t)},"SparseMatrix, Array | Matrix, number, number":function(e,t,n,r){var i=o(e,n,r);return c(i.L,i.U,i.p,i.q,t)},"Object, Array | Matrix":function(e,t){return c(e.L,e.U,e.p,e.q,t)}});function l(e){if(Object(r.v)(e))return e;if(Object(r.b)(e))return n(e);throw new TypeError("Invalid Matrix LU decomposition")}function c(e,t,n,r,i){e=l(e),t=l(t),i=u(e,i,!1),n&&(i._data=cs(n,i._data));var o=s(e,i),c=a(t,o);return r&&(c._data=cs(r,c._data)),c}})),ds=Object(s.a)("Help",["parse"],(function(e){var t=e.parse;function n(e){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(!e)throw new Error('Argument "doc" missing');this.doc=e}return n.prototype.type="Help",n.prototype.isHelp=!0,n.prototype.toString=function(){var e=this.doc||{},n="\n";if(e.name&&(n+="Name: "+e.name+"\n\n"),e.category&&(n+="Category: "+e.category+"\n\n"),e.description&&(n+="Description:\n "+e.description+"\n\n"),e.syntax&&(n+="Syntax:\n "+e.syntax.join("\n ")+"\n\n"),e.examples){n+="Examples:\n";for(var i={},o=0;o<e.examples.length;o++){var a=e.examples[o];n+=" "+a+"\n";var s=void 0;try{s=t(a).compile().evaluate(i)}catch(e){s=e}void 0===s||Object(r.s)(s)||(n+=" "+Object(C.d)(s,{precision:14})+"\n")}n+="\n"}return e.seealso&&e.seealso.length&&(n+="See also: "+e.seealso.join(", ")+"\n"),n},n.prototype.toJSON=function(){var e=Object(A.a)(this.doc);return e.mathjs="Help",e},n.fromJSON=function(e){var t={};return Object.keys(e).filter((function(e){return"mathjs"!==e})).forEach((function(n){t[n]=e[n]})),new n(t)},n.prototype.valueOf=n.prototype.toString,n}),{isClass:!0}),ps=Object(s.a)("Chain",["?on","math"],(function(e){var t=e.on,n=e.math;function i(e){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");Object(r.h)(e)?this.value=e.value:this.value=e}function o(e,t){Object(A.h)(i.prototype,e,(function(){var e=t();if("function"==typeof e)return a(e)}))}function a(e){return function(){for(var t=[this.value],n=0;n<arguments.length;n++)t[n+1]=arguments[n];return new i(e.apply(e,t))}}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(C.d)(this.value)},i.prototype.toJSON=function(){return{mathjs:"Chain",value:this.value}},i.fromJSON=function(e){return new i(e.value)},i.createProxy=function(e,t){if("string"==typeof e)r=e,"function"==typeof(u=t)&&(i.prototype[r]=a(u));else for(var n in e)!function(t){Object(A.f)(e,t)&&void 0===s[t]&&o(t,(function(){return e[t]}))}(n);var r,u};var s={expression:!0,docs:!0,type:!0,classes:!0,json:!0,error:!0,isChain:!0};return i.createProxy(n),t&&t("import",(function(e,t,n){n||o(e,t)})),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(e){var t=e.typed,n=e.mathWithTransform,r=e.Help;return t("help",{any:function(e){var t,i=e;if("string"!=typeof e)for(t in n)if(Object(A.f)(n,t)&&e===n[t]){i=t;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(e){var t=e.typed,n=e.Chain;return t("chain",{"":function(){return new n},any:function(e){return new n(e)}})})),xs=Object(s.a)("det",["typed","matrix","subtract","multiply","unaryMinus","lup"],(function(e){var t=e.typed,n=e.matrix,i=e.subtract,o=e.multiply,a=e.unaryMinus,s=e.lup;return t("det",{any:function(e){return Object(A.a)(e)},"Array | Matrix":function(e){var t=Object(r.v)(e)?e.size():Array.isArray(e)?(e=n(e)).size():[];switch(t.length){case 0:return Object(A.a)(e);case 1:if(1===t[0])return Object(A.a)(e.valueOf()[0]);throw new RangeError("Matrix must be square (size: "+Object(C.d)(t)+")");case 2:var u=t[0];if(u===t[1])return function(e,t){if(1===t)return Object(A.a)(e[0][0]);if(2===t)return i(o(e[0][0],e[1][1]),o(e[1][0],e[0][1]));for(var n=s(e),r=n.U[0][0],u=1;u<t;u++)r=o(r,n.U[u][u]);for(var l=0,c=0,f=[];;){for(;f[c];)c++;if(t<=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)}(e.clone().valueOf(),u);throw new RangeError("Matrix must be square (size: "+Object(C.d)(t)+")");default:throw new RangeError("Matrix must be two dimensional (size: "+Object(C.d)(t)+")")}}})})),ws=Object(s.a)("inv",["typed","matrix","divideScalar","addScalar","multiply","unaryMinus","det","identity","abs"],(function(e){var t=e.typed,n=e.matrix,i=e.divideScalar,o=e.addScalar,a=e.multiply,s=e.unaryMinus,u=e.det,l=e.identity,c=e.abs;return t("inv",{"Array | Matrix":function(e){var t=Object(r.v)(e)?e.size():Object(E.a)(e);switch(t.length){case 1:if(1===t[0])return Object(r.v)(e)?n([i(1,e.valueOf()[0])]):[i(1,e[0])];throw new RangeError("Matrix must be square (size: "+Object(C.d)(t)+")");case 2:var o=t[0],a=t[1];if(o===a)return Object(r.v)(e)?n(f(e.valueOf(),o,a),e.storage()):f(e,o,a);throw new RangeError("Matrix must be square (size: "+Object(C.d)(t)+")");default:throw new RangeError("Matrix must be two dimensional (size: "+Object(C.d)(t)+")")}},any:function(e){return i(1,e)}});function f(e,t,n){var r,f,h,d;if(1===t){if(0===(h=e[0][0]))throw Error("Cannot calculate inverse, determinant is zero");return[[i(1,h)]]}if(2===t){var p=u(e);if(0===p)throw Error("Cannot calculate inverse, determinant is zero");return[[i(e[1][1],p),i(s(e[0][1]),p)],[i(s(e[1][0]),p),i(e[0][0],p)]]}var m=e.concat();for(x=0;x<t;x++)m[x]=m[x].concat();for(var g=l(t).valueOf(),v=0;v<n;v++){for(var y=c(m[v][v]),b=v,x=v+1;x<t;)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<t;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(e){var t=e.config,n=e.typed,r=e.matrix,i=e.addScalar,o=e.subtract,a=e.equal,s=e.abs,u=e.atan,l=e.cos,c=e.sin,f=e.multiplyScalar,h=e.inv,d=e.bignumber,p=e.multiply,m=e.add;return n("eigs",{Array:function(e){var t=r(e),n=t.size();if(2!==n.length||n[0]!==n[1])throw new RangeError("Matrix must be square (size: "+Object(C.d)(n)+")");var i=g(t,n[0]);return{values:i[0],vectors:i[1]}},Matrix:function(e){var t=e.size();if(2!==t.length||t[0]!==t[1])throw new RangeError("Matrix must be square (size: "+Object(C.d)(t)+")");var n=g(e,t[0]);return{values:r(n[0]),vectors:r(n[1])}}});function g(e,n){var r=e.datatype();if(void 0===r&&(r=e.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(e,t){for(var n=0;n<t;n++)for(var r=n;r<t;r++)if(!a(e[n][r],e[r][n]))throw new TypeError("Input matrix is not symmetric")}(e.toArray(),n),"number"===r)return v(e.toArray());if("Fraction"!==r)return"BigNumber"===r?function(e){for(var n,r=e.length,a=s(t.epsilon/r),g=new Array(r),v=0;v<r;v++)g[v]=w(r,0),g[v][v]=1;for(var y=b(e);s(y[1])>=s(a);){var _=y[0][0],S=y[0][1];n=function(e,n,r){var i=o(n,e);return s(i)<=t.epsilon?d(-1).acos().div(4):f(.5,u(p(2,r,h(i))))}(e[_][_],e[S][S],e[_][S]),e=function(e,t,n,r){for(var a=e.length,s=d(l(t)),u=d(c(t)),h=f(s,s),g=f(u,u),v=w(a,d(0)),y=w(a,d(0)),b=p(d(2),s,u,e[n][r]),x=i(o(f(h,e[n][n]),b),f(g,e[r][r])),_=m(f(g,e[n][n]),b,f(h,e[r][r])),S=0;S<a;S++)v[S]=o(f(s,e[n][S]),f(u,e[r][S])),y[S]=i(f(u,e[n][S]),f(s,e[r][S]));e[n][n]=x,e[r][r]=_,e[n][r]=d(0),e[r][n]=d(0);for(var O=0;O<a;O++)O!==n&&O!==r&&(e[n][O]=v[O],e[O][n]=v[O],e[r][O]=y[O],e[O][r]=y[O]);return e}(e,n,_,S),g=function(e,t,n,r){for(var a=e.length,s=l(t),u=c(t),h=w(a,d(0)),p=w(a,d(0)),m=0;m<a;m++)h[m]=o(f(s,e[m][n]),f(u,e[m][r])),p[m]=i(f(u,e[m][n]),f(s,e[m][r]));for(var g=0;g<a;g++)e[g][n]=h[g],e[g][r]=p[g];return e}(g,n,_,S),y=b(e)}for(var O=w(r,0),N=0;N<r;N++)O[N]=e[N][N];return x(Object(A.a)(O),Object(A.a)(g))}(e.toArray()):void 0;for(var g=e.toArray(),y=0;y<n;y++)for(var _=y;_<n;_++)g[y][_]=g[y][_].valueOf(),g[_][y]=g[y][_];return v(e.toArray())}function v(e){for(var n,r=e.length,i=Math.abs(t.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(e);Math.abs(f[1])>=Math.abs(i);){var h=f[0][0],d=f[0][1];s=e[h][h],u=e[d][d],l=e[h][d],void 0,c=u-s,e=function(e,t,n,r){for(var i=e.length,o=Math.cos(t),a=Math.sin(t),s=o*o,u=a*a,l=w(i,0),c=w(i,0),f=s*e[n][n]-2*o*a*e[n][r]+u*e[r][r],h=u*e[n][n]+2*o*a*e[n][r]+s*e[r][r],d=0;d<i;d++)l[d]=o*e[n][d]-a*e[r][d],c[d]=a*e[n][d]+o*e[r][d];e[n][n]=f,e[r][r]=h,e[n][r]=0;for(var p=e[r][n]=0;p<i;p++)p!==n&&p!==r&&(e[n][p]=l[p],e[p][n]=l[p],e[r][p]=c[p],e[p][r]=c[p]);return e}(e,n=Math.abs(c)<=t.epsilon?Math.PI/4:.5*Math.atan(2*l/(u-s)),h,d),o=function(e,t,n,r){for(var i=e.length,o=Math.cos(t),a=Math.sin(t),s=w(i,0),u=w(i,0),l=0;l<i;l++)s[l]=o*e[l][n]-a*e[l][r],u[l]=a*e[l][n]+o*e[l][r];for(var c=0;c<i;c++)e[c][n]=s[c],e[c][r]=u[c];return e}(o,n,h,d),f=y(e)}for(var p=w(r,0),m=0;m<r;m++)p[m]=e[m][m];return x(Object(A.a)(p),Object(A.a)(o))}function y(e){for(var t=e.length,n=0,r=[0,1],i=0;i<t;i++)for(var o=i+1;o<t;o++)Math.abs(n)<Math.abs(e[i][o])&&(n=Math.abs(e[i][o]),r=[i,o]);return[r,n]}function b(e){for(var t=e.length,n=0,r=[0,1],i=0;i<t;i++)for(var o=i+1;o<t;o++)s(n)<s(e[i][o])&&(n=s(e[i][o]),r=[i,o]);return[r,n]}function x(e,t){for(var n=e.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=e[0],l=0;l<e.length;l++)e[l]<u&&(u=e[s=l]);r[a]=e.splice(s,1)[0];for(var c=0;c<n;c++)i[c][a]=t[c][s],t[c].splice(s,1)}return[Object(A.a)(r),Object(A.a)(i)]}function w(e,t){for(var n=new Array(e),r=0;r<e;r++)n[r]=t;return n}})),Ss=Object(s.a)("expm",["typed","abs","add","identity","inv","multiply"],(function(e){var t=e.typed,n=e.abs,i=e.add,o=e.identity,a=e.inv,s=e.multiply;return t("expm",{Matrix:function(e){var t=e.size();if(2!==t.length||t[0]!==t[1])throw new RangeError("Matrix must be square (size: "+Object(C.d)(t)+")");for(var u=t[0],l=function(e,t){for(var n=0;n<30;n++)for(var r=0;r<=n;r++){var i=n-r;if(function(e,t,n){for(var r=1,i=2;i<=t;i++)r*=i;for(var o=r,a=t+1;a<=2*t;a++)o*=a;var s=o*(2*t+1);return 8*Math.pow(e/Math.pow(2,n),2*t)*r*r/(o*s)}(e,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(e){for(var t=e.size()[0],r=0,i=0;i<t;i++){for(var o=0,a=0;a<t;a++)o+=n(e.get([i,a]));r=Math.max(o,r)}return r}(e)),c=l.q,f=l.j,h=s(e,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)(e)?e.createSparseMatrix(b):b}})})),Os=Object(s.a)("sqrtm",["typed","abs","add","multiply","sqrt","subtract","inv","size","max","identity"],(function(e){var t=e.typed,n=e.abs,i=e.add,o=e.multiply,a=e.sqrt,s=e.subtract,u=e.inv,l=e.size,c=e.max,f=e.identity;return t("sqrtm",{"Array | Matrix":function(e){var t=Object(r.v)(e)?e.size():Object(E.a)(e);switch(t.length){case 1:if(1===t[0])return a(e);throw new RangeError("Matrix must be square (size: "+Object(C.d)(t)+")");case 2:if(t[0]===t[1])return function(e){var t=0,r=e,a=f(l(e));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<++t)throw new Error("computing square root of matrix: iterative method could not converge")}while(1e-6<h);return r}(e);throw new RangeError("Matrix must be square (size: "+Object(C.d)(t)+")")}}})})),Ns=Object(s.a)("divide",["typed","matrix","multiply","equalScalar","divideScalar","inv"],(function(e){var t=e.typed,n=e.matrix,r=e.multiply,i=e.equalScalar,o=e.divideScalar,a=e.inv,s=ft({typed:t,equalScalar:i}),u=st({typed:t});return t("divide",Object(A.e)({"Array | Matrix, Array | Matrix":function(e,t){return r(e,a(t))},"DenseMatrix, any":function(e,t){return u(e,t,o,!1)},"SparseMatrix, any":function(e,t){return s(e,t,o,!1)},"Array, any":function(e,t){return u(n(e),t,o,!1).valueOf()},"any, Array | Matrix":function(e,t){return r(e,a(t))}},o.signatures))})),Es="distance",Cs=Object(s.a)(Es,["typed","addScalar","subtract","divideScalar","multiplyScalar","unaryMinus","sqrt","abs"],(function(e){var t=e.typed,n=e.addScalar,i=e.subtract,o=e.multiplyScalar,a=e.divideScalar,s=e.unaryMinus,u=e.sqrt,l=e.abs;return t(Es,{"Array, Array, Array":function(e,t,n){if(2!==e.length||2!==t.length||2!==n.length)throw new TypeError("Invalid Arguments: Try again");if(!f(e))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!f(t))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(t[1],t[0])),u=o(o(r,r),t[0]),l=s(o(r,t[0])),c=e[1];return g(e[0],e[1],u,l,c)},"Object, Object, Object":function(e,t,n){if(2!==Object.keys(e).length||2!==Object.keys(t).length||2!==Object.keys(n).length)throw new TypeError("Invalid Arguments: Try again");if(!f(e))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!f(t))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 e&&"pointY"in e&&"lineOnePtX"in t&&"lineOnePtY"in t&&"lineTwoPtX"in n&&"lineTwoPtY"in n){var r=a(i(n.lineTwoPtY,n.lineTwoPtX),i(t.lineOnePtY,t.lineOnePtX)),u=o(o(r,r),t.lineOnePtX),l=s(o(r,t.lineOnePtX)),c=e.pointX;return g(e.pointX,e.pointY,u,l,c)}throw new TypeError("Key names do not match")},"Array, Array":function(e,t){if(2===e.length&&3===t.length){if(!f(e))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!h(t))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");return g(e[0],e[1],t[0],t[1],t[2])}if(3===e.length&&6===t.length){if(!h(e))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!p(t))throw new TypeError("Array with 6 numbers or BigNumbers expected for second argument");return v(e[0],e[1],e[2],t[0],t[1],t[2],t[3],t[4],t[5])}if(e.length===t.length&&0<e.length){if(!d(e))throw new TypeError("All values of an array should be numbers or BigNumbers");if(!d(t))throw new TypeError("All values of an array should be numbers or BigNumbers");return y(e,t)}throw new TypeError("Invalid Arguments: Try again")},"Object, Object":function(e,t){if(2===Object.keys(e).length&&3===Object.keys(t).length){if(!f(e))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!h(t))throw new TypeError("Values of xCoeffLine, yCoeffLine and constant should be numbers or BigNumbers");if("pointX"in e&&"pointY"in e&&"xCoeffLine"in t&&"yCoeffLine"in t&&"constant"in t)return g(e.pointX,e.pointY,t.xCoeffLine,t.yCoeffLine,t.constant);throw new TypeError("Key names do not match")}if(3===Object.keys(e).length&&6===Object.keys(t).length){if(!h(e))throw new TypeError("Values of pointX, pointY and pointZ should be numbers or BigNumbers");if(!p(t))throw new TypeError("Values of x0, y0, z0, a, b and c should be numbers or BigNumbers");if("pointX"in e&&"pointY"in e&&"x0"in t&&"y0"in t&&"z0"in t&&"a"in t&&"b"in t&&"c"in t)return v(e.pointX,e.pointY,e.pointZ,t.x0,t.y0,t.z0,t.a,t.b,t.c);throw new TypeError("Key names do not match")}if(2===Object.keys(e).length&&2===Object.keys(t).length){if(!f(e))throw new TypeError("Values of pointOneX and pointOneY should be numbers or BigNumbers");if(!f(t))throw new TypeError("Values of pointTwoX and pointTwoY should be numbers or BigNumbers");if("pointOneX"in e&&"pointOneY"in e&&"pointTwoX"in t&&"pointTwoY"in t)return y([e.pointOneX,e.pointOneY],[t.pointTwoX,t.pointTwoY]);throw new TypeError("Key names do not match")}if(3!==Object.keys(e).length||3!==Object.keys(t).length)throw new TypeError("Invalid Arguments: Try again");if(!h(e))throw new TypeError("Values of pointOneX, pointOneY and pointOneZ should be numbers or BigNumbers");if(!h(t))throw new TypeError("Values of pointTwoX, pointTwoY and pointTwoZ should be numbers or BigNumbers");if("pointOneX"in e&&"pointOneY"in e&&"pointOneZ"in e&&"pointTwoX"in t&&"pointTwoY"in t&&"pointTwoZ"in t)return y([e.pointOneX,e.pointOneY,e.pointOneZ],[t.pointTwoX,t.pointTwoY,t.pointTwoZ]);throw new TypeError("Key names do not match")},Array:function(e){if(!function(e){if(2===e[0].length&&c(e[0][0])&&c(e[0][1])){if(e.some((function(e){return 2!==e.length||!c(e[0])||!c(e[1])})))return!1}else{if(!(3===e[0].length&&c(e[0][0])&&c(e[0][1])&&c(e[0][2])))return!1;if(e.some((function(e){return 3!==e.length||!c(e[0])||!c(e[1])||!c(e[2])})))return!1}return!0}(e))throw new TypeError("Incorrect array format entered for pairwise distance calculation");return function(e){for(var t=[],n=[],r=[],i=0;i<e.length-1;i++)for(var o=i+1;o<e.length;o++)2===e[0].length?(n=[e[i][0],e[i][1]],r=[e[o][0],e[o][1]]):3===e[0].length&&(n=[e[i][0],e[i][1],e[i][2]],r=[e[o][0],e[o][1],e[o][2]]),t.push(y(n,r));return t}(e)}});function c(e){return"number"==typeof e||Object(r.e)(e)}function f(e){return e.constructor!==Array&&(e=m(e)),c(e[0])&&c(e[1])}function h(e){return e.constructor!==Array&&(e=m(e)),c(e[0])&&c(e[1])&&c(e[2])}function d(e){return Array.isArray(e)||(e=m(e)),e.every(c)}function p(e){return e.constructor!==Array&&(e=m(e)),c(e[0])&&c(e[1])&&c(e[2])&&c(e[3])&&c(e[4])&&c(e[5])}function m(e){for(var t=Object.keys(e),n=[],r=0;r<t.length;r++)n.push(e[t[r]]);return n}function g(e,t,r,i,s){var c=l(n(n(o(r,e),o(i,t)),s)),f=u(n(o(r,r),o(i,i)));return a(c,f)}function v(e,t,r,s,l,c,f,h,d){var p=[i(o(i(l,t),d),o(i(c,r),h)),i(o(i(c,r),f),o(i(s,e),d)),i(o(i(s,e),h),o(i(l,t),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(e,t){for(var r,a=e.length,s=0,l=0;l<a;l++)r=i(e[l],t[l]),s=n(o(r,r),s);return u(s)}})),As=Object(s.a)("intersect",["typed","config","abs","add","addScalar","matrix","multiply","multiplyScalar","divideScalar","subtract","smaller","equalScalar"],(function(e){var t=e.typed,n=e.config,i=e.abs,o=e.add,a=e.addScalar,s=e.matrix,u=e.multiply,l=e.multiplyScalar,c=e.divideScalar,f=e.subtract,h=e.smaller,d=e.equalScalar;return t("intersect",{"Array, Array, Array":function(e,t,n){if(!g(e))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!g(t))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,E;return i=e[0],o=e[1],s=e[2],u=t[0],h=t[1],d=t[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),E=c(f(f(f(b,x),_),O),f(f(f(a(a(w,S),N),x),_),O)),[a(i,l(E,f(u,i))),a(o,l(E,f(h,o))),a(s,l(E,f(d,s)))]},"Array, Array, Array, Array":function(e,t,r,s){if(2===e.length){if(!m(e))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!m(t))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(e,t,r,s){var d=e,p=r,m=f(d,t),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)}(e,t,r,s)}if(3!==e.length)throw new TypeError("Arrays with two or thee dimensional points expected");if(!g(e))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!g(t))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=e[0],y=e[1],b=e[2],x=t[0],w=t[1],_=t[2],S=r[0],O=r[1],N=r[2],M=v(p,S,E=s[0],S,y,O,C=s[1],O,b,N,A=s[2],N),k=v(E,S,x,p,C,O,w,y,A,N,_,b),T=v(p,S,x,p,y,O,w,y,b,N,_,b),D=v(E,S,E,S,C,O,C,O,A,N,A,N),j=v(x,p,x,p,w,y,w,y,_,b,_,b),P=c(f(l(M,k),l(T,D)),f(l(j,D),l(k,k))),I=c(a(M,l(P,k)),D),R=a(p,l(P,f(x,p))),L=a(y,l(P,f(w,y))),F=a(b,l(P,f(_,b))),B=a(S,l(I,f(E,S))),q=a(O,l(I,f(C,O))),z=a(N,l(I,f(A,N))),d(R,B)&&d(L,q)&&d(F,z)?[R,L,F]:null;var p,y,b,x,w,_,S,O,N,E,C,A,M,k,T,D,j,P,I,R,L,F,B,q,z},"Matrix, Matrix, Matrix":function(e,t,n){return s(this(e.valueOf(),t.valueOf(),n.valueOf()))},"Matrix, Matrix, Matrix, Matrix":function(e,t,n,r){return s(this(e.valueOf(),t.valueOf(),n.valueOf(),r.valueOf()))}});function p(e){return"number"==typeof e||Object(r.e)(e)}function m(e){return 2===e.length&&p(e[0])&&p(e[1])}function g(e){return 3===e.length&&p(e[0])&&p(e[1])&&p(e[2])}function v(e,t,n,r,i,o,s,u,c,h,d,p){var m=l(f(e,t),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)}})),Ms=Object(s.a)("sum",["typed","config","add","numeric"],(function(e){var t=e.typed,n=e.config,r=e.add,i=e.numeric;return t("sum",{"Array | Matrix":o,"Array | Matrix, number | BigNumber":function(e,t){try{return R(e,t,r)}catch(e){throw vr(e,"sum")}},"...":function(e){if(j(e))throw new TypeError("Scalar values expected in function sum");return o(e)}});function o(e){var t;return P(e,(function(e){try{t=void 0===t?e:r(t,e)}catch(t){throw vr(t,"sum",e)}})),void 0===t&&(t=i(0,n.number)),"string"==typeof t&&(t=i(t,n.number)),t}})),ks=Object(s.a)("mean",["typed","add","divide"],(function(e){var t=e.typed,n=e.add,r=e.divide;return t("mean",{"Array | Matrix":i,"Array | Matrix, number | BigNumber":function(e,t){try{var i=R(e,t,n),o=Array.isArray(e)?Object(E.a)(e):e.size();return r(i,o[t])}catch(e){throw vr(e,"mean")}},"...":function(e){if(j(e))throw new TypeError("Scalar values expected in function mean");return i(e)}});function i(e){var t,i=0;if(P(e,(function(e){try{t=void 0===t?e:n(t,e),i++}catch(t){throw vr(t,"mean",e)}})),0===i)throw new Error("Cannot calculate the mean of an empty array");return r(t,i)}})),Ts=Object(s.a)("median",["typed","add","divide","compare","partitionSelect"],(function(e){var t=e.typed,n=e.add,r=e.divide,i=e.compare,o=e.partitionSelect;function a(e){try{var t=(e=Object(E.e)(e.valueOf())).length;if(0===t)throw new Error("Cannot calculate median of an empty array");if(t%2==0){for(var n=t/2-1,r=o(e,1+n),a=e[n],l=0;l<n;++l)0<i(e[l],a)&&(a=e[l]);return u(a,r)}var c=o(e,(t-1)/2);return s(c)}catch(e){throw vr(e,"median")}}var s=t({"number | BigNumber | Complex | Unit":function(e){return e}}),u=t({"number | BigNumber | Complex | Unit, number | BigNumber | Complex | Unit":function(e,t){return r(n(e,t),2)}});return t("median",{"Array | Matrix":a,"Array | Matrix, number | BigNumber":function(){throw new Error("median(A, dim) is not yet supported")},"...":function(e){if(j(e))throw new TypeError("Scalar values expected in function median");return a(e)}})})),Ds=Object(s.a)("mad",["typed","abs","map","median","subtract"],(function(e){var t=e.typed,n=e.abs,r=e.map,i=e.median,o=e.subtract;return t("mad",{"Array | Matrix":a,"...":a});function a(e){if(0===(e=Object(E.e)(e.valueOf())).length)throw new Error("Cannot calculate median absolute deviation (mad) of an empty array");try{var t=i(e);return i(r(e,(function(e){return n(o(e,t))})))}catch(e){throw e instanceof TypeError&&-1!==e.message.indexOf("median")?new TypeError(e.message.replace("median","mad")):vr(e,"mad")}}})),js="unbiased",Ps="variance",Is=Object(s.a)(Ps,["typed","add","subtract","multiply","divide","apply","isNaN"],(function(e){var t=e.typed,n=e.add,i=e.subtract,o=e.multiply,a=e.divide,s=e.apply,u=e.isNaN;return t(Ps,{"Array | Matrix":function(e){return l(e,js)},"Array | Matrix, string":l,"Array | Matrix, number | BigNumber":function(e,t){return c(e,t,js)},"Array | Matrix, number | BigNumber, string":c,"...":function(e){return l(e,js)}});function l(e,t){var s=0,l=0;if(0===e.length)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");if(P(e,(function(e){try{s=n(s,e),l++}catch(t){throw vr(t,"variance",e)}})),0===l)throw new Error("Cannot calculate variance of an empty array");var c=a(s,l);if(s=0,P(e,(function(e){var t=i(e,c);s=n(s,o(t,t))})),u(s))return s;switch(t){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 "'+t+'". Choose "unbiased" (default), "uncorrected", or "biased".')}}function c(e,t,n){try{if(0===e.length)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");return s(e,t,(function(e){return l(e,n)}))}catch(e){throw vr(e,"variance")}}})),Rs=Object(s.a)("quantileSeq",["typed","add","multiply","partitionSelect","compare"],(function(e){var t=e.typed,n=e.add,i=e.multiply,o=e.partitionSelect,s=e.compare;function u(e,t,a){var u=Object(E.e)(e),c=u.length;if(0===c)throw new Error("Cannot calculate quantile of an empty sequence");if(Object(r.y)(t)){var f=t*(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=t.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 C=new S.constructor(1);return n(i(x,C.minus(S)),i(w,S))}var l=t({"number | BigNumber | Unit":function(e){return e}});return function(e,t,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)(e)){if("boolean"!=typeof(n=n||!1))throw new TypeError("Unexpected type of argument in function quantileSeq");if(i=e.valueOf(),Object(r.y)(t)){if(t<0)throw new Error("N/prob must be non-negative");if(t<=1)return u(i,t,n);if(1<t){if(!Object(a.i)(t))throw new Error("N must be a positive integer");for(var s=t+1,l=new Array(t),c=0;c<t;)l[c]=u(i,++c/s,n);return l}}if(Object(r.e)(t)){var f=t.constructor;if(t.isNegative())throw new Error("N/prob must be non-negative");if(o=new f(1),t.lte(o))return new f(u(i,t,n));if(t.gt(o)){if(!t.isInteger())throw new Error("N must be a positive integer");var h=t.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(t)){l=new Array(t.length);for(var m=0;m<l.length;++m){var g=t[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(e){var t=e.typed,n=e.sqrt,r=e.variance;return t("std",{"Array | Matrix":i,"Array | Matrix, string":i,"Array | Matrix, number | BigNumber":i,"Array | Matrix, number | BigNumber, string":i,"...":function(e){return i(e)}});function i(e,t){if(0===e.length)throw new SyntaxError("Function std requires one or more parameters (0 provided)");try{return n(r.apply(null,arguments))}catch(e){throw e instanceof TypeError&&-1!==e.message.indexOf(" variance")?new TypeError(e.message.replace(" variance"," std")):e}}}));function Fs(e,t){if(t<e)return 1;if(t===e)return t;var n=t+e>>1;return Fs(e,n)*Fs(1+n,t)}function Bs(e,t){if(!Object(a.i)(e)||e<0)throw new TypeError("Positive integer value expected in function combinations");if(!Object(a.i)(t)||t<0)throw new TypeError("Positive integer value expected in function combinations");if(e<t)throw new TypeError("k must be less than or equal to n");var n=e-t;return t<n?Fs(1+n,e)/Fs(1,t):Fs(t+1,e)/Fs(1,n)}Bs.signature="number, number";var qs="combinations",zs=Object(s.a)(qs,["typed"],(function(e){return(0,e.typed)(qs,{"number, number":Bs,"BigNumber, BigNumber":function(e,t){var n,r,i=e.constructor,o=e.minus(t),a=new i(1);if(!Hs(e)||!Hs(t))throw new TypeError("Positive integer value expected in function combinations");if(t.gt(e))throw new TypeError("k must be less than n in function combinations");if(n=a,t.lt(o))for(r=a;r.lte(o);r=r.plus(a))n=n.times(t.plus(r)).dividedBy(r);else for(r=a;r.lte(t);r=r.plus(a))n=n.times(o.plus(r)).dividedBy(r);return n}})}));function Hs(e){return e.isInteger()&&e.gte(0)}var Us="combinationsWithRep",Ws=Object(s.a)(Us,["typed"],(function(e){return(0,e.typed)(Us,{"number, number":function(e,t){if(!Object(a.i)(e)||e<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(!Object(a.i)(t)||t<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(e<1)throw new TypeError("k must be less than or equal to n + k - 1");return t<e-1?Fs(e,e+t-1)/Fs(1,t):Fs(t+1,e+t-1)/Fs(1,e-1)},"BigNumber, BigNumber":function(e,t){var n,r,i=new e.constructor(1),o=e.minus(i);if(!Vs(e)||!Vs(t))throw new TypeError("Positive integer value expected in function combinationsWithRep");if(e.lt(i))throw new TypeError("k must be less than or equal to n + k - 1 in function combinationsWithRep");if(n=i,t.lt(o))for(r=i;r.lte(o);r=r.plus(i))n=n.times(t.plus(r)).dividedBy(r);else for(r=i;r.lte(t);r=r.plus(i))n=n.times(o.plus(r)).dividedBy(r);return n}})}));function Vs(e){return e.isInteger()&&e.gte(0)}function $s(e){var t;if(Object(a.i)(e))return e<=0?isFinite(e)?1/0:NaN:171<e?1/0:Fs(1,e-1);if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*$s(1-e));if(171.35<=e)return 1/0;if(85<e){var n=e*e,r=n*e,i=r*e,o=i*e;return Math.sqrt(2*Math.PI/e)*Math.pow(e/Math.E,e)*(1+1/(12*e)+1/(288*n)-139/(51840*r)-571/(2488320*i)+163879/(209018880*o)+5246819/(75246796800*o*e))}--e,t=Zs[0];for(var s=1;s<Zs.length;++s)t+=Zs[s]/(e+s);var u=e+Ys+.5;return Math.sqrt(2*Math.PI)*Math.pow(u,e+.5)*Math.exp(-u)*t}$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(e){var t=e.typed,n=e.config,r=e.multiplyScalar,i=e.pow,o=e.BigNumber,a=e.Complex;return t("gamma",{number:$s,Complex:function(e){if(0===e.im)return this(e.re);e=new a(e.re-1,e.im);for(var t=new a(Zs[0],0),n=1;n<Zs.length;++n){var o=e.re+n,s=o*o+e.im*e.im;0!=s?(t.re+=Zs[n]*o/s,t.im+=-Zs[n]*e.im/s):t.re=Zs[n]<0?-1/0:1/0}var u=new a(e.re+Ys+.5,e.im),l=Math.sqrt(2*Math.PI);e.re+=.5;var c=i(u,e);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),t)},BigNumber:function(e){if(e.isInteger())return e.isNegative()||e.isZero()?new o(1/0):function e(t){if(t<8)return new o([1,1,2,6,24,120,720,5040][t]);var r=n.precision+(0|Math.log(t.toNumber())),i=o.clone({precision:r});if(t%2==1)return t.times(e(new o(t-1)));for(var a=t,s=new i(t),u=t.toNumber();2<a;)u+=a-=2,s=s.times(u);return new o(s.toPrecision(o.precision))}(e.minus(1));if(!e.isFinite())return new o(e.isNegative()?NaN:1/0);throw new Error("Integer BigNumber expected")},"Array | Matrix":function(e){return I(e,this)}})})),Ks="factorial",Xs=Object(s.a)(Ks,["typed","gamma"],(function(e){var t=e.typed,n=e.gamma;return t(Ks,{number:function(e){if(e<0)throw new Error("Value must be non-negative");return n(e+1)},BigNumber:function(e){if(e.isNegative())throw new Error("Value must be non-negative");return n(e.plus(1))},"Array | Matrix":function(e){return I(e,this)}})})),Js="kldivergence",Qs=Object(s.a)(Js,["typed","matrix","divide","sum","multiply","dotDivide","log","isNumeric"],(function(e){var t=e.typed,n=e.matrix,r=e.divide,i=e.sum,o=e.multiply,a=e.dotDivide,s=e.log,u=e.isNumeric;return t(Js,{"Array, Array":function(e,t){return l(n(e),n(t))},"Matrix, Array":function(e,t){return l(e,n(t))},"Array, Matrix":function(e,t){return l(n(e),t)},"Matrix, Matrix":l});function l(e,t){var n=t.size().length,l=e.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(e))throw new Error("Sum of elements in first object must be non zero");if(0===i(t))throw new Error("Sum of elements in second object must be non zero");var c=r(e,i(e)),f=r(t,i(t)),h=i(o(c,s(a(c,f))));return u(h)?h:Number.NaN}})),eu="multinomial",tu=Object(s.a)(eu,["typed","add","divide","multiply","factorial","isInteger","isPositive"],(function(e){var t=e.typed,n=e.add,r=e.divide,i=e.multiply,o=e.factorial,a=e.isInteger,s=e.isPositive;return t(eu,{"Array | Matrix":function(e){var t=0,u=1;return P(e,(function(e){if(!a(e)||!s(e))throw new TypeError("Positive integer value expected in function multinomial");t=n(t,e),u=i(u,o(e))})),r(o(t),u)}})})),nu="permutations",ru=Object(s.a)(nu,["typed","factorial"],(function(e){var t=e.typed,n=e.factorial;return t(nu,{"number | BigNumber":n,"number, number":function(e,t){if(!Object(a.i)(e)||e<0)throw new TypeError("Positive integer value expected in function permutations");if(!Object(a.i)(t)||t<0)throw new TypeError("Positive integer value expected in function permutations");if(e<t)throw new TypeError("second argument k must be less than or equal to first argument n");return Fs(e-t+1,e)},"BigNumber, BigNumber":function(e,t){if(!iu(e)||!iu(t))throw new TypeError("Positive integer value expected in function permutations");if(t.gt(e))throw new TypeError("second argument k must be less than or equal to first argument n");for(var n=e.mul(0).add(1),r=e.minus(t).plus(1);r.lte(e);r=r.plus(1))n=n.times(r);return n}})}));function iu(e){return e.isInteger()&&e.gte(0)}var ou=n(14),au=n.n(ou),su=au()();function uu(e){var t,n;return t=null===(n=e)?su:au()(String(n)),function(){return t()}}var lu=Object(s.a)("pickRandom",["typed","config","?on"],(function(e){var t=e.typed,n=e.config,i=e.on,o=uu(n.randomSeed);return i&&i("config",(function(e,t){e.randomSeed!==t.randomSeed&&(o=uu(e.randomSeed))})),t({"Array | Matrix":function(e){return a(e)},"Array | Matrix, number":function(e,t){return a(e,t,void 0)},"Array | Matrix, Array":function(e,t){return a(e,void 0,t)},"Array | Matrix, Array | Matrix, number":function(e,t,n){return a(e,n,t)},"Array | Matrix, number, Array | Matrix":a});function a(e,t,n){var i=void 0===t;if(i&&(t=1),e=e.valueOf(),n=n&&n.valueOf(),1<Object(E.a)(e).length)throw new Error("Only one dimensional vectors supported");var a=0;if(void 0!==n){if(n.length!==e.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=e.length;if(0===l)return[];if(l<=t)return 1<t?e:e[0];for(var c,f=[];f.length<t;){if(void 0===n)c=e[Math.floor(o()*l)];else for(var h=o()*a,d=0,p=e.length;d<p;d++)if((h-=n[d])<0){c=e[d];break}-1===f.indexOf(c)&&f.push(c)}return i?f[0]:f}}));function cu(e,t){var n=[];if(1<(e=e.slice(0)).length)for(var r=0,i=e.shift();r<i;r++)n.push(cu(e,t));else for(var o=0,a=e.shift();o<a;o++)n.push(t());return n}var fu="random",hu=Object(s.a)(fu,["typed","config","?on"],(function(e){var t=e.typed,n=e.config,i=e.on,o=uu(n.randomSeed);return i&&i("config",(function(e,t){e.randomSeed!==t.randomSeed&&(o=uu(e.randomSeed))})),t(fu,{"":function(){return s(0,1)},number:function(e){return s(0,e)},"number, number":s,"Array | Matrix":function(e){return a(e,0,1)},"Array | Matrix, number":function(e,t){return a(e,0,t)},"Array | Matrix, number, number":a});function a(e,t,n){var i=cu(e.valueOf(),(function(){return s(t,n)}));return Object(r.v)(e)?e.create(i):i}function s(e,t){return e+o()*(t-e)}})),du="randomInt",pu=Object(s.a)(du,["typed","config","?on"],(function(e){var t=e.typed,n=e.config,i=e.on,o=uu(n.randomSeed);return i&&i("config",(function(e,t){e.randomSeed!==t.randomSeed&&(o=uu(e.randomSeed))})),t(du,{"":function(){return s(0,1)},number:function(e){return s(0,e)},"number, number":s,"Array | Matrix":function(e){return a(e,0,1)},"Array | Matrix, number":function(e,t){return a(e,0,t)},"Array | Matrix, number, number":a});function a(e,t,n){var i=cu(e.valueOf(),(function(){return s(t,n)}));return Object(r.v)(e)?e.create(i):i}function s(e,t){return Math.floor(e+o()*(t-e))}})),mu="stirlingS2",gu=Object(s.a)(mu,["typed","addScalar","subtract","multiplyScalar","divideScalar","pow","factorial","combinations","isNegative","isInteger","larger"],(function(e){var t=e.typed,n=e.addScalar,r=e.subtract,i=e.multiplyScalar,o=e.divideScalar,a=e.pow,s=e.factorial,u=e.combinations,l=e.isNegative,c=e.isInteger,f=e.larger;return t(mu,{"number | BigNumber, number | BigNumber":function(e,t){if(!c(e)||l(e)||!c(t)||l(t))throw new TypeError("Non-negative integer value expected in function stirlingS2");if(f(t,e))throw new TypeError("k must be less than or equal to n in function stirlingS2");for(var h=s(t),d=0,p=0;p<=t;p++){var m=a(-1,r(t,p)),g=u(t,p),v=a(p,e);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(e){var t=e.typed,n=e.addScalar,r=e.isNegative,i=e.isInteger,o=e.stirlingS2;return t(vu,{"number | BigNumber":function(e){if(!i(e)||r(e))throw new TypeError("Non-negative integer value expected in function bellNumbers");for(var t=0,a=0;a<=e;a++)t=n(t,o(e,a));return t}})})),bu="catalan",xu=Object(s.a)(bu,["typed","addScalar","divideScalar","multiplyScalar","combinations","isNegative","isInteger"],(function(e){var t=e.typed,n=e.addScalar,r=e.divideScalar,i=e.multiplyScalar,o=e.combinations,a=e.isNegative,s=e.isInteger;return t(bu,{"number | BigNumber":function(e){if(!s(e)||a(e))throw new TypeError("Non-negative integer value expected in function catalan");return r(o(i(e,2),e),n(e,1))}})})),wu="composition",_u=Object(s.a)(wu,["typed","addScalar","combinations","isNegative","isPositive","isInteger","larger"],(function(e){var t=e.typed,n=e.addScalar,r=e.combinations,i=e.isPositive,o=(e.isNegative,e.isInteger),a=e.larger;return t(wu,{"number | BigNumber, number | BigNumber":function(e,t){if(!(o(e)&&i(e)&&o(t)&&i(t)))throw new TypeError("Positive integer value expected in function composition");if(a(t,e))throw new TypeError("k must be less than or equal to n in function composition");return r(n(e,-1),n(t,-1))}})})),Su=Object(s.a)("simplifyUtil",["FunctionNode","OperatorNode","SymbolNode"],(function(e){var t=e.FunctionNode,n=e.OperatorNode,i=e.SymbolNode,o={add:!0,multiply:!0},a={add:!0,multiply:!0};function s(e,t){if(!Object(r.B)(e))return!1;var n=e.fn.toString();return t&&Object(A.f)(t,n)&&Object(A.f)(t[n],"associative")?t[n].associative:a[n]||!1}function u(e){var t,n=[];return s(e)?(t=e.op,function e(i){for(var o=0;o<i.args.length;o++){var a=i.args[o];Object(r.B)(a)&&t===a.op?e(a):n.push(a)}}(e),n):e.args}function l(e){return Object(r.B)(e)?function(t){try{return new n(e.op,e.fn,t,e.implicit)}catch(t){return console.error(t),[]}}:function(n){return new t(new i(e.name),n)}}return{createMakeNodeFunction:l,isCommutative:function(e,t){if(!Object(r.B)(e))return!0;var n=e.fn.toString();return t&&Object(A.f)(t,n)&&Object(A.f)(t[n],"commutative")?t[n].commutative:o[n]||!1},isAssociative:s,flatten:function e(t){if(!t.args||0===t.args.length)return t;t.args=u(t);for(var n=0;n<t.args.length;n++)e(t.args[n])},allChildren:u,unflattenr:function e(t){if(t.args&&0!==t.args.length){for(var n=l(t),r=t.args.length,i=0;i<r;i++)e(t.args[i]);if(2<r&&s(t)){for(var o=t.args.pop();0<t.args.length;)o=n([t.args.pop(),o]);t.args=o.args}}},unflattenl:function e(t){if(t.args&&0!==t.args.length){for(var n=l(t),r=t.args.length,i=0;i<r;i++)e(t.args[i]);if(2<r&&s(t)){for(var o=t.args.shift();0<t.args.length;)o=n([o,t.args.shift()]);t.args=o.args}}}}})),Ou=Object(s.a)("simplifyCore",["equal","isZero","add","subtract","multiply","divide","pow","ConstantNode","OperatorNode","FunctionNode","ParenthesisNode"],(function(e){var t=e.equal,n=e.isZero,i=e.add,o=e.subtract,a=e.multiply,s=e.divide,u=e.pow,l=e.ConstantNode,c=e.OperatorNode,f=e.FunctionNode,h=e.ParenthesisNode,d=new l(0),p=new l(1);return function e(m){if(Object(r.B)(m)&&m.isUnary()){var g=e(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=e(m.args[0]),y=e(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?e(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(t(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(t(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)&&(t(y.value,1)||t(y.value,2)||t(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(t(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 _=e(m.content);return Object(r.C)(_)||Object(r.J)(_)||Object(r.l)(_)?_:new h(_)}if(Object(r.r)(m)){var S=m.args.map(e).map((function(e){return Object(r.C)(e)?e.content:e}));return new f(e(m.fn),S)}}return m}})),Nu=Object(s.a)("simplifyConstant",["typed","config","mathWithTransform","?fraction","?bignumber","ConstantNode","OperatorNode","FunctionNode","SymbolNode"],(function(e){var t=e.typed,n=e.config,i=e.mathWithTransform,o=e.fraction,a=e.bignumber,s=e.ConstantNode,u=e.OperatorNode,l=e.FunctionNode,c=e.SymbolNode,f=Su({FunctionNode:l,OperatorNode:u,SymbolNode:c}),h=f.isCommutative,d=f.isAssociative,p=f.allChildren,m=f.createMakeNodeFunction;function g(e,t,n){try{return b(i[e].apply(null,t),n)}catch(o){return t=t.map((function(e){return Object(r.o)(e)?e.valueOf():e})),b(i[e].apply(null,t),n)}}var v=t({Fraction:function(e){var t,n=e.s*e.n;return t=n<0?new u("-","unaryMinus",[new s(-n)]):new s(n),1!==e.d?new u("/","divide",[t,new s(e.d)]):t},number:function(e){return e<0?x(new s(-e)):new s(e)},BigNumber:function(e){return e<0?x(new s(-e)):new s(e)},Complex:function(){throw new Error("Cannot convert Complex number to Node")}});function y(e,t){if(t&&!1!==t.exactFractions&&isFinite(e)&&o){var n=o(e);if(n.valueOf()===e)return n}return e}var b=t({"string, Object":function(e,t){return"BigNumber"===n.number?(void 0===a&&In(),a(e)):"Fraction"===n.number?(void 0===o&&Rn(),o(e)):y(parseFloat(e),t)},"Fraction, Object":function(e){return e},"BigNumber, Object":function(e){return e},"number, Object":y,"Complex, Object":function(e,t){return 0!==e.im?e:y(e.re,t)}});function x(e){return new u("-","unaryMinus",[e])}function w(e,t,n,i){return t.reduce((function(t,o){if(Object(r.w)(t)||Object(r.w)(o))Object(r.w)(t)?Object(r.w)(o)||(o=v(o)):t=v(t);else{try{return g(e,[t,o],i)}catch(t){}t=v(t),o=v(o)}return n([t,o])}))}return function(e,t){var n=function e(t,n){switch(t.type){case"SymbolNode":return t;case"ConstantNode":return"number"!=typeof t.value&&isNaN(t.value)?t:b(t.value,n);case"FunctionNode":if(i[t.name]&&i[t.name].rawArgs)return t;if(-1===["add","multiply"].indexOf(t.name)){var o=t.args.map((function(t){return e(t,n)}));if(!o.some(r.w))try{return g(t.name,o,n)}catch(t){}return o=o.map((function(e){return Object(r.w)(e)?e:v(e)})),new l(t.name,o)}case"OperatorNode":var a,s,u=t.fn.toString(),c=m(t);if(Object(r.B)(t)&&t.isUnary())a=[e(t.args[0],n)],s=Object(r.w)(a[0])?c(a):g(u,a,n);else if(d(t))if(a=(a=p(t)).map((function(t){return e(t,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=t.args.map((function(t){return e(t,n)})),c,n);return s;case"ParenthesisNode":return e(t.content,n);default:throw new Error("Unimplemented node type in simplifyConstant: ".concat(t.type))}}(e,t);return Object(r.w)(n)?n:v(n)}})),Eu=Object(s.a)("resolve",["parse","FunctionNode","OperatorNode","ParenthesisNode"],(function(e){var t=e.parse,n=e.FunctionNode,i=e.OperatorNode,o=e.ParenthesisNode;return function e(a,s){if(!s)return a;if(Object(r.J)(a)){var u=s[a.name];if(Object(r.w)(u))return e(u,s);if("number"==typeof u)return t(String(u))}else{if(Object(r.B)(a)){var l=a.args.map((function(t){return e(t,s)}));return new i(a.op,a.fn,l,a.implicit)}if(Object(r.C)(a))return new o(e(a.content,s));if(Object(r.r)(a)){var c=a.args.map((function(t){return e(t,s)}));return new n(a.name,c)}}return a}}));function Cu(e){return(Cu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Au=Object(s.a)("simplify",["config","typed","parse","add","subtract","multiply","divide","pow","isZero","equal","?fraction","?bignumber","mathWithTransform","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode","SymbolNode"],(function(e){var t=e.config,n=e.typed,i=e.parse,o=e.add,a=e.subtract,s=e.multiply,u=e.divide,l=e.pow,c=e.isZero,f=e.equal,h=e.fraction,d=e.bignumber,p=e.mathWithTransform,m=e.ConstantNode,g=e.FunctionNode,v=e.OperatorNode,y=e.ParenthesisNode,b=e.SymbolNode,x=Nu({typed:n,config:t,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}),_=Eu({parse:i,FunctionNode:g,OperatorNode:v,ParenthesisNode:y}),S=Su({FunctionNode:g,OperatorNode:v,SymbolNode:b}),O=S.isCommutative,N=S.isAssociative,E=S.flatten,C=S.unflattenr,M=S.unflattenl,k=S.createMakeNodeFunction,T=n("simplify",{string:function(e){return this(i(e),this.rules,{},{})},"string, Object":function(e,t){return this(i(e),this.rules,t,{})},"string, Object, Object":function(e,t,n){return this(i(e),this.rules,t,n)},"string, Array":function(e,t){return this(i(e),t,{},{})},"string, Array, Object":function(e,t,n){return this(i(e),t,n,{})},"string, Array, Object, Object":function(e,t,n,r){return this(i(e),t,n,r)},"Node, Object":function(e,t){return this(e,this.rules,t,{})},"Node, Object, Object":function(e,t,n){return this(e,this.rules,t,n)},Node:function(e){return this(e,this.rules,{},{})},"Node, Array":function(e,t){return this(e,t,{},{})},"Node, Array, Object":function(e,t,n){return this(e,t,n,{})},"Node, Array, Object, Object":function(e,t,n,r){t=function(e){for(var t=[],n=0;n<e.length;n++){var r,o,a=e[n],s=void 0,u=Cu(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:D(i(a.l)),r:D(i(a.r))},a.context&&(s.evaluate=a.context),a.evaluate&&(s.evaluate=i(a.evaluate)),N(s.l)&&(r=k(s.l),o=new b("_p"+P++),s.expanded={},s.expanded.l=r([s.l.clone(),o]),E(s.expanded.l),C(s.expanded.l),s.expanded.r=r([s.r,o]));break;case"function":s=a;break;default:throw TypeError("Unsupported type of rule: "+u)}t.push(s)}return t}(t);for(var o=_(e,n),a={},s=(o=D(o)).toString({parenthesis:"all"});!a[s];){a[s]=!0;for(var u=P=0;u<t.length;u++)o="function"==typeof t[u]?t[u](o,r):(E(o),I(o,t[u])),M(o);s=o.toString({parenthesis:"all"})}return o}});function D(e){return e.transform((function(e,t,n){return Object(r.C)(e)?D(e.content):e}))}T.simplifyCore=w,T.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};T.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(e,t){var n=e;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],t)}else n instanceof y&&n.content&&(n.content=I(n.content,t));var i,o=t.r,a=F(t.l,n)[0];return!a&&t.expanded&&(o=t.expanded.r,a=F(t.expanded.l,n)[0]),a&&(i=n.implicit,n=o.clone(),i&&"implicit"in o&&(n.implicit=!0),n=n.transform((function(e){return e.isSymbolNode&&Object(A.f)(a.placeholders,e.name)?a.placeholders[e.name].clone():e}))),n}});function R(e,t){var n={placeholders:{}};if(!e.placeholders&&!t.placeholders)return n;if(!e.placeholders)return t;if(!t.placeholders)return e;for(var r in e.placeholders)if(Object(A.f)(e.placeholders,r)&&(n.placeholders[r]=e.placeholders[r],Object(A.f)(t.placeholders,r)&&!function e(t,n){if(t instanceof m&&n instanceof m){if(!f(t.value,n.value))return!1}else if(t instanceof b&&n instanceof b){if(t.name!==n.name)return!1}else{if(!(t instanceof v&&n instanceof v||t instanceof g&&n instanceof g))return!1;if(t instanceof v){if(t.op!==n.op||t.fn!==n.fn)return!1}else if(t instanceof g&&t.name!==n.name)return!1;if(t.args.length!==n.args.length)return!1;for(var r=0;r<t.args.length;r++)if(!e(t.args[r],n.args[r]))return!1}return!0}(e.placeholders[r],t.placeholders[r])))return null;for(var i in t.placeholders)Object(A.f)(t.placeholders,i)&&(n.placeholders[i]=t.placeholders[i]);return n}function L(e,t){var n,r=[];if(0===e.length||0===t.length)return r;for(var i=0;i<e.length;i++)for(var o=0;o<t.length;o++)(n=R(e[i],t[o]))&&r.push(n);return r}function F(e,t,n){var i=[{placeholders:{}}];if(e instanceof v&&t instanceof v||e instanceof g&&t instanceof g){if(e instanceof v){if(e.op!==t.op||e.fn!==t.fn)return[]}else if(e instanceof g&&e.name!==t.name)return[];if((1!==t.args.length||1!==e.args.length)&&N(t)&&!n){if(2<=t.args.length&&2===e.args.length){for(var o=function(e,t){var n,r,i=[],o=k(e);if(O(e,t))for(var a=0;a<e.args.length;a++)(r=e.args.slice(0)).splice(a,1),n=1===r.length?r[0]:o(r),i.push(o([e.args[a],n]));else n=1===(r=e.args.slice(1)).length?r[0]:o(r),i.push(o([e.args[0],n]));return i}(t,e.context),a=[],s=0;s<o.length;s++){var u=F(e,o[s],!0);a=a.concat(u)}return a}if(2<e.args.length)throw Error("Unexpected non-binary associative function: "+e.toString());return[]}for(var l=[],c=0;c<e.args.length;c++){var h=F(e.args[c],t.args[c]);if(0===h.length)return[];l.push(h)}i=function(e){if(0===e.length)return e;for(var t=e.reduce(L),n=[],r={},i=0;i<t.length;i++){var o=JSON.stringify(t[i]);r[o]||(r[o]=!0,n.push(t[i]))}return n}(l)}else if(e instanceof b){if(0===e.name.length)throw new Error("Symbol in rule has 0 length...!?");if(j[e.name]){if(e.name!==t.name)return[]}else if("n"===e.name[0]||"_p"===e.name.substring(0,2))i[0].placeholders[e.name]=t;else if("v"===e.name[0]){if(Object(r.l)(t))return[];i[0].placeholders[e.name]=t}else{if("c"!==e.name[0])throw new Error("Invalid symbol in rule: "+e.name);if(!(t instanceof m))return[];i[0].placeholders[e.name]=t}}else{if(!(e instanceof m))return[];if(!f(e.value,t.value))return[]}return i}return T})),Mu=Object(s.a)("derivative",["typed","config","parse","simplify","equal","isZero","numeric","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode","SymbolNode"],(function(e){var t=e.typed,n=e.config,i=e.parse,o=e.simplify,a=e.equal,s=e.isZero,u=e.numeric,l=e.ConstantNode,c=e.FunctionNode,f=e.OperatorNode,h=e.ParenthesisNode,d=e.SymbolNode,p=t("derivative",{"Node, SymbolNode, Object":function(e,t,n){var r={};g(r,e,t.name);var i=v(e,r);return n.simplify?o(i):i},"Node, SymbolNode":function(e,t){return this(e,t,{simplify:!0})},"string, SymbolNode":function(e,t){return this(i(e),t)},"string, SymbolNode, Object":function(e,t,n){return this(i(e),t,n)},"string, string":function(e,t){return this(i(e),i(t))},"string, string, Object":function(e,t,n){return this(i(e),i(t),n)},"Node, string":function(e,t){return this(e,i(t))},"Node, string, Object":function(e,t,n){return this(e,i(t),n)}});p._simplify=!0,p.toTex=function(e){return m.apply(null,e.args)};var m=t("_derivTex",{"Node, SymbolNode":function(e,t){return Object(r.l)(e)&&"string"===Object(r.M)(e.value)?m(i(e.value).toString(),t.toString(),1):m(e.toString(),t.toString(),1)},"Node, ConstantNode":function(e,t){if("string"===Object(r.M)(t.value))return m(e,i(t.value));throw new Error("The second parameter to 'derivative' is a non-string constant")},"Node, SymbolNode, ConstantNode":function(e,t,n){return m(e.toString(),t.name,n.value)},"string, string, number":function(e,t,n){return(1===n?"{d\\over d"+t+"}":"{d^{"+n+"}\\over d"+t+"^{"+n+"}}")+"\\left[".concat(e,"\\right]")}}),g=t("constTag",{"Object, ConstantNode, string":function(e,t){return e[t]=!0},"Object, SymbolNode, string":function(e,t,n){return t.name!==n&&(e[t]=!0)},"Object, ParenthesisNode, string":function(e,t,n){return g(e,t.content,n)},"Object, FunctionAssignmentNode, string":function(e,t,n){return-1===t.params.indexOf(n)?e[t]=!0:g(e,t.expr,n)},"Object, FunctionNode | OperatorNode, string":function(e,t,n){if(0<t.args.length){for(var r=g(e,t.args[0],n),i=1;i<t.args.length;++i)r=g(e,t.args[i],n)&&r;if(r)return e[t]=!0}return!1}}),v=t("_derivative",{"ConstantNode, Object":function(){return y(0)},"SymbolNode, Object":function(e,t){return void 0!==t[e]?y(0):y(1)},"ParenthesisNode, Object":function(e,t){return new h(v(e.content,t))},"FunctionAssignmentNode, Object":function(e,t){return void 0!==t[e]?y(0):v(e.expr,t)},"FunctionNode, Object":function(e,t){if(1!==e.args.length&&function(e){if("log"!==e.name&&"nthRoot"!==e.name&&"pow"!==e.name||2!==e.args.length){for(var t=0;t<e.args.length;++t)e.args[t]=y(0);throw e.compile().evaluate(),new Error("Expected TypeError, but none found")}}(e),void 0!==t[e])return y(0);var n,r,i,o,a=e.args[0],s=!1,u=!1;switch(e.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===e.args.length)s=!0,r=new f("*","multiply",[y(2),new c("sqrt",[a])]);else if(2===e.args.length)return t[n=new f("/","divide",[y(1),e.args[1]])]=t[e.args[1]],v(new f("^","pow",[a,n]),t);break;case"log10":n=y(10);case"log":if(n||1!==e.args.length){if(1===e.args.length&&n||2===e.args.length&&void 0!==t[e.args[1]])r=new f("*","multiply",[a.clone(),new c("log",[n||e.args[1]])]),s=!0;else if(2===e.args.length)return v(new f("/","divide",[new c("log",[a]),new c("log",[e.args[1]])]),t)}else r=a.clone(),s=!0;break;case"pow":return t[n]=t[e.args[1]],v(new f("^","pow",[a,e.args[1]]),t);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",[e,new c("tan",[a.clone()])]);break;case"csc":u=!0,r=new f("*","multiply",[e,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",[e,new c("tanh",[a.clone()])]);break;case"csch":u=!0,r=new f("*","multiply",[e,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 "'+e.name+'" is not supported by derivative, or a wrong number of arguments is passed')}o=s?(i="/","divide"):(i="*","multiply");var l=v(a,t);return u&&(l=new f("-","unaryMinus",[l])),new f(i,o,[l,r])},"OperatorNode, Object":function(e,t){if(void 0!==t[e])return y(0);if("+"===e.op)return new f(e.op,e.fn,e.args.map((function(e){return v(e,t)})));if("-"===e.op){if(e.isUnary())return new f(e.op,e.fn,[v(e.args[0],t)]);if(e.isBinary())return new f(e.op,e.fn,[v(e.args[0],t),v(e.args[1],t)])}if("*"===e.op){var n=e.args.filter((function(e){return void 0!==t[e]}));if(0<n.length){var i=e.args.filter((function(e){return void 0===t[e]})),o=1===i.length?i[0]:new f("*","multiply",i),u=n.concat(v(o,t));return new f("*","multiply",u)}return new f("+","add",e.args.map((function(n){return new f("*","multiply",e.args.map((function(e){return e===n?v(e,t):e.clone()})))})))}if("/"===e.op&&e.isBinary()){var l=e.args[0],h=e.args[1];return void 0!==t[h]?new f("/","divide",[v(l,t),h]):void 0!==t[l]?new f("*","multiply",[new f("-","unaryMinus",[l]),new f("/","divide",[v(h,t),new f("^","pow",[h.clone(),y(2)])])]):new f("/","divide",[new f("-","subtract",[new f("*","multiply",[v(l,t),h.clone()]),new f("*","multiply",[l.clone(),v(h,t)])]),new f("^","pow",[h.clone(),y(2)])])}if("^"===e.op&&e.isBinary()){var d=e.args[0],p=e.args[1];if(void 0!==t[d])return Object(r.l)(d)&&(s(d.value)||a(d.value,1))?y(0):new f("*","multiply",[e,new f("*","multiply",[new c("log",[d.clone()]),v(p.clone(),t)])]);if(void 0===t[p])return new f("*","multiply",[new f("^","pow",[d.clone(),p.clone()]),new f("+","add",[new f("*","multiply",[v(d,t),new f("/","divide",[p.clone(),d.clone()])]),new f("*","multiply",[v(p,t),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,t)}var m=new f("^","pow",[d.clone(),new f("-","subtract",[p,y(1)])]);return new f("*","multiply",[p.clone(),new f("*","multiply",[v(d,t),m])])}throw new Error('Operator "'+e.op+'" is not supported by derivative, or a wrong number of arguments is passed')}});function y(e,t){return new l(u(e,t||n.number))}return p})),ku="rationalize",Tu=Object(s.a)(ku,["config","typed","equal","isZero","add","subtract","multiply","divide","pow","parse","simplify","?bignumber","?fraction","mathWithTransform","ConstantNode","OperatorNode","FunctionNode","SymbolNode","ParenthesisNode"],(function(e){var t=e.config,n=e.typed,r=e.equal,i=e.isZero,o=e.add,s=e.subtract,u=e.multiply,l=e.divide,c=e.pow,f=e.parse,h=e.simplify,d=e.fraction,p=e.bignumber,m=e.mathWithTransform,g=e.ConstantNode,v=e.OperatorNode,y=e.FunctionNode,b=e.SymbolNode,x=e.ParenthesisNode,w=Nu({typed:n,config:t,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(ku,{string:function(e){return this(f(e),{},!1)},"string, boolean":function(e,t){return this(f(e),{},t)},"string, Object":function(e,t){return this(f(e),t,!1)},"string, Object, boolean":function(e,t,n){return this(f(e),t,n)},Node:function(e){return this(e,{},!1)},"Node, boolean":function(e,t){return this(e,{},t)},"Node, Object":function(e,t){return this(e,t,!1)},"Node, Object, boolean":function(e,t,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(e,t,n,r){var i=[],o=h(e,r,t,{exactFractions:!1}),s="+-*"+((n=!!n)?"/":"");!function e(t){var n=t.type;if("FunctionNode"===n)throw new Error("There is an unsolved function call");if("OperatorNode"===n)if("^"===t.op){if("ConstantNode"!==t.args[1].type||!Object(a.i)(parseFloat(t.args[1].value)))throw new Error("There is a non-integer exponent");e(t.args[0])}else{if(-1===s.indexOf(t.op))throw new Error("Operator "+t.op+" invalid in polynomial expression");for(var r=0;r<t.args.length;r++)e(t.args[r])}else if("SymbolNode"===n){var o=t.name;-1===i.indexOf(o)&&i.push(o)}else if("ParenthesisNode"===n)e(t.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}(e,t,!0,c.firstRules),d=f.variables.length;if(e=f.expression,1<=d){e=function e(t,n,r){var i,o,s,u,l=t.type,c=1<arguments.length;if("OperatorNode"===l&&t.isBinary()&&(i=!1,"^"===t.op&&("ParenthesisNode"!==t.args[0].type&&"OperatorNode"!==t.args[0].type||"ConstantNode"!==t.args[1].type||(i=2<=(o=parseFloat(t.args[1].value))&&Object(a.i)(o))),i&&(t=2<o?(s=t.args[0],u=new v("^","pow",[t.args[0].cloneDeep(),new g(o-1)]),new v("*","multiply",[s,u])):new v("*","multiply",[t.args[0],t.args[0].cloneDeep()]),c&&("content"===r?n.content=t:n.args[r]=t))),"ParenthesisNode"===l)e(t.content,t,"content");else if("ConstantNode"!==l&&"SymbolNode"!==l)for(var f=0;f<t.args.length;f++)e(t.args[f],t,f);if(!c)return t}(e);var p,m=!0,y=!1;for(e=h(e,c.firstRules,{},{exactFractions:!1});l=m?c.distrDivRules:c.sucDivRules,m=!m,(p=(e=h(e,l)).toString())!==u;)y=!0,u=p;y&&(e=h(e,c.firstRulesAgain,{},{exactFractions:!1})),e=h(e,c.finalRules,{},{exactFractions:!1})}var b=[],x={};return"OperatorNode"===e.type&&e.isBinary()&&"/"===e.op?(1===d&&(e.args[0]=S(e.args[0],b),e.args[1]=S(e.args[1])),n&&(x.numerator=e.args[0],x.denominator=e.args[1])):(1===d&&(e=S(e,b)),n&&(x.numerator=e,x.denominator=null)),n?(x.coefficients=b,x.variables=f.variables,x.expression=e,x):e}});function S(e,t){void 0===t&&(t=[]);var n=t[0]=0,r="";!function e(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,e(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(t[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&&(t[1]=0),t[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(t[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++)t[f]=0;return n<c&&(t[c]=0),t[c]+=s.cte*("+"===s.oper?1:-1),void(n=Math.max(c,n))}s.cte=c,""===s.fire&&(t[0]+=s.cte*("+"===s.oper?1:-1))}}(e,null,{cte:1,oper:"+",fire:""});for(var i,o,s,u,l,c=!0,f=n=t.length-1;0<=f;f--)0!==t[f]&&(o=new g(c?t[f]:Math.abs(t[f])),s=t[f]<0?"-":"+",0<f&&(l=new b(r),1<f&&(u=new g(f),l=new v("^","pow",[l,u])),o=-1===t[f]&&c?new v("-","unaryMinus",[l]):1===Math.abs(t[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}})),Du=Object(s.a)("reviver",["classes"],(function(e){var t=e.classes;return function(e,n){var r=t[n&&n.mathjs];return r&&"function"==typeof r.fromJSON?r.fromJSON(n):n}})),ju=Object(s.a)("replacer",[],(function(){return function(e,t){return"number"!=typeof t||isFinite(t)&&!isNaN(t)?t:{mathjs:"number",value:String(t)}}})),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})),Bu=Object(s.a)("null",[],(function(){return null})),qu=nl("Infinity",["config","?BigNumber"],(function(e){var t=e.config,n=e.BigNumber;return"BigNumber"===t.number?new n(1/0):1/0})),zu=nl("NaN",["config","?BigNumber"],(function(e){var t=e.config,n=e.BigNumber;return"BigNumber"===t.number?new n(NaN):NaN})),Hu=nl("pi",["config","?BigNumber"],(function(e){var t=e.config,n=e.BigNumber;return"BigNumber"===t.number?Pi(n):Pu})),Uu=nl("tau",["config","?BigNumber"],(function(e){var t=e.config,n=e.BigNumber;return"BigNumber"===t.number?Ii(n):Iu})),Wu=nl("e",["config","?BigNumber"],(function(e){var t=e.config,n=e.BigNumber;return"BigNumber"===t.number?Di(n):Ru})),Vu=nl("phi",["config","?BigNumber"],(function(e){var t=e.config,n=e.BigNumber;return"BigNumber"===t.number?ji(n):1.618033988749895})),$u=nl("LN2",["config","?BigNumber"],(function(e){var t=e.config,n=e.BigNumber;return"BigNumber"===t.number?new n(2).ln():Math.LN2})),Yu=nl("LN10",["config","?BigNumber"],(function(e){var t=e.config,n=e.BigNumber;return"BigNumber"===t.number?new n(10).ln():Math.LN10})),Zu=nl("LOG2E",["config","?BigNumber"],(function(e){var t=e.config,n=e.BigNumber;return"BigNumber"===t.number?new n(1).div(new n(2).ln()):Math.LOG2E})),Gu=nl("LOG10E",["config","?BigNumber"],(function(e){var t=e.config,n=e.BigNumber;return"BigNumber"===t.number?new n(1).div(new n(10).ln()):Math.LOG10E})),Ku=nl("SQRT1_2",["config","?BigNumber"],(function(e){var t=e.config,n=e.BigNumber;return"BigNumber"===t.number?new n("0.5").sqrt():Math.SQRT1_2})),Xu=nl("SQRT2",["config","?BigNumber"],(function(e){var t=e.config,n=e.BigNumber;return"BigNumber"===t.number?new n(2).sqrt():Math.SQRT2})),Ju=nl("i",["Complex"],(function(e){return e.Complex.I})),Qu=Object(s.a)("PI",["pi"],(function(e){return e.pi})),el=Object(s.a)("E",["e"],(function(e){return e.e})),tl=Object(s.a)("version",[],(function(){return"7.1.0"}));function nl(e,t,n){return Object(s.a)(e,t,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=ec("fineStructure",.0072973525693),Sl=Ql("hartreeEnergy","4.3597447222071e-18","J"),Ol=Ql("protonMass","1.67262192369e-27","kg"),Nl=Ql("deuteronMass","3.3435830926e-27","kg"),El=Ql("neutronMass","1.6749271613e-27","kg"),Cl=Ql("quantumOfCirculation","3.6369475516e-4","m^2 s^-1"),Al=Ql("rydberg","10973731.568160","m^-1"),Ml=Ql("thomsonCrossSection","6.6524587321e-29","m^2"),kl=ec("weakMixingAngle",.2229),Tl=ec("efimovFactor",22.7),Dl=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"),Bl=Ql("molarPlanckConstant","3.990312712893431e-10","J s mol^-1"),ql=Ql("molarVolume","0.022413969545014137","m^3 mol^-1"),zl=ec("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(e,t,n){return Object(s.a)(e,["config","Unit","BigNumber"],(function(e){var r=e.config,i=e.Unit,o=e.BigNumber,a=new i("BigNumber"===r.number?new o(t):parseFloat(t),n);return a.fixPrefix=!0,a}))}function ec(e,t){return Object(s.a)(e,["config","BigNumber"],(function(e){var n=e.config,r=e.BigNumber;return"BigNumber"===n.number?new r(t):t}))}var tc=Object(s.a)("apply",["typed","isInteger"],(function(e){var t=e.typed,n=e.isInteger,i=$e({typed:t,isInteger:n});return t("apply",{"...any":function(e){var t=e[1];Object(r.y)(t)?e[1]=t-1:Object(r.e)(t)&&(e[1]=t.minus(1));try{return i.apply(null,e)}catch(e){throw la(e)}}})}),{isTransformFunction:!0}),nc=Object(s.a)("column",["typed","Index","matrix","range"],(function(e){var t=e.typed,n=e.Index,i=e.matrix,o=e.range,a=pn({typed:t,Index:n,matrix:i,range:o});return t("column",{"...any":function(e){var t=e.length-1,n=e[t];Object(r.y)(n)&&(e[t]=n-1);try{return a.apply(null,e)}catch(e){throw la(e)}}})}),{isTransformFunction:!0});function rc(e,t,n){var i=e.filter((function(e){return Object(r.J)(e)&&!(e.name in t)&&!(e.name in n)}))[0];if(!i)throw new Error('No undefined variable found in inline expression "'+e+'"');var o=i.name,a=Object.create(n),s=e.compile();return function(e){return a[o]=e,s.evaluate(a)}}var ic=Object(s.a)("filter",["typed"],(function(e){var t=e.typed;function n(e,t,n){var o,a;return e[0]&&(o=e[0].compile().evaluate(n)),e[1]&&(a=Object(r.J)(e[1])||Object(r.q)(e[1])?e[1].compile().evaluate(n):rc(e[1],t,n)),i(o,a)}n.rawArgs=!0;var i=t("filter",{"Array, function":oc,"Matrix, function":function(e,t){return e.create(oc(e.toArray(),t))},"Array, RegExp":E.d,"Matrix, RegExp":function(e,t){return e.create(Object(E.d)(e.toArray(),t))}});return n}),{isTransformFunction:!0});function oc(e,t){var n=bn(t);return Object(E.c)(e,(function(e,r,i){return 1===n?t(e):2===n?t(e,[r+1]):t(e,[r+1],i)}))}var ac=Object(s.a)("forEach",["typed"],(function(e){var t=e.typed;function n(e,t,n){var o,a;return e[0]&&(o=e[0].compile().evaluate(n)),e[1]&&(a=Object(r.J)(e[1])||Object(r.q)(e[1])?e[1].compile().evaluate(n):rc(e[1],t,n)),i(o,a)}n.rawArgs=!0;var i=t("forEach",{"Array | Matrix, function":function(e,t){var n=bn(t);!function r(i,o){Array.isArray(i)?Object(E.f)(i,(function(e,t){r(e,o.concat(t+1))})):1===n?t(i):2===n?t(i,o):t(i,o,e)}(e.valueOf(),[])}});return n}),{isTransformFunction:!0}),sc=Object(s.a)("index",["Index"],(function(e){var t=e.Index;return function(){for(var e=[],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(e){return e-1}));else if(Object(r.b)(o)||Object(r.v)(o))o=o.map((function(e){return e-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");e[n]=o}var a=new t;return t.apply(a,e),a}}),{isTransformFunction:!0}),uc=Object(s.a)("map",["typed"],(function(e){var t=e.typed;function n(e,t,n){var o,a;return e[0]&&(o=e[0].compile().evaluate(n)),e[1]&&(a=Object(r.J)(e[1])||Object(r.q)(e[1])?e[1].compile().evaluate(n):rc(e[1],t,n)),i(o,a)}n.rawArgs=!0;var i=t("map",{"Array, function":function(e,t){return lc(e,t,e)},"Matrix, function":function(e,t){return e.create(lc(e.valueOf(),t,e))}});return n}),{isTransformFunction:!0});function lc(e,t,n){var r=bn(t);return function e(i,o){return Array.isArray(i)?Object(E.k)(i,(function(t,n){return e(t,o.concat(n+1))})):1===r?t(i):2===r?t(i,o):t(i,o,n)}(e,[])}var cc=Object(s.a)("max",["typed","config","numeric","larger"],(function(e){var t=e.typed,n=e.config,i=e.numeric,o=e.larger,a=Ei({typed:t,config:n,numeric:i,larger:o});return t("max",{"...any":function(e){var t;2===e.length&&Object(r.i)(e[0])&&(t=e[1],Object(r.y)(t)?e[1]=t-1:Object(r.e)(t)&&(e[1]=t.minus(1)));try{return a.apply(null,e)}catch(e){throw la(e)}}})}),{isTransformFunction:!0}),fc=Object(s.a)("mean",["typed","add","divide"],(function(e){var t=e.typed,n=e.add,i=e.divide,o=ks({typed:t,add:n,divide:i});return t("mean",{"...any":function(e){var t;2===e.length&&Object(r.i)(e[0])&&(t=e[1],Object(r.y)(t)?e[1]=t-1:Object(r.e)(t)&&(e[1]=t.minus(1)));try{return o.apply(null,e)}catch(e){throw la(e)}}})}),{isTransformFunction:!0}),hc=Object(s.a)("min",["typed","config","numeric","smaller"],(function(e){var t=e.typed,n=e.config,i=e.numeric,o=e.smaller,a=Ci({typed:t,config:n,numeric:i,smaller:o});return t("min",{"...any":function(e){var t;2===e.length&&Object(r.i)(e[0])&&(t=e[1],Object(r.y)(t)?e[1]=t-1:Object(r.e)(t)&&(e[1]=t.minus(1)));try{return a.apply(null,e)}catch(e){throw la(e)}}})}),{isTransformFunction:!0}),dc=Object(s.a)("range",["typed","config","?matrix","?bignumber","smaller","smallerEq","larger","largerEq"],(function(e){var t=e.typed,n=e.config,r=e.matrix,i=e.bignumber,o=e.smaller,a=e.smallerEq,s=e.larger,u=e.largerEq,l=Fn({typed:t,config:n,matrix:r,bignumber:i,smaller:o,smallerEq:a,larger:s,largerEq:u});return t("range",{"...any":function(e){return"boolean"!=typeof e[e.length-1]&&e.push(!0),l.apply(null,e)}})}),{isTransformFunction:!0}),pc=Object(s.a)("row",["typed","Index","matrix","range"],(function(e){var t=e.typed,n=e.Index,i=e.matrix,o=e.range,a=Un({typed:t,Index:n,matrix:i,range:o});return t("row",{"...any":function(e){var t=e.length-1,n=e[t];Object(r.y)(n)&&(e[t]=n-1);try{return a.apply(null,e)}catch(e){throw la(e)}}})}),{isTransformFunction:!0}),mc=Object(s.a)("subset",["typed","matrix"],(function(e){var t=e.typed,n=e.matrix,r=tr({typed:t,matrix:n});return t("subset",{"...any":function(e){try{return r.apply(null,e)}catch(e){throw la(e)}}})}),{isTransformFunction:!0}),gc=Object(s.a)("concat",["typed","matrix","isInteger"],(function(e){var t=e.typed,n=e.matrix,i=e.isInteger,o=dn({typed:t,matrix:n,isInteger:i});return t("concat",{"...any":function(e){var t=e.length-1,n=e[t];Object(r.y)(n)?e[t]=n-1:Object(r.e)(n)&&(e[t]=n.minus(1));try{return o.apply(null,e)}catch(e){throw la(e)}}})}),{isTransformFunction:!0}),vc=Object(s.a)("std",["typed","sqrt","variance"],(function(e){var t=e.typed,n=e.sqrt,i=e.variance,o=Ls({typed:t,sqrt:n,variance:i});return t("std",{"...any":function(e){var t;2<=e.length&&Object(r.i)(e[0])&&(t=e[1],Object(r.y)(t)?e[1]=t-1:Object(r.e)(t)&&(e[1]=t.minus(1)));try{return o.apply(null,e)}catch(e){throw la(e)}}})}),{isTransformFunction:!0}),yc=Object(s.a)("sum",["typed","config","add","numeric"],(function(e){var t=e.typed,n=e.config,i=e.add,o=e.numeric,a=Ms({typed:t,config:n,add:i,numeric:o});return t("sum",{"...any":function(e){var t;2===e.length&&Object(r.i)(e[0])&&(t=e[1],Object(r.y)(t)?e[1]=t-1:Object(r.e)(t)&&(e[1]=t.minus(1)));try{return a.apply(null,e)}catch(e){throw la(e)}}})}),{isTransformFunction:!0}),bc="variance",xc=Object(s.a)(bc,["typed","add","subtract","multiply","divide","apply","isNaN"],(function(e){var t=e.typed,n=e.add,i=e.subtract,o=e.multiply,a=e.divide,s=e.apply,u=e.isNaN,l=Is({typed:t,add:n,subtract:i,multiply:o,divide:a,apply:s,isNaN:u});return t(bc,{"...any":function(e){var t;2<=e.length&&Object(r.i)(e[0])&&(t=e[1],Object(r.y)(t)?e[1]=t-1:Object(r.e)(t)&&(e[1]=t.minus(1)));try{return l.apply(null,e)}catch(e){throw la(e)}}})}),{isTransformFunction:!0})},function(e,t,n){"use strict";n.r(t),n.d(t,"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(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var f={epsilon:1e-12,matrix:"Matrix",number:"number",precision:64,predictable:!1,randomSeed:null},h=["Matrix","Array"],d=["number","BigNumber","Fraction"];function p(e,t,n){var r,i;void 0!==e[t]&&(r=n,i=e[t],-1===r.indexOf(i))&&console.warn('Warning: Unknown value "'+e[t]+'" for configuration option "'+t+'". Available options: '+n.map((function(e){return JSON.stringify(e)})).join(", ")+".")}var m=n(6),g=n(9);function v(){return(v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function y(e,t){var n=v({},f,t);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(e){if(e){var t=Object(r.i)(x,r.a);p(e,"matrix",h),p(e,"number",d),Object(r.b)(x,e);var n=Object(r.i)(x,r.a),i=Object(r.i)(e,r.a);return w("config",n,t,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(e){Object.defineProperty(S,e,{get:function(){return x[e]},enumerable:!0,configurable:!0})})),S),_.expression={transform:{},mathWithTransform:{config:_.config}};var O={},N=function(e,t,n,i){function o(e,t){t&&"function"==typeof t.transform?(n.expression.transform[e]=t.transform,d(e)&&(n.expression.mathWithTransform[e]=t.transform)):(delete n.expression.transform[e],d(e)&&(n.expression.mathWithTransform[e]=t))}function f(e){delete n.expression.transform[e],d(e)?n.expression.mathWithTransform[e]=n[e]:delete n.expression.mathWithTransform[e]}function h(e){return"function"==typeof e&&"object"===c(e.signatures)}function d(e){return!Object(r.f)(g,e)}function p(e){return!(-1!==e.fn.indexOf(".")||Object(r.f)(g,e.fn)||e.meta&&e.meta.isClass)}function m(e){return void 0!==e&&void 0!==e.meta&&!0===e.meta.isTransformFunction}var g={expression:!0,type:!0,docs:!0,error:!0,json:!0,chain:!0};return function(t,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 e(t,n,i){if(Array.isArray(n))n.forEach((function(n){return e(t,n)}));else if("object"===c(n))for(var o in n)Object(r.f)(n,o)&&e(t,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)(t,a)&&t[a]!==n&&!d.silent)throw new Error('Cannot import "'+a+'" twice');t[a]=n}else if(!d.silent)throw new TypeError("Factory, Object, or Array expected")}(y,t),y)if(Object(r.f)(y,b)){var x=y[b];if(Object(s.b)(x))!function(t,o){var a=2<arguments.length&&void 0!==arguments[2]?arguments[2]:t.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={};t.dependencies.map(s.c).forEach((function(e){if(Object(u.b)(e,"."))throw new Error("Factory dependency should not contain a nested path. Name: "+JSON.stringify(e));"math"===e?r.math=n:"mathWithTransform"===e?r.mathWithTransform=n.expression.mathWithTransform:"classes"===e?r.classes=n:r[e]=n[e]}));var i=t(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 e(g,i);if(o.silent)return g;throw new Error('Cannot import "'+a+'": already exists')}var c=m(t)?n.expression.transform:n,d=a in n.expression.transform,g=Object(r.f)(c,a)?c[a]:void 0;t.meta&&!1===t.meta.lazy?c[a]=l():Object(r.h)(c,a,l),g&&d?f(a):(m(t)||p(t))&&Object(r.h)(n.expression.mathWithTransform,a,(function(){return c[a]})),i[a]=t,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(t,r,a){if(a.wrap&&"function"==typeof r&&(r=function(e){function t(){for(var t=[],r=0,i=arguments.length;r<i;r++){var o=arguments[r];t[r]=o&&o.valueOf()}return e.apply(n,t)}return e.transform&&(t.transform=e.transform),t}(r)),!function(e){return"function"==typeof e&&"string"==typeof e.signature}(r)||(r=e(t,function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},r.signature,r))),h(n[t])&&h(r))return r=a.override?e(t,r.signatures):e(n[t],r),n[t]=r,delete i[t],o(t,r),n.emit("import",t,(function(){return r}));if(void 0===n[t]||a.override)return n[t]=r,delete i[t],o(t,r),n.emit("import",t,(function(){return r}));if(!a.silent)throw new Error('Cannot import "'+t+'": already exists')}(b,x,d);else if(!d.silent)throw new TypeError("Factory, Object, or Array expected")}}}((function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return _.typed.apply(_.typed,t)}),0,_,O);return _.import=N,_.on("config",(function(){Object(r.k)(O).forEach((function(e){e&&e.meta&&e.meta.recreateOnConfigChange&&N(e,{override:!0})}))})),_.create=y.bind(null,e),_.factory=s.a,_.import(Object(r.k)(Object(r.c)(e))),_.ArgumentsError=l.a,_.DimensionError=m.a,_.IndexError=g.a,_}}],e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(r,i,function(e){return t[e]}.bind(null,i));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},e.p="",e(e.s=18);function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var t,n}()},30845:function(e,t){"use strict";var n=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function r(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(!((i=e[r])===(o=t[r])||n(i)&&n(o)))return!1;var i,o;return!0}t.Z=function(e,t){var n;void 0===t&&(t=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&&t(r,o)||(i=e.apply(this,r),a=!0,n=this,o=r),i}}},70743:function(e){!function(t){var n,r,i=!1;function o(e){if("undefined"!=typeof document&&!i){var t=document.documentElement;r=window.pageYOffset,document.documentElement.scrollHeight>window.innerHeight?t.style.width="calc(100% - "+function(){if(void 0!==n)return n;var e=document.documentElement,t=document.createElement("div");return t.setAttribute("style","width:99px;height:99px;position:absolute;top:-9999px;overflow:scroll;"),e.appendChild(t),n=t.offsetWidth-t.clientWidth,e.removeChild(t),n}()+"px)":t.style.width="100%",t.style.position="fixed",t.style.top=-r+"px",t.style.overflow="hidden",i=!0}}function a(){if("undefined"!=typeof document&&i){var e=document.documentElement;e.style.width="",e.style.position="",e.style.top="",e.style.overflow="",window.scroll(0,r),i=!1}}var s={on:o,off:a,toggle:function(){i?a():o()}};void 0!==e.exports?e.exports=s:t.noScroll=s}(this)},43105:function(e,t){var n,r;"undefined"!=typeof self&&self,n=function(){var e,t;return t={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(e){var t=e%10,n={1:"st",2:"nd",3:"rd"};return 1!==Math.floor(e%100/10)&&n[t]?n[t]:"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(e,t){return parseInt(e,t||10)},compare:function(e,t){return"string"==typeof e&&"string"==typeof t&&e.toLowerCase()===t.toLowerCase()},lpad:function(e,n,r){var i=e.toString();return r=r||"0",i.length<n?t.lpad(r+i,n):i},merge:function(e){var n,r;for(e=e||{},n=1;n<arguments.length;n++)if(r=arguments[n])for(var i in r)r.hasOwnProperty(i)&&("object"==typeof r[i]?t.merge(e[i],r[i]):e[i]=r[i]);return e},getIndex:function(e,t){for(var n=0;n<t.length;n++)if(t[n].toLowerCase()===e.toLowerCase())return n;return-1}},(e=function(e){var n=this,r=t.merge(t.defaults,e);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:e,getMonth:function(e){var n;return 0===(n=t.getIndex(e,this.dateSettings.monthsShort)+1)&&(n=t.getIndex(e,this.dateSettings.months)+1),n},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=t.getInt(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(o=r.length-1;o>=0;o--)"S"===r[o]&&r.splice(o,1);for(i=e.replace(d.separators,"\0").split("\0"),o=0;o<i.length;o++)switch(a=i[o],s=t.getInt(a),r[o]){case"y":case"Y":if(!s)return null;f=a.length,v.year=2===f?t.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=t.compare(h,g.meridiem[0])?0:t.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(e,n){if("string"!=typeof e)return e;var r,i,o,a,s,u,l=e.replace(this.separators,"\0").split("\0"),c=n.match(this.validParts),f=new Date,h=0;if(!/^[djmn]/g.test(c[0]))return e;for(o=0;o<l.length;o++){if(h=2,s=l[o],u=t.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=t.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(e,n){var r,i=this,o=i.dateSettings,a=/\\?(.?)/gi,s=function(e,t){return r[e]?r[e]():t};return r={d:function(){return t.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 e=new Date(r.Y(),r.n()-1,r.j()),n=new Date(r.Y(),0,1);return Math.round((e-n)/t.DAY)},W:function(){var e=new Date(r.Y(),r.n()-1,r.j()-r.N()+3),n=new Date(e.getFullYear(),0,4);return t.lpad(1+Math.round((e-n)/t.DAY/7),2)},F:function(){return o.months[n.getMonth()]},m:function(){return t.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 e=r.Y();return e%4==0&&e%100!=0||e%400==0?1:0},o:function(){var e=r.n(),t=r.W();return r.Y()+(12===e&&t<9?1:1===e&&t>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 e=r.G()<12?0:1;return o.meridiem[e]},B:function(){var e=n.getUTCHours()*t.HOUR,r=60*n.getUTCMinutes(),i=n.getUTCSeconds();return t.lpad(Math.floor((e+r+i+t.HOUR)/86.4)%1e3,3)},g:function(){return r.G()%12||12},G:function(){return n.getHours()},h:function(){return t.lpad(r.g(),2)},H:function(){return t.lpad(r.G(),2)},i:function(){return t.lpad(n.getMinutes(),2)},s:function(){return t.lpad(n.getSeconds(),2)},u:function(){return t.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 e=n.getTimezoneOffset(),r=Math.abs(e);return(e>0?"-":"+")+t.lpad(100*Math.floor(r/60)+r%60,4)},P:function(){var e=r.O();return e.substr(0,3)+":"+e.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(e,e)},formatDate:function(e,n){var r,i,o,a,s,u=this,l="";if("string"==typeof e&&!(e=u.parseDate(e,n)))return null;if(e 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,e),r!==o-1&&u.intParts.test(s)&&"S"===n.charAt(r+1)&&(i=t.getInt(a)||0,a+=u.dateSettings.ordinal(i)),l+=a));return l}return""}},e},void 0===(r=n.apply(t,[]))||(e.exports=r)},76095:function(e){var t;"undefined"!=typeof self&&self,t=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=109)}([function(e,t,n){"use strict";Object.defineProperty(t,"__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}};t.default=g},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=this;return t="[Parchment] "+t,(n=e.call(this,t)||this).message=t,n.name=n.constructor.name,n}return i(t,e),t}(Error);t.ParchmentError=o;var a,s={},u={},l={},c={};function f(e,t){var n;if(void 0===t&&(t=a.ANY),"string"==typeof e)n=c[e]||s[e];else if(e instanceof Text||e.nodeType===Node.TEXT_NODE)n=c.text;else if("number"==typeof e)e&a.LEVEL&a.BLOCK?n=c.block:e&a.LEVEL&a.INLINE&&(n=c.inline);else if(e instanceof HTMLElement){var r=(e.getAttribute("class")||"").split(/\s+/);for(var i in r)if(n=u[r[i]])break;n=n||l[e.tagName]}return null==n?null:t&a.LEVEL&n.scope&&t&a.TYPE&n.scope?n:null}t.DATA_KEY="__blot",function(e){e[e.TYPE=3]="TYPE",e[e.LEVEL=12]="LEVEL",e[e.ATTRIBUTE=13]="ATTRIBUTE",e[e.BLOT=14]="BLOT",e[e.INLINE=7]="INLINE",e[e.BLOCK=11]="BLOCK",e[e.BLOCK_BLOT=10]="BLOCK_BLOT",e[e.INLINE_BLOT=6]="INLINE_BLOT",e[e.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",e[e.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",e[e.ANY=15]="ANY"}(a=t.Scope||(t.Scope={})),t.create=function(e,t){var n=f(e);if(null==n)throw new o("Unable to create "+e+" blot");var r=n,i=e instanceof Node||e.nodeType===Node.TEXT_NODE?e:r.create(t);return new r(i,t)},t.find=function e(n,r){return void 0===r&&(r=!1),null==n?null:null!=n[t.DATA_KEY]?n[t.DATA_KEY].blot:r?e(n.parentNode,r):null},t.query=f,t.register=function e(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(t.length>1)return t.map((function(t){return e(t)}));var r=t[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(e){return e.toUpperCase()})):r.tagName=r.tagName.toUpperCase(),(Array.isArray(r.tagName)?r.tagName:[r.tagName]).forEach((function(e){null!=l[e]&&null!=r.className||(l[e]=r)})))),r}},function(e,t,n){var r=n(51),i=n(11),o=n(3),a=n(20),s=String.fromCharCode(0),u=function(e){Array.isArray(e)?this.ops=e:null!=e&&Array.isArray(e.ops)?this.ops=e.ops:this.ops=[]};u.prototype.insert=function(e,t){var n={};return 0===e.length?this:(n.insert=e,null!=t&&"object"==typeof t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n))},u.prototype.delete=function(e){return e<=0?this:this.push({delete:e})},u.prototype.retain=function(e,t){if(e<=0)return this;var n={retain:e};return null!=t&&"object"==typeof t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n)},u.prototype.push=function(e){var t=this.ops.length,n=this.ops[t-1];if(e=o(!0,{},e),"object"==typeof n){if("number"==typeof e.delete&&"number"==typeof n.delete)return this.ops[t-1]={delete:n.delete+e.delete},this;if("number"==typeof n.delete&&null!=e.insert&&(t-=1,"object"!=typeof(n=this.ops[t-1])))return this.ops.unshift(e),this;if(i(e.attributes,n.attributes)){if("string"==typeof e.insert&&"string"==typeof n.insert)return this.ops[t-1]={insert:n.insert+e.insert},"object"==typeof e.attributes&&(this.ops[t-1].attributes=e.attributes),this;if("number"==typeof e.retain&&"number"==typeof n.retain)return this.ops[t-1]={retain:n.retain+e.retain},"object"==typeof e.attributes&&(this.ops[t-1].attributes=e.attributes),this}}return t===this.ops.length?this.ops.push(e):this.ops.splice(t,0,e),this},u.prototype.chop=function(){var e=this.ops[this.ops.length-1];return e&&e.retain&&!e.attributes&&this.ops.pop(),this},u.prototype.filter=function(e){return this.ops.filter(e)},u.prototype.forEach=function(e){this.ops.forEach(e)},u.prototype.map=function(e){return this.ops.map(e)},u.prototype.partition=function(e){var t=[],n=[];return this.forEach((function(r){(e(r)?t:n).push(r)})),[t,n]},u.prototype.reduce=function(e,t){return this.ops.reduce(e,t)},u.prototype.changeLength=function(){return this.reduce((function(e,t){return t.insert?e+a.length(t):t.delete?e-t.delete:e}),0)},u.prototype.length=function(){return this.reduce((function(e,t){return e+a.length(t)}),0)},u.prototype.slice=function(e,t){e=e||0,"number"!=typeof t&&(t=1/0);for(var n=[],r=a.iterator(this.ops),i=0;i<t&&r.hasNext();){var o;i<e?o=r.next(e-i):(o=r.next(t-i),n.push(o)),i+=a.length(o)}return new u(n)},u.prototype.compose=function(e){var t=a.iterator(this.ops),n=a.iterator(e.ops),r=[],o=n.peek();if(null!=o&&"number"==typeof o.retain&&null==o.attributes){for(var s=o.retain;"insert"===t.peekType()&&t.peekLength()<=s;)s-=t.peekLength(),r.push(t.next());o.retain-s>0&&n.next(o.retain-s)}for(var l=new u(r);t.hasNext()||n.hasNext();)if("insert"===n.peekType())l.push(n.next());else if("delete"===t.peekType())l.push(t.next());else{var c=Math.min(t.peekLength(),n.peekLength()),f=t.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(t.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(e){var t=new u(this.ops.slice());return e.ops.length>0&&(t.push(e.ops[0]),t.ops=t.ops.concat(e.ops.slice(1))),t},u.prototype.diff=function(e,t){if(this.ops===e.ops)return new u;var n=[this,e].map((function(t){return t.map((function(n){if(null!=n.insert)return"string"==typeof n.insert?n.insert:s;throw new Error("diff() called "+(t===e?"on":"with")+" non-document")})).join("")})),o=new u,l=r(n[0],n[1],t),c=a.iterator(this.ops),f=a.iterator(e.ops);return l.forEach((function(e){for(var t=e[1].length;t>0;){var n=0;switch(e[0]){case r.INSERT:n=Math.min(f.peekLength(),t),o.push(f.next(n));break;case r.DELETE:n=Math.min(t,c.peekLength()),c.next(n),o.delete(n);break;case r.EQUAL:n=Math.min(c.peekLength(),f.peekLength(),t);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)}t-=n}})),o.chop()},u.prototype.eachLine=function(e,t){t=t||"\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(t,s)-s:-1;if(l<0)r.push(n.next());else if(l>0)r.push(n.next(l));else{if(!1===e(r,n.next(1).attributes||{},i))return;i+=1,r=new u}}r.length()>0&&e(r,{},i)},u.prototype.transform=function(e,t){if(t=!!t,"number"==typeof e)return this.transformPosition(e,t);for(var n=a.iterator(this.ops),r=a.iterator(e.ops),i=new u;n.hasNext()||r.hasNext();)if("insert"!==n.peekType()||!t&&"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,t))}else i.retain(a.length(n.next()));return i.chop()},u.prototype.transformPosition=function(e,t){t=!!t;for(var n=a.iterator(this.ops),r=0;n.hasNext()&&r<=e;){var i=n.peekLength(),o=n.peekType();n.next(),"delete"!==o?("insert"===o&&(r<e||!t)&&(e+=i),r+=i):e-=Math.min(i,e-r)}return e},e.exports=u},function(e,t){"use strict";var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,a=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},s=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var t,i=n.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(t in e);return void 0===t||n.call(e,t)},u=function(e,t){i&&"__proto__"===t.name?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if("__proto__"===t){if(!n.call(e,t))return;if(o)return o(e,t).value}return e[t]};e.exports=function e(){var t,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!=(t=arguments[h]))for(n in t)r=l(f,n),f!==(i=l(t,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:e(p,c,i)})):void 0!==i&&u(f,{name:n,newValue:i}));return f}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BlockEmbed=t.bubbleFormats=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(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(e){return e&&e.__esModule?e:{default:e}}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var m=function(e){function t(){return h(this,t),d(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return p(t,e),r(t,[{key:"attach",value:function(){i(t.prototype.__proto__||Object.getPrototypeOf(t.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(e,t){var n=s.default.query(e,s.default.Scope.BLOCK_ATTRIBUTE);null!=n&&this.attributes.attribute(n,t)}},{key:"formatAt",value:function(e,t,n,r){this.format(n,r)}},{key:"insertAt",value:function(e,n,r){if("string"==typeof n&&n.endsWith("\n")){var o=s.default.create(g.blotName);this.parent.insertBefore(o,0===e?this:this.next),o.insertAt(0,n.slice(0,-1))}else i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,r)}}]),t}(s.default.Embed);m.scope=s.default.Scope.BLOCK_BLOT;var g=function(e){function t(e){h(this,t);var n=d(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.cache={},n}return p(t,e),r(t,[{key:"delta",value:function(){return null==this.cache.delta&&(this.cache.delta=this.descendants(s.default.Leaf).reduce((function(e,t){return 0===t.length()?e:e.insert(t.value(),v(t))}),new a.default).insert("\n",v(this))),this.cache.delta}},{key:"deleteAt",value:function(e,n){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"deleteAt",this).call(this,e,n),this.cache={}}},{key:"formatAt",value:function(e,n,r,o){n<=0||(s.default.query(r,s.default.Scope.BLOCK)?e+n===this.length()&&this.format(r,o):i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,Math.min(n,this.length()-e-1),r,o),this.cache={})}},{key:"insertAt",value:function(e,n,r){if(null!=r)return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,r);if(0!==n.length){var o=n.split("\n"),a=o.shift();a.length>0&&(e<this.length()-1||null==this.children.tail?i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,Math.min(e,this.length()-1),a):this.children.tail.insertAt(this.children.tail.length(),a),this.cache={});var s=this;o.reduce((function(e,t){return(s=s.split(e,!0)).insertAt(0,t),t.length}),e+a.length)}}},{key:"insertBefore",value:function(e,n){var r=this.children.head;i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n),r instanceof u.default&&r.remove(),this.cache={}}},{key:"length",value:function(){return null==this.cache.length&&(this.cache.length=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"length",this).call(this)+1),this.cache.length}},{key:"moveChildren",value:function(e,n){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"moveChildren",this).call(this,e,n),this.cache={}}},{key:"optimize",value:function(e){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e),this.cache={}}},{key:"path",value:function(e){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"path",this).call(this,e,!0)}},{key:"removeChild",value:function(e){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"removeChild",this).call(this,e),this.cache={}}},{key:"split",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(n&&(0===e||e>=this.length()-1)){var r=this.clone();return 0===e?(this.parent.insertBefore(r,this),this):(this.parent.insertBefore(r,this.next),r)}var o=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"split",this).call(this,e,n);return this.cache={},o}}]),t}(s.default.Block);function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null==e?t:("function"==typeof e.formats&&(t=(0,o.default)(t,e.formats())),null==e.parent||"scroll"==e.parent.blotName||e.parent.statics.scope!==e.statics.scope?t:v(e.parent,t))}g.blotName="block",g.tagName="P",g.defaultChild="break",g.allowedChildren=[l.default,s.default.Embed,c.default],t.bubbleFormats=v,t.BlockEmbed=m,t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.overload=t.expandConfig=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();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(e){return e&&e.__esModule?e:{default:e}}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=(0,p.default)("quill"),b=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=x(t,r),this.container=this.options.container,null==this.container)return y.error("Invalid Quill container",t);this.options.debug&&e.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(e){e===u.default.events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())})),this.emitter.on(u.default.events.SCROLL_UPDATE,(function(e,t){var r=n.selection.lastRange,i=r&&0===r.length?r.index:void 0;w.call(n,(function(){return n.editor.update(null,t,i)}),e)}));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(e,null,[{key:"debug",value:function(e){!0===e&&(e="log"),p.default.level(e)}},{key:"find",value:function(e){return e.__quill||c.default.find(e)}},{key:"import",value:function(e){return null==this.imports[e]&&y.error("Cannot import "+e+". Are you sure it was registered?"),this.imports[e]}},{key:"register",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!=typeof e){var i=e.attrName||e.blotName;"string"==typeof i?this.register("formats/"+i,e,t):Object.keys(e).forEach((function(r){n.register(r,e[r],t)}))}else null==this.imports[e]||r||y.warn("Overwriting "+e+" with",t),this.imports[e]=t,(e.startsWith("blots/")||e.startsWith("formats/"))&&"abstract"!==t.blotName?c.default.register(t):e.startsWith("modules")&&"function"==typeof t.register&&t.register()}}]),o(e,[{key:"addContainer",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof e){var n=e;(e=document.createElement("div")).classList.add(n)}return this.container.insertBefore(e,t),e}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(e,t,n){var r=this,o=_(e,t,n),a=i(o,4);return e=a[0],t=a[1],n=a[3],w.call(this,(function(){return r.editor.deleteText(e,t)}),n,e,-1*t)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(e),this.container.classList.toggle("ql-disabled",!e)}},{key:"focus",value:function(){var e=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=e,this.scrollIntoView()}},{key:"format",value:function(e,t){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(e,c.default.Scope.BLOCK))i=n.editor.formatLine(r.index,r.length,v({},e,t));else{if(0===r.length)return n.selection.format(e,t),i;i=n.editor.formatText(r.index,r.length,v({},e,t))}return n.setSelection(r,u.default.sources.SILENT),i}),r)}},{key:"formatLine",value:function(e,t,n,r,o){var a,s=this,u=_(e,t,n,r,o),l=i(u,4);return e=l[0],t=l[1],a=l[2],o=l[3],w.call(this,(function(){return s.editor.formatLine(e,t,a)}),o,e,0)}},{key:"formatText",value:function(e,t,n,r,o){var a,s=this,u=_(e,t,n,r,o),l=i(u,4);return e=l[0],t=l[1],a=l[2],o=l[3],w.call(this,(function(){return s.editor.formatText(e,t,a)}),o,e,0)}},{key:"getBounds",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;t="number"==typeof e?this.selection.getBounds(e,n):this.selection.getBounds(e.index,e.length);var r=this.container.getBoundingClientRect();return{bottom:t.bottom-r.top,height:t.height,left:t.left-r.left,right:t.right-r.left,top:t.top-r.top,width:t.width}}},{key:"getContents",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-e,n=_(e,t),r=i(n,2);return e=r[0],t=r[1],this.editor.getContents(e,t)}},{key:"getFormat",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof e?this.editor.getFormat(e,t):this.editor.getFormat(e.index,e.length)}},{key:"getIndex",value:function(e){return e.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(e){return this.scroll.leaf(e)}},{key:"getLine",value:function(e){return this.scroll.line(e)}},{key:"getLines",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof e?this.scroll.lines(e.index,e.length):this.scroll.lines(e,t)}},{key:"getModule",value:function(e){return this.theme.modules[e]}},{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 e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-e,n=_(e,t),r=i(n,2);return e=r[0],t=r[1],this.editor.getText(e,t)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(t,n,r){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.sources.API;return w.call(this,(function(){return i.editor.insertEmbed(t,n,r)}),o,t)}},{key:"insertText",value:function(e,t,n,r,o){var a,s=this,u=_(e,0,n,r,o),l=i(u,4);return e=l[0],a=l[2],o=l[3],w.call(this,(function(){return s.editor.insertText(e,t,a)}),o,e,t.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(e,t,n){this.clipboard.dangerouslyPasteHTML(e,t,n)}},{key:"removeFormat",value:function(e,t,n){var r=this,o=_(e,t,n),a=i(o,4);return e=a[0],t=a[1],n=a[3],w.call(this,(function(){return r.editor.removeFormat(e,t)}),n,e)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.sources.API;return w.call(this,(function(){e=new a.default(e);var n=t.getLength(),r=t.editor.deleteText(0,n),i=t.editor.applyDelta(e),o=i.ops[i.ops.length-1];return null!=o&&"string"==typeof o.insert&&"\n"===o.insert[o.insert.length-1]&&(t.editor.deleteText(t.getLength()-1,1),i.delete(1)),r.compose(i)}),n)}},{key:"setSelection",value:function(t,n,r){if(null==t)this.selection.setRange(null,n||e.sources.API);else{var o=_(t,n,r),a=i(o,4);t=a[0],n=a[1],r=a[3],this.selection.setRange(new f.Range(t,n),r),r!==u.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.sources.API,n=(new a.default).insert(e);return this.setContents(n,t)}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u.default.sources.USER,t=this.scroll.update(e);return this.selection.update(e),t}},{key:"updateContents",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.sources.API;return w.call(this,(function(){return e=new a.default(e),t.editor.applyDelta(e,n)}),n,!0)}}]),e}();function x(e,t){if((t=(0,d.default)(!0,{container:e,modules:{clipboard:!0,keyboard:!0,history:!0}},t)).theme&&t.theme!==b.DEFAULTS.theme){if(t.theme=b.import("themes/"+t.theme),null==t.theme)throw new Error("Invalid theme "+t.theme+". Did you register it?")}else t.theme=m.default;var n=(0,d.default)(!0,{},t.theme.DEFAULTS);[n,t].forEach((function(e){e.modules=e.modules||{},Object.keys(e.modules).forEach((function(t){!0===e.modules[t]&&(e.modules[t]={})}))}));var r=Object.keys(n.modules).concat(Object.keys(t.modules)).reduce((function(e,t){var n=b.import("modules/"+t);return null==n?y.error("Cannot load "+t+" module. Are you sure you registered it?"):e[t]=n.DEFAULTS||{},e}),{});return null!=t.modules&&t.modules.toolbar&&t.modules.toolbar.constructor!==Object&&(t.modules.toolbar={container:t.modules.toolbar}),t=(0,d.default)(!0,{},b.DEFAULTS,{modules:r},n,t),["bounds","container","scrollingContainer"].forEach((function(e){"string"==typeof t[e]&&(t[e]=document.querySelector(t[e]))})),t.modules=Object.keys(t.modules).reduce((function(e,n){return t.modules[n]&&(e[n]=t.modules[n]),e}),{}),t}function w(e,t,n,r){if(this.options.strict&&!this.isEnabled()&&t===u.default.sources.USER)return new a.default;var i=null==n?null:this.getSelection(),o=this.editor.delta,s=e();if(null!=i&&(!0===n&&(n=i.index),null==r?i=S(i,s,t):0!==r&&(i=S(i,n,r,t)),this.setSelection(i,u.default.sources.SILENT)),s.length()>0){var l,c,f=[u.default.events.TEXT_CHANGE,s,o,t];(l=this.emitter).emit.apply(l,[u.default.events.EDITOR_CHANGE].concat(f)),t!==u.default.sources.SILENT&&(c=this.emitter).emit.apply(c,f)}return s}function _(e,t,n,i,o){var a={};return"number"==typeof e.index&&"number"==typeof e.length?"number"!=typeof t?(o=i,i=n,n=t,t=e.length,e=e.index):(t=e.length,e=e.index):"number"!=typeof t&&(o=i,i=n,n=t,t=0),"object"===(void 0===n?"undefined":r(n))?(a=n,o=i):"string"==typeof n&&(null!=i?a[n]=i:o=n),[e,t,a,o=o||u.default.sources.API]}function S(e,t,n,r){if(null==e)return null;var o=void 0,s=void 0;if(t instanceof a.default){var l=[e.index,e.index+e.length].map((function(e){return t.transformPosition(e,r!==u.default.sources.USER)})),c=i(l,2);o=c[0],s=c[1]}else{var h=[e.index,e.index+e.length].map((function(e){return e<t||e===t&&r===u.default.sources.USER?e:n>=0?e+n:Math.max(t,e+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},t.expandConfig=x,t.overload=_,t.default=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(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(e){return e&&e.__esModule?e:{default:e}}var u=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"formatAt",value:function(e,n,r,o){if(t.compare(this.statics.blotName,r)<0&&a.default.query(r,a.default.Scope.BLOT)){var s=this.isolate(e,n);o&&s.wrap(r,o)}else i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,n,r,o)}},{key:"optimize",value:function(e){if(i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e),this.parent instanceof t&&t.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(e,n){var r=t.order.indexOf(e),i=t.order.indexOf(n);return r>=0||i>=0?r-i:e===n?0:e<n?-1:1}}]),t}(a.default.Inline);u.allowedChildren=[u,a.default.Embed,o.default],u.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=n(0))&&r.__esModule?r:{default:r}).default.Text);t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(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(e){return e&&e.__esModule?e:{default:e}}var s=(0,a(n(10)).default)("quill:events");["selectionchange","mousedown","mouseup","click"].forEach((function(e){document.addEventListener(e,(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];[].slice.call(document.querySelectorAll(".ql-container")).forEach((function(e){var n;e.__quill&&e.__quill.emitter&&(n=e.__quill.emitter).handleDOM.apply(n,t)}))}))}));var u=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.listeners={},e.on("error",s.error),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"emit",value:function(){s.log.apply(s,arguments),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];(this.listeners[e.type]||[]).forEach((function(t){var r=t.node,i=t.handler;(e.target===r||r.contains(e.target))&&i.apply(void 0,[e].concat(n))}))}},{key:"listenDOM",value:function(e,t,n){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push({node:t,handler:n})}}]),t}(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"},t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.quill=t,this.options=n};r.DEFAULTS={},t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=["error","warn","log","info"],i="warn";function o(e){if(r.indexOf(e)<=r.indexOf(i)){for(var t,n=arguments.length,o=Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];(t=console)[e].apply(t,o)}}function a(e){return r.reduce((function(t,n){return t[n]=o.bind(console,n,e),t}),{})}o.level=a.level=function(e){i=e},t.default=a},function(e,t,n){var r=Array.prototype.slice,i=n(52),o=n(53),a=e.exports=function(e,t,n){return n||(n={}),e===t||(e instanceof Date&&t instanceof Date?e.getTime()===t.getTime():!e||!t||"object"!=typeof e&&"object"!=typeof t?n.strict?e===t:e==t:function(e,t,n){var l,c;if(s(e)||s(t))return!1;if(e.prototype!==t.prototype)return!1;if(o(e))return!!o(t)&&(e=r.call(e),t=r.call(t),a(e,t,n));if(u(e)){if(!u(t))return!1;if(e.length!==t.length)return!1;for(l=0;l<e.length;l++)if(e[l]!==t[l])return!1;return!0}try{var f=i(e),h=i(t)}catch(e){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(e[c],t[c],n))return!1;return typeof e==typeof t}(e,t,n))};function s(e){return null==e}function u(e){return!(!e||"object"!=typeof e||"number"!=typeof e.length||"function"!=typeof e.copy||"function"!=typeof e.slice||e.length>0&&"number"!=typeof e[0])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=function(){function e(e,t,n){void 0===n&&(n={}),this.attrName=e,this.keyName=t;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 e.keys=function(e){return[].map.call(e.attributes,(function(e){return e.name}))},e.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(e.setAttribute(this.keyName,t),!0)},e.prototype.canAdd=function(e,t){return null!=r.query(e,r.Scope.BLOT&(this.scope|r.Scope.TYPE))&&(null==this.whitelist||("string"==typeof t?this.whitelist.indexOf(t.replace(/["']/g,""))>-1:this.whitelist.indexOf(t)>-1))},e.prototype.remove=function(e){e.removeAttribute(this.keyName)},e.prototype.value=function(e){var t=e.getAttribute(this.keyName);return this.canAdd(e,t)&&t?t:""},e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Code=void 0;var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(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(e){return e&&e.__esModule?e:{default:e}}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var m=function(e){function t(){return h(this,t),d(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return p(t,e),t}(l.default);m.blotName="code",m.tagName="CODE";var g=function(e){function t(){return h(this,t),d(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return p(t,e),i(t,[{key:"delta",value:function(){var e=this,t=this.domNode.textContent;return t.endsWith("\n")&&(t=t.slice(0,-1)),t.split("\n").reduce((function(t,n){return t.insert(n).insert("\n",e.formats())}),new a.default)}},{key:"format",value:function(e,n){if(e!==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(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}},{key:"formatAt",value:function(e,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(e);if(!(o<0||o>=e+n)){var a=this.newlineIndex(e,!0)+1,u=o-a+1,l=this.isolate(a,u),c=l.next;l.format(r,i),c instanceof t&&c.formatAt(0,e-a+n-u,r,i)}}}},{key:"insertAt",value:function(e,t,n){if(null==n){var i=this.descendant(c.default,e),o=r(i,2),a=o[0],s=o[1];a.insertAt(s,t)}}},{key:"length",value:function(){var e=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?e:e+1}},{key:"newlineIndex",value:function(e){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])return this.domNode.textContent.slice(0,e).lastIndexOf("\n");var t=this.domNode.textContent.slice(e).indexOf("\n");return t>-1?e+t:-1}},{key:"optimize",value:function(e){this.domNode.textContent.endsWith("\n")||this.appendChild(s.default.create("text","\n")),o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e);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(e),n.moveChildren(this),n.remove())}},{key:"replace",value:function(e){o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replace",this).call(this,e),[].slice.call(this.domNode.querySelectorAll("*")).forEach((function(e){var t=s.default.find(e);null==t?e.parentNode.removeChild(e):t instanceof s.default.Embed?t.remove():t.unwrap()}))}}],[{key:"create",value:function(e){var n=o(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return n.setAttribute("spellcheck",!1),n}},{key:"formats",value:function(){return!0}}]),t}(u.default);g.blotName="code-block",g.tagName="PRE",g.TAB=" ",t.Code=m,t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),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(e){return e&&e.__esModule?e:{default:e}}var y=/^[ -~]*$/,b=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.scroll=t,this.delta=this.getDelta()}return o(e,[{key:"applyDelta",value:function(e){var t=this,n=!1;this.scroll.update();var o=this.scroll.length();return this.scroll.batchStart(),(e=function(e){return e.reduce((function(e,t){if(1===t.insert){var n=(0,p.default)(t.attributes);return delete n.image,e.insert({image:t.attributes.image},n)}if(null==t.attributes||!0!==t.attributes.list&&!0!==t.attributes.bullet||((t=(0,p.default)(t)).attributes.list?t.attributes.list="ordered":(t.attributes.list="bullet",delete t.attributes.bullet)),"string"==typeof t.insert){var r=t.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return e.insert(r,t.attributes)}return e.push(t)}),new a.default)}(e)).reduce((function(e,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)),e>=o&&!d.endsWith("\n")&&(n=!0),t.scroll.insertAt(e,d);var p=t.scroll.line(e),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 e;t.scroll.insertAt(e,_,a.insert[_])}o+=l}return Object.keys(c).forEach((function(n){t.scroll.formatAt(e,l,n,c[n])})),e+l}),0),e.reduce((function(e,n){return"number"==typeof n.delete?(t.scroll.deleteAt(e,n.delete),e):e+(n.retain||n.insert.length||1)}),0),this.scroll.batchEnd(),this.update(e)}},{key:"deleteText",value:function(e,t){return this.scroll.deleteAt(e,t),this.update((new a.default).retain(e).delete(t))}},{key:"formatLine",value:function(e,t){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(e,Math.max(t,1)),a=t;o.forEach((function(t){var o=t.length();if(t instanceof l.default){var s=e-t.offset(n.scroll),u=t.newlineIndex(s+a)-s+1;t.formatAt(s,u,i,r[i])}else t.format(i,r[i]);a-=o}))}})),this.scroll.optimize(),this.update((new a.default).retain(e).retain(t,(0,p.default)(r)))}},{key:"formatText",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(r).forEach((function(i){n.scroll.formatAt(e,t,i,r[i])})),this.update((new a.default).retain(e).retain(t,(0,p.default)(r)))}},{key:"getContents",value:function(e,t){return this.delta.slice(e,e+t)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce((function(e,t){return e.concat(t.delta())}),new a.default)}},{key:"getFormat",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],r=[];0===t?this.scroll.path(e).forEach((function(e){var t=i(e,1)[0];t instanceof h.default?n.push(t):t instanceof u.default.Leaf&&r.push(t)})):(n=this.scroll.lines(e,t),r=this.scroll.descendants(u.default.Leaf,e,t));var o=[n,r].map((function(e){if(0===e.length)return{};for(var t=(0,f.bubbleFormats)(e.shift());Object.keys(t).length>0;){var n=e.shift();if(null==n)return t;t=x((0,f.bubbleFormats)(n),t)}return t}));return g.default.apply(g.default,o)}},{key:"getText",value:function(e,t){return this.getContents(e,t).filter((function(e){return"string"==typeof e.insert})).map((function(e){return e.insert})).join("")}},{key:"insertEmbed",value:function(e,t,n){return this.scroll.insertAt(e,t,n),this.update((new a.default).retain(e).insert(function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},t,n)))}},{key:"insertText",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t=t.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(e,t),Object.keys(r).forEach((function(i){n.scroll.formatAt(e,t.length,i,r[i])})),this.update((new a.default).retain(e).insert(t,(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 e=this.scroll.children.head;return e.statics.blotName===h.default.blotName&&!(e.children.length>1)&&e.children.head instanceof d.default}},{key:"removeFormat",value:function(e,t){var n=this.getText(e,t),r=this.scroll.line(e+t),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(e,t+c).diff((new a.default).insert(n).concat(f)),d=(new a.default).retain(e).concat(h);return this.applyDelta(d)}},{key:"update",value:function(e){var t=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===t.length&&"characterData"===t[0].type&&t[0].target.data.match(y)&&u.default.find(t[0].target)){var i=u.default.find(t[0].target),o=(0,f.bubbleFormats)(i),s=i.offset(this.scroll),l=t[0].oldValue.replace(c.default.CONTENTS,""),h=(new a.default).insert(l),d=(new a.default).insert(i.value());e=(new a.default).retain(s).concat(h.diff(d,n)).reduce((function(e,t){return t.insert?e.insert(t.insert,o):e.push(t)}),new a.default),this.delta=r.compose(e)}else this.delta=this.getDelta(),e&&(0,m.default)(r.compose(e),this.delta)||(e=r.diff(this.delta,n));return e}}]),e}();function x(e,t){return Object.keys(t).reduce((function(n,r){return null==e[r]||(t[r]===e[r]?n[r]=t[r]:Array.isArray(t[r])?t[r].indexOf(e[r])<0&&(n[r]=t[r].concat([e[r]])):n[r]=[t[r],e[r]]),n}),{})}t.default=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Range=void 0;var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=l(n(0)),a=l(n(21)),s=l(n(11)),u=l(n(8));function l(e){return e&&e.__esModule?e:{default:e}}function c(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var h=(0,l(n(10)).default)("quill:selection"),d=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;f(this,e),this.index=t,this.length=n},p=function(){function e(t,n){var r=this;f(this,e),this.emitter=n,this.scroll=t,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(e,t){e===u.default.events.TEXT_CHANGE&&t.length()>0&&r.update(u.default.sources.SILENT)})),this.emitter.on(u.default.events.SCROLL_BEFORE_UPDATE,(function(){if(r.hasFocus()){var e=r.getNativeRange();null!=e&&e.start.node!==r.cursor.textNode&&r.emitter.once(u.default.events.SCROLL_UPDATE,(function(){try{r.setNativeRange(e.start.node,e.start.offset,e.end.node,e.end.offset)}catch(e){}}))}})),this.emitter.on(u.default.events.SCROLL_OPTIMIZE,(function(e,t){if(t.range){var n=t.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(e,[{key:"handleComposition",value:function(){var e=this;this.root.addEventListener("compositionstart",(function(){e.composing=!0})),this.root.addEventListener("compositionend",(function(){if(e.composing=!1,e.cursor.parent){var t=e.cursor.restore();if(!t)return;setTimeout((function(){e.setNativeRange(t.startNode,t.startOffset,t.endNode,t.endOffset)}),1)}}))}},{key:"handleDragging",value:function(){var e=this;this.emitter.listenDOM("mousedown",document.body,(function(){e.mouseDown=!0})),this.emitter.listenDOM("mouseup",document.body,(function(){e.mouseDown=!1,e.update(u.default.sources.USER)}))}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(e,t){if(null==this.scroll.whitelist||this.scroll.whitelist[e]){this.scroll.update();var n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!o.default.query(e,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(e,t),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.scroll.length();e=Math.min(e,n-1),t=Math.min(e+t,n-1)-e;var i=void 0,o=this.scroll.leaf(e),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(t>0){f.setStart(i,u);var h=this.scroll.leaf(e+t),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 e=document.getSelection();if(null==e||e.rangeCount<=0)return null;var t=e.getRangeAt(0);if(null==t)return null;var n=this.normalizeNative(t);return h.info("getNativeRange",n),n}},{key:"getRange",value:function(){var e=this.getNativeRange();return null==e?[null,null]:[this.normalizedToRange(e),e]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(e){var t=this,n=[[e.start.node,e.start.offset]];e.native.collapsed||n.push([e.end.node,e.end.offset]);var i=n.map((function(e){var n=r(e,2),i=n[0],a=n[1],s=o.default.find(i,!0),u=s.offset(t.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(e){if(!m(this.root,e.startContainer)||!e.collapsed&&!m(this.root,e.endContainer))return null;var t={start:{node:e.startContainer,offset:e.startOffset},end:{node:e.endContainer,offset:e.endOffset},native:e};return[t.start,t.end].forEach((function(e){for(var t=e.node,n=e.offset;!(t instanceof Text)&&t.childNodes.length>0;)if(t.childNodes.length>n)t=t.childNodes[n],n=0;else{if(t.childNodes.length!==n)break;n=(t=t.lastChild)instanceof Text?t.data.length:t.childNodes.length+1}e.node=t,e.offset=n})),t}},{key:"rangeToNative",value:function(e){var t=this,n=e.collapsed?[e.index]:[e.index,e.index+e.length],i=[],o=this.scroll.length();return n.forEach((function(e,n){e=Math.min(o-1,e);var a,s=t.scroll.leaf(e),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(e){var t=this.lastRange;if(null!=t){var n=this.getBounds(t.index,t.length);if(null!=n){var i=this.scroll.length()-1,o=this.scroll.line(Math.min(t.index,i)),a=r(o,1)[0],s=a;if(t.length>0){var u=this.scroll.line(Math.min(t.index+t.length,i));s=r(u,1)[0]}if(null!=a&&null!=s){var l=e.getBoundingClientRect();n.top<l.top?e.scrollTop-=l.top-n.top:n.bottom>l.bottom&&(e.scrollTop+=n.bottom-l.bottom)}}}}},{key:"setNativeRange",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(h.info("setNativeRange",e,t,n,r),null==e||null!=this.root.parentNode&&null!=e.parentNode&&null!=n.parentNode){var o=document.getSelection();if(null!=o)if(null!=e){this.hasFocus()||this.root.focus();var a=(this.getNativeRange()||{}).native;if(null==a||i||e!==a.startContainer||t!==a.startOffset||n!==a.endContainer||r!==a.endOffset){"BR"==e.tagName&&(t=[].indexOf.call(e.parentNode.childNodes,e),e=e.parentNode),"BR"==n.tagName&&(r=[].indexOf.call(n.parentNode.childNodes,n),n=n.parentNode);var s=document.createRange();s.setStart(e,t),s.setEnd(n,r),o.removeAllRanges(),o.addRange(s)}}else o.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(e){var t=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 t&&(n=t,t=!1),h.info("setRange",e),null!=e){var r=this.rangeToNative(e);this.setNativeRange.apply(this,c(r).concat([t]))}else this.setNativeRange(null);this.update(n)}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u.default.sources.USER,t=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)(t,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)(t),e];(c=this.emitter).emit.apply(c,[u.default.events.EDITOR_CHANGE].concat(h)),e!==u.default.sources.SILENT&&(f=this.emitter).emit.apply(f,h)}}}]),e}();function m(e,t){try{t.parentNode}catch(e){return!1}return t instanceof Text&&(t=t.parentNode),e.contains(t)}t.Range=d,t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(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(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"insertInto",value:function(e,n){0===e.children.length?o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertInto",this).call(this,e,n):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),t}(((r=n(0))&&r.__esModule?r:{default:r}).default.Embed);a.blotName="break",a.tagName="BR",t.default=a},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(44),a=n(30),s=n(1),u=function(e){function t(t){var n=e.call(this,t)||this;return n.build(),n}return i(t,e),t.prototype.appendChild=function(e){this.insertBefore(e)},t.prototype.attach=function(){e.prototype.attach.call(this),this.children.forEach((function(e){e.attach()}))},t.prototype.build=function(){var e=this;this.children=new o.default,[].slice.call(this.domNode.childNodes).reverse().forEach((function(t){try{var n=l(t);e.insertBefore(n,e.children.head||void 0)}catch(e){if(e instanceof s.ParchmentError)return;throw e}}))},t.prototype.deleteAt=function(e,t){if(0===e&&t===this.length())return this.remove();this.children.forEachAt(e,t,(function(e,t,n){e.deleteAt(t,n)}))},t.prototype.descendant=function(e,n){var r=this.children.find(n),i=r[0],o=r[1];return null==e.blotName&&e(i)||null!=e.blotName&&i instanceof e?[i,o]:i instanceof t?i.descendant(e,o):[null,-1]},t.prototype.descendants=function(e,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==e.blotName&&e(n)||null!=e.blotName&&n instanceof e)&&i.push(n),n instanceof t&&(i=i.concat(n.descendants(e,r,o))),o-=a})),i},t.prototype.detach=function(){this.children.forEach((function(e){e.detach()})),e.prototype.detach.call(this)},t.prototype.formatAt=function(e,t,n,r){this.children.forEachAt(e,t,(function(e,t,i){e.formatAt(t,i,n,r)}))},t.prototype.insertAt=function(e,t,n){var r=this.children.find(e),i=r[0],o=r[1];if(i)i.insertAt(o,t,n);else{var a=null==n?s.create("text",t):s.create(t,n);this.appendChild(a)}},t.prototype.insertBefore=function(e,t){if(null!=this.statics.allowedChildren&&!this.statics.allowedChildren.some((function(t){return e instanceof t})))throw new s.ParchmentError("Cannot insert "+e.statics.blotName+" into "+this.statics.blotName);e.insertInto(this,t)},t.prototype.length=function(){return this.children.reduce((function(e,t){return e+t.length()}),0)},t.prototype.moveChildren=function(e,t){this.children.forEach((function(n){e.insertBefore(n,t)}))},t.prototype.optimize=function(t){if(e.prototype.optimize.call(this,t),0===this.children.length)if(null!=this.statics.defaultChild){var n=s.create(this.statics.defaultChild);this.appendChild(n),n.optimize(t)}else this.remove()},t.prototype.path=function(e,n){void 0===n&&(n=!1);var r=this.children.find(e,n),i=r[0],o=r[1],a=[[this,e]];return i instanceof t?a.concat(i.path(o,n)):(null!=i&&a.push([i,o]),a)},t.prototype.removeChild=function(e){this.children.remove(e)},t.prototype.replace=function(n){n instanceof t&&n.moveChildren(this),e.prototype.replace.call(this,n)},t.prototype.split=function(e,t){if(void 0===t&&(t=!1),!t){if(0===e)return this;if(e===this.length())return this.next}var n=this.clone();return this.parent.insertBefore(n,this.next),this.children.forEachAt(e,this.length(),(function(e,r,i){e=e.split(r,t),n.appendChild(e)})),n},t.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},t.prototype.update=function(e,t){var n=this,r=[],i=[];e.forEach((function(e){e.target===n.domNode&&"childList"===e.type&&(r.push.apply(r,e.addedNodes),i.push.apply(i,e.removedNodes))})),i.forEach((function(e){if(!(null!=e.parentNode&&"IFRAME"!==e.tagName&&document.body.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var t=s.find(e);null!=t&&(null!=t.domNode.parentNode&&t.domNode.parentNode!==n.domNode||t.detach())}})),r.filter((function(e){return e.parentNode==n.domNode})).sort((function(e,t){return e===t?0:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1})).forEach((function(e){var t=null;null!=e.nextSibling&&(t=s.find(e.nextSibling));var r=l(e);r.next==t&&null!=r.next||(null!=r.parent&&r.parent.removeChild(n),n.insertBefore(r,t||void 0))}))},t}(a.default);function l(e){var t=s.find(e);if(null==t)try{t=s.create(e)}catch(n){t=s.create(s.Scope.INLINE),[].slice.call(e.childNodes).forEach((function(e){t.domNode.appendChild(e)})),e.parentNode&&e.parentNode.replaceChild(t.domNode,e),t.attach()}return t}t.default=u},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(12),a=n(31),s=n(17),u=n(1),l=function(e){function t(t){var n=e.call(this,t)||this;return n.attributes=new a.default(n.domNode),n}return i(t,e),t.formats=function(e){return"string"==typeof this.tagName||(Array.isArray(this.tagName)?e.tagName.toLowerCase():void 0)},t.prototype.format=function(e,t){var n=u.query(e);n instanceof o.default?this.attributes.attribute(n,t):t&&(null==n||e===this.statics.blotName&&this.formats()[e]===t||this.replaceWith(e,t))},t.prototype.formats=function(){var e=this.attributes.values(),t=this.statics.formats(this.domNode);return null!=t&&(e[this.statics.blotName]=t),e},t.prototype.replaceWith=function(t,n){var r=e.prototype.replaceWith.call(this,t,n);return this.attributes.copy(r),r},t.prototype.update=function(t,n){var r=this;e.prototype.update.call(this,t,n),t.some((function(e){return e.target===r.domNode&&"attributes"===e.type}))&&this.attributes.build()},t.prototype.wrap=function(n,r){var i=e.prototype.wrap.call(this,n,r);return i instanceof t&&i.statics.scope===this.statics.scope&&this.attributes.move(i),i},t}(s.default);t.default=l},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(30),a=n(1),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.value=function(e){return!0},t.prototype.index=function(e,t){return this.domNode===e||this.domNode.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(t,1):-1},t.prototype.position=function(e,t){var n=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return e>0&&(n+=1),[this.parent.domNode,n]},t.prototype.value=function(){var e;return(e={})[this.statics.blotName]=this.statics.value(this.domNode)||!0,e},t.scope=a.Scope.INLINE_BLOT,t}(o.default);t.default=s},function(e,t,n){var r=n(11),i=n(3),o={attributes:{compose:function(e,t,n){"object"!=typeof e&&(e={}),"object"!=typeof t&&(t={});var r=i(!0,{},t);for(var o in n||(r=Object.keys(r).reduce((function(e,t){return null!=r[t]&&(e[t]=r[t]),e}),{})),e)void 0!==e[o]&&void 0===t[o]&&(r[o]=e[o]);return Object.keys(r).length>0?r:void 0},diff:function(e,t){"object"!=typeof e&&(e={}),"object"!=typeof t&&(t={});var n=Object.keys(e).concat(Object.keys(t)).reduce((function(n,i){return r(e[i],t[i])||(n[i]=void 0===t[i]?null:t[i]),n}),{});return Object.keys(n).length>0?n:void 0},transform:function(e,t,n){if("object"!=typeof e)return t;if("object"==typeof t){if(!n)return t;var r=Object.keys(t).reduce((function(n,r){return void 0===e[r]&&(n[r]=t[r]),n}),{});return Object.keys(r).length>0?r:void 0}}},iterator:function(e){return new a(e)},length:function(e){return"number"==typeof e.delete?e.delete:"number"==typeof e.retain?e.retain:"string"==typeof e.insert?e.insert.length:1}};function a(e){this.ops=e,this.index=0,this.offset=0}a.prototype.hasNext=function(){return this.peekLength()<1/0},a.prototype.next=function(e){e||(e=1/0);var t=this.ops[this.index];if(t){var n=this.offset,r=o.length(t);if(e>=r-n?(e=r-n,this.index+=1,this.offset=0):this.offset+=e,"number"==typeof t.delete)return{delete:e};var i={};return t.attributes&&(i.attributes=t.attributes),"number"==typeof t.retain?i.retain=e:"string"==typeof t.insert?i.insert=t.insert.substr(n,e):i.insert=t.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 e=this.offset,t=this.index,n=this.next(),r=this.ops.slice(this.index);return this.offset=e,this.index=t,[n].concat(r)}return[]},e.exports=o},function(e,t){var n=function(){"use strict";function e(e,t){return null!=t&&e instanceof t}var t,n,r;try{t=Map}catch(e){t=function(){}}try{n=Set}catch(e){n=function(){}}try{r=Promise}catch(e){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(e(u,t))m=new t;else if(e(u,n))m=new n;else if(e(u,r))m=new r((function(e,t){u.then((function(t){e(o(t,p-1))}),(function(e){t(o(e,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;e(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 e(u,t)&&u.forEach((function(e,t){var n=o(t,p-1),r=o(e,p-1);m.set(n,r)})),e(u,n)&&u.forEach((function(e){var t=o(e,p-1);m.add(t)})),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(e){return Object.prototype.toString.call(e)}function a(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),t}return i.clonePrototype=function(e){if(null===e)return null;var t=function(){};return t.prototype=e,new t},i.__objToStr=o,i.__isDate=function(e){return"object"==typeof e&&"[object Date]"===o(e)},i.__isArray=function(e){return"object"==typeof e&&"[object Array]"===o(e)},i.__isRegExp=function(e){return"object"==typeof e&&"[object RegExp]"===o(e)},i.__getRegExpFlags=a,i}();"object"==typeof e&&e.exports&&(e.exports=n)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(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(e){return e&&e.__esModule?e:{default:e}}function p(e){return e instanceof l.default||e instanceof u.BlockEmbed}var m=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.emitter=n.emitter,Array.isArray(n.whitelist)&&(r.whitelist=n.whitelist.reduce((function(e,t){return e[t]=!0,e}),{})),r.domNode.addEventListener("DOMNodeInserted",(function(){})),r.optimize(),r.enable(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(e,n){var i=this.line(e),a=r(i,2),s=a[0],l=a[1],h=this.line(e+n),d=r(h,1)[0];if(o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"deleteAt",this).call(this,e,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 e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",e)}},{key:"formatAt",value:function(e,n,r,i){(null==this.whitelist||this.whitelist[r])&&(o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,n,r,i),this.optimize())}},{key:"insertAt",value:function(e,n,r){if(null==r||null==this.whitelist||this.whitelist[n]){if(e>=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(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,r);this.optimize()}}},{key:"insertBefore",value:function(e,n){if(e.statics.scope===a.default.Scope.INLINE_BLOT){var r=a.default.create(this.statics.defaultChild);r.appendChild(e),e=r}o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n)}},{key:"leaf",value:function(e){return this.path(e).pop()||[null,-1]}},{key:"line",value:function(e){return e===this.length()?this.line(e-1):this.descendant(p,e)}},{key:"lines",value:function(){return function e(t,n,r){var i=[],o=r;return t.children.forEachAt(n,r,(function(t,n,r){p(t)?i.push(t):t instanceof a.default.Container&&(i=i.concat(e(t,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 e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!0!==this.batch&&(o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e,n),e.length>0&&this.emitter.emit(s.default.events.SCROLL_OPTIMIZE,e,n))}},{key:"path",value:function(e){return o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"path",this).call(this,e).slice(1)}},{key:"update",value:function(e){if(!0!==this.batch){var n=s.default.sources.USER;"string"==typeof e&&(n=e),Array.isArray(e)||(e=this.observer.takeRecords()),e.length>0&&this.emitter.emit(s.default.events.SCROLL_BEFORE_UPDATE,n,e),o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"update",this).call(this,e.concat([])),e.length>0&&this.emitter.emit(s.default.events.SCROLL_UPDATE,n,e)}}}]),t}(a.default.Scroll);m.blotName="scroll",m.className="ql-editor",m.tagName="DIV",m.defaultChild="block",m.allowedChildren=[l.default,u.BlockEmbed,h.default],t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SHORTKEY=t.default=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),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(e){return e&&e.__esModule?e:{default:e}}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v=(0,d.default)("quill:keyboard"),y=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",b=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.bindings={},Object.keys(r.options.bindings).forEach((function(t){("list autofill"!==t||null==e.scroll.whitelist||e.scroll.whitelist.list)&&r.options.bindings[t]&&r.addBinding(r.options.bindings[t])})),r.addBinding({key:t.keys.ENTER,shiftKey:null},O),r.addBinding({key:t.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},(function(){})),/Firefox/i.test(navigator.userAgent)?(r.addBinding({key:t.keys.BACKSPACE},{collapsed:!0},w),r.addBinding({key:t.keys.DELETE},{collapsed:!0},_)):(r.addBinding({key:t.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},w),r.addBinding({key:t.keys.DELETE},{collapsed:!0,suffix:/^.?$/},_)),r.addBinding({key:t.keys.BACKSPACE},{collapsed:!1},S),r.addBinding({key:t.keys.DELETE},{collapsed:!1},S),r.addBinding({key:t.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},w),r.listen(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,null,[{key:"match",value:function(e,t){return t=C(t),!["altKey","ctrlKey","metaKey","shiftKey"].some((function(n){return!!t[n]!==e[n]&&null!==t[n]}))&&t.key===(e.which||e.keyCode)}}]),o(t,[{key:"addBinding",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=C(e);if(null==r||null==r.key)return v.warn("Attempted to add invalid keyboard binding",r);"function"==typeof t&&(t={handler:t}),"function"==typeof n&&(n={handler:n}),r=(0,u.default)(r,t,n),this.bindings[r.key]=this.bindings[r.key]||[],this.bindings[r.key].push(r)}},{key:"listen",value:function(){var e=this;this.quill.root.addEventListener("keydown",(function(n){if(!n.defaultPrevented){var o=n.which||n.keyCode,a=(e.bindings[o]||[]).filter((function(e){return t.match(n,e)}));if(0!==a.length){var u=e.quill.getSelection();if(null!=u&&e.quill.hasFocus()){var l=e.quill.getLine(u.index),c=i(l,2),h=c[0],d=c[1],p=e.quill.getLeaf(u.index),m=i(p,2),g=m[0],v=m[1],y=0===u.length?[g,v]:e.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:e.quill.getFormat(u),offset:d,prefix:_,suffix:S};a.some((function(t){if(null!=t.collapsed&&t.collapsed!==O.collapsed)return!1;if(null!=t.empty&&t.empty!==O.empty)return!1;if(null!=t.offset&&t.offset!==O.offset)return!1;if(Array.isArray(t.format)){if(t.format.every((function(e){return null==O.format[e]})))return!1}else if("object"===r(t.format)&&!Object.keys(t.format).every((function(e){return!0===t.format[e]?null!=O.format[e]:!1===t.format[e]?null==O.format[e]:(0,s.default)(t.format[e],O.format[e])})))return!1;return!(null!=t.prefix&&!t.prefix.test(O.prefix)||null!=t.suffix&&!t.suffix.test(O.suffix)||!0===t.handler.call(e,u,O))}))&&n.preventDefault()}}}}))}}]),t}(p.default);function x(e,t){var n,r=e===b.keys.LEFT?"prefix":"suffix";return g(n={key:e,shiftKey:t,altKey:null},r,/^$/),g(n,"handler",(function(n){var r=n.index;e===b.keys.RIGHT&&(r+=n.length+1);var o=this.quill.getLeaf(r);return!(i(o,1)[0]instanceof f.default.Embed&&(e===b.keys.LEFT?t?this.quill.setSelection(n.index-1,n.length+1,h.default.sources.USER):this.quill.setSelection(n.index-1,h.default.sources.USER):t?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(e,t){if(!(0===e.index||this.quill.getLength()<=1)){var n=this.quill.getLine(e.index),r=i(n,1)[0],o={};if(0===t.offset){var a=this.quill.getLine(e.index-1),s=i(a,1)[0];if(null!=s&&s.length()>1){var u=r.formats(),l=this.quill.getFormat(e.index-1,1);o=c.default.attributes.diff(u,l)||{}}}var f=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(t.prefix)?2:1;this.quill.deleteText(e.index-f,f,h.default.sources.USER),Object.keys(o).length>0&&this.quill.formatLine(e.index-f,f,o,h.default.sources.USER),this.quill.focus()}}function _(e,t){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(t.suffix)?2:1;if(!(e.index>=this.quill.getLength()-n)){var r={},o=0,a=this.quill.getLine(e.index),s=i(a,1)[0];if(t.offset>=s.length()-1){var u=this.quill.getLine(e.index+1),l=i(u,1)[0];if(l){var f=s.formats(),d=this.quill.getFormat(e.index,1);r=c.default.attributes.diff(f,d)||{},o=l.length()}}this.quill.deleteText(e.index,n,h.default.sources.USER),Object.keys(r).length>0&&this.quill.formatLine(e.index+o-1,n,r,h.default.sources.USER)}}function S(e){var t=this.quill.getLines(e),n={};if(t.length>1){var r=t[0].formats(),i=t[t.length-1].formats();n=c.default.attributes.diff(i,r)||{}}this.quill.deleteText(e,h.default.sources.USER),Object.keys(n).length>0&&this.quill.formatLine(e.index,1,n,h.default.sources.USER),this.quill.setSelection(e.index,h.default.sources.SILENT),this.quill.focus()}function O(e,t){var n=this;e.length>0&&this.quill.scroll.deleteAt(e.index,e.length);var r=Object.keys(t.format).reduce((function(e,n){return f.default.query(n,f.default.Scope.BLOCK)&&!Array.isArray(t.format[n])&&(e[n]=t.format[n]),e}),{});this.quill.insertText(e.index,"\n",r,h.default.sources.USER),this.quill.setSelection(e.index+1,h.default.sources.SILENT),this.quill.focus(),Object.keys(t.format).forEach((function(e){null==r[e]&&(Array.isArray(t.format[e])||"link"!==e&&n.quill.format(e,t.format[e],h.default.sources.USER))}))}function N(e){return{key:b.keys.TAB,shiftKey:!e,format:{"code-block":!0},handler:function(t){var n=f.default.query("code-block"),r=t.index,o=t.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(t,i){e?(u.insertAt(d+l,n.TAB),l+=n.TAB.length,0===i?r+=n.TAB.length:o+=n.TAB.length):t.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+=t.length+1})),this.quill.update(h.default.sources.USER),this.quill.setSelection(r,o,h.default.sources.SILENT)}}}}function E(e){return{key:e[0].toUpperCase(),shortKey:!0,handler:function(t,n){this.quill.format(e,!n.format[e],h.default.sources.USER)}}}function C(e){if("string"==typeof e||"number"==typeof e)return C({key:e});if("object"===(void 0===e?"undefined":r(e))&&(e=(0,a.default)(e,!1)),"string"==typeof e.key)if(null!=b.keys[e.key.toUpperCase()])e.key=b.keys[e.key.toUpperCase()];else{if(1!==e.key.length)return null;e.key=e.key.toUpperCase().charCodeAt(0)}return e.shortKey&&(e[y]=e.shortKey,delete e.shortKey),e}b.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},b.DEFAULTS={bindings:{bold:E("bold"),italic:E("italic"),underline:E("underline"),indent:{key:b.keys.TAB,format:["blockquote","indent","list"],handler:function(e,t){if(t.collapsed&&0!==t.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(e,t){if(t.collapsed&&0!==t.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(e,t){null!=t.format.indent?this.quill.format("indent","-1",h.default.sources.USER):null!=t.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(e){this.quill.deleteText(e.index-1,1,h.default.sources.USER)}},tab:{key:b.keys.TAB,handler:function(e){this.quill.history.cutoff();var t=(new l.default).retain(e.index).delete(e.length).insert("\t");this.quill.updateContents(t,h.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index+1,h.default.sources.SILENT)}},"list empty enter":{key:b.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(e,t){this.quill.format("list",!1,h.default.sources.USER),t.format.indent&&this.quill.format("indent",!1,h.default.sources.USER)}},"checklist enter":{key:b.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(e){var t=this.quill.getLine(e.index),n=i(t,2),r=n[0],o=n[1],a=(0,u.default)({},r.formats(),{list:"checked"}),s=(new l.default).retain(e.index).insert("\n",a).retain(r.length()-o-1).retain(1,{list:"unchecked"});this.quill.updateContents(s,h.default.sources.USER),this.quill.setSelection(e.index+1,h.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:b.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(e,t){var n=this.quill.getLine(e.index),r=i(n,2),o=r[0],a=r[1],s=(new l.default).retain(e.index).insert("\n",t.format).retain(o.length()-a-1).retain(1,{header:null});this.quill.updateContents(s,h.default.sources.USER),this.quill.setSelection(e.index+1,h.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(e,t){var n=t.prefix.length,r=this.quill.getLine(e.index),o=i(r,2),a=o[0],s=o[1];if(s>n)return!0;var u=void 0;switch(t.prefix.trim()){case"[]":case"[ ]":u="unchecked";break;case"[x]":u="checked";break;case"-":case"*":u="bullet";break;default:u="ordered"}this.quill.insertText(e.index," ",h.default.sources.USER),this.quill.history.cutoff();var c=(new l.default).retain(e.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(e.index-n,h.default.sources.SILENT)}},"code exit":{key:b.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(e){var t=this.quill.getLine(e.index),n=i(t,2),r=n[0],o=n[1],a=(new l.default).retain(e.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)}},t.default=b,t.SHORTKEY=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(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 e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=s(n(0)),a=s(n(7));function s(e){return e&&e.__esModule?e:{default:e}}var u=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.selection=n,r.textNode=document.createTextNode(t.CONTENTS),r.domNode.appendChild(r.textNode),r._length=0,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,null,[{key:"value",value:function(){}}]),i(t,[{key:"detach",value:function(){null!=this.parent&&this.parent.removeChild(this)}},{key:"format",value:function(e,n){if(0!==this._length)return r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,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=t.CONTENTS.length,i.optimize(),i.formatAt(a,t.CONTENTS.length,e,n),this._length=0)}},{key:"index",value:function(e,n){return e===this.textNode?0:r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"index",this).call(this,e,n)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!this.selection.composing&&null!=this.parent){var e=this.textNode,n=this.selection.getNativeRange(),r=void 0,i=void 0,s=void 0;if(null!=n&&n.start.node===e&&n.end.node===e){var u=[e,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!==t.CONTENTS){var l=this.textNode.data.split(t.CONTENTS).join("");this.next instanceof a.default?(r=this.next.domNode,this.next.insertAt(0,l),this.textNode.data=t.CONTENTS):(this.textNode.data=l,this.parent.insertBefore(o.default.create(this.textNode),this),this.textNode=document.createTextNode(t.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),null!=i){var c=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}([i,s].map((function(e){return Math.max(0,Math.min(r.data.length,e-1))})),2);return i=c[0],s=c[1],{startNode:r,startOffset:i,endNode:r,endOffset:s}}}}},{key:"update",value:function(e,t){var n=this;if(e.some((function(e){return"characterData"===e.type&&e.target===n.textNode}))){var r=this.restore();r&&(t.range=r)}}},{key:"value",value:function(){return""}}]),t}(o.default.Embed);u.blotName="cursor",u.className="ql-cursor",u.tagName="span",u.CONTENTS="\ufeff",t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(0)),i=n(4),o=a(i);function a(e){return e&&e.__esModule?e:{default:e}}var s=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(r.default.Container);s.allowedChildren=[o.default,i.BlockEmbed,s],t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorStyle=t.ColorClass=t.ColorAttributor=void 0;var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(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(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"value",value:function(e){var n=o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e);return n.startsWith("rgb(")?"#"+(n=n.replace(/^[^\d]+/,"").replace(/[^\d]+$/,"")).split(",").map((function(e){return("00"+parseInt(e).toString(16)).slice(-2)})).join(""):n}}]),t}(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});t.ColorAttributor=s,t.ColorClass=u,t.ColorStyle=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sanitize=t.default=void 0;var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(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(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"format",value:function(e,n){if(e!==this.statics.blotName||!n)return o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n);n=this.constructor.sanitize(n),this.domNode.setAttribute("href",n)}}],[{key:"create",value:function(e){var n=o(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return e=this.sanitize(e),n.setAttribute("href",e),n.setAttribute("rel","noopener noreferrer"),n.setAttribute("target","_blank"),n}},{key:"formats",value:function(e){return e.getAttribute("href")}},{key:"sanitize",value:function(e){return s(e,this.PROTOCOL_WHITELIST)?e:this.SANITIZED_URL}}]),t}(((r=n(6))&&r.__esModule?r:{default:r}).default);function s(e,t){var n=document.createElement("a");n.href=e;var r=n.href.slice(0,n.href.indexOf(":"));return t.indexOf(r)>-1}a.blotName="link",a.tagName="A",a.SANITIZED_URL="about:blank",a.PROTOCOL_WHITELIST=["http","https","mailto","tel"],t.default=a,t.sanitize=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=s(n(23)),a=s(n(107));function s(e){return e&&e.__esModule?e:{default:e}}var u=0;function l(e,t){e.setAttribute(t,!("true"===e.getAttribute(t)))}var c=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.select=t,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(e){switch(e.keyCode){case o.default.keys.ENTER:n.togglePicker();break;case o.default.keys.ESCAPE:n.escape(),e.preventDefault()}})),this.select.addEventListener("change",this.update.bind(this))}return i(e,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),l(this.label,"aria-expanded"),l(this.options,"aria-hidden")}},{key:"buildItem",value:function(e){var t=this,n=document.createElement("span");return n.tabIndex="0",n.setAttribute("role","button"),n.classList.add("ql-picker-item"),e.hasAttribute("value")&&n.setAttribute("data-value",e.getAttribute("value")),e.textContent&&n.setAttribute("data-label",e.textContent),n.addEventListener("click",(function(){t.selectItem(n,!0)})),n.addEventListener("keydown",(function(e){switch(e.keyCode){case o.default.keys.ENTER:t.selectItem(n,!0),e.preventDefault();break;case o.default.keys.ESCAPE:t.escape(),e.preventDefault()}})),n}},{key:"buildLabel",value:function(){var e=document.createElement("span");return e.classList.add("ql-picker-label"),e.innerHTML=a.default,e.tabIndex="0",e.setAttribute("role","button"),e.setAttribute("aria-expanded","false"),this.container.appendChild(e),e}},{key:"buildOptions",value:function(){var e=this,t=document.createElement("span");t.classList.add("ql-picker-options"),t.setAttribute("aria-hidden","true"),t.tabIndex="-1",t.id="ql-picker-options-"+u,u+=1,this.label.setAttribute("aria-controls",t.id),this.options=t,[].slice.call(this.select.options).forEach((function(n){var r=e.buildItem(n);t.appendChild(r),!0===n.selected&&e.selectItem(r)})),this.container.appendChild(t)}},{key:"buildPicker",value:function(){var e=this;[].slice.call(this.select.attributes).forEach((function(t){e.container.setAttribute(t.name,t.value)})),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var e=this;this.close(),setTimeout((function(){return e.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(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.container.querySelector(".ql-selected");if(e!==n&&(null!=n&&n.classList.remove("ql-selected"),null!=e&&(e.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(e.parentNode.children,e),e.hasAttribute("data-value")?this.label.setAttribute("data-value",e.getAttribute("data-value")):this.label.removeAttribute("data-value"),e.hasAttribute("data-label")?this.label.setAttribute("data-label",e.getAttribute("data-label")):this.label.removeAttribute("data-label"),t))){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 e=void 0;if(this.select.selectedIndex>-1){var t=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];e=this.select.options[this.select.selectedIndex],this.selectItem(t)}else this.selectItem(null);var n=null!=e&&e!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),e}();t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__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(e){return e&&e.__esModule?e:{default:e}}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),t.default=i.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=function(){function e(e){this.domNode=e,this.domNode[r.DATA_KEY]={blot:this}}return Object.defineProperty(e.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),e.create=function(e){if(null==this.tagName)throw new r.ParchmentError("Blot definition missing tagName");var t;return Array.isArray(this.tagName)?("string"==typeof e&&(e=e.toUpperCase(),parseInt(e).toString()===e&&(e=parseInt(e))),t="number"==typeof e?document.createElement(this.tagName[e-1]):this.tagName.indexOf(e)>-1?document.createElement(e):document.createElement(this.tagName[0])):t=document.createElement(this.tagName),this.className&&t.classList.add(this.className),t},e.prototype.attach=function(){null!=this.parent&&(this.scroll=this.parent.scroll)},e.prototype.clone=function(){var e=this.domNode.cloneNode(!1);return r.create(e)},e.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[r.DATA_KEY]},e.prototype.deleteAt=function(e,t){this.isolate(e,t).remove()},e.prototype.formatAt=function(e,t,n,i){var o=this.isolate(e,t);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)}},e.prototype.insertAt=function(e,t,n){var i=null==n?r.create("text",t):r.create(t,n),o=this.split(e);this.parent.insertBefore(i,o)},e.prototype.insertInto=function(e,t){void 0===t&&(t=null),null!=this.parent&&this.parent.children.remove(this);var n=null;e.children.insertBefore(this,t),null!=t&&(n=t.domNode),this.domNode.parentNode==e.domNode&&this.domNode.nextSibling==n||e.domNode.insertBefore(this.domNode,n),this.parent=e,this.attach()},e.prototype.isolate=function(e,t){var n=this.split(e);return n.split(t),n},e.prototype.length=function(){return 1},e.prototype.offset=function(e){return void 0===e&&(e=this.parent),null==this.parent||this==e?0:this.parent.children.offset(this)+this.parent.offset(e)},e.prototype.optimize=function(e){null!=this.domNode[r.DATA_KEY]&&delete this.domNode[r.DATA_KEY].mutations},e.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},e.prototype.replace=function(e){null!=e.parent&&(e.parent.insertBefore(this,e.next),e.remove())},e.prototype.replaceWith=function(e,t){var n="string"==typeof e?r.create(e,t):e;return n.replace(this),n},e.prototype.split=function(e,t){return 0===e?this:this.next},e.prototype.update=function(e,t){},e.prototype.wrap=function(e,t){var n="string"==typeof e?r.create(e,t):e;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},e.blotName="abstract",e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(12),i=n(32),o=n(33),a=n(1),s=function(){function e(e){this.attributes={},this.domNode=e,this.build()}return e.prototype.attribute=function(e,t){t?e.add(this.domNode,t)&&(null!=e.value(this.domNode)?this.attributes[e.attrName]=e:delete this.attributes[e.attrName]):(e.remove(this.domNode),delete this.attributes[e.attrName])},e.prototype.build=function(){var e=this;this.attributes={};var t=r.default.keys(this.domNode),n=i.default.keys(this.domNode),s=o.default.keys(this.domNode);t.concat(n).concat(s).forEach((function(t){var n=a.query(t,a.Scope.ATTRIBUTE);n instanceof r.default&&(e.attributes[n.attrName]=n)}))},e.prototype.copy=function(e){var t=this;Object.keys(this.attributes).forEach((function(n){var r=t.attributes[n].value(t.domNode);e.format(n,r)}))},e.prototype.move=function(e){var t=this;this.copy(e),Object.keys(this.attributes).forEach((function(e){t.attributes[e].remove(t.domNode)})),this.attributes={}},e.prototype.values=function(){var e=this;return Object.keys(this.attributes).reduce((function(t,n){return t[n]=e.attributes[n].value(e.domNode),t}),{})},e}();t.default=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function o(e,t){return(e.getAttribute("class")||"").split(/\s+/).filter((function(e){return 0===e.indexOf(t+"-")}))}Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.keys=function(e){return(e.getAttribute("class")||"").split(/\s+/).map((function(e){return e.split("-").slice(0,-1).join("-")}))},t.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(this.remove(e),e.classList.add(this.keyName+"-"+t),!0)},t.prototype.remove=function(e){o(e,this.keyName).forEach((function(t){e.classList.remove(t)})),0===e.classList.length&&e.removeAttribute("class")},t.prototype.value=function(e){var t=(o(e,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(e,t)?t:""},t}(n(12).default);t.default=a},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function o(e){var t=e.split("-"),n=t.slice(1).map((function(e){return e[0].toUpperCase()+e.slice(1)})).join("");return t[0]+n}Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.keys=function(e){return(e.getAttribute("style")||"").split(";").map((function(e){return e.split(":")[0].trim()}))},t.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(e.style[o(this.keyName)]=t,!0)},t.prototype.remove=function(e){e.style[o(this.keyName)]="",e.getAttribute("style")||e.removeAttribute("style")},t.prototype.value=function(e){var t=e.style[o(this.keyName)];return this.canAdd(e,t)?t:""},t}(n(12).default);t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.quill=t,this.options=n,this.modules={}}return r(e,[{key:"init",value:function(){var e=this;Object.keys(this.options.modules).forEach((function(t){null==e.modules[t]&&e.addModule(t)}))}},{key:"addModule",value:function(e){var t=this.quill.constructor.import("modules/"+e);return this.modules[e]=new t(this.quill,this.options.modules[e]||{}),this.modules[e]}}]),e}();i.DEFAULTS={modules:{}},i.themes={default:i},t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(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(e){return e&&e.__esModule?e:{default:e}}var u="\ufeff",l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.contentNode=document.createElement("span"),n.contentNode.setAttribute("contenteditable",!1),[].slice.call(n.domNode.childNodes).forEach((function(e){n.contentNode.appendChild(e)})),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(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"index",value:function(e,n){return e===this.leftGuard?0:e===this.rightGuard?1:i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"index",this).call(this,e,n)}},{key:"restore",value:function(e){var t=void 0,n=void 0,r=e.data.split(u).join("");if(e===this.leftGuard)if(this.prev instanceof a.default){var i=this.prev.length();this.prev.insertAt(i,r),t={startNode:this.prev.domNode,startOffset:i+r.length}}else n=document.createTextNode(r),this.parent.insertBefore(o.default.create(n),this),t={startNode:n,startOffset:r.length};else e===this.rightGuard&&(this.next instanceof a.default?(this.next.insertAt(0,r),t={startNode:this.next.domNode,startOffset:r.length}):(n=document.createTextNode(r),this.parent.insertBefore(o.default.create(n),this.next),t={startNode:n,startOffset:r.length}));return e.data=u,t}},{key:"update",value:function(e,t){var n=this;e.forEach((function(e){if("characterData"===e.type&&(e.target===n.leftGuard||e.target===n.rightGuard)){var r=n.restore(e.target);r&&(t.range=r)}}))}}]),t}(o.default.Embed);t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AlignStyle=t.AlignClass=t.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);t.AlignAttribute=a,t.AlignClass=s,t.AlignStyle=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BackgroundStyle=t.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});t.BackgroundClass=a,t.BackgroundStyle=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectionStyle=t.DirectionClass=t.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);t.DirectionAttribute=a,t.DirectionClass=s,t.DirectionStyle=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FontClass=t.FontStyle=void 0;var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(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(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"value",value:function(e){return o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e).replace(/["']/g,"")}}]),t}(a.default.Attributor.Style),c=new l("font","font-family",s);t.FontStyle=c,t.FontClass=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SizeStyle=t.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"]});t.SizeClass=o,t.SizeStyle=a},function(e,t,n){"use strict";e.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(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLastChangeIndex=t.default=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=a(n(0)),o=a(n(5));function a(e){return e&&e.__esModule?e:{default:e}}var s=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.lastRecorded=0,r.ignoreChange=!1,r.clear(),r.quill.on(o.default.events.EDITOR_CHANGE,(function(e,t,n,i){e!==o.default.events.TEXT_CHANGE||r.ignoreChange||(r.options.userOnly&&i!==o.default.sources.USER?r.transform(t):r.record(t,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(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"change",value:function(e,t){if(0!==this.stack[e].length){var n=this.stack[e].pop();this.stack[t].push(n),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n[e],o.default.sources.USER),this.ignoreChange=!1;var r=u(n[e]);this.quill.setSelection(r)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(e,t){if(0!==e.ops.length){this.stack.redo=[];var n=this.quill.getContents().diff(t),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),e=i.redo.compose(e)}else this.lastRecorded=r;this.stack.undo.push({redo:e,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(e){this.stack.undo.forEach((function(t){t.undo=e.transform(t.undo,!0),t.redo=e.transform(t.redo,!0)})),this.stack.redo.forEach((function(t){t.undo=e.transform(t.undo,!0),t.redo=e.transform(t.redo,!0)}))}},{key:"undo",value:function(){this.change("undo","redo")}}]),t}(a(n(9)).default);function u(e){var t=e.reduce((function(e,t){return e+(t.delete||0)}),0),n=e.length()-t;return function(e){var t=e.ops[e.ops.length-1];return null!=t&&(null!=t.insert?"string"==typeof t.insert&&t.insert.endsWith("\n"):null!=t.attributes&&Object.keys(t.attributes).some((function(e){return null!=i.default.query(e,i.default.Scope.BLOCK)})))}(e)&&(n-=1),n}s.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},t.default=s,t.getLastChangeIndex=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BaseTooltip=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(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(e){return e&&e.__esModule?e:{default:e}}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function v(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}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(e){function t(e,n){m(this,t);var r=g(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return e.emitter.listenDOM("click",document.body,(function t(n){if(!document.body.contains(e.root))return document.body.removeEventListener("click",t);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(e){e.container.contains(n.target)||e.close()}))})),r}return v(t,e),r(t,[{key:"addModule",value:function(e){var n=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"addModule",this).call(this,e);return"toolbar"===e&&this.extendToolbar(n),n}},{key:"buildButtons",value:function(e,t){e.forEach((function(e){(e.getAttribute("class")||"").split(/\s+/).forEach((function(n){if(n.startsWith("ql-")&&(n=n.slice(3),null!=t[n]))if("direction"===n)e.innerHTML=t[n][""]+t[n].rtl;else if("string"==typeof t[n])e.innerHTML=t[n];else{var r=e.value||"";null!=r&&t[n][r]&&(e.innerHTML=t[n][r])}}))}))}},{key:"buildPickers",value:function(e,t){var n=this;this.pickers=e.map((function(e){if(e.classList.contains("ql-align"))return null==e.querySelector("option")&&N(e,y),new f.default(e,t.align);if(e.classList.contains("ql-background")||e.classList.contains("ql-color")){var n=e.classList.contains("ql-background")?"background":"color";return null==e.querySelector("option")&&N(e,b,"background"===n?"#ffffff":"#000000"),new c.default(e,t[n])}return null==e.querySelector("option")&&(e.classList.contains("ql-font")?N(e,x):e.classList.contains("ql-header")?N(e,w):e.classList.contains("ql-size")&&N(e,_)),new h.default(e)})),this.quill.on(s.default.events.EDITOR_CHANGE,(function(){n.pickers.forEach((function(e){e.update()}))}))}}]),t}(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 e=this,t=this.container.querySelector("input.ql-image[type=file]");null==t&&((t=document.createElement("input")).setAttribute("type","file"),t.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),t.classList.add("ql-image"),t.addEventListener("change",(function(){if(null!=t.files&&null!=t.files[0]){var n=new FileReader;n.onload=function(n){var r=e.quill.getSelection(!0);e.quill.updateContents((new a.default).retain(r.index).delete(r.length).insert({image:n.target.result}),s.default.sources.USER),e.quill.setSelection(r.index+1,s.default.sources.SILENT),t.value=""},n.readAsDataURL(t.files[0])}})),this.container.appendChild(t)),t.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var O=function(e){function t(e,n){m(this,t);var r=g(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.textbox=r.root.querySelector('input[type="text"]'),r.listen(),r}return v(t,e),r(t,[{key:"listen",value:function(){var e=this;this.textbox.addEventListener("keydown",(function(t){u.default.match(t,"enter")?(e.save(),t.preventDefault()):u.default.match(t,"escape")&&(e.cancel(),t.preventDefault())}))}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"link",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null!=t?this.textbox.value=t:e!==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-"+e)||""),this.root.setAttribute("data-mode",e)}},{key:"restoreFocus",value:function(){var e=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=e}},{key:"save",value:function(){var e,t,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=(t=(e=n).match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/))?(t[1]||"https")+"://www.youtube.com/embed/"+t[2]+"?showinfo=0":(t=e.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(t[1]||"https")+"://player.vimeo.com/video/"+t[2]+"/":e;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()}}]),t}(d.default);function N(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t.forEach((function(t){var r=document.createElement("option");t===n?r.setAttribute("selected","selected"):r.setAttribute("value",t),e.appendChild(r)}))}t.BaseTooltip=O,t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this.head=this.tail=null,this.length=0}return e.prototype.append=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.insertBefore(e[0],null),e.length>1&&this.append.apply(this,e.slice(1))},e.prototype.contains=function(e){for(var t,n=this.iterator();t=n();)if(t===e)return!0;return!1},e.prototype.insertBefore=function(e,t){e&&(e.next=t,null!=t?(e.prev=t.prev,null!=t.prev&&(t.prev.next=e),t.prev=e,t===this.head&&(this.head=e)):null!=this.tail?(this.tail.next=e,e.prev=this.tail,this.tail=e):(e.prev=null,this.head=this.tail=e),this.length+=1)},e.prototype.offset=function(e){for(var t=0,n=this.head;null!=n;){if(n===e)return t;t+=n.length(),n=n.next}return-1},e.prototype.remove=function(e){this.contains(e)&&(null!=e.prev&&(e.prev.next=e.next),null!=e.next&&(e.next.prev=e.prev),e===this.head&&(this.head=e.next),e===this.tail&&(this.tail=e.prev),this.length-=1)},e.prototype.iterator=function(e){return void 0===e&&(e=this.head),function(){var t=e;return null!=e&&(e=e.next),t}},e.prototype.find=function(e,t){void 0===t&&(t=!1);for(var n,r=this.iterator();n=r();){var i=n.length();if(e<i||t&&e===i&&(null==n.next||0!==n.next.length()))return[n,e];e-=i}return[null,0]},e.prototype.forEach=function(e){for(var t,n=this.iterator();t=n();)e(t)},e.prototype.forEachAt=function(e,t,n){if(!(t<=0))for(var r,i=this.find(e),o=i[0],a=e-i[1],s=this.iterator(o);(r=s())&&a<e+t;){var u=r.length();e>a?n(r,e-a,Math.min(t,a+u-e)):n(r,0,Math.min(u,e+t-a)),a+=u}},e.prototype.map=function(e){return this.reduce((function(t,n){return t.push(e(n)),t}),[])},e.prototype.reduce=function(e,t){for(var n,r=this.iterator();n=r();)t=e(t,n);return t},e}();t.default=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(17),a=n(1),s={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},u=function(e){function t(t){var n=e.call(this,t)||this;return n.scroll=n,n.observer=new MutationObserver((function(e){n.update(e)})),n.observer.observe(n.domNode,s),n.attach(),n}return i(t,e),t.prototype.detach=function(){e.prototype.detach.call(this),this.observer.disconnect()},t.prototype.deleteAt=function(t,n){this.update(),0===t&&n===this.length()?this.children.forEach((function(e){e.remove()})):e.prototype.deleteAt.call(this,t,n)},t.prototype.formatAt=function(t,n,r,i){this.update(),e.prototype.formatAt.call(this,t,n,r,i)},t.prototype.insertAt=function(t,n,r){this.update(),e.prototype.insertAt.call(this,t,n,r)},t.prototype.optimize=function(t,n){var r=this;void 0===t&&(t=[]),void 0===n&&(n={}),e.prototype.optimize.call(this,n);for(var i=[].slice.call(this.observer.takeRecords());i.length>0;)t.push(i.pop());for(var s=function(e,t){void 0===t&&(t=!0),null!=e&&e!==r&&null!=e.domNode.parentNode&&(null==e.domNode[a.DATA_KEY].mutations&&(e.domNode[a.DATA_KEY].mutations=[]),t&&s(e.parent))},u=function(e){null!=e.domNode[a.DATA_KEY]&&null!=e.domNode[a.DATA_KEY].mutations&&(e instanceof o.default&&e.children.forEach(u),e.optimize(n))},l=t,c=0;l.length>0;c+=1){if(c>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(l.forEach((function(e){var t=a.find(e.target,!0);null!=t&&(t.domNode===e.target&&("childList"===e.type?(s(a.find(e.previousSibling,!1)),[].forEach.call(e.addedNodes,(function(e){var t=a.find(e,!1);s(t,!1),t instanceof o.default&&t.children.forEach((function(e){s(e,!1)}))}))):"attributes"===e.type&&s(t.prev)),s(t))})),this.children.forEach(u),i=(l=[].slice.call(this.observer.takeRecords())).slice();i.length>0;)t.push(i.pop())}},t.prototype.update=function(t,n){var r=this;void 0===n&&(n={}),(t=t||this.observer.takeRecords()).map((function(e){var t=a.find(e.target,!0);return null==t?null:null==t.domNode[a.DATA_KEY].mutations?(t.domNode[a.DATA_KEY].mutations=[e],t):(t.domNode[a.DATA_KEY].mutations.push(e),null)})).forEach((function(e){null!=e&&e!==r&&null!=e.domNode[a.DATA_KEY]&&e.update(e.domNode[a.DATA_KEY].mutations||[],n)})),null!=this.domNode[a.DATA_KEY].mutations&&e.prototype.update.call(this,this.domNode[a.DATA_KEY].mutations,n),this.optimize(t,n)},t.blotName="scroll",t.defaultChild="block",t.scope=a.Scope.BLOCK_BLOT,t.tagName="DIV",t}(o.default);t.default=u},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(18),a=n(1),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.formats=function(n){if(n.tagName!==t.tagName)return e.formats.call(this,n)},t.prototype.format=function(n,r){var i=this;n!==this.statics.blotName||r?e.prototype.format.call(this,n,r):(this.children.forEach((function(e){e instanceof o.default||(e=e.wrap(t.blotName,!0)),i.attributes.copy(e)})),this.unwrap())},t.prototype.formatAt=function(t,n,r,i){null!=this.formats()[r]||a.query(r,a.Scope.ATTRIBUTE)?this.isolate(t,n).format(r,i):e.prototype.formatAt.call(this,t,n,r,i)},t.prototype.optimize=function(n){e.prototype.optimize.call(this,n);var r=this.formats();if(0===Object.keys(r).length)return this.unwrap();var i=this.next;i instanceof t&&i.prev===this&&function(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(e[n]!==t[n])return!1;return!0}(r,i.formats())&&(i.moveChildren(this),i.remove())},t.blotName="inline",t.scope=a.Scope.INLINE_BLOT,t.tagName="SPAN",t}(o.default);t.default=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(18),a=n(1),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.formats=function(n){var r=a.query(t.blotName).tagName;if(n.tagName!==r)return e.formats.call(this,n)},t.prototype.format=function(n,r){null!=a.query(n,a.Scope.BLOCK)&&(n!==this.statics.blotName||r?e.prototype.format.call(this,n,r):this.replaceWith(t.blotName))},t.prototype.formatAt=function(t,n,r,i){null!=a.query(r,a.Scope.BLOCK)?this.format(r,i):e.prototype.formatAt.call(this,t,n,r,i)},t.prototype.insertAt=function(t,n,r){if(null==r||null!=a.query(n,a.Scope.INLINE))e.prototype.insertAt.call(this,t,n,r);else{var i=this.split(t),o=a.create(n,r);i.parent.insertBefore(o,i)}},t.prototype.update=function(t,n){navigator.userAgent.match(/Trident/)?this.build():e.prototype.update.call(this,t,n)},t.blotName="block",t.scope=a.Scope.BLOCK_BLOT,t.tagName="P",t}(o.default);t.default=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.formats=function(e){},t.prototype.format=function(t,n){e.prototype.formatAt.call(this,0,this.length(),t,n)},t.prototype.formatAt=function(t,n,r,i){0===t&&n===this.length()?this.format(r,i):e.prototype.formatAt.call(this,t,n,r,i)},t.prototype.formats=function(){return this.statics.formats(this.domNode)},t}(n(19).default);t.default=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(19),a=n(1),s=function(e){function t(t){var n=e.call(this,t)||this;return n.text=n.statics.value(n.domNode),n}return i(t,e),t.create=function(e){return document.createTextNode(e)},t.value=function(e){var t=e.data;return t.normalize&&(t=t.normalize()),t},t.prototype.deleteAt=function(e,t){this.domNode.data=this.text=this.text.slice(0,e)+this.text.slice(e+t)},t.prototype.index=function(e,t){return this.domNode===e?t:-1},t.prototype.insertAt=function(t,n,r){null==r?(this.text=this.text.slice(0,t)+n+this.text.slice(t),this.domNode.data=this.text):e.prototype.insertAt.call(this,t,n,r)},t.prototype.length=function(){return this.text.length},t.prototype.optimize=function(n){e.prototype.optimize.call(this,n),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof t&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},t.prototype.position=function(e,t){return void 0===t&&(t=!1),[this.domNode,e]},t.prototype.split=function(e,t){if(void 0===t&&(t=!1),!t){if(0===e)return this;if(e===this.length())return this.next}var n=a.create(this.domNode.splitText(e));return this.parent.insertBefore(n,this.next),this.text=this.statics.value(this.domNode),n},t.prototype.update=function(e,t){var n=this;e.some((function(e){return"characterData"===e.type&&e.target===n.domNode}))&&(this.text=this.statics.value(this.domNode))},t.prototype.value=function(){return this.text},t.blotName="text",t.scope=a.Scope.INLINE_BLOT,t}(o.default);t.default=s},function(e,t,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(e,t){return arguments.length>1&&!this.contains(e)==!t?t:i.call(this,e)}}String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return t=t||0,this.substr(t,e.length)===e}),String.prototype.endsWith||(String.prototype.endsWith=function(e,t){var n=this.toString();("number"!=typeof t||!isFinite(t)||Math.floor(t)!==t||t>n.length)&&(t=n.length),t-=e.length;var r=n.indexOf(e,t);return-1!==r&&r===t}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var t,n=Object(this),r=n.length>>>0,i=arguments[1],o=0;o<r;o++)if(t=n[o],e.call(i,t,o,n))return t}}),document.addEventListener("DOMContentLoaded",(function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)}))},function(e,t){var n=-1,r=1,i=0;function o(e,t,c){if(e==t)return e?[[i,e]]:[];(c<0||e.length<c)&&(c=null);var h=s(e,t),d=e.substring(0,h);h=u(e=e.substring(h),t=t.substring(h));var p=e.substring(e.length-h),m=function(e,t){var l;if(!e)return[[r,t]];if(!t)return[[n,e]];var c=e.length>t.length?e:t,f=e.length>t.length?t:e,h=c.indexOf(f);if(-1!=h)return l=[[r,c.substring(0,h)],[i,f],[r,c.substring(h+f.length)]],e.length>t.length&&(l[0][0]=l[2][0]=n),l;if(1==f.length)return[[n,e],[r,t]];var d=function(e,t){var n=e.length>t.length?e:t,r=e.length>t.length?t:e;if(n.length<4||2*r.length<n.length)return null;function i(e,t,n){for(var r,i,o,a,l=e.substring(n,n+Math.floor(e.length/4)),c=-1,f="";-1!=(c=t.indexOf(l,c+1));){var h=s(e.substring(n),t.substring(c)),d=u(e.substring(0,n),t.substring(0,c));f.length<d+h&&(f=t.substring(c-d,c)+t.substring(c,c+h),r=e.substring(0,n-d),i=e.substring(n+h),o=t.substring(0,c-d),a=t.substring(c+h))}return 2*f.length>=e.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,e.length>t.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}(e,t);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(e,t){for(var i=e.length,o=t.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,_=(C=x==-b||x!=b&&c[w-1]<c[w+1]?c[w+1]:c[w-1]+1)-x;C<i&&_<o&&e.charAt(C)==t.charAt(_);)C++,_++;if(c[w]=C,C>i)g+=2;else if(_>o)m+=2;else if(p&&(N=u+d-x)>=0&&N<l&&-1!=f[N]&&C>=(O=i-f[N]))return a(e,t,C,_)}for(var S=-b+v;S<=b-y;S+=2){for(var O,N=u+S,E=(O=S==-b||S!=b&&f[N-1]<f[N+1]?f[N+1]:f[N-1]+1)-S;O<i&&E<o&&e.charAt(i-O-1)==t.charAt(o-E-1);)O++,E++;if(f[N]=O,O>i)y+=2;else if(E>o)v+=2;else if(!p){var C;if((w=u+d-S)>=0&&w<l&&-1!=c[w]&&(_=u+(C=c[w])-w,C>=(O=i-O)))return a(e,t,C,_)}}}return[[n,e],[r,t]]}(e,t)}(e=e.substring(0,e.length-h),t=t.substring(0,t.length-h));return d&&m.unshift([i,d]),p&&m.push([i,p]),l(m),null!=c&&(m=function(e,t){var r=function(e,t){if(0===t)return[i,e];for(var r=0,o=0;o<e.length;o++){var a=e[o];if(a[0]===n||a[0]===i){var s=r+a[1].length;if(t===s)return[o+1,e];if(t<s){e=e.slice();var u=t-r,l=[a[0],a[1].slice(0,u)],c=[a[0],a[1].slice(u)];return e.splice(o,1,l,c),[o+1,e]}r=s}}throw new Error("cursor_pos is out of bounds!")}(e,t),o=r[1],a=r[0],s=o[a],u=o[a+1];if(null==s)return e;if(s[0]!==i)return e;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 e}(m,c)),function(e){for(var t=!1,o=function(e){return e.charCodeAt(0)>=56320&&e.charCodeAt(0)<=57343},a=2;a<e.length;a+=1)e[a-2][0]===i&&((s=e[a-2][1]).charCodeAt(s.length-1)>=55296&&s.charCodeAt(s.length-1)<=56319)&&e[a-1][0]===n&&o(e[a-1][1])&&e[a][0]===r&&o(e[a][1])&&(t=!0,e[a-1][1]=e[a-2][1].slice(-1)+e[a-1][1],e[a][1]=e[a-2][1].slice(-1)+e[a][1],e[a-2][1]=e[a-2][1].slice(0,-1));var s;if(!t)return e;var u=[];for(a=0;a<e.length;a+=1)e[a][1].length>0&&u.push(e[a]);return u}(m)}function a(e,t,n,r){var i=e.substring(0,n),a=t.substring(0,r),s=e.substring(n),u=t.substring(r),l=o(i,a),c=o(s,u);return l.concat(c)}function s(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,o=0;n<i;)e.substring(o,i)==t.substring(o,i)?o=n=i:r=i,i=Math.floor((r-n)/2+n);return i}function u(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,o=0;n<i;)e.substring(e.length-i,e.length-o)==t.substring(t.length-i,t.length-o)?o=n=i:r=i,i=Math.floor((r-n)/2+n);return i}function l(e){e.push([i,""]);for(var t,o=0,a=0,c=0,f="",h="";o<e.length;)switch(e[o][0]){case r:c++,h+=e[o][1],o++;break;case n:a++,f+=e[o][1],o++;break;case i:a+c>1?(0!==a&&0!==c&&(0!==(t=s(h,f))&&(o-a-c>0&&e[o-a-c-1][0]==i?e[o-a-c-1][1]+=h.substring(0,t):(e.splice(0,0,[i,h.substring(0,t)]),o++),h=h.substring(t),f=f.substring(t)),0!==(t=u(h,f))&&(e[o][1]=h.substring(h.length-t)+e[o][1],h=h.substring(0,h.length-t),f=f.substring(0,f.length-t))),0===a?e.splice(o-c,a+c,[r,h]):0===c?e.splice(o-a,a+c,[n,f]):e.splice(o-a-c,a+c,[n,f],[r,h]),o=o-a-c+(a?1:0)+(c?1:0)+1):0!==o&&e[o-1][0]==i?(e[o-1][1]+=e[o][1],e.splice(o,1)):o++,c=0,a=0,f="",h=""}""===e[e.length-1][1]&&e.pop();var d=!1;for(o=1;o<e.length-1;)e[o-1][0]==i&&e[o+1][0]==i&&(e[o][1].substring(e[o][1].length-e[o-1][1].length)==e[o-1][1]?(e[o][1]=e[o-1][1]+e[o][1].substring(0,e[o][1].length-e[o-1][1].length),e[o+1][1]=e[o-1][1]+e[o+1][1],e.splice(o-1,1),d=!0):e[o][1].substring(0,e[o+1][1].length)==e[o+1][1]&&(e[o-1][1]+=e[o+1][1],e[o][1]=e[o][1].substring(e[o+1][1].length)+e[o+1][1],e.splice(o+1,1),d=!0)),o++;d&&l(e)}var c=o;function f(e,t,n){for(var r=t+n-1;r>=0&&r>=t-1;r--)if(r+1<e.length){var i=e[r],o=e[r+1];i[0]===o[1]&&e.splice(r,2,[i[0],i[1]+o[1]])}return e}c.INSERT=r,c.DELETE=n,c.EQUAL=i,e.exports=c},function(e,t){function n(e){var t=[];for(var n in e)t.push(n);return t}(e.exports="function"==typeof Object.keys?Object.keys:n).shim=n},function(e,t){var n="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();function r(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function i(e){return e&&"object"==typeof e&&"number"==typeof e.length&&Object.prototype.hasOwnProperty.call(e,"callee")&&!Object.prototype.propertyIsEnumerable.call(e,"callee")||!1}(t=e.exports=n?r:i).supported=r,t.unsupported=i},function(e,t){"use strict";var n=Object.prototype.hasOwnProperty,r="~";function i(){}function o(e,t,n){this.fn=e,this.context=t,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 e,t,i=[];if(0===this._eventsCount)return i;for(t in e=this._events)n.call(e,t)&&i.push(r?t.slice(1):t);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},a.prototype.listeners=function(e,t){var n=r?r+e:e,i=this._events[n];if(t)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(e,t,n,i,o,a){var s=r?r+e:e;if(!this._events[s])return!1;var u,l,c=this._events[s],f=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),f){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,i),!0;case 5:return c.fn.call(c.context,t,n,i,o),!0;case 6:return c.fn.call(c.context,t,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(e,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,t);break;case 3:c[l].fn.call(c[l].context,t,n);break;case 4:c[l].fn.call(c[l].context,t,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(e,t,n){var i=new o(t,n||this),a=r?r+e:e;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(e,t,n){var i=new o(t,n||this,!0),a=r?r+e:e;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(e,t,n,o){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return 0==--this._eventsCount?this._events=new i:delete this._events[a],this;var s=this._events[a];if(s.fn)s.fn!==t||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!==t||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(e){var t;return e?(t=r?r+e:e,this._events[t]&&(0==--this._eventsCount?this._events=new i:delete this._events[t])):(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!==e&&(e.exports=a)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.matchText=t.matchSpacing=t.matchNewline=t.matchBlot=t.matchAttributor=t.default=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),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(e){return e&&e.__esModule?e:{default:e}}function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var w=(0,c.default)("quill:clipboard"),_="__ql-matcher",S=[[Node.TEXT_NODE,L],[Node.TEXT_NODE,I],["br",function(e,t){return M(t,"\n")||t.insert("\n"),t}],[Node.ELEMENT_NODE,I],[Node.ELEMENT_NODE,P],[Node.ELEMENT_NODE,R],[Node.ELEMENT_NODE,j],[Node.ELEMENT_NODE,function(e,t){var n={},r=e.style||{};return r.fontStyle&&"italic"===A(e).fontStyle&&(n.italic=!0),r.fontWeight&&(A(e).fontWeight.startsWith("bold")||parseInt(A(e).fontWeight)>=700)&&(n.bold=!0),Object.keys(n).length>0&&(t=C(t,n)),parseFloat(r.textIndent||0)>0&&(t=(new s.default).insert("\t").concat(t)),t}],["li",function(e,t){var n=u.default.query(e);if(null==n||"list-item"!==n.blotName||!M(t,"\n"))return t;for(var r=-1,i=e.parentNode;!i.classList.contains("ql-clipboard");)"list"===(u.default.query(i)||{}).blotName&&(r+=1),i=i.parentNode;return r<=0?t:t.compose((new s.default).retain(t.length()-1).retain(1,{indent:r}))}],["b",D.bind(D,"bold")],["i",D.bind(D,"italic")],["style",function(){return new s.default}]],O=[h.AlignAttribute,g.DirectionAttribute].reduce((function(e,t){return e[t.keyName]=t,e}),{}),N=[h.AlignStyle,d.BackgroundStyle,m.ColorStyle,g.DirectionStyle,v.FontStyle,y.SizeStyle].reduce((function(e,t){return e[t.keyName]=t,e}),{}),E=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,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(e){var t=i(e,2),o=t[0],a=t[1];(n.matchVisual||a!==R)&&r.addMatcher(o,a)})),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"addMatcher",value:function(e,t){this.matchers.push([e,t])}},{key:"convert",value:function(e){if("string"==typeof e)return this.container.innerHTML=e.replace(/\>\r?\n +\</g,"><"),this.convert();var t=this.quill.getFormat(this.quill.selection.savedRange.index);if(t[p.default.blotName]){var n=this.container.innerText;return this.container.innerHTML="",(new s.default).insert(n,x({},p.default.blotName,t[p.default.blotName]))}var r=this.prepareMatching(),o=i(r,2),a=o[0],u=o[1],l=T(this.container,a,u);return M(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(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default.sources.API;if("string"==typeof e)this.quill.setContents(this.convert(e),t),this.quill.setSelection(0,l.default.sources.SILENT);else{var r=this.convert(t);this.quill.updateContents((new s.default).retain(e).concat(r),n),this.quill.setSelection(e+r.length(),l.default.sources.SILENT)}}},{key:"onPaste",value:function(e){var t=this;if(!e.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(t.convert()).delete(n.length),t.quill.updateContents(r,l.default.sources.USER),t.quill.setSelection(r.length()-n.length,l.default.sources.SILENT),t.quill.scrollingContainer.scrollTop=i,t.quill.focus()}),1)}}},{key:"prepareMatching",value:function(){var e=this,t=[],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:t.push(s);break;default:[].forEach.call(e.container.querySelectorAll(a),(function(e){e[_]=e[_]||[],e[_].push(s)}))}})),[t,n]}}]),t}(f.default);function C(e,t,n){return"object"===(void 0===t?"undefined":r(t))?Object.keys(t).reduce((function(e,n){return C(e,n,t[n])}),e):e.reduce((function(e,r){return r.attributes&&r.attributes[t]?e.push(r):e.insert(r.insert,(0,a.default)({},x({},t,n),r.attributes))}),new s.default)}function A(e){if(e.nodeType!==Node.ELEMENT_NODE)return{};var t="__ql-computed-style";return e[t]||(e[t]=window.getComputedStyle(e))}function M(e,t){for(var n="",r=e.ops.length-1;r>=0&&n.length<t.length;--r){var i=e.ops[r];if("string"!=typeof i.insert)break;n=i.insert+n}return n.slice(-1*t.length)===t}function k(e){if(0===e.childNodes.length)return!1;var t=A(e);return["block","list-item"].indexOf(t.display)>-1}function T(e,t,n){return e.nodeType===e.TEXT_NODE?n.reduce((function(t,n){return n(e,t)}),new s.default):e.nodeType===e.ELEMENT_NODE?[].reduce.call(e.childNodes||[],(function(r,i){var o=T(i,t,n);return i.nodeType===e.ELEMENT_NODE&&(o=t.reduce((function(e,t){return t(i,e)}),o),o=(i[_]||[]).reduce((function(e,t){return t(i,e)}),o)),r.concat(o)}),new s.default):new s.default}function D(e,t,n){return C(n,e,!0)}function j(e,t){var n=u.default.Attributor.Attribute.keys(e),r=u.default.Attributor.Class.keys(e),i=u.default.Attributor.Style.keys(e),o={};return n.concat(r).concat(i).forEach((function(t){var n=u.default.query(t,u.default.Scope.ATTRIBUTE);null!=n&&(o[n.attrName]=n.value(e),o[n.attrName])||(null==(n=O[t])||n.attrName!==t&&n.keyName!==t||(o[n.attrName]=n.value(e)||void 0),null==(n=N[t])||n.attrName!==t&&n.keyName!==t||(n=N[t],o[n.attrName]=n.value(e)||void 0))})),Object.keys(o).length>0&&(t=C(t,o)),t}function P(e,t){var n=u.default.query(e);if(null==n)return t;if(n.prototype instanceof u.default.Embed){var r={},i=n.value(e);null!=i&&(r[n.blotName]=i,t=(new s.default).insert(r,n.formats(e)))}else"function"==typeof n.formats&&(t=C(t,n.blotName,n.formats(e)));return t}function I(e,t){return M(t,"\n")||(k(e)||t.length()>0&&e.nextSibling&&k(e.nextSibling))&&t.insert("\n"),t}function R(e,t){if(k(e)&&null!=e.nextElementSibling&&!M(t,"\n\n")){var n=e.offsetHeight+parseFloat(A(e).marginTop)+parseFloat(A(e).marginBottom);e.nextElementSibling.offsetTop>e.offsetTop+1.5*n&&t.insert("\n")}return t}function L(e,t){var n=e.data;if("O:P"===e.parentNode.tagName)return t.insert(n.trim());if(0===n.trim().length&&e.parentNode.classList.contains("ql-clipboard"))return t;if(!A(e.parentNode).whiteSpace.startsWith("pre")){var r=function(e,t){return(t=t.replace(/[^\u00a0]/g,"")).length<1&&e?" ":t};n=(n=n.replace(/\r\n/g," ").replace(/\n/g," ")).replace(/\s\s+/g,r.bind(r,!0)),(null==e.previousSibling&&k(e.parentNode)||null!=e.previousSibling&&k(e.previousSibling))&&(n=n.replace(/^\s+/,r.bind(r,!1))),(null==e.nextSibling&&k(e.parentNode)||null!=e.nextSibling&&k(e.nextSibling))&&(n=n.replace(/\s+$/,r.bind(r,!1)))}return t.insert(n)}E.DEFAULTS={matchers:[],matchVisual:!0},t.default=E,t.matchAttributor=j,t.matchBlot=P,t.matchNewline=I,t.matchSpacing=R,t.matchText=L},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(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(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"optimize",value:function(e){o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return o(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),t}(((r=n(6))&&r.__esModule?r:{default:r}).default);a.blotName="bold",a.tagName=["STRONG","B"],t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addControls=t.default=void 0;var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=c(n(2)),a=c(n(0)),s=c(n(5)),u=c(n(10)),l=c(n(9));function c(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var h=(0,u.default)("quill:toolbar"),d=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i,o=f(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));if(Array.isArray(o.options.container)){var a=document.createElement("div");m(a,o.options.container),e.container.parentNode.insertBefore(a,e.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(e){o.addHandler(e,o.options.handlers[e])})),[].forEach.call(o.container.querySelectorAll("button, select"),(function(e){o.attach(e)})),o.quill.on(s.default.events.EDITOR_CHANGE,(function(e,t){e===s.default.events.SELECTION_CHANGE&&o.update(t)})),o.quill.on(s.default.events.SCROLL_OPTIMIZE,(function(){var e=o.quill.selection.getRange(),t=r(e,1)[0];o.update(t)})),o):(i=h.error("Container required for toolbar",o.options),f(o,i))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"addHandler",value:function(e,t){this.handlers[e]=t}},{key:"attach",value:function(e){var t=this,n=[].find.call(e.classList,(function(e){return 0===e.indexOf("ql-")}));if(n){if(n=n.slice(3),"BUTTON"===e.tagName&&e.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,e);if(null==a.default.query(n))return void h.warn("ignoring attaching to nonexistent format",n,e)}var i="SELECT"===e.tagName?"change":"click";e.addEventListener(i,(function(i){var u=void 0;if("SELECT"===e.tagName){if(e.selectedIndex<0)return;var l=e.options[e.selectedIndex];u=!l.hasAttribute("selected")&&(l.value||!1)}else u=!e.classList.contains("ql-active")&&(e.value||!e.hasAttribute("value")),i.preventDefault();t.quill.focus();var c=t.quill.selection.getRange(),f=r(c,1)[0];if(null!=t.handlers[n])t.handlers[n].call(t,u);else if(a.default.query(n).prototype instanceof a.default.Embed){if(!(u=prompt("Enter "+n)))return;t.quill.updateContents((new o.default).retain(f.index).delete(f.length).insert(function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},n,u)),s.default.sources.USER)}else t.quill.format(n,u,s.default.sources.USER);t.update(f)})),this.controls.push([n,e])}}},{key:"update",value:function(e){var t=null==e?{}:this.quill.getFormat(e);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==e)s=null;else if(null==t[o])s=a.querySelector("option[selected]");else if(!Array.isArray(t[o])){var u=t[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==e)a.classList.remove("ql-active");else if(a.hasAttribute("value")){var l=t[o]===a.getAttribute("value")||null!=t[o]&&t[o].toString()===a.getAttribute("value")||null==t[o]&&!a.getAttribute("value");a.classList.toggle("ql-active",l)}else a.classList.toggle("ql-active",null!=t[o])}))}}]),t}(l.default);function p(e,t,n){var r=document.createElement("button");r.setAttribute("type","button"),r.classList.add("ql-"+t),null!=n&&(r.value=n),e.appendChild(r)}function m(e,t){Array.isArray(t[0])||(t=[t]),t.forEach((function(t){var n=document.createElement("span");n.classList.add("ql-formats"),t.forEach((function(e){if("string"==typeof e)p(n,e);else{var t=Object.keys(e)[0],r=e[t];Array.isArray(r)?function(e,t,n){var r=document.createElement("select");r.classList.add("ql-"+t),n.forEach((function(e){var t=document.createElement("option");!1!==e?t.setAttribute("value",e):t.setAttribute("selected","selected"),r.appendChild(t)})),e.appendChild(r)}(n,t,r):p(n,t,r)}})),e.appendChild(n)}))}d.DEFAULTS={},d.DEFAULTS={container:null,handlers:{clean:function(){var e=this,t=this.quill.getSelection();if(null!=t)if(0==t.length){var n=this.quill.getFormat();Object.keys(n).forEach((function(t){null!=a.default.query(t,a.default.Scope.INLINE)&&e.quill.format(t,!1)}))}else this.quill.removeFormat(t,s.default.sources.USER)},direction:function(e){var t=this.quill.getFormat().align;"rtl"===e&&null==t?this.quill.format("align","right",s.default.sources.USER):e||"right"!==t||this.quill.format("align",!1,s.default.sources.USER),this.quill.format("direction",e,s.default.sources.USER)},indent:function(e){var t=this.quill.getSelection(),n=this.quill.getFormat(t),r=parseInt(n.indent||0);if("+1"===e||"-1"===e){var i="+1"===e?1:-1;"rtl"===n.direction&&(i*=-1),this.quill.format("indent",r+i,s.default.sources.USER)}},link:function(e){!0===e&&(e=prompt("Enter link URL:")),this.quill.format("link",e,s.default.sources.USER)},list:function(e){var t=this.quill.getSelection(),n=this.quill.getFormat(t);"check"===e?"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",e,s.default.sources.USER)}}},t.default=d,t.addControls=m},function(e,t){e.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(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(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(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.label.innerHTML=n,r.container.classList.add("ql-color-picker"),[].slice.call(r.container.querySelectorAll(".ql-picker-item"),0,7).forEach((function(e){e.classList.add("ql-primary")})),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"buildItem",value:function(e){var n=o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"buildItem",this).call(this,e);return n.style.backgroundColor=e.getAttribute("value")||"",n}},{key:"selectItem",value:function(e,n){o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"selectItem",this).call(this,e,n);var r=this.label.querySelector(".ql-color-label"),i=e&&e.getAttribute("data-value")||"";r&&("line"===r.tagName?r.style.stroke=i:r.style.fill=i)}}]),t}(((r=n(28))&&r.__esModule?r:{default:r}).default);t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(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(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.container.classList.add("ql-icon-picker"),[].forEach.call(r.container.querySelectorAll(".ql-picker-item"),(function(e){e.innerHTML=n[e.getAttribute("data-value")||""]})),r.defaultItem=r.container.querySelector(".ql-selected"),r.selectItem(r.defaultItem),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"selectItem",value:function(e,n){o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"selectItem",this).call(this,e,n),e=e||this.defaultItem,this.label.innerHTML=e.innerHTML}}]),t}(((r=n(28))&&r.__esModule?r:{default:r}).default);t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(t,n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.quill=t,this.boundsContainer=n||document.body,this.root=t.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(e,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(e){var t=e.left+e.width/2-this.root.offsetWidth/2,n=e.bottom+this.quill.root.scrollTop;this.root.style.left=t+"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=t+o+"px"),i.left<r.left&&(o=r.left-i.left,this.root.style.left=t+o+"px"),i.bottom>r.bottom){var a=i.bottom-i.top,s=e.bottom-e.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")}}]),e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(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 e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),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(e){return e&&e.__esModule?e:{default:e}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function m(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var g=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],v=function(e){function t(e,n){d(this,t),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=g);var r=p(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.quill.container.classList.add("ql-snow"),r}return m(t,e),i(t,[{key:"extendToolbar",value:function(e){e.container.classList.add("ql-snow"),this.buildButtons([].slice.call(e.container.querySelectorAll("button")),f.default),this.buildPickers([].slice.call(e.container.querySelectorAll("select")),f.default),this.tooltip=new y(this.quill,this.options.bounds),e.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},(function(t,n){e.handlers.link.call(e,!n.format.link)}))}}]),t}(u.default);v.DEFAULTS=(0,o.default)(!0,{},u.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(e){if(e){var t=this.quill.getSelection();if(null==t||0==t.length)return;var n=this.quill.getText(t);/^\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(e){function t(e,n){d(this,t);var r=p(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.preview=r.root.querySelector("a.ql-preview"),r}return m(t,e),i(t,[{key:"listen",value:function(){var e=this;r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",(function(t){e.root.classList.contains("ql-editing")?e.save():e.edit("link",e.preview.textContent),t.preventDefault()})),this.root.querySelector("a.ql-remove").addEventListener("click",(function(t){if(null!=e.linkRange){var n=e.linkRange;e.restoreFocus(),e.quill.formatText(n,"link",!1,a.default.sources.USER),delete e.linkRange}t.preventDefault(),e.hide()})),this.quill.on(a.default.events.SELECTION_CHANGE,(function(t,n,r){if(null!=t){if(0===t.length&&r===a.default.sources.USER){var i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}(e.quill.scroll.descendant(l.default,t.index),2),o=i[0],s=i[1];if(null!=o){e.linkRange=new c.Range(t.index-s,o.length());var u=l.default.formats(o.domNode);return e.preview.textContent=u,e.preview.setAttribute("href",u),e.show(),void e.position(e.quill.getBounds(e.linkRange))}}else delete e.linkRange;e.hide()}}))}},{key:"show",value:function(){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),t}(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(""),t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__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)),E=I(n(75)),C=I(n(57)),A=I(n(41)),M=I(n(28)),k=I(n(59)),T=I(n(60)),D=I(n(61)),j=I(n(108)),P=I(n(62));function I(e){return e&&e.__esModule?e:{default:e}}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":E.default,"modules/toolbar":C.default,"themes/bubble":j.default,"themes/snow":P.default,"ui/icons":A.default,"ui/picker":M.default,"ui/icon-picker":T.default,"ui/color-picker":k.default,"ui/tooltip":D.default},!0),t.default=r.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IndentClass=void 0;var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(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(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"add",value:function(e,n){if("+1"===n||"-1"===n){var r=this.value(e)||0;n="+1"===n?r+1:r-1}return 0===n?(this.remove(e),!0):o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"add",this).call(this,e,n)}},{key:"canAdd",value:function(e,n){return o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"canAdd",this).call(this,e,n)||o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"canAdd",this).call(this,e,parseInt(n))}},{key:"value",value:function(e){return parseInt(o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e))||void 0}}]),t}(a.default.Attributor.Class),u=new s("indent","ql-indent",{scope:a.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});t.IndentClass=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=n(4))&&r.__esModule?r:{default:r}).default);i.blotName="blockquote",i.tagName="blockquote",t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,null,[{key:"formats",value:function(e){return this.tagName.indexOf(e.tagName)+1}}]),t}(((r=n(4))&&r.__esModule?r:{default:r}).default);o.blotName="header",o.tagName=["H1","H2","H3","H4","H5","H6"],t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ListItem=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(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(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var h=function(e){function t(){return l(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return f(t,e),r(t,[{key:"format",value:function(e,n){e!==d.blotName||n?i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n):this.replaceWith(o.default.create(this.statics.scope))}},{key:"remove",value:function(){null==this.prev&&null==this.next?this.parent.remove():i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(e,n){return this.parent.isolate(this.offset(this.parent),this.length()),e===this.parent.statics.blotName?(this.parent.replaceWith(e,n),this):(this.parent.unwrap(),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replaceWith",this).call(this,e,n))}}],[{key:"formats",value:function(e){return e.tagName===this.tagName?void 0:i(t.__proto__||Object.getPrototypeOf(t),"formats",this).call(this,e)}}]),t}(a.default);h.blotName="list-item",h.tagName="LI";var d=function(e){function t(e){l(this,t);var n=c(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),r=function(t){if(t.target.parentNode===e){var r=n.statics.formats(e),i=o.default.find(t.target);"checked"===r?i.format("list","unchecked"):"unchecked"===r&&i.format("list","checked")}};return e.addEventListener("touchstart",r),e.addEventListener("mousedown",r),n}return f(t,e),r(t,null,[{key:"create",value:function(e){var n="ordered"===e?"OL":"UL",r=i(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,n);return"checked"!==e&&"unchecked"!==e||r.setAttribute("data-checked","checked"===e),r}},{key:"formats",value:function(e){return"OL"===e.tagName?"ordered":"UL"===e.tagName?e.hasAttribute("data-checked")?"true"===e.getAttribute("data-checked")?"checked":"unchecked":"bullet":void 0}}]),r(t,[{key:"format",value:function(e,t){this.children.length>0&&this.children.tail.format(e,t)}},{key:"formats",value:function(){return e={},t=this.statics.blotName,n=this.statics.formats(this.domNode),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}},{key:"insertBefore",value:function(e,n){if(e instanceof h)i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n);else{var r=null==n?this.length():n.offset(this),o=this.split(r);o.parent.insertBefore(e,o)}}},{key:"optimize",value:function(e){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e);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(e){if(e.statics.blotName!==this.statics.blotName){var n=o.default.create(this.statics.defaultChild);e.moveChildren(n),this.appendChild(n)}i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replace",this).call(this,e)}}]),t}(s.default);d.blotName="list",d.scope=o.default.Scope.BLOCK_BLOT,d.tagName=["OL","UL"],d.defaultChild="list-item",d.allowedChildren=[h],t.ListItem=h,t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=n(56))&&r.__esModule?r:{default:r}).default);i.blotName="italic",i.tagName=["EM","I"],t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(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(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,null,[{key:"create",value:function(e){return"super"===e?document.createElement("sup"):"sub"===e?document.createElement("sub"):o(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e)}},{key:"formats",value:function(e){return"SUB"===e.tagName?"sub":"SUP"===e.tagName?"super":void 0}}]),t}(((r=n(6))&&r.__esModule?r:{default:r}).default);a.blotName="script",a.tagName=["SUB","SUP"],t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=n(6))&&r.__esModule?r:{default:r}).default);i.blotName="strike",i.tagName="S",t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=n(6))&&r.__esModule?r:{default:r}).default);i.blotName="underline",i.tagName="U",t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(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(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"format",value:function(e,n){u.indexOf(e)>-1?n?this.domNode.setAttribute(e,n):this.domNode.removeAttribute(e):o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}],[{key:"create",value:function(e){var n=o(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return"string"==typeof e&&n.setAttribute("src",this.sanitize(e)),n}},{key:"formats",value:function(e){return u.reduce((function(t,n){return e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t}),{})}},{key:"match",value:function(e){return/\.(jpe?g|gif|png)$/.test(e)||/^data:image\/.+;base64/.test(e)}},{key:"sanitize",value:function(e){return(0,s.sanitize)(e,["http","https","data"])?e:"//:0"}},{key:"value",value:function(e){return e.getAttribute("src")}}]),t}(a.default.Embed);l.blotName="image",l.tagName="IMG",t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(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(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"format",value:function(e,n){u.indexOf(e)>-1?n?this.domNode.setAttribute(e,n):this.domNode.removeAttribute(e):o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}],[{key:"create",value:function(e){var n=o(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen",!0),n.setAttribute("src",this.sanitize(e)),n}},{key:"formats",value:function(e){return u.reduce((function(t,n){return e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t}),{})}},{key:"sanitize",value:function(e){return s.default.sanitize(e)}},{key:"value",value:function(e){return e.getAttribute("src")}}]),t}(a.BlockEmbed);l.blotName="video",l.className="ql-video",l.tagName="IFRAME",t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.FormulaBlot=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(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(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var h=function(e){function t(){return l(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return f(t,e),r(t,null,[{key:"create",value:function(e){var n=i(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return"string"==typeof e&&(window.katex.render(e,n,{throwOnError:!1,errorColor:"#f00"}),n.setAttribute("data-value",e)),n}},{key:"value",value:function(e){return e.getAttribute("data-value")}}]),t}(o.default);h.blotName="formula",h.className="ql-formula",h.tagName="SPAN";var d=function(e){function t(){l(this,t);var e=c(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));if(null==window.katex)throw new Error("Formula module requires KaTeX.");return e}return f(t,e),r(t,null,[{key:"register",value:function(){a.default.register(h,!0)}}]),t}(s.default);t.FormulaBlot=h,t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.CodeToken=t.CodeBlock=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(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(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var h=function(e){function t(){return l(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return f(t,e),r(t,[{key:"replaceWith",value:function(e){this.domNode.textContent=this.domNode.textContent,this.attach(),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replaceWith",this).call(this,e)}},{key:"highlight",value:function(e){var t=this.domNode.textContent;this.cachedText!==t&&((t.trim().length>0||null==this.cachedText)&&(this.domNode.innerHTML=e(t),this.domNode.normalize(),this.attach()),this.cachedText=t)}}]),t}(u(n(13)).default);h.className="ql-syntax";var d=new o.default.Attributor.Class("token","hljs",{scope:o.default.Scope.INLINE}),p=function(e){function t(e,n){l(this,t);var r=c(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,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(t,e),r(t,null,[{key:"register",value:function(){a.default.register(d,!0),a.default.register(h,!0)}}]),r(t,[{key:"highlight",value:function(){var e=this;if(!this.quill.selection.composing){this.quill.update(a.default.sources.USER);var t=this.quill.getSelection();this.quill.scroll.descendants(h).forEach((function(t){t.highlight(e.options.highlight)})),this.quill.update(a.default.sources.SILENT),null!=t&&this.quill.setSelection(t,a.default.sources.SILENT)}}}]),t}(s.default);p.DEFAULTS={highlight:null==window.hljs?null:function(e){return window.hljs.highlightAuto(e).value},interval:1e3},t.CodeBlock=h,t.CodeToken=d,t.default=p},function(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BubbleTooltip=void 0;var r=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(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 e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=f(n(3)),a=f(n(8)),s=n(43),u=f(s),l=n(15),c=f(n(41));function f(e){return e&&e.__esModule?e:{default:e}}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var m=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],g=function(e){function t(e,n){h(this,t),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=m);var r=d(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.quill.container.classList.add("ql-bubble"),r}return p(t,e),i(t,[{key:"extendToolbar",value:function(e){this.tooltip=new v(this.quill,this.options.bounds),this.tooltip.root.appendChild(e.container),this.buildButtons([].slice.call(e.container.querySelectorAll("button")),c.default),this.buildPickers([].slice.call(e.container.querySelectorAll("select")),c.default)}}]),t}(u.default);g.DEFAULTS=(0,o.default)(!0,{},u.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(e){e?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var v=function(e){function t(e,n){h(this,t);var r=d(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.quill.on(a.default.events.EDITOR_CHANGE,(function(e,t,n,i){if(e===a.default.events.SELECTION_CHANGE)if(null!=t&&t.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(t.index,t.length);if(1===o.length)r.position(r.quill.getBounds(t));else{var s=o[o.length-1],u=r.quill.getIndex(s),c=Math.min(s.length()-1,t.index+t.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(t,e),i(t,[{key:"listen",value:function(){var e=this;r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",(function(){e.root.classList.remove("ql-editing")})),this.quill.on(a.default.events.SCROLL_OPTIMIZE,(function(){setTimeout((function(){if(!e.root.classList.contains("ql-hidden")){var t=e.quill.getSelection();null!=t&&e.position(e.quill.getBounds(t))}}),1)}))}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(e){var n=r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"position",this).call(this,e),i=this.root.querySelector(".ql-tooltip-arrow");if(i.style.marginLeft="",0===n)return n;i.style.marginLeft=-1*n-i.offsetWidth/2+"px"}}]),t}(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(""),t.BubbleTooltip=v,t.default=g},function(e,t,n){e.exports=n(63)}]).default},e.exports=t()},24561:function(e,t,n){"use strict";var r=n(67294),i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i.apply(this,arguments)},o=function(){return Math.random().toString(36).substring(2)},a=function(e){var t=e.rtl,n=e.speed,a=e.interval,s=e.style,u=e.width,l=e.height,c=e.baseUrl,f=e.gradientRatio,h=e.animate,d=e.ariaLabel,p=e.children,m=e.className,g=e.uniquekey,v=e.primaryColor,y=e.primaryOpacity,b=e.secondaryColor,x=e.secondaryOpacity,w=e.preserveAspectRatio,_=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,["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=t?{transform:"scaleX(-1)"}:{},E="0; "+a+"; 1",C=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:E,dur:C,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:E,dur:C,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:E,dur:C,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(e){return(0,r.createElement)("rect",{x:"0",y:"0",rx:"5",ry:"5",width:e.width,height:e.height})};t.ZP=function(e){var t=i(i({},s),e);return(0,r.createElement)(a,i({},t),e.children||(0,r.createElement)(u,i({},t)))}},35639:function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(67294),a=u(o),s=u(n(45697));function u(e){return e&&e.__esModule?e:{default:e}}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(e,t){t.style.fontSize=e.fontSize,t.style.fontFamily=e.fontFamily,t.style.fontWeight=e.fontWeight,t.style.fontStyle=e.fontStyle,t.style.letterSpacing=e.letterSpacing,t.style.textTransform=e.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(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.inputRef=function(e){n.input=e,"function"==typeof n.props.inputRef&&n.props.inputRef(e)},n.placeHolderSizerRef=function(e){n.placeHolderSizer=e},n.sizerRef=function(e){n.sizer=e},n.state={inputWidth:e.minWidth,inputId:e.id||d(),prevId:e.id},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,null,[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.id;return n!==t.prevId?{inputId:n||d(),prevId:n}:null}}]),i(t,[{key:"componentDidMount",value:function(){this.mounted=!0,this.copyInputStyles(),this.updateInputWidth()}},{key:"componentDidUpdate",value:function(e,t){t.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 e=this.input&&window.getComputedStyle(this.input);e&&(f(e,this.sizer),this.placeHolderSizer&&f(e,this.placeHolderSizer))}}},{key:"updateInputWidth",value:function(){if(this.mounted&&this.sizer&&void 0!==this.sizer.scrollWidth){var e=void 0;e=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,(e+="number"===this.props.type&&void 0===this.props.extraWidth?16:parseInt(this.props.extraWidth)||0)<this.props.minWidth&&(e=this.props.minWidth),e!==this.state.inputWidth&&this.setState({inputWidth:e})}}},{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 e=this.props.injectStyles;return h&&e?a.default.createElement("style",{dangerouslySetInnerHTML:{__html:"input#"+this.state.inputId+"::-ms-clear {display: none;}"}}):null}},{key:"render",value:function(){var e=[this.props.defaultValue,this.props.value,""].reduce((function(e,t){return null!=e?e:t})),t=r({},this.props.style);t.display||(t.display="inline-block");var n=r({boxSizing:"content-box",width:this.state.inputWidth+"px"},this.props.inputStyle),i=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(this.props,[]);return function(e){c.forEach((function(t){return delete e[t]}))}(i),i.className=this.props.inputClassName,i.id=this.state.inputId,i.style=n,a.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),a.default.createElement("input",r({},i,{ref:this.inputRef})),a.default.createElement("div",{ref:this.sizerRef,style:l},e),this.props.placeholder?a.default.createElement("div",{ref:this.placeHolderSizerRef,style:l},this.props.placeholder):null)}}]),t}(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},t.Z=p},64777:function(e,t,n){"use strict";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(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e,t,n){return t&&p(e.prototype,t),n&&p(e,n),e}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){g(e,t,n[t])}))}return e}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function b(e,t){return b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},b(e,t)}function x(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var w=function(e){var t=e.classes,n=e.classNames,i=e.styles,o=e.closeIconSize,a=e.closeIconSvgPath,s=e.onClickCloseIcon,u=e.id;return r.createElement("button",{className:l()(t.closeButton,n.closeButton),style:i.closeButton,onClick:s,id:u},r.createElement("svg",{className:l()(t.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(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"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=e:i.appendChild(document.createTextNode(e))}}(".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(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=function(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?x(e):t}(this,y(t).call(this,e)),g(x(n),"shouldClose",null),g(x(n),"handleOpen",(function(){var e;e=x(n),-1===_.indexOf(e)&&_.push(e),S&&!n.props.container&&document.body.appendChild(n.container),n.props.blockScroll&&t.blockScroll(),document.addEventListener("keydown",n.handleKeydown)})),g(x(n),"handleClose",(function(){var e,r;e=x(n),-1!==(r=_.indexOf(e))&&_.splice(r,1),n.props.blockScroll&&t.unblockScroll(),S&&!n.props.container&&document.body.removeChild(n.container),document.removeEventListener("keydown",n.handleKeydown)})),g(x(n),"handleClickOverlay",(function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose?(n.props.onOverlayClick&&n.props.onOverlayClick(e),n.props.closeOnOverlayClick&&n.props.onClose(e),n.shouldClose=null):n.shouldClose=null})),g(x(n),"handleClickCloseIcon",(function(e){n.props.onClose(e)})),g(x(n),"handleKeydown",(function(e){var t;27===e.keyCode&&(t=x(n),_.length&&_[_.length-1]===t)&&(n.props.onEscKeyDown&&n.props.onEscKeyDown(e),n.props.closeOnEsc&&n.props.onClose(e))})),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&&t.unblockScroll()})),n.container=S&&document.createElement("div"),n.state={showPortal:n.props.open},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&b(e,t)}(t,e),m(t,null,[{key:"blockScroll",value:function(){f().on()}}]),m(t,[{key:"componentDidMount",value:function(){this.props.open&&this.handleOpen()}},{key:"componentDidUpdate",value:function(e,t){t.showPortal&&!this.state.showPortal?this.handleClose():!e.open&&this.props.open&&this.handleOpen()}},{key:"componentWillUnmount",value:function(){this.state.showPortal&&this.handleClose()}},{key:"render",value:function(){var e=this.props,t=e.open,n=e.center,o=e.classes,a=e.classNames,u=e.styles,c=e.showCloseIcon,f=e.closeIconSize,h=e.closeIconSvgPath,p=e.animationDuration,m=e.focusTrapped,g=e.focusTrapOptions,y=e.overlayId,b=e.modalId,x=e.closeIconId,_=e.role,S=e.ariaLabelledby,O=e.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:t,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(e,t){return!t.showPortal&&e.open?{showPortal:!0}:null}}]),t}(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},t.Z=O},4371:function(e,t,n){"use strict";n.d(t,{ZP:function(){return R}});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(e,t){var n=Object.create(null);return e&&f.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&(0,f.isValidElement)(e)?t(e):e}(e)})),n}function x(e,t,n){return null!=n[t]?n[t]:e.props[t]}function w(e,t,n){var r=b(e.children),i=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),o=[];for(var a in e)a in t?o.length&&(i[a]=o,o=[]):o.push(a);var s={};for(var u in t){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}(t,r);return Object.keys(i).forEach((function(o){var a=i[o];if((0,f.isValidElement)(a)){var s=o in t,u=o in r,l=t[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",e),enter:x(a,"enter",e)})):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",e),enter:x(a,"enter",e)})}})),i}var _=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},S=function(e){function t(t,n){var r,i=(r=e.call(this,t,n)||this).handleExited.bind((0,g.Z)(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}(0,v.Z)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,r,i=t.children,o=t.handleExited;return{children:t.firstRender?(n=e,r=o,b(n.children,(function(e){return(0,f.cloneElement)(e,{onExited:r.bind(null,e),in:!0,appear:x(e,"appear",n),enter:x(e,"enter",n),exit:x(e,"exit",n)})}))):w(e,i,o),firstRender:!1}},n.handleExited=function(e,t){var n=b(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=(0,i.Z)({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=(0,m.Z)(e,["component","childFactory"]),i=this.state.contextValue,o=_(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?f.createElement(y.Z.Provider,{value:i},o):f.createElement(y.Z.Provider,{value:i},f.createElement(t,r,o))},t}(f.Component);S.propTypes={},S.defaultProps={component:"div",childFactory:function(e){return e}};var O=S;function N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var C=function(e){var t=e.component,n=e.duration,o=void 0===n?1:n,a=e.in,s=(e.onExited,(0,r.Z)(e,["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(e){var n={style:E({},u[e])};return f.createElement(t,(0,i.Z)({innerProps:n},s))}))},A=function(e){(0,u.Z)(i,e);var t,n,r=(t=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(e){return!1}}(),function(){var e,r=(0,c.Z)(t);if(n){var i=(0,c.Z)(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return(0,l.Z)(this,e)});function i(){var e;(0,a.Z)(this,i);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return(e=r.call.apply(r,[this].concat(n))).duration=260,e.rafID=void 0,e.state={width:"auto"},e.transition={exiting:{width:0,transition:"width ".concat(e.duration,"ms ease-out")},exited:{width:0}},e.getWidth=function(t){t&&isNaN(e.state.width)&&(e.rafID=window.requestAnimationFrame((function(){var n=t.getBoundingClientRect().width;e.setState({width:n})})))},e.getStyle=function(e){return{overflow:"hidden",whiteSpace:"nowrap",width:e}},e.getTransition=function(t){return e.transition[t]},e}return(0,s.Z)(i,[{key:"componentWillUnmount",value:function(){this.rafID&&window.cancelAnimationFrame(this.rafID)}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.in,i=this.state.width;return f.createElement(p.ZP,{enter:!1,mountOnEnter:!0,unmountOnExit:!0,in:r,timeout:this.duration},(function(t){var r=E(E({},e.getStyle(i)),e.getTransition(t));return f.createElement("div",{ref:e.getWidth,style:r},n)}))}}]),i}(f.Component),M=function(e){return function(t){var n=t.in,o=t.onExited,a=(0,r.Z)(t,["in","onExited"]);return f.createElement(A,{in:n,onExited:o},f.createElement(e,(0,i.Z)({cropWithEllipsis:n},a)))}},k=function(e){return function(t){return f.createElement(C,(0,i.Z)({component:e,duration:t.isMulti?260:1},t))}},T=function(e){return function(t){return f.createElement(C,(0,i.Z)({component:e},t))}},D=function(e){return function(t){return f.createElement(O,(0,i.Z)({component:e},t))}};function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var P=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=(0,d.y)({components:t}),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(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({Input:(e=i,function(t){t.in,t.onExited,t.appear,t.enter,t.exit;var n=(0,r.Z)(t,["in","onExited","appear","enter","exit"]);return f.createElement(e,n)}),MultiValue:M(a),Placeholder:k(s),SingleValue:T(u),ValueContainer:D(l)},c)},I=P(),R=(I.Input,I.MultiValue,I.Placeholder,I.SingleValue,I.ValueContainer,(0,h.Z)(P,d.B))},53569:function(e,t,n){"use strict";n.d(t,{A:function(){return _},B:function(){return Z},C:function(){return w},D:function(){return E},E:function(){return y},F:function(){return Pe},M:function(){return I},a:function(){return G},b:function(){return fe},c:function(){return oe},d:function(){return ie},e:function(){return me},f:function(){return ae},g:function(){return pe},h:function(){return ye},i:function(){return X},j:function(){return B},k:function(){return R},l:function(){return ue},m:function(){return j},n:function(){return H},o:function(){return _e},p:function(){return Se},q:function(){return Oe},r:function(){return F},s:function(){return Me},t:function(){return ke},u:function(){return Te},v:function(){return K},w:function(){return C},x:function(){return A},y:function(){return Ie},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(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function x(e,t,n){var r=[n];if(t&&e)for(var i in t)t.hasOwnProperty(i)&&t[i]&&r.push("".concat(b(e,i)));return r.filter((function(e){return e})).map((function(e){return String(e).trim()})).join(" ")}var w=function(e){return Array.isArray(e)?e.filter(Boolean):"object"===(0,p.Z)(e)&&null!==e?[e]:[]};function _(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function S(e){return _(e)?window.pageYOffset:e.scrollTop}function O(e,t){_(e)?window.scrollTo(0,t):e.scrollTop=t}function N(e,t){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(e),o=t-i,a=0;!function t(){var s,u=o*((s=(s=a+=10)/n-1)*s*s+1)+i;O(e,u),a<n?window.requestAnimationFrame(t):r(e)}()}function E(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=t.offsetHeight/3;r.bottom+i>n.bottom?O(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+i,e.scrollHeight)):r.top-i<n.top&&O(e,Math.max(t.offsetTop-i,0))}function C(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}function A(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function T(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,c.Z)(e);if(t){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 D=function(e){return"auto"===e?"bottom":e},j=function(e){var t,n=e.placement,r=e.theme,i=r.borderRadius,a=r.spacing,s=r.colors;return t={label:"menu"},(0,o.Z)(t,function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(n),"100%"),(0,o.Z)(t,"backgroundColor",s.neutral0),(0,o.Z)(t,"borderRadius",i),(0,o.Z)(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),(0,o.Z)(t,"marginBottom",a.menuGutter),(0,o.Z)(t,"marginTop",a.menuGutter),(0,o.Z)(t,"position","absolute"),(0,o.Z)(t,"width","100%"),(0,o.Z)(t,"zIndex",1),t},P=(0,f.createContext)({getPortalPlacement:null}),I=function(e){(0,u.Z)(n,e);var t=T(n);function n(){var e;(0,a.Z)(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(e=t.call.apply(t,[this].concat(i))).state={maxHeight:e.props.maxMenuHeight,placement:null},e.getPlacement=function(t){var n=e.props,r=n.minMenuHeight,i=n.maxMenuHeight,o=n.menuPlacement,a=n.menuPosition,s=n.menuShouldScrollIntoView,u=n.theme;if(t){var l="fixed"===a,c=function(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,i=e.placement,o=e.shouldScroll,a=e.isFixedPosition,s=e.theme.spacing,u=function(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/,i=document.documentElement;if("fixed"===t.position)return i;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return i}(n),l={placement:"bottom",maxHeight:t};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,E=c-v-p,C=h-g+v+y,A=v+p-b,M=160;switch(i){case"auto":case"bottom":if(w>=d)return{placement:"bottom",maxHeight:t};if(E>=d&&!a)return o&&N(u,C,M),{placement:"bottom",maxHeight:t};if(!a&&E>=r||a&&w>=r)return o&&N(u,C,M),{placement:"bottom",maxHeight:a?w-y:E-y};if("auto"===i||a){var k=t,T=a?x:_;return T>=r&&(k=Math.min(T-y-s.controlHeight,t)),{placement:"top",maxHeight:k}}if("bottom"===i)return O(u,C),{placement:"bottom",maxHeight:t};break;case"top":if(x>=d)return{placement:"top",maxHeight:t};if(_>=d&&!a)return o&&N(u,A,M),{placement:"top",maxHeight:t};if(!a&&_>=r||a&&x>=r){var D=t;return(!a&&_>=r||a&&x>=r)&&(D=a?x-b:_-b),o&&N(u,A,M),{placement:"top",maxHeight:D}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return l}({maxHeight:i,menuEl:t,minHeight:r,placement:o,shouldScroll:s&&!l,isFixedPosition:l,theme:u}),f=e.context.getPortalPlacement;f&&f(c),e.setState(c)}},e.getUpdatedProps=function(){var t=e.props.menuPlacement,n=e.state.placement||D(t);return k(k({},e.props),{},{placement:n,maxHeight:e.state.maxHeight})},e}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(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},L=function(e){var t=e.theme,n=t.spacing.baseUnit;return{color:t.colors.neutral40,padding:"".concat(2*n,"px ").concat(3*n,"px"),textAlign:"center"}},F=L,B=L,q=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return(0,h.tZ)("div",(0,i.Z)({css:o("noOptionsMessage",e),className:r({"menu-notice":!0,"menu-notice--no-options":!0},n)},a),t)};q.defaultProps={children:"No options"};var z=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return(0,h.tZ)("div",(0,i.Z)({css:o("loadingMessage",e),className:r({"menu-notice":!0,"menu-notice--loading":!0},n)},a),t)};z.defaultProps={children:"Loading..."};var H=function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},U=function(e){(0,u.Z)(n,e);var t=T(n);function n(){var e;(0,a.Z)(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(e=t.call.apply(t,[this].concat(i))).state={placement:null},e.getPortalPlacement=function(t){var n=t.placement;n!==D(e.props.menuPlacement)&&e.setState({placement:n})},e}return(0,s.Z)(n,[{key:"render",value:function(){var e=this.props,t=e.appendTo,n=e.children,r=e.controlElement,i=e.menuPlacement,o=e.menuPosition,a=e.getStyles,s="fixed"===o;if(!t&&!s||!r)return null;var u=this.state.placement||D(i),l=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.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}},t?(0,d.createPortal)(p,t):p)}}]),n}(f.Component),W=Array.isArray,V=Object.keys,$=Object.prototype.hasOwnProperty;function Y(e,t){if(e===t)return!0;if(e&&t&&"object"==(0,p.Z)(e)&&"object"==(0,p.Z)(t)){var n,r,i,o=W(e),a=W(t);if(o&&a){if((r=e.length)!=t.length)return!1;for(n=r;0!=n--;)if(!Y(e[n],t[n]))return!1;return!0}if(o!=a)return!1;var s=e instanceof Date,u=t instanceof Date;if(s!=u)return!1;if(s&&u)return e.getTime()==t.getTime();var l=e instanceof RegExp,c=t instanceof RegExp;if(l!=c)return!1;if(l&&c)return e.toString()==t.toString();var f=V(e);if((r=f.length)!==V(t).length)return!1;for(n=r;0!=n--;)if(!$.call(t,f[n]))return!1;for(n=r;0!=n--;)if(!("_owner"===(i=f[n])&&e.$$typeof||Y(e[i],t[i])))return!1;return!0}return e!=e&&t!=t}function Z(e,t){try{return Y(e,t)}catch(e){if(e.message&&e.message.match(/stack|recursion/i))return console.warn("Warning: react-fast-compare does not handle circular references.",e.name,e.message),!1;throw e}}var G=function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},K=function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:"".concat(t.baseUnit/2,"px ").concat(2*t.baseUnit,"px"),WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}},X=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}};function J(){var e=(0,g.Z)(["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"]);return J=function(){return e},e}var Q={name:"19bqh2r",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0;"},ee=function(e){var t=e.size,n=(0,r.Z)(e,["size"]);return(0,h.tZ)("svg",(0,i.Z)({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Q},n))},te=function(e){return(0,h.tZ)(ee,(0,i.Z)({size:20},e),(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"}))},ne=function(e){return(0,h.tZ)(ee,(0,i.Z)({size:20},e),(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"}))},re=function(e){var t=e.isFocused,n=e.theme,r=n.spacing.baseUnit,i=n.colors;return{label:"indicatorContainer",color:t?i.neutral60:i.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:t?i.neutral80:i.neutral40}}},ie=re,oe=re,ae=function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,i=n.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:t?i.neutral10:i.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},se=(0,h.F4)(J()),ue=function(e){var t=e.isFocused,n=e.size,r=e.theme,i=r.colors,o=r.spacing.baseUnit;return{label:"loadingIndicator",color:t?i.neutral60:i.neutral20,display:"flex",padding:2*o,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},le=function(e){var t=e.delay,n=e.offset;return(0,h.tZ)("span",{css:(0,m.Z)({animation:"".concat(se," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":null,height:"1em",verticalAlign:"top",width:"1em"},"")})},ce=function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps,a=e.isRtl;return(0,h.tZ)("div",(0,i.Z)({},o,{css:r("loadingIndicator",e),className:n({indicator:!0,"loading-indicator":!0},t)}),(0,h.tZ)(le,{delay:0,offset:a}),(0,h.tZ)(le,{delay:160,offset:!0}),(0,h.tZ)(le,{delay:320,offset:!a}))};ce.defaultProps={size:4};var fe=function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,i=r.colors,o=r.borderRadius,a=r.spacing;return{label:"control",alignItems:"center",backgroundColor:t?i.neutral5:i.neutral0,borderColor:t?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 he(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function de(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?he(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):he(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var pe=function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},me=function(e){var t=e.theme.spacing;return{label:"group",color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}};function ge(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ve(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ge(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ge(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ye=function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,i=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:t?"hidden":"visible",color:i.neutral80}},be=function(e){return{label:"input",background:0,border:0,fontSize:"inherit",opacity:e?0:1,outline:0,padding:0,color:"inherit"}};function xe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function we(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xe(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _e=function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{label:"multiValue",backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},Se=function(e){var t=e.theme,n=t.borderRadius,r=t.colors,i=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:i?"ellipsis":null,whiteSpace:"nowrap"}},Oe=function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,i=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&i.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}}},Ne=function(e){var t=e.children,n=e.innerProps;return(0,h.tZ)("div",n,t)},Ee=Ne,Ce=Ne,Ae=function(e){var t=e.children,n=e.className,r=e.components,i=e.cx,o=e.data,a=e.getStyles,s=e.innerProps,u=e.isDisabled,l=e.removeProps,c=e.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:we(we({},s),{},{className:g(m(a("multiValue",e)),i({"multi-value":!0,"multi-value--is-disabled":u},n))}),selectProps:c},(0,h.tZ)(d,{data:o,innerProps:{className:g(m(a("multiValueLabel",e)),i({"multi-value__label":!0},n))},selectProps:c},t),(0,h.tZ)(p,{data:o,innerProps:we({className:g(m(a("multiValueRemove",e)),i({"multi-value__remove":!0},n))},l),selectProps:c}))}))};Ae.defaultProps={cropWithEllipsis:!0};var Me=function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,i=e.theme,o=i.spacing,a=i.colors;return{label:"option",backgroundColor:r?a.primary:n?a.primary25:"transparent",color:t?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:!t&&(r?a.primary:a.primary50)}}},ke=function(e){var t=e.theme,n=t.spacing;return{label:"placeholder",color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},Te=function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,i=n.colors;return{label:"singleValue",color:t?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 De(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function je(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?De(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):De(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Pe={ClearIndicator:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return(0,h.tZ)("div",(0,i.Z)({},a,{css:o("clearIndicator",e),className:r({indicator:!0,"clear-indicator":!0},n)}),t||(0,h.tZ)(te,null))},Control:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.className,a=e.isDisabled,s=e.isFocused,u=e.innerRef,l=e.innerProps,c=e.menuIsOpen;return(0,h.tZ)("div",(0,i.Z)({ref:u,css:r("control",e),className:n({control:!0,"control--is-disabled":a,"control--is-focused":s,"control--menu-is-open":c},o)},l),t)},DropdownIndicator:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return(0,h.tZ)("div",(0,i.Z)({},a,{css:o("dropdownIndicator",e),className:r({indicator:!0,"dropdown-indicator":!0},n)}),t||(0,h.tZ)(ne,null))},DownChevron:ne,CrossIcon:te,Group:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.Heading,s=e.headingProps,u=e.label,l=e.theme,c=e.selectProps;return(0,h.tZ)("div",{css:o("group",e),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,t))},GroupHeading:function(e){var t=e.className,n=e.cx,o=e.getStyles,a=e.theme,s=(e.selectProps,(0,r.Z)(e,["className","cx","getStyles","theme","selectProps"]));return(0,h.tZ)("div",(0,i.Z)({css:o("groupHeading",de({theme:a},s)),className:n({"group-heading":!0},t)},s))},IndicatorsContainer:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles;return(0,h.tZ)("div",{css:i("indicatorsContainer",e),className:r({indicators:!0},n)},t)},IndicatorSeparator:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps;return(0,h.tZ)("span",(0,i.Z)({},o,{css:r("indicatorSeparator",e),className:n({"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,n=e.cx,o=e.getStyles,a=e.innerRef,s=e.isHidden,u=e.isDisabled,l=e.theme,c=(e.selectProps,(0,r.Z)(e,["className","cx","getStyles","innerRef","isHidden","isDisabled","theme","selectProps"]));return(0,h.tZ)("div",{css:o("input",ve({theme:l},c))},(0,h.tZ)(v.Z,(0,i.Z)({className:n({input:!0},t),inputRef:a,inputStyle:be(s),disabled:u},c)))},LoadingIndicator:ce,Menu:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerRef,s=e.innerProps;return(0,h.tZ)("div",(0,i.Z)({css:o("menu",e),className:r({menu:!0},n)},s,{ref:a}),t)},MenuList:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isMulti,s=e.innerRef,u=e.innerProps;return(0,h.tZ)("div",(0,i.Z)({css:o("menuList",e),className:r({"menu-list":!0,"menu-list--is-multi":a},n),ref:s},u),t)},MenuPortal:U,LoadingMessage:z,NoOptionsMessage:q,MultiValue:Ae,MultiValueContainer:Ee,MultiValueLabel:Ce,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return(0,h.tZ)("div",n,t||(0,h.tZ)(te,{size:14}))},Option:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,s=e.isFocused,u=e.isSelected,l=e.innerRef,c=e.innerProps;return(0,h.tZ)("div",(0,i.Z)({css:o("option",e),className:r({option:!0,"option--is-disabled":a,"option--is-focused":s,"option--is-selected":u},n),ref:l},c),t)},Placeholder:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return(0,h.tZ)("div",(0,i.Z)({css:o("placeholder",e),className:r({placeholder:!0},n)},a),t)},SelectContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps,s=e.isDisabled,u=e.isRtl;return(0,h.tZ)("div",(0,i.Z)({css:o("container",e),className:r({"--is-disabled":s,"--is-rtl":u},n)},a),t)},SingleValue:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,s=e.innerProps;return(0,h.tZ)("div",(0,i.Z)({css:o("singleValue",e),className:r({"single-value":!0,"single-value--is-disabled":a},n)},s),t)},ValueContainer:function(e){var t=e.children,n=e.className,r=e.cx,i=e.isMulti,o=e.getStyles,a=e.hasValue;return(0,h.tZ)("div",{css:o("valueContainer",e),className:r({"value-container":!0,"value-container--is-multi":i,"value-container--has-value":a},n)},t)}},Ie=function(e){return je(je({},Pe),e.components)}},20320:function(e,t,n){"use strict";n.d(t,{ZP:function(){return ue}});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(45987),d=n(87462),p=n(40181);function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){l=!0,i=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(e,t)||(0,p.Z)(e,t)||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 g=n(42982),v=n(4942),y=n(97326),b=n(53569),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(e){return e.letters})).join("")+"]","g"),S={},O=0;O<w.length;O++)for(var N=w[O],E=0;E<N.letters.length;E++)S[N.letters[E]]=N.base;var C=function(e){return e.replace(_,(function(e){return S[e]}))};function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var M=function(e){return e.replace(/^\s+|\s+$/g,"")},k=function(e){return"".concat(e.label," ").concat(e.value)},T={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;"},D=function(e){return(0,c.tZ)("span",(0,d.Z)({css:T},e))};function j(e){e.in,e.out,e.onExited,e.appear,e.enter,e.exit;var t=e.innerRef,n=(e.emotion,(0,h.Z)(e,["in","out","onExited","appear","enter","exit","innerRef","emotion"]));return(0,c.tZ)("input",(0,d.Z)({ref:t},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 P=function(e){(0,o.Z)(l,e);var t,n,u=(t=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(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var i=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return(0,a.Z)(this,e)});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),I=["boxSizing","height","overflow","paddingRight","position"],R={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function L(e){e.preventDefault()}function F(e){e.stopPropagation()}function B(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function q(){return"ontouchstart"in window||navigator.maxTouchPoints}var z=!(!window.document||!window.document.createElement),H=0,U=function(e){(0,o.Z)(l,e);var t,n,u=(t=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(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var i=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return(0,a.Z)(this,e)});function l(){var e;(0,r.Z)(this,l);for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=u.call.apply(u,[this].concat(n))).originalStyles={},e.listenerOptions={capture:!1,passive:!1},e}return(0,i.Z)(l,[{key:"componentDidMount",value:function(){var e=this;if(z){var t=this.props,n=t.accountForScrollbars,r=t.touchScrollTarget,i=document.body,o=i&&i.style;if(n&&I.forEach((function(t){var n=o&&o[t];e.originalStyles[t]=n})),n&&H<1){var a=parseInt(this.originalStyles.paddingRight,10)||0,s=document.body?document.body.clientWidth:0,u=window.innerWidth-s+a||0;Object.keys(R).forEach((function(e){var t=R[e];o&&(o[e]=t)})),o&&(o.paddingRight="".concat(u,"px"))}i&&q()&&(i.addEventListener("touchmove",L,this.listenerOptions),r&&(r.addEventListener("touchstart",B,this.listenerOptions),r.addEventListener("touchmove",F,this.listenerOptions))),H+=1}}},{key:"componentWillUnmount",value:function(){var e=this;if(z){var t=this.props,n=t.accountForScrollbars,r=t.touchScrollTarget,i=document.body,o=i&&i.style;H=Math.max(H-1,0),n&&H<1&&I.forEach((function(t){var n=e.originalStyles[t];o&&(o[t]=n)})),i&&q()&&(i.removeEventListener("touchmove",L,this.listenerOptions),r&&(r.removeEventListener("touchstart",B,this.listenerOptions),r.removeEventListener("touchmove",F,this.listenerOptions)))}}},{key:"render",value:function(){return null}}]),l}(u.Component);U.defaultProps={accountForScrollbars:!0};var W={name:"1dsbpcp",styles:"position:fixed;left:0;bottom:0;right:0;top:0;"},V=function(e){(0,o.Z)(l,e);var t,n,u=(t=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(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var i=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return(0,a.Z)(this,e)});function l(){var e;(0,r.Z)(this,l);for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=u.call.apply(u,[this].concat(n))).state={touchScrollTarget:null},e.getScrollTarget=function(t){t!==e.state.touchScrollTarget&&e.setState({touchScrollTarget:t})},e.blurSelectInput=function(){document.activeElement&&document.activeElement.blur()},e}return(0,i.Z)(l,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.isEnabled,r=this.state.touchScrollTarget;return n?(0,c.tZ)("div",null,(0,c.tZ)("div",{onClick:this.blurSelectInput,css:W}),(0,c.tZ)(P,{innerRef:this.getScrollTarget},t),r?(0,c.tZ)(U,{touchScrollTarget:r}):null):t}}]),l}(u.PureComponent);var $=function(e){(0,o.Z)(c,e);var t,n,l=(t=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(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var i=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return(0,a.Z)(this,e)});function c(){var e;(0,r.Z)(this,c);for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=l.call.apply(l,[this].concat(n))).isBottom=!1,e.isTop=!1,e.scrollTarget=void 0,e.touchStart=void 0,e.cancelScroll=function(e){e.preventDefault(),e.stopPropagation()},e.handleEventDelta=function(t,n){var r=e.props,i=r.onBottomArrive,o=r.onBottomLeave,a=r.onTopArrive,s=r.onTopLeave,u=e.scrollTarget,l=u.scrollTop,c=u.scrollHeight,f=u.clientHeight,h=e.scrollTarget,d=n>0,p=c-f-l,m=!1;p>n&&e.isBottom&&(o&&o(t),e.isBottom=!1),d&&e.isTop&&(s&&s(t),e.isTop=!1),d&&n>p?(i&&!e.isBottom&&i(t),h.scrollTop=c,m=!0,e.isBottom=!0):!d&&-n>l&&(a&&!e.isTop&&a(t),h.scrollTop=0,m=!0,e.isTop=!0),m&&e.cancelScroll(t)},e.onWheel=function(t){e.handleEventDelta(t,t.deltaY)},e.onTouchStart=function(t){e.touchStart=t.changedTouches[0].clientY},e.onTouchMove=function(t){var n=e.touchStart-t.changedTouches[0].clientY;e.handleEventDelta(t,n)},e.getScrollTarget=function(t){e.scrollTarget=t},e}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(e){e&&("function"==typeof e.addEventListener&&e.addEventListener("wheel",this.onWheel,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",this.onTouchMove,!1))}},{key:"stopListening",value:function(e){e&&("function"==typeof e.removeEventListener&&e.removeEventListener("wheel",this.onWheel,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",this.onTouchMove,!1))}},{key:"render",value:function(){return u.createElement(P,{innerRef:this.getScrollTarget},this.props.children)}}]),c}(u.Component);function Y(e){var t=e.isEnabled,n=void 0===t||t,r=(0,h.Z)(e,["isEnabled"]);return n?u.createElement($,r):r.children}var Z=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isSearchable,r=t.isMulti,i=t.label,o=t.isDisabled,a=t.tabSelectsValue;switch(e){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"}},G=function(e,t){var n=t.value,r=t.isDisabled;if(n)switch(e){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.")}},K=function(e){return!!e.isDisabled},X={clearIndicator:b.c,container:b.a,control:b.b,dropdownIndicator:b.d,group:b.g,groupHeading:b.e,indicatorsContainer:b.i,indicatorSeparator:b.f,input:b.h,loadingIndicator:b.l,loadingMessage:b.j,menu:b.m,menuList:b.k,menuPortal:b.n,multiValue:b.o,multiValueLabel:b.p,multiValueRemove:b.q,noOptionsMessage:b.r,option:b.s,placeholder:b.t,singleValue:b.u,valueContainer:b.v},J={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 Q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(n),!0).forEach((function(t){(0,v.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var te={backspaceRemovesValue:!0,blurInputOnSelect:(0,b.w)(),captureMenuScroll:!(0,b.w)(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){var n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(Object(n),!0).forEach((function(t){(0,v.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({ignoreCase:!0,ignoreAccents:!0,stringify:k,trim:!0,matchFrom:"any"},undefined),r=n.ignoreCase,i=n.ignoreAccents,o=n.stringify,a=n.trim,s=n.matchFrom,u=a?M(t):t,l=a?M(o(e)):o(e);return r&&(u=u.toLowerCase(),l=l.toLowerCase()),i&&(u=C(u),l=C(l)),"start"===s?l.substr(0,u.length)===u:l.indexOf(u)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:K,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!(0,b.x)(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:"0",tabSelectsValue:!0},ne=1,re=function(e){(0,o.Z)(f,e);var t,n,c=(t=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(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var i=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return(0,a.Z)(this,e)});function f(e){var t;(0,r.Z)(this,f),(t=c.call(this,e)).state={ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,menuOptions:{render:[],focusable:[]},selectValue:[]},t.blockOptionHover=!1,t.isComposing=!1,t.clearFocusValueOnUpdate=!1,t.commonProps=void 0,t.components=void 0,t.hasGroups=!1,t.initialTouchX=0,t.initialTouchY=0,t.inputIsHiddenAfterUpdate=void 0,t.instancePrefix="",t.openAfterFocus=!1,t.scrollToFocusedOptionOnUpdate=!1,t.userIsDragging=void 0,t.controlRef=null,t.getControlRef=function(e){t.controlRef=e},t.focusedOptionRef=null,t.getFocusedOptionRef=function(e){t.focusedOptionRef=e},t.menuListRef=null,t.getMenuListRef=function(e){t.menuListRef=e},t.inputRef=null,t.getInputRef=function(e){t.inputRef=e},t.cacheComponents=function(e){t.components=(0,b.y)({components:e})},t.focus=t.focusInput,t.blur=t.blurInput,t.onChange=function(e,n){var r=t.props,i=r.onChange,o=r.name;i(e,ee(ee({},n),{},{name:o}))},t.setValue=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",r=arguments.length>2?arguments[2]:void 0,i=t.props,o=i.closeMenuOnSelect,a=i.isMulti;t.onInputChange("",{action:"set-value"}),o&&(t.inputIsHiddenAfterUpdate=!a,t.onMenuClose()),t.clearFocusValueOnUpdate=!0,t.onChange(e,{action:n,option:r})},t.selectOption=function(e){var n=t.props,r=n.blurInputOnSelect,i=n.isMulti,o=t.state.selectValue;if(i)if(t.isOptionSelected(e,o)){var a=t.getOptionValue(e);t.setValue(o.filter((function(e){return t.getOptionValue(e)!==a})),"deselect-option",e),t.announceAriaLiveSelection({event:"deselect-option",context:{value:t.getOptionLabel(e)}})}else t.isOptionDisabled(e,o)?t.announceAriaLiveSelection({event:"select-option",context:{value:t.getOptionLabel(e),isDisabled:!0}}):(t.setValue([].concat((0,g.Z)(o),[e]),"select-option",e),t.announceAriaLiveSelection({event:"select-option",context:{value:t.getOptionLabel(e)}}));else t.isOptionDisabled(e,o)?t.announceAriaLiveSelection({event:"select-option",context:{value:t.getOptionLabel(e),isDisabled:!0}}):(t.setValue(e,"select-option"),t.announceAriaLiveSelection({event:"select-option",context:{value:t.getOptionLabel(e)}}));r&&t.blurInput()},t.removeValue=function(e){var n=t.state.selectValue,r=t.getOptionValue(e),i=n.filter((function(e){return t.getOptionValue(e)!==r}));t.onChange(i.length?i:null,{action:"remove-value",removedValue:e}),t.announceAriaLiveSelection({event:"remove-value",context:{value:e?t.getOptionLabel(e):""}}),t.focusInput()},t.clearValue=function(){t.onChange(null,{action:"clear"})},t.popValue=function(){var e=t.state.selectValue,n=e[e.length-1],r=e.slice(0,e.length-1);t.announceAriaLiveSelection({event:"pop-value",context:{value:n?t.getOptionLabel(n):""}}),t.onChange(r.length?r:null,{action:"pop-value",removedValue:n})},t.getValue=function(){return t.state.selectValue},t.cx=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return b.z.apply(void 0,[t.props.classNamePrefix].concat(n))},t.getOptionLabel=function(e){return t.props.getOptionLabel(e)},t.getOptionValue=function(e){return t.props.getOptionValue(e)},t.getStyles=function(e,n){var r=X[e](n);r.boxSizing="border-box";var i=t.props.styles[e];return i?i(r,n):r},t.getElementId=function(e){return"".concat(t.instancePrefix,"-").concat(e)},t.getActiveDescendentId=function(){var e=t.props.menuIsOpen,n=t.state,r=n.menuOptions,i=n.focusedOption;if(i&&e){var o=r.focusable.indexOf(i),a=r.render[o];return a&&a.key}},t.announceAriaLiveSelection=function(e){var n=e.event,r=e.context;t.setState({ariaLiveSelection:G(n,r)})},t.announceAriaLiveContext=function(e){var n=e.event,r=e.context;t.setState({ariaLiveContext:Z(n,ee(ee({},r),{},{label:t.props["aria-label"]}))})},t.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),t.focusInput())},t.onMenuMouseMove=function(e){t.blockOptionHover=!1},t.onControlMouseDown=function(e){var n=t.props.openMenuOnClick;t.state.isFocused?t.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&t.onMenuClose():n&&t.openMenu("first"):(n&&(t.openAfterFocus=!0),t.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()},t.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||t.props.isDisabled)){var n=t.props,r=n.isMulti,i=n.menuIsOpen;t.focusInput(),i?(t.inputIsHiddenAfterUpdate=!r,t.onMenuClose()):t.openMenu("first"),e.preventDefault(),e.stopPropagation()}},t.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(t.clearValue(),e.stopPropagation(),t.openAfterFocus=!1,"touchend"===e.type?t.focusInput():setTimeout((function(){return t.focusInput()})))},t.onScroll=function(e){"boolean"==typeof t.props.closeMenuOnScroll?e.target instanceof HTMLElement&&(0,b.A)(e.target)&&t.props.onMenuClose():"function"==typeof t.props.closeMenuOnScroll&&t.props.closeMenuOnScroll(e)&&t.props.onMenuClose()},t.onCompositionStart=function(){t.isComposing=!0},t.onCompositionEnd=function(){t.isComposing=!1},t.onTouchStart=function(e){var n=e.touches,r=n&&n.item(0);r&&(t.initialTouchX=r.clientX,t.initialTouchY=r.clientY,t.userIsDragging=!1)},t.onTouchMove=function(e){var n=e.touches,r=n&&n.item(0);if(r){var i=Math.abs(r.clientX-t.initialTouchX),o=Math.abs(r.clientY-t.initialTouchY);t.userIsDragging=i>5||o>5}},t.onTouchEnd=function(e){t.userIsDragging||(t.controlRef&&!t.controlRef.contains(e.target)&&t.menuListRef&&!t.menuListRef.contains(e.target)&&t.blurInput(),t.initialTouchX=0,t.initialTouchY=0)},t.onControlTouchEnd=function(e){t.userIsDragging||t.onControlMouseDown(e)},t.onClearIndicatorTouchEnd=function(e){t.userIsDragging||t.onClearIndicatorMouseDown(e)},t.onDropdownIndicatorTouchEnd=function(e){t.userIsDragging||t.onDropdownIndicatorMouseDown(e)},t.handleInputChange=function(e){var n=e.currentTarget.value;t.inputIsHiddenAfterUpdate=!1,t.onInputChange(n,{action:"input-change"}),t.props.menuIsOpen||t.onMenuOpen()},t.onInputFocus=function(e){var n=t.props,r=n.isSearchable,i=n.isMulti;t.props.onFocus&&t.props.onFocus(e),t.inputIsHiddenAfterUpdate=!1,t.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:i}}),t.setState({isFocused:!0}),(t.openAfterFocus||t.props.openMenuOnFocus)&&t.openMenu("first"),t.openAfterFocus=!1},t.onInputBlur=function(e){t.menuListRef&&t.menuListRef.contains(document.activeElement)?t.inputRef.focus():(t.props.onBlur&&t.props.onBlur(e),t.onInputChange("",{action:"input-blur"}),t.onMenuClose(),t.setState({focusedValue:null,isFocused:!1}))},t.onOptionHover=function(e){t.blockOptionHover||t.state.focusedOption===e||t.setState({focusedOption:e})},t.shouldHideSelectedOptions=function(){var e=t.props,n=e.hideSelectedOptions,r=e.isMulti;return void 0===n?r:n},t.onKeyDown=function(e){var n=t.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=t.state,p=d.focusedOption,m=d.focusedValue,g=d.selectValue;if(!(u||"function"==typeof c&&(c(e),e.defaultPrevented))){switch(t.blockOptionHover=!0,e.key){case"ArrowLeft":if(!r||a)return;t.focusValue("previous");break;case"ArrowRight":if(!r||a)return;t.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(m)t.removeValue(m);else{if(!i)return;r?t.popValue():s&&t.clearValue()}break;case"Tab":if(t.isComposing)return;if(e.shiftKey||!l||!f||!p||h&&t.isOptionSelected(p,g))return;t.selectOption(p);break;case"Enter":if(229===e.keyCode)break;if(l){if(!p)return;if(t.isComposing)return;t.selectOption(p);break}return;case"Escape":l?(t.inputIsHiddenAfterUpdate=!1,t.onInputChange("",{action:"menu-close"}),t.onMenuClose()):s&&o&&t.clearValue();break;case" ":if(a)return;if(!l){t.openMenu("first");break}if(!p)return;t.selectOption(p);break;case"ArrowUp":l?t.focusOption("up"):t.openMenu("last");break;case"ArrowDown":l?t.focusOption("down"):t.openMenu("first");break;case"PageUp":if(!l)return;t.focusOption("pageup");break;case"PageDown":if(!l)return;t.focusOption("pagedown");break;case"Home":if(!l)return;t.focusOption("first");break;case"End":if(!l)return;t.focusOption("last");break;default:return}e.preventDefault()}},t.buildMenuOptions=function(e,n){var r=e.inputValue,i=void 0===r?"":r,o=e.options,a=function(e,r){var o=t.isOptionDisabled(e,n),a=t.isOptionSelected(e,n),s=t.getOptionLabel(e),u=t.getOptionValue(e);if(!(t.shouldHideSelectedOptions()&&a||!t.filterOption({label:s,value:u,data:e},i))){var l=o?void 0:function(){return t.onOptionHover(e)},c=o?void 0:function(){return t.selectOption(e)},f="".concat(t.getElementId("option"),"-").concat(r);return{innerProps:{id:f,onClick:c,onMouseMove:l,onMouseOver:l,tabIndex:-1},data:e,isDisabled:o,isSelected:a,key:f,label:s,type:"option",value:u}}};return o.reduce((function(e,n,r){if(n.options){t.hasGroups||(t.hasGroups=!0);var i=n.options.map((function(t,n){var i=a(t,"".concat(r,"-").concat(n));return i&&e.focusable.push(t),i})).filter(Boolean);if(i.length){var o="".concat(t.getElementId("group"),"-").concat(r);e.render.push({type:"group",key:o,data:n,options:i})}}else{var s=a(n,"".concat(r));s&&(e.render.push(s),e.focusable.push(n))}return e}),{render:[],focusable:[]})};var n=e.value;t.cacheComponents=(0,l.Z)(t.cacheComponents,b.B).bind((0,y.Z)(t)),t.cacheComponents(e.components),t.instancePrefix="react-select-"+(t.props.instanceId||++ne);var i=(0,b.C)(n);t.buildMenuOptions=(0,l.Z)(t.buildMenuOptions,(function(e,t){var n=m(e,2),r=n[0],i=n[1],o=m(t,2),a=o[0];return i===o[1]&&r.inputValue===a.inputValue&&r.options===a.options})).bind((0,y.Z)(t));var o=e.menuIsOpen?t.buildMenuOptions(e,i):{render:[],focusable:[]};return t.state.menuOptions=o,t.state.selectValue=i,t}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(e){var t=this.props,n=t.options,r=t.value,i=t.menuIsOpen,o=t.inputValue;if(this.cacheComponents(e.components),e.value!==r||e.options!==n||e.menuIsOpen!==i||e.inputValue!==o){var a=(0,b.C)(e.value),s=e.menuIsOpen?this.buildMenuOptions(e,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(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,i=this.state.isFocused;(i&&!n&&e.isDisabled||i&&r&&!e.menuIsOpen)&&this.focusInput(),i&&n&&!e.isDisabled&&this.setState({isFocused:!1},this.onMenuClose),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&((0,b.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 e=this.props,t=e.isSearchable,n=e.isMulti;this.announceAriaLiveContext({event:"input",context:{isSearchable:t,isMulti:n}}),this.onInputChange("",{action:"menu-close"}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=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"===e?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(){t.onMenuOpen(),t.announceAriaLiveContext({event:"menu",context:{tabSelectsValue:u}})}))}},{key:"focusValue",value:function(e){var t=this.props,n=t.isMulti,r=t.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(e){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 e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props,n=t.pageSize,r=t.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"===e?s=u>0?u-1:a.length-1:"down"===e?s=(u+1)%a.length:"pageup"===e?(s=u-n)<0&&(s=0):"pagedown"===e?(s=u+n)>a.length-1&&(s=a.length-1):"last"===e&&(s=a.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:a[s],focusedValue:null}),this.announceAriaLiveContext({event:"menu",context:{isDisabled:K(a[s]),tabSelectsValue:r}})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(J):ee(ee({},J),this.props.theme):J}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=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:t,clearValue:e,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(e){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var t=this.state,n=t.focusedValue,r=t.selectValue.indexOf(n);if(r>-1){if(e.indexOf(n)>-1)return n;if(r<e.length)return e[r]}return null}},{key:"getNextFocusedOption",value:function(e){var t=this.state.focusedOption;return t&&e.indexOf(t)>-1?t:e[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 e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return"function"==typeof this.props.isOptionDisabled&&this.props.isOptionDisabled(e,t)}},{key:"isOptionSelected",value:function(e,t){var n=this;if(t.indexOf(e)>-1)return!0;if("function"==typeof this.props.isOptionSelected)return this.props.isOptionSelected(e,t);var r=this.getOptionValue(e);return t.some((function(e){return n.getOptionValue(e)===r}))}},{key:"filterOption",value:function(e,t){return!this.props.filterOption||this.props.filterOption(e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{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 e=this.state,t=e.ariaLiveContext,n=e.selectValue,r=e.focusedValue,i=e.focusedOption,o=this.props,a=o.options,s=o.menuIsOpen,u=o.inputValue,l=o.screenReaderStatus,c=r?function(e){var t=e.focusedValue,n=e.selectValue;return"value ".concat((0,e.getOptionLabel)(t)," focused, ").concat(n.indexOf(t)+1," of ").concat(n.length,".")}({focusedValue:r,getOptionLabel:this.getOptionLabel,selectValue:n}):"",f=i&&s?function(e){var t=e.focusedOption,n=e.options;return"option ".concat((0,e.getOptionLabel)(t)," focused").concat(t.isDisabled?" disabled":"",", ").concat(n.indexOf(t)+1," of ").concat(n.length,".")}({focusedOption:i,getOptionLabel:this.getOptionLabel,options:a}):"",h=function(e){var t=e.inputValue;return"".concat(e.screenReaderMessage).concat(t?" for search term "+t:"",".")}({inputValue:u,screenReaderMessage:l({count:this.countOptions()})});return"".concat(c," ").concat(f," ").concat(h," ").concat(t)}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,i=e.inputValue,o=e.tabIndex,a=e.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(j,(0,d.Z)({id:c,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:b.E,onFocus:this.onInputFocus,readOnly:!0,disabled:t,tabIndex:o,form:a,value:""},f));var h=this.commonProps,p=h.cx,m=h.theme,g=h.selectProps;return u.createElement(s,(0,d.Z)({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:p,getStyles:this.getStyles,id:c,innerRef:this.getInputRef,isDisabled:t,isHidden:l,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,selectProps:g,spellCheck:"false",tabIndex:o,form:a,theme:m,type:"text",value:i},f))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.components,n=t.MultiValue,r=t.MultiValueContainer,i=t.MultiValueLabel,o=t.MultiValueRemove,a=t.SingleValue,s=t.Placeholder,l=this.commonProps,c=this.props,f=c.controlShouldRenderValue,h=c.isDisabled,p=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,d.Z)({},l,{key:"placeholder",isDisabled:h,isFocused:x}),g);if(p){var w=y.map((function(t,a){var s=t===b;return u.createElement(n,(0,d.Z)({},l,{components:{Container:r,Label:i,Remove:o},isFocused:s,isDisabled:h,key:"".concat(e.getOptionValue(t)).concat(a),index:a,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))}));return w}if(m)return null;var _=y[0];return u.createElement(a,(0,d.Z)({},l,{data:_,isDisabled:h}),this.formatOptionLabel(_,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.components.ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,i=n.isLoading,o=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||i)return null;var a={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return u.createElement(e,(0,d.Z)({},t,{innerProps:a,isFocused:o}))}},{key:"renderLoadingIndicator",value:function(){var e=this.components.LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,i=n.isLoading,o=this.state.isFocused;return e&&i?u.createElement(e,(0,d.Z)({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:o})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.components,t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,i=this.props.isDisabled,o=this.state.isFocused;return u.createElement(n,(0,d.Z)({},r,{isDisabled:i,isFocused:o}))}},{key:"renderDropdownIndicator",value:function(){var e=this.components.DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return u.createElement(e,(0,d.Z)({},t,{innerProps:i,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.components,n=t.Group,r=t.GroupHeading,i=t.Menu,o=t.MenuList,a=t.MenuPortal,s=t.LoadingMessage,l=t.NoOptionsMessage,c=t.Option,f=this.commonProps,p=this.state,m=p.focusedOption,g=p.menuOptions,v=this.props,y=v.captureMenuScroll,x=v.inputValue,w=v.isLoading,_=v.loadingMessage,S=v.minMenuHeight,O=v.maxMenuHeight,N=v.menuIsOpen,E=v.menuPlacement,C=v.menuPosition,A=v.menuPortalTarget,M=v.menuShouldBlockScroll,k=v.menuShouldScrollIntoView,T=v.noOptionsMessage,D=v.onMenuScrollToTop,j=v.onMenuScrollToBottom;if(!N)return null;var P,I=function(t){var n=m===t.data;return t.innerRef=n?e.getFocusedOptionRef:void 0,u.createElement(c,(0,d.Z)({},f,t,{isFocused:n}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())P=g.render.map((function(t){if("group"===t.type){t.type;var i=(0,h.Z)(t,["type"]),o="".concat(t.key,"-heading");return u.createElement(n,(0,d.Z)({},f,i,{Heading:r,headingProps:{id:o,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return I(e)})))}if("option"===t.type)return I(t)}));else if(w){var R=_({inputValue:x});if(null===R)return null;P=u.createElement(s,f,R)}else{var L=T({inputValue:x});if(null===L)return null;P=u.createElement(l,f,L)}var F={minMenuHeight:S,maxMenuHeight:O,menuPlacement:E,menuPosition:C,menuShouldScrollIntoView:k},B=u.createElement(b.M,(0,d.Z)({},f,F),(function(t){var n=t.ref,r=t.placerProps,a=r.placement,s=r.maxHeight;return u.createElement(i,(0,d.Z)({},f,F,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:w,placement:a}),u.createElement(Y,{isEnabled:y,onTopArrive:D,onBottomArrive:j},u.createElement(V,{isEnabled:M},u.createElement(o,(0,d.Z)({},f,{innerRef:e.getMenuListRef,isLoading:w,maxHeight:s}),P))))}));return A||"fixed"===C?u.createElement(a,(0,d.Z)({},f,{appendTo:A,controlElement:this.controlRef,menuPlacement:E,menuPosition:C}),B):B}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,i=t.isMulti,o=t.name,a=this.state.selectValue;if(o&&!r){if(i){if(n){var s=a.map((function(t){return e.getOptionValue(t)})).join(n);return u.createElement("input",{name:o,type:"hidden",value:s})}var l=a.length>0?a.map((function(t,n){return u.createElement("input",{key:"i-".concat(n),name:o,type:"hidden",value:e.getOptionValue(t)})})):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(D,{"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 e=this.components,t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,i=e.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,d.Z)({},h,{className:a,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:l,isFocused:f}),this.renderLiveRegion(),u.createElement(t,(0,d.Z)({},h,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:l,isFocused:f,menuIsOpen:c}),u.createElement(i,(0,d.Z)({},h,{isDisabled:l}),this.renderPlaceholderOrValue(),this.renderInput()),u.createElement(n,(0,d.Z)({},h,{isDisabled:l}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}]),f}(u.Component);re.defaultProps=te,n(35639);n(25755);u.Component;var ie,oe,ae,se=(ie=re,ae=oe=function(e){(0,o.Z)(c,e);var t,n,l=(t=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(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var i=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return(0,a.Z)(this,e)});function c(){var e;(0,r.Z)(this,c);for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=l.call.apply(l,[this].concat(n))).select=void 0,e.state={inputValue:void 0!==e.props.inputValue?e.props.inputValue:e.props.defaultInputValue,menuIsOpen:void 0!==e.props.menuIsOpen?e.props.menuIsOpen:e.props.defaultMenuIsOpen,value:void 0!==e.props.value?e.props.value:e.props.defaultValue},e.onChange=function(t,n){e.callProp("onChange",t,n),e.setState({value:t})},e.onInputChange=function(t,n){var r=e.callProp("onInputChange",t,n);e.setState({inputValue:void 0!==r?r:t})},e.onMenuOpen=function(){e.callProp("onMenuOpen"),e.setState({menuIsOpen:!0})},e.onMenuClose=function(){e.callProp("onMenuClose"),e.setState({menuIsOpen:!1})},e}return(0,i.Z)(c,[{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"getProp",value:function(e){return void 0!==this.props[e]?this.props[e]:this.state[e]}},{key:"callProp",value:function(e){if("function"==typeof this.props[e]){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return(t=this.props)[e].apply(t,r)}}},{key:"render",value:function(){var e=this,t=this.props,n=(t.defaultInputValue,t.defaultMenuIsOpen,t.defaultValue,(0,h.Z)(t,["defaultInputValue","defaultMenuIsOpen","defaultValue"]));return u.createElement(ie,(0,d.Z)({},n,{ref:function(t){e.select=t},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),oe.defaultProps={defaultInputValue:"",defaultMenuIsOpen:!1,defaultValue:null},ae),ue=se},40217:function(e,t,n){!function(e,t){"use strict";function n(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function r(e){return function(){var t=this,r=arguments;return new Promise((function(i,o){var a=e.apply(t,r);function s(e){n(a,i,o,s,u,"next",e)}function u(e){n(a,i,o,s,u,"throw",e)}s(void 0)}))}}function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function o(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function a(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t;var s={init:"init"},u=function(e){var t=e.value;return void 0===t?"":t},l=function(){return t.createElement(t.Fragment,null," ")},c={Cell:u,width:150,minWidth:0,maxWidth:Number.MAX_SAFE_INTEGER};function f(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((function(e,t){var n=t.style,r=t.className;return e=i({},e,{},o(t,["style","className"])),n&&(e.style=e.style?i({},e.style||{},{},n||{}):n),r&&(e.className=e.className?e.className+" "+r:r),""===e.className&&delete e.className,e}),{})}var h=function(e,t){return void 0===t&&(t={}),function(n){return void 0===n&&(n={}),[].concat(e,[n]).reduce((function(e,r){return function e(t,n,r){return"function"==typeof n?e({},n(t,r)):Array.isArray(n)?f.apply(void 0,[t].concat(n)):f(t,n)}(e,r,i({},t,{userProps:n}))}),{})}},d=function(e,t,n,r){return void 0===n&&(n={}),e.reduce((function(e,t){return t(e,n)}),t)},p=function(e,t,n){return void 0===n&&(n={}),e.forEach((function(e){e(t,n)}))};function m(e,t,n,r){e.findIndex((function(e){return e.pluginName===n})),t.forEach((function(t){e.findIndex((function(e){return e.pluginName===t}))}))}function g(e,t){return"function"==typeof e?e(t):e}function v(e){var n=t.useRef();return n.current=e,t.useCallback((function(){return n.current}),[])}var y="undefined"!=typeof document?t.useLayoutEffect:t.useEffect;function b(e,n){var r=t.useRef(!1);y((function(){r.current&&e(),r.current=!0}),n)}function x(e,t,n){return void 0===n&&(n={}),function(r,o){void 0===o&&(o={});var a="string"==typeof r?t[r]:r;if(void 0===a)throw console.info(t),new Error("Renderer Error ☝️");return w(a,i({},e,{column:t},n,{},o))}}function w(e,n){return function(e){return"function"==typeof e&&(t=Object.getPrototypeOf(e)).prototype&&t.prototype.isReactComponent;var t}(r=e)||"function"==typeof r||function(e){return"object"==typeof e&&"symbol"==typeof e.$$typeof&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}(r)?t.createElement(e,n):e;var r}function _(e,t,n){return void 0===n&&(n=0),e.map((function(e){return O(e=i({},e,{parent:t,depth:n})),e.columns&&(e.columns=_(e.columns,e,n+1)),e}))}function S(e){return M(e,"columns")}function O(e){var t=e.id,n=e.accessor,r=e.Header;if("string"==typeof n){t=t||n;var i=n.split(".");n=function(e){return function(e,t,n){if(!t)return e;var r,i="function"==typeof t?t:JSON.stringify(t),o=E.get(i)||function(){var e=function(e){return function e(t,n){if(void 0===n&&(n=[]),Array.isArray(t))for(var r=0;r<t.length;r+=1)e(t[r],n);else n.push(t);return n}(e).map((function(e){return String(e).replace(".","_")})).join(".").replace(I,".").replace(R,"").split(".")}(t);return E.set(i,e),e}();try{r=o.reduce((function(e,t){return e[t]}),e)}catch(e){}return void 0!==r?r:void 0}(e,i)}}if(!t&&"string"==typeof r&&r&&(t=r),!t&&e.columns)throw console.error(e),new Error('A column ID (or unique "Header" value) is required!');if(!t)throw console.error(e),new Error("A column ID (or string accessor) is required!");return Object.assign(e,{id:t,accessor:n}),e}function N(e,t){if(!t)throw new Error;return Object.assign(e,i({Header:l,Footer:l},c,{},t,{},e)),Object.assign(e,{originalWidth:e.width}),e}var E=new Map;function C(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0;r<t.length;r+=1)if(void 0!==t[r])return t[r]}function A(e){if("function"==typeof e)return e}function M(e,t){var n=[];return function e(r){r.forEach((function(r){r[t]?e(r[t]):n.push(r)}))}(e),n}function k(e,t){var n=t.manualExpandedKey,r=t.expanded,i=t.expandSubRows,o=void 0===i||i,a=[];return e.forEach((function(e){return function e(t,i){void 0===i&&(i=!0),t.isExpanded=t.original&&t.original[n]||r[t.id],t.canExpand=t.subRows&&!!t.subRows.length,i&&a.push(t),t.subRows&&t.subRows.length&&t.isExpanded&&t.subRows.forEach((function(t){return e(t,o)}))}(e)})),a}function T(e,t,n){return A(e)||t[e]||n[e]||n.text}function D(e,t,n){return e?e(t,n):void 0===t}function j(){throw new Error("React-Table: You have not called prepareRow(row) one or more rows you are attempting to render.")}var P=null,I=/\[/g,R=/\]/g,L=function(e){return i({role:"table"},e)},F=function(e){return i({role:"rowgroup"},e)},B=function(e,t){var n=t.column;return i({key:"header_"+n.id,colSpan:n.totalVisibleHeaderCount,role:"columnheader"},e)},q=function(e,t){var n=t.column;return i({key:"footer_"+n.id,colSpan:n.totalVisibleHeaderCount},e)},z=function(e,t){return i({key:"headerGroup_"+t.index,role:"row"},e)},H=function(e,t){return i({key:"footerGroup_"+t.index},e)},U=function(e,t){return i({key:"row_"+t.row.id,role:"row"},e)},W=function(e,t){var n=t.cell;return i({key:"cell_"+n.row.id+"_"+n.column.id,role:"cell"},e)};function V(){return{useOptions:[],stateReducers:[],useControlledState:[],columns:[],columnsDeps:[],allColumns:[],allColumnsDeps:[],accessValue:[],materializedColumns:[],materializedColumnsDeps:[],useInstanceAfterData:[],visibleColumns:[],visibleColumnsDeps:[],headerGroups:[],headerGroupsDeps:[],useInstanceBeforeDimensions:[],useInstance:[],prepareRow:[],getTableProps:[L],getTableBodyProps:[F],getHeaderGroupProps:[z],getFooterGroupProps:[H],getHeaderProps:[B],getFooterProps:[q],getRowProps:[U],getCellProps:[W],useFinalInstance:[]}}s.resetHiddenColumns="resetHiddenColumns",s.toggleHideColumn="toggleHideColumn",s.setHiddenColumns="setHiddenColumns",s.toggleHideAllColumns="toggleHideAllColumns";var $=function(e){e.getToggleHiddenProps=[Y],e.getToggleHideAllColumnsProps=[Z],e.stateReducers.push(G),e.useInstanceBeforeDimensions.push(K),e.headerGroupsDeps.push((function(e,t){var n=t.instance;return[].concat(e,[n.state.hiddenColumns])})),e.useInstance.push(X)};$.pluginName="useColumnVisibility";var Y=function(e,t){var n=t.column;return[e,{onChange:function(e){n.toggleHidden(!e.target.checked)},style:{cursor:"pointer"},checked:n.isVisible,title:"Toggle Column Visible"}]},Z=function(e,t){var n=t.instance;return[e,{onChange:function(e){n.toggleHideAllColumns(!e.target.checked)},style:{cursor:"pointer"},checked:!n.allColumnsHidden&&!n.state.hiddenColumns.length,title:"Toggle All Columns Hidden",indeterminate:!n.allColumnsHidden&&n.state.hiddenColumns.length}]};function G(e,t,n,r){if(t.type===s.init)return i({hiddenColumns:[]},e);if(t.type===s.resetHiddenColumns)return i({},e,{hiddenColumns:r.initialState.hiddenColumns||[]});if(t.type===s.toggleHideColumn){var o=(void 0!==t.value?t.value:!e.hiddenColumns.includes(t.columnId))?[].concat(e.hiddenColumns,[t.columnId]):e.hiddenColumns.filter((function(e){return e!==t.columnId}));return i({},e,{hiddenColumns:o})}return t.type===s.setHiddenColumns?i({},e,{hiddenColumns:g(t.value,e.hiddenColumns)}):t.type===s.toggleHideAllColumns?i({},e,{hiddenColumns:(void 0!==t.value?t.value:!e.hiddenColumns.length)?r.allColumns.map((function(e){return e.id})):[]}):void 0}function K(e){var n=e.headers,r=e.state.hiddenColumns;t.useRef(!1).current;var i=0;n.forEach((function(e){return i+=function e(t,n){t.isVisible=n&&!r.includes(t.id);var i=0;return t.headers&&t.headers.length?t.headers.forEach((function(n){return i+=e(n,t.isVisible)})):i=t.isVisible?1:0,t.totalVisibleHeaderCount=i,i}(e,!0)}))}function X(e){var n=e.columns,r=e.flatHeaders,i=e.dispatch,o=e.allColumns,a=e.getHooks,u=e.state.hiddenColumns,l=e.autoResetHiddenColumns,c=void 0===l||l,f=v(e),d=o.length===u.length,p=t.useCallback((function(e,t){return i({type:s.toggleHideColumn,columnId:e,value:t})}),[i]),m=t.useCallback((function(e){return i({type:s.setHiddenColumns,value:e})}),[i]),g=t.useCallback((function(e){return i({type:s.toggleHideAllColumns,value:e})}),[i]),y=h(a().getToggleHideAllColumnsProps,{instance:f()});r.forEach((function(e){e.toggleHidden=function(t){i({type:s.toggleHideColumn,columnId:e.id,value:t})},e.getToggleHiddenProps=h(a().getToggleHiddenProps,{instance:f(),column:e})}));var x=v(c);b((function(){x()&&i({type:s.resetHiddenColumns})}),[i,n]),Object.assign(e,{allColumnsHidden:d,toggleHideColumn:p,setHiddenColumns:m,toggleHideAllColumns:g,getToggleHideAllColumnsProps:y})}var J={},Q={},ee=function(e,t,n){return e},te=function(e,t){return e.subRows||[]},ne=function(e,t,n){return""+(n?[n.id,t].join("."):t)},re=function(e){return e};function ie(e){var t=e.initialState,n=void 0===t?J:t,r=e.defaultColumn,a=void 0===r?Q:r,s=e.getSubRows,u=void 0===s?te:s,l=e.getRowId,c=void 0===l?ne:l,f=e.stateReducer,h=void 0===f?ee:f,d=e.useControlledState,p=void 0===d?re:d;return i({},o(e,["initialState","defaultColumn","getSubRows","getRowId","stateReducer","useControlledState"]),{initialState:n,defaultColumn:a,getSubRows:u,getRowId:c,stateReducer:h,useControlledState:p})}function oe(e,t){void 0===t&&(t=0);var n=0,r=0,i=0,o=0;return e.forEach((function(e){var a=e.headers;if(e.totalLeft=t,a&&a.length){var s=oe(a,t),u=s[0],l=s[1],c=s[2],f=s[3];e.totalMinWidth=u,e.totalWidth=l,e.totalMaxWidth=c,e.totalFlexWidth=f}else e.totalMinWidth=e.minWidth,e.totalWidth=Math.min(Math.max(e.minWidth,e.width),e.maxWidth),e.totalMaxWidth=e.maxWidth,e.totalFlexWidth=e.canResize?e.totalWidth:0;e.isVisible&&(t+=e.totalWidth,n+=e.totalMinWidth,r+=e.totalWidth,i+=e.totalMaxWidth,o+=e.totalFlexWidth)})),[n,r,i,o]}function ae(e){var t=e.data,n=e.rows,r=e.flatRows,i=e.rowsById,o=e.column,a=e.getRowId,s=e.getSubRows,u=e.accessValueHooks,l=e.getInstance;t.forEach((function(e,c){return function e(n,c,f,h,p){void 0===f&&(f=0);var m=n,g=a(n,c,h),v=i[g];if(v)v.subRows&&v.originalSubRows.forEach((function(t,n){return e(t,n,f+1,v)}));else if((v={id:g,original:m,index:c,depth:f,cells:[{}]}).cells.map=j,v.cells.filter=j,v.cells.forEach=j,v.cells[0].getCellProps=j,v.values={},p.push(v),r.push(v),i[g]=v,v.originalSubRows=s(n,c),v.originalSubRows){var y=[];v.originalSubRows.forEach((function(t,n){return e(t,n,f+1,v,y)})),v.subRows=y}o.accessor&&(v.values[o.id]=o.accessor(n,c,v,p,t)),v.values[o.id]=d(u,v.values[o.id],{row:v,column:o,instance:l()})}(e,c,0,void 0,n)}))}s.resetExpanded="resetExpanded",s.toggleRowExpanded="toggleRowExpanded",s.toggleAllRowsExpanded="toggleAllRowsExpanded";var se=function(e){e.getToggleAllRowsExpandedProps=[ue],e.getToggleRowExpandedProps=[le],e.stateReducers.push(ce),e.useInstance.push(fe),e.prepareRow.push(he)};se.pluginName="useExpanded";var ue=function(e,t){var n=t.instance;return[e,{onClick:function(e){n.toggleAllRowsExpanded()},style:{cursor:"pointer"},title:"Toggle All Rows Expanded"}]},le=function(e,t){var n=t.row;return[e,{onClick:function(){n.toggleRowExpanded()},style:{cursor:"pointer"},title:"Toggle Row Expanded"}]};function ce(e,t,n,r){if(t.type===s.init)return i({expanded:{}},e);if(t.type===s.resetExpanded)return i({},e,{expanded:r.initialState.expanded||{}});if(t.type===s.toggleAllRowsExpanded){var u=t.value,l=r.rowsById,c=Object.keys(l).length===Object.keys(e.expanded).length;if(void 0!==u?u:!c){var f={};return Object.keys(l).forEach((function(e){f[e]=!0})),i({},e,{expanded:f})}return i({},e,{expanded:{}})}if(t.type===s.toggleRowExpanded){var h,d=t.id,p=t.value,m=e.expanded[d],g=void 0!==p?p:!m;if(!m&&g)return i({},e,{expanded:i({},e.expanded,(h={},h[d]=!0,h))});if(m&&!g){var v=e.expanded;return v[d],i({},e,{expanded:o(v,[d].map(a))})}return e}}function fe(e){var n=e.data,r=e.rows,i=e.rowsById,o=e.manualExpandedKey,a=void 0===o?"expanded":o,u=e.paginateExpandedRows,l=void 0===u||u,c=e.expandSubRows,f=void 0===c||c,d=e.autoResetExpanded,p=void 0===d||d,g=e.getHooks,y=e.plugins,x=e.state.expanded,w=e.dispatch;m(y,["useSortBy","useGroupBy","usePivotColumns","useGlobalFilter"],"useExpanded");var _=v(p),S=Boolean(Object.keys(i).length&&Object.keys(x).length);S&&Object.keys(i).some((function(e){return!x[e]}))&&(S=!1),b((function(){_()&&w({type:s.resetExpanded})}),[w,n]);var O=t.useCallback((function(e,t){w({type:s.toggleRowExpanded,id:e,value:t})}),[w]),N=t.useCallback((function(e){return w({type:s.toggleAllRowsExpanded,value:e})}),[w]),E=t.useMemo((function(){return l?k(r,{manualExpandedKey:a,expanded:x,expandSubRows:f}):r}),[l,r,a,x,f]),C=t.useMemo((function(){return function(e){var t=0;return Object.keys(e).forEach((function(e){var n=e.split(".");t=Math.max(t,n.length)})),t}(x)}),[x]),A=v(e),M=h(g().getToggleAllRowsExpandedProps,{instance:A()});Object.assign(e,{preExpandedRows:r,expandedRows:E,rows:E,expandedDepth:C,isAllRowsExpanded:S,toggleRowExpanded:O,toggleAllRowsExpanded:N,getToggleAllRowsExpandedProps:M})}function he(e,t){var n=t.instance.getHooks,r=t.instance;e.toggleRowExpanded=function(t){return r.toggleRowExpanded(e.id,t)},e.getToggleRowExpandedProps=h(n().getToggleRowExpandedProps,{instance:r,row:e})}var de=function(e,t,n){return e.filter((function(e){return t.some((function(t){var r=e.values[t];return String(r).toLowerCase().includes(String(n).toLowerCase())}))}))};de.autoRemove=function(e){return!e};var pe=function(e,t,n){return e.filter((function(e){return t.some((function(t){var r=e.values[t];return void 0===r||String(r).toLowerCase()===String(n).toLowerCase()}))}))};pe.autoRemove=function(e){return!e};var me=function(e,t,n){return e.filter((function(e){return t.some((function(t){var r=e.values[t];return void 0===r||String(r)===String(n)}))}))};me.autoRemove=function(e){return!e};var ge=function(e,t,n){return e.filter((function(e){return t.some((function(t){return e.values[t].includes(n)}))}))};ge.autoRemove=function(e){return!e||!e.length};var ve=function(e,t,n){return e.filter((function(e){return t.some((function(t){var r=e.values[t];return r&&r.length&&n.every((function(e){return r.includes(e)}))}))}))};ve.autoRemove=function(e){return!e||!e.length};var ye=function(e,t,n){return e.filter((function(e){return t.some((function(t){var r=e.values[t];return r&&r.length&&n.some((function(e){return r.includes(e)}))}))}))};ye.autoRemove=function(e){return!e||!e.length};var be=function(e,t,n){return e.filter((function(e){return t.some((function(t){var r=e.values[t];return n.includes(r)}))}))};be.autoRemove=function(e){return!e||!e.length};var xe=function(e,t,n){return e.filter((function(e){return t.some((function(t){return e.values[t]===n}))}))};xe.autoRemove=function(e){return void 0===e};var we=function(e,t,n){return e.filter((function(e){return t.some((function(t){return e.values[t]==n}))}))};we.autoRemove=function(e){return null==e};var _e=function(e,t,n){var r=n||[],i=r[0],o=r[1];if((i="number"==typeof i?i:-1/0)>(o="number"==typeof o?o:1/0)){var a=i;i=o,o=a}return e.filter((function(e){return t.some((function(t){var n=e.values[t];return n>=i&&n<=o}))}))};_e.autoRemove=function(e){return!e||"number"!=typeof e[0]&&"number"!=typeof e[1]};var Se=Object.freeze({__proto__:null,text:de,exactText:pe,exactTextCase:me,includes:ge,includesAll:ve,includesSome:ye,includesValue:be,exact:xe,equals:we,between:_e});s.resetFilters="resetFilters",s.setFilter="setFilter",s.setAllFilters="setAllFilters";var Oe=function(e){e.stateReducers.push(Ne),e.useInstance.push(Ee)};function Ne(e,t,n,r){if(t.type===s.init)return i({filters:[]},e);if(t.type===s.resetFilters)return i({},e,{filters:r.initialState.filters||[]});if(t.type===s.setFilter){var o=t.columnId,a=t.filterValue,u=r.allColumns,l=r.filterTypes,c=u.find((function(e){return e.id===o}));if(!c)throw new Error("React-Table: Could not find a column with id: "+o);var f=T(c.filter,l||{},Se),h=e.filters.find((function(e){return e.id===o})),d=g(a,h&&h.value);return D(f.autoRemove,d,c)?i({},e,{filters:e.filters.filter((function(e){return e.id!==o}))}):i({},e,h?{filters:e.filters.map((function(e){return e.id===o?{id:o,value:d}:e}))}:{filters:[].concat(e.filters,[{id:o,value:d}])})}if(t.type===s.setAllFilters){var p=t.filters,m=r.allColumns,v=r.filterTypes;return i({},e,{filters:g(p,e.filters).filter((function(e){var t=m.find((function(t){return t.id===e.id}));return!D(T(t.filter,v||{},Se).autoRemove,e.value,t)}))})}}function Ee(e){var n=e.data,r=e.rows,i=e.flatRows,o=e.rowsById,a=e.allColumns,u=e.filterTypes,l=e.manualFilters,c=e.defaultCanFilter,f=void 0!==c&&c,h=e.disableFilters,d=e.state.filters,p=e.dispatch,m=e.autoResetFilters,g=void 0===m||m,y=t.useCallback((function(e,t){p({type:s.setFilter,columnId:e,filterValue:t})}),[p]),x=t.useCallback((function(e){p({type:s.setAllFilters,filters:e})}),[p]);a.forEach((function(e){var t=e.id,n=e.accessor,r=e.defaultCanFilter,i=e.disableFilters;e.canFilter=n?C(!0!==i&&void 0,!0!==h&&void 0,!0):C(r,f,!1),e.setFilter=function(t){return y(e.id,t)};var o=d.find((function(e){return e.id===t}));e.filterValue=o&&o.value}));var w=t.useMemo((function(){if(l||!d.length)return[r,i,o];var e=[],t={};return[function n(r,i){void 0===i&&(i=0);var o=r;return(o=d.reduce((function(e,t){var n=t.id,r=t.value,o=a.find((function(e){return e.id===n}));if(!o)return e;0===i&&(o.preFilteredRows=e);var s=T(o.filter,u||{},Se);return s?(o.filteredRows=s(e,[n],r),o.filteredRows):(console.warn("Could not find a valid 'column.filter' for column with the ID: "+o.id+"."),e)}),r)).forEach((function(r){e.push(r),t[r.id]=r,r.subRows&&(r.subRows=r.subRows&&r.subRows.length>0?n(r.subRows,i+1):r.subRows)})),o}(r),e,t]}),[l,d,r,i,o,a,u]),_=w[0],S=w[1],O=w[2];t.useMemo((function(){a.filter((function(e){return!d.find((function(t){return t.id===e.id}))})).forEach((function(e){e.preFilteredRows=_,e.filteredRows=_}))}),[_,d,a]);var N=v(g);b((function(){N()&&p({type:s.resetFilters})}),[p,l?null:n]),Object.assign(e,{preFilteredRows:r,preFilteredFlatRows:i,preFilteredRowsById:o,filteredRows:_,filteredFlatRows:S,filteredRowsById:O,rows:_,flatRows:S,rowsById:O,setFilter:y,setAllFilters:x})}Oe.pluginName="useFilters",s.resetGlobalFilter="resetGlobalFilter",s.setGlobalFilter="setGlobalFilter";var Ce=function(e){e.stateReducers.push(Ae),e.useInstance.push(Me)};function Ae(e,t,n,r){if(t.type===s.resetGlobalFilter)return i({},e,{globalFilter:r.initialState.globalFilter||void 0});if(t.type===s.setGlobalFilter){var a=t.filterValue,u=r.userFilterTypes,l=T(r.globalFilter,u||{},Se),c=g(a,e.globalFilter);return D(l.autoRemove,c)?(e.globalFilter,o(e,["globalFilter"])):i({},e,{globalFilter:c})}}function Me(e){var n=e.data,r=e.rows,i=e.flatRows,o=e.rowsById,a=e.allColumns,u=e.filterTypes,l=e.globalFilter,c=e.manualGlobalFilter,f=e.state.globalFilter,h=e.dispatch,d=e.autoResetGlobalFilter,p=void 0===d||d,m=e.disableGlobalFilter,g=t.useCallback((function(e){h({type:s.setGlobalFilter,filterValue:e})}),[h]),y=t.useMemo((function(){if(c||void 0===f)return[r,i,o];var e=[],t={},n=T(l,u||{},Se);if(!n)return console.warn("Could not find a valid 'globalFilter' option."),r;a.forEach((function(e){var t=e.disableGlobalFilter;e.canFilter=C(!0!==t&&void 0,!0!==m&&void 0,!0)}));var s=a.filter((function(e){return!0===e.canFilter}));return[function r(i){return(i=n(i,s.map((function(e){return e.id})),f)).forEach((function(n){e.push(n),t[n.id]=n,n.subRows=n.subRows&&n.subRows.length?r(n.subRows):n.subRows})),i}(r),e,t]}),[c,f,l,u,a,r,i,o,m]),x=y[0],w=y[1],_=y[2],S=v(p);b((function(){S()&&h({type:s.resetGlobalFilter})}),[h,c?null:n]),Object.assign(e,{preGlobalFilteredRows:r,preGlobalFilteredFlatRows:i,preGlobalFilteredRowsById:o,globalFilteredRows:x,globalFilteredFlatRows:w,globalFilteredRowsById:_,rows:x,flatRows:w,rowsById:_,setGlobalFilter:g,disableGlobalFilter:m})}function ke(e,t){return t.reduce((function(e,t){return e+("number"==typeof t?t:0)}),0)}Ce.pluginName="useGlobalFilter";var Te=Object.freeze({__proto__:null,sum:ke,min:function(e){var t=e[0]||0;return e.forEach((function(e){"number"==typeof e&&(t=Math.min(t,e))})),t},max:function(e){var t=e[0]||0;return e.forEach((function(e){"number"==typeof e&&(t=Math.max(t,e))})),t},minMax:function(e){var t=e[0]||0,n=e[0]||0;return e.forEach((function(e){"number"==typeof e&&(t=Math.min(t,e),n=Math.max(n,e))})),t+".."+n},average:function(e){return ke(0,e)/e.length},median:function(e){if(!e.length)return null;var t=Math.floor(e.length/2),n=[].concat(e).sort((function(e,t){return e-t}));return e.length%2!=0?n[t]:(n[t-1]+n[t])/2},unique:function(e){return Array.from(new Set(e).values())},uniqueCount:function(e){return new Set(e).size},count:function(e){return e.length}}),De=[],je={};s.resetGroupBy="resetGroupBy",s.setGroupBy="setGroupBy",s.toggleGroupBy="toggleGroupBy";var Pe=function(e){e.getGroupByToggleProps=[Ie],e.stateReducers.push(Re),e.visibleColumnsDeps.push((function(e,t){var n=t.instance;return[].concat(e,[n.state.groupBy])})),e.visibleColumns.push(Le),e.useInstance.push(Be),e.prepareRow.push(qe)};Pe.pluginName="useGroupBy";var Ie=function(e,t){var n=t.header;return[e,{onClick:n.canGroupBy?function(e){e.persist(),n.toggleGroupBy()}:void 0,style:{cursor:n.canGroupBy?"pointer":void 0},title:"Toggle GroupBy"}]};function Re(e,t,n,r){if(t.type===s.init)return i({groupBy:[]},e);if(t.type===s.resetGroupBy)return i({},e,{groupBy:r.initialState.groupBy||[]});if(t.type===s.setGroupBy)return i({},e,{groupBy:t.value});if(t.type===s.toggleGroupBy){var o=t.columnId,a=t.value,u=void 0!==a?a:!e.groupBy.includes(o);return i({},e,u?{groupBy:[].concat(e.groupBy,[o])}:{groupBy:e.groupBy.filter((function(e){return e!==o}))})}}function Le(e,t){var n=t.instance.state.groupBy,r=n.map((function(t){return e.find((function(e){return e.id===t}))})).filter(Boolean),i=e.filter((function(e){return!n.includes(e.id)}));return(e=[].concat(r,i)).forEach((function(e){e.isGrouped=n.includes(e.id),e.groupedIndex=n.indexOf(e.id)})),e}var Fe={};function Be(e){var n=e.data,r=e.rows,o=e.flatRows,a=e.rowsById,u=e.allColumns,l=e.flatHeaders,c=e.groupByFn,f=void 0===c?ze:c,d=e.manualGroupBy,p=e.aggregations,g=void 0===p?Fe:p,y=e.plugins,x=e.state.groupBy,w=e.dispatch,_=e.autoResetGroupBy,S=void 0===_||_,O=e.disableGroupBy,N=e.defaultCanGroupBy,E=e.getHooks;m(y,["useColumnOrder","useFilters"],"useGroupBy");var A=v(e);u.forEach((function(t){var n=t.accessor,r=t.defaultGroupBy,i=t.disableGroupBy;t.canGroupBy=n?C(t.canGroupBy,!0!==i&&void 0,!0!==O&&void 0,!0):C(t.canGroupBy,r,N,!1),t.canGroupBy&&(t.toggleGroupBy=function(){return e.toggleGroupBy(t.id)}),t.Aggregated=t.Aggregated||t.Cell}));var k=t.useCallback((function(e,t){w({type:s.toggleGroupBy,columnId:e,value:t})}),[w]),T=t.useCallback((function(e){w({type:s.setGroupBy,value:e})}),[w]);l.forEach((function(e){e.getGroupByToggleProps=h(E().getGroupByToggleProps,{instance:A(),header:e})}));var D=t.useMemo((function(){if(d||!x.length)return[r,o,a,De,je,o,a];var e=x.filter((function(e){return u.find((function(t){return t.id===e}))})),t=[],n={},s=[],l={},c=[],h={},p=function r(o,a,d){if(void 0===a&&(a=0),a===e.length)return o.map((function(e){return i({},e,{depth:a})}));var p=e[a],m=f(o,p);return Object.entries(m).map((function(i,o){var f=i[0],m=i[1],v=p+":"+f,y=r(m,a+1,v=d?d+">"+v:v),b=a?M(m,"leafRows"):m,x=function(t,n,r){var i={};return u.forEach((function(o){if(e.includes(o.id))i[o.id]=n[0]?n[0].values[o.id]:null;else{var a="function"==typeof o.aggregate?o.aggregate:g[o.aggregate]||Te[o.aggregate];if(a){var s=n.map((function(e){return e.values[o.id]})),u=t.map((function(e){var t=e.values[o.id];if(!r&&o.aggregateValue){var n="function"==typeof o.aggregateValue?o.aggregateValue:g[o.aggregateValue]||Te[o.aggregateValue];if(!n)throw console.info({column:o}),new Error("React Table: Invalid column.aggregateValue option for column listed above");t=n(t,e,o)}return t}));i[o.id]=a(u,s)}else{if(o.aggregate)throw console.info({column:o}),new Error("React Table: Invalid column.aggregate option for column listed above");i[o.id]=null}}})),i}(b,m,a),w={id:v,isGrouped:!0,groupByID:p,groupByVal:f,values:x,subRows:y,leafRows:b,depth:a,index:o};return y.forEach((function(e){t.push(e),n[e.id]=e,e.isGrouped?(s.push(e),l[e.id]=e):(c.push(e),h[e.id]=e)})),w}))}(r);return p.forEach((function(e){t.push(e),n[e.id]=e,e.isGrouped?(s.push(e),l[e.id]=e):(c.push(e),h[e.id]=e)})),[p,t,n,s,l,c,h]}),[d,x,r,o,a,u,g,f]),j=D[0],P=D[1],I=D[2],R=D[3],L=D[4],F=D[5],B=D[6],q=v(S);b((function(){q()&&w({type:s.resetGroupBy})}),[w,d?null:n]),Object.assign(e,{preGroupedRows:r,preGroupedFlatRow:o,preGroupedRowsById:a,groupedRows:j,groupedFlatRows:P,groupedRowsById:I,onlyGroupedFlatRows:R,onlyGroupedRowsById:L,nonGroupedFlatRows:F,nonGroupedRowsById:B,rows:j,flatRows:P,rowsById:I,toggleGroupBy:k,setGroupBy:T})}function qe(e){e.allCells.forEach((function(t){var n;t.isGrouped=t.column.isGrouped&&t.column.id===e.groupByID,t.isPlaceholder=!t.isGrouped&&t.column.isGrouped,t.isAggregated=!t.isGrouped&&!t.isPlaceholder&&(null==(n=e.subRows)?void 0:n.length)}))}function ze(e,t){return e.reduce((function(e,n,r){var i=""+n.values[t];return e[i]=Array.isArray(e[i])?e[i]:[],e[i].push(n),e}),{})}var He=/([0-9]+)/gm;function Ue(e,t){return e===t?0:e>t?1:-1}function We(e,t,n){return[e.values[n],t.values[n]]}function Ve(e){return"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?"":String(e):"string"==typeof e?e:""}var $e=Object.freeze({__proto__:null,alphanumeric:function(e,t,n){var r=We(e,t,n),i=r[0],o=r[1];for(i=Ve(i),o=Ve(o),i=i.split(He).filter(Boolean),o=o.split(He).filter(Boolean);i.length&&o.length;){var a=i.shift(),s=o.shift(),u=parseInt(a,10),l=parseInt(s,10),c=[u,l].sort();if(isNaN(c[0])){if(a>s)return 1;if(s>a)return-1}else{if(isNaN(c[1]))return isNaN(u)?-1:1;if(u>l)return 1;if(l>u)return-1}}return i.length-o.length},datetime:function(e,t,n){var r=We(e,t,n),i=r[0],o=r[1];return Ue(i=i.getTime(),o=o.getTime())},basic:function(e,t,n){var r=We(e,t,n);return Ue(r[0],r[1])},string:function(e,t,n){var r=We(e,t,n),i=r[0],o=r[1];for(i=i.split("").filter(Boolean),o=o.split("").filter(Boolean);i.length&&o.length;){var a=i.shift(),s=o.shift(),u=a.toLowerCase(),l=s.toLowerCase();if(u>l)return 1;if(l>u)return-1;if(a>s)return 1;if(s>a)return-1}return i.length-o.length},number:function(e,t,n){var r=We(e,t,n),i=r[0],o=r[1],a=/[^0-9.]/gi;return Ue(i=Number(String(i).replace(a,"")),o=Number(String(o).replace(a,"")))}});s.resetSortBy="resetSortBy",s.setSortBy="setSortBy",s.toggleSortBy="toggleSortBy",s.clearSortBy="clearSortBy",c.sortType="alphanumeric",c.sortDescFirst=!1;var Ye=function(e){e.getSortByToggleProps=[Ze],e.stateReducers.push(Ge),e.useInstance.push(Ke)};Ye.pluginName="useSortBy";var Ze=function(e,t){var n=t.instance,r=t.column,i=n.isMultiSortEvent,o=void 0===i?function(e){return e.shiftKey}:i;return[e,{onClick:r.canSort?function(e){e.persist(),r.toggleSortBy(void 0,!n.disableMultiSort&&o(e))}:void 0,style:{cursor:r.canSort?"pointer":void 0},title:r.canSort?"Toggle SortBy":void 0}]};function Ge(e,t,n,r){if(t.type===s.init)return i({sortBy:[]},e);if(t.type===s.resetSortBy)return i({},e,{sortBy:r.initialState.sortBy||[]});if(t.type===s.clearSortBy)return i({},e,{sortBy:e.sortBy.filter((function(e){return e.id!==t.columnId}))});if(t.type===s.setSortBy)return i({},e,{sortBy:t.sortBy});if(t.type===s.toggleSortBy){var o,a=t.columnId,u=t.desc,l=t.multi,c=r.allColumns,f=r.disableMultiSort,h=r.disableSortRemove,d=r.disableMultiRemove,p=r.maxMultiSortColCount,m=void 0===p?Number.MAX_SAFE_INTEGER:p,g=e.sortBy,v=c.find((function(e){return e.id===a})).sortDescFirst,y=g.find((function(e){return e.id===a})),b=g.findIndex((function(e){return e.id===a})),x=null!=u,w=[];return"toggle"!=(o=!f&&l?y?"toggle":"add":b!==g.length-1||1!==g.length?"replace":y?"toggle":"replace")||h||x||l&&d||!(y&&y.desc&&!v||!y.desc&&v)||(o="remove"),"replace"===o?w=[{id:a,desc:x?u:v}]:"add"===o?(w=[].concat(g,[{id:a,desc:x?u:v}])).splice(0,w.length-m):"toggle"===o?w=g.map((function(e){return e.id===a?i({},e,{desc:x?u:!y.desc}):e})):"remove"===o&&(w=g.filter((function(e){return e.id!==a}))),i({},e,{sortBy:w})}}function Ke(e){var n=e.data,r=e.rows,i=e.flatRows,o=e.allColumns,a=e.orderByFn,u=void 0===a?Xe:a,l=e.sortTypes,c=e.manualSortBy,f=e.defaultCanSort,d=e.disableSortBy,p=e.flatHeaders,g=e.state.sortBy,y=e.dispatch,x=e.plugins,w=e.getHooks,_=e.autoResetSortBy,S=void 0===_||_;m(x,["useFilters","useGlobalFilter","useGroupBy","usePivotColumns"],"useSortBy");var O=t.useCallback((function(e){y({type:s.setSortBy,sortBy:e})}),[y]),N=t.useCallback((function(e,t,n){y({type:s.toggleSortBy,columnId:e,desc:t,multi:n})}),[y]),E=v(e);p.forEach((function(e){var t=e.accessor,n=e.canSort,r=e.disableSortBy,i=e.id,o=t?C(!0!==r&&void 0,!0!==d&&void 0,!0):C(f,n,!1);e.canSort=o,e.canSort&&(e.toggleSortBy=function(t,n){return N(e.id,t,n)},e.clearSortBy=function(){y({type:s.clearSortBy,columnId:e.id})}),e.getSortByToggleProps=h(w().getSortByToggleProps,{instance:E(),column:e});var a=g.find((function(e){return e.id===i}));e.isSorted=!!a,e.sortedIndex=g.findIndex((function(e){return e.id===i})),e.isSortedDesc=e.isSorted?a.desc:void 0}));var M=t.useMemo((function(){if(c||!g.length)return[r,i];var e=[],t=g.filter((function(e){return o.find((function(t){return t.id===e.id}))}));return[function n(r){var i=u(r,t.map((function(e){var t=o.find((function(t){return t.id===e.id}));if(!t)throw new Error("React-Table: Could not find a column with id: "+e.id+" while sorting");var n=t.sortType,r=A(n)||(l||{})[n]||$e[n];if(!r)throw new Error("React-Table: Could not find a valid sortType of '"+n+"' for column '"+e.id+"'.");return function(t,n){return r(t,n,e.id,e.desc)}})),t.map((function(e){var t=o.find((function(t){return t.id===e.id}));return t&&t.sortInverted?e.desc:!e.desc})));return i.forEach((function(t){e.push(t),t.subRows&&0!==t.subRows.length&&(t.subRows=n(t.subRows))})),i}(r),e]}),[c,g,r,i,o,u,l]),k=M[0],T=M[1],D=v(S);b((function(){D()&&y({type:s.resetSortBy})}),[c?null:n]),Object.assign(e,{preSortedRows:r,preSortedFlatRows:i,sortedRows:k,sortedFlatRows:T,rows:k,flatRows:T,setSortBy:O,toggleSortBy:N})}function Xe(e,t,n){return[].concat(e).sort((function(e,r){for(var i=0;i<t.length;i+=1){var o=t[i],a=!1===n[i]||"desc"===n[i],s=o(e,r);if(0!==s)return a?-s:s}return n[0]?e.index-r.index:r.index-e.index}))}s.resetPage="resetPage",s.gotoPage="gotoPage",s.setPageSize="setPageSize";var Je=function(e){e.stateReducers.push(Qe),e.useInstance.push(et)};function Qe(e,t,n,r){if(t.type===s.init)return i({pageSize:10,pageIndex:0},e);if(t.type===s.resetPage)return i({},e,{pageIndex:r.initialState.pageIndex||0});if(t.type===s.gotoPage){var o=r.pageCount,a=r.page,u=g(t.pageIndex,e.pageIndex),l=!1;return u>e.pageIndex?l=-1===o?a.length>=e.pageSize:u<o:u<e.pageIndex&&(l=u>-1),l?i({},e,{pageIndex:u}):e}if(t.type===s.setPageSize){var c=t.pageSize,f=e.pageSize*e.pageIndex;return i({},e,{pageIndex:Math.floor(f/c),pageSize:c})}}function et(e){var n=e.rows,r=e.autoResetPage,i=void 0===r||r,o=e.manualExpandedKey,a=void 0===o?"expanded":o,u=e.plugins,l=e.pageCount,c=e.paginateExpandedRows,f=void 0===c||c,h=e.expandSubRows,d=void 0===h||h,p=e.state,g=p.pageSize,y=p.pageIndex,x=p.expanded,w=p.globalFilter,_=p.filters,S=p.groupBy,O=p.sortBy,N=e.dispatch,E=e.data,C=e.manualPagination;m(u,["useGlobalFilter","useFilters","useGroupBy","useSortBy","useExpanded"],"usePagination");var A=v(i);b((function(){A()&&N({type:s.resetPage})}),[N,C?null:E,w,_,S,O]);var M=C?l:Math.ceil(n.length/g),T=t.useMemo((function(){return M>0?[].concat(new Array(M)).fill(null).map((function(e,t){return t})):[]}),[M]),D=t.useMemo((function(){var e;if(C)e=n;else{var t=g*y,r=t+g;e=n.slice(t,r)}return f?e:k(e,{manualExpandedKey:a,expanded:x,expandSubRows:d})}),[d,x,a,C,y,g,f,n]),j=y>0,P=-1===M?D.length>=g:y<M-1,I=t.useCallback((function(e){N({type:s.gotoPage,pageIndex:e})}),[N]),R=t.useCallback((function(){return I((function(e){return e-1}))}),[I]),L=t.useCallback((function(){return I((function(e){return e+1}))}),[I]),F=t.useCallback((function(e){N({type:s.setPageSize,pageSize:e})}),[N]);Object.assign(e,{pageOptions:T,pageCount:M,page:D,canPreviousPage:j,canNextPage:P,gotoPage:I,previousPage:R,nextPage:L,setPageSize:F})}Je.pluginName="usePagination",s.resetPivot="resetPivot",s.togglePivot="togglePivot";var tt=function(e){e.getPivotToggleProps=[rt],e.stateReducers.push(it),e.useInstanceAfterData.push(ot),e.allColumns.push(at),e.accessValue.push(st),e.materializedColumns.push(ut),e.materializedColumnsDeps.push(lt),e.visibleColumns.push(ct),e.visibleColumnsDeps.push(ft),e.useInstance.push(ht),e.prepareRow.push(dt)};tt.pluginName="usePivotColumns";var nt=[],rt=function(e,t){var n=t.header;return[e,{onClick:n.canPivot?function(e){e.persist(),n.togglePivot()}:void 0,style:{cursor:n.canPivot?"pointer":void 0},title:"Toggle Pivot"}]};function it(e,t,n,r){if(t.type===s.init)return i({pivotColumns:nt},e);if(t.type===s.resetPivot)return i({},e,{pivotColumns:r.initialState.pivotColumns||nt});if(t.type===s.togglePivot){var o=t.columnId,a=t.value,u=void 0!==a?a:!e.pivotColumns.includes(o);return i({},e,u?{pivotColumns:[].concat(e.pivotColumns,[o])}:{pivotColumns:e.pivotColumns.filter((function(e){return e!==o}))})}}function ot(e){e.allColumns.forEach((function(t){t.isPivotSource=e.state.pivotColumns.includes(t.id)}))}function at(e,t){var n=t.instance;return e.forEach((function(e){e.isPivotSource=n.state.pivotColumns.includes(e.id),e.uniqueValues=new Set})),e}function st(e,t){var n=t.column;return n.uniqueValues&&void 0!==e&&n.uniqueValues.add(e),e}function ut(e,t){var n=t.instance,r=n.allColumns,o=n.state;if(!o.pivotColumns.length||!o.groupBy||!o.groupBy.length)return e;var a=o.pivotColumns.map((function(e){return r.find((function(t){return t.id===e}))})).filter(Boolean),s=r.filter((function(e){return!e.isPivotSource&&!o.groupBy.includes(e.id)&&!o.pivotColumns.includes(e.id)})),u=S(function e(t,n,r){void 0===t&&(t=0),void 0===r&&(r=[]);var o=a[t];return o?Array.from(o.uniqueValues).sort().map((function(a){var s=i({},o,{Header:o.PivotHeader||"string"==typeof o.header?o.Header+": "+a:a,isPivotGroup:!0,parent:n,depth:t,id:n?n.id+"."+o.id+"."+a:o.id+"."+a,pivotValue:a});return s.columns=e(t+1,s,[].concat(r,[function(e){return e.values[o.id]===a}])),s})):s.map((function(e){return i({},e,{canPivot:!1,isPivoted:!0,parent:n,depth:t,id:""+(n?n.id+"."+e.id:e.id),accessor:function(t,n,i){if(r.every((function(e){return e(i)})))return i.values[e.id]}})}))}());return[].concat(e,u)}function lt(e,t){var n=t.instance.state,r=n.pivotColumns,i=n.groupBy;return[].concat(e,[r,i])}function ct(e,t){var n=t.instance.state;return e=e.filter((function(e){return!e.isPivotSource})),n.pivotColumns.length&&n.groupBy&&n.groupBy.length&&(e=e.filter((function(e){return e.isGrouped||e.isPivoted}))),e}function ft(e,t){var n=t.instance;return[].concat(e,[n.state.pivotColumns,n.state.groupBy])}function ht(e){var t=e.columns,n=e.allColumns,r=e.flatHeaders,i=e.getHooks,o=e.plugins,a=e.dispatch,u=e.autoResetPivot,l=void 0===u||u,c=e.manaulPivot,f=e.disablePivot,d=e.defaultCanPivot;m(o,["useGroupBy"],"usePivotColumns");var p=v(e);n.forEach((function(t){var n=t.accessor,r=t.defaultPivot,i=t.disablePivot;t.canPivot=n?C(t.canPivot,!0!==i&&void 0,!0!==f&&void 0,!0):C(t.canPivot,r,d,!1),t.canPivot&&(t.togglePivot=function(){return e.togglePivot(t.id)}),t.Aggregated=t.Aggregated||t.Cell})),r.forEach((function(e){e.getPivotToggleProps=h(i().getPivotToggleProps,{instance:p(),header:e})}));var g=v(l);b((function(){g()&&a({type:s.resetPivot})}),[a,c?null:t]),Object.assign(e,{togglePivot:function(e,t){a({type:s.togglePivot,columnId:e,value:t})}})}function dt(e){e.allCells.forEach((function(e){e.isPivoted=e.column.isPivoted}))}s.resetSelectedRows="resetSelectedRows",s.toggleAllRowsSelected="toggleAllRowsSelected",s.toggleRowSelected="toggleRowSelected",s.toggleAllPageRowsSelected="toggleAllPageRowsSelected";var pt=function(e){e.getToggleRowSelectedProps=[mt],e.getToggleAllRowsSelectedProps=[gt],e.getToggleAllPageRowsSelectedProps=[vt],e.stateReducers.push(yt),e.useInstance.push(bt),e.prepareRow.push(xt)};pt.pluginName="useRowSelect";var mt=function(e,t){var n=t.instance,r=t.row,i=n.manualRowSelectedKey,o=void 0===i?"isSelected":i;return[e,{onChange:function(e){r.toggleRowSelected(e.target.checked)},style:{cursor:"pointer"},checked:!(!r.original||!r.original[o])||r.isSelected,title:"Toggle Row Selected",indeterminate:r.isSomeSelected}]},gt=function(e,t){var n=t.instance;return[e,{onChange:function(e){n.toggleAllRowsSelected(e.target.checked)},style:{cursor:"pointer"},checked:n.isAllRowsSelected,title:"Toggle All Rows Selected",indeterminate:Boolean(!n.isAllRowsSelected&&Object.keys(n.state.selectedRowIds).length)}]},vt=function(e,t){var n=t.instance;return[e,{onChange:function(e){n.toggleAllPageRowsSelected(e.target.checked)},style:{cursor:"pointer"},checked:n.isAllPageRowsSelected,title:"Toggle All Current Page Rows Selected",indeterminate:Boolean(!n.isAllPageRowsSelected&&n.page.some((function(e){var t=e.id;return n.state.selectedRowIds[t]})))}]};function yt(e,t,n,r){if(t.type===s.init)return i({selectedRowIds:{}},e);if(t.type===s.resetSelectedRows)return i({},e,{selectedRowIds:r.initialState.selectedRowIds||{}});if(t.type===s.toggleAllRowsSelected){var o=t.value,a=r.isAllRowsSelected,u=r.rowsById,l=r.nonGroupedRowsById,c=void 0===l?u:l,f=void 0!==o?o:!a,h=Object.assign({},e.selectedRowIds);return f?Object.keys(c).forEach((function(e){h[e]=!0})):Object.keys(c).forEach((function(e){delete h[e]})),i({},e,{selectedRowIds:h})}if(t.type===s.toggleRowSelected){var d=t.id,p=t.value,m=r.rowsById,g=r.selectSubRows,v=void 0===g||g,y=r.getSubRows,b=e.selectedRowIds[d],x=void 0!==p?p:!b;if(b===x)return e;var w=i({},e.selectedRowIds);return function e(t){var n=m[t];if(n&&(n.isGrouped||(x?w[t]=!0:delete w[t]),v&&y(n)))return y(n).forEach((function(t){return e(t.id)}))}(d),i({},e,{selectedRowIds:w})}if(t.type===s.toggleAllPageRowsSelected){var _=t.value,S=r.page,O=r.rowsById,N=r.selectSubRows,E=void 0===N||N,C=r.isAllPageRowsSelected,A=r.getSubRows,M=void 0!==_?_:!C,k=i({},e.selectedRowIds);return S.forEach((function(e){return function e(t){var n=O[t];if(n.isGrouped||(M?k[t]=!0:delete k[t]),E&&A(n))return A(n).forEach((function(t){return e(t.id)}))}(e.id)})),i({},e,{selectedRowIds:k})}return e}function bt(e){var n=e.data,r=e.rows,i=e.getHooks,o=e.plugins,a=e.rowsById,u=e.nonGroupedRowsById,l=void 0===u?a:u,c=e.autoResetSelectedRows,f=void 0===c||c,d=e.state.selectedRowIds,p=e.selectSubRows,g=void 0===p||p,y=e.dispatch,x=e.page,w=e.getSubRows;m(o,["useFilters","useGroupBy","useSortBy","useExpanded","usePagination"],"useRowSelect");var _=t.useMemo((function(){var e=[];return r.forEach((function(t){var n=g?function e(t,n,r){if(n[t.id])return!0;var i=r(t);if(i&&i.length){var o=!0,a=!1;return i.forEach((function(t){a&&!o||(e(t,n,r)?a=!0:o=!1)})),!!o||!!a&&null}return!1}(t,d,w):!!d[t.id];t.isSelected=!!n,t.isSomeSelected=null===n,n&&e.push(t)})),e}),[r,g,d,w]),S=Boolean(Object.keys(l).length&&Object.keys(d).length),O=S;S&&Object.keys(l).some((function(e){return!d[e]}))&&(S=!1),S||x&&x.length&&x.some((function(e){var t=e.id;return!d[t]}))&&(O=!1);var N=v(f);b((function(){N()&&y({type:s.resetSelectedRows})}),[y,n]);var E=t.useCallback((function(e){return y({type:s.toggleAllRowsSelected,value:e})}),[y]),C=t.useCallback((function(e){return y({type:s.toggleAllPageRowsSelected,value:e})}),[y]),A=t.useCallback((function(e,t){return y({type:s.toggleRowSelected,id:e,value:t})}),[y]),M=v(e),k=h(i().getToggleAllRowsSelectedProps,{instance:M()}),T=h(i().getToggleAllPageRowsSelectedProps,{instance:M()});Object.assign(e,{selectedFlatRows:_,isAllRowsSelected:S,isAllPageRowsSelected:O,toggleRowSelected:A,toggleAllRowsSelected:E,getToggleAllRowsSelectedProps:k,getToggleAllPageRowsSelectedProps:T,toggleAllPageRowsSelected:C})}function xt(e,t){var n=t.instance;e.toggleRowSelected=function(t){return n.toggleRowSelected(e.id,t)},e.getToggleRowSelectedProps=h(n.getHooks().getToggleRowSelectedProps,{instance:n,row:e})}var wt=function(e){return{}},_t=function(e){return{}};s.setRowState="setRowState",s.setCellState="setCellState",s.resetRowState="resetRowState";var St=function(e){e.stateReducers.push(Ot),e.useInstance.push(Nt),e.prepareRow.push(Et)};function Ot(e,t,n,r){var o=r.initialRowStateAccessor,a=void 0===o?wt:o,u=r.initialCellStateAccessor,l=void 0===u?_t:u,c=r.rowsById;if(t.type===s.init)return i({rowState:{}},e);if(t.type===s.resetRowState)return i({},e,{rowState:r.initialState.rowState||{}});if(t.type===s.setRowState){var f,h=t.rowId,d=t.value,p=void 0!==e.rowState[h]?e.rowState[h]:a(c[h]);return i({},e,{rowState:i({},e.rowState,(f={},f[h]=g(d,p),f))})}if(t.type===s.setCellState){var m,v,y,b,x,w=t.rowId,_=t.columnId,S=t.value,O=void 0!==e.rowState[w]?e.rowState[w]:a(c[w]),N=void 0!==(null==O||null==(m=O.cellState)?void 0:m[_])?O.cellState[_]:l(null==(v=c[w])||null==(y=v.cells)?void 0:y.find((function(e){return e.column.id===_})));return i({},e,{rowState:i({},e.rowState,(x={},x[w]=i({},O,{cellState:i({},O.cellState||{},(b={},b[_]=g(S,N),b))}),x))})}}function Nt(e){var n=e.autoResetRowState,r=void 0===n||n,i=e.data,o=e.dispatch,a=t.useCallback((function(e,t){return o({type:s.setRowState,rowId:e,value:t})}),[o]),u=t.useCallback((function(e,t,n){return o({type:s.setCellState,rowId:e,columnId:t,value:n})}),[o]),l=v(r);b((function(){l()&&o({type:s.resetRowState})}),[i]),Object.assign(e,{setRowState:a,setCellState:u})}function Et(e,t){var n=t.instance,r=n.initialRowStateAccessor,i=void 0===r?wt:r,o=n.initialCellStateAccessor,a=void 0===o?_t:o,s=n.state.rowState;e&&(e.state=void 0!==s[e.id]?s[e.id]:i(e),e.setState=function(t){return n.setRowState(e.id,t)},e.cells.forEach((function(t){e.state.cellState||(e.state.cellState={}),t.state=void 0!==e.state.cellState[t.column.id]?e.state.cellState[t.column.id]:a(t),t.setState=function(r){return n.setCellState(e.id,t.column.id,r)}})))}St.pluginName="useRowState",s.resetColumnOrder="resetColumnOrder",s.setColumnOrder="setColumnOrder";var Ct=function(e){e.stateReducers.push(At),e.visibleColumnsDeps.push((function(e,t){var n=t.instance;return[].concat(e,[n.state.columnOrder])})),e.visibleColumns.push(Mt),e.useInstance.push(kt)};function At(e,t,n,r){return t.type===s.init?i({columnOrder:[]},e):t.type===s.resetColumnOrder?i({},e,{columnOrder:r.initialState.columnOrder||[]}):t.type===s.setColumnOrder?i({},e,{columnOrder:g(t.columnOrder,e.columnOrder)}):void 0}function Mt(e,t){var n=t.instance.state.columnOrder;if(!n||!n.length)return e;for(var r=[].concat(n),i=[].concat(e),o=[],a=function(){var e=r.shift(),t=i.findIndex((function(t){return t.id===e}));t>-1&&o.push(i.splice(t,1)[0])};i.length&&r.length;)a();return[].concat(o,i)}function kt(e){var n=e.dispatch;e.setColumnOrder=t.useCallback((function(e){return n({type:s.setColumnOrder,columnOrder:e})}),[n])}Ct.pluginName="useColumnOrder",c.canResize=!0,s.columnStartResizing="columnStartResizing",s.columnResizing="columnResizing",s.columnDoneResizing="columnDoneResizing",s.resetResize="resetResize";var Tt=function(e){e.getResizerProps=[Dt],e.getHeaderProps.push({style:{position:"relative"}}),e.stateReducers.push(jt),e.useInstance.push(It),e.useInstanceBeforeDimensions.push(Pt)},Dt=function(e,t){var n=t.instance,r=t.header,i=n.dispatch,o=function(e,t){var n=!1;if("touchstart"===e.type){if(e.touches&&e.touches.length>1)return;n=!0}var r,o,a=function(e){var t=[];return function e(n){n.columns&&n.columns.length&&n.columns.map(e),t.push(n)}(e),t}(t).map((function(e){return[e.id,e.totalWidth]})),u=n?Math.round(e.touches[0].clientX):e.clientX,l=function(){window.cancelAnimationFrame(r),r=null,i({type:s.columnDoneResizing})},c=function(){window.cancelAnimationFrame(r),r=null,i({type:s.columnResizing,clientX:o})},f=function(e){o=e,r||(r=window.requestAnimationFrame(c))},h={mouse:{moveEvent:"mousemove",moveHandler:function(e){return f(e.clientX)},upEvent:"mouseup",upHandler:function(e){document.removeEventListener("mousemove",h.mouse.moveHandler),document.removeEventListener("mouseup",h.mouse.upHandler),l()}},touch:{moveEvent:"touchmove",moveHandler:function(e){return e.cancelable&&(e.preventDefault(),e.stopPropagation()),f(e.touches[0].clientX),!1},upEvent:"touchend",upHandler:function(e){document.removeEventListener(h.touch.moveEvent,h.touch.moveHandler),document.removeEventListener(h.touch.upEvent,h.touch.moveHandler),l()}}},d=n?h.touch:h.mouse,p=!!function(){if("boolean"==typeof P)return P;var e=!1;try{var t={get passive(){return e=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){e=!1}return P=e}()&&{passive:!1};document.addEventListener(d.moveEvent,d.moveHandler,p),document.addEventListener(d.upEvent,d.upHandler,p),i({type:s.columnStartResizing,columnId:t.id,columnWidth:t.totalWidth,headerIdWidths:a,clientX:u})};return[e,{onMouseDown:function(e){return e.persist()||o(e,r)},onTouchStart:function(e){return e.persist()||o(e,r)},style:{cursor:"col-resize"},draggable:!1,role:"separator"}]};function jt(e,t){if(t.type===s.init)return i({columnResizing:{columnWidths:{}}},e);if(t.type===s.resetResize)return i({},e,{columnResizing:{columnWidths:{}}});if(t.type===s.columnStartResizing){var n=t.clientX,r=t.columnId,o=t.columnWidth,a=t.headerIdWidths;return i({},e,{columnResizing:i({},e.columnResizing,{startX:n,headerIdWidths:a,columnWidth:o,isResizingColumn:r})})}if(t.type===s.columnResizing){var u=t.clientX,l=e.columnResizing,c=l.startX,f=l.columnWidth,h=l.headerIdWidths,d=(u-c)/f,p={};return(void 0===h?[]:h).forEach((function(e){var t=e[0],n=e[1];p[t]=Math.max(n+n*d,0)})),i({},e,{columnResizing:i({},e.columnResizing,{columnWidths:i({},e.columnResizing.columnWidths,{},p)})})}return t.type===s.columnDoneResizing?i({},e,{columnResizing:i({},e.columnResizing,{startX:null,isResizingColumn:null})}):void 0}Tt.pluginName="useResizeColumns";var Pt=function(e){var t=e.flatHeaders,n=e.disableResizing,r=e.getHooks,i=e.state.columnResizing,o=v(e);t.forEach((function(e){var t=C(!0!==e.disableResizing&&void 0,!0!==n&&void 0,!0);e.canResize=t,e.width=i.columnWidths[e.id]||e.originalWidth||e.width,e.isResizing=i.isResizingColumn===e.id,t&&(e.getResizerProps=h(r().getResizerProps,{instance:o(),header:e}))}))};function It(e){var n=e.plugins,r=e.dispatch,i=e.autoResetResize,o=void 0===i||i,a=e.columns;m(n,["useAbsoluteLayout"],"useResizeColumns");var u=v(o);b((function(){u()&&r({type:s.resetResize})}),[a]);var l=t.useCallback((function(){return r({type:s.resetResize})}),[r]);Object.assign(e,{resetResizing:l})}var Rt={position:"absolute",top:0},Lt=function(e){e.getTableBodyProps.push(Ft),e.getRowProps.push(Ft),e.getHeaderGroupProps.push(Ft),e.getFooterGroupProps.push(Ft),e.getHeaderProps.push((function(e,t){var n=t.column;return[e,{style:i({},Rt,{left:n.totalLeft+"px",width:n.totalWidth+"px"})}]})),e.getCellProps.push((function(e,t){var n=t.cell;return[e,{style:i({},Rt,{left:n.column.totalLeft+"px",width:n.column.totalWidth+"px"})}]})),e.getFooterProps.push((function(e,t){var n=t.column;return[e,{style:i({},Rt,{left:n.totalLeft+"px",width:n.totalWidth+"px"})}]}))};Lt.pluginName="useAbsoluteLayout";var Ft=function(e,t){return[e,{style:{position:"relative",width:t.instance.totalColumnsWidth+"px"}}]},Bt={display:"inline-block",boxSizing:"border-box"},qt=function(e,t){return[e,{style:{display:"flex",width:t.instance.totalColumnsWidth+"px"}}]},zt=function(e){e.getRowProps.push(qt),e.getHeaderGroupProps.push(qt),e.getFooterGroupProps.push(qt),e.getHeaderProps.push((function(e,t){var n=t.column;return[e,{style:i({},Bt,{width:n.totalWidth+"px"})}]})),e.getCellProps.push((function(e,t){var n=t.cell;return[e,{style:i({},Bt,{width:n.column.totalWidth+"px"})}]})),e.getFooterProps.push((function(e,t){var n=t.column;return[e,{style:i({},Bt,{width:n.totalWidth+"px"})}]}))};function Ht(e){e.getTableProps.push(Ut),e.getRowProps.push(Wt),e.getHeaderGroupProps.push(Wt),e.getFooterGroupProps.push(Wt),e.getHeaderProps.push(Vt),e.getCellProps.push($t),e.getFooterProps.push(Yt)}zt.pluginName="useBlockLayout",Ht.pluginName="useFlexLayout";var Ut=function(e,t){return[e,{style:{minWidth:t.instance.totalColumnsMinWidth+"px"}}]},Wt=function(e,t){return[e,{style:{display:"flex",flex:"1 0 auto",minWidth:t.instance.totalColumnsMinWidth+"px"}}]},Vt=function(e,t){var n=t.column;return[e,{style:{boxSizing:"border-box",flex:n.totalFlexWidth?n.totalFlexWidth+" 0 auto":void 0,minWidth:n.totalMinWidth+"px",width:n.totalWidth+"px"}}]},$t=function(e,t){var n=t.cell;return[e,{style:{boxSizing:"border-box",flex:n.column.totalFlexWidth+" 0 auto",minWidth:n.column.totalMinWidth+"px",width:n.column.totalWidth+"px"}}]},Yt=function(e,t){var n=t.column;return[e,{style:{boxSizing:"border-box",flex:n.totalFlexWidth?n.totalFlexWidth+" 0 auto":void 0,minWidth:n.totalMinWidth+"px",width:n.totalWidth+"px"}}]};function Zt(e){e.stateReducers.push(Jt),e.getTableProps.push(Gt),e.getHeaderProps.push(Kt),e.getRowProps.push(Xt)}s.columnStartResizing="columnStartResizing",s.columnResizing="columnResizing",s.columnDoneResizing="columnDoneResizing",s.resetResize="resetResize",Zt.pluginName="useGridLayout";var Gt=function(e,t){var n=t.instance;return[e,{style:{display:"grid",gridTemplateColumns:n.visibleColumns.map((function(e){var t;return n.state.gridLayout.columnWidths[e.id]?n.state.gridLayout.columnWidths[e.id]+"px":(null==(t=n.state.columnResizing)?void 0:t.isResizingColumn)?n.state.gridLayout.startWidths[e.id]+"px":"number"==typeof e.width?e.width+"px":e.width})).join(" ")}}]},Kt=function(e,t){var n=t.column;return[e,{id:"header-cell-"+n.id,style:{position:"sticky",gridColumn:"span "+n.totalVisibleHeaderCount}}]},Xt=function(e,t){var n=t.row;return n.isExpanded?[e,{style:{gridColumn:"1 / "+(n.cells.length+1)}}]:[e,{}]};function Jt(e,t,n,r){if(t.type===s.init)return i({gridLayout:{columnWidths:{}}},e);if(t.type===s.resetResize)return i({},e,{gridLayout:{columnWidths:{}}});if(t.type===s.columnStartResizing){var o=t.columnId,a=t.headerIdWidths,u=Qt(o);if(void 0!==u){var l=r.visibleColumns.reduce((function(e,t){var n;return i({},e,((n={})[t.id]=Qt(t.id),n))}),{}),c=r.visibleColumns.reduce((function(e,t){var n;return i({},e,((n={})[t.id]=t.minWidth,n))}),{}),f=r.visibleColumns.reduce((function(e,t){var n;return i({},e,((n={})[t.id]=t.maxWidth,n))}),{}),h=a.map((function(e){var t=e[0];return[t,Qt(t)]}));return i({},e,{gridLayout:i({},e.gridLayout,{startWidths:l,minWidths:c,maxWidths:f,headerIdGridWidths:h,columnWidth:u})})}return e}if(t.type===s.columnResizing){var d=t.clientX,p=e.columnResizing.startX,m=e.gridLayout,g=m.columnWidth,v=m.minWidths,y=m.maxWidths,b=m.headerIdGridWidths,x=(d-p)/g,w={};return(void 0===b?[]:b).forEach((function(e){var t=e[0],n=e[1];w[t]=Math.min(Math.max(v[t],n+n*x),y[t])})),i({},e,{gridLayout:i({},e.gridLayout,{columnWidths:i({},e.gridLayout.columnWidths,{},w)})})}return t.type===s.columnDoneResizing?i({},e,{gridLayout:i({},e.gridLayout,{startWidths:{},minWidths:{},maxWidths:{}})}):void 0}function Qt(e){var t,n=null==(t=document.getElementById("header-cell-"+e))?void 0:t.offsetWidth;if(void 0!==n)return n}e._UNSTABLE_usePivotColumns=tt,e.actions=s,e.defaultColumn=c,e.defaultGroupByFn=ze,e.defaultOrderByFn=Xe,e.defaultRenderer=u,e.emptyRenderer=l,e.ensurePluginOrder=m,e.flexRender=w,e.functionalUpdate=g,e.loopHooks=p,e.makePropGetter=h,e.makeRenderer=x,e.reduceHooks=d,e.safeUseLayoutEffect=y,e.useAbsoluteLayout=Lt,e.useAsyncDebounce=function(e,n){void 0===n&&(n=0);var i=t.useRef({}),o=v(e),a=v(n);return t.useCallback(function(){var e=r(regeneratorRuntime.mark((function e(){var t,n,s,u=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(t=u.length,n=new Array(t),s=0;s<t;s++)n[s]=u[s];return i.current.promise||(i.current.promise=new Promise((function(e,t){i.current.resolve=e,i.current.reject=t}))),i.current.timeout&&clearTimeout(i.current.timeout),i.current.timeout=setTimeout(r(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return delete i.current.timeout,e.prev=1,e.t0=i.current,e.next=5,o().apply(void 0,n);case 5:e.t1=e.sent,e.t0.resolve.call(e.t0,e.t1),e.next=12;break;case 9:e.prev=9,e.t2=e.catch(1),i.current.reject(e.t2);case 12:return e.prev=12,delete i.current.promise,e.finish(12);case 15:case"end":return e.stop()}}),e,null,[[1,9,12,15]])}))),a()),e.abrupt("return",i.current.promise);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),[o,a])},e.useBlockLayout=zt,e.useColumnOrder=Ct,e.useExpanded=se,e.useFilters=Oe,e.useFlexLayout=Ht,e.useGetLatest=v,e.useGlobalFilter=Ce,e.useGridLayout=Zt,e.useGroupBy=Pe,e.useMountedLayoutEffect=b,e.usePagination=Je,e.useResizeColumns=Tt,e.useRowSelect=pt,e.useRowState=St,e.useSortBy=Ye,e.useTable=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e=ie(e),r=[$].concat(r);var a=v(t.useRef({}).current);Object.assign(a(),i({},e,{plugins:r,hooks:V()})),r.filter(Boolean).forEach((function(e){e(a().hooks)}));var u=v(a().hooks);a().getHooks=u,delete a().hooks,Object.assign(a(),d(u().useOptions,ie(e)));var l=a(),c=l.data,f=l.columns,m=l.initialState,g=l.defaultColumn,y=l.getSubRows,b=l.getRowId,w=l.stateReducer,E=l.useControlledState,C=v(w),A=t.useCallback((function(e,t){if(!t.type)throw console.info({action:t}),new Error("Unknown Action 👆");return[].concat(u().stateReducers,Array.isArray(C())?C():[C()]).reduce((function(n,r){return r(n,t,e,a())||n}),e)}),[u,C,a]),M=t.useReducer(A,void 0,(function(){return A(m,{type:s.init})})),k=M[0],T=M[1],D=d([].concat(u().useControlledState,[E]),k,{instance:a()});Object.assign(a(),{state:D,dispatch:T});var j=t.useMemo((function(){return _(d(u().columns,f,{instance:a()}))}),[u,a,f].concat(d(u().columnsDeps,[],{instance:a()})));a().columns=j;var P=t.useMemo((function(){return d(u().allColumns,S(j),{instance:a()}).map(O)}),[j,u,a].concat(d(u().allColumnsDeps,[],{instance:a()})));a().allColumns=P;var I=t.useMemo((function(){for(var e=[],t=[],n={},r=[].concat(P);r.length;){var i=r.shift();ae({data:c,rows:e,flatRows:t,rowsById:n,column:i,getRowId:b,getSubRows:y,accessValueHooks:u().accessValue,getInstance:a})}return[e,t,n]}),[P,c,b,y,u,a]),R=I[0],L=I[1],F=I[2];Object.assign(a(),{rows:R,initialRows:[].concat(R),flatRows:L,rowsById:F}),p(u().useInstanceAfterData,a());var B=t.useMemo((function(){return d(u().visibleColumns,P,{instance:a()}).map((function(e){return N(e,g)}))}),[u,P,a,g].concat(d(u().visibleColumnsDeps,[],{instance:a()})));P=t.useMemo((function(){var e=[].concat(B);return P.forEach((function(t){e.find((function(e){return e.id===t.id}))||e.push(t)})),e}),[P,B]),a().allColumns=P;var q=t.useMemo((function(){return d(u().headerGroups,function(e,t,n){void 0===n&&(n=function(){return{}});for(var r=[],o=e,a=0,s=function(){return a++},u=function(){var e={headers:[]},a=[],u=o.some((function(e){return e.parent}));o.forEach((function(r){var o,l=[].concat(a).reverse()[0];u&&(o=r.parent?i({},r.parent,{originalId:r.parent.id,id:r.parent.id+"_"+s(),headers:[r]},n(r)):N(i({originalId:r.id+"_placeholder",id:r.id+"_placeholder_"+s(),placeholderOf:r,headers:[r]},n(r)),t),l&&l.originalId===o.originalId?l.headers.push(r):a.push(o)),e.headers.push(r)})),r.push(e),o=a};o.length;)u();return r.reverse()}(B,g),a())}),[u,B,g,a].concat(d(u().headerGroupsDeps,[],{instance:a()})));a().headerGroups=q;var z=t.useMemo((function(){return q.length?q[0].headers:[]}),[q]);a().headers=z,a().flatHeaders=q.reduce((function(e,t){return[].concat(e,t.headers)}),[]),p(u().useInstanceBeforeDimensions,a());var H=B.filter((function(e){return e.isVisible})).map((function(e){return e.id})).sort().join("_");B=t.useMemo((function(){return B.filter((function(e){return e.isVisible}))}),[B,H]),a().visibleColumns=B;var U=oe(z),W=U[0],Y=U[1],Z=U[2];return a().totalColumnsMinWidth=W,a().totalColumnsWidth=Y,a().totalColumnsMaxWidth=Z,p(u().useInstance,a()),[].concat(a().flatHeaders,a().allColumns).forEach((function(e){e.render=x(a(),e),e.getHeaderProps=h(u().getHeaderProps,{instance:a(),column:e}),e.getFooterProps=h(u().getFooterProps,{instance:a(),column:e})})),a().headerGroups=t.useMemo((function(){return q.filter((function(e,t){return e.headers=e.headers.filter((function(e){return e.headers?function e(t){return t.filter((function(t){return t.headers?e(t.headers):t.isVisible})).length}(e.headers):e.isVisible})),!!e.headers.length&&(e.getHeaderGroupProps=h(u().getHeaderGroupProps,{instance:a(),headerGroup:e,index:t}),e.getFooterGroupProps=h(u().getFooterGroupProps,{instance:a(),headerGroup:e,index:t}),!0)}))}),[q,a,u]),a().footerGroups=[].concat(a().headerGroups).reverse(),a().prepareRow=t.useCallback((function(e){e.getRowProps=h(u().getRowProps,{instance:a(),row:e}),e.allCells=P.map((function(t){var n=e.values[t.id],r={column:t,row:e,value:n};return r.getCellProps=h(u().getCellProps,{instance:a(),cell:r}),r.render=x(a(),t,{row:e,cell:r,value:n}),r})),e.cells=B.map((function(t){return e.allCells.find((function(e){return e.column.id===t.id}))})),p(u().prepareRow,e,{instance:a()})}),[u,a,P,B]),a().getTableProps=h(u().getTableProps,{instance:a()}),a().getTableBodyProps=h(u().getTableBodyProps,{instance:a()}),p(u().useFinalInstance,a()),a()},Object.defineProperty(e,"__esModule",{value:!0})}(t,n(67294))},79521:function(e,t,n){e.exports=n(40217)},25224:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=(r=n(67294))&&r.__esModule?r:{default:r};t.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(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),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(e){return e&&e.__esModule?e:{default:e}}var d=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));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=!(!e.checked&&!e.defaultChecked),n.state={checked:!(!e.checked&&!e.defaultChecked),hasFocus:!1},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"componentDidUpdate",value:function(e){e.checked!==this.props.checked&&this.setState({checked:!!this.props.checked})}},{key:"handleClick",value:function(e){if(!this.props.disabled){var t=this.input;if(e.target!==t&&!this.moved)return this.previouslyChecked=t.checked,e.preventDefault(),t.focus(),void t.click();var n=this.props.hasOwnProperty("checked")?this.props.checked:t.checked;this.setState({checked:n})}}},{key:"handleTouchStart",value:function(e){this.props.disabled||(this.startX=(0,f.pointerCoord)(e).x,this.activated=!0)}},{key:"handleTouchMove",value:function(e){if(this.activated&&(this.moved=!0,this.startX)){var t=(0,f.pointerCoord)(e).x;this.state.checked&&t+15<this.startX?(this.setState({checked:!1}),this.startX=t,this.activated=!0):t-15>this.startX&&(this.setState({checked:!0}),this.startX=t,this.activated=t<this.startX+5)}}},{key:"handleTouchEnd",value:function(e){if(this.moved){var t=this.input;if(e.preventDefault(),this.startX){var n=(0,f.pointerCoord)(e).x;!0===this.previouslyChecked&&this.startX+4>n?this.previouslyChecked!==this.state.checked&&(this.setState({checked:!1}),this.previouslyChecked=this.state.checked,t.click()):this.startX-4<n&&this.previouslyChecked!==this.state.checked&&(this.setState({checked:!0}),this.previouslyChecked=this.state.checked,t.click()),this.activated=!1,this.startX=null,this.moved=!1}}}},{key:"handleFocus",value:function(e){var t=this.props.onFocus;t&&t(e),this.setState({hasFocus:!0})}},{key:"handleBlur",value:function(e){var t=this.props.onBlur;t&&t(e),this.setState({hasFocus:!1})}},{key:"getIcon",value:function(e){var n=this.props.icons;return n?void 0===n[e]?t.defaultProps.icons[e]:n[e]:null}},{key:"render",value:function(){var e=this,t=this.props,n=t.className,i=(t.icons,function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["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(t){e.input=t},onFocus:this.handleFocus,onBlur:this.handleBlur,className:"react-toggle-screenreader-only",type:"checkbox"})))}}]),t}(o.PureComponent);t.Z=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(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pointerCoord=function(e){if(e){var t=e.changedTouches;if(t&&t.length>0){var n=t[0];return{x:n.clientX,y:n.clientY}}var r=e.pageX;if(void 0!==r)return{x:r,y:e.pageY}}return{x:0,y:0}}},56963:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=(r=n(67294))&&r.__esModule?r:{default:r};t.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(e,t,n){"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}n.r(t),n.d(t,{MultiDrag:function(){return bt},Sortable:function(){return qe},Swap:function(){return ut}});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(e,t,n){e.addEventListener(t,n,!c&&g)}function y(e,t,n){e.removeEventListener(t,n,!c&&g)}function b(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(e){return!1}return!1}}function x(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function w(e,t,n,r){if(e){n=n||document;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&b(e,t):b(e,t))||r&&e===n)return e;if(e===n)break}while(e=x(e))}return null}var _,S=/\s+/g;function O(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(S," ").replace(" "+t+" "," ");e.className=(r+(n?" "+t:"")).replace(S," ")}}function N(e,t,n){var r=e&&e.style;if(r){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in r||-1!==t.indexOf("webkit")||(t="-webkit-"+t),r[t]=n+("string"==typeof n?"":"px")}}function E(e,t){var n="";if("string"==typeof e)n=e;else do{var r=N(e,"transform");r&&"none"!==r&&(n=r+" "+n)}while(!t&&(e=e.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function C(e,t,n){if(e){var r=e.getElementsByTagName(t),i=0,o=r.length;if(n)for(;i<o;i++)n(r[i],i);return r}return[]}function A(){return document.scrollingElement||document.documentElement}function M(e,t,n,r,i){if(e.getBoundingClientRect||e===window){var o,a,s,u,l,f,h;if(e!==window&&e.parentNode&&e!==A()?(a=(o=e.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),(t||n)&&e!==window&&(i=i||e.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&&e!==window){var p=E(i||e),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 k(e,t,n){for(var r=I(e,!0),i=M(e)[t];r;){var o=M(r)[n];if(!("top"===n||"left"===n?i>=o:i<=o))return r;if(r===A())break;r=I(r,!1)}return!1}function T(e,t,n,r){for(var i=0,o=0,a=e.children;o<a.length;){if("none"!==a[o].style.display&&a[o]!==qe.ghost&&(r||a[o]!==qe.dragged)&&w(a[o],n.draggable,e,!1)){if(i===t)return a[o];i++}o++}return null}function D(e,t){for(var n=e.lastElementChild;n&&(n===qe.ghost||"none"===N(n,"display")||t&&!b(n,t));)n=n.previousElementSibling;return n||null}function j(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)"TEMPLATE"===e.nodeName.toUpperCase()||e===qe.clone||t&&!b(e,t)||n++;return n}function P(e){var t=0,n=0,r=A();if(e)do{var i=E(e),o=i.a,a=i.d;t+=e.scrollLeft*o,n+=e.scrollTop*a}while(e!==r&&(e=e.parentNode));return[t,n]}function I(e,t){if(!e||!e.getBoundingClientRect)return A();var n=e,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 A();if(r||t)return n;r=!0}}}while(n=n.parentNode);return A()}function R(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}function L(e,t){return function(){if(!_){var n=arguments;1===n.length?e.call(this,n[0]):e.apply(this,n),_=setTimeout((function(){_=void 0}),t)}}}function F(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function B(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}function q(e,t){N(e,"position","absolute"),N(e,"top",t.top),N(e,"left",t.left),N(e,"width",t.width),N(e,"height",t.height)}function z(e){N(e,"position",""),N(e,"top",""),N(e,"left",""),N(e,"width",""),N(e,"height","")}var H="Sortable"+(new Date).getTime();var U=[],W={initializeByDefault:!0},V={mount:function(e){for(var t in W)W.hasOwnProperty(t)&&!(t in e)&&(e[t]=W[t]);U.forEach((function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")})),U.push(e)},pluginEvent:function(e,t,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var o=e+"Global";U.forEach((function(r){t[r.pluginName]&&(t[r.pluginName][o]&&t[r.pluginName][o](i({sortable:t},n)),t.options[r.pluginName]&&t[r.pluginName][e]&&t[r.pluginName][e](i({sortable:t},n)))}))},initializePlugins:function(e,t,n,r){for(var i in U.forEach((function(r){var i=r.pluginName;if(e.options[i]||r.initializeByDefault){var o=new r(e,t,e.options);o.sortable=e,o.options=e.options,e[i]=o,s(n,o.defaults)}})),e.options)if(e.options.hasOwnProperty(i)){var o=this.modifyOption(e,i,e.options[i]);void 0!==o&&(e.options[i]=o)}},getEventProperties:function(e,t){var n={};return U.forEach((function(r){"function"==typeof r.eventProperties&&s(n,r.eventProperties.call(t[r.pluginName],e))})),n},modifyOption:function(e,t,n){var r;return U.forEach((function(i){e[i.pluginName]&&i.optionListeners&&"function"==typeof i.optionListeners[t]&&(r=i.optionListeners[t].call(e[i.pluginName],n))})),r}};function $(e){var t=e.sortable,n=e.rootEl,r=e.name,o=e.targetEl,a=e.cloneEl,s=e.toEl,u=e.fromEl,l=e.oldIndex,h=e.newIndex,d=e.oldDraggableIndex,p=e.newDraggableIndex,m=e.originalEvent,g=e.putSortable,v=e.extraEventProperties;if(t=t||n&&n[H]){var y,b=t.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,t));for(var _ in w)y[_]=w[_];n&&n.dispatchEvent(y),b[x]&&b[x].call(t,y)}}var Y=["evt"],Z=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.evt,o=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(n,Y);V.pluginEvent.bind(qe)(e,t,i({dragEl:K,parentEl:X,ghostEl:J,rootEl:Q,nextEl:ee,lastDownEl:te,cloneEl:ne,cloneHidden:re,dragStarted:ge,putSortable:le,activeSortable:qe.active,originalEvent:r,oldIndex:ie,oldDraggableIndex:ae,newIndex:oe,newDraggableIndex:se,hideGhostForTarget:Re,unhideGhostForTarget:Le,cloneNowHidden:function(){re=!0},cloneNowShown:function(){re=!1},dispatchSortableEvent:function(e){G({sortable:t,name:e,originalEvent:r})}},o))};function G(e){$(i({putSortable:le,cloneEl:ne,targetEl:K,rootEl:Q,oldIndex:ie,oldDraggableIndex:ae,newIndex:oe,newDraggableIndex:se},e))}var K,X,J,Q,ee,te,ne,re,ie,oe,ae,se,ue,le,ce,fe,he,de,pe,me,ge,ve,ye,be,xe,we=!1,_e=!1,Se=[],Oe=!1,Ne=!1,Ee=[],Ce=!1,Ae=[],Me="undefined"!=typeof document,ke=p,Te=f||c?"cssFloat":"float",De=Me&&!m&&!p&&"draggable"in document.createElement("div"),je=function(){if(Me){if(c)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),Pe=function(e,t){var n=N(e),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=T(e,0,t),o=T(e,1,t),a=i&&N(i),s=o&&N(o),u=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+M(i).width,l=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+M(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[Te]||o&&"none"===n[Te]&&u+l>r)?"vertical":"horizontal"},Ie=function(e){function t(e,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==e&&(n||s))return!0;if(null==e||!1===e)return!1;if(n&&"clone"===e)return e;if("function"==typeof e)return t(e(r,i,o,a),n)(r,i,o,a);var u=(n?r:i).options.group.name;return!0===e||"string"==typeof e&&e===u||e.join&&e.indexOf(u)>-1}}var n={},r=e.group;r&&"object"==o(r)||(r={name:r}),n.name=r.name,n.checkPull=t(r.pull,!0),n.checkPut=t(r.put),n.revertClone=r.revertClone,e.group=n},Re=function(){!je&&J&&N(J,"display","none")},Le=function(){!je&&J&&N(J,"display","")};Me&&!m&&document.addEventListener("click",(function(e){if(_e)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),_e=!1,!1}),!0);var Fe=function(e){if(K){e=e.touches?e.touches[0]:e;var t=(i=e.clientX,o=e.clientY,Se.some((function(e){var t=e[H].options.emptyInsertThreshold;if(t&&!D(e)){var n=M(e),r=i>=n.left-t&&i<=n.right+t,s=o>=n.top-t&&o<=n.bottom+t;return r&&s?a=e:void 0}})),a);if(t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[H]._onDragOver(n)}}var i,o,a},Be=function(e){K&&K.parentNode[H]._isOutsideThisEl(e.target)};function qe(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=s({},t),e[H]=this;var n,r,o={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Pe(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.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!==qe.supportPointer&&"PointerEvent"in window&&!d,emptyInsertThreshold:5};for(var a in V.initializePlugins(this,e,o),o)!(a in t)&&(t[a]=o[a]);for(var u in Ie(t),this)"_"===u.charAt(0)&&"function"==typeof this[u]&&(this[u]=this[u].bind(this));this.nativeDraggable=!t.forceFallback&&De,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?v(e,"pointerdown",this._onTapStart):(v(e,"mousedown",this._onTapStart),v(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(v(e,"dragover",this),v(e,"dragenter",this)),Se.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),s(this,(r=[],{captureAnimationState:function(){r=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(e){if("none"!==N(e,"display")&&e!==qe.ghost){r.push({target:e,rect:M(e)});var t=i({},r[r.length-1].rect);if(e.thisAnimationDuration){var n=E(e,!0);n&&(t.top-=n.f,t.left-=n.e)}e.fromRect=t}}))},addAnimationState:function(e){r.push(e)},removeAnimationState:function(e){r.splice(function(e,t){for(var n in e)if(e.hasOwnProperty(n))for(var r in t)if(t.hasOwnProperty(r)&&t[r]===e[n][r])return Number(n);return-1}(r,{target:e}),1)},animateAll:function(e){var t=this;if(!this.options.animation)return clearTimeout(n),void("function"==typeof e&&e());var i=!1,o=0;r.forEach((function(e){var n=0,r=e.target,a=r.fromRect,s=M(r),u=r.prevFromRect,l=r.prevToRect,c=e.rect,f=E(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(e,t,n,r){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*r.animation}(c,u,l,t.options)),R(s,a)||(r.prevFromRect=a,r.prevToRect=s,n||(n=t.options.animation),t.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 e&&e()}),o):"function"==typeof e&&e(),r=[]},animate:function(e,t,n,r){if(r){N(e,"transition",""),N(e,"transform","");var i=E(this.el),o=i&&i.a,a=i&&i.d,s=(t.left-n.left)/(o||1),u=(t.top-n.top)/(a||1);e.animatingX=!!s,e.animatingY=!!u,N(e,"transform","translate3d("+s+"px,"+u+"px,0)"),this.forRepaintDummy=function(e){return e.offsetWidth}(e),N(e,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),N(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout((function(){N(e,"transition",""),N(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1}),r)}}}))}function ze(e,t,n,r,i,o,a,s){var u,l,h=e[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=t,u.from=e,u.dragged=n,u.draggedRect=r,u.related=i||t,u.relatedRect=o||M(t),u.willInsertAfter=s,u.originalEvent=a,e.dispatchEvent(u),d&&(l=d.call(h,u,a)),l}function He(e){e.draggable=!1}function Ue(){Ce=!1}function We(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,r=0;n--;)r+=t.charCodeAt(n);return r.toString(36)}function Ve(e){return setTimeout(e,0)}function $e(e){return clearTimeout(e)}qe.prototype={constructor:qe,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(ve=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,K):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,r=this.options,i=r.preventOnFilter,o=e.type,a=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,s=(a||e).target,u=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||s,l=r.filter;if(function(e){Ae.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var r=t[n];r.checked&&Ae.push(r)}}(n),!K&&!(/mousedown|pointerdown/.test(o)&&0!==e.button||r.disabled)&&!u.isContentEditable&&(this.nativeDraggable||!d||!s||"SELECT"!==s.tagName.toUpperCase())&&!((s=w(s,r.draggable,n,!1))&&s.animated||te===s)){if(ie=j(s),ae=j(s,r.draggable),"function"==typeof l){if(l.call(this,e,s,this))return G({sortable:t,rootEl:u,name:"filter",targetEl:s,toEl:n,fromEl:n}),Z("filter",t,{evt:e}),void(i&&e.cancelable&&e.preventDefault())}else if(l&&(l=l.split(",").some((function(r){if(r=w(u,r.trim(),n,!1))return G({sortable:t,rootEl:r,name:"filter",targetEl:s,fromEl:n,toEl:n}),Z("filter",t,{evt:e}),!0}))))return void(i&&e.cancelable&&e.preventDefault());r.handle&&!w(u,r.handle,n,!1)||this._prepareDragStart(e,a,s)}}},_prepareDragStart:function(e,t,n){var r,i=this,o=i.el,a=i.options,s=o.ownerDocument;if(n&&!K&&n.parentNode===o){var u=M(n);if(Q=o,X=(K=n).parentNode,ee=K.nextSibling,te=n,ue=a.group,qe.dragged=K,ce={target:K,clientX:(t||e).clientX,clientY:(t||e).clientY},pe=ce.clientX-u.left,me=ce.clientY-u.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,K.style["will-change"]="all",r=function(){Z("delayEnded",i,{evt:e}),qe.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!h&&i.nativeDraggable&&(K.draggable=!0),i._triggerDragStart(e,t),G({sortable:i,name:"choose",originalEvent:e}),O(K,a.chosenClass,!0))},a.ignore.split(",").forEach((function(e){C(K,e.trim(),He)})),v(s,"dragover",Fe),v(s,"mousemove",Fe),v(s,"touchmove",Fe),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:e}),!a.delay||a.delayOnTouchOnly&&!t||this.nativeDraggable&&(f||c))r();else{if(qe.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(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){K&&He(K),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;y(e,"mouseup",this._disableDelayedDrag),y(e,"touchend",this._disableDelayedDrag),y(e,"touchcancel",this._disableDelayedDrag),y(e,"mousemove",this._delayedDragTouchMoveHandler),y(e,"touchmove",this._delayedDragTouchMoveHandler),y(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?v(document,"pointermove",this._onTouchMove):v(document,t?"touchmove":"mousemove",this._onTouchMove):(v(K,"dragend",this),v(Q,"dragstart",this._onDragStart));try{document.selection?Ve((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(e,t){if(we=!1,Q&&K){Z("dragStarted",this,{evt:t}),this.nativeDraggable&&v(document,"dragover",Be);var n=this.options;!e&&O(K,n.dragClass,!1),O(K,n.ghostClass,!0),qe.active=this,e&&this._appendGhost(),G({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(fe){this._lastX=fe.clientX,this._lastY=fe.clientY,Re();for(var e=document.elementFromPoint(fe.clientX,fe.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(fe.clientX,fe.clientY))!==t;)t=e;if(K.parentNode[H]._isOutsideThisEl(e),t)do{if(t[H]&&t[H]._onDragOver({clientX:fe.clientX,clientY:fe.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break;e=t}while(t=t.parentNode);Le()}},_onTouchMove:function(e){if(ce){var t=this.options,n=t.fallbackTolerance,r=t.fallbackOffset,i=e.touches?e.touches[0]:e,o=J&&E(J,!0),a=J&&o&&o.a,s=J&&o&&o.d,u=ke&&xe&&P(xe),l=(i.clientX-ce.clientX+r.x)/(a||1)+(u?u[0]-Ee[0]:0)/(a||1),c=(i.clientY-ce.clientY+r.y)/(s||1)+(u?u[1]-Ee[1]:0)/(s||1);if(!qe.active&&!we){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(J){o?(o.e+=l-(he||0),o.f+=c-(de||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),he=l,de=c,fe=i}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!J){var e=this.options.fallbackOnBody?document.body:Q,t=M(K,!0,ke,!0,e),n=this.options;if(ke){for(xe=e;"static"===N(xe,"position")&&"none"===N(xe,"transform")&&xe!==document;)xe=xe.parentNode;xe!==document.body&&xe!==document.documentElement?(xe===document&&(xe=A()),t.top+=xe.scrollTop,t.left+=xe.scrollLeft):xe=A(),Ee=P(xe)}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",t.top),N(J,"left",t.left),N(J,"width",t.width),N(J,"height",t.height),N(J,"opacity","0.8"),N(J,"position",ke?"absolute":"fixed"),N(J,"zIndex","100000"),N(J,"pointerEvents","none"),qe.ghost=J,e.appendChild(J),N(J,"transform-origin",pe/parseInt(J.style.width)*100+"% "+me/parseInt(J.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,r=e.dataTransfer,i=n.options;Z("dragStart",this,{evt:e}),qe.eventCanceled?this._onDrop():(Z("setupClone",this),qe.eventCanceled||((ne=B(K)).removeAttribute("id"),ne.draggable=!1,ne.style["will-change"]="",this._hideClone(),O(ne,this.options.chosenClass,!1),qe.clone=ne),n.cloneId=Ve((function(){Z("clone",n),qe.eventCanceled||(n.options.removeCloneOnHide||Q.insertBefore(ne,K),n._hideClone(),G({sortable:n,name:"clone"}))})),!t&&O(K,i.dragClass,!0),t?(_e=!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)")),we=!0,n._dragStartId=Ve(n._dragStarted.bind(n,t,e)),v(document,"selectstart",n),ge=!0,d&&N(document.body,"user-select","none"))},_onDragOver:function(e){var t,n,r,o,a=this.el,s=e.target,u=this.options,l=u.group,c=qe.active,f=ue===l,h=u.sort,d=le||c,p=this,m=!1;if(!Ce){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),s=w(s,u.draggable,a,!0),B("dragOver"),qe.eventCanceled)return m;if(K.contains(e.target)||s.animated&&s.animatingX&&s.animatingY||p._ignoreWhileAnimating===s)return z(!1);if(_e=!1,c&&!u.disabled&&(f?h||(r=X!==Q):le===this||(this.lastPutMode=ue.checkPull(this,c,K,e))&&l.checkPut(this,c,K,e))){if(o="vertical"===this._getDirection(e,s),t=M(K),B("dragOverValid"),qe.eventCanceled)return m;if(r)return X=Q,q(),this._hideClone(),B("revert"),qe.eventCanceled||(ee?Q.insertBefore(K,ee):Q.appendChild(K)),z(!0);var g=D(a,u.draggable);if(!g||function(e,t,n){var r=M(D(n.el,n.options.draggable));return t?e.clientX>r.right+10||e.clientX<=r.right&&e.clientY>r.bottom&&e.clientX>=r.left:e.clientX>r.right&&e.clientY>r.top||e.clientX<=r.right&&e.clientY>r.bottom+10}(e,o,this)&&!g.animated){if(g===K)return z(!1);if(g&&a===e.target&&(s=g),s&&(n=M(s)),!1!==ze(Q,a,K,t,s,n,e,!!s))return q(),g&&g.nextSibling?a.insertBefore(K,g.nextSibling):a.appendChild(K),X=a,U(),z(!0)}else if(g&&function(e,t,n){var r=M(T(n.el,0,n.options,!0));return t?e.clientX<r.left-10||e.clientY<r.top&&e.clientX<r.right:e.clientY<r.top-10||e.clientY<r.bottom&&e.clientX<r.left}(e,o,this)){var v=T(a,0,u,!0);if(v===K)return z(!1);if(n=M(s=v),!1!==ze(Q,a,K,t,s,n,e,!1))return q(),a.insertBefore(K,v),X=a,U(),z(!0)}else if(s.parentNode===a){n=M(s);var y,b,x,_=K.parentNode!==a,S=!function(e,t,n){var r=n?e.left:e.top,i=n?e.right:e.bottom,o=n?e.width:e.height,a=n?t.left:t.top,s=n?t.right:t.bottom,u=n?t.width:t.height;return r===a||i===s||r+o/2===a+u/2}(K.animated&&K.toRect||t,s.animated&&s.toRect||n,o),E=o?"top":"left",C=k(s,"top","top")||k(K,"top","top"),A=C?C.scrollTop:void 0;if(ve!==s&&(b=n[E],Oe=!1,Ne=!S&&u.invertSwap||_),y=function(e,t,n,r,i,o,a,s){var u=r?e.clientY:e.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&&be<l*i){if(!Oe&&(1===ye?u>c+l*o/2:u<f-l*o/2)&&(Oe=!0),Oe)h=!0;else if(1===ye?u<c+be:u>f-be)return-ye}else if(u>c+l*(1-i)/2&&u<f-l*(1-i)/2)return function(e){return j(K)<j(e)?1:-1}(t);return(h=h||a)&&(u<c+l*o/2||u>f-l*o/2)?u>c+l/2?1:-1:0}(e,s,n,o,S?1:u.swapThreshold,null==u.invertedSwapThreshold?u.swapThreshold:u.invertedSwapThreshold,Ne,ve===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);ve=s,ye=y;var I=s.nextElementSibling,R=!1,L=ze(Q,a,K,t,s,n,e,R=1===y);if(!1!==L)return 1!==L&&-1!==L||(R=1===L),Ce=!0,setTimeout(Ue,30),q(),R&&!I?a.appendChild(K):s.parentNode.insertBefore(K,R?I:s),C&&F(C,0,A-C.scrollTop),X=K.parentNode,void 0===b||Ne||(be=Math.abs(b-M(s)[E])),U(),z(!0)}if(a.contains(K))return z(!1)}return!1}function B(u,l){Z(u,p,i({evt:e,isOwner:f,axis:o?"vertical":"horizontal",revert:r,dragRect:t,targetRect:n,canSort:h,fromSortable:d,target:s,completed:z,onMove:function(n,r){return ze(Q,a,K,t,n,M(n),e,r)},changed:U},l))}function q(){B("dragOverAnimationCapture"),p.captureAnimationState(),p!==d&&d.captureAnimationState()}function z(t){return B("dragOverCompleted",{insertion:t}),t&&(f?c._hideClone():c._showClone(p),p!==d&&(O(K,le?le.options.ghostClass:c.options.ghostClass,!1),O(K,u.ghostClass,!0)),le!==p&&p!==qe.active?le=p:p===qe.active&&le&&(le=null),d===p&&(p._ignoreWhileAnimating=s),p.animateAll((function(){B("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==d&&(d.animateAll(),d._ignoreWhileAnimating=null)),(s===K&&!K.animated||s===a&&!s.animated)&&(ve=null),u.dragoverBubble||e.rootEl||s===document||(K.parentNode[H]._isOutsideThisEl(e.target),!t&&Fe(e)),!u.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),m=!0}function U(){oe=j(K),se=j(K,u.draggable),G({sortable:p,name:"change",toEl:a,newIndex:oe,newDraggableIndex:se,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){y(document,"mousemove",this._onTouchMove),y(document,"touchmove",this._onTouchMove),y(document,"pointermove",this._onTouchMove),y(document,"dragover",Fe),y(document,"mousemove",Fe),y(document,"touchmove",Fe)},_offUpEvents:function(){var e=this.el.ownerDocument;y(e,"mouseup",this._onDrop),y(e,"touchend",this._onDrop),y(e,"pointerup",this._onDrop),y(e,"touchcancel",this._onDrop),y(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;oe=j(K),se=j(K,n.draggable),Z("drop",this,{evt:e}),X=K&&K.parentNode,oe=j(K),se=j(K,n.draggable),qe.eventCanceled||(we=!1,Ne=!1,Oe=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),$e(this.cloneId),$e(this._dragStartId),this.nativeDraggable&&(y(document,"drop",this),y(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),d&&N(document.body,"user-select",""),N(K,"transform",""),e&&(ge&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),J&&J.parentNode&&J.parentNode.removeChild(J),(Q===X||le&&"clone"!==le.lastPutMode)&&ne&&ne.parentNode&&ne.parentNode.removeChild(ne),K&&(this.nativeDraggable&&y(K,"dragend",this),He(K),K.style["will-change"]="",ge&&!we&&O(K,le?le.options.ghostClass:this.options.ghostClass,!1),O(K,this.options.chosenClass,!1),G({sortable:this,name:"unchoose",toEl:X,newIndex:null,newDraggableIndex:null,originalEvent:e}),Q!==X?(oe>=0&&(G({rootEl:X,name:"add",toEl:X,fromEl:Q,originalEvent:e}),G({sortable:this,name:"remove",toEl:X,originalEvent:e}),G({rootEl:X,name:"sort",toEl:X,fromEl:Q,originalEvent:e}),G({sortable:this,name:"sort",toEl:X,originalEvent:e})),le&&le.save()):oe!==ie&&oe>=0&&(G({sortable:this,name:"update",toEl:X,originalEvent:e}),G({sortable:this,name:"sort",toEl:X,originalEvent:e})),qe.active&&(null!=oe&&-1!==oe||(oe=ie,se=ae),G({sortable:this,name:"end",toEl:X,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){Z("nulling",this),Q=K=X=J=ee=ne=te=re=ce=fe=ge=oe=se=ie=ae=ve=ye=le=ue=qe.dragged=qe.ghost=qe.clone=qe.active=null,Ae.forEach((function(e){e.checked=!0})),Ae.length=he=de=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":K&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],n=this.el.children,r=0,i=n.length,o=this.options;r<i;r++)w(e=n[r],o.draggable,this.el,!1)&&t.push(e.getAttribute(o.dataIdAttr)||We(e));return t},sort:function(e,t){var n={},r=this.el;this.toArray().forEach((function(e,t){var i=r.children[t];w(i,this.options.draggable,r,!1)&&(n[e]=i)}),this),t&&this.captureAnimationState(),e.forEach((function(e){n[e]&&(r.removeChild(n[e]),r.appendChild(n[e]))})),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return w(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(void 0===t)return n[e];var r=V.modifyOption(this,e,t);n[e]=void 0!==r?r:t,"group"===e&&Ie(n)},destroy:function(){Z("destroy",this);var e=this.el;e[H]=null,y(e,"mousedown",this._onTapStart),y(e,"touchstart",this._onTapStart),y(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(y(e,"dragover",this),y(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),(function(e){e.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),Se.splice(Se.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!re){if(Z("hideClone",this),qe.eventCanceled)return;N(ne,"display","none"),this.options.removeCloneOnHide&&ne.parentNode&&ne.parentNode.removeChild(ne),re=!0}},_showClone:function(e){if("clone"===e.lastPutMode){if(re){if(Z("showClone",this),qe.eventCanceled)return;K.parentNode!=Q||this.options.group.revertClone?ee?Q.insertBefore(ne,ee):Q.appendChild(ne):Q.insertBefore(ne,K),this.options.group.revertClone&&this.animate(K,ne),N(ne,"display",""),re=!1}}else this._hideClone()}},Me&&v(document,"touchmove",(function(e){(qe.active||we)&&e.cancelable&&e.preventDefault()})),qe.utils={on:v,off:y,css:N,find:C,is:function(e,t){return!!w(e,t,e,!1)},extend:function(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},throttle:L,closest:w,toggleClass:O,clone:B,index:j,nextTick:Ve,cancelNextTick:$e,detectDirection:Pe,getChild:T},qe.get=function(e){return e[H]},qe.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach((function(e){if(!e.prototype||!e.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(e));e.utils&&(qe.utils=i(i({},qe.utils),e.utils)),V.mount(e)}))},qe.create=function(e,t){return new qe(e,t)},qe.version="1.15.0";var Ye,Ze,Ge,Ke,Xe,Je,Qe=[],et=!1;function tt(){Qe.forEach((function(e){clearInterval(e.pid)})),Qe=[]}function nt(){clearInterval(Je)}var rt,it=L((function(e,t,n,r){if(t.scroll){var i,o=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,s=t.scrollSensitivity,u=t.scrollSpeed,l=A(),c=!1;Ze!==n&&(Ze=n,tt(),Ye=t.scroll,i=t.scrollFn,!0===Ye&&(Ye=I(n,!0)));var f=0,h=Ye;do{var d=h,p=M(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,E=N(d),C=d.scrollLeft,k=d.scrollTop;d===l?(w=b<S&&("auto"===E.overflowX||"scroll"===E.overflowX||"visible"===E.overflowX),_=x<O&&("auto"===E.overflowY||"scroll"===E.overflowY||"visible"===E.overflowY)):(w=b<S&&("auto"===E.overflowX||"scroll"===E.overflowX),_=x<O&&("auto"===E.overflowY||"scroll"===E.overflowY));var T=w&&(Math.abs(y-o)<=s&&C+b<S)-(Math.abs(v-o)<=s&&!!C),D=_&&(Math.abs(g-a)<=s&&k+x<O)-(Math.abs(m-a)<=s&&!!k);if(!Qe[f])for(var j=0;j<=f;j++)Qe[j]||(Qe[j]={});Qe[f].vx==T&&Qe[f].vy==D&&Qe[f].el===d||(Qe[f].el=d,Qe[f].vx=T,Qe[f].vy=D,clearInterval(Qe[f].pid),0==T&&0==D||(c=!0,Qe[f].pid=setInterval(function(){r&&0===this.layer&&qe.active._onTouchMove(Xe);var t=Qe[this.layer].vy?Qe[this.layer].vy*u:0,n=Qe[this.layer].vx?Qe[this.layer].vx*u:0;"function"==typeof i&&"continue"!==i.call(qe.dragged.parentNode[H],n,t,e,Xe,Qe[this.layer].el)||F(Qe[this.layer].el,n,t)}.bind({layer:f}),24))),f++}while(t.bubbleScroll&&h!==l&&(h=I(h,!1)));et=c}}),30),ot=function(e){var t=e.originalEvent,n=e.putSortable,r=e.dragEl,i=e.activeSortable,o=e.dispatchSortableEvent,a=e.hideGhostForTarget,s=e.unhideGhostForTarget;if(t){var u=n||i;a();var l=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,c=document.elementFromPoint(l.clientX,l.clientY);s(),u&&!u.el.contains(c)&&(o("spill"),this.onSpill({dragEl:r,putSortable:n}))}};function at(){}function st(){}function ut(){function e(){this.defaults={swapClass:"sortable-swap-highlight"}}return e.prototype={dragStart:function(e){var t=e.dragEl;rt=t},dragOverValid:function(e){var t=e.completed,n=e.target,r=e.onMove,i=e.activeSortable,o=e.changed,a=e.cancel;if(i.options.swap){var s=this.sortable.el,u=this.options;if(n&&n!==s){var l=rt;!1!==r(n)?(O(n,u.swapClass,!0),rt=n):rt=null,l&&l!==rt&&O(l,u.swapClass,!1)}o(),t(!0),a()}},drop:function(e){var t,n,r,i,o,a,s=e.activeSortable,u=e.putSortable,l=e.dragEl,c=u||this.sortable,f=this.options;rt&&O(rt,f.swapClass,!1),rt&&(f.swap||u&&u.options.swap)&&l!==rt&&(c.captureAnimationState(),c!==s&&s.captureAnimationState(),n=rt,o=(t=l).parentNode,a=n.parentNode,o&&a&&!o.isEqualNode(n)&&!a.isEqualNode(t)&&(r=j(t),i=j(n),o.isEqualNode(a)&&r<i&&i++,o.insertBefore(n,o.children[r]),a.insertBefore(t,a.children[i])),c.animateAll(),c!==s&&s.animateAll())},nulling:function(){rt=null}},s(e,{pluginName:"swap",eventProperties:function(){return{swapItem:rt}}})}at.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var r=T(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(t,r):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:ot},s(at,{pluginName:"revertOnSpill"}),st.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable||this.sortable;n.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),n.animateAll()},drop:ot},s(st,{pluginName:"removeOnSpill"});var lt,ct,ft,ht,dt,pt=[],mt=[],gt=!1,vt=!1,yt=!1;function bt(){function e(e){for(var t in this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this));e.options.avoidImplicitDeselect||(e.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(t,n){var r="";pt.length&&ct===e?pt.forEach((function(e,t){r+=(t?", ":"")+e.textContent})):r=n.textContent,t.setData("Text",r)}}}return e.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(e){var t=e.dragEl;ft=t},delayEnded:function(){this.isMultiDrag=~pt.indexOf(ft)},setupClone:function(e){var t=e.sortable,n=e.cancel;if(this.isMultiDrag){for(var r=0;r<pt.length;r++)mt.push(B(pt[r])),mt[r].sortableIndex=pt[r].sortableIndex,mt[r].draggable=!1,mt[r].style["will-change"]="",O(mt[r],this.options.selectedClass,!1),pt[r]===ft&&O(mt[r],this.options.chosenClass,!1);t._hideClone(),n()}},clone:function(e){var t=e.sortable,n=e.rootEl,r=e.dispatchSortableEvent,i=e.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||pt.length&&ct===t&&(xt(!0,n),r("clone"),i()))},showClone:function(e){var t=e.cloneNowShown,n=e.rootEl,r=e.cancel;this.isMultiDrag&&(xt(!1,n),mt.forEach((function(e){N(e,"display","")})),t(),dt=!1,r())},hideClone:function(e){var t=this,n=(e.sortable,e.cloneNowHidden),r=e.cancel;this.isMultiDrag&&(mt.forEach((function(e){N(e,"display","none"),t.options.removeCloneOnHide&&e.parentNode&&e.parentNode.removeChild(e)})),n(),dt=!0,r())},dragStartGlobal:function(e){e.sortable,!this.isMultiDrag&&ct&&ct.multiDrag._deselectMultiDrag(),pt.forEach((function(e){e.sortableIndex=j(e)})),pt=pt.sort((function(e,t){return e.sortableIndex-t.sortableIndex})),yt=!0},dragStarted:function(e){var t=this,n=e.sortable;if(this.isMultiDrag){if(this.options.sort&&(n.captureAnimationState(),this.options.animation)){pt.forEach((function(e){e!==ft&&N(e,"position","absolute")}));var r=M(ft,!1,!0,!0);pt.forEach((function(e){e!==ft&&q(e,r)})),vt=!0,gt=!0}n.animateAll((function(){vt=!1,gt=!1,t.options.animation&&pt.forEach((function(e){z(e)})),t.options.sort&&wt()}))}},dragOver:function(e){var t=e.target,n=e.completed,r=e.cancel;vt&&~pt.indexOf(t)&&(n(!1),r())},revert:function(e){var t=e.fromSortable,n=e.rootEl,r=e.sortable,i=e.dragRect;pt.length>1&&(pt.forEach((function(e){r.addAnimationState({target:e,rect:vt?M(e):i}),z(e),e.fromRect=i,t.removeAnimationState(e)})),vt=!1,function(e,t){pt.forEach((function(n,r){var i=t.children[n.sortableIndex+(e?Number(r):0)];i?t.insertBefore(n,i):t.appendChild(n)}))}(!this.options.removeCloneOnHide,n))},dragOverCompleted:function(e){var t=e.sortable,n=e.isOwner,r=e.insertion,i=e.activeSortable,o=e.parentEl,a=e.putSortable,s=this.options;if(r){if(n&&i._hideClone(),gt=!1,s.animation&&pt.length>1&&(vt||!n&&!i.options.sort&&!a)){var u=M(ft,!1,!0,!0);pt.forEach((function(e){e!==ft&&(q(e,u),o.appendChild(e))})),vt=!0}if(!n)if(vt||wt(),pt.length>1){var l=dt;i._showClone(t),i.options.animation&&!dt&&l&&mt.forEach((function(e){i.addAnimationState({target:e,rect:ht}),e.fromRect=ht,e.thisAnimationDuration=null}))}else i._showClone(t)}},dragOverAnimationCapture:function(e){var t=e.dragRect,n=e.isOwner,r=e.activeSortable;if(pt.forEach((function(e){e.thisAnimationDuration=null})),r.options.animation&&!n&&r.multiDrag.isMultiDrag){ht=s({},t);var i=E(ft,!0);ht.top-=i.f,ht.left-=i.e}},dragOverAnimationComplete:function(){vt&&(vt=!1,wt())},drop:function(e){var t=e.originalEvent,n=e.rootEl,r=e.parentEl,i=e.sortable,o=e.dispatchSortableEvent,a=e.oldIndex,s=e.putSortable,u=s||this.sortable;if(t){var l=this.options,c=r.children;if(!yt)if(l.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),O(ft,l.selectedClass,!~pt.indexOf(ft)),~pt.indexOf(ft))pt.splice(pt.indexOf(ft),1),lt=null,$({sortable:i,rootEl:n,name:"deselect",targetEl:ft,originalEvent:t});else{if(pt.push(ft),$({sortable:i,rootEl:n,name:"select",targetEl:ft,originalEvent:t}),t.shiftKey&&lt&&i.el.contains(lt)){var f,h,d=j(lt),p=j(ft);if(~d&&~p&&d!==p)for(p>d?(h=d,f=p):(h=p,f=d+1);h<f;h++)~pt.indexOf(c[h])||(O(c[h],l.selectedClass,!0),pt.push(c[h]),$({sortable:i,rootEl:n,name:"select",targetEl:c[h],originalEvent:t}))}else lt=ft;ct=u}if(yt&&this.isMultiDrag){if(vt=!1,(r[H].options.sort||r!==n)&&pt.length>1){var m=M(ft),g=j(ft,":not(."+this.options.selectedClass+")");if(!gt&&l.animation&&(ft.thisAnimationDuration=null),u.captureAnimationState(),!gt&&(l.animation&&(ft.fromRect=m,pt.forEach((function(e){if(e.thisAnimationDuration=null,e!==ft){var t=vt?M(e):m;e.fromRect=t,u.addAnimationState({target:e,rect:t})}}))),wt(),pt.forEach((function(e){c[g]?r.insertBefore(e,c[g]):r.appendChild(e),g++})),a===j(ft))){var v=!1;pt.forEach((function(e){e.sortableIndex===j(e)||(v=!0)})),v&&o("update")}pt.forEach((function(e){z(e)})),u.animateAll()}ct=u}(n===r||s&&"clone"!==s.lastPutMode)&&mt.forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)}))}},nullingGlobal:function(){this.isMultiDrag=yt=!1,mt.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(e){if(!(void 0!==yt&&yt||ct!==this.sortable||e&&w(e.target,this.options.draggable,this.sortable.el,!1)||e&&0!==e.button))for(;pt.length;){var t=pt[0];O(t,this.options.selectedClass,!1),pt.shift(),$({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:t,originalEvent:e})}},_checkKeyDown:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},s(e,{pluginName:"multiDrag",utils:{select:function(e){var t=e.parentNode[H];t&&t.options.multiDrag&&!~pt.indexOf(e)&&(ct&&ct!==t&&(ct.multiDrag._deselectMultiDrag(),ct=t),O(e,t.options.selectedClass,!0),pt.push(e))},deselect:function(e){var t=e.parentNode[H],n=pt.indexOf(e);t&&t.options.multiDrag&&~n&&(O(e,t.options.selectedClass,!1),pt.splice(n,1))}},eventProperties:function(){var e,t=this,n=[],r=[];return pt.forEach((function(e){var i;n.push({multiDragElement:e,index:e.sortableIndex}),i=vt&&e!==ft?-1:vt?j(e,":not(."+t.options.selectedClass+")"):j(e),r.push({multiDragElement:e,index:i})})),{items:(e=pt,function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}(e)||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(mt),oldIndicies:n,newIndicies:r}},optionListeners:{multiDragKey:function(e){return"ctrl"===(e=e.toLowerCase())?e="Control":e.length>1&&(e=e.charAt(0).toUpperCase()+e.substr(1)),e}}})}function xt(e,t){mt.forEach((function(n,r){var i=t.children[n.sortableIndex+(e?Number(r):0)];i?t.insertBefore(n,i):t.appendChild(n)}))}function wt(){pt.forEach((function(e){e!==ft&&e.parentNode&&e.parentNode.removeChild(e)}))}qe.mount(new function(){function e(){for(var e in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?v(document,"dragover",this._handleAutoScroll):this.options.supportPointer?v(document,"pointermove",this._handleFallbackAutoScroll):t.touches?v(document,"touchmove",this._handleFallbackAutoScroll):v(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},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)),nt(),tt(),clearTimeout(_),_=void 0},nulling:function(){Xe=Ze=Ye=et=Je=Ge=Ke=null,Qe.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var n=this,r=(e.touches?e.touches[0]:e).clientX,i=(e.touches?e.touches[0]:e).clientY,o=document.elementFromPoint(r,i);if(Xe=e,t||this.options.forceAutoScrollFallback||f||c||d){it(e,this.options,o,t);var a=I(o,!0);!et||Je&&r===Ge&&i===Ke||(Je&&nt(),Je=setInterval((function(){var o=I(document.elementFromPoint(r,i),!0);o!==a&&(a=o,tt()),it(e,n.options,o,t)}),10),Ge=r,Ke=i)}else{if(!this.options.bubbleScroll||I(o,!0)===A())return void tt();it(e,this.options,I(o,!1),!1)}}},s(e,{pluginName:"scroll",initializeByDefault:!0})}),qe.mount(st,at),t.default=qe},34760:function(e){var t=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'],n=t.join(","),r="undefined"==typeof Element?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;function i(e,t){t=t||{};var i,a,s,c=[],h=[],d=new f(e.ownerDocument||e),p=e.querySelectorAll(n);for(t.includeContainer&&r.call(e,n)&&(p=Array.prototype.slice.apply(p)).unshift(e),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(e){return e.node})).concat(c)}function o(e,t){return!(!a(e,t)||function(e){return function(e){return c(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t=function(e){for(var t=0;t<e.length;t++)if(e[t].checked)return e[t]}(e.ownerDocument.querySelectorAll('input[type="radio"][name="'+e.name+'"]'));return!t||t===e}(e)}(e)||u(e)<0)}function a(e,t){return t=t||new f(e.ownerDocument||e),!(e.disabled||function(e){return c(e)&&"hidden"===e.type}(e)||t.isUntouchable(e))}i.isTabbable=function(e,t){if(!e)throw new Error("No node provided");return!1!==r.call(e,n)&&o(e,t)},i.isFocusable=function(e,t){if(!e)throw new Error("No node provided");return!1!==r.call(e,s)&&a(e,t)};var s=t.concat("iframe").join(",");function u(e){var t=parseInt(e.getAttribute("tabindex"),10);return isNaN(t)?function(e){return"true"===e.contentEditable}(e)?0:e.tabIndex:t}function l(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex}function c(e){return"INPUT"===e.tagName}function f(e){this.doc=e,this.cache=[]}f.prototype.hasDisplayNone=function(e,t){if(e.nodeType!==Node.ELEMENT_NODE)return!1;var n=function(t,n){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return t[r]}(this.cache);if(n)return n[1];var r=!1;return"none"===(t=t||this.doc.defaultView.getComputedStyle(e)).display?r=!0:e.parentNode&&(r=this.hasDisplayNone(e.parentNode)),this.cache.push([e,r]),r},f.prototype.isUntouchable=function(e){if(e===this.doc.documentElement)return!1;var t=this.doc.defaultView.getComputedStyle(e);return!!this.hasDisplayNone(e,t)||"hidden"===t.visibility},e.exports=i},70655:function(e,t,n){"use strict";n.r(t),n.d(t,{__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(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function i(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function s(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a}function u(e,t){return function(n,r){t(n,r,e)}}function l(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function c(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function f(e,t){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=t.call(e,a)}catch(e){o=[6,e],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(e,t){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}function d(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function p(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function m(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(p(arguments[t]));return e}function g(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}function v(e){return this instanceof v?(this.v=e,this):new v(e)}function y(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{(n=i[e](t)).value instanceof v?Promise.resolve(n.value.v).then(u,l):c(o[0][2],n)}catch(e){c(o[0][3],e)}var n}function u(e){s("next",e)}function l(e){s("throw",e)}function c(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function b(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:v(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function x(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=d(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,i,(t=e[n](t)).done,t.value)}))}}}function w(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function _(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function S(e){return e&&e.__esModule?e:{default:e}}function O(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function N(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},47529:function(e){e.exports=function(){for(var e={},n=0;n<arguments.length;n++){var r=arguments[n];for(var i in r)t.call(r,i)&&(e[i]=r[i])}return e};var t=Object.prototype.hasOwnProperty},11752:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(61120);function i(){return i="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=(0,r.Z)(e)););return e}(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},i.apply(this,arguments)}},45987:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(63366);function i(e,t){if(null==e)return{};var n,i,o=(0,r.Z)(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}},12860:function(e,t,n){"use strict";function r(e){throw new TypeError('"'+e+'" is read-only')}n.d(t,{Z:function(){return r}})},648:function(e){"use strict";e.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(e){"use strict";e.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(e){"use strict";e.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"}]}}}')}}]);