!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Quill=e():t.Quill=e()}(this,function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={exports:{},id:i,loaded:!1};return t[i].call(r.exports,r,r.exports,n),r.loaded=!0,r.exports}return n.m=t,n.c=e,n.p="",n(0)}([function(t,e,n){t.exports=n(1)},function(t,e,n){"use strict";var i=j(n(2)),r=n(46),o=n(49),a=n(54),s=j(n(55)),l=j(n(56)),u=n(57),c=j(u),f=n(47),d=n(48),h=n(50),p=n(51),y=j(n(58)),g=j(n(59)),v=j(n(60)),m=j(n(61)),b=j(n(62)),x=j(n(63)),_=j(n(64)),w=j(n(65)),k=n(32),O=j(k),S=j(n(66)),M=j(n(67)),A=j(n(68)),T=j(n(69)),C=j(n(101)),P=j(n(103)),E=j(n(104)),N=j(n(105)),D=j(n(106)),L=j(n(108));function j(t){return t&&t.__esModule?t:{default:t}}i.default.register({"attributors/class/align":r.AlignClass,"attributors/class/background":f.BackgroundClass,"attributors/class/color":d.ColorClass,"attributors/class/direction":o.DirectionClass,"attributors/class/font":h.FontClass,"attributors/class/size":p.SizeClass,"attributors/style/align":r.AlignStyle,"attributors/style/background":f.BackgroundStyle,"attributors/style/color":d.ColorStyle,"attributors/style/direction":o.DirectionStyle,"attributors/style/font":h.FontStyle,"attributors/style/size":p.SizeStyle},!0),i.default.register({"formats/align":r.AlignClass,"formats/direction":o.DirectionClass,"formats/indent":a.IndentClass,"formats/background":f.BackgroundStyle,"formats/color":d.ColorStyle,"formats/font":h.FontClass,"formats/size":p.SizeClass,"formats/blockquote":s.default,"formats/code-block":O.default,"formats/header":l.default,"formats/list":c.default,"formats/bold":y.default,"formats/code":k.Code,"formats/italic":g.default,"formats/link":v.default,"formats/script":m.default,"formats/strike":b.default,"formats/underline":x.default,"formats/image":_.default,"formats/video":w.default,"formats/list/item":u.ListItem,"modules/formula":S.default,"modules/syntax":M.default,"modules/toolbar":A.default,"themes/bubble":D.default,"themes/snow":L.default,"ui/icons":T.default,"ui/picker":C.default,"ui/icon-picker":E.default,"ui/color-picker":P.default,"ui/tooltip":N.default},!0),t.exports=i.default},function(t,e,n){"use strict";var i=v(n(3)),r=v(n(19)),o=n(33),a=v(o),s=v(n(34)),l=v(n(43)),u=v(n(38)),c=v(n(35)),f=v(n(36)),d=v(n(44)),h=v(n(37)),p=v(n(45)),y=v(n(52)),g=v(n(53));function v(t){return t&&t.__esModule?t:{default:t}}r.default.register({"blots/block":a.default,"blots/block/embed":o.BlockEmbed,"blots/break":s.default,"blots/container":l.default,"blots/cursor":u.default,"blots/embed":c.default,"blots/inline":f.default,"blots/scroll":d.default,"blots/text":h.default,"modules/clipboard":p.default,"modules/history":y.default,"modules/keyboard":g.default}),i.default.register(a.default,s.default,u.default,f.default,d.default,h.default),t.exports=r.default},function(t,e,n){"use strict";var i=n(4),r=n(8),o=n(13),a=n(14),s=n(15),l=n(16),u=n(17),c=n(18),f=n(9),d=n(11),h=n(12),p=n(10),y=n(7),g={Scope:y.Scope,create:y.create,find:y.find,query:y.query,register:y.register,Container:i.default,Format:r.default,Leaf:o.default,Embed:u.default,Scroll:a.default,Block:l.default,Inline:s.default,Text:c.default,Attributor:{Attribute:f.default,Class:d.default,Style:h.default,Store:p.default}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=g},function(t,e,n){"use strict";var i=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function i(){this.constructor=t}t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)},r=n(5),o=n(6),a=n(7),s=function(t){function e(){t.apply(this,arguments)}return i(e,t),e.prototype.appendChild=function(t){this.insertBefore(t)},e.prototype.attach=function(){var e=this;t.prototype.attach.call(this),this.children=new r.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(t){try{var n=l(t);e.insertBefore(n,e.children.head)}catch(t){if(t instanceof a.ParchmentError)return;throw t}})},e.prototype.deleteAt=function(t,e){if(0===t&&e===this.length())return this.remove();this.children.forEachAt(t,e,function(t,e,n){t.deleteAt(e,n)})},e.prototype.descendant=function(t,n){var i=this.children.find(n),r=i[0],o=i[1];return null==t.blotName&&t(r)||null!=t.blotName&&r instanceof t?[r,o]:r instanceof e?r.descendant(t,o):[null,-1]},e.prototype.descendants=function(t,n,i){void 0===n&&(n=0),void 0===i&&(i=Number.MAX_VALUE);var r=[],o=i;return this.children.forEachAt(n,i,function(n,i,a){(null==t.blotName&&t(n)||null!=t.blotName&&n instanceof t)&&r.push(n),n instanceof e&&(r=r.concat(n.descendants(t,i,o))),o-=a}),r},e.prototype.detach=function(){this.children.forEach(function(t){t.detach()}),t.prototype.detach.call(this)},e.prototype.formatAt=function(t,e,n,i){this.children.forEachAt(t,e,function(t,e,r){t.formatAt(e,r,n,i)})},e.prototype.insertAt=function(t,e,n){var i=this.children.find(t),r=i[0],o=i[1];if(r)r.insertAt(o,e,n);else{var s=null==n?a.create("text",e):a.create(e,n);this.appendChild(s)}},e.prototype.insertBefore=function(t,e){if(null!=this.statics.allowedChildren&&!this.statics.allowedChildren.some(function(e){return t instanceof e}))throw new a.ParchmentError("Cannot insert "+t.statics.blotName+" into "+this.statics.blotName);t.insertInto(this,e)},e.prototype.length=function(){return this.children.reduce(function(t,e){return t+e.length()},0)},e.prototype.moveChildren=function(t,e){this.children.forEach(function(n){t.insertBefore(n,e)})},e.prototype.optimize=function(){if(t.prototype.optimize.call(this),0===this.children.length)if(null!=this.statics.defaultChild){var e=a.create(this.statics.defaultChild);this.appendChild(e),e.optimize()}else this.remove()},e.prototype.path=function(t,n){void 0===n&&(n=!1);var i=this.children.find(t,n),r=i[0],o=i[1],a=[[this,t]];return r instanceof e?a.concat(r.path(o,n)):(null!=r&&a.push([r,o]),a)},e.prototype.removeChild=function(t){this.children.remove(t)},e.prototype.replace=function(n){n instanceof e&&n.moveChildren(this),t.prototype.replace.call(this,n)},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=this.clone();return this.parent.insertBefore(n,this.next),this.children.forEachAt(t,this.length(),function(t,i,r){t=t.split(i,e),n.appendChild(t)}),n},e.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},e.prototype.update=function(t){var e=this,n=[],i=[];t.forEach(function(t){t.target===e.domNode&&"childList"===t.type&&(n.push.apply(n,t.addedNodes),i.push.apply(i,t.removedNodes))}),i.forEach(function(t){var n=a.find(t);null!=n&&(null!=n.domNode.parentNode&&n.domNode.parentNode!==e.domNode||n.detach())}),n.filter(function(t){return t.parentNode==e.domNode}).sort(function(t,e){return t===e?0:t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(t){var n=null;null!=t.nextSibling&&(n=a.find(t.nextSibling));var i=l(t);i.next==n&&null!=i.next||(null!=i.parent&&i.parent.removeChild(e),e.insertBefore(i,n))})},e}(o.default);function l(t){var e=a.find(t);if(null==e)try{e=a.create(t)}catch(n){e=a.create(a.Scope.INLINE),[].slice.call(t.childNodes).forEach(function(t){e.domNode.appendChild(t)}),t.parentNode.replaceChild(e.domNode,t),e.attach()}return e}Object.defineProperty(e,"__esModule",{value:!0}),e.default=s},function(t,e){"use strict";var n=function(){function t(){this.head=this.tail=void 0,this.length=0}return t.prototype.append=function(){for(var t=[],e=0;e1&&this.append.apply(this,t.slice(1))},t.prototype.contains=function(t){for(var e,n=this.iterator();e=n();)if(e===t)return!0;return!1},t.prototype.insertBefore=function(t,e){t.next=e,null!=e?(t.prev=e.prev,null!=e.prev&&(e.prev.next=t),e.prev=t,e===this.head&&(this.head=t)):null!=this.tail?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=void 0,this.head=this.tail=t),this.length+=1},t.prototype.offset=function(t){for(var e=0,n=this.head;null!=n;){if(n===t)return e;e+=n.length(),n=n.next}return-1},t.prototype.remove=function(t){this.contains(t)&&(null!=t.prev&&(t.prev.next=t.next),null!=t.next&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)},t.prototype.iterator=function(t){return void 0===t&&(t=this.head),function(){var e=t;return null!=t&&(t=t.next),e}},t.prototype.find=function(t,e){void 0===e&&(e=!1);for(var n,i=this.iterator();n=i();){var r=n.length();if(ta?n(i,t-a,Math.min(e,a+l-t)):n(i,0,Math.min(l,t+e-a)),a+=l}},t.prototype.map=function(t){return this.reduce(function(e,n){return e.push(t(n)),e},[])},t.prototype.reduce=function(t,e){for(var n,i=this.iterator();n=i();)e=t(e,n);return e},t}();Object.defineProperty(e,"__esModule",{value:!0}),e.default=n},function(t,e,n){"use strict";var i=n(7),r=function(){function t(t){this.domNode=t,this.attach()}return Object.defineProperty(t.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),t.create=function(t){if(null==this.tagName)throw new i.ParchmentError("Blot definition missing tagName");var e;return Array.isArray(this.tagName)?("string"==typeof t&&(t=t.toUpperCase(),parseInt(t).toString()===t&&(t=parseInt(t))),e="number"==typeof t?document.createElement(this.tagName[t-1]):this.tagName.indexOf(t)>-1?document.createElement(t):document.createElement(this.tagName[0])):e=document.createElement(this.tagName),this.className&&e.classList.add(this.className),e},t.prototype.attach=function(){this.domNode[i.DATA_KEY]={blot:this}},t.prototype.clone=function(){var t=this.domNode.cloneNode();return i.create(t)},t.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[i.DATA_KEY]},t.prototype.deleteAt=function(t,e){this.isolate(t,e).remove()},t.prototype.formatAt=function(t,e,n,r){var o=this.isolate(t,e);if(null!=i.query(n,i.Scope.BLOT)&&r)o.wrap(n,r);else if(null!=i.query(n,i.Scope.ATTRIBUTE)){var a=i.create(this.statics.scope);o.wrap(a),a.format(n,r)}},t.prototype.insertAt=function(t,e,n){var r=null==n?i.create("text",e):i.create(e,n),o=this.split(t);this.parent.insertBefore(r,o)},t.prototype.insertInto=function(t,e){if(null!=this.parent&&this.parent.children.remove(this),t.children.insertBefore(this,e),null!=e)var n=e.domNode;null!=this.next&&this.domNode.nextSibling==n||t.domNode.insertBefore(this.domNode,n),this.parent=t},t.prototype.isolate=function(t,e){var n=this.split(t);return n.split(e),n},t.prototype.length=function(){return 1},t.prototype.offset=function(t){return void 0===t&&(t=this.parent),null==this.parent||this==t?0:this.parent.children.offset(this)+this.parent.offset(t)},t.prototype.optimize=function(){null!=this.domNode[i.DATA_KEY]&&delete this.domNode[i.DATA_KEY].mutations},t.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},t.prototype.replace=function(t){null!=t.parent&&(t.parent.insertBefore(this,t.next),t.remove())},t.prototype.replaceWith=function(t,e){var n="string"==typeof t?i.create(t,e):t;return n.replace(this),n},t.prototype.split=function(t,e){return 0===t?this:this.next},t.prototype.update=function(t){void 0===t&&(t=[])},t.prototype.wrap=function(t,e){var n="string"==typeof t?i.create(t,e):t;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},t.blotName="abstract",t}();Object.defineProperty(e,"__esModule",{value:!0}),e.default=r},function(t,e){"use strict";var n=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function i(){this.constructor=t}t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)},i=function(t){function e(e){e="[Parchment] "+e,t.call(this,e),this.message=e,this.name=this.constructor.name}return n(e,t),e}(Error);e.ParchmentError=i;var r,o={},a={},s={},l={};e.DATA_KEY="__blot",(r=e.Scope||(e.Scope={}))[r.TYPE=3]="TYPE",r[r.LEVEL=12]="LEVEL",r[r.ATTRIBUTE=13]="ATTRIBUTE",r[r.BLOT=14]="BLOT",r[r.INLINE=7]="INLINE",r[r.BLOCK=11]="BLOCK",r[r.BLOCK_BLOT=10]="BLOCK_BLOT",r[r.INLINE_BLOT=6]="INLINE_BLOT",r[r.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",r[r.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",r[r.ANY=15]="ANY";var u=e.Scope;function c(t,e){var n;if(void 0===e&&(e=u.ANY),"string"==typeof t)n=l[t]||o[t];else if(t instanceof Text)n=l.text;else if("number"==typeof t)t&u.LEVEL&u.BLOCK?n=l.block:t&u.LEVEL&u.INLINE&&(n=l.inline);else if(t instanceof HTMLElement){var i=(t.getAttribute("class")||"").split(/\s+/);for(var r in i)if(n=a[i[r]])break;n=n||s[t.tagName]}return null==n?null:e&u.LEVEL&n.scope&&e&u.TYPE&n.scope?n:null}e.create=function(t,e){var n=c(t);if(null==n)throw new i("Unable to create "+t+" blot");return new n(t instanceof Node?t:n.create(e),e)},e.find=function t(n,i){return void 0===i&&(i=!1),null==n?null:null!=n[e.DATA_KEY]?n[e.DATA_KEY].blot:i?t(n.parentNode,i):null},e.query=c,e.register=function t(){for(var e=[],n=0;n1)return e.map(function(e){return t(e)});var r=e[0];if("string"!=typeof r.blotName&&"string"!=typeof r.attrName)throw new i("Invalid definition");if("abstract"===r.blotName)throw new i("Cannot register abstract class");l[r.blotName||r.attrName]=r,"string"==typeof r.keyName?o[r.keyName]=r:(null!=r.className&&(a[r.className]=r),null!=r.tagName&&(Array.isArray(r.tagName)?r.tagName=r.tagName.map(function(t){return t.toUpperCase()}):r.tagName=r.tagName.toUpperCase(),(Array.isArray(r.tagName)?r.tagName:[r.tagName]).forEach(function(t){null!=s[t]&&null!=r.className||(s[t]=r)})));return r}},function(t,e,n){"use strict";var i=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function i(){this.constructor=t}t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)},r=n(9),o=n(10),a=n(4),s=n(7),l=function(t){function e(){t.apply(this,arguments)}return i(e,t),e.formats=function(t){return"string"==typeof this.tagName||(Array.isArray(this.tagName)?t.tagName.toLowerCase():void 0)},e.prototype.attach=function(){t.prototype.attach.call(this),this.attributes=new o.default(this.domNode)},e.prototype.format=function(t,e){var n=s.query(t);n instanceof r.default?this.attributes.attribute(n,e):e&&(null==n||t===this.statics.blotName&&this.formats()[t]===e||this.replaceWith(t,e))},e.prototype.formats=function(){var t=this.attributes.values(),e=this.statics.formats(this.domNode);return null!=e&&(t[this.statics.blotName]=e),t},e.prototype.replaceWith=function(e,n){var i=t.prototype.replaceWith.call(this,e,n);return this.attributes.copy(i),i},e.prototype.update=function(e){var n=this;t.prototype.update.call(this,e),e.some(function(t){return t.target===n.domNode&&"attributes"===t.type})&&this.attributes.build()},e.prototype.wrap=function(n,i){var r=t.prototype.wrap.call(this,n,i);return r instanceof e&&r.statics.scope===this.statics.scope&&this.attributes.move(r),r},e}(a.default);Object.defineProperty(e,"__esModule",{value:!0}),e.default=l},function(t,e,n){"use strict";var i=n(7),r=function(){function t(t,e,n){void 0===n&&(n={}),this.attrName=t,this.keyName=e;var r=i.Scope.TYPE&i.Scope.ATTRIBUTE;null!=n.scope?this.scope=n.scope&i.Scope.LEVEL|r:this.scope=i.Scope.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}return t.keys=function(t){return[].map.call(t.attributes,function(t){return t.name})},t.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.setAttribute(this.keyName,e),!0)},t.prototype.canAdd=function(t,e){return null!=i.query(t,i.Scope.BLOT&(this.scope|i.Scope.TYPE))&&(null==this.whitelist||this.whitelist.indexOf(e)>-1)},t.prototype.remove=function(t){t.removeAttribute(this.keyName)},t.prototype.value=function(t){return t.getAttribute(this.keyName)},t}();Object.defineProperty(e,"__esModule",{value:!0}),e.default=r},function(t,e,n){"use strict";var i=n(9),r=n(11),o=n(12),a=n(7),s=function(){function t(t){this.attributes={},this.domNode=t,this.build()}return t.prototype.attribute=function(t,e){e?t.add(this.domNode,e)&&(null!=t.value(this.domNode)?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])},t.prototype.build=function(){var t=this;this.attributes={};var e=i.default.keys(this.domNode),n=r.default.keys(this.domNode),s=o.default.keys(this.domNode);e.concat(n).concat(s).forEach(function(e){var n=a.query(e,a.Scope.ATTRIBUTE);n instanceof i.default&&(t.attributes[n.attrName]=n)})},t.prototype.copy=function(t){var e=this;Object.keys(this.attributes).forEach(function(n){var i=e.attributes[n].value(e.domNode);t.format(n,i)})},t.prototype.move=function(t){var e=this;this.copy(t),Object.keys(this.attributes).forEach(function(t){e.attributes[t].remove(e.domNode)}),this.attributes={}},t.prototype.values=function(){var t=this;return Object.keys(this.attributes).reduce(function(e,n){return e[n]=t.attributes[n].value(t.domNode),e},{})},t}();Object.defineProperty(e,"__esModule",{value:!0}),e.default=s},function(t,e,n){"use strict";var i=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function i(){this.constructor=t}t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)};function r(t,e){return(t.getAttribute("class")||"").split(/\s+/).filter(function(t){return 0===t.indexOf(e+"-")})}var o=function(t){function e(){t.apply(this,arguments)}return i(e,t),e.keys=function(t){return(t.getAttribute("class")||"").split(/\s+/).map(function(t){return t.split("-").slice(0,-1).join("-")})},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(this.remove(t),t.classList.add(this.keyName+"-"+e),!0)},e.prototype.remove=function(t){r(t,this.keyName).forEach(function(e){t.classList.remove(e)}),0===t.classList.length&&t.removeAttribute("class")},e.prototype.value=function(t){return(r(t,this.keyName)[0]||"").slice(this.keyName.length+1)},e}(n(9).default);Object.defineProperty(e,"__esModule",{value:!0}),e.default=o},function(t,e,n){"use strict";var i=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function i(){this.constructor=t}t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)};function r(t){var e=t.split("-"),n=e.slice(1).map(function(t){return t[0].toUpperCase()+t.slice(1)}).join("");return e[0]+n}var o=function(t){function e(){t.apply(this,arguments)}return i(e,t),e.keys=function(t){return(t.getAttribute("style")||"").split(";").map(function(t){return t.split(":")[0].trim()})},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.style[r(this.keyName)]=e,!0)},e.prototype.remove=function(t){t.style[r(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")},e.prototype.value=function(t){return t.style[r(this.keyName)]},e}(n(9).default);Object.defineProperty(e,"__esModule",{value:!0}),e.default=o},function(t,e,n){"use strict";var i=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function i(){this.constructor=t}t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)},r=n(6),o=n(7),a=function(t){function e(){t.apply(this,arguments)}return i(e,t),e.value=function(t){return!0},e.prototype.index=function(t,e){return t!==this.domNode?-1:Math.min(e,1)},e.prototype.position=function(t,e){var n=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return t>0&&(n+=1),[this.parent.domNode,n]},e.prototype.value=function(){return(t={})[this.statics.blotName]=this.statics.value(this.domNode)||!0,t;var t},e.scope=o.Scope.INLINE_BLOT,e}(r.default);Object.defineProperty(e,"__esModule",{value:!0}),e.default=a},function(t,e,n){"use strict";var i=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function i(){this.constructor=t}t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)},r=n(4),o=n(7),a={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},s=function(t){function e(e){var n=this;t.call(this,e),this.parent=null,this.observer=new MutationObserver(function(t){n.update(t)}),this.observer.observe(this.domNode,a)}return i(e,t),e.prototype.detach=function(){t.prototype.detach.call(this),this.observer.disconnect()},e.prototype.deleteAt=function(e,n){this.update(),0===e&&n===this.length()?this.children.forEach(function(t){t.remove()}):t.prototype.deleteAt.call(this,e,n)},e.prototype.formatAt=function(e,n,i,r){this.update(),t.prototype.formatAt.call(this,e,n,i,r)},e.prototype.insertAt=function(e,n,i){this.update(),t.prototype.insertAt.call(this,e,n,i)},e.prototype.optimize=function(e){var n=this;void 0===e&&(e=[]),t.prototype.optimize.call(this),e.push.apply(e,this.observer.takeRecords());for(var i=function(t,e){void 0===e&&(e=!0),null!=t&&t!==n&&null!=t.domNode.parentNode&&(null==t.domNode[o.DATA_KEY].mutations&&(t.domNode[o.DATA_KEY].mutations=[]),e&&i(t.parent))},a=function(t){null!=t.domNode[o.DATA_KEY]&&null!=t.domNode[o.DATA_KEY].mutations&&(t instanceof r.default&&t.children.forEach(a),t.optimize())},s=e,l=0;s.length>0;l+=1){if(l>=100)throw new Error("[Parchment] Maximum optimize iterations reached");s.forEach(function(t){var e=o.find(t.target,!0);null!=e&&(e.domNode===t.target&&("childList"===t.type?(i(o.find(t.previousSibling,!1)),[].forEach.call(t.addedNodes,function(t){var e=o.find(t,!1);i(e,!1),e instanceof r.default&&e.children.forEach(function(t){i(t,!1)})})):"attributes"===t.type&&i(e.prev)),i(e))}),this.children.forEach(a),s=this.observer.takeRecords(),e.push.apply(e,s)}},e.prototype.update=function(e){var n=this;(e=e||this.observer.takeRecords()).map(function(t){var e=o.find(t.target,!0);if(null!=e)return null==e.domNode[o.DATA_KEY].mutations?(e.domNode[o.DATA_KEY].mutations=[t],e):(e.domNode[o.DATA_KEY].mutations.push(t),null)}).forEach(function(t){null!=t&&t!==n&&t.update(t.domNode[o.DATA_KEY].mutations||[])}),null!=this.domNode[o.DATA_KEY].mutations&&t.prototype.update.call(this,this.domNode[o.DATA_KEY].mutations),this.optimize(e)},e.blotName="scroll",e.defaultChild="block",e.scope=o.Scope.BLOCK_BLOT,e.tagName="DIV",e}(r.default);Object.defineProperty(e,"__esModule",{value:!0}),e.default=s},function(t,e,n){"use strict";var i=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function i(){this.constructor=t}t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)},r=n(8),o=n(7);var a=function(t){function e(){t.apply(this,arguments)}return i(e,t),e.formats=function(n){if(n.tagName!==e.tagName)return t.formats.call(this,n)},e.prototype.format=function(n,i){var o=this;n!==this.statics.blotName||i?t.prototype.format.call(this,n,i):(this.children.forEach(function(t){t instanceof r.default||(t=t.wrap(e.blotName,!0)),o.attributes.copy(t)}),this.unwrap())},e.prototype.formatAt=function(e,n,i,r){null!=this.formats()[i]||o.query(i,o.Scope.ATTRIBUTE)?this.isolate(e,n).format(i,r):t.prototype.formatAt.call(this,e,n,i,r)},e.prototype.optimize=function(){t.prototype.optimize.call(this);var n=this.formats();if(0===Object.keys(n).length)return this.unwrap();var i=this.next;i instanceof e&&i.prev===this&&function(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n in t)if(t[n]!==e[n])return!1;return!0}(n,i.formats())&&(i.moveChildren(this),i.remove())},e.blotName="inline",e.scope=o.Scope.INLINE_BLOT,e.tagName="SPAN",e}(r.default);Object.defineProperty(e,"__esModule",{value:!0}),e.default=a},function(t,e,n){"use strict";var i=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function i(){this.constructor=t}t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)},r=n(8),o=n(7),a=function(t){function e(){t.apply(this,arguments)}return i(e,t),e.formats=function(n){var i=o.query(e.blotName).tagName;if(n.tagName!==i)return t.formats.call(this,n)},e.prototype.format=function(n,i){n!==this.statics.blotName||i?t.prototype.format.call(this,n,i):this.replaceWith(e.blotName)},e.prototype.formatAt=function(e,n,i,r){null!=o.query(i,o.Scope.BLOCK)?this.format(i,r):t.prototype.formatAt.call(this,e,n,i,r)},e.prototype.insertAt=function(e,n,i){if(null==i||null!=o.query(n,o.Scope.INLINE))t.prototype.insertAt.call(this,e,n,i);else{var r=this.split(e),a=o.create(n,i);r.parent.insertBefore(a,r)}},e.blotName="block",e.scope=o.Scope.BLOCK_BLOT,e.tagName="P",e}(r.default);Object.defineProperty(e,"__esModule",{value:!0}),e.default=a},function(t,e,n){"use strict";var i=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function i(){this.constructor=t}t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)},r=function(t){function e(){t.apply(this,arguments)}return i(e,t),e.formats=function(t){},e.prototype.format=function(e,n){t.prototype.formatAt.call(this,0,this.length(),e,n)},e.prototype.formatAt=function(e,n,i,r){0===e&&n===this.length()?this.format(i,r):t.prototype.formatAt.call(this,e,n,i,r)},e.prototype.formats=function(){return this.statics.formats(this.domNode)},e}(n(13).default);Object.defineProperty(e,"__esModule",{value:!0}),e.default=r},function(t,e,n){"use strict";var i=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function i(){this.constructor=t}t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)},r=n(13),o=n(7),a=function(t){function e(e){t.call(this,e),this.text=this.statics.value(this.domNode)}return i(e,t),e.create=function(t){return document.createTextNode(t)},e.value=function(t){return t.data},e.prototype.deleteAt=function(t,e){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+e)},e.prototype.index=function(t,e){return this.domNode===t?e:-1},e.prototype.insertAt=function(e,n,i){null==i?(this.text=this.text.slice(0,e)+n+this.text.slice(e),this.domNode.data=this.text):t.prototype.insertAt.call(this,e,n,i)},e.prototype.length=function(){return this.text.length},e.prototype.optimize=function(){t.prototype.optimize.call(this),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof e&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},e.prototype.position=function(t,e){return void 0===e&&(e=!1),[this.domNode,t]},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=o.create(this.domNode.splitText(t));return this.parent.insertBefore(n,this.next),this.text=this.statics.value(this.domNode),n},e.prototype.update=function(t){var e=this;t.some(function(t){return"characterData"===t.type&&t.target===e.domNode})&&(this.text=this.statics.value(this.domNode))},e.prototype.value=function(){return this.text},e.blotName="text",e.scope=o.Scope.INLINE_BLOT,e}(r.default);Object.defineProperty(e,"__esModule",{value:!0}),e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.overload=e.expandConfig=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},r=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function t(t,e){for(var n=0;n"+r+"


"),this.history.clear(),i.readOnly&&this.disable(),i.placeholder&&this.root.setAttribute("data-placeholder",i.placeholder),this.root.classList.toggle("ql-blank",this.editor.isBlank()),this.emitter.on(l.default.events.TEXT_CHANGE,function(t){n.root.classList.toggle("ql-blank",n.editor.isBlank())})}return o(t,null,[{key:"debug",value:function(t){p.default.level(t)}},{key:"import",value:function(t){return null==this.imports[t]&&v.error("Cannot import "+t+". Are you sure it was registered?"),this.imports[t]}},{key:"register",value:function(t,e){var n=this,i=!(arguments.length<=2||void 0===arguments[2])&&arguments[2];if("string"!=typeof t){var r=t.attrName||t.blotName;"string"==typeof r?this.register("formats/"+r,t,e):Object.keys(t).forEach(function(i){n.register(i,t[i],e)})}else null==this.imports[t]||i||v.warn("Overwriting "+t+" with",e),this.imports[t]=e,(t.startsWith("blots/")||t.startsWith("formats/"))&&"abstract"!==e.blotName&&c.default.register(e)}}]),o(t,[{key:"addContainer",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if("string"==typeof t){var n=t;(t=document.createElement("div")).classList.add(n)}return this.container.insertBefore(t,e),t}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(t,e,n){var i=x(t,e,n),o=r(i,4);t=o[0],e=o[1],n=o[3];var a=this.getSelection(),s=this.editor.deleteText(t,e,n);return a=_(a,t,-1*e,n),this.setSelection(a,l.default.sources.SILENT),s}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var t=arguments.length<=0||void 0===arguments[0]||arguments[0];this.editor.enable(t),t||this.blur()}},{key:"focus",value:function(){this.selection.focus(),this.selection.scrollIntoView()}},{key:"format",value:function(t,e){var n=arguments.length<=2||void 0===arguments[2]?l.default.sources.API:arguments[2],i=this.getSelection(!0),r=new a.default;if(null==i)return r;if(c.default.query(t,c.default.Scope.BLOCK))r=this.formatLine(i,t,e,n);else{if(0===i.length)return this.selection.format(t,e),r;r=this.formatText(i,t,e,n)}return this.setSelection(i,l.default.sources.SILENT),r}},{key:"formatLine",value:function(t,e,n,i,o){var a,s=x(t,e,n,i,o),u=r(s,4);t=u[0],e=u[1],a=u[2],o=u[3];var c=this.getSelection(),f=this.editor.formatLine(t,e,a,o);return this.selection.setRange(c,!0,l.default.sources.SILENT),this.selection.scrollIntoView(),f}},{key:"formatText",value:function(t,e,n,i,o){var a,s=x(t,e,n,i,o),u=r(s,4);t=u[0],e=u[1],a=u[2],o=u[3];var c=this.getSelection(),f=this.editor.formatText(t,e,a,o);return this.selection.setRange(c,!0,l.default.sources.SILENT),this.selection.scrollIntoView(),f}},{key:"getBounds",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?0:arguments[1];return"number"==typeof t?this.selection.getBounds(t,e):this.selection.getBounds(t.index,t.length)}},{key:"getContents",value:function(){var t=arguments.length<=0||void 0===arguments[0]?0:arguments[0],e=arguments.length<=1||void 0===arguments[1]?this.getLength()-t:arguments[1],n=x(t,e),i=r(n,2);return t=i[0],e=i[1],this.editor.getContents(t,e)}},{key:"getFormat",value:function(){var t=arguments.length<=0||void 0===arguments[0]?this.getSelection():arguments[0],e=arguments.length<=1||void 0===arguments[1]?0:arguments[1];return"number"==typeof t?this.editor.getFormat(t,e):this.editor.getFormat(t.index,t.length)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getModule",value:function(t){return this.theme.modules[t]}},{key:"getSelection",value:function(){return!(arguments.length<=0||void 0===arguments[0])&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var t=arguments.length<=0||void 0===arguments[0]?0:arguments[0],e=arguments.length<=1||void 0===arguments[1]?this.getLength()-t:arguments[1],n=x(t,e),i=r(n,2);return t=i[0],e=i[1],this.editor.getText(t,e)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(e,n,i){var r=arguments.length<=3||void 0===arguments[3]?t.sources.API:arguments[3],o=this.getSelection(),a=this.editor.insertEmbed(e,n,i,r);return o=_(o,a,r),this.setSelection(o,l.default.sources.SILENT),a}},{key:"insertText",value:function(t,e,n,i,o){var a,s=this.getSelection(),u=x(t,0,n,i,o),c=r(u,4);t=c[0],a=c[2],o=c[3];var f=this.editor.insertText(t,e,a,o);return s=_(s,t,e.length,o),this.setSelection(s,l.default.sources.SILENT),f}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(t,e){var n=arguments.length<=2||void 0===arguments[2]?l.default.sources.API:arguments[2];if("string"==typeof t)return this.setContents(this.clipboard.convert(t),e);var i=this.clipboard.convert(e);return this.updateContents((new a.default).retain(t).concat(i),n)}},{key:"removeFormat",value:function(t,e,n){var i=this.getSelection(),o=x(t,e,n),a=r(o,4);t=a[0],e=a[1],n=a[3];var s=this.editor.removeFormat(t,e,n);return i=_(i,s,n),this.setSelection(i,l.default.sources.SILENT),s}},{key:"setContents",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?l.default.sources.API:arguments[1],n=(t=new a.default(t).slice()).ops[t.ops.length-1];return null!=n&&"\n"===n.insert[n.insert.length-1]||t.insert("\n"),t.delete(this.getLength()),this.editor.applyDelta(t,e)}},{key:"setSelection",value:function(e,n,i){if(null==e)this.selection.setRange(null,n||t.sources.API);else{var o=x(e,n,i),a=r(o,4);e=a[0],n=a[1],i=a[3],this.selection.setRange(new f.Range(e,n),i)}this.selection.scrollIntoView()}},{key:"setText",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?l.default.sources.API:arguments[1],n=(new a.default).insert(t);return this.setContents(n,e)}},{key:"update",value:function(){var t=arguments.length<=0||void 0===arguments[0]?l.default.sources.USER:arguments[0],e=this.scroll.update(t);return this.selection.update(t),e}},{key:"updateContents",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?l.default.sources.API:arguments[1],n=this.getSelection();Array.isArray(t)&&(t=new a.default(t.slice()));var i=this.editor.applyDelta(t,e);return null!=n&&(n=_(n,i,e),this.setSelection(n,l.default.sources.SILENT)),i}}]),t}();function b(t,e){if(null==(e=(0,h.default)(!0,{container:t,modules:{clipboard:!0,keyboard:!0,history:!0}},e)).theme||e.theme===m.DEFAULTS.theme)e.theme=y.default;else if(e.theme=m.import("themes/"+e.theme),null==e.theme)throw new Error("Invalid theme "+e.theme+". Did you register it?");var n=(0,h.default)(!0,{},e.theme.DEFAULTS);[n,e].forEach(function(t){t.modules=t.modules||{},Object.keys(t.modules).forEach(function(e){!0===t.modules[e]&&(t.modules[e]={})})});var i=Object.keys(n.modules).concat(Object.keys(e.modules)).reduce(function(t,e){var n=m.import("modules/"+e);return null==n?v.error("Cannot load "+e+" module. Are you sure you registered it?"):t[e]=n.DEFAULTS||{},t},{});return null!=e.modules&&null!=e.modules.toolbar&&e.modules.toolbar.constructor!==Object&&(e.modules.toolbar={container:e.modules.toolbar}),e=(0,h.default)(!0,{},m.DEFAULTS,{modules:i},n,e),["bounds","container"].forEach(function(t){"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))}),e}function x(t,e,n,r,o){var a={};return"number"==typeof t.index&&"number"==typeof t.length?"number"!=typeof e?(o=r,r=n,n=e,e=t.length,t=t.index):(e=t.length,t=t.index):"number"!=typeof e&&(o=r,r=n,n=e,e=0),"object"===("undefined"==typeof n?"undefined":i(n))?(a=n,o=r):"string"==typeof n&&(null!=r?a[n]=r:o=n),[t,e,a,o=o||l.default.sources.API]}function _(t,e,n,i){if(null==t)return null;var o=void 0,s=void 0;if(e instanceof a.default){var u=[t.index,t.index+t.length].map(function(t){return e.transformPosition(t,i===l.default.sources.USER)}),c=r(u,2);o=c[0],s=c[1]}else{var d=[t.index,t.index+t.length].map(function(t){return t=0?t+n:Math.max(e,t+n)}),h=r(d,2);o=h[0],s=h[1]}return new f.Range(o,s-o)}m.DEFAULTS={bounds:document.body,formats:null,modules:{},placeholder:"",readOnly:!1,theme:"default"},m.events=l.default.events,m.sources=l.default.sources,m.version="1.0.0",m.imports={delta:a.default,parchment:c.default,"core/module":u.default,"core/theme":y.default},e.expandConfig=b,e.overload=x,e.default=m},function(t,e){"use strict";var n,i=document.createElement("div");i.classList.toggle("test-class",!1),i.classList.contains("test-class")&&(n=DOMTokenList.prototype.toggle,DOMTokenList.prototype.toggle=function(t,e){return arguments.length>1&&!this.contains(t)==!e?e:n.call(this,t)}),String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return e=e||0,this.substr(e,t.length)===t}),String.prototype.endsWith||(String.prototype.endsWith=function(t,e){var n=this.toString();("number"!=typeof e||!isFinite(e)||Math.floor(e)!==e||e>n.length)&&(e=n.length),e-=t.length;var i=n.indexOf(t,e);return-1!==i&&i===e}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var e,n=Object(this),i=n.length>>>0,r=arguments[1],o=0;o0&&(n.attributes=e),this.push(n))},l.prototype.delete=function(t){return t<=0?this:this.push({delete:t})},l.prototype.retain=function(t,e){if(t<=0)return this;var n={retain:t};return"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n)},l.prototype.push=function(t){var e=this.ops.length,n=this.ops[e-1];if(t=o(!0,{},t),"object"==typeof n){if("number"==typeof t.delete&&"number"==typeof n.delete)return this.ops[e-1]={delete:n.delete+t.delete},this;if("number"==typeof n.delete&&null!=t.insert&&(e-=1,"object"!=typeof(n=this.ops[e-1])))return this.ops.unshift(t),this;if(r(t.attributes,n.attributes)){if("string"==typeof t.insert&&"string"==typeof n.insert)return this.ops[e-1]={insert:n.insert+t.insert},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this;if("number"==typeof t.retain&&"number"==typeof n.retain)return this.ops[e-1]={retain:n.retain+t.retain},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this}}return e===this.ops.length?this.ops.push(t):this.ops.splice(e,0,t),this},l.prototype.chop=function(){var t=this.ops[this.ops.length-1];return t&&t.retain&&!t.attributes&&this.ops.pop(),this},l.prototype.length=function(){return this.ops.reduce(function(t,e){return t+a.length(e)},0)},l.prototype.slice=function(t,e){t=t||0,"number"!=typeof e&&(e=1/0);for(var n=[],i=a.iterator(this.ops),r=0;r0&&(e.push(t.ops[0]),e.ops=e.ops.concat(t.ops.slice(1))),e},l.prototype.diff=function(t){var e=new l;if(this.ops===t.ops)return e;var n=[this.ops,t.ops].map(function(e){return e.map(function(n){if(null!=n.insert)return"string"==typeof n.insert?n.insert:s;var i=e===t.ops?"on":"with";throw new Error("diff() called "+i+" non-document")}).join("")}),o=i(n[0],n[1]),u=a.iterator(this.ops),c=a.iterator(t.ops);return o.forEach(function(t){for(var n=t[1].length;n>0;){var o=0;switch(t[0]){case i.INSERT:o=Math.min(c.peekLength(),n),e.push(c.next(o));break;case i.DELETE:o=Math.min(n,u.peekLength()),u.next(o),e.delete(o);break;case i.EQUAL:o=Math.min(u.peekLength(),c.peekLength(),n);var s=u.next(o),l=c.next(o);r(s.insert,l.insert)?e.retain(o,a.attributes.diff(s.attributes,l.attributes)):e.push(l).delete(o)}n-=o}}),e.chop()},l.prototype.transform=function(t,e){if(e=!!e,"number"==typeof t)return this.transformPosition(t,e);for(var n=a.iterator(this.ops),i=a.iterator(t.ops),r=new l;n.hasNext()||i.hasNext();)if("insert"!==n.peekType()||!e&&"insert"===i.peekType())if("insert"===i.peekType())r.push(i.next());else{var o=Math.min(n.peekLength(),i.peekLength()),s=n.next(o),u=i.next(o);if(s.delete)continue;u.delete?r.push(u):r.retain(o,a.attributes.transform(s.attributes,u.attributes,e))}else r.retain(a.length(n.next()));return r.chop()},l.prototype.transformPosition=function(t,e){e=!!e;for(var n=a.iterator(this.ops),i=0;n.hasNext()&&i<=t;){var r=n.peekLength(),o=n.peekType();n.next(),"delete"!==o?("insert"===o&&(ie.length?t:e,f=t.length>e.length?e:t,d=c.indexOf(f);if(-1!=d)return u=[[i,c.substring(0,d)],[r,f],[i,c.substring(d+f.length)]],t.length>e.length&&(u[0][0]=u[2][0]=n),u;if(1==f.length)return[[n,t],[i,e]];var h=function(t,e){var n=t.length>e.length?t:e,i=t.length>e.length?e:t;if(n.length<4||2*i.length=t.length?[i,r,o,a,f]:null}var o,a,u,c,f,d=r(n,i,Math.ceil(n.length/4)),h=r(n,i,Math.ceil(n.length/2));if(!d&&!h)return null;o=h?d&&d[4].length>h[4].length?d:h:d;t.length>e.length?(a=o[0],u=o[1],c=o[2],f=o[3]):(c=o[0],f=o[1],a=o[2],u=o[3]);var p=o[4];return[a,u,c,f,p]}(t,e);if(h){var p=h[0],y=h[1],g=h[2],v=h[3],m=h[4],b=o(p,g),x=o(y,v);return b.concat([[r,m]],x)}return function(t,e){for(var r=t.length,o=e.length,s=Math.ceil((r+o)/2),l=s,u=2*s,c=new Array(u),f=new Array(u),d=0;dr)g+=2;else if(w>o)y+=2;else if(p){var k=l+h-x;if(k>=0&&k=O)return a(t,e,A,w)}}}for(var S=-b+v;S<=b-m;S+=2){for(var k=l+S,M=(O=S==-b||S!=b&&f[k-1]r)m+=2;else if(M>o)v+=2;else if(!p){var _=l+h-S;if(_>=0&&_=(O=r-O))return a(t,e,A,w)}}}}return[[n,t],[i,e]]}(t,e)}(t=t.substring(0,t.length-u),e=e.substring(0,e.length-u));return c&&d.unshift([r,c]),f&&d.push([r,f]),function t(e){e.push([r,""]);var o=0;var a=0;var u=0;var c="";var f="";var d;for(;o1?(0!==a&&0!==u&&(0!==(d=s(f,c))&&(o-a-u>0&&e[o-a-u-1][0]==r?e[o-a-u-1][1]+=f.substring(0,d):(e.splice(0,0,[r,f.substring(0,d)]),o++),f=f.substring(d),c=c.substring(d)),0!==(d=l(f,c))&&(e[o][1]=f.substring(f.length-d)+e[o][1],f=f.substring(0,f.length-d),c=c.substring(0,c.length-d))),0===a?e.splice(o-u,a+u,[i,f]):0===u?e.splice(o-a,a+u,[n,c]):e.splice(o-a-u,a+u,[n,c],[i,f]),o=o-a-u+(a?1:0)+(u?1:0)+1):0!==o&&e[o-1][0]==r?(e[o-1][1]+=e[o][1],e.splice(o,1)):o++,u=0,a=0,c="",f=""}""===e[e.length-1][1]&&e.pop();var h=!1;o=1;for(;o=0;u--)if(f[u]!=d[u])return!1;for(u=f.length-1;u>=0;u--)if(c=f[u],!a(t[c],e[c],n))return!1;return typeof t==typeof e}(t,e,n))};function s(t){return null===t||void 0===t}function l(t){return!(!t||"object"!=typeof t||"number"!=typeof t.length)&&("function"==typeof t.copy&&"function"==typeof t.slice&&!(t.length>0&&"number"!=typeof t[0]))}},function(t,e){function n(t){var e=[];for(var n in t)e.push(n);return e}(t.exports="function"==typeof Object.keys?Object.keys:n).shim=n},function(t,e){var n="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();function i(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function r(t){return t&&"object"==typeof t&&"number"==typeof t.length&&Object.prototype.hasOwnProperty.call(t,"callee")&&!Object.prototype.propertyIsEnumerable.call(t,"callee")||!1}(e=t.exports=n?i:r).supported=i,e.unsupported=r},function(t,e){"use strict";var n=Object.prototype.hasOwnProperty,i=Object.prototype.toString,r=function(t){return"function"==typeof Array.isArray?Array.isArray(t):"[object Array]"===i.call(t)},o=function(t){if(!t||"[object Object]"!==i.call(t))return!1;var e,r=n.call(t,"constructor"),o=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!o)return!1;for(e in t);return"undefined"==typeof e||n.call(t,e)};t.exports=function t(){var e,n,i,a,s,l,u=arguments[0],c=1,f=arguments.length,d=!1;for("boolean"==typeof u?(d=u,u=arguments[1]||{},c=2):("object"!=typeof u&&"function"!=typeof u||null==u)&&(u={});c0?i:void 0},diff:function(t,e){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var n=Object.keys(t).concat(Object.keys(e)).reduce(function(n,r){return i(t[r],e[r])||(n[r]=void 0===e[r]?null:e[r]),n},{});return Object.keys(n).length>0?n:void 0},transform:function(t,e,n){if("object"!=typeof t)return e;if("object"==typeof e){if(!n)return e;var i=Object.keys(e).reduce(function(n,i){return void 0===t[i]&&(n[i]=e[i]),n},{});return Object.keys(i).length>0?i:void 0}}},iterator:function(t){return new a(t)},length:function(t){return"number"==typeof t.delete?t.delete:"number"==typeof t.retain?t.retain:"string"==typeof t.insert?t.insert.length:1}};function a(t){this.ops=t,this.index=0,this.offset=0}a.prototype.hasNext=function(){return this.peekLength()<1/0},a.prototype.next=function(t){t||(t=1/0);var e=this.ops[this.index];if(e){var n=this.offset,i=o.length(e);if(t>=i-n?(t=i-n,this.index+=1,this.offset=0):this.offset+=t,"number"==typeof e.delete)return{delete:t};var r={};return e.attributes&&(r.attributes=e.attributes),"number"==typeof e.retain?r.retain=t:"string"==typeof e.insert?r.insert=e.insert.substr(n,t):r.insert=e.insert,r}return{retain:1/0}},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"},t.exports=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},r=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function t(t,e){for(var n=0;n=c&&!f.endsWith("\n")&&(o=!0),e.scroll.insertAt(t,f);var p=e.scroll.line(t),y=r(p,2),v=y[0],m=y[1],b=(0,g.default)({},(0,d.bubbleFormats)(v));if(v instanceof h.default){var x=v.descendant(u.default.Leaf,m),_=r(x,1)[0];b=(0,g.default)(b,(0,d.bubbleFormats)(_))}l=s.default.attributes.diff(b,l)||{}}else if("object"===i(n.insert)){var w=Object.keys(n.insert)[0];if(null==w)return t;e.scroll.insertAt(t,w,n.insert[w])}c+=a}return Object.keys(l).forEach(function(n){e.scroll.formatAt(t,a,n,l[n])}),t+a},0),t.ops.reduce(function(t,n){return"number"==typeof n.delete?(e.scroll.deleteAt(t,n.delete),t):t+(n.retain||n.insert.length||1)},0),this.scroll.batch=!1,this.scroll.optimize(),this.update(t,n)}},{key:"deleteText",value:function(t,e){var n=arguments.length<=2||void 0===arguments[2]?l.default.sources.API:arguments[2];return this.scroll.deleteAt(t,e),this.update((new a.default).retain(t).delete(e),n)}},{key:"enable",value:function(){var t=arguments.length<=0||void 0===arguments[0]||arguments[0];this.scroll.domNode.setAttribute("contenteditable",t)}},{key:"formatLine",value:function(t,e){var n=this,i=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],r=arguments.length<=3||void 0===arguments[3]?l.default.sources.API:arguments[3];return this.scroll.update(),Object.keys(i).forEach(function(r){var o=n.scroll.lines(t,Math.max(e,1)),a=e;o.forEach(function(e,o){var s=e.length();if(e instanceof c.default){var l=t-e.offset(n.scroll),u=e.newlineIndex(l+a)-l+1;e.formatAt(l,u,r,i[r])}else e.format(r,i[r]);a-=s})}),this.scroll.optimize(),this.update((new a.default).retain(t).retain(e,(0,p.default)(i)),r)}},{key:"formatText",value:function(t,e){var n=this,i=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],r=arguments.length<=3||void 0===arguments[3]?l.default.sources.API:arguments[3];return Object.keys(i).forEach(function(r){n.scroll.formatAt(t,e,r,i[r])}),this.update((new a.default).retain(t).retain(e,(0,p.default)(i)),r)}},{key:"getContents",value:function(t,e){return this.delta.slice(t,t+e)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(t,e){return t.concat(e.delta())},new a.default)}},{key:"getFormat",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?0:arguments[1],n=[],i=[];0===e?this.scroll.path(t).forEach(function(t){var e=r(t,1)[0];e instanceof h.default?n.push(e):e instanceof u.default.Leaf&&i.push(e)}):(n=this.scroll.lines(t,e),i=this.scroll.descendants(u.default.Leaf,t,e));var o=[n,i].map(function(t){if(0===t.length)return{};for(var e=(0,d.bubbleFormats)(t.shift());Object.keys(e).length>0;){var n=t.shift();if(null==n)return e;e=b((0,d.bubbleFormats)(n),e)}return e});return g.default.apply(g.default,o)}},{key:"getText",value:function(t,e){return this.getContents(t,e).ops.map(function(t){return"string"==typeof t.insert?t.insert:""}).join("")}},{key:"insertEmbed",value:function(t,e,n){var i,r,o,s=arguments.length<=3||void 0===arguments[3]?l.default.sources.API:arguments[3];return this.scroll.insertAt(t,e,n),this.update((new a.default).retain(t).insert((o=n,(r=e)in(i={})?Object.defineProperty(i,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):i[r]=o,i)),s)}},{key:"insertText",value:function(t,e){var n=this,i=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],r=arguments.length<=3||void 0===arguments[3]?l.default.sources.API:arguments[3];return e=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(t,e),Object.keys(i).forEach(function(r){n.scroll.formatAt(t,e.length,r,i[r])}),this.update((new a.default).retain(t).insert(e,(0,p.default)(i)),r)}},{key:"isBlank",value:function(){if(0==this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;var t=this.scroll.children.head;return t.length()<=1&&0==Object.keys(t.formats()).length}},{key:"removeFormat",value:function(t,e,n){var i=this.getText(t,e),o=this.scroll.line(t+e),s=r(o,2),l=s[0],u=s[1],f=0,d=new a.default;null!=l&&(f=l instanceof c.default?l.newlineIndex(u)-u+1:l.length()-u,d=l.delta().slice(u,u+f-1).insert("\n"));var h=this.getContents(t,e+f).diff((new a.default).insert(i).concat(d)),p=(new a.default).retain(t).concat(h);return this.applyDelta(p,n)}},{key:"update",value:function(t){var e,n,i,r,o,s,c,h=this,p=arguments.length<=1||void 0===arguments[1]?l.default.sources.USER:arguments[1],g=arguments.length<=2||void 0===arguments[2]?[]:arguments[2],v=this.delta;if(1===g.length&&"characterData"===g[0].type&&u.default.find(g[0].target)?(e=u.default.find(g[0].target),n=(0,d.bubbleFormats)(e),i=e.offset(h.scroll),r=g[0].oldValue.replace(f.default.CONTENTS,""),o=(new a.default).insert(r),s=(new a.default).insert(e.value()),c=(new a.default).retain(i).concat(o.diff(s)),t=c.ops.reduce(function(t,e){return e.insert?t.insert(e.insert,n):t.push(e)},new a.default),h.delta=v.compose(t)):(this.delta=this.getDelta(),t&&(0,y.default)(v.compose(t),this.delta)||(t=v.diff(this.delta))),t.length()>0){var m,b,x=[l.default.events.TEXT_CHANGE,t,v,p];if((m=this.emitter).emit.apply(m,[l.default.events.EDITOR_CHANGE].concat(x)),p!==l.default.sources.SILENT)(b=this.emitter).emit.apply(b,x)}return t}}]),t}();function b(t,e){return Object.keys(e).reduce(function(n,i){return null==t[i]?n:(e[i]===t[i]?n[i]=e[i]:Array.isArray(e[i])?e[i].indexOf(t[i])<0&&(n[i]=e[i].concat([t[i]])):n[i]=[e[i],t[i]],n)},{})}e.default=m},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n1?e-1:0),o=1;o=t+n)){var a=this.newlineIndex(t,!0)+1,l=o-a+1,u=this.isolate(a,l),c=u.next;u.format(i,r),c instanceof e&&c.formatAt(0,t-a+n-l,i,r)}}}},{key:"insertAt",value:function(t,e,n){if(null==n){var r=this.descendant(c.default,t),o=i(r,2),a=o[0],s=o[1];a.insertAt(s,e)}}},{key:"length",value:function(){var t=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?t:t+1}},{key:"newlineIndex",value:function(t){if(!(arguments.length<=1||void 0===arguments[1])&&arguments[1])return this.domNode.textContent.slice(0,t).lastIndexOf("\n");var e=this.domNode.textContent.slice(t).indexOf("\n");return e>-1?t+e:-1}},{key:"optimize",value:function(){this.domNode.textContent.endsWith("\n")||this.appendChild(s.default.create("text","\n")),o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this);var t=this.next;null!=t&&t.prev===this&&t.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===t.statics.formats(t.domNode)&&(t.optimize(),t.moveChildren(this),t.remove())}},{key:"replace",value:function(t){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(t){var e=s.default.find(t);null==e?t.parentNode.removeChild(t):e instanceof s.default.Embed?e.remove():e.unwrap()})}}],[{key:"create",value:function(t){var n=o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("spellcheck",!1),n}},{key:"formats",value:function(t){return!0}}]),e}();g.blotName="code-block",g.tagName="PRE",g.TAB=" ",e.Code=y,e.default=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BlockEmbed=e.bubbleFormats=void 0;var i=function(){function t(t,e){for(var n=0;n0&&(t=this.length()-1)){var i=this.clone();return 0===t?(this.parent.insertBefore(i,this),this):(this.parent.insertBefore(i,this.next),i)}var o=r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"split",this).call(this,t,n);return this.cache={},o}}]),e}();function m(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return null==t?e:("function"==typeof t.formats&&(e=(0,o.default)(e,t.formats())),null==t.parent||"scroll"==t.parent.blotName||t.parent.statics.scope!==t.statics.scope?e:m(t.parent,e))}v.blotName="block",v.tagName="P",v.defaultChild="break",v.allowedChildren=[c.default,u.default,f.default],e.bubbleFormats=m,e.BlockEmbed=g,e.default=v},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=function(){function t(t,e){for(var n=0;n=0||r>=0?i-r:t===n?0:t0&&i.update(l.default.sources.SILENT)}),this.emitter.on(l.default.events.SCROLL_BEFORE_UPDATE,function(){var t=i.getNativeRange();null!=t&&t.start.node!==i.cursor.textNode&&i.emitter.once(l.default.events.SCROLL_UPDATE,function(){try{i.setNativeRange(t.start.node,t.start.offset,t.end.node,t.end.offset)}catch(t){}})}),this.update(l.default.sources.SILENT)}return r(t,[{key:"focus",value:function(){if(!this.hasFocus()){var t=document.body.scrollTop;this.root.focus(),document.body.scrollTop=t,this.setRange(this.savedRange)}}},{key:"format",value:function(t,e){this.scroll.update();var n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!o.default.query(t,o.default.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var i=o.default.find(n.start.node,!1);if(null==i)return;if(i instanceof o.default.Leaf){var r=i.split(n.start.offset);i.parent.insertBefore(this.cursor,r)}else i.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(t,e),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}},{key:"getBounds",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?0:arguments[1],n=this.scroll.length();t=Math.min(t,n-1),e=Math.min(t+e,n-1)-t;var r=void 0,o=void 0,a=this.scroll.leaf(t),s=i(a,2),l=s[0],u=s[1];if(null==l)return null;var c=l.position(u,!0),f=i(c,2);o=f[0],u=f[1];var d=document.createRange();if(e>0){d.setStart(o,u);var h=this.scroll.leaf(t+e),p=i(h,2);if(l=p[0],u=p[1],null==l)return null;var y=l.position(u,!0),g=i(y,2);o=g[0],u=g[1],d.setEnd(o,u),r=d.getBoundingClientRect()}else{var v="left";if(o instanceof Text){u0&&(v="right")}r={height:m.height,left:m[v],width:0,top:m.top}}var b=this.root.parentNode.getBoundingClientRect();return{left:r.left-b.left,right:r.left+r.width-b.left,top:r.top-b.top,bottom:r.top+r.height-b.top,height:r.height,width:r.width}}},{key:"getNativeRange",value:function(){var t=document.getSelection();if(null==t||t.rangeCount<=0)return null;var e=t.getRangeAt(0);if(null==e)return null;if(!y(this.root,e.startContainer)||!e.collapsed&&!y(this.root,e.endContainer))return null;var n={start:{node:e.startContainer,offset:e.startOffset},end:{node:e.endContainer,offset:e.endOffset},native:e};return[n.start,n.end].forEach(function(t){for(var e=t.node,n=t.offset;!(e instanceof Text)&&e.childNodes.length>0;)if(e.childNodes.length>n)e=e.childNodes[n],n=0;else{if(e.childNodes.length!==n)break;n=(e=e.lastChild)instanceof Text?e.data.length:e.childNodes.length+1}t.node=e,t.offset=n}),d.info("getNativeRange",n),n}},{key:"getRange",value:function(){var t=this;if(!this.hasFocus())return[null,null];var e=this.getNativeRange();if(null==e)return[null,null];var n=[[e.start.node,e.start.offset]];e.native.collapsed||n.push([e.end.node,e.end.offset]);var r=n.map(function(e){var n=i(e,2),r=n[0],a=n[1],s=o.default.find(r,!0),l=s.offset(t.scroll);return 0===a?l:s instanceof o.default.Container?l+s.length():l+s.index(r,a)}),a=Math.min.apply(Math,c(r)),s=Math.max.apply(Math,c(r));return[new h(a,s-a),e]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"scrollIntoView",value:function(){var t=arguments.length<=0||void 0===arguments[0]?this.lastRange:arguments[0];if(null!=t){var e=this.getBounds(t.index,t.length);if(null!=e)if(this.root.offsetHeight0&&!(s instanceof l.BlockEmbed)&&!(h instanceof l.BlockEmbed)){h instanceof d.default&&h.deleteAt(h.length()-1,1);var p=h.children.head instanceof c.default?null:h.children.head;s.moveChildren(h,p),s.remove()}this.optimize()}},{key:"formatAt",value:function(t,n,i,r){(null==this.whitelist||this.whitelist[i])&&(o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,n,i,r),this.optimize())}},{key:"insertAt",value:function(t,n,i){if(null==i||null==this.whitelist||this.whitelist[n]){if(t>=this.length())if(null==i||null==a.default.query(n,a.default.Scope.BLOCK)){var r=a.default.create(this.statics.defaultChild);this.appendChild(r),null==i&&n.endsWith("\n")&&(n=n.slice(0,-1)),r.insertAt(0,n,i)}else{var s=a.default.create(n,i);this.appendChild(s)}else o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,i);this.optimize()}}},{key:"insertBefore",value:function(t,n){if(t.statics.scope===a.default.Scope.INLINE_BLOT){var i=a.default.create(this.statics.defaultChild);i.appendChild(t),t=i}o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n)}},{key:"leaf",value:function(t){return this.path(t).pop()||[null,-1]}},{key:"line",value:function(t){return this.descendant(p,t)}},{key:"lines",value:function(){return function t(e,n,i){var r=[],o=i;return e.children.forEachAt(n,i,function(e,n,i){p(e)?r.push(e):e instanceof a.default.Container&&(r=r.concat(t(e,n,o))),o-=i}),r}(this,arguments.length<=0||void 0===arguments[0]?0:arguments[0],arguments.length<=1||void 0===arguments[1]?Number.MAX_VALUE:arguments[1])}},{key:"optimize",value:function(){var t=arguments.length<=0||void 0===arguments[0]?[]:arguments[0];!0!==this.batch&&(o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t),t.length>0&&this.emitter.emit(s.default.events.SCROLL_OPTIMIZE,t))}},{key:"path",value:function(t){return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"path",this).call(this,t).slice(1)}},{key:"update",value:function(t){if(!0!==this.batch){var n=s.default.sources.USER;"string"==typeof t&&(n=t),Array.isArray(t)||(t=this.observer.takeRecords()),t.length>0&&this.emitter.emit(s.default.events.SCROLL_BEFORE_UPDATE,n,t),o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"update",this).call(this,t.concat([])),t.length>0&&this.emitter.emit(s.default.events.SCROLL_UPDATE,n,t)}}}]),e}();y.blotName="scroll",y.className="ql-editor",y.tagName="DIV",y.defaultChild="block",y.allowedChildren=[u.default,l.BlockEmbed,f.default],e.default=y},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.matchText=e.matchSpacing=e.matchNewline=e.matchBlot=e.matchAttributor=e.default=void 0;var i=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function(){function t(t,e){for(var n=0;n0&&(e=e.compose((new o.default).retain(e.length(),n)));parseFloat(i.textIndent||0)>0&&(e=(new o.default).insert("\t").concat(e));return e}],["b",S.bind(S,"bold")],["i",S.bind(S,"italic")],["style",function(t,e){return new o.default}]],x=[c.AlignStyle,f.BackgroundStyle,d.ColorStyle,h.DirectionStyle,p.FontStyle,y.SizeStyle].reduce(function(t,e){return t[e.keyName]=e,t},{}),_=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i.quill.root.addEventListener("paste",i.onPaste.bind(i)),i.container=i.quill.addContainer("ql-clipboard"),i.container.setAttribute("contenteditable",!0),i.container.setAttribute("tabindex",-1),i.matchers=[],b.concat(i.options.matchers).forEach(function(t){i.addMatcher.apply(i,function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e=0&&n.length-1}function S(t,e,n){return n.compose((new o.default).retain(n.length(),v({},t,!0)))}function M(t,e){var n=a.default.Attributor.Attribute.keys(t),i=a.default.Attributor.Class.keys(t),r=a.default.Attributor.Style.keys(t),s={};return n.concat(i).concat(r).forEach(function(e){var n=a.default.query(e,a.default.Scope.ATTRIBUTE);null!=n&&(s[n.attrName]=n.value(t),s[n.attrName])||null!=x[e]&&(n=x[e],s[n.attrName]=n.value(t))}),Object.keys(s).length>0&&(e=e.compose((new o.default).retain(e.length(),s))),e}function A(t,e){var n=a.default.query(t);if(null==n)return e;if(n.prototype instanceof a.default.Embed){var i={},r=n.value(t);null!=r&&(i[n.blotName]=r,e=(new o.default).insert(i,n.formats(t)))}else if("function"==typeof n.formats){var s=v({},n.blotName,n.formats(t));e=e.compose((new o.default).retain(e.length(),s))}return e}function T(t,e){return O(t)&&!k(e,"\n")&&e.insert("\n"),e}function C(t,e){if(O(t)&&null!=t.nextElementSibling&&!k(e,"\n\n")){var n=t.offsetHeight+parseFloat(w(t).marginTop)+parseFloat(w(t).marginBottom);t.nextElementSibling.offsetTop>t.offsetTop+1.5*n&&e.insert("\n")}return e}function P(t,e){var n=t.data;if("O:P"===t.parentNode.tagName)return e.insert(n.trim());if(!w(t.parentNode).whiteSpace.startsWith("pre")){var i=function(t,e){return(e=e.replace(/[^\u00a0]/g,"")).length<1&&t?" ":e};n=(n=n.replace(/\r\n/g," ").replace(/\n/g," ")).replace(/\s\s+/g,i.bind(i,!0)),(null==t.previousSibling&&O(t.parentNode)||null!=t.previousSibling&&O(t.previousSibling))&&(n=n.replace(/^\s+/,i.bind(i,!1))),(null==t.nextSibling&&O(t.parentNode)||null!=t.nextSibling&&O(t.nextSibling))&&(n=n.replace(/\s+$/,i.bind(i,!1)))}return e.insert(n)}_.DEFAULTS={matchers:[]},e.default=_,e.matchAttributor=M,e.matchBlot=A,e.matchNewline=T,e.matchSpacing=C,e.matchText=P},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AlignStyle=e.AlignClass=void 0;var i,r=n(3),o=(i=r)&&i.__esModule?i:{default:i};var a={scope:o.default.Scope.BLOCK,whitelist:["right","center","justify"]},s=new o.default.Attributor.Class("align","ql-align",a),l=new o.default.Attributor.Style("align","text-align",a);e.AlignClass=s,e.AlignStyle=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BackgroundStyle=e.BackgroundClass=void 0;var i,r=n(3),o=(i=r)&&i.__esModule?i:{default:i},a=n(48);var s=new o.default.Attributor.Class("background","ql-bg",{scope:o.default.Scope.INLINE}),l=new a.ColorAttributor("background","background-color",{scope:o.default.Scope.INLINE});e.BackgroundClass=s,e.BackgroundStyle=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorStyle=e.ColorClass=e.ColorAttributor=void 0;var i,r=function(){function t(t,e){for(var n=0;ni&&this.stack.undo.length>0){var r=this.stack.undo.pop();n=n.compose(r.undo),t=r.redo.compose(t)}else this.lastRecorded=i;this.stack.undo.push({redo:t,undo:n}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.unshift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(t){this.stack.undo.forEach(function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)}),this.stack.redo.forEach(function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),e}();function u(t){var e,n,i=t.ops.reduce(function(t,e){return t+=e.delete||0},0),o=t.length()-i;return null!=(n=(e=t).ops[e.ops.length-1])&&(null!=n.insert?"string"==typeof n.insert&&n.insert.endsWith("\n"):null!=n.attributes&&Object.keys(n.attributes).some(function(t){return null!=r.default.query(t,r.default.Scope.BLOCK)}))&&(o-=1),o}l.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},e.default=l,e.getLastChangeIndex=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},r=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function t(t,e){for(var n=0;n=this.quill.getLength()-1||this.quill.deleteText(t.index,1,c.default.sources.USER)}),i.addBinding({key:e.keys.BACKSPACE},{collapsed:!1},v),i.addBinding({key:e.keys.DELETE},{collapsed:!1},v),i.listen(),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,d.default),o(e,null,[{key:"match",value:function(t,e){return(!!(e=_(e)).shortKey===t[y]||null===e.shortKey)&&(!["altKey","ctrlKey","metaKey","shiftKey"].some(function(n){return n!=y&&!!e[n]!==t[n]&&null!==e[n]})&&e.key===(t.which||t.keyCode))}}]),o(e,[{key:"addBinding",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],i=_(t);if(null==i||null==i.key)return p.warn("Attempted to add invalid keyboard binding",i);"function"==typeof e&&(e={handler:e}),"function"==typeof n&&(n={handler:n}),i=(0,l.default)(i,e,n),this.bindings[i.key]=this.bindings[i.key]||[],this.bindings[i.key].push(i)}},{key:"listen",value:function(){var t=this;this.quill.root.addEventListener("keydown",function(n){if(!n.defaultPrevented){var o=n.which||n.keyCode,a=(t.bindings[o]||[]).filter(function(t){return e.match(n,t)});if(0!==a.length){var l=t.quill.getSelection();if(null!=l){var c=t.quill.scroll.line(l.index),f=r(c,2),d=f[0],h=f[1],p=t.quill.scroll.leaf(l.index),y=r(p,2),g=y[0],v=y[1],m=0===l.length?[g,v]:t.quill.scroll.leaf(l.index+l.length),b=r(m,2),x=b[0],_=b[1],w=g instanceof u.default.Text?g.value().slice(0,v):"",k=x instanceof u.default.Text?x.value().slice(_):"",O={collapsed:0===l.length,empty:0===l.length&&d.length()<=1,format:t.quill.getFormat(l),offset:h,prefix:w,suffix:k};a.some(function(e){if(null!=e.collapsed&&e.collapsed!==O.collapsed)return!1;if(null!=e.empty&&e.empty!==O.empty)return!1;if(null!=e.offset&&e.offset!==O.offset)return!1;if(Array.isArray(e.format)){if(e.format.every(function(t){return null==O.format[t]}))return!1}else if("object"===i(e.format)&&!Object.keys(e.format).every(function(t){return!0===e.format[t]?null!=O.format[t]:!1===e.format[t]?null==O.format[t]:(0,s.default)(e.format[t],O.format[t])}))return!1;return!(null!=e.prefix&&!e.prefix.test(O.prefix))&&(!(null!=e.suffix&&!e.suffix.test(O.suffix))&&!0!==e.handler.call(t,l,O))})&&n.preventDefault()}}}})}}]),e}();function v(t){this.quill.deleteText(t,c.default.sources.USER),this.quill.setSelection(t.index,c.default.sources.SILENT),this.quill.selection.scrollIntoView()}function m(t,e){var n=this;t.length>0&&this.quill.scroll.deleteAt(t.index,t.length);var i=Object.keys(e.format).reduce(function(t,n){return u.default.query(n,u.default.Scope.BLOCK)&&!Array.isArray(e.format[n])&&(t[n]=e.format[n]),t},{});this.quill.insertText(t.index,"\n",i,c.default.sources.USER),this.quill.selection.scrollIntoView(),Object.keys(e.format).forEach(function(t){null==i[t]&&(Array.isArray(e.format[t])||"link"!==t&&n.quill.format(t,e.format[t],c.default.sources.USER))})}function b(t){return{key:g.keys.TAB,shiftKey:!t,format:{"code-block":!0},handler:function(e){var n=u.default.query("code-block"),i=e.index,o=e.length,a=this.quill.scroll.descendant(n,i),s=r(a,2),l=s[0],f=s[1];if(null!=l){var d=this.quill.scroll.offset(l),h=l.newlineIndex(f,!0)+1,p=l.newlineIndex(d+f+o),y=l.domNode.textContent.slice(h,p).split("\n");f=0,y.forEach(function(e,r){t?(l.insertAt(h+f,n.TAB),f+=n.TAB.length,0===r?i+=n.TAB.length:o+=n.TAB.length):e.startsWith(n.TAB)&&(l.deleteAt(h+f,n.TAB.length),f-=n.TAB.length,0===r?i-=n.TAB.length:o-=n.TAB.length),f+=e.length+1}),this.quill.update(c.default.sources.USER),this.quill.setSelection(i,o,c.default.sources.SILENT)}}}}function x(t){return{key:t[0].toUpperCase(),shortKey:!0,handler:function(e,n){this.quill.format(t,!n.format[t],c.default.sources.USER)}}}function _(t){if("string"==typeof t||"number"==typeof t)return _({key:t});if("object"===("undefined"==typeof t?"undefined":i(t))&&(t=(0,a.default)(t,!1)),"string"==typeof t.key)if(null!=g.keys[t.key.toUpperCase()])t.key=g.keys[t.key.toUpperCase()];else{if(1!==t.key.length)return null;t.key=t.key.toUpperCase().charCodeAt(0)}return t}g.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},g.DEFAULTS={bindings:{bold:x("bold"),italic:x("italic"),underline:x("underline"),indent:{key:g.keys.TAB,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","+1",c.default.sources.USER)}},outdent:{key:g.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","-1",c.default.sources.USER)}},"outdent backspace":{key:g.keys.BACKSPACE,collapsed:!0,format:["blockquote","indent","list"],offset:0,handler:function(t,e){null!=e.format.indent?this.quill.format("indent","-1",c.default.sources.USER):null!=e.format.blockquote?this.quill.format("blockquote",!1,c.default.sources.USER):null!=e.format.list&&this.quill.format("list",!1,c.default.sources.USER)}},"indent code-block":b(!0),"outdent code-block":b(!1),"remove tab":{key:g.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(t,e){this.quill.deleteText(t.index-1,1,c.default.sources.USER)}},tab:{key:g.keys.TAB,handler:function(t,e){e.collapsed||this.quill.scroll.deleteAt(t.index,t.length),this.quill.insertText(t.index,"\t",c.default.sources.USER),this.quill.setSelection(t.index+1,c.default.sources.SILENT)}},"list empty enter":{key:g.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(t,e){this.quill.format("list",!1,c.default.sources.USER),e.format.indent&&this.quill.format("indent",!1,c.default.sources.USER)}},"header enter":{key:g.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(t){this.quill.scroll.insertAt(t.index,"\n"),this.quill.formatText(t.index+1,1,"header",!1,c.default.sources.USER),this.quill.setSelection(t.index+1,c.default.sources.SILENT),this.quill.selection.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^(1\.|-)$/,handler:function(t,e){var n=e.prefix.length;this.quill.scroll.deleteAt(t.index-n,n),this.quill.formatLine(t.index-n,1,"list",1===n?"bullet":"ordered",c.default.sources.USER),this.quill.setSelection(t.index-n,c.default.sources.SILENT)}}}},e.default=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentClass=void 0;var i,r=function(){function t(t,e){for(var n=0;n0&&this.children.tail.format(t,e)}},{key:"formats",value:function(){return t={},e=this.statics.blotName,n=this.statics.formats(this.domNode),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t;var t,e,n}},{key:"insertBefore",value:function(t,n){if(t instanceof d)r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n);else{var i=null==n?this.length():n.offset(this),o=this.split(i);o.parent.insertBefore(t,o)}}},{key:"optimize",value:function(){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this);var t=this.next;null!=t&&t.prev===this&&t.statics.blotName===this.statics.blotName&&t.domNode.tagName===this.domNode.tagName&&(t.moveChildren(this),t.remove())}},{key:"replace",value:function(t){if(t.statics.blotName!==this.statics.blotName){var n=o.default.create(this.statics.defaultChild);t.moveChildren(n),this.appendChild(n)}r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t)}}],[{key:"create",value:function(t){return"ordered"===t?t="OL":"bullet"===t&&(t="UL"),r(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t)}},{key:"formats",value:function(t){return"OL"===t.tagName?"ordered":"UL"===t.tagName?"bullet":void 0}}]),e}();h.blotName="list",h.scope=o.default.Scope.BLOCK_BLOT,h.tagName=["OL","UL"],h.defaultChild="list-item",h.allowedChildren=[d],e.ListItem=d,e.default=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=function(){function t(t,e){for(var n=0;n-1}l.blotName="link",l.tagName="A",l.SANITIZED_URL="about:blank",e.default=l,e.sanitize=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=function(){function t(t,e){for(var n=0;n0||null==this.cachedHTML)&&(this.domNode.innerHTML=t(e),this.attach()),this.cachedHTML=this.domNode.innerHTML}}}]),e}();d.className="ql-syntax";var h=new r.default.Attributor.Class("token","hljs",{scope:r.default.Scope.INLINE}),p=function(t){function e(t,n){u(this,e);var i=c(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if("function"!=typeof i.options.highlight)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");o.default.register(h,!0),o.default.register(d,!0);var r=null;return i.quill.on(o.default.events.SCROLL_OPTIMIZE,function(){null==r&&(r=setTimeout(function(){i.highlight(),r=null},100))}),i.highlight(),i}return f(e,a.default),i(e,[{key:"highlight",value:function(){var t=this;if(!this.quill.selection.composing){var e=this.quill.getSelection();this.quill.scroll.descendants(d).forEach(function(e){e.highlight(t.options.highlight)}),this.quill.update(o.default.sources.SILENT),null!=e&&this.quill.setSelection(e,o.default.sources.SILENT)}}}]),e}();p.DEFAULTS={highlight:null==window.hljs?null:function(t){return window.hljs.highlightAuto(t).value}},e.CodeBlock=d,e.CodeToken=h,e.default=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.addControls=e.default=void 0;var i=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function(){function t(t,e){for(var n=0;n '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},o=function(){function t(t,e){for(var n=0;n-1){var e=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex],this.selectItem(e)}else this.selectItem(null);var n=null!=t&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),t}();e.default=l},function(t,e){t.exports=' '},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=function(){function t(t,e){for(var n=0;n=this.quill.root.offsetHeight)}},{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(t){var e=t.left+t.width/2-this.root.offsetWidth/2,n=t.bottom+this.quill.root.scrollTop;this.root.style.left=e+"px",this.root.style.top=n+"px";var i=this.boundsContainer.getBoundingClientRect(),r=this.root.getBoundingClientRect(),o=0;return r.right>i.right&&(o=i.right-r.right,this.root.style.left=e+o+"px"),r.left0){i.show(),i.root.style.left="0px",i.root.style.width="",i.root.style.width=i.root.offsetWidth+"px";var n=i.quill.scroll.lines(e.index,e.length);if(1===n.length)i.position(i.quill.getBounds(e));else{var r=n[n.length-1],o=r.offset(i.quill.scroll),s=Math.min(r.length()-1,e.index+e.length-o),l=i.quill.getBounds(new u.Range(o,s));i.position(l)}}else document.activeElement!==i.textbox&&i.quill.hasFocus()&&i.hide()}),i}return h(e,s.BaseTooltip),r(e,[{key:"listen",value:function(){var t=this;i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(e){t.root.classList.remove("ql-editing")}),this.quill.on(a.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!t.root.classList.contains("ql-hidden")){var e=t.quill.getSelection();null!=e&&t.position(t.quill.getBounds(e))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(t){var n=i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"position",this).call(this,t);if(0===n)return n;var r=this.root.querySelector(".ql-tooltip-arrow");r.style.marginLeft="",r.style.marginLeft=-1*n-r.offsetWidth/2+"px"}}]),e}();g.TEMPLATE=['','
','','',"
"].join(""),e.default=y},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BaseTooltip=void 0;var i=function(){function t(t,e){for(var n=0;n','','',''].join(""),e.default=v}])}),function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Chart=t()}}(function(){return function(){return function t(e,n,i){function r(a,s){if(!n[a]){if(!e[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[a]={exports:{}};e[a][0].call(c.exports,function(t){var n=e[a][1][t];return r(n||t)},c,c.exports,t,e,n,i)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;an?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,n=(e[0]+t)%360;return e[0]=n<0?360+n:n,this.setValues("hsl",e),this},mix:function(t,e){var n=t,i=void 0===e?.5:e,r=2*i-1,o=this.alpha()-n.alpha(),a=((r*o==-1?r:(r+o)/(1+r*o))+1)/2,s=1-a;return this.rgb(a*this.red()+s*n.red(),a*this.green()+s*n.green(),a*this.blue()+s*n.blue()).alpha(this.alpha()*i+n.alpha()*(1-i))},toJSON:function(){return this.rgb()},clone:function(){var t,e,n=new o,i=this.values,r=n.values;for(var a in i)i.hasOwnProperty(a)&&(t=i[a],"[object Array]"===(e={}.toString.call(t))?r[a]=t.slice(0):"[object Number]"===e?r[a]=t:console.error("unexpected color value:",t));return n}},o.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},o.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},o.prototype.getValues=function(t){for(var e=this.values,n={},i=0;i.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92)),100*(.2126*e+.7152*n+.0722*i),100*(.0193*e+.1192*n+.9505*i)]}function c(t){var e=u(t),n=e[0],i=e[1],r=e[2];return i/=100,r/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116)-16,500*(n-i),200*(i-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]}function f(t){var e,n,i,r,o,a=t[0]/360,s=t[1]/100,l=t[2]/100;if(0==s)return[o=255*l,o,o];e=2*l-(n=l<.5?l*(1+s):l+s-l*s),r=[0,0,0];for(var u=0;u<3;u++)(i=a+1/3*-(u-1))<0&&i++,i>1&&i--,o=6*i<1?e+6*(n-e)*i:2*i<1?n:3*i<2?e+(n-e)*(2/3-i)*6:e,r[u]=255*o;return r}function d(t){var e=t[0]/60,n=t[1]/100,i=t[2]/100,r=Math.floor(e)%6,o=e-Math.floor(e),a=255*i*(1-n),s=255*i*(1-n*o),l=255*i*(1-n*(1-o));i*=255;switch(r){case 0:return[i,l,a];case 1:return[s,i,a];case 2:return[a,i,l];case 3:return[a,s,i];case 4:return[l,a,i];case 5:return[i,a,s]}}function h(t){var e,n,i,o,a=t[0]/360,s=t[1]/100,l=t[2]/100,u=s+l;switch(u>1&&(s/=u,l/=u),n=1-l,i=6*a-(e=Math.floor(6*a)),0!=(1&e)&&(i=1-i),o=s+i*(n-s),e){default:case 6:case 0:r=n,g=o,b=s;break;case 1:r=o,g=n,b=s;break;case 2:r=s,g=n,b=o;break;case 3:r=s,g=o,b=n;break;case 4:r=o,g=s,b=n;break;case 5:r=n,g=s,b=o}return[255*r,255*g,255*b]}function p(t){var e=t[0]/100,n=t[1]/100,i=t[2]/100,r=t[3]/100;return[255*(1-Math.min(1,e*(1-r)+r)),255*(1-Math.min(1,n*(1-r)+r)),255*(1-Math.min(1,i*(1-r)+r))]}function y(t){var e,n,i,r=t[0]/100,o=t[1]/100,a=t[2]/100;return n=-.9689*r+1.8758*o+.0415*a,i=.0557*r+-.204*o+1.057*a,e=(e=3.2406*r+-1.5372*o+-.4986*a)>.0031308?1.055*Math.pow(e,1/2.4)-.055:e*=12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*=12.92,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*=12.92,[255*(e=Math.min(Math.max(0,e),1)),255*(n=Math.min(Math.max(0,n),1)),255*(i=Math.min(Math.max(0,i),1))]}function v(t){var e=t[0],n=t[1],i=t[2];return n/=100,i/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(e-n),200*(n-(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116))]}function m(t){var e,n,i,r,o=t[0],a=t[1],s=t[2];return o<=8?r=(n=100*o/903.3)/100*7.787+16/116:(n=100*Math.pow((o+16)/116,3),r=Math.pow(n/100,1/3)),[e=e/95.047<=.008856?e=95.047*(a/500+r-16/116)/7.787:95.047*Math.pow(a/500+r,3),n,i=i/108.883<=.008859?i=108.883*(r-s/200-16/116)/7.787:108.883*Math.pow(r-s/200,3)]}function x(t){var e,n=t[0],i=t[1],r=t[2];return(e=360*Math.atan2(r,i)/2/Math.PI)<0&&(e+=360),[n,Math.sqrt(i*i+r*r),e]}function _(t){return y(m(t))}function w(t){var e,n=t[0],i=t[1];return e=t[2]/360*2*Math.PI,[n,i*Math.cos(e),i*Math.sin(e)]}function k(t){return O[t]}e.exports={rgb2hsl:i,rgb2hsv:o,rgb2hwb:a,rgb2cmyk:s,rgb2keyword:l,rgb2xyz:u,rgb2lab:c,rgb2lch:function(t){return x(c(t))},hsl2rgb:f,hsl2hsv:function(t){var e=t[0],n=t[1]/100,i=t[2]/100;if(0===i)return[0,0,0];return[e,100*(2*(n*=(i*=2)<=1?i:2-i)/(i+n)),100*((i+n)/2)]},hsl2hwb:function(t){return a(f(t))},hsl2cmyk:function(t){return s(f(t))},hsl2keyword:function(t){return l(f(t))},hsv2rgb:d,hsv2hsl:function(t){var e,n,i=t[0],r=t[1]/100,o=t[2]/100;return e=r*o,[i,100*(e=(e/=(n=(2-r)*o)<=1?n:2-n)||0),100*(n/=2)]},hsv2hwb:function(t){return a(d(t))},hsv2cmyk:function(t){return s(d(t))},hsv2keyword:function(t){return l(d(t))},hwb2rgb:h,hwb2hsl:function(t){return i(h(t))},hwb2hsv:function(t){return o(h(t))},hwb2cmyk:function(t){return s(h(t))},hwb2keyword:function(t){return l(h(t))},cmyk2rgb:p,cmyk2hsl:function(t){return i(p(t))},cmyk2hsv:function(t){return o(p(t))},cmyk2hwb:function(t){return a(p(t))},cmyk2keyword:function(t){return l(p(t))},keyword2rgb:k,keyword2hsl:function(t){return i(k(t))},keyword2hsv:function(t){return o(k(t))},keyword2hwb:function(t){return a(k(t))},keyword2cmyk:function(t){return s(k(t))},keyword2lab:function(t){return c(k(t))},keyword2xyz:function(t){return u(k(t))},xyz2rgb:y,xyz2lab:v,xyz2lch:function(t){return x(v(t))},lab2xyz:m,lab2rgb:_,lab2lch:x,lch2lab:w,lch2xyz:function(t){return m(w(t))},lch2rgb:function(t){return _(w(t))}};var O={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},S={};for(var M in O)S[JSON.stringify(O[M])]=M},{}],4:[function(t,e,n){var i=t(3),r=function(){return new u};for(var o in i){r[o+"Raw"]=function(t){return function(e){return"number"==typeof e&&(e=Array.prototype.slice.call(arguments)),i[t](e)}}(o);var a=/(\w+)2(\w+)/.exec(o),s=a[1],l=a[2];(r[s]=r[s]||{})[l]=r[o]=function(t){return function(e){"number"==typeof e&&(e=Array.prototype.slice.call(arguments));var n=i[t](e);if("string"==typeof n||void 0===n)return n;for(var r=0;r>>0,i=0;i0)for(n=0;n=0?n?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+i}var B=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,W=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Y={},H={};function z(t,e,n,i){var r=i;"string"==typeof i&&(r=function(){return this[i]()}),t&&(H[t]=r),e&&(H[e[0]]=function(){return F(r.apply(this,arguments),e[1],e[2])}),n&&(H[n]=function(){return this.localeData().ordinal(r.apply(this,arguments),t)})}function V(t,e){return t.isValid()?(e=U(e,t.localeData()),Y[e]=Y[e]||function(t){var e,n,i,r=t.match(B);for(e=0,n=r.length;e=0&&W.test(t);)t=t.replace(W,i),W.lastIndex=0,n-=1;return t}var G=/\d/,Z=/\d\d/,K=/\d{3}/,X=/\d{4}/,$=/[+-]?\d{6}/,J=/\d\d?/,Q=/\d\d\d\d?/,tt=/\d\d\d\d\d\d?/,et=/\d{1,3}/,nt=/\d{1,4}/,it=/[+-]?\d{1,6}/,rt=/\d+/,ot=/[+-]?\d+/,at=/Z|[+-]\d\d:?\d\d/gi,st=/Z|[+-]\d\d(?::?\d\d)?/gi,lt=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ut={};function ct(t,e,n){ut[t]=P(e)?e:function(t,i){return t&&n?n:e}}function ft(t,e){return f(ut,t)?ut[t](e._strict,e._locale):new RegExp(dt(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,n,i,r){return e||n||i||r})))}function dt(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var ht={};function pt(t,e){var n,i=e;for("string"==typeof t&&(t=[t]),l(e)&&(i=function(t,n){n[e]=k(t)}),n=0;n68?1900:2e3)};var At,Tt=Ct("FullYear",!0);function Ct(t,e){return function(n){return null!=n?(Et(this,t,n),r.updateOffset(this,e),this):Pt(this,t)}}function Pt(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function Et(t,e,n){t.isValid()&&!isNaN(n)&&("FullYear"===e&&Mt(t.year())&&1===t.month()&&29===t.date()?t._d["set"+(t._isUTC?"UTC":"")+e](n,t.month(),Nt(n,t.month())):t._d["set"+(t._isUTC?"UTC":"")+e](n))}function Nt(t,e){if(isNaN(t)||isNaN(e))return NaN;var n,i=(e%(n=12)+n)%n;return t+=(e-i)/12,1===i?Mt(t)?29:28:31-i%7%2}At=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e=0&&isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t),e}function Yt(t,e,n){var i=7+e-n;return-((7+Wt(t,0,i).getUTCDay()-e)%7)+i-1}function Ht(t,e,n,i,r){var o,a,s=1+7*(e-1)+(7+n-i)%7+Yt(t,i,r);return s<=0?a=St(o=t-1)+s:s>St(t)?(o=t+1,a=s-St(t)):(o=t,a=s),{year:o,dayOfYear:a}}function zt(t,e,n){var i,r,o=Yt(t.year(),e,n),a=Math.floor((t.dayOfYear()-o-1)/7)+1;return a<1?i=a+Vt(r=t.year()-1,e,n):a>Vt(t.year(),e,n)?(i=a-Vt(t.year(),e,n),r=t.year()+1):(r=t.year(),i=a),{week:i,year:r}}function Vt(t,e,n){var i=Yt(t,e,n),r=Yt(t+1,e,n);return(St(t)-i+r)/7}z("w",["ww",2],"wo","week"),z("W",["WW",2],"Wo","isoWeek"),L("week","w"),L("isoWeek","W"),q("week",5),q("isoWeek",5),ct("w",J),ct("ww",J,Z),ct("W",J),ct("WW",J,Z),yt(["w","ww","W","WW"],function(t,e,n,i){e[i.substr(0,1)]=k(t)});z("d",0,"do","day"),z("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),z("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),z("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),z("e",0,0,"weekday"),z("E",0,0,"isoWeekday"),L("day","d"),L("weekday","e"),L("isoWeekday","E"),q("day",11),q("weekday",11),q("isoWeekday",11),ct("d",J),ct("e",J),ct("E",J),ct("dd",function(t,e){return e.weekdaysMinRegex(t)}),ct("ddd",function(t,e){return e.weekdaysShortRegex(t)}),ct("dddd",function(t,e){return e.weekdaysRegex(t)}),yt(["dd","ddd","dddd"],function(t,e,n,i){var r=n._locale.weekdaysParse(t,i,n._strict);null!=r?e.d=r:p(n).invalidWeekday=t}),yt(["d","e","E"],function(t,e,n,i){e[i]=k(t)});var Ut="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var Gt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var Zt="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var Kt=lt;var Xt=lt;var $t=lt;function Jt(){function t(t,e){return e.length-t.length}var e,n,i,r,o,a=[],s=[],l=[],u=[];for(e=0;e<7;e++)n=h([2e3,1]).day(e),i=this.weekdaysMin(n,""),r=this.weekdaysShort(n,""),o=this.weekdays(n,""),a.push(i),s.push(r),l.push(o),u.push(i),u.push(r),u.push(o);for(a.sort(t),s.sort(t),l.sort(t),u.sort(t),e=0;e<7;e++)s[e]=dt(s[e]),l[e]=dt(l[e]),u[e]=dt(u[e]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Qt(){return this.hours()%12||12}function te(t,e){z(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function ee(t,e){return e._meridiemParse}z("H",["HH",2],0,"hour"),z("h",["hh",2],0,Qt),z("k",["kk",2],0,function(){return this.hours()||24}),z("hmm",0,0,function(){return""+Qt.apply(this)+F(this.minutes(),2)}),z("hmmss",0,0,function(){return""+Qt.apply(this)+F(this.minutes(),2)+F(this.seconds(),2)}),z("Hmm",0,0,function(){return""+this.hours()+F(this.minutes(),2)}),z("Hmmss",0,0,function(){return""+this.hours()+F(this.minutes(),2)+F(this.seconds(),2)}),te("a",!0),te("A",!1),L("hour","h"),q("hour",13),ct("a",ee),ct("A",ee),ct("H",J),ct("h",J),ct("k",J),ct("HH",J,Z),ct("hh",J,Z),ct("kk",J,Z),ct("hmm",Q),ct("hmmss",tt),ct("Hmm",Q),ct("Hmmss",tt),pt(["H","HH"],bt),pt(["k","kk"],function(t,e,n){var i=k(t);e[bt]=24===i?0:i}),pt(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t}),pt(["h","hh"],function(t,e,n){e[bt]=k(t),p(n).bigHour=!0}),pt("hmm",function(t,e,n){var i=t.length-2;e[bt]=k(t.substr(0,i)),e[xt]=k(t.substr(i)),p(n).bigHour=!0}),pt("hmmss",function(t,e,n){var i=t.length-4,r=t.length-2;e[bt]=k(t.substr(0,i)),e[xt]=k(t.substr(i,2)),e[_t]=k(t.substr(r)),p(n).bigHour=!0}),pt("Hmm",function(t,e,n){var i=t.length-2;e[bt]=k(t.substr(0,i)),e[xt]=k(t.substr(i))}),pt("Hmmss",function(t,e,n){var i=t.length-4,r=t.length-2;e[bt]=k(t.substr(0,i)),e[xt]=k(t.substr(i,2)),e[_t]=k(t.substr(r))});var ne,ie=Ct("Hours",!0),re={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Lt,monthsShort:jt,week:{dow:0,doy:6},weekdays:Ut,weekdaysMin:Zt,weekdaysShort:Gt,meridiemParse:/[ap]\.?m?\.?/i},oe={},ae={};function se(t){return t?t.toLowerCase().replace("_","-"):t}function le(n){var i=null;if(!oe[n]&&"undefined"!=typeof e&&e&&e.exports)try{i=ne._abbr,t("./locale/"+n),ue(i)}catch(t){}return oe[n]}function ue(t,e){var n;return t&&(n=s(e)?fe(t):ce(t,e))&&(ne=n),ne._abbr}function ce(t,e){if(null!==e){var n=re;if(e.abbr=t,null!=oe[t])C("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=oe[t]._config;else if(null!=e.parentLocale){if(null==oe[e.parentLocale])return ae[e.parentLocale]||(ae[e.parentLocale]=[]),ae[e.parentLocale].push({name:t,config:e}),null;n=oe[e.parentLocale]._config}return oe[t]=new N(E(n,e)),ae[t]&&ae[t].forEach(function(t){ce(t.name,t.config)}),ue(t),oe[t]}return delete oe[t],null}function fe(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return ne;if(!o(t)){if(e=le(t))return e;t=[t]}return function(t){for(var e,n,i,r,o=0;o0;){if(i=le(r.slice(0,e).join("-")))return i;if(n&&n.length>=e&&O(r,n,!0)>=e-1)break;e--}o++}return null}(t)}function de(t){var e,n=t._a;return n&&-2===p(t).overflow&&(e=n[vt]<0||n[vt]>11?vt:n[mt]<1||n[mt]>Nt(n[gt],n[vt])?mt:n[bt]<0||n[bt]>24||24===n[bt]&&(0!==n[xt]||0!==n[_t]||0!==n[wt])?bt:n[xt]<0||n[xt]>59?xt:n[_t]<0||n[_t]>59?_t:n[wt]<0||n[wt]>999?wt:-1,p(t)._overflowDayOfYear&&(emt)&&(e=mt),p(t)._overflowWeeks&&-1===e&&(e=kt),p(t)._overflowWeekday&&-1===e&&(e=Ot),p(t).overflow=e),t}function he(t,e,n){return null!=t?t:null!=e?e:n}function pe(t){var e,n,i,o,a,s=[];if(!t._d){var l,u;for(l=t,u=new Date(r.now()),i=l._useUTC?[u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()]:[u.getFullYear(),u.getMonth(),u.getDate()],t._w&&null==t._a[mt]&&null==t._a[vt]&&function(t){var e,n,i,r,o,a,s,l;if(null!=(e=t._w).GG||null!=e.W||null!=e.E)o=1,a=4,n=he(e.GG,t._a[gt],zt(Ce(),1,4).year),i=he(e.W,1),((r=he(e.E,1))<1||r>7)&&(l=!0);else{o=t._locale._week.dow,a=t._locale._week.doy;var u=zt(Ce(),o,a);n=he(e.gg,t._a[gt],u.year),i=he(e.w,u.week),null!=e.d?((r=e.d)<0||r>6)&&(l=!0):null!=e.e?(r=e.e+o,(e.e<0||e.e>6)&&(l=!0)):r=o}i<1||i>Vt(n,o,a)?p(t)._overflowWeeks=!0:null!=l?p(t)._overflowWeekday=!0:(s=Ht(n,i,r,o,a),t._a[gt]=s.year,t._dayOfYear=s.dayOfYear)}(t),null!=t._dayOfYear&&(a=he(t._a[gt],i[gt]),(t._dayOfYear>St(a)||0===t._dayOfYear)&&(p(t)._overflowDayOfYear=!0),n=Wt(a,0,t._dayOfYear),t._a[vt]=n.getUTCMonth(),t._a[mt]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=s[e]=i[e];for(;e<7;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[bt]&&0===t._a[xt]&&0===t._a[_t]&&0===t._a[wt]&&(t._nextDay=!0,t._a[bt]=0),t._d=(t._useUTC?Wt:function(t,e,n,i,r,o,a){var s=new Date(t,e,n,i,r,o,a);return t<100&&t>=0&&isFinite(s.getFullYear())&&s.setFullYear(t),s}).apply(null,s),o=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[bt]=24),t._w&&"undefined"!=typeof t._w.d&&t._w.d!==o&&(p(t).weekdayMismatch=!0)}}var ye=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ge=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ve=/Z|[+-]\d\d(?::?\d\d)?/,me=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],be=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],xe=/^\/?Date\((\-?\d+)/i;function _e(t){var e,n,i,r,o,a,s=t._i,l=ye.exec(s)||ge.exec(s);if(l){for(p(t).iso=!0,e=0,n=me.length;e0&&p(t).unusedInput.push(a),c=c.slice(c.indexOf(n)+n.length),h+=n.length),H[o]?(n?p(t).empty=!1:p(t).unusedTokens.push(o),s=o,u=t,null!=(l=n)&&f(ht,s)&&ht[s](l,u._a,u,s)):t._strict&&!n&&p(t).unusedTokens.push(o);p(t).charsLeftOver=d-h,c.length>0&&p(t).unusedInput.push(c),t._a[bt]<=12&&!0===p(t).bigHour&&t._a[bt]>0&&(p(t).bigHour=void 0),p(t).parsedDateParts=t._a.slice(0),p(t).meridiem=t._meridiem,t._a[bt]=function(t,e,n){var i;if(null==n)return e;return null!=t.meridiemHour?t.meridiemHour(e,n):null!=t.isPM?((i=t.isPM(n))&&e<12&&(e+=12),i||12!==e||(e=0),e):e}(t._locale,t._a[bt],t._meridiem),pe(t),de(t)}else Se(t);else _e(t)}function Ae(t){var e,n,i,f,h=t._i,v=t._f;return t._locale=t._locale||fe(t._l),null===h||void 0===v&&""===h?g({nullInput:!0}):("string"==typeof h&&(t._i=h=t._locale.preparse(h)),_(h)?new x(de(h)):(u(h)?t._d=h:o(v)?function(t){var e,n,i,r,o;if(0===t._f.length)return p(t).invalidFormat=!0,void(t._d=new Date(NaN));for(r=0;rthis?this:t:g()});function Ne(t,e){var n,i;if(1===e.length&&o(e[0])&&(e=e[0]),!e.length)return Ce();for(n=e[0],i=1;i(o=Vt(t,i,r))&&(e=o),(function(t,e,n,i,r){var o=Ht(t,e,n,i,r),a=Wt(o.year,0,o.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}).call(this,t,e,n,i,r))}z(0,["gg",2],0,function(){return this.weekYear()%100}),z(0,["GG",2],0,function(){return this.isoWeekYear()%100}),nn("gggg","weekYear"),nn("ggggg","weekYear"),nn("GGGG","isoWeekYear"),nn("GGGGG","isoWeekYear"),L("weekYear","gg"),L("isoWeekYear","GG"),q("weekYear",1),q("isoWeekYear",1),ct("G",ot),ct("g",ot),ct("GG",J,Z),ct("gg",J,Z),ct("GGGG",nt,X),ct("gggg",nt,X),ct("GGGGG",it,$),ct("ggggg",it,$),yt(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,i){e[i.substr(0,2)]=k(t)}),yt(["gg","GG"],function(t,e,n,i){e[i]=r.parseTwoDigitYear(t)}),z("Q",0,"Qo","quarter"),L("quarter","Q"),q("quarter",7),ct("Q",G),pt("Q",function(t,e){e[vt]=3*(k(t)-1)}),z("D",["DD",2],"Do","date"),L("date","D"),q("date",9),ct("D",J),ct("DD",J,Z),ct("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient}),pt(["D","DD"],mt),pt("Do",function(t,e){e[mt]=k(t.match(J)[0])});var on=Ct("Date",!0);z("DDD",["DDDD",3],"DDDo","dayOfYear"),L("dayOfYear","DDD"),q("dayOfYear",4),ct("DDD",et),ct("DDDD",K),pt(["DDD","DDDD"],function(t,e,n){n._dayOfYear=k(t)}),z("m",["mm",2],0,"minute"),L("minute","m"),q("minute",14),ct("m",J),ct("mm",J,Z),pt(["m","mm"],xt);var an=Ct("Minutes",!1);z("s",["ss",2],0,"second"),L("second","s"),q("second",15),ct("s",J),ct("ss",J,Z),pt(["s","ss"],_t);var sn,ln=Ct("Seconds",!1);for(z("S",0,0,function(){return~~(this.millisecond()/100)}),z(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),z(0,["SSS",3],0,"millisecond"),z(0,["SSSS",4],0,function(){return 10*this.millisecond()}),z(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),z(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),z(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),z(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),z(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),L("millisecond","ms"),q("millisecond",16),ct("S",et,G),ct("SS",et,Z),ct("SSS",et,K),sn="SSSS";sn.length<=9;sn+="S")ct(sn,rt);function un(t,e){e[wt]=k(1e3*("0."+t))}for(sn="S";sn.length<=9;sn+="S")pt(sn,un);var cn=Ct("Milliseconds",!1);z("z",0,0,"zoneAbbr"),z("zz",0,0,"zoneName");var fn=x.prototype;function dn(t){return t}fn.add=Xe,fn.calendar=function(t,e){var n=t||Ce(),i=Be(n,this).startOf("day"),o=r.calendarFormat(this,i)||"sameElse",a=e&&(P(e[o])?e[o].call(this,n):e[o]);return this.format(a||this.localeData().calendar(o,this,Ce(n)))},fn.clone=function(){return new x(this)},fn.diff=function(t,e,n){var i,r,o;if(!this.isValid())return NaN;if(!(i=Be(t,this)).isValid())return NaN;switch(r=6e4*(i.utcOffset()-this.utcOffset()),e=j(e)){case"year":o=Je(this,i)/12;break;case"month":o=Je(this,i);break;case"quarter":o=Je(this,i)/3;break;case"second":o=(this-i)/1e3;break;case"minute":o=(this-i)/6e4;break;case"hour":o=(this-i)/36e5;break;case"day":o=(this-i-r)/864e5;break;case"week":o=(this-i-r)/6048e5;break;default:o=this-i}return n?o:w(o)},fn.endOf=function(t){return void 0===(t=j(t))||"millisecond"===t?this:("date"===t&&(t="day"),this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms"))},fn.format=function(t){t||(t=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var e=V(this,t);return this.localeData().postformat(e)},fn.from=function(t,e){return this.isValid()&&(_(t)&&t.isValid()||Ce(t).isValid())?Ve({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},fn.fromNow=function(t){return this.from(Ce(),t)},fn.to=function(t,e){return this.isValid()&&(_(t)&&t.isValid()||Ce(t).isValid())?Ve({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},fn.toNow=function(t){return this.to(Ce(),t)},fn.get=function(t){return P(this[t=j(t)])?this[t]():this},fn.invalidAt=function(){return p(this).overflow},fn.isAfter=function(t,e){var n=_(t)?t:Ce(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=j(s(e)?"millisecond":e))?this.valueOf()>n.valueOf():n.valueOf()9999?V(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):P(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this._d.valueOf()).toISOString().replace("Z",V(n,"Z")):V(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},fn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="";this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",e="Z");var n="["+t+'("]',i=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",r=e+'[")]';return this.format(n+i+"-MM-DD[T]HH:mm:ss.SSS"+r)},fn.toJSON=function(){return this.isValid()?this.toISOString():null},fn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},fn.unix=function(){return Math.floor(this.valueOf()/1e3)},fn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},fn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},fn.year=Tt,fn.isLeapYear=function(){return Mt(this.year())},fn.weekYear=function(t){return rn.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},fn.isoWeekYear=function(t){return rn.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)},fn.quarter=fn.quarters=function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},fn.month=Rt,fn.daysInMonth=function(){return Nt(this.year(),this.month())},fn.week=fn.weeks=function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},fn.isoWeek=fn.isoWeeks=function(t){var e=zt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},fn.weeksInYear=function(){var t=this.localeData()._week;return Vt(this.year(),t.dow,t.doy)},fn.isoWeeksInYear=function(){return Vt(this.year(),1,4)},fn.date=on,fn.day=fn.days=function(t){if(!this.isValid())return null!=t?this:NaN;var e,n,i=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(e=t,n=this.localeData(),t="string"!=typeof e?e:isNaN(e)?"number"==typeof(e=n.weekdaysParse(e))?e:null:parseInt(e,10),this.add(t-i,"d")):i},fn.weekday=function(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},fn.isoWeekday=function(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=(n=t,i=this.localeData(),"string"==typeof n?i.weekdaysParse(n)%7||7:isNaN(n)?null:n);return this.day(this.day()%7?e:e-7)}return this.day()||7;var n,i},fn.dayOfYear=function(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},fn.hour=fn.hours=ie,fn.minute=fn.minutes=an,fn.second=fn.seconds=ln,fn.millisecond=fn.milliseconds=cn,fn.utcOffset=function(t,e,n){var i,o=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null!=t){if("string"==typeof t){if(null===(t=Fe(st,t)))return this}else Math.abs(t)<16&&!n&&(t*=60);return!this._isUTC&&e&&(i=We(this)),this._offset=t,this._isUTC=!0,null!=i&&this.add(i,"m"),o!==t&&(!e||this._changeInProgress?Ke(this,Ve(t-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?o:We(this)},fn.utc=function(t){return this.utcOffset(0,t)},fn.local=function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(We(this),"m")),this},fn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=Fe(at,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this},fn.hasAlignedHourOffset=function(t){return!!this.isValid()&&(t=t?Ce(t).utcOffset():0,(this.utcOffset()-t)%60==0)},fn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},fn.isLocal=function(){return!!this.isValid()&&!this._isUTC},fn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},fn.isUtc=Ye,fn.isUTC=Ye,fn.zoneAbbr=function(){return this._isUTC?"UTC":""},fn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},fn.dates=M("dates accessor is deprecated. Use date instead.",on),fn.months=M("months accessor is deprecated. Use month instead",Rt),fn.years=M("years accessor is deprecated. Use year instead",Tt),fn.zone=M("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}),fn.isDSTShifted=M("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var t={};if(m(t,this),(t=Ae(t))._a){var e=t._isUTC?h(t._a):Ce(t._a);this._isDSTShifted=this.isValid()&&O(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted});var hn=N.prototype;function pn(t,e,n,i){var r=fe(),o=h().set(i,e);return r[n](o,t)}function yn(t,e,n){if(l(t)&&(e=t,t=void 0),t=t||"",null!=e)return pn(t,e,n,"month");var i,r=[];for(i=0;i<12;i++)r[i]=pn(t,i,n,"month");return r}function gn(t,e,n,i){"boolean"==typeof t?(l(e)&&(n=e,e=void 0),e=e||""):(n=e=t,t=!1,l(e)&&(n=e,e=void 0),e=e||"");var r,o=fe(),a=t?o._week.dow:0;if(null!=n)return pn(e,(n+a)%7,i,"day");var s=[];for(r=0;r<7;r++)s[r]=pn(e,(r+a)%7,i,"day");return s}hn.calendar=function(t,e,n){var i=this._calendar[t]||this._calendar.sameElse;return P(i)?i.call(e,n):i},hn.longDateFormat=function(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t])},hn.invalidDate=function(){return this._invalidDate},hn.ordinal=function(t){return this._ordinal.replace("%d",t)},hn.preparse=dn,hn.postformat=dn,hn.relativeTime=function(t,e,n,i){var r=this._relativeTime[n];return P(r)?r(t,e,n,i):r.replace(/%d/i,t)},hn.pastFuture=function(t,e){var n=this._relativeTime[t>0?"future":"past"];return P(n)?n(e):n.replace(/%s/i,e)},hn.set=function(t){var e,n;for(n in t)P(e=t[n])?this[n]=e:this["_"+n]=e;this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},hn.months=function(t,e){return t?o(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||Dt).test(e)?"format":"standalone"][t.month()]:o(this._months)?this._months:this._months.standalone},hn.monthsShort=function(t,e){return t?o(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[Dt.test(e)?"format":"standalone"][t.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},hn.monthsParse=function(t,e,n){var i,r,o;if(this._monthsParseExact)return(function(t,e,n){var i,r,o,a=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],i=0;i<12;++i)o=h([2e3,i]),this._shortMonthsParse[i]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(o,"").toLocaleLowerCase();return n?"MMM"===e?-1!==(r=At.call(this._shortMonthsParse,a))?r:null:-1!==(r=At.call(this._longMonthsParse,a))?r:null:"MMM"===e?-1!==(r=At.call(this._shortMonthsParse,a))?r:-1!==(r=At.call(this._longMonthsParse,a))?r:null:-1!==(r=At.call(this._longMonthsParse,a))?r:-1!==(r=At.call(this._shortMonthsParse,a))?r:null}).call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(r=h([2e3,i]),n&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),n||this._monthsParse[i]||(o="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[i]=new RegExp(o.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[i].test(t))return i;if(n&&"MMM"===e&&this._shortMonthsParse[i].test(t))return i;if(!n&&this._monthsParse[i].test(t))return i}},hn.monthsRegex=function(t){return this._monthsParseExact?(f(this,"_monthsRegex")||Bt.call(this),t?this._monthsStrictRegex:this._monthsRegex):(f(this,"_monthsRegex")||(this._monthsRegex=Ft),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)},hn.monthsShortRegex=function(t){return this._monthsParseExact?(f(this,"_monthsRegex")||Bt.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(f(this,"_monthsShortRegex")||(this._monthsShortRegex=qt),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)},hn.week=function(t){return zt(t,this._week.dow,this._week.doy).week},hn.firstDayOfYear=function(){return this._week.doy},hn.firstDayOfWeek=function(){return this._week.dow},hn.weekdays=function(t,e){return t?o(this._weekdays)?this._weekdays[t.day()]:this._weekdays[this._weekdays.isFormat.test(e)?"format":"standalone"][t.day()]:o(this._weekdays)?this._weekdays:this._weekdays.standalone},hn.weekdaysMin=function(t){return t?this._weekdaysMin[t.day()]:this._weekdaysMin},hn.weekdaysShort=function(t){return t?this._weekdaysShort[t.day()]:this._weekdaysShort},hn.weekdaysParse=function(t,e,n){var i,r,o;if(this._weekdaysParseExact)return(function(t,e,n){var i,r,o,a=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)o=h([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===e?-1!==(r=At.call(this._weekdaysParse,a))?r:null:"ddd"===e?-1!==(r=At.call(this._shortWeekdaysParse,a))?r:null:-1!==(r=At.call(this._minWeekdaysParse,a))?r:null:"dddd"===e?-1!==(r=At.call(this._weekdaysParse,a))?r:-1!==(r=At.call(this._shortWeekdaysParse,a))?r:-1!==(r=At.call(this._minWeekdaysParse,a))?r:null:"ddd"===e?-1!==(r=At.call(this._shortWeekdaysParse,a))?r:-1!==(r=At.call(this._weekdaysParse,a))?r:-1!==(r=At.call(this._minWeekdaysParse,a))?r:null:-1!==(r=At.call(this._minWeekdaysParse,a))?r:-1!==(r=At.call(this._weekdaysParse,a))?r:-1!==(r=At.call(this._shortWeekdaysParse,a))?r:null}).call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(r=h([2e3,1]).day(i),n&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(r,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(r,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(r,"").replace(".",".?")+"$","i")),this._weekdaysParse[i]||(o="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[i]=new RegExp(o.replace(".",""),"i")),n&&"dddd"===e&&this._fullWeekdaysParse[i].test(t))return i;if(n&&"ddd"===e&&this._shortWeekdaysParse[i].test(t))return i;if(n&&"dd"===e&&this._minWeekdaysParse[i].test(t))return i;if(!n&&this._weekdaysParse[i].test(t))return i}},hn.weekdaysRegex=function(t){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||Jt.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(f(this,"_weekdaysRegex")||(this._weekdaysRegex=Kt),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)},hn.weekdaysShortRegex=function(t){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||Jt.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(f(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Xt),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},hn.weekdaysMinRegex=function(t){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||Jt.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(f(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=$t),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},hn.isPM=function(t){return"p"===(t+"").toLowerCase().charAt(0)},hn.meridiem=function(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"},ue("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===k(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),r.lang=M("moment.lang is deprecated. Use moment.locale instead.",ue),r.langData=M("moment.langData is deprecated. Use moment.localeData instead.",fe);var vn=Math.abs;function mn(t,e,n,i){var r=Ve(e,n);return t._milliseconds+=i*r._milliseconds,t._days+=i*r._days,t._months+=i*r._months,t._bubble()}function bn(t){return t<0?Math.floor(t):Math.ceil(t)}function xn(t){return 4800*t/146097}function _n(t){return 146097*t/4800}function wn(t){return function(){return this.as(t)}}var kn=wn("ms"),On=wn("s"),Sn=wn("m"),Mn=wn("h"),An=wn("d"),Tn=wn("w"),Cn=wn("M"),Pn=wn("y");function En(t){return function(){return this.isValid()?this._data[t]:NaN}}var Nn=En("milliseconds"),Dn=En("seconds"),Ln=En("minutes"),jn=En("hours"),In=En("days"),Rn=En("months"),qn=En("years");var Fn=Math.round,Bn={ss:44,s:45,m:45,h:22,d:26,M:11};var Wn=Math.abs;function Yn(t){return(t>0)-(t<0)||+t}function Hn(){if(!this.isValid())return this.localeData().invalidDate();var t,e,n=Wn(this._milliseconds)/1e3,i=Wn(this._days),r=Wn(this._months);e=w((t=w(n/60))/60),n%=60,t%=60;var o=w(r/12),a=r%=12,s=i,l=e,u=t,c=n?n.toFixed(3).replace(/\.?0+$/,""):"",f=this.asSeconds();if(!f)return"P0D";var d=f<0?"-":"",h=Yn(this._months)!==Yn(f)?"-":"",p=Yn(this._days)!==Yn(f)?"-":"",y=Yn(this._milliseconds)!==Yn(f)?"-":"";return d+"P"+(o?h+o+"Y":"")+(a?h+a+"M":"")+(s?p+s+"D":"")+(l||u||c?"T":"")+(l?y+l+"H":"")+(u?y+u+"M":"")+(c?y+c+"S":"")}var zn=Le.prototype;return zn.isValid=function(){return this._isValid},zn.abs=function(){var t=this._data;return this._milliseconds=vn(this._milliseconds),this._days=vn(this._days),this._months=vn(this._months),t.milliseconds=vn(t.milliseconds),t.seconds=vn(t.seconds),t.minutes=vn(t.minutes),t.hours=vn(t.hours),t.months=vn(t.months),t.years=vn(t.years),this},zn.add=function(t,e){return mn(this,t,e,1)},zn.subtract=function(t,e){return mn(this,t,e,-1)},zn.as=function(t){if(!this.isValid())return NaN;var e,n,i=this._milliseconds;if("month"===(t=j(t))||"year"===t)return e=this._days+i/864e5,n=this._months+xn(e),"month"===t?n:n/12;switch(e=this._days+Math.round(_n(this._months)),t){case"week":return e/7+i/6048e5;case"day":return e+i/864e5;case"hour":return 24*e+i/36e5;case"minute":return 1440*e+i/6e4;case"second":return 86400*e+i/1e3;case"millisecond":return Math.floor(864e5*e)+i;default:throw new Error("Unknown unit "+t)}},zn.asMilliseconds=kn,zn.asSeconds=On,zn.asMinutes=Sn,zn.asHours=Mn,zn.asDays=An,zn.asWeeks=Tn,zn.asMonths=Cn,zn.asYears=Pn,zn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*k(this._months/12):NaN},zn._bubble=function(){var t,e,n,i,r,o=this._milliseconds,a=this._days,s=this._months,l=this._data;return o>=0&&a>=0&&s>=0||o<=0&&a<=0&&s<=0||(o+=864e5*bn(_n(s)+a),a=0,s=0),l.milliseconds=o%1e3,t=w(o/1e3),l.seconds=t%60,e=w(t/60),l.minutes=e%60,n=w(e/60),l.hours=n%24,s+=r=w(xn(a+=w(n/24))),a-=bn(_n(r)),i=w(s/12),s%=12,l.days=a,l.months=s,l.years=i,this},zn.clone=function(){return Ve(this)},zn.get=function(t){return t=j(t),this.isValid()?this[t+"s"]():NaN},zn.milliseconds=Nn,zn.seconds=Dn,zn.minutes=Ln,zn.hours=jn,zn.days=In,zn.weeks=function(){return w(this.days()/7)},zn.months=Rn,zn.years=qn,zn.humanize=function(t){if(!this.isValid())return this.localeData().invalidDate();var e,n,i,r,o,a,s,l,u,c,f,d=this.localeData(),h=(n=!t,i=d,r=Ve(e=this).abs(),o=Fn(r.as("s")),a=Fn(r.as("m")),s=Fn(r.as("h")),l=Fn(r.as("d")),u=Fn(r.as("M")),c=Fn(r.as("y")),(f=o<=Bn.ss&&["s",o]||o0,f[4]=i,(function(t,e,n,i,r){return r.relativeTime(e||1,!!n,t,i)}).apply(null,f));return t&&(h=d.pastFuture(+this,h)),d.postformat(h)},zn.toISOString=Hn,zn.toString=Hn,zn.toJSON=Hn,zn.locale=Qe,zn.localeData=en,zn.toIsoString=M("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Hn),zn.lang=tn,z("X",0,0,"unix"),z("x",0,0,"valueOf"),ct("x",ot),ct("X",/[+-]?\d+(\.\d{1,3})?/),pt("X",function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))}),pt("x",function(t,e,n){n._d=new Date(k(t))}),r.version="2.20.1",n=Ce,r.fn=fn,r.min=function(){return Ne("isBefore",[].slice.call(arguments,0))},r.max=function(){return Ne("isAfter",[].slice.call(arguments,0))},r.now=function(){return Date.now?Date.now():+new Date},r.utc=h,r.unix=function(t){return Ce(1e3*t)},r.months=function(t,e){return yn(t,e,"months")},r.isDate=u,r.locale=ue,r.invalid=g,r.duration=Ve,r.isMoment=_,r.weekdays=function(t,e,n){return gn(t,e,n,"weekdays")},r.parseZone=function(){return Ce.apply(null,arguments).parseZone()},r.localeData=fe,r.isDuration=je,r.monthsShort=function(t,e){return yn(t,e,"monthsShort")},r.weekdaysMin=function(t,e,n){return gn(t,e,n,"weekdaysMin")},r.defineLocale=ce,r.updateLocale=function(t,e){if(null!=e){var n,i,r=re;null!=(i=le(t))&&(r=i._config),(n=new N(e=E(r,e))).parentLocale=oe[t],oe[t]=n,ue(t)}else null!=oe[t]&&(null!=oe[t].parentLocale?oe[t]=oe[t].parentLocale:null!=oe[t]&&delete oe[t]);return oe[t]},r.locales=function(){return A(oe)},r.weekdaysShort=function(t,e,n){return gn(t,e,n,"weekdaysShort")},r.normalizeUnits=j,r.relativeTimeRounding=function(t){return void 0===t?Fn:"function"==typeof t&&(Fn=t,!0)},r.relativeTimeThreshold=function(t,e){return void 0!==Bn[t]&&(void 0===e?Bn[t]:(Bn[t]=e,"s"===t&&(Bn.ss=e-1),!0))},r.calendarFormat=function(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},r.prototype=fn,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"YYYY-[W]WW",MONTH:"YYYY-MM"},r},"object"==typeof n&&"undefined"!=typeof e?e.exports=r():i.moment=r()},{}],7:[function(t,e,n){var i=t(29)();i.helpers=t(45),t(27)(i),i.defaults=t(25),i.Element=t(26),i.elements=t(40),i.Interaction=t(28),i.layouts=t(30),i.platform=t(48),i.plugins=t(31),i.Ticks=t(34),t(22)(i),t(23)(i),t(24)(i),t(33)(i),t(32)(i),t(35)(i),t(55)(i),t(53)(i),t(54)(i),t(56)(i),t(57)(i),t(58)(i),t(15)(i),t(16)(i),t(17)(i),t(18)(i),t(19)(i),t(20)(i),t(21)(i),t(8)(i),t(9)(i),t(10)(i),t(11)(i),t(12)(i),t(13)(i),t(14)(i);var r=t(49);for(var o in r)r.hasOwnProperty(o)&&i.plugins.register(r[o]);i.platform.initialize(),e.exports=i,"undefined"!=typeof window&&(window.Chart=i),i.Legend=r.legend._element,i.Title=r.title._element,i.pluginService=i.plugins,i.PluginBase=i.Element.extend({}),i.canvasHelpers=i.helpers.canvas,i.layoutService=i.layouts},{10:10,11:11,12:12,13:13,14:14,15:15,16:16,17:17,18:18,19:19,20:20,21:21,22:22,23:23,24:24,25:25,26:26,27:27,28:28,29:29,30:30,31:31,32:32,33:33,34:34,35:35,40:40,45:45,48:48,49:49,53:53,54:54,55:55,56:56,57:57,58:58,8:8,9:9}],8:[function(t,e,n){"use strict";e.exports=function(t){t.Bar=function(e,n){return n.type="bar",new t(e,n)}}},{}],9:[function(t,e,n){"use strict";e.exports=function(t){t.Bubble=function(e,n){return n.type="bubble",new t(e,n)}}},{}],10:[function(t,e,n){"use strict";e.exports=function(t){t.Doughnut=function(e,n){return n.type="doughnut",new t(e,n)}}},{}],11:[function(t,e,n){"use strict";e.exports=function(t){t.Line=function(e,n){return n.type="line",new t(e,n)}}},{}],12:[function(t,e,n){"use strict";e.exports=function(t){t.PolarArea=function(e,n){return n.type="polarArea",new t(e,n)}}},{}],13:[function(t,e,n){"use strict";e.exports=function(t){t.Radar=function(e,n){return n.type="radar",new t(e,n)}}},{}],14:[function(t,e,n){"use strict";e.exports=function(t){t.Scatter=function(e,n){return n.type="scatter",new t(e,n)}}},{}],15:[function(t,e,n){"use strict";var i=t(25),r=t(40),o=t(45);i._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",categoryPercentage:.8,barPercentage:.9,offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),i._set("horizontalBar",{hover:{mode:"index",axis:"y"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{position:"left",type:"category",categoryPercentage:.8,barPercentage:.9,offset:!0,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{callbacks:{title:function(t,e){var n="";return t.length>0&&(t[0].yLabel?n=t[0].yLabel:e.labels.length>0&&t[0].index0?Math.min(a,i-n):a,n=i;return a}(n,u):-1,pixels:u,start:s,end:l,stackCount:i,scale:n}},calculateBarValuePixels:function(t,e){var n,i,r,o,a,s,l=this.chart,u=this.getMeta(),c=this.getValueScale(),f=l.data.datasets,d=c.getRightValue(f[t].data[e]),h=c.options.stacked,p=u.stack,y=0;if(h||void 0===h&&void 0!==p)for(n=0;n=0&&r>0)&&(y+=r));return o=c.getPixelForValue(y),{size:s=((a=c.getPixelForValue(y+d))-o)/2,base:o,head:a,center:a+s/2}},calculateBarIndexPixels:function(t,e,n){var i,r,a,s,l,u,c,f,d,h,p,y,g,v,m,b,x,_=n.scale.options,w="flex"===_.barThickness?(d=e,p=_,g=(h=n).pixels,v=g[d],m=d>0?g[d-1]:null,b=d');var n=t.data,i=n.datasets,r=n.labels;if(i.length)for(var o=0;o'),r[o]&&e.push(r[o]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map(function(n,i){var r=t.getDatasetMeta(0),a=e.datasets[0],s=r.data[i],l=s&&s.custom||{},u=o.valueAtIndexOrDefault,c=t.options.elements.arc;return{text:n,fillStyle:l.backgroundColor?l.backgroundColor:u(a.backgroundColor,i,c.backgroundColor),strokeStyle:l.borderColor?l.borderColor:u(a.borderColor,i,c.borderColor),lineWidth:l.borderWidth?l.borderWidth:u(a.borderWidth,i,c.borderWidth),hidden:isNaN(a.data[i])||r.data[i].hidden,index:i}}):[]}},onClick:function(t,e){var n,i,r,o=e.index,a=this.chart;for(n=0,i=(a.data.datasets||[]).length;n=Math.PI?-1:p<-Math.PI?1:0))+h,g={x:Math.cos(p),y:Math.sin(p)},v={x:Math.cos(y),y:Math.sin(y)},m=p<=0&&y>=0||p<=2*Math.PI&&2*Math.PI<=y,b=p<=.5*Math.PI&&.5*Math.PI<=y||p<=2.5*Math.PI&&2.5*Math.PI<=y,x=p<=-Math.PI&&-Math.PI<=y||p<=Math.PI&&Math.PI<=y,_=p<=.5*-Math.PI&&.5*-Math.PI<=y||p<=1.5*Math.PI&&1.5*Math.PI<=y,w=d/100,k={x:x?-1:Math.min(g.x*(g.x<0?1:w),v.x*(v.x<0?1:w)),y:_?-1:Math.min(g.y*(g.y<0?1:w),v.y*(v.y<0?1:w))},O={x:m?1:Math.max(g.x*(g.x>0?1:w),v.x*(v.x>0?1:w)),y:b?1:Math.max(g.y*(g.y>0?1:w),v.y*(v.y>0?1:w))},S={width:.5*(O.x-k.x),height:.5*(O.y-k.y)};u=Math.min(s/S.width,l/S.height),c={x:-.5*(O.x+k.x),y:-.5*(O.y+k.y)}}n.borderWidth=e.getMaxBorderWidth(f.data),n.outerRadius=Math.max((u-n.borderWidth)/2,0),n.innerRadius=Math.max(d?n.outerRadius/100*d:0,0),n.radiusLength=(n.outerRadius-n.innerRadius)/n.getVisibleDatasetCount(),n.offsetX=c.x*n.outerRadius,n.offsetY=c.y*n.outerRadius,f.total=e.calculateTotal(),e.outerRadius=n.outerRadius-n.radiusLength*e.getRingIndex(e.index),e.innerRadius=Math.max(e.outerRadius-n.radiusLength,0),o.each(f.data,function(n,i){e.updateElement(n,i,t)})},updateElement:function(t,e,n){var i=this.chart,r=i.chartArea,a=i.options,s=a.animation,l=(r.left+r.right)/2,u=(r.top+r.bottom)/2,c=a.rotation,f=a.rotation,d=this.getDataset(),h=n&&s.animateRotate?0:t.hidden?0:this.calculateCircumference(d.data[e])*(a.circumference/(2*Math.PI)),p=n&&s.animateScale?0:this.innerRadius,y=n&&s.animateScale?0:this.outerRadius,g=o.valueAtIndexOrDefault;o.extend(t,{_datasetIndex:this.index,_index:e,_model:{x:l+i.offsetX,y:u+i.offsetY,startAngle:c,endAngle:f,circumference:h,outerRadius:y,innerRadius:p,label:g(d.label,e,i.data.labels[e])}});var v=t._model;this.removeHoverStyle(t),n&&s.animateRotate||(v.startAngle=0===e?a.rotation:this.getMeta().data[e-1]._model.endAngle,v.endAngle=v.startAngle+v.circumference),t.pivot()},removeHoverStyle:function(e){t.DatasetController.prototype.removeHoverStyle.call(this,e,this.chart.options.elements.arc)},calculateTotal:function(){var t,e=this.getDataset(),n=this.getMeta(),i=0;return o.each(n.data,function(n,r){t=e.data[r],isNaN(t)||n.hidden||(i+=Math.abs(t))}),i},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?2*Math.PI*(Math.abs(t)/e):0},getMaxBorderWidth:function(t){for(var e,n,i=0,r=this.index,o=t.length,a=0;a(i=e>i?e:i)?n:i;return i}})}},{25:25,40:40,45:45}],18:[function(t,e,n){"use strict";var i=t(25),r=t(40),o=t(45);i._set("line",{showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}}),e.exports=function(t){function e(t,e){return o.valueOrDefault(t.showLine,e.showLines)}t.controllers.line=t.DatasetController.extend({datasetElementType:r.Line,dataElementType:r.Point,update:function(t){var n,i,r,a=this.getMeta(),s=a.dataset,l=a.data||[],u=this.chart.options,c=u.elements.line,f=this.getScaleForId(a.yAxisID),d=this.getDataset(),h=e(d,u);for(h&&(r=s.custom||{},void 0!==d.tension&&void 0===d.lineTension&&(d.lineTension=d.tension),s._scale=f,s._datasetIndex=this.index,s._children=l,s._model={spanGaps:d.spanGaps?d.spanGaps:u.spanGaps,tension:r.tension?r.tension:o.valueOrDefault(d.lineTension,c.tension),backgroundColor:r.backgroundColor?r.backgroundColor:d.backgroundColor||c.backgroundColor,borderWidth:r.borderWidth?r.borderWidth:d.borderWidth||c.borderWidth,borderColor:r.borderColor?r.borderColor:d.borderColor||c.borderColor,borderCapStyle:r.borderCapStyle?r.borderCapStyle:d.borderCapStyle||c.borderCapStyle,borderDash:r.borderDash?r.borderDash:d.borderDash||c.borderDash,borderDashOffset:r.borderDashOffset?r.borderDashOffset:d.borderDashOffset||c.borderDashOffset,borderJoinStyle:r.borderJoinStyle?r.borderJoinStyle:d.borderJoinStyle||c.borderJoinStyle,fill:r.fill?r.fill:void 0!==d.fill?d.fill:c.fill,steppedLine:r.steppedLine?r.steppedLine:o.valueOrDefault(d.steppedLine,c.stepped),cubicInterpolationMode:r.cubicInterpolationMode?r.cubicInterpolationMode:o.valueOrDefault(d.cubicInterpolationMode,c.cubicInterpolationMode)},s.pivot()),n=0,i=l.length;n');var n=t.data,i=n.datasets,r=n.labels;if(i.length)for(var o=0;o'),r[o]&&e.push(r[o]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map(function(n,i){var r=t.getDatasetMeta(0),a=e.datasets[0],s=r.data[i].custom||{},l=o.valueAtIndexOrDefault,u=t.options.elements.arc;return{text:n,fillStyle:s.backgroundColor?s.backgroundColor:l(a.backgroundColor,i,u.backgroundColor),strokeStyle:s.borderColor?s.borderColor:l(a.borderColor,i,u.borderColor),lineWidth:s.borderWidth?s.borderWidth:l(a.borderWidth,i,u.borderWidth),hidden:isNaN(a.data[i])||r.data[i].hidden,index:i}}):[]}},onClick:function(t,e){var n,i,r,o=e.index,a=this.chart;for(n=0,i=(a.data.datasets||[]).length;n0&&!isNaN(t)?2*Math.PI/e:0}})}},{25:25,40:40,45:45}],20:[function(t,e,n){"use strict";var i=t(25),r=t(40),o=t(45);i._set("radar",{scale:{type:"radialLinear"},elements:{line:{tension:0}}}),e.exports=function(t){t.controllers.radar=t.DatasetController.extend({datasetElementType:r.Line,dataElementType:r.Point,linkScales:o.noop,update:function(t){var e=this,n=e.getMeta(),i=n.dataset,r=n.data,a=i.custom||{},s=e.getDataset(),l=e.chart.options.elements.line,u=e.chart.scale;void 0!==s.tension&&void 0===s.lineTension&&(s.lineTension=s.tension),o.extend(n.dataset,{_datasetIndex:e.index,_scale:u,_children:r,_loop:!0,_model:{tension:a.tension?a.tension:o.valueOrDefault(s.lineTension,l.tension),backgroundColor:a.backgroundColor?a.backgroundColor:s.backgroundColor||l.backgroundColor,borderWidth:a.borderWidth?a.borderWidth:s.borderWidth||l.borderWidth,borderColor:a.borderColor?a.borderColor:s.borderColor||l.borderColor,fill:a.fill?a.fill:void 0!==s.fill?s.fill:l.fill,borderCapStyle:a.borderCapStyle?a.borderCapStyle:s.borderCapStyle||l.borderCapStyle,borderDash:a.borderDash?a.borderDash:s.borderDash||l.borderDash,borderDashOffset:a.borderDashOffset?a.borderDashOffset:s.borderDashOffset||l.borderDashOffset,borderJoinStyle:a.borderJoinStyle?a.borderJoinStyle:s.borderJoinStyle||l.borderJoinStyle}}),n.dataset.pivot(),o.each(r,function(n,i){e.updateElement(n,i,t)},e),e.updateBezierControlPoints()},updateElement:function(t,e,n){var i=t.custom||{},r=this.getDataset(),a=this.chart.scale,s=this.chart.options.elements.point,l=a.getPointPositionForValue(e,r.data[e]);void 0!==r.radius&&void 0===r.pointRadius&&(r.pointRadius=r.radius),void 0!==r.hitRadius&&void 0===r.pointHitRadius&&(r.pointHitRadius=r.hitRadius),o.extend(t,{_datasetIndex:this.index,_index:e,_scale:a,_model:{x:n?a.xCenter:l.x,y:n?a.yCenter:l.y,tension:i.tension?i.tension:o.valueOrDefault(r.lineTension,this.chart.options.elements.line.tension),radius:i.radius?i.radius:o.valueAtIndexOrDefault(r.pointRadius,e,s.radius),backgroundColor:i.backgroundColor?i.backgroundColor:o.valueAtIndexOrDefault(r.pointBackgroundColor,e,s.backgroundColor),borderColor:i.borderColor?i.borderColor:o.valueAtIndexOrDefault(r.pointBorderColor,e,s.borderColor),borderWidth:i.borderWidth?i.borderWidth:o.valueAtIndexOrDefault(r.pointBorderWidth,e,s.borderWidth),pointStyle:i.pointStyle?i.pointStyle:o.valueAtIndexOrDefault(r.pointStyle,e,s.pointStyle),hitRadius:i.hitRadius?i.hitRadius:o.valueAtIndexOrDefault(r.pointHitRadius,e,s.hitRadius)}}),t._model.skip=i.skip?i.skip:isNaN(t._model.x)||isNaN(t._model.y)},updateBezierControlPoints:function(){var t=this.chart.chartArea,e=this.getMeta();o.each(e.data,function(n,i){var r=n._model,a=o.splineCurve(o.previousItem(e.data,i,!0)._model,r,o.nextItem(e.data,i,!0)._model,r.tension);r.controlPointPreviousX=Math.max(Math.min(a.previous.x,t.right),t.left),r.controlPointPreviousY=Math.max(Math.min(a.previous.y,t.bottom),t.top),r.controlPointNextX=Math.max(Math.min(a.next.x,t.right),t.left),r.controlPointNextY=Math.max(Math.min(a.next.y,t.bottom),t.top),n.pivot()})},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},i=t._index,r=t._model;r.radius=n.hoverRadius?n.hoverRadius:o.valueAtIndexOrDefault(e.pointHoverRadius,i,this.chart.options.elements.point.hoverRadius),r.backgroundColor=n.hoverBackgroundColor?n.hoverBackgroundColor:o.valueAtIndexOrDefault(e.pointHoverBackgroundColor,i,o.getHoverColor(r.backgroundColor)),r.borderColor=n.hoverBorderColor?n.hoverBorderColor:o.valueAtIndexOrDefault(e.pointHoverBorderColor,i,o.getHoverColor(r.borderColor)),r.borderWidth=n.hoverBorderWidth?n.hoverBorderWidth:o.valueAtIndexOrDefault(e.pointHoverBorderWidth,i,r.borderWidth)},removeHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},i=t._index,r=t._model,a=this.chart.options.elements.point;r.radius=n.radius?n.radius:o.valueAtIndexOrDefault(e.pointRadius,i,a.radius),r.backgroundColor=n.backgroundColor?n.backgroundColor:o.valueAtIndexOrDefault(e.pointBackgroundColor,i,a.backgroundColor),r.borderColor=n.borderColor?n.borderColor:o.valueAtIndexOrDefault(e.pointBorderColor,i,a.borderColor),r.borderWidth=n.borderWidth?n.borderWidth:o.valueAtIndexOrDefault(e.pointBorderWidth,i,a.borderWidth)}})}},{25:25,40:40,45:45}],21:[function(t,e,n){"use strict";t(25)._set("scatter",{hover:{mode:"single"},scales:{xAxes:[{id:"x-axis-1",type:"linear",position:"bottom"}],yAxes:[{id:"y-axis-1",type:"linear",position:"left"}]},showLines:!1,tooltips:{callbacks:{title:function(){return""},label:function(t){return"("+t.xLabel+", "+t.yLabel+")"}}}}),e.exports=function(t){t.controllers.scatter=t.controllers.line}},{25:25}],22:[function(t,e,n){"use strict";var i=t(25),r=t(26),o=t(45);i._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:o.noop,onComplete:o.noop}}),e.exports=function(t){t.Animation=r.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),t.animationService={frameDuration:17,animations:[],dropFrames:0,request:null,addAnimation:function(t,e,n,i){var r,o,a=this.animations;for(e.chart=t,i||(t.animating=!0),r=0,o=a.length;r1&&(e=Math.floor(this.dropFrames),this.dropFrames=this.dropFrames%1),this.advance(1+e);var n=Date.now();this.dropFrames+=(n-t)/this.frameDuration,this.animations.length>0&&this.requestAnimationFrame()},advance:function(t){for(var e,n,i=this.animations,r=0;r=e.numSteps?(o.callback(e.onAnimationComplete,[e],n),n.animating=!1,i.splice(r,1)):++r}},Object.defineProperty(t.Animation.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(t.Animation.prototype,"chartInstance",{get:function(){return this.chart},set:function(t){this.chart=t}})}},{25:25,26:26,45:45}],23:[function(t,e,n){"use strict";var i=t(25),r=t(45),o=t(28),a=t(30),s=t(48),l=t(31);e.exports=function(t){function e(t){return"top"===t||"bottom"===t}t.types={},t.instances={},t.controllers={},r.extend(t.prototype,{construct:function(e,n){var o,a,l=this;(a=(o=(o=n)||{}).data=o.data||{}).datasets=a.datasets||[],a.labels=a.labels||[],o.options=r.configMerge(i.global,i[o.type],o.options||{}),n=o;var u=s.acquireContext(e,n),c=u&&u.canvas,f=c&&c.height,d=c&&c.width;l.id=r.uid(),l.ctx=u,l.canvas=c,l.config=n,l.width=d,l.height=f,l.aspectRatio=f?d/f:null,l.options=n.options,l._bufferedRender=!1,l.chart=l,l.controller=l,t.instances[l.id]=l,Object.defineProperty(l,"data",{get:function(){return l.config.data},set:function(t){l.config.data=t}}),u&&c?(l.initialize(),l.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return l.notify(t,"beforeInit"),r.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.initToolTip(),l.notify(t,"afterInit"),t},clear:function(){return r.canvas.clear(this),this},stop:function(){return t.animationService.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,i=e.canvas,o=n.maintainAspectRatio&&e.aspectRatio||null,a=Math.max(0,Math.floor(r.getMaximumWidth(i))),s=Math.max(0,Math.floor(o?a/o:r.getMaximumHeight(i)));if((e.width!==a||e.height!==s)&&(i.width=e.width=a,i.height=e.height=s,i.style.width=a+"px",i.style.height=s+"px",r.retinaScale(e,n.devicePixelRatio),!t)){var u={width:a,height:s};l.notify(e,"resize",[u]),e.options.onResize&&e.options.onResize(e,u),e.stop(),e.update(e.options.responsiveAnimationDuration)}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},n=t.scale;r.each(e.xAxes,function(t,e){t.id=t.id||"x-axis-"+e}),r.each(e.yAxes,function(t,e){t.id=t.id||"y-axis-"+e}),n&&(n.id=n.id||"scale")},buildOrUpdateScales:function(){var n=this,i=n.options,o=n.scales||{},a=[],s=Object.keys(o).reduce(function(t,e){return t[e]=!1,t},{});i.scales&&(a=a.concat((i.scales.xAxes||[]).map(function(t){return{options:t,dtype:"category",dposition:"bottom"}}),(i.scales.yAxes||[]).map(function(t){return{options:t,dtype:"linear",dposition:"left"}}))),i.scale&&a.push({options:i.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),r.each(a,function(i){var a=i.options,l=a.id,u=r.valueOrDefault(a.type,i.dtype);e(a.position)!==e(i.dposition)&&(a.position=i.dposition),s[l]=!0;var c=null;if(l in o&&o[l].type===u)(c=o[l]).options=a,c.ctx=n.ctx,c.chart=n;else{var f=t.scaleService.getScaleConstructor(u);if(!f)return;c=new f({id:l,type:u,options:a,ctx:n.ctx,chart:n}),o[c.id]=c}c.mergeTicksOptions(),i.isDefault&&(n.scale=c)}),r.each(s,function(t,e){t||delete o[e]}),n.scales=o,t.scaleService.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e=this,n=[],i=[];return r.each(e.data.datasets,function(r,o){var a=e.getDatasetMeta(o),s=r.type||e.config.type;if(a.type&&a.type!==s&&(e.destroyDatasetMeta(o),a=e.getDatasetMeta(o)),a.type=s,n.push(a.type),a.controller)a.controller.updateIndex(o),a.controller.linkScales();else{var l=t.controllers[a.type];if(void 0===l)throw new Error('"'+a.type+'" is not a chart type.');a.controller=new l(e,o),i.push(a.controller)}},e),i},resetElements:function(){var t=this;r.each(t.data.datasets,function(e,n){t.getDatasetMeta(n).controller.reset()},t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(e){var n,i,o=this;if(e&&"object"==typeof e||(e={duration:e,lazy:arguments[1]}),i=(n=o).options,r.each(n.scales,function(t){a.removeBox(n,t)}),i=r.configMerge(t.defaults.global,t.defaults[n.config.type],i),n.options=n.config.options=i,n.ensureScalesHaveIDs(),n.buildOrUpdateScales(),n.tooltip._options=i.tooltips,n.tooltip.initialize(),l._invalidate(o),!1!==l.notify(o,"beforeUpdate")){o.tooltip._data=o.data;var s=o.buildOrUpdateControllers();r.each(o.data.datasets,function(t,e){o.getDatasetMeta(e).controller.buildOrUpdateElements()},o),o.updateLayout(),o.options.animation&&o.options.animation.duration&&r.each(s,function(t){t.reset()}),o.updateDatasets(),o.tooltip.initialize(),o.lastActive=[],l.notify(o,"afterUpdate"),o._bufferedRender?o._bufferedRequest={duration:e.duration,easing:e.easing,lazy:e.lazy}:o.render(e)}},updateLayout:function(){!1!==l.notify(this,"beforeLayout")&&(a.update(this,this.width,this.height),l.notify(this,"afterScaleUpdate"),l.notify(this,"afterLayout"))},updateDatasets:function(){if(!1!==l.notify(this,"beforeDatasetsUpdate")){for(var t=0,e=this.data.datasets.length;t=0;--e)this.isDatasetVisible(e)&&this.drawDataset(e,t);l.notify(this,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var n=this.getDatasetMeta(t),i={meta:n,index:t,easingValue:e};!1!==l.notify(this,"beforeDatasetDraw",[i])&&(n.controller.draw(e),l.notify(this,"afterDatasetDraw",[i]))},_drawTooltip:function(t){var e=this.tooltip,n={tooltip:e,easingValue:t};!1!==l.notify(this,"beforeTooltipDraw",[n])&&(e.draw(),l.notify(this,"afterTooltipDraw",[n]))},getElementAtEvent:function(t){return o.modes.single(this,t)},getElementsAtEvent:function(t){return o.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return o.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var i=o.modes[e];return"function"==typeof i?i(this,t,n):[]},getDatasetAtEvent:function(t){return o.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this.data.datasets[t];e._meta||(e._meta={});var n=e._meta[this.id];return n||(n=e._meta[this.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),n},getVisibleDatasetCount:function(){for(var t=0,e=0,n=this.data.datasets.length;e0||(e.forEach(function(e){delete t[e]}),delete t._chartjs)}}t.DatasetController=function(t,e){this.initialize(t,e)},i.extend(t.DatasetController.prototype,{datasetElementType:null,dataElementType:null,initialize:function(t,e){this.chart=t,this.index=e,this.linkScales(),this.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){var t=this.getMeta(),e=this.getDataset();null!==t.xAxisID&&t.xAxisID in this.chart.scales||(t.xAxisID=e.xAxisID||this.chart.options.scales.xAxes[0].id),null!==t.yAxisID&&t.yAxisID in this.chart.scales||(t.yAxisID=e.yAxisID||this.chart.options.scales.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},reset:function(){this.update(!0)},destroy:function(){this._data&&n(this._data,this)},createMetaDataset:function(){var t=this.datasetElementType;return t&&new t({_chart:this.chart,_datasetIndex:this.index})},createMetaData:function(t){var e=this.dataElementType;return e&&new e({_chart:this.chart,_datasetIndex:this.index,_index:t})},addElements:function(){var t,e,n=this.getMeta(),i=this.getDataset().data||[],r=n.data;for(t=0,e=i.length;tn&&this.insertElements(n,i-n)},insertElements:function(t,e){for(var n=0;n=n[e].length&&n[e].push({}),!n[e][a].type||l.type&&l.type!==n[e][a].type?o.merge(n[e][a],[t.scaleService.getScaleDefaults(s),l]):o.merge(n[e][a],l)}else o._merger(e,n,i,r)}})},o.where=function(t,e){if(o.isArray(t)&&Array.prototype.filter)return t.filter(e);var n=[];return o.each(t,function(t){e(t)&&n.push(t)}),n},o.findIndex=Array.prototype.findIndex?function(t,e,n){return t.findIndex(e,n)}:function(t,e,n){n=void 0===n?t:n;for(var i=0,r=t.length;i=0;i--){var r=t[i];if(e(r))return r}},o.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},o.almostEquals=function(t,e,n){return Math.abs(t-e)t},o.max=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.max(t,e)},Number.NEGATIVE_INFINITY)},o.min=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.min(t,e)},Number.POSITIVE_INFINITY)},o.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0===(t=+t)||isNaN(t)?t:t>0?1:-1},o.log10=Math.log10?function(t){return Math.log10(t)}:function(t){var e=Math.log(t)*Math.LOG10E,n=Math.round(e);return t===Math.pow(10,n)?n:e},o.toRadians=function(t){return t*(Math.PI/180)},o.toDegrees=function(t){return t*(180/Math.PI)},o.getAngleFromPoint=function(t,e){var n=e.x-t.x,i=e.y-t.y,r=Math.sqrt(n*n+i*i),o=Math.atan2(i,n);return o<-.5*Math.PI&&(o+=2*Math.PI),{angle:o,distance:r}},o.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},o.aliasPixel=function(t){return t%2==0?0:.5},o.splineCurve=function(t,e,n,i){var r=t.skip?e:t,o=e,a=n.skip?e:n,s=Math.sqrt(Math.pow(o.x-r.x,2)+Math.pow(o.y-r.y,2)),l=Math.sqrt(Math.pow(a.x-o.x,2)+Math.pow(a.y-o.y,2)),u=s/(s+l),c=l/(s+l),f=i*(u=isNaN(u)?0:u),d=i*(c=isNaN(c)?0:c);return{previous:{x:o.x-f*(a.x-r.x),y:o.y-f*(a.y-r.y)},next:{x:o.x+d*(a.x-r.x),y:o.y+d*(a.y-r.y)}}},o.EPSILON=Number.EPSILON||1e-14,o.splineCurveMonotone=function(t){var e,n,i,r,a,s,l,u,c,f=(t||[]).map(function(t){return{model:t._model,deltaK:0,mK:0}}),d=f.length;for(e=0;e0?f[e-1]:null,(r=e0?f[e-1]:null,r=e=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},o.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},o.niceNum=function(t,e){var n=Math.floor(o.log10(t)),i=t/Math.pow(10,n);return(e?i<1.5?1:i<3?2:i<7?5:10:i<=1?1:i<=2?2:i<=5?5:10)*Math.pow(10,n)},o.requestAnimFrame="undefined"==typeof window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},o.getRelativePosition=function(t,e){var n,i,r=t.originalEvent||t,a=t.currentTarget||t.srcElement,s=a.getBoundingClientRect(),l=r.touches;l&&l.length>0?(n=l[0].clientX,i=l[0].clientY):(n=r.clientX,i=r.clientY);var u=parseFloat(o.getStyle(a,"padding-left")),c=parseFloat(o.getStyle(a,"padding-top")),f=parseFloat(o.getStyle(a,"padding-right")),d=parseFloat(o.getStyle(a,"padding-bottom")),h=s.right-s.left-u-f,p=s.bottom-s.top-c-d;return{x:n=Math.round((n-s.left-u)/h*a.width/e.currentDevicePixelRatio),y:i=Math.round((i-s.top-c)/p*a.height/e.currentDevicePixelRatio)}},o.getConstraintWidth=function(t){return a(t,"max-width","clientWidth")},o.getConstraintHeight=function(t){return a(t,"max-height","clientHeight")},o.getMaximumWidth=function(t){var e=t.parentNode;if(!e)return t.clientWidth;var n=parseInt(o.getStyle(e,"padding-left"),10),i=parseInt(o.getStyle(e,"padding-right"),10),r=e.clientWidth-n-i,a=o.getConstraintWidth(t);return isNaN(a)?r:Math.min(r,a)},o.getMaximumHeight=function(t){var e=t.parentNode;if(!e)return t.clientHeight;var n=parseInt(o.getStyle(e,"padding-top"),10),i=parseInt(o.getStyle(e,"padding-bottom"),10),r=e.clientHeight-n-i,a=o.getConstraintHeight(t);return isNaN(a)?r:Math.min(r,a)},o.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},o.retinaScale=function(t,e){var n=t.currentDevicePixelRatio=e||window.devicePixelRatio||1;if(1!==n){var i=t.canvas,r=t.height,o=t.width;i.height=r*n,i.width=o*n,t.ctx.scale(n,n),i.style.height||i.style.width||(i.style.height=r+"px",i.style.width=o+"px")}},o.fontString=function(t,e,n){return e+" "+t+"px "+n},o.longestText=function(t,e,n,i){var r=(i=i||{}).data=i.data||{},a=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(r=i.data={},a=i.garbageCollect=[],i.font=e),t.font=e;var s=0;o.each(n,function(e){void 0!==e&&null!==e&&!0!==o.isArray(e)?s=o.measureText(t,r,a,s,e):o.isArray(e)&&o.each(e,function(e){void 0===e||null===e||o.isArray(e)||(s=o.measureText(t,r,a,s,e))})});var l=a.length/2;if(l>n.length){for(var u=0;ui&&(i=o),i},o.numberOfLabelLines=function(t){var e=1;return o.each(t,function(t){o.isArray(t)&&t.length>e&&(e=t.length)}),e},o.color=i?function(t){return t instanceof CanvasGradient&&(t=r.global.defaultColor),i(t)}:function(t){return console.error("Color.js not found!"),t},o.getHoverColor=function(t){return t instanceof CanvasPattern?t:o.color(t).saturate(.5).darken(.1).rgbString()}}},{2:2,25:25,45:45}],28:[function(t,e,n){"use strict";var i=t(45);function r(t,e){return t.native?{x:t.x,y:t.y}:i.getRelativePosition(t,e)}function o(t,e){var n,i,r,o,a;for(i=0,o=t.data.datasets.length;i0&&(u=t.getDatasetMeta(u[0]._datasetIndex).data),u},"x-axis":function(t,e){return u(t,e,{intersect:!1})},point:function(t,e){return a(t,r(e,t))},nearest:function(t,e,n){var i=r(e,t);n.axis=n.axis||"xy";var o=l(n.axis),a=s(t,i,n.intersect,o);return a.length>1&&a.sort(function(t,e){var n=t.getArea()-e.getArea();return 0===n&&(n=t._datasetIndex-e._datasetIndex),n}),a.slice(0,1)},x:function(t,e,n){var i=r(e,t),a=[],s=!1;return o(t,function(t){t.inXRange(i.x)&&a.push(t),t.inRange(i.x,i.y)&&(s=!0)}),n.intersect&&!s&&(a=[]),a},y:function(t,e,n){var i=r(e,t),a=[],s=!1;return o(t,function(t){t.inYRange(i.y)&&a.push(t),t.inRange(i.x,i.y)&&(s=!0)}),n.intersect&&!s&&(a=[]),a}}}},{45:45}],29:[function(t,e,n){"use strict";t(25)._set("global",{responsive:!0,responsiveAnimationDuration:0,maintainAspectRatio:!0,events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",showLines:!0,elements:{},layout:{padding:{top:0,right:0,bottom:0,left:0}}}),e.exports=function(){var t=function(t,e){return this.construct(t,e),this};return t.Chart=t,t}},{25:25}],30:[function(t,e,n){"use strict";var i=t(45);function r(t,e){return i.where(t,function(t){return t.position===e})}function o(t,e){t.forEach(function(t,e){return t._tmpIndex_=e,t}),t.sort(function(t,n){var i=e?n:t,r=e?t:n;return i.weight===r.weight?i._tmpIndex_-r._tmpIndex_:i.weight-r.weight}),t.forEach(function(t){delete t._tmpIndex_})}e.exports={defaults:{},addBox:function(t,e){t.boxes||(t.boxes=[]),e.fullWidth=e.fullWidth||!1,e.position=e.position||"top",e.weight=e.weight||0,t.boxes.push(e)},removeBox:function(t,e){var n=t.boxes?t.boxes.indexOf(e):-1;-1!==n&&t.boxes.splice(n,1)},configure:function(t,e,n){for(var i,r=["fullWidth","position","weight"],o=r.length,a=0;ad&&lt.maxHeight){l--;break}l++,f=u*c}t.labelRotation=l},afterCalculateTickRotation:function(){o.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){o.callback(this.options.beforeFit,[this])},fit:function(){var t=this,i=t.minSize={width:0,height:0},r=s(t._ticks),l=t.options,u=l.ticks,c=l.scaleLabel,f=l.gridLines,d=l.display,h=t.isHorizontal(),p=n(u),y=l.gridLines.tickMarkLength;if(i.width=h?t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:d&&f.drawTicks?y:0,i.height=h?d&&f.drawTicks?y:0:t.maxHeight,c.display&&d){var g=a(c)+o.options.toPadding(c.padding).height;h?i.height+=g:i.width+=g}if(u.display&&d){var v=o.longestText(t.ctx,p.font,r,t.longestTextCache),m=o.numberOfLabelLines(r),b=.5*p.size,x=t.options.ticks.padding;if(h){t.longestLabelWidth=v;var _=o.toRadians(t.labelRotation),w=Math.cos(_),k=Math.sin(_)*v+p.size*m+b*(m-1)+b;i.height=Math.min(t.maxHeight,i.height+k+x),t.ctx.font=p.font;var O=e(t.ctx,r[0],p.font),S=e(t.ctx,r[r.length-1],p.font);0!==t.labelRotation?(t.paddingLeft="bottom"===l.position?w*O+3:w*b+3,t.paddingRight="bottom"===l.position?w*b+3:w*S+3):(t.paddingLeft=O/2+3,t.paddingRight=S/2+3)}else u.mirror?v=0:v+=x+b,i.width=Math.min(t.maxWidth,i.width+v),t.paddingTop=p.size/2,t.paddingBottom=p.size/2}t.handleMargins(),t.width=i.width,t.height=i.height},handleMargins:function(){var t=this;t.margins&&(t.paddingLeft=Math.max(t.paddingLeft-t.margins.left,0),t.paddingTop=Math.max(t.paddingTop-t.margins.top,0),t.paddingRight=Math.max(t.paddingRight-t.margins.right,0),t.paddingBottom=Math.max(t.paddingBottom-t.margins.bottom,0))},afterFit:function(){o.callback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(o.isNullOrUndef(t))return NaN;if("number"==typeof t&&!isFinite(t))return NaN;if(t)if(this.isHorizontal()){if(void 0!==t.x)return this.getRightValue(t.x)}else if(void 0!==t.y)return this.getRightValue(t.y);return t},getLabelForIndex:o.noop,getPixelForValue:o.noop,getValueForPixel:o.noop,getPixelForTick:function(t){var e=this,n=e.options.offset;if(e.isHorizontal()){var i=(e.width-(e.paddingLeft+e.paddingRight))/Math.max(e._ticks.length-(n?0:1),1),r=i*t+e.paddingLeft;n&&(r+=i/2);var o=e.left+Math.round(r);return o+=e.isFullWidth()?e.margins.left:0}var a=e.height-(e.paddingTop+e.paddingBottom);return e.top+t*(a/(e._ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var n=(e.width-(e.paddingLeft+e.paddingRight))*t+e.paddingLeft,i=e.left+Math.round(n);return i+=e.isFullWidth()?e.margins.left:0}return e.top+t*e.height},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this.min,e=this.max;return this.beginAtZero?0:t<0&&e<0?e:t>0&&e>0?t:0},_autoSkip:function(t){var e,n,i,r,a=this,s=a.isHorizontal(),l=a.options.ticks.minor,u=t.length,c=o.toRadians(a.labelRotation),f=Math.cos(c),d=a.longestLabelWidth*f,h=[];for(l.maxTicksLimit&&(r=l.maxTicksLimit),s&&(e=!1,(d+l.autoSkipPadding)*u>a.width-(a.paddingLeft+a.paddingRight)&&(e=1+Math.floor((d+l.autoSkipPadding)*u/(a.width-(a.paddingLeft+a.paddingRight)))),r&&u>r&&(e=Math.max(e,Math.floor(u/r)))),n=0;n1&&n%e>0||n%e==0&&n+e>=u)&&n!==u-1&&delete i.label,h.push(i);return h},draw:function(t){var e=this,r=e.options;if(r.display){var s=e.ctx,u=i.global,c=r.ticks.minor,f=r.ticks.major||c,d=r.gridLines,h=r.scaleLabel,p=0!==e.labelRotation,y=e.isHorizontal(),g=c.autoSkip?e._autoSkip(e.getTicks()):e.getTicks(),v=o.valueOrDefault(c.fontColor,u.defaultFontColor),m=n(c),b=o.valueOrDefault(f.fontColor,u.defaultFontColor),x=n(f),_=d.drawTicks?d.tickMarkLength:0,w=o.valueOrDefault(h.fontColor,u.defaultFontColor),k=n(h),O=o.options.toPadding(h.padding),S=o.toRadians(e.labelRotation),M=[],A=e.options.gridLines.lineWidth,T="right"===r.position?e.right:e.right-A-_,C="right"===r.position?e.right+_:e.right,P="bottom"===r.position?e.top+A:e.bottom-_-A,E="bottom"===r.position?e.top+A+_:e.bottom+A;if(o.each(g,function(n,i){if(!o.isNullOrUndef(n.label)){var a,s,f,h,v,m,b,x,w,k,O,N,D,L,j=n.label;i===e.zeroLineIndex&&r.offset===d.offsetGridLines?(a=d.zeroLineWidth,s=d.zeroLineColor,f=d.zeroLineBorderDash,h=d.zeroLineBorderDashOffset):(a=o.valueAtIndexOrDefault(d.lineWidth,i),s=o.valueAtIndexOrDefault(d.color,i),f=o.valueOrDefault(d.borderDash,u.borderDash),h=o.valueOrDefault(d.borderDashOffset,u.borderDashOffset));var I="middle",R="middle",q=c.padding;if(y){var F=_+q;"bottom"===r.position?(R=p?"middle":"top",I=p?"right":"center",L=e.top+F):(R=p?"middle":"bottom",I=p?"left":"center",L=e.bottom-F);var B=l(e,i,d.offsetGridLines&&g.length>1);B1);H3?n[2]-n[1]:n[1]-n[0];Math.abs(r)>1&&t!==Math.floor(t)&&(r=t-Math.floor(t));var o=i.log10(Math.abs(r)),a="";if(0!==t){var s=-1*Math.floor(o);s=Math.max(Math.min(s,20),0),a=t.toFixed(s)}else a="0";return a},logarithmic:function(t,e,n){var r=t/Math.pow(10,Math.floor(i.log10(t)));return 0===t?"0":1===r||2===r||5===r||0===e||e===n.length-1?t.toExponential():""}}}},{45:45}],35:[function(t,e,n){"use strict";var i=t(25),r=t(26),o=t(45);i._set("global",{tooltips:{enabled:!0,custom:null,mode:"nearest",position:"average",intersect:!0,backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,caretPadding:2,caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,callbacks:{beforeTitle:o.noop,title:function(t,e){var n="",i=e.labels,r=i?i.length:0;if(t.length>0){var o=t[0];o.xLabel?n=o.xLabel:r>0&&o.indexl.height-e.height&&(f="bottom");var d=(u.left+u.right)/2,h=(u.top+u.bottom)/2;"center"===f?(n=function(t){return t<=d},i=function(t){return t>d}):(n=function(t){return t<=e.width/2},i=function(t){return t>=l.width-e.width/2}),r=function(t){return t+e.width+s.caretSize+s.caretPadding>l.width},o=function(t){return t-e.width-s.caretSize-s.caretPadding<0},a=function(t){return t<=h?"top":"bottom"},n(s.x)?(c="left",r(s.x)&&(c="center",f=a(s.y))):i(s.x)&&(c="right",o(s.x)&&(c="center",f=a(s.y)));var p=t._options;return{xAlign:p.xAlign?p.xAlign:c,yAlign:p.yAlign?p.yAlign:f}}(this,N=function(t,e){var n=t._chart.ctx,i=2*e.yPadding,r=0,a=e.body,s=a.reduce(function(t,e){return t+e.before.length+e.lines.length+e.after.length},0);s+=e.beforeBody.length+e.afterBody.length;var l=e.title.length,u=e.footer.length,c=e.titleFontSize,f=e.bodyFontSize,d=e.footerFontSize;i+=l*c,i+=l?(l-1)*e.titleSpacing:0,i+=l?e.titleMarginBottom:0,i+=s*f,i+=s?(s-1)*e.bodySpacing:0,i+=u?e.footerMarginTop:0,i+=u*d,i+=u?(u-1)*e.footerSpacing:0;var h=0,p=function(t){r=Math.max(r,n.measureText(t).width+h)};return n.font=o.fontString(c,e._titleFontStyle,e._titleFontFamily),o.each(e.title,p),n.font=o.fontString(f,e._bodyFontStyle,e._bodyFontFamily),o.each(e.beforeBody.concat(e.afterBody),p),h=e.displayColors?f+2:0,o.each(a,function(t){o.each(t.before,p),o.each(t.lines,p),o.each(t.after,p)}),h=0,n.font=o.fontString(d,e._footerFontStyle,e._footerFontFamily),o.each(e.footer,p),{width:r+=2*e.xPadding,height:i}}(this,A)),r=A,s=N,l=P,u=O._chart,c=r.x,f=r.y,d=r.caretSize,h=r.caretPadding,p=r.cornerRadius,y=l.xAlign,g=l.yAlign,v=d+h,m=p+h,"right"===y?c-=s.width:"center"===y&&((c-=s.width/2)+s.width>u.width&&(c=u.width-s.width),c<0&&(c=0)),"top"===g?f+=v:f-="bottom"===g?s.height+v:s.height/2,"center"===g?"left"===y?c+=v:"right"===y&&(c-=v):"left"===y?c-=m:"right"===y&&(c+=m),E={x:c,y:f}}else A.opacity=0;return A.xAlign=P.xAlign,A.yAlign=P.yAlign,A.x=E.x,A.y=E.y,A.width=N.width,A.height=N.height,A.caretX=D.x,A.caretY=D.y,O._model=A,e&&S.custom&&S.custom.call(O,A),O},drawCaret:function(t,e){var n=this._chart.ctx,i=this._view,r=this.getCaretPosition(t,e,i);n.lineTo(r.x1,r.y1),n.lineTo(r.x2,r.y2),n.lineTo(r.x3,r.y3)},getCaretPosition:function(t,e,n){var i,r,o,a,s,l,u=n.caretSize,c=n.cornerRadius,f=n.xAlign,d=n.yAlign,h=t.x,p=t.y,y=e.width,g=e.height;if("center"===d)s=p+g/2,"left"===f?(r=(i=h)-u,o=i,a=s+u,l=s-u):(r=(i=h+y)+u,o=i,a=s-u,l=s+u);else if("left"===f?(i=(r=h+c+u)-u,o=r+u):"right"===f?(i=(r=h+y-c-u)-u,o=r+u):(i=(r=n.caretX)-u,o=r+u),"top"===d)s=(a=p)-u,l=a;else{s=(a=p+g)+u,l=a;var v=o;o=i,i=v}return{x1:i,x2:r,x3:o,y1:a,y2:s,y3:l}},drawTitle:function(t,n,i,r){var a=n.title;if(a.length){i.textAlign=n._titleAlign,i.textBaseline="top";var s,l,u=n.titleFontSize,c=n.titleSpacing;for(i.fillStyle=e(n.titleFontColor,r),i.font=o.fontString(u,n._titleFontStyle,n._titleFontFamily),s=0,l=a.length;s0&&i.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var n={width:e.width,height:e.height},i={x:e.x,y:e.y},r=Math.abs(e.opacity<.001)?0:e.opacity,o=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&o&&(this.drawBackground(i,e,t,n,r),i.x+=e.xPadding,i.y+=e.yPadding,this.drawTitle(i,e,t,r),this.drawBody(i,e,t,r),this.drawFooter(i,e,t,r))}},handleEvent:function(t){var e,n=this,i=n._options;return n._lastActive=n._lastActive||[],"mouseout"===t.type?n._active=[]:n._active=n._chart.getElementsAtEventForMode(t,i.mode,i),(e=!o.arrayEquals(n._active,n._lastActive))&&(n._lastActive=n._active,(i.enabled||i.custom)&&(n._eventPosition={x:t.x,y:t.y},n.update(!0),n.pivot())),e}}),t.Tooltip.positioners={average:function(t){if(!t.length)return!1;var e,n,i=0,r=0,o=0;for(e=0,n=t.length;el;)r-=2*Math.PI;for(;r=s&&r<=l,c=a>=n.innerRadius&&a<=n.outerRadius;return u&&c}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,n=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,n=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},draw:function(){var t=this._chart.ctx,e=this._view,n=e.startAngle,i=e.endAngle;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,n,i),t.arc(e.x,e.y,e.innerRadius,i,n,!0),t.closePath(),t.strokeStyle=e.borderColor,t.lineWidth=e.borderWidth,t.fillStyle=e.backgroundColor,t.fill(),t.lineJoin="bevel",e.borderWidth&&t.stroke()}})},{25:25,26:26,45:45}],37:[function(t,e,n){"use strict";var i=t(25),r=t(26),o=t(45),a=i.global;i._set("global",{elements:{line:{tension:.4,backgroundColor:a.defaultColor,borderWidth:3,borderColor:a.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}}),e.exports=r.extend({draw:function(){var t,e,n,i,r=this._view,s=this._chart.ctx,l=r.spanGaps,u=this._children.slice(),c=a.elements.line,f=-1;for(this._loop&&u.length&&u.push(u[0]),s.save(),s.lineCap=r.borderCapStyle||c.borderCapStyle,s.setLineDash&&s.setLineDash(r.borderDash||c.borderDash),s.lineDashOffset=r.borderDashOffset||c.borderDashOffset,s.lineJoin=r.borderJoinStyle||c.borderJoinStyle,s.lineWidth=r.borderWidth||c.borderWidth,s.strokeStyle=r.borderColor||a.defaultColor,s.beginPath(),f=-1,t=0;tt?1:-1,o=1,a=l.borderSkipped||"left"):(t=l.x-l.width/2,e=l.x+l.width/2,n=l.y,r=1,o=(i=l.base)>n?1:-1,a=l.borderSkipped||"bottom"),u){var c=Math.min(Math.abs(t-e),Math.abs(n-i)),f=(u=u>c?c:u)/2,d=t+("left"!==a?f*r:0),h=e+("right"!==a?-f*r:0),p=n+("top"!==a?f*o:0),y=i+("bottom"!==a?-f*o:0);d!==h&&(n=p,i=y),p!==y&&(t=d,e=h)}s.beginPath(),s.fillStyle=l.backgroundColor,s.strokeStyle=l.borderColor,s.lineWidth=u;var g=[[t,i],[t,n],[e,n],[e,i]],v=["bottom","left","top","right"].indexOf(a,0);function m(t){return g[(v+t)%4]}-1===v&&(v=0);var b=m(0);s.moveTo(b[0],b[1]);for(var x=1;x<4;x++)b=m(x),s.lineTo(b[0],b[1]);s.fill(),u&&s.stroke()},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){var n=!1;if(this._view){var i=a(this);n=t>=i.left&&t<=i.right&&e>=i.top&&e<=i.bottom}return n},inLabelRange:function(t,e){if(!this._view)return!1;var n=a(this);return o(this)?t>=n.left&&t<=n.right:e>=n.top&&e<=n.bottom},inXRange:function(t){var e=a(this);return t>=e.left&&t<=e.right},inYRange:function(t){var e=a(this);return t>=e.top&&t<=e.bottom},getCenterPoint:function(){var t,e,n=this._view;return o(this)?(t=n.x,e=(n.y+n.base)/2):(t=(n.x+n.base)/2,e=n.y),{x:t,y:e}},getArea:function(){var t=this._view;return t.width*Math.abs(t.y-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}})},{25:25,26:26}],40:[function(t,e,n){"use strict";e.exports={},e.exports.Arc=t(36),e.exports.Line=t(37),e.exports.Point=t(38),e.exports.Rectangle=t(39)},{36:36,37:37,38:38,39:39}],41:[function(t,e,n){"use strict";var i=t(42);n=e.exports={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,i,r,o){if(o){var a=Math.min(o,i/2),s=Math.min(o,r/2);t.moveTo(e+a,n),t.lineTo(e+i-a,n),t.quadraticCurveTo(e+i,n,e+i,n+s),t.lineTo(e+i,n+r-s),t.quadraticCurveTo(e+i,n+r,e+i-a,n+r),t.lineTo(e+a,n+r),t.quadraticCurveTo(e,n+r,e,n+r-s),t.lineTo(e,n+s),t.quadraticCurveTo(e,n,e+a,n)}else t.rect(e,n,i,r)},drawPoint:function(t,e,n,i,r){var o,a,s,l,u,c;if(!e||"object"!=typeof e||"[object HTMLImageElement]"!==(o=e.toString())&&"[object HTMLCanvasElement]"!==o){if(!(isNaN(n)||n<=0)){switch(e){default:t.beginPath(),t.arc(i,r,n,0,2*Math.PI),t.closePath(),t.fill();break;case"triangle":t.beginPath(),u=(a=3*n/Math.sqrt(3))*Math.sqrt(3)/2,t.moveTo(i-a/2,r+u/3),t.lineTo(i+a/2,r+u/3),t.lineTo(i,r-2*u/3),t.closePath(),t.fill();break;case"rect":c=1/Math.SQRT2*n,t.beginPath(),t.fillRect(i-c,r-c,2*c,2*c),t.strokeRect(i-c,r-c,2*c,2*c);break;case"rectRounded":var f=n/Math.SQRT2,d=i-f,h=r-f,p=Math.SQRT2*n;t.beginPath(),this.roundedRect(t,d,h,p,p,n/2),t.closePath(),t.fill();break;case"rectRot":c=1/Math.SQRT2*n,t.beginPath(),t.moveTo(i-c,r),t.lineTo(i,r+c),t.lineTo(i+c,r),t.lineTo(i,r-c),t.closePath(),t.fill();break;case"cross":t.beginPath(),t.moveTo(i,r+n),t.lineTo(i,r-n),t.moveTo(i-n,r),t.lineTo(i+n,r),t.closePath();break;case"crossRot":t.beginPath(),s=Math.cos(Math.PI/4)*n,l=Math.sin(Math.PI/4)*n,t.moveTo(i-s,r-l),t.lineTo(i+s,r+l),t.moveTo(i-s,r+l),t.lineTo(i+s,r-l),t.closePath();break;case"star":t.beginPath(),t.moveTo(i,r+n),t.lineTo(i,r-n),t.moveTo(i-n,r),t.lineTo(i+n,r),s=Math.cos(Math.PI/4)*n,l=Math.sin(Math.PI/4)*n,t.moveTo(i-s,r-l),t.lineTo(i+s,r+l),t.moveTo(i-s,r+l),t.lineTo(i+s,r-l),t.closePath();break;case"line":t.beginPath(),t.moveTo(i-n,r),t.lineTo(i+n,r),t.closePath();break;case"dash":t.beginPath(),t.moveTo(i,r),t.lineTo(i+n,r),t.closePath()}t.stroke()}}else t.drawImage(e,i-e.width/2,r-e.height/2,e.width,e.height)},clipArea:function(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()},unclipArea:function(t){t.restore()},lineTo:function(t,e,n,i){if(n.steppedLine)return"after"===n.steppedLine&&!i||"after"!==n.steppedLine&&i?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y),void t.lineTo(n.x,n.y);n.tension?t.bezierCurveTo(i?e.controlPointPreviousX:e.controlPointNextX,i?e.controlPointPreviousY:e.controlPointNextY,i?n.controlPointNextX:n.controlPointPreviousX,i?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):t.lineTo(n.x,n.y)}};i.clear=n.clear,i.drawRoundedRectangle=function(t){t.beginPath(),n.roundedRect.apply(n,arguments),t.closePath()}},{42:42}],42:[function(t,e,n){"use strict";var i,r={noop:function(){},uid:(i=0,function(){return i++}),isNullOrUndef:function(t){return null===t||"undefined"==typeof t},isArray:Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},isObject:function(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)},valueOrDefault:function(t,e){return"undefined"==typeof t?e:t},valueAtIndexOrDefault:function(t,e,n){return r.valueOrDefault(r.isArray(t)?t[e]:t,n)},callback:function(t,e,n){if(t&&"function"==typeof t.call)return t.apply(n,e)},each:function(t,e,n,i){var o,a,s;if(r.isArray(t))if(a=t.length,i)for(o=a-1;o>=0;o--)e.call(n,t[o],o);else for(o=0;o=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:1===t?1:(n||(n=.3),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n))},easeOutElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:1===t?1:(n||(n=.3),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},easeInOutElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:2==(t/=.5)?1:(n||(n=.45),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),t<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},easeInBack:function(t){return t*t*(2.70158*t-1.70158)},easeOutBack:function(t){return(t-=1)*t*(2.70158*t+1.70158)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-r.easeOutBounce(1-t)},easeOutBounce:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:function(t){return t<.5?.5*r.easeInBounce(2*t):.5*r.easeOutBounce(2*t-1)+.5}};e.exports={effects:r},i.easingEffects=r},{42:42}],44:[function(t,e,n){"use strict";var i=t(42);e.exports={toLineHeight:function(t,e){var n=(""+t).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!n||"normal"===n[1])return 1.2*e;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100}return e*t},toPadding:function(t){var e,n,r,o;return i.isObject(t)?(e=+t.top||0,n=+t.right||0,r=+t.bottom||0,o=+t.left||0):e=n=r=o=+t||0,{top:e,right:n,bottom:r,left:o,height:e+r,width:o+n}},resolve:function(t,e,n){var r,o,a;for(r=0,o=t.length;r
';var r=e.childNodes[0],a=e.childNodes[1];e._reset=function(){r.scrollLeft=1e6,r.scrollTop=1e6,a.scrollLeft=1e6,a.scrollTop=1e6};var s=function(){e._reset(),t()};return d(r,"scroll",s.bind(r,"expand")),d(a,"scroll",s.bind(a,"shrink")),e}((u=function(){if(b.resizer)return e(p("resize",n))},f=!1,h=[],function(){h=Array.prototype.slice.call(arguments),c=c||this,f||(f=!0,i.requestAnimFrame.call(window,function(){f=!1,u.apply(c,h)}))}));g=function(){if(b.resizer){var e=t.parentNode;e&&e!==x.parentNode&&e.insertBefore(x,e.firstChild),x._reset()}},v=(y=t)[r]||(y[r]={}),m=v.renderProxy=function(t){t.animationName===s&&g()},i.each(l,function(t){d(y,t,m)}),v.reflow=!!y.offsetParent,y.classList.add(a)}function g(t){var e,n,o,s=t[r]||{},u=s.resizer;delete s.resizer,n=(e=t)[r]||{},(o=n.renderProxy)&&(i.each(l,function(t){h(e,t,o)}),delete n.renderProxy),e.classList.remove(a),u&&u.parentNode&&u.parentNode.removeChild(u)}e.exports={_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,initialize:function(){var t,e,n,i="from{opacity:0.99}to{opacity:1}";e="@-webkit-keyframes "+s+"{"+i+"}@keyframes "+s+"{"+i+"}."+a+"{-webkit-animation:"+s+" 0.001s;animation:"+s+" 0.001s;}",n=(t=this)._style||document.createElement("style"),t._style||(t._style=n,e="/* Chart.js */\n"+e,n.setAttribute("type","text/css"),document.getElementsByTagName("head")[0].appendChild(n)),n.appendChild(document.createTextNode(e))},acquireContext:function(t,e){"string"==typeof t?t=document.getElementById(t):t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas);var n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(function(t,e){var n=t.style,i=t.getAttribute("height"),o=t.getAttribute("width");if(t[r]={initial:{height:i,width:o,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===o||""===o){var a=c(t,"width");void 0!==a&&(t.width=a)}if(null===i||""===i)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var s=c(t,"height");void 0!==a&&(t.height=s)}}(t,e),n):null},releaseContext:function(t){var e=t.canvas;if(e[r]){var n=e[r].initial;["height","width"].forEach(function(t){var r=n[t];i.isNullOrUndef(r)?e.removeAttribute(t):e.setAttribute(t,r)}),i.each(n.style||{},function(t,n){e.style[n]=t}),e.width=e.width,delete e[r]}},addEventListener:function(t,e,n){var o=t.canvas;if("resize"!==e){var a=n[r]||(n[r]={});d(o,e,(a.proxies||(a.proxies={}))[t.id+"_"+e]=function(e){var r,o,a,s;n((o=t,a=u[(r=e).type]||r.type,s=i.getRelativePosition(r,o),p(a,o,s.x,s.y,r)))})}else y(o,n,t)},removeEventListener:function(t,e,n){var i=t.canvas;if("resize"!==e){var o=((n[r]||{}).proxies||{})[t.id+"_"+e];o&&h(i,e,o)}else g(i)}},i.addEvent=d,i.removeEvent=h},{45:45}],48:[function(t,e,n){"use strict";var i=t(45),r=t(46),o=t(47),a=o._enabled?o:r;e.exports=i.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},a)},{45:45,46:46,47:47}],49:[function(t,e,n){"use strict";e.exports={},e.exports.filler=t(50),e.exports.legend=t(51),e.exports.title=t(52)},{50:50,51:51,52:52}],50:[function(t,e,n){"use strict";var i=t(25),r=t(40),o=t(45);i._set("global",{plugins:{filler:{propagate:!0}}});var a={dataset:function(t){var e=t.fill,n=t.chart,i=n.getDatasetMeta(e),r=i&&n.isDatasetVisible(e)&&i.dataset._children||[],o=r.length||0;return o?function(t,e){return e=n)&&i;switch(o){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return o;default:return!1}}function l(t){var e,n=t.el._model||{},i=t.el._scale||{},r=t.fill,o=null;if(isFinite(r))return null;if("start"===r?o=void 0===n.scaleBottom?i.bottom:n.scaleBottom:"end"===r?o=void 0===n.scaleTop?i.top:n.scaleTop:void 0!==n.scaleZero?o=n.scaleZero:i.getBasePosition?o=i.getBasePosition():i.getBasePixel&&(o=i.getBasePixel()),void 0!==o&&null!==o){if(void 0!==o.x&&void 0!==o.y)return o;if("number"==typeof o&&isFinite(o))return{x:(e=i.isHorizontal())?o:null,y:e?null:o}}return null}function u(t,e,n){var i,r=t[e].fill,o=[e];if(!n)return r;for(;!1!==r&&-1===o.indexOf(r);){if(!isFinite(r))return r;if(!(i=t[r]))return!1;if(i.visible)return r;o.push(r),r=i.fill}return!1}function c(t){return t&&!t.skip}function f(t,e,n,i,r){var a;if(i&&r){for(t.moveTo(e[0].x,e[0].y),a=1;a0;--a)o.canvas.lineTo(t,n[a],n[a-1],!0)}}e.exports={id:"filler",afterDatasetsUpdate:function(t,e){var n,i,o,c,f,d,h,p=(t.data.datasets||[]).length,y=e.propagate,g=[];for(i=0;i');for(var n=0;n'),t.data.datasets[n].label&&e.push(t.data.datasets[n].label),e.push("");return e.push(""),e.join("")}});var u=r.extend({initialize:function(t){o.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:s,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:s,beforeSetDimensions:s,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:s,beforeBuildLabels:s,buildLabels:function(){var t=this,e=t.options.labels||{},n=o.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(n=n.filter(function(n){return e.filter(n,t.chart.data)})),t.options.reverse&&n.reverse(),t.legendItems=n},afterBuildLabels:s,beforeFit:s,fit:function(){var t=this,e=t.options,n=e.labels,r=e.display,a=t.ctx,s=i.global,u=o.valueOrDefault,c=u(n.fontSize,s.defaultFontSize),f=u(n.fontStyle,s.defaultFontStyle),d=u(n.fontFamily,s.defaultFontFamily),h=o.fontString(c,f,d),p=t.legendHitBoxes=[],y=t.minSize,g=t.isHorizontal();if(g?(y.width=t.maxWidth,y.height=r?10:0):(y.width=r?10:0,y.height=t.maxHeight),r)if(a.font=h,g){var v=t.lineWidths=[0],m=t.legendItems.length?c+n.padding:0;a.textAlign="left",a.textBaseline="top",o.each(t.legendItems,function(e,i){var r=l(n,c)+c/2+a.measureText(e.text).width;v[v.length-1]+r+n.padding>=t.width&&(m+=c+n.padding,v[v.length]=t.left),p[i]={left:0,top:0,width:r,height:c},v[v.length-1]+=r+n.padding}),y.height+=m}else{var b=n.padding,x=t.columnWidths=[],_=n.padding,w=0,k=0,O=c+b;o.each(t.legendItems,function(t,e){var i=l(n,c)+c/2+a.measureText(t.text).width;k+O>y.height&&(_+=w+n.padding,x.push(w),w=0,k=0),w=Math.max(w,i),k+=O,p[e]={left:0,top:0,width:i,height:c}}),_+=w,x.push(w),y.width+=_}t.width=y.width,t.height=y.height},afterFit:s,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,e=t.options,n=e.labels,r=i.global,a=r.elements.line,s=t.width,u=t.lineWidths;if(e.display){var c,f=t.ctx,d=o.valueOrDefault,h=d(n.fontColor,r.defaultFontColor),p=d(n.fontSize,r.defaultFontSize),y=d(n.fontStyle,r.defaultFontStyle),g=d(n.fontFamily,r.defaultFontFamily),v=o.fontString(p,y,g);f.textAlign="left",f.textBaseline="middle",f.lineWidth=.5,f.strokeStyle=h,f.fillStyle=h,f.font=v;var m=l(n,p),b=t.legendHitBoxes,x=t.isHorizontal();c=x?{x:t.left+(s-u[0])/2,y:t.top+n.padding,line:0}:{x:t.left+n.padding,y:t.top+n.padding,line:0};var _=p+n.padding;o.each(t.legendItems,function(i,l){var h,y,g,v,w,k=f.measureText(i.text).width,O=m+p/2+k,S=c.x,M=c.y;x?S+O>=s&&(M=c.y+=_,c.line++,S=c.x=t.left+(s-u[c.line])/2):M+_>t.bottom&&(S=c.x=S+t.columnWidths[c.line]+n.padding,M=c.y=t.top+n.padding,c.line++),function(t,n,i){if(!(isNaN(m)||m<=0)){f.save(),f.fillStyle=d(i.fillStyle,r.defaultColor),f.lineCap=d(i.lineCap,a.borderCapStyle),f.lineDashOffset=d(i.lineDashOffset,a.borderDashOffset),f.lineJoin=d(i.lineJoin,a.borderJoinStyle),f.lineWidth=d(i.lineWidth,a.borderWidth),f.strokeStyle=d(i.strokeStyle,r.defaultColor);var s=0===d(i.lineWidth,a.borderWidth);if(f.setLineDash&&f.setLineDash(d(i.lineDash,a.borderDash)),e.labels&&e.labels.usePointStyle){var l=p*Math.SQRT2/2,u=l/Math.SQRT2,c=t+u,h=n+u;o.canvas.drawPoint(f,i.pointStyle,l,c,h)}else s||f.strokeRect(t,n,m,p),f.fillRect(t,n,m,p);f.restore()}}(S,M,i),b[l].left=S,b[l].top=M,h=i,y=k,v=m+(g=p/2)+S,w=M+g,f.fillText(h.text,v,w),h.hidden&&(f.beginPath(),f.lineWidth=2,f.moveTo(v,w),f.lineTo(v+y,w),f.stroke()),x?c.x+=O+n.padding:c.y+=_})}},handleEvent:function(t){var e=this,n=e.options,i="mouseup"===t.type?"click":t.type,r=!1;if("mousemove"===i){if(!n.onHover)return}else{if("click"!==i)return;if(!n.onClick)return}var o=t.x,a=t.y;if(o>=e.left&&o<=e.right&&a>=e.top&&a<=e.bottom)for(var s=e.legendHitBoxes,l=0;l=u.left&&o<=u.left+u.width&&a>=u.top&&a<=u.top+u.height){if("click"===i){n.onClick.call(e,t.native,e.legendItems[l]),r=!0;break}if("mousemove"===i){n.onHover.call(e,t.native,e.legendItems[l]),r=!0;break}}}return r}});function c(t,e){var n=new u({ctx:t.ctx,options:e,chart:t});a.configure(t,n,e),a.addBox(t,n),t.legend=n}e.exports={id:"legend",_element:u,beforeInit:function(t){var e=t.options.legend;e&&c(t,e)},beforeUpdate:function(t){var e=t.options.legend,n=t.legend;e?(o.mergeIf(e,i.global.legend),n?(a.configure(t,n,e),n.options=e):c(t,e)):n&&(a.removeBox(t,n),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}}},{25:25,26:26,30:30,45:45}],52:[function(t,e,n){"use strict";var i=t(25),r=t(26),o=t(45),a=t(30),s=o.noop;i._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,lineHeight:1.2,padding:10,position:"top",text:"",weight:2e3}});var l=r.extend({initialize:function(t){o.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:s,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:s,beforeSetDimensions:s,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:s,beforeBuildLabels:s,buildLabels:s,afterBuildLabels:s,beforeFit:s,fit:function(){var t=o.valueOrDefault,e=this.options,n=e.display,r=t(e.fontSize,i.global.defaultFontSize),a=this.minSize,s=o.isArray(e.text)?e.text.length:1,l=o.options.toLineHeight(e.lineHeight,r),u=n?s*l+2*e.padding:0;this.isHorizontal()?(a.width=this.maxWidth,a.height=u):(a.width=u,a.height=this.maxHeight),this.width=a.width,this.height=a.height},afterFit:s,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this.ctx,e=o.valueOrDefault,n=this.options,r=i.global;if(n.display){var a,s,l,u=e(n.fontSize,r.defaultFontSize),c=e(n.fontStyle,r.defaultFontStyle),f=e(n.fontFamily,r.defaultFontFamily),d=o.fontString(u,c,f),h=o.options.toLineHeight(n.lineHeight,u),p=h/2+n.padding,y=0,g=this.top,v=this.left,m=this.bottom,b=this.right;t.fillStyle=e(n.fontColor,r.defaultFontColor),t.font=d,this.isHorizontal()?(s=v+(b-v)/2,l=g+p,a=b-v):(s="left"===n.position?v+p:b-p,l=g+(m-g)/2,a=m-g,y=Math.PI*("left"===n.position?-.5:.5)),t.save(),t.translate(s,l),t.rotate(y),t.textAlign="center",t.textBaseline="middle";var x=n.text;if(o.isArray(x))for(var _=0,w=0;wt.max&&(t.max=i))})});t.min=isFinite(t.min)&&!isNaN(t.min)?t.min:0,t.max=isFinite(t.max)&&!isNaN(t.max)?t.max:1,this.handleTickRangeOptions()},getTickLimit:function(){var t,e=this.options.ticks;if(this.isHorizontal())t=Math.min(e.maxTicksLimit?e.maxTicksLimit:11,Math.ceil(this.width/50));else{var n=r.valueOrDefault(e.fontSize,i.global.defaultFontSize);t=Math.min(e.maxTicksLimit?e.maxTicksLimit:11,Math.ceil(this.height/(2*n)))}return t},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){var e=this.start,n=+this.getRightValue(t),i=this.end-e;return this.isHorizontal()?this.left+this.width/i*(n-e):this.bottom-this.height/i*(n-e)},getValueForPixel:function(t){var e=this.isHorizontal(),n=e?this.width:this.height,i=(e?t-this.left:this.bottom-t)/n;return this.start+(this.end-this.start)*i},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}});t.scaleService.registerScaleType("linear",n,e)}},{25:25,34:34,45:45}],55:[function(t,e,n){"use strict";var i=t(45);e.exports=function(t){var e=i.noop;t.LinearScaleBase=t.Scale.extend({getRightValue:function(e){return"string"==typeof e?+e:t.Scale.prototype.getRightValue.call(this,e)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;if(e.beginAtZero){var n=i.sign(t.min),r=i.sign(t.max);n<0&&r<0?t.max=0:n>0&&r>0&&(t.min=0)}var o=void 0!==e.min||void 0!==e.suggestedMin,a=void 0!==e.max||void 0!==e.suggestedMax;void 0!==e.min?t.min=e.min:void 0!==e.suggestedMin&&(null===t.min?t.min=e.suggestedMin:t.min=Math.min(t.min,e.suggestedMin)),void 0!==e.max?t.max=e.max:void 0!==e.suggestedMax&&(null===t.max?t.max=e.suggestedMax:t.max=Math.max(t.max,e.suggestedMax)),o!==a&&t.min>=t.max&&(o?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:e,handleDirectionalChanges:e,buildTicks:function(){var t=this,e=t.options.ticks,n=t.getTickLimit(),r={maxTicks:n=Math.max(2,n),min:e.min,max:e.max,stepSize:i.valueOrDefault(e.fixedStepSize,e.stepSize)},o=t.ticks=function(t,e){var n,r=[];if(t.stepSize&&t.stepSize>0)n=t.stepSize;else{var o=i.niceNum(e.max-e.min,!1);n=i.niceNum(o/(t.maxTicks-1),!0)}var a=Math.floor(e.min/n)*n,s=Math.ceil(e.max/n)*n;t.min&&t.max&&t.stepSize&&i.almostWhole((t.max-t.min)/t.stepSize,n/1e3)&&(a=t.min,s=t.max);var l=(s-a)/n;l=i.almostEquals(l,Math.round(l),n/1e3)?Math.round(l):Math.ceil(l);var u=1;n<1&&(u=Math.pow(10,n.toString().length-2),a=Math.round(a*u)/u,s=Math.round(s*u)/u),r.push(void 0!==t.min?t.min:a);for(var c=1;c0){var n=i.min(e),r=i.max(e);t.min=null===t.min?n:Math.min(t.min,n),t.max=null===t.max?r:Math.max(t.max,r)}})}else i.each(r,function(e,r){var o=n.getDatasetMeta(r);n.isDatasetVisible(r)&&a(o)&&i.each(e.data,function(e,n){var i=+t.getRightValue(e);isNaN(i)||o.data[n].hidden||i<0||(null===t.min?t.min=i:it.max&&(t.max=i),0!==i&&(null===t.minNotZero||i0?t.minNotZero=t.min:t.max<1?t.minNotZero=Math.pow(10,Math.floor(i.log10(t.max))):t.minNotZero=1)},buildTicks:function(){var t=this,e=t.options.ticks,n=!t.isHorizontal(),r={min:e.min,max:e.max},o=t.ticks=function(t,e){var n,r,o=[],a=i.valueOrDefault,s=a(t.min,Math.pow(10,Math.floor(i.log10(e.min)))),l=Math.floor(i.log10(e.max)),u=Math.ceil(e.max/Math.pow(10,l));0===s?(n=Math.floor(i.log10(e.minNotZero)),r=Math.floor(e.minNotZero/Math.pow(10,n)),o.push(s),s=r*Math.pow(10,n)):(n=Math.floor(i.log10(s)),r=Math.floor(s/Math.pow(10,n)));var c=n<0?Math.pow(10,Math.abs(n)):1;do{o.push(s),10==++r&&(r=1,c=++n>=0?1:c),s=Math.round(r*Math.pow(10,n)*c)/c}while(nr?{start:e-n-5,end:e}:{start:e,end:e+n+5}}function u(t,e,n,i){if(r.isArray(e))for(var o=n.y,a=1.5*i,s=0;sc.r&&(c.r=m.end,f.r=g),b.startc.b&&(c.b=b.end,f.b=g)}t.setReductions(u,c,f)}(this):(t=this,e=Math.min(t.height/2,t.width/2),t.drawingArea=Math.round(e),t.setCenterPoint(0,0,0,0))},setReductions:function(t,e,n){var i=e.l/Math.sin(n.l),r=Math.max(e.r-this.width,0)/Math.sin(n.r),o=-e.t/Math.cos(n.t),a=-Math.max(e.b-this.height,0)/Math.cos(n.b);i=c(i),r=c(r),o=c(o),a=c(a),this.drawingArea=Math.min(Math.round(t-(i+r)/2),Math.round(t-(o+a)/2)),this.setCenterPoint(i,r,o,a)},setCenterPoint:function(t,e,n,i){var r=this,o=r.width-e-r.drawingArea,a=t+r.drawingArea,s=n+r.drawingArea,l=r.height-i-r.drawingArea;r.xCenter=Math.round((a+o)/2+r.left),r.yCenter=Math.round((s+l)/2+r.top)},getIndexAngle:function(t){return t*(2*Math.PI/a(this))+(this.chart.options&&this.chart.options.startAngle?this.chart.options.startAngle:0)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){if(null===t)return 0;var e=this.drawingArea/(this.max-this.min);return this.options.ticks.reverse?(this.max-t)*e:(t-this.min)*e},getPointPosition:function(t,e){var n=this.getIndexAngle(t)-Math.PI/2;return{x:Math.round(Math.cos(n)*e)+this.xCenter,y:Math.round(Math.sin(n)*e)+this.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(){var t=this.min,e=this.max;return this.getPointPositionForValue(0,this.beginAtZero?0:t<0&&e<0?e:t>0&&e>0?t:0)},draw:function(){var t=this,n=t.options,i=n.gridLines,o=n.ticks,l=r.valueOrDefault;if(n.display){var c=t.ctx,f=this.getIndexAngle(0),d=l(o.fontSize,e.defaultFontSize),h=l(o.fontStyle,e.defaultFontStyle),p=l(o.fontFamily,e.defaultFontFamily),y=r.fontString(d,h,p);r.each(t.ticks,function(n,s){if(s>0||o.reverse){var u=t.getDistanceFromCenterForValue(t.ticksAsNumbers[s]);if(i.display&&0!==s&&function(t,e,n,i){var o=t.ctx;if(o.strokeStyle=r.valueAtIndexOrDefault(e.color,i-1),o.lineWidth=r.valueAtIndexOrDefault(e.lineWidth,i-1),t.options.gridLines.circular)o.beginPath(),o.arc(t.xCenter,t.yCenter,n,0,2*Math.PI),o.closePath(),o.stroke();else{var s=a(t);if(0===s)return;o.beginPath();var l=t.getPointPosition(0,n);o.moveTo(l.x,l.y);for(var u=1;u=0;g--){if(o.display){var v=t.getPointPosition(g,p);n.beginPath(),n.moveTo(t.xCenter,t.yCenter),n.lineTo(v.x,v.y),n.stroke(),n.closePath()}if(l.display){var m=t.getPointPosition(g,p+5),b=r.valueAtIndexOrDefault(l.fontColor,g,e.defaultFontColor);n.font=y.font,n.fillStyle=b;var x=t.getIndexAngle(g),_=r.toDegrees(x);n.textAlign=0===(h=_)||180===h?"center":h<180?"left":"right",c=_,f=t._pointLabelSizes[g],d=m,90===c||270===c?d.y-=f.h/2:(c>270||c<90)&&(d.y-=f.h),u(n,t.pointLabels[g]||"",m,y.size)}}}(t)}}});t.scaleService.registerScaleType("radialLinear",f,n)}},{25:25,34:34,45:45}],58:[function(t,e,n){"use strict";var i=t(6);i="function"==typeof i?i:window.moment;var r=t(25),o=t(45),a=Number.MIN_SAFE_INTEGER||-9007199254740991,s=Number.MAX_SAFE_INTEGER||9007199254740991,l={millisecond:{common:!0,size:1,steps:[1,2,5,10,20,50,100,250,500]},second:{common:!0,size:1e3,steps:[1,2,5,10,30]},minute:{common:!0,size:6e4,steps:[1,2,5,10,30]},hour:{common:!0,size:36e5,steps:[1,2,3,6,12]},day:{common:!0,size:864e5,steps:[1,2,5]},week:{common:!1,size:6048e5,steps:[1,2,3,4]},month:{common:!0,size:2628e6,steps:[1,2,3]},quarter:{common:!1,size:7884e6,steps:[1,2,3,4]},year:{common:!0,size:3154e7}},u=Object.keys(l);function c(t,e){return t-e}function f(t){var e,n,i,r={},o=[];for(e=0,n=t.length;e=0&&a<=s;){if(r=t[(i=a+s>>1)-1]||null,o=t[i],!r)return{lo:null,hi:o};if(o[e]n))return{lo:r,hi:o};s=i-1}}return{lo:o,hi:null}}(t,e,n),o=r.lo?r.hi?r.lo:t[t.length-2]:t[0],a=r.lo?r.hi?r.hi:t[t.length-1]:t[1],s=a[e]-o[e],l=s?(n-o[e])/s:0,u=(a[i]-o[i])*l;return o[i]+u}function h(t,e){var n=e.parser,r=e.parser||e.format;return"function"==typeof n?n(t):"string"==typeof t&&"string"==typeof r?i(t,r):(t instanceof i||(t=i(t)),t.isValid()?t:"function"==typeof r?r(t):t)}function p(t,e){if(o.isNullOrUndef(t))return null;var n=e.options.time,i=h(e.getRightValue(t),n);return i.isValid()?(n.round&&i.startOf(n.round),i.valueOf()):null}function y(t){for(var e=u.indexOf(t)+1,n=u.length;e=_&&n<=w&&M.push(n);return x.min=_,x.max=w,x._unit=O.unit||function(t,e,n,r){var o,a,s=i.duration(i(r).diff(i(n)));for(o=u.length-1;o>=u.indexOf(e);o--)if(a=u[o],l[a].common&&s.as(a)>=t.length)return a;return u[e?u.indexOf(e):0]}(M,O.minUnit,x.min,x.max),x._majorUnit=y(x._unit),x._table=function(t,e,n,i){if("linear"===i||!t.length)return[{time:e,pos:0},{time:n,pos:1}];var r,o,a,s,l,u=[],c=[e];for(r=0,o=t.length;re&&s1?o[1]:s,v=o[0],m=(d(r,"time",f,"pos")-d(r,"time",v,"pos"))/2),c.time.max||(f=o[o.length-1],v=o.length>1?o[o.length-2]:a,b=(d(r,"time",f,"pos")-d(r,"time",v,"pos"))/2)),{left:m,right:b}),x._labelFormat=function(t,e){var n,i,r,o=t.length;for(n=0;n=0&&t0?a:1}});t.scaleService.registerScaleType("time",e,{position:"bottom",distribution:"linear",bounds:"data",time:{parser:!1,format:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}})}},{25:25,45:45,6:6}]},{},[7])(7)});